Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/.classpath (renamed from libhover/.classpath)0
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/.project28
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/ChangeLog162
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/META-INF/MANIFEST.MF11
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/about.html28
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/build-helper.xml136
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/build.properties12
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/cheatsheets/autotools.xml108
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/doc/notices.html22
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/extract-markup.xsl9
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/plugin.properties12
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/plugin.xml25
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/src/org/eclipse/linuxtools/internal/cdt/autotools/doc/anttask/MediaWikiImageFetcher.java150
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/src/org/eclipse/linuxtools/internal/cdt/autotools/doc/anttask/tasks.properties1
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/toc.xml11
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Autotools Plugin-in User Guide-toc.xml12
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Autotools Plugin-in User Guide.html61
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Building.html112
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Configuration.html125
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Creating-an-Autotools-Project.html87
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Invoking-Autotools.html121
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Make-Targets.html102
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Special-Editors.html78
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Supported-Environments.html60
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Updating-This-Document.html54
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtool-AutotoolsMakeTargetsMenu.pngbin0 -> 102235 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAclocal.pngbin0 -> 23927 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutoconfEditor.pngbin0 -> 138864 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutoconfEditorPrefs.pngbin0 -> 44442 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutoheader.pngbin0 -> 19658 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutomake.pngbin0 -> 28010 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutomakeEditor.pngbin0 -> 117419 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutoreconf.pngbin0 -> 19100 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutotools.pngbin0 -> 57177 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutotoolsConsole.pngbin0 -> 83321 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsBuildLocation.pngbin0 -> 92584 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsBuilders.pngbin0 -> 55700 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsCProjectWizard.pngbin0 -> 63270 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsCheckout.pngbin0 -> 67446 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsConfsettings.pngbin0 -> 42694 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsConsolePrefs.pngbin0 -> 68815 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsConsoleSelect.pngbin0 -> 102597 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsConvAutotoolsWizard.pngbin0 -> 60383 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsConvertWizard.pngbin0 -> 69004 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsCreateConf.pngbin0 -> 53458 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsEditorsTab.pngbin0 -> 52209 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsLibtoolize.pngbin0 -> 19291 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsMakeTargetBuild.pngbin0 -> 36302 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsMakeTargetCreate.pngbin0 -> 38730 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsMakeTargetEdit.pngbin0 -> 39725 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsManageConfs.pngbin0 -> 23339 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsNewOther.pngbin0 -> 42608 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsToolSettings.pngbin0 -> 54115 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-feature/.project17
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-feature/ChangeLog113
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-feature/build.properties4
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-feature/epl-v10.html (renamed from libhover/org.eclipse.cdt.libhover.feature/epl-v10.html)0
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-feature/feature.properties138
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-feature/feature.xml74
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools-feature/license.html107
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/.classpath (renamed from libhover/org.eclipse.cdt.libhover/.classpath)0
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/.cvsignore4
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/.project28
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/ChangeLog4127
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/META-INF/MANIFEST.MF32
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/about.html (renamed from libhover/org.eclipse.linuxtools.cdt.libhover.glibc/about.html)0
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/build.properties8
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/html/maintopic.html13
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/html/subtopic.html13
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/html/toc.html13
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/plugin.properties177
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/plugin.xml535
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/cdt/autotools/core/AutotoolsNewProjectNature.java219
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/cdt/autotools/core/AutotoolsPlugin.java291
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/cdt/autotools/core/Resources.properties108
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsConfigurationBuilder.java159
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java1325
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsPropertyConstants.java52
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/DefaultNoDependencyCalculator.java51
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/IConfigurationCloneListener.java12
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/MakeMessages.java57
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/MarkerGenerator.java155
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AbstractConfigurationOption.java65
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AutotoolsConfiguration.java320
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AutotoolsConfigurationManager.java496
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AutotoolsOptionValueHandler.java124
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/BinConfigureOption.java62
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/ConfigureMessages.java60
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/ConfigureMessages.properties91
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/ConfigureOptionCategory.java70
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/ConfigureTool.java64
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/IAConfiguration.java30
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/IConfigureOption.java35
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/InternalConfigureOption.java59
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/MultiArgConfigureOption.java119
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/StringConfigureOption.java62
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/wizards/NewAutotoolsProject.java143
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/wizards/SetAutotoolsStringOptionValue.java79
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/.classpath (renamed from systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/.classpath)0
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/.project28
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/ChangeLog248
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/META-INF/MANIFEST.MF25
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/about.html (renamed from libhover/org.eclipse.cdt.libhover.feature/about.html)0
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/build.properties7
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/plugin.properties12
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/AllAutotoolsTests.java30
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsProjectNatureTest.java27
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsProjectTest0.java68
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsProjectTest1.java71
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsProjectTest2.java85
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsTestsPlugin.java103
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/CoreUtility.java108
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/ProjectTools.java418
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/Resources.properties2
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/autoconf/AutoconfTests.java29
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/autoconf/BaseParserTest.java268
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/autoconf/TestMacroParser.java266
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/autoconf/TestShellParser.java437
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/autoconf/TestTokenizer.java486
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/editors/AutomakeColourizationTests.java215
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/editors/AutomakeEditorTests.java57
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/editors/AutomakeTextHoverTest.java210
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/editors/EditorTests.java29
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/test.xml75
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/zip/project1.zipbin0 -> 95370 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.tests/zip/project2.zipbin0 -> 95172 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/.classpath (renamed from libhover/org.eclipse.linuxtools.cdt.libhover.libstdcxx/.classpath)0
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/.project28
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/ChangeLog77
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/META-INF/MANIFEST.MF30
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/build.properties11
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/plugin.properties12
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/src/org/eclipse/linuxtools/cdt/autotools/ui/tests/Activator.java60
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/src/org/eclipse/linuxtools/cdt/autotools/ui/tests/AllTests.java25
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/src/org/eclipse/linuxtools/cdt/autotools/ui/tests/SetConfigurationParameter.java551
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/src/org/eclipse/linuxtools/cdt/autotools/ui/tests/TestEnvironmentVars.java234
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/src/org/eclipse/linuxtools/cdt/autotools/ui/tests/TestMakeTargets.java184
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/src/org/eclipse/linuxtools/cdt/autotools/ui/tests/TestToolActions.java448
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/.classpath7
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/.project28
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/ChangeLog681
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/META-INF/MANIFEST.MF38
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/about.html (renamed from libhover/org.eclipse.linuxtools.cdt.libhover.library-docs/about.html)0
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/build.properties9
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/acmacro_arg_obj.gifbin0 -> 362 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/acmacro_obj.gifbin0 -> 161 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/ammacro_obj.gifbin0 -> 206 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/case_obj.gifbin0 -> 223 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/condition_obj.gifbin0 -> 69 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/convert_normal.gifbin0 -> 618 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/elif_obj.gifbin0 -> 588 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/else_obj.gifbin0 -> 361 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/for_obj.gifbin0 -> 183 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/if_obj.gifbin0 -> 618 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/while_obj.gifbin0 -> 117 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/autoconf.gifbin0 -> 1053 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/automake.gifbin0 -> 1050 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dlcl16/build_configs.gifbin0 -> 544 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dlcl16/config_category.gifbin0 -> 576 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dlcl16/config_tool.gifbin0 -> 353 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dlcl16/newc_app.gifbin0 -> 572 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dlcl16/newcc_app.gifbin0 -> 586 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dlcl16/open_include.gifbin0 -> 353 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/alphab_sort_co.gifbin0 -> 137 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/build_menu.gifbin0 -> 231 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/convert-normal.gifbin0 -> 572 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/make.gifbin0 -> 355 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/makefile.gifbin0 -> 352 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/newc_app.gifbin0 -> 572 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/newcc_app.gifbin0 -> 586 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/segment_edit.gifbin0 -> 563 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/target_add.gifbin0 -> 561 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/target_build.gifbin0 -> 571 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/target_delete.gifbin0 -> 572 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/target_edit.gifbin0 -> 568 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/update_old.gifbin0 -> 315 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/elcl16/build_configs.gifbin0 -> 565 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/elcl16/config_category.gifbin0 -> 599 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/elcl16/config_tool.gifbin0 -> 368 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/elcl16/newc_app.gifbin0 -> 612 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/elcl16/newcc_app.gifbin0 -> 630 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/elcl16/open_include.gifbin0 -> 353 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/alphab_sort_co.gifbin0 -> 157 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/build_menu.gifbin0 -> 236 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/convert_normal.gifbin0 -> 618 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/make.gifbin0 -> 374 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/makefile.gifbin0 -> 367 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/newc_app.gifbin0 -> 612 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/newcc_app.gifbin0 -> 630 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/segment_edit.gifbin0 -> 590 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/target_add.gifbin0 -> 580 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/target_build.gifbin0 -> 592 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/target_delete.gifbin0 -> 596 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/target_edit.gifbin0 -> 590 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/target_filter.gifbin0 -> 345 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/update_old.gifbin0 -> 332 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/acmacro_obj.gifbin0 -> 1053 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/command_obj.gifbin0 -> 527 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/define_obj.gifbin0 -> 154 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/environment_obj.gifbin0 -> 615 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/envvar_obj.gifbin0 -> 207 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/error_obj.gif (renamed from systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/icons/views/error_st_obj.gif)bin339 -> 339 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/fatalerror_obj.gifbin0 -> 333 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/hfolder_obj.gifbin0 -> 579 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/include_obj.gifbin0 -> 324 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/info_obj.gifbin0 -> 120 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/irule_obj.gifbin0 -> 79 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/lib_obj.gifbin0 -> 338 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/macro_obj.gifbin0 -> 359 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/relation_obj.gifbin0 -> 215 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/target_obj.gifbin0 -> 374 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/trule_obj.gifbin0 -> 205 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/warning_obj.gifbin0 -> 337 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/sample.gif (renamed from systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/icons/sample.gif)bin983 -> 983 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/plugin.properties174
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/plugin.xml740
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/AutotoolsUIPlugin.java257
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/Resources.properties105
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfAnnotationHover.java202
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfCodeScanner.java256
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfDocumentProvider.java42
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfDocumentSetupParticipant.java52
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditor.java787
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditorMacroValidator.java101
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditorMessages.java117
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditorMessages.properties47
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfErrorHandler.java213
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfIdentifierRule.java56
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfKeywordDetector.java32
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfM4WordDetector.java28
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacro.java37
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroCodeScanner.java277
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroContentAssistProcessor.java120
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroDamagerRepairer.java59
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroParameterListValidator.java215
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroPartitionRule.java148
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroProposalContextInformation.java104
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroRule.java88
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroWordDetector.java26
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfPKGWordDetector.java26
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfPartitionScanner.java57
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfPartitioner.java64
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfReconcilingStrategy.java57
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java119
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfWhitespaceDetector.java20
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfWordDetector.java34
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/IAutotoolEditorActionDefinitionIds.java17
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/IAutotoolHelpContextIds.java20
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/IAutotoolsEditor.java18
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/InlineDataRule.java165
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/MultilineRuleDamagerRepairer.java44
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/ParseException.java60
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/RecursiveSingleLineRule.java196
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/RestrictedEndOfLineRule.java130
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/outline/AutoconfContentOutlinePage.java128
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/outline/AutoconfContentProvider.java94
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/outline/AutoconfLabelProvider.java100
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfCaseConditionElement.java22
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfCaseElement.java18
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElement.java138
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElifElement.java18
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElseElement.java18
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfForElement.java18
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfIfElement.java18
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroArgumentElement.java32
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroDetector.java31
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroElement.java39
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfOutlineErrorHandler.java136
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfParser.java1042
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfRootElement.java18
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfSelectElement.java18
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfTokenizer.java435
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfUntilElement.java18
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfWhileElement.java18
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfErrorHandler.java28
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfMacroDetector.java30
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfMacroValidator.java28
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IMacroDetector.java22
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/ITokenConstants.java87
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/ParseException.java72
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/Token.java84
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/AbstractAutotoolsCPropertyTab.java22
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/AutotoolsConsole.java27
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/AutotoolsUIPluginImages.java133
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CBuildStepsConsole.java27
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CConfigureConsole.java26
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CWordFinder.java283
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/Console.java57
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ConsoleMessages.java32
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ConsoleMessages.properties25
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ErrorParserBlock.java119
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/FileRelevance.java67
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTML2TextReader.java260
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTMLPrinter.java116
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTMLTextPresenter.java190
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/LineBreakingReader.java111
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/LocationAdapter.java97
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MakeUIImages.java140
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MakeUIMessages.java40
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MakeUIMessages.properties283
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MessageLine.java75
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/OptionalMessageDialog.java144
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ResourceLookup.java159
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ResourceLookupTree.java861
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/SingleCharReader.java62
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/SubstitutionTextReader.java138
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AbstractAutotoolsHandler.java57
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AbstractTargetAction.java92
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AclocalHandler.java37
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AutoconfHandler.java33
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AutoheaderHandler.java37
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AutomakeHandler.java33
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AutoreconfHandler.java37
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAclocalAction.java104
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAction.java442
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAutoconfAction.java57
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAutoheaderAction.java79
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAutomakeAction.java98
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAutoreconfAction.java78
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeLibtoolizeAction.java78
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeMessages.java53
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeMessages.properties56
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/LibtoolizeHandler.java37
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/ReconfigureAction.java77
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/ReconfigureHandler.java37
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/SingleInputDialog.java63
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/TwoInputDialog.java111
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/autoconf/ProjectionFileUpdater.java424
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AbstractElementListSelectionDialog.java283
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AbstractMakefile.java286
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AbstractMakefileCodeScanner.java172
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AddBuildTargetAction.java154
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ArchiveTarget.java33
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutoconfSubstRule.java92
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeCompletionProcessor.java236
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeConfigMacro.java31
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeDocumentProvider.java120
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeEditor.java131
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeEditorFactory.java59
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeErrorHandler.java226
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeIfElse.java42
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeMacroDefinitionRule.java206
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeMacroReferenceRule.java70
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeTextHover.java185
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeWordDetector.java27
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Automakefile.java55
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileCodeScanner.java150
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileContentOutlinePage.java307
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileReconcilingStrategy.java106
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileSourceConfiguration.java148
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileUtil.java43
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/BadDirective.java26
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Command.java113
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Comment.java35
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/CompletionProposalComparator.java35
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Conditional.java168
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/DefaultRule.java24
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/DefineVariable.java31
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/DeleteOnErrorRule.java26
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Directive.java97
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/EditorUtility.java561
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ElementListSelectionDialog.java120
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Else.java67
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/EmptyLine.java30
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Endef.java27
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Endif.java27
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ExportAllVariablesRule.java24
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ExportVariable.java23
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ExternalEditorInput.java169
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ExternalEditorInputFactory.java92
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUAutomakefile.java987
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUMakefileConstants.java44
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUMakefileUtil.java233
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUTargetRule.java64
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUVariableDef.java130
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IArchiveTarget.java32
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IAutomakeConditional.java19
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IBadDirective.java21
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ICommand.java72
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IComment.java25
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IConditional.java35
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IDefaultRule.java23
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IDeleteOnErrorRule.java24
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IDirective.java47
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IEmptyLine.java20
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IExportAllVariablesRule.java22
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IGNUMakefile.java29
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IIgnoreRule.java22
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IInclude.java19
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IInferenceRule.java26
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IIntermediateRule.java22
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ILowResolutionTimeRule.java23
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMacroDefinition.java57
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefile.java138
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefileDocumentProvider.java34
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefileEditorActionDefinitionIds.java25
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefileReaderProvider.java34
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefileValidator.java30
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/INotParallelRule.java25
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IParent.java19
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IPhonyRule.java23
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IPosixRule.java22
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IPreciousRule.java22
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IReconcilingParticipant.java24
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IRule.java33
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISccsGetRule.java23
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISecondaryRule.java25
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISelectionValidator.java16
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISilentRule.java23
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISpecialRule.java26
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISuffixesRule.java22
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ITarget.java21
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ITargetRule.java20
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ITerminal.java25
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ITranslationUnitEditorInput.java25
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IUnExport.java21
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IVPath.java22
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IVariableDefinition.java45
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IWorkingCopyManager.java76
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IWorkingCopyManagerExtension.java44
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/If.java76
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Ifdef.java35
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Ifeq.java30
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Ifndef.java35
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Ifneq.java30
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IgnoreRule.java25
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Include.java64
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/InferenceRule.java40
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IntermediateRule.java25
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/LexicalSortingAction.java89
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/LowResolutionTimeRule.java25
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MacroDefinition.java110
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MacroDefinitionRule.java164
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MacroReferenceRule.java67
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakeFileConstants.java24
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakeFileMessages.properties27
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileAnnotationHover.java71
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileCodeScanner.java114
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileCompletionProcessor.java237
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileContentOutlinePage.java322
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileDocumentProvider.java145
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileDocumentSetupParticipant.java50
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileEditor.java461
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileEditorActionContributor.java111
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileEditorPreferenceConstants.java66
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileEditorTogglePresentationAction.java52
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileMessages.java54
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefilePartitionScanner.java96
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileReader.java86
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileReconcilingStrategy.java102
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileSourceConfiguration.java191
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileStorageDocumentProvider.java47
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileTextHover.java102
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileWordDetector.java34
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MessageLine.java132
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/NotParallelRule.java28
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/NullMakefile.java67
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/OpenDeclarationAction.java127
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/OpenIncludeAction.java303
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/OverrideDefine.java32
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/OverrideVariable.java24
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Parent.java72
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/PhonyRule.java25
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/PosixMakefileUtil.java159
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/PosixRule.java23
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/PreciousRule.java24
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ProjectionMakefileUpdater.java391
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ResourceMarkerAnnotationModel.java210
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Rule.java52
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SccsGetRule.java26
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SecondaryRule.java27
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SelectionList.java252
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SelectionStatusDialog.java195
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SilentRule.java25
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SpecialRule.java44
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/StaticTargetRule.java68
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/StatusInfo.java148
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/StatusTool.java77
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/StringMatcher.java389
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SuffixesRule.java25
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Target.java34
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/TargetRule.java72
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/TargetVariable.java33
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Terminal.java30
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/TwoArrayQuickSort.java74
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/UnExport.java32
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Util.java86
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/VPath.java42
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/VariableDefinition.java129
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/WordPartDetector.java99
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/WorkingCopyManager.java103
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AbstractEditorPreferencePage.java328
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutoconfEditorPreferencePage.java591
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutomakeEditorPreferencePage.java468
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsEditorPreferenceConstants.java76
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsPreferencePage.java61
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsPreferencesMessages.java40
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsPreferencesMessages.properties108
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/ColorEditor.java122
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/ColorManager.java91
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/OverlayPreferenceStore.java455
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/StatusInfo.java173
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/TabFolderLayout.java54
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AbstractConfigurePropertyOptionsPage.java69
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsBuildPropertyPage.java241
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsCategoryPropertyOptionPage.java139
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsConfigurePrefStore.java283
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsConfigurePropertyPage.java59
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsConfigurePropertyTab.java390
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsEditorPropertyTab.java276
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsGeneralPropertyPage.java15
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsHeadPropertyPage.java15
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsPropertyManager.java61
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsPropertyMessages.java40
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsPropertyMessages.properties44
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsToolPropertyOptionPage.java142
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsToolsPropertyTab.java346
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/IProjectPropertyListener.java25
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/IPropertyChangeManager.java40
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/ToolListContentProvider.java71
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/ToolListElement.java57
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/ToolListLabelProvider.java92
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/text/hover/AutoconfPrototype.java82
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/text/hover/AutoconfTextHover.java595
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/text/hover/HoverMessages.java91
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/text/hover/HoverMessages.properties11
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsBuildWizard.java86
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsBuildWizardHandler.java42
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsNewCCProjectWizardV2.java340
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsNewCProjectWizardV2.java340
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsWizardMessages.java56
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsWizardMessages.properties366
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/CProjectPlatformPage.java319
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConfigurationContentProvider.java33
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConfigurationLabelProvider.java43
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConvertToAutotoolsProjectWizard.java219
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConvertToAutotoolsProjectWizardPage.java224
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ManagedProjectOptionBlock.java81
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/NewAutotoolsProjectOptionPage.java155
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ReferenceBlock.java191
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/EmptyProject/template.properties14
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/EmptyProject/template.xml14
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/AUTHORS1
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/Basename.c17
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/COPYING1
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/ChangeLog0
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/Makefile.am.src3
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/Makefile.am.top1
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/NEWS1
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/README1
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/configure.ac.top14
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/template.properties30
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/template.xml105
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/AUTHORS1
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Basename.cpp18
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/COPYING1
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/ChangeLog0
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Makefile.am.src3
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Makefile.am.top1
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/NEWS1
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/README1
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/configure.ac.top14
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.properties30
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.xml105
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/.classpath (renamed from systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/.classpath)0
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/.cvsignore4
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/.project28
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/ChangeLog4050
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/META-INF/MANIFEST.MF34
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/about.html26
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/build.properties9
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/icons/autoconf.gifbin0 -> 1053 bytes
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/plugin.properties170
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/plugin.xml1031
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsBuilder.java79
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsDefaultBuildDirHandler.java155
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java512
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsPlugin.java324
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsProjectNature.java175
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsProjectPropertyTester.java31
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfo.java431
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfoProvider.java112
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java1374
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/Resources.properties95
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AbstractAutotoolsHandler.java57
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AbstractTargetAction.java93
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AclocalHandler.java37
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AutoconfHandler.java33
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AutoheaderHandler.java37
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AutomakeHandler.java33
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AutoreconfHandler.java37
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAclocalAction.java104
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAction.java442
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoconfAction.java57
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoheaderAction.java79
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutomakeAction.java98
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoreconfAction.java78
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeLibtoolizeAction.java78
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeMessages.java53
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeMessages.properties56
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/LibtoolizeHandler.java37
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/ReconfigureAction.java78
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/ReconfigureHandler.java37
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/SingleInputDialog.java63
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/TwoInputDialog.java111
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfCaseConditionElement.java22
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfCaseElement.java18
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfEditorMessages.java117
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfEditorMessages.properties47
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElement.java138
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElifElement.java18
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElseElement.java18
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfForElement.java18
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfIfElement.java18
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroArgumentElement.java32
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroDetector.java31
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroElement.java39
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfOutlineErrorHandler.java136
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfParser.java1041
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfRootElement.java18
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfSelectElement.java18
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfTokenizer.java434
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfUntilElement.java18
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfWhileElement.java18
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfErrorHandler.java28
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfMacroDetector.java30
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfMacroValidator.java28
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IMacroDetector.java22
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/ITokenConstants.java87
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/ParseException.java72
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/Token.java84
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsBuildPropertyPage.java243
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsEditorPropertyPage.java278
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyConstants.java47
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyManager.java61
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyMessages.java40
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyMessages.properties41
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyPage.java376
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsToolsPropertyPage.java343
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/IProjectPropertyListener.java25
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/IPropertyChangeManager.java40
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/MarkerGenerator.java155
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/AutotoolsConsole.java27
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CBuildStepsConsole.java27
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CConfigureConsole.java26
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CWordFinder.java283
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/Console.java57
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ConsoleMessages.java32
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ConsoleMessages.properties25
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTMLPrinter.java116
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/LineBreakingReader.java111
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/SingleCharReader.java62
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/SubstitutionTextReader.java138
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsEditorPreferenceConstants.java80
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/OverlayPreferenceStore.java455
-rw-r--r--autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/StatusInfo.java173
-rw-r--r--changelog/.cvsignore4
-rw-r--r--changelog/.template6
-rw-r--r--changelog/ChangeLog693
-rw-r--r--changelog/icons/file_obj.gifbin354 -> 0 bytes
-rw-r--r--changelog/org.eclipse.linuxtools.changelog-feature/ChangeLog19
-rw-r--r--changelog/org.eclipse.linuxtools.changelog-feature/build.properties4
-rw-r--r--changelog/org.eclipse.linuxtools.changelog-feature/feature.properties128
-rw-r--r--changelog/org.eclipse.linuxtools.changelog-feature/license.html107
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/ChangeLog85
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/META-INF/MANIFEST.MF4
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/about.html26
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/build.properties1
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/plugin.properties2
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/plugin.xml16
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/ChangeLogPreferencesPage.java82
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/ChangelogPlugin.java76
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/ChangelogPreferenceInitializer.java71
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogAction.java45
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogContainerContentProvider.java12
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogContainerSelectionGroup.java3
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogRootContainer.java387
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/InsertChangeLogKeyHandler.java2
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/PatchFile.java21
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/PatchRangeElement.java12
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/PrepareChangeLogAction.java148
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/SourceEditorInput.java34
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/StorageEditorInput.java113
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/editors/GNUFileEntryDamagerRepairer.java5
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/editors/GNUPartitionScanner.java1
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/editors/MultilineRuleDamagerRepairer.java1
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.cparser/ChangeLog23
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.cparser/META-INF/MANIFEST.MF1
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.cparser/about.html26
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.cparser/build.properties1
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.cparser/src/org/eclipse/linuxtools/changelog/parsers/CParser.java204
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.doc/about.html37
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.doc/plugin.properties2
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.javaparser/ChangeLog5
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.javaparser/about.html26
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.javaparser/build.properties1
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.javaparser/src/org/eclipse/linuxtools/changelog/parsers/java/JavaParser.java4
-rw-r--r--changelog/plugin.properties14
-rw-r--r--changelog/plugin.xml201
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/ChangeLogExtensionManager.java262
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/ChangeLogPreferencesPage.java318
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/ChangeLogWriter.java111
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/ChangelogPlugin.java111
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/IEditorChangeLogContrib.java59
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/IFormatterChangeLogContrib.java23
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/IParserChangeLogContrib.java44
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/Messages.java48
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogAction.java270
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/actions/FormatChangeLogAction.java86
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/actions/InsertChangeLogKeyHandler.java206
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/actions/PatchFile.java90
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/actions/PatchRangeElement.java45
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/actions/PrepareChangeLogAction.java563
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/actions/PrepareChangelogKeyHandler.java158
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/actions/PrepareCommitAction.java185
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/actions/PrepareCommitHandler.java97
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/actions/StringDiffOperation.java74
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/editors/ChangeLogDocumentProvider.java27
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/editors/ChangeLogEditor.java130
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/editors/ChangeLogFormattingStrategy.java243
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/editors/ColorManager.java46
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/editors/FileHyperlink.java72
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/editors/GNUEditorConfiguration.java145
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/editors/GNUElementScanner.java90
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/editors/GNUHyperlinkDetector.java201
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/editors/IChangeLogColorConstants.java33
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/formatters/GNUFormat.java336
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/parsers/CParser.java123
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/parsers/CompareParser.java50
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/parsers/PythonParser.java70
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/strings.properties6
-rw-r--r--changelog/src/org/eclipse/linuxtools/changelog/core/ui/ChangeLogActionProvider.java134
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/.classpath (renamed from systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/.classpath)0
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/.project28
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/.settings/org.eclipse.jdt.core.prefs3
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/META-INF/MANIFEST.MF24
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/about.html28
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/build.properties8
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/icons/c_file_obj.gifbin0 -> 617 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/plugin.properties12
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/plugin.xml58
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/AbstractSTAnnotatedSourceEditorInput.java82
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/ISTAnnotationColumn.java19
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/ISTTextEditorActionConstants.java19
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/ISTTextEditorActionDefinitionIds.java20
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STAnnotatedCSourceEditor.java449
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STAnnotatedSourceEditorActivator.java76
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STChangeRulerColumn.java390
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STConstructedTextEditorMessages.properties4
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STContributedRulerColumn.java798
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STJFaceTextMessages.java67
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STOverviewRuler.java1309
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STRulerColumn.java876
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STRulerMessages.java34
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STTextEditorMessages.java37
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/actions/AbstractOpenSourceFileAction.java93
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/actions/OpenFileFullPathAction.java32
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/actions/OpenWksRelFilePathAction.java63
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/hyperlink/ISTAnnotationHyperlink.java17
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/preferencespages/STAnnotatedSourceEditorPreferencePage.java59
-rwxr-xr-xgcov/org.eclipse.linuxtools.dataviewers.charts/.classpath7
-rwxr-xr-xgcov/org.eclipse.linuxtools.dataviewers.charts/.project28
-rwxr-xr-xgcov/org.eclipse.linuxtools.dataviewers.charts/META-INF/MANIFEST.MF26
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.charts/about.html26
-rwxr-xr-xgcov/org.eclipse.linuxtools.dataviewers.charts/build.properties8
-rwxr-xr-xgcov/org.eclipse.linuxtools.dataviewers.charts/icons/Thumbs.dbbin0 -> 3584 bytes
-rwxr-xr-xgcov/org.eclipse.linuxtools.dataviewers.charts/icons/chart_icon.pngbin0 -> 573 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.charts/icons/dexport.gifbin0 -> 142 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.charts/icons/dimport.gifbin0 -> 143 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.charts/icons/eexport.gif (renamed from systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/export_wiz.gif)bin329 -> 329 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.charts/icons/eimport.gif (renamed from systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/import_wiz.gif)bin327 -> 327 bytes
-rwxr-xr-x[-rw-r--r--]gcov/org.eclipse.linuxtools.dataviewers.charts/icons/save_chart.gif (renamed from systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/saveas_edit.gif)bin583 -> 583 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.charts/plugin.properties14
-rwxr-xr-xgcov/org.eclipse.linuxtools.dataviewers.charts/plugin.xml21
-rwxr-xr-xgcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/Activator.java88
-rwxr-xr-xgcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/ChartConstants.java85
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/UIHelper.java143
-rwxr-xr-xgcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/actions/ChartAction.java67
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/actions/ChartActionRenderer.java46
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/actions/OpenChartAction.java77
-rwxr-xr-xgcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/actions/SaveChartAction.java286
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/actions/SaveXMLAction.java132
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/dataengine/BindDataEngine.java364
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/dataengine/FlatFileDataSource.java70
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/dataengine/FlatFileDataSourceFactory.java40
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/dataengine/GroupedRowExpressionsEvaluator.java280
-rwxr-xr-xgcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/dialogs/ChartDialog.java427
-rwxr-xr-xgcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/provider/ChartFactory.java251
-rw-r--r--gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/provider/ChartUpdateNotifier.java41
-rwxr-xr-xgcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/provider/IChartField.java30
-rwxr-xr-xgcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/view/ChartView.java204
-rwxr-xr-xgcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/viewer/ChartViewer.java252
-rwxr-xr-xgcov/org.eclipse.linuxtools.gcov-feature/.project17
-rwxr-xr-xgcov/org.eclipse.linuxtools.gcov-feature/build.properties8
-rwxr-xr-x[-rw-r--r--]gcov/org.eclipse.linuxtools.gcov-feature/epl-v10.html (renamed from systemtap/SystemTapGuiServer/systemtapguiserver-1.0/docs/epl-v10.html)0
-rwxr-xr-xgcov/org.eclipse.linuxtools.gcov-feature/feature.properties138
-rwxr-xr-xgcov/org.eclipse.linuxtools.gcov-feature/feature.xml59
-rw-r--r--gcov/org.eclipse.linuxtools.gcov-feature/license.html107
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/.classpath7
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/.project28
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/META-INF/MANIFEST.MF9
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/about.html33
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/build.properties9
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/plugin.properties12
-rwxr-xr-xgcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/gcov/test/AllGcovTests.java29
-rwxr-xr-xgcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/gcov/test/GcovGCDARetrieverTest.java68
-rwxr-xr-xgcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/gcov/test/GcovParserTest.java59
-rwxr-xr-xgcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/gcov/test/GcovTestUtils.java66
-rwxr-xr-xgcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/gcov/test/GcovViewTest.java111
-rwxr-xr-xgcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/gcov/test/STJunitUtils.java267
-rwxr-xr-xgcov/org.eclipse.linuxtools.gcov.test/test.xml54
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_c/Makefile8
-rwxr-xr-xgcov/org.eclipse.linuxtools.gcov.test/test_c/a.outbin0 -> 30722 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_c/fact.c19
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_c/fact.gcdabin0 -> 168 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_c/fact.gcnobin0 -> 480 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_c/main.c28
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_c/main.gcdabin0 -> 176 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_c/main.gcnobin0 -> 676 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_c/mult.c21
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_c/mult.gcdabin0 -> 152 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_c/mult.gcnobin0 -> 500 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_c/testProcessCovFiles.ref30
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_c/testView.ref8
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_c/testViewFolder.ref9
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_c/testViewFunction.ref5
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_cpp/Makefile8
-rwxr-xr-xgcov/org.eclipse.linuxtools.gcov.test/test_cpp/a.outbin0 -> 34593 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_cpp/fact.cpp31
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_cpp/fact.gcdabin0 -> 320 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_cpp/fact.gcnobin0 -> 1268 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_cpp/fact.hpp26
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_cpp/main.cpp30
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_cpp/main.gcdabin0 -> 864 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_cpp/main.gcnobin0 -> 8992 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_cpp/mult.cpp29
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_cpp/mult.gcdabin0 -> 280 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_cpp/mult.gcnobin0 -> 1140 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_cpp/mult.hpp22
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_cpp/testProcessCovFiles.ref148
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_cpp/testView.ref36
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_cpp/testViewFolder.ref39
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.test/test_cpp/testViewFunction.ref27
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/.classpath7
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/.project28
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/META-INF/MANIFEST.MF26
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/about.html28
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/build.properties8
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/icons/c_file_obj.gifbin0 -> 1019 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/icons/directory_obj.gifbin0 -> 162 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/icons/function_obj.gifbin0 -> 617 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/icons/src_file_obj.gifbin0 -> 617 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/icons/toggle.gifbin0 -> 610 bytes
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/plugin.properties16
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/plugin.xml38
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/Activator.java71
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/action/OpenGCAction.java166
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/action/SwitchContentProviderAction.java44
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/dialog/OpenGCDialog.java303
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/model/AbstractTreeElement.java79
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/model/CovFileTreeElement.java25
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/model/CovFolderTreeElement.java24
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/model/CovFunctionTreeElement.java57
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/model/CovRootTreeElement.java26
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/model/TreeElement.java27
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/Arc.java131
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/Block.java177
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/CovManager.java359
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/CoverageInfo.java52
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/Folder.java65
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/GcdaRecordsParser.java272
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/GcnoFunction.java255
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/GcnoRecordsParser.java241
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/Line.java50
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/SourceFile.java110
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/utils/BEDataInputStream.java191
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/utils/GcovStringReader.java38
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/utils/LEDataInputStream.java208
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/utils/MasksGenerator.java15
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/utils/STGcovProgramChecker.java85
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/CovFileContentProvider.java60
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/CovFolderContentProvider.java61
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/CovFunctionContentProvider.java52
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/CovView.java261
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/CovViewer.java119
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/FieldCoveragePercentage.java99
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/FieldExecutedLines.java68
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/FieldInstrumentedLines.java77
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/FieldName.java69
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/FieldTotalLines.java82
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/annotatedsource/CoverageAnnotationColumn.java79
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/annotatedsource/OpenSourceFileAction.java136
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/annotatedsource/STAnnotatedSourceEditorInput.java73
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/annotatedsource/STAnnotatedSourceNotFoundEditor.java50
-rw-r--r--gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/annotatedsource/STAnnotatedSourceNotFoundEditorInput.java69
-rw-r--r--gprof/org.eclipse.linuxtools.binutils/about.html45
-rw-r--r--gprof/org.eclipse.linuxtools.binutils/plugin.properties2
-rw-r--r--gprof/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/link2source/STCSourceNotFoundEditor.java3
-rw-r--r--gprof/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/link2source/STCSourceNotFoundEditorInput.java1
-rw-r--r--gprof/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/link2source/STLink2SourceSupport.java4
-rw-r--r--gprof/org.eclipse.linuxtools.dataviewers/about.html37
-rw-r--r--gprof/org.eclipse.linuxtools.dataviewers/plugin.properties2
-rw-r--r--gprof/org.eclipse.linuxtools.dataviewers/src/org/eclipse/linuxtools/dataviewers/actions/STCopyAction.java2
-rw-r--r--gprof/org.eclipse.linuxtools.dataviewers/src/org/eclipse/linuxtools/dataviewers/findreplace/STFindReplaceDialog.java195
-rw-r--r--gprof/org.eclipse.linuxtools.dataviewers/src/org/eclipse/linuxtools/dataviewers/findreplace/STTreeViewerRow.java2
-rw-r--r--gprof/org.eclipse.linuxtools.gprof-feature/ChangeLog15
-rw-r--r--gprof/org.eclipse.linuxtools.gprof-feature/build.properties7
-rw-r--r--gprof/org.eclipse.linuxtools.gprof-feature/feature.properties126
-rw-r--r--gprof/org.eclipse.linuxtools.gprof-feature/feature.xml9
-rw-r--r--gprof/org.eclipse.linuxtools.gprof-feature/license.html107
-rwxr-xr-xgprof/org.eclipse.linuxtools.gprof.test/bigtest_gprof_input/testParse.ref4019
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/build.properties5
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/a.outbin20254 -> 12483 bytes
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/gmon.outbin1442 -> 1380 bytes
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/src/foox.cpp2
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testCallgraphTimeView.ref48
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testCallgraphTimeView.ref.binutils-2.1642
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testCallgraphView.ref48
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testCallgraphView.ref.binutils-2.1642
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testFlatSampleView.ref8
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testFlatTimeView.ref8
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testFunctionSampleView.ref20
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testFunctionTimeView.ref20
-rwxr-xr-xgprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testParse.ref67
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testSampleView.ref22
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testTimeView.ref22
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/a.outbin14261 -> 9514 bytes
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/gmon.outbin1210 -> 1222 bytes
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/src/foox.c2
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testCallgraphTimeView.ref30
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testCallgraphView.ref30
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testFlatSampleView.ref17
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testFlatTimeView.ref17
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testFunctionSampleView.ref23
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testFunctionTimeView.ref23
-rwxr-xr-xgprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testParse.ref43
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testSampleView.ref25
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testTimeView.ref25
-rwxr-xr-xgprof/org.eclipse.linuxtools.gprof.test/partially-pg-build_gprof_input/testParse.ref23
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/plugin.properties2
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/src/org/eclipse/linuxtools/gprof/test/GprofAggregatorTest.java10
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/src/org/eclipse/linuxtools/gprof/test/GprofParserTest.java4
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/src/org/eclipse/linuxtools/gprof/test/GprofTest.java81
-rw-r--r--gprof/org.eclipse.linuxtools.gprof.test/src/org/eclipse/linuxtools/gprof/test/STJunitUtils.java85
-rwxr-xr-xgprof/org.eclipse.linuxtools.gprof.test/test.xml54
-rw-r--r--gprof/org.eclipse.linuxtools.gprof/META-INF/MANIFEST.MF3
-rw-r--r--gprof/org.eclipse.linuxtools.gprof/about.html37
-rw-r--r--gprof/org.eclipse.linuxtools.gprof/plugin.properties2
-rw-r--r--gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/parser/CallGraphDecoder.java6
-rw-r--r--gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/parser/CallGraphDecoder_64.java42
-rw-r--r--gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/parser/GmonDecoder.java18
-rw-r--r--gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/parser/HistogramDecoder.java53
-rw-r--r--gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/parser/HistogramDecoder_64.java44
-rw-r--r--gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/view/GmonView.java2
-rw-r--r--gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/view/fields/CallsProfField.java3
-rw-r--r--gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/view/fields/RatioProfField.java3
-rw-r--r--gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/view/fields/SampleProfField.java3
-rw-r--r--libhover/.project28
-rw-r--r--libhover/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--libhover/ChangeLog15
-rw-r--r--libhover/META-INF/MANIFEST.MF15
-rw-r--r--libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$FunctionSummary$FunctionPrototypeSummary.classbin1828 -> 0 bytes
-rw-r--r--libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$FunctionSummary$RequiredInclude.classbin1059 -> 0 bytes
-rw-r--r--libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$FunctionSummary.classbin3817 -> 0 bytes
-rw-r--r--libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$HelpBook.classbin1074 -> 0 bytes
-rw-r--r--libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$HelpResource.classbin930 -> 0 bytes
-rw-r--r--libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$HelpResourceDescriptor.classbin1702 -> 0 bytes
-rw-r--r--libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$LibHoverLibrary.classbin1239 -> 0 bytes
-rw-r--r--libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover.classbin11609 -> 0 bytes
-rw-r--r--libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.classbin1253 -> 0 bytes
-rw-r--r--libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.properties12
-rw-r--r--libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibhoverPlugin.classbin1247 -> 0 bytes
-rw-r--r--libhover/bin/org/eclipse/linuxtools/cdt/libhover/preferences/LibHoverPreferencePage.classbin2244 -> 0 bytes
-rw-r--r--libhover/bin/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceConstants.classbin609 -> 0 bytes
-rw-r--r--libhover/bin/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceInitializer.classbin1119 -> 0 bytes
-rw-r--r--libhover/bin/org/eclipse/linuxtools/cdt/libhover/properties/LibHoverPropertyPage.classbin3837 -> 0 bytes
-rw-r--r--libhover/build.properties5
-rw-r--r--libhover/org.eclipse.cdt.libhover.feature/.project17
-rw-r--r--libhover/org.eclipse.cdt.libhover.feature/ChangeLog26
-rw-r--r--libhover/org.eclipse.cdt.libhover.feature/build.properties4
-rw-r--r--libhover/org.eclipse.cdt.libhover.feature/feature.properties112
-rw-r--r--libhover/org.eclipse.cdt.libhover.feature/feature.xml52
-rw-r--r--libhover/org.eclipse.cdt.libhover/.project28
-rw-r--r--libhover/org.eclipse.cdt.libhover/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--libhover/org.eclipse.cdt.libhover/ChangeLog54
-rw-r--r--libhover/org.eclipse.cdt.libhover/META-INF/MANIFEST.MF16
-rw-r--r--libhover/org.eclipse.cdt.libhover/build.properties9
-rw-r--r--libhover/org.eclipse.cdt.libhover/plugin.properties14
-rw-r--r--libhover/org.eclipse.cdt.libhover/plugin.xml12
-rw-r--r--libhover/org.eclipse.cdt.libhover/schema/org.eclipse.linuxtools.cdt.libhover.library.exsd216
-rw-r--r--libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHover.java499
-rw-r--r--libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.java41
-rw-r--r--libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.properties16
-rw-r--r--libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/LibhoverPlugin.java68
-rw-r--r--libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/CheckboxFieldEditor.java393
-rw-r--r--libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/LibHoverPreferencePage.java79
-rw-r--r--libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceConstants.java20
-rw-r--r--libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceInitializer.java37
-rw-r--r--libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/properties/LibHoverPropertyPage.java464
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover-feature/.project17
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover-feature/epl-v10.html320
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.glibc/.project22
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.glibc/toc.xml7
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.library-docs/.project22
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.library-docs/plugin.xml11
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.library-docs/toc.xml6
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.libstdcxx/.project17
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.libstdcxx/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.libstdcxx/META-INF/MANIFEST.MF12
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.libstdcxx/plugin.xml23
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.libstdcxx/toc.xml7
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.newlib-feature/.project17
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.newlib-feature/epl-v10.html320
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.newlib/.project22
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.newlib/META-INF/MANIFEST.MF9
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.newlib/build.properties5
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.newlib/plugin.xml23
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.newlib/toc.xml9
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover/.project28
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover/schema/org.eclipse.linuxtools.cdt.libhover.library.exsd216
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/ClassInfo.java123
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/FunctionInfo.java134
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/HelpBook.java37
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHoverInfo.java24
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/TypedefInfo.java118
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/utils/BuildFunctionInfos.java213
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHoverMessages.java41
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHoverMessages.properties16
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/preferences/CheckboxFieldEditor.java394
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/preferences/LibHoverPreferencePage.java79
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/preferences/PreferenceConstants.java20
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/preferences/PreferenceInitializer.java37
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/properties/LibHoverPropertyPage.java465
-rw-r--r--libhover/plugin.xml36
-rw-r--r--libhover/schema/org.eclipse.linuxtools.cdt.libhover.library.exsd216
-rw-r--r--libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHover.java475
-rw-r--r--libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.java41
-rw-r--r--libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.properties12
-rw-r--r--libhover/src/org/eclipse/linuxtools/cdt/libhover/LibhoverPlugin.java61
-rw-r--r--libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/LibHoverPreferencePage.java64
-rw-r--r--libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceConstants.java16
-rw-r--r--libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceInitializer.java26
-rw-r--r--libhover/src/org/eclipse/linuxtools/cdt/libhover/properties/LibHoverPropertyPage.java125
-rw-r--r--rpm/org.eclipse.linuxtools.rpm-feature/.classpath5
-rw-r--r--rpm/org.eclipse.linuxtools.rpm-feature/.project23
-rw-r--r--rpm/org.eclipse.linuxtools.rpm-feature/ChangeLog51
-rw-r--r--rpm/org.eclipse.linuxtools.rpm-feature/about.html (renamed from libhover/org.eclipse.linuxtools.cdt.libhover.newlib-feature/about.html)0
-rw-r--r--rpm/org.eclipse.linuxtools.rpm-feature/build.properties19
-rw-r--r--rpm/org.eclipse.linuxtools.rpm-feature/feature.properties16
-rw-r--r--rpm/org.eclipse.linuxtools.rpm-feature/feature.xml50
-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/ChangeLog65
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/META-INF/MANIFEST.MF18
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/build.properties14
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/plugin.xml4
-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/internal/tests/RPMCoreInternalTestSuite.java23
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/internal/tests/RPMProjectTest.java301
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/internal/tests/SpecFileParserTest.java100
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/AllTests.java25
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMCoreTestSuite.java23
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMCoreTestsPlugin.java76
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectFactoryTest.java62
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectNatureTest.java59
-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/.template4
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/ChangeLog435
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/META-INF/MANIFEST.MF19
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/about.html (renamed from libhover/org.eclipse.linuxtools.cdt.libhover.newlib/about.html)0
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/build.properties23
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/plugin.xml13
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IPatch.java57
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IRPMConfiguration.java50
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IRPMConstants.java114
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IRPMProject.java157
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/ISourceRPM.java43
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/ISpecFile.java92
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMCorePlugin.java176
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMExportDelta.java107
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProjectFactory.java83
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProjectNature.java121
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/Messages.java28
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/Patch.java38
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/RPMConfiguration.java143
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/RPMProject.java419
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/SourceRPM.java33
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/SpecFile.java207
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/SpecFileParser.java657
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/rpm_strings.properties220
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/Diff.java56
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/RPM.java58
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/RPMBuild.java113
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/RPMQuery.java84
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/internal/Command.java74
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/internal/ShellScript.java81
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/internal/StreamReaderThread.java38
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/.project11
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/ChangeLog87
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/about.html33
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/build.properties12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/build.xml76
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/plugin.properties10
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/plugin.xml20
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/raw/book.css206
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/raw/hglegal2004.htm20
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/raw/images/01_eclipse_rpm_prefs_page1.pngbin0 -> 40730 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/raw/images/02_eclipse_rpm_Cproject_create.pngbin0 -> 33658 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/raw/images/03_eclipse_rpm_Cproject_create.pngbin0 -> 30803 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/raw/images/04_eclipse_rpm_srpm_import.pngbin0 -> 35803 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/raw/images/05_eclipse_rpm_srpm_import.pngbin0 -> 33381 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/raw/images/06_eclipse_rpm_srpm_import.pngbin0 -> 25763 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/raw/images/07_eclipse_rpm_srpm_import.pngbin0 -> 39097 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/raw/images/07_eclipse_rpm_srpm_import_2.pngbin0 -> 35680 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/raw/images/08_eclipse_rpm_cproject_view.pngbin0 -> 130370 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/raw/images/09_eclipse_rpm_export.pngbin0 -> 33881 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/raw/images/10_eclipse_rpm_export.pngbin0 -> 43965 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/raw/images/11_eclipse_rpm_export.pngbin0 -> 36026 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/raw/images/12_eclipse_rpm_export.pngbin0 -> 26201 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/raw/images/13_eclipse_rpm_export.pngbin0 -> 28644 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/raw/images/14_eclipse_rpm_export.pngbin0 -> 13860 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/raw/images/15_eclipse_rpm_logviewer.pngbin0 -> 19752 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/raw/images/16_eclipse_rpm_logviewer.pngbin0 -> 71055 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/raw/notnetscape4.css14
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/raw/rpmguide/RPM_Plugin.htm317
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.doc/toc.xml7
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.releng/ChangeLog50
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.releng/build.properties80
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.releng/build.xml46
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.releng/customTargets.xml165
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.releng/maps/rpm.map4
-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/ChangeLog423
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/META-INF/MANIFEST.MF25
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/build.properties (renamed from systemtap/org.eclipse.linuxtools.systemtap.ui.logging/build.properties)0
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/plugin.properties12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/plugin.xml97
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/Activator.java86
-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.java26
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/actions/RunRpmlintAction.java87
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/actions/ToggleRpmlintNatureAction.java105
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/actions/messages.properties11
-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.java138
-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.java304
-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/ChangeLog36
-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.html (renamed from systemtap/org.eclipse.linuxtools.systemtap-feature/epl-v10.html)0
-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/.project22
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/ChangeLog50
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/META-INF/MANIFEST.MF5
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/build.properties4
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/generic.html55
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/Unti.xcfbin0 -> 240040 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/enable_rpmlint.pngbin0 -> 129551 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/generic.pngbin0 -> 194908 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/macros_long.pngbin0 -> 4573 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/macros_short.pngbin0 -> 5034 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/new_from_template.pngbin0 -> 53602 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/problems_rpmlint.pngbin0 -> 72383 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/rpmlint_fix_after.pngbin0 -> 15655 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/rpmlint_fix_before.pngbin0 -> 14117 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/rpmlint_quickfix.pngbin0 -> 68669 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_changelog.pngbin0 -> 69746 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_macros.pngbin0 -> 68593 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_rpmlint.pngbin0 -> 53836 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_rpms_details.pngbin0 -> 81211 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_rpms_generic.pngbin0 -> 83169 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_tasks.pngbin0 -> 44515 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_templates.pngbin0 -> 139665 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/warnings_rpmlint.pngbin0 -> 230637 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/wizard.pngbin0 -> 29257 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/macro_settings.html28
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/package_settings.html26
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/rpmlint.html43
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/settings.html54
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/support.html27
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/toc.html39
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/plugin.xml8
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/toc.xml14
-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/ChangeLog489
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/META-INF/MANIFEST.MF19
-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.java24
-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/actions/SpecfileEditorShowOutlineActionDelegateTest.java37
-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.java162
-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.java141
-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/.classpath (renamed from libhover/org.eclipse.linuxtools.cdt.libhover/.classpath)0
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/.cvsignore1
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/.project28
-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.prefs6
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/ChangeLog2176
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/META-INF/MANIFEST.MF30
-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.properties12
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/plugin.xml292
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/Activator.java216
-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.java38
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/NonRuleBasedDamagerRepairer.java (renamed from systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/NonRuleBasedDamagerRepairer.java)46
-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.java204
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageProposalsList.java166
-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.java43
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java586
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileConfiguration.java252
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileDocumentProvider.java36
-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.java248
-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.java105
-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.java95
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/UiUtils.java88
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/Utils.java121
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/Messages.java32
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogAction.java199
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogFormatter.java206
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogParser.java32
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorOrganizePatchesActionDelegate.java77
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorShowOutlineActionDelegate.java58
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorToggleCommentActionDelegate.java141
-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.java26
-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/AnnotationHover.java490
-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.java202
-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.java114
-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.java64
-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.java25
-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.java89
-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.java159
-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.properties11
-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.java26
-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.java117
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileLabelProvider.java83
-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.java29
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/Specfile.java227
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileDefine.java36
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileElement.java101
-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.java72
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePackageContainer.java97
-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.java584
-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.java63
-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.java79
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/messages.properties28
-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.java153
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/Messages.java58
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/PreferenceConstants.java107
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/PreferenceInitializer.java61
-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.java52
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/TaskTagsPreferencePage.java79
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/messages.properties44
-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.java106
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/VersionReleaseRule.java164
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileChangelogScanner.java81
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfilePackagesScanner.java94
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfilePartitionScanner.java98
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileScanner.java160
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/wizards/Messages.java50
-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.java154
-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.properties36
-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/.template4
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/ChangeLog403
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/META-INF/MANIFEST.MF25
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/about.html33
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/build.properties24
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/icons/rpm.gifbin0 -> 1019 bytes
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/plugin.xml95
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/IRPMUIConstants.java22
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/Messages.java29
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportOperation.java122
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportPage.java640
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportPatchPage.java279
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportWizard.java94
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMUIPlugin.java122
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportOperation.java119
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportPage.java455
-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/logviewer/LogReader.java117
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/logviewer/RPMLogViewer.java112
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/preferences/RPMPluginPreferencesPage.java295
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/ChangelogPage.java108
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/InstallScriptsPage.java157
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/Messages.java30
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/ProvidesPage.java111
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/SpecFileHeaderPage.java107
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/TargetPage.java167
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/messages.properties13
-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.properties166
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/util/ExceptionHandler.java137
-rw-r--r--systemtap/.project17
-rw-r--r--systemtap/SystemTapGuiServer/.project11
-rw-r--r--systemtap/SystemTapGuiServer/systemtapguiserver-1.0/MailBox.cpp328
-rw-r--r--systemtap/SystemTapGuiServer/systemtapguiserver-1.0/Makefile19
-rw-r--r--systemtap/SystemTapGuiServer/systemtapguiserver-1.0/common.cpp185
-rw-r--r--systemtap/SystemTapGuiServer/systemtapguiserver-1.0/confReader.cpp217
-rw-r--r--systemtap/SystemTapGuiServer/systemtapguiserver-1.0/datamanager.cpp914
-rw-r--r--systemtap/SystemTapGuiServer/systemtapguiserver-1.0/dmerror.cpp50
-rw-r--r--systemtap/SystemTapGuiServer/systemtapguiserver-1.0/docs/README113
-rw-r--r--systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/MailBox.hpp145
-rw-r--r--systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/common.hpp112
-rw-r--r--systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/confReader.hpp39
-rw-r--r--systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/datamanager.hpp124
-rw-r--r--systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/dmerror.hpp69
-rw-r--r--systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/logger.hpp43
-rw-r--r--systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/stapdebug.hpp10
-rw-r--r--systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/subscriptionMgr.hpp106
-rw-r--r--systemtap/SystemTapGuiServer/systemtapguiserver-1.0/logger.cpp22
-rw-r--r--systemtap/SystemTapGuiServer/systemtapguiserver-1.0/makefile.dep18
-rw-r--r--systemtap/SystemTapGuiServer/systemtapguiserver-1.0/subscriptionMgr.cpp401
-rw-r--r--systemtap/feature.xml236
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph-feature/ChangeLog4
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph-feature/feature.properties4
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/ChangeLog50
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/META-INF/MANIFEST.MF5
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/build.properties5
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/icons/progress_stop.gifbin215 -> 0 bytes
-rwxr-xr-xsystemtap/org.eclipse.linuxtools.callgraph.core/install.sh2
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/markup.stp81
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/parse_function_mark_partial.stp122
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/parse_function_partial.stp23
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/plugin.xml24
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/schema/org.eclipse.linuxtools.callgraph.core.parser.exsd24
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/Activator.java133
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/CallgraphCorePlugin.java133
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/DocWriter.java68
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/FileFinderOpener.java22
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/Helper.java13
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/LaunchConfigurationConstants.java4
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/PluginConstants.java35
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/StapUIJob.java73
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapCommandGenerator.java85
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapErrorHandler.java271
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapParser.java326
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapTextParser.java61
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapTextView.java244
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapView.java540
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/ViewFactory.java86
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/XMLParser.java198
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/messages.properties22
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch.tests/ChangeLog25
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch.tests/resources/.cproject936
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch.tests/resources/.project82
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch.tests/src/org/eclipse/linuxtools/callgraph/launch/tests/ConfigurationTest.java4
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch.tests/src/org/eclipse/linuxtools/callgraph/launch/tests/SystemTapCommandGeneratorTest.java19
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch.tests/src/org/eclipse/linuxtools/callgraph/launch/tests/SystemTapErrorHandlerTest.java89
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/ChangeLog21
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/META-INF/MANIFEST.MF5
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/plugin.xml8
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ASTTranslationUnitVisitor.java54
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/Activator.java105
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/CallgraphLaunchPlugin.java105
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ConfigurationOptionsSetter.java155
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchStapGraph.java118
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchWizard.java21
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java205
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchShortcut.java786
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapOptionsTab.java60
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/messages.properties48
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests-feature/feature.properties2
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/ChangeLog16
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/META-INF/MANIFEST.MF3
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/basic.graph12
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/build.properties8
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/catlan.graph495
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/comprehensive.graph189
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/eag.graph197
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/heavy.graph28129
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/main.graph6
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/parse_function_nomark.stp29
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/AllTests.java3
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/MouseListenerTest.java44
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/StapGraphParserTest.java41
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphTest.java53
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphViewTest.java15
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/TestHelper.java61
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/ChangeLog76
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/META-INF/MANIFEST.MF5
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/icons/down.gifbin168 -> 99 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/icons/pause.gifbin230 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/icons/perform.pngbin1038 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/icons/up.gifbin148 -> 105 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/plugin.xml32
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/Activator.java95
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/AggregateLayoutAlgorithm.java27
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/CallGraphConstants.java7
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/CallgraphPlugin.java95
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/CallgraphView.java1234
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/GraphUIJob.java226
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapData.java219
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapGraph.java459
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapGraphParser.java542
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapNode.java41
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/SystemTapCommandParser.java123
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/AutoScrollHelper.java8
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/Projectionist.java95
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphKeyListener.java17
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphMouseListener.java25
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphMouseWheelListener.java2
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/messages.properties35
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeContentProvider.java10
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeDoubleClickListener.java3
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeLabelProvider.java6
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap-feature/.project17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap-feature/ChangeLog25
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap-feature/build.properties4
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap-feature/feature.properties115
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap-feature/feature.xml87
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup-feature/.project17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup-feature/ChangeLog38
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup-feature/feature.properties112
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup-feature/feature.xml38
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/.settings/org.eclipse.jdt.core.prefs83
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/ChangeLog77
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/META-INF/MANIFEST.MF27
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/build.properties8
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/completion/stp_completion.properties569
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/plugin.properties12
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/plugin.xml16
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/ChangeLog21
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/ColorManager.java41
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPColorConstants.java21
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPCompletionProcessor.java160
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPConfiguration.java129
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPDocumentProvider.java39
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPElementScanner.java109
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPMetadataSingleton.java305
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPPartitionScanner.java94
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPPartitioner.java61
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPReconcilingStrategy.java278
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/SystemtapEditor.java162
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/activator/Activator.java73
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/strings.properties568
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local-feature/.project17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local-feature/build.properties (renamed from systemtap/org.eclipse.linuxtools.systemtap.backup-feature/build.properties)0
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local-feature/epl-v10.html (renamed from systemtap/org.eclipse.linuxtools.systemtap.backup-feature/epl-v10.html)0
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local-feature/feature.properties114
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local-feature/feature.xml68
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/.classpath7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/META-INF/MANIFEST.MF18
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/basic.graph6
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/build.properties5
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/catlan.graph6
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/eag.graph6
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/icons/sample.gif (renamed from systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/sample.gif)bin983 -> 983 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/makefile30
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/parse_function_nomark.stp43
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/Activator.java83
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/AllTests.java33
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/MouseListenerTest.java60
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/StapGraphParserTest.java106
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/SystemTapGraphTest.java321
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/SystemTapGraphViewTest.java34
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/test.xml54
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/.classpath7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/META-INF/MANIFEST.MF21
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/build.properties16
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/compare_method.gifbin0 -> 193 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/down.gifbin0 -> 99 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/genericregister_obj.gifbin0 -> 115 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/mode_collapsednodes.gifbin0 -> 88 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/nav_refresh.gifbin0 -> 327 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/public_co.gifbin0 -> 194 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/radial_view.gifbin0 -> 362 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/showchild_mode.gifbin0 -> 323 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/tree_view.gifbin0 -> 91 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/up.gifbin0 -> 105 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/view_aggregateview.gifbin0 -> 131 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/plugin.xml92
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/Activator.java95
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/AggregateLayoutAlgorithm.java72
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/CallGraphConstants.java24
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/CallgraphView.java1172
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/GraphUIJob.java226
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/Messages.java32
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapData.java228
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapGraph.java1832
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapGraphParser.java368
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapNode.java143
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/SystemTapCommandParser.java123
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/InsertMarkerAction.java123
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/Messages.java32
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/RemoveMarkerAction.java125
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/messages.properties10
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/AutoScrollHelper.java58
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/AutoScrollSelectionListener.java42
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/Messages.java17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphFocusListener.java38
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphKeyListener.java78
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseExitListener.java28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseListener.java278
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseMoveListener.java82
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseWheelListener.java143
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/messages.properties13
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/messages.properties82
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeContentProvider.java74
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeDoubleClickListener.java55
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeLabelProvider.java55
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeListener.java73
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/.classpath7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/META-INF/MANIFEST.MF21
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/build.properties23
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/errors.prop13
-rwxr-xr-xsystemtap/org.eclipse.linuxtools.systemtap.local.core/install.sh21
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/parse_function_mark_partial.stp122
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/parse_function_partial.stp21
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/plugin.xml6
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/schema/org.eclipse.linuxtools.systemtap.local.core.parser.exsd109
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/schema/systemtapCommands.exsd84
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/Activator.java133
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/FileFinderOpener.java153
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/Helper.java142
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/LaunchConfigurationConstants.java92
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/MP.java45
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/Messages.java36
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/PluginConstants.java51
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/ShellOpener.java40
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapCommandGenerator.java236
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapErrorHandler.java323
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapParser.java169
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapUIErrorMessages.java62
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/messages.properties38
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/systemtap.pngbin0 -> 3538 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/systemtapbanner.pngbin0 -> 4071 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/.classpath7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/META-INF/MANIFEST.MF21
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/build.properties16
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.cproject936
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.lock0
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.mylyn/repositories.xml.zipbin0 -> 402 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.mylyn/tasks.xml.zipbin0 -> 250 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.history/e4/0056fdb7b8a6001e143aec015f68a92782
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.projects/CallGraphDemo/.indexes/history.indexbin0 -> 42 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.projects/CallGraphDemo/1.treebin0 -> 627069 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version1
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.indexbin0 -> 151 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version1
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/2.treebin0 -> 361 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resourcesbin0 -> 568 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.collabnet.subversion.merge.prefs3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs15
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.cvs.ui.prefs3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.ui.prefs3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs6
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.tigris.subversion.subclipse.ui.prefs3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCachebin0 -> 4 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.datbin0 -> 115 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml10
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ltk.ui.refactoring/dialog_settings.xml7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml5
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml235
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml4
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/version.ini1
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.project82
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/.cproject593
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/.project81
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/main.c25
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/uncalled.c3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/AbstractStapTest.java67
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/Activator.java82
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/AllTests.java41
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/ConfigurationTest.java104
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/LaunchShortcutsTest.java69
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapCommandGeneratorTest.java94
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapCommandLineTest.java172
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapCommandTest.java59
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapTabTest.java50
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/TestConstants.java15
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/test.xml54
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/.classpath7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/META-INF/MANIFEST.MF30
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/build.properties18
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/icons/Wizard.gifbin0 -> 10445 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/icons/bar_graph.pngbin0 -> 467 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/icons/question.pngbin0 -> 438 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/index.xml5
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/plugin.properties12
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/plugin.xml90
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/ASTTranslationUnitVisitor.java54
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/Activator.java105
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/ConfigurationOptionsSetter.java235
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/LaunchStapGraph.java301
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/LaunchWizard.java332
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/ListTreeContentProvider.java151
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/Messages.java32
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/RuledTreeSelectionDialog.java109
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLCTG.java37
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLaunchConfigurationDelegate.java473
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLaunchConfigurationTabGroup.java30
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLaunchShortcut.java793
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapOptionsTab.java1011
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/TranslationUnitVisitor.java49
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/messages.properties135
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/toc.xml6
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/tree.htm1
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/.project17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/build.properties (renamed from systemtap/build.properties)0
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/epl-v10.html (renamed from systemtap/org.eclipse.linuxtools.systemtap.ui.test-feature/epl-v10.html)0
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/feature.properties112
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/feature.xml51
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/ChangeLog20
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/META-INF/MANIFEST.MF15
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/build.properties4
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/AllTests.java38
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ConsoleStreamDaemonTest.java65
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ErrorStreamDaemonTest.java66
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ErrorTableDisplayTest.java28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ScriptConsoleTest.java65
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/views/ErrorViewTest.java31
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/.classpath7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/ChangeLog15
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/META-INF/MANIFEST.MF24
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/build.properties9
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/icons/actions/save_log.gifbin583 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/icons/views/error_obj.gifbin351 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/plugin.properties6
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/plugin.xml46
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/ClientSession.java326
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/ScpClient.java232
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/Subscription.java420
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/ConsoleAction.java116
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/SaveLogAction.java59
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/StopScriptAction.java88
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/ErrorMessage.java31
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/SCPDetails.java110
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/SelectServerDialog.java165
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/internal/ConsoleLogPlugin.java66
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/internal/Localization.java22
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/internal/localization.properties13
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/preferences/ConsoleLogPreferenceConstants.java25
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/preferences/ConsoleLogPreferencePage.java68
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/preferences/PreferenceInitializer.java38
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ConsoleStreamDaemon.java71
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/DMError.java62
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/DMPacket.java65
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/DMRequest.java197
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/DMResponse.java136
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ErrorStreamDaemon.java76
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ErrorTableDisplay.java184
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/IErrorParser.java16
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ScriptConsole.java288
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/views/ErrorView.java95
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/.classpath7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/ChangeLog22
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/META-INF/MANIFEST.MF17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/build.properties7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/edit/copy_edit.gifbin594 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/edit/cut_edit.gifbin212 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/edit/delete_edit.gifbin351 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/edit/paste_edit.gifbin605 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/edit/redo_edit.gifbin356 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/edit/undo_edit.gifbin355 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/close_edit.gifbin163 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/closeall_edit.gifbin204 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/new_wiz.gifbin612 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/open_wiz.gifbin216 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/print_edit.gifbin612 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/save_edit.gifbin639 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/saveall_edit.gifbin604 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/plugin.properties18
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/plugin.xml72
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/ColorManager.java41
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/DoubleClickStrategy.java134
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/PathEditorInput.java113
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/RecentFileMenuManager.java42
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/SimpleDocumentProvider.java242
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/SimpleEditor.java190
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/WhitespaceDetector.java28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/WordDetector.java27
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/actions/ActiveEditorAction.java22
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/actions/EditorAction.java70
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/actions/file/NewFileAction.java45
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/actions/file/OpenFileAction.java104
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/actions/file/OpenRecentFileAction.java44
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/internal/EditorPlugin.java68
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/internal/Localization.java22
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/internal/RecentFileLog.java118
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/internal/localization.properties5
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/ChangeLog18
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/META-INF/MANIFEST.MF11
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/build.properties4
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/src/org/eclipse/linuxtools/systemtap/ui/graphing/AllTests.java28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/src/org/eclipse/linuxtools/systemtap/ui/graphing/structures/GraphDisplaySetTest.java29
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/.classpath7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/.settings/org.eclipse.pde.prefs22
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/ChangeLog15
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/META-INF/MANIFEST.MF26
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/build.properties9
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/concepts.html24
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/dataTable.html38
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/filters.html57
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphInteraction.html22
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes.html19
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/barGraph.html12
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/images/bar.pngbin57086 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/images/line.pngbin56270 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/images/multibar.pngbin53670 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/images/multiline.pngbin55538 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/images/multiscatter.pngbin56240 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/images/scatter.pngbin54530 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/lineGraph.html12
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/multiBarGraph.html12
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/multiLineGraph.html13
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/multiScatterGraph.html14
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/scatterGraph.html12
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/GraphWizard.pngbin61025 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/GraphWizard2.pngbin56674 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/GraphingPerspective.pngbin46821 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/GraphingPerspective2.pngbin48425 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/filters.pngbin21461 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/graphExpanded.pngbin13937 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/match.pngbin55032 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/match2.pngbin47165 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/range.pngbin60042 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/range2.pngbin48867 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/scale2.pngbin4675 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/sort.pngbin56352 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/sort2.pngbin50899 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/unique.pngbin67983 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/zoom.pngbin1319 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/gettingStarted.html13
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/graphingTutorial.html78
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/images/GraphWizard.pngbin61025 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/images/chartbox1.pngbin19247 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/images/graph.pngbin55043 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/images/graphics.pngbin57714 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/images/multi.pngbin53849 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/introduction.html26
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/exampleGraphingScripts.html32
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/frequentlyAskedQuestions.html37
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/menu/export.pngbin87449 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/menu/import.pngbin88542 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/menu/openbox1.pngbin49976 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/menu/preferencesbox1.pngbin40679 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/menu/saveoutput.pngbin91761 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/menu/viewbox1.pngbin17660 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/dash.pngbin1765 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/graphing.pngbin1668 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/ide.pngbin866 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/open_wiz.gifbin216 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/save_wiz.gifbin639 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/stop_obj.gifbin215 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/menus.html49
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/preferences.html129
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/reference.html19
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/regex.html144
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/toolbars.html29
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/tasks/importDataSet.html30
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/tasks/makingGraphs.html16
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/tasks/openScriptOutput.html12
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/tasks/savingGraphImage.html11
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/tasks/tasks.html16
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/toc.html61
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/tocconcepts.xml17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/tocgettingstarted.xml7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/tocreference.xml11
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/toctasks.xml9
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/actions/export_wiz.gifbin329 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/actions/import_wiz.gifbin327 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/actions/new_wiz.gifbin612 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/actions/open_wiz.gifbin216 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/actions/regEx.gifbin294 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/actions/save_wiz.gifbin639 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/graphs/MultiBar.gifbin284 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/graphs/MultiLine.gifbin190 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/graphs/MultiScatter.gifbin191 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/graphs/SingleBar.gifbin248 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/graphs/SingleLine.gifbin144 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/graphs/SingleScatter.gifbin144 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/perspective_obj.gifbin983 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/views/selector_obj.gifbin983 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/plugin.properties31
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/plugin.xml174
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/GraphingConstants.java23
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/GraphingPerspective.java48
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/actions/ExportDataSetAction.java148
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/actions/ImportDataSetAction.java160
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/actions/ModifyParsingAction.java105
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/actions/OpenScriptOutputAction.java200
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/actions/SaveGraphImageAction.java234
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/internal/GraphingPlugin.java65
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/internal/Localization.java22
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/internal/localization.properties20
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/preferences/DataTablePreferencePage.java71
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/preferences/GraphPreferencePage.java84
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/preferences/GraphingPreferenceConstants.java20
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/preferences/GraphingPreferencePage.java57
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/preferences/PreferenceInitializer.java43
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/structures/GraphDisplaySet.java272
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/views/GraphSelectorView.java184
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/toc.xml17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/.classpath8
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/ChangeLog7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/META-INF/MANIFEST.MF15
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/build.properties4
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/AllTests.java88
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/MockDataSet.java67
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/adapters/BlockAdapterTest.java20
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/adapters/ScrollAdapterTest.java20
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/aggregates/AverageAggregateTest.java66
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/aggregates/CountAggregateTest.java66
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/aggregates/MaxAggregateTest.java65
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/aggregates/MinAggregateTest.java66
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/aggregates/SumAggregateTest.java66
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/row/FilteredRowDataSetTest.java271
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/row/RowDataSetTest.java157
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/row/RowEntryTest.java109
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/row/RowParserTest.java66
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/table/FilteredTableDataSetTest.java267
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/table/TableDataSetTest.java164
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/table/TableEntryTest.java125
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/table/TableParserTest.java69
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/filters/MatchFilterTest.java79
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/filters/RangeFilterTest.java139
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/filters/SortFilterTest.java109
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/filters/UniqueFilterTest.java93
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/structures/ChartStreamDaemonTest.java55
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/structures/ChartStreamDaemonTest2.java60
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/structures/DataPointTest.java19
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/structures/GraphDataTest.java30
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/structures/NumberTypeTest.java76
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/structures/UpdateManagerTest.java57
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/.classpath7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/ChangeLog15
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/META-INF/MANIFEST.MF21
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/build.properties5
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/IGraphColorConstants.java245
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/adapters/BlockAdapter.java172
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/adapters/IAdapter.java38
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/adapters/ScrollAdapter.java177
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/aggregates/AverageAggregate.java43
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/aggregates/CountAggregate.java40
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/aggregates/IDataAggregate.java17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/aggregates/MaxAggregate.java44
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/aggregates/MinAggregate.java44
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/aggregates/SumAggregate.java42
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/IBlockDataSet.java16
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/IDataEntry.java25
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/IDataSet.java35
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/IDataSetParser.java30
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/IFilteredDataSet.java21
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/IHistoricalDataSet.java22
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/row/FilteredRowDataSet.java157
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/row/RowDataSet.java183
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/row/RowEntry.java79
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/row/RowParser.java88
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/table/FilteredTableDataSet.java169
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/table/TableDataSet.java204
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/table/TableEntry.java112
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/table/TableParser.java104
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/filters/IDataSetFilter.java23
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/filters/MatchFilter.java76
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/filters/RangeFilter.java114
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/filters/SortFilter.java89
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/filters/UniqueFilter.java110
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/internal/GraphingAPINonUIPlugin.java65
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/internal/Localization.java22
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/internal/localization.properties5
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/structures/ChartStreamDaemon.java65
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/structures/ChartStreamDaemon2.java55
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/structures/DataPoint.java26
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/structures/GraphData.java20
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/structures/NumberType.java105
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/.classpath7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/ChangeLog15
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/META-INF/MANIFEST.MF23
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/build.properties7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/icons/graphs/BarGraph.gifbin284 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/icons/graphs/LineGraph.gifbin190 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/icons/graphs/PieChart.gifbin1274 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/icons/graphs/ScatterGraph.gifbin191 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/plugin.properties3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/plugin.xml26
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/datadisplay/DataGrid.java344
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/AChart.java130
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/AGraph.java241
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/BarGraph.java140
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/IBlockGraph.java16
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/IGraph.java27
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/IScrollGraph.java16
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/LineGraph.java120
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/PieChart.java108
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/ScatterGraph.java121
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/internal/GraphingAPIUIPlugin.java65
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/internal/Localization.java21
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/internal/localization.properties142
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/preferences/DataTablePreferencePage.java56
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/preferences/GraphPreferencePage.java69
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/preferences/GraphingAPIPreferenceConstants.java25
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/preferences/GraphingAPIPreferencePage.java37
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/preferences/PreferenceInitializer.java32
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphAxis.java203
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphAxis2.java114
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphCanvas.java256
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphComposite.java210
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphLabel.java104
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphLegend.java108
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/IGraphPrimitive.java54
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/DataSetFactory.java146
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/DataSetWizard.java191
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/ParsingWizardPage.java216
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/SelectDataSetWizardPage.java119
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/SelectRowParsingWizardPage.java126
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/SelectTableParsingWizardPage.java145
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/AggregateFactory.java87
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/AvailableFilterTypes.java121
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/FilterWizardPage.java59
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/MatchFilterWizardPage.java127
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/RangeFilterWizardPage.java175
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/SelectFilterWizard.java85
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/SelectFilterWizardPage.java119
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/SortFilterWizardPage.java108
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/UniqueFilterWizardPage.java149
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/graph/GraphFactory.java157
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/graph/GraphModel.java89
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/graph/SelectGraphWizard.java71
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/graph/SelectGraphWizardPage.java118
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/graph/SelectSeriesWizardPage.java328
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/.classpath9
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/ChangeLog21
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/META-INF/MANIFEST.MF15
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/build.properties4
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/AllTests.java33
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/IDESessionSettingsTest.java18
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/structures/StapErrorParserTest.java69
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/structures/TreeSettingsTest.java131
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/.classpath7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/ChangeLog71
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/META-INF/MANIFEST.MF35
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/build.properties9
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/completion/stp_completion.properties569
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/concepts.html16
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/functionBrowser.html17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/Editor.pngbin58169 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/Function.pngbin71937 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/KernelSource.pngbin63684 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/ProbeAlias.pngbin66851 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_long.gifbin367 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_str.gifbin576 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_unk.gifbin368 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_void.gifbin183 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/kernelBrowser.html9
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/probeAliasBrowser.html17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/stpEditor.html13
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/systemtapPerspectives.html23
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial.html15
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/chartbox1.pngbin19247 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/editor.pngbin54078 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/graph.pngbin55043 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/graphics.pngbin57714 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/newfile.pngbin32385 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/output.pngbin58821 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/lesson1.html30
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/lesson2.html70
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/lesson3.html59
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/gettingStarted.html22
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/exampleScripts.html174
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/frequentlyAskedQuestions.html29
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/Console.pngbin66102 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/ErrorLog.pngbin58821 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/chartbox1.pngbin19247 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/consolebox1.pngbin19084 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/findbox1.pngbin23878 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/gotobox1.pngbin7047 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/importbox1.pngbin35211 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/newbox1.pngbin52828 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/openbox1.pngbin49976 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/optionsbox1.pngbin28529 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/passbox1.pngbin7450 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/preferencesbox1.pngbin40679 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/viewbox1.pngbin17817 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/dash.pngbin1765 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/graphing.pngbin1668 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/ide.pngbin866 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/import_wiz.gifbin327 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/new_wiz.gifbin612 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/open_wiz.gifbin216 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/run_chart.gifbin612 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/run_exc.gifbin379 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/run_tool.gifbin588 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/stop_obj.gifbin215 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/menus.html105
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/preferences.html129
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/reference.html19
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/regex.html144
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/toolbars.html29
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/viewsAndEditors.html34
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/creatingSystemtapScripts.html17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/images/addedModule.pngbin8131 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/images/exportScript.pngbin61215 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/images/options.pngbin28529 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/tasks.html14
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/usingTheSTPEditor.html30
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/viewingDataCharts.html14
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/toc.html54
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/tocconcepts.xml10
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/tocgettingstarted.xml10
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/tocreference.xml14
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/toctasks.xml8
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/import_wiz.gifbin327 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/run/run_chart.gifbin612 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/run/run_exc.gifbin379 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/run/run_tool.gifbin588 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/terminate_co.gifbin215 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/files/file_c.gifbin351 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/files/file_h.gifbin353 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/files/file_stp.gifbin360 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/misc/file_obj.gifbin354 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/misc/fldr_obj.gifbin216 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/misc/probe_obj.gifbin374 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/perspective_obj.gifbin371 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_long.gifbin367 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_str.gifbin576 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_unk.gifbin368 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_void.gifbin183 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/func_obj.gifbin126 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/kernel_obj.gifbin227 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/page_obj.gifbin359 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/probe_obj.gifbin149 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.properties70
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.xml317
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/IDEPerspective.java69
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/IDESessionSettings.java26
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/DefinitionAction.java154
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/ImportTapsetAction.java104
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptAction.java345
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptChartAction.java128
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptOptionsAction.java105
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/TempFileAction.java54
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/FunctionBrowserAction.java142
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/KernelSourceAction.java178
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/ProbeAliasAction.java134
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/TreeExpandCollapseAction.java136
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/dialogs/ErrorMessage.java31
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CConfiguration.java103
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CDocumentProvider.java51
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CEditor.java346
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CPartitionScanner.java42
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CScanner.java110
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/ICColorConstants.java28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPColorConstants.java24
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPCompletionProcessor.java159
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPConfiguration.java144
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPDocumentProvider.java68
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPEditor.java163
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPElementScanner.java110
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPMetadataSingleton.java305
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPPartitionScanner.java94
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPPartitioner.java61
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPReconcilingStrategy.java278
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/strings.properties568
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/IDECloseMonitor.java46
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/IDEPlugin.java81
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/Localization.java22
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/localization.properties70
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/CodeAssistPreferencePage.java73
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/ConditionalFilterPreferencePage.java50
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/EditorPreferencePage.java52
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/IDEPreferenceConstants.java91
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/IDEPreferencePage.java48
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/PathPreferencePage.java54
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/PreferenceInitializer.java93
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/StapOptionsPreferencePage.java60
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/StapPreferencePage.java45
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/SyntaxColoringPreferencePage.java185
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/TapsetsPreferencePage.java52
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/TypeingPreferencePage.java45
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/Query.java176
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/StapErrorParser.java84
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TapsetLibrary.java202
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TapsetParser.java679
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TreeSettings.java253
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/uistructures/StapSettingsDialog.java178
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/BrowserView.java167
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/FunctionBrowserView.java139
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/KernelBrowserView.java141
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/ProbeAliasBrowserView.java103
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/toc.xml17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.logging/.classpath7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.logging/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.logging/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.logging/ChangeLog16
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.logging/META-INF/MANIFEST.MF15
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.logging/plugin.properties1
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.logging/plugin.xml16
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/LogManager.java203
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/internal/Localization.java22
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/internal/LogDaemon.java69
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/internal/LogEntry.java25
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/internal/LoggingPlugin.java65
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/internal/localization.properties10
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/preferences/LoggingPreferencePage.java65
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/preferences/PreferenceConstants.java49
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/preferences/PreferenceInitializer.java31
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/.classpath7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/ChangeLog34
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/META-INF/MANIFEST.MF15
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/build.properties4
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/AllTests.java53
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/CCodeFileFilterTest.java37
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/CopierTest.java54
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/IndexedObjectTest.java38
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/JarArchiveTest.java23
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/KernelSourceTreeTest.java78
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/LoggingStreamDaemonTest.java60
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/SortTest.java85
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/StringFormatterTest.java94
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/TreeDefinitionNodeTest.java79
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/TreeNodeTest.java231
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/ZipArchiveTest.java72
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/CommandTest.java80
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/LoggedCommandTest.java67
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/StreamGobblerTest.java62
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/ConditionalExpressionValidatorTest.java35
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/DirectoryValidatorTest.java32
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/IntegerValidatorTest.java32
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/MultiValidatorTest.java46
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/NumberValidatorTest.java31
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/.classpath7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/ChangeLog16
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/META-INF/MANIFEST.MF16
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/build.properties5
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/CCodeFileFilter.java37
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/Copier.java48
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/IFormattingStyles.java30
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/IPasswordPrompt.java16
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/IndexedObject.java37
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/JarArchive.java80
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/KernelSourceTree.java75
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/LoggingStreamDaemon.java131
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/PasswordPrompt.java65
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/RegExParser.java57
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/Sort.java71
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/StringFormatter.java58
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/TreeDefinitionNode.java34
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/TreeNode.java130
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/UpdateManager.java84
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/ZipArchive.java141
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/internal/Localization.java22
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/internal/StructuresPlugin.java65
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/internal/localization.properties23
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/listeners/IActionListener.java16
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/listeners/IGobblerListener.java21
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/listeners/ITabListener.java18
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/listeners/IUpdateListener.java16
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/Command.java279
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/LoggedCommand.java98
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/StreamGobbler.java201
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/ui/ComboFieldEditor.java197
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/ui/ListEditor.java74
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/ui/PasswordDialog.java95
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/ConditionalExpressionValidator.java41
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/DirectoryValidator.java39
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/IntegerValidator.java36
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/MultiValidator.java42
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/NumberValidator.java38
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/.classpath7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/.settings/org.eclipse.jdt.core.prefs65
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/ChangeLog16
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/META-INF/MANIFEST.MF20
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/about.html23
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/aboutImage.gifbin9770 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/build.properties14
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/documentation/html/gettingstarted/gettingStarted.html95
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/documentation/html/gettingstarted/installation.html46
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/documentation/html/toc.html18
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/documentation/tocgettingstarted.xml22
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/icons/eclipse.gifbin308 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/icons/perspective_obj.gifbin361 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/icons/welcome.gifbin553 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/plugin.properties10
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/plugin.xml56
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/plugin_customization.ini6
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/splash.bmpbin464694 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/splash2.bmpbin248214 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/Application.java44
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/ApplicationActionBarAdvisor.java330
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/ApplicationWorkbenchAdvisor.java54
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/ApplicationWorkbenchWindowAdvisor.java61
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/Perspective.java44
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/SystemTapGUISettings.java20
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/internal/Localization.java22
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/internal/SystemTapGUIPlugin.java65
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/internal/localization.properties11
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/preferences/EnvironmentVariablesPreferencePage.java168
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/preferences/PreferenceConstants.java43
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/preferences/PreferenceInitializer.java29
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/preferences/SystemTapPreferencePage.java57
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/views/WelcomeView.java87
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/toc.xml11
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.test-feature/.project11
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.test-feature/ChangeLog7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.test-feature/build.properties4
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.test-feature/feature.properties112
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.test-feature/feature.xml91
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.tests/.classpath7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.tests/.project17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.tests/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.tests/ChangeLog16
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.tests/META-INF/MANIFEST.MF20
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.tests/about.html26
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.tests/build.properties10
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.tests/plugin.properties13
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.tests/plugin.xml16
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.tests/src/org/eclipse/linuxtools/systemtap/ui/tests/SystemtapGuiMockProcess.java56
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.tests/src/org/eclipse/linuxtools/systemtap/ui/tests/SystemtapGuiTestsPlugin.java83
2406 files changed, 143162 insertions, 88884 deletions
diff --git a/libhover/.classpath b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/.classpath
index 64c5e31b7a..64c5e31b7a 100644
--- a/libhover/.classpath
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/.classpath
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/.project b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/.project
new file mode 100644
index 0000000000..76fdbef06b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.cdt.autotools-docs</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/autotools/org.eclipse.linuxtools.cdt.autotools-docs/ChangeLog b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/ChangeLog
new file mode 100644
index 0000000000..3a9c929d96
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/ChangeLog
@@ -0,0 +1,162 @@
+2010-06-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ Bug #315852
+ * toc.xml: Fixed link for pkg-config tool.
+
+2010-04-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Change J2SE level to 1.5.
+
+2010-04-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #309117
+ * .classpath: New file.
+ * build-helper.xml: New file.
+ * doc/notices.html: New file.
+ * extract-markup.xsl: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/doc/anttask/MediaWikiImageFetcher.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/doc/anttask/tasks.properties: New file.
+ * userguide/Autotools\ Plugin-in\ User\ Guide-toc.xml: New file.
+ * userguide/Autotools\ Plugin-in\ User\ Guide.html: New file.
+ * userguide/Building.html: New file.
+ * userguide/Configuration.html: New file.
+ * userguide/Creating-an-Autotools-Project.html: New file.
+ * userguide/images/Linuxtool-AutotoolsMakeTargetsMenu.png: New file.
+ * userguide/images/Linuxtools-AutotoolsAclocal.png: New file.
+ * userguide/images/Linuxtools-AutotoolsAutoconfEditor.png: New file.
+ * userguide/images/Linuxtools-AutotoolsAutoconfEditorPrefs.png: New file.
+ * userguide/images/Linuxtools-AutotoolsAutoheader.png: New file.
+ * userguide/images/Linuxtools-AutotoolsAutomake.png: New file.
+ * userguide/images/Linuxtools-AutotoolsAutomakeEditor.png: New file.
+ * userguide/images/Linuxtools-AutotoolsAutoreconf.png: New file.
+ * userguide/images/Linuxtools-AutotoolsAutotools.png: New file.
+ * userguide/images/Linuxtools-AutotoolsAutotoolsConsole.png: New file.
+ * userguide/images/Linuxtools-AutotoolsBuilders.png: New file.
+ * userguide/images/Linuxtools-AutotoolsBuildLocation.png: New file.
+ * userguide/images/Linuxtools-AutotoolsCheckout.png: New file.
+ * userguide/images/Linuxtools-AutotoolsConfsettings.png: New file.
+ * userguide/images/Linuxtools-AutotoolsConsolePrefs.png: New file.
+ * userguide/images/Linuxtools-AutotoolsConsoleSelect.png: New file.
+ * userguide/images/Linuxtools-AutotoolsConvAutotoolsWizard.png: New file.
+ * userguide/images/Linuxtools-AutotoolsConvertWizard.png: New file.
+ * userguide/images/Linuxtools-AutotoolsCProjectWizard.png: New file.
+ * userguide/images/Linuxtools-AutotoolsCreateConf.png: New file.
+ * userguide/images/Linuxtools-AutotoolsEditorsTab.png: New file.
+ * userguide/images/Linuxtools-AutotoolsLibtoolize.png: New file.
+ * userguide/images/Linuxtools-AutotoolsMakeTargetBuild.png: New file.
+ * userguide/images/Linuxtools-AutotoolsMakeTargetCreate.png: New file.
+ * userguide/images/Linuxtools-AutotoolsMakeTargetEdit.png: New file.
+ * userguide/images/Linuxtools-AutotoolsManageConfs.png: New file.
+ * userguide/images/Linuxtools-AutotoolsNewOther.png: New file.
+ * userguide/images/Linuxtools-AutotoolsToolSettings.png: New file.
+ * userguide/Invoking-Autotools.html: New file.
+ * userguide/Make-Targets.html: New file.
+ * userguide/Special-Editors.html: New file.
+ * userguide/Supported-Environments.html: New file.
+ * userguide/Updating-This-Document.html: New file.
+ * .project: Change to be Java project.
+ * build.properties: Add new binary files.
+ * META-INF/MANIFEST.MF: Dependency added.
+ * plugin.xml: Add additional toc for Autotools User Guide.
+
+2009-11-16 Andrew Overholt <overholt@redhat.com>
+
+ * plugin.properties: Fix bundle name. Fix provider.
+
+2009-10-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * cheatsheets/autotools.xml: Revised for Autotools rewrite.
+
+2009-10-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ * build.properties: Add build.properties to bin list.
+ * META-INF/MANIFEST.MF: Bump up version to 2.0.0.
+
+2009-01-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Add .qualifier to id.
+
+2008-11-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * build.properties: Add cheatsheets directory to binary list and remove
+ doc.zip which no longer exists in project.
+
+2008-10-31 Andrew Overholt <overholt@redhat.com>
+
+ * META-INF/MANIFEST.MF: Use translated BundleName and provider. Add
+ "(Incubation)".
+ * plugin.properties: Initial import.
+
+2008-10-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ * toc.xml: Add anchor id so other gnu tools can be added to Gnu Tools list.
+
+2008-09-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Update version number to 1.0.0.
+
+2008-09-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * toc.xml: Add http references for all of the GNU tools documentation.
+
+2007-10-04 jjohnstn <jjohnstn@vermillion>
+
+ * META-INF/MANIFEST.MF: Update release to 0.0.5.
+ * cheatsheets/autotools.xml: Add sub-step after pushing finish for GNU Autotools
+ project wizard to handle the possibility of the workspace asking to go to the
+ C/C++ perspective. Remove separate "changing to C/C++ perspective" step.
+
+2007-10-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * cheatsheets/autotools.xml: New File.
+ * plugin.xml: Add cheatsheets extension for autotools project.
+ * META-INF/MANIFEST.MF: Add dependency on org.eclipse.ui.cheatsheets.
+
+2007-08-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Change release to 0.0.4 and specify minimum java runtime
+ as 1.4.
+ * build.xml: Removed.
+
+2007-02-02 Andrew Overholt <overholt@redhat.com>
+
+ * toc.xml: Add "and Other" to the toc entry.
+ * doc.zip: Add pkg-config/index.html (created using PolyglotMan
+ <http://polyglotman.sourceforge.net/>).
+
+2007-01-22 Andrew Overholt <overholt@redhat.com>
+
+ * toc.xml: Gnu -> GNU.
+
+2007-01-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * about.html: New license file.
+
+2006-08-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * build.xml: Update release to 0.0.3.
+
+2006-07-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Manifest.MF: Change release to 0.0.3.
+ * getdocs.sh: Update to current FC6 releases of tools help.
+ * doc.zip: Updated.
+
+2006-07-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Manifest.MF: Change release to 0.0.2.
+ * build.properties: Add doc.zip and toc.xml to bin files.
+
+2006-06-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Make provider Red Hat.
+
+2006-04-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * getdocs.sh: New file to generate doc.zip.
+
+2006-04-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * toc.xml: New file.
+ * doc.zip: Ditto.
+ * plugin.xml: Ditto. \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/META-INF/MANIFEST.MF b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..27ed55b507
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/META-INF/MANIFEST.MF
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.linuxtools.cdt.autotools_docs;singleton:=true
+Bundle-Version: 2.0.1.qualifier
+Bundle-Vendor: %provider
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.help,
+ org.eclipse.ui.cheatsheets,
+ org.apache.ant;bundle-version="1.7.1"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/about.html b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/about.html
new file mode 100644
index 0000000000..c258ef55d8
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse 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>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/build-helper.xml b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/build-helper.xml
new file mode 100644
index 0000000000..3a53e29b91
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/build-helper.xml
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="org.eclipse.linuxtools.autotools.docs" default="all">
+ <description>
+ Generate Eclipse help content for the Linux Tools autotools user guide
+ </description>
+
+ <property name="autotools.help.doc.url.base" value="http://wiki.eclipse.org"/>
+ <property name="autotools.wiki.url.base" value="${autotools.help.doc.url.base}/Linux_Tools_Project/Autotools"/>
+ <property name="imageFolder" value="images"/>
+
+ <path id="tasks.classpath" path="bin"/>
+ <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/cdt/autotools/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 autotools user guide">
+ <eclipse-wiki-to-help
+ help.doc.filenamenoextension="Autotools Plugin-in User Guide"
+ help.doc.url.base="${autotools.help.doc.url.base}"
+ help.doc.url.html="${autotools.wiki.url.base}/User_Guide"
+ help.doc.url.xml="${autotools.help.doc.url.base}/Special:Export/Linux_Tools_Project/Autotools/User_Guide"
+ help.imagefolder="${imageFolder}"
+ targetfolder="userguide"
+ wiki.url.base="${autotools.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/autotools/org.eclipse.linuxtools.cdt.autotools-docs/build.properties b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/build.properties
new file mode 100644
index 0000000000..7f286fb4c3
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/build.properties
@@ -0,0 +1,12 @@
+bin.includes = META-INF/,\
+ plugin.xml,\
+ toc.xml,\
+ cheatsheets/,\
+ about.html,\
+ plugin.properties,\
+ doc/,\
+ userguide/
+jars.compile.order = .
+source.. = src/
+output.. = bin/
+source.. = src/
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/cheatsheets/autotools.xml b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/cheatsheets/autotools.xml
new file mode 100644
index 0000000000..f7d9c001ec
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/cheatsheets/autotools.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<cheatsheet title="GNU Autotools Project">
+ <intro>
+ <description>
+ This cheatsheet will introduce the GNU Autotools plugin by importing an existing project that uses Autotools.
+ </description>
+ </intro>
+ <item title="Check out the test project" dialog="true" skip="false">
+ <description>
+ </description>
+ <subitem label="From the main menu, select File -&gt; Import ... -&gt; Projects from CVS." skip="false">
+ <command serialization="org.eclipse.ui.file.import(importWizardId=org.eclipse.team.cvs.ui.newProjectCheckout)" confirm="false">
+ </command>
+ </subitem>
+ <subitem label="If the following repository does not already exist, create it by selecting &quot;Create a new repository location&quot;, pressing &quot;Next&quot;, and filling in the following information: Host: sourceware.org Repository path: /cvs/eclipse User: &lt;anonymous&gt; Connection type: pserver" skip="true">
+ </subitem>
+ <subitem label="Press Next to advance to CVS module selection." skip="false">
+ </subitem>
+ <subitem label="Choose &quot;Use an existing module&quot; and open &quot;autotools&quot; and select &quot;sources&quot; in the populated list of projects." skip="false">
+ </subitem>
+ <subitem label="Press Next." skip="false">
+ </subitem>
+ <subitem label="Ensure &quot;Check out as a project configured using the New Project wizard&quot; is selected." skip="false">
+ </subitem>
+ <subitem label="Press Finish." skip="false">
+ </subitem>
+ <subitem label="Select C/C++ -&gt; C Project" skip="false">
+ </subitem>
+ <subitem
+ label="Within the C Project dialog, open the GNU Autotools category in the tree view and select &quot;Empty Project&quot;">
+ </subitem>
+ <subitem label="Give the project a name. For this example, choose &quot;sources&quot;." skip="false">
+ </subitem>
+ <subitem label="Press Next." skip="false">
+ </subitem>
+ <subitem label="Press Finish." skip="false">
+ </subitem>
+ <subitem label="If asked to switch to C/C++ Perspective, select ok and choose to default this behavior" skip="false">
+ </subitem>
+ </item>
+ <item title="Build Project">
+ <description>
+ </description>
+ <subitem
+ label="Navigate to the project in the Project Explorer view by selecting the &quot;sources&quot; project you just created.">
+ </subitem>
+ <subitem
+ label="Open the Project pull-down from the main menu">
+ </subitem>
+ <subitem
+ label="If &quot;Build Automatically&quot; is not checked, select &quot;Build Project&quot;">
+ </subitem>
+ </item>
+ <item title="View build output" dialog="true" skip="false">
+ <description>
+ In the Console view, there is a button entitled &quot;Display Selected Console&quot;. Its icon depicts a monitor with two lines of text on it. Pressing this button will drop down to show all available consoles. At this point, you should have three consoles: one for configure output (&quot;Configure&quot;), one for build output (&quot;C-Build&quot;), and one for the binary output that you just ran (&quot;&lt;terminated&gt; sources ...&quot;).
+ </description>
+ <subitem label="View configure output by selecting the Configure console in the drop-down list. The configure console" skip="false">
+ </subitem>
+ <subitem label="View build output by selecting the &quot;C-Build&quot; console in the drop-down list." skip="false">
+ </subitem>
+ </item>
+ <item title="Run the Hello World binary" dialog="true" skip="false">
+ <description>
+ </description>
+ <subitem label="Navigate to the project in the Project Explorer view by selecting the &quot;sources&quot; project you just created." skip="false">
+ </subitem>
+ <subitem label="Open the project by toggling the arrow to the left of the project name if it is not already open." skip="true">
+ </subitem>
+ <subitem label="Expand the &quot;Binaries&quot; virtual folder under the project." skip="false">
+ </subitem>
+ <subitem label="Select the binary itself. This will be called &quot;a.out&quot; if you followed the example." skip="false">
+ </subitem>
+ <subitem label="Right-click on the binary itself and select &quot;Run As&quot; -&gt; &quot;Local C/C++ Application&quot;." skip="false">
+ </subitem>
+ <subitem label="Select &quot;gdb Debugger&quot; (the default) in the &quot;Launch Debug Configuration Selection&quot; dialog." skip="false">
+ </subitem>
+ <subitem label="Press OK." skip="false">
+ </subitem>
+ </item>
+ <item title="View output" dialog="true" skip="false">
+ <description>
+ The output of the program should be displayed in the Console view which should be one of the tabs visible in the bottom of the IDE. If you made no modifications, it should read &quot;hello world&quot;.
+ </description>
+ </item>
+ <item title="Modify configure options" dialog="true" skip="false">
+ <description>
+ </description>
+ <subitem label="Select the project &quot;sources&quot; if it is not already selected in the Project Explorer." skip="false">
+ </subitem>
+ <subitem label="From the main menu, select Project -&gt; Properties." skip="false">
+ </subitem>
+ <subitem label="Expand &quot;Autotools&quot; and select &quot;Configure Settings&quot;." skip="false">
+ </subitem>
+ <subitem label="Under &quot;configure&quot;, select &quot;Advanced&quot;." skip="false">
+ </subitem>
+ <subitem label="In the &quot;Additional command-line options&quot; text box, enter &quot;--enable-option-x&quot;." skip="false">
+ </subitem>
+ <subitem label="Press OK." skip="false">
+ </subitem>
+ </item>
+ <item title="Finished!" dialog="true" skip="false">
+ <description>
+ <b>Congratulations!</b>
+You now have a simple GNU autotools project.
+ </description>
+ </item>
+</cheatsheet>
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/doc/notices.html b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/doc/notices.html
new file mode 100644
index 0000000000..5773de52c8
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/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 2010 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 2010 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/autotools/org.eclipse.linuxtools.cdt.autotools-docs/extract-markup.xsl b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/extract-markup.xsl
new file mode 100644
index 0000000000..4c4e731948
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/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/autotools/org.eclipse.linuxtools.cdt.autotools-docs/plugin.properties b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/plugin.properties
new file mode 100644
index 0000000000..d2dcf87228
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/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=Autotools Documentation (Incubation)
+provider=Eclipse Linux Tools \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/plugin.xml b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/plugin.xml
new file mode 100644
index 0000000000..57f82d80e7
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/plugin.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+ <extension
+ point="org.eclipse.help.toc">
+ <toc
+ file="toc.xml"
+ primary="true"/>
+ <toc
+ file="userguide/Autotools Plugin-in User Guide-toc.xml"
+ primary="true">
+ </toc>
+ </extension>
+ <extension
+ id="com.redhat.eclipse.cdt.autotools.docs.cheatsheets"
+ point="org.eclipse.ui.cheatsheets.cheatSheetContent">
+ <cheatsheet
+ category="org.eclipse.cdt-doc.category.tutorials"
+ contentFile="cheatsheets/autotools.xml"
+ id="com.redhat.eclipse.cdt.autotools-docs.cheatsheet3"
+ name="Creating a GNU Autotools Project">
+ </cheatsheet>
+ </extension>
+
+</plugin>
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/src/org/eclipse/linuxtools/internal/cdt/autotools/doc/anttask/MediaWikiImageFetcher.java b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/src/org/eclipse/linuxtools/internal/cdt/autotools/doc/anttask/MediaWikiImageFetcher.java
new file mode 100644
index 0000000000..36e99652ed
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/src/org/eclipse/linuxtools/internal/cdt/autotools/doc/anttask/MediaWikiImageFetcher.java
@@ -0,0 +1,150 @@
+/*******************************************************************************
+ * 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.cdt.autotools.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/autotools/org.eclipse.linuxtools.cdt.autotools-docs/src/org/eclipse/linuxtools/internal/cdt/autotools/doc/anttask/tasks.properties b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/src/org/eclipse/linuxtools/internal/cdt/autotools/doc/anttask/tasks.properties
new file mode 100644
index 0000000000..82f303b73d
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/src/org/eclipse/linuxtools/internal/cdt/autotools/doc/anttask/tasks.properties
@@ -0,0 +1 @@
+mediawiki-fetch-images=org.eclipse.linuxtools.internal.cdt.autotools.doc.anttask.MediaWikiImageFetcher
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/toc.xml b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/toc.xml
new file mode 100644
index 0000000000..c13a821e7e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/toc.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+
+<toc label="GNU Tools">
+ <topic label="gcc" href="http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/"/>
+ <topic label="binutils" href="http://sourceware.org/binutils/docs/"/>
+ <topic label="autoconf" href="http://www.gnu.org/software/autoconf/manual/html_node/index.html"/>
+ <topic label="automake" href="http://www.gnu.org/software/automake/manual/html_node/index.html"/>
+ <topic label="pkg-config" href="http://people.freedesktop.org/~dbn/pkg-config-guide.html"/>
+ <anchor id="moregnutools"/>
+</toc>
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Autotools Plugin-in User Guide-toc.xml b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Autotools Plugin-in User Guide-toc.xml
new file mode 100644
index 0000000000..8e59f9dc35
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Autotools Plugin-in User Guide-toc.xml
@@ -0,0 +1,12 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<toc topic="userguide/Autotools Plugin-in User Guide.html" label="Autotools Plugin-in User Guide">
+ <topic href="userguide/Autotools Plugin-in User Guide.html" label="Introduction"></topic>
+ <topic href="userguide/Supported-Environments.html" label="Supported Environments"></topic>
+ <topic href="userguide/Creating-an-Autotools-Project.html" label="Creating an Autotools Project"></topic>
+ <topic href="userguide/Configuration.html" label="Configuration"></topic>
+ <topic href="userguide/Invoking-Autotools.html" label="Invoking Autotools"></topic>
+ <topic href="userguide/Special-Editors.html" label="Special Editors"></topic>
+ <topic href="userguide/Building.html" label="Building"></topic>
+ <topic href="userguide/Make-Targets.html" label="Make Targets"></topic>
+ <topic href="userguide/Updating-This-Document.html" label="Updating This Document"></topic>
+</toc> \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Autotools Plugin-in User Guide.html b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Autotools Plugin-in User Guide.html
new file mode 100644
index 0000000000..22fb5a3d15
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Autotools Plugin-in User Guide.html
@@ -0,0 +1,61 @@
+<?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>Autotools Plugin-in User Guide</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">Autotools Plugin-in User Guide</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="Supported-Environments.html" title="Supported Environments">
+ <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">Supported Environments</td>
+ </tr>
+ </table><hr/>
+ <h1 id="Introduction">Introduction</h1>
+ <p>The Autotools plug-in for Eclipse extends the CDT (C/C++ Development Tools) to add support for maintaining and
+ building C/C++ projects that use GNU Autotools.</p>
+ <p>The GNU Autotools are a set of tools used to make a project portable to multiple systems or build environments. The tools aid the developer to create
+ a configure script which is meant to be invoked prior to performing the build. The configure script may perform tests such as testing the current platform, the OS, what is locally installed, or any number of things. Parameters can be passed as well to provide information that is not calculable (e.g. what will be the target platform the project will be run on). Results of tests and parameters are used to create the Makefiles for the build or in some cases, additional files such as header files or code sequences. </p>
+ <p>What gets tested is fully controllable by the developer by way of special input files which
+ are fed to the Autotools. Typically, the most commonly used Autotools are 'autoconf', 'automake', and 'aclocal'. The 'autoconf' tool takes a 'configure.in' or 'configure.ac' input file and creates the 'configure' script previously discussed. It is possible to have multiple configure scripts in various subdirectories, but a project should be designed so there is one top-level configure script that calls any lower-level ones automatically.</p>
+ <p>The 'automake' tool takes a 'Makefile.am' input file and creates a 'Makefile.in' file which is used at configuration time by the configure script as a template for creating a Makefile. Each Makefile will have its own corresponding Makefile.in file. There may be if/else logic used to determine what ends up in the Makefile or there may be requests to directly substitute variables calculated in the configure step.</p>
+ <p>The 'aclocal' tool creates a repository of macros that are specified directly or indirectly in the 'autoconf' input files. Such macros are provided to perform commonly used tests or actions (e.g. test that a certain header file
+ exists or find the C compiler). The macros are written in a language called m4 and the developer is free to create their own macros to add to the repository. </p>
+ <p>The Autotools plug-in adds support for running the configure script prior to the build. As well, support is added for invoking the Autotools themselves as well as maintaining the files they use. An Autotools project extends a CDT Makefile project. Therefore, functionality in the CDT for supporting such a project applies to an Autotools project as well (e.g. C/C++ Property pages).</p>
+ <p>For more details on the GNU Autotools, see
+ <a href="http://www.gnu.org/software/autoconf/">http://www.gnu.org/software/autoconf/</a> and
+
+ <a href="http://www.gnu.org/software/automake/">http://www.gnu.org/software/automake/</a>
+ </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="Supported-Environments.html" title="Supported Environments">
+ <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">Supported Environments</td>
+ </tr>
+ </table>
+ </body>
+</html> \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Building.html b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Building.html
new file mode 100644
index 0000000000..057bab0980
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Building.html
@@ -0,0 +1,112 @@
+<?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>Autotools Plugin-in User Guide - Building</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">Building</th>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Special-Editors.html" title="Special Editors">
+ <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="Make-Targets.html" title="Make Targets">
+ <img alt="Next" border="0" src="images/images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">Special Editors</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Make Targets</td>
+ </tr>
+ </table><hr/>
+ <h1 id="Building">Building</h1>
+ <p>As mentioned, an Autotools project is an extended CDT Makefile project. Building the project is done the same as for any Makefile project. You can kick off a build manually by clicking on the Project -> Build Project menu item or if you choose, you can set up builds to occur automatically when resources are changed by checking off the Project -> Build Automatically menu item. The former build option is disabled when automatic builds are selected. By default, a
+ <b>make all</b> is performed following the Autotools configure step.
+ </p>
+ <p>The build is performed on the active build configuration. A build configuration is a CDT construct which is a group of settings for a particular build. This is not to be confused with an Autotools configuration which is just the settings passed to the configure script. The CDT build configuration is saved across Eclipse sessions and includes environment variable settings, build macros, build location, tool settings, etc... used to perform a build. A project may have multiple build configurations. For example, a build with debugging info and a regular optimized build. As such, one configuration is designated the active configuration and as previously stated, is the one used for the build.</p>
+ <p>The Autotools configure script parameters and the autogen.sh script parameters are treated as part of the CDT build configuration. While CDT settings are stored in the .cproject file within the project, the Autotools parameters are stored in a special file: .autotools. There is a one-to-one mapping of Autotools configuration parameters to a build configuration. By default, each Autotools project starts with a base build configuration named
+ <b>Build (GNU)</b> which configures and builds in the top-level project directory. This is common for Autotools projects to have the user configure and build directly in the top-level source directory. The location of the build can be changed in the C/C++ Build properties:
+ </p>
+ <p>
+ <img border="0" src="images/Linuxtools-AutotoolsBuildLocation.png"/>
+ </p>
+ <p>Notice how the default is ${workspace_loc:/xxxx} where xxxx is the project name. This represents the project's location which may or may not be physically under the workspace root directory. To change the build location, it is recommended that you add a directory following the project location: e.g. ${workspace_loc:/xxxx}/yyyy. </p>
+ <p>It should be noted that the configure script automatically checks to see if a configuration has been performed in the source directory. It does so by looking for the
+ <b>config.status</b> file existing in the same directory as the configure script. If configuring in a different directory and the configure script finds
+ <b>config.status</b> in the source directories, it will stop and report a failure. Such is the case if you originally configure and build the default configuration and either change the build location or add a new configuration later and try to build it. The second configuration fails and recommends running
+ <b>make distclean</b> first. A
+ <b>make distclean</b> performs a clean and in addition removes configuration files such as
+ <b>config.status</b>. The Autotools plug-in recognizes when this situation is about to occur during the configure step and will automatically issue a
+ <b>make distclean</b> on your behalf to avoid the failure. The cleaning operation is recorded in the Configure console. Since it also removes build artefacts for the default configuration, these may have to be regenerated by a future configure/build with the default configuration marked active. If you know you will be creating multiple configurations for the project, you can either specify the default build location to something other than the top-level project directory or else you can avoid using the default configuration and only build configurations you have added yourself.
+ </p>
+ <p>CDT build configurations are managed via the Managed Configurations dialog. The dialog is accessed via a button that can be found on any property page that alters data that is part of the build configuration. This includes the Project -> Properties -> Autotools -> Configure Settings page. Pressing the button results in the Manage Configurations dialog:</p>
+ <p>
+ <img border="0" src="images/Linuxtools-AutotoolsManageConfs.png"/>
+ </p>
+ <p>From the dialog, it is possible to create a new configuration, rename a configuration, delete a configuration, or set a particular configuration as being the active one. Deletion is disabled when there is only one configuration. Likewise, if there is only one configuration, it is active by default. When you choose to create a new configuration (hit the New... button), you are given a number of choices. You can:</p>
+ <ol>
+ <li>create a new one based on the default configuration
+ <ul>
+ <li>In the case of Autotools this is the default Build (GNU) configuration before any modifications were made.</li>
+ </ul>
+ </li>
+ <li>copy from an existing configuration
+ <ul>
+ <li>This copies all settings made.</li>
+ </ul>
+ </li>
+ <li>import from an existing project
+ <ul>
+ <li>This is unsupported if the project is not also an Autotools project in which case undefined behavior occurs.</li>
+ </ul>
+ </li>
+ <li>import a predefined configuration
+ <ul>
+ <li>This is not supported as it offers non-Autotools configurations. Undefined behavior will result if one of these are chosen.</li>
+ </ul>
+ </li>
+ </ol>
+ <p>
+ <img border="0" src="images/Linuxtools-AutotoolsCreateConf.png"/>
+ </p>
+ <p>Copying a configuration copies all of its settings, including the Autotools configuration parameters. Copying all settings would normally include the build location (the directory where the build will be performed), but the Autotools plug-in, by default, intercedes and for every new configuration subsequent to the initial one, it sets the build location to build-xxxx where xxxx is the unique configuration name. The Autotools plug-in replaces any white-space in the configuration name with underscores so it is possible if you have named two configurations similarly with different white-space characters or one with underscores that you might result in a build location collision. The replacement of white-space is done because the build directory will get placed in the generated Makefile where white-space is used as delimiters and undefined behaviour would therefore occur. The automatic build directory naming behaviour can be turned off from the Project -> Properties -> Autotools page, but it is discouraged since switching between different configurations and building in the same directory can cause undefined behaviour.</p>
+ <p>
+ <img border="0" src="images/Linuxtools-AutotoolsAutotools.png"/>
+ </p>
+ <p>Note: changes to configurations are not performed unless the Ok or Apply buttons are pressed from a Property page with the Manage Configurations button on it. That is, pressing Ok from the Manage Configurations dialog does not make the changes permanent. You could add new configurations, delete others, and then hit the Cancel button from the corresponding property page and the changes would be reverted.</p><hr/>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Special-Editors.html" title="Special Editors">
+ <img alt="Previous" border="0" src="images/images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center">
+ <a href="Autotools Plugin-in User Guide.html" title="Autotools Plugin-in User Guide">
+ <img alt="Autotools Plugin-in User Guide" border="0" src="images/images/home.gif"/>
+ </a>
+ </td>
+ <td style="width: 20%" align="right">
+ <a href="Make-Targets.html" title="Make Targets">
+ <img alt="Next" border="0" src="images/images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">Special Editors</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Make Targets</td>
+ </tr>
+ </table>
+ </body>
+</html> \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Configuration.html b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Configuration.html
new file mode 100644
index 0000000000..8a4b1d911b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Configuration.html
@@ -0,0 +1,125 @@
+<?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>Autotools Plugin-in User Guide - Configuration</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">Configuration</th>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Creating-an-Autotools-Project.html" title="Creating an Autotools Project">
+ <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="Invoking-Autotools.html" title="Invoking Autotools">
+ <img alt="Next" border="0" src="images/images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">Creating an Autotools Project</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Invoking Autotools</td>
+ </tr>
+ </table><hr/>
+ <h1 id="Configuration">Configuration</h1>
+ <p>Prior to running a build, the Autotools plug-in runs the configure script. Parameters to be passed to configure may be
+ entered via the Project -> Properties -> Autotools -> Configure Settings UI shown below:</p>
+ <p>
+ <img border="0" src="images/Linuxtools-AutotoolsConfsettings.png"/>
+ </p>
+ <p>You will notice how the actual configure script name is editable. It is not recommended you change the name of the configure script as this is standard for Autotool projects. However, one use of this text input is to add environment variables to set prior to invoking the configure script. For example, you might want to set the command to:
+ <b>CFLAGS="-g -debug" configure</b> to have the CFLAGS environment variable overridden while configuring. The same applies to the autogen.sh script settings.
+ </p>
+ <p>For configure, there are a number of standard parameters that apply to generated configure scripts. Each parameter has its command line name presented so you can look it up in Autotools documentation. In addition, tool-tip hover help is provided.</p>
+ <p>Under the Advanced category, there is a free-form line called "Additional command-line options" where you may enter any options in their command-line format. This is useful for entering custom options that your configure script supports (e.g. --enable-feature-x or --with-lib-y). It can also be used for any of the standard parameters as well if that is more familiar tor you. Parameters in this list are appended to the end of parameters derived from the standard option entries (i.e. you could get two specifications of a parameter). In the case of multiple specification, behaviour is the same as it is on the command line. You can optionally check off the "Display help contents (--help)" option under the General category to see all the standard and custom options the configure script accepts. As the configure script help is a product of how it is written, it is sometimes possible that the help is out of date with regards to added features.</p>
+ <p>In some cases, a project may choose not to invoke the Autotools ahead of time and instead
+ require this be done prior to configuration. The input files that are fed to the Autotools are provided, but the output of
+ the Autotools are not. This may be
+ done to lower the download size and additionally to avoid having to constantly regenerate the output files as the Autotools are
+ updated. In such cases, an autogen.sh script may be provided which is simply a script that runs the various Autotools
+ required. This script may or may not run the configure script at the end. Alternatively, there is also the
+ <i>autoreconf</i>
+ tool which can be invoked to recursively run through the source tree and run all Autotools where the input files are newer than
+ the output files (this includes the case where no output file is present). Any options required when invoking the Autotools
+ can be encoded within the input files themselves.
+ </p>
+ <p>The following defines a priority list of scenarios that the Autotools plug-in checks for when performing the configure step and how each one is handled.</p>
+ <ol>
+ <li>A config.status file exists and configure script options have not changed since the last configuration
+ <ul>
+ <li>The config.status file is created as part of running a generated configure script. It itself is a script file and indicates a configuration has already been performed. If the configure options have not changed since that configuration, there is no need to do a full reconfigure. A simple check is performed by calling the config.status script with the --recheck option. This will verify that the generated Makefile exists and is up to date.</li>
+ </ul>
+ </li>
+ <li>A configure script exists
+ <ul>
+ <li>In this case, the configure script is run with any configuration options specified in the project properties.</li>
+ </ul>
+ </li>
+ <li>An autogen script exists
+ <ul>
+ <li>In this case, the autogen.sh script is run and following that, a check is made to see if config.status has been created, indicating that the configure script was run. If has not configured, the configure script is run automatically if it was successfully created.</li>
+ </ul>
+ </li>
+ <li>A Makefile.cvs file exists
+ <ul>
+ <li>A Makefile.cvs is an alternate form of autogen.sh/configure script. In this case, the file is fed to the make command. If a configure script is created and not run as part of this process, it is run automatically.</li>
+ </ul>
+ </li>
+ <li>default case
+ <ul>
+ <li>At this point, there is no configure script or autogen.sh script and configure has not been run previously. A last resort is to run the autoreconf command with -i to recursively search the source tree and invoke Autotools for any input file that is older than its output target (or if the target is missing). If this generates a configure script, it is run automatically.</li>
+ </ul>
+ </li>
+ </ol>
+ <p>If after all of this, the top-level Makefile is not created, an error is generated and building stops. </p>
+ <p>The configure process can be manually forced for a project via the Project -> Reconfigure Project menu item. A reconfigure runs the configure script even if a config.status file is found indicating a prior configuration was successful.</p>
+ <p>The entire configuration step is performed by a special builder that is added when an Autotools project is created or converted from another project. The special builder runs the configure step and is positioned to run prior to the Makefile builder.</p>
+ <p>From the Project -> Properties -> Builders tab for a project you will see:</p>
+ <p>
+ <img border="0" src="images/Linuxtools-AutotoolsBuilders.png"/>
+ </p>
+ <p>Do not un-check the Autotools Makefile builder nor change the order of the builders. Modifying this will result in undefined behaviour.</p>
+ <p>The configure step is run in a special Configuration console added by the Autotools plug-in. This console is separate from the C-Build console which is used to display the results of the make command invocation.</p>
+ <p>To see the Configure console, click on the console selector button (icon looks like a T.V.) found in the Console View as follows:</p>
+ <p>
+ <img border="0" src="images/Linuxtools-AutotoolsConsoleSelect.png"/>
+ </p>
+ <p>Note that the configure console output is per project and shows configuration output for the last build of the project. It is not saved between Eclipse sessions.</p>
+ <p>The Autotools console is an instance of a CDT Build console so the console preferences set in Window -> Preferences -> C/C++ -> Build Console apply as well.</p>
+ <p>
+ <img border="0" src="images/Linuxtools-AutotoolsConsolePrefs.png"/>
+ </p><hr/>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Creating-an-Autotools-Project.html" title="Creating an Autotools Project">
+ <img alt="Previous" border="0" src="images/images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center">
+ <a href="Autotools Plugin-in User Guide.html" title="Autotools Plugin-in User Guide">
+ <img alt="Autotools Plugin-in User Guide" border="0" src="images/images/home.gif"/>
+ </a>
+ </td>
+ <td style="width: 20%" align="right">
+ <a href="Invoking-Autotools.html" title="Invoking Autotools">
+ <img alt="Next" border="0" src="images/images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">Creating an Autotools Project</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Invoking Autotools</td>
+ </tr>
+ </table>
+ </body>
+</html> \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Creating-an-Autotools-Project.html b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Creating-an-Autotools-Project.html
new file mode 100644
index 0000000000..04fec390f9
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Creating-an-Autotools-Project.html
@@ -0,0 +1,87 @@
+<?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>Autotools Plugin-in User Guide - Creating an Autotools Project</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">Creating an Autotools Project</th>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Supported-Environments.html" title="Supported Environments">
+ <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="Configuration.html" title="Configuration">
+ <img alt="Next" border="0" src="images/images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">Supported Environments</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Configuration</td>
+ </tr>
+ </table><hr/>
+ <h1 id="Creating_an_Autotools_Project">Creating an Autotools Project</h1>
+ <p>There a number of ways to create an Autotools project. The first method is through the CDT C and C++ Project wizards which can be activated from the File -> New -> C Project and File -> New -> C++ Project menu items, respectively, which are available while in the C/C++ Perspective. These two wizards can also be located by clicking on the File -> New -> Project... menu item and then opening the C/C++ folder found there.</p>
+ <p>Looking at the C Wizard, we see that there is a GNU Autotools category.</p>
+ <p>
+ <img border="0" src="images/Linuxtools-AutotoolsCProjectWizard.png"/>
+ </p>
+ <p>Opening the category, there are two choices: Empty Project or Hello World Ansi C Autotools Project. The Empty Project template means that no files will be supplied to the new project while the Hello World project will supply a sample hello world program that uses Autotools for configuring the build. The C++ Project Wizard also has the same GNU Autotools category and two project templates: an Empty Project and a Hello World C++ Autotools sample program. If you are creating a project from scratch, it is recommended that you use the Hello World sample project and make modifications. Otherwise, you will need to create a configure script for the Autotools plug-in to invoke at build time or provide a Makefile so the configuration step does not fail.</p>
+ <p>The C and C++ Wizards can also be used when importing an existing Autotools project. For example, when importing a project from CVS using File -> Import... -> CVS -> you are given the choice to "Check out as a project configured by the new project wizard".</p>
+ <p>
+ <img border="0" src="images/Linuxtools-AutotoolsCheckout.png"/>
+ </p>
+ <p>From the New Project menu, open the C/C++ category and choose either a C Project or C++ Project, depending on the type of project being imported. If the code is both C and C++, choose C++ Project.</p>
+ <p>Let's say you have a C application using Autotools and select C Project. This will bring up the C Project Wizard as displayed earlier. In this case, choose the Empty Project from the GNU Autotools category as you already have all the configuration files in place.</p>
+ <p>Another method to create an Autotools project is to convert an existing project. For example, if we import a project from SVN or CVS and do not configure using the new project wizard, the project will simply be downloaded into the workspace. At this point, it cannot be built or access various tools from the CDT.</p>
+ <p>To convert it, select the project in the Project Explorer and open the File -> New -> Convert to C/C++ Project menu item as found in the C/C++ Perspective. If in another perspective, this same wizard can be found by selecting File -> New -> Other... -> C/C++ -> Convert to a C/C++ Project. This brings up the C/C++ Conversion wizard.</p>
+ <p>
+ <img border="0" src="images/Linuxtools-AutotoolsConvertWizard.png"/>
+ </p>
+ <p>Note how there is a set of projects that are candidates for conversion. This list contains any projects that are not already C or C++ projects. A C or C++ project includes regular CDT Managed Make and Makefile projects. Also note that the project you selected is automatically selected when the wizard opens.</p>
+ <p>There is a choice of C or C++ project and a set of project types to choose from. For Autotools, select the GNU Autotools category and this will convert to an Autotools project. Once converted, this project will not show up as a candidate project in the conversion wizard.</p>
+ <p>The final way to create an Autotools project is to use the Autotools Conversion wizard. This wizard allows one to convert from any form of project to an Autotools project. Obviously, converting a project that isn't actually C or C++ and using Autotools will result in undefined behaviour. You need to first select the project you wish to convert. After selecting, go to File -> New -> Other... -> C/C++, open the category, select "Convert to a C/C++ Autotools Project" and hit the Next button. </p>
+ <p>
+ <img border="0" src="images/Linuxtools-AutotoolsNewOther.png"/>
+ </p>
+ <p>This brings up the following dialog:</p>
+ <p>
+ <img border="0" src="images/Linuxtools-AutotoolsConvAutotoolsWizard.png"/>
+ </p>
+ <p>Again, there are candidates for conversion. This list contains all projects that are not currently C or C++ Autotool projects. You are given the choice of C or C++ as with the standard C/C++ conversion wizard. Hitting the Finish button is all that is needed, but if you hit the Next button and continue on you can select referenced projects, if desired. </p>
+ <p>Once converted to an Autotools project, there is no UI method to convert back to a regular C/C++ project. If this is desired, you need to manually remove the .project, .cproject, and .autotools files from the project directory. This will effectively remove the natures and CDT settings for the project, allowing you to convert it again however you want.</p><hr/>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Supported-Environments.html" title="Supported Environments">
+ <img alt="Previous" border="0" src="images/images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center">
+ <a href="Autotools Plugin-in User Guide.html" title="Autotools Plugin-in User Guide">
+ <img alt="Autotools Plugin-in User Guide" border="0" src="images/images/home.gif"/>
+ </a>
+ </td>
+ <td style="width: 20%" align="right">
+ <a href="Configuration.html" title="Configuration">
+ <img alt="Next" border="0" src="images/images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">Supported Environments</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Configuration</td>
+ </tr>
+ </table>
+ </body>
+</html> \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Invoking-Autotools.html b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Invoking-Autotools.html
new file mode 100644
index 0000000000..1200a00e4f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Invoking-Autotools.html
@@ -0,0 +1,121 @@
+<?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>Autotools Plugin-in User Guide - Invoking Autotools</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">Invoking Autotools</th>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Configuration.html" title="Configuration">
+ <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="Special-Editors.html" title="Special Editors">
+ <img alt="Next" border="0" src="images/images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">Configuration</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Special Editors</td>
+ </tr>
+ </table><hr/>
+ <h1 id="Invoking_Autotools">Invoking Autotools</h1>
+ <p>To invoke the Autotools, a special menu item has been added to the Project menu. Under Project -> Invoke Autotools there are a set of menu items to invoke the various Autotools for your project. The output of the tool invocation is presented in a special Autotools Console. Like the Configure and C-Build Consoles, the Autotools console is per-project and is not saved across Eclipse sessions. The console, if present, can be accessed via the "Display Selected Console" button in the Console View.</p>
+ <p>
+ <img border="0" src="images/Linuxtools-AutotoolsAutotoolsConsole.png"/>
+ </p>
+ <p>The tools provided are:</p>
+ <ol>
+ <li>Invoke Autoconf
+ <ul>
+ <li>The autoconf tool is run in the current directory for the current file or folder selected for the project. There are no parameters. Autoconf can also be run by right-clicking a configure.in or configure.ac file and selected Invoke Autoconf.
+ <br/>
+ </li>
+ </ul>
+ </li>
+ <li>Invoke Automake
+ <ul>
+ <li>The automake tool is run from the current directory for the file or folder selected in the project. A dialog is presented to allow specification of options.
+ <img border="0" src="images/Linuxtools-AutotoolsAutomake.png"/>
+ <br/>The first text entry is for options while the 2nd text window is for Makefiles targets to generate. The automake tool should be invoked where the configure script is found that will generate the Makefile(s). There may be multiple Makefiles to generate in the current directory or lower. Each target location should be a Makefile and should have a corresponding Makefile.am file at the relative location specified. For example, automake x/Makefile y/Makefile Makefile specifies three targets. It is expected that there is an x/Makefile.am, y/Makefile.am, and a Makefile.am relative to the current directory. For details on automake, enter --help as an option.
+ <br/>
+ </li>
+ </ul>
+ </li>
+ <li>Invoke Aclocal
+ <ul>
+ <li>The aclocal tool is run from the current directory for the file or folder selected in the project. A dialog is presented to allow specification of options.
+ <img border="0" src="images/Linuxtools-AutotoolsAclocal.png"/>
+ <br/>The first text entry is for options while the 2nd text window is for directories to search for m4 macros. The directories can also be specified directly in the options parameters using the -I option. For details, enter --help as an option.
+ <br/>
+ </li>
+ </ul>
+ </li>
+ <li>Invoke Autoheader
+ <ul>
+ <li>The autoheader tool is run from the current directory for the file or folder selected in the project. A dialog is presented to allow specification of options.
+ <img border="0" src="images/Linuxtools-AutotoolsAutoheader.png"/>
+ <br/>The tool is used to create a template for generated header files. It should be run in a directory containing a configure script as it gets its information from there. For details, enter --help as an option.
+ <br/>
+ </li>
+ </ul>
+ </li>
+ <li>Invoke Autoreconf
+ <ul>
+ <li>The autoreconf tool is run from the current directory for the file or folder selected in the project. A dialog is presented to allow specification of options.
+ <img border="0" src="images/Linuxtools-AutotoolsAutoreconf.png"/>
+ <br/>The most useful option is the -i option to recursively call Autotools for all input files out of date with respect to their outputs. For details, enter --help as an option.
+ <br/>
+ </li>
+ </ul>
+ </li>
+ <li>Invoke Libtoolize
+ <ul>
+ <li>The libtoolize tool is run from the current directory for the file or folder selected in the project. The tool is used to add libtool support to a package. Libtool provides macros to allow a package to create a shared library without having to know all the details required for the current platform. This might include special compiler flags or linker options or special tools. A dialog is presented to allow specification of options.
+ <img border="0" src="images/Linuxtools-AutotoolsLibtoolize.png"/>
+ <br/>For details on libtoolize, enter --help as an option.
+ <br/>
+ </li>
+ </ul>
+ </li>
+ </ol>
+ <p>By default, the autotools are invoked simply by their names; expecting that the path has been set up appropriately. In some instances, you might want to specify a specific location for the autotools. For example, your project may require old versions of the tools which you have installed locally, but do not wish to be on your path. To set these for your project, select your project or a file/folder within it and go to Project -> Properties -> Autotools -> General and select the Tool Settings tab.</p>
+ <p>
+ <img border="0" src="images/Linuxtools-AutotoolsToolSettings.png"/>
+ </p><hr/>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Configuration.html" title="Configuration">
+ <img alt="Previous" border="0" src="images/images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center">
+ <a href="Autotools Plugin-in User Guide.html" title="Autotools Plugin-in User Guide">
+ <img alt="Autotools Plugin-in User Guide" border="0" src="images/images/home.gif"/>
+ </a>
+ </td>
+ <td style="width: 20%" align="right">
+ <a href="Special-Editors.html" title="Special Editors">
+ <img alt="Next" border="0" src="images/images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">Configuration</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Special Editors</td>
+ </tr>
+ </table>
+ </body>
+</html> \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Make-Targets.html b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Make-Targets.html
new file mode 100644
index 0000000000..9339475c5d
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Make-Targets.html
@@ -0,0 +1,102 @@
+<?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>Autotools Plugin-in User Guide - Make Targets</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">Make Targets</th>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Building.html" title="Building">
+ <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">Building</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="Make_Targets">Make Targets</h1>
+ <p>A Makefile has a set of targets that can be built. Typically, every Makefile has an
+ <b>all</b> target which builds all targets, but there may be optional targets as well. A CDT Makefile project enables one to invoke the various make targets via the Make Targets dialog. Since an Autotools project is a form of Makefile project, it too supports the Make Targets dialog.
+ Make Targets are important for an Autotool project because there are a large number of make targets added to the Makefile automatically by configuration. Typically, a project is built by running
+ <b>make all</b>, but it is installed by invoking
+ <b>make install</b>. The install target places files in standard locations; usually system directories on a Linux system. For example, header files would be installed in /usr/include and made available to all users of the system. The install prefix (/usr) can be overridden using the configure --prefix parameter or else by specifying prefix=xxxx on the call to make (e.g. make install prefix=/my/local/directory) so that testing can be performed without modifying the whole system.
+ </p>
+ <p>A regular CDT Makefile project requires users to add their own Make Targets, however, the Autotools plug-in analyzes the top-level Makefile for you and creates top-level Make Targets for the project. As mentioned, these automatically added targets can be numerous. If you wish to create targets to run in sub-directories of the main build directory, you must add these manually. For example, you might wish to build docs in a lower-level sub-directory, but not for the entire project.</p>
+ <p>The Make Targets dialog can be displayed in two ways:</p>
+ <ol>
+ <li>Selecting a file or folder in a project and clicking on the Project -> Make Target menu item</li>
+ <li>Right clicking on a file or folder in a project and selecting Make Target</li>
+ </ol>
+ <p>This brings up a sub-menu containing Create... and Build.... to either create a new Make Target or build an existing Make Target, respectively.</p>
+ <p>
+ <img border="0" src="images/Linuxtool-AutotoolsMakeTargetsMenu.png"/>
+ </p>
+ <p>Creating a Make Target is relatively straight-forward:</p>
+ <p>
+ <img border="0" src="images/Linuxtools-AutotoolsMakeTargetCreate.png"/>
+ </p>
+ <p>There is nothing different in the Make Target dialog for Autotools, however, a few concepts need to be clarified.</p>
+ <p>For Make Targets added as part of the Project -> Make Target menu item, the target is for the top-level Makefile for the current build. This means that if you add a Make Target this way, it will persist across configurations and will try and run the
+ <b>make</b> command in the top-level build location specified for the active configuration.
+ </p>
+ <p>Make Targets added by using the right-click Make Target menu are location sensitive. This means that the
+ <b>make</b> command will attempt to run in that directory where the right-click was performed, regardless of whether there is a Makefile present there. Let's say you want to add your own Make Target that performed a
+ <b>make all install</b> (i.e. you want to group multiple targets together into one). If you are in configuration X with build directory build-X, you want to right-click in a directory that is build-X or a sub-directory of build-X. This target will issue a
+ <b>make all install</b> in that particular directory. If you wanted the same target for another configuration, you would have to right-click in its build directory or lower and add another Make Target. Obviously, for top-level Make Targets, using the Project -> Make Target menu item makes the most sense since it applies to all configurations. If you add a Make Target to a source directory, it will likely fail when run because it will try and run
+ <b>make</b> in that directory which will probably only contain a Makefile.in or Makefile.am file and not a Makefile which is only generated at configure time.
+ </p>
+ <p>The Make Target dialog can be used to override various flags within the Makefile. For example, to perform a
+ <b>make install</b> and reset the prefix to /my/local/directory, you would first select the
+ <b>install</b> target from the Build... dialog.
+ </p>
+ <p>
+ <img border="0" src="images/Linuxtools-AutotoolsMakeTargetBuild.png"/>
+ </p>
+ <p>Then, you would click the Edit button to edit the Make Target. You can then override the prefix by specifying its value after the
+ <b>make</b> command. You edit the build command by first un-checking "Use Builder Settings" which enables text entry.
+ </p>
+ <p>
+ <img border="0" src="images/Linuxtools-AutotoolsMakeTargetEdit.png"/>
+ </p>
+ <p>The check-box that says "Run all project builders" should be left un-checked. By default, we only want the CDT Makefile builder to run and not the Autotools configure builder or any other builder.</p><hr/>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Building.html" title="Building">
+ <img alt="Previous" border="0" src="images/images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center">
+ <a href="Autotools Plugin-in User Guide.html" title="Autotools Plugin-in User Guide">
+ <img alt="Autotools Plugin-in User Guide" 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">Building</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/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Special-Editors.html b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Special-Editors.html
new file mode 100644
index 0000000000..0938d6bc33
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Special-Editors.html
@@ -0,0 +1,78 @@
+<?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>Autotools Plugin-in User Guide - Special Editors</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">Special Editors</th>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Invoking-Autotools.html" title="Invoking Autotools">
+ <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="Building.html" title="Building">
+ <img alt="Next" border="0" src="images/images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">Invoking Autotools</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Building</td>
+ </tr>
+ </table><hr/>
+ <h1 id="Special_Editors">Special Editors</h1>
+ <p>The Autotools plug-in provides two special editors for editing Autotool input files. The first is the Autoconf Editor. This editor is invoked when opening configure.in, configure.ac files as well as the resultant configure scripts that autoconf creates. Support includes full colourization, outline view, rudimentary error parsing, and hover help/completion.</p>
+ <p>
+ <img border="0" src="images/Linuxtools-AutotoolsAutoconfEditor.png"/>
+ </p>
+ <p>The outline view shows macro references and program control statements such as if, else, for, etc... Hover help with text completion is provided for the various AC-prefixed and AM-prefixed macros that are provided as standard. As the macros vary from release to release of autoconf and automake, the editor uses an autoconf and automake version property to determine which set of macros it should adhere to. The versions selected affect the parsing which will issue warnings for macros that do not have enough parameters or too many parameters. To set the autoconf and automake versions for the Autoconf Editor, go to the Project -> Properties -> Autotools -> General page and select the Editors tab.</p>
+ <p>
+ <img border="0" src="images/Linuxtools-AutotoolsEditorsTab.png"/>
+ </p>
+ <p>There you will find a pull-down of the various versions supported. Future releases may add new versions.</p>
+ <p>The default autoconf and automake versions to use for editing can be set as a preference. Go to Window -> Preferences -> C/C++ -> Autotools -> Autoconf Editor and click on the Versions tab.</p>
+ <p>
+ <img border="0" src="images/Linuxtools-AutotoolsAutoconfEditorPrefs.png"/>
+ </p>
+ <p>Under the Syntax tab of the same preference page, you can change the colours used for the various elements shown in the editor.</p>
+ <p>A second editor, the Automake Editor is also provided by the Autotools plug-in. This editor is invoked when opening a Makefile.am or Makefile.in file. Support includes full colourization, outline view, rudimentary error parsing, and hover help.</p>
+ <p>
+ <img border="0" src="images/Linuxtools-AutotoolsAutomakeEditor.png"/>
+ </p>
+ <p>In the example shown, one can see the $ variable references are displayed when hovered over. This is particularly useful for $&lt; and $@ in make targets to understand what is being referenced. In some instances, you will see reference to variables surrounded by the @ symbol (e.g. @srcdir@). This represents a variable that is to be substituted by the configure script.</p>
+ <p>Rudimentary error parsing looks for syntax errors. As with the Autoconf editor, colourization can be controlled by preferences. Go to Window -> Preferences -> C/C++ -> Autotools -> Automake Editor and click on the Syntax tab.</p><hr/>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Invoking-Autotools.html" title="Invoking Autotools">
+ <img alt="Previous" border="0" src="images/images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center">
+ <a href="Autotools Plugin-in User Guide.html" title="Autotools Plugin-in User Guide">
+ <img alt="Autotools Plugin-in User Guide" border="0" src="images/images/home.gif"/>
+ </a>
+ </td>
+ <td style="width: 20%" align="right">
+ <a href="Building.html" title="Building">
+ <img alt="Next" border="0" src="images/images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">Invoking Autotools</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Building</td>
+ </tr>
+ </table>
+ </body>
+</html> \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Supported-Environments.html b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Supported-Environments.html
new file mode 100644
index 0000000000..b3ac3556a1
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Supported-Environments.html
@@ -0,0 +1,60 @@
+<?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>Autotools Plugin-in User Guide - Supported Environments</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">Supported Environments</th>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Autotools Plugin-in User Guide.html" title="Introduction">
+ <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="Creating-an-Autotools-Project.html" title="Creating an Autotools Project">
+ <img alt="Next" border="0" src="images/images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">Introduction</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Creating an Autotools Project</td>
+ </tr>
+ </table><hr/>
+ <h1 id="Supported_Environments">Supported Environments</h1>
+ <p>While the Autotools should work on any Unix-based system, it has only been tested on Linux (note that it is part of the Linux Tools project). OS-specific bugs or problems that are not reproducible on Linux may require a user work-around. For example, users of Cygwin or MinGW may require setting modifications to get the plug-in working for their project. The Autotools plug-in is not supported under a regular Windows environment (i.e. without Cygwin or MinGW).</p>
+ <p>To use the Autotools plug-in, it is required that you have the CDT (C/C++ Development Tools) already installed in Eclipse, the GNU Autotools installed on your system, and the "sh" (shell) command must be available. The "sh" command is required to invoke the configure script.</p><hr/>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Autotools Plugin-in User Guide.html" title="Introduction">
+ <img alt="Previous" border="0" src="images/images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center">
+ <a href="Autotools Plugin-in User Guide.html" title="Autotools Plugin-in User Guide">
+ <img alt="Autotools Plugin-in User Guide" border="0" src="images/images/home.gif"/>
+ </a>
+ </td>
+ <td style="width: 20%" align="right">
+ <a href="Creating-an-Autotools-Project.html" title="Creating an Autotools Project">
+ <img alt="Next" border="0" src="images/images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">Introduction</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Creating an Autotools Project</td>
+ </tr>
+ </table>
+ </body>
+</html> \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Updating-This-Document.html b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/Updating-This-Document.html
new file mode 100644
index 0000000000..67acc85014
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/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>Autotools Plugin-in User Guide - 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="Make-Targets.html" title="Make Targets">
+ <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">Make Targets</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/Autotools/User_Guide">http://wiki.eclipse.org/Linux_Tools_Project/Autotools/User_Guide</a>
+ </p><hr/>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Make-Targets.html" title="Make Targets">
+ <img alt="Previous" border="0" src="images/images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center">
+ <a href="Autotools Plugin-in User Guide.html" title="Autotools Plugin-in User Guide">
+ <img alt="Autotools Plugin-in User Guide" 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">Make Targets</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/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtool-AutotoolsMakeTargetsMenu.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtool-AutotoolsMakeTargetsMenu.png
new file mode 100644
index 0000000000..92cff7e874
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtool-AutotoolsMakeTargetsMenu.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAclocal.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAclocal.png
new file mode 100644
index 0000000000..97c80f2dbd
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAclocal.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutoconfEditor.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutoconfEditor.png
new file mode 100644
index 0000000000..fa9b65040a
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutoconfEditor.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutoconfEditorPrefs.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutoconfEditorPrefs.png
new file mode 100644
index 0000000000..ae132b13b2
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutoconfEditorPrefs.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutoheader.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutoheader.png
new file mode 100644
index 0000000000..151d88b376
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutoheader.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutomake.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutomake.png
new file mode 100644
index 0000000000..7b293bf75f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutomake.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutomakeEditor.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutomakeEditor.png
new file mode 100644
index 0000000000..e47af3b226
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutomakeEditor.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutoreconf.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutoreconf.png
new file mode 100644
index 0000000000..6c540608de
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutoreconf.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutotools.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutotools.png
new file mode 100644
index 0000000000..b5d6ee7cc9
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutotools.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutotoolsConsole.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutotoolsConsole.png
new file mode 100644
index 0000000000..ee0ae5906f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsAutotoolsConsole.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsBuildLocation.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsBuildLocation.png
new file mode 100644
index 0000000000..e64cd4cf44
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsBuildLocation.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsBuilders.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsBuilders.png
new file mode 100644
index 0000000000..de96459fd3
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsBuilders.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsCProjectWizard.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsCProjectWizard.png
new file mode 100644
index 0000000000..622690c8dc
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsCProjectWizard.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsCheckout.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsCheckout.png
new file mode 100644
index 0000000000..d502223df4
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsCheckout.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsConfsettings.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsConfsettings.png
new file mode 100644
index 0000000000..70065fe2c6
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsConfsettings.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsConsolePrefs.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsConsolePrefs.png
new file mode 100644
index 0000000000..2534bd1c3a
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsConsolePrefs.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsConsoleSelect.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsConsoleSelect.png
new file mode 100644
index 0000000000..8b6df0d1e8
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsConsoleSelect.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsConvAutotoolsWizard.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsConvAutotoolsWizard.png
new file mode 100644
index 0000000000..fe8c69de17
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsConvAutotoolsWizard.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsConvertWizard.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsConvertWizard.png
new file mode 100644
index 0000000000..c7ad60ead5
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsConvertWizard.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsCreateConf.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsCreateConf.png
new file mode 100644
index 0000000000..5e26d74b6a
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsCreateConf.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsEditorsTab.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsEditorsTab.png
new file mode 100644
index 0000000000..40dd5a0ec2
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsEditorsTab.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsLibtoolize.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsLibtoolize.png
new file mode 100644
index 0000000000..75b932bbb6
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsLibtoolize.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsMakeTargetBuild.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsMakeTargetBuild.png
new file mode 100644
index 0000000000..befd0a2b39
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsMakeTargetBuild.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsMakeTargetCreate.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsMakeTargetCreate.png
new file mode 100644
index 0000000000..25913c9c38
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsMakeTargetCreate.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsMakeTargetEdit.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsMakeTargetEdit.png
new file mode 100644
index 0000000000..1f2de55374
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsMakeTargetEdit.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsManageConfs.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsManageConfs.png
new file mode 100644
index 0000000000..c66cc3d91c
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsManageConfs.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsNewOther.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsNewOther.png
new file mode 100644
index 0000000000..b7865b2f95
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsNewOther.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsToolSettings.png b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsToolSettings.png
new file mode 100644
index 0000000000..0e4bdb4080
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-docs/userguide/images/Linuxtools-AutotoolsToolSettings.png
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-feature/.project b/autotools/org.eclipse.linuxtools.cdt.autotools-feature/.project
new file mode 100644
index 0000000000..9418b456b2
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.cdt.autotools-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/autotools/org.eclipse.linuxtools.cdt.autotools-feature/ChangeLog b/autotools/org.eclipse.linuxtools.cdt.autotools-feature/ChangeLog
new file mode 100644
index 0000000000..2f29bd9944
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-feature/ChangeLog
@@ -0,0 +1,113 @@
+2010-05-18 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Fix provider name.
+
+2010-04-26 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Match consistent license text (bug #306627). Update
+ copyright year.
+ * license.html: New file. HTML version of SUA (bug #306627).
+ * build.properties: Include license.html.
+ * about.html: Remove.
+ * feature.xml: Use licenseURL property instead of explicit URL.
+
+2010-04-12 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Match consistent license text (bug #306627).
+
+2009-11-10 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Make featureName a bit more user-friendly.
+
+2009-11-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * feature.xml: Fix dependencies to support CDT 6.0.0 and up.
+
+2009-11-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * feature.xml: Fix feature id.
+
+2009-10-21 Jeff Johnston <jjohnstn@redhat.com>
+
+ * feature.xml: Add revised org.eclipse.linuxtools.cdt.autotools plug-in that has been
+ set up for compatbility mode to build older projects.
+
+2009-10-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ * feature.xml: Bump to 2.0.0. Refer to new org.eclipse.linuxtools.cdt.autotools.core and
+ org.eclipse.linuxtools.cdt.autotools.ui plug-ins.
+
+2009-04-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * feature.xml: Fix dependencies to not require 6.0.0 CDT plugins as they
+ aren't in the CDT Master zip yet for Galileo builds.
+
+2009-04-23 Andrew Overholt <overholt@redhat.com>
+
+ * feature.xml: Use 6.0.0 CDT requirements on Galileo branch.
+
+2009-01-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * feature.xml: Bump up version to 1.0.2.
+
+2009-01-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ Fixes #260436
+
+ * feature.xml: Add .qualifier to version id.
+
+2009-01-06 Andrew Overholt <overholt@redhat.com>
+
+ * feature.xml: Add update site information.
+ * build.properties: Add feature.properties and epl-v10.html.
+
+2008-10-31 Andrew Overholt <overholt@redhat.com>
+
+ * feature.xml: Use %featureName, %provider, %copyright, and %description from
+ feature.properties. Add "(Incubation)".
+ * feature.properties: Initial import.
+ * epl-v10.html: Likewise.
+
+2008-10-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * feature.xml: Update release to 1.0.1.
+
+2008-08-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * feature.xml: Update release to 1.0.0.
+
+2008-01-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * feature.xml: Update release to 0.9.6.
+
+2007-12-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * feature.xml: Update release to 0.9.5.3.
+
+2007-11-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * feature.xml: Update release to 0.9.5.2.
+
+2007-10-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * feature.xml: Update release to 0.9.5.1.
+
+2007-10-04 jjohnstn <jjohnstn@vermillion>
+
+ * feature.xml: Update release to 0.9.5.
+
+2007-09-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * feature.xml: Update release to 0.9.4.
+
+2007-09-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * feature.xml: Update release to 0.9.3.
+
+2007-08-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * feature.xml: Fix up release number.
+
+2007-07-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * feature.xml: Fix up description to not reference sample url.
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-feature/build.properties b/autotools/org.eclipse.linuxtools.cdt.autotools-feature/build.properties
new file mode 100644
index 0000000000..39b0777e50
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-feature/build.properties
@@ -0,0 +1,4 @@
+bin.includes = feature.xml,\
+ epl-v10.html,\
+ feature.properties,\
+ license.html
diff --git a/libhover/org.eclipse.cdt.libhover.feature/epl-v10.html b/autotools/org.eclipse.linuxtools.cdt.autotools-feature/epl-v10.html
index 9320c9f37c..9320c9f37c 100644
--- a/libhover/org.eclipse.cdt.libhover.feature/epl-v10.html
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-feature/epl-v10.html
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-feature/feature.properties b/autotools/org.eclipse.linuxtools.cdt.autotools-feature/feature.properties
new file mode 100644
index 0000000000..f1c4c907b4
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-feature/feature.properties
@@ -0,0 +1,138 @@
+#################################################################################
+# 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
+#################################################################################
+featureName=Autotools support for CDT (Incubation)
+description=Plugins for maintaining C/C++ projects that use Autotools (autoconf and automake).
+provider=Eclipse Linux Tools
+copyright=Copyright 2006, 2007, 2008, 2009, 2010 Red Hat, Inc.
+licenseURL=license.html
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\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\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this 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 Foundation source code\n\
+repository ("Repository") in software 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\
+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\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update 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" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your 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\
+ - 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\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+ 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+ the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+ extending or updating the functionality of an Eclipse-based product.\n\
+ 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+ Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+ 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+ govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+ Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+ with the Specification. Such Installable Software Agreement must inform the user of the\n\
+ terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+ the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+ indication of agreement by the user, the provisioning Technology will complete installation\n\
+ of the Installable Software.\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, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-feature/feature.xml b/autotools/org.eclipse.linuxtools.cdt.autotools-feature/feature.xml
new file mode 100644
index 0000000000..2f47ef156d
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-feature/feature.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.linuxtools.cdt.autotools"
+ label="%featureName"
+ version="2.0.0.qualifier"
+ provider-name="%provider">
+
+ <description>
+ %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.cdt.managedbuilder.core" version="5.0.100" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.cdt.core" version="5.1.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.cdt.ui" version="5.1.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.cdt.managedbuilder.ui" version="5.0.100" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.cdt.managedbuilder.gnu.ui" version="5.0.100" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.ui.cheatsheets"/>
+ <import plugin="org.eclipse.ui" version="3.4.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.core.runtime" version="3.4.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.jface.text" version="3.4.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.ui.editors" version="3.4.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.ui.workbench.texteditor" version="3.4.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.core.resources" version="3.4.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.ui.ide" version="3.4.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.cdt.make.core" version="5.1.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.cdt.make.ui" version="5.0.100" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.ui.console" version="3.3.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.help" version="3.3.100" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.core.variables" version="3.2.100" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.ui.views" version="3.3.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.core.filesystem" version="1.2.0" match="greaterOrEqual"/>
+ </requires>
+
+ <plugin
+ id="org.eclipse.linuxtools.cdt.autotools.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.cdt.autotools.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.cdt.autotools_docs"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.cdt.autotools"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools-feature/license.html b/autotools/org.eclipse.linuxtools.cdt.autotools-feature/license.html
new file mode 100644
index 0000000000..c184ca36a9
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools-feature/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 14, 2010</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 Foundation source code
+ repository (&quot;Repository&quot;) in software 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 Provisioning Technology (as defined below), 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>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>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ (&quot;Specification&quot;).</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
+ on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<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>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/libhover/org.eclipse.cdt.libhover/.classpath b/autotools/org.eclipse.linuxtools.cdt.autotools.core/.classpath
index 64c5e31b7a..64c5e31b7a 100644
--- a/libhover/org.eclipse.cdt.libhover/.classpath
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/.classpath
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/.cvsignore b/autotools/org.eclipse.linuxtools.cdt.autotools.core/.cvsignore
new file mode 100644
index 0000000000..50c1b30a80
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/.cvsignore
@@ -0,0 +1,4 @@
+bin
+@dot
+javaCompiler...args
+build.xml
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/.project b/autotools/org.eclipse.linuxtools.cdt.autotools.core/.project
new file mode 100644
index 0000000000..3cb23d3fe8
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.cdt.autotools.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/autotools/org.eclipse.linuxtools.cdt.autotools.core/.settings/org.eclipse.jdt.core.prefs b/autotools/org.eclipse.linuxtools.cdt.autotools.core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..43deb750f8
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Wed Feb 18 16:59:38 EST 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.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/.settings/org.eclipse.jdt.ui.prefs b/autotools/org.eclipse.linuxtools.cdt.autotools.core/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000000..4c7131801a
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,3 @@
+#Tue Jan 02 14:11:13 EST 2007
+eclipse.preferences.version=1
+internal.default.compliance=default
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/ChangeLog b/autotools/org.eclipse.linuxtools.cdt.autotools.core/ChangeLog
new file mode 100644
index 0000000000..d11c8e7d38
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/ChangeLog
@@ -0,0 +1,4127 @@
+2010-06-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ Bug #315652
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsConfigurationBuilder.java (shouldBuild): Always
+ return true for automatic build.
+
+2010-05-27 Andrew Overholt <overholt@redhat.com>
+
+ Bug #270326
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java
+ (initialize): Test fix for black-on-black configure console.
+
+2010-05-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves: #314587
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java (getWinOSType): New method.
+ (getPathString): Modify to check for WinOSType if platform is WIN_32.
+
+2010-05-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/core/Resources.properties: Add new error message for setting options
+ via template.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/wizards/SetAutotoolsStringOptionValue.java: New file.
+ * plugin.xml: Add new template process type.
+
+2010-05-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves: #314122
+ 2010-05-26 Jon Beniston <jon@beniston.com>
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AutotoolsConfigurationManager.java (saveConfigs): Convert
+ any special characters in value before saving.
+ (xmlEscape): New method.
+
+2010-05-21 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves: #313754
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java (stripEnvVars): Add
+ support to strip off environment variables that follow the command.
+
+2010-05-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AutotoolsConfigurationManager.java
+ (resourceChanged): Don't access resource delta if it is null.
+
+2010-04-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #308261
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AutotoolsConfiguration.java (copy): Only set
+ the isDirty flag to true if we are cloning a configuration to a new id. A straight copy should not change the isDirty
+ flag.
+
+2010-03-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #306406
+ * src/org/eclipse/linuxtools/cdt/autotools/core/AutotoolsNewProjectNature.java (addAutotoolsBuilder): Don't save
+ project description unless builder list has been modified. To save the project description, use a Job so it is
+ done asynchronously.
+
+2010-03-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java (regenerateMakefiles): Use the
+ id of the IConfiguration not the name to fetch the IAConfiguration for it.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AutotoolsOptionValueHandler.java (handleValue): Make
+ sure ICConfigurationDescription exists before accessing it.
+
+2010-03-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #304005
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsConfigurationBuilder.java (build): Add logic to
+ check for dirty configuration.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java (runScript): Change to use getId
+ instead of getName method for IAConfiguration.
+ (runCommand): Ditto.
+ (regenerateMakefiles): Add call to sync configurations.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AutotoolsConfiguration.java (getId): New
+ method.
+ (copy): Changed to two separate methods, one which takes an id and the other which takes no parameter
+ and expects the id to be copied.
+ (AutotoolsConfiguration): Changed to accept an id rather than a name.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AutotoolsConfigurationManager.java: Change to keep
+ track of temporary configuration list for a project. This is needed when performing configuration settings and the
+ user has not yet confirmed. In addition, store all configurations by id and not name since the id does not change.
+ (resourceChanged): Logic changed to rename both saved and temporary configuration lists which are now Map structures.
+ (AutotoolsConfigurationManager): Add hash maps for saved and temporary configuration lists.
+ (syncConfigurations): New method.
+ (applyConfigs): Ditto.
+ (saveConfigs): Changed to take the project as parameter. A second private
+ version of the function also has been added which takes an array of Configuration
+ Descriptions. The option value "Name" for configure tool is resolved for saved configurations.
+ (getConfigs): Renamed to getSavedConfigs.
+ (getSavedConfigs): New method renamed from getConfigs.
+ (getConfigurations): Renamed to getSavedConfigs.
+ (isConfigurationAlreadySaved): Modified calls.
+ (setSyncing): New method.
+ (createDefaultConfiguration): Pass id instead of name to constructor.
+ (isSyncing): New method.
+ (addConfiguration): No longer need to check for existence because we are adding to a Map.
+ (replaceConfiguration): Removed.
+ (saveAllConfigs): Ditto.
+ (replaceProjectConfigurations): Split into two versions. The new version takes an additional
+ parameter which is an array of Configuration descriptions.
+ (getTmpConfigs): New method.
+ (syncNameField): New method.
+ (clearTmpConfigurations): New method.
+ (findCfg): Find by id and not name.
+ (getTmpConfiguration): New method.
+ (getConfiguration): Try and find configuration by id before creating default.
+ (cloneCfg): New method taken out of AutotoolsConfigurationPropertyPage and added here to perform cloning of an Autotools configuration.
+ Logic has been added to not perform cloning if the target configuration already has been saved and to return a boolean regarding this.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AutotoolsOptionValueHandler.java (handleValue): Changed to
+ call new cloneCfg interface in AutotoolsConfigurationManager. Logic to check for an Autotools Clone listener is removed. The return
+ code of cloneCfg is checked to see if the configuration has already been saved. If not saved and we are not doing a sync
+ then it returns without resolving the Name option field. The Name option field is now the Configuration Description id
+ which does not change on a rename operation.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/IAConfiguration.java: Add new getId method. Remove name methods
+ which are no longer used.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/wizards/NewAutotoolsProject.java (process): Modified call to
+ saveConfigs.
+ (process): Ditto.
+
+2010-02-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java (getAutogenPath): Fix typo
+ so we split tokens on white-space, not non-white-space.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AutotoolsConfigurationManager.java (saveConfigs):
+ Since we base ourselves on hashing by name, do not save multiple configurations with same name.
+ (getConfigs): Do not load multiple configurations with same name, just the first.
+
+2010-02-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #303616
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java (runScript): Use
+ unresolved default if environment variable is uninitialized.
+ (initializeBuildConfigDirs): Ditto.
+ (runCommand): Ditto.
+
+2010-02-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #303613
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/ConfigureMessages.properties: Fix tooltip
+ for config tool directory.
+
+2010-02-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #303616
+ * src/org/eclipse/inuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java (getAutogenArgs):
+ Add additional parameter of arguments found in the command itself.
+ (getConfigArgs): Ditto.
+ (getAutogenPath): Fix to split out additional arguments specified with the command.
+ (getConfigurePath): Ditto.
+ (runScript): Fix to resolve build macros for arguments.
+ (runCommand): Ditto.
+ (regenerateMakefiles): Fix references to functions above to pass additional parms.
+
+2010-02-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java (addMakeTargetsToManager): Add
+ code to use reflection to look for new MakeTargetManager setTargets method which will set the entire list
+ of MakeTargets at one time.
+
+2009-12-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #296616
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/MakeTarget.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/MakeTargetManager.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/ProjectTargets.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/core/AutotoolsNewProjectNature.java:
+ (removeOldAutotoolsNature): New Method.
+ (addAutotoolsBuilder): Compensate for case where we are dealing with old Autotools project.
+
+2009-11-16 Andrew Overholt <overholt@redhat.com>
+
+ * plugin.properties: Fix provider name.
+
+2009-11-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Change dependencies to handle CDT 6.0.0 and up.
+
+2009-11-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Make special source content types for configure and autogen.sh and have each tool
+ reference their proper input scripts. Add a discovery profile id for the inputs to each tool
+ and have neither support managed build. Add the gcc and g++ compiler directly to the set of
+ tools for the GNU Autotools toolchain.
+ * src/org/eclipse/linuxtools/cdt/autotools/core/Resources.properties: New message for running
+ distclean in top-level directory.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java (addMakeTargetsToManager):
+ Try and find an old MakeTarget to use instead of always creating one from scratch.
+ (regenerateMakefiles): When a full configure is required and the top-level source directory has
+ already been configured in, a make distclean to the top-level source directory is required before
+ a configuration can be performed in an alternate directory. Do this automatically, but let the
+ user know what happened. In addition, change the console for Autotools configuration so that
+ the console is not cleared within one build.
+
+2009-10-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/DefaultNoDependencyCalculator.java: New file.
+ * plugin.properties: Add required messages.
+ * plugin.xml: Add gcc and g++ tools to GNU toolchain. Add content types for configure and autogen.sh
+ scripts and make these the source content types for configure and autogen.sh respectively.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsPropertyConstants.java: Add
+ compat constants for use with older projects.
+
+2009-10-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/wizards/NewAutotoolsProject.java: Clean
+ up unused imports.
+ * plugin.xml: Add gcc and g++ to toolchain. Specify GCCStdMakePerFile discovery profile
+ for toolchain and for configure tool inputs.
+
+2009-10-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/wizards/NewAutotoolsProject.java (process): Add
+ creation of default Autotools configuration.
+
+2009-10-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ * build.properties: Remove icons.
+ * icons/ac16/acmacro_arg_obj.gif: Removed.
+ * icons/ac16/acmacro_obj.gif: Removed.
+ * icons/ac16/ammacro_obj.gif: Removed.
+ * icons/ac16/case_obj.gif: Removed.
+ * icons/ac16/condition_obj.gif: Removed.
+ * icons/ac16/convert_normal.gif: Removed.
+ * icons/ac16/elif_obj.gif: Removed.
+ * icons/ac16/else_obj.gif: Removed.
+ * icons/ac16/for_obj.gif: Removed.
+ * icons/ac16/if_obj.gif: Removed.
+ * icons/ac16/while_obj.gif: Removed.
+ * icons/autoconf.gif: Removed.
+ * icons/automake.gif: Removed.
+ * icons/dlcl16/build_configs.gif: Removed.
+ * icons/dlcl16/config_category.gif: Removed.
+ * icons/dlcl16/config_tool.gif: Removed.
+ * icons/dlcl16/newc_app.gif: Removed.
+ * icons/dlcl16/newcc_app.gif: Removed.
+ * icons/dlcl16/open_include.gif: Removed.
+ * icons/dtool16/alphab_sort_co.gif: Removed.
+ * icons/dtool16/build_menu.gif: Removed.
+ * icons/dtool16/convert-normal.gif: Removed.
+ * icons/dtool16/make.gif: Removed.
+ * icons/dtool16/makefile.gif: Removed.
+ * icons/dtool16/newc_app.gif: Removed.
+ * icons/dtool16/newcc_app.gif: Removed.
+ * icons/dtool16/segment_edit.gif: Removed.
+ * icons/dtool16/target_add.gif: Removed.
+ * icons/dtool16/target_build.gif: Removed.
+ * icons/dtool16/target_delete.gif: Removed.
+ * icons/dtool16/target_edit.gif: Removed.
+ * icons/dtool16/update_old.gif: Removed.
+ * icons/elcl16/build_configs.gif: Removed.
+ * icons/elcl16/config_category.gif: Removed.
+ * icons/elcl16/config_tool.gif: Removed.
+ * icons/elcl16/newc_app.gif: Removed.
+ * icons/elcl16/newcc_app.gif: Removed.
+ * icons/elcl16/open_include.gif: Removed.
+ * icons/etool16/alphab_sort_co.gif: Removed.
+ * icons/etool16/build_menu.gif: Removed.
+ * icons/etool16/convert_normal.gif: Removed.
+ * icons/etool16/make.gif: Removed.
+ * icons/etool16/makefile.gif: Removed.
+ * icons/etool16/newc_app.gif: Removed.
+ * icons/etool16/newcc_app.gif: Removed.
+ * icons/etool16/segment_edit.gif: Removed.
+ * icons/etool16/target_add.gif: Removed.
+ * icons/etool16/target_build.gif: Removed.
+ * icons/etool16/target_delete.gif: Removed.
+ * icons/etool16/target_edit.gif: Removed.
+ * icons/etool16/target_filter.gif: Removed.
+ * icons/etool16/update_old.gif: Removed.
+ * icons/obj16/acmacro_obj.gif: Removed.
+ * icons/obj16/command_obj.gif: Removed.
+ * icons/obj16/define_obj.gif: Removed.
+ * icons/obj16/environment_obj.gif: Removed.
+ * icons/obj16/envvar_obj.gif: Removed.
+ * icons/obj16/error_obj.gif: Removed.
+ * icons/obj16/fatalerror_obj.gif: Removed.
+ * icons/obj16/hfolder_obj.gif: Removed.
+ * icons/obj16/include_obj.gif: Removed.
+ * icons/obj16/info_obj.gif: Removed.
+ * icons/obj16/irule_obj.gif: Removed.
+ * icons/obj16/lib_obj.gif: Removed.
+ * icons/obj16/macro_obj.gif: Removed.
+ * icons/obj16/relation_obj.gif: Removed.
+ * icons/obj16/target_obj.gif: Removed.
+ * icons/obj16/trule_obj.gif: Removed.
+ * icons/obj16/warning_obj.gif: Removed.
+ * icons/sample.gif:
+
+2009-10-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ Refactoring of org.eclipse.linuxtools.cdt.autotools into org.eclipse.linuxtools.cdt.autotools.core
+ and org.eclipse.linuxtools.cdt.autotools.ui.
+
+ * .settings/org.eclipse.core.resources.prefs: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AbstractAutotoolsHandler.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AbstractTargetAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AclocalHandler.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AutoconfHandler.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AutoheaderHandler.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AutomakeHandler.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AutoreconfHandler.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAclocalAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoconfAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoheaderAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutomakeAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoreconfAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeLibtoolizeAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeMessages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeMessages.properties: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/LibtoolizeHandler.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/ReconfigureAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/ReconfigureHandler.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/SingleInputDialog.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/TwoInputDialog.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsBuilder.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsConfigurationBuilder.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakeTargetManager.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewMakeGenerator.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewProjectNature.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsOptionValueHandler.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsPlugin.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsProjectNature.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsProjectPropertyTester.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfo.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfoProvider.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutoconfSubstRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeCompletionProcessor.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeConfigMacro.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeDocumentProvider.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeEditor.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeEditorFactory.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeErrorHandler.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/Automakefile.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileCodeScanner.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileContentOutlinePage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileReconcilingStrategy.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileSourceConfiguration.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileUtil.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeIfElse.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeMacroDefinitionRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeMacroReferenceRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeTextHover.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeWordDetector.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/AbstractConfigurationOption.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/AutotoolsConfiguration.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/AutotoolsConfigurationManager.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/BinConfigureOption.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/ConfigureMessages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/ConfigureMessages.properties: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/ConfigureOptionCategory.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/ConfigureTool.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/IAConfiguration.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/IConfigureOption.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/InternalConfigureOption.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/MultiArgConfigureOption.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/StringConfigureOption.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/AbstractElementListSelectionDialog.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/AbstractMakefile.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/AbstractMakefileCodeScanner.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/AddBuildTargetAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/ArchiveTarget.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/BadDirective.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Command.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Comment.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/CompletionProposalComparator.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Conditional.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/DefaultRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/DefineVariable.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/DeleteOnErrorRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Directive.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/EditorUtility.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/ElementListSelectionDialog.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Else.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/EmptyLine.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Endef.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Endif.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/ExportAllVariablesRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/ExportVariable.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/ExternalEditorInput.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/ExternalEditorInputFactory.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/GNUAutomakefile.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/GNUMakefileConstants.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/GNUMakefileUtil.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/GNUTargetRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/GNUVariableDef.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/IAutomakeConditional.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/If.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Ifdef.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Ifeq.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Ifndef.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Ifneq.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/IgnoreRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/IMakefileDocumentProvider.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/IMakefileEditorActionDefinitionIds.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Include.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/InferenceRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/IntermediateRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/IReconcilingParticipant.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/ISelectionValidator.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/ITranslationUnitEditorInput.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/LexicalSortingAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/LowResolutionTimeRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MacroDefinition.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MacroDefinitionRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MacroReferenceRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileAnnotationHover.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileCodeScanner.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileCompletionProcessor.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakeFileConstants.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileContentOutlinePage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileDocumentProvider.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileDocumentSetupParticipant.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileEditor.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileEditorActionContributor.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileEditorPreferenceConstants.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileEditorTogglePresentationAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileMessages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefilePartitionScanner.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileReader.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileReconcilingStrategy.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakeFileResources.properties: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileSourceConfiguration.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileStorageDocumentProvider.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileTextHover.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileWordDetector.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MessageLine.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/NotParallelRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/NullMakefile.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/OpenDeclarationAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/OpenIncludeAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/OverrideDefine.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/OverrideVariable.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Parent.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/PhonyRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/PosixMakefileUtil.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/PosixRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/PreciousRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/ProjectionMakefileUpdater.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Rule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/SccsGetRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/SecondaryRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/SelectionList.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/SelectionStatusDialog.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/SilentRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/SpecialRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/StaticTargetRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/StatusInfo.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/StatusTool.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/StringMatcher.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/SuffixesRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Target.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/TargetRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/TargetVariable.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Terminal.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/TwoArrayQuickSort.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/UnExport.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Util.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/VariableDefinition.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/VPath.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/WordPartDetector.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/WorkingCopyManager.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/MakeMessages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/MakeTarget.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/MakeTargetManager.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/MarkerGenerator.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ProjectTargets.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/text/hover/AutoconfPrototype.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/text/hover/AutoconfTextHover.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/text/hover/HoverMessages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/text/hover/HoverMessages.properties: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/AbstractAutotoolsCPropertyTab.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/AutotoolsConsole.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/AutotoolsPluginImages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/CBuildStepsConsole.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/CConfigureConsole.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/Console.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/ConsoleMessages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/ConsoleMessages.properties: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/CWordFinder.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/editors/autoconf/ProjectionFileUpdater.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/ErrorParserBlock.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/FileRelevance.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/HTML2TextReader.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/HTMLPrinter.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/HTMLTextPresenter.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/LineBreakingReader.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/LocationAdapter.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/MakeResources.properties: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/MakeUIImages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/MakeUIMessages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/MessageLine.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/OptionalMessageDialog.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/AbstractEditorPreferencePage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/AutoconfEditorPreferencePage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/AutomakeEditorPreferencePage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/AutotoolsEditorPreferenceConstants.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/AutotoolsPreferencePage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/AutotoolsPreferencesMessages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/AutotoolsPreferencesMessages.properties: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/ColorEditor.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/ColorManager.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/OverlayPreferenceStore.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/StatusInfo.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/TabFolderLayout.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AbstractConfigurePropertyOptionsPage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsBuildPropertyPage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsCategoryPropertyOptionPage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsConfigurePrefStore.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsConfigurePropertyPage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsConfigurePropertyTab.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsEditorPropertyTab.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsGeneralPropertyPage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsHeadPropertyPage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsPropertyConstants.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsPropertyManager.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsPropertyMessages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsPropertyMessages.properties: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsToolPropertyOptionPage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsToolsPropertyTab.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/IProjectPropertyListener.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/IPropertyChangeManager.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/ToolListContentProvider.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/ToolListElement.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/ToolListLabelProvider.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/ResourceLookup.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/ResourceLookupTree.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/SingleCharReader.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/SubstitutionTextReader.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/wizards/AutotoolsWizardMessages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/wizards/AutotoolsWizardMessages.properties: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/wizards/ConfigurationContentProvider.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/wizards/ConfigurationLabelProvider.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/wizards/ManagedProjectOptionBlock.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/wizards/NewAutotoolsProject.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/popup/actions/GetDefinedSymbolsAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/popup/actions/GetIncludePathAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/Resources.properties: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfAnnotationHover.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfCodeScanner.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfDocumentProvider.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfDocumentSetupParticipant.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditor.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditorMacroValidator.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditorMessages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditorMessages.properties: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfErrorHandler.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfIdentifierRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfKeywordDetector.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfM4WordDetector.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacro.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroCodeScanner.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroContentAssistProcessor.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroDamagerRepairer.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroParameterListValidator.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroPartitionRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroProposalContextInformation.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroWordDetector.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfPartitioner.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfPartitionScanner.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfPKGWordDetector.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfReconcilingStrategy.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfWhitespaceDetector.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfWordDetector.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/IAutotoolEditorActionDefinitionIds.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/IAutotoolHelpContextIds.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/IAutotoolsEditor.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/InlineDataRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/MultilineRuleDamagerRepairer.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/outline/AutoconfContentOutlinePage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/outline/AutoconfContentProvider.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/outline/AutoconfLabelProvider.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/ParseException.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfCaseConditionElement.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfCaseElement.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElement.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElifElement.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElseElement.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfForElement.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfIfElement.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroArgumentElement.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroDetector.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroElement.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfOutlineErrorHandler.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfParser.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfRootElement.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfSelectElement.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfTokenizer.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfUntilElement.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfWhileElement.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfErrorHandler.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfMacroDetector.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfMacroValidator.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IMacroDetector.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/ITokenConstants.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/ParseException.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/Token.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/RecursiveSingleLineRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/RestrictedEndOfLineRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/AutotoolsBuildWizard.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/AutotoolsNewCProjectWizardV2.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/ConvertToAutotoolsProjectWizard.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/CProjectPlatformPage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/NewAutotoolsCCProjectWizard.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/NewAutotoolsCProjectWizard.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/NewAutotoolsProjectOptionPage.java: Removed.
+ * templates/projecttemplates/EmptyProject/template.properties: Removed.
+ * templates/projecttemplates/EmptyProject/template.xml: Removed.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src/AUTHORS: Removed.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src/Basename.c: Removed.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src/configure.ac.top: Removed.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src/COPYING: Removed.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src/Makefile.am.src: Removed.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src/Makefile.am.top: Removed.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src/NEWS: Removed.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src/README: Removed.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/template.properties: Removed.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/template.xml: Removed.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/AUTHORS: Removed.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Basename.cpp: Removed.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/configure.ac.top: Removed.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/COPYING: Removed.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Makefile.am.src: Removed.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Makefile.am.top: Removed.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/NEWS: Removed.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/README: Removed.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.properties: Removed.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.xml: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/core/AutotoolsNewProjectNature.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/core/AutotoolsPlugin.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/core/Resources.properties: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsConfigurationBuilder.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsPropertyConstants.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AutotoolsOptionValueHandler.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/IConfigurationCloneListener.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/MakeMessages.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/MakeTarget.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/MakeTargetManager.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/MarkerGenerator.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/ProjectTargets.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/wizards/NewAutotoolsProject.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AbstractConfigurationOption.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AutotoolsConfiguration.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AutotoolsConfigurationManager.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/BinConfigureOption.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/ConfigureMessages.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/ConfigureOptionCategory.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/ConfigureTool.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/IAConfiguration.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/IConfigureOption.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/InternalConfigureOption.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/MultiArgConfigureOption.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/StringConfigureOption.java: New file.
+ * .project: Changed due to refactoring.
+ * META-INF/MANIFEST.MF: Refactored.
+ * plugin.xml: Refactored. Moving UI elements to org.eclipse.linuxtools.cdt.autotools.ui plug-in.
+
+2009-10-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/AutotoolsConfigurationManager.java (saveConfigs): Store
+ configuration data into .autotools file stored in project rather than using project working location.
+ (getConfigs): Get configs from .autotools file stored in the project rather than using project working
+ location.
+
+2009-10-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Fix category for Autotools C++ wizard.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsOptionValueHandler.java (fixName): New method.
+ (handleValue): Add support to generate build directory if property option is on or defaulted.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsBuildPropertyPage.java (createControls):
+ Add support for automatic build name generation option.
+ (initialize): Ditto.
+ (performDefaults): Ditto.
+ (performOK): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsPropertyConstants.java:
+ Add support for auto build-name generation option.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsPropertyMessages.properties: Add
+ messages for new property for automatically naming the build directory.
+
+2009-09-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsEditorPropertyPage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsPropertyPage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsToolsPropertyPage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsConfigurePropertyTab.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsEditorPropertyTab.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsGeneralPropertyPage.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsHeadPropertyPage.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsToolsPropertyTab.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/wizards/NewAutotoolsProject.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/AutotoolsBuildWizard.java: New file.
+ * templates/projecttemplates/EmptyProject/template.properties: New file.
+ * templates/projecttemplates/EmptyProject/template.xml: New file.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src: New file.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src/AUTHORS: New file.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src/Basename.c: New file.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src/configure.ac.top: New file.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src/COPYING: New file.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src/Makefile.am.src: New file.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src/Makefile.am.top: New file.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src/NEWS: New file.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src/README: New file.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/template.properties: New file.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/template.xml: New file.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src: New file.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/AUTHORS: New file.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Basename.cpp: New file.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/configure.ac.top: New file.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/COPYING: New file.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Makefile.am.src: New file.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Makefile.am.top: New file.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/NEWS: New file.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/README: New file.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.properties: New file.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.xml: New file.
+ * plugin.properties: Add strings to support additions to plugin.xml.
+ * plugin.xml: Add a new template process for creating an Autotools project. Add templates for
+ an empty project, a helloworld C project, and a helloworld C++ project. Add a CDT wizard for
+ creating a new Autotools project. Remove project type name from Autotools project type so that
+ it does not get added by MBSWizard and instead is added as part of the new AutotoolsBuildWizard.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewMakeGenerator.java (regenerateMakefiles): When forced to
+ autoreconf missing files, do not restart the console for the subsequent configuration.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsOptionValueHandler.java (handleValue): Handle class rename.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/AutotoolsConfiguration.java (setDefaultOptions): New
+ method.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/IAConfiguration.java: Add setDefaultOptions method.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsCategoryPropertyOptionPage.java (updateFields): Add
+ call to set the values.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsConfigurePropertyPage.java:
+ (performSave): Deal with AutotoolsPropertyPage being renamed AutotoolsConfigurePropertyPage.
+ (isSingle): Add override to specify this is a single page.
+ (AutotoolsConfigurePropertyPage): New.
+
+2009-09-21 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Make configure source tool directory use our shared applicability calculator.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewMakeGenerator.java (createDirectory):
+ Change to return boolean and to use Java File logic.
+ (regenerateMakefiles): Fail if createDirectory fails for build directory. Change over to not
+ use Root or Workspace for file management. Use Java File instead.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/ToolListLabelProvider.java:
+ Remove compiler warning.
+ * src/org/eclipse/linuxtools/cdt/autotools/Resources.properties: Add new failure message if the
+ build directory cannot be created.
+
+2009-09-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsDefaultBuildDirHandler.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewMakefileBuilder.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/AbstractAutotoolsPage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsOptionValueHandler.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/IAConfiguration.java: New file.
+ * plugin.properties: Add configure name string.
+ * plugin.xml: Add configure name to configure options for build definition and set its option value handler and
+ calculator to be AutotoolsOptionValueHandler. Add back a builder for toolchain to prevent errror when displaying
+ toolChain editor property page. Add new AutotoolsNatureV2.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsConfigurationBuilder.java (performMakefileGeneration): Add
+ multiconfiguration support.
+ (clean): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewMakeGenerator.java (addMakeTargetsToManager):
+ (createDirectory): Use Java File interface to perform mkdirs.
+ (regenerateMakefiles): Add configuration parameter to support multiconfiguration.
+ (initializeBuildConfigDirs): Use build location from ManagedBuild.
+ (generateMakefiles): Call new regenerateMakefile interface.
+ (reconfigure): Use new regenerateMakefiles interface.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/AutotoolsConfiguration.java (setConfigToolDirectory):
+ (setActive): Remove.
+ (isActive): Remove.
+ (configOpts): Remove builddir.
+ (copy): Change output to be IAConfiguration.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/AutotoolsConfigurationManager.java: Remove active
+ configuration tracking.
+ (resourceChanged): Remove active configuration logic.
+ (saveConfigs): Fix bug with adding header information in loop.
+ (replaceConfiguration): Use IAConfiguration interface.
+ (getConfigs): Remove active configuration logic.
+ (configurationAlreadyExists): Use IAConfiguration interface.
+ (getConfigurations): Don't add a configuration to project automatically.
+ (AutotoolsConfigurationManager): Remove active configuration management set up.
+ (createDefaultConfiguration): Do not default configuration name now that we are syncing up with build configurations.
+ (addConfiguration): Use IAConfiguration interface. Remove active configuration management.
+ (replaceProjectConfigurations): New method.
+ (findCfg): New method.
+ (getConfiguration): New method.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/AbstractAutotoolsCPropertyTab.java: Extend AbstractCBuildPropertyTab.
+ (isIndexerAffected): New method.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsCategoryPropertyOptionPage.java (AutotoolsCategoryPropertyOptionPage):
+ Use IAConfiguration interface.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsConfigurePrefStore.java (setSelection): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsConfigurePropertyPage.java: Remove configuration
+ tracking. Let AutotoolsPropertyPage do it.
+ (handleOptionSelection): Use AbstractPage cast.
+ (setValues): Disable for multiconfiguration. Get current configuration using getAutotoolsCfg method.
+ (createControls): Don't bother getting current Autotools configuration. Don't call setValues().
+ (canBeVisible): Check for project.
+ (updateData): Get ManagedBuild configuration from input to use later to find syncing AutotoolsConfiguration with
+ same name.
+ (getAutotoolsCfg): New Method.
+ (performCancel): Do nothing.
+ (displayPageForElement): Set selection based on current Autotools configuration from getAutotoolsCfg().
+ (performDefaults): Do nothing.
+ (performOK): Replace Autotools configurations for project.
+ (createSelectionArea): Use a temporary AutotoolsConfiguration for a tree label provider.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsEditorPropertyPage.java (createControls):
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsPropertyPage.java: Rewritten to extend
+ AbstractPage and to replace content with AbstractPage.java as well since the majority of methods in AbstractPage
+ are private and manipulate private data. Add AutotoolsConfiguration tracking and a call-back mechanism for registering
+ cloned configurations from AutotoolsOptionValueHandler. When needed, call the super methods so they may access
+ private methods.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsToolPropertyOptionPage.java (AutotoolsToolPropertyOptionPage):
+ Use IAConfiguration interface.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/ToolListLabelProvider.java (ToolListLabelProvider): Ditto.
+ (getCfg): Ditto.
+ (setCfg): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/AutotoolsNewCProjectWizardV2.java (doRun): Remove AutotoolsConfiguration
+ logic and defer to when needed.
+
+2009-09-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ Switching to use CommonBuilder.
+
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsConfigurationBuilder.java: New file.
+ * META-INF/MANIFEST.MF: Update dependencies.
+ * plugin.xml: Change build configuration to non-managed-build. Add AutotoolsConfigurationBuilder
+ as separate builder and remove AutotoolsNewMakeGenerator as Managed Build Makefile generator. Make
+ Autotools Nature require Managed Build Nature.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewMakeGenerator.java (addMakeTargetsToManager):
+ Specify CDT common builder as target builder and also specify build directory as container.
+ (regenerateMakefiles): Add build directory to console messages. Make full configure default to false.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewProjectNature.java (addAutotoolsBuilder): Change
+ to put new Configuration builder ahead of Common Builder.
+ (configure): Remove Std Make bits.
+ * src/org/eclipse/linuxtools/cdt/autotools/Resources.properties: Add new messages and add build directory
+ specification to Makefile generator messages.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/AutotoolsNewCProjectWizardV2.java (addNature): Refer
+ to Managed Nature rather than Make Nature.
+
+2009-08-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewMakeGenerator.java (getPathString): New
+ method.
+ (runScript): Call getPathString method on command path. Use CCorePlugin to get
+ environment variable manager instead of ManagedBuildManager.
+ (runCommand): Ditto.
+ (initializeBuildConfigDirs): Remove code to set build location in builder.
+ (initialize): Get the C Configuration description for the active configuration.
+
+2009-07-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/AutotoolsConsole.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/Console.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/CBuildStepsConsole.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/CConfigureConsole.java: Inherit from
+ Console class.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/MakeResources.properties: ADd newline
+ at end of file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/ConsoleMessages.properties: Add console
+ names.
+ * plugin.xml: Add CBuildConsole extensions for Autotools console and BuildSteps console.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAction.java:
+ (executeConsoleCommand): New method to execute commands in a special console.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAclocalAction.java: (run): Use
+ new executeConsoleCommand method from InvokeAction which this class now inherits from.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoconfAction.java (run): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoheaderAction.java (run): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutomakeAction.java (run): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoreconfAction.java (run): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeLibtoolizeAction.java (run): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeMessages.properties: Add CWD message.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewMakeGenerator.java (stripEnvVars): Make
+ public static.
+
+2009-07-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/ReconfigureAction.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/ReconfigureHandler.java: New file.
+ * plugin.properties: Add strings for Reconfigure menu item.
+ * plugin.xml: Add Reconfigure project menu item.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewMakeGenerator.java (regenerateMakefiles):
+ (reconfigure): New method.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/AutotoolsConfigurationManager.java (resourceChanged):
+ Now that plugin working area is used, no need to manage the files there for project deletion or
+ renaming.
+ (addConfiguration): If this is first configuration for project, call setActiveConfiguration.
+ (replaceConfiguration): Ditto.
+ (saveConfigs): Use plugin working area for project.
+ (getConfigs): New method which gets configs for single project.
+ (loadConfigs): Removed.
+ (getActiveConfiguration): Call getConfigurations internally.
+ (getConfigurations): Call getconfigs method and create default configuration if needed.
+ (setActiveConfiguration):
+ (getInstance): Remove loadConfigs call.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/ConfigureMessages.properties: Add save
+ config error message.
+
+2009-07-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/AutotoolsConfiguration.java (getToolArgs): Add
+ support for caching parameters.
+ (getToolParameters): Clean up warnings.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/BinConfigureOption.java (setValue): Set configuration
+ dirty on value change.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/text/hover/AutoconfPrototype.java: Clean
+ up compiler warnings.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/text/hover/AutoconfTextHover.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/AbstractAutotoolsPage.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsConfigurePropertyPage.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsEditorPropertyPage.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsToolsPropertyPage.java: Ditto.
+
+2009-07-10 Jeff Johnston <jjohnstn@redhat.com>
+
+ * icons/obj16/fatalerror_obj.gif: New file.
+ * icons/obj16/info_obj.gif: New file.
+ * icons/obj16/warning_obj.gif: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/AbstractAutotoolsCPropertyTab.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/AbstractAutotoolsPage.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/FileRelevance.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/LocationAdapter.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/OptionalMessageDialog.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/ResourceLookup.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/ResourceLookupTree.java: New file.
+ * plugin.xml: Fix new MakefileGenerator id and nature references.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewMakefileBuilder.java (clean): New override method.
+ (getTargets): New override method.
+ (removeBuildDir): New method.
+ (build): Minor format change.
+ (AutotoolsNewMakefileBuilder):
+ (makeArray): New method.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewMakeGenerator.java (getAutogenPath): New method
+ that calls stripEnvVars.
+ (runScript): Add additional enviornment variables specified on command line.
+ (stripEnvVars): New method to strip env vars from a command string.
+ (getConfigurePath): Changed to use stripEnvVars.
+ (regenerateMakefiles): Fix deletion logic to not delete build directory.
+ (makeArray): New method.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewProjectNature.java: Change id.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/AbstractConfigurationOption.java (getParameters):
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/AutotoolsConfiguration.java (Option): Add
+ defaultValue field.
+ (Option.getDefaultValue): New method.
+ (Option.Option): Added constructor.
+ (initConfigOptions): Fix autogen to not have id with dot in name.
+ (configOpts): Add default value processing.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/ConfigureMessages.properties: Change name of autogen
+ tool name message.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/MakeResources.properties: Added messages.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/MakeUIImages.java: Add new image.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsConfigurePropertyPage.java (handleOptionSelection):
+ Change cast.
+ (cfgChanged): Add comment.
+ (getProject): Changed to get project from page.
+ (createControls): Remove configuration combo which is no longer used.
+ (updateData): Update comment.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsEditorPropertyPage.java (updateButtons):
+ Update comment.
+ (cfgChanged): Added comment.
+ (getProject): Changed to get project from page.
+ (updateData): Update comment.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsPropertyMessages.java: Added messages.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsPropertyPage.java: Changed to inherit from
+ AbstractAutotoolsPage.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsToolPropertyOptionPage.java (createFieldEditors):
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsToolsPropertyPage.java (updateButtons):
+ Update comment.
+ (cfgChanged): Added comment.
+ (getProject): Changed to get project from page.
+ (updateData): Update comment.
+
+2009-06-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #280509
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewMakeGenerator.java (regenerateMakefiles): Add
+ logic to use autoreconf if no configure script and no autogen.sh.
+ * src/org/eclipse/linuxtools/cdt/autotools/Resources.properties: Add messages.
+
+2009-06-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #280696, #280504, #280505, #280506
+
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAction.java (showSuccess):
+ Changed to issue a information dialog that does not have a cancel button.
+ (executeCommand): Changed to create a ProgressMonitorDialog that is issued
+ until the command completes successfully or with failure.
+ (ExecuteProgressDialog): New private internal class that implements IRunnableWithProgress
+ which is used to run the command for a ProgressMonitorDialog.
+ (simpleParseOptions): New method to parse options and account for quoted strings.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AutoheaderHandler.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AutoreconfHandler.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoheaderAction.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoreconfAction.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeLibtoolizeAction.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/LibtoolizeHandler.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/SingleInputDialog.java: New file.
+ * plugin.properties: Add new messages for additional tools/commands added.
+ * plugin.xml: Change invoking autotools to be a single menu item in Project menu which
+ expands to show all tools available, including aclocal, autoconf, autoheader, automake,
+ autoreconf, and libtoolize.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeMessages.properties: Add support
+ for autoheader, autoreconf, and libtoolize.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsPropertyConstants.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsPropertyMessages.properties: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsToolsPropertyPage.java
+ (createControls): Ditto.
+ (initialize): Ditto.
+ (performDefaults): Ditto.
+ (performOK): Ditto.
+
+2009-06-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewMakeGenerator.java (toolsCfg):
+ New AutotoolsConfiguration acquired from AutotoolsConfigurationManager.
+ (runScript): Use new toolsCfg instead of cfg.
+ (getConfigArgs): Ditto.
+ (initializeBuildConfigDirs): Ditto.
+ (autogenExists): Ditto.
+ (runCommand): Ditto.
+ (getAutogenArgs): Ditto.
+ (configureExists): Ditto.
+ (regenerateMakefiles): Ditto.
+ (getConfigurePath): Ditto.
+ (getMakefileName): Ditto.
+ (initialize): Initialize toolsCfg to active Autotools configuration for project.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/AbstractConfigurationOption.java (getParameters):
+ New method.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/AutotoolsConfiguration.java (getToolArgs): New
+ method.
+ (getConfigArgs): Removed.
+ (configOpts): Add autogen.sh support.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/ConfigureMessages.properties: Add autogen.sh
+ stuff.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/ConfigureOptionCategory.java (getParameters): New
+ method.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/ConfigureTool.java (getParameters): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/IConfigureOption.java (getParameters): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/MultiArgConfigureOption.java (getParameters): Fix
+ to properly separate options of all kinds and not just for configure.
+
+2009-06-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #281582, #281583
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java (clean): Do not
+ use ManagedBuildManager to get a Makefile generator. Just create a new Autotools Makefile
+ generator.
+ (removeBuildDir): Ditto.
+ (build): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfo.java (getCompilationString):
+ Fix to support g++, top-level building, and compilation strings that span multiple lines.
+
+2009-06-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #280117
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfo.java (buildFile): Fix so we don't
+ leave loop early before finding build directory.
+
+2009-06-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * icons/ac16/convert-normal.gif: Removed.
+ * icons/etool16/convert-normal.gif: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsBuildPropertyPage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsEditorPropertyPage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyConstants.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyManager.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyMessages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyMessages.properties: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyPage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsToolsPropertyPage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/IProjectPropertyListener.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/IPropertyChangeManager.java: Removed.
+ * icons/ac16/convert_normal.gif: New file.
+ * icons/dlcl16/config_category.gif: New file.
+ * icons/dlcl16/config_tool.gif: New file.
+ * icons/elcl16/config_category.gif: New file.
+ * icons/elcl16/config_tool.gif: New file.
+ * icons/etool16/convert_normal.gif: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/ConfigureTool.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/InternalConfigureOption.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/MultiArgConfigureOption.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AbstractConfigurePropertyOptionsPage.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsCategoryPropertyOptionPage.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsConfigurePrefStore.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsConfigurePropertyPage.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsToolPropertyOptionPage.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/ToolListContentProvider.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/ToolListElement.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/ToolListLabelProvider.java: New file.
+ * plugin.properties: Change messages.
+ * plugin.xml: Remove warnings.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAclocalAction.java: Changed due to refactoring.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoconfAction.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutomakeAction.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsBuilder.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewMakeGenerator.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfo.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfoProvider.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/AbstractConfigurationOption.java (isMultiArg):
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/AutotoolsConfiguration.java (getConfigToolDirectory):
+ Rewritten to use option.
+ (setConfigToolDirectory): Ditto.
+ (setDirty): Rewritten.
+ (Option): Add public methods to get name, description, type, and tooltip.
+ (setBuildDirectory): Rewritten to use option.
+ (getConfigArgs): New method.
+ (initConfigOptions): Set options for everything including tools.
+ (getOption): New method.
+ (getOptionList): Ditto.
+ (AutotoolsConfiguration): Keep track of parms dirty vs config dirty.
+ (getChildOptions): Add support for both categories and tools.
+ (setOption): Alter dirty flag.
+ (getToolParameters): New method.
+ (getTools): Ditto.
+ (configOpts): New internal map.
+ (getBuildDirectory): Rewrite to use simple option.
+ (copy): Copy using option copy methods and add internal variables as well.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/AutotoolsConfigurationManager.java (ConfigureFileFilter):
+ New class to make it easy to find configuration data for project.
+ (resourceChanged): Added internal map changes as well.
+ (addConfigurationHeader): New method.
+ (saveConfigs): Changed to use IFile.
+ (replaceConfiguration): New method.
+ (setActiveConfiguration): Ditto.
+ (getConfigurations): If default configuration created, mark it active.
+ (AutotoolsConfigurationManager): Create active configs map.
+ (getInstance): Fixed to only load configs the one time.
+ (loadConfigs): Fixed to properly load configuration files and use xml parsing.
+ (getActiveConfiguration): New method.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/BinConfigureOption.java (getType):
+ (copy): New method.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/ConfigureMessages.java:
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/ConfigureMessages.properties:
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/ConfigureOptionCategory.java (getValue):
+ (getType): New method.
+ (isMultiArg): Ditto.
+ (copy): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/IConfigureOption.java:
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/StringConfigureOption.java (getType):
+ (copy): New method.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/text/hover/AutoconfTextHover.java: Changed due to
+ refactoring of properties.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/AutotoolsPluginImages.java: Add new images for
+ Autotools configuration property page.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsBuildPropertyPage.java: Changed due to
+ refactoring of properties.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsEditorPropertyPage.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsPropertyConstants.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsPropertyManager.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsPropertyMessages.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsPropertyMessages.properties: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsPropertyPage.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/AutotoolsToolsPropertyPage.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/IProjectPropertyListener.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/properties/IPropertyChangeManager.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditor.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/AutotoolsNewCProjectWizardV2.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/NewAutotoolsCCProjectWizard.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/NewAutotoolsCProjectWizard.java: Ditto.
+
+2009-05-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/AbstractConfigurationOption.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/AutotoolsConfiguration.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/AutotoolsConfigurationManager.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/BinConfigureOption.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/ConfigureMessages.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/ConfigureMessages.properties: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/ConfigureOptionCategory.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/IConfigureOption.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/configure/StringConfigureOption.java: New file.
+ * .classpath: Checking in.
+ * plugin.xml: Fix compiler warnings.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAclocalAction.java (run): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAction.java (separateTargets): Ditto.
+ (separateOptions): Ditto.
+ (executeCommand): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoconfAction.java (run): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutomakeAction.java (run): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/TwoInputDialog.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsBuilder.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsDefaultBuildDirHandler.java (handleValue): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java (clean): Ditto.
+ (build): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewMakefileBuilder.java (performMakefileGeneration): Ditto.
+ (build): Ditto.
+ (AutotoolsNewMakefileBuilder): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewMakeGenerator.java (runScript): Ditto.
+ (saveTargets): Ditto.
+ (runCommand): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewProjectNature.java (configure): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsPlugin.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsProjectNature.java (removeNature): Ditto.
+ (addAutotoolsBuilder): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfo.java (buildFile): Ditto.
+ (getDefinedSymbols): Ditto.
+ (getIncludePaths): Ditto.
+ (definedSymbols): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfoProvider.java (setDirty): Ditto.
+ (getScannerInformation): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutoconfSubstRule.java (DecreasingCharArrayLengthComparator): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeCompletionProcessor.java (DirectiveComparator): Ditto.
+ (computeContextInformation): Ditto.
+ (computeCompletionProposals): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeDocumentProvider.java (connect): Ditto.
+ (shutdown): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeEditor.java (getAdapter): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeErrorHandler.java (AutomakeMarker): Ditto.
+ (checkChildren): Ditto.
+ (AutomakeMarker.setAttributes): Ditto.
+ (AutomakeMarker.getAttributes): Ditto.
+ (createMarker): Ditto.
+ (AutomakeMarker.AutomakeMarker): Ditto.
+ (AutomakeMarker.getAdapter): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileCodeScanner.java (createRules): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileContentOutlinePage.java (AutomakefileContentProvider.getElements): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/AbstractElementListSelectionDialog.java (setSelectionListElements): Ditto.
+ (getWidgetSelection): Ditto.
+ (verifyCurrentSelection): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/AbstractMakefile.java (getMacroDefinitions): Ditto.
+ (getBuiltinInferenceRules): Ditto.
+ (getRules): Ditto.
+ (getInferenceRules): Ditto.
+ (getTargetRules): Ditto.
+ (getBuiltinMacroDefinitions): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/AddBuildTargetAction.java (getTargetRules): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/CompletionProposalComparator.java (compare): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/EditorUtility.java (getWorkspaceFileAtLocation): Ditto.
+ (isLinked): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/ElementListSelectionDialog.java (open): Ditto.
+ (setElements): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/ExternalEditorInput.java (getAdapter): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/GNUAutomakefile.java (getBuiltins): Ditto.
+ (addDirective): Ditto.
+ (parseVPath): Ditto.
+ (getDirectives): Ditto.
+ (parse): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/LexicalSortingAction.java (LexicalCSorter.isSorterProperty): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileCompletionProcessor.java (DirectiveComparator): Ditto.
+ (computeContextInformation): Ditto.
+ (computeCompletionProposals): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileContentOutlinePage.java (MakefileContentProvider.getElements): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileDocumentProvider.java (shutdown): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileEditor.java (getAdapter): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileMessages.java (getFormattedString): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefilePartitionScanner.java (MakefilePartitionScanner): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/NullMakefile.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/OpenIncludeAction.java (resolveIncludeLink): Ditto.
+ (findFile): Ditto.
+ (getIncludeStatement): Ditto.
+ (chooseFile): Ditto.
+ (run): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Parent.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/PosixMakefileUtil.java (findTargets): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/ProjectionMakefileUpdater.java (createAnnotationMap): Ditto.
+ (fCollapseConditional): Ditto.
+ (fCollapseRule): Ditto.
+ (fCollapseMacroDef): Ditto.
+ (match): Ditto.
+ (processReconcile): Ditto.
+ (computeAdditions): Ditto.
+ (initialize): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Rule.java (getCommands): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/SelectionList.java (getSelection): Ditto.
+ (setElements): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/SelectionStatusDialog.java (setInitialSelection): Ditto.
+ (getPrimaryInitialSelection): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/StringMatcher.java (parseWildCards): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/WorkingCopyManager.java (setWorkingCopy): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/MakeTarget.java (getAdapter): Ditto.
+ (getEnvironment): Ditto.
+ (setEnvironment): Ditto.
+ (build): Ditto.
+ (getExpandedEnvironment): Ditto.
+ (getAttributeMap): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/MakeTargetManager.java (initializeBuilders): Ditto.
+ (getTargetBuilders): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ProjectTargets.java (findTarget): Ditto.
+ (remove): Ditto.
+ (get): Ditto.
+ (getAsXML): Ditto.
+ (contains): Ditto.
+ (add): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/editors/autoconf/ProjectionFileUpdater.java (createAnnotationMap): Ditto.
+ (match): Ditto.
+ (processReconcile): Ditto.
+ (computeAdditions): Ditto.
+ (initialize): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/ErrorParserBlock.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/HTML2TextReader.java (static initializer): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/HTMLTextPresenter.java (updatePresentation): Ditto.
+ (adaptTextPresentation): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/AutoconfEditorPreferencePage.java (ColorListContentProvider.getElements): Ditto.
+ (addTextKeyToCover): Ditto.
+ (createSyntaxPage): Ditto.
+ (createOverlayStore): Ditto.
+ (HighlightingColorListItem): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/AutomakeEditorPreferencePage.java (ColorListContentProvider.getElements): Ditto.
+ (addTextKeyToCover): Ditto.
+ (createSyntaxPage): Ditto.
+ (createOverlayStore): Ditto.
+ (HighlightingColorListItem): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/ColorManager.java (dispose): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/StatusInfo.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java (addMakeTargetsToManager): Ditto.
+ (runScript): Ditto.
+ (regenerateMakefiles): Ditto.
+ (runCommand): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/Resources.properties: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfAnnotationHover.java (getMarkersForLine): Ditto.
+ (select): Ditto.
+ (getHoverInfo): Ditto.
+ (formatMultipleMessages): Ditto.
+ (.createInformationControl): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfCodeScanner.java (AutoconfCodeScanner): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfDocumentProvider.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditor.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfErrorHandler.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfIdentifierRule.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacro.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroCodeScanner.java (AutoconfMacroCodeScanner): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroContentAssistProcessor.java (computeCompletionProposals): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroDamagerRepairer.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroParameterListValidator.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfPartitionScanner.java (AutoconfPartitionScanner): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/IAutotoolsEditor.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/InlineDataRule.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/outline/AutoconfContentOutlinePage.java (updateSelection): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElement.java (AutoconfElement): Ditto.
+ (toString): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfOutlineErrorHandler.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfParser.java (ExprEndCondition): Ditto.
+ (ExprEndCondition.serialVersionUID): Ditto.
+ (BlockEndCondition): Ditto.
+ (checkBlockValidity): Ditto.
+ (BlockEndCondition.serialVersionUID): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/RecursiveSingleLineRule.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/RestrictedEndOfLineRule.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyManager.java (AutotoolsPropertyManager): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsToolsPropertyPage.java (performOK): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/AutotoolsNewCProjectWizardV2.java (doRun): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/CProjectPlatformPage.java (handleConfigurationSelectionChange): Ditto.
+ (CProjectPlatformPage): Ditto.
+ (filterSupportedConfigurations): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/NewAutotoolsCCProjectWizard.java (doRun): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/NewAutotoolsCProjectWizard.java (doRun): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/NewAutotoolsProjectOptionPage.java (ManagedWizardOptionBlock.setupHelpContextIds): Ditto.
+
+2009-05-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Add new Autotools nature for time-being. Specify new builder which is based
+ on MakefileBuilder and specify new project wizard.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder: Move hastTargetBuilder
+ to AutotoolsPlugin.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakeTargetManager: Use AutotoolsPlugin
+ hasTargetBuilder method.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsBuildPropertyPage: Ditto.
+ * src/org/eclipse.linuxtools/cdt/autotools/AutotoolsProjectPropertyTester.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfoProvider.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewMakefileBuilder: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewMakeGenerator: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewProjectNature: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsPlugin.java: Move hasTargetBuilder
+ method here.
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java: Apply fix for stopping
+ build on failure to generate Makefile.
+ * src/org/eclipse/linuxtools/cdt/autotools/Resources.properties: Change message for no
+ makefile generated.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/AutotoolsNewCProjectWizardV2.java: New file.
+
+2009-04-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #249199
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AbstractAutotoolsHandler.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AutoconfHandler.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AutomakeHandler.java: New file.
+ * plugin.properties: Add messages for invoking autotools.
+ * plugin.xml: Change invoke autotools actions from Actions in an ActionSet to instead
+ use org.eclipse.ui.menus, org.eclipse.ui.commands, and org.eclipse.ui.handlers and
+ do not add these actions to project menu if not an Autotools project.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AclocalHandler.java (execute): Implemented.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAclocalAction.java (run): Add check
+ for null container.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoconfAction.java (run): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutomakeAction.java (run): Ditto.
+
+2009-04-21 Jeff Johnston <jjohnstn@redhat.com>
+2009-05-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Add new Autotools nature for time-being. Specify new builder which is based
+ on MakefileBuilder and specify new project wizard.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder: Move hastTargetBuilder
+ to AutotoolsPlugin.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakeTargetManager: Use AutotoolsPlugin
+ hasTargetBuilder method.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsBuildPropertyPage: Ditto.
+ * src/org/eclipse.linuxtools/cdt/autotools/AutotoolsProjectPropertyTester.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfoProvider.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewMakefileBuilder: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewMakeGenerator: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewProjectNature: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsPlugin.java: Move hasTargetBuilder
+ method here.
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java: Apply fix for stopping
+ build on failure to generate Makefile.
+ * src/org/eclipse/linuxtools/cdt/autotools/Resources.properties: Change message for no
+ makefile generated.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/AutotoolsNewCProjectWizardV2.java: New file.
+
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/OpenIncludeAction.java
+ (run): Fix compiler warnings.
+ (getIncludeStatement): Ditto.
+ (chooseFile): Ditto.
+ (.visit): Ditto.
+ (findFile): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileMessages.java
+ (getFormattedString): Fix compiler warnings.
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java
+ (getAutogenArgs): Fix compiler warnings.
+ (runScript): Ditto.
+ (getConfigArgs): Ditto.
+ (MakeTargetComparator): Ditto.
+ (makeArray): Ditto.
+ (runCommand): Ditto.
+ (addMakeTargetsToManager): Ditto plus do not start/stop MakeTargetManager
+ anymore.
+ (saveTargets): New method.
+ (translateDocumenttoCDTProject): Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeMessages.java
+ (getFormattedString): Cast 2nd argument for message fomatting to avoid compile
+ warnings.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/wizards/AutotoolsWizardMessages.java
+ (getFormattedString): Cast 2nd argument for message formatting to avoid compiler
+ warnings.
+ (getFormattedString): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/AutotoolsPluginImages.java
+ (makeIconFileURL): Fix static member reference to avoid compiler warning.
+ 2009-05-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Add new Autotools nature for time-being. Specify new builder which is based
+ on MakefileBuilder and specify new project wizard.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder: Move hastTargetBuilder
+ to AutotoolsPlugin.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakeTargetManager: Use AutotoolsPlugin
+ hasTargetBuilder method.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsBuildPropertyPage: Ditto.
+ * src/org/eclipse.linuxtools/cdt/autotools/AutotoolsProjectPropertyTester.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfoProvider.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewMakefileBuilder: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewMakeGenerator: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsNewProjectNature: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsPlugin.java: Move hasTargetBuilder
+ method here.
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java: Apply fix for stopping
+ build on failure to generate Makefile.
+ * src/org/eclipse/linuxtools/cdt/autotools/Resources.properties: Change message for no
+ makefile generated.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/AutotoolsNewCProjectWizardV2.java: New file.
+ (static initializer): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsPlugin.java
+ (getFormattedString): Cast 2nd argument to avoid compiler warning.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/AbstractEditorPreferencePage.java
+ (validatePositiveNumber): Properly template containers.
+ (getTextFields): Ditto.
+ (initializeFields): Ditto.
+ (updateStatus): Ditto.
+ (getCheckBoxes): Ditto.
+ (getNumberFields): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileCodeScanner.java
+ (createRules): Use templated List.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileCodeScanner.java
+ (createRules): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/AbstractMakefileCodeScanner.java
+ (createTextAttribute): Correctly access static member function.
+ (initializeRules): Use templated List.
+
+2009-04-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Allow org.eclipse.cdt.make.core and org.eclipse.cdt.make.ui version numbers
+ to start pre-6.0.0 and exclude 6.1.0.
+
+2009-04-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Update dependencies to not put upper sealing for version numbers as 6.0.0.
+
+2009-03-31 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Set expected value to true for Autotools property page enablement.
+
+2009-02-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * .settings/org.eclipse.jdt.core.prefs: Specify Java 1.5.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsBuilder.java: Inherit from Builder.
+ (AutotoolsBuilder): Change to take ToolChain parameter and call super constructor.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java (clean): Change
+ to set the Builder for the ToolChain and call different super.build method that does not
+ take new private MyBoolean argument.
+ (build): Ditto.
+ (getTargets): Fix Java 1.5 warnings.
+ (makeArrayList): Ditto.
+
+2009-01-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #261717
+
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/text/hover/AutoconfTextHover.java (getMacroList):
+ Don't bother processing macros if the macro document turns out to be null.
+
+2009-01-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #261257
+
+ * META-INF/MANIFEST.MF: Update plug-in to add .qualifier to id and update
+ to 1.0.2.qualifier.
+ * plugin.xml: Update invoke autotools action set to set visible to true.
+
+2009-01-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java (getConfigArgs): If there
+ are no -- args in the user arguments, still pass them on to configure.
+
+2008-11-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #472731
+
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java (hasTargetBuilder):
+ Add check for ManagedProject being null which is apparently possible.
+
+2008-11-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeDocumentProvider.java: Change
+ Copyright to make Red Hat a contributor to the copyright of the original file modified to make
+ this new class.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeEditor.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/Automakefile.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileCodeScanner.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileContentOutlinePage.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileReconcilingStrategy.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileSourceConfiguration.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeMacroDefinitionRule.java: Ditto.
+
+2008-11-03 Andrew Overholt <overholt@redhat.com>
+
+ * build.properties: Remove libhoverdocs/.
+
+2008-10-31 Andrew Overholt <overholt@redhat.com>
+
+ * META-INF/MANIFEST.MF: Use plugin.properties for provider.
+ * plugin.properties: Add "(Incubation)" to Bundle-Name.
+
+2008-10-28 Andrew Overholt <overholt@redhat.com>
+
+ * META-INF/MANIFEST.MF: Update BREE to J2SE-1.5.
+
+2008-10-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Bump up release to 1.0.1.
+
+2008-10-10 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java (build): Add check for default
+ configuration coming back null from buildinfo.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsBuildPropertyPage.java (performDefaults):
+ Set make -w default to be true.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java (convertProject):
+ Set make -w project property to true and don't turn off indexer.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/NewAutotoolsCCProjectWizard.java (doRun): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/NewAutotoolsCProjectWizard.java (doRun): Ditto.
+
+2008-10-10 Jeff Johnston <jjohnstn@redhat.com>
+
+ Fix for #249416
+
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java: Fix addition of MakeTargets to run faster.
+ (addMakeTargetsToManager): Rewritten to not use MakeTargetManager addTarget or removeTarget methods which
+ cause a rewrite of the .cproject file each time.
+ (isValidTarget): Remove checking MakeTargetManager existing target.
+ (translateDocumentToCDTProject): New method which outputs the MakeTargets to the .cproject file.
+ (MakeTargetComparator): New Comparator for sorting MakeTargets.
+ (createTargetElement): New method.
+ * src/org/eclipse/linuxtools/cdt/autotools/Resources.properties: Add subtask message for refreshing Make Targets
+ which might take some time.
+
+2008-10-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ Fix for #249231
+
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java (getAutogenArgs): Add
+ support to resolve build macros.
+ (getConfigArgs): Ditto.
+ (initializeBuildConfigDirs): Ditto.
+
+2008-10-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ Fix for #249644.
+
+ * plugin.xml: Change visible to true for invoke autotools action set. Also add
+ new popupmenus for running autoconf directly on configure.ac or configure.in.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAclocalAction.java (run): Use
+ getCWD to get the relative current working directory and pass a string to the new
+ TwoInputDialog constructor.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutomakeAction.java (run): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAction.java (getCWD): New method
+ to get the relative CWD for an autotools action.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/TwoInputDialog.java (createDialogArea):
+ Use CLabel instead of Label for first label (the CWD).
+ (TwoInputDialog): Change to accept a String for the first message instead of an IPath.
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java (addMakeTargetsToManager):
+ Temporarily disable.
+
+2008-10-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfo.java (getIncludePaths): Fix bug that
+ was properly resolving relative paths. Also add support for parsing -isystem specifiers and putting
+ the paths on the include path list.
+
+2008-09-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Change Eclipse-AutoStart over to Bundle-ActivationPolicy.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/LibHover.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/LibHoverMessages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/LibHoverMessages.properties: Removed.
+ * plugin.xml: Remove CHelpProvider library hover extension as this functionality
+ has been moved into its own plugin.
+
+2008-09-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileCodeScanner.java (createRules):
+ Specify Token.UNDEFINED for WordRules default token. Otherwise, just getting the first possible
+ character of a word detector will result in default token being returned and no further parsing.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfCodeScanner.java (AutoconfCodeScanner):
+ Ditto.
+
+2008-09-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfoProvider.java (getScannerInformation):
+ Return null if project is not an Autotools project.
+ (unsubscribe): Check scanner info for null before accessing.
+
+2008-09-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ Refactored from com.redhat.eclipse.cdt.autotools to org.eclipse.linuxtools.cdt.autotools
+
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/text/hover/AutoconfTextHover.java:
+ (AUTOCONF_MACROS_DOC_NAME): Change to use default URL pointing to sourceware.org.
+ (AUTOMAKE_MACROS_DOC_NAME): Ditto.
+ (getHoverDoc): Remove unused variable.
+ (getAMDoc): Modify to handle either a file or URL.
+ (getACDoc): Ditto.
+ (.createInformationControl): Switch to use non-deprecated constructor.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/LibHover.java (getLibHoverDocs): Modify to handle
+ either an external file name or URL.
+ (getLibHoverDocName): New method that returns default URL pointing to sourceware.org.
+ (HelpResource.getHref): Change to return URL.
+ (getFunctionInfo): Remove unread variable.
+
+2008-09-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder(hasTargetBuilder): Change logic
+ to look for ProjectType id rather than looking at builder id of configuration since ManagedProject
+ might have had configuration removed. Resolves #461647.
+ * plugin.xml: Fix typo in referenced nature of autoolsNature. Resolves #461201.
+
+2008-08-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Update version number to 1.0.0 and specify minimum/maximum versions
+ for all dependencies now that CDT 5.0 and Eclipse 3.4 must be used.
+
+2008-07-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * icons/ac16/acmacro_arg_obj.gif: New File.
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsEditorPropertyPage.java:
+ (getproject): Remove.
+ * META-INF/MANIFEST.MF: Add org.eclipse.core.filesystem as dependency.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java: Update imports.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/outline/AutoconfLabelProvider.java (getImage):
+ Use special image for acmacro argument.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutoconfEditorPreferencePage.java:
+ Update imports.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/AutotoolsPluginImages.java: Add image for
+ acmacro argument.
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/AutoconfTextHover.java: Update imports.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileReconcilingStrategy.java (reconcile):
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeDocumentProvider.java: Update imports.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileReconcilingStrategy.java (reconcile):
+ Call new form of parse method.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Directive.java:
+ (getMakefile): New required method.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/GNUAutomakefile.java:
+ (parse): New required method.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/AbstractMakefile.java:
+ (getFileURI): New required method.
+ (getMakefile): Ditto.
+ (setFileURI): Ditto.
+ (getMakefileReaderProvider): Ditto.
+ (parse): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/OpenDeclarationAction.java:
+ (openInEditor): Use URI instead of File.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/NullMakefile.java:
+ (parse): New required method to implement.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileDocumentProvider.java (createMakefile):
+ Add throws modifier.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroCodeScanner.java: Update imports.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroContentAssistProcessor.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroDamagerRepairer.java: Ditto.
+
+2008-07-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Bump release to 0.9.7.
+
+2008-04-17 14:12 Ed Swartz <ed.swartz@nokia.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/:
+ internal/ui/editors/autoconf/ProjectionFileUpdater.java,
+ ui/editors/AutoconfCodeScanner.java,
+ ui/editors/AutoconfPKGWordDetector.java,
+ ui/editors/outline/AutoconfLabelProvider.java: Collapse and
+ decorate long macro arguments, and notice PKG_ macros
+
+2008-04-17 13:13 Ed Swartz <ed.swartz@nokia.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/:
+ internal/ui/editors/autoconf/ProjectionFileUpdater.java,
+ ui/editors/AutoconfEditorMacroValidator.java,
+ ui/editors/parser/AutoconfElement.java,
+ ui/editors/parser/AutoconfParser.java: Fix editor collapsing and
+ remove line number metadata from AutoconfElement, since the "end
+ line" is only meaningful in the context of the client.
+
+2008-04-17 10:43 Ed Swartz <ed.swartz@nokia.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/:
+ AutoconfEditorMessages.properties,
+ outline/AutoconfContentOutlinePage.java,
+ parser/AutoconfCaseConditionElement.java,
+ parser/AutoconfCaseElement.java, parser/AutoconfElement.java,
+ parser/AutoconfElifElement.java, parser/AutoconfElseElement.java,
+ parser/AutoconfForElement.java, parser/AutoconfIfElement.java,
+ parser/AutoconfMacroDetector.java,
+ parser/AutoconfMacroElement.java,
+ parser/AutoconfOutlineErrorHandler.java,
+ parser/AutoconfParser.java, parser/AutoconfRootElement.java,
+ parser/AutoconfTokenizer.java, parser/AutoconfWhileElement.java,
+ parser/OldAutoconfParser.java, parser/Token.java: More autoconf
+ parser work. Remove old parser and standardize AST node
+ constructors. Add more tests and fix some bugs.
+
+2008-04-10 15:40 Ed Swartz <ed.swartz@nokia.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/:
+ internal/ui/editors/autoconf/ProjectionFileUpdater.java,
+ ui/editors/AutoconfEditor.java,
+ ui/editors/AutoconfEditorMacroValidator.java,
+ ui/editors/AutoconfEditorMessages.properties,
+ ui/editors/AutoconfErrorHandler.java,
+ ui/editors/AutoconfReconcilingStrategy.java,
+ ui/editors/outline/AutoconfLabelProvider.java,
+ ui/editors/parser/AutoconfElement.java,
+ ui/editors/parser/AutoconfMacroArgumentElement.java,
+ ui/editors/parser/AutoconfMacroElement.java,
+ ui/editors/parser/AutoconfParser.java,
+ ui/editors/parser/AutoconfParser2.java,
+ ui/editors/parser/AutoconfSelectElement.java,
+ ui/editors/parser/AutoconfTokenizer.java,
+ ui/editors/parser/AutoconfUntilElement.java,
+ ui/editors/parser/AutoconfWhileElement.java,
+ ui/editors/parser/ITokenConstants.java,
+ ui/editors/parser/OldAutoconfParser.java,
+ ui/editors/parser/ParseException.java: More autoconf parser work.
+
+2008-04-09 14:38 Ed Swartz <ed.swartz@nokia.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/:
+ AutoconfEditorMacroValidator.java,
+ AutoconfEditorMessages.properties, AutoconfErrorHandler.java,
+ parser/AutoconfCaseConditionElement.java,
+ parser/AutoconfElement.java,
+ parser/AutoconfMacroArgumentElement.java,
+ parser/AutoconfMacroDetector.java, parser/AutoconfParser.java,
+ parser/AutoconfParser2.java, parser/AutoconfTokenizer.java,
+ parser/IAutoconfErrorHandler.java,
+ parser/IAutoconfMacroDetector.java, parser/IMacroDetector.java,
+ parser/ITokenConstants.java, parser/Token.java: New autoconf
+ parser work in progress
+
+2008-04-07 14:06 Ed Swartz <ed.swartz@nokia.com>
+
+ * META-INF/MANIFEST.MF,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditorMacroValidator.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfErrorHandler.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroPartitionRule.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroWordDetector.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfReconcilingStrategy.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/ParseException.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/outline/AutoconfLabelProvider.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfElement.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfMacroArgumentElement.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfMacroElement.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfOutlineErrorHandler.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfParser.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/IAutoconfErrorHandler.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/IAutoconfMacroValidator.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/ParseException.java:
+ Initial checkpoint for autotools parser changes
+
+
+2008-01-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/actions/AclocalHandler.java: New file for
+ future menu support.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsProjectNature.java: New file.
+ * META-INF/MANIFEST.MF: Release updated.
+ * plugin.properties: Add some new messages for autotools tool invocation.
+ * plugin.xml: Update release to 0.9.6. Add autotools project nature. Make
+ autotools commands enablement dependent on autotools project nature.
+ Specify enablesFor 1 for all autotools tool actions.
+ * src/com/redhat/eclipse/cdt/autotools/actions/AbstractTargetAction.java (setSelectedContainer): New
+ method for future menu support.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java (hasTargetBuilder): Use
+ AutotoolsProjectNature static addAutotoolsBuilder method.
+ (addAutotoolsBuilder): Moved to AutotoolsProjectNature.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (runScript): New method to
+ run scripts.
+ (regenerateMakefiles): Use runScript method to run configuration scripts. Use
+ runCommand for executables like "make".
+ (runCommand): Added comments.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java (convertProject):
+ Add new autotools project nature.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/NewAutotoolsCCProjectWizard.java (addNature):
+ Ditto plus set up autotools builder.
+ (doRun): Don't set up autotools builder since it is done in addNature.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/NewAutotoolsCProjectWizard.java (addNature):
+ Add new autotools project nature and set up autotools builder.
+ (doRun): Don't set up autotools builder since it is done in addNature.
+
+2007-12-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Update release to 0.9.5.3.
+
+2007-12-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #412651, #412661
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (getConfigurePath): Fetch tool command
+ name instead of hard-wiring to "configure".
+ (autogenExists): Fetch command name from autogen.sh options.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java: (removeBuildDir): New method.
+ (clean): If user has specified remove build directory, then use removeBuildDir method.
+ * src/com/redhat/eclipse/cdt/autotools/Resources.properties: New messages for supporting
+ build directory removal operation.
+
+2007-11-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/LibHoverMessages.java: New File.
+ * src/com/redhat/eclipse/cdt/autotools/ui/LibHoverMessages.properties: New File.
+ * src/com/redhat/eclipse/cdt/autotools/ui/LibHover.java: Add references to
+ LibHoverMessages instead of hard-coded strings.
+ * libhoverdocs/glibc-2.7-2.xml: Regenerated.
+
+2007-11-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/LibHover.java
+ (HelpResource.getHref): Use latest glibc doc version.
+ (getLibHoverDocs): Ditto.
+ * libhoverdocs/glibc-2.7-2.xml: New C library docs based on glibc-2.7-2 manual.
+ * libhoverdocs/glibc.xml: Old glibc docs removed.
+
+2007-11-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Update release to 0.9.5.2. Also clear all OS lists for build definitions to
+ default to "all" OSes.
+
+2007-11-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #385991
+ * src/com/redhat/eclipse/cdt/autotools/ui/LibHover.java (getMatchingFunctions): New method.
+ (FunctionSummary.compareTo): New method to support Comparable interface.
+ (FunctionSummary.getIncludes): Fix to avoid type cast exception/
+ (getFunctionInfo): Revised to call getFunctionSummaryFromNode method.
+ (FunctionSummary): Add Comparable interface.
+ (getFunctionSummaryFromNode): New method.
+ (FunctionSummary.FunctionPrototypeSummary.getPrototypeString): Add NLS
+ comments.
+
+
+2007-11-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsToolsPropertyPage.java: New File for
+ setting tool paths for the various autotools.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAclocalAction.java (run): Use the
+ project properties setting to determine what tools to use.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAutoconfAction.java (run): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAutomakeAction.java (run): Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsPropertyMessages.properties: New
+ messages.
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsPropertyConstants.java: Add new
+ constants for setting the tool paths for aclocal, automake, and autoconf.
+ * plugin.xml: Add tools settings property page for Autotools.
+ * plugin.properties: New message for added property page.
+
+2007-10-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #359311, #359301, #359321
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacro.java: New File.
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsPropertyManager.java: New File.
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/IProjectPropertyListener.java: New File.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsProjectPropertyTester.java: New File.
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/IPropertyChangeManager.java: New File.
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/AutoconfTextHover.java:
+ (getAMDoc): New method.
+ (fBindingService):
+ (getAutomakeMacrosDocName): Modified to take a version parameter.
+ (getAutoconfMacrosDocName): Ditto.
+ (getPrototype): Changed to take an editor input.
+ (getAutoconfMacrosDocName): Ditto.
+ (AutotoolsHoverDoc): New internal class.
+ (getMacroList): New method to merge AC and AM macros together based on version
+ properties.
+ (getACDoc): New method.
+ (getIndexedInfo): Changed to take editor input.
+ (getHoverDoc): New metohd.
+ (getIndexedInfoFromDocument): New method that will parse the given document.
+ (getDefaultAutoconfMacrosDocName): New method to get the default preference
+ Autoconf macros doc name.
+ (getHoverRegion): Modified to get editor from elsewhere.
+ (getDefaultAutomakeMacrosDocName): New method to get the default preference
+ Autoconf AM macros doc name.
+ (getHoverInfo): Changed to take an editor input.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroParser.java: Removed.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/editors/autoconf/ProjectionFileUpdater.java (initialize):
+ (processReconcile): Use stored editor.
+ (install): Change input parameter to AutoconfEditor.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfParser.java (parseMacro):
+ (parse): Modified to take IEditorInput argument and pass that on to AutoconfErrorHandler.
+ (AutoconfParser): Modified to take an editor parameter.
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsDefaultBuildDirHandler.java: Updated
+ copyright to just Red Hat Inc.
+ * plugin.properties: New messages.
+ * plugin.xml: Add ICPropertyTab extension for editor properties. Add properties
+ page for Autotools properties.
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsEditorPropertyPage.java: New file.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsPropertyPage.java: Rewritten.
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsBuildPropertyPage.java:
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsPropertyConstants.java:
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfErrorHandler.java (AutoconfErrorHandler):
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java
+ (AutoconfSourceViewerConfiguration): Take editor as parameter.
+ (getPresentationReconciler): Pass along or use editor passed in.
+ (getContentAssistant): Ditto.
+ (getReconciler): Ditto.
+ (getTextHover): Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java (connect):
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroDamagerRepairer.java:
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroContentAssistProcessor.java (computeCompletionProposals):
+ (AutoconfMacroContentAssistProcessor): Take editor input.
+ (computeMacroStart): Use editor.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfReconcilingStrategy.java (reconcile):
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java: Make this implement
+ IProjectPropertyListener
+ (handlePreferenceStoreChanged): Modified to call handleVersionChange method if a
+ autoconf or automake macro version preference change has occurred.
+ (doSetInput): Deregister editor as property listener if editor was for a project
+ file previously and register editor as property listener if editor is now for a
+ project.
+ (getAutoconfDocumentProvider): Make static.
+ (getAutoconfCodeScanner): Pass this to constructor.
+ (handleVersionChange): New method.
+ (handleProjectPropertyChanged): New IProjectPropertyListener method.
+ (initializeEditor): Pass this to source viewer configuration constructor.
+ (getAutoconfParser): Pass this to constructor.
+ (dispose): Deregister editor as property listener for a project if applicable.
+ (getAutoconfMacroCodeScanner): Pass this to constructor.
+
+2007-10-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroCodeScanner.java: New File.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/RestrictedEndOfLineRule.java: New File.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfPartitionScanner.java (AutoconfPartitionScanner):
+ Move macro partitioning ahead of comments.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java (getPresentationReconciler):
+ Use AutoconfMacroCodeScanner for macro damager repairer.
+ (getContentAssistant): Use AutoconfMacroCodeScanner for macro content assist.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfCodeScanner.java (nextToken):
+ New method that simply defaults to super.nextToken to be used for debugging purposes.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java (getAutoconfMacroCodeScanner):
+
+ * plugin.xml: Update to release 0.9.5.1.
+
+2007-10-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #330701
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsBuildPropertyPage.java: New File to
+ add property settings for how to clean an Autotools project and whether or not to use the
+ current Autotools info scanner.
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsPropertyMessages.java: New File.
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsPropertyConstants.java: New File.
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsPropertyMessages.properties: New File.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfParser.java (parseLines):
+ Process macros ahead of stripping out comments as this prevents removing quotes inside the
+ macro which have precedence over # (e.g. used to specify #include and not meaning a
+ comment to end of line).
+ (parseWhile): Change comment typo.
+ (parseFor): Ditto.
+ * plugin.properties: Add new messages regarding property pages.
+ * plugin.xml: Add Autotools build IcPropertyTab (AutotoolsBuildPropertyPage). Also
+ specify that AutotoolsDefaultBuildDirHandler is also an option applicability tester.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutotoolsPreferencesMessages.properties:
+ Change the message for autoconf and automake versions to include the word "Default".
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfPartitioner.java (computePartitioning):
+ Add override method as way to print out partitions. Cannot compute and print out partitions at
+ connect time as in 4.0.1 we initially are given an empty document that is later filled.
+ (printPartitions): Change argument to be an array of partition regions.
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java (build):
+ (clean): New method. Pay attention to user clean method preference.
+ (getTargets): Pay attention to user clean target preference.
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfo.java (getCompilationString):
+ Pay attention to user preference on scanner info retrieval and disable if need be.
+ (createIncludeChain): Use AutotoolsPropertyConstants to get property names to use.
+ (followIncludeChain): Ditto.
+ (getMakefile): Add nls comments.
+ (AutotoolsScannerInfo): Ditto.
+ (getDefinedSymbols): Ditto.
+ (buildFile): Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (regenerateMakefiles): Don't
+ call AutotoolsScannerInfoProvider.setDirty method anymore. Instead, set a project property
+ to indicate the scanner info is dirty.
+ (addMakeTargetsToManager): Add a try/catch statement to prevent duplicate entries from
+ stopping loop that adds make targets.
+ (initializeBuildConfigDirs): Formatting change.
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfoProvider.java (getScannerInformation):
+ Add a check for project property indicating the scanner info is dirty in which case call
+ setDirty method.
+ (setDirty): Make private.
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsDefaultBuildDirHandler.java: Now implements
+ IOptionApplicability.
+ (isOptionEnabled): New interface method to implement.
+ (isOptionVisible): Ditto.
+ (isOptionUsedInCommandLine): Ditto (set to false).
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsBuilder.java (getProject): New method.
+ (AutotoolsBuilder): Add project argument.
+ (getCleanBuildTarget): Implemented using new Autotools CLEAN_MAKE_TARGET property.
+
+ * src/com/redhat/eclipse/cdt/autotools/Resources.properties: Add new message.
+
+2007-10-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #323641
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfo.java (getDefinedSymbols): Use
+ the patch provided by Jose Fonseca to provide a proper regular expression for parsing
+ the defined symbols from the make output.
+
+2007-10-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Ensure the ids for InvokeAutoconf and InvokeAutomake actions are unique.
+
+2007-10-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsDefaultBuildDirHandler.java (handleValue):
+ Add some place holders for supporting the user manually setting the build directory.
+ * src/com/redhat/eclipse/cdt/autotools/Resources.properties: Add some dialog messages for
+ future usage.
+ * plugin.xml: Update version to 0.9.5.
+
+2007-10-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #315811
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsDefaultBuildDirHandler.java: New File.
+ * plugin.xml: Change build definition to version 4.0.0. Remove unused project converter
+ extension. For build directory, specify an option handler which is implemented by
+ AutotoolsDefaultBuildDirHandler.
+
+2007-09-24 Andrew Overholt <overholt@redhat.com>
+
+ * plugin.xml: Update version to 0.9.4.
+
+2007-09-21 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAutoconfAction.java (run):
+ Fix array indexing.
+
+2007-09-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Add ELF and GNU_ELF binary parsers as default for an Autotools project.
+
+2007-09-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #274551
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfo.java (getCompilationString): Support
+ the case where the file isn't part of the build and there is no scanner info to gather.
+ (buildFile): Minor cosmetic changes.
+
+ * META-INF/MANIFEST.MF: Update release.
+
+2007-09-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (regenerateMakefiles): Add a
+ clause to check for the case whereby there was no way to generate the Makefile and one
+ didn't already exist.
+ * src/com/redhat/eclipse/cdt/autotools/Resources.properties (Makegenerator.didnt.generate):
+ New message.
+
+2007-08-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #254248
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/outline/AutoconfContentOutlinePage.java (selectionChanged):
+ Make call to editor.selectAndReveal method to focus editor page on selected outline item.
+
+2007-08-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #254246
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/CWordFinder.java (findWord): Fix
+ to handle being in the first word of the file.
+
+2007-08-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #253331
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java (build): Enable
+ autobuilding.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (regenerateMakefiles): If
+ the configuration options change, clean the previous build directory so a full rebuild
+ will occur.
+
+2007-08-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Change release to 0.9.2 and specify minimum java runtime as
+ 1.4.
+
+2007-08-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #251412
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java (addAutotoolsBuilder):
+ When calling IProject.setDescription(), pass a NullProgressMonitor instead of
+ null, despite what the function API says because an isCancelled() call may occur
+ and will result in an exception thrown. Also, use a try/catch block to handle any
+ of the legitimate exceptions that might occur in this operation.
+
+2007-08-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/Resources.properties: Add new messages
+ for new C and C++ project wizards.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/NewAutotoolsProjectWizard.java: Renamed...
+ * src/com/redhat/eclipse/cdt/autotools/wizards/NewAutotoolsCProjectWizard.java: ..to this.
+ (doRun): Rewritten based on conversion wizard to properly set up project.
+ (getProjectType): New method.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/NewAutotoolsCCProjectWizard.java: New file
+ copied from NewAutotoolsCProjectWizard but inherits from NewCCProjectWizard.
+
+ * icons/dlcl16/newc_app.gif: New gif.
+ * icons/dlcl16/newcc_app.gif: Ditto.
+ * icons/elcl16/newc_app.gif: Ditto.
+ * icons/elcl16/newcc_app.gif: Ditto.
+
+ * plugin.properties: Add new strings for new C and C++ project wizards.
+ * plugin.xml: Add new C and C++ project wizards.
+
+2007-08-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #251604
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (getAutogenArgs): New method.
+ (regenerateMakefiles): Pass user-specified autogen.sh options when invoking autogen.sh.
+ * plugin.xml: Add autogen.sh tool support with user options.
+ * plugin.properties: Add new autogen tool message strings.
+
+2007-07-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java
+ (handlePreferenceStoreChanged): Add support for changing automake macros version.
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/AutoconfTextHover.java
+ (getAutomakeMacrosDocument):
+ New method.
+ (getIndexInfo, getPrototype): Create private versions of these that take a document
+ as an input parameter. Change the public static methods to call the private
+ versions with the autoconf macro document and the automake macro document, if
+ the macro isn't found yet.
+ (init): Set up the autoconf macro document and automake macro document.
+ (reinit): Reset both the autoconf and automake macro documents.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutoconfEditorPreferencePage.java
+ (LATEST_VERSION): Replace with LATEST_AC_VERSION and LATEST_AM_VERSION.
+ (createOverlayStore): Add automake version setting.
+ (initializeVersion): Replace with initializeACVersion and initializeAMVersion.
+ (initialize): Call the two replacements of initializeVersion.
+ (createVersionTabContent): Add automake version support.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutotoolsEditorPreferenceConstants.java
+ Add automake version support.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutotoolsPreferencesMessages.properties:
+ Add messages used in automake version preference.
+
+ * libhoverdocs/ammacros-1.4-p6.xml: New automake macro docs for 1.4-p6.
+ * libhoverdocs/ammacros-1.9.5.xml: New automake macro docs for 1.9.5.
+ * libhoverdocs/ammacros-1.9.6.xml: New automake macro docs for 1.9.6.
+
+2007-07-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * MANIFEST.MF: Bump up release to 0.9.1.
+
+2007-07-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/GNUAutomakefile.java
+ (parse): Fix Automake if/else constructs to be child/parent directives as appropriate.
+ (bypassIf, bypassElse, isTrue): Removed.
+ (parseIf): Add rules parameter.
+ (addDirective): Remove caveat when dealing with automake if/else.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/IAutomakeConditional.java
+ (getRules, setRules): New methods for the interface.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Else.java: Add ICommand
+ interface and implement required methods including new ones add to IAutomakeConditional.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/If.java: Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeErrorHandler.java
+ (update): Change to call checkChildren for makefile.
+ (checkChildren): New recursive method to check for bad directives.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileContentOutlinePage.java
+ (AutomakefileLabelProvider.getImage): Add support for IAutomakeConditional elements and
+ remove reference to AutomakeIfElse class.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeMacroDefinitionRule.java
+ (isValidCharacter): Add support for "+-$()@" chars.
+
+2007-07-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/GNUAutomakefile.java
+ (parseIf): Add @if support.
+ (isTrue): Default to true for if conditions.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/GNUMakefileConstants.java:
+ Add @if and @endif macros.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/GNUMakefileUtil.java
+ (isIf): Add @if support.
+ (isEndif): Add @endif support.
+
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileCodeScanner.java:
+ Add support for @if and @endif keywords.
+ (createRules): Add support for whitespace and simple identifiers.
+
+2007-07-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #247518
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileCodeScanner.java
+ (createRules): Use new AutoconfSubstRule class for identifying autoconf substituitions.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileUtil.java (isConfigMacro):
+ Refine so that macro must start and end with @ and contain at least one valid char.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutoconfSubstRule.java: New file.
+
+2007-07-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #246153
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeDocumentProvider.java (createFileInfo):
+ Rewrite to handle workspace files as well as external ones.
+ (createMakefile): Change to accept a file name rather than an IFile.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor
+ (getDefault): New method.
+ (doSetInput): Ditto.
+ (initializeEditor): Add a few lines that would have been performed by
+ base class initializeEditor.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeErrorHandler
+ (AutomakeMarker): New internal class for error marking.
+ (update): Switch to using internal markers and directly updating the
+ Annotation model.
+ (removeExistingMarkers): Directly reference the annotation model.
+ (AutomakeErrorHandler): Fetch and store the annotation model for the input.
+ Change prototype.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileReconcilingStrategy.java
+ (AutomakefileReconcilingStrategy): Change to store an IEditorInput. Use new
+ AutomakeErrorHandler interface.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileEditor.java
+ (initializeEditor): Remove fixme comment.
+
+2007-07-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #246783
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java:
+ (initializeEditor): Call AutotoolsEditorPreferenceConstants.initializeDefaultValues
+ to ensure the editor default values are set.
+
+2007-06-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #246154
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsBuilder.java: New proxy
+ class to wrap an existing IBuilder and override build path functionality.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java:
+ (build): Wrap the builder using the new AutotoolsBuilder class so the
+ build path will work properly.
+
+2007-06-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #246134
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfErrorHandler.java:
+ (AutoconfErrorHandler): Change constructor to just take IDocument input.
+ (AutoconfMarker): New private class for marking autoconf document.
+ (createMarker): New private method to create AutoconfMarker in document.
+ (handleError): Create a marker and add it to annotation model durectly
+ instead of using MarkerUtilities.
+ (removeAllMarkers): Remove directly from annotation model instead of using file.
+ (removeExistingMarkers): Ditto.
+ (getDocument): New method.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java:
+ (connect): Change constructor call to AutoconfErrorHandler.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java:
+ (getViewer): New method to return the source viewer for the editor.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroParser.java:
+ (AutoconfMacroParser): Change constructor call to AutoconfErrorHandler.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfParser.java:
+ Change all uses of AutoconfOutlineErrorHandler to AutoconfErrorHandler.
+
+2007-06-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #245820
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileUtil.java (isAutomakeCommand):
+ New method.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Conditional.java (isIf): New
+ method.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/IAutomakeConditional.java:
+ New interface.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Else.java: Changed to
+ implement new IAutomakeConditional interface.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/If.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/GNUAutomakefile.java
+ (parse): Add Automake if/else parsing and support for Makefile.in processed if/else blocks.
+ (bypassIf, bypassElse, parseIf): New private methods.
+ (addDirective): Don't add directives to an Automake if or else construct.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/GNUMakefileConstants.java:
+ Add CONDITIONAL_IF constant.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/GNUMakefileUtil.java
+ (isIf): New method.
+
+2007-06-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileEditorTogglePresentationAction.java:
+ New file.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileEditorActionContributor.java: Ditto.
+
+ * icons/etool16/alphab_sort_co.gif: New icon.
+ * icons/etool16/build_menu.gif: Ditto.
+ * icons/etool16/convert_normal.gif: Ditto.
+ * icons/etool16/make.gif: Ditto.
+ * icons/etool16/makefile.gif: Ditto.
+ * icons/etool16/newc_app.gif: Ditto.
+ * icons/etool16/newcc_app.gif: Ditto.
+ * icons/etool16/segment_edit.gif: Ditto.
+ * icons/etool16/target_add.gif: Ditto.
+ * icons/etool16/target_build.gif: Ditto.
+ * icons/etool16/target_delete.gif: Ditto.
+ * icons/etool16/target_edit.gif: Ditto.
+ * icons/etool16/target_filter.gif: Ditto.
+ * icons/etool16/update_old.gif: Ditto.
+
+ * plugin.xml: Change Automake editor to use new internal MakefileEditorActionContributor
+ class rather than point to the internal one in internal CDT make.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentSetupParticipant.java:
+ (setup): Don't bother registering this as document listener.
+ (documentAboutToBeChanged): Remove body of method as this is no longer needed.
+
+2007-06-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #245611
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroContentAssistProcessor.java
+ (getMacroList): Change to call AutoconfTextHover to get the name of the macros
+ document since it will depend on current preferences.
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/AutoconfTextHover.java
+ (getAutoconfMacrosDocName): New static method.
+
+2007-06-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libhoverdocs/acmacros-2.59.xml: New autoconf hover text and syntax info
+ for autoconf 2.59.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutoconfEditorPreferencePage.java:
+ Add 2.59 support.
+
+2007-06-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libhoverdocs/acmacros-2.13.xml: New autoconf hover text and syntax info
+ for autoconf 2.13.
+ * libhoverdocs/acmacros-2.61.xml: New autoconf hover text and syntax info
+ for autoconf 2.61.
+ * libhoverdocs/acmacros.xml: Replaced with files above.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover (init): Change document
+ to be dependent on autoconf version preference.
+ (reinit): New method to force reinitialization of help document.
+ (getPrototype): Fix to allow for earlier versions which specify multiple
+ prototypes in one using "[,", for example.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutoconfEditorPreferencePage.java:
+ Add version preference support.
+ (createOverlayStore): Add version support.
+ (createContents): Add version tab.
+ (initializeVersion): New method.
+ (createVersionTabContents): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutotoolsEditorPreferenceConstants.java:
+ Add AUTOCONF_VERSION and initialize the default autoconf version value to be the
+ highest possible.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutotoolsPreferencesMessages.properties:
+ Add new messages pertaining to autoconf version.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java (handlePreferenceStoreChanged):
+ If the autoconf version is changed, invalidate the document and force a reparse.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditorMessages.java (getFormattedString):
+ Add new method which takes 3 replacement strings.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditorMessages.properties:
+ Change macro error messages to take the autoconf version as a parameter.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfParser.java: Fix
+ typo for too many args message id.
+ (parseMacro): For wrong number of argument messages, get the current autoconf version preference
+ and pass it in to the message.
+
+2007-06-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/Automakefile.java: Rebase on
+ GNUAutomakefile class. Remove all parsing methods.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeDocumentProvider.java: Fix
+ comments to refer to internal Autotools classes as appropriate.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Conditional.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/DefineVariable.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/DeleteOnErrorRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Else.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Endef.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Endif.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/ExportAllVariablesRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/ExternalEditorInput.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/GNUAutomakefile.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/GNUTargetRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/GNUVariableDef.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Ifdef.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Ifeq.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Ifndef.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Ifneq.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Include.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/IntermediateRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/LowResolutionTimeRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/NotParallelRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/OverrideDefine.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/OverrideVariable.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/PhonyRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/SecondaryRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/StaticTargetRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/TargetVariable.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Terminal.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/UnExport.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/VPath.java: Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/ExternalEditorInput.java: Update comments
+ that should refer to internal Autotools classes.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/MakefileDocumentProvider.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/ProjectionMakefileUpdater.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/WorkingCopyManager.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/editors/autoconf/ProjectionFileUpdater.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutoconfEditorPreferencePage.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutomakeEditorPreferencePage.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java: Ditto.
+
+2007-06-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #243184
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeConfigMacro.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/Automakefile.java (parse): Add
+ support for autoconf macros.
+ (parseConfigMacro): New method.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileCodeScanner.java
+ (createRules): Add rule for configure macros.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileContentOutlinePage.java
+ (getImage): Add support for AutomakeConfigMacro.
+ (getText): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileUtil.java (isConfigMacro):
+ New method.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/MakeUIImages.java: Add acmacro_obj image.
+ * icons/obj16/acmacro_obj.gif: New icon.
+
+2007-06-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/actions/BuildSpecial.java: Removed. No
+ longer used now that MakeTargets work.
+ * src/com/redhat/eclipse/cdt/autotools/actions/CheckboxTablePart.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/MakeContentProvider.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/MakeTargetDialog.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/SharedPart.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/SharedPartWithButtons.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/StructuredViewerPart.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/TargetListViewerPart.java: Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/editors/autoconf/ProjectionFileUpdater.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutotoolsEditorPreferenceConstants.java:
+ Add new constants for Autoconf editor folding.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/IAutotoolsEditor.java: New interface.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java: Make class
+ implement IAutotoolsEditor interface. This allows ProjectionFileUpdater class to
+ work. Add folding support based on MakefileEditor class.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfElement.java
+ (getStartOffset, setStartOffset, getEndLineNumber, setEndLineNumber): New methods.
+ (getEndOffset, setEndOffset, getLastChild): Ditto.
+ (AutoconfElement): New constructor which takes start offset.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfCaseElement.java:
+ Add new constructor to match that of AutoconfElement.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfElifElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfElseElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfForElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfIfElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfMacroElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfWhileElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfParser.java:
+ (AutoconfLineReader): New internal class to replace LineNumberReader class. Change
+ all internal parse routines to use this class instead of LineNumberReader.
+ (parseLines): When a semicolon is found that denotes a multistatement line, update the end
+ offset of the previous construct and set the start offset for the next construct to be after
+ the semicolon and additional whitespace.
+ (parseMacro, parseIf, parseElif, parseElse, parseCase, parseFor, parseWhile): Construct with
+ start offset based on previous mark. After processing, set the end line number for the
+ element.
+
+2007-06-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java:
+ Refactor AutomakeEditorPreferenceConstants to AutotoolsEditorPreferenceConstants.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/ColorManager.java: Moved from here to..
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/ColorManager.java: ...here
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditorFactory.java:
+ Changed due to movement of ColorManager class.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileCodeScanner.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/AbstractMakefileCodeScanner.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileCodeScanner.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileSourceConfiguration.java: Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AbstractAutomakeEditorPreferencePaga.java:
+ Refactored to be...
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AbstractEditorPreferencePage.java:
+ ...this.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutoconfEditorPreferencePage.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutomakeEditorPreferenceConstants.java:
+ Refactored to be...
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutotoolsEditorPreferenceConstants.java:
+ ...this.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutomakePreferencesMessages.java:
+ Refactored to be...
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutotoolsPreferencesMessages.java:
+ ...this.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutomakePreferencesMessages.properties:
+ Refactored to be...
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutotoolsPreferencesMessages.properties:
+ ...this.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutomakeEditorPreferencePage.java:
+ Use new refactored classes.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfCodeScanner.java: Add color preference
+ support.
+ (AutoconfCodeScanner): A color provider is no longer needed as input.
+ (getToken, getTokenProperties, addToken, indexOf, affectsBehavior): New methods.
+ (adaptToPreferenceChange, adaptToColorChange, adaptToStyleChange); Ditto.
+ (createTextAttribute, initialize): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfColorProvider.java: Removed and replaced
+ with ColorManager.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java: Change to use
+ ColorManager.
+ (initializeEditor): Set the preference change store and initialize the editor preferences.
+ (getAutoconfCodeScanner): Changed to match new AutoconfCodeScanner constructor.
+ (getPreferenceColor): New method.
+ (getColorProvider): Removed.
+ (handlePreferenceStoreChanged): New method.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java:
+ Inherit from TextSourceViewerConfiguration. Store the preference store.
+ * plugin.properties: Add new internationalized string for Autoconf editor preferences.
+ * plugin.xml: Add Autoconf editor preference page.
+
+2007-05-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #241908
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (addMakeTargetsToManager):
+ Change builder id used to one used in plugin.xml.
+
+2007-05-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #241782
+ * src/com/redhat/eclipse/cdt/autotools/Resources.properties: Add new message
+ for Autotools preference page.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java
+ (initializeEditor): Initialize color and folding preference defaults.
+ (handlePreferenceStoreChanges): Call super method to refresh editor.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/ColorManager.java:
+ Change constants to be in Autotools domain.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AbstractAutomakeEditorPreferencePage.java:
+ New file.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutomakeEditorPreferenceConstants.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutomakeEditorPreferencePage.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutomakePreferencesMessages.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutomakePreferencesMessages.properties:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutotoolsPreferencePage.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/ColorEditor.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/OverlayPreferenceStore.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/StatusInfo.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/TabFolderLayout.java: Ditto.
+
+ * plugin.properties: Add new internationalized strings from plugin.xml.
+ * plugin.xml: Add Autotools and Automake Editor preference pages. Also
+ clean up some extensions to use internationalized strings.
+
+2007-05-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #241612
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsPlugin.java:
+ Add utility methods from MakeUIPlugin to log messages and
+ issue error dialogs, etc..
+ * src/com/redhat/eclipse/cdt/autotools/actions/MakeTargetDialog.java:
+ Use MakeUIMessages instead of MakeUIPlugin for messages.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeCompletionProcessor.java:
+ Replace internal CDT classes with internal Autotools classes.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeDocumentProvider.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditorFactory.java:
+ Ditto.
+ (getPreferenceColor): New method.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeErrorHandler.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/Automakefile.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileCodeScanner.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileContentOutlinePage.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileReconcilingStrategy.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileSourceConfiguration.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeIfElse.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeMacroDefinitionRule.java:
+ Ditto.
+ (evaluate): Remove unused local variable ch.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeTextHover.java: Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/AbstractElementListSelectionDialog.java:
+ New file transported from CDT internals.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/AbstractMakefile.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/AbstractMakefileCodeScanner.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/AddBuildTargetAction.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/ArchiveTarget.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/BadDirective.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/ColorManager.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Command.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Comment.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/CompletionProposalComparator.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/DefaultRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Directive.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/EditorUtility.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/ElementListSelectionDialog.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/EmptyLine.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/ExternalEditorInput.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/ExternalEditorInputFactory: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/GNUMakefileConstants.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/IgnoreRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/IMakefileDocumentProvider.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/IMakefileEditorActionDefinitionIds.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/InferenceRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/IReconcilingParticipant.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/ISelectionValidator.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/ITranslationUnitEditorInput.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/LexicalSortingAction.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MacroDefinition.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MacroDefinitionRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MacroReferenceRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileAnnotationHover.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileCodeScanner.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileCompletionProcessor.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileConstants.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileContentOutlinePage.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileDocumentProvider.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileDocumentSetupParticipant.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileEditor.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileEditorPreferenceConstants.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileMessages.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefilePartitionScanner.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileReader.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileReconcilingStrategy.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakeFileResources.properties: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileSourceConfiguration.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileStorageDocumentProvider.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileTextHover.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileWordDetector.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MessageLine.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/NullMakefile.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/OpenDeclarationAction.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/OpenIncludeAction.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Parent.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/PosixMakefileUtil.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/PosixRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/PreciousRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/ProjectionMakefileUpdater.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Rule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/SccsGetRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/SelectionList.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/SilentRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/SpecialRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/StatusInfo.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/StringMatcher.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/SuffixesRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Target.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/TargetRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/TwoArrayQuickSort.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Util.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/VariableDefinition.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/WordPartDetector.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/WorkingCopyManager.java: Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/AutotoolsPluginImages.java: Switch to
+ use new ac16 icon directory instead of etools16.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ErrorParserBlock.java: Use
+ MakeUIMessages instead of MakeUIPlugin for messages.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/MakeUIImages.java: Use
+ AutotoolsPlugin for error dialogs. Add new images.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/MakeUIMessages.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/MakeUIPlugin.java: Removed.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/MessageLine.java: Fix typo.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/wizards/AutotoolsWizardMessages.java:
+ Fix bundle id for messages.
+
+ * plugin.xml: Fix icon references.
+
+ * icons/ac16: New folder containing icons that used to be in etool16.
+ * icons/dlcl16/build_configs.gif: New icon.
+ * icons/dlcl16/open_include.gif: Ditto.
+ * icons/elcl16/build_configs.gif: Ditto.
+ * icons/elcl16/open_include.gif: Ditto.
+ * icons/dtool16/alphab_sort_co.gif: Ditto.
+ * icons/dtool16/build_menu.gif: Ditto.
+ * icons/dtool16/convert-normal.gif: Ditto.
+ * icons/dtool16/make.gif: Ditto.
+ * icons/dtool16/makefile.gif: Ditto.
+ * icons/dtool16/newc_app.gif: Ditto.
+ * icons/dtool16/newcc_app.gif: Ditto.
+ * icons/dtool16/segment_edit.gif: Ditto.
+ * icons/dtool16/target_add.gif: Ditto.
+ * icons/dtool16/target_build.gif: Ditto.
+ * icons/dtool16/target_delete.gif: Ditto.
+ * icons/dtool16/target_edit.gif: Ditto.
+ * icons/dtool16/update_old.gif: Ditto.
+ * icons/etool16: Move autoconf editor icons to ac16 folder.
+ * icons/obj16/command_obj.gif: New icon.
+ * icons/obj16/define_obj.gif: Ditto.
+ * icons/obj16/environment_obj.gif: Ditto.
+ * icons/obj16/envvar_obj.gif: Ditto.
+ * icons/obj16/error_obj.gif: Ditto.
+ * icons/obj16/hfolder_obj.gif: Ditto.
+ * icons/obj16/include_obj.gif: Ditto.
+ * icons/obj16/irule_obj.gif: Ditto.
+ * icons/obj16/lib_obj.gif: Ditto.
+ * icons/obj16/macro_obj.gif: Ditto.
+ * icons/obj16/relation_obj.gif: Ditto.
+ * icons/obj16/target_obj.gif: Ditto.
+ * icons/obj16/trule_obj.gif: Ditto.
+
+2007-05-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java:
+ (addMakeTargetsToManager): Use MakeCorePlugin to get an IMakefile
+ rather than use the internal PosixMakefile class directly.
+
+2007-05-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java:
+ (initialize): Store the configuration for later usage.
+ (getConfigSettingsPath): Use stored configuration instead of fetching
+ it each time.
+ (runCommand): Ditto.
+ (addMakeTargetsToManager): Use the real MakeTargetManager to store
+ targets. Mark targets added by parsing the Makefile with special
+ tag. Delete all MakeTargets with special tag before adding the
+ new targets.
+ (initializeBuildConfigDirs): Use stored configuration to get the
+ tool options rather than the ManagedBuildInfo.
+ (getConfigArgs): Ditto.
+ (addMakeTargetsToManager):
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java:
+ Inherit from CommonBuilder.
+ (build): Change to fetch make target name from args map and store for
+ later use.
+ (getTargets): Change to get make target from stored make target name.
+
+ * plugin.xml: Remove Build Special Targets menu item as it is no longer
+ needed. Add MakeTargetBuilder extension so we can use MakeTargets.
+
+2007-05-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #239886
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAclocalAction.java (run):
+ Pass the CWD to TwoInputDialog and use it when executing the command. On
+ success, show a success dialog.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAutoconfAction.java (run):
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/TwoInputDialog.java (TwoInputDialog):
+ Take the CWD as a parameter.
+ (createDialogArea): Add label with CWD.
+
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAutomakeAction.java (run):
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeMessages.java (getString):
+ Add comments.
+ (getFormattedString): New method.
+
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAction.java (getExecDir):
+ New method to return the CWD.
+ (showSuccess): New method to display a success dialog.
+
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeMessages.properties: Add new
+ messages.
+
+2007-05-10 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #238173
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfIdentifierRule.java (evaluate):
+ Cast read character to char before invoking Character methods to avoid gcj bug.
+
+2007-04-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #238493
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/RecursiveSingleLineRule.java (evaluate):
+ Add check for scanner column < 0 which means we are already at EOF.
+
+2007-04-25 jjohnstn <jjohnstn@toocool.toronto.redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/wizards/NewAutotoolsProjectOptionPage.java (ManagedWizardOptionBlock.setupHelpContextIds):
+ Switch to use CDTHelpContextIds for static help context id.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/CProjectPlatformPage.java (createControl):
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/wizards/ManagedProjectOptionBlock.java (createContents):
+ Ditto.
+
+2007-04-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ Bugzilla #182821
+
+ 2007-04-25 Mikhail Sennikovsky
+ * plugin.xml: Add plugin extensions which let the CDT know that includes and
+ defined symbols are supported for the Autotools tool-chain.
+
+2007-04-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #236304
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (runCommand): Use the
+ job description as a message in the console.
+ (regenerateMakefiles): Fix autogen.sh logic to run configure after invoking
+ autogen.sh if config.status doesn't exist. Make sure console is reused for
+ 2nd step. Change some of the status messages with new ones.
+ (autogenExists): Fix bug where path to autogen.sh wasn't being set on return.
+ * src/com/redhat/eclipse/cdt/autotools/Resources.properties: Add new MakeGenerator messages.
+
+2007-04-11 jjohnstn <jjohnstn@toocool.toronto.redhat.com>
+
+ Bugzilla #236077
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/CWordFinder.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/AutoconfTextHover.java: Replace
+ CDT internal classes with Autotools internal classes.
+ * src/com/redhat/eclipse/cdt/autotools/internal/wizards/ManagedProjectOptionBlock.java (createContents):
+ Replace WorkbenchHelp reference with non-deprecated alternative.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakeTargetManager.java: Fix
+ imports.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (runCommand): Replace
+ deprecated environmental variable method being used.
+ (createFile): Make protected instead of private.
+ (getInvalidDirList): Remove.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java (convertProject):
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsPlugin.java (getWorkingCopyManager):
+ Moved into AutomakeEditorFactory.
+ (getAutomakefileDocumentProvider): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditorFactory.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeCompletionProcessor.java:
+ Change all calls to getWorkingCopyManager and getAutomakefileDocumentProvider to use
+ new AutomakeEditorFactory class.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileContentOutlinePage.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileReconcilingStrategy.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeCompletionProcessor.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditorMessages.java (getResourceBundle):
+ New method.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditorMessages.properties: Add
+ new messages that were formerly fetched internally from CDT.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java: Comment out unused
+ projectSupport.
+ (createActions): Use AutoconfEditorMessages.
+ (InformationDispatchAction.makeAnnotationHoverFocusable): Ditto.
+ (fProjectionModelUpdater): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfAnnotationHover.java (formatMultipleMessages):
+ Use AutoconfEditorMessages instead of CUIMessages.
+ * src/com/redhat/eclipse/cdt/autotools/interenal/ui/ErrorParserBlock.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/CProjectPlatformPage.java (createControl): Remove
+ usage of WorkbenchHelp class which is deprecated.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/NewAutotoolsProjectOptionPage.java (ManagedWizardOptionBlock.setupHelpContextIds):
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java (convertProject):
+ Remove unused code. Switch to use non-deprecated interface for getting
+ indexer.
+
+2007-04-10 jjohnstn <jjohnstn@toocool.toronto.redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/wizards/NewAutotoolsProjectWizard.java:
+ Removed.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/NewAutotoolsProjectOptionPage.java:
+ Use new internal ManagedProjectOptionBlock class.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/CProjectPlatformPage.java:
+ Switch to use new AutotoolsWizardMessages internal class.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java:
+ Fix imports.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizard.java (doRunEpilogue):
+ Switch to new IRunnableWithProgress interface.
+ * src/com/redhat/eclipse/cdt/autotools/internal/wizards/AutotoolsWizardMessages.java:
+ New file to support old wizard code.
+ * src/com/redhat/eclipse/cdt/autotools/internal/wizards/AutotoolsWizardMessages.properties:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/wizards/ConfigurationContentProvider.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/wizards/ConfigurationLabelProvider.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/wizards/ManagedProjectOptionBlock:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/AutotoolsPluginImages.java:
+ Add build_configs.gif for Wizard support.
+ * src/com/redhat/eclipse/cdt/autotools/internal/MarkerGenerator.java (addMarker):
+ New method required by IMarkerGenerator interface.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (getProject):
+ New method.
+ (initializeBuildConfigDirs): Change the default build directory
+ for the configuration's builder.
+ Add support for CDT 4.0 M6.
+ * cdtpatches/*: Removed.
+ * icons/eclcl16: New icon directory.
+ * icons/eclcl16/build_configs.gif: New icon.
+ * plugin.properties: Add new strings used in plugin.xml.
+ * plugin.xml: Add buildType and buildArtefactType extensions. Add
+ toolchain to Autotools project buildDefinitions extension.
+
+2007-04-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #235076
+ * src/com/redhat/eclipse/cdt/autotools/wizards/CProjectPlatformPage.java (CProjectPlatformPage):
+ Add missing NLS comment.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (makefileCvsExists): Use
+ getMakefileCVSPath method.
+ (configureExists): Use getConfigurePath method.
+ (getConfigurePath): New method.
+ (getMakefileCVSPath): New method.
+ (regenerateMakefiles): Use getConfigurePath and getMakefileCVSPath to get the
+ command to use when either of these is found to exist.
+ (autogenExists): Change to protected method.
+
+2007-03-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroDamagerRepairer.java (createPresentation):
+ Comment out macro parsing as this is now done by the reconciler and overall parsing.
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/AutoconfTextHover.java (getPrototype):
+ Fix so it is properly setting minimum and maximum parm counts for a macro.
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/AutoconfPrototype.java (setMaxParms):
+ Fix typo.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfParser.java (matchParentheses):
+ Update logic.
+ (parseMacro): Add error checking for minimum and maximum parameters as well as unmatched
+ parentheses or square-brackets.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfMacroElement.java (setParmCount):
+ New method.
+ (setQuoteDepth): Ditto.
+ (getParmCount): Ditto.
+ (getQuoteDepth): Ditto.
+ (setDepth): Ditto.
+ (getDepth): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditorMessages.properties: Add
+ new error messages for parsing of macros.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/outline/AutoconfContentOutlinePage (update):
+ Use viewer refresh instead of redraw when updating.
+ (updateSelection): New method.
+
+2007-03-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/Makegenerator.java (regenerateMakefiles):
+ Refine algorithm so we don't cause a reconfigure if the configuration settings
+ file doesn't contain the project name. If the configuration arguments are
+ unchanged and the settings file is the old style, rewrite with project
+ name.
+
+2007-03-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #230128
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (saveConfigArgs): Add
+ the project name as first argument saved.
+ (regenerateMakefiles): Read off first argument and verify that it matches the
+ current project name.
+
+2007-03-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #232965
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (runCommand):
+ Change prototype to accept a console and a boolean which when true
+ means to restart the console which may possibly clear the console.
+ (regenerateMakefiles): Change calls to runCommand. For multiple
+ actions (e.g. autogen.sh then configure), opt for the 2nd, 3rd, etc...
+ calls to not clear the console. Don't run config.status unless
+ the top-level Makefile is missing.
+ * src/com/redhat/eclipse/cdt/autotools/Resources.properties: Add new
+ MakeGenerator.unsupportedConfig message.
+
+2007-03-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (regenerateMakefiles):
+ If configuration parameters have changed, mark all Scanner Info as dirty.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfoProvider.java (getCollectionName):
+ Make synchronized to avoid concurrent access of the infoCollection.
+ (getScannerInformation): Ditto.
+ (setDirty): New method.
+
+2007-03-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #230493
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfo.java (getDefinedSymbols):
+ Recalculate each time if compilation string is null.
+ (getIncludePaths): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfoProvider.java (getScannerInformation):
+ Use a map of configurations to keep ScannerInfo seperate per configuration. Use
+ current configuration to fetch scanner info.
+
+2007-02-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Bump up release to 0.0.8.1.
+
+2007-02-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzillas #230253, #205310.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakeTargetManager.java (addTargets):
+ New method to do mass add of MakeTargets for performance improvement.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java:
+ (addMakeTargetsToManager): Use new AutotoolsMakeTargetManager addTargets method.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/NewAutotoolsProjectWizard.java (doRun):
+ Set indexer to NullIndexer before applying options.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java (convertProject):
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizard.java:
+ Add new NULL_INDEXER_ID.
+ * src/com/redhat/eclipse/cdt/autotools/internal/MakeTargetManager.java: Expose
+ projectTargetMap to inheriting classes.
+
+2007-02-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ Fix for Bugzilla 229891.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java (getMakeTargets):
+ Use Make Target info to find the real build target which may have been set by the
+ Build Special Targets action.
+ (build): Set up the IMakeBuildInfo needed to fetch Make Target from.
+
+2007-02-22 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeMessages.properties: Fix a few
+ typos.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentSetupParticipant.java (setup):
+ Use IDocumentExtension3 version of setDocumentParitioner if document is an instance of
+ IDocumentExtension3.
+
+2007-02-22 Andrew Overholt <overholt@redhat.com>
+
+ * icons/automake.gif: New craptacular icon for automake editor.
+ * icons/autoconf.gif: Another manifestation of my poor artistic skills.
+ * plugin.xml: Use new icons.
+
+2007-02-21 Jeff Johnston <jjohnstn@redhat.com>
+
+ Fix for Bugzilla 229893.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java: Switch
+ to superclass TextFileDocumentProvider instead of FileDocumentProvider so as to fix
+ undo support.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentSetupParticipant.java:
+ New file.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditorMessages.properties: Fix typo.
+ * plugin.xml: Add extension for document setup that ties document setup for configuration
+ files to AutoconfDocumentSetupParticipant.
+
+2007-02-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfParser.java (findDelimeter): Ignore
+ escaped character.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfPartitionScanner.java (AutoconfPartitionScanner):
+ Add escape character for # format comment and eat "\#" as character.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfCodeScanner.java (AutoconfCodeScanner):
+ Ditto.
+ * plugin.xml: Update release to 0.0.8.
+
+2007-02-20 Andrew Overholt <overholt@redhat.com>
+
+ Patch from Jordy Potman
+ http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=229352
+
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileSourceConfiguration.java
+ (AutomakefileSourceConfiguration): Update super constructor call to reflect
+ change in CDT 3.1.2.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java
+ (initializeEditor): Likewise.
+
+2007-02-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfElement.java: New class.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfElifElement: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfElseElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfOutlineErrorHandler.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfMacroElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfIfElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfRootElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfWhileElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfCaseElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfForElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfCaseConditionElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfCodeScanner.java (AutoconfCodeScanner):
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfParser.java: New class to
+ do Autoconf file parsing and error marking.
+ Add AutoconfIdentifierRule and InlineDataRule.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java (createDocument):
+ Changed to use new AutoconfErrorHandler interface.
+ (documentAboutToBeChanged): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfErrorHandler.java (removeExistingMarkers):
+ Add verification that file exists.
+ (removeAllExistingMarkers): Ditto.
+ (handleError): Ditto.
+ (getCharOffset): Reformatted.
+ (AutoconfErrorHandler): Change constructor to take an IStorageEditorInput rather than
+ an IFile. This allows external files to be edited without error handling.
+ * src/com/redhat/eclipse/cdt/autotools/editors/AutoconfEditorMessages.properties: New messages
+ added for outline parsing.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfPartitionScanner.java (AutoconfPartitionScanner):
+ Use new AutoconfIdentifierRule.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java (getPresentationReconciler):
+ Change default partition to use MultilineRuleDamagerRepairer.
+ (getReconciler): New method.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroDamagerRepairer.java (createPresentation):
+ Change to use new AutoconfErrorHandler constructor.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroParser.java (AutoconfMacroParser): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java (doSetInput): New.
+ (getInputDocument): Ditto.
+ (getRootElement): Ditto.
+ (getAutoconfParser): Ditto.
+ (getAdapter): Ditto.
+ (InformationProvider): Ditto.
+ (getOutlinePage): Ditto.
+ (setRootElement): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/outline/AutoconfContentOutlinePage.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/outline/AutoconfContentProvider.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/outline/AutoconfLabelProvider.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfIdentifierRule.java: New class to
+ prevent matches of other strings that happen to be inside common identifiers.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/InlineDataRule.java: New class to
+ recognize inline data files.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/MultilineRuleDamagerRepairer.java: New class
+ to handle damage/repair when multiline rules are used.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfReconciliingStrategy.java: New class
+ for delayed document-change parsing.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/AutotoolsPluginImages.java: New class
+ to handle image repository.
+ * icons/etool16/acmacro_obj.gif: New image for Autoconf outline view.
+ * icons/etool16/ammacro_obj.gif: Ditto.
+ * icons/etool16/case_obj.gif: Ditto.
+ * icons/etool16/condition_obj.gif: Ditto.
+ * icons/etool16/elif_obj.gif: Ditto.
+ * icons/etool16/for_obj.gif: Ditto.
+ * icons/etool16/if_obj.gif: Ditto.
+ * icons/etool16/while_obj.gif: Ditto.
+ * plugin.xml: Add new error marker extension for outline view.
+
+2007-02-02 Andrew Overholt <overholt@redhat.com>
+
+ * cdtpatches/README: Fix CVS location of managedbuilder.
+
+2007-02-02 Andrew Overholt <overholt@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeCompletionProcessor.java:
+ New file.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/Automakefile.java (getBuiltins):
+ Add $<, $@, and $?.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileSourceConfiguration.java
+ (getContentAssistant): Make use of AutomakeCompletionProcessor.
+
+2007-01-31 Jeff Johnston <jjohnstn@redhat.com>
+
+ * cdtpatches/cdt.ui.buildconsole.patch: New file that contains the
+ 3.1.1 version of the patch for Bugzilla 153816 which adds multiple
+ build console support to CDT 4.0.
+ * cdtpatches/cdt.ui.patch: Altered to remove any build console patches.
+ * cdtpatches/README: Updated to include the new patch.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/CConfigureConsole.java (CConfigureConsole):
+ Modified to use new CUIPlugin build console manager interface.
+
+2007-01-31 Andrew Overholt <overholt@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeErrorHandler.java: New class.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java: Remove unnecessary import.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeDocumentProvider.java
+ (connect): New method. Update error markers at document load time.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileReconcilingStrategy.java
+ (reconcile): Update error markers.
+ (AutomakefileReconcilingStrategy): Set class-wide variables.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java
+ (getAutomakeErrorHandler): New method.
+
+2007-01-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ Fix for Bugzilla 224644.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java (getMakeTargets):
+ Don't add "clean" for fullbuild anymore. It causes unnecessary extra building to occur.
+ (build): Set a flag that build was called.
+ (clean): Only clean if this method is called directly and via a call to build method.
+ Clean by doing a make clean rather than calling super.clean.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (runCommand): When an
+ error occurs in configure, we want to set the status of the project to "needs rebuild".
+ (getConfigSettingsPath): New method to generate name of config settings file.
+ (saveConfigArgs): Use new getConfigSettingsPath method.
+ (regenerateMakefiles): Ditto, when checking if config options have changed.
+ (autogenExists): Clean up unused variables.
+ (getMakefileName): Return "Makefile" instead of "makefile".
+
+2007-01-22 Andrew Overholt <overholt@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileCodeScanner.java:
+ Update copyright.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeDocumentProvider.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeIfElse.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileReconcilingStrategy.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileUtil.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/Automakefile.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileSourceConfiguration.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java
+ (getAutomakeSourceViewer): New method. Update copyright.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileContentOutlinePage.java:
+ Update copyright.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeTextHover.java
+ (getHoverInfo): Remove debugging println. Update copyright.
+
+2007-01-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ Fix for Bugzilla 214624.
+ * src/com/redhat/eclipse/cdt/autotools/internal/MarkerGenerator.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (runCommand): Add check
+ for return code being 0 or 1 to reveal whether command ran correctly.
+ (regenerateMakefiles): Add boolean checking for runCmd calls and also quit
+ if runCmd fails. For autogen.sh cases, check if configure is run by autogen.sh
+ and don't bother calling configure afterwards if true. Add error checking to
+ ensure a second command is not run if the first fails.
+ (PathVar): New private class.
+ (autogenExists): Fixed to take a path parameter to fill in. It also looks for
+ any file that ends in autogen.sh to handle projects like Gnome.
+ * Resources.properties: Add new messages used by MakeGenerator.
+ * cdtpatches/managedbuilder.core.patch: New patch to cause ManagedMake build
+ to stop if an error occurs generating Makefile.
+ * cdtpatches/README: Add details on how to install new patch.
+
+2007-01-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroParser.java: New code
+ to parse an Autoconf macro.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroDamagerRepairer.java (createPresentation):
+ Use new AutoconfMacroParser.parse method instead of embedding the code. Remove
+ all corresponding parse methods.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java (documentAboutToBeChanged):
+ Add checks for whether we should remove the error markers in an autoconf_macro
+ partition.
+
+2007-01-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * about.html: New EPL license file.
+
+2007-01-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/ParseException.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditorMessages.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfErrorHandler.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/AutoconfPrototype.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfAnnotationHover.java: Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfCodeScanner.java: Add
+ copyright info.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfColorProvider.java: Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java: Ditto.
+ (createDocument): New method.
+ (documentChanged): Ditto.
+ (documentAboutToBeChanged): Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfKeywordDetector.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfM4WordDetector.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroContentAssistProcessor.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroDamagerRepairer.java: Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroPartitionRule.java : Ditto.
+ (matchParentheses): Fix up logic.
+ (evaluate):
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroWordDetector.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfPartitioner.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfPartitionScanner.java: Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java: Ditto.
+ (getPresentationReconciler): Use AutoconfMacroDamagerRepairer for macro partition.
+ (getAnnotationHover): New method.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfWhitespaceDetector.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfWordDetector.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/IAutotoolEditorActionDefinitionIds.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/IAutotoolHelpContextIds.java: Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/RecursiveSingleLineRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/LibHover.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/popup/actions/GetDefinedSymbolsAction.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/popup/actions/GetIncludePathAction.java: Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/AutoconfTextHover.java: Ditto.
+ (getIndexedInfo): New method.
+ (getPrototype): Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/HoverMessages.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeWordDetector.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/BuildSpecial.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAclocalAction.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAction.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAutoconfAction.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAutomakeAction.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeMessages.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/TwoInputDialog.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfoProvider.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfo.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsPlugin.java: Ditto.
+
+2007-01-12 Andrew Overholt <overholt@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeTextHover.java: New class. Hover help provider for automake editor.
+ (getHoverControlCreator): New method. Return null for now.
+ (AutomakeTextHover): New method.
+ (getHoverRegion): New method. Return an IRegion from an offset in the document.
+ (findWord): New method. Return an IRegion of the hover region.
+ (getHoverInfo): New method. Return the hover information for a particular region.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileSourceConfiguration.java (getTextHover): New method.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/Automakefile.java (getDirectiveContainingLine): Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java (getMakefile): Likewise.
+
+2007-01-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java: Revert
+ to version 1.2 prior to 2006-11-27. This reversion is required because the previous
+ fix causes a regression in autoconf partitioning.
+
+2007-01-08 Andrew Overholt <overholt@redhat.com>
+
+ * libhoverdocs/acmacros.xml: Add PKG_* macros from pkgconfig.
+
+2007-01-05 Andrew Overholt <overholt@redhat.com>
+
+ * libhoverdocs/acmacros.xml: Add AM_* macros from automake's Public-macros.html.
+
+2007-01-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (regenerateMakefiles):
+ Add check for Makefile.cvs ahead of configure check. Use resource strings
+ for runCommand descriptions.
+ (makefileCvsExists): New internal method.
+ * src/com/redhat/eclipse/cdt/autotools/Resources.properties: Add new
+ resource strings.
+
+2007-01-02 Andrew Overholt <overholt@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileCodeScanner.java
+ (automaticVariables): New $<, etc. variables.
+ (createRules): Add automatic variables as keywords. Also add @AC_SUBST_VAR@
+ highlighting.
+ (nextToken): New method.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeDocumentProvider.java
+ (getDocument): New method.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeWordDetector.java:
+ New file.
+
+2006-12-15 Andrew Overholt <overholt@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileSourceConfiguration.java
+ (getAutomakeCodeScanner): New method.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java
+ (getAutomakeSourceViewerConfiguration): Likewise.
+ (getAutomakefileDocumentProvider): Likewise
+ (initializeEditor): Set up field variables.
+
+2006-12-12 Andrew Overholt <overholt@redhat.com>
+
+ * META-INF/MANIFEST.MF: Add package visibility for tests.
+ * plugin.xml: Add filename associations for AutomakeEditor.
+
+2006-12-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * MANIFEST.MF: Update release to 0.0.6.
+
+2006-12-11 Kyu Lee <klee@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/actions/TwoInputDialog.java: New class
+ for getting 2 text field inputs.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeMessages.java: New class
+ for NLS strings.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAutomakeAction.java: New
+ class for handling invoke automake.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAutoconfAction.java: New
+ class for handling invoke autoconf.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAction.java: New super
+ class for invoking autotools classes.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAclocalAction.java: New
+ class for handling invoke aclocal.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeMessages.properties:
+ Property file for NLS strings.
+ * plugin.xml: Added menu options for invoking autotools under project menu.
+
+2006-12-11 Andrew Overholt <overholt@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsPlugin.java
+ (getWorkingCopyManager): New method.
+ (getAutomakefileDocumentProvider): Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java
+ (initializeEditor): New method.
+ (getAutomakeOutlinePage): Likewise.
+ (createPartControl): Likewise.
+ (getAdapter): Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeDocumentProvider.java:
+ New file.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeMacroReferenceRule.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeMacroDefinitionRule.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeIfElse.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileUtil.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileSourceConfiguration.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileReconcilingStrategy.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileContentOutlinePage.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/Automakefile.java:
+ Likewise.
+
+2006-12-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizard.java
+ (setCurrentProject): Make protected to allow subclasses to use.
+ * MANIFEST.MF: Export org.eclipse.linuxtools.cdt.autotools.wizards classes to the
+ autotools.tests plug-in.
+
+2006-12-01 Andrew Overholt <overholt@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake: New directory.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java: New
+ file. Simple extension of MakefileEditor for now.
+ * plugin.xml: Add automake editor.
+
+2006-11-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Add .m4 file support to the Autoconf editor.
+
+2006-11-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java
+ (performRevert): Method copied from CDT and JDT editors.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java:
+ Change base class to be TextFileDocumentProvider. This means no longer providing
+ a createDocument() method.
+ (createDocument): Deleted.
+ (AutoconfStorageDocumentProvider.AutoconfStorageDocumentProvider): New internal
+ class based on StorageDocumentProvider.
+ (AutoconfStorageDocumentProvider.setupDocument): New method of internal class.
+ (AutoconfDocumentProvider): New constructor which sets up a
+ TextFileDocumentProvider that takes the internal AutoconfStorageDocumentProvider
+ class as parent DocumentProvider. This emulates what the CDT CEditor does and is
+ done to provide proper edit reversion support.
+
+2006-11-22 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/IAutotoolHelpContextIds.java:
+ Add CONTENT_ASSIST string.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java
+ (getContentAssistant): New routine to add content assist support.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java
+ (createActions): Add action for content assist.
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/AutoconfTextHover.java
+ (getIndexedInfo):
+ (getInformationControlCreator): New method.
+ (getTooltipAffordanceString): Make static.
+ (init): Ditto.
+ (getIndexedInfo): Ditto plus add call to init.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroContentAssistProcessor.java:
+ New class for macro content assist.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroParameterListValidator.java:
+ New class for content assist to help with macro call parameters.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroProposalContextInformation.java:
+ New file for parameter context assist information.
+
+2006-11-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfPartitionScanner.java
+ (AutoconfPartitionScanner): Change partitions to be comments, macros, and
+ default.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java
+ (getPresentationReconciler): Change to match new paritioning. Use a special new
+ MultiLineDamagerRepairer for macros.
+ (getConfiguredContentTypes): Change to list of new partitions.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java
+ (createPartControl): Specify new AUTOCONF_MACRO partition.
+ (InformationDispatchAction.makeAnnotationHoverFocusable): Ditto.
+ (InformationDispatchAction.makeTextHoverFocusable): Ditto.
+ (getAutoconfInlineCodeScanner, getAutoconfStringScanner): Removed.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfInlineCodeScanner.java:
+ Removed.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfSectionRule.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfStringScanner.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfCodeScanner.java
+ (AutoconfCodeScanner): Change rules to add a recursive single line rule for
+ strings and a multiline rule for inlined code. Also add a rule to discover m4
+ macros.
+ * src/com/redhat/eclipse.cdt/autotools/ui/editors/AutoconfM4WordDetector.java:
+ New file.
+ * src/com/redhat/eclipse.cdt/autotools/ui/editors/AutoconfMacroPartitionRule.java:
+ Ditto.
+ * src/com/redhat/eclipse.cdt/autotools/ui/editors/MultiLineDamagerRepairer.java:
+ Ditto.
+ * src/com/redhat/eclipse.cdt/autotools/ui/editors/RecursiveSingleLineRule.java:
+ Ditto.
+
+2006-10-31 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/AutoconfTextHover.java
+ (init): Turn off parser validation.
+ * libhoverdocs/acmacros.xml: Update including m4 macros.
+
+2006-10-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java:
+ Remove unneeded import.
+ * src/com/redhat/eclipse/cdt/autotools/ui/LibHover.java
+ (getLibHoverDocs): Specify no xml validation since there may be duplicate
+ function ids due to multiple standard definitions used in glibc.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java
+ (getTextHover): New method to add text hover for autoconf editor.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfPartitioner.java
+ (connect): Remove calls to print debug messages.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java
+ (isFoldingEnabled):
+ (InformationDispatchAction.InformationDispatchAction): New for scrollable
+ tooltip support.
+ (createPartControl): Ditto.
+ (fProjectionModelUpdater): Ditto.
+ (InformationProvider.getInformation): Ditto.
+ (InformationDispatchAction): Ditto.
+ (initializeKeyBindingScopes): Ditto.
+ (InformationDispatchAction.makeTextHoverFocusable): Ditto.
+ (InformationProvider.getInformation2): Ditto.
+ (InformationProvider): Ditto.
+ (InformationDispatchAction.computeOffsetAtLocation): Ditto.
+ (fInformationPresenter): Ditto.
+ (.createInformationControl): Ditto.
+ (InformationProvider.getInformationPresenterControlCreator): Ditto.
+ (createActions): Ditto.
+ (InformationDispatchAction..createInformationControl): Ditto.
+ (InformationDispatchAction.run): Ditto.
+ (InformationDispatchAction.fTextOperationAction): Ditto.
+ (InformationDispatchAction.makeAnnotationHoverFocusable): Ditto.
+ (fProjectionSupport): Ditto.
+ (InformationProvider.getSubject): Ditto.
+ (InformationProvider.InformationProvider): Ditto.
+ * src/libhoverdocs/acmacros.xml: New file containing autoconf hover help.
+ * src/libhoverdocs/glibc.xml: Updated.
+ * src/libhoverdocs/LIBHOVERDOCS.LICENSE: New file with licensing info.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/IAutotoolEditorActionDefinitionIds.java:
+ New file.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editoros/IAutotoolHelpContextIds.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/AutoconfTextHover.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/HoverMessages.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/HoverMessages.properties:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/HTML2TextReader.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/HTMLPrinter.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/HTMLTextPresenter.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/LineBreakingReader.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/SingleCharReader.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/SubstitutionTextReader.java:
+ Ditto.
+ * plugin.xml: Fix autoconf editor to look for configure.in or configure.ac. Add
+ hover help for autoconf editor and set up F2 key binding for scrollable tooltips.
+ * plugin.properties: Add autoconf editor strings.
+
+2006-10-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfCodeScanner.java: New
+ file.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfWordDetector.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfWhitespaceDetector.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfStringScanner.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfSectionRule.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfPartitionScanner.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfPartitioner.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroWordDetector.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfKeywordDetector.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfInlineCodeScanner.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfColorProvider.java:
+ Ditto.
+ * plugin.properties: Add Autoconf editor name.
+ * plugin.xml: Add Autoconf editor.
+
+2006-10-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ Fix for Bugzilla 209161.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java
+ (initializeBuildConfigDirs): New method.
+ (initialize): Call initializeBuildConfigDirs().
+ (regenerateMakefiles): Ditto if configuration parameters have changed.
+ (createDirectory): Return project path if input directory is empty string or
+ ".".
+
+2006-09-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * build.properties: Update so plugin.properties built into binary.
+ * build.xml: New file.
+
+2006-09-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Bump up release number to 0.0.5.
+
+2006-09-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ Fix for Bugzilla 206719
+ * plugin.xml: Comment out deprecated ManagedBuildInfo extension and replace with
+ new org.eclipse.cdt.managedbuilder.core.buildDefinitions extension point.
+ * plugin.properties: Add new strings from new build definition.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/CProjectPlatformPage.java
+ (CProjectPlatformPage): Fix project type reference to refer to new project type
+ id in build definition.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java
+ (initialize): Switch over to new option ids in new build definition.
+ (getConfigArgs): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfo.java
+ (getCompilationString): Don't bother if input resource isn't a file.
+ (buildFile): Fix how build directory is fetched to work with new build
+ definition.
+ (AutotoolsScannerInfo): Save the original resource reference.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java
+ (AUTOTOOLS_CONFIG_ID): Change to match new build definition.
+
+2006-09-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ Fix for Bugzilla 206359
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsPlugin.java
+ (verifyScannerInfoProvider): New method to check ScannerInfoProvider and set it
+ only if necessary.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java
+ (hasTargetBuilder): Call verifyScannerInfoProvider instead of
+ setScannerInfoProvider to prevent changing the project file every time the
+ hasTargetBuilder check is made.
+
+2006-09-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ Fix for Bugzilla 206164.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfo.java
+ (followIncludeChain): Follow the session property as far as possible. When it
+ ends try looking for the new OPEN_INCLUDE_P persistent property to re-establish
+ the chain.
+ (createIncludeChain): Set a new persistent property OPEN_INCLUDE_P that is the
+ location of the resource.
+
+2006-09-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * cdtpatches/cdt.ui.patch: Update patch to include defined symbol hover help.
+
+2006-09-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfo.java
+ (getDefinedSymbols): Prepare code for failure to get compilation string.
+
+2006-09-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * cdtpatches/README: New file to instruct how to apply patches to the CDT.
+ * cdtpatches/cdt.core.patch: Patch for org.eclipse.cdt.core.
+ * cdtpatches/cdt.ui.patch: Patch for org.eclipse.cdt.ui.
+
+2006-08-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Replace DynamicScannerInfo extension hack with existing CDT
+ ScannerInfoProvider extension. Change version to 0.0.4.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/CConfigureConsole.java
+ (CConfigureConsole): Use new getSubConsoleManager method of CUIPlugin.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsole.java: No
+ longer needed, so removed.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsoleDocument.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsoleManager.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsolePage.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsolePartition.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsolePartitioner.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsoleStream.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsoleViewer.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConsoleEvent.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConsoleOutputTextStore.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ScrollLockAction.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java
+ (convertProject): Set scanner info provider for project.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfoProvider.java: Extend
+ AbstractCExtension.
+ (getScannerInformation): Call AutotoolsScannerInfo.followIncludeChain method to
+ get real underlying resource to get dynamic build info from.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfo.java: Implement new
+ interface IScannerInfoPlus.
+ (followIncludeChain): New method to adhere to new interface.
+ (createIncludeChain): New method.
+ (getDefinedSymbols): Add defined symbols found by ManagedBuildManager.
+ (getIncludePaths): Append include path found by ManagedBuildManager.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsPlugin.java
+ (setScannerInfoProvider): New method.
+ (getConsoleManager): Removed.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java:
+ (hasTargetBuilder): Replace the default scanner provider for Managed Make
+ projects with AutotoolsScannerInfoProvider.
+
+2006-08-21 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/actions/BuildSpecial.java
+ (run): If there are no targets yet
+ (i.e. no makefile), try and regenerate the makefile.* src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (getConfigArgs):
+ Make sure there is an "other" string to process rather than adding an empty
+ argument.
+
+2006-08-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java
+ (regenerateMakefiles): Add logic to check if the configuration arguments have
+ changed since the last configuration and reconfigure if they have.
+ (saveConfigArgs): New method.
+
+2006-08-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java
+ (addAutotoolsBuilder): Check for ManagedMake's genmakebuilder and remove if
+ found.
+ (hasTargetBuilder): Look for Autotools default configuration and if found, add
+ the Autotools Makefile builder.
+
+2006-07-31 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/LibHover.java
+ (getLibHoverDocs): New method which replaces buildDocPath and fetches libhover
+ base data file from the plugin's jar.
+ * src/com/redhat/eclipse/cdt/autotools/ui/LibHover.java
+ (buildDocPath): Replaced by getLibHoverDocs. Change all callers.
+ * src/com/redhat/eclipse/cdt/autotools/ui/LibHover.java
+ (getDocument): Removed.
+
+2006-07-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Remove unused sample extensions.
+ * src/com/redhat/eclipse/cdt/autotools/editors/*: Remove all files.
+ * src/com/redhat/eclipse/cdt/autotools/preferences/*: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/properties/*: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/views/*: Ditto.
+
+2006-07-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Update release.
+ * META-INF/MANIFEST.MF: Export libhoverdocs.
+
+2006-07-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Update release.
+
+2006-07-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java
+ (getMakeTargets): Use IMakeBuildInfo.BUILD_TARGET_INCREMENTAL instead of
+ IMakeBuildInfo.BUILD_TARGET_FULL which is now obsoleted and not set by the
+ MakeTargets.
+ (clean): Ditto.
+
+2006-07-10 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Add new "other" option which allows the end-user to specify any
+ configuration option manually.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java
+ (getConfigArgs): New function to get configure arguments from preferences.
+ (runCommand): Change prototype to take an argument array.
+ (regenerateMakefiles): Only when running full configure, pass args to runCommand
+ and get these from getConfigArgs method.
+
+2006-07-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfo.java
+ (getCompilationString): Don't use previous compilation string if we have marked
+ the scanner info as dirty.
+ (getIncludePaths): Don't continue processing if the compilation string is null.
+
+2006-06-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/popup/actions/GetDefinedSymbolsAction.java:
+ New file.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfo.java
+ (getDefinedSymbols): Fill in function details to fetch flags used in dynamic
+ compilation info.
+ (getCompilationString): New function to get and save the actual compilation
+ string from the make invocation.
+ (getIncludePaths): Move logic into getCompilationString.
+ (compilationString): New field to store compilation string.
+ (definedSymbols): New field to store map of defined symbols.
+ * plugin.xml: Add defined symbols menu item.
+
+2006-06-20 jjohnstn <jjohnstn@toy.toronto.redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/popup/actions/GetIncludePathAction.java:
+ Remove unused imports.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/MakeUIImages.java: New class
+ copied from Std Make internal packages to local internal package.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/MessageLine.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/MakeUIPlugin.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/MakeResources.properties: New
+ properties message file used by MakeUIPlugin.
+ * src/com/redhat/eclipse/cdt/autotools/actions/TargetListViewerPart.java: Use
+ Autotools StructureViewPart instead of internal one from Std Make plugin.
+ * src/com/redhat/eclipse/cdt/autotools/actions/MakeTargetDialog.java: Use new
+ Autotools internal classes rather than internal ones from Std Make plugin.
+ * src/com/redhat/eclipse/cdt/autotools/actions/AbstractTargetAction.java
+ (getShell): Use new AutotoolsPlugin getActiveWorkbenchShell method instead of
+ the one in internal MakeUIPlugin.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java: Remove
+ unused imports.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsPlugin.java
+ (getActiveWorkbenchShell): New method.
+
+2006-06-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Add dependency on org.eclipse.core.variables.
+ * src/com/redhat/eclipse/cdt/autotools/internal/MakeTargetManager: New internal
+ class copied from Std Make projects.
+ * src/com/redhat/eclipse/cdt/autotools/internal/MakeTarget: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ProjectTargets: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/MakeMessages: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakeTargetManager: Base on local
+ internal MakeTargetManager class rather than unpublished Std Make internal class.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator: Remove reference to Std
+ Make MakeMessages internal class.
+ * src/com/redhat/eclipse/cdt/autotools/Resources.properties: Add new message
+ about invoking make for the project.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsPlugin.java
+ (getFormattedString): New method to get resource string with arguments.
+
+2006-06-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Added "org.eclipse.cdt.core.DynamicScannerInfoProvider" extension.
+ * src/com/redhat/eclipse/cdt/autotools/popup/actions/GetIncludePathAction.java
+ (run): Altered to use new AutotoolsScannerInfo class.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfoProvider.java: New
+ class used to hook up to added extension point:
+ org.eclipse.cdt.core.DynamicScannerInfoProvider.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfo.java: New file based
+ on AutotoolsMakefileMiner.java. Class implements IScannerInfo interface.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileMiner.java: Transformed
+ into AutotoolsScannerInfo.java.
+
+2006-06-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/popup/actions/GetIncludePathAction.java:
+ Fix up imports.
+
+2006-06-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Make provider Red Hat.
+
+2006-06-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileMiner.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/popup/actions: GetIncludePathAction.java:
+ Ditto.
+ * plugin.xml: Add extensions to create menu for source files that will grab the
+ dynamic include path for the build and display it in a message dialog. This is
+ just a temporary test.
+
+2006-05-19 Andrew Overholt <overholt@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/actions/BuildSpecial.java
+ (run): Create our target selection dialog in-line. Make this dialog have a
+ filter for selection of make target.
+ * src/com/redhat/eclipse/cdt/autotools/actions/BuildTargetDialog.java: Remove:
+ no longer necessary.
+
+2006-05-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java
+ (clean): Overriding method to check for MakeTargets in which case we don't want
+ to clean out directory.
+ * plugin.xml: Remove unneeded extension.
+
+2006-04-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/LibHover.java
+ (getHref): Change to reference the glibc book rather than the Gnu help.
+
+2006-04-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/LibHover.java: New file based on Chris
+ Moller's hover help, using ICHelpProvider interface.
+ * plugin.xml: Add CHelpProvider extension to supply hover help.
+ * libhoverdocs/glibc.xml: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/AutoconfPlugin.java: Refactored.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsPlugin.java: Refactored from
+ AutoconfPlugin.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/CConfigureConsole.java:
+ Refactor AutoconfPlugin to AutotoolsPlugin.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/CProjectPlatformPage.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizard.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/preferences/PreferenceInitializer.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/TargetListViewerPart.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/MakeTargetDialog.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/MakeContentProvider.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/BuildTargetDialog.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/BuildSpecial.java: Ditto.
+
+2006-04-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Remove toc extension since we have moved docs to a separate
+ plug-in.
+ * getdocs.sh: Moved to autotools-doc plugin.
+ * doc.zip: Ditto.
+ * toc.xml: Ditto.
+ * testToc.xml: Removed.
+
+2006-04-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * toc.xml: Add references for Gnu Tools documents.
+ * doc.zip: New file containing zipped up html files for Gnu tools.
+ * getdocs.sh: Shell script to get html files from the web and build doc.zip.
+ * plugin.xml: Connect toc extension to toc.xml so that Gnu tools help is
+ provided with Autotools plugin.
+
+2006-03-21 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/AutoconfPlugin.java
+ (getConsoleManager): New method.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java
+ (runCommand): Specify the Autotools configure console to use for configuration
+ output.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/CConfigureConsole.java: New
+ file stodified from ManagedBuild Project internal directory.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsoleDocument.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsoleManager.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsolePage.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsolePartitioner.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsolePartition.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsoleStream.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsoleViewer.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsole.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConsoleEvent.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConsoleMessages.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConsoleMessages.properties:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ScrollLockAction.java: Ditto.
+ * plugin.xml: Set up CBuildConsole extension to be CConfigureConsole.
+
+2006-03-15 Andrew Overholt <overholt@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java
+ (addMakeTargetsToManager): New method.
+ (regenerateMakefiles): Call addMakeTargetsToManager after Makefile is generated.
+
+2006-03-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/wizards/NewAutotoolsProjectOptionPage.java
+ (getProject): If dealing with a ConvertToAutotoolsProjectWizard, use it's
+ getProject method.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizard.java
+ (setCurrentProject): New method.
+ (applyOptions): Change prototype to accept project as input. Call
+ setCurrentProject method using the project variable before getting the optionPage
+ to performApply.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java
+ (applyOptions): Add project as input variable and pass this on call.
+ (convertProject): Pass project when calling applyOptions method.
+
+2006-03-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java
+ (getMakeTargets): When doing a full build, we don't want to do a "clean" if the
+ target is not "all".
+
+2006-03-09 Andrew Overholt <overholt@redhat.com>
+
+ * .cvsignore: Initial checkin. Ignore bin.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java
+ (regenerateMakefiles): Rename CONFIG_STATUS_NAME to CONFIG_STATUS. Call
+ autogen.sh first if configure does not exist.
+ (configureExists): New method.
+ (autogenExists): New method.
+ (runCommand): New method. Run configure or autogen and report success.
+ * plugin.properties: Change "CVS Autotools" to Autotools.
+ * plugin.xml: Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/NewAutotoolsProjectWizard.java
+ (NewAutotoolsProjectWizard): Likewise.
+
+2006-03-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Set up default gcc scanner in our ManagedMakeProject target
+ extension -
+ org.eclipse.cdt.managedbuilder.internal.scannerconfig.DefaultGCCScannerInfoCollector.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java
+ (convertProject): Remove commented code about setting ScannerConfig as we now
+ set the default GCC scanner collector in our ManagedMakeProject extension.
+
+2006-03-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/AutoconfPlugin.java
+ (ftargetManager): New field.
+ (getUniqueIdentifier): New method.
+ (getTargetManager): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java: New
+ builder that extends ManagedMakeProject's GeneratedMakefileBuilder and allows us
+ to override behavior.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakeTargetManager.java: New
+ class that extends a Std MakeProject's MakeTargetManager and allows us to
+ override behavior.
+ * src/com/redhat/eclipse/cdt/autotools/Resources.properties: New strings added
+ to support BuildSpecial functionality.
+ * src/com/redhat/eclipse/cdt/autotools/AbstractTargetAction.java: New file based
+ on Std MakeProject class.
+ * src/com/redhat/eclipse/cdt/autotools/actions/BuildSpecial.java: Rewritten to
+ extend AbstractTargetAction and to create a dialog rather than print out hello
+ world.
+ * src/com/redhat/eclipse/cdt/autotools/actions/BuildTargetDialog.java: New file
+ that implements the Build Special Targets dialog. Based on a Std Make Project's
+ BuildTargetDialog.
+ * src/com/redhat/eclipse/cdt/autotools/actions/CheckboxTablePart.java: New file
+ to support new dialogs.
+ * src/com/redhat/eclipse/cdt/autotools/actions/MakeContentProvider.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/MakeTargetDialog.java: New file
+ that implements the Make Target dialog allowing management of make targets. Based
+ on Std Make Project's MakeTargetDialog.
+ * src/com/redhat/eclipse/cdt/autotools/actions/SharedPartWithButtons.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/StructuredViewerPart.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/TargetListViewerPart.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java:
+ Instead of adding a ManagedProject builder, add our new AutotoolsMakefileBuilder.
+ * plugin.xml: Add our new AutotoolsMakefileBuilder as an official builder.
+
+2006-02-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java: Remove some warnings.
+ * plugin.xml: Fix duplicate target configuration options and re-add in --build
+ option.
+
+2006-02-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Initial import.
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/META-INF/MANIFEST.MF b/autotools/org.eclipse.linuxtools.cdt.autotools.core/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..a7069db062
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/META-INF/MANIFEST.MF
@@ -0,0 +1,32 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name.0
+Bundle-SymbolicName: org.eclipse.linuxtools.cdt.autotools.core;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.linuxtools.cdt.autotools.core.AutotoolsPlugin
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui;bundle-version="3.4.0",
+ org.eclipse.core.runtime;bundle-version="3.4.0",
+ org.eclipse.jface.text;bundle-version="3.4.0",
+ org.eclipse.ui.editors;bundle-version="3.4.0",
+ org.eclipse.ui.workbench.texteditor;bundle-version="3.4.0",
+ org.eclipse.core.resources;bundle-version="3.4.0",
+ org.eclipse.ui.ide;bundle-version="3.4.0",
+ org.eclipse.cdt.managedbuilder.core;bundle-version="5.0.100",
+ org.eclipse.cdt.core;bundle-version="5.1.0",
+ org.eclipse.cdt.ui;bundle-version="5.1.0",
+ org.eclipse.cdt.managedbuilder.ui;bundle-version="5.0.100",
+ org.eclipse.cdt.managedbuilder.gnu.ui;bundle-version="5.0.100",
+ org.eclipse.cdt.make.core;bundle-version="5.1.0",
+ org.eclipse.cdt.make.ui;bundle-version="5.0.100",
+ org.eclipse.ui.console;bundle-version="3.3.0",
+ org.eclipse.help;bundle-version="3.3.100",
+ org.eclipse.core.variables;bundle-version="3.2.100",
+ org.eclipse.ui.views;bundle-version="3.3.0",
+ org.eclipse.core.filesystem;bundle-version="1.2.0"
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: %provider
+Export-Package: org.eclipse.linuxtools.cdt.autotools.core;x-friends:="org.eclipse.linuxtools.cdt.autotools.tests,org.eclipse.linuxtools.cdt.autotools.ui",
+ org.eclipse.linuxtools.internal.cdt.autotools.core;x-friends:="org.eclipse.linuxtools.cdt.autotools.ui,org.eclipse.linuxtools.cdt.autotools.tests",
+ org.eclipse.linuxtools.internal.cdt.autotools.core.configure;x-friends:="org.eclipse.linuxtools.cdt.autotools.tests,org.eclipse.linuxtools.cdt.autotools.ui"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.glibc/about.html b/autotools/org.eclipse.linuxtools.cdt.autotools.core/about.html
index 23506a4bae..23506a4bae 100644
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.glibc/about.html
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/about.html
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/build.properties b/autotools/org.eclipse.linuxtools.cdt.autotools.core/build.properties
new file mode 100644
index 0000000000..84d229a4a7
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ .,\
+ html/,\
+ about.html,\
+ plugin.properties
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/html/maintopic.html b/autotools/org.eclipse.linuxtools.cdt.autotools.core/html/maintopic.html
new file mode 100644
index 0000000000..a476078ace
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/html/maintopic.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Main Topic</title>
+</head>
+
+<body>
+<h1>Main Topic</h1>
+Please enter your text here.
+</body>
+</html> \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/html/subtopic.html b/autotools/org.eclipse.linuxtools.cdt.autotools.core/html/subtopic.html
new file mode 100644
index 0000000000..8a61c501d6
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/html/subtopic.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Sub Topic</title>
+</head>
+
+<body>
+<h1>Sub Topic</h1>
+Please enter your text here.
+</body>
+</html> \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/html/toc.html b/autotools/org.eclipse.linuxtools.cdt.autotools.core/html/toc.html
new file mode 100644
index 0000000000..326f0a9ff3
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/html/toc.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Table of Contents</title>
+</head>
+
+<body>
+<h1>Table of Contents</h1>
+Please enter your text here.
+</body>
+</html> \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/plugin.properties b/autotools/org.eclipse.linuxtools.cdt.autotools.core/plugin.properties
new file mode 100644
index 0000000000..5eeed011d8
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/plugin.properties
@@ -0,0 +1,177 @@
+#################################################################################
+# Copyright (c) 2006, 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 Incorporated - initial API and implementation
+#################################################################################
+ConvertWizard.description=Convert to C/C++ Autotools Project
+NewCProject.description=GNU C Autotools Project
+NewCProjectV2.description=GNU C Autootols Project V2
+NewCCProject.description=GNU C++ Autotools Project
+NewCWizard.name=GNU C Autotools Project
+NewCWizardV2.name=GNU C Autotools Project V2
+NewCCWizard.name=GNU C++ Autotools Project
+
+Autotools.wizard.name=GNU Autotools Build Wizard
+
+Autoconf.editor.name=Autoconf Editor
+
+BuildProperty.value.name.default=Default;
+BuildProperty.type.name.autotools=GNU Autotools
+
+PreferenceAutotools.name=Autotools
+PreferenceAutomakeEditor.name=Automake Editor
+PreferenceAutoconfEditor.name=Autoconf Editor
+
+PropertyAutotools.name=Autotools
+PropertyAutotools.general.name=General
+PropertyAutotools.configure.name=Configure Settings
+PropertyTabEditor.name=Editors
+AutotoolsBuildPropertyTab.name=Behaviour
+AutotoolsEditorsPropertyTab.name=Editors
+AutotoolsToolsPropertyTab.name=Tools Settings
+AutotoolsConfigurePropertyTab.name=Configure Settings
+
+PropertyTabEditor.tooltip=Set options for Autotools-specific editors
+PropertyTabBuild.tooltip=Set additional Autotools build options
+
+Makefile.builder.name=Autotools Makefile Generator
+Autotools.projecttype.name=GNU Autotools
+AutotoolsNature.name=Autotools Project Nature
+AutotoolsNewNature.name=Autotools Project Nature V2
+Configuration.build.name=Build (GNU)
+Autotools.targetplatform.name=GNU Autotools Target Platform
+Autotools.gnu.toolchain.name=GNU Autotools Toolchain
+Configure.outputType=Configure Output (config.status)
+Autogen.outputType=Autogen Output (configure)
+
+CommandCategorySource.name=Source
+CommandCategorySource.description=Source commands
+CommandCategoryTools.name=Tools
+CommandCategoryTools.description=Autotool tools
+ShowTooltip.name=Show Tooltip Description
+ShowTooltip.description=Shows the tooltip description for the element at the cursor
+
+# Scope and Key Commands
+ACeditor.scope.name=Autoconf Editor
+ACeditor.scope.description=Editor for Autoconf Configuration Source Files
+
+Tool.configure=configure
+
+OptionCategory.configure.general=General
+Option.configure.name=Name
+Option.configure.builddir=Build directory
+Option.configure.builddir.tip=Subdirectory off of project where build will occur
+Option.configure.configdir=Configure tool directory
+Option.configure.configdir.tip=Subdirectory off of project containing configure scripts
+Option.configure.cache_file=Name of configuration cache file (--cache-file)
+Option.configure.cache_file.tip=Specify the name of the configuration cache file [config.cache]
+Option.configure.no_create=Turn off file creation <not advised> (--no-create)
+Option.configure.no_create.tip=This tells configuration not to generate the output files as part of configuration
+Option.configure.quiet=Turn off checking messages (--quiet)
+Option.configure.quiet.tip=This turns off "checking ..." style messages from the configuration console output
+Option.configure.help=Display help contents of top-level configuration (--help)
+Option.configure.help.tip=Ask configuration file to display its help documentation
+Option.configure.version=Display version of autotools used to create configuration (--version)
+Option.configure.version.tip=This outputs the version of the Autotools used to create the configuration files
+
+OptionCategory.configure.platform=Platform Specifiers
+Option.configure.host=Host platform (--host)
+Option.configure.host.tip=Platform that project will run on
+Option.configure.target=Target platform (--target)
+Option.configure.target.tip=Platform that project will target output for
+Option.configure.build=Build platform (--build)
+Option.configure.build.tip=Platform where project is being built
+
+OptionCategory.configure.directories=Directory specifiers
+Option.configure.prefix=Arch-independent install directory (--prefix)
+Option.configure.prefix.tip=Place where architecture-independent files are installed [/usr/local]
+Option.configure.exec_prefix=Arch-dependent install directory (--exec-prefix)
+Option.configure.exec_prefix.tip=Place where architecture-dependent files are installed [PREFIX]
+Option.configure.libdir=Object code library directory (--libdir)
+Option.configure.libdir.tip=Place where object code libraries are installed [EPREFIX/lib]
+Option.configure.bindir=User executable directory (--bindir)
+Option.configure.bindir.tip=Place where binary executables are installed [EPREFIX/bin]
+Option.configure.sbindir=System admin executable directory (--sbindir)
+Option.configure.sbindir.tip=Place where system admin executables are installed [EPREFIX/sbin]
+Option.configure.includedir=C Header file directory (--includdir)
+Option.configure.includedir.tip=Place where header files will be installed [PREFIX/include]
+Option.configure.datadir=Read-only architecture-independent data (--datadir)
+Option.configure.datadir.tip=Place where read-only architecture-independent data is installed [PREFIX/share]
+Option.configure.sysconfdir=Read-only single-machine data directory (--syconfdir)
+Option.configure.sysconfdir.tip=Place where read-only single-machine data is stored [PREFIX/etc]
+Option.configure.infodir=Info file documentation directory (--infodir)
+Option.configure.infodir.tip=Place where info files are installed [PREFIX/info]
+Option.configure.mandir=Man file documentation directory (--mandir)
+Option.configure.mandir.tip=Place where man file documentation is installed [PREFIX/man]
+Option.configure.srcdir=Sources directory (--srcdir)
+Option.configure.srcdir.tip=Place where configure can find sources [configure directory or ..]
+Option.configure.localstatedir=Modifiable single-machine data directory (--localstatedir)
+Option.configure.localstatedir.tip=Place where modifiable single-machine data is installed [PREFIX/var]
+Option.configure.sharedstatedir=Modifiable architecture-independent data directory (--sharedstatedir)
+Option.configure.sharedstatedir.tip=Place where modifiable architecture-independent data is installed [PREFIX/com}
+Option.configure.libexecdir=Program executable directory (--libexecdir)
+Option.configure.libexecdir=Place where program executables will be installed [EPREFIX/libexec]
+Option.configure.oldincludedir=Non-gcc C header file directory (--oldincludedir)
+Option.configure.oldincludedir.tip=Place where non-gcc C header files are installed [/usr/include]
+
+OptionCategory.configure.filenames=File-name transformations
+Option.configure.program_prefix=Installed program prefix (--program-prefix)
+Option.configure.program_prefix.tip=Prepend PREFIX to the beginning of installed program names
+Option.configure.program_suffix=Installed program suffix (--program-suffix)
+Option.configure.program_suffix.tip=Append SUFFIX to the end of installed program names
+Option.configure.program_transform_name=Installed program name transform (--program-transform-name)
+Option.configure.program_transform_name.tip=A sed string used to transform installed program names
+
+OptionCategory.configure.features=Features and packages
+Option.configure.enable_maintainer_mode=Enable maintainer mode (--enable-maintainer-mode)
+Option.configure.enable_maintainer_mode.tip=Specify this to have Makefiles generated with checks for Autotool configuration file changes
+Option.configure.user=User-specified configuration options
+Option.configure.user.tip=Specify one or more configuration options (e.g. --enable-FEATURE, --disable-FEATURE, or --with-PACKAGE)
+
+Tool.autogen = autogen.sh
+
+OptionCategory.autogen.general=Options
+Option.autogen.user=Command line options
+Option.autogen.user.tip=Specify options to pass to the top-level autogen.sh script
+
+RedHatVendor.name = Red Hat
+Bundle-Name.0 = Autotools Plug-in (Incubation)
+provider=Eclipse
+ConvertWizard.name = Convert to a C/C++ Autotools Project
+InvokeAutotools.label = Invoke Autotools
+InvokeAutotools.mnemonic = I
+InvokeAutoconf.label = Invoke Autoconf
+InvokeAutoconf.mnemonic = c
+InvokeAutoconf.description = Run autoconf in the selected directory
+InvokeAutoheader.label = Invoke Autoheader
+InvokeAutoheader.mnemonic = h
+InvokeAutoheader.description = Run autoheader from the selected directory
+InvokeAutomake.label = Invoke Automake
+InvokeAutomake.mnemonic = m
+InvokeAutomake.description = Run automake from the selected directory
+InvokeAutoreconf.label = Invoke Autoreconf
+InvokeAutoreconf.mnemonic = r
+InvokeAutoreconf.description = Run autoreconf from the selected directory
+InvokeAclocal.label = Invoke Aclocal
+InvokeAclocal.mnemonic = l
+InvokeAclocal.description = Run aclocal from the selected directory
+InvokeLibtoolize.label = Invoke Libtoolize
+InvokeLibtoolize.mnemonic = t
+InvokeLibtoolize.description = Run libtoolize in the selected directory
+Reconfigure.label = Reconfigure Project
+Reconfigure.mnemonic = f
+Reconfigure.description = Run configuration scripts for project
+DynamicBuild.label = Dynamic Build Info
+GetIncludePath.label = Get Include Path
+GetDefinedSymbols.label = Get Defined Symbols
+IncludesOption.name = includes
+SymbolsOption.name = symbols
+AutomakeEditor.name = AutomakeEditor
+Automake.name = automake
+ConfigureScript.name=Configure Script
+AutogenScript.name=Autogen Script \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/plugin.xml b/autotools/org.eclipse.linuxtools.cdt.autotools.core/plugin.xml
new file mode 100644
index 0000000000..b77c58bb09
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/plugin.xml
@@ -0,0 +1,535 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+ <extension
+ id="autotoolsProperties"
+ name="Autotools Build Properties"
+ point="org.eclipse.cdt.managedbuilder.core.buildProperties">
+ <propertyValue
+ property="org.eclipse.cdt.build.core.buildType"
+ id="org.eclipse.linuxtools.cdt.autotools.core.buildType.default"
+ name="%BuildProperty.value.name.default"/>
+ <propertyValue
+ property="org.eclipse.cdt.build.core.buildArtefactType"
+ id="org.eclipse.linuxtools.cdt.autotools.core.buildArtefactType.autotools"
+ name="%BuildProperty.type.name.autotools"/>
+ </extension>
+ <extension
+ id="cdt.autotools.core.managed.build.info"
+ name="Autotools Managed Build Info"
+ point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
+ <managedBuildRevision fileVersion="4.0.0"/>
+ <tool
+ command="configure"
+ id="org.eclipse.linuxtools.cdt.autotools.core.tool.configure"
+ isAbstract="false"
+ name="%Tool.configure"
+ natureFilter="both"
+ supportsManagedBuild="false">
+ <optionCategory
+ id="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
+ name="%OptionCategory.configure.general"
+ owner="org.eclipse.linuxtools.cdt.autotools.core.tool.configure"/>
+ <option
+ applicabilityCalculator="org.eclipse.linuxtools.internal.cdt.autotools.core.configure.AutotoolsOptionValueHandler"
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.name"
+ isAbstract="false"
+ name="%Option.configure.name"
+ resourceFilter="all"
+ valueHandler="org.eclipse.linuxtools.internal.cdt.autotools.core.configure.AutotoolsOptionValueHandler"
+ valueType="string">
+ </option>
+ <option
+ applicabilityCalculator="org.eclipse.linuxtools.internal.cdt.autotools.core.configure.AutotoolsOptionValueHandler"
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
+ defaultValue="build"
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.builddir"
+ isAbstract="false"
+ name="%Option.configure.builddir"
+ resourceFilter="all"
+ tip="%Option.configure.builddir.tip"
+ valueHandler="org.eclipse.linuxtools.internal.cdt.autotools.core.configure.AutotoolsOptionValueHandler"
+ valueType="string"/>
+ <option
+ applicabilityCalculator="org.eclipse.linuxtools.internal.cdt.autotools.core.configure.AutotoolsOptionValueHandler"
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.configdir"
+ isAbstract="false"
+ name="%Option.configure.configdir"
+ resourceFilter="all"
+ tip="%Option.configure.configdir.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
+ command="--cache-file="
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.cache_file"
+ isAbstract="false"
+ name="%Option.configure.cache_file"
+ resourceFilter="all"
+ tip="%Option.configure.cache_file.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
+ command="--help"
+ defaultValue="false"
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.help"
+ isAbstract="false"
+ name="%Option.configure.help"
+ resourceFilter="all"
+ tip="%Option.configure.help.tip"
+ valueType="boolean"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
+ command="--no-create"
+ defaultValue="false"
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.no_create"
+ isAbstract="false"
+ name="%Option.configure.no_create"
+ resourceFilter="all"
+ tip="%Option.configure.no_create.tip"
+ valueType="boolean"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
+ command="--quiet"
+ defaultValue="false"
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.quiet"
+ isAbstract="false"
+ name="%Option.configure.quiet"
+ resourceFilter="all"
+ tip="%Option.configure.quiet.tip"
+ valueType="boolean"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
+ command="--version"
+ defaultValue="false"
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.version"
+ isAbstract="false"
+ name="%Option.configure.version"
+ resourceFilter="all"
+ tip="%Option.configure.version.tip"
+ valueType="boolean"/>
+ <optionCategory
+ id="org.eclipse.linuxtools.cdt.autotools.core.configure.optionCategory.configure.platform"
+ name="%OptionCategory.configure.platform"
+ owner="org.eclipse.linuxtools.cdt.autotools.core.tool.configure"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.configure.optionCategory.configure.platform"
+ command="--host="
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.host"
+ isAbstract="false"
+ name="%Option.configure.host"
+ resourceFilter="all"
+ tip="%Option.configure.host.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.configure.optionCategory.configure.platform"
+ command="--target="
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.target"
+ isAbstract="false"
+ name="%Option.configure.target"
+ resourceFilter="all"
+ tip="%Option.configure.target.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.configure.optionCategory.configure.platform"
+ command="--build="
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.build"
+ isAbstract="false"
+ name="%Option.configure.build"
+ resourceFilter="all"
+ tip="%Option.configure.build.tip"
+ valueType="string"/>
+ <optionCategory
+ id="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
+ name="%OptionCategory.configure.directories"
+ owner="org.eclipse.linuxtools.cdt.autotools.core.tool.configure"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
+ command="--prefix="
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.prefix"
+ isAbstract="false"
+ name="%Option.configure.prefix"
+ resourceFilter="all"
+ tip="%Option.configure.prefix.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
+ command="--exec-prefix="
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.exec_prefix"
+ isAbstract="false"
+ name="%Option.configure.exec_prefix"
+ resourceFilter="all"
+ tip="%Option.configure.exec_prefix.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
+ command="--libdir="
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.libdir"
+ isAbstract="false"
+ name="%Option.configure.libdir"
+ resourceFilter="all"
+ tip="%Option.configure.libdir.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
+ command="--bindir="
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.bindir"
+ isAbstract="false"
+ name="%Option.configure.bindir"
+ resourceFilter="all"
+ tip="%Option.configure.bindir.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
+ command="--sbindir="
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.sbindir"
+ isAbstract="false"
+ name="%Option.configure.sbindir"
+ resourceFilter="all"
+ tip="%Option.configure.sbindir.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
+ command="--includedir="
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.includedir"
+ isAbstract="false"
+ name="%Option.configure.includedir"
+ resourceFilter="all"
+ tip="%Option.configure.includedir.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
+ command="--datadir="
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.datadir"
+ isAbstract="false"
+ name="%Option.configure.datadir"
+ resourceFilter="all"
+ tip="%Option.configure.datadir.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
+ command="--sysconfdir="
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.sysconfdir"
+ isAbstract="false"
+ name="%Option.configure.sysconfdir"
+ resourceFilter="all"
+ tip="%Option.configure.sysconfdir.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
+ command="--infodir="
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.infodir"
+ isAbstract="false"
+ name="%Option.configure.infodir"
+ resourceFilter="all"
+ tip="%Option.configure.infodir.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
+ command="--mandir="
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.mandir"
+ isAbstract="false"
+ name="%Option.configure.mandir"
+ resourceFilter="all"
+ tip="%Option.configure.mandir.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
+ command="--srcdir="
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.srcdir"
+ isAbstract="false"
+ name="%Option.configure.srcdir"
+ resourceFilter="all"
+ tip="%Option.configure.srcdir.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
+ command="--localstatedir="
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.localstatedir"
+ isAbstract="false"
+ name="%Option.configure.localstatedir"
+ resourceFilter="all"
+ tip="%Option.configure.localstatedir"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
+ command="--sharedstatedir="
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.sharedstatedir"
+ isAbstract="false"
+ name="%Option.configure.sharedstatedir"
+ resourceFilter="all"
+ tip="%Option.configure.sharedstatedir"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
+ command="--libexecdir="
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.libexecdir"
+ isAbstract="false"
+ name="%Option.configure.libexecdir"
+ resourceFilter="all"
+ tip="%Option.configure.libexecdir"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
+ command="--oldincludedir="
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.oldincludedir"
+ isAbstract="false"
+ name="%Option.configure.oldincludedir"
+ resourceFilter="all"
+ tip="%Option.configure.oldincludedir.tip"
+ valueType="string"/>
+ <optionCategory
+ id="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.filenames"
+ name="%OptionCategory.configure.filenames"
+ owner="org.eclipse.linuxtools.cdt.autotools.core.tool.configure"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.filenames"
+ command="--program-prefix="
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.program_prefix"
+ isAbstract="false"
+ name="%Option.configure.program_prefix"
+ resourceFilter="all"
+ tip="%Option.configure.program_prefix.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.filenames"
+ command="--program-suffix="
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.program_suffix"
+ isAbstract="false"
+ name="%Option.configure.program_suffix"
+ resourceFilter="all"
+ tip="%Option.configure.program_suffix.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.filenames"
+ command="--program-transform-name="
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.program_transform_name"
+ isAbstract="false"
+ name="%Option.configure.program_transform_name"
+ resourceFilter="all"
+ tip="%Option.configure.program_transform_name.tip"
+ valueType="string"/>
+ <optionCategory
+ id="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.features"
+ name="%OptionCategory.configure.features"
+ owner="org.eclipse.linuxtools.cdt.autotools.core.tool.configure"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.features"
+ command="--enable-maintainer-mode"
+ defaultValue="false"
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.enable_maintainer_mode"
+ isAbstract="false"
+ name="%Option.configure.enable_maintainer_mode"
+ resourceFilter="all"
+ tip="%Option.configure.enable_maintainer_mode.tip"
+ valueType="boolean"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.features"
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.user"
+ isAbstract="false"
+ name="%Option.configure.user"
+ resourceFilter="all"
+ tip="%Option.configure.user.tip"
+ valueType="string"/>
+ <outputType
+ id="org.eclipse.linuxtools.cdt.autotools.core.outputType.configure"
+ name="%Configure.outputType"
+ outputs="status"
+ primaryOutput="true"/>
+ <inputType
+ id="org.eclipse.linuxtools.cdt.autotools.core.inputType.configure"
+ multipleOfType="false"
+ sourceContentType="org.eclipse.linuxtools.cdt.autotools.core.configureScript">
+ </inputType>
+ </tool>
+ <tool
+ command="autogen.sh"
+ id="org.eclipse.linuxtools.cdt.autotools.core.tool.autogen"
+ isAbstract="false"
+ name="%Tool.autogen"
+ natureFilter="both"
+ supportsManagedBuild="false">
+ <optionCategory
+ id="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.autogen.general"
+ name="%OptionCategory.autogen.general"
+ owner="org.eclipse.linuxtools.cdt.autotools.core.tool.autogen">
+ </optionCategory>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.autogen.general"
+ id="org.eclipse.linuxtools.cdt.autotools.core.option.autogen.user"
+ isAbstract="false"
+ name="%Option.autogen.user"
+ resourceFilter="all"
+ tip="%Option.autogen.user.tip"
+ valueType="string">
+ </option>
+ <outputType
+ id="org.eclipse.linuxtools.cdt.autotools.core.outputType.autogen"
+ name="%Autogen.outputType"
+ outputNames="configure"
+ primaryOutput="true">
+ </outputType>
+ <inputType
+ id="org.eclipse.linuxtools.cdt.autotools.core.inputType.autogen"
+ multipleOfType="false"
+ sourceContentType="org.eclipse.linuxtools.cdt.autotools.core.autogenScript">
+ </inputType>
+ </tool>
+ <targetPlatform
+ archList="all"
+ binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF"
+ id="org.eclipse.linuxtools.cdt.autotools.core.targetPlatform"
+ isAbstract="false"
+ name="%Autotools.targetplatform.name"/>
+ <projectType
+ buildArtefactType="org.eclipse.linuxtools.cdt.autotools.core.buildArtefactType.autotools"
+ id="org.eclipse.linuxtools.cdt.autotools.core.projectType"
+ isAbstract="false">
+ <configuration
+ buildProperties="org.eclipse.linuxtools.cdt.autotools.core.buildType.default"
+ cleanCommand="rm -rf"
+ errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser"
+ id="org.eclipse.linuxtools.cdt.autotools.core.configuration.build"
+ name="%Configuration.build.name">
+ <toolChain
+ archList="all"
+ id="org.eclipse.linuxtools.cdt.autotools.core.toolChain"
+ name="%Autotools.gnu.toolchain.name"
+ scannerConfigDiscoveryProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"
+ supportsManagedBuild="false"
+ targetTool="org.eclipse.linuxtools.cdt.autotools.core.tool.configure">
+ <tool
+ id="org.eclipse.linuxtools.cdt.autotools.core.gnu.toolchain.tool.configure"
+ isAbstract="false"
+ natureFilter="both"
+ superClass="org.eclipse.linuxtools.cdt.autotools.core.tool.configure"/>
+ <tool
+ id="org.eclipse.linuxtools.cdt.autotools.core.toolchain.tool.autogen"
+ isAbstract="false"
+ natureFilter="both"
+ superClass="org.eclipse.linuxtools.cdt.autotools.core.tool.autogen">
+ </tool>
+ <tool
+ id="org.eclipse.linuxtools.cdt.autotools.core.toolchain.tool.gcc"
+ isAbstract="false"
+ superClass="cdt.managedbuild.tool.gnu.c.compiler">
+ </tool>
+ <tool
+ id="org.eclipse.linuxtools.cdt.autotools.core.toolchain.tool.gpp"
+ isAbstract="false"
+ superClass="cdt.managedbuild.tool.gnu.cpp.compiler">
+ </tool>
+ <targetPlatform
+ id="org.eclipse.linuxtools.cdt.autotools.core.toolchain.targetPlatform"
+ isAbstract="false"
+ name="%Autotools.targetplatform.name"
+ superClass="org.eclipse.linuxtools.cdt.autotools.core.targetPlatform">
+ </targetPlatform>
+ <builder
+ id="org.eclipse.linuxtools.cdt.autotools.core.toolchain.builder"
+ isAbstract="false"
+ isVariableCaseSensitive="false">
+ </builder>
+ <supportedProperties>
+ <property
+ id="org.eclipse.cdt.build.core.buildArtefactType">
+ <value
+ id="org.eclipse.linuxtools.cdt.autotools.core.buildArtefactType.autotools">
+ </value>
+ </property>
+ </supportedProperties>
+ </toolChain>
+ </configuration>
+ </projectType>
+ </extension>
+ <extension
+ id="autotoolsNatureV2"
+ name="%AutotoolsNewNature.name"
+ point="org.eclipse.core.resources.natures">
+ <requires-nature
+ id="org.eclipse.cdt.managedbuilder.core.managedBuildNature">
+ </requires-nature>
+ <runtime>
+ <run
+ class="org.eclipse.linuxtools.cdt.autotools.core.AutotoolsNewProjectNature">
+ </run>
+ </runtime>
+ <builder
+ id="org.eclipse.linuxtools.cdt.autotools.core.genmakebuilderV2">
+ </builder>
+ </extension>
+ <extension
+ id="genmakebuilderV2"
+ name="%Makefile.builder.name"
+ point="org.eclipse.core.resources.builders">
+ <builder
+ hasNature="true">
+ <run
+ class="org.eclipse.linuxtools.internal.cdt.autotools.core.AutotoolsConfigurationBuilder">
+ </run>
+ </builder>
+ </extension>
+ <extension
+ point="org.eclipse.cdt.core.templateProcessTypes">
+ <processType
+ name="NewAutotoolsProject"
+ processRunner="org.eclipse.linuxtools.internal.cdt.autotools.core.wizards.NewAutotoolsProject">
+ <simple
+ name="name">
+ </simple>
+ <simple
+ external="true"
+ name="location"
+ nullable="true">
+ </simple>
+ <simple
+ name="artifactExtension">
+ </simple>
+ <simple
+ external="true"
+ name="isCProject">
+ </simple>
+ </processType>
+ <processType
+ name="SetAutotoolsStringOptionValue"
+ processRunner="org.eclipse.linuxtools.internal.cdt.autotools.core.wizards.SetAutotoolsStringOptionValue">
+ <simple
+ name="name">
+ </simple>
+ <complexArray
+ name="resourcePaths">
+ <baseType>
+ <simple
+ name="id">
+ </simple>
+ <simple
+ name="value">
+ </simple>
+ </baseType>
+ </complexArray>
+ </processType>
+ </extension>
+ <extension
+ point="org.eclipse.core.contenttype.contentTypes">
+ <content-type
+ id="org.eclipse.linuxtools.cdt.autotools.core.configureScript"
+ name="%ConfigureScript.name"
+ priority="high">
+ </content-type>
+ <content-type
+ id="org.eclipse.linuxtools.cdt.autotools.core.autogenScript"
+ name="%AutogenScript.name"
+ priority="high">
+ </content-type>
+ <file-association
+ content-type="org.eclipse.linuxtools.cdt.autotools.core.configureScript"
+ file-names="configure">
+ </file-association>
+ <file-association
+ content-type="org.eclipse.linuxtools.cdt.autotools.core.autogenScript"
+ file-names="autogen.sh">
+ </file-association>
+ </extension>
+</plugin>
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/cdt/autotools/core/AutotoolsNewProjectNature.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/cdt/autotools/core/AutotoolsNewProjectNature.java
new file mode 100644
index 0000000000..995fba179f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/cdt/autotools/core/AutotoolsNewProjectNature.java
@@ -0,0 +1,219 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Red Hat Inc.. and others
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat Incorporated - initial implementation
+ * IBM Rational Software - add and remove nature static methods
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.core;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
+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.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.AutotoolsConfigurationBuilder;
+
+public class AutotoolsNewProjectNature implements IProjectNature {
+
+ public static final String AUTOTOOLS_NATURE_ID = AutotoolsPlugin.getUniqueIdentifier() + ".autotoolsNatureV2"; //$NON-NLS-1$
+ public static final String OLD_AUTOTOOLS_NATURE_ID = "org.eclipse.linuxtools.cdt.autotools.autotoolsNature"; //$NON-NLS-1$
+ public final static String BUILDER_ID = ManagedBuilderCorePlugin.getUniqueIdentifier() + ".genmakebuilder"; //$NON-NLS-1$
+ public final static String OLD_AUTOTOOLS_BUILDER_ID = "org.eclipse.linuxtools.cdt.autotools.genmakebuilder"; //$NON-NLS-1$
+
+ private IProject project;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.resources.IProjectNature#configure()
+ */
+ public void configure() throws CoreException {
+ addAutotoolsBuilder(project, new NullProgressMonitor());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.resources.IProjectNature#deconfigure()
+ */
+ public void deconfigure() throws CoreException {
+ // TODO remove builder from here
+ }
+
+ /* (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;
+ }
+
+ /**
+ * Add the Autotools builder to the project
+ * @param project
+ * @param monitor
+ * @throws CoreException
+ */
+ public static void addAutotoolsBuilder(IProject project, IProgressMonitor monitor) throws CoreException {
+ // Add the builder to the project
+ IProjectDescription description = project.getDescription();
+ ICommand[] commands = description.getBuildSpec();
+ ArrayList<ICommand> commandList = new ArrayList<ICommand>();
+
+ // Make sure the Autotools Configuration builder just precedes the Common Builder
+ for (int i = 0; i < commands.length; i++) {
+ ICommand command = commands[i];
+ if (command.getBuilderName().equals(AutotoolsConfigurationBuilder.BUILDER_ID)) {
+ // ignore it
+ } else {
+ if (command.getBuilderName().equals(OLD_AUTOTOOLS_BUILDER_ID)) {
+ ICommand newCommand = description.newCommand();
+ newCommand.setBuilderName(BUILDER_ID);
+ command = newCommand;
+ }
+ if (command.getBuilderName().equals(BUILDER_ID)) {
+ // add Autotools Configuration builder just before builder
+ ICommand newCommand = description.newCommand();
+ newCommand.setBuilderName(AutotoolsConfigurationBuilder.BUILDER_ID);
+ commandList.add(newCommand);
+ }
+ commandList.add(command);
+ }
+ }
+ final ICommand[] newCommands = commandList.toArray(new ICommand[commandList.size()]);
+ if (newCommands.length == commands.length) {
+ boolean hasCorrectBuilderCommands = true;
+ for (int j = 0; j < commands.length; ++j) {
+ if (!commands[j].getBuilderName().equals(newCommands[j])) {
+ hasCorrectBuilderCommands = false;
+ break;
+ }
+ }
+ if (hasCorrectBuilderCommands)
+ return;
+ }
+ final ISchedulingRule rule = ResourcesPlugin.getWorkspace().getRoot();
+ final IProject proj = project;
+
+ Job backgroundJob = new Job("Autotools Set Project Description") {
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
+
+ public void run(IProgressMonitor monitor) throws CoreException {
+
+ IProjectDescription description = proj.getDescription();
+ description.setBuildSpec(newCommands);
+ proj.setDescription(description, new NullProgressMonitor());
+ }
+ }, rule, IWorkspace.AVOID_UPDATE, monitor);
+ } catch (CoreException e) {
+ return e.getStatus();
+ }
+ IStatus returnStatus = Status.OK_STATUS;
+ return returnStatus;
+ }
+ };
+ backgroundJob.setRule(rule);
+ backgroundJob.schedule();
+ }
+
+ /**
+ * Utility method for adding an autotools nature to a project.
+ *
+ * @param proj the project to add the autotools nature to.
+ * @param monitor a progress monitor to indicate the duration of the operation, or
+ * <code>null</code> if progress reporting is not required.
+ */
+ public static void addAutotoolsNature(IProject project, IProgressMonitor monitor) throws CoreException {
+ addNature(project, AUTOTOOLS_NATURE_ID, monitor);
+ }
+
+ /**
+ * Utility method for adding a nature to a project.
+ *
+ * @param proj the project to add the nature to.
+ * @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.
+ */
+ public static void addNature(IProject project, String natureId, IProgressMonitor monitor) throws CoreException {
+ IProjectDescription description = project.getDescription();
+ String[] prevNatures = description.getNatureIds();
+ for (int i = 0; i < prevNatures.length; i++) {
+ if (natureId.equals(prevNatures[i]))
+ return;
+ }
+ 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 to remove the autotools nature from a project.
+ *
+ * @param project to remove the autotools nature from
+ * @param mon progress monitor to indicate the duration of the operation, or
+ * <code>null</code> if progress reporting is not required.
+ * @throws CoreException
+ */
+ public static void removeAutotoolsNature(IProject project, IProgressMonitor mon) throws CoreException {
+ removeNature(project, AUTOTOOLS_NATURE_ID, mon);
+ }
+
+ /**
+ * Utility method to remove the old autotools nature from a project.
+ *
+ * @param project to remove the old autotools nature from
+ * @param mon progress monitor to indicate the duration of the operation, or
+ * <code>null</code> if progress reporting is not required.
+ * @throws CoreException
+ */
+ public static void removeOldAutotoolsNature(IProject project, IProgressMonitor mon) throws CoreException {
+ removeNature(project, OLD_AUTOTOOLS_NATURE_ID, mon);
+ }
+
+ /**
+ * 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.
+ */
+ public 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((String[])newNatures.toArray(new String[newNatures.size()]));
+ project.setDescription(description, monitor);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/cdt/autotools/core/AutotoolsPlugin.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/cdt/autotools/core/AutotoolsPlugin.java
new file mode 100644
index 0000000000..87ce42e177
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/cdt/autotools/core/AutotoolsPlugin.java
@@ -0,0 +1,291 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.core;
+
+import java.lang.reflect.InvocationTargetException;
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IManagedProject;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+
+public class AutotoolsPlugin extends AbstractUIPlugin {
+
+ //The shared instance.
+ private static AutotoolsPlugin plugin;
+ private ResourceBundle resourceBundle;
+
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.cdt.autotools.core"; //$NON-NLS-1$
+ public static final String AUTOTOOLS_PROJECT_TYPE_ID = PLUGIN_ID + ".projectType"; //$NON-NLS-1$
+
+ /**
+ * The constructor.
+ */
+ public AutotoolsPlugin() {
+ plugin = this;
+ try {
+ resourceBundle = ResourceBundle.getBundle(PLUGIN_ID + ".Resources"); //$NON-NLS-1$
+ } catch (MissingResourceException x) {
+ resourceBundle = null;
+ }
+
+ }
+
+ public static String getPluginId() {
+ return PLUGIN_ID;
+ }
+
+ public static String getUniqueIdentifier() {
+ if (getDefault() == null) {
+ // If the default instance is not yet initialized,
+ // return a static identifier. This identifier must
+ // match the plugin id defined in plugin.xml
+ return PLUGIN_ID;
+ }
+ return getDefault().getBundle().getSymbolicName();
+ }
+
+ /**
+ * This method is called upon plug-in activation
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /**
+ * This method is called when the plug-in is stopped
+ */
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ plugin = null;
+ }
+
+ /**
+ * Returns the shared instance.
+ */
+ public static AutotoolsPlugin getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Returns active shell.
+ */
+ public static Shell getActiveWorkbenchShell() {
+ IWorkbenchWindow window = getDefault().getWorkbench().getActiveWorkbenchWindow();
+ if (window != null) {
+ return window.getShell();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the string from the plugin's resource bundle,
+ * or 'key' if not found.
+ *
+ * @param key the message key
+ * @return the resource bundle message
+ */
+ public static String getResourceString(String key) {
+ ResourceBundle bundle = AutotoolsPlugin.getDefault().getResourceBundle();
+ try {
+ return bundle.getString(key);
+ } catch (MissingResourceException e) {
+ return key;
+ }
+ }
+
+ /**
+ * Returns the string from the plugin's resource bundle,
+ * or 'key' if not found.
+ *
+ * @param key the message key
+ * @param args an array of substituition strings
+ * @return the resource bundle message
+ */
+ public static String getFormattedString(String key, String[] args) {
+ return MessageFormat.format(getResourceString(key), (Object[])args);
+ }
+
+ /**
+ * Returns the plugin's resource bundle,
+ */
+ public ResourceBundle getResourceBundle() {
+ return resourceBundle;
+ }
+
+ public static boolean hasTargetBuilder(IProject project) {
+ try {
+ // When a project is converted to an Autotools project, we
+ // replace the ManagedMake builder with a special one that
+ // handles MakeTargets. If a project is brought into Eclipse and
+ // uses the New Project Wizard to create a ManagedMake project that
+ // is of type: Autotools, this added step is not done. If we know
+ // we have an Autotools project from the configuration id, then
+ // we should add the builder now. We also should replace the
+ // default ManagedMake scanner provider with the Autotools one,
+ // then return true.
+ if (project.getNature(ManagedCProjectNature.MNG_NATURE_ID) != null) {
+ IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+ IManagedProject m = info.getManagedProject();
+ if (m != null && m.getProjectType().getId().equals(AUTOTOOLS_PROJECT_TYPE_ID)) {
+ AutotoolsNewProjectNature.addAutotoolsBuilder(project, new NullProgressMonitor());
+ return true;
+ }
+ }
+ } catch (CoreException e) {
+ // Don't care...fall through to not found.
+ } catch (Exception f) {
+ // Don't care...fall through to not found.
+ }
+ // Otherwise not found.
+ return false;
+ }
+
+ /**
+ * 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 AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+
+ public static void log(IStatus status) {
+ ResourcesPlugin.getPlugin().getLog().log(status);
+ }
+
+ public static void logErrorMessage(String message) {
+ log(new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.ERROR, message, null));
+ }
+
+ public static void logException(Throwable e, final String title, String message) {
+ if (e instanceof InvocationTargetException) {
+ e = ((InvocationTargetException) e).getTargetException();
+ }
+ IStatus status = null;
+ if (e instanceof CoreException)
+ status = ((CoreException) e).getStatus();
+ else {
+ if (message == null)
+ message = e.getMessage();
+ if (message == null)
+ message = e.toString();
+ status = new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.OK, message, e);
+ }
+ ResourcesPlugin.getPlugin().getLog().log(status);
+ Display display;
+ display = Display.getCurrent();
+ if (display == null)
+ display = Display.getDefault();
+ final IStatus fstatus = status;
+ display.asyncExec(new Runnable() {
+ public void run() {
+ ErrorDialog.openError(null, title, null, fstatus);
+ }
+ });
+ }
+
+ public static void logException(Throwable e) {
+ logException(e, null, null);
+ }
+
+ public static void log(Throwable e) {
+ if (e instanceof InvocationTargetException)
+ e = ((InvocationTargetException) e).getTargetException();
+ IStatus status = null;
+ if (e instanceof CoreException)
+ status = ((CoreException) e).getStatus();
+ else
+ status = new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.OK, e.getMessage(), e);
+ log(status);
+ }
+
+ /**
+ * Utility method with conventions
+ */
+ public static void errorDialog(Shell shell, String title, String message, IStatus s) {
+ log(s);
+ // if the 'message' resource string and the IStatus' message are the same,
+ // don't show both in the dialog
+ if (s != null && message.equals(s.getMessage())) {
+ message = null;
+ }
+ ErrorDialog.openError(shell, title, message, s);
+ }
+
+ /**
+ * Utility method with conventions
+ */
+ public static void errorDialog(Shell shell, String title, String message, Throwable t) {
+ log(t);
+ IStatus status;
+ if (t instanceof CoreException) {
+ status = ((CoreException) t).getStatus();
+ // if the 'message' resource string and the IStatus' message are the same,
+ // don't show both in the dialog
+ if (status != null && message.equals(status.getMessage())) {
+ message = null;
+ }
+ } else {
+ status = new Status(IStatus.ERROR, AutotoolsPlugin.getUniqueIdentifier(), -1, "Internal Error: ", t); //$NON-NLS-1$
+ }
+ ErrorDialog.openError(shell, title, message, status);
+ }
+
+ /**
+ * Returns the workspace instance.
+ */
+ public static IWorkspace getWorkspace() {
+ return ResourcesPlugin.getWorkspace();
+ }
+
+ /**
+ * Returns the active workbench window or <code>null</code> if none
+ */
+ public static IWorkbenchWindow getActiveWorkbenchWindow() {
+ return getDefault().getWorkbench().getActiveWorkbenchWindow();
+ }
+
+ /**
+ * Returns the active workbench page or <code>null</code> if none.
+ */
+ public static IWorkbenchPage getActivePage() {
+ IWorkbenchWindow window= getActiveWorkbenchWindow();
+ if (window != null) {
+ return window.getActivePage();
+ }
+ return null;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/cdt/autotools/core/Resources.properties b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/cdt/autotools/core/Resources.properties
new file mode 100644
index 0000000000..3fd0d300f8
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/cdt/autotools/core/Resources.properties
@@ -0,0 +1,108 @@
+#################################################################################
+# Copyright (c) 2006, 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 Incorporated - initial API and implementation
+# IBM Rational Software - ManagedMakeMessages copied to AutotoolsMakefileBuilder
+#################################################################################
+MakeCWizard.title=C/Make Project
+MakeCWizard.description=Create a New C Project using 'make' to build it
+
+WARNING_UNSUPPORTED_CONFIGURATION=Warning: unsupported configuration
+
+AutotoolsMakefileBuilder.message.finished=Build complete for project {0}
+AutotoolsMakefileBuilder.message.stopped=Build stopped
+AutotoolsMakefileBuilder.type.clean=Clean-only build
+AutotoolsMakefileBuilder.message.clean.deleting.output=Removing build artifacts from {0}
+AutotoolsMakefileBuilder.message.console.header=**** {0} of configuration {1} for project {2} ****
+
+MakeGenerator.makefile.built=Makefile built
+MakeGenerator.refresh=Refresh
+MakeGenerator.refresh.error=Refresh error
+MakeGenerator.generation.error=Configuration failed with error
+MakeGenerator.configuring=Configuring
+MakeGenerator.make.message=Invoking {0} for project {1}
+MakeGenerator.config.error=Error {0} occurred while running {1}
+MakeGenerator.createdir.error=Error creating build directory: {0}
+MakeGenerator.run.config.status=Running config.status in build directory: {0}
+MakeGenerator.makefile.cvs=Invoking Makefile.cvs in build directory: {0}
+MakeGenerator.autogen.sh=Invoking autogen.sh in build directory: {0}
+MakeGenerator.autoreconf=Invoking autoreconf in build directory: {0}
+MakeGenerator.gen.makefile=Generating Makefile in build directory: {0}
+MakeGenerator.clean.builddir=Cleaning build directory: {0}
+MakeGenerator.clean.topdir=Cleaning top-level source directory to allow other configuration to run
+MakeGenerator.gen.configure=Generating configure
+MakeGenerator.unsupportedConfig=Warning: unsupported configuration {0}
+MakeGenerator.success=[Operation successful]
+MakeGenerator.didnt.generate=No Makefile generated
+MakeGenerator.refresh.MakeTargets=Refreshing Make Targets
+
+BuildDir.apply=Build directory already in use
+BuildDir.default=Default build directory to unused value?
+BuildDir.yes=Yes
+BuildDir.no=No
+
+WizardAutotoolsProjectConversion.title=Convert to CVS C/C++ Autotools Project
+WizardAutotoolsProjectConversion.description=Convert a CVS source repository to C/C++ Autotools Project
+WizardAutotoolsProjectConversion.message.add_nature=Adding C/C++ Autotools Managed Project Nature
+WizardAutotoolsProjectConversion.message.add_builder=Adding C/C++ Autotools Managed Project Builder
+WizardMakeProjectConversion.monitor.convertingToMakeProject=Converting Project...
+WizardAutotoolsConversion=CVS C/C++ Autotools Conversion
+WizardAutotoolsConversion.windowTitle=Conversion to CVS C/C++ Autotools Project
+WizardAutotoolsConversion.config.title=Select a configuration
+WizardAutotoolsConversion.config.desc=Select the configuration you wish to deploy on
+WizardAutotoolsConversion.options.title=Additional Project Settings
+WizardAutotoolsConversion.options.desc=Define the inter-project dependencies, if any.
+WizardAutotoolsConversion.message.save=Saving new build options
+
+WizardAutotoolsNewCProject.title=Autotools C Project
+WizardAutotoolsNewCProject.description=Create a new C Autotools project
+WizardAutotoolsNewCProject.monitor.creatingProject=Creating Project...
+WizardAutotoolsNewCProject.windowTitle=GNU Autotools C Project
+WizardAutotoolsNewCProject.config.title=Select a configuration
+WizardAutotoolsNewCProject.config.desc=Select the configuration you wish to deploy on
+WizardAutotoolsNewCProject.options.title=Additional Project Settings
+WizardAutotoolsNewCProject.options.desc=Define the inter-project dependencies, if any.
+WizardAutotoolsNewCProject.message.save=Saving new build options
+
+WizardAutotoolsNewCProjectV2.title=Autotools C Project V2
+WizardAutotoolsNewCProjectV2.description=Create a new C Autotools project
+WizardAutotoolsNewCProjectV2.monitor.creatingProject=Creating Project...
+WizardAutotoolsNewCProjectV2.windowTitle=GNU Autotools C Project V2
+WizardAutotoolsNewCProjectV2.config.title=Select a configuration
+WizardAutotoolsNewCProjectV2.config.desc=Select the configuration you wish to deploy on
+WizardAutotoolsNewCProjectV2.options.title=Additional Project Settings
+WizardAutotoolsNewCProjectV2.options.desc=Define the inter-project dependencies, if any.
+WizardAutotoolsNewCProjectV2.message.save=Saving new build options
+
+WizardAutotoolsNewCCProject.title=Autotools C++ Project
+WizardAutotoolsNewCCProject.description=Create a new C++ Autotools project
+WizardAutotoolsNewCCProject.monitor.creatingProject=Creating Project...
+WizardAutotoolsNewCCProject.windowTitle=GNU Autotools C++ Project
+WizardAutotoolsNewCCProject.config.title=Select a configuration
+WizardAutotoolsNewCCProject.config.desc=Select the configuration you wish to deploy on
+WizardAutotoolsNewCCProject.options.title=Additional Project Settings
+WizardAutotoolsNewCCProject.options.desc=Define the inter-project dependencies, if any.
+WizardAutotoolsNewCCProject.message.save=Saving new build options
+
+
+BuildTargetDialog.title.buildTarget=Build Special Targets
+BuildTargetDialog.title.makeTargetsFor=Make targets for
+BuildTargetDialog.button.build=Build
+
+TargetListViewer.button.add=Add...
+TargetListViewer.button.remove=Remove
+TargetListViewer.button.edit=Edit...
+TargetListViewer.label.target=Target
+TargetListViewer.label.location=Location
+TargetListViewer.exception.error=Error
+TargetListViewer.exception.message=An error occurred performing the selected action
+
+AutotoolsPreferencePage.useAutotoolsFileScanner.label=Use make -w for includepath scanning
+MakeTargetPreferencePage.buildTargetInBackground.label=Build target in background
+
+SetAutotoolsStringOptionValue.error=SetAutotoolsStringOptionValue failure: {0}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsConfigurationBuilder.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsConfigurationBuilder.java
new file mode 100644
index 0000000000..f034de2e8f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsConfigurationBuilder.java
@@ -0,0 +1,159 @@
+package org.eclipse.linuxtools.internal.cdt.autotools.core;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Map;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.resources.ACBuilder;
+import org.eclipse.cdt.core.resources.IConsole;
+import org.eclipse.cdt.managedbuilder.core.IBuilder;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IMultiConfiguration;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+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.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsPlugin;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.AutotoolsConfigurationManager;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.IAConfiguration;
+
+public class AutotoolsConfigurationBuilder extends ACBuilder {
+
+ public static final String BUILDER_NAME = "genmakebuilderV2"; //$NON-NLS-1$
+ public static final String BUILDER_ID = AutotoolsPlugin.getUniqueIdentifier() + "." + BUILDER_NAME; //$NON-NLS-1$
+
+ private static final String BUILD_STOPPED="AutotoolsMakefileBuilder.message.stopped"; //$NON-NLS-1$
+ private AutotoolsNewMakeGenerator generator;
+
+ public AutotoolsConfigurationBuilder() {
+ super();
+ generator = new AutotoolsNewMakeGenerator();
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ protected IProject[] build(int kind, Map args, IProgressMonitor monitor)
+ throws CoreException {
+ IProject project = getProject();
+
+ boolean bPerformBuild = true;
+ IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+ if (!shouldBuild(kind, info)) {
+ return new IProject[0];
+ }
+ if (kind == IncrementalProjectBuilder.AUTO_BUILD) {
+ IResourceDelta delta = getDelta(getProject());
+ if (delta != null) {
+ IResource res = delta.getResource();
+ if (res != null) {
+ bPerformBuild = res.getProject().equals(getProject());
+ }
+ } else {
+ bPerformBuild = false;
+ }
+ IConfiguration cfg = info.getDefaultConfiguration();
+ if (cfg != null) {
+ IAConfiguration acfg = AutotoolsConfigurationManager.getInstance().findCfg(project, cfg.getName());
+ if (acfg == null || acfg.isDirty())
+ bPerformBuild = true;
+ }
+ }
+ if (bPerformBuild) {
+ MultiStatus result = performMakefileGeneration(project, info, monitor);
+ if (result.getSeverity() == IStatus.ERROR) {
+ // Failure to create Makefile, output error message to console.
+ IConsole console = CCorePlugin.getDefault().getConsole();
+ console.start(project);
+
+ OutputStream cos = console.getOutputStream();
+ String errormsg = AutotoolsPlugin.getResourceString(BUILD_STOPPED);
+ StringBuffer buf = new StringBuffer(errormsg);
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ buf.append("(").append(result.getMessage()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ try {
+ cos.write(buf.toString().getBytes());
+ cos.flush();
+ cos.close();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ AutotoolsPlugin.log(e);
+ }
+ }
+ }
+ checkCancel(monitor);
+ return getProject().getReferencedProjects();
+ }
+
+ @Override
+ protected void clean(IProgressMonitor monitor) throws CoreException {
+ IProject project = getProject();
+ final IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(getProject());
+ if (shouldBuild(CLEAN_BUILD, info)) {
+ IConfiguration icfg = info.getDefaultConfiguration();
+ if (icfg instanceof IMultiConfiguration) {
+ IMultiConfiguration mcfg = (IMultiConfiguration)icfg;
+ IConfiguration[] cfgs = (IConfiguration[])mcfg.getItems();
+ for (int i = 0; i < cfgs.length; ++i) {
+ IAConfiguration cfg = AutotoolsConfigurationManager.getInstance().getConfiguration(project, icfg.getName());
+ cfg.setDirty(true);
+ }
+ } else {
+ IAConfiguration cfg = AutotoolsConfigurationManager.getInstance().getConfiguration(project, icfg.getName());
+ cfg.setDirty(true); // Mark Configuration dirty so next build will do full reconfigure
+ }
+ }
+ }
+
+ protected MultiStatus performMakefileGeneration(IProject project, IManagedBuildInfo info,
+ IProgressMonitor monitor) throws CoreException {
+ MultiStatus result;
+
+ try {
+ generator.initialize(project, info, monitor);
+ result = generator.regenerateMakefiles(false);
+ } catch (CoreException e) {
+ String errMsg = AutotoolsPlugin.getResourceString("MakeGenerator.didnt.generate"); //$NON-NLS-1$
+ result = new MultiStatus(AutotoolsPlugin.getUniqueIdentifier(), IStatus.ERROR,
+ errMsg, e);
+ }
+
+ return result;
+ }
+
+ /**
+ * Check whether the build has been canceled.
+ */
+ public void checkCancel(IProgressMonitor monitor) {
+ if (monitor != null && monitor.isCanceled())
+ throw new OperationCanceledException();
+ }
+
+ protected boolean shouldBuild(int kind, IManagedBuildInfo info) {
+ IConfiguration cfg = info.getDefaultConfiguration();
+ IBuilder builder = null;
+ if (cfg != null) {
+ builder = cfg.getEditableBuilder();
+ switch (kind) {
+ case IncrementalProjectBuilder.AUTO_BUILD :
+ return true;
+ case IncrementalProjectBuilder.INCREMENTAL_BUILD : // now treated as the same!
+ case IncrementalProjectBuilder.FULL_BUILD :
+ return builder.isFullBuildEnabled() | builder.isIncrementalBuildEnabled() ;
+ case IncrementalProjectBuilder.CLEAN_BUILD :
+ return builder.isCleanBuildEnabled();
+ }
+ }
+ return true;
+ }
+
+}
+
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java
new file mode 100644
index 0000000000..da0826735c
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java
@@ -0,0 +1,1325 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.core;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.CommandLauncher;
+import org.eclipse.cdt.core.ConsoleOutputStream;
+import org.eclipse.cdt.core.ICDescriptor;
+import org.eclipse.cdt.core.envvar.IEnvironmentVariable;
+import org.eclipse.cdt.core.resources.IConsole;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.settings.model.ICStorageElement;
+import org.eclipse.cdt.make.core.IMakeBuilderInfo;
+import org.eclipse.cdt.make.core.IMakeTarget;
+import org.eclipse.cdt.make.core.IMakeTargetManager;
+import org.eclipse.cdt.make.core.MakeCorePlugin;
+import org.eclipse.cdt.make.core.makefile.IMakefile;
+import org.eclipse.cdt.make.core.makefile.ITarget;
+import org.eclipse.cdt.make.core.makefile.ITargetRule;
+import org.eclipse.cdt.managedbuilder.core.BuildException;
+import org.eclipse.cdt.managedbuilder.core.IBuilder;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IMultiConfiguration;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
+import org.eclipse.cdt.managedbuilder.macros.BuildMacroException;
+import org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider;
+import org.eclipse.cdt.newmake.core.IMakeCommonBuildInfo;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceStatus;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsPlugin;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.AutotoolsConfigurationManager;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.IAConfiguration;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.IConfigureOption;
+
+
+@SuppressWarnings("deprecation")
+public class AutotoolsNewMakeGenerator extends MarkerGenerator {
+
+ public final String CONFIG_STATUS = "config.status"; //$NON-NLS-1$
+ public final String MAKEFILE = "Makefile"; //$NON-NLS-1$
+ public final String MAKEFILE_CVS = "Makefile.cvs"; //$NON-NLS-1$
+ public final String SETTINGS_FILE_NAME = ".cdtconfigure"; //$NON-NLS-1$
+ public final String SHELL_COMMAND = "sh"; //$NON-NLS-1$
+
+ public final String AUTOGEN_TOOL_ID = "autogen"; //$NON-NLS-1$
+ public final String CONFIGURE_TOOL_ID = "configure"; //$NON-NLS-1$
+
+ public final String GENERATED_TARGET = AutotoolsPlugin.PLUGIN_ID + ".generated.MakeTarget"; //$NON-NLS-1$
+
+ private static final String MAKE_TARGET_KEY = MakeCorePlugin.getUniqueIdentifier() + ".buildtargets"; //$NON-NLS-1$
+ private static final String BUILD_TARGET_ELEMENT = "buildTargets"; //$NON-NLS-1$
+ private static final String TARGET_ELEMENT = "target"; //$NON-NLS-1$
+ private static final String TARGET_ATTR_ID = "targetID"; //$NON-NLS-1$
+ private static final String TARGET_ATTR_PATH = "path"; //$NON-NLS-1$
+ private static final String TARGET_ATTR_NAME = "name"; //$NON-NLS-1$
+ private static final String TARGET_STOP_ON_ERROR = "stopOnError"; //$NON-NLS-1$
+ private static final String TARGET_USE_DEFAULT_CMD = "useDefaultCommand"; //$NON-NLS-1$
+ private static final String TARGET_ARGUMENTS = "buildArguments"; //$NON-NLS-1$
+ private static final String TARGET_COMMAND = "buildCommand"; //$NON-NLS-1$
+ private static final String TARGET_RUN_ALL_BUILDERS = "runAllBuilders";
+ private static final String TARGET = "buildTarget"; //$NON-NLS-1$
+ private static final String DEFAULT_AUTORECONF = "autoreconf"; //$NON-NLS-1$
+
+ private IProject project;
+
+ private IProgressMonitor monitor;
+
+ private IPath buildLocation;
+ private String buildDir;
+ private String srcDir;
+ private String winOSType = "";
+
+ private IConfiguration cfg;
+ private ICConfigurationDescription cdesc;
+ private IAConfiguration toolsCfg;
+ private IBuilder builder;
+
+ public void generateDependencies() throws CoreException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public MultiStatus generateMakefiles(IResourceDelta delta)
+ throws CoreException {
+ return regenerateMakefiles(false);
+ }
+
+ private void initializeBuildConfigDirs(IConfiguration c, IAConfiguration a) {
+ IBuilder b = c.getBuilder();
+ IPath buildDirectory = b.getBuildLocation();
+ if (buildDirectory == null || buildDirectory.isEmpty()) {
+ // default build directory to project directory
+ buildDirectory = project.getLocation();
+ }
+ buildLocation = buildDirectory;
+ buildDir = buildDirectory.toString();
+ srcDir = a.getConfigToolDirectory();
+ try {
+ String resolved = ManagedBuildManager.getBuildMacroProvider().resolveValue(srcDir, "", null,
+ IBuildMacroProvider.CONTEXT_CONFIGURATION, c);
+ srcDir = resolved;
+ } catch (BuildMacroException e) {
+ // do nothing
+ }
+ }
+
+ public void initialize(IProject project, IManagedBuildInfo info,
+ IProgressMonitor monitor) {
+ this.project = project;
+ ICProjectDescription pdesc = CCorePlugin.getDefault().getProjectDescription(project);
+ this.cdesc = pdesc.getActiveConfiguration();
+ this.cfg = info.getDefaultConfiguration();
+ this.builder = cfg.getBuilder();
+ this.monitor = monitor;
+ CUIPlugin.getDefault().getPreferenceStore().getString("dummy");
+ }
+
+ public IProject getProject() {
+ return project;
+ }
+
+ public boolean isGeneratedResource(IResource resource) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void regenerateDependencies(boolean force) throws CoreException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /*
+ * (non-Javadoc) Check whether the build has been cancelled. Cancellation
+ * requests propagated to the caller by throwing <code>OperationCanceledException</code>.
+ *
+ * @see org.eclipse.core.runtime.OperationCanceledException#OperationCanceledException()
+ */
+ protected void checkCancel() {
+ if (monitor != null && monitor.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+ }
+
+ /*
+ * (non-Javadoc) Return or create the makefile needed for the build. If we
+ * are creating the resource, set the derived bit to true so the CM system
+ * ignores the contents. If the resource exists, respect the existing
+ * derived setting.
+ *
+ * @param makefilePath @return IFile
+ */
+ protected IFile createFile(IPath makefilePath) throws CoreException {
+ // Create or get the handle for the makefile
+ IWorkspaceRoot root = CCorePlugin.getWorkspace().getRoot();
+ IFile newFile = root.getFileForLocation(makefilePath);
+ if (newFile == null) {
+ newFile = root.getFile(makefilePath);
+ }
+ // Create the file if it does not exist
+ ByteArrayInputStream contents = new ByteArrayInputStream(new byte[0]);
+ try {
+ newFile.create(contents, false, new SubProgressMonitor(monitor, 1));
+ // Make sure the new file is marked as derived
+ if (!newFile.isDerived()) {
+ newFile.setDerived(true);
+ }
+
+ } catch (CoreException e) {
+ // If the file already existed locally, just refresh to get contents
+ if (e.getStatus().getCode() == IResourceStatus.PATH_OCCUPIED)
+ newFile.refreshLocal(IResource.DEPTH_ZERO, null);
+ else
+ throw e;
+ }
+
+ return newFile;
+ }
+
+ /*
+ * Create a directory
+ *
+ * @param boolean @return whether the directory was created
+ */
+ private boolean createDirectory(String dirName) throws CoreException {
+ // Create or get the handle for the build directory
+ IPath path = new Path(dirName);
+ boolean rc = true;
+ if (dirName.length() == 0 || dirName.equals("."))
+ path = project.getLocation().append(dirName);
+ File f = path.toFile();
+ if (!f.exists())
+ rc = f.mkdirs();
+
+ return rc;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator#getMakefileName()
+ */
+ public String getMakefileName() {
+ return new String(MAKEFILE);
+ }
+
+ /**
+ * Reconfigure the project.
+ * @return MultiStatus status of regeneration operation
+ * @throws CoreException
+ */
+ public MultiStatus reconfigure() throws CoreException {
+ return regenerateMakefiles(true);
+ }
+
+ public MultiStatus regenerateMakefiles(boolean reconfigure) throws CoreException {
+ MultiStatus status = null;
+ if (cfg instanceof IMultiConfiguration) {
+ IMultiConfiguration mfcg = (IMultiConfiguration)cfg;
+ Object[] objs = mfcg.getItems();
+ for (int i = 0; i < objs.length; ++i) {
+ IConfiguration icfg = (IConfiguration)objs[i];
+ Status rc = regenerateMakefiles(icfg, reconfigure);
+ if (!rc.isOK()) {
+ if(status == null){
+ status = new MultiStatus(
+ AutotoolsPlugin.getUniqueIdentifier(),
+ IStatus.ERROR,
+ new String(),
+ null);
+ }
+ status.add(rc);
+ }
+ }
+ } else {
+ Status rc = regenerateMakefiles(cfg, reconfigure);
+ if (!rc.isOK()) {
+ if(status == null){
+ status = new MultiStatus(
+ AutotoolsPlugin.getUniqueIdentifier(),
+ IStatus.ERROR,
+ new String(),
+ null);
+ }
+ status.add(rc);
+ }
+ }
+ if(status == null){
+ status = new MultiStatus(
+ ManagedBuilderCorePlugin.getUniqueIdentifier(),
+ IStatus.OK,
+ new String(),
+ null);
+ }
+ return status;
+ }
+
+ private Status regenerateMakefiles(IConfiguration icfg, boolean reconfigure) throws CoreException {
+ Status status;
+ int rc = IStatus.OK;
+ String errMsg = new String();
+ boolean needFullConfigure = false;
+
+ // See if the user has cancelled the build
+ checkCancel();
+
+ // Synchronize the Autotools configurations with the Project Description
+ AutotoolsConfigurationManager.getInstance().syncConfigurations(getProject());
+ toolsCfg = AutotoolsConfigurationManager.getInstance().getConfiguration(getProject(), icfg.getId());
+
+ initializeBuildConfigDirs(icfg, toolsCfg);
+ // Create the top-level directory for the build output
+ if (!createDirectory(buildDir)) {
+ rc = IStatus.ERROR;
+ errMsg = AutotoolsPlugin.getFormattedString("MakeGenerator.createdir.error", //$NON-NLS-1$
+ new String[] {buildDir});
+ status = new MultiStatus(AutotoolsPlugin
+ .getUniqueIdentifier(), rc, errMsg, null);
+ }
+ checkCancel();
+
+ // // How did we do
+ // if (!getInvalidDirList().isEmpty()) {
+ // status = new MultiStatus (
+ // ManagedBuilderCorePlugin.getUniqueIdentifier(),
+ // IStatus.WARNING,
+ // new String(),
+ // null);
+ // // Add a new status for each of the bad folders
+ // iter = getInvalidDirList().iterator();
+ // while (iter.hasNext()) {
+ // status.add(new Status (
+ // IStatus.WARNING,
+ // ManagedBuilderCorePlugin.getUniqueIdentifier(),
+ // SPACES_IN_PATH,
+ // ((IContainer)iter.next()).getFullPath().toString(),
+ // null));
+ // }
+ // } else {
+ // status = new MultiStatus(
+ // ManagedBuilderCorePlugin.getUniqueIdentifier(),
+ // IStatus.OK,
+ // new String(),
+ // null);
+ // }
+
+ // Get a build console for the project
+ IConsole console = CCorePlugin.getDefault().getConsole("org.eclipse.linuxtools.cdt.autotools.ui.configureConsole"); //$NON-NLS-1$
+ boolean consoleStart = true;
+
+ // Make sure there's a monitor to cancel the build
+ if (monitor == null) {
+ monitor = new NullProgressMonitor();
+ }
+
+ try {
+ // If a config.status file exists in the build directory, we call it
+ // to
+ // regenerate the makefile
+ IPath configfile = buildLocation.append(CONFIG_STATUS);
+ IPath topConfigFile = project.getLocation().append(CONFIG_STATUS);
+ IPath makefilePath = buildLocation.append(MAKEFILE);
+ IPath topMakefilePath = project.getLocation().append(MAKEFILE);
+ File configStatus = configfile.toFile();
+ File topConfigStatus = topConfigFile.toFile();
+ File makefile = makefilePath.toFile();
+ File topMakefile = topMakefilePath.toFile();
+
+ // Check if a configure has been done in the top-level source directory
+ if (!(configfile.equals(topConfigFile)) && topConfigStatus.exists()) {
+ // Must perform distclean on source directory because 2nd configuration
+ // cannot occur otherwise
+ // There is a make target for cleaning.
+ if (topMakefile != null && topMakefile.exists()) {
+ String[] makeargs = new String[1];
+ IPath makeCmd = new Path("make"); //$NON-NLS-1$
+ String target = null;
+ try {
+ target = getProject().getPersistentProperty(AutotoolsPropertyConstants.CLEAN_MAKE_TARGET);
+ } catch (CoreException ce) {
+ // do nothing
+ }
+ if (target == null)
+ target = AutotoolsPropertyConstants.CLEAN_MAKE_TARGET_DEFAULT;
+ String args = builder.getBuildArguments();
+ if (args != null && !(args = args.trim()).equals("")) { //$NON-NLS-1$
+ String[] newArgs = makeArray(args);
+ makeargs = new String[newArgs.length + 1];
+ System.arraycopy(newArgs, 0, makeargs, 0, newArgs.length);
+ }
+ makeargs[makeargs.length - 1] = target;
+ rc = runCommand(makeCmd,
+ project.getLocation(),
+ makeargs,
+ AutotoolsPlugin.getResourceString("MakeGenerator.clean.topdir"), //$NON-NLS-1$
+ errMsg, console, consoleStart);
+ consoleStart = false;
+ }
+ }
+ // If the active configuration is dirty, then we need to do a full
+ // reconfigure.
+ if (toolsCfg.isDirty() || reconfigure) {
+ needFullConfigure = true;
+ // If we are going to do a full reconfigure, then if the current
+ // build directory exists, we should clean it out first. This is
+ // because the reconfiguration could change compile flags, etc..
+ // and the Makefile might not detect a rebuild is required. In
+ // addition, the build directory itself could have been changed and
+ // we should remove the previous build.
+ if (buildLocation != null && buildLocation.toFile().exists()) {
+ // See what type of cleaning the user has set up in the
+ // build properties dialog.
+ String cleanDelete = null;
+ try {
+ cleanDelete = getProject().getPersistentProperty(AutotoolsPropertyConstants.CLEAN_DELETE);
+ } catch (CoreException ce) {
+ // do nothing
+ }
+
+ if (cleanDelete != null && cleanDelete.equals(AutotoolsPropertyConstants.TRUE))
+ buildLocation.toFile().delete();
+ else {
+ // There is a make target for cleaning.
+ if (makefile != null && makefile.exists()) {
+ String[] makeargs = new String[1];
+ IPath makeCmd = new Path("make"); //$NON-NLS-1$
+ String target = null;
+ try {
+ target = getProject().getPersistentProperty(AutotoolsPropertyConstants.CLEAN_MAKE_TARGET);
+ } catch (CoreException ce) {
+ // do nothing
+ }
+ if (target == null)
+ target = AutotoolsPropertyConstants.CLEAN_MAKE_TARGET_DEFAULT;
+ String args = builder.getBuildArguments();
+ if (args != null && !(args = args.trim()).equals("")) { //$NON-NLS-1$
+ String[] newArgs = makeArray(args);
+ makeargs = new String[newArgs.length + 1];
+ System.arraycopy(newArgs, 0, makeargs, 0, newArgs.length);
+ }
+ makeargs[makeargs.length - 1] = target;
+ rc = runCommand(makeCmd,
+ buildLocation,
+ makeargs,
+ AutotoolsPlugin.getFormattedString("MakeGenerator.clean.builddir", new String[]{buildDir}), //$NON-NLS-1$
+ errMsg, console, consoleStart);
+ consoleStart = false;
+ }
+ }
+ }
+ // Mark the scanner info as dirty.
+ try {
+ project.setSessionProperty(AutotoolsPropertyConstants.SCANNER_INFO_DIRTY, Boolean.TRUE);
+ } catch (CoreException ce) {
+ // do nothing
+ }
+ }
+
+ ArrayList<String> configureEnvs = new ArrayList<String>();
+ ArrayList<String> configureCmdParms = new ArrayList<String>();
+ IPath configurePath = getConfigurePath(configureEnvs, configureCmdParms);
+ String[] configArgs = getConfigArgs(configureCmdParms);
+ ArrayList<String> autogenEnvs = new ArrayList<String>();
+ ArrayList<String> autogenCmdParms = new ArrayList<String>();
+ IPath autogenPath = getAutogenPath(autogenEnvs, autogenCmdParms);
+
+ // Check if we have a config.status (meaning configure has already run).
+ if (!needFullConfigure && configStatus != null && configStatus.exists()) {
+ // If no corresponding Makefile in the same build location, then we
+ // can simply run config.status again to ensure the top level Makefile has been
+ // created.
+ if (makefile == null || !makefile.exists()) {
+ rc = runScript(configfile, buildLocation, null,
+ AutotoolsPlugin.getFormattedString("MakeGenerator.run.config.status", new String[]{buildDir}), //$NON-NLS-1$
+ errMsg, console, null, consoleStart);
+ consoleStart = false;
+ }
+ }
+ // Look for configure and configure from scratch
+ else if (configurePath.toFile().exists()) {
+ rc = runScript(configurePath,
+ buildLocation,
+ configArgs,
+ AutotoolsPlugin.getFormattedString("MakeGenerator.gen.makefile", new String[]{buildDir}), //$NON-NLS-1$
+ errMsg, console, configureEnvs, consoleStart);
+ consoleStart = false;
+ if (rc != IStatus.ERROR) {
+ File makefileFile = buildLocation.append(MAKEFILE).toFile();
+ addMakeTargetsToManager(makefileFile);
+ // TODO: should we do something special if configure doesn't
+ // return ok?
+ toolsCfg.setDirty(false);
+ }
+ }
+ // If no configure, look for autogen.sh which may create configure and
+ // possibly even run it.
+ else if (autogenPath.toFile().exists()) {
+ // Remove the existing config.status file since we use it
+ // to figure out if configure was run.
+ if (configStatus.exists())
+ configStatus.delete();
+ // Get any user-specified arguments for autogen.
+ String[] autogenArgs = getAutogenArgs(autogenCmdParms);
+ rc = runScript(autogenPath,
+ autogenPath.removeLastSegments(1), autogenArgs,
+ AutotoolsPlugin.getFormattedString("MakeGenerator.autogen.sh", new String[]{buildDir}), //$NON-NLS-1$
+ errMsg, console, autogenEnvs, consoleStart);
+ consoleStart = false;
+ if (rc != IStatus.ERROR) {
+ configStatus = configfile.toFile();
+ // Check for config.status. If it is created, then
+ // autogen.sh ran configure and we should not run it
+ // ourselves.
+ if (configStatus == null || !configStatus.exists()) {
+ rc = runScript(configurePath,
+ buildLocation,
+ configArgs,
+ AutotoolsPlugin.getFormattedString("MakeGenerator.gen.makefile", new String[]{buildDir}), //$NON-NLS-1$
+ errMsg, console, configureEnvs, false);
+ if (rc != IStatus.ERROR) {
+ File makefileFile = buildLocation.append(MAKEFILE).toFile();
+ addMakeTargetsToManager(makefileFile);
+ toolsCfg.setDirty(false);
+ }
+ } else {
+ File makefileFile = buildLocation.append(MAKEFILE).toFile();
+ addMakeTargetsToManager(makefileFile);
+ toolsCfg.setDirty(false);
+ }
+ }
+ }
+ // If nothing this far, look for a Makefile.cvs file which needs to be run.
+ else if (makefileCvsExists()) {
+ String[] makeargs = new String[1];
+ IPath makeCmd = new Path("make"); //$NON-NLS-1$
+ makeargs[0] = "-f" + getMakefileCVSPath().toOSString(); //$NON-NLS-1$
+ rc = runCommand(makeCmd,
+ project.getLocation().append(buildDir),
+ makeargs,
+ AutotoolsPlugin.getFormattedString("MakeGenerator.makefile.cvs", new String[]{buildDir}), //$NON-NLS-1$
+ errMsg, console, consoleStart);
+ consoleStart = false;
+ if (rc != IStatus.ERROR) {
+ File makefileFile = project.getLocation().append(buildDir)
+ .append(MAKEFILE).toFile();
+ addMakeTargetsToManager(makefileFile);
+ toolsCfg.setDirty(false);
+ }
+ }
+ // If nothing this far, try running autoreconf -i
+ else {
+ String[] reconfArgs = new String[1];
+ String reconfCmd = project.getPersistentProperty(AutotoolsPropertyConstants.AUTORECONF_TOOL);
+ if (reconfCmd == null)
+ reconfCmd = DEFAULT_AUTORECONF;
+ IPath reconfCmdPath = new Path(reconfCmd);
+ reconfArgs[0] = "-i"; //$NON-NLS-1$
+ rc = runCommand(reconfCmdPath,
+ project.getLocation().append(srcDir),
+ reconfArgs,
+ AutotoolsPlugin.getFormattedString("MakeGenerator.autoreconf", new String[]{buildDir}), //$NON-NLS-1$
+ errMsg, console, consoleStart);
+ consoleStart = false;
+ // Check if configure generated and if yes, run it.
+ if (rc != IStatus.ERROR) {
+ if (configurePath.toFile().exists()) {
+ rc = runScript(configurePath,
+ buildLocation,
+ configArgs,
+ AutotoolsPlugin.getFormattedString("MakeGenerator.gen.makefile", new String[]{buildDir}), //$NON-NLS-1$
+ errMsg, console, configureEnvs, false);
+ if (rc != IStatus.ERROR) {
+ File makefileFile = buildLocation.append(MAKEFILE).toFile();
+ addMakeTargetsToManager(makefileFile);
+ // TODO: should we do something special if configure doesn't
+ // return ok?
+ toolsCfg.setDirty(false);
+ }
+ }
+ }
+ }
+ // If we didn't create a Makefile, consider that an error.
+ if (makefile == null || !makefile.exists()) {
+ rc = IStatus.ERROR;
+ errMsg = AutotoolsPlugin.getResourceString("MakeGenerator.didnt.generate"); //$NON-NLS-1$
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ // forgetLastBuiltState();
+ rc = IStatus.ERROR;
+ } finally {
+ // getGenerationProblems().clear();
+ status = new MultiStatus(AutotoolsPlugin
+ .getUniqueIdentifier(), rc, errMsg, null);
+ }
+ return status;
+ }
+
+ /**
+ * Strip a command of VAR=VALUE pairs that appear ahead or behind the command and add
+ * them to a list of environment variables.
+ *
+ * @param command - command to strip
+ * @param envVars - ArrayList to add environment variables to
+ * @return stripped command
+ */
+ public static String stripEnvVars(String command, ArrayList<String> envVars) {
+ Pattern p = Pattern.compile("(\\w+[=]([$]?\\w+[:;]?)+\\s+)\\w+.*");
+ Pattern p2 = Pattern.compile("(\\w+[=]\\\".*?\\\"\\s+)\\w+.*");
+ Pattern p3 = Pattern.compile("(\\w+[=]'.*?'\\s+)\\w+.*");
+ Pattern p4 = Pattern.compile("\\w+\\s+(\\w+[=]([$]?\\w+[:;]?)+).*");
+ Pattern p5 = Pattern.compile("\\w+\\s+(\\w+[=]\\\".*?\\\"\\s*)+.*");
+ Pattern p6 = Pattern.compile("\\w+\\s+(\\w+[=]'.*?'\\s*)+.*");
+ boolean finished = false;
+ while (!finished) {
+ Matcher m = p.matcher(command);
+ if (m.matches()) {
+ command = command.replaceFirst("\\w+[=]([$]?\\w+[:;]?)+", "").trim();
+ envVars.add(m.group(1).trim());
+ } else {
+ Matcher m2 = p2.matcher(command);
+ if (m2.matches()) {
+ command = command.replaceFirst("\\w+[=]\\\".*?\\\"","").trim();
+ String s = m2.group(1).trim();
+ envVars.add(s.replaceAll("\\\"", ""));
+ } else {
+ Matcher m3 = p3.matcher(command);
+ if (m3.matches()) {
+ command = command.replaceFirst("\\w+[=]'.*?'", "").trim();
+ String s = m3.group(1).trim();
+ envVars.add(s.replaceAll("'", ""));
+ } else {
+ Matcher m4 = p4.matcher(command);
+ if (m4.matches()) {
+ command = command.replaceFirst("\\w+[=]([$]?\\w+[:;]?)+", "").trim();
+ envVars.add(m4.group(1).trim());
+ } else {
+ Matcher m5 = p5.matcher(command);
+ if (m5.matches()) {
+ command = command.replaceFirst("\\w+[=]\\\".*?\\\"","").trim();
+ String s = m5.group(1).trim();
+ envVars.add(s.replaceAll("\\\"", ""));
+ } else {
+ Matcher m6 = p6.matcher(command);
+ if (m6.matches()) {
+ command = command.replaceFirst("\\w+[=]'.*?'", "").trim();
+ String s = m6.group(1).trim();
+ envVars.add(s.replaceAll("'", ""));
+ } else {
+ finished = true;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return command;
+ }
+
+ protected IPath getConfigurePath(ArrayList<String> envVars, ArrayList<String> cmdParms) {
+ IPath configPath;
+ IConfigureOption configOption = toolsCfg.getOption(CONFIGURE_TOOL_ID);
+ String command = "configure"; // $NON-NLS-1$
+ if (configOption != null)
+ command = stripEnvVars(configOption.getValue().trim(), envVars);
+
+ String[] tokens = command.split("\\s");
+ if (tokens.length > 1) {
+ command = tokens[0];
+ for (int i = 1; i < tokens.length; ++i)
+ cmdParms.add(tokens[i]);
+ }
+ if (srcDir.equals(""))
+ configPath = project.getLocation().append(command);
+ else
+ configPath = project.getLocation().append(srcDir).append(command);
+ return configPath;
+ }
+
+ protected IPath getMakefileCVSPath() {
+ IPath makefileCVSPath;
+ if (srcDir.equals(""))
+ makefileCVSPath = project.getLocation().append(MAKEFILE_CVS);
+ else
+ makefileCVSPath= project.getLocation().append(srcDir).append(
+ MAKEFILE_CVS);
+ return makefileCVSPath;
+ }
+
+ protected boolean makefileCvsExists() {
+ IPath makefileCVSPath = getMakefileCVSPath();
+ return makefileCVSPath.toFile().exists();
+ }
+
+ protected IPath getAutogenPath(ArrayList<String> envVars, ArrayList<String> cmdParms) {
+ IPath autogenPath;
+ IConfigureOption autogenOption = toolsCfg.getOption(AUTOGEN_TOOL_ID);
+ String command = "autogen.sh"; // $NON-NLS-1$
+ if (autogenOption != null)
+ command = stripEnvVars(autogenOption.getValue().trim(), envVars);
+
+ String[] tokens = command.split("\\s");
+ if (tokens.length > 1) {
+ command = tokens[0];
+ for (int i = 1; i < tokens.length; ++i)
+ cmdParms.add(tokens[i]);
+ }
+
+ if (srcDir.equals(""))
+ autogenPath = project.getLocation().append(command);
+ else
+ autogenPath = project.getLocation().append(srcDir).append(command);
+ return autogenPath;
+ }
+
+ private String[] getAutogenArgs(ArrayList<String> cmdParms) {
+ // Get the arguments to be passed to config from build model
+ ArrayList<String> autogenArgs = toolsCfg.getToolArgs(AUTOGEN_TOOL_ID);
+ cmdParms.addAll(autogenArgs);
+ return cmdParms.toArray(new String[cmdParms.size()]);
+ }
+
+ private String[] getConfigArgs(ArrayList<String> cmdParms) {
+ // Get the arguments to be passed to config from build model
+ ArrayList<String> configArgs = toolsCfg.getToolArgs(CONFIGURE_TOOL_ID);
+ cmdParms.addAll(configArgs);
+ return cmdParms.toArray(new String[cmdParms.size()]);
+ }
+
+ // Run a command or executable (e.g. make).
+ private int runCommand(IPath commandPath, IPath runPath, String[] args,
+ String jobDescription, String errMsg, IConsole console,
+ boolean consoleStart) throws BuildException, CoreException,
+ NullPointerException, IOException {
+
+ int rc = IStatus.OK;
+
+ removeAllMarkers(project);
+
+ String[] configTargets = args;
+ if (args == null)
+ configTargets = new String[0];
+
+ for (int i = 0; i < configTargets.length; ++i) {
+ // try to resolve the build macros in any argument
+ try{
+ String resolved =
+ ManagedBuildManager.getBuildMacroProvider().resolveValueToMakefileFormat(
+ configTargets[i],
+ "", //$NON-NLS-1$
+ " ", //$NON-NLS-1$
+ IBuildMacroProvider.CONTEXT_CONFIGURATION,
+ cfg);
+ configTargets[i] = resolved;
+ } catch (BuildMacroException e) {
+ }
+ }
+
+ String[] msgs = new String[2];
+ msgs[0] = commandPath.toString();
+ msgs[1] = project.getName();
+ monitor.subTask(AutotoolsPlugin.getFormattedString(
+ "MakeGenerator.make.message", msgs)); //$NON-NLS-1$
+
+
+ ConsoleOutputStream consoleOutStream = null;
+ StringBuffer buf = new StringBuffer();
+
+ // Launch command - main invocation
+ if (consoleStart)
+ console.start(project);
+ consoleOutStream = console.getOutputStream();
+ String[] consoleHeader = new String[3];
+
+ consoleHeader[0] = jobDescription;
+ consoleHeader[1] = toolsCfg.getId();
+ consoleHeader[2] = project.getName();
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ buf.append(jobDescription);
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+
+ consoleOutStream.write(buf.toString().getBytes());
+ consoleOutStream.flush();
+
+ // Get a launcher for the config command
+ CommandLauncher launcher = new CommandLauncher();
+ // Set the environment
+ IEnvironmentVariable variables[] =
+ CCorePlugin.getDefault().getBuildEnvironmentManager().getVariables(cdesc, true);
+ String[] env = null;
+ ArrayList<String> envList = new ArrayList<String>();
+ if (variables != null) {
+ for (int i = 0; i < variables.length; i++) {
+ envList.add(variables[i].getName()
+ + "=" + variables[i].getValue()); //$NON-NLS-1$
+ }
+ env = (String[]) envList.toArray(new String[envList.size()]);
+ }
+
+ // // Hook up an error parser manager
+ // String[] errorParsers =
+ // info.getDefaultConfiguration().getErrorParserList();
+ // ErrorParserManager epm = new ErrorParserManager(project, topBuildDir,
+ // this, errorParsers);
+ // epm.setOutputStream(consoleOutStream);
+ OutputStream stdout = consoleOutStream;
+ OutputStream stderr = consoleOutStream;
+
+ launcher.showCommand(true);
+ Process proc = launcher.execute(commandPath, configTargets, env,
+ runPath, new NullProgressMonitor());
+ if (proc != null) {
+ try {
+ // Close the input of the process since we will never write to
+ // it
+ proc.getOutputStream().close();
+ } catch (IOException e) {
+ }
+
+ if (launcher.waitAndRead(stdout, stderr, new SubProgressMonitor(
+ monitor, IProgressMonitor.UNKNOWN)) != CommandLauncher.OK) {
+ errMsg = launcher.getErrorMessage();
+ }
+
+ // Force a resync of the projects without allowing the user to
+ // cancel.
+ // This is probably unkind, but short of this there is no way to
+ // ensure
+ // the UI is up-to-date with the build results
+ // monitor.subTask(ManagedMakeMessages
+ // .getResourceString(REFRESH));
+ monitor.subTask(AutotoolsPlugin.getResourceString("MakeGenerator.refresh")); //$NON-NLS-1$
+ try {
+ project.refreshLocal(IResource.DEPTH_INFINITE, null);
+ } catch (CoreException e) {
+ monitor.subTask(AutotoolsPlugin
+ .getResourceString("MakeGenerator.refresh.error")); //$NON-NLS-1$
+ }
+ } else {
+ errMsg = launcher.getErrorMessage();
+ }
+
+ // Report either the success or failure of our mission
+ buf = new StringBuffer();
+ if (errMsg != null && errMsg.length() > 0) {
+ String errorDesc = AutotoolsPlugin
+ .getResourceString("MakeGenerator.generation.error"); //$NON-NLS-1$
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
+ buf.append(errorDesc);
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
+ buf.append("(").append(errMsg).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
+ rc = IStatus.ERROR;
+ } else if (proc.exitValue() >= 1 || proc.exitValue() < 0) {
+ // We have an invalid return code from configuration.
+ String[] errArg = new String[2];
+ errArg[0] = Integer.toString(proc.exitValue());
+ errArg[1] = commandPath.toString();
+ errMsg = AutotoolsPlugin.getFormattedString(
+ "MakeGenerator.config.error", errArg); //$NON-NLS-1$
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
+ buf.append(AutotoolsPlugin.getResourceString("MakeGenerator.generation.error")); //$NON-NLS-1$
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
+ if (proc.exitValue() == 1)
+ rc = IStatus.WARNING;
+ else
+ rc = IStatus.ERROR;
+ } else {
+ // Report a successful build
+ String successMsg =
+ AutotoolsPlugin.getResourceString("MakeGenerator.success"); //$NON-NLS-1$
+ buf.append(successMsg);
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
+ rc = IStatus.OK;
+ }
+
+ // Write message on the console
+ consoleOutStream.write(buf.toString().getBytes());
+ consoleOutStream.flush();
+
+ // // Generate any error markers that the build has discovered
+ // monitor.subTask(ManagedMakeMessages
+ // .getResourceString(MARKERS));
+ // epm.reportProblems();
+ consoleOutStream.close();
+
+ // TODO: For now, add a marker with our generated error message.
+ // In the future, we might add an error parser to do this properly
+ // and give the actual error line, etc..
+ if (rc == IStatus.ERROR) {
+ addMarker(project, -1, errMsg, SEVERITY_ERROR_BUILD, null);
+ }
+
+ return rc;
+ }
+
+ // Method to get the Win OS Type to distinguish between Cygwin and MingW
+ private String getWinOSType() {
+ if (winOSType.equals("")) {
+ try {
+ CommandLauncher launcher = new CommandLauncher();
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ launcher.execute(
+ new Path(SHELL_COMMAND), //$NON-NLS-1$
+ new String[] { "-c", "echo $OSTYPE" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new String[0],
+ new Path("."), //$NON-NLS-1$
+ new NullProgressMonitor());
+ if (launcher.waitAndRead(out, out) == CommandLauncher.OK)
+ winOSType = out.toString().trim();
+ } catch (CoreException e) {
+ // do nothing
+ }
+ }
+ return winOSType;
+ }
+
+ // Get the path string. We add a Win check to handle MingW.
+ // For MingW, we would rather represent C:\a\b as /C/a/b which
+ // doesn't cause Makefile to choke. For Cygwin we use /cygdrive/C/a/b
+ private String getPathString(IPath path) {
+ String s = path.toString();
+ if (Platform.getOS().equals(Platform.OS_WIN32)) {
+ if (getWinOSType().equals("cygwin")) {
+ s = s.replaceAll("^([A-Z])(:)", "/cygdrive/$1");
+ } else {
+ s = s.replaceAll("^([A-Z])(:)", "/$1");
+ }
+ }
+ return s;
+ }
+
+ // Run an autotools script (e.g. configure, autogen.sh, config.status).
+ private int runScript(IPath commandPath, IPath runPath, String[] args,
+ String jobDescription, String errMsg, IConsole console,
+ ArrayList<String> additionalEnvs,
+ boolean consoleStart) throws BuildException, CoreException,
+ NullPointerException, IOException {
+
+ int rc = IStatus.OK;
+
+ removeAllMarkers(project);
+
+ // We want to run the script via the shell command. So, we add the command
+ // script as the first argument and expect "sh" to be on the runtime path.
+ // Any other arguments are placed after the script name.
+ String[] configTargets = null;
+ if (args == null)
+ configTargets = new String[1];
+ else {
+ configTargets = new String[args.length+1];
+ System.arraycopy(args, 0, configTargets, 1, args.length);
+ }
+ configTargets[0] = getPathString(commandPath);
+
+ for (int i = 0; i < configTargets.length; ++i) {
+ // try to resolve the build macros in any argument
+ try{
+ String resolved =
+ ManagedBuildManager.getBuildMacroProvider().resolveValueToMakefileFormat(
+ configTargets[i],
+ "", //$NON-NLS-1$
+ " ", //$NON-NLS-1$
+ IBuildMacroProvider.CONTEXT_CONFIGURATION,
+ cfg);
+ configTargets[i] = resolved;
+ } catch (BuildMacroException e) {
+ }
+ }
+
+ String[] msgs = new String[2];
+ msgs[0] = commandPath.toString();
+ msgs[1] = project.getName();
+ monitor.subTask(AutotoolsPlugin.getFormattedString(
+ "MakeGenerator.make.message", msgs)); //$NON-NLS-1$
+
+
+ ConsoleOutputStream consoleOutStream = null;
+ StringBuffer buf = new StringBuffer();
+
+ // Launch command - main invocation
+ if (consoleStart)
+ console.start(project);
+ consoleOutStream = console.getOutputStream();
+ String[] consoleHeader = new String[3];
+
+ consoleHeader[0] = jobDescription;
+ consoleHeader[1] = toolsCfg.getId();
+ consoleHeader[2] = project.getName();
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ buf.append(jobDescription);
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+
+ consoleOutStream.write(buf.toString().getBytes());
+ consoleOutStream.flush();
+
+ // Get a launcher for the config command
+ CommandLauncher launcher = new CommandLauncher();
+ // Set the environment
+ IEnvironmentVariable variables[] =
+ CCorePlugin.getDefault().getBuildEnvironmentManager().getVariables(cdesc, true);
+ String[] env = null;
+ ArrayList<String> envList = new ArrayList<String>();
+ if (variables != null) {
+ for (int i = 0; i < variables.length; i++) {
+ envList.add(variables[i].getName()
+ + "=" + variables[i].getValue()); //$NON-NLS-1$
+ }
+ if (additionalEnvs != null)
+ envList.addAll(additionalEnvs); // add any additional environment variables specified ahead of script
+ env = (String[]) envList.toArray(new String[envList.size()]);
+ }
+
+ // // Hook up an error parser manager
+ // String[] errorParsers =
+ // info.getDefaultConfiguration().getErrorParserList();
+ // ErrorParserManager epm = new ErrorParserManager(project, topBuildDir,
+ // this, errorParsers);
+ // epm.setOutputStream(consoleOutStream);
+ OutputStream stdout = consoleOutStream;
+ OutputStream stderr = consoleOutStream;
+
+ launcher.showCommand(true);
+ // Run the shell script via shell command.
+ Process proc = launcher.execute(new Path(SHELL_COMMAND), configTargets, env,
+ runPath, new NullProgressMonitor());
+ if (proc != null) {
+ try {
+ // Close the input of the process since we will never write to
+ // it
+ proc.getOutputStream().close();
+ } catch (IOException e) {
+ }
+
+ if (launcher.waitAndRead(stdout, stderr, new SubProgressMonitor(
+ monitor, IProgressMonitor.UNKNOWN)) != CommandLauncher.OK) {
+ errMsg = launcher.getErrorMessage();
+ }
+
+ // Force a resync of the projects without allowing the user to
+ // cancel.
+ // This is probably unkind, but short of this there is no way to
+ // ensure
+ // the UI is up-to-date with the build results
+ // monitor.subTask(ManagedMakeMessages
+ // .getResourceString(REFRESH));
+ monitor.subTask(AutotoolsPlugin.getResourceString("MakeGenerator.refresh")); //$NON-NLS-1$
+ try {
+ project.refreshLocal(IResource.DEPTH_INFINITE, null);
+ } catch (CoreException e) {
+ monitor.subTask(AutotoolsPlugin
+ .getResourceString("MakeGenerator.refresh.error")); //$NON-NLS-1$
+ }
+ } else {
+ errMsg = launcher.getErrorMessage();
+ }
+
+ // Report either the success or failure of our mission
+ buf = new StringBuffer();
+ if (errMsg != null && errMsg.length() > 0) {
+ String errorDesc = AutotoolsPlugin
+ .getResourceString("MakeGenerator.generation.error"); //$NON-NLS-1$
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
+ buf.append(errorDesc);
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
+ buf.append("(").append(errMsg).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
+ rc = IStatus.ERROR;
+ } else if (proc.exitValue() >= 1 || proc.exitValue() < 0) {
+ // We have an invalid return code from configuration.
+ String[] errArg = new String[2];
+ errArg[0] = Integer.toString(proc.exitValue());
+ errArg[1] = commandPath.toString();
+ errMsg = AutotoolsPlugin.getFormattedString(
+ "MakeGenerator.config.error", errArg); //$NON-NLS-1$
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
+ buf.append(AutotoolsPlugin.getResourceString("MakeGenerator.generation.error")); //$NON-NLS-1$
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
+ if (proc.exitValue() == 1)
+ rc = IStatus.WARNING;
+ else
+ rc = IStatus.ERROR;
+ } else {
+ // Report a successful build
+ String successMsg =
+ AutotoolsPlugin.getResourceString("MakeGenerator.success"); //$NON-NLS-1$
+ buf.append(successMsg);
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
+ rc = IStatus.OK;
+ }
+
+ // Write message on the console
+ consoleOutStream.write(buf.toString().getBytes());
+ consoleOutStream.flush();
+
+ // // Generate any error markers that the build has discovered
+ // monitor.subTask(ManagedMakeMessages
+ // .getResourceString(MARKERS));
+ // epm.reportProblems();
+ consoleOutStream.close();
+
+ // TODO: For now, add a marker with our generated error message.
+ // In the future, we might add an error parser to do this properly
+ // and give the actual error line, etc..
+ if (rc == IStatus.ERROR) {
+ addMarker(project, -1, errMsg, SEVERITY_ERROR_BUILD, null);
+ }
+
+ return rc;
+ }
+
+ private ICStorageElement createTargetElement(ICStorageElement parent, IMakeTarget target) {
+ ICStorageElement targetElem = parent.createChild(TARGET_ELEMENT);
+ targetElem.setAttribute(TARGET_ATTR_NAME, target.getName());
+ targetElem.setAttribute(TARGET_ATTR_ID, target.getTargetBuilderID());
+ targetElem.setAttribute(TARGET_ATTR_PATH, target.getContainer().getProjectRelativePath().toString());
+ ICStorageElement elem = targetElem.createChild(TARGET_COMMAND);
+ elem.setValue(target.getBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND, "make")); //$NON-NLS-1$
+
+ String targetAttr = target.getBuildAttribute(IMakeCommonBuildInfo.BUILD_ARGUMENTS, null);
+ if ( targetAttr != null) {
+ elem = targetElem.createChild(TARGET_ARGUMENTS);
+ elem.setValue(targetAttr);
+ }
+
+ targetAttr = target.getBuildAttribute(IMakeTarget.BUILD_TARGET, null);
+ if (targetAttr != null) {
+ elem = targetElem.createChild(TARGET);
+ elem.setValue(targetAttr);
+ }
+
+ elem = targetElem.createChild(TARGET_STOP_ON_ERROR);
+ elem.setValue(new Boolean(target.isStopOnError()).toString());
+
+ elem = targetElem.createChild(TARGET_USE_DEFAULT_CMD);
+ elem.setValue(new Boolean(target.isDefaultBuildCmd()).toString());
+
+ elem = targetElem.createChild(TARGET_RUN_ALL_BUILDERS);
+ elem.setValue(new Boolean(target.runAllBuilders()).toString());
+
+ return targetElem;
+ }
+
+ /**
+ * This output method saves the information into the .cdtproject metadata file.
+ *
+ * @param doc
+ * @throws CoreException
+ */
+ private void saveTargets(IMakeTarget[] makeTargets) throws CoreException {
+ // FIXME: fix this when MakeTargetManager fixes its code.
+ ICDescriptor descriptor = CCorePlugin.getDefault().getCProjectDescription(getProject(), true);
+ ICStorageElement rootElement = descriptor.getProjectStorageElement(MAKE_TARGET_KEY);
+
+ //Nuke the children since we are going to write out new ones
+ rootElement.clear();
+
+ // Fetch the ProjectTargets as ICStorageElements
+ rootElement = rootElement.createChild(BUILD_TARGET_ELEMENT);
+ for (int i = 0; i < makeTargets.length; ++i)
+ createTargetElement(rootElement, makeTargets[i]);
+
+ //Save the results
+ descriptor.saveProjectData();
+ }
+
+ protected class MakeTargetComparator implements Comparator<Object> {
+ public int compare(Object a, Object b) {
+ IMakeTarget make1 = (IMakeTarget)a;
+ IMakeTarget make2 = (IMakeTarget)b;
+ return make1.getName().compareToIgnoreCase(make2.getName());
+ }
+
+ }
+
+ /**
+ * This method parses the given Makefile and produces MakeTargets for all targets so the
+ * end-user can access them from the MakeTargets popup-menu.
+ *
+ * @param makefileFile the Makefile to parse
+ * @throws CoreException
+ */
+ private void addMakeTargetsToManager(File makefileFile) throws CoreException {
+ // We don't bother if the Makefile wasn't created.
+ if (makefileFile == null || !makefileFile.exists())
+ return;
+
+ checkCancel();
+ if (monitor == null)
+ monitor = new NullProgressMonitor();
+ String statusMsg = AutotoolsPlugin.getResourceString("MakeGenerator.refresh.MakeTargets"); //$NON-NLS-1$
+ monitor.subTask(statusMsg);
+
+ IMakeTargetManager makeTargetManager =
+ MakeCorePlugin.getDefault().getTargetManager();
+
+ IMakefile makefile = MakeCorePlugin.createMakefile(makefileFile.toURI(), false, null);
+ ITargetRule[] targets = makefile.getTargetRules();
+ ITarget target = null;
+ Map<String, IMakeTarget> makeTargets = new HashMap<String, IMakeTarget>(); // use a HashMap so duplicate names are handled
+ String[] id = makeTargetManager.getTargetBuilders(getProject());
+ if (id.length == 0) {
+ return;
+ }
+ String targetBuildID = id[0];
+ IMakeBuilderInfo buildInfo = MakeCorePlugin.createBuildInfo(getProject(),
+ makeTargetManager.getBuilderID(targetBuildID));
+ boolean isStopOnError = buildInfo.isStopOnError();
+ IPath buildCommand = buildInfo.getBuildCommand();
+ String defaultBuildCommand = buildCommand.toString();
+ String buildArguments = buildInfo.getBuildArguments();
+ for (int i = 0; i < targets.length; i++) {
+ target = targets[i].getTarget();
+ String targetName = target.toString();
+ if (!isValidTarget(targetName, makeTargetManager))
+ continue;
+ try {
+ IMakeTarget makeTarget = makeTargetManager.findTarget(project, targetName);
+ if (makeTarget == null)
+ makeTarget = makeTargetManager.createTarget(
+ project, targetName, targetBuildID);
+ makeTarget.setContainer(project);
+ makeTarget.setStopOnError(isStopOnError);
+ makeTarget.setRunAllBuilders(false);
+ makeTarget.setUseDefaultBuildCmd(true);
+ makeTarget.setBuildAttribute(IMakeTarget.BUILD_ARGUMENTS, buildArguments);
+ makeTarget.setBuildAttribute(IMakeTarget.BUILD_COMMAND, defaultBuildCommand);
+
+ makeTarget.setBuildAttribute(GENERATED_TARGET, "true");
+ makeTarget.setBuildAttribute(IMakeTarget.BUILD_TARGET,
+ targetName);
+
+ //TODO: should this be raw build directory in macro form?
+ makeTarget.setBuildAttribute(IMakeTarget.BUILD_LOCATION,
+ buildDir);
+ makeTargets.put(makeTarget.getName(), makeTarget);
+ } catch (CoreException e) {
+ // Duplicate target. Ignore.
+ }
+ }
+
+ IMakeTarget[] makeTargetArray = new IMakeTarget[makeTargets.size()];
+ Collection<IMakeTarget> values = makeTargets.values();
+ ArrayList<IMakeTarget> valueList = new ArrayList<IMakeTarget>(values);
+ valueList.toArray(makeTargetArray);
+ MakeTargetComparator compareMakeTargets = new MakeTargetComparator();
+ Arrays.sort(makeTargetArray, compareMakeTargets);
+
+ // Check if we have MakeTargetManager patch which adds the ability
+ // to save multiple targets at once. If yes, use it as it updates
+ // the MakeTargets now. Otherwise, fall back to old method which
+ // saves the targets externally..requiring closing the project and
+ // reopening to see them.
+ Class<? extends IMakeTargetManager> c = makeTargetManager.getClass();
+ boolean targetsAdded = false;
+ try {
+ Method m = c.getMethod("setTargets", IContainer.class, IMakeTarget[].class);
+ m.invoke(makeTargetManager, project, makeTargetArray);
+ targetsAdded = true;
+ } catch (NoSuchMethodException e) {
+ // ignore and use fail-safe saveTargets method
+ } catch (IllegalArgumentException e) {
+ // ignore and use fail-safe saveTargets method
+ } catch (IllegalAccessException e) {
+ // ignore and use fail-safe saveTargets method
+ } catch (InvocationTargetException e) {
+ // ignore and use fail-safe saveTargets method
+ }
+ if (!targetsAdded)
+ saveTargets(makeTargetArray);
+ }
+
+ private boolean isValidTarget(String targetName, IMakeTargetManager makeTargetManager) {
+ return !(targetName.endsWith("-am") //$NON-NLS-1$
+ || targetName.endsWith("PROGRAMS") //$NON-NLS-1$
+ || targetName.endsWith("-generic") //$NON-NLS-1$
+ || (targetName.indexOf('$') >= 0)
+ || (targetName.charAt(0) == '.')
+ || targetName.equals(targetName.toUpperCase()));
+ }
+
+ // Turn the string into an array.
+ private String[] makeArray(String string) {
+ string = string.trim();
+ char[] array = string.toCharArray();
+ ArrayList<String> aList = new ArrayList<String>();
+ StringBuilder buffer = new StringBuilder();
+ boolean inComment = false;
+ for (int i = 0; i < array.length; i++) {
+ char c = array[i];
+ boolean needsToAdd = true;
+ if (array[i] == '"' || array[i] == '\'') {
+ if (i > 0 && array[i - 1] == '\\') {
+ inComment = false;
+ } else {
+ inComment = !inComment;
+ needsToAdd = false; // skip it
+ }
+ }
+ if (c == ' ' && !inComment) {
+ if (buffer.length() > 0){
+ String str = buffer.toString().trim();
+ if(str.length() > 0){
+ aList.add(str);
+ }
+ }
+ buffer = new StringBuilder();
+ } else {
+ if (needsToAdd)
+ buffer.append(c);
+ }
+ }
+ if (buffer.length() > 0){
+ String str = buffer.toString().trim();
+ if(str.length() > 0){
+ aList.add(str);
+ }
+ }
+ return (String[])aList.toArray(new String[aList.size()]);
+ }
+} \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsPropertyConstants.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsPropertyConstants.java
new file mode 100644
index 0000000000..af3aac27ae
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsPropertyConstants.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.core;
+
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsPlugin;
+
+
+public class AutotoolsPropertyConstants {
+
+ static final String PREFIX = AutotoolsPlugin.getUniqueIdentifier() + "."; // $NON-NLS-1$
+ static final String PREFIX_COMPAT = "org.eclipse.linuxtools.cdt.autotools."; // $NON-NLS-1$
+ public static final String AUTOMAKE_VERSION_STRING = "AutoconfEditorAutomakeVersion"; // $NON-NLS-1$
+ public static final QualifiedName AUTOMAKE_VERSION = new QualifiedName(PREFIX, AUTOMAKE_VERSION_STRING);
+ public static final QualifiedName AUTOMAKE_VERSION_COMPAT = new QualifiedName(PREFIX_COMPAT, AUTOMAKE_VERSION_STRING);
+ public static final String AUTOCONF_VERSION_STRING = "AutoconfEditorAutoconfVersion"; // $NON-NLS-1$
+ public static final QualifiedName AUTOCONF_VERSION = new QualifiedName(PREFIX, AUTOCONF_VERSION_STRING);
+ public static final QualifiedName AUTOCONF_VERSION_COMPAT = new QualifiedName(PREFIX_COMPAT, AUTOCONF_VERSION_STRING);
+ public static final String AUTOCONF_MACRO_VERSIONING = "AutoconfEditorMacroVersioning"; // $NON-NLS-1$
+ public static final QualifiedName AUTOCONF_TOOL = new QualifiedName(PREFIX, "AutoconfToolPath"); // $NON-NLS-1$
+ public static final QualifiedName AUTOMAKE_TOOL = new QualifiedName(PREFIX, "AutomakeToolPath"); // $NON-NLS-1$
+ public static final QualifiedName ACLOCAL_TOOL = new QualifiedName(PREFIX, "AclocalToolPath"); // $NON-NLS-1$
+ public static final QualifiedName AUTOHEADER_TOOL = new QualifiedName(PREFIX, "AutoheaderToolPath"); // $NON-NLS-1$
+ public static final QualifiedName AUTORECONF_TOOL = new QualifiedName(PREFIX, "AutoreconfToolPath"); // $NON-NLS-1$
+ public static final QualifiedName LIBTOOLIZE_TOOL = new QualifiedName(PREFIX, "LibtoolizePath"); // $NON-NLS-1$
+ public static final QualifiedName CLEAN_DELETE = new QualifiedName(PREFIX, "CleanDelete"); // $NON-NLS-1$
+ public static final QualifiedName CLEAN_MAKE_TARGET = new QualifiedName(PREFIX, "CleanMakeTarget"); // $NON-NLS-1$
+ public static final QualifiedName SCANNER_USE_MAKE_W = new QualifiedName(PREFIX, "ScannerUseMakeW");
+ public static final QualifiedName AUTO_BUILD_NAME = new QualifiedName(PREFIX, "AutoBuildName"); // $NON-NLS-1$
+ public static final QualifiedName OPEN_INCLUDE = new QualifiedName(PREFIX, "IncludeResourceMapping"); // $NON-NLS-1$
+ public static final QualifiedName OPEN_INCLUDE_P = new QualifiedName(PREFIX, "PersistentIncludeResourceMapping"); //$NON-NLS-1$
+ public static final QualifiedName SCANNER_INFO_DIRTY = new QualifiedName(PREFIX, "ScannerInfoDirty"); // $NON-NLSp-1$
+
+ public static String[] fACVersions = {"2.13", "2.59", "2.61"}; // $NON-NLS-1$
+ public static final String LATEST_AC_VERSION = fACVersions[fACVersions.length - 1];
+
+ public static String[] fAMVersions = {"1.4-p6", "1.9.5", "1.9.6"}; // $NON-NLS-1$
+ public static final String LATEST_AM_VERSION = fAMVersions[fAMVersions.length - 1];
+
+ public static final String CLEAN_MAKE_TARGET_DEFAULT = "distclean"; // $NON-NLS-1$
+
+ public static final String TRUE = "true"; // $NON-NLS-1$
+ public static final String FALSE = "false"; // $NON-NLS-1$
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/DefaultNoDependencyCalculator.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/DefaultNoDependencyCalculator.java
new file mode 100644
index 0000000000..1eed38fc71
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/DefaultNoDependencyCalculator.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 IBM Corporation 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:
+ * IBM - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.core;
+
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.makegen.IManagedDependencyGenerator;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+
+/**
+ * This is the dependency calculator used by the makefile generation system when
+ * nothing is defined for a tool.
+ *
+ * @since 2.0
+ */
+@SuppressWarnings("deprecation")
+public class DefaultNoDependencyCalculator implements IManagedDependencyGenerator {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderDependencyCalculator#findDependencies(org.eclipse.core.resources.IResource, org.eclipse.core.resources.IProject)
+ */
+ public IResource[] findDependencies(IResource resource, IProject project) {
+ // Never answers any dependencies
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderDependencyCalculator#getCalculatorType()
+ */
+ public int getCalculatorType() {
+ return TYPE_NODEPS;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderDependencyCalculator#getDependencyCommand(org.eclipse.core.resources.IResource)
+ */
+ public String getDependencyCommand(IResource resource, IManagedBuildInfo info) {
+ // Never answers this call with an actual value
+ return null;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/IConfigurationCloneListener.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/IConfigurationCloneListener.java
new file mode 100644
index 0000000000..34ce8379a6
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/IConfigurationCloneListener.java
@@ -0,0 +1,12 @@
+package org.eclipse.linuxtools.internal.cdt.autotools.core;
+
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+
+public interface IConfigurationCloneListener {
+ /**
+ * Notified when a configuration gets cloned.
+ * @param cloneName - name of the cloned configuration
+ * @param c - the clone
+ */
+ public void cloneCfg(String cloneName, IConfiguration c);
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/MakeMessages.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/MakeMessages.java
new file mode 100644
index 0000000000..05cfe3c1ed
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/MakeMessages.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2004 QNX Software Systems 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:
+ * QNX Software Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.core;
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class MakeMessages {
+
+ private static final String RESOURCE_BUNDLE= MakeMessages.class.getName();
+ private static ResourceBundle fgResourceBundle;
+ static {
+ try {
+ fgResourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE);
+ } catch (MissingResourceException x) {
+ fgResourceBundle = null;
+ }
+ }
+
+ private MakeMessages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ } catch (NullPointerException e) {
+ return "#" + key + "#"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * Gets a string from the resource bundle and formats it with the argument
+ *
+ * @param key the string used to get the bundle value, must not be null
+ */
+ public static String getFormattedString(String key, Object arg) {
+ return MessageFormat.format(getString(key), new Object[] { arg });
+ }
+
+ /**
+ * Gets a string from the resource bundle and formats it with arguments
+ */
+ public static String getFormattedString(String key, Object[] args) {
+ return MessageFormat.format(getString(key), args);
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/MarkerGenerator.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/MarkerGenerator.java
new file mode 100644
index 0000000000..3e6982acff
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/MarkerGenerator.java
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.core;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.IMarkerGenerator;
+import org.eclipse.cdt.core.ProblemMarkerInfo;
+import org.eclipse.cdt.core.model.ICModelMarker;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.runtime.CoreException;
+
+public abstract class MarkerGenerator implements IMarkerGenerator {
+
+ /**
+ * Constructor for MarkerGenerator
+ */
+ public MarkerGenerator() {
+ super();
+ }
+
+ /*
+ * callback from Output Parser
+ */
+ public void addMarker(IResource file, int lineNumber, String errorDesc, int severity, String errorVar) {
+
+ try {
+ IMarker[] cur = file.findMarkers(ICModelMarker.C_MODEL_PROBLEM_MARKER, false, IResource.DEPTH_ONE);
+ /*
+ * Try to find matching markers and don't put in duplicates
+ */
+ if ((cur != null) && (cur.length > 0)) {
+ for (int i = 0; i < cur.length; i++) {
+ int line = ((Integer) cur[i].getAttribute(IMarker.LOCATION)).intValue();
+ int sev = ((Integer) cur[i].getAttribute(IMarker.SEVERITY)).intValue();
+ String mesg = (String) cur[i].getAttribute(IMarker.MESSAGE);
+ if (line == lineNumber && sev == mapMarkerSeverity(severity) && mesg.equals(errorDesc)) {
+ return;
+ }
+ }
+ }
+
+ IMarker marker = file.createMarker(ICModelMarker.C_MODEL_PROBLEM_MARKER);
+ marker.setAttribute(IMarker.LOCATION, lineNumber);
+ marker.setAttribute(IMarker.MESSAGE, errorDesc);
+ marker.setAttribute(IMarker.SEVERITY, mapMarkerSeverity(severity));
+ marker.setAttribute(IMarker.LINE_NUMBER, lineNumber);
+ marker.setAttribute(IMarker.CHAR_START, -1);
+ marker.setAttribute(IMarker.CHAR_END, -1);
+ if (errorVar != null) {
+ marker.setAttribute(ICModelMarker.C_MODEL_MARKER_VARIABLE, errorVar);
+ }
+ }
+ catch (CoreException e) {
+ CCorePlugin.log(e.getStatus());
+ }
+
+ }
+
+ public abstract IProject getProject();
+
+ /*
+ * callback from Output Parser
+ */
+ public void addMarker(ProblemMarkerInfo problemMarkerInfo) {
+ try {
+ IResource markerResource = problemMarkerInfo.file ;
+ if (markerResource==null) {
+ markerResource = getProject();
+ }
+ IMarker[] cur = markerResource.findMarkers(ICModelMarker.C_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_ONE);
+ /*
+ * Try to find matching markers and don't put in duplicates
+ */
+ if ((cur != null) && (cur.length > 0)) {
+ for (int i = 0; i < cur.length; i++) {
+ int line = ((Integer) cur[i].getAttribute(IMarker.LOCATION)).intValue();
+ int sev = ((Integer) cur[i].getAttribute(IMarker.SEVERITY)).intValue();
+ String mesg = (String) cur[i].getAttribute(IMarker.MESSAGE);
+ if (line == problemMarkerInfo.lineNumber && sev == mapMarkerSeverity(problemMarkerInfo.severity) && mesg.equals(problemMarkerInfo.description)) {
+ return;
+ }
+ }
+ }
+
+ IMarker marker = markerResource.createMarker(ICModelMarker.C_MODEL_PROBLEM_MARKER);
+ marker.setAttribute(IMarker.LOCATION, problemMarkerInfo.lineNumber);
+ marker.setAttribute(IMarker.MESSAGE, problemMarkerInfo.description);
+ marker.setAttribute(IMarker.SEVERITY, mapMarkerSeverity(problemMarkerInfo.severity));
+ marker.setAttribute(IMarker.LINE_NUMBER, problemMarkerInfo.lineNumber);
+ marker.setAttribute(IMarker.CHAR_START, -1);
+ marker.setAttribute(IMarker.CHAR_END, -1);
+ if (problemMarkerInfo.variableName != null) {
+ marker.setAttribute(ICModelMarker.C_MODEL_MARKER_VARIABLE, problemMarkerInfo.variableName);
+ }
+ if (problemMarkerInfo.externalPath != null) {
+ marker.setAttribute(ICModelMarker.C_MODEL_MARKER_EXTERNAL_LOCATION, problemMarkerInfo.externalPath.toOSString());
+ }
+ }
+ catch (CoreException e) {
+ CCorePlugin.log(e.getStatus());
+ }
+ }
+
+ private int mapMarkerSeverity(int severity) {
+ switch (severity) {
+ case SEVERITY_ERROR_BUILD :
+ case SEVERITY_ERROR_RESOURCE :
+ return IMarker.SEVERITY_ERROR;
+ case SEVERITY_INFO :
+ return IMarker.SEVERITY_INFO;
+ case SEVERITY_WARNING :
+ return IMarker.SEVERITY_WARNING;
+ }
+ return IMarker.SEVERITY_ERROR;
+ }
+
+ /* (non-Javadoc)
+ * Removes the IMarkers for the project specified in the argument if the
+ * project exists, and is open.
+ *
+ * @param project
+ */
+ public void removeAllMarkers(IProject project) {
+ if (project == null || !project.isAccessible()) return;
+
+ // Clear out the problem markers
+ IWorkspace workspace = project.getWorkspace();
+ IMarker[] markers;
+ try {
+ markers = project.findMarkers(ICModelMarker.C_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_INFINITE);
+ } catch (CoreException e) {
+ // Handled just about every case in the sanity check
+ return;
+ }
+ if (markers != null) {
+ try {
+ workspace.deleteMarkers(markers);
+ } catch (CoreException e) {
+ // The only situation that might cause this is some sort of resource change event
+ return;
+ }
+ }
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AbstractConfigurationOption.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AbstractConfigurationOption.java
new file mode 100644
index 0000000000..3fcf840aaf
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AbstractConfigurationOption.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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.core.configure;
+
+import java.util.ArrayList;
+
+public abstract class AbstractConfigurationOption implements IConfigureOption {
+
+ protected String name;
+ private String msgName;
+ protected AutotoolsConfiguration cfg;
+
+ public AbstractConfigurationOption(String name, AutotoolsConfiguration cfg) {
+ this(name, name, cfg);
+ }
+
+ public AbstractConfigurationOption(String name, String msgName, AutotoolsConfiguration cfg) {
+ this.name = name;
+ this.msgName = msgName;
+ this.cfg = cfg;
+ }
+
+ public String getDescription() {
+ return ConfigureMessages.getConfigureDescription(msgName);
+ }
+
+ public String getToolTip() {
+ return ConfigureMessages.getConfigureTip(msgName);
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public AutotoolsConfiguration getCfg() {
+ return cfg;
+ }
+
+ public ArrayList<String> getParameters() {
+ ArrayList<String> parameters = new ArrayList<String>();
+ if (isParmSet())
+ parameters.add(getParameter());
+ return parameters;
+ }
+
+ public String getParameterName() {
+ return "--" + getName();
+ }
+
+ public boolean isCategory() {
+ return false;
+ }
+
+ public boolean isMultiArg() {
+ return false;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AutotoolsConfiguration.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AutotoolsConfiguration.java
new file mode 100644
index 0000000000..f6e1625baf
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AutotoolsConfiguration.java
@@ -0,0 +1,320 @@
+/*******************************************************************************
+ * 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.core.configure;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+
+public class AutotoolsConfiguration implements IAConfiguration {
+
+ public static class Option {
+ private String name;
+ private String transformedName;
+ private int type;
+ private String defaultValue;
+
+ public Option(String name, int type) {
+ this(name, name, type);
+ }
+
+ public Option(String name, String transformedName, int type) {
+ this.name = name;
+ this.transformedName = transformedName;
+ this.type = type;
+ }
+
+ public Option(String name, String transformedName, String defaultValue, int type) {
+ this.name = name;
+ this.transformedName = transformedName;
+ this.type = type;
+ this.defaultValue = defaultValue;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public int getType() {
+ return type;
+ }
+
+ public String getDefaultValue() {
+ return defaultValue;
+ }
+
+ public String getDescription() {
+ return ConfigureMessages.getConfigureDescription(transformedName);
+ }
+
+ public String getToolTip() {
+ return ConfigureMessages.getConfigureTip(transformedName);
+ }
+ }
+
+ // Configure options and categories. List below is ordered.
+ // All options following a category are children of that category
+ // in a tree view, up to the next category.
+ private static Option[] configOpts = new Option[] {
+ new Option("configure", IConfigureOption.TOOL), // $NON-NLS-1$
+ new Option("general", IConfigureOption.CATEGORY), // $NON-NLS-1$
+ new Option("configdir", IConfigureOption.INTERNAL), // $NON-NLS-1$
+ new Option("cache-file", "cache_file", IConfigureOption.STRING), // $NON-NLS-1$
+ new Option("help", IConfigureOption.BIN), // $NON-NLS-1$
+ new Option("no-create", "no_create", IConfigureOption.BIN), // $NON-NLS-1$
+ new Option("quiet", IConfigureOption.BIN), // $NON-NLS-1$
+ new Option("version", IConfigureOption.BIN), // $NON-NLS-1$
+ new Option("platform", IConfigureOption.CATEGORY), // $NON-NLS-1$
+ new Option("host", IConfigureOption.STRING), // $NON-NLS-1$
+ new Option("build", IConfigureOption.STRING), // $NON-NLS-1$
+ new Option("target", IConfigureOption.STRING), // $NON-NLS-1$
+ new Option("directories", IConfigureOption.CATEGORY), // $NON-NLS-1$
+ new Option("prefix", IConfigureOption.STRING), // $NON-NLS-1$
+ new Option("exec-prefix", "exec_prefix", IConfigureOption.STRING), // $NON-NLS-1$
+ new Option("libdir", IConfigureOption.STRING), // $NON-NLS-1$
+ new Option("bindir", IConfigureOption.STRING), // $NON-NLS-1$
+ new Option("sbindir", IConfigureOption.STRING), // $NON-NLS-1$
+ new Option("includedir", IConfigureOption.STRING), // $NON-NLS-1$
+ new Option("datadir", IConfigureOption.STRING), // $NON-NLS-1$
+ new Option("sysconfdir", IConfigureOption.STRING), // $NON-NLS-1$
+ new Option("infodir", IConfigureOption.STRING), // $NON-NLS-1$
+ new Option("mandir", IConfigureOption.STRING), // $NON-NLS-1$
+ new Option("srcdir", IConfigureOption.STRING), // $NON-NLS-1$
+ new Option("localstatedir", IConfigureOption.STRING), // $NON-NLS-1$
+ new Option("sharedstatedir", IConfigureOption.STRING), // $NON-NLS-1$
+ new Option("libexecdir", IConfigureOption.STRING), // $NON-NLS-1$
+ new Option("oldincludedir", IConfigureOption.STRING), // $NON-NLS-1$
+ new Option("filenames", IConfigureOption.CATEGORY), // $NON-NLS-1$
+ new Option("program-prefix", "program_prefix", IConfigureOption.STRING), // $NON-NLS-1$
+ new Option("program-suffix", "program_suffix", IConfigureOption.STRING), // $NON-NLS-1$
+ new Option("program-transform-name", "program_transform_name", IConfigureOption.STRING), // $NON-NLS-1$
+ new Option("features", IConfigureOption.CATEGORY), // $NON-NLS-1$
+ new Option("enable-maintainer-mode", "enable_maintainer_mode", IConfigureOption.BIN), // $NON-NLS-1$
+ new Option("user", IConfigureOption.MULTIARG), // $NON-NLS-1$
+ new Option("autogen", "autogen", "autogen.sh", IConfigureOption.TOOL), // $NON-NLS-1$
+ new Option("options", IConfigureOption.CATEGORY), // $NON-NLS-1$
+ new Option("autogenOpts", IConfigureOption.MULTIARG), // $NON-NLS-1$
+ };
+
+ private static Option[] toolList;
+
+ private String id;
+ private boolean isDirty;
+ private boolean isParmsDirty;
+ private Map<String, IConfigureOption> configOptions;
+ private ArrayList<String> configParms = new ArrayList<String>();
+
+ public AutotoolsConfiguration(String name) {
+ this(name, true);
+ }
+
+ private AutotoolsConfiguration(String name, boolean initialize) {
+ this.id = name;
+ configOptions = new HashMap<String, IConfigureOption>();
+ if (initialize)
+ initConfigOptions();
+ isParmsDirty = true;
+ }
+
+ private void initConfigOptions() {
+ // Put configure options in hash map. Ignore categories.
+ ArrayList<Option> tools = new ArrayList<Option>();
+ for (int i = 0; i < configOpts.length; ++i) {
+ Option opt = configOpts[i];
+ String defaultValue = opt.getDefaultValue();
+ int type = opt.type;
+ switch (type) {
+ case IConfigureOption.BIN:
+ BinConfigureOption b = new BinConfigureOption(opt.name, opt.transformedName, this);
+ if (defaultValue != null)
+ b.setValue(defaultValue);
+ configOptions.put(opt.name, b);
+ break;
+ case IConfigureOption.STRING:
+ StringConfigureOption s = new StringConfigureOption(opt.name, opt.transformedName, this);
+ if (defaultValue != null)
+ s.setValue(defaultValue);
+ configOptions.put(opt.name, s);
+ break;
+ case IConfigureOption.INTERNAL:
+ InternalConfigureOption io = new InternalConfigureOption(opt.name, opt.transformedName, this);
+ if (defaultValue != null)
+ io.setValue(defaultValue);
+ configOptions.put(opt.name, io);
+ break;
+ case IConfigureOption.MULTIARG:
+ MultiArgConfigureOption m = new MultiArgConfigureOption(opt.name, opt.transformedName, this);
+ if (defaultValue != null)
+ m.setValue(defaultValue);
+ configOptions.put(opt.name, m);
+ break;
+ case IConfigureOption.TOOL:
+ tools.add(opt);
+ ConfigureTool t = new ConfigureTool(opt.name, opt.transformedName, this);
+ if (defaultValue != null)
+ t.setValue(defaultValue);
+ configOptions.put(opt.name, t);
+ break;
+ case IConfigureOption.CATEGORY:
+ configOptions.put(opt.name, new ConfigureOptionCategory(opt.name));
+ }
+ }
+ toolList = tools.toArray(new Option[tools.size()]);
+ }
+
+ public static Option[] getOptionList() {
+ return configOpts;
+ }
+
+ public static Option[] getChildOptions(String name) {
+ ArrayList<Option> options = new ArrayList<Option>();
+ for (int i = 0; i < configOpts.length; ++i) {
+ Option opt = configOpts[i];
+ if (opt.getName().equals(name)) {
+ if (opt.getType() == IConfigureOption.CATEGORY) {
+ for (int j = i + 1; j < configOpts.length; ++j) {
+ Option o = configOpts[j];
+ int type = o.getType();
+ if (type != IConfigureOption.CATEGORY &&
+ type != IConfigureOption.TOOL)
+ options.add(o);
+ else
+ return options.toArray(new Option[options.size()]);
+ }
+ } else if (opt.getType() == IConfigureOption.TOOL) {
+ for (int j = i + 1; j < configOpts.length; ++j) {
+ Option o = configOpts[j];
+ int type = o.getType();
+ if (type == IConfigureOption.CATEGORY)
+ options.add(o);
+ else if (type == IConfigureOption.TOOL)
+ return options.toArray(new Option[options.size()]);
+ }
+ }
+ }
+ }
+ return options.toArray(new Option[options.size()]);
+ }
+
+ public static Option[] getTools() {
+ return toolList;
+ }
+
+ public IConfigureOption getOption(String name) {
+ return configOptions.get(name);
+ }
+
+ public IAConfiguration copy() {
+ return copy(id);
+ }
+
+ public IAConfiguration copy(String newId) {
+ AutotoolsConfiguration cfg = new AutotoolsConfiguration(newId, false);
+ Collection<IConfigureOption> oldValues = configOptions.values();
+ for (Iterator<IConfigureOption> i = oldValues.iterator(); i.hasNext();) {
+ IConfigureOption opt = i.next();
+ cfg.configOptions.put(opt.getName(), opt.copy(cfg));
+ }
+ if (getId().equals(newId))
+ cfg.setDirty(isDirty()); // copying with same id, do not change dirty attribute
+ else
+ cfg.setDirty(true); // we are cloning with a new id, treat it as never built/dirty
+ return cfg;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public boolean isDirty() {
+ return isDirty;
+ }
+
+ public void setDirty(boolean value) {
+ isDirty = value;
+ if (isDirty)
+ isParmsDirty = true;
+ }
+
+ public Map<String, IConfigureOption> getOptions() {
+ return configOptions;
+ }
+
+ public String getToolParameters(String name) {
+ StringBuffer buf = new StringBuffer();
+ Option[] options = getChildOptions(name);
+ for (int i = 0; i < options.length; ++i) {
+ IConfigureOption option = getOption(options[i].getName());
+ if (option.getType() == IConfigureOption.CATEGORY) {
+ Option[] childOptions = getChildOptions(option.getName());
+ for (int j = 0; j < childOptions.length; ++j) {
+ IConfigureOption childOption = getOption(childOptions[j].getName());
+ String parameter = childOption.getParameter();
+ if (!parameter.equals(""))
+ buf.append(" " + parameter);
+ }
+ } else {
+ String parameter = option.getParameter();
+ if (!parameter.equals(""))
+ buf.append(" " + parameter);
+ }
+ }
+ return buf.toString();
+ }
+
+ public ArrayList<String> getToolArgs(String name) {
+ if (isParmsDirty) {
+ configParms = new ArrayList<String>();
+ Option[] options = getChildOptions(name);
+ for (int i = 0; i < options.length; ++i) {
+ IConfigureOption option = getOption(options[i].getName());
+ if (option.getType() == IConfigureOption.CATEGORY) {
+ Option[] childOptions = getChildOptions(option.getName());
+ for (int j = 0; j < childOptions.length; ++j) {
+ IConfigureOption childOption = getOption(childOptions[j].getName());
+ ArrayList<String> parameters = childOption.getParameters();
+ configParms.addAll(parameters);
+ }
+ } else {
+ ArrayList<String> parameters = option.getParameters();
+ configParms.addAll(parameters);
+ }
+ }
+ }
+ return configParms;
+ }
+
+ public void setOption(String name, String value) {
+ IConfigureOption option = configOptions.get(name);
+ if (option != null) {
+ if (!option.getValue().equals(value)) {
+ option.setValue(value);
+ setDirty(true);
+ }
+ }
+ }
+
+ public void setConfigToolDirectory(String configToolDirectory) {
+ setOption("configdir", configToolDirectory);
+ }
+
+ public String getConfigToolDirectory() {
+ IConfigureOption option = configOptions.get("configdir");
+ return option.getValue();
+ }
+
+ public void setDefaultOptions() {
+ initConfigOptions();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AutotoolsConfigurationManager.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AutotoolsConfigurationManager.java
new file mode 100644
index 0000000000..9c0b705e7d
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AutotoolsConfigurationManager.java
@@ -0,0 +1,496 @@
+/*******************************************************************************
+ * 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.core.configure;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
+import org.eclipse.cdt.managedbuilder.core.BuildException;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.IToolChain;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsPlugin;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.AutotoolsConfiguration.Option;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+public class AutotoolsConfigurationManager implements IResourceChangeListener {
+
+ public final static String CFG_FILE_NAME = ".autotools"; //$NON-NLS-1$
+ private final static String CFG_CANT_SAVE = "Configure.Error.NoProjectToSave"; //$NON-NLS-1$
+
+
+ private static AutotoolsConfigurationManager instance;
+
+ private boolean isSyncing;
+
+ private static Map<String, Map<String, IAConfiguration>> configs;
+ private static Map<String, Map<String, IAConfiguration>> tmpConfigs;
+
+ private AutotoolsConfigurationManager() {
+ configs = new HashMap<String, Map<String, IAConfiguration>>();
+ tmpConfigs = new HashMap<String, Map<String, IAConfiguration>>();
+ AutotoolsPlugin.getWorkspace().addResourceChangeListener(this);
+ }
+
+ public static AutotoolsConfigurationManager getInstance() {
+ if (instance == null) {
+ instance = new AutotoolsConfigurationManager();
+ }
+ return instance;
+ }
+
+ public IAConfiguration createDefaultConfiguration(IProject project, String id) {
+ IAConfiguration cfg = new AutotoolsConfiguration(id);
+ return cfg;
+ }
+
+ public IAConfiguration findCfg(IProject p, String id) {
+ Map<String, IAConfiguration> cfgs = getConfigurations(p);
+ return cfgs.get(id);
+ }
+
+ public IAConfiguration getConfiguration(IProject p, String cfgId) {
+ return getConfiguration(p, cfgId, true);
+ }
+
+ public IAConfiguration getConfiguration(IProject p, String cfgId, boolean persist) {
+ IAConfiguration cfg = findCfg(p, cfgId);
+ if (cfg == null) {
+ cfg = createDefaultConfiguration(p, cfgId);
+ if (persist) {
+ addConfiguration(p, cfg);
+ }
+ } else {
+ if (!persist) {
+ cfg = cfg.copy();
+ }
+ }
+ return cfg;
+ }
+
+
+ public boolean isConfigurationAlreadySaved(IProject project, ICConfigurationDescription cfgd) {
+ Map<String, IAConfiguration> cfgs = getSavedConfigs(project);
+ if (cfgs != null)
+ return cfgs.get(cfgd.getId()) != null;
+ return false;
+ }
+
+ public void addConfiguration(IProject project, IAConfiguration cfg) {
+ String projectName = project.getName();
+ Map<String, IAConfiguration> cfgs = getSavedConfigs(project);
+ if (cfgs == null) {
+ cfgs = new HashMap<String, IAConfiguration>();
+ configs.put(projectName, cfgs);
+ }
+ cfgs.put(cfg.getId(), cfg);
+ saveConfigs(project);
+ }
+
+ public boolean isSyncing() {
+ return isSyncing;
+ }
+
+ private void setSyncing(boolean value) {
+ isSyncing = value;
+ }
+
+ /**
+ * Synchronize the current set of configurations for the project with the
+ * Autotools saved configuration data. This is required when configuration
+ * management occurs outside of the Autotools Configure Settings page in the
+ * Property menu.
+ *
+ * @param project to synchronize configurations for
+ *
+ */
+ public void syncConfigurations(IProject project) {
+ setSyncing(true);
+ clearTmpConfigurations(project);
+ ICProjectDescription pd = CoreModel.getDefault().getProjectDescription(project);
+ ICConfigurationDescription[] cfgs = pd.getConfigurations();
+ Map <String, IAConfiguration> newCfgList = new HashMap<String, IAConfiguration>();
+ for (int i = 0; i < cfgs.length; ++i) {
+ cfgs[i].getConfigurationData();
+ IAConfiguration acfg = getTmpConfiguration(project, cfgs[i]);
+ newCfgList.put(cfgs[i].getId(), acfg);
+ }
+ setSyncing(false);
+ clearTmpConfigurations(project);
+ replaceProjectConfigurations(project, newCfgList);
+ }
+
+ public void replaceProjectConfigurations(IProject project, Map<String, IAConfiguration> cfgs) {
+ String projectName = project.getName();
+ configs.put(projectName, cfgs);
+ saveConfigs(project);
+ }
+
+ public void replaceProjectConfigurations(IProject project, Map<String, IAConfiguration> cfgs, ICConfigurationDescription[] cfgds) {
+ String projectName = project.getName();
+ configs.put(projectName, cfgs);
+ saveConfigs(project, cfgds);
+ }
+
+ private Map<String, IAConfiguration> getSavedConfigs(IProject project) {
+ String projectName = project.getName();
+ Map<String, IAConfiguration> list = configs.get(projectName);
+ if (list == null) {
+ try {
+ IPath fileLocation = project.getLocation().append(CFG_FILE_NAME);
+ File dirFile = fileLocation.toFile();
+ Map<String, IAConfiguration> cfgList = new HashMap<String, IAConfiguration>();
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ DocumentBuilder db = dbf.newDocumentBuilder();
+ if (dirFile.exists()) {
+ Document d = db.parse(dirFile);
+ Element e = d.getDocumentElement();
+ // Get the stored configuration data
+ NodeList cfgs = e.getElementsByTagName("configuration"); // $NON-NLS-1$
+ for (int x = 0; x < cfgs.getLength(); ++x) {
+ Node n = cfgs.item(x);
+ NamedNodeMap attrs = n.getAttributes();
+ // Originally we used the configuration name, but now we use
+ // the ConfigurationDescription id which is unique. Check for
+ // id first, but fall back to name for older .autotools files.
+ Node nameNode = attrs.getNamedItem("name"); // $NON-NLS-1$
+ Node cfgIdNode = attrs.getNamedItem("id"); // $NON-NLS-1$
+ String cfgId = null;
+ if (cfgIdNode != null)
+ cfgId = cfgIdNode.getNodeValue();
+ else if (nameNode != null) {
+ String cfgName = nameNode.getNodeValue();
+ ICConfigurationDescription cfgd =
+ CoreModel.getDefault().getProjectDescription(project).getConfigurationByName(cfgName);
+ if (cfgd != null)
+ cfgId = cfgd.getId();
+ else
+ continue; // have to punt, this doesn't map to real cfg
+ }
+ IAConfiguration cfg = new AutotoolsConfiguration(cfgId);
+ NodeList l = n.getChildNodes();
+ for (int y = 0; y < l.getLength(); ++y) {
+ Node child = l.item(y);
+ if (child.getNodeName().equals("option")) { // $NON-NLS-1$
+ NamedNodeMap optionAttrs = child.getAttributes();
+ Node id = optionAttrs.getNamedItem("id"); // $NON-NLS-1$
+ Node value = optionAttrs.getNamedItem("value"); // $NON-NLS-1$
+ if (id != null && value != null)
+ cfg.setOption(id.getNodeValue(), value.getNodeValue());
+ }
+ }
+ cfg.setDirty(false);
+ cfgList.put(cfg.getId(), cfg);
+ }
+ if (cfgList.size() > 0) {
+ configs.put(projectName, cfgList);
+ list = cfgList;
+ }
+ }
+ } catch (ParserConfigurationException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (SAXException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+ return list;
+ }
+
+ public IAConfiguration getTmpConfiguration(IProject p, ICConfigurationDescription cfgd) {
+ Map <String, IAConfiguration> list = getTmpConfigs(p);
+ IAConfiguration acfg = list.get(cfgd.getId());
+ if (acfg != null) {
+ return acfg;
+ }
+ IAConfiguration oldCfg = getConfiguration(p, cfgd.getId(), false);
+ list.put(cfgd.getId(), oldCfg);
+ return oldCfg;
+ }
+
+ /**
+ * Clone a configuration and put it on the tmp list if it is not already a saved configuration
+ * and not already on the tmp list.
+ *
+ * @param p project
+ * @param oldId the id of the old configuration to clone
+ * @param cfgd the configuration descriptor for the clone
+ * @return true if the configuration is already saved, false otherwise
+ */
+ public boolean cloneCfg(IProject p, String oldId, ICConfigurationDescription cfgd) {
+ if (isConfigurationAlreadySaved(p, cfgd))
+ return true;
+ Map <String, IAConfiguration> tmpList = getTmpConfigs(p);
+ String newId = cfgd.getId();
+ // Don't bother if the new configuration is already on the tmp list
+ IAConfiguration cfg = tmpList.get(newId);
+ if (cfg != null)
+ return false;
+ // Otherwise, try and find the old id to copy the configuration from
+ // or punt if not found
+ Map <String, IAConfiguration> savedList = getSavedConfigs(p);
+ IAConfiguration oldCfg = savedList.get(oldId);
+ if (oldCfg != null) {
+ IAConfiguration newCfg = oldCfg.copy(cfgd.getId());
+ tmpList.put(cfgd.getId(), newCfg);
+ // Check to see if the new configuration is already stored as part of the project description.
+ // If yes, it should already be saved. This can occur if the configuration was added as part of
+ // another CDT Property page and the Autotools Property page was never opened.
+ if (CoreModel.getDefault().getProjectDescription(p).getConfigurationById(newId) != null) {
+ addConfiguration(p, newCfg);
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private Map<String, IAConfiguration> getTmpConfigs(IProject p) {
+ Map <String, IAConfiguration> tmpList = tmpConfigs.get(p.getName());
+ if (tmpList == null) {
+ tmpList = new HashMap<String, IAConfiguration>();
+ tmpConfigs.put(p.getName(), tmpList);
+ }
+ return tmpList;
+ }
+
+ public void clearTmpConfigurations(IProject p) {
+ tmpConfigs.remove(p.getName());
+ }
+
+ public void saveConfigs(IProject project) {
+ ICConfigurationDescription[] cfgds = CoreModel.getDefault().getProjectDescription(project).getConfigurations();
+ saveConfigs(project, cfgds);
+ }
+
+ private void syncNameField(ICConfigurationDescription cfgd) {
+ IConfiguration icfg = ManagedBuildManager.getConfigurationForDescription(cfgd);
+ String id = cfgd.getId();
+ if (icfg != null) {
+ IToolChain toolchain = icfg.getToolChain();
+ ITool[] tools = toolchain.getTools();
+ for (int j = 0; j < tools.length; ++j) {
+ ITool tool = tools[j];
+ if (tool.getName().equals("configure")) { //$NON-NLS-1$
+ IOption option =
+ tool.getOptionBySuperClassId("org.eclipse.linuxtools.cdt.autotools.core.option.configure.name"); // $NON-NLS-1$
+ IHoldsOptions h = (IHoldsOptions)tool;
+ try {
+ IOption optionToSet = h.getOptionToSet(option, false);
+ optionToSet.setValue(id);
+ } catch (BuildException e) {
+ }
+ }
+ }
+ }
+ }
+
+ private String xmlEscape(String value) {
+ value = value.replaceAll("\\&", "&amp;"); //$NON-NLS-1$ //$NON-NLS-2$
+ value = value.replaceAll("\\\"", "&quot;"); //$NON-NLS-1$ //$NON-NLS-2$
+ value = value.replaceAll("\\\'", "&apos;"); //$NON-NLS-1$ //$NON-NLS-2$
+ value = value.replaceAll("\\<", "&lt;"); //$NON-NLS-1$ //$NON-NLS-2$
+ value = value.replaceAll("\\>", "&gt;"); //$NON-NLS-1$ //$NON-NLS-2$
+ return value;
+ }
+
+ private void saveConfigs(IProject project, ICConfigurationDescription[] cfgds) {
+ try {
+ String projectName = project.getName();
+ IPath output = project.getLocation().append(CFG_FILE_NAME);
+ File f = output.toFile();
+ if (!f.exists())
+ f.createNewFile();
+ if (f.exists()) {
+ PrintWriter p = new PrintWriter(new BufferedWriter(new FileWriter(f)));
+ Map<String, IAConfiguration> cfgs = configs.get(projectName);
+ p.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); //$NON-NLS-1$
+ p.println("<configurations>"); // $NON-NLS-1$
+ Option[] optionList = AutotoolsConfiguration.getOptionList();
+ // Before saving, force any cloning to occur via the option value handler.
+ setSyncing(true);
+ for (int i = 0; i < cfgds.length; ++i) {
+ @SuppressWarnings("unused")
+ CConfigurationData data = cfgds[i].getConfigurationData();
+ }
+ setSyncing(false);
+ for (int i = 0; i < cfgds.length; ++i) {
+ ICConfigurationDescription cfgd = cfgds[i];
+ String id = cfgd.getId();
+ IAConfiguration cfg = cfgs.get(id);
+ if (cfg == null) {
+ cfg = createDefaultConfiguration(project, id);
+ }
+ p.println("<configuration id=\"" + cfg.getId() + "\">"); //$NON-NLS-1$ //$NON-NLS-2$
+ for (int j = 0; j < optionList.length; ++j) {
+ Option option = optionList[j];
+ IConfigureOption opt = cfg.getOption(option.getName());
+ if (!opt.isCategory())
+ p.println("<option id=\"" + option.getName() + "\" value=\"" + xmlEscape(opt.getValue()) + "\"/>"); //$NON-NLS-1$ //$NON-NLS-2$ // $NON-NLS-3$
+ }
+ p.println("</configuration>"); //$NON-NLS-1$
+ // Sync name field as this configuration is now officially saved
+ syncNameField(cfgd);
+ }
+ p.println("</configurations>");
+ p.close();
+ }
+ } catch (IOException e) {
+ AutotoolsPlugin.log(e);
+ }
+ }
+
+ // Perform apply of configuration changes. This rewrites out the current known list of configurations
+ // with any changes currently that have been made to them. If a configuration has been renamed, but this
+ // has not yet been confirmed by the end-user, then only the changes to the configuration are made. The
+ // name currently remains the same in the output file.
+ public void applyConfigs(String projectName, ICConfigurationDescription[] cfgds) {
+ try {
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ IResource res = (IProject)root.findMember(projectName, false);
+ if (res == null || res.getType() != IResource.PROJECT) {
+ AutotoolsPlugin.logErrorMessage(ConfigureMessages.getFormattedString(CFG_CANT_SAVE,
+ new String[]{projectName}));
+ return;
+ }
+ IProject project = (IProject)res;
+ IPath output = project.getLocation().append(CFG_FILE_NAME);
+ File f = output.toFile();
+ if (!f.exists())
+ f.createNewFile();
+ if (f.exists()) {
+ PrintWriter p = new PrintWriter(new BufferedWriter(new FileWriter(f)));
+ Map<String, IAConfiguration> cfgs = getSavedConfigs(project);
+ if (cfgs == null)
+ return;
+ p.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); //$NON-NLS-1$
+ p.println("<configurations>"); // $NON-NLS-1$
+ Option[] optionList = AutotoolsConfiguration.getOptionList();
+ HashSet<String> savedIds = new HashSet<String>();
+ setSyncing(true);
+ for (int x = 0; x < cfgds.length; ++x) {
+ ICConfigurationDescription cfgd = cfgds[x];
+ @SuppressWarnings("unused")
+ CConfigurationData data = cfgd.getConfigurationData();
+ String id = cfgd.getId();
+ savedIds.add(id);
+ IAConfiguration cfg = getTmpConfiguration(project, cfgd);
+ cfgs.put(id, cfg); // add to list in case we have a new configuration not yet added to Project Description
+ p.println("<configuration id=\"" + id + "\">"); //$NON-NLS-1$ //$NON-NLS-2$
+ for (int j = 0; j < optionList.length; ++j) {
+ Option option = optionList[j];
+ IConfigureOption opt = cfg.getOption(option.getName());
+ if (!opt.isCategory())
+ p.println("<option id=\"" + option.getName() + "\" value=\"" + opt.getValue() + "\"/>"); //$NON-NLS-1$ //$NON-NLS-2$ // $NON-NLS-3$
+ }
+ p.println("</configuration>"); //$NON-NLS-1$
+ syncNameField(cfgd);
+ }
+ setSyncing(false);
+
+ // Put all the remaining configurations already saved back into the file.
+ // These represent deleted configurations, but confirmation has not occurred.
+ for (Iterator<String> i = cfgs.keySet().iterator(); i.hasNext(); ) {
+ String id = i.next();
+ // A remaining id won't appear in our savedIds list.
+ if (!savedIds.contains(id)) {
+ IAConfiguration cfg = cfgs.get(id);
+ p.println("<configuration id=\"" + id + "\">"); //$NON-NLS-1$ //$NON-NLS-2$
+ for (int j = 0; j < optionList.length; ++j) {
+ Option option = optionList[j];
+ IConfigureOption opt = cfg.getOption(option.getName());
+ if (!opt.isCategory())
+ p.println("<option id=\"" + option.getName() + "\" value=\"" + opt.getValue() + "\"/>"); //$NON-NLS-1$ //$NON-NLS-2$ // $NON-NLS-3$
+ }
+ p.println("</configuration>"); //$NON-NLS-1$
+ }
+ }
+ p.println("</configurations>");
+ p.close();
+ }
+ } catch (IOException e) {
+ AutotoolsPlugin.log(e);
+ }
+ }
+
+ public Map<String, IAConfiguration> getConfigurations(IProject project) {
+ Map<String, IAConfiguration> list = getSavedConfigs(project);
+ if (list == null) {
+ list = new HashMap<String, IAConfiguration>();
+ configs.put(project.getName(), list);
+ }
+ return list;
+ }
+
+ public void resourceChanged(IResourceChangeEvent event) {
+ IResource res = event.getResource();
+ if (!(res instanceof IProject))
+ return;
+ String name = res.getName();
+ IResourceDelta delta = event.getDelta();
+ if (delta == null)
+ return;
+ int kind = delta.getKind();
+ if (configs.containsKey(name)) {
+ if (kind == IResourceDelta.REMOVED) {
+ configs.remove(name);
+ tmpConfigs.remove(name);
+ } else if (kind == IResourceDelta.CHANGED) {
+ int flags = delta.getFlags();
+ if ((flags & IResourceDelta.MOVED_TO) != 0) {
+ IPath path = delta.getMovedToPath();
+ Map<String, IAConfiguration> cfgs = configs.get(name);
+ String newName = path.lastSegment();
+ configs.remove(name);
+ configs.put(newName, cfgs);
+ Map<String, IAConfiguration> tmpcfgs = tmpConfigs.get(name);
+ tmpConfigs.remove(name);
+ tmpConfigs.put(newName, tmpcfgs);
+ }
+ }
+ }
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AutotoolsOptionValueHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AutotoolsOptionValueHandler.java
new file mode 100644
index 0000000000..b707d3ef64
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/AutotoolsOptionValueHandler.java
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.core.configure;
+
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.managedbuilder.core.BuildException;
+import org.eclipse.cdt.managedbuilder.core.IBuildObject;
+import org.eclipse.cdt.managedbuilder.core.IBuilder;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
+import org.eclipse.cdt.managedbuilder.core.IManagedOptionValueHandler;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.IOptionApplicability;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.core.ManagedOptionValueHandler;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsPlugin;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.AutotoolsPropertyConstants;
+
+public class AutotoolsOptionValueHandler extends ManagedOptionValueHandler
+ implements IOptionApplicability {
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.managedbuilder.core.IManagedOptionValueHandler#handleValue(IConfiguration,IToolChain,IOption,String,int)
+ */
+
+ public final static String DEFAULT_BUILD_DIR = "build"; //$NON-NLS-1$
+ public final static String CONFIGURE_TOOL_ID = AutotoolsPlugin.PLUGIN_ID + ".gnu.toolchain.tool.configure"; //$NON-NLS-1$
+ public final static String BUILD_DIR_OPTION_ID = AutotoolsPlugin.PLUGIN_ID + ".option.configure.builddir"; //$NON-NLS-1$
+ public final static String BUILD_DIR_APPLY = "BuildDir.apply"; //$NON-NLS-1$
+ public final static String BUILD_DIR_DEFAULT_QUESTION = "BuildDir.default"; //$NON-NLS-1$
+ public final static String BUILD_DIR_YES = "BuildDir.yes"; //$NON-NLS-1$
+ public final static String BUILD_DIR_NO = "BuildDir.no"; //$NON-NLS-1$
+
+ //FIXME: Use holder to set option value, not the "option" parameter
+ public boolean handleValue(IBuildObject buildObject,
+ IHoldsOptions holder,
+ IOption option,
+ String extraArgument, int event)
+ {
+ // Get the current value of the build dir option.
+ String value = (String)option.getValue();
+
+ if (buildObject instanceof IConfiguration &&
+ (event == IManagedOptionValueHandler.EVENT_OPEN)) {
+// SortedSet<Integer> nums = new TreeSet<Integer>();
+ IConfiguration configuration = (IConfiguration)buildObject;
+ ICConfigurationDescription cfgd = ManagedBuildManager.getDescriptionForConfiguration(configuration);
+ if (option.getName().equals("Name") && cfgd != null) {
+ String cfgId = cfgd.getId();
+ if (!value.equals("") && !value.equals(cfgId)) {
+ // we have a cloned configuration and we know that the
+ // clonee's name is the value of the option
+ IProject project = (IProject)configuration.getManagedProject().getOwner();
+ String autoName = null;
+ String autoNameTemplate = null;
+ // Check if we are supposed to automatically name the build directory for any
+ // new configuration. If yes, generate a build directory under the project using
+ // the configuration name which must be unique.
+ try {
+ autoName = project.getPersistentProperty(AutotoolsPropertyConstants.AUTO_BUILD_NAME);
+ } catch (CoreException e) {
+ // ignore
+ }
+ if (autoName == null || autoName.equals(AutotoolsPropertyConstants.TRUE)) {
+ autoNameTemplate = "${workspace_loc:/" + project.getName() + // $NON-NLS-1$
+ "}/build-" + fixName(configuration.getName()); // $NON-NLS-1$
+ IBuilder cfgBuilder = configuration.getEditableBuilder();
+ cfgBuilder.setBuildPath(autoNameTemplate);
+ }
+ // Clone old configuration to tmp configuration list
+ boolean isSaved = AutotoolsConfigurationManager.getInstance().cloneCfg(project, value, cfgd);
+ // Check to see if we should patch up the name option. If we aren't synchronizing
+ // configurations or the configuration isn't already saved, we leave the name field alone
+ // so we will trigger this again when the clone will get used.
+ if (!isSaved && !AutotoolsConfigurationManager.getInstance().isSyncing()) {
+ return true;
+ }
+ }
+ try {
+ IOption optionToSet = holder.getOptionToSet(option, false);
+ optionToSet.setValue(cfgId);
+ } catch (BuildException e) {
+ return false;
+ }
+ }
+ }
+
+ // The event was not handled, thus return false
+ return true;
+ }
+
+ private String fixName(String cfgName) {
+ // Replace whitespace with underscores.
+ return cfgName.replaceAll("\\s", "_");
+ }
+
+ // IOptionApplicability methods
+
+ public boolean isOptionEnabled(IBuildObject configuration,
+ IHoldsOptions holder, IOption option) {
+ return true;
+ }
+
+ public boolean isOptionUsedInCommandLine(IBuildObject configuration,
+ IHoldsOptions holder, IOption option) {
+ return false;
+ }
+
+ public boolean isOptionVisible(IBuildObject configuration,
+ IHoldsOptions holder, IOption option) {
+ return true;
+ }
+
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/BinConfigureOption.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/BinConfigureOption.java
new file mode 100644
index 0000000000..fb885bd641
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/BinConfigureOption.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.core.configure;
+
+public class BinConfigureOption extends AbstractConfigurationOption {
+
+ private boolean value;
+
+ public BinConfigureOption(String name, AutotoolsConfiguration cfg) {
+ super(name, cfg);
+ }
+
+ public BinConfigureOption(String name, String msgName, AutotoolsConfiguration cfg) {
+ super(name, msgName, cfg);
+ }
+
+ private BinConfigureOption(String name, AutotoolsConfiguration cfg, boolean value) {
+ super(name, cfg);
+ this.value = value;
+ }
+
+ public boolean isParmSet() {
+ return value;
+ }
+
+ public String getParameter() {
+ if (isParmSet())
+ return getParameterName();
+ else
+ return ""; // $NON-NLS-1$
+ }
+
+ public String getValue() {
+ return Boolean.toString(value);
+ }
+
+ public void setValue(String value) {
+ boolean oldValue = this.value;
+ if (value.equals("true")) // $NON-NLS-1$
+ this.value = true;
+ else
+ this.value = false;
+ if (this.value != oldValue)
+ cfg.setDirty(true);
+ }
+
+ public IConfigureOption copy(AutotoolsConfiguration config) {
+ return new BinConfigureOption(name, config, value);
+ }
+
+ public int getType() {
+ return BIN;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/ConfigureMessages.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/ConfigureMessages.java
new file mode 100644
index 0000000000..f51e5ff8ea
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/ConfigureMessages.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.core.configure;
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class ConfigureMessages {
+ private static final String BUNDLE_NAME = ConfigureMessages.class.getName();
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private ConfigureMessages() {
+ }
+
+ public static String getConfigureDescription(String name) {
+ return getString("Option.configure." + name); //$NON-NLS-11$
+ }
+
+ public static String getConfigureTip(String name) {
+ return getString("Option.configure." + name + ".tip"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ /**
+ * Returns the string from the resource bundle,
+ * or 'key' if not found.
+ *
+ * @param key the message key
+ * @return the resource bundle message
+ */
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+
+ /**
+ * Returns the formatted string from the resource bundle,
+ * or 'key' if not found.
+ *
+ * @param key the message key
+ * @param args an array of substituition strings
+ * @return the resource bundle message
+ */
+ public static String getFormattedString(String key, String[] args) {
+ return MessageFormat.format(getString(key), (Object[])args);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/ConfigureMessages.properties b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/ConfigureMessages.properties
new file mode 100644
index 0000000000..32c745e373
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/ConfigureMessages.properties
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+Option.configure.configure=configure
+Option.configure.general=General
+Option.configure.builddir=Build directory
+Option.configure.builddir.tip=Subdirectory off of project where build will occur
+Option.configure.configdir=Configure tool directory
+Option.configure.configdir.tip=Subdirectory off of project where configure script resides
+Option.configure.cache_file=Name of cache file (--cache-file)
+Option.configure.cache_file.tip=Specify the name of the configuration cache file [config.cache]
+Option.configure.no_create=Turn off file creation <not advised> (--no-create)
+Option.configure.no_create.tip=This tells configuration not to generate the output files as part of configuration
+Option.configure.quiet=Turn off checking messages (--quiet)
+Option.configure.quiet.tip=This turns off "checking ..." style messages from the configuration console output
+Option.configure.help=Display help contents (--help)
+Option.configure.help.tip=Ask configuration file to display its help documentation
+Option.configure.version=Display version of autotools used (--version)
+Option.configure.version.tip=This outputs the version of the Autotools used to create the configuration files
+
+Option.configure.platform=Platform specifiers
+Option.configure.host=Host platform (--host)
+Option.configure.host.tip=Platform that project will run on
+Option.configure.target=Target platform (--target)
+Option.configure.target.tip=Platform that project will target output for
+Option.configure.build=Build platform (--build)
+Option.configure.build.tip=Platform where project is being built
+
+Option.configure.directories=Directory specifiers
+Option.configure.prefix=Arch-independent install directory (--prefix)
+Option.configure.prefix.tip=Place where architecture-independent files are installed [/usr/local]
+Option.configure.exec_prefix=Arch-dependent install directory (--exec-prefix)
+Option.configure.exec_prefix.tip=Place where architecture-dependent files are installed [PREFIX]
+Option.configure.libdir=Object code library directory (--libdir)
+Option.configure.libdir.tip=Place where object code libraries are installed [EPREFIX/lib]
+Option.configure.bindir=User executable directory (--bindir)
+Option.configure.bindir.tip=Place where binary executables are installed [EPREFIX/bin]
+Option.configure.sbindir=System admin executable directory (--sbindir)
+Option.configure.sbindir.tip=Place where system admin executables are installed [EPREFIX/sbin]
+Option.configure.includedir=C Header file directory (--includdir)
+Option.configure.includedir.tip=Place where header files will be installed [PREFIX/include]
+Option.configure.datadir=Read-only arch-independent data (--datadir)
+Option.configure.datadir.tip=Place where read-only architecture-independent data is installed [PREFIX/share]
+Option.configure.sysconfdir=Read-only single-machine data directory (--sysconfdir)
+Option.configure.sysconfdir.tip=Place where read-only single-machine data is stored [PREFIX/etc]
+Option.configure.infodir=Info file directory (--infodir)
+Option.configure.infodir.tip=Place where info files are installed [PREFIX/info]
+Option.configure.mandir=Man file documentation directory (--mandir)
+Option.configure.mandir.tip=Place where man file documentation is installed [PREFIX/man]
+Option.configure.srcdir=Sources directory (--srcdir)
+Option.configure.srcdir.tip=Place where configure can find sources [configure directory or ..]
+Option.configure.localstatedir=Single-machine data directory (--localstatedir)
+Option.configure.localstatedir.tip=Place where modifiable single-machine data is installed [PREFIX/var]
+Option.configure.sharedstatedir=Arch-independent data directory (--sharedstatedir)
+Option.configure.sharedstatedir.tip=Place where modifiable architecture-independent data is installed [PREFIX/com}
+Option.configure.libexecdir=Program executable directory (--libexecdir)
+Option.configure.libexecdir.tip=Place where program executables will be installed [EPREFIX/libexec]
+Option.configure.oldincludedir=Non-gcc C header file directory (--oldincludedir)
+Option.configure.oldincludedir.tip=Place where non-gcc C header files are installed [/usr/include]
+
+Option.configure.filenames=File-name transformations
+Option.configure.program_prefix=Program prefix (--program-prefix)
+Option.configure.program_prefix.tip=Prepend PREFIX to the beginning of installed program names
+Option.configure.program_suffix=Program suffix (--program-suffix)
+Option.configure.program_suffix.tip=Append SUFFIX to the end of installed program names
+Option.configure.program_transform_name=Program name transform (--program-transform-name)
+Option.configure.program_transform_name.tip=A sed string used to transform installed program names
+
+Option.configure.features=Advanced
+Option.configure.enable_maintainer_mode=Enable maintainer mode (--enable-maintainer-mode)
+Option.configure.enable_maintainer_mode.tip=Specify this to have Makefiles generated with checks for Autotool configuration file changes
+Option.configure.user=Additional command-line options
+Option.configure.user.tip=Specify one or more configuration options (e.g. --enable-FEATURE, --disable-FEATURE, or --with-PACKAGE)
+
+Option.configure.autogen=autogen
+Option.configure.options=Options
+Option.configure.autogenOpts=Additional command-line options
+Option.configure.autogenOpts.tip=Specify any additional options required
+
+Tool.command=Command
+Tool.allopts=All Options
+
+Configure.Error.AlreadyExists="A configuration named {0} already exists"
+Configure.Error.NoProjectToSave="Project: {0} does not exist at time of saving configuration" \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/ConfigureOptionCategory.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/ConfigureOptionCategory.java
new file mode 100644
index 0000000000..90e6cb74f8
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/ConfigureOptionCategory.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.core.configure;
+
+import java.util.ArrayList;
+
+public class ConfigureOptionCategory implements IConfigureOption {
+
+ private String name;
+
+ public ConfigureOptionCategory(String name) {
+ this.name = name;
+ }
+
+ public IConfigureOption copy(AutotoolsConfiguration config) {
+ return new ConfigureOptionCategory(name);
+ }
+
+ public String getDescription() {
+ return ConfigureMessages.getConfigureDescription(name);
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getParameter() {
+ return "";
+ }
+
+ public ArrayList<String> getParameters() {
+ return new ArrayList<String>();
+ }
+
+ public String getToolTip() {
+ return "";
+ }
+
+ public String getValue() {
+ return "null";
+ }
+
+ public boolean isCategory() {
+ return true;
+ }
+
+ public boolean isParmSet() {
+ return false;
+ }
+
+ public void setValue(String value) {
+ // Do nothing..nothing to set
+ }
+
+ public boolean isMultiArg() {
+ return false;
+ }
+
+ public int getType() {
+ return CATEGORY;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/ConfigureTool.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/ConfigureTool.java
new file mode 100644
index 0000000000..a082a626ae
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/ConfigureTool.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.core.configure;
+
+import java.util.ArrayList;
+
+public class ConfigureTool extends AbstractConfigurationOption {
+
+ private String value;
+
+ public ConfigureTool(String name, AutotoolsConfiguration cfg) {
+ super(name, cfg);
+ this.value = name;
+ }
+
+ public ConfigureTool(String name, String transformedName, AutotoolsConfiguration cfg) {
+ super(name, transformedName, cfg);
+ this.value = name;
+ }
+
+ private ConfigureTool(String name, AutotoolsConfiguration cfg, String value) {
+ super(name, cfg);
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String newValue) {
+ if (!newValue.equals(value)) {
+ cfg.setDirty(true);
+ value = newValue;
+ }
+ }
+
+ public boolean isParmSet() {
+ return false;
+ }
+
+ public String getParameter() {
+ return ""; // $NON-NLS-1$
+ }
+
+ public ArrayList<String> getParameters() {
+ return new ArrayList<String>();
+ }
+
+ public IConfigureOption copy(AutotoolsConfiguration config) {
+ return new ConfigureTool(name, config, value);
+ }
+
+ public int getType() {
+ return TOOL;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/IAConfiguration.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/IAConfiguration.java
new file mode 100644
index 0000000000..e1cc0e4dc3
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/IAConfiguration.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.core.configure;
+
+import java.util.ArrayList;
+import java.util.Map;
+
+public interface IAConfiguration {
+ public IConfigureOption getOption(String name);
+ public String getId();
+ public boolean isDirty();
+ public void setDirty(boolean value);
+ public Map<String, IConfigureOption> getOptions();
+ public String getToolParameters(String name);
+ public ArrayList<String> getToolArgs(String name);
+ public void setOption(String name, String value);
+ public void setConfigToolDirectory(String configToolDirectory);
+ public String getConfigToolDirectory();
+ public IAConfiguration copy();
+ public IAConfiguration copy(String id);
+ public void setDefaultOptions();
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/IConfigureOption.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/IConfigureOption.java
new file mode 100644
index 0000000000..310d4b4091
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/IConfigureOption.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.core.configure;
+
+import java.util.ArrayList;
+
+public interface IConfigureOption {
+
+ public final static int CATEGORY = 0;
+ public final static int BIN = 1;
+ public final static int STRING = 2;
+ public final static int INTERNAL = 3;
+ public final static int MULTIARG = 4;
+ public final static int TOOL = 5;
+ public String getName();
+ public String getParameter();
+ public ArrayList<String> getParameters();
+ public boolean isParmSet();
+ public String getDescription();
+ public String getToolTip();
+ public void setValue(String value);
+ public IConfigureOption copy(AutotoolsConfiguration cfg);
+ public String getValue();
+ public boolean isCategory();
+ public boolean isMultiArg();
+ public int getType();
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/InternalConfigureOption.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/InternalConfigureOption.java
new file mode 100644
index 0000000000..d42739b32f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/InternalConfigureOption.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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.core.configure;
+
+public class InternalConfigureOption extends AbstractConfigurationOption {
+
+ private String value;
+
+ public InternalConfigureOption(String name, AutotoolsConfiguration cfg) {
+ super(name, cfg);
+ this.value = ""; // $NON-NLS-1$
+ }
+
+ public InternalConfigureOption(String name, String msgName, AutotoolsConfiguration cfg) {
+ super(name, msgName, cfg);
+ this.value = ""; // $NON-NLS-1$
+ }
+
+ private InternalConfigureOption(String name, AutotoolsConfiguration cfg,
+ String value) {
+ super(name, cfg);
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String newValue) {
+ if (!newValue.equals(value)) {
+ cfg.setDirty(true);
+ value = newValue;
+ }
+ }
+
+ public boolean isParmSet() {
+ return false;
+ }
+
+ public String getParameter() {
+ return "";
+ }
+
+ public IConfigureOption copy(AutotoolsConfiguration config) {
+ return new InternalConfigureOption(name, config, value);
+ }
+
+ public int getType() {
+ return INTERNAL;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/MultiArgConfigureOption.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/MultiArgConfigureOption.java
new file mode 100644
index 0000000000..1d17702c78
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/MultiArgConfigureOption.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.core.configure;
+
+import java.util.ArrayList;
+
+
+public class MultiArgConfigureOption extends AbstractConfigurationOption {
+
+ private String value;
+ private ArrayList<String> userArgs;
+ private boolean isDirty;
+
+ public MultiArgConfigureOption(String name, AutotoolsConfiguration cfg) {
+ super(name, cfg);
+ this.value = ""; // $NON-NLS-1$
+ }
+
+ public MultiArgConfigureOption(String name, String msgName, AutotoolsConfiguration cfg) {
+ super(name, msgName, cfg);
+ this.value = ""; // $NON-NLS-1$
+ }
+
+ private MultiArgConfigureOption(String name, AutotoolsConfiguration cfg,
+ String value) {
+ super(name, cfg);
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String newValue) {
+ if (!newValue.equals(value)) {
+ cfg.setDirty(true);
+ isDirty = true;
+ value = newValue;
+ }
+ }
+
+ public boolean isParmSet() {
+ return value.length() > 0;
+ }
+
+ public boolean isMultiArg() {
+ return true;
+ }
+
+ public String getParameter() {
+ return value;
+ }
+
+ public ArrayList<String> getParameters() {
+ // May be multiple user-specified options in which case we
+ // need to split them up into individual options
+ if (!isDirty && userArgs != null)
+ return userArgs;
+ // Otherwise, we need to calculate userArgs
+ userArgs = new ArrayList<String>();
+ isDirty = false;
+ int lastArgIndex = -1;
+ int i = 0;
+ while (i < value.length()) {
+ char ch = value.charAt(i);
+ // Skip white-space
+ while (Character.isWhitespace(ch)) {
+ ++i;
+ if (i < value.length())
+ ch = value.charAt(i);
+ else // Otherwise we are done
+ return userArgs;
+ }
+
+ // Simplistic parser. We break up into strings delimited
+ // by blanks. If quotes are used, we ignore blanks within.
+ // If a backslash is used, we ignore the next character and
+ // pass it through.
+ lastArgIndex = i;
+ boolean inString = false;
+ while (i < value.length()) {
+ ch = value.charAt(i);
+ if (ch == '\\') // escape character
+ ++i; // skip over the next character
+ else if (ch == '\"') { // double quotes
+ inString = !inString;
+ } else if (Character.isWhitespace(ch)) {
+ if (!inString) {
+ userArgs.add(value.substring(lastArgIndex, i));
+ break;
+ }
+ }
+ ++i;
+ }
+ // Look for the case where we ran out of chars for the last
+ // token.
+ if (i >= value.length())
+ userArgs.add(value.substring(lastArgIndex));
+ ++i;
+ }
+ return userArgs;
+ }
+
+ public IConfigureOption copy(AutotoolsConfiguration config) {
+ return new MultiArgConfigureOption(name, config, value);
+ }
+
+ public int getType() {
+ return MULTIARG;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/StringConfigureOption.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/StringConfigureOption.java
new file mode 100644
index 0000000000..4c9a117cfb
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/StringConfigureOption.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.core.configure;
+
+
+public class StringConfigureOption extends AbstractConfigurationOption {
+
+ private String value;
+
+ public StringConfigureOption(String name, AutotoolsConfiguration cfg) {
+ super(name, cfg);
+ this.value = ""; // $NON-NLS-1$
+ }
+
+ public StringConfigureOption(String name, String msgName, AutotoolsConfiguration cfg) {
+ super(name, msgName, cfg);
+ this.value = ""; // $NON-NLS-1$
+ }
+
+ private StringConfigureOption(String name, AutotoolsConfiguration cfg,
+ String value) {
+ super(name, cfg);
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String newValue) {
+ if (!newValue.equals(value)) {
+ cfg.setDirty(true);
+ value = newValue;
+ }
+ }
+
+ public boolean isParmSet() {
+ return value.length() > 0;
+ }
+
+ public String getParameter() {
+ if (isParmSet())
+ return getParameterName() + "=" + getValue(); // $NON-NLS-1$
+ return "";
+ }
+
+ public IConfigureOption copy(AutotoolsConfiguration config) {
+ return new StringConfigureOption(name, config, value);
+ }
+
+ public int getType() {
+ return STRING;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/wizards/NewAutotoolsProject.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/wizards/NewAutotoolsProject.java
new file mode 100644
index 0000000000..ef8eb787bb
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/wizards/NewAutotoolsProject.java
@@ -0,0 +1,143 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Symbian Software Limited 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:
+ * Bala Torati (Symbian) - Initial API and implementation
+ * Red Hat Inc - Modification to use with Autotools project
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.core.wizards;
+
+import java.util.List;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.templateengine.TemplateCore;
+import org.eclipse.cdt.core.templateengine.process.ProcessArgument;
+import org.eclipse.cdt.core.templateengine.process.ProcessFailureException;
+import org.eclipse.cdt.core.templateengine.process.ProcessRunner;
+import org.eclipse.cdt.core.templateengine.process.processes.Messages;
+import org.eclipse.cdt.managedbuilder.core.BuildException;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.templateengine.ProjectCreatedActions;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsNewProjectNature;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.AutotoolsConfigurationManager;
+
+
+/**
+ * Creates a new Project in the workspace.
+ */
+public class NewAutotoolsProject extends ProcessRunner {
+ protected boolean savedAutoBuildingValue;
+ protected ProjectCreatedActions pca;
+ protected IManagedBuildInfo info;
+
+ public NewAutotoolsProject() {
+ pca = new ProjectCreatedActions();
+ }
+
+ public void process(TemplateCore template, ProcessArgument[] args, String processId, IProgressMonitor monitor) throws ProcessFailureException {
+ String projectName = args[0].getSimpleValue();
+ String location = args[1].getSimpleValue();
+ String artifactExtension = args[2].getSimpleValue();
+ String isCProjectValue = args[3].getSimpleValue();
+ boolean isCProject = Boolean.valueOf(isCProjectValue).booleanValue();
+
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+
+ try {
+ if (!project.exists()) {
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ turnOffAutoBuild(workspace);
+
+ IPath locationPath = null;
+ if (location != null && !location.trim().equals("")) { //$NON-NLS-1$
+ locationPath = Path.fromPortableString(location);
+ }
+
+ List<?> configs = template.getTemplateInfo().getConfigurations();
+ if (configs == null || configs.size() == 0) {
+ throw new ProcessFailureException(Messages.getString("NewManagedProject.4") + projectName); //$NON-NLS-1$
+ }
+
+ pca.setProject(project);
+ pca.setProjectLocation(locationPath);
+ pca.setConfigs((IConfiguration[]) configs.toArray(new IConfiguration[configs.size()]));
+ pca.setArtifactExtension(artifactExtension);
+ info = pca.createProject(monitor, CCorePlugin.DEFAULT_INDEXER, isCProject);
+
+ AutotoolsNewProjectNature.addAutotoolsNature(project, monitor);
+
+ // For each IConfiguration, create a corresponding Autotools Configuration
+ IConfiguration[] cfgs = pca.getConfigs();
+ for (int i = 0; i < cfgs.length; ++i) {
+ IConfiguration cfg = cfgs[i];
+ ICConfigurationDescription cfgd = ManagedBuildManager.getDescriptionForConfiguration(cfg);
+ String id = cfgd.getId();
+ AutotoolsConfigurationManager.getInstance().getConfiguration(project, id, true);
+ }
+ AutotoolsConfigurationManager.getInstance().saveConfigs(project);
+
+ info.setValid(true);
+ ManagedBuildManager.saveBuildInfo(project, true);
+
+ restoreAutoBuild(workspace);
+
+ }
+ else {
+ AutotoolsNewProjectNature.addAutotoolsNature(project, monitor);
+ // throw new ProcessFailureException(Messages.getString("NewAutotoolsProject.5") + projectName); //$NON-NLS-1$
+ }
+ } catch (CoreException e) {
+ throw new ProcessFailureException(Messages.getString("NewManagedProject.3") + e.getMessage(), e); //$NON-NLS-1$
+ } catch (BuildException e) {
+ throw new ProcessFailureException(Messages.getString("NewManagedProject.3") + e.getMessage(), e); //$NON-NLS-1$
+ }
+ }
+
+ protected final void turnOffAutoBuild(IWorkspace workspace) throws CoreException {
+ IWorkspaceDescription workspaceDesc = workspace.getDescription();
+ savedAutoBuildingValue = workspaceDesc.isAutoBuilding();
+ workspaceDesc.setAutoBuilding(false);
+ workspace.setDescription(workspaceDesc);
+ }
+
+ protected final void restoreAutoBuild(IWorkspace workspace) throws CoreException {
+ IWorkspaceDescription workspaceDesc = workspace.getDescription();
+ workspaceDesc.setAutoBuilding(savedAutoBuildingValue);
+ workspace.setDescription(workspaceDesc);
+ }
+
+ /**
+ * setOptionValue
+ * @param config
+ * @param option
+ * @param val
+ * @throws BuildException
+ */
+ protected void setOptionValue(IConfiguration config, IOption option, String val) throws BuildException {
+ if (val != null) {
+ if (!option.isExtensionElement()) {
+ option.setValue(val);
+ } else {
+ IOption newOption = config.getToolChain().createOption(option, option.getId() + "." + ManagedBuildManager.getRandomNumber(), option.getName(), false); //$NON-NLS-1$
+ newOption.setValue(val);
+ }
+ }
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/wizards/SetAutotoolsStringOptionValue.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/wizards/SetAutotoolsStringOptionValue.java
new file mode 100644
index 0000000000..171fdaaf91
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/wizards/SetAutotoolsStringOptionValue.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Symbian Software Limited 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:
+ * Bala Torati (Symbian) - Initial API and implementation
+ * Jon Beniston - Add support for Autotools
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.core.wizards;
+
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.templateengine.TemplateCore;
+import org.eclipse.cdt.core.templateengine.process.ProcessArgument;
+import org.eclipse.cdt.core.templateengine.process.ProcessFailureException;
+import org.eclipse.cdt.core.templateengine.process.ProcessRunner;
+import org.eclipse.cdt.managedbuilder.core.BuildException;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsPlugin;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.AutotoolsConfigurationManager;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.IAConfiguration;
+
+public class SetAutotoolsStringOptionValue extends ProcessRunner {
+
+ public void process(TemplateCore template, ProcessArgument[] args, String processId, IProgressMonitor monitor) throws ProcessFailureException {
+ String projectName = args[0].getSimpleValue();
+ IProject projectHandle = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ IWorkspaceDescription workspaceDesc = workspace.getDescription();
+ boolean autoBuilding = workspaceDesc.isAutoBuilding();
+ workspaceDesc.setAutoBuilding(false);
+ try {
+ workspace.setDescription(workspaceDesc);
+ } catch (CoreException e) {//ignore
+ }
+
+ ProcessArgument[][] resourcePathObjects = args[1].getComplexArrayValue();
+ for(int i=0; i<resourcePathObjects.length; i++) {
+ ProcessArgument[] resourcePathObject = resourcePathObjects[i];
+ String id = resourcePathObject[0].getSimpleValue();
+ String value = resourcePathObject[1].getSimpleValue();
+ try {
+ setOptionValue(projectHandle, id, value);
+ } catch (BuildException e) {
+ throw new ProcessFailureException(AutotoolsPlugin.getFormattedString("SetAutotoolsStringOptionValue.error", new String[]{e.getMessage()}), e); //$NON-NLS-1$
+ }
+ }
+
+ workspaceDesc.setAutoBuilding(autoBuilding);
+ try {
+ workspace.setDescription(workspaceDesc);
+ } catch (CoreException e) {//ignore
+ }
+ }
+
+ private void setOptionValue(IProject projectHandle, String id, String
+ value) throws BuildException, ProcessFailureException {
+
+ AutotoolsConfigurationManager.getInstance().syncConfigurations(projectHandle);
+ ICConfigurationDescription[] cfgds =
+ CoreModel.getDefault().getProjectDescription(projectHandle).getConfigurations();
+ if (cfgds != null && cfgds.length >= 1) {
+ IAConfiguration iaConfig =
+ AutotoolsConfigurationManager.getInstance().getConfiguration(projectHandle,
+ cfgds[0].getId());
+ iaConfig.setOption(id, value);
+ }
+ }
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/.classpath b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/.classpath
index 751c8f2e50..751c8f2e50 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/.classpath
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/.classpath
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/.project b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/.project
new file mode 100644
index 0000000000..e6edf235f2
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.cdt.autotools.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/autotools/org.eclipse.linuxtools.cdt.autotools.tests/.settings/org.eclipse.jdt.core.prefs b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..b8bcab4452
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Mon Dec 11 11:40:26 EST 2006
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+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.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.3
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/.settings/org.eclipse.jdt.ui.prefs b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000000..1e28f05fb3
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,3 @@
+#Mon Dec 11 11:40:26 EST 2006
+eclipse.preferences.version=1
+internal.default.compliance=default
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/ChangeLog b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/ChangeLog
new file mode 100644
index 0000000000..1dce969456
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/ChangeLog
@@ -0,0 +1,248 @@
+2010-05-10 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsTestsPlugin.java: Fix plugin id.
+ (AutotoolsTestsPlugin): Remove setting of plugin.
+ (start): Add setting of plugin here.
+
+2010-03-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/ProjectTools.java (setConfigDir): Fix up how
+ configuration is allocated. Use id instead of name.
+
+2009-11-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Make singleton.
+
+2009-11-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/ProjectTools.java: Remove warnings.
+
+2009-10-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsProjectTest0.java (testAutotoolsProject0): Fix to
+ handle fact that default build directory is now project directory.
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsProjectTest1.java (testAutotoolsProject1): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsProjectTest2.java (testAutotoolsProject2): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/ProjectTools.java (setConfigDir): Fix to use new
+ AutotoolsConfigurationManager logic.
+
+2009-10-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Bump up release to 2.0.0.
+
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/AllAutotoolsTests.java (suite): Modified to use
+ new core and ui plug-ins.
+ (suite): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/autoconf/AutoconfTests.java (suite): Ditto.
+ (suite): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsTestsPlugin.java (AutotoolsTestsPlugin): Ditto.
+ (AutotoolsTestsPlugin): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/editors/AutomakeColourizationTests.java: Ditto.
+
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/editors/AutomakeEditorTests.java: Ditto.
+
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/editors/AutomakeTextHoverTest.java: Ditto.
+
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/editors/EditorTests.java (suite): Ditto.
+ (suite): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/ProjectTools.java (ConvertToAutotoolsProjectWizardTest.getSelectedConfigurations): Ditto.
+ (generateFiles): Ditto.
+ (markExecutable): Ditto.
+ (ConvertToAutotoolsProjectWizardTest.getSelectedConfigurations): Ditto.
+ (generateFiles): Ditto.
+ (markExecutable): Ditto.
+
+2009-04-21 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/CoreUtility.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/ProjectTools.java: Use local CoreUtility
+ class to avoid internal class access warnings.
+
+2009-03-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/ProjectTools.java (generateFiles): Call
+ genfiles.sh instead of issuing aclocal, autoconf, and automake which might not exist on
+ test system.
+ * zip/project1.zip: Add generated files into special genfiles directory and add EPL.
+ * zip/project2.zip: Ditto.
+
+2009-03-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * build.properties: Add zip directory to binary build.
+
+2009-01-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Add .qualifier to id.
+
+2008-12-09 Andrew Overholt <overholt@redhat.com>
+
+ * test.xml: Debugging statement.
+
+2008-12-08 Andrew Overholt <overholt@redhat.com>
+
+ * test.xml: Clean up some typos.
+
+2008-12-04 Andrew Overholt <overholt@redhat.com>
+
+ * build.properties: Add test.xml to bin.includes.
+
+2008-11-05 Andrew Overholt <overholt@redhat.com>
+
+ * META-INF/MANIFEST.MF: Update BREE to 1.5.
+
+2008-11-05 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/AllAutotoolsTests.java: New test suite.
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/autoconf/AutoconfTests.java: New test suite.
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/editors/EditorTests.java: New test suite.
+ * test.xml: New file to drive tests on build.eclipse.org.
+
+2008-11-03 Andrew Overholt <overholt@redhat.com>
+
+ * build.properties: Remove plugin.xml, add plugin.properties.
+
+2008-10-31 Andrew Overholt <overholt@redhat.com>
+
+ * META-INF/MANIFEST.MF: Use plugin.properties for %bundleName and %provider.
+ Add "(Incubation)".
+ * plugin.properties: Initial import.
+
+2008-10-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Bump release to 1.0.3.
+
+2008-09-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Change Eclipse-AutoStart to Bundle-ActivationPolicy.
+
+2008-09-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/editors/AutomakeColourizationTests.java (setUp): Make sure
+ test project has unique name since JUNIT tests are run multithread.
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/editors/AutomakeEditorTests.java (testAutomakeEditorAssociation):
+ Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/editors/AutomakeTextHoverTest.java (setUp): Ditto.
+
+2008-09-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ Refactored com.redhat.eclipse.cdt.autotools.tests to org.eclipse.linuxtools.cdt.autotools.tests.
+
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/AllTests.java: Removed since must run as Junit
+ plugin and default is to run all tests in plugin which causes duplicate test runs.
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/autoconf/AllTests.java: Removed. Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsProjectTest0.java (testAutotoolsProject0):
+ Add new generate configuration files parameter and set to true.
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsProjectTest1.java (testAutotoolsProject1):
+ Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsProjectTest2.java (testAutotoolsProject2):
+ Add new generate configuration files parameter and set to false.
+ * src/org/eclipse/linuxtools/cdt/autotools/tests/ProjectTools.java (addSourceContainerWithImport):
+ Add new parameter which states whether configuration files require generation after
+ import.
+ (importFilesFromZipAndGenerate): New method which imports project files and performs
+ generation of configuration files.
+ (generateFiles): New method.
+
+2008-07-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Bump to 1.0.2.
+
+2008-04-17 10:43 Ed Swartz <ed.swartz@nokia.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/tests/autoconf/:
+ TestMacroParser.java, TestShellParser.java: More autoconf parser
+ work. Remove old parser and standardize AST node constructors.
+ Add more tests and fix some bugs.
+
+2008-04-10 15:40 Ed Swartz <ed.swartz@nokia.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/tests/autoconf/:
+ BaseParserTest.java, TestMacroParser.java, TestShellParser.java,
+ TestTokenizer.java: More autoconf parser work.
+
+2008-04-09 14:38 Ed Swartz <ed.swartz@nokia.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/tests/: AllTests.java,
+ autoconf/AllTests.java, autoconf/BaseParserTest.java,
+ autoconf/TestMacroParser.java, autoconf/TestParser.java,
+ autoconf/TestShellParser.java, autoconf/TestSourceInfo.java,
+ autoconf/TestTokenizer.java: New autoconf parser work in progress
+
+2008-04-07 14:06 Ed Swartz <ed.swartz@nokia.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/tests/: AllTests.java,
+ autoconf/AllTests.java, autoconf/TestParser.java,
+ autoconf/TestSourceInfo.java: Initial checkpoint for autotools
+ parser changes
+
+
+2007-08-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Change release to 1.0.1 and specify minimum java runtime as
+ 1.4.
+
+2007-04-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/tests/AutotoolsProjectTest0.java: New
+ test to test simple project with configure in top-level directory.
+ * src/com/redhat/eclipse/cdt/autotools/tests/AllTests.java: Add
+ new AutotoolsProjectTest0 test.
+
+2007-04-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ Verifies fix for #236304
+ * src/com/redhat/eclipse/cdt/autotools/tests/AutotoolsProjectTest1.java (tearDown):
+ Add try catch around project delete.
+ * src/com/redhat/eclipse/cdt/autotools/tests/AutotoolsProjectTest2.java: New test
+ for autogen.sh.
+ * src/com/redhat/eclipse/cdt/autotools/tests/AllTests.java (suite): Add
+ new AutotoolsProjectTest2 test.
+ * zip/project2.zip: New autogen.sh test project.
+
+2007-04-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ Verifies fix for #235076
+ * src/com/redhat/eclipse/cdt/autotools/tests/ProjectTools.java (createFile): Add comments.
+ (setup): Ditto.
+ (getMonitor): Ditto.
+ (createEmptyFile): Ditto.
+ (addSourceContainer): Ditto.
+ (createProject): Ditto.
+ (addSourceContainerWithImport): Ditto.
+ (ConvertToAutotoolsProjectWizardTest): Ditto.
+ (ConvertToAutotoolsProjectWizardTest.getSelectedConfigurations): Ditto.
+ (build): New method.
+ (setConfigDir): Ditto.
+ (markExecutable): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/tests/AutotoolsProjectTest1.java: New test.
+ * src/com/redhat/eclipse/cdt/autotools/tests/AllTests.java (suite): Add
+ AutotoolsProjectTest1 test.
+ * zip/project1.zip: New sample project file for testing.
+
+2007-01-22 Andrew Overholt <overholt@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/tests/editors/AutomakeEditorTests.java:
+ Add copyright.
+ * src/com/redhat/eclipse/cdt/autotools/tests/editors/AutomakeColourizationTests.java:
+ Add copyright.
+ * src/com/redhat/eclipse/cdt/autotools/tests/editors/AutomakeTextHoverTest.java:
+ New file.
+
+
+2006-12-15 Andrew Overholt <overholt@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/tests/editors/AutomakeColourizationTests.java:
+ New file.
+ * src/com/redhat/eclipse/cdt/autotools/tests/ProjectTools.java
+ (createFile): New method.
+ * src/com/redhat/eclipse/cdt/autotools/tests/AllTests.java
+ (suite): Add AutomakeColourizationTests.
+
+2006-12-12 Andrew Overholt <overholt@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/tests/editors/AutomakeEditorTests.java:
+ New file.
+ * src/com/redhat/eclipse/cdt/autotools/tests/ProjectTools.java
+ (createEmptyFile): New method.
+ * src/com/redhat/eclipse/cdt/autotools/tests/AutotoolsProjectNatureTest.java:
+ Clean up imports. \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/META-INF/MANIFEST.MF b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..9d3aa1e556
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,25 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.linuxtools.cdt.autotools.tests;singleton:=true
+Bundle-Version: 2.0.0.qualifier
+Bundle-Activator: org.eclipse.linuxtools.cdt.autotools.tests.AutotoolsTestsPlugin
+Bundle-Vendor: %provider
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.linuxtools.cdt.autotools.core,
+ org.eclipse.core.resources,
+ org.eclipse.cdt.managedbuilder.core,
+ org.eclipse.cdt.ui,
+ org.junit,
+ org.eclipse.ui.ide,
+ org.eclipse.jface.text,
+ org.eclipse.ui.editors,
+ org.eclipse.cdt.make.core,
+ org.eclipse.cdt.make.ui,
+ org.eclipse.ui.workbench.texteditor,
+ org.eclipse.cdt.core,
+ org.eclipse.linuxtools.cdt.autotools.ui;bundle-version="1.0.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/libhover/org.eclipse.cdt.libhover.feature/about.html b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/about.html
index 44e229003e..44e229003e 100644
--- a/libhover/org.eclipse.cdt.libhover.feature/about.html
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/about.html
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/build.properties b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/build.properties
new file mode 100644
index 0000000000..5c6ae502c6
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ test.xml,\
+ zip/
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/plugin.properties b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/plugin.properties
new file mode 100644
index 0000000000..491188978f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.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=Autotools Tests Plug-in (Incubation)
+provider=Eclipse Linux Tools \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/AllAutotoolsTests.java b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/AllAutotoolsTests.java
new file mode 100644
index 0000000000..5064f51d2a
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/AllAutotoolsTests.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllAutotoolsTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite(
+ "Test for org.eclipse.linuxtools.cdt.autotools.core.tests");
+ //$JUnit-BEGIN$
+ suite.addTestSuite(AutotoolsProjectTest0.class);
+ suite.addTestSuite(AutotoolsProjectNatureTest.class);
+ suite.addTestSuite(AutotoolsProjectTest1.class);
+ suite.addTestSuite(AutotoolsProjectTest2.class);
+ //$JUnit-END$
+ return suite;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsProjectNatureTest.java b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsProjectNatureTest.java
new file mode 100644
index 0000000000..dc1f46ae4a
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsProjectNatureTest.java
@@ -0,0 +1,27 @@
+package org.eclipse.linuxtools.cdt.autotools.tests;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
+import org.eclipse.core.resources.IProject;
+
+public class AutotoolsProjectNatureTest extends TestCase {
+
+ /*
+ * @see TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ if (!ProjectTools.setup())
+ fail("could not perform basic project workspace setup");
+ }
+
+ public void testAutotoolsProjectNature() throws Exception {
+ IProject testProject = ProjectTools.createProject("testProject");
+ if(testProject == null) {
+ fail("Unable to create test project");
+ }
+ assertTrue(testProject.hasNature(ManagedCProjectNature.MNG_NATURE_ID));
+ testProject.delete(true, false, ProjectTools.getMonitor());
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsProjectTest0.java b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsProjectTest0.java
new file mode 100644
index 0000000000..ce63dccfeb
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsProjectTest0.java
@@ -0,0 +1,68 @@
+package org.eclipse.linuxtools.cdt.autotools.tests;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+public class AutotoolsProjectTest0 extends TestCase {
+
+ private IProject testProject;
+
+ /*
+ * @see TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ if (!ProjectTools.setup())
+ fail("could not perform basic project workspace setup");
+ testProject = ProjectTools.createProject("testProject0");
+ if (testProject == null) {
+ fail("Unable to create test project");
+ }
+ testProject.open(new NullProgressMonitor());
+ }
+
+ /**
+ * Test sample project which has a hello world program. The top-level
+ * configure is found in the top-level directory. The hello world source
+ * is found in sample/hello.c.
+ * @throws Exception
+ */
+ public void testAutotoolsProject0() throws Exception {
+ Path p = new Path("zip/project1.zip");
+ ProjectTools.addSourceContainerWithImport(testProject, null, p, null, true);
+ assertTrue(testProject.hasNature(ManagedCProjectNature.MNG_NATURE_ID));
+ org.eclipse.core.runtime.Path x = new org.eclipse.core.runtime.Path("ChangeLog");
+ assertTrue(testProject.exists(x));
+ x = new org.eclipse.core.runtime.Path("configure");
+ ProjectTools.markExecutable(testProject, "configure");
+ ProjectTools.markExecutable(testProject, "config.guess");
+ ProjectTools.markExecutable(testProject, "config.sub");
+ ProjectTools.markExecutable(testProject, "missing");
+ ProjectTools.markExecutable(testProject, "mkinstalldirs");
+ ProjectTools.markExecutable(testProject, "install-sh");
+ assertTrue(ProjectTools.build());
+ x = new org.eclipse.core.runtime.Path("config.status");
+ assertTrue(testProject.exists(x));
+ x = new org.eclipse.core.runtime.Path("Makefile");
+ assertTrue(testProject.exists(x));
+ x = new org.eclipse.core.runtime.Path("sample/a.out");
+ assertTrue(testProject.exists(x));
+ x = new org.eclipse.core.runtime.Path("sample/Makefile");
+ assertTrue(testProject.exists(x));
+ }
+
+ protected void tearDown() throws Exception {
+ testProject.refreshLocal(IResource.DEPTH_INFINITE, null);
+ try {
+ testProject.delete(true, true, null);
+ } catch (Exception e) {
+ //FIXME: Why does a ResourceException occur when deleting the project??
+ }
+ super.tearDown();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsProjectTest1.java b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsProjectTest1.java
new file mode 100644
index 0000000000..7355493e24
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsProjectTest1.java
@@ -0,0 +1,71 @@
+package org.eclipse.linuxtools.cdt.autotools.tests;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+public class AutotoolsProjectTest1 extends TestCase {
+
+ private IProject testProject;
+
+ /*
+ * @see TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ if (!ProjectTools.setup())
+ fail("could not perform basic project workspace setup");
+ testProject = ProjectTools.createProject("testProject1");
+ if (testProject == null) {
+ fail("Unable to create test project");
+ }
+ testProject.open(new NullProgressMonitor());
+ }
+
+ /**
+ * Test sample project which has a hello world program. The top-level
+ * configure is found in the subdirectory src which also contains the
+ * subdirectory sample. The hello world source is found in
+ * src/sample/hello.c so configuration must create multiple
+ * Makefiles.
+ * @throws Exception
+ */
+ public void testAutotoolsProject1() throws Exception {
+ Path p = new Path("zip/project1.zip");
+ ProjectTools.addSourceContainerWithImport(testProject, "src", p, null, true);
+ assertTrue(testProject.hasNature(ManagedCProjectNature.MNG_NATURE_ID));
+ org.eclipse.core.runtime.Path x = new org.eclipse.core.runtime.Path("src/ChangeLog");
+ assertTrue(testProject.exists(x));
+ x = new org.eclipse.core.runtime.Path("src/configure");
+ ProjectTools.setConfigDir(testProject, "src");
+ ProjectTools.markExecutable(testProject, "src/configure");
+ ProjectTools.markExecutable(testProject, "src/config.guess");
+ ProjectTools.markExecutable(testProject, "src/config.sub");
+ ProjectTools.markExecutable(testProject, "src/missing");
+ ProjectTools.markExecutable(testProject, "src/mkinstalldirs");
+ ProjectTools.markExecutable(testProject, "src/install-sh");
+ assertTrue(ProjectTools.build());
+ x = new org.eclipse.core.runtime.Path("config.status");
+ assertTrue(testProject.exists(x));
+ x = new org.eclipse.core.runtime.Path("Makefile");
+ assertTrue(testProject.exists(x));
+ x = new org.eclipse.core.runtime.Path("sample/a.out");
+ assertTrue(testProject.exists(x));
+ x = new org.eclipse.core.runtime.Path("sample/Makefile");
+ assertTrue(testProject.exists(x));
+ }
+
+ protected void tearDown() throws Exception {
+ testProject.refreshLocal(IResource.DEPTH_INFINITE, null);
+ try {
+ testProject.delete(true, true, null);
+ } catch (Exception e) {
+ //FIXME: Why does a ResourceException occur when deleting the project??
+ }
+ super.tearDown();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsProjectTest2.java b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsProjectTest2.java
new file mode 100644
index 0000000000..85f9d4bf27
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsProjectTest2.java
@@ -0,0 +1,85 @@
+package org.eclipse.linuxtools.cdt.autotools.tests;
+
+import junit.framework.TestCase;
+
+import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
+// This test verifies an autogen.sh project that builds configure, but
+// does not run it.
+public class AutotoolsProjectTest2 extends TestCase {
+
+ private IProject testProject;
+
+ /*
+ * @see TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ if (!ProjectTools.setup())
+ fail("could not perform basic project workspace setup");
+ testProject = ProjectTools.createProject("testProject2");
+ if (testProject == null) {
+ fail("Unable to create test project");
+ }
+ testProject.open(new NullProgressMonitor());
+ }
+
+ /**
+ * Test sample project which has a hello world program. The top-level
+ * contains autogen.sh which will build configure, but not run it.
+ * The hello world source is found in
+ * src/sample/hello.c so configuration must create multiple
+ * Makefiles.
+ * @throws Exception
+ */
+ public void testAutotoolsProject2() throws Exception {
+ Path p = new Path("zip/project2.zip");
+ ProjectTools.addSourceContainerWithImport(testProject, "src", p, null);
+ assertTrue(testProject.hasNature(ManagedCProjectNature.MNG_NATURE_ID));
+ org.eclipse.core.runtime.Path x = new org.eclipse.core.runtime.Path("src/ChangeLog");
+ assertTrue(testProject.exists(x));
+ x = new org.eclipse.core.runtime.Path("src/configure");
+ ProjectTools.setConfigDir(testProject, "src");
+ ProjectTools.markExecutable(testProject, "src/autogen.sh");
+ x = new org.eclipse.core.runtime.Path("src/configure");
+ assertFalse(testProject.exists(x));
+ x = new org.eclipse.core.runtime.Path("src/Makefile.in");
+ assertFalse(testProject.exists(x));
+ x = new org.eclipse.core.runtime.Path("src/sample/Makefile.in");
+ assertFalse(testProject.exists(x));
+ x = new org.eclipse.core.runtime.Path("src/aclocal.m4");
+ assertFalse(testProject.exists(x));
+ assertTrue(ProjectTools.build());
+ x = new org.eclipse.core.runtime.Path("src/configure");
+ assertTrue(testProject.exists(x));
+ x = new org.eclipse.core.runtime.Path("src/Makefile.in");
+ assertTrue(testProject.exists(x));
+ x = new org.eclipse.core.runtime.Path("src/sample/Makefile.in");
+ assertTrue(testProject.exists(x));
+ x = new org.eclipse.core.runtime.Path("src/aclocal.m4");
+ assertTrue(testProject.exists(x));
+ x = new org.eclipse.core.runtime.Path("config.status");
+ assertTrue(testProject.exists(x));
+ x = new org.eclipse.core.runtime.Path("Makefile");
+ assertTrue(testProject.exists(x));
+ x = new org.eclipse.core.runtime.Path("sample/a.out");
+ assertTrue(testProject.exists(x));
+ x = new org.eclipse.core.runtime.Path("sample/Makefile");
+ assertTrue(testProject.exists(x));
+ }
+
+ protected void tearDown() throws Exception {
+ testProject.refreshLocal(IResource.DEPTH_INFINITE, null);
+ try {
+ testProject.delete(true, true, null);
+ } catch (Exception e) {
+ //FIXME: Why does a ResourceException occur when deleting the project??
+ }
+ super.tearDown();
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsTestsPlugin.java b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsTestsPlugin.java
new file mode 100644
index 0000000000..87f25517c3
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/AutotoolsTestsPlugin.java
@@ -0,0 +1,103 @@
+package org.eclipse.linuxtools.cdt.autotools.tests;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class AutotoolsTestsPlugin extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.cdt.autotools.tests";
+
+ // The shared instance
+ private static AutotoolsTestsPlugin plugin;
+ private ResourceBundle resourceBundle;
+
+ /**
+ * The constructor
+ */
+ public AutotoolsTestsPlugin() {
+ try {
+ resourceBundle = ResourceBundle.getBundle("org.eclipse.linuxtools.cdt.autotools.tests.Resources");
+ } catch (MissingResourceException x) {
+ resourceBundle = null;
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static AutotoolsTestsPlugin 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 active shell.
+ */
+ public static Shell getActiveWorkbenchShell() {
+ IWorkbenchWindow window = getDefault().getWorkbench().getActiveWorkbenchWindow();
+ if (window != null) {
+ return window.getShell();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the string from the plugin's resource bundle,
+ * or 'key' if not found.
+ */
+ public static String getResourceString(String key) {
+ ResourceBundle bundle = AutotoolsTestsPlugin.getDefault().getResourceBundle();
+ try {
+ return (bundle != null) ? bundle.getString(key) : key;
+ } catch (MissingResourceException e) {
+ return key;
+ }
+ }
+
+ /**
+ * Returns the plugin's resource bundle,
+ */
+ public ResourceBundle getResourceBundle() {
+ return resourceBundle;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/CoreUtility.java b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/CoreUtility.java
new file mode 100644
index 0000000000..67b1b8749d
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/CoreUtility.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006 QNX Software Systems 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:
+ * QNX Software Systems - initial API and implementation
+ * Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.tests;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.osgi.framework.Bundle;
+
+public class CoreUtility {
+
+ /**
+ * Creates a folder and all parent folders if not existing.
+ * Project must exist.
+ * <code> org.eclipse.ui.dialogs.ContainerGenerator</code> is too heavy
+ * (creates a runnable)
+ */
+ public static void createFolder(IFolder folder, boolean force, boolean local, IProgressMonitor monitor) throws CoreException {
+ if (!folder.exists()) {
+ IContainer parent= folder.getParent();
+ if (parent instanceof IFolder) {
+ createFolder((IFolder)parent, force, local, null);
+ }
+ folder.create(force, local, monitor);
+ }
+ }
+
+ /**
+ * Creates an extension. If the extension plugin has not
+ * been loaded a busy cursor will be activated during the duration of
+ * the load.
+ *
+ * @param element the config element defining the extension
+ * @param classAttribute the name of the attribute carrying the class
+ * @return the extension object
+ */
+ public static Object createExtension(final IConfigurationElement element, final String classAttribute) throws CoreException {
+ // If plugin has been loaded create extension.
+ // Otherwise, show busy cursor then create extension.
+
+ String id= element.getContributor().getName();
+ Bundle bundle = Platform.getBundle(id);
+ if(bundle.getState() == org.osgi.framework.Bundle.ACTIVE) {
+ return element.createExecutableExtension(classAttribute);
+ }
+ final Object[] ret = new Object[1];
+ final CoreException[] exc = new CoreException[1];
+ BusyIndicator.showWhile(null, new Runnable() {
+ public void run() {
+ try {
+ ret[0] = element.createExecutableExtension(classAttribute);
+ } catch (CoreException e) {
+ exc[0] = e;
+ }
+ }
+ });
+ if (exc[0] != null)
+ throw exc[0];
+ return ret[0];
+ }
+
+ /**
+ * Calls equals after checking for nulls
+ */
+ public static boolean safeEquals(Object lhs, Object rhs) {
+ if (lhs==rhs) {
+ return true;
+ }
+ if (lhs == null || rhs == null) {
+ return false;
+ }
+ return lhs.equals(rhs);
+ }
+
+ /**
+ * Calls hashCode after checking for null
+ */
+ public static int safeHashcode(Object o) {
+ return o == null ? 0 : o.hashCode();
+ }
+
+ /**
+ * Comparse two integers.
+ */
+ public static int compare(int lhs, int rhs) {
+ if (lhs < rhs) {
+ return -1;
+ }
+ if (lhs > rhs) {
+ return 1;
+ }
+ return 0;
+ }
+}
+
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/ProjectTools.java b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/ProjectTools.java
new file mode 100644
index 0000000000..c78eca1941
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/ProjectTools.java
@@ -0,0 +1,418 @@
+package org.eclipse.linuxtools.cdt.autotools.tests;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.util.zip.ZipFile;
+
+import org.eclipse.cdt.core.CommandLauncher;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.ui.wizards.conversion.ConvertProjectWizardPage;
+import org.eclipse.core.resources.IContainer;
+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.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.AutotoolsConfigurationManager;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.IAConfiguration;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.wizards.ConvertToAutotoolsProjectWizard;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.wizards.ConvertToAutotoolsProjectWizardPage;
+import org.eclipse.ui.dialogs.IOverwriteQuery;
+import org.eclipse.ui.wizards.datatransfer.ImportOperation;
+import org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider;
+
+
+public class ProjectTools {
+
+ static IWorkspace workspace;
+ static IWorkspaceRoot root;
+ static NullProgressMonitor monitor;
+ static String pluginRoot;
+ static ConvertProjectWizardPage page;
+ static boolean setupComplete;
+
+ /**
+ * Setup routine for tests.
+ * @return true if setup successful, false otherwise
+ * @throws Exception
+ */
+ public static boolean setup() throws Exception {
+ if (!setupComplete) {
+ IWorkspaceDescription desc;
+ workspace = ResourcesPlugin.getWorkspace();
+ root = workspace.getRoot();
+ monitor = new NullProgressMonitor();
+ if(workspace == null) {
+ return false;
+ }
+ if(root == null) {
+ return false;
+ }
+ desc = workspace.getDescription();
+ desc.setAutoBuilding(false);
+ workspace.setDescription(desc);
+ }
+ setupComplete = true;
+ return true;
+ }
+
+ /**
+ * Build the project.
+ * @return true if build started successfully or false otherwise
+ */
+ public static boolean build() {
+ try {
+ workspace.build(IncrementalProjectBuilder.FULL_BUILD, getMonitor());
+ } catch (CoreException e) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Get the default monitor.
+ * @return The current monitor
+ */
+ public static IProgressMonitor getMonitor() {
+ return monitor;
+ }
+
+ /**
+ * Mark a specified file in a project as executable.
+ * @param project The project that the file is found in
+ * @param filePath The relative path to the file
+ * @return true if the change was successful, false otherwise
+ */
+ public static boolean markExecutable(IProject project, String filePath) {
+ // Get a launcher for the config command
+ CommandLauncher launcher = new CommandLauncher();
+ OutputStream stdout = new ByteArrayOutputStream();
+ OutputStream stderr = new ByteArrayOutputStream();
+
+ launcher.showCommand(true);
+ IPath commandPath = new Path("chmod");
+ IPath runPath = project.getLocation().append(filePath).removeLastSegments(1);
+ String[] args = new String[2];
+ args[0] = "+x";
+ args[1] = project.getLocation().append(filePath).toOSString();
+ try {
+ Process proc = launcher.execute(commandPath, args, new String[0],
+ runPath, new NullProgressMonitor());
+ if (proc != null) {
+ try {
+ // Close the input of the process since we will never write to
+ // it
+ proc.getOutputStream().close();
+ } catch (IOException e) {
+ }
+
+ if (launcher.waitAndRead(stdout, stderr, new SubProgressMonitor(
+ monitor, IProgressMonitor.UNKNOWN)) != CommandLauncher.OK) {
+ return false;
+ }
+ } else
+ return false;
+ } catch (CoreException e) {
+ return false;
+ }
+ return true;
+ }
+
+ // Inner class to allow us to fake a project wizard without starting up
+ // the UI for it.
+ protected static class ConvertToAutotoolsProjectWizardTest extends ConvertToAutotoolsProjectWizard {
+ ConvertToAutotoolsProjectWizardTest() {
+ super();
+ }
+
+ // The following is a kludge to allow testing to occur for the
+ // wizard code. The regular applyOptions() method would also attempt
+ // to call performApply() for the optionPage. This doesn't work in
+ // the test scenario because the UI display logic is needed to
+ // initialize some things. The performApply() call is only needed
+ // to check out referenced projects. In our test scenario, this is
+ // not required.
+ public void applyOptions(IProject project, IProgressMonitor monitor) {
+ setCurrentProject(project);
+ }
+
+ public IConfiguration[] getSelectedConfigurations() {
+ IProjectType projectType = ManagedBuildManager.getExtensionProjectType("org.eclipse.linuxtools.cdt.autotools.core.projectType"); //$NON-NLS-1$
+ IConfiguration[] cfgs = projectType.getConfigurations();
+ return cfgs;
+ }
+ }
+
+ /**
+ * Creates an empty Autotools project.
+ * @param name The name of the new project
+ * @return The newly created project or null
+ */
+ public static IProject createProject(String name) {
+ IProject testProject = root.getProject(name);
+ if (testProject == null) {
+ return null;
+ }
+ try {
+ testProject.create(monitor);
+ testProject.open(monitor);
+ ConvertToAutotoolsProjectWizardTest wizard = new ConvertToAutotoolsProjectWizardTest();
+ wizard.addPages();
+ ConvertToAutotoolsProjectWizardPage page = new ConvertToAutotoolsProjectWizardPage("test", wizard);
+ page.convertProject(testProject, monitor, wizard.getProjectID());
+ } catch (CoreException e) {
+ testProject = null;
+ }
+ return testProject;
+ }
+
+ /**
+ * Set the configuration source directory for an Autotools project.
+ * @param project The Autotools project to modify
+ * @param dir The relative project directory to use
+ */
+ public static void setConfigDir(IProject project, String dir) {
+ IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+ IConfiguration c = info.getDefaultConfiguration();
+ ICConfigurationDescription cfgd = ManagedBuildManager.getDescriptionForConfiguration(c);
+ String id = cfgd.getId();
+ IAConfiguration cfg = AutotoolsConfigurationManager.getInstance().getConfiguration(project, id, true);
+ cfg.setConfigToolDirectory(dir);
+// IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+// ITool tool = info.getToolFromOutputExtension("status"); //$NON-NLS-1$
+// IOption[] options = tool.getOptions();
+// try {
+// for (int i = 0; i < options.length; ++i) {
+// if (options[i].getValueType() == IOption.STRING) {
+// String id = options[i].getId();
+// if (id.indexOf("configdir") > 0) { //$NON-NLS-1$
+// options[i].setValue(dir);
+// break;
+// }
+// }
+// }
+// } catch (BuildException e) {
+// // do nothing
+// }
+ }
+
+ private static void importFilesFromZip(ZipFile srcZipFile, IPath destPath, IProgressMonitor monitor) throws InvocationTargetException {
+ ZipFileStructureProvider structureProvider= new ZipFileStructureProvider(srcZipFile);
+ try {
+ ImportOperation op= new ImportOperation(destPath, structureProvider.getRoot(), structureProvider, new ImportOverwriteQuery());
+ op.run(monitor);
+ } catch (InterruptedException e) {
+ // should not happen
+ }
+ }
+
+ private static boolean generateFiles(IPath destPath) {
+ // Get a launcher for the config command
+ CommandLauncher launcher = new CommandLauncher();
+ OutputStream stdout = new ByteArrayOutputStream();
+ OutputStream stderr = new ByteArrayOutputStream();
+
+ IPath runPath = root.getLocation().append(destPath);
+
+ // Run the genfiles.sh shell script which will simulate
+ // running aclocal, autoconf, and automake
+ launcher.showCommand(true);
+ IPath commandPath = new Path("sh");
+ String[] cmdargs = new String[]{"genfiles.sh"};
+ try {
+ Process proc = launcher.execute(commandPath, cmdargs, new String[0],
+ runPath, new NullProgressMonitor());
+ if (proc != null) {
+ try {
+ // Close the input of the process since we will never write to
+ // it
+ proc.getOutputStream().close();
+ } catch (IOException e) {
+ }
+
+ if (launcher.waitAndRead(stdout, stderr, new SubProgressMonitor(
+ monitor, IProgressMonitor.UNKNOWN)) != CommandLauncher.OK) {
+ return false;
+ }
+ } else
+ return false;
+ } catch (CoreException e) {
+ return false;
+ }
+
+ return true;
+ }
+
+ private static void importFilesFromZipAndGenerate(ZipFile srcZipFile, IPath destPath, IProgressMonitor monitor) throws InvocationTargetException {
+ importFilesFromZip(srcZipFile, destPath, monitor);
+ if (!generateFiles(destPath))
+ throw new InvocationTargetException(new Exception("Unsuccessful test file generation"));
+ }
+
+ private static class ImportOverwriteQuery implements IOverwriteQuery {
+ public String queryOverwrite(String file) {
+ return ALL;
+ }
+ }
+
+ /**
+ * Adds a source container to a IProject.
+ * @param jproject The parent project
+ * @param containerName The name of the new source container
+ * @return The handle to the new source container
+ * @throws CoreException Creation failed
+ */
+ public static IContainer addSourceContainer(IProject jproject, String containerName) throws CoreException {
+ return addSourceContainer(jproject, containerName, new Path[0]);
+ }
+
+ /**
+ * Adds a source container to a IProject.
+ * @param jproject The parent project
+ * @param containerName The name of the new source container
+ * @param exclusionFilters Exclusion filters to set
+ * @return The handle to the new source container
+ * @throws CoreException Creation failed
+ */
+ public static IContainer addSourceContainer(IProject jproject, String containerName, IPath[] exclusionFilters) throws CoreException {
+ return addSourceContainer(jproject, containerName, new Path[0], exclusionFilters);
+ }
+
+ /**
+ * Adds a source container to a IProject.
+ * @param jproject The parent project
+ * @param containerName The name of the new source container
+ * @param inclusionFilters Inclusion filters to set
+ * @param exclusionFilters Exclusion filters to set
+ * @return The handle to the new source container
+ * @throws CoreException Creation failed
+ */
+ public static IContainer addSourceContainer(IProject jproject, String containerName, IPath[] inclusionFilters, IPath[] exclusionFilters) throws CoreException {
+ IProject project= jproject.getProject();
+ IContainer container= null;
+ if (containerName == null || containerName.length() == 0) {
+ container= project;
+ } else {
+ IFolder folder= project.getFolder(containerName);
+ if (!folder.exists()) {
+ CoreUtility.createFolder(folder, false, true, null);
+ }
+ container= folder;
+ }
+
+ return container;
+ }
+
+ /**
+ * Adds a source container to a IProject and imports all files contained
+ * in the given ZIP file.
+ * @param project The parent project
+ * @param containerName Name of the source container
+ * @param zipFile Archive to import
+ * @param containerEncoding encoding for the generated source container
+ * @param generate true if configuration files need to be pre-generated
+ * @param exclusionFilters Exclusion filters to set
+ * @return The handle to the new source container
+ * @throws InvocationTargetException Creation failed
+ * @throws CoreException Creation failed
+ * @throws IOException Creation failed
+ */
+ public static IContainer addSourceContainerWithImport(IProject project, String containerName, File zipFile, String containerEncoding, boolean generate, IPath[] exclusionFilters) throws InvocationTargetException, CoreException, IOException {
+ ZipFile file= new ZipFile(zipFile);
+ try {
+// IPackageFragmentRoot root= addSourceContainer(jproject, containerName, exclusionFilters);
+// ((IContainer) root.getCorrespondingResource()).setDefaultCharset(containerEncoding, null);
+ IContainer root= addSourceContainer(project, containerName, exclusionFilters);
+ if (generate)
+ importFilesFromZipAndGenerate(file, root.getFullPath(), null);
+ else
+ importFilesFromZip(file, root.getFullPath(), null);
+ return root;
+ } finally {
+ if (file != null) {
+ file.close();
+ }
+ }
+ }
+
+ /**
+ * Adds a source container to a IProject and imports all files contained
+ * in the given ZIP file and generates configuration files if needed.
+ * @param project The parent project
+ * @param containerName Name of the source container
+ * @param path path of zipFile Archive to import
+ * @param containerEncoding encoding for the generated source container
+ * @param generate true if configuration files need to be pre-generated
+ * @return The handle to the new source container
+ * @throws InvocationTargetException Creation failed
+ * @throws CoreException Creation failed
+ * @throws IOException Creation failed
+ */
+ public static IContainer addSourceContainerWithImport(IProject project, String containerName, Path zipFilePath, String containerEncoding, boolean generate) throws InvocationTargetException, CoreException, IOException {
+ File zipFile = new File(FileLocator.toFileURL(FileLocator.find(AutotoolsTestsPlugin.getDefault().getBundle(), zipFilePath, null)).getFile());
+ return addSourceContainerWithImport(project, containerName, zipFile, containerEncoding, generate, null);
+ }
+
+ /**
+ * Adds a source container to a IProject and imports all files contained
+ * in the given ZIP file.
+ * @param project The parent project
+ * @param containerName Name of the source container
+ * @param path path of zipFile Archive to import
+ * @param containerEncoding encoding for the generated source container
+ * @return The handle to the new source container
+ * @throws InvocationTargetException Creation failed
+ * @throws CoreException Creation failed
+ * @throws IOException Creation failed
+ */
+ public static IContainer addSourceContainerWithImport(IProject project, String containerName, Path zipFilePath, String containerEncoding) throws InvocationTargetException, CoreException, IOException {
+ return addSourceContainerWithImport(project, containerName, zipFilePath, containerEncoding, false);
+ }
+
+ /**
+ * Create an empty file for a project.
+ * @param project The project to create the file for
+ * @param filename The name of the new file
+ * @return the created file
+ * @throws CoreException
+ */
+ public IFile createEmptyFile(IProject project, String filename) throws CoreException {
+ IFile emptyFile = project.getFile(filename);
+ emptyFile.create(null, false, null);
+ return emptyFile;
+ }
+
+ /**
+ * Create a file for a project and initialize the contents.
+ * @param project The project to create a file for
+ * @param filename Name of the new file
+ * @param contents String containing the initial contents of the file
+ * @return the created file
+ * @throws CoreException
+ */
+ public IFile createFile(IProject project, String filename, String contents) throws CoreException {
+ IFile file = project.getFile(filename);
+ file.create(null, false, null);
+ file.setContents(new ByteArrayInputStream(contents.getBytes()), false, false, null);
+ return file;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/Resources.properties b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/Resources.properties
new file mode 100644
index 0000000000..72d197e262
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/Resources.properties
@@ -0,0 +1,2 @@
+ProjectTools.ErrorDialog.Title="Project Creation Error"
+ProjectTools.Exist.Error="Project already exists" \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/autoconf/AutoconfTests.java b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/autoconf/AutoconfTests.java
new file mode 100644
index 0000000000..566b8669eb
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/autoconf/AutoconfTests.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.tests.autoconf;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AutoconfTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite(
+ "Test for org.eclipse.linuxtools.cdt.autotools.core.tests.autoconf");
+ //$JUnit-BEGIN$
+ suite.addTestSuite(TestMacroParser.class);
+ suite.addTestSuite(TestTokenizer.class);
+ suite.addTestSuite(TestShellParser.class);
+ //$JUnit-END$
+ return suite;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/autoconf/BaseParserTest.java b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/autoconf/BaseParserTest.java
new file mode 100644
index 0000000000..d61e810b88
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/autoconf/BaseParserTest.java
@@ -0,0 +1,268 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.tests.autoconf;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfMacroDetector;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfMacroElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfParser;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.IAutoconfErrorHandler;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.IAutoconfMacroValidator;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.ParseException;
+
+
+import junit.framework.TestCase;
+
+public abstract class BaseParserTest extends TestCase {
+
+ private IAutoconfErrorHandler errorHandler;
+ protected List errors;
+ private IAutoconfMacroValidator macroValidator;
+ private Set macroNames;
+ private AutoconfMacroDetector macroDetector;
+
+ public BaseParserTest() {
+ super();
+ }
+
+ public BaseParserTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ errors = new ArrayList();
+ this.errorHandler = new IAutoconfErrorHandler() {
+
+ public void handleError(ParseException exception) {
+ assertNotNull(exception);
+ errors.add(exception);
+ }
+
+ };
+
+ this.macroDetector = new AutoconfMacroDetector();
+
+ macroNames = new HashSet/*<String>*/();
+ this.macroValidator = new IAutoconfMacroValidator() {
+
+ public void validateMacroCall(AutoconfMacroElement element)
+ throws ParseException {
+ assertNotNull(element);
+ assertNotNull(element.getName());
+ assertNotNull(element.getChildren());
+ macroNames.add(element.getName());
+ }
+
+ };
+ }
+
+ protected void tearDown() throws Exception {
+ }
+
+ protected IDocument createDocument(String text) {
+ return new Document(text);
+ }
+
+ /**
+ * Parse the document with no error or macro handlers
+ * @param parser
+ * @param document
+ * @return root
+ */
+ protected AutoconfElement parseNoHandlers(IDocument document) {
+ AutoconfParser parser = new AutoconfParser(null, null, null);
+ AutoconfElement root = parser.parse(document);
+ assertNotNull(root);
+ return root;
+ }
+
+ /**
+ * Parse the document with the standard error or macro handlers,
+ * cleared out before use
+ * @param parser
+ * @param document
+ * @return root
+ */
+ protected AutoconfElement parseWithHandlers(IDocument document) {
+ AutoconfParser parser = new AutoconfParser(errorHandler, macroDetector, macroValidator);
+
+ errors.clear();
+ macroNames.clear();
+
+ AutoconfElement root = parser.parse(document);
+ assertNotNull(root);
+ return root;
+ }
+
+ /**
+ * Parse the document in 'string' twice, once without any handlers and once with the standard error or macro handlers,
+ * cleared out before use
+ * @param string
+ * @return root
+ */
+ protected AutoconfElement parse(String string) {
+ AutoconfElement tree = parse(string, false);
+ return tree;
+ }
+
+ protected AutoconfElement parse(String string, boolean allowErrors) {
+ IDocument document = createDocument(string);
+ AutoconfElement root1 = parseNoHandlers(document);
+ assertNotNull(root1);
+ AutoconfElement root2 = parseWithHandlers(document);
+ assertNotNull(root2);
+
+ validateSourceTree(root1);
+ validateSourceTree(root2);
+
+ // TODO: check root1 == root2
+
+ // ensure the doc wasn't changed (sanity)
+ assertEquals(string, document.get());
+
+ if (!allowErrors) {
+ if (errors.size() > 0)
+ fail("got errors" + errors.get(0));
+ }
+ else
+ assertTrue(errors.size() > 0);
+
+ return root2;
+ }
+
+ protected void checkError(String msgKey) {
+ for (Iterator iter = errors.iterator(); iter.hasNext(); ) {
+ ParseException exc = (ParseException) iter.next();
+ if (exc.getMessage().contains(msgKey))
+ return;
+ }
+ String any = "";
+ if (errors.size() > 0)
+ any = ", but saw " + errors.get(0).toString();
+ fail("did not find error: " + msgKey + any );
+ }
+
+ protected void checkError(String msgKey, int line) {
+ ParseException possible = null;
+ int distance = 999;
+ for (Iterator iter = errors.iterator(); iter.hasNext(); ) {
+ ParseException exc = (ParseException) iter.next();
+ if (exc.getMessage().contains(msgKey)) {
+ int curDistance = Math.abs(possible.getLineNumber() - line);
+ if (possible == null || curDistance < distance) {
+ possible = exc;
+ distance = curDistance;
+ }
+ if (exc.getLineNumber() == line)
+ return;
+ }
+ }
+ if (possible == null)
+ fail("did not find any error: " + msgKey);
+ else
+ fail("did not find error: " + msgKey + " on line: " + line +", but found one at " + possible.getLineNumber());
+ }
+
+ /**
+ * Make sure the source ranges for the tree are sane:
+ * <p>
+ * <li>document set
+ * <li>line numbers, columns valid
+ * <li>children encompassed in parent
+ * <li>siblings non-overlapping
+ * @param element
+ */
+ protected void validateSourceTree(AutoconfElement element) {
+ validateSourceElement(element);
+ AutoconfElement[] kids = element.getChildren();
+ for (int i = 0; i < kids.length; i++) {
+ if (kids[i].getStartOffset() < element.getStartOffset()
+ || kids[i].getEndOffset() > element.getEndOffset())
+ fail(describeElement(kids[i]) + " not inside parent " + describeElement(element));
+ validateSourceTree(kids[i]);
+ }
+ for (int i = 0; i < kids.length - 1; i++) {
+ AutoconfElement kid1 = kids[i];
+ AutoconfElement kid2 = kids[i + 1];
+ if (kid1.getEndOffset() > kid2.getStartOffset())
+ fail(describeElement(kid1) + " overlaps " + describeElement(kid2));
+ }
+ }
+
+ /**
+ * Make sure the source ranges for the element are sane:
+ * <p>
+ * <li>document set
+ * <li>line numbers, columns valid
+ * @param element
+ */
+ private void validateSourceElement(AutoconfElement element) {
+ if (element.getDocument() == null)
+ fail("no document for " + describeElement(element));
+ if (element.getStartOffset() < 0)
+ fail("no start offset for " + describeElement(element));
+ if (element.getEndOffset() < 0)
+ fail("no end offset for " + describeElement(element));
+ if (element.getStartOffset() > element.getEndOffset())
+ fail("invalid range (start > end) for " + describeElement(element));
+ }
+
+ private String describeElement(AutoconfElement element) {
+ return element.getClass().getSimpleName() + " <<" + element.getSource() + ">>";
+ }
+
+ protected void assertEqualSource(String text, AutoconfElement element) {
+ assertEquals(text, element.getSource());
+ }
+
+ /** Check that a tree has the given structure. 'elements' is a flattened
+ * representation of the tree, where each node represents one level deeper
+ * in the tree, except for 'null' which backs out one level.
+ * @param tree
+ * @param elements
+ */
+ protected void assertTreeStructure(AutoconfElement tree, String[] elements) {
+ // if fails, the elements[] array is missing final nulls
+ assertEquals(elements.length, assertTreeStructure(tree, elements, 0));
+ }
+
+ private int assertTreeStructure(AutoconfElement tree, String[] elements,
+ int elementIdx) {
+ AutoconfElement[] kids = tree.getChildren();
+ for (int j = 0; j < kids.length; j++) {
+ if (elementIdx >= elements.length || elements[elementIdx] == null) {
+ fail("extra children in " + tree + " at " + kids[j]);
+ }
+ if (!kids[j].getName().equals(elements[elementIdx]))
+ fail("did not match " + elements[elementIdx] + ", instead got " + kids[j].getClass().getSimpleName() + "=" + kids[j].getName());
+
+ elementIdx++;
+ if (kids[j].getChildren().length > 0) {
+ elementIdx = assertTreeStructure(kids[j], elements, elementIdx);
+ if (elementIdx >= elements.length)
+ fail("Missing null in elements list, or invalid tree hierarchy");
+ if (elements[elementIdx] != null) {
+ fail("not enough children in " + tree);
+ }
+ elementIdx++;
+ }
+ }
+ return elementIdx;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/autoconf/TestMacroParser.java b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/autoconf/TestMacroParser.java
new file mode 100644
index 0000000000..7bcf950a31
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/autoconf/TestMacroParser.java
@@ -0,0 +1,266 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.cdt.autotools.tests.autoconf;
+
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.AutoconfEditorMessages;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfIfElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfMacroArgumentElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfMacroElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfParser;
+
+
+/**
+ * Test parsing with macros
+ * @author eswartz
+ *
+ */
+public class TestMacroParser extends BaseParserTest {
+
+ public void testEmpty() throws Exception {
+ parse("");
+ }
+
+ public void testComments() throws Exception {
+ //
+ String text =
+ "dnl first line\n" +
+ "dnl second line\n";
+ AutoconfElement root = parse(text);
+ Object[] kids = root.getChildren();
+ // these are stripped
+ assertEquals(0, kids.length);
+ assertTreeStructure(root, new String[] {});
+ }
+
+ public void testMacroParsing1() throws Exception {
+ //
+ String text =
+ "AC_REQUIRE([AM_SANITY_CHECK])\n" +
+ "";
+ AutoconfElement root = parse(text);
+ assertTreeStructure(root, new String[] { "AC_REQUIRE", "AM_SANITY_CHECK", null });
+
+ AutoconfElement[] kids = root.getChildren();
+ assertEquals(1, kids.length);
+ assertTrue(kids[0] instanceof AutoconfMacroElement);
+ AutoconfMacroElement macro = (AutoconfMacroElement) kids[0];
+ assertEquals("AC_REQUIRE", macro.getName());
+ assertEquals(1, macro.getParameterCount());
+
+ AutoconfElement[] args = macro.getChildren();
+ assertEquals(1, args.length);
+ assertTrue(args[0] instanceof AutoconfMacroArgumentElement);
+
+ assertEquals("AM_SANITY_CHECK", ((AutoconfMacroArgumentElement)args[0]).getName());
+ assertEquals("AM_SANITY_CHECK", macro.getParameter(0));
+
+ // keep quotes in source
+ assertEqualSource("[AM_SANITY_CHECK]", args[0]);
+ assertEqualSource("AC_REQUIRE([AM_SANITY_CHECK])", macro);
+ }
+
+ public void testMacroParsing2() throws Exception {
+ //
+ String text =
+ "AC_TWO_ARGS(first,second)\n" +
+ "";
+ AutoconfElement root = parse(text);
+ assertTreeStructure(root, new String[] { "AC_TWO_ARGS", "first", "second", null });
+
+ AutoconfElement[] kids = root.getChildren();
+ assertEquals(1, kids.length);
+ assertTrue(kids[0] instanceof AutoconfMacroElement);
+ AutoconfMacroElement macro = (AutoconfMacroElement) kids[0];
+ assertEquals("AC_TWO_ARGS", macro.getName());
+ assertEquals(2, macro.getParameterCount());
+
+ AutoconfElement[] args = macro.getChildren();
+ assertEquals(2, args.length);
+ assertTrue(args[0] instanceof AutoconfMacroArgumentElement);
+ assertEquals("first", ((AutoconfMacroArgumentElement)args[0]).getName());
+ assertTrue(args[1] instanceof AutoconfMacroArgumentElement);
+ assertEquals("second", ((AutoconfMacroArgumentElement)args[1]).getName());
+ assertEquals("first", macro.getParameter(0));
+ assertEquals("second", macro.getParameter(1));
+
+ assertEqualSource("first", args[0]);
+ assertEqualSource("second", args[1]);
+ assertEqualSource("AC_TWO_ARGS(first,second)", macro);
+ }
+
+ public void testMacroParsing3() throws Exception {
+ //
+ String text =
+ "AC_ONE_ARG( [quoted( arg ), second] )\n" +
+ "";
+ AutoconfElement root = parse(text);
+ assertTreeStructure(root, new String[] { "AC_ONE_ARG", "quoted( arg ), second", null });
+
+ AutoconfElement[] kids = root.getChildren();
+ assertEquals(1, kids.length);
+ assertTrue(kids[0] instanceof AutoconfMacroElement);
+ AutoconfMacroElement macro = (AutoconfMacroElement) kids[0];
+ assertEquals("AC_ONE_ARG", macro.getName());
+
+ AutoconfElement[] args = macro.getChildren();
+ assertEquals(1, macro.getParameterCount());
+ assertEquals(1, args.length);
+ assertTrue(args[0] instanceof AutoconfMacroArgumentElement);
+
+ // spaces removed from outermost arguments, but not inner
+ assertEquals("quoted( arg ), second", ((AutoconfMacroArgumentElement)args[0]).getName());
+ assertEquals("quoted( arg ), second", macro.getParameter(0));
+
+ assertEqualSource("[quoted( arg ), second]", args[0]);
+ assertEqualSource("AC_ONE_ARG( [quoted( arg ), second] )", macro);
+ }
+
+ public void testMacroParsing4() throws Exception {
+ //
+ String text =
+ "AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],\r\n" +
+ " [AM_AUTOMAKE_VERSION([1.4-p6])])\r\n" +
+ "\r\n" +
+ "";
+ AutoconfElement root = parse(text);
+ AutoconfElement[] kids = root.getChildren();
+ assertEquals(1, kids.length);
+ assertTrue(kids[0] instanceof AutoconfMacroElement);
+ AutoconfMacroElement macro = (AutoconfMacroElement) kids[0];
+ assertEquals("AC_DEFUN", macro.getName());
+
+ // spaces and quotes dropped
+ assertEquals(2, macro.getParameterCount());
+ assertEquals("AM_SET_CURRENT_AUTOMAKE_VERSION", macro.getParameter(0));
+ assertEquals("AM_AUTOMAKE_VERSION([1.4-p6])", macro.getParameter(1));
+
+ // no spaces in source either, but quotes kept
+ assertEqualSource("[AM_SET_CURRENT_AUTOMAKE_VERSION]", macro.getChildren()[0]);
+ assertEqualSource("[AM_AUTOMAKE_VERSION([1.4-p6])]", macro.getChildren()[1]);
+ }
+
+ public void testMacroParsing5() throws Exception {
+ // check that complex shell constructs don't throw off the
+ // parser, and also that we don't mistake shell tokens in a macro argument
+ String arg2 =
+ "AC_MSG_CHECKING(for working $2)\n" +
+ "# Run test in a subshell; some versions of sh will print an error if\n" +
+ "# an executable is not found, even if stderr is redirected.\n" +
+ "# Redirect stdin to placate older versions of autoconf. Sigh.\n" +
+ "if ($2 --version) < /dev/null > /dev/null 2>&1; then\n" +
+ " $1=$2\n" +
+ " AC_MSG_RESULT(found)\n" +
+ "else\n" +
+ " $1=\"$3/missing $2\"\n" +
+ " AC_MSG_RESULT(missing)\n" +
+ "fi\n" +
+ "AC_SUBST($1)";
+ String text =
+ "AC_DEFUN([AM_MISSING_PROG],\n" +
+ "[" + arg2 + "])\n" +
+ "";
+ AutoconfElement root = parse(text);
+ assertTreeStructure(root, new String[] {
+ "AC_DEFUN",
+ "AM_MISSING_PROG",
+ arg2,
+ null,
+ });
+ AutoconfElement[] kids = root.getChildren();
+ assertEquals(1, kids.length);
+ assertTrue(kids[0] instanceof AutoconfMacroElement);
+ AutoconfMacroElement macro = (AutoconfMacroElement) kids[0];
+ assertEquals("AC_DEFUN", macro.getName());
+ assertEquals("AM_MISSING_PROG", macro.getVar());
+
+ // spaces dropped
+ assertEquals(2, macro.getParameterCount());
+ assertEquals("AM_MISSING_PROG", macro.getParameter(0));
+
+ // be sure complex arguments aren't mangled
+ assertEquals(arg2, macro.getParameter(1));
+ assertEqualSource("[" + arg2 + "]", macro.getChildren()[1]);
+
+ }
+
+ public void testMacroParsing6() throws Exception {
+ // empty arguments
+ String text =
+ "AC_DEFUN( ,\n" +
+ ")\n";
+ AutoconfElement root = parse(text);
+ AutoconfElement[] kids = root.getChildren();
+ assertEquals(1, kids.length);
+ assertTrue(kids[0] instanceof AutoconfMacroElement);
+ AutoconfMacroElement macro = (AutoconfMacroElement) kids[0];
+ assertEquals("AC_DEFUN", macro.getName());
+ assertEquals("", macro.getVar());
+
+ // spaces dropped
+ assertEquals(2, macro.getParameterCount());
+ assertEquals("", macro.getParameter(0));
+ assertEquals("", macro.getParameter(1));
+
+ assertEqualSource("", macro.getChildren()[0]);
+ assertEqualSource("", macro.getChildren()[1]);
+ }
+
+ public void testWithErrorUnmatchedLeftParen() {
+ String text =
+ "AC_BAD_MACRO(\n";
+
+ AutoconfElement root = parse(text, true);
+ assertEquals(1, root.getChildren().length);
+ assertTrue(root.getChildren()[0] instanceof AutoconfMacroElement);
+ checkError(AutoconfEditorMessages.getString(AutoconfParser.UNMATCHED_LEFT_PARENTHESIS));
+ }
+ public void testWithErrorUnmatchedRightParen() {
+ String text =
+ "AC_BAD_MACRO())\n";
+
+ AutoconfElement root = parse(text, true);
+ assertEquals(1, root.getChildren().length);
+ assertTrue(root.getChildren()[0] instanceof AutoconfMacroElement);
+ checkError(AutoconfEditorMessages.getString(AutoconfParser.UNMATCHED_RIGHT_PARENTHESIS));
+ }
+ public void testNoFalseUnmatchedRightParen() {
+ String text =
+ "AC_BAD_MACRO()\n" +
+ "(\n"+
+ "cd foo;\n"+
+ "if test -f myfile; then exit 1; fi\n"+
+ ")\n";
+
+ // nothing but the macro and 'if' is detected as meaningful
+ AutoconfElement root = parse(text);
+ assertEquals(2, root.getChildren().length);
+ assertTrue(root.getChildren()[0] instanceof AutoconfMacroElement);
+ assertTrue(root.getChildren()[1] instanceof AutoconfIfElement);
+ }
+
+ public void testNestedMacro() {
+ String text =
+ "AC_1(AC_2())\n";
+
+ AutoconfElement root = parse(text);
+ assertEquals(1, root.getChildren().length);
+ assertTrue(root.getChildren()[0] instanceof AutoconfMacroElement);
+ AutoconfMacroElement ac1 = (AutoconfMacroElement) root.getChildren()[0];
+ assertEquals(1, ac1.getChildren().length);
+ assertTrue(ac1.getChildren()[0] instanceof AutoconfMacroArgumentElement);
+ AutoconfMacroArgumentElement ac2 = (AutoconfMacroArgumentElement) ac1.getChildren()[0];
+ // one empty argument
+ assertEquals(1, ac2.getChildren().length);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/autoconf/TestShellParser.java b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/autoconf/TestShellParser.java
new file mode 100644
index 0000000000..764e239999
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/autoconf/TestShellParser.java
@@ -0,0 +1,437 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.cdt.autotools.tests.autoconf;
+
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.AutoconfEditorMessages;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfCaseConditionElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfCaseElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfParser;
+
+/**
+ * @author eswartz
+ *
+ */
+public class TestShellParser extends BaseParserTest {
+
+ public void testHERE() {
+ String HERE_TEXT =
+ "\n"+
+ "while true; do \n"+
+ "AM_INIT_AUTOMAKE([confusion], [$2], EOF)\n"+
+ "done\n";
+ String text = "cat <<EOF"+
+ HERE_TEXT +
+ "EOF\n" +
+ "blah";
+ AutoconfElement tree = parse(text);
+
+ // only see a macro call, not a loop
+ assertTreeStructure(tree, new String[] { "AM_INIT_AUTOMAKE", "confusion", "$2", "EOF", null });
+ }
+
+ public void testHERE2() {
+ String HERE_TEXT =
+ "\n"+
+ "while true; do \n"+
+ "AM_INIT_AUTOMAKE([confusion], [$2], EOF)\n"+
+ "done\n";
+ String text = "cat <<-EOF"+
+ HERE_TEXT +
+ "EOF\n" +
+ "blah";
+ AutoconfElement tree = parse(text);
+
+ // only see a macro call, not a loop
+ assertTreeStructure(tree, new String[] { "AM_INIT_AUTOMAKE", "confusion", "$2", "EOF", null });
+ }
+
+
+ public void testIf0() {
+ String text = "# comment\n"+
+ "\tif true; then\n" +
+ "\t\tfoo;\n"+
+ "\tfi\n";
+ AutoconfElement tree = parse(text);
+ assertTreeStructure(tree, new String[] { "if" });
+ }
+
+ public void testIf1() {
+ String text = "# comment\n"+
+ "\tif true; then\n" +
+ "\t\tAC_SOMETHING();\n"+
+ "\tfi\n";
+ AutoconfElement tree = parse(text);
+ assertTreeStructure(tree, new String[] { "if", "AC_SOMETHING", "", null, null });
+ }
+
+
+ public void testIfElse0() {
+ String text = "# comment\n"+
+ "\tif true; then\n" +
+ "\t\tfoo;\n"+
+ "\telse\n"+
+ "\t\tbar;\n"+
+ "\tfi\n";
+ AutoconfElement tree = parse(text);
+ assertTreeStructure(tree, new String[] { "if", "else", null });
+ }
+
+ public void testIfElse1() {
+ String text = "# comment\n"+
+ "\tif true; then\n" +
+ "\t\tAC_ONE(...);\n"+
+ "\telse\n"+
+ "\t\tAC_TWO(AC_THREE());\n"+
+ "\tfi\n";
+ AutoconfElement tree = parse(text);
+ assertTreeStructure(tree, new String[] {
+ "if",
+ "AC_ONE",
+ "...",
+ null,
+ "else",
+ "AC_TWO",
+ "AC_THREE",
+ "AC_THREE",
+ "",
+ null,
+ null,
+ null,
+ null,
+ null});
+
+ AutoconfElement[] kids = tree.getChildren();
+ assertEqualSource("AC_ONE(...)", kids[0].getChildren()[0]);
+ assertEqualSource("AC_TWO(AC_THREE())", kids[0].getChildren()[1].getChildren()[0]);
+ }
+ public void testIf2() {
+ String text =
+ "if blah\n" +
+ "then fi\n";
+ AutoconfElement tree = parse(text);
+ assertTreeStructure(tree, new String[] { "if" });
+ }
+
+ public void testIfElif() {
+ String text = "# comment\n"+
+ "\tif true; then\n" +
+ "\t\tAC_ONE(...);\n"+
+ "\telif false; then \n"+
+ "\t\tAC_TWO(...);\n"+
+ "\tfi\n";
+ AutoconfElement tree = parse(text);
+ assertTreeStructure(tree, new String[] {
+ "if",
+ "AC_ONE",
+ "...",
+ null,
+ "elif",
+ "AC_TWO",
+ "...",
+ null,
+ null,
+ null });
+ }
+
+ public void testIfErr1() {
+ String text =
+ "if then fi\n";
+ AutoconfElement tree = parse(text, true);
+ assertEquals(1, errors.size());
+ checkError(AutoconfEditorMessages.getFormattedString(AutoconfParser.INVALID_SPECIFIER, "then"));
+ assertTreeStructure(tree, new String[] { "if" });
+ }
+ public void testIfErr2() {
+ String text =
+ "if true; do fi\n";
+ AutoconfElement tree = parse(text, true);
+ assertEquals(1, errors.size());
+ checkError(AutoconfEditorMessages.getString(AutoconfParser.INVALID_DO));
+ assertTreeStructure(tree, new String[] { "if" });
+ }
+ public void testIfErr3() {
+ String text =
+ "if; else bar; fi\n";
+ AutoconfElement tree = parse(text, true);
+ assertEquals(1, errors.size());
+ checkError(AutoconfEditorMessages.getFormattedString(AutoconfParser.MISSING_SPECIFIER, "then"));
+ assertTreeStructure(tree, new String[] { "if", "else", null });
+ }
+ public void testIfErr4() {
+ String text =
+ "if true; then stmt fi\n";
+ AutoconfElement tree = parse(text, true);
+ assertEquals(1, errors.size());
+ checkError(AutoconfEditorMessages.getFormattedString(AutoconfParser.INVALID_TERMINATION, "fi"));
+ assertTreeStructure(tree, new String[] { "if" });
+ }
+ public void testIfErr5() {
+ String text =
+ "if true; then\n";
+ AutoconfElement tree = parse(text, true);
+ assertEquals(1, errors.size());
+ checkError(AutoconfEditorMessages.getFormattedString(AutoconfParser.UNTERMINATED_CONSTRUCT, "if"));
+ assertTreeStructure(tree, new String[] { "if" });
+ }
+ public void testIfErr6() {
+ String text =
+ "if true; then foo; else\n";
+ AutoconfElement tree = parse(text, true);
+ assertEquals(2, errors.size());
+ checkError(AutoconfEditorMessages.getFormattedString(AutoconfParser.UNTERMINATED_CONSTRUCT, "if"));
+ checkError(AutoconfEditorMessages.getFormattedString(AutoconfParser.UNTERMINATED_CONSTRUCT, "else"));
+ assertTreeStructure(tree, new String[] { "if", "else", null });
+ }
+ public void testWhile() {
+ String text =
+ "while true; do foo; done\n";
+ AutoconfElement tree = parse(text);
+ assertTreeStructure(tree, new String[] { "while" });
+ }
+ public void testWhile2() {
+ String text =
+ "while true\n" +
+ "do\n"+
+ "AC_SOMETHING(...); done\n";
+ AutoconfElement tree = parse(text);
+ assertTreeStructure(tree, new String[] { "while", "AC_SOMETHING", "...", null, null });
+ }
+ public void testWhileErr() {
+ String text =
+ "while; AC_SOMETHING(...) done\n";
+ AutoconfElement tree = parse(text, true);
+ assertEquals(2, errors.size());
+ checkError(AutoconfEditorMessages.getFormattedString(AutoconfParser.MISSING_SPECIFIER, "do"));
+ checkError(AutoconfEditorMessages.getFormattedString(AutoconfParser.INVALID_TERMINATION, "done"));
+ assertTreeStructure(tree, new String[] { "while", "AC_SOMETHING", "...", null, null });
+ }
+ public void testWhileErr2() {
+ String text =
+ "while true; do AC_SOMETHING(...)\n";
+ AutoconfElement tree = parse(text, true);
+ assertEquals(1, errors.size());
+ checkError(AutoconfEditorMessages.getFormattedString(AutoconfParser.UNTERMINATED_CONSTRUCT, "while"));
+ assertTreeStructure(tree, new String[] { "while", "AC_SOMETHING", "...", null, null });
+ }
+
+ public void testCase() {
+ String text =
+ "case $VAL in\n"+
+ "linux-*-*) AC_FIRST($VAL) ; true ;;\n"+
+ "bsd-* | macosx-*) : ;;\n"+
+ "*) echo \"I dunno $VAL\";;\n"+
+ "esac\n";
+ AutoconfElement tree = parse(text, false);
+ assertTreeStructure(tree, new String[] {
+ "case",
+ "linux-*-*",
+ "AC_FIRST",
+ "$VAL",
+ null,
+ null,
+ "bsd-* | macosx-*",
+ "*",
+ null
+ });
+
+ AutoconfElement[] kids = tree.getChildren();
+ assertEquals(1, kids.length);
+ assertTrue(kids[0] instanceof AutoconfCaseElement);
+
+ AutoconfCaseElement caseEl = (AutoconfCaseElement) kids[0];
+ assertEqualSource(text.substring(0, text.length()-1), caseEl);
+
+ assertEquals(3, caseEl.getChildren().length);
+
+ assertTrue(caseEl.getChildren()[0] instanceof AutoconfCaseConditionElement);
+ assertTrue(caseEl.getChildren()[1] instanceof AutoconfCaseConditionElement);
+ assertTrue(caseEl.getChildren()[2] instanceof AutoconfCaseConditionElement);
+
+ AutoconfCaseConditionElement caseCond = (AutoconfCaseConditionElement) caseEl.getChildren()[0];
+ assertEquals("linux-*-*) AC_FIRST($VAL) ; true ;;", caseCond.getSource());
+ assertEquals(1, caseCond.getChildren().length);
+ assertEqualSource("AC_FIRST($VAL)", caseCond.getChildren()[0]);
+
+ caseCond = (AutoconfCaseConditionElement) caseEl.getChildren()[1];
+ assertEquals("bsd-* | macosx-*) : ;;", caseCond.getSource());
+ assertEquals(0, caseCond.getChildren().length);
+
+ caseCond = (AutoconfCaseConditionElement) caseEl.getChildren()[2];
+ assertEquals("*) echo \"I dunno $VAL\";;", caseCond.getSource());
+ assertEquals(0, caseCond.getChildren().length);
+
+ }
+
+ public void testCaseErr() {
+ String text =
+ "case $VAL; linux-*-*) AC_FIRST($VAL) ; true esac\n";
+ AutoconfElement tree = parse(text, true);
+ assertEquals(2, errors.size());
+ checkError(AutoconfEditorMessages.getString(AutoconfParser.INVALID_IN));
+ checkError(AutoconfEditorMessages.getFormattedString(AutoconfParser.INVALID_TERMINATION, "esac"));
+
+ assertTreeStructure(tree, new String[] { "case", "linux-*-*", "AC_FIRST", "$VAL", null, null, null });
+
+ AutoconfElement[] kids = tree.getChildren();
+ AutoconfCaseElement caseEl = (AutoconfCaseElement) kids[0];
+ AutoconfCaseConditionElement caseCond = (AutoconfCaseConditionElement) caseEl.getChildren()[0];
+ // goofed up, but ok
+ assertEquals("linux-*-*) AC_FIRST($VAL) ; true esac", caseCond.getSource());
+ assertEqualSource("AC_FIRST($VAL)", caseCond.getChildren()[0]);
+
+ }
+ public void testCaseErr2() {
+ String text =
+ "case $VAL in\n";
+ AutoconfElement tree = parse(text, true);
+ assertEquals(1, errors.size());
+ checkError(AutoconfEditorMessages.getFormattedString(AutoconfParser.UNTERMINATED_CONSTRUCT, "case"));
+
+ assertTreeStructure(tree, new String[] { "case" });
+
+ }
+
+ public void testForIn() {
+ // don't get upset by 'in'
+ String text =
+ "for VAL in 1 2 3 4; do echo $VAL; done\n";
+ AutoconfElement tree = parse(text, false);
+
+ assertTreeStructure(tree, new String[] { "for" });
+ AutoconfElement[] kids = tree.getChildren();
+
+ AutoconfElement forEl = kids[0];
+ assertEqualSource(text.substring(0, text.length()-1), forEl);
+
+ }
+
+ public void testForDo() {
+ // don't get upset by parentheses
+ String text =
+ "for (( AC_1; AC_2(); AC_3(...) )); do echo $VAL; done\n";
+ AutoconfElement tree = parse(text, false);
+
+ assertTreeStructure(tree, new String[] { "for", "AC_1", "AC_2", "", null, "AC_3", "...", null, null });
+
+ }
+
+ public void testUntil() {
+ String text =
+ "until false; do AC_SOMETHING(...); done\n";
+ AutoconfElement tree = parse(text, false);
+ assertTreeStructure(tree, new String[] { "until", "AC_SOMETHING", "...", null, null });
+
+
+ }
+ public void testSelect() {
+ String text =
+ "select VAR in 1 2 3; do AC_SOMETHING(...); done\n"+
+ "select VAR; do AC_SOMETHING; done\n";
+
+ AutoconfElement tree = parse(text, false);
+ assertTreeStructure(tree, new String[] {
+ "select",
+ "AC_SOMETHING",
+ "...",
+ null,
+ null,
+ "select",
+ "AC_SOMETHING",
+ null
+ });
+ }
+
+ public void testComplex1() {
+ String text =
+ "AM_INIT_AUTOMAKE([foo1], 1.96)\n" +
+ "while true; do \n" +
+ " var=shift;\n" +
+ " if [ test -f \"$var\"] ; then\n"+
+ " AC_SOMETHING($var);\n"+
+ " fi\n"+
+ "done;\n"+
+ "AM_GENERATE(Makefile)\n";
+ AutoconfElement tree = parse(text, false);
+ assertTreeStructure(tree, new String[] {
+ "AM_INIT_AUTOMAKE",
+ "foo1",
+ "1.96",
+ null,
+ "while",
+ "if",
+ "AC_SOMETHING",
+ "$var",
+ null,
+ null,
+ null,
+ "AM_GENERATE",
+ "Makefile",
+ null
+ });
+ }
+
+ public void testComplex2() {
+ String text =
+ "if true; then\n" +
+ "AC_CANONICAL_HOST\n" +
+ "else\n" +
+ "case foo in \n" +
+ " 3) 1 ;;\n" +
+ "esac;\n" +
+ "fi\n";
+ AutoconfElement tree = parse(text, false);
+ assertTreeStructure(tree, new String[] {
+ "if",
+ "AC_CANONICAL_HOST",
+ "else",
+ "case",
+ "3",
+ null,
+ null,
+ null
+ });
+ }
+
+ public void testEarlyClose() {
+ String text =
+ "if true; then foo ; fi\n"+
+ "fi\n"+
+ "while true; do done;\n";
+ AutoconfElement tree = parse(text, true);
+ assertTreeStructure(tree, new String[] {
+ "if",
+ "while"
+ });
+ }
+
+ public void testOverlapping() {
+ String text =
+ "for foo\n"+
+ "if bar\n";
+ AutoconfElement tree = parse(text, true);
+ assertTreeStructure(tree, new String[] {
+ "for",
+ "if"
+ });
+ }
+
+ public void testDollar() {
+ // dollars guard keywords
+ String text =
+ "if [ $if == 3 ] ; then $for; fi\n";
+ AutoconfElement tree = parse(text);
+ assertTreeStructure(tree, new String[] {
+ "if"
+ });
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/autoconf/TestTokenizer.java b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/autoconf/TestTokenizer.java
new file mode 100644
index 0000000000..03f4d6312e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/autoconf/TestTokenizer.java
@@ -0,0 +1,486 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.cdt.autotools.tests.autoconf;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfTokenizer;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.IAutoconfErrorHandler;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.ITokenConstants;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.ParseException;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.Token;
+
+
+/**
+ * Test autoconf tokenizer. The tokenizer mainly is used to detect boundaries and keywords
+ * and is not a full shell tokenizer.
+ * @author eswartz
+ *
+ */
+public class TestTokenizer extends TestCase {
+
+ private ArrayList tokenizerErrors;
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#tearDown()
+ */
+ protected void tearDown() throws Exception {
+ }
+
+ protected IDocument createDocument(String text) {
+ return new Document(text);
+ }
+
+ protected List/*<Token>*/tokenize(IDocument document) {
+ return tokenize(document, false);
+ }
+
+ protected List/*<Token>*/tokenize(IDocument document, boolean isM4Mode) {
+ tokenizerErrors = new ArrayList();
+ AutoconfTokenizer tokenizer = new AutoconfTokenizer(document, new IAutoconfErrorHandler() {
+
+ public void handleError(ParseException exception) {
+ tokenizerErrors.add(exception);
+ }
+
+ });
+ tokenizer.setM4Context(isM4Mode);
+
+ List/*<Token>*/ tokens = tokenize(tokenizer);
+ return tokens;
+ }
+
+ protected List/*<Token>*/tokenize(AutoconfTokenizer tokenizer) {
+ List/*<Token>*/tokens = new ArrayList();
+ while (true) {
+ Token token = tokenizer.readToken();
+ if (token.getType() == ITokenConstants.EOF)
+ break;
+ tokens.add(token);
+ }
+ return tokens;
+ }
+
+ protected void checkNoErrors() {
+ assertEquals(0, tokenizerErrors.size());
+ }
+ public void testEmpty() {
+ IDocument document = createDocument("");
+ List tokens = tokenize(document, false);
+ checkNoErrors();
+ assertEquals(0, tokens.size());
+ }
+
+ public void testEOL1() {
+ IDocument document = createDocument("\n");
+ List tokens = tokenize(document, false);
+ checkNoErrors();
+ assertEquals(1, tokens.size());
+ checkToken((Token) tokens.get(0), document, ITokenConstants.EOL, "\n");
+ }
+
+ public void testEOL2() {
+ IDocument document = createDocument("\r\n");
+ List tokens = tokenize(document, false);
+ checkNoErrors();
+ assertEquals(1, tokens.size());
+ checkToken((Token) tokens.get(0), document, ITokenConstants.EOL, "\r\n");
+ }
+
+ public void testEOL3() {
+ IDocument document = createDocument("\n\r\n\n");
+ List tokens = tokenize(document, false);
+ checkNoErrors();
+ assertEquals(3, tokens.size());
+ checkToken((Token) tokens.get(0), document, ITokenConstants.EOL, "\n");
+ checkToken((Token) tokens.get(1), document, ITokenConstants.EOL, "\r\n");
+ checkToken((Token) tokens.get(2), document, ITokenConstants.EOL, "\n");
+ }
+
+ public void testShellText() {
+ // default mode is shell
+ String text = "random\nstuff\n";
+ IDocument document = createDocument(text);
+ List tokens = tokenize(document, false);
+ checkNoErrors();
+ assertEquals(4, tokens.size());
+ checkToken((Token) tokens.get(0), document, ITokenConstants.WORD,
+ "random");
+ checkToken((Token) tokens.get(1), document, ITokenConstants.EOL, "\n");
+ checkToken((Token) tokens.get(2), document, ITokenConstants.WORD,
+ "stuff");
+ checkToken((Token) tokens.get(3), document, ITokenConstants.EOL, "\n");
+ }
+
+ public void testShellTokens() {
+ // default mode is shell
+ String text = "while true; do ls; done\n";
+ IDocument document = createDocument(text);
+ List tokens = tokenize(document, false);
+ checkNoErrors();
+ assertEquals(8, tokens.size());
+ checkToken((Token) tokens.get(0), document, ITokenConstants.SH_WHILE,
+ "while");
+ checkToken((Token) tokens.get(1), document, ITokenConstants.WORD,
+ "true");
+ checkToken((Token) tokens.get(2), document, ITokenConstants.SEMI, ";");
+ checkToken((Token) tokens.get(3), document, ITokenConstants.SH_DO, "do");
+ checkToken((Token) tokens.get(4), document, ITokenConstants.WORD, "ls");
+ checkToken((Token) tokens.get(5), document, ITokenConstants.SEMI, ";");
+ checkToken((Token) tokens.get(6), document, ITokenConstants.SH_DONE,
+ "done");
+ checkToken((Token) tokens.get(7), document, ITokenConstants.EOL, "\n");
+ }
+
+ public void testShellTokens2() {
+ // don't misread partial tokens
+ String text = "while_stuff incase";
+ IDocument document = createDocument(text);
+ List tokens = tokenize(document, false);
+ checkNoErrors();
+ assertEquals(2, tokens.size());
+ checkToken((Token) tokens.get(0), document, ITokenConstants.WORD,
+ "while_stuff");
+ checkToken((Token) tokens.get(1), document, ITokenConstants.WORD,
+ "incase");
+ }
+
+ public void testShellTokens3() {
+ // don't interpret m4 strings in shell mode
+ String text = "`foo'";
+ IDocument document = createDocument(text);
+ List tokens = tokenize(document, false);
+ assertEquals(1, tokenizerErrors.size());
+ assertEquals(1, tokens.size());
+ checkToken((Token) tokens.get(0), document, ITokenConstants.SH_STRING_BACKTICK, "foo'", 5);
+ }
+
+ public void testShellTokens4() {
+ String text = "echo $if $((foo)) $\n";
+ IDocument document = createDocument(text);
+ List tokens = tokenize(document, false);
+ checkNoErrors();
+ assertEquals(11, tokens.size());
+ checkToken((Token) tokens.get(0), document, ITokenConstants.WORD, "echo");
+ checkToken((Token) tokens.get(1), document, ITokenConstants.SH_DOLLAR, "$");
+ // dollar guards keywords, but the tokenizer doesn't know this
+ checkToken((Token) tokens.get(2), document, ITokenConstants.SH_IF, "if");
+ checkToken((Token) tokens.get(3), document, ITokenConstants.SH_DOLLAR, "$");
+ checkToken((Token) tokens.get(4), document, ITokenConstants.LPAREN, "(");
+ checkToken((Token) tokens.get(5), document, ITokenConstants.LPAREN, "(");
+ checkToken((Token) tokens.get(6), document, ITokenConstants.WORD, "foo");
+ checkToken((Token) tokens.get(7), document, ITokenConstants.RPAREN, ")");
+ checkToken((Token) tokens.get(8), document, ITokenConstants.RPAREN, ")");
+ checkToken((Token) tokens.get(9), document, ITokenConstants.SH_DOLLAR, "$");
+ checkToken((Token) tokens.get(10), document, ITokenConstants.EOL, "\n");
+
+ }
+
+ public void testShellTokens5() {
+ String text = "while do select for until done\n";
+ IDocument document = createDocument(text);
+ List tokens = tokenize(document, false);
+ checkNoErrors();
+ assertEquals(7, tokens.size());
+ checkToken((Token) tokens.get(0), document, ITokenConstants.SH_WHILE, "while");
+ checkToken((Token) tokens.get(1), document, ITokenConstants.SH_DO, "do");
+ checkToken((Token) tokens.get(2), document, ITokenConstants.SH_SELECT, "select");
+ checkToken((Token) tokens.get(3), document, ITokenConstants.SH_FOR, "for");
+ checkToken((Token) tokens.get(4), document, ITokenConstants.SH_UNTIL, "until");
+ checkToken((Token) tokens.get(5), document, ITokenConstants.SH_DONE, "done");
+ checkToken((Token) tokens.get(6), document, ITokenConstants.EOL, "\n");
+
+ }
+
+ public void testShellComments() {
+ // comments are stripped and ignored in the shell mode
+ String text = "for # while case\n";
+ IDocument document = createDocument(text);
+ List tokens = tokenize(document, false);
+ checkNoErrors();
+ assertEquals(2, tokens.size());
+ checkToken((Token) tokens.get(0), document, ITokenConstants.SH_FOR,
+ "for");
+ checkToken((Token) tokens.get(1), document, ITokenConstants.EOL, "\n");
+ }
+
+ public void testShellComments2() {
+ // comments are stripped and ignored in the shell mode
+ String text = "# while case\n" + "#for x in 3\n" + "\n";
+ IDocument document = createDocument(text);
+ List tokens = tokenize(document, false);
+ checkNoErrors();
+ assertEquals(3, tokens.size());
+ checkToken((Token) tokens.get(0), document, ITokenConstants.EOL, "\n");
+ checkToken((Token) tokens.get(1), document, ITokenConstants.EOL, "\n");
+ checkToken((Token) tokens.get(2), document, ITokenConstants.EOL, "\n");
+ }
+
+ public void testM4Tokens0() {
+ String text = "while_stuff incase";
+ IDocument document = createDocument(text);
+ List tokens = tokenize(document, true);
+ checkNoErrors();
+ assertEquals(2, tokens.size());
+ checkToken((Token) tokens.get(0), document, ITokenConstants.WORD,
+ "while_stuff");
+ checkToken((Token) tokens.get(1), document, ITokenConstants.WORD,
+ "incase");
+ }
+
+ public void testShellStrings() {
+ String QUOTED =
+ "ls -la \"*.c\"";
+ String text = "echo `" + QUOTED + "`\n";
+ IDocument document = createDocument(text);
+ List tokens = tokenize(document, false);
+ checkNoErrors();
+ assertEquals(3, tokens.size());
+ checkToken((Token) tokens.get(0), document, ITokenConstants.WORD,
+ "echo");
+ checkToken((Token) tokens.get(1), document, ITokenConstants.SH_STRING_BACKTICK,
+ QUOTED, QUOTED.length() + 2);
+ checkToken((Token) tokens.get(2), document, ITokenConstants.EOL, "\n");
+ }
+ public void testShellStrings2() {
+ String QUOTED =
+ "ls -la 'space file'";
+ String text = "echo \"" + QUOTED + "\"\n";
+ IDocument document = createDocument(text);
+ List tokens = tokenize(document, false);
+ checkNoErrors();
+ assertEquals(3, tokens.size());
+ checkToken((Token) tokens.get(0), document, ITokenConstants.WORD,
+ "echo");
+ checkToken((Token) tokens.get(1), document, ITokenConstants.SH_STRING_DOUBLE,
+ QUOTED, QUOTED.length() + 2);
+ checkToken((Token) tokens.get(2), document, ITokenConstants.EOL, "\n");
+ }
+ public void testShellStrings3() {
+ String QUOTED =
+ "echo \"*.c\" | sed s/[a-z]/[A-Z]/g";
+ String text = "echo '" + QUOTED + "'\n";
+ IDocument document = createDocument(text);
+ List tokens = tokenize(document, false);
+ checkNoErrors();
+ assertEquals(3, tokens.size());
+ checkToken((Token) tokens.get(0), document, ITokenConstants.WORD,
+ "echo");
+ checkToken((Token) tokens.get(1), document, ITokenConstants.SH_STRING_SINGLE,
+ QUOTED, QUOTED.length() + 2);
+ checkToken((Token) tokens.get(2), document, ITokenConstants.EOL, "\n");
+ }
+ public void testM4Tokens1() {
+ String text = "define(`hi\', `HI\')\n";
+ IDocument document = createDocument(text);
+ List tokens = tokenize(document, true);
+ checkNoErrors();
+ assertEquals(7, tokens.size());
+ checkToken((Token) tokens.get(0), document, ITokenConstants.WORD,
+ "define");
+ checkToken((Token) tokens.get(1), document, ITokenConstants.LPAREN, "(");
+ // strings are unquoted in token text
+ checkToken((Token) tokens.get(2), document, ITokenConstants.M4_STRING,
+ "hi", 4);
+ checkToken((Token) tokens.get(3), document, ITokenConstants.COMMA, ",");
+ checkToken((Token) tokens.get(4), document, ITokenConstants.M4_STRING,
+ "HI", 4);
+ checkToken((Token) tokens.get(5), document, ITokenConstants.RPAREN, ")");
+ checkToken((Token) tokens.get(6), document, ITokenConstants.EOL, "\n");
+ }
+
+ public void testM4Comments() {
+ String text = "dnl # comment\n";
+ IDocument document = createDocument(text);
+ List tokens = tokenize(document, true);
+ checkNoErrors();
+ assertEquals(2, tokens.size());
+ checkToken((Token) tokens.get(0), document, ITokenConstants.WORD, "dnl");
+ checkToken((Token) tokens.get(1), document, ITokenConstants.M4_COMMENT,
+ "# comment\n");
+ }
+
+ public void testM4Comments2() {
+ String text = "dnl /* word(`quoted')\n" + "*/\n";
+ IDocument document = createDocument(text);
+ AutoconfTokenizer tokenizer = createTokenizer(document);
+ tokenizer.setM4Context(true);
+ tokenizer.setM4Comment("/*", "*/");
+
+ List tokens = tokenize(tokenizer);
+ assertEquals(3, tokens.size());
+ checkToken((Token) tokens.get(0), document, ITokenConstants.WORD, "dnl");
+ checkToken((Token) tokens.get(1), document, ITokenConstants.M4_COMMENT,
+ "/* word(`quoted')\n*/");
+ checkToken((Token) tokens.get(2), document, ITokenConstants.EOL, "\n");
+ }
+
+ public void testM4Strings1() {
+ // double quotes only removes one level of quotes
+ String text = "``double''\n";
+ IDocument document = createDocument(text);
+ AutoconfTokenizer tokenizer = createTokenizer(document);
+ tokenizer.setM4Context(true);
+
+ List tokens = tokenize(tokenizer);
+ assertEquals(2, tokens.size());
+ checkToken((Token) tokens.get(0), document, ITokenConstants.M4_STRING,
+ "`double'", 8 + 1 + 1);
+ checkToken((Token) tokens.get(1), document, ITokenConstants.EOL, "\n");
+ }
+
+ public void testM4Strings2() {
+ String text = "myword(!!boundary==)\n";
+ IDocument document = createDocument(text);
+ AutoconfTokenizer tokenizer = createTokenizer(document);
+ tokenizer.setM4Context(true);
+ tokenizer.setM4Quote("!!", "==");
+
+ List tokens = tokenize(tokenizer);
+ assertEquals(5, tokens.size());
+ checkToken((Token) tokens.get(0), document, ITokenConstants.WORD,
+ "myword");
+ checkToken((Token) tokens.get(1), document, ITokenConstants.LPAREN, "(");
+ checkToken((Token) tokens.get(2), document, ITokenConstants.M4_STRING,
+ "boundary", 8 + 2 + 2);
+ checkToken((Token) tokens.get(3), document, ITokenConstants.RPAREN, ")");
+ checkToken((Token) tokens.get(4), document, ITokenConstants.EOL, "\n");
+ }
+
+ public void testM4Tokens2() {
+ // dollar is not seen in m4 mode (only important when expanding)
+ String text = "define(foo,$1)\n";
+ IDocument document = createDocument(text);
+ AutoconfTokenizer tokenizer = createTokenizer(document);
+ tokenizer.setM4Context(true);
+
+ List tokens = tokenize(tokenizer);
+ assertEquals(8, tokens.size());
+ checkToken((Token) tokens.get(0), document, ITokenConstants.WORD,
+ "define");
+ checkToken((Token) tokens.get(1), document, ITokenConstants.LPAREN, "(");
+ checkToken((Token) tokens.get(2), document, ITokenConstants.WORD, "foo");
+ checkToken((Token) tokens.get(3), document, ITokenConstants.COMMA, ",");
+ checkToken((Token) tokens.get(4), document, ITokenConstants.TEXT, "$");
+ checkToken((Token) tokens.get(5), document, ITokenConstants.TEXT, "1");
+ checkToken((Token) tokens.get(6), document, ITokenConstants.RPAREN, ")");
+ checkToken((Token) tokens.get(7), document, ITokenConstants.EOL, "\n");
+ }
+
+ public void testM4QuoteNesting() {
+ String quote = "this is `nested\'!";
+ String text = "`" + quote +"'\n";
+ IDocument document = createDocument(text);
+ AutoconfTokenizer tokenizer = createTokenizer(document);
+ tokenizer.setM4Context(true);
+
+ List tokens = tokenize(tokenizer);
+ assertEquals(2, tokens.size());
+ checkToken((Token) tokens.get(0), document, ITokenConstants.M4_STRING,
+ quote, quote.length() + 2);
+ checkToken((Token) tokens.get(1), document, ITokenConstants.EOL, "\n");
+
+ }
+
+ public void testMixedContext() {
+ String text = "AM_INIT([arg])if true\n";
+ IDocument document = createDocument(text);
+ AutoconfTokenizer tokenizer = createTokenizer(document);
+ tokenizer.setM4Context(false);
+ tokenizer.setM4Quote("[", "]");
+
+ Token token;
+ token = tokenizer.readToken();
+ checkToken(token, document, ITokenConstants.WORD, "AM_INIT");
+
+ // "hey, that's a macro"
+ tokenizer.setM4Context(true);
+
+ token = tokenizer.readToken();
+ checkToken(token, document, ITokenConstants.LPAREN, "(");
+ token = tokenizer.readToken();
+ checkToken(token, document, ITokenConstants.M4_STRING, "arg", 5);
+ token = tokenizer.readToken();
+ checkToken(token, document, ITokenConstants.RPAREN, ")");
+
+ // "check it's not a dangling paren"
+ // it'll still be an m4 word
+ token = tokenizer.readToken();
+ checkToken(token, document, ITokenConstants.WORD, "if");
+
+ // push back token
+ tokenizer.unreadToken(token);
+
+ // "done reading macro"
+ tokenizer.setM4Context(false);
+
+ // "get shell stuff"
+ token = tokenizer.readToken();
+ checkToken(token, document, ITokenConstants.SH_IF, "if");
+ token = tokenizer.readToken();
+ checkToken(token, document, ITokenConstants.WORD, "true");
+
+ token = tokenizer.readToken();
+ checkToken(token, document, ITokenConstants.EOL, "\n");
+
+ checkToken(tokenizer.readToken(), document, ITokenConstants.EOF);
+
+ }
+
+ private AutoconfTokenizer createTokenizer(IDocument document) {
+ return new AutoconfTokenizer(document, new IAutoconfErrorHandler() {
+
+ public void handleError(ParseException exception) {
+ fail(exception.toString());
+ }
+
+ });
+ }
+
+ private void checkToken(Token token, IDocument document, int type) {
+ assertEquals(type, token.getType());
+ assertSame(document, token.getDocument());
+ assertTrue(token.getOffset() >= 0);
+ assertTrue(token.getType() == ITokenConstants.EOF || token.getLength() > 0);
+ assertEquals(document.get().substring(token.getOffset(),
+ token.getOffset() + token.getLength()), token.getText());
+ }
+
+ private void checkToken(Token token, IDocument document, int type,
+ String text) {
+ assertEquals(type, token.getType());
+ assertSame(document, token.getDocument());
+ assertTrue(token.getOffset() >= 0);
+ assertEquals(text, token.getText());
+ assertEquals(text.length(), token.getLength());
+ }
+
+ private void checkToken(Token token, IDocument document, int type,
+ String text, int length) {
+ assertEquals(type, token.getType());
+ assertSame(document, token.getDocument());
+ assertTrue(token.getOffset() >= 0);
+ assertEquals(text, token.getText());
+ assertEquals(length, token.getLength());
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/editors/AutomakeColourizationTests.java b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/editors/AutomakeColourizationTests.java
new file mode 100644
index 0000000000..4bc8017bed
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/editors/AutomakeColourizationTests.java
@@ -0,0 +1,215 @@
+/*******************************************************************************
+ * Copyright (c) 2006 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.tests.editors;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.linuxtools.cdt.autotools.tests.AutotoolsTestsPlugin;
+import org.eclipse.linuxtools.cdt.autotools.tests.ProjectTools;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake.AutomakeDocumentProvider;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake.AutomakeEditor;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake.AutomakefileCodeScanner;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake.AutomakefileSourceConfiguration;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.ColorManager;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbench;
+
+
+public class AutomakeColourizationTests extends TestCase {
+
+ ProjectTools tools;
+ private IProject project;
+ private IFile makefileAmFile;
+
+ static String makefileAmContents =
+ "# This is a comment" + "\n" +
+ "if CONDITION" + "\n" +
+ "MACRO = case1" + "\n" +
+ "else" + "\n" +
+ "MACRO = case2" + "\n" +
+ "$(MACRO)" + "\n" +
+ "${MACRO}" + "\n" +
+ "";
+ private IWorkbench workbench;
+ private AutomakefileCodeScanner codeScanner;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ tools = new ProjectTools();
+ if (!ProjectTools.setup())
+ fail("could not perform basic project workspace setup");
+
+ project = ProjectTools.createProject("testProjectACT");
+
+ if(project == null) {
+ fail("Unable to create test project");
+ }
+
+ project.open(new NullProgressMonitor());
+
+ makefileAmFile = tools.createFile(project, "Makefile.am", makefileAmContents);
+ workbench = AutotoolsTestsPlugin.getDefault().getWorkbench();
+
+ IEditorPart openEditor = org.eclipse.ui.ide.IDE.openEditor(workbench
+ .getActiveWorkbenchWindow().getActivePage(), makefileAmFile,
+ true);
+
+ AutomakeEditor automakeEditor = (AutomakeEditor) openEditor;
+ AutomakeDocumentProvider docProvider = automakeEditor.getAutomakefileDocumentProvider();
+ IDocument automakeDocument = docProvider.getDocument(openEditor.getEditorInput());
+ AutomakefileSourceConfiguration automakeSourceViewerConfig = automakeEditor.getAutomakeSourceViewerConfiguration();
+
+ ITypedRegion region = automakeDocument.getPartition(0);
+
+ codeScanner = automakeSourceViewerConfig.getAutomakeCodeScanner();
+ codeScanner.setRange(automakeDocument, region.getOffset(), region.getLength());
+ }
+
+ IToken getNextToken() {
+ return codeScanner.nextToken();
+ }
+
+ public void testAutomakeEditorColourization() throws Exception {
+ // # This is a comment
+ IToken token0 = getNextToken();
+ assertTrue(token0 instanceof Token);
+ assertEquals(codeScanner.getTokenLength(), 20);
+ assertEquals(codeScanner.getTokenOffset(), 0);
+
+ Token token = (Token) token0;
+ TextAttribute ta = (TextAttribute) token.getData();
+ assertEquals(ColorManager.MAKE_COMMENT_RGB, ((Color) ta.getForeground()).getRGB());
+
+ // if CONDITION
+ token0 = getNextToken();
+ assertTrue(token0 instanceof Token);
+ assertEquals(codeScanner.getTokenLength(), 2);
+ assertEquals(codeScanner.getTokenOffset(), 20);
+
+ token = (Token) token0;
+ TextAttribute attribute = (TextAttribute) token.getData();
+ assertEquals(ColorManager.MAKE_KEYWORD_RGB, ((Color) attribute.getForeground()).getRGB());
+
+ // blank space between "if" and "CONDITION"
+ token0 = getNextToken();
+ assertTrue(token0 instanceof Token);
+ assertEquals(codeScanner.getTokenLength(), 1);
+ assertEquals(codeScanner.getTokenOffset(), 22);
+
+ token = (Token) token0;
+ attribute = (TextAttribute) token.getData();
+ assertNull(attribute);
+
+ // if CONDITION
+ token0 = getNextToken();
+ assertTrue(token0 instanceof Token);
+ assertEquals(codeScanner.getTokenLength(), 9);
+ assertEquals(codeScanner.getTokenOffset(), 23);
+
+ token = (Token) token0;
+ attribute = (TextAttribute) token.getData();
+ assertEquals(ColorManager.MAKE_DEFAULT_RGB, ((Color) attribute.getForeground()).getRGB());
+
+ // line break
+ token0 = getNextToken();
+ assertTrue(token0 instanceof Token);
+ assertEquals(codeScanner.getTokenLength(), 1);
+ assertEquals(codeScanner.getTokenOffset(), 32);
+
+ token = (Token) token0;
+ attribute = (TextAttribute) token.getData();
+ assertNull(attribute);
+
+ // MACRO = case1
+ token0 = getNextToken();
+ assertTrue(token0 instanceof Token);
+ assertEquals(codeScanner.getTokenLength(), 14);
+ assertEquals(codeScanner.getTokenOffset(), 33);
+
+ token = (Token) token0;
+ attribute = (TextAttribute) token.getData();
+ assertEquals(ColorManager.MAKE_MACRO_DEF_RGB, ((Color) attribute.getForeground()).getRGB());
+
+ // else
+ token0 = getNextToken();
+ assertTrue(token0 instanceof Token);
+ assertEquals(codeScanner.getTokenLength(), 4);
+ assertEquals(codeScanner.getTokenOffset(), 47);
+
+ token = (Token) token0;
+ attribute = (TextAttribute) token.getData();
+ assertEquals(ColorManager.MAKE_KEYWORD_RGB, ((Color) attribute.getForeground()).getRGB());
+
+ // line break
+ token0 = getNextToken();
+ assertTrue(token0 instanceof Token);
+ assertEquals(codeScanner.getTokenLength(), 1);
+ assertEquals(codeScanner.getTokenOffset(), 51);
+
+ token = (Token) token0;
+ attribute = (TextAttribute) token.getData();
+ assertNull(attribute);
+
+ // MACRO = case2
+ token0 = getNextToken();
+ assertTrue(token0 instanceof Token);
+ assertEquals(codeScanner.getTokenLength(), 14);
+ assertEquals(codeScanner.getTokenOffset(), 52);
+
+ token = (Token) token0;
+ attribute = (TextAttribute) token.getData();
+ assertEquals(ColorManager.MAKE_MACRO_DEF_RGB, ((Color) attribute.getForeground()).getRGB());
+
+ // $(MACRO)
+ token0 = getNextToken();
+ assertTrue(token0 instanceof Token);
+ assertEquals(codeScanner.getTokenLength(), 8);
+ assertEquals(codeScanner.getTokenOffset(), 66);
+
+ token = (Token) token0;
+ attribute = (TextAttribute) token.getData();
+ assertEquals(ColorManager.MAKE_MACRO_REF_RGB, ((Color) attribute.getForeground()).getRGB());
+
+ // line break
+ token0 = getNextToken();
+ assertTrue(token0 instanceof Token);
+ assertEquals(codeScanner.getTokenLength(), 1);
+ assertEquals(codeScanner.getTokenOffset(), 74);
+
+ token = (Token) token0;
+ attribute = (TextAttribute) token.getData();
+ assertNull(attribute);
+
+ // ${MACRO}
+ token0 = getNextToken();
+ assertTrue(token0 instanceof Token);
+ assertEquals(codeScanner.getTokenLength(), 8);
+ assertEquals(codeScanner.getTokenOffset(), 75);
+
+ token = (Token) token0;
+ attribute = (TextAttribute) token.getData();
+ assertEquals(ColorManager.MAKE_MACRO_REF_RGB, ((Color) attribute.getForeground()).getRGB());
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ project.delete(true, false, ProjectTools.getMonitor());
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/editors/AutomakeEditorTests.java b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/editors/AutomakeEditorTests.java
new file mode 100644
index 0000000000..01ee1fb0a5
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/editors/AutomakeEditorTests.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2006 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.tests.editors;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.linuxtools.cdt.autotools.tests.AutotoolsTestsPlugin;
+import org.eclipse.linuxtools.cdt.autotools.tests.ProjectTools;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake.AutomakeEditor;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbench;
+
+
+public class AutomakeEditorTests extends TestCase {
+
+ ProjectTools tools;
+ private IProject project;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ tools = new ProjectTools();
+ if (!ProjectTools.setup())
+ fail("could not perform basic project workspace setup");
+ }
+
+ public void testAutomakeEditorAssociation() throws Exception {
+ project = ProjectTools.createProject("testProjectAET");
+
+ if(project == null) {
+ fail("Unable to create test project");
+ }
+
+ project.open(new NullProgressMonitor());
+
+ IFile makefileAmFile = tools.createEmptyFile(project, "Makefile.am");
+
+ IWorkbench workbench = AutotoolsTestsPlugin.getDefault().getWorkbench();
+
+ IEditorPart openEditor = org.eclipse.ui.ide.IDE.openEditor(workbench
+ .getActiveWorkbenchWindow().getActivePage(), makefileAmFile,
+ true);
+ assertTrue(openEditor instanceof AutomakeEditor);
+
+ project.delete(true, false, ProjectTools.getMonitor());
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/editors/AutomakeTextHoverTest.java b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/editors/AutomakeTextHoverTest.java
new file mode 100644
index 0000000000..5f86843445
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/editors/AutomakeTextHoverTest.java
@@ -0,0 +1,210 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.tests.editors;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.linuxtools.cdt.autotools.tests.AutotoolsTestsPlugin;
+import org.eclipse.linuxtools.cdt.autotools.tests.ProjectTools;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake.AutomakeDocumentProvider;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake.AutomakeEditor;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake.AutomakeTextHover;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake.AutomakefileSourceConfiguration;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbench;
+
+
+public class AutomakeTextHoverTest extends TestCase {
+
+ ProjectTools tools;
+ private IProject project;
+ private IFile makefileAmFile;
+ private AutomakeTextHover textHover;
+ private AutomakeEditor automakeEditor;
+ private IDocument automakeDocument;
+
+ static String makefileAmContents =
+ // There are 6 characters from line beginning to
+ // the space after the echo
+ // ie. '\techo ' == 6 characters
+ "MACRO = case1" + "\n" +
+ // 14
+ "target1:" + "\n" +
+ // 23 (before the tab)
+ // 32 is after the M in MACRO
+ "\t" + "echo $(MACRO)" + "\n" +
+ // 38 (before the tab)
+ "\t" + "echo $@" + "\n" +
+ "\n" +
+ // 48
+ "target2: target1" + "\n" +
+ // 65 (before the tab)
+ "\t" + "echo ${MACRO}" + "\n" +
+ // 80 (before the tab)
+ "\t" + "echo $@" + "\n" +
+ // 89 (before the tab)
+ "\t" + "echo $<" + "\n" +
+ "\n" +
+ // 99
+ "target3: target1 target2" + "\n" +
+ // 124 (before the tab)
+ "\t" + "echo $?" + "\n" +
+ "";
+ private IWorkbench workbench;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ tools = new ProjectTools();
+ if (!ProjectTools.setup())
+ fail("could not perform basic project workspace setup");
+
+ project = ProjectTools.createProject("testProjectATHT");
+
+ if(project == null) {
+ fail("Unable to create test project");
+ }
+
+ project.open(new NullProgressMonitor());
+
+ makefileAmFile = tools.createFile(project, "Makefile.am", makefileAmContents);
+ workbench = AutotoolsTestsPlugin.getDefault().getWorkbench();
+
+ IEditorPart openEditor = org.eclipse.ui.ide.IDE.openEditor(workbench
+ .getActiveWorkbenchWindow().getActivePage(), makefileAmFile,
+ true);
+
+ automakeEditor = (AutomakeEditor) openEditor;
+ AutomakeDocumentProvider docProvider = automakeEditor.getAutomakefileDocumentProvider();
+ automakeDocument = docProvider.getDocument(openEditor.getEditorInput());
+ AutomakefileSourceConfiguration automakeSourceViewerConfig = automakeEditor.getAutomakeSourceViewerConfiguration();
+ textHover = (AutomakeTextHover) automakeSourceViewerConfig.getTextHover(null, "");
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ project.delete(true, false, ProjectTools.getMonitor());
+ }
+
+ public void testGetHoverInfoTargetName1() {
+ IRegion hoverRegion = textHover.getHoverRegion(automakeEditor.getAutomakeSourceViewer(), 45);
+ if (hoverRegion == null)
+ fail("Null hoverRegion");
+ // hover between the $ and the @ in target1
+ assertEquals(44, hoverRegion.getOffset());
+ assertEquals(2, hoverRegion.getLength());
+ try {
+ assertEquals("$@", automakeDocument.get(hoverRegion.getOffset(),
+ hoverRegion.getLength()));
+ } catch (BadLocationException e) {
+ fail("BadLocationException");
+ e.printStackTrace();
+ }
+ assertEquals("target1", textHover.getHoverInfo(
+ automakeEditor.getAutomakeSourceViewer(), hoverRegion));
+ }
+
+ public void testGetHoverInfoTargetName2() {
+ // hover between the $ and the @ in target2
+ IRegion hoverRegion = textHover.getHoverRegion(automakeEditor.getAutomakeSourceViewer(), 87);
+ if (hoverRegion == null)
+ fail("Null hoverRegion");
+ assertEquals(86, hoverRegion.getOffset());
+ assertEquals(2, hoverRegion.getLength());
+ try {
+ assertEquals("$@", automakeDocument.get(hoverRegion.getOffset(),
+ hoverRegion.getLength()));
+ } catch (BadLocationException e) {
+ fail("BadLocationException");
+ e.printStackTrace();
+ }
+ assertEquals("target2", textHover.getHoverInfo(
+ automakeEditor.getAutomakeSourceViewer(), hoverRegion));
+ }
+
+ public void testGetHoverInfoForTargetDependency() {
+ // hover between the $ and the < in target2
+ IRegion hoverRegion = textHover.getHoverRegion(automakeEditor.getAutomakeSourceViewer(), 96);
+ if (hoverRegion == null)
+ fail("Null hoverRegion");
+ assertEquals(95, hoverRegion.getOffset());
+ assertEquals(2, hoverRegion.getLength());
+ try {
+ assertEquals("$<", automakeDocument.get(hoverRegion.getOffset(),
+ hoverRegion.getLength()));
+ } catch (BadLocationException e) {
+ fail("BadLocationException");
+ e.printStackTrace();
+ }
+ assertEquals("target1", textHover.getHoverInfo(
+ automakeEditor.getAutomakeSourceViewer(), hoverRegion));
+ }
+
+ public void testGetHoverInfoForTargetDependencies() {
+ // hover between the $ and the ? in target3
+ IRegion hoverRegion = textHover.getHoverRegion(automakeEditor.getAutomakeSourceViewer(), 131);
+ if (hoverRegion == null)
+ fail("Null hoverRegion");
+ assertEquals(130, hoverRegion.getOffset());
+ assertEquals(2, hoverRegion.getLength());
+ try {
+ assertEquals("$?", automakeDocument.get(hoverRegion.getOffset(),
+ hoverRegion.getLength()));
+ } catch (BadLocationException e) {
+ fail("BadLocationException");
+ e.printStackTrace();
+ }
+ assertEquals("target1 target2", textHover.getHoverInfo(
+ automakeEditor.getAutomakeSourceViewer(), hoverRegion));
+ }
+
+ public void testGetHoverForMacro1() {
+ IRegion hoverRegion = textHover.getHoverRegion(automakeEditor.getAutomakeSourceViewer(), 32);
+ if (hoverRegion == null)
+ fail("Null hoverRegion");
+ // hover between the M and the A in the first $(MACRO) reference
+ assertEquals(31, hoverRegion.getOffset());
+ assertEquals(5, hoverRegion.getLength());
+ try {
+ assertEquals("MACRO", automakeDocument.get(hoverRegion.getOffset(),
+ hoverRegion.getLength()));
+ } catch (BadLocationException e) {
+ fail("BadLocationException");
+ e.printStackTrace();
+ }
+ assertEquals("case1", textHover.getHoverInfo(
+ automakeEditor.getAutomakeSourceViewer(), hoverRegion));
+ }
+
+ public void testGetHoverForMacro2() {
+ // hover between the M and the A in the ${MACRO} reference in target2
+ IRegion hoverRegion = textHover.getHoverRegion(automakeEditor.getAutomakeSourceViewer(), 74);
+ if (hoverRegion == null)
+ fail("Null hoverRegion");
+ assertEquals(73, hoverRegion.getOffset());
+ assertEquals(5, hoverRegion.getLength());
+ try {
+ assertEquals("MACRO", automakeDocument.get(hoverRegion.getOffset(),
+ hoverRegion.getLength()));
+ } catch (BadLocationException e) {
+ fail("BadLocationException");
+ e.printStackTrace();
+ }
+ assertEquals("case1", textHover.getHoverInfo(
+ automakeEditor.getAutomakeSourceViewer(), hoverRegion));
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/editors/EditorTests.java b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/editors/EditorTests.java
new file mode 100644
index 0000000000..308129fb05
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/src/org/eclipse/linuxtools/cdt/autotools/tests/editors/EditorTests.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.tests.editors;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class EditorTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite(
+ "Test for org.eclipse.linuxtools.cdt.autotools.core.tests.editors");
+ //$JUnit-BEGIN$
+ suite.addTestSuite(AutomakeColourizationTests.class);
+ suite.addTestSuite(AutomakeTextHoverTest.class);
+ suite.addTestSuite(AutomakeEditorTests.class);
+ //$JUnit-END$
+ return suite;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/test.xml b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/test.xml
new file mode 100644
index 0000000000..2cdb85daf2
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/test.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+
+<project name="testsuite" default="run" basedir=".">
+ <property name="classname" value="org.eclipse.linuxtools.cdt.autotools.tests.AllAutotoolsTests" />
+ <property name="autoconf_classname" value="org.eclipse.linuxtools.cdt.autotools.tests.autoconf.AutoconfTests" />
+ <property name="editors_classname" value="org.eclipse.linuxtools.cdt.autotools.tests.editors.EditorTests" />
+
+ <!-- The property ${eclipse-home} should be passed into this script -->
+ <!-- Set a meaningful default value for when it is not. -->
+ <property name="eclipse-home" value="${basedir}/../.." />
+
+ <!-- sets the properties eclipse-home, and library-file -->
+ <property name="plugin-name" value="org.eclipse.linuxtools.cdt.autotools.tests" />
+ <property name="library-file" value="${eclipse-home}/dropins/${subProjectName2}/plugins/org.eclipse.test/library.xml" />
+
+ <!-- This target holds all initialization code that needs to be done for -->
+ <!-- all tests that are to be run. Initialization for individual tests -->
+ <!-- should be done within the body of the suite target. -->
+ <target name="init">
+ <tstamp />
+ <delete>
+ <fileset dir="${eclipse-home}" includes="org*.xml" />
+ </delete>
+ </target>
+
+ <!-- This target defines the tests that need to be run. -->
+ <target name="suite">
+ <property name="autotools-folder" value="${eclipse-home}/autotools_folder" />
+ <delete dir="${autotools-folder}" quiet="true" />
+ <echo message="Calling ui-test in ${library-file} with eclipse-home = ${eclipse-home} and library-file = ${library-file}"/>
+ <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="data-dir" value="${autotools-folder}" />
+ <property name="plugin-name" value="${plugin-name}" />
+ <property name="classname" value="${classname}" />
+ </ant>
+ </target>
+
+ <target name="autoconf_suite">
+ <property name="autoconf-folder" value="${eclipse-home}/autoconf_folder" />
+ <delete dir="${autoconf-folder}" quiet="true" />
+ <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="data-dir" value="${autoconf-folder}" />
+ <property name="plugin-name" value="${plugin-name}" />
+ <property name="classname" value="${autoconf_classname}" />
+ </ant>
+ </target>
+
+ <target name="editors_suite">
+ <property name="editors-folder" value="${eclipse-home}/editors_folder" />
+ <delete dir="${editors-folder}" quiet="true" />
+ <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="data-dir" value="${editors-folder}" />
+ <property name="plugin-name" value="${plugin-name}" />
+ <property name="classname" value="${editors_classname}" />
+ </ant>
+ </target>
+
+ <!-- This target holds code to cleanup the testing environment after -->
+ <!-- after all of the tests have been run. You can use this target to -->
+ <!-- delete temporary files that have been created. -->
+ <target name="cleanup">
+ <mkdir dir="${results}/consolelogs" />
+ <copy failonerror="false" file="${eclipse-home}/results/${classname}.txt" tofile="${results}/consolelogs/${classname}_${platform}.metadata.log.txt" />
+ </target>
+
+ <!-- This target runs the test suite. Any actions that need to happen -->
+ <!-- after all the tests have been run should go here. -->
+ <target name="run" depends="init,suite,autoconf_suite,editors_suite,cleanup">
+ <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="includes" value="org*.xml" />
+ <property name="output-file" value="${plugin-name}.xml" />
+ </ant>
+ </target>
+
+</project>
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/zip/project1.zip b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/zip/project1.zip
new file mode 100644
index 0000000000..4a51e51f9b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/zip/project1.zip
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.tests/zip/project2.zip b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/zip/project2.zip
new file mode 100644
index 0000000000..98319d436e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.tests/zip/project2.zip
Binary files differ
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.libstdcxx/.classpath b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/.classpath
index ad32c83a78..ad32c83a78 100644
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.libstdcxx/.classpath
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/.classpath
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/.project b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/.project
new file mode 100644
index 0000000000..256be3dca9
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.cdt.autotools.ui.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/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/.settings/org.eclipse.jdt.core.prefs b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..7dd8708156
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Thu Mar 25 17:32:29 EDT 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/ChangeLog b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/ChangeLog
new file mode 100644
index 0000000000..37e7bca72a
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/ChangeLog
@@ -0,0 +1,77 @@
+2010-06-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/tests/SetConfigurationParameter.java (canBuildWithConfigParm): Add a check
+ for the Configure console showing a warning about the unknown option.
+
+2010-05-21 Jeff Johnston <jjohnstn@redhat.com>
+
+ Tests: #313754
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/tests/TestMakeTargets.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/tests/AllTests.java: Add TestMakeTargets.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/tests/TestEnvironmentVars.java (setEnvVarOnCommandLine): Add extra
+ environment variables that follow the command.
+
+2010-05-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/tests/AllTests.java:
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/tests/TestToolActions.java (sleep): Don't exit Eclipse since this
+ is no longer the last test in the list.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/tests/TestEnvironmentVars.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/tests/SetConfigurationParameter.java (canBuildWithConfigParm): Add
+ test for bug #308261.
+
+2010-05-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/tests/SetConfigurationParameter.java (canBuildWithConfigParm): Wait until
+ a.out is created before looking at config.status as we could end up looking at config.status while it is being created.
+ (newConfigCopiesParms): Don't assume that active configuration will be set in configuration list.
+
+2010-04-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/tests/SetConfigurationParameter.java (canBuildWithConfigParm): Add
+ waiting period before testing existence of created file to ensure action has run on a slower system.
+ (newConfigCopiesParms): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/tests/TestToolActions.java (canAccessAutoconf): Ditto.
+ (canAccessAutomake): Ditto.
+ (canReconfigureProject): Ditto.
+ (canAccessAutoreconf): Ditto.
+ (canAccessAclocal): Ditto.
+ * plugin.properties: Change provider to Eclipse instead of Eclipse.org.
+ * META-INF/MANIFEST.MF: Add BundleLocalization statement so plugin.properties gets
+ used.
+
+2010-04-22 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.properties: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/tests/AllTests.java: New file.
+ * build.properties: Make plugin.properties part of binary build.
+ * META-INF/MANIFEST.MF: Change Java requirement to 1.5.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/tests/Activator.java: Add copyright notice.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/tests/SetConfigurationParameter.java (beforeClass): Close
+ Welcome view optionally if it exists. Also hard-wire keyboard to EN_US.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/tests/TestToolActions.java (beforeClass): Ditto.
+ (sleep): Close Eclipse.
+
+2010-04-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/tests/TestToolActions.java (canAccessAutoheader): New test.
+ (canAccessAutomake): Ditto.
+ (canReconfigureProject): Ditto.
+ (canAccessLibtoolize): Ditto.
+ (canAccessAutoreconf): Ditto.
+
+2010-04-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/tests/TestToolActions.java: New file.
+ (canAccessAutomake): New test.
+
+2010-04-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ Initial check-in.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/tests/Activator.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/tests/SetConfigurationParameter.java: New file.
+ * build.properties: New file.
+ * .project: New file.
+ * .classpath: New file.
+ * .settings: New file.
+ * META-INF/MANIFEST.MF: New file. \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/META-INF/MANIFEST.MF b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..163b017597
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,30 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.linuxtools.cdt.autotools.ui.tests
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.linuxtools.cdt.autotools.ui.tests.Activator
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.swtbot.eclipse.core;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.finder;bundle-version="2.0.0",
+ org.eclipse.swtbot.junit4_x;bundle-version="2.0.0",
+ org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
+ org.hamcrest;bundle-version="1.1.0",
+ org.junit4;bundle-version="4.5.0",
+ org.apache.log4j;bundle-version="1.2.13",
+ org.eclipse.core.resources;bundle-version="3.5.1",
+ org.eclipse.linuxtools.cdt.autotools.core;bundle-version="1.0.0",
+ org.eclipse.linuxtools.cdt.autotools.ui;bundle-version="1.0.0",
+ org.eclipse.cdt.core;bundle-version="5.1.1",
+ org.eclipse.cdt.launch;bundle-version="6.0.0",
+ org.eclipse.cdt.make.core;bundle-version="6.0.0",
+ org.eclipse.cdt.make.ui;bundle-version="6.0.1",
+ org.eclipse.cdt.managedbuilder.core;bundle-version="6.0.0",
+ org.eclipse.cdt.managedbuilder.gnu.ui;bundle-version="5.0.100",
+ org.eclipse.cdt.managedbuilder.ui;bundle-version="5.1.0",
+ org.eclipse.cdt.ui;bundle-version="5.1.1"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Vendor: %provider
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/build.properties b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/build.properties
new file mode 100644
index 0000000000..d369527f4e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/build.properties
@@ -0,0 +1,11 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ test.xml,\
+ plugin.properties
+src.includes = src/,\
+ test.xml,\
+ META-INF/,\
+ plugin.properties
+individualSourceBundles=true
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/plugin.properties b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/plugin.properties
new file mode 100644
index 0000000000..ed7fdac860
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2010 Red Hat, Inc.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat Incorporated - initial API and implementation
+#################################################################################
+bundleName=Autotools UI Tests Plug-in (Incubation)
+provider=Eclipse \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/src/org/eclipse/linuxtools/cdt/autotools/ui/tests/Activator.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/src/org/eclipse/linuxtools/cdt/autotools/ui/tests/Activator.java
new file mode 100644
index 0000000000..6f0b5ff650
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/src/org/eclipse/linuxtools/cdt/autotools/ui/tests/Activator.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat Inc..
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.tests;
+
+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 plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.cdt.autotools.ui.tests";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ 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;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/src/org/eclipse/linuxtools/cdt/autotools/ui/tests/AllTests.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/src/org/eclipse/linuxtools/cdt/autotools/ui/tests/AllTests.java
new file mode 100644
index 0000000000..ed6fc31b18
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/src/org/eclipse/linuxtools/cdt/autotools/ui/tests/AllTests.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat Inc..
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.tests;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ SetConfigurationParameter.class,
+ TestToolActions.class,
+ TestEnvironmentVars.class,
+ TestMakeTargets.class,
+})
+public class AllTests {
+ // needed for this class to compile
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/src/org/eclipse/linuxtools/cdt/autotools/ui/tests/SetConfigurationParameter.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/src/org/eclipse/linuxtools/cdt/autotools/ui/tests/SetConfigurationParameter.java
new file mode 100644
index 0000000000..b988e55142
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/src/org/eclipse/linuxtools/cdt/autotools/ui/tests/SetConfigurationParameter.java
@@ -0,0 +1,551 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat Inc..
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.tests;
+
+import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.withRegex;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.eclipse.cdt.ui.newui.UIMessages;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectNature;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.bindings.keys.KeyStroke;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
+import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotCombo;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotRadio;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarDropDownButton;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+@RunWith(SWTBotJunit4ClassRunner.class)
+public class SetConfigurationParameter {
+
+ private static SWTWorkbenchBot bot;
+
+ @BeforeClass
+ public static void beforeClass() throws Exception {
+ SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
+ bot = new SWTWorkbenchBot();
+ // Close the Welcome view if it exists
+ try {
+ bot.viewByTitle("Welcome").close();
+ // Turn off automatic building by default
+ } catch (Exception e) {
+ // do nothing
+ }
+ // Turn off automatic building by default
+ bot.menu("Window").menu("Preferences").click();
+ SWTBotShell shell = bot.shell("Preferences");
+ shell.activate();
+ bot.tree().expandNode("General").select("Workspace");
+ SWTBotCheckBox buildAuto = bot.checkBox("Build automatically");
+ if (buildAuto != null && buildAuto.isChecked())
+ buildAuto.click();
+ bot.button("Apply").click();
+ // Ensure that the C/C++ perspective is chosen automatically
+ // and doesn't require user intervention
+ bot.tree().expandNode("General").select("Perspectives");
+ SWTBotRadio radio = bot.radio("Always open");
+ if (radio != null && !radio.isSelected())
+ radio.click();
+ bot.button("OK").click();
+ }
+
+ @Test
+ // Verify we can create a sample Autotools project using the New C Project UI
+ public void canCreateANewAutotoolsProject() throws Exception {
+ bot.menu("File").menu("New").menu("Project...").click();
+
+ SWTBotShell shell = bot.shell("New Project");
+ shell.activate();
+ bot.tree().expandNode("C/C++").select("C Project");
+ bot.button("Next >").click();
+
+ bot.textWithLabel("Project name:").setText("GnuProject0");
+ bot.tree().expandNode("GNU Autotools").select("Hello World ANSI C Autotools Project");
+
+ bot.button("Finish").click();
+
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ assertTrue(workspace != null);
+ IWorkspaceRoot root = workspace.getRoot();
+ assertTrue(root != null);
+ IProject project = root.getProject("GnuProject0");
+ assertTrue(project != null);
+ IProjectNature nature = project.getNature("org.eclipse.linuxtools.cdt.autotools.core.autotoolsNatureV2");
+ assertTrue(nature != null);
+ }
+
+ @Test
+ // Verify we can set a configuration parameter and that it is recorded in
+ // the .autotools file for the project
+ public void canSetConfigParm() throws Exception {
+ SWTBotView view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject0");
+ bot.menu("Project", 1).menu("Properties").click();
+ SWTBotShell shell = bot.shell("Properties for GnuProject0");
+ shell.activate();
+ bot.tree().expandNode("Autotools").select("Configure Settings");
+ bot.treeWithLabel("Configure Settings").expandNode("configure").select("Advanced");
+ // Set the configure parameters to be --enable-jeff via user-defined options
+ SWTBotText text = bot.textWithLabel("Additional command-line options");
+ text.typeText("--enable-jeff");
+ bot.button("OK").click();
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ assertTrue(workspace != null);
+ IWorkspaceRoot root = workspace.getRoot();
+ assertTrue(root != null);
+ IProject project = root.getProject("GnuProject0");
+ assertTrue(project != null);
+ IPath path = project.getLocation();
+ path = path.append(".autotools");
+ File f = new File(path.toOSString());
+ assertTrue(f.exists());
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ DocumentBuilder db = dbf.newDocumentBuilder();
+ Document d = db.parse(f);
+ Element e = d.getDocumentElement();
+ // Get the stored configuration data
+ NodeList cfgs = e.getElementsByTagName("configuration"); // $NON-NLS-1$
+ assertEquals(1, cfgs.getLength());
+ Node n = cfgs.item(0);
+ NodeList l = n.getChildNodes();
+ // Verify user field in .autotools file is set to --enable-jeff
+ boolean foundUser = false;
+ for (int y = 0; y < l.getLength(); ++y) {
+ Node child = l.item(y);
+ if (child.getNodeName().equals("option")) { // $NON-NLS-1$
+ NamedNodeMap optionAttrs = child.getAttributes();
+ Node idNode = optionAttrs.getNamedItem("id"); // $NON-NLS-1$
+ Node valueNode = optionAttrs.getNamedItem("value"); // $NON-NLS-1$
+ assertTrue(idNode != null);
+ assertTrue(valueNode != null);
+ String id = idNode.getNodeValue();
+ String value = valueNode.getNodeValue();
+ if (id.equals("user")) {
+ foundUser = true;
+ assertEquals(value, "--enable-jeff");
+ }
+ }
+ }
+ assertTrue(foundUser);
+ }
+
+ @Test
+ // Verify we can build the project with a configuration parameter and that
+ // the configuration parameter can be found in the config.status file.
+ public void canBuildWithConfigParm() throws Exception {
+ SWTBotView view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject0");
+ bot.menu("Project", 1).menu("Build Project").click();
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ assertTrue(workspace != null);
+ IWorkspaceRoot root = workspace.getRoot();
+ assertTrue(root != null);
+ IProject project = root.getProject("GnuProject0");
+ assertTrue(project != null);
+ IPath path = project.getLocation();
+ // We need to wait until the a.out file is created so
+ // sleep a bit and look for it...give up after 120 seconds
+ for (int i = 0; i < 240; ++i) {
+ bot.sleep(500);
+ File f = new File(path.append("src/a.out").toOSString());
+ if (f.exists())
+ break;
+ }
+ File f = new File(path.append("config.status").toOSString());
+ assertTrue(f.exists());
+ BufferedReader r = new BufferedReader(new FileReader(f));
+ int ch;
+ boolean optionFound = false;
+ // Read config.status and look for the string --enable-jeff
+ // which is a simple verification that the option was used in the
+ // configure step.
+ while ((ch = r.read()) != -1) {
+ if (ch == '-') {
+ char[] buf = new char[12];
+ r.mark(100);
+ int count = r.read(buf);
+ if (count < 12)
+ break;
+ String s = new String(buf);
+ if (s.equals("-enable-jeff")) {
+ optionFound = true;
+ break;
+ } else {
+ r.reset();
+ }
+ }
+ }
+ assertTrue(optionFound);
+ view = bot.viewByTitle("Console");
+ view.setFocus();
+ SWTBotToolbarDropDownButton b = bot.toolbarDropDownButtonWithTooltip("Display Selected Console");
+ org.hamcrest.Matcher<MenuItem> withRegex = withRegex(".*Configure.*");
+ b.menuItem(withRegex).click();
+ b.pressShortcut(KeyStroke.getInstance("ESC"));
+ String output = view.bot().styledText().getText();
+ // Verify we got some help output to the console
+ Pattern p = Pattern.compile(".*WARNING:.*unrecognized.*--enable-jeff.*", Pattern.DOTALL);
+ Matcher m = p.matcher(output);
+ assertTrue(m.matches());
+ // Verify that if we build again, we don't reconfigure.
+ // Verifies fix for bug: #308261
+ long oldDate = f.lastModified();
+ view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject0");
+ bot.menu("Project", 1).menu("Build Project").click();
+ path = project.getLocation();
+ // We need to wait until the a.out file is created so
+ // sleep a bit and look for it...give up after 120 seconds
+ for (int i = 0; i < 240; ++i) {
+ bot.sleep(500);
+ File tmp = new File(path.append("src/a.out").toOSString());
+ if (tmp.exists())
+ break;
+ }
+ f = new File(path.append("config.status").toOSString());
+ assertTrue(f.exists());
+ long newDate = f.lastModified();
+ assertEquals(newDate, oldDate);
+ }
+
+ @Test
+ // Verify a new configuration will copy the configuration parameters
+ // of its base configuration.
+ public void newConfigCopiesParms() throws Exception {
+ SWTBotView view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject0");
+ bot.menu("Project", 1).menu("Build Configurations").menu("Manage...").click();
+ SWTBotShell shell = bot.shell("GnuProject0: Manage Configurations");
+ shell.activate();
+ bot.button("New...").click();
+ shell = bot.shell("Create New Configuration");
+ shell.activate();
+ SWTBotText t = bot.textWithLabel("Name:");
+ t.typeText("debug");
+ SWTBotRadio radio = bot.radio("Existing configuration");
+ if (!radio.isSelected())
+ radio.click();
+ bot.button("OK").click();
+ shell = bot.shell("GnuProject0: Manage Configurations");
+ shell.activate();
+ bot.button("New...").click();
+ shell = bot.shell("Create New Configuration");
+ shell.activate();
+ t = bot.textWithLabel("Name:");
+ t.typeText("default");
+ radio = bot.radio("Default configuration");
+ if (!radio.isSelected())
+ radio.click();
+ bot.button("OK").click();
+ shell = bot.shell("GnuProject0: Manage Configurations");
+ shell.activate();
+ SWTBotTable table = bot.table();
+ assertTrue(table.containsItem("debug"));
+ table.getTableItem("debug").select();
+ bot.button("Set Active").click();
+ bot.button("OK").click();
+ // Verify the debug configuration is active and has a user parameter: --enable-jeff
+ view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject0");
+ bot.menu("Project", 1).menu("Properties").click();
+ shell = bot.shell("Properties for GnuProject0");
+ shell.activate();
+ bot.tree().expandNode("Autotools").select("Configure Settings");
+ SWTBotCombo configs = bot.comboBoxWithLabel(UIMessages.getString("AbstractPage.6"));
+ configs.setFocus();
+ String[] items = configs.items();
+ for (int i = 0; i < items.length; ++i) {
+ if (items[i].contains("debug") && items[i].contains("Active"))
+ configs.setSelection(i);
+ }
+ assertTrue(configs.getText().contains("debug"));
+ bot.treeWithLabel("Configure Settings").expandNode("configure").select("Advanced");
+ SWTBotText text = bot.textWithLabel("Additional command-line options");
+ String val = text.getText();
+ assertEquals(val, "--enable-jeff");
+ // Verify that the build directory for the new configuration has been
+ // switched to build-debug
+ bot.tree().expandNode("C/C++ Build").select();
+ String buildDir = bot.textWithLabel("Build directory:").getText();
+ assertTrue(buildDir.endsWith("build-debug"));
+ // Verify the default configuration has no user setting
+ bot.tree().expandNode("Autotools").select("Configure Settings");
+ configs = bot.comboBoxWithLabel(UIMessages.getString("AbstractPage.6"));
+ configs.setSelection("default");
+ bot.treeWithLabel("Configure Settings").expandNode("configure").select("Advanced");
+ text = bot.textWithLabel("Additional command-line options");
+ val = text.getText();
+ assertEquals(val, "");
+ bot.button("OK").click();
+ // Build the project again and verify we get a build-debug directory
+ view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject0");
+ bot.menu("Project", 1).menu("Build Project").click();
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ assertTrue(workspace != null);
+ IWorkspaceRoot root = workspace.getRoot();
+ assertTrue(root != null);
+ IProject project = root.getProject("GnuProject0");
+ assertTrue(project != null);
+ IPath path = project.getLocation();
+ // We need to wait until the config.status file is created so
+ // sleep a bit and look for it...give up after 20 seconds
+ for (int i = 0; i < 40; ++i) {
+ bot.sleep(500);
+ File f = new File(path.append("build-debug/src/a.out").toOSString());
+ if (f.exists())
+ break;
+ }
+ File f = new File(path.append("build-debug/config.status").toOSString());
+ assertTrue(f.exists());
+ BufferedReader r = new BufferedReader(new FileReader(f));
+ int ch;
+ boolean optionFound = false;
+ // Read config.status and look for the string --enable-jeff
+ // which is a simple verification that the option was used in the
+ // configure step.
+ while ((ch = r.read()) != -1) {
+ if (ch == '-') {
+ char[] buf = new char[12];
+ r.mark(100);
+ int count = r.read(buf);
+ if (count < 12)
+ break;
+ String s = new String(buf);
+ if (s.equals("-enable-jeff")) {
+ optionFound = true;
+ break;
+ } else {
+ r.reset();
+ }
+ }
+ }
+ assertTrue(optionFound);
+ // Verify we cleaned out the top-level build directory (i.e. that there
+ // is no config.status there anymore).
+ path = project.getLocation().append("config.status");
+ f = new File(path.toOSString());
+ assertTrue(!f.exists());
+ path = project.getLocation().append(".autotools");
+ f = new File(path.toOSString());
+ assertTrue(f.exists());
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ DocumentBuilder db = dbf.newDocumentBuilder();
+ Document d = db.parse(f);
+ Element e = d.getDocumentElement();
+ // Get the stored configuration data
+ NodeList cfgs = e.getElementsByTagName("configuration"); // $NON-NLS-1$
+ assertEquals(3, cfgs.getLength());
+ int foundUser = 0;
+ for (int x = 0; x < cfgs.getLength(); ++x) {
+ Node n = cfgs.item(x);
+ NodeList l = n.getChildNodes();
+ // Verify two of the user fields in .autotools file are set to --enable-jeff
+ for (int y = 0; y < l.getLength(); ++y) {
+ Node child = l.item(y);
+ if (child.getNodeName().equals("option")) { // $NON-NLS-1$
+ NamedNodeMap optionAttrs = child.getAttributes();
+ Node idNode = optionAttrs.getNamedItem("id"); // $NON-NLS-1$
+ Node valueNode = optionAttrs.getNamedItem("value"); // $NON-NLS-1$
+ assertTrue(idNode != null);
+ assertTrue(valueNode != null);
+ String id = idNode.getNodeValue();
+ String value = valueNode.getNodeValue();
+ if (id.equals("user")) {
+ if (value.equals("--enable-jeff"))
+ ++foundUser;
+ }
+ }
+ }
+ }
+ assertEquals(foundUser, 2);
+ }
+
+ @Test
+ // Verify we can do a double rename of configurations, renaming one configuration to
+ // another and then cancel without changing configuration settings.
+ public void doubleRenameCancel() throws Exception {
+ SWTBotView view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject0");
+ bot.menu("Project", 1).menu("Properties").click();
+ SWTBotShell shell = bot.shell("Properties for GnuProject0");
+ shell.activate();
+ bot.tree().expandNode("Autotools").select("Configure Settings");
+ SWTBotCombo configs = bot.comboBoxWithLabel(UIMessages.getString("AbstractPage.6"));
+ assertTrue(configs.getText().contains("debug"));
+ bot.button("Manage Configurations...").click();
+ shell = bot.shell("GnuProject0: Manage Configurations");
+ shell.activate();
+ bot.table().select("debug");
+ // Rename "debug" to "release" and rename "default" to "debug".
+ // The settings should follow the rename operation.
+ bot.button("Rename...").click();
+ shell = bot.shell("Rename Configuration");
+ shell.activate();
+ SWTBotText text = bot.textWithLabel("Name:");
+ text.setText("");
+ text.typeText("release");
+ bot.button("OK").click();
+ shell = bot.shell("GnuProject0: Manage Configurations");
+ shell.activate();
+ bot.table().select("default");
+ bot.button("Rename...").click();
+ shell = bot.shell("Rename Configuration");
+ shell.activate();
+ text = bot.textWithLabel("Name:");
+ text.setText("");
+ text.typeText("debug");
+ bot.button("OK").click();
+ shell = bot.shell("GnuProject0: Manage Configurations");
+ shell.activate();
+ bot.button("OK").click();
+ // Verify that "release" has --enable-jeff set and that
+ // the new "debug" configuration has no user setting.
+ shell = bot.shell("Properties for GnuProject0");
+ shell.activate();
+ configs = bot.comboBoxWithLabel(UIMessages.getString("AbstractPage.6"));
+ bot.treeWithLabel("Configure Settings").expandNode("configure").select("Advanced");
+ text = bot.textWithLabel("Additional command-line options");
+ String setting = text.getText();
+ assertEquals("--enable-jeff", setting);
+ configs.setFocus();
+ configs.setSelection("debug");
+ bot.treeWithLabel("Configure Settings").expandNode("configure").select("Advanced");
+ text = bot.textWithLabel("Additional command-line options");
+ setting = text.getText();
+ assertEquals("", setting);
+ bot.button("Cancel").click();
+ // Cancel and then verify that "debug" is back to normal with
+ // --enable-jeff set and that "default" is back to normal with
+ // no user setting.
+ view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject0");
+ bot.menu("Project", 1).menu("Properties").click();
+ shell = bot.shell("Properties for GnuProject0");
+ shell.activate();
+ bot.tree().expandNode("Autotools").select("Configure Settings");
+ configs = bot.comboBoxWithLabel(UIMessages.getString("AbstractPage.6"));
+ assertTrue(configs.getText().contains("debug"));
+ bot.treeWithLabel("Configure Settings").expandNode("configure").select("Advanced");
+ text = bot.textWithLabel("Additional command-line options");
+ setting = text.getText();
+ assertEquals("--enable-jeff", setting);
+ configs.setFocus();
+ configs.setSelection("default");
+ assertTrue(configs.getText().contains("default"));
+ bot.treeWithLabel("Configure Settings").expandNode("configure").select("Advanced");
+ text = bot.textWithLabel("Additional command-line options");
+ setting = text.getText();
+ assertEquals("", setting);
+ bot.button("OK").click();
+ }
+
+ @Test
+ // Verify we can do a double rename of configurations, renaming one configuration to
+ // another and inheriting the settings properly.
+ public void doubleRenameOk() throws Exception {
+ SWTBotView view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject0");
+ bot.menu("Project", 1).menu("Properties").click();
+ SWTBotShell shell = bot.shell("Properties for GnuProject0");
+ shell.activate();
+ bot.tree().expandNode("Autotools").select("Configure Settings");
+ SWTBotCombo configs = bot.comboBoxWithLabel(UIMessages.getString("AbstractPage.6"));
+ assertTrue(configs.getText().contains("debug"));
+ bot.button("Manage Configurations...").click();
+ shell = bot.shell("GnuProject0: Manage Configurations");
+ shell.activate();
+ bot.table().select("debug");
+ // Rename "debug" to "release" and rename "default" to "debug".
+ // The settings should follow the rename operation.
+ bot.button("Rename...").click();
+ shell = bot.shell("Rename Configuration");
+ shell.activate();
+ SWTBotText text = bot.textWithLabel("Name:");
+ text.setText("");
+ text.typeText("release");
+ bot.button("OK").click();
+ shell = bot.shell("GnuProject0: Manage Configurations");
+ shell.activate();
+ bot.table().select("default");
+ bot.button("Rename...").click();
+ shell = bot.shell("Rename Configuration");
+ shell.activate();
+ text = bot.textWithLabel("Name:");
+ text.setText("");
+ text.typeText("debug");
+ bot.button("OK").click();
+ shell = bot.shell("GnuProject0: Manage Configurations");
+ shell.activate();
+ bot.button("OK").click();
+ shell = bot.shell("Properties for GnuProject0");
+ shell.activate();
+ bot.button("OK").click();
+ // Verify changes have taken effect permanently
+ view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject0");
+ bot.menu("Project", 1).menu("Properties").click();
+ shell = bot.shell("Properties for GnuProject0");
+ shell.activate();
+ bot.tree().expandNode("Autotools").select("Configure Settings");
+ configs = bot.comboBoxWithLabel(UIMessages.getString("AbstractPage.6"));
+ assertTrue(configs.getText().contains("release"));
+ assertTrue(configs.getText().contains("Active"));
+ bot.treeWithLabel("Configure Settings").expandNode("configure").select("Advanced");
+ text = bot.textWithLabel("Additional command-line options");
+ String setting = text.getText();
+ assertEquals("--enable-jeff", setting);
+ configs.setFocus();
+ configs.setSelection("debug");
+ assertTrue(configs.getText().contains("debug"));
+ bot.treeWithLabel("Configure Settings").expandNode("configure").select("Advanced");
+ text = bot.textWithLabel("Additional command-line options");
+ setting = text.getText();
+ assertEquals("", setting);
+ bot.button("OK").click();
+ }
+
+ @AfterClass
+ public static void sleep() {
+ bot.sleep(4000);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/src/org/eclipse/linuxtools/cdt/autotools/ui/tests/TestEnvironmentVars.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/src/org/eclipse/linuxtools/cdt/autotools/ui/tests/TestEnvironmentVars.java
new file mode 100644
index 0000000000..e8751f9e04
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/src/org/eclipse/linuxtools/cdt/autotools/ui/tests/TestEnvironmentVars.java
@@ -0,0 +1,234 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat Inc..
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.tests;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
+import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotRadio;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(SWTBotJunit4ClassRunner.class)
+public class TestEnvironmentVars {
+ private static SWTWorkbenchBot bot;
+
+ @BeforeClass
+ public static void beforeClass() throws Exception {
+ SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
+ bot = new SWTWorkbenchBot();
+ // Close the Welcome view if it exists
+ try {
+ bot.viewByTitle("Welcome").close();
+ // Turn off automatic building by default
+ } catch (Exception e) {
+ // do nothing
+ }
+ bot.menu("Window").menu("Preferences").click();
+ SWTBotShell shell = bot.shell("Preferences");
+ shell.activate();
+ bot.tree().expandNode("General").select("Workspace");
+ SWTBotCheckBox buildAuto = bot.checkBox("Build automatically");
+ if (buildAuto != null && buildAuto.isChecked())
+ buildAuto.click();
+ bot.button("Apply").click();
+ // Ensure that the C/C++ perspective is chosen automatically
+ // and doesn't require user intervention
+ bot.tree().expandNode("General").select("Perspectives");
+ SWTBotRadio radio = bot.radio("Always open");
+ if (radio != null && !radio.isSelected())
+ radio.click();
+ bot.button("OK").click();
+ bot.menu("File").menu("New").menu("Project...").click();
+
+ shell = bot.shell("New Project");
+ shell.activate();
+ bot.tree().expandNode("C/C++").select("C Project");
+ bot.button("Next >").click();
+
+ bot.textWithLabel("Project name:").setText("GnuProject2");
+ bot.tree().expandNode("GNU Autotools").select("Hello World ANSI C Autotools Project");
+
+ bot.button("Finish").click();
+ }
+
+ @Test
+ // Verify we can pass an unknown env var in configure options and it will be nulled out
+ // Verifies fix for Bug: #303616
+ public void referenceUnknownEnvVar() throws Exception {
+ SWTBotView view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject2");
+ bot.menu("Project", 1).menu("Properties").click();
+ SWTBotShell shell = bot.shell("Properties for GnuProject2");
+ shell.activate();
+ bot.tree().expandNode("Autotools").select("Configure Settings");
+ bot.treeWithLabel("Configure Settings").expandNode("configure").select("Advanced");
+ // Set the configure parameters to be --enable-jeff via user-defined options
+ SWTBotText text = bot.textWithLabel("Additional command-line options");
+ text.typeText("${some_var}");
+ bot.button("OK").click();
+ view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject2");
+ bot.menu("Project", 1).menu("Reconfigure Project").click();
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ assertTrue(workspace != null);
+ IWorkspaceRoot root = workspace.getRoot();
+ assertTrue(root != null);
+ IProject project = root.getProject("GnuProject2");
+ assertTrue(project != null);
+ IPath path = project.getLocation();
+ File f = null;
+ // We need to wait until the config.status file is created so
+ // sleep a bit and look for it...give up after 40 seconds
+ for (int i = 0; i < 80; ++i) {
+ bot.sleep(500);
+ f = new File(path.append("config.status").toOSString());
+ if (f.exists())
+ break;
+ }
+ bot.sleep(1000);
+ SWTBotView consoleView = bot.viewByTitle("Console");
+ consoleView.setFocus();
+ String output = consoleView.bot().styledText().getText();
+ Pattern p = Pattern.compile(".*some_var.*", Pattern.DOTALL);
+ Matcher m = p.matcher(output);
+ // We shouldn't see some_var anywhere in the console
+ assertTrue(!m.matches());
+ }
+
+ @Test
+ // Verify we can set an environment variable and use it as a configure parameter
+ // Verifies fix for Bug: #303616
+ public void setEnvVar() throws Exception {
+ SWTBotView view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject2");
+ bot.menu("Project", 1).menu("Properties").click();
+ SWTBotShell shell = bot.shell("Properties for GnuProject2");
+ shell.activate();
+ bot.tree().expandNode("C/C++ Build").select("Environment");
+ bot.button("Add...").click();
+ shell = bot.shell("New variable");
+ shell.activate();
+ SWTBotText text = bot.textWithLabel("Name:");
+ text.typeText("some_var");
+ text = bot.textWithLabel("Value:");
+ text.typeText("--enable-somevar");
+ bot.button("OK").click();
+ shell = bot.shell("Properties for GnuProject2");
+ shell.activate();
+ bot.button("OK").click();
+ view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject2");
+ bot.menu("Project", 1).menu("Reconfigure Project").click();
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ assertTrue(workspace != null);
+ IWorkspaceRoot root = workspace.getRoot();
+ assertTrue(root != null);
+ IProject project = root.getProject("GnuProject2");
+ assertTrue(project != null);
+ IPath path = project.getLocation();
+ File f = null;
+ // We need to wait until the config.status file is created so
+ // sleep a bit and look for it...give up after 40 seconds
+ for (int i = 0; i < 80; ++i) {
+ bot.sleep(500);
+ f = new File(path.append("config.status").toOSString());
+ if (f.exists())
+ break;
+ }
+ bot.sleep(1000);
+ SWTBotView consoleView = bot.viewByTitle("Console");
+ consoleView.setFocus();
+ String output = consoleView.bot().styledText().getText();
+ Pattern p = Pattern.compile(".*--enable-somevar.*", Pattern.DOTALL);
+ Matcher m = p.matcher(output);
+ // We should see the expanded some_var variable in the console
+ assertTrue(m.matches());
+ }
+
+ @Test
+ // Verify we can set an environment variable prior to the configuration command and
+ // it will be seen by the configure script
+ public void setEnvVarOnCommandLine() throws Exception {
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ assertTrue(workspace != null);
+ IWorkspaceRoot root = workspace.getRoot();
+ assertTrue(root != null);
+ IProject project = root.getProject("GnuProject2");
+ assertTrue(project != null);
+ IPath path = project.getLocation();
+ // Create a fake configure script which prints out the values of
+ // envvars some_var1, some_var2, and some_var3
+ File f = new File(path.append("fake_configure").toOSString());
+ BufferedWriter w = new BufferedWriter(new FileWriter(f));
+ w.append("echo VAR1 is ${some_var1}");
+ w.newLine();
+ w.append("echo VAR2 is ${some_var2}");
+ w.newLine();
+ w.append("echo VAR3 is ${some_var3}");
+ w.newLine();
+ w.append("echo VAR4 is ${some_var4}");
+ w.newLine();
+ w.append("echo VAR5 is ${some_var5}");
+ w.newLine();
+ w.append("echo VAR6 is ${some_var6}");
+ w.newLine();
+ w.close();
+ // Now change the configure script command to be the fake configure script
+ // and set the three envvars on the command itself
+ SWTBotView view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject2");
+ bot.menu("Project", 1).menu("Properties").click();
+ SWTBotShell shell = bot.shell("Properties for GnuProject2");
+ shell.activate();
+ bot.tree().expandNode("Autotools").select("Configure Settings");
+ bot.treeWithLabel("Configure Settings").select("configure");
+ bot.textWithLabel("Command").setText("");
+ // Choose three different forms, some using quotes to allow blanks in them
+ bot.textWithLabel("Command").typeText("some_var1=\"a boat\" some_var2='a train' some_var3=car fake_configure some_var4=\"a wagon\" some_var5='a plane' some_var6=skates");
+ bot.button("OK").click();
+ // Reconfigure the project and make sure the env variables are seen in the script
+ view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject2");
+ bot.menu("Project", 1).menu("Reconfigure Project").click();
+ bot.sleep(3000);
+ SWTBotView consoleView = bot.viewByTitle("Console");
+ consoleView.setFocus();
+ String output = consoleView.bot().styledText().getText();
+ Pattern p = Pattern.compile(".*VAR1 is a boat.*VAR2 is a train.*VAR3 is car.*VAR4 is a wagon.*VAR5 is a plane.*VAR6 is skates.*", Pattern.DOTALL);
+ Matcher m = p.matcher(output);
+ assertTrue(m.matches());
+ }
+
+ @AfterClass
+ public static void sleep() {
+ bot.sleep(2000);
+ }
+} \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/src/org/eclipse/linuxtools/cdt/autotools/ui/tests/TestMakeTargets.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/src/org/eclipse/linuxtools/cdt/autotools/ui/tests/TestMakeTargets.java
new file mode 100644
index 0000000000..01fa3da9c2
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/src/org/eclipse/linuxtools/cdt/autotools/ui/tests/TestMakeTargets.java
@@ -0,0 +1,184 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat Inc..
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.tests;
+
+import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.allOf;
+import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.widgetOfType;
+import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.withMnemonic;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.finders.ContextMenuFinder;
+import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
+import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;
+import org.eclipse.swtbot.swt.finder.waits.DefaultCondition;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotRadio;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(SWTBotJunit4ClassRunner.class)
+public class TestMakeTargets {
+
+ private static SWTWorkbenchBot bot;
+
+ @BeforeClass
+ public static void beforeClass() throws Exception {
+ SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
+ bot = new SWTWorkbenchBot();
+ // Close the Welcome view if it exists
+ try {
+ bot.viewByTitle("Welcome").close();
+ // Turn off automatic building by default
+ } catch (Exception e) {
+ // do nothing
+ }
+ bot.menu("Window").menu("Preferences").click();
+ SWTBotShell shell = bot.shell("Preferences");
+ shell.activate();
+ bot.tree().expandNode("General").select("Workspace");
+ SWTBotCheckBox buildAuto = bot.checkBox("Build automatically");
+ if (buildAuto != null && buildAuto.isChecked())
+ buildAuto.click();
+ bot.button("Apply").click();
+ // Ensure that the C/C++ perspective is chosen automatically
+ // and doesn't require user intervention
+ bot.tree().expandNode("General").select("Perspectives");
+ SWTBotRadio radio = bot.radio("Always open");
+ if (radio != null && !radio.isSelected())
+ radio.click();
+ bot.button("OK").click();
+ bot.menu("File").menu("New").menu("Project...").click();
+
+ shell = bot.shell("New Project");
+ shell.activate();
+ bot.tree().expandNode("C/C++").select("C Project");
+ bot.button("Next >").click();
+
+ bot.textWithLabel("Project name:").setText("GnuProject3");
+ bot.tree().expandNode("GNU Autotools").select("Hello World ANSI C Autotools Project");
+
+ bot.button("Finish").click();
+ }
+
+ @Test
+ // Verify we can build and run the info MakeTarget tool
+ public void canBuildAndAccessInfoTarget() throws Exception {
+ SWTBotView view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject3");
+ bot.menu("Project", 1).menu("Build Project").click();
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ assertTrue(workspace != null);
+ IWorkspaceRoot root = workspace.getRoot();
+ assertTrue(root != null);
+ IProject project = root.getProject("GnuProject3");
+ assertTrue(project != null);
+ IPath path = project.getLocation();
+ path = path.append("config.status");
+ // We need to wait until the config.status file is created so
+ // sleep a bit and look for it...give up after 120 seconds
+ for (int i = 0; i < 240; ++i) {
+ bot.sleep(500);
+ File f = new File(path.toOSString());
+ if (f.exists())
+ break;
+ }
+ File f = new File(path.toOSString());
+ assertTrue(f.exists());
+ view = bot.viewByTitle("Project Explorer");
+ // FIXME: there is a problem with the CDT adding multiple MakeTargets
+ // so the Autotools plugin adds them into the saved data all at
+ // once. The targets aren't refreshed until the project is reopened.
+ // We do this by manually closing and opening the project. This
+ // will not be needed as of CDT 7.0.0.
+ SWTBotTreeItem node = view.bot().tree().getTreeItem("GnuProject3");
+ node.setFocus();
+ node.select().contextMenu("Close Project").click();
+ node.setFocus();
+ node.select().contextMenu("Open Project").click();
+ view.bot().tree().select("GnuProject3");
+ bot.menu("Project", 1).menu("Make Target").menu("Build...").click();
+ SWTBotShell shell = bot.shell("Make Targets");
+ shell.activate();
+ bot.table().getTableItem("info").setFocus();
+ bot.table().getTableItem("info").select();
+ bot.button("Build").click();
+ bot.sleep(3000);
+ SWTBotView consoleView = bot.viewByTitle("Console");
+ consoleView.setFocus();
+ String output = consoleView.bot().styledText().getText();
+ Pattern p = Pattern.compile(".*make info.*", Pattern.DOTALL);
+ Matcher m = p.matcher(output);
+ assertTrue(m.matches());
+ view = bot.viewByTitle("Project Explorer");
+ view.setFocus();
+ node = view.bot().tree().getTreeItem("GnuProject3");
+ node.setFocus();
+ node.select();
+ // FIXME: when context menus work properly, add test to try out
+ // Make Targets using right-click on project.
+// node.contextMenu("Make Targets").contextMenu("Build...").click();
+// org.hamcrest.Matcher<MenuItem> withMnemonic = withMnemonic("Make Targets");
+// final org.hamcrest.Matcher<MenuItem> matcher = allOf(widgetOfType(MenuItem.class));
+// final ContextMenuFinder menuFinder = new ContextMenuFinder((Control)view.bot().tree().widget);
+// new SWTBot().waitUntil(new DefaultCondition() {
+// public String getFailureMessage() {
+// return "Could not find context menu with text: Make Targets"; //$NON-NLS-1$
+// }
+//
+// public boolean test() throws Exception {
+// return !menuFinder.findMenus(matcher).isEmpty();
+// }
+// });
+// List<MenuItem> list = menuFinder.findMenus(matcher);
+// bot.sleep(23000);
+// // Following does not work but should
+// SWTBotMenu menu = node.select().contextMenu("Make Targets");
+// bot.sleep(4000);
+// shell = bot.shell("Make Targets");
+// shell.activate();
+// bot.table().getTableItem("check").setFocus();
+// bot.table().getTableItem("check").select();
+// bot.button("Build").click();
+// bot.sleep(3000);
+// consoleView = bot.viewByTitle("Console");
+// consoleView.setFocus();
+// output = consoleView.bot().styledText().getText();
+// p = Pattern.compile(".*make check.*Making check in src.*", Pattern.DOTALL);
+// m = p.matcher(output);
+// assertTrue(m.matches());
+ }
+
+ @AfterClass
+ public static void sleep() {
+ bot.sleep(4000);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/src/org/eclipse/linuxtools/cdt/autotools/ui/tests/TestToolActions.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/src/org/eclipse/linuxtools/cdt/autotools/ui/tests/TestToolActions.java
new file mode 100644
index 0000000000..92d0ec4eb0
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui.tests/src/org/eclipse/linuxtools/cdt/autotools/ui/tests/TestToolActions.java
@@ -0,0 +1,448 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat Inc..
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.tests;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
+import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotRadio;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(SWTBotJunit4ClassRunner.class)
+public class TestToolActions {
+ private static SWTWorkbenchBot bot;
+
+ @BeforeClass
+ public static void beforeClass() throws Exception {
+ SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
+ bot = new SWTWorkbenchBot();
+ // Close the Welcome view if it exists
+ try {
+ bot.viewByTitle("Welcome").close();
+ // Turn off automatic building by default
+ } catch (Exception e) {
+ // do nothing
+ }
+ bot.menu("Window").menu("Preferences").click();
+ SWTBotShell shell = bot.shell("Preferences");
+ shell.activate();
+ bot.tree().expandNode("General").select("Workspace");
+ SWTBotCheckBox buildAuto = bot.checkBox("Build automatically");
+ if (buildAuto != null && buildAuto.isChecked())
+ buildAuto.click();
+ bot.button("Apply").click();
+ // Ensure that the C/C++ perspective is chosen automatically
+ // and doesn't require user intervention
+ bot.tree().expandNode("General").select("Perspectives");
+ SWTBotRadio radio = bot.radio("Always open");
+ if (radio != null && !radio.isSelected())
+ radio.click();
+ bot.button("OK").click();
+ bot.menu("File").menu("New").menu("Project...").click();
+
+ shell = bot.shell("New Project");
+ shell.activate();
+ bot.tree().expandNode("C/C++").select("C Project");
+ bot.button("Next >").click();
+
+ bot.textWithLabel("Project name:").setText("GnuProject1");
+ bot.tree().expandNode("GNU Autotools").select("Hello World ANSI C Autotools Project");
+
+ bot.button("Finish").click();
+ }
+
+ @Test
+ // Verify we can access the aclocal tool
+ public void canAccessAclocal() throws Exception {
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ assertTrue(workspace != null);
+ IWorkspaceRoot root = workspace.getRoot();
+ assertTrue(root != null);
+ IProject project = root.getProject("GnuProject1");
+ assertTrue(project != null);
+ IPath path = project.getLocation();
+ // Verify configure does not exist initially
+ path = path.append("aclocal.m4");
+ File f = new File(path.toOSString());
+ assertTrue(!f.exists());
+ SWTBotView view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject1");
+ bot.menu("Project", 1).menu("Invoke Autotools").menu("Invoke Aclocal").click();
+ SWTBotShell shell = bot.shell("Aclocal Options");
+ shell.activate();
+ bot.text(0).typeText("--help");
+ bot.button("OK").click();
+ bot.sleep(1000);
+ SWTBotView consoleView = bot.viewByTitle("Console");
+ consoleView.setFocus();
+ String output = consoleView.bot().styledText().getText();
+ // Verify we got some help output to the console
+ Pattern p = Pattern.compile(".*Invoking aclocal in.*GnuProject1.*aclocal --help.*Usage: aclocal.*", Pattern.DOTALL);
+ Matcher m = p.matcher(output);
+ assertTrue(m.matches());
+ // Verify we still don't have an aclocal.m4 file yet
+ f = new File(path.toOSString());
+ assertTrue(!f.exists());
+ // Now lets run aclocal for our hello world project which hasn't had any
+ // autotool files generated yet.
+ view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject1");
+ bot.menu("Project", 1).menu("Invoke Autotools").menu("Invoke Aclocal").click();
+ shell = bot.shell("Aclocal Options");
+ shell.activate();
+ bot.button("OK").click();
+ bot.sleep(1000);
+ consoleView = bot.viewByTitle("Console");
+ consoleView.setFocus();
+ output = consoleView.bot().styledText().getText();
+ p = Pattern.compile(".*Invoking aclocal in.*GnuProject1.*aclocal.*", Pattern.DOTALL);
+ m = p.matcher(output);
+ assertTrue(m.matches());
+ // We need to wait until the aclocal.m4 file is created so
+ // sleep a bit and look for it...give up after 20 seconds
+ for (int i = 0; i < 40; ++i) {
+ bot.sleep(500);
+ f = new File(path.toOSString());
+ if (f.exists())
+ break;
+ }
+ // Verify we now have an aclocal.m4 file created
+ assertTrue(f.exists());
+ }
+
+ @Test
+ // Verify we can access the autoconf tool
+ public void canAccessAutoconf() throws Exception {
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ assertTrue(workspace != null);
+ IWorkspaceRoot root = workspace.getRoot();
+ assertTrue(root != null);
+ IProject project = root.getProject("GnuProject1");
+ assertTrue(project != null);
+ IPath path = project.getLocation();
+ // Verify configure does not exist initially
+ path = path.append("configure");
+ File f = new File(path.toOSString());
+ assertTrue(!f.exists());
+ SWTBotView view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject1");
+ bot.menu("Project", 1).menu("Invoke Autotools").menu("Invoke Autoconf").click();
+ bot.sleep(1000);
+ SWTBotView consoleView = bot.viewByTitle("Console");
+ consoleView.setFocus();
+ String output = consoleView.bot().styledText().getText();
+ // Verify we got some help output to the console
+ Pattern p = Pattern.compile(".*Invoking autoconf in.*GnuProject1.*autoconf.*", Pattern.DOTALL);
+ Matcher m = p.matcher(output);
+ assertTrue(m.matches());
+ // We need to wait until the configure file is created so
+ // sleep a bit and look for it...give up after 20 seconds
+ for (int i = 0; i < 40; ++i) {
+ bot.sleep(500);
+ f = new File(path.toOSString());
+ if (f.exists())
+ break;
+ }
+ // Verify we now have a configure script
+ f = new File(path.toOSString());
+ assertTrue(f.exists());
+ // Now lets delete the configure file and run autoconf from the project explorer
+ // menu directly from the configure.ac file.
+ assertTrue(f.delete());
+ view = bot.viewByTitle("Project Explorer");
+ SWTBotTreeItem node = view.bot().tree().expandNode("GnuProject1").getNode("configure.ac");
+ node.setFocus();
+ node.select().contextMenu("Invoke Autoconf").click();
+ bot.sleep(1000);
+ consoleView = bot.viewByTitle("Console");
+ consoleView.setFocus();
+ output = consoleView.bot().styledText().getText();
+ p = Pattern.compile(".*Invoking autoconf in.*GnuProject1.*autoconf.*", Pattern.DOTALL);
+ m = p.matcher(output);
+ assertTrue(m.matches());
+ // We need to wait until the configure file is created so
+ // sleep a bit and look for it...give up after 20 seconds
+ for (int i = 0; i < 40; ++i) {
+ bot.sleep(500);
+ f = new File(path.toOSString());
+ if (f.exists())
+ break;
+ }
+ // Verify we now have a configure script again
+ f = new File(path.toOSString());
+ assertTrue(f.exists());
+ }
+
+ @Test
+ // Verify we can access the automake tool
+ public void canAccessAutomake() throws Exception {
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ assertTrue(workspace != null);
+ IWorkspaceRoot root = workspace.getRoot();
+ assertTrue(root != null);
+ IProject project = root.getProject("GnuProject1");
+ assertTrue(project != null);
+ IPath path = project.getLocation();
+ // Verify configure does not exist initially
+ IPath path2 = path.append("src/Makefile.in");
+ path = path.append("Makefile.in");
+ File f = new File(path.toOSString());
+ assertTrue(!f.exists());
+ File f2 = new File(path2.toOSString());
+ assertTrue(!f2.exists());
+ SWTBotView view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject1");
+ bot.menu("Project", 1).menu("Invoke Autotools").menu("Invoke Automake").click();
+ SWTBotShell shell = bot.shell("Automake Options");
+ shell.activate();
+ bot.text(0).typeText("--help");
+ bot.button("OK").click();
+ bot.sleep(1000);
+ SWTBotView consoleView = bot.viewByTitle("Console");
+ consoleView.setFocus();
+ String output = consoleView.bot().styledText().getText();
+ // Verify we got some help output to the console
+ Pattern p = Pattern.compile(".*Invoking automake in.*GnuProject1.*automake --help.*Usage:.*", Pattern.DOTALL);
+ Matcher m = p.matcher(output);
+ assertTrue(m.matches());
+ // Verify we still don't have Makefile.in files yet
+ f = new File(path.toOSString());
+ assertTrue(!f.exists());
+ f2 = new File(path2.toOSString());
+ assertTrue(!f2.exists());
+ // Now lets run automake for our hello world project which hasn't had any
+ // Makefile.in files generated yet.
+ view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject1");
+ bot.menu("Project", 1).menu("Invoke Autotools").menu("Invoke Automake").click();
+ shell = bot.shell("Automake Options");
+ shell.activate();
+ bot.text(0).typeText("--add-missing"); // need this to successfully run here
+ bot.text(1).typeText("Makefile src/Makefile");
+ bot.button("OK").click();
+ bot.sleep(2000);
+ consoleView = bot.viewByTitle("Console");
+ consoleView.setFocus();
+ output = consoleView.bot().styledText().getText();
+ p = Pattern.compile(".*Invoking automake in.*GnuProject1.*automake --add-missing Makefile src/Makefile.*", Pattern.DOTALL);
+ m = p.matcher(output);
+ assertTrue(m.matches());
+ // We need to wait until the Makefile.in files are created so
+ // sleep a bit and look for it...give up after 20 seconds
+ for (int i = 0; i < 40; ++i) {
+ bot.sleep(500);
+ f = new File(path.toOSString());
+ f2 = new File(path2.toOSString());
+ if (f.exists() && f2.exists())
+ break;
+ }
+ // Verify we now have Makefile.in files created
+ f = new File(path.toOSString());
+ assertTrue(f.exists());
+ f2 = new File(path2.toOSString());
+ assertTrue(f2.exists());
+ }
+
+ @Test
+ // Verify we can access the libtoolize tool
+ public void canAccessLibtoolize() throws Exception {
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ assertTrue(workspace != null);
+ IWorkspaceRoot root = workspace.getRoot();
+ assertTrue(root != null);
+ IProject project = root.getProject("GnuProject1");
+ assertTrue(project != null);
+ SWTBotView view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject1");
+ bot.menu("Project", 1).menu("Invoke Autotools").menu("Invoke Libtoolize").click();
+ SWTBotShell shell = bot.shell("Libtoolize Options");
+ shell.activate();
+ bot.text(0).typeText("--help");
+ bot.button("OK").click();
+ bot.sleep(1000);
+ SWTBotView consoleView = bot.viewByTitle("Console");
+ consoleView.setFocus();
+ String output = consoleView.bot().styledText().getText();
+ // Verify we got some help output to the console
+ Pattern p = Pattern.compile(".*Invoking libtoolize in.*GnuProject1.*libtoolize --help.*Usage: libtoolize.*", Pattern.DOTALL);
+ Matcher m = p.matcher(output);
+ assertTrue(m.matches());
+ }
+
+ @Test
+ // Verify we can access the libtoolize tool
+ public void canAccessAutoheader() throws Exception {
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ assertTrue(workspace != null);
+ IWorkspaceRoot root = workspace.getRoot();
+ assertTrue(root != null);
+ IProject project = root.getProject("GnuProject1");
+ assertTrue(project != null);
+ SWTBotView view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject1");
+ bot.menu("Project", 1).menu("Invoke Autotools").menu("Invoke Autoheader").click();
+ SWTBotShell shell = bot.shell("Autoheader Options");
+ shell.activate();
+ bot.text(0).typeText("--help");
+ bot.button("OK").click();
+ bot.sleep(1000);
+ SWTBotView consoleView = bot.viewByTitle("Console");
+ consoleView.setFocus();
+ String output = consoleView.bot().styledText().getText();
+ // Verify we got some help output to the console
+ Pattern p = Pattern.compile(".*Invoking autoheader in.*GnuProject1.*autoheader --help.*Usage:.*autoheader.*", Pattern.DOTALL);
+ Matcher m = p.matcher(output);
+ assertTrue(m.matches());
+ }
+
+ @Test
+ // Verify we can access the autoreconf tool
+ public void canAccessAutoreconf() throws Exception {
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ assertTrue(workspace != null);
+ IWorkspaceRoot root = workspace.getRoot();
+ assertTrue(root != null);
+ IProject project = root.getProject("GnuProject1");
+ assertTrue(project != null);
+ IPath path = project.getLocation();
+ // Remove a number of generated files
+ File f = new File(path.append("src/Makefile.in").toOSString());
+ if (f.exists())
+ f.delete();
+ f = new File(path.append("Makefile.in").toOSString());
+ if (f.exists())
+ f.delete();
+ f = new File(path.append("configure").toOSString());
+ if (f.exists())
+ f.delete();
+ f = new File(path.append("config.status").toOSString());
+ if (f.exists())
+ f.delete();
+ f = new File(path.append("config.sub").toOSString());
+ if (f.exists())
+ f.delete();
+ SWTBotView view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject1");
+ bot.menu("Project", 1).menu("Invoke Autotools").menu("Invoke Autoreconf").click();
+ SWTBotShell shell = bot.shell("Autoreconf Options");
+ shell.activate();
+ bot.text(0).typeText("--help");
+ bot.button("OK").click();
+ bot.sleep(1000);
+ SWTBotView consoleView = bot.viewByTitle("Console");
+ consoleView.setFocus();
+ String output = consoleView.bot().styledText().getText();
+ // Verify we got some help output to the console
+ Pattern p = Pattern.compile(".*Invoking autoreconf in.*GnuProject1.*autoreconf --help.*Usage: .*autoreconf.*", Pattern.DOTALL);
+ Matcher m = p.matcher(output);
+ assertTrue(m.matches());
+ view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject1");
+ bot.menu("Project", 1).menu("Invoke Autotools").menu("Invoke Autoreconf").click();
+ shell = bot.shell("Autoreconf Options");
+ shell.activate();
+ bot.text(0).typeText("-i");
+ bot.button("OK").click();
+ // We need to wait until the Makefile.in file is created so
+ // sleep a bit and look for it...give up after 20 seconds
+ for (int i = 0; i < 40; ++i) {
+ bot.sleep(500);
+ f = new File(path.append("Makefile.in").toOSString());
+ if (f.exists())
+ break;
+ }
+ // Verify a number of generated files now exist
+ f = new File(path.append("src/Makefile.in").toOSString());
+ assertTrue(f.exists());
+ f = new File(path.append("Makefile.in").toOSString());
+ assertTrue(f.exists());
+ f = new File(path.append("configure").toOSString());
+ assertTrue(f.exists());
+ f = new File(path.append("config.status").toOSString());
+ assertTrue(!f.exists()); //shouldn't have run configure
+ f = new File(path.append("config.sub").toOSString());
+ assertTrue(f.exists());
+ }
+
+ @Test
+ // Verify we can access the autoreconf tool
+ public void canReconfigureProject() throws Exception {
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ assertTrue(workspace != null);
+ IWorkspaceRoot root = workspace.getRoot();
+ assertTrue(root != null);
+ IProject project = root.getProject("GnuProject1");
+ assertTrue(project != null);
+ IPath path = project.getLocation();
+ // Remove a number of generated files
+ File f = new File(path.append("src/Makefile.in").toOSString());
+ if (f.exists())
+ f.delete();
+ f = new File(path.append("Makefile.in").toOSString());
+ if (f.exists())
+ f.delete();
+ f = new File(path.append("configure").toOSString());
+ if (f.exists())
+ f.delete();
+ f = new File(path.append("config.status").toOSString());
+ if (f.exists())
+ f.delete();
+ f = new File(path.append("config.sub").toOSString());
+ if (f.exists())
+ f.delete();
+ SWTBotView view = bot.viewByTitle("Project Explorer");
+ view.bot().tree().select("GnuProject1");
+ bot.menu("Project", 1).menu("Reconfigure Project").click();
+ // We need to wait until the config.status file is created so
+ // sleep a bit and look for it...give up after 40 seconds
+ for (int i = 0; i < 40; ++i) {
+ bot.sleep(500);
+ f = new File(path.append("config.status").toOSString());
+ if (f.exists())
+ break;
+ }
+ // Verify a number of generated files now exist
+ f = new File(path.append("src/Makefile.in").toOSString());
+ assertTrue(f.exists());
+ f = new File(path.append("Makefile.in").toOSString());
+ assertTrue(f.exists());
+ f = new File(path.append("configure").toOSString());
+ assertTrue(f.exists());
+ f = new File(path.append("config.status").toOSString());
+ assertTrue(f.exists());
+ f = new File(path.append("config.sub").toOSString());
+ assertTrue(f.exists());
+ }
+
+ @AfterClass
+ public static void sleep() {
+ bot.sleep(2000);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/.classpath b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/.classpath
new file mode 100644
index 0000000000..ad32c83a78
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/.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/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/.project b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/.project
new file mode 100644
index 0000000000..7356f5231a
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.cdt.autotools.ui</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/autotools/org.eclipse.linuxtools.cdt.autotools.ui/.settings/org.eclipse.jdt.core.prefs b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..137c164367
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Tue Oct 06 15:50:25 EDT 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/ChangeLog b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/ChangeLog
new file mode 100644
index 0000000000..497d710b22
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/ChangeLog
@@ -0,0 +1,681 @@
+2010-05-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileContentOutlinePage.java: Remove
+ unused import warning.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ResourceLookupTree.java: Ditto.
+
+2010-05-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefileEditorActionDefinitionIds.java: Do not
+ extend ITextEditorDefinitionIds as it is not extensible and it is not required.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileContentOutlinePage.java: Remove
+ extraneous implements of IContentOutlinePage since this is implemented by the
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ResourceMarkerAnnotationModel.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileDocumentProvider.java: Refer to
+ local ResourceMarkerAnnotationModel class.
+
+2010-05-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Add org.eclipse.linuxtools.cdt.autotools as a friend that can access
+ internal classes.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ReferenceBlock.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsWizardMessages.properties: Add new message
+ for Referenced projects.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConvertToAutotoolsProjectWizard.java (applyOptions): Suppress
+ warnings.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ManagedProjectOptionBlock.java: Extend the new
+ ReferenceBlock rather than the API-restricted one in CDT.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/NewAutotoolsProjectOptionPage.java: Suppress warnings.
+
+2010-05-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IArchiveTarget.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IBadDirective.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ICommand.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IComment.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IConditional.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IDefaultRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IDeleteOnErrorRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IDirective.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IEmptyLine.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IExportAllVariablesRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IGNUMakefile.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IIgnoreRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IInclude.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IInferenceRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IIntermediateRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ILowResolutionTimeRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMacroDefinition.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefile.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefileReaderProvider.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefileValidator.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/INotParallelRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IParent.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IPhonyRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IPosixRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IPreciousRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISccsGetRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISecondaryRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISilentRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISpecialRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISuffixesRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ITarget.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ITargetRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ITerminal.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IUnExport.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IVariableDefinition.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IVPath.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IWorkingCopyManager.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IWorkingCopyManagerExtension.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AbstractMakefile.java: Modify to use new
+ interfaces so we don't violate new API restrictions from Makefile plugin.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AddBuildTargetAction.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeCompletionProcessor.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeDocumentProvider.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeEditor.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeEditorFactory.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeErrorHandler.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Automakefile.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileContentOutlinePage.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileReconcilingStrategy.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeTextHover.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/BadDirective.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Command.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Comment.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Conditional.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/DefaultRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/DeleteOnErrorRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Directive.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Else.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/EmptyLine.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ExportAllVariablesRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUAutomakefile.java (createMakefile): Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUTargetRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUVariableDef.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/If.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IgnoreRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefileDocumentProvider.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Include.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/InferenceRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IntermediateRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/LowResolutionTimeRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MacroDefinition.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileAnnotationHover.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileCompletionProcessor.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileContentOutlinePage.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileDocumentProvider.java (createMakefile): Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileEditor.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileReconcilingStrategy.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileTextHover.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/NotParallelRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/NullMakefile.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/OpenDeclarationAction.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Parent.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/PhonyRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/PosixRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/PreciousRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ProjectionMakefileUpdater.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Rule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SccsGetRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SecondaryRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SilentRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SpecialRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/StaticTargetRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SuffixesRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Target.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/TargetRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Terminal.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/UnExport.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/VariableDefinition.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/VPath.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/WorkingCopyManager.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ResourceLookupTree.java (resourceChanged): Use AutotoolsUIPlugin
+ log method.
+ (add): Ditto.
+ (initializeProjects): Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/text/hover/AutoconfTextHover.java (getStyleSheet): Ditto.
+
+2010-04-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Change required Java env to J2SE-1.5 instead of 1.6.
+
+2010-04-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #307258
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileEditor.java (isTabsToSpacesConversionEnabled):
+ Add override method so tabs are not converted within the Automake editor.
+
+2010-03-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConvertToAutotoolsProjectWizardPage.java (convertProject): Move
+ creation of Autotools configuration to bottom as we must ensure that an ICConfigurationDescription
+ has been set up for the default configuration and we can't do this manually ourselves.
+
+2010-03-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #304005
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsCategoryPropertyOptionPage.java (createFieldEditors):
+ Specify minimum length of 20 for text entry windows.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsConfigurePropertyPage.java (cfgChanged): Store configuration
+ descriptor for possible later usage.
+ (getConfiguration): Changed to use id rather than name.
+ (getAllConfigurationData): New method.
+ (getCfgd): New method.
+ (AutotoolsConfigurePropertyPage): No longer implement ICloneCfgListener interface. No longer keep track of temporary configuration
+ list. This is now done by AutotoolsConfigurationManager.
+ (cloneCfg): Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsConfigurePropertyTab.java (createEditArea): Comment out
+ minimum size setting.
+ (setValues): Remove resizing.
+ (syncClones): New method.
+ (createControls): Sync all clones and clear the temporary configuration list.
+ (updateData): Get configuration description.
+ (performApply): Call AutotoolsConfigurationManager to do apply passing the Configuration Description list for
+ the page instead of calling performOk.
+ (getAutotoolsCfg): Change to use id rather than name.
+ (performCancel): Call AutotoolsConfigurationManager to clear temporary configuration list.
+ (performOK): Changed to use new calls to AutotoolsConfigurationManager.
+ (specificResize): Removed.
+ (calcExtra): Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsBuildWizardHandler.java (convertProject): Create
+ configuration by id not name.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConvertToAutotoolsProjectWizardPage.java (convertProject): Ditto.
+
+2010-02-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsConfigurePropertyPage.java (cloneCfg): If
+ clonee is null, assign new configuration to clonee variable to avoid NPE.
+
+2010-02-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #303613
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/Resources.properties: Fix message
+ issued for autoreconf.
+
+2009-12-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #296616
+ * META-INF/MANIFEST.MF: Revert dependency on org.eclipse.linuxtools.cdt.autotools plugin which
+ causes a dependency loop.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConvertToAutotoolsProjectWizardPage.java (convertProject):
+ Change code to use new removeOldAutotoolsNature method in AutotoolsNewProjectNature class.
+
+2009-12-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #296616
+ * META-INF/MANIFEST.MF: Add dependency on org.eclipse.linuxtools.cdt.autotools plugin.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConvertToAutotoolsProjectWizardPage.java (convertProject):
+ Remove old Autotools nature from existing project.
+
+2009-11-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/template.xml: Make sure COPYING file
+ is copied over as part of template.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.xml: Ditto.
+
+2009-11-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/Resources.properties: Fix conversion wizard messages
+ to not mention CVS or repository.
+
+2009-11-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Fix dependencies to support CDT 6.0.0 and up.
+
+2009-11-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/text/hover/AutoconfTextHover.java: Clean up warning.
+ * plugin.xml: Add back conversion wizard which is needed to convert from old Autotools project
+ to new as well as convert a Std Makefile project over.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsConfigurePropertyPage.java: Remove
+ the override logic and use the base AbstractPage plus some additions.
+ (cfgChanged): Change this to be a place-holder for future usage.
+ (getConfiguration): Add any configuration we create to the cfgs list.
+ (isSingle): Return true.
+ (AutotoolsConfigurePropertyPage): Changed to only set cfgs.
+ (cloneCfg): Changed to only access cfgs local variable.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsConfigurePropertyTab.java (performOK):
+ Change to get IConfiguration list and then for each IConfiguration, get the IAConfiguration from
+ the parent page. This allows the parent page to only have to track cloned and special Autotools
+ configurations as opposed to knowing the entire list.
+
+2009-10-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/EditorUtility.java (getWorkingCopy): Clean up.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsPropertyMessages.java: Change to reference
+ bundle using class name rather than by string.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/text/hover/AutoconfTextHover.java (getHoverDoc): Add compatibility
+ support for old projects which use compatiblity plugin.
+ (getDefaultAutomakeMacrosVer): New method.
+ (getDefaultAutoconfMacrosVer): Ditto.
+ (getLocalAutoconfMacrosDocName): Ditto.
+ (getLocalAutomakeMacrosDocName): Ditto.
+ (getHoverDoc): Change to use new interfaces.
+ (getAMDoc): Change to try local files.
+ (getACDoc): Ditto.
+
+2009-10-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsBuildWizardHandler.java: New file.
+ * META-INF/MANIFEST.MF: Change dependencies to match CDT 6.0.1.
+ * plugin.properties: Add new strings as needed.
+ * plugin.xml: Fix Autotools sub-pages which had been removed. Also comment out GNU Autotools-specific
+ project wizards and conversion wizards. These are all done under the C/C++ Wizards now.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/AutotoolsUIPluginImages.java: Clean up AutotoolsPlugin reference.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MakeUIImages.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/EditorUtility.java (getWorkingCopy): Change to
+ use new findSharedWorkingCopy API since old public one has been removed from the CDT.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsConfigurePropertyPage.java (handleConfigSelection):
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsBuildWizard.java (createItems): Use the new
+ AutotoolsBuildWizardHandler so we get proper project conversion in the CDT C and C++ Conversion Wizards.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsWizardMessages.properties: Add new message.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConvertToAutotoolsProjectWizard.java: Clean up unused
+ imports.
+
+2009-10-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConvertToAutotoolsProjectWizard.java (doRun): Remove
+ commented section.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConvertToAutotoolsProjectWizardPage.java (convertProject): Add
+ creation of default Autotools configuration.
+
+2009-10-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsBuildPropertyPage.java (createControls): Remove
+ scanner discovery option which is no longer pertinent.
+ (initialize): Ditto.
+ (performOK): Ditto.
+
+2009-10-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/AutotoolsUIPluginImages.java (static initializer): Make sure
+ we are referencing icons folder for this plug-in, not AutotoolsPlugin.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTMLTextPresenter.java (updatePresentation): Fix references to
+ AutotoolsPlugin that should be AutotoolsUIPlugin.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MakeUIImages.java (static initializer): Ditto.
+ (makeIconFileURL): Ditto.
+
+2009-10-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Fix Automake editor content-type typo.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConvertToAutotoolsProjectWizard.java (doRun): Put
+ back code to do conversion.
+
+2009-10-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Add export of packages and allow org.eclipse.linuxtools.cdt.autotools.tests
+ plug-in to see them.
+
+2009-10-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ Refactoring of org.eclipse.linuxtools.cdt.autotools into org.eclipse.linuxtools.cdt.autotools.core
+ and org.eclipse.linuxtools.cdt.autotools.ui.
+
+ * .classpath: New file.
+ * .project: New file.
+ * .settings/org.eclipse.jdt.core.prefs: New file.
+ * build.properties: New file.
+ * icons/ac16/acmacro_arg_obj.gif: New file.
+ * icons/ac16/acmacro_obj.gif: New file.
+ * icons/ac16/ammacro_obj.gif: New file.
+ * icons/ac16/case_obj.gif: New file.
+ * icons/ac16/condition_obj.gif: New file.
+ * icons/ac16/convert_normal.gif: New file.
+ * icons/ac16/elif_obj.gif: New file.
+ * icons/ac16/else_obj.gif: New file.
+ * icons/ac16/for_obj.gif: New file.
+ * icons/ac16/if_obj.gif: New file.
+ * icons/ac16/while_obj.gif: New file.
+ * icons/autoconf.gif: New file.
+ * icons/automake.gif: New file.
+ * icons/dlcl16/build_configs.gif: New file.
+ * icons/dlcl16/config_category.gif: New file.
+ * icons/dlcl16/config_tool.gif: New file.
+ * icons/dlcl16/newc_app.gif: New file.
+ * icons/dlcl16/newcc_app.gif: New file.
+ * icons/dlcl16/open_include.gif: New file.
+ * icons/dtool16/alphab_sort_co.gif: New file.
+ * icons/dtool16/build_menu.gif: New file.
+ * icons/dtool16/convert-normal.gif: New file.
+ * icons/dtool16/make.gif: New file.
+ * icons/dtool16/makefile.gif: New file.
+ * icons/dtool16/newc_app.gif: New file.
+ * icons/dtool16/newcc_app.gif: New file.
+ * icons/dtool16/segment_edit.gif: New file.
+ * icons/dtool16/target_add.gif: New file.
+ * icons/dtool16/target_build.gif: New file.
+ * icons/dtool16/target_delete.gif: New file.
+ * icons/dtool16/target_edit.gif: New file.
+ * icons/dtool16/update_old.gif: New file.
+ * icons/elcl16/build_configs.gif: New file.
+ * icons/elcl16/config_category.gif: New file.
+ * icons/elcl16/config_tool.gif: New file.
+ * icons/elcl16/newc_app.gif: New file.
+ * icons/elcl16/newcc_app.gif: New file.
+ * icons/elcl16/open_include.gif: New file.
+ * icons/etool16/alphab_sort_co.gif: New file.
+ * icons/etool16/build_menu.gif: New file.
+ * icons/etool16/convert_normal.gif: New file.
+ * icons/etool16/make.gif: New file.
+ * icons/etool16/makefile.gif: New file.
+ * icons/etool16/newc_app.gif: New file.
+ * icons/etool16/newcc_app.gif: New file.
+ * icons/etool16/segment_edit.gif: New file.
+ * icons/etool16/target_add.gif: New file.
+ * icons/etool16/target_build.gif: New file.
+ * icons/etool16/target_delete.gif: New file.
+ * icons/etool16/target_edit.gif: New file.
+ * icons/etool16/target_filter.gif: New file.
+ * icons/etool16/update_old.gif: New file.
+ * icons/obj16/acmacro_obj.gif: New file.
+ * icons/obj16/command_obj.gif: New file.
+ * icons/obj16/define_obj.gif: New file.
+ * icons/obj16/environment_obj.gif: New file.
+ * icons/obj16/envvar_obj.gif: New file.
+ * icons/obj16/error_obj.gif: New file.
+ * icons/obj16/fatalerror_obj.gif: New file.
+ * icons/obj16/hfolder_obj.gif: New file.
+ * icons/obj16/include_obj.gif: New file.
+ * icons/obj16/info_obj.gif: New file.
+ * icons/obj16/irule_obj.gif: New file.
+ * icons/obj16/lib_obj.gif: New file.
+ * icons/obj16/macro_obj.gif: New file.
+ * icons/obj16/relation_obj.gif: New file.
+ * icons/obj16/target_obj.gif: New file.
+ * icons/obj16/trule_obj.gif: New file.
+ * icons/obj16/warning_obj.gif: New file.
+ * icons/sample.gif: New file.
+ * META-INF/MANIFEST.MF: New file.
+ * plugin.properties: New file.
+ * plugin.xml: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/AutotoolsUIPlugin.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfAnnotationHover.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfCodeScanner.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfDocumentProvider.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfDocumentSetupParticipant.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditor.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditorMacroValidator.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditorMessages.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditorMessages.properties: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfErrorHandler.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfIdentifierRule.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfKeywordDetector.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfM4WordDetector.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacro.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroCodeScanner.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroContentAssistProcessor.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroDamagerRepairer.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroParameterListValidator.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroPartitionRule.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroProposalContextInformation.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroRule.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroWordDetector.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfPartitioner.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfPartitionScanner.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfPKGWordDetector.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfReconcilingStrategy.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfWhitespaceDetector.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfWordDetector.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/IAutotoolEditorActionDefinitionIds.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/IAutotoolHelpContextIds.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/IAutotoolsEditor.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/InlineDataRule.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/MultilineRuleDamagerRepairer.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/outline/AutoconfContentOutlinePage.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/outline/AutoconfContentProvider.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/outline/AutoconfLabelProvider.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/ParseException.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfCaseConditionElement.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfCaseElement.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElement.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElifElement.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElseElement.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfForElement.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfIfElement.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroArgumentElement.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroDetector.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroElement.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfOutlineErrorHandler.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfParser.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfRootElement.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfSelectElement.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfTokenizer.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfUntilElement.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfWhileElement.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfErrorHandler.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfMacroDetector.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfMacroValidator.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IMacroDetector.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/ITokenConstants.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/ParseException.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/Token.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/RecursiveSingleLineRule.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/RestrictedEndOfLineRule.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/Resources.properties: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/AbstractAutotoolsCPropertyTab.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AbstractAutotoolsHandler.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AbstractTargetAction.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AclocalHandler.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AutoconfHandler.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AutoheaderHandler.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AutomakeHandler.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AutoreconfHandler.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAclocalAction.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAction.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAutoconfAction.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAutoheaderAction.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAutomakeAction.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAutoreconfAction.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeLibtoolizeAction.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeMessages.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeMessages.properties: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/LibtoolizeHandler.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/ReconfigureAction.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/ReconfigureHandler.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/SingleInputDialog.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/TwoInputDialog.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/AutotoolsConsole.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/AutotoolsUIPluginImages.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CBuildStepsConsole.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CConfigureConsole.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/Console.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ConsoleMessages.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ConsoleMessages.properties: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CWordFinder.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/autoconf/ProjectionFileUpdater.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AbstractElementListSelectionDialog.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AbstractMakefile.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AbstractMakefileCodeScanner.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AddBuildTargetAction.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ArchiveTarget.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutoconfSubstRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeCompletionProcessor.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeConfigMacro.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeDocumentProvider.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeEditor.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeEditorFactory.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeErrorHandler.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Automakefile.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileCodeScanner.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileContentOutlinePage.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileReconcilingStrategy.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileSourceConfiguration.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileUtil.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeIfElse.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeMacroDefinitionRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeMacroReferenceRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeTextHover.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeWordDetector.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/BadDirective.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Command.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Comment.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/CompletionProposalComparator.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Conditional.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/DefaultRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/DefineVariable.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/DeleteOnErrorRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Directive.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/EditorUtility.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ElementListSelectionDialog.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Else.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/EmptyLine.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Endef.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Endif.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ExportAllVariablesRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ExportVariable.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ExternalEditorInput.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ExternalEditorInputFactory.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUAutomakefile.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUMakefileConstants.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUMakefileUtil.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUTargetRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUVariableDef.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IAutomakeConditional.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/If.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Ifdef.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Ifeq.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Ifndef.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Ifneq.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IgnoreRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefileDocumentProvider.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefileEditorActionDefinitionIds.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Include.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/InferenceRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IntermediateRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IReconcilingParticipant.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISelectionValidator.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ITranslationUnitEditorInput.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/LexicalSortingAction.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/LowResolutionTimeRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MacroDefinition.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MacroDefinitionRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MacroReferenceRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileAnnotationHover.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileCodeScanner.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileCompletionProcessor.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakeFileConstants.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileContentOutlinePage.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileDocumentProvider.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileDocumentSetupParticipant.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileEditor.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileEditorActionContributor.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileEditorPreferenceConstants.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileEditorTogglePresentationAction.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileMessages.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakeFileMessages.properties: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefilePartitionScanner.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileReader.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileReconcilingStrategy.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileSourceConfiguration.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileStorageDocumentProvider.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileTextHover.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileWordDetector.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MessageLine.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/NotParallelRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/NullMakefile.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/OpenDeclarationAction.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/OpenIncludeAction.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/OverrideDefine.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/OverrideVariable.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Parent.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/PhonyRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/PosixMakefileUtil.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/PosixRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/PreciousRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ProjectionMakefileUpdater.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Rule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SccsGetRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SecondaryRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SelectionList.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SelectionStatusDialog.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SilentRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SpecialRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/StaticTargetRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/StatusInfo.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/StatusTool.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/StringMatcher.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SuffixesRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Target.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/TargetRule.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/TargetVariable.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Terminal.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/TwoArrayQuickSort.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/UnExport.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Util.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/VariableDefinition.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/VPath.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/WordPartDetector.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/WorkingCopyManager.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ErrorParserBlock.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/FileRelevance.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTML2TextReader.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTMLPrinter.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTMLTextPresenter.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/LineBreakingReader.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/LocationAdapter.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MakeUIImages.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MakeUIMessages.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MakeUIMessages.properties: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MessageLine.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/OptionalMessageDialog.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AbstractEditorPreferencePage.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutoconfEditorPreferencePage.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutomakeEditorPreferencePage.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsEditorPreferenceConstants.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsPreferencePage.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsPreferencesMessages.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsPreferencesMessages.properties: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/ColorEditor.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/ColorManager.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/OverlayPreferenceStore.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/StatusInfo.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/TabFolderLayout.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AbstractConfigurePropertyOptionsPage.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsBuildPropertyPage.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsCategoryPropertyOptionPage.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsConfigurePrefStore.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsConfigurePropertyPage.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsConfigurePropertyTab.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsEditorPropertyTab.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsGeneralPropertyPage.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsHeadPropertyPage.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsPropertyManager.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsPropertyMessages.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsPropertyMessages.properties: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsToolPropertyOptionPage.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsToolsPropertyTab.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/IProjectPropertyListener.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/IPropertyChangeManager.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/ToolListContentProvider.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/ToolListElement.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/ToolListLabelProvider.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ResourceLookup.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ResourceLookupTree.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/SingleCharReader.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/SubstitutionTextReader.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/text/hover/AutoconfPrototype.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/text/hover/AutoconfTextHover.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/text/hover/HoverMessages.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/text/hover/HoverMessages.properties: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsBuildWizard.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsNewCCProjectWizardV2.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsNewCProjectWizardV2.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsWizardMessages.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsWizardMessages.properties: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConfigurationContentProvider.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConfigurationLabelProvider.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConvertToAutotoolsProjectWizard.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConvertToAutotoolsProjectWizardPage.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/CProjectPlatformPage.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ManagedProjectOptionBlock.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/NewAutotoolsProjectOptionPage.java: New file.
+ * templates/projecttemplates/EmptyProject/template.properties: New file.
+ * templates/projecttemplates/EmptyProject/template.xml: New file.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src: New file.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/template.properties: New file.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/template.xml: New file.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src: New file.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.properties: New file.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.xml: \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/META-INF/MANIFEST.MF b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..0702724fda
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,38 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name.0
+Bundle-SymbolicName: org.eclipse.linuxtools.cdt.autotools.ui;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin
+Bundle-Localization: plugin
+Bundle-Vendor: %provider
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.linuxtools.cdt.autotools.core;bundle-version="1.0.0",
+ org.eclipse.cdt.make.core;bundle-version="6.0.0",
+ org.eclipse.cdt.core;bundle-version="5.1.0",
+ org.eclipse.core.resources;bundle-version="3.5.0",
+ org.eclipse.cdt.managedbuilder.core;bundle-version="6.0.0",
+ org.eclipse.jface.text;bundle-version="3.5.0",
+ org.eclipse.ui.editors;bundle-version="3.5.0",
+ org.eclipse.cdt.ui;bundle-version="5.1.0",
+ org.eclipse.help;bundle-version="3.4.0",
+ org.eclipse.ui.ide;bundle-version="3.5.0",
+ org.eclipse.cdt.managedbuilder.ui;bundle-version="5.1.0",
+ org.eclipse.core.filesystem;bundle-version="1.2.0",
+ org.eclipse.cdt.make.ui;bundle-version="6.0.0",
+ org.eclipse.ui.views;bundle-version="3.4.0"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.linuxtools.cdt.autotools.ui,
+ org.eclipse.linuxtools.cdt.autotools.ui.editors,
+ org.eclipse.linuxtools.cdt.autotools.ui.editors.outline,
+ org.eclipse.linuxtools.cdt.autotools.ui.editors.parser,
+ org.eclipse.linuxtools.internal.cdt.autotools.ui;x-friends:="org.eclipse.linuxtools.cdt.autotools.tests,org.eclipse.linuxtools.cdt.autotools",
+ org.eclipse.linuxtools.internal.cdt.autotools.ui.actions;x-friends:="org.eclipse.linuxtools.cdt.autotools.tests,org.eclipse.linuxtools.cdt.autotools",
+ org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.autoconf;x-friends:="org.eclipse.linuxtools.cdt.autotools.tests,org.eclipse.linuxtools.cdt.autotools",
+ org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;x-friends:="org.eclipse.linuxtools.cdt.autotools.tests,org.eclipse.linuxtools.cdt.autotools",
+ org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences;x-friends:="org.eclipse.linuxtools.cdt.autotools.tests,org.eclipse.linuxtools.cdt.autotools",
+ org.eclipse.linuxtools.internal.cdt.autotools.ui.properties;x-friends:="org.eclipse.linuxtools.cdt.autotools.tests,org.eclipse.linuxtools.cdt.autotools",
+ org.eclipse.linuxtools.internal.cdt.autotools.ui.text.hover;x-friends:="org.eclipse.linuxtools.cdt.autotools.tests,org.eclipse.linuxtools.cdt.autotools",
+ org.eclipse.linuxtools.internal.cdt.autotools.ui.wizards;x-friends:="org.eclipse.linuxtools.cdt.autotools.tests,org.eclipse.linuxtools.cdt.autotools"
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.library-docs/about.html b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/about.html
index 23506a4bae..23506a4bae 100644
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.library-docs/about.html
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/about.html
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/build.properties b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/build.properties
new file mode 100644
index 0000000000..c2ab8a15bd
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties,\
+ templates/,\
+ about.html,\
+ icons/
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/acmacro_arg_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/acmacro_arg_obj.gif
new file mode 100644
index 0000000000..fa1765ec5a
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/acmacro_arg_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/acmacro_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/acmacro_obj.gif
new file mode 100644
index 0000000000..d90a51c022
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/acmacro_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/ammacro_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/ammacro_obj.gif
new file mode 100644
index 0000000000..91c4c93ab5
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/ammacro_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/case_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/case_obj.gif
new file mode 100644
index 0000000000..5a15a79b1b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/case_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/condition_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/condition_obj.gif
new file mode 100644
index 0000000000..1be9094053
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/condition_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/convert_normal.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/convert_normal.gif
new file mode 100644
index 0000000000..0b693cb5f6
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/convert_normal.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/elif_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/elif_obj.gif
new file mode 100644
index 0000000000..f34581acb0
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/elif_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/else_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/else_obj.gif
new file mode 100644
index 0000000000..a441bef7dc
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/else_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/for_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/for_obj.gif
new file mode 100644
index 0000000000..11d3d8da1e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/for_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/if_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/if_obj.gif
new file mode 100644
index 0000000000..86550fe9f4
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/if_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/while_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/while_obj.gif
new file mode 100644
index 0000000000..240749472c
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/ac16/while_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/autoconf.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/autoconf.gif
new file mode 100644
index 0000000000..98afb3e2f0
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/autoconf.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/automake.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/automake.gif
new file mode 100644
index 0000000000..57df70ec64
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/automake.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dlcl16/build_configs.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dlcl16/build_configs.gif
new file mode 100644
index 0000000000..f0404659bb
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dlcl16/build_configs.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dlcl16/config_category.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dlcl16/config_category.gif
new file mode 100644
index 0000000000..cd837b147b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dlcl16/config_category.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dlcl16/config_tool.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dlcl16/config_tool.gif
new file mode 100644
index 0000000000..4539ebd91f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dlcl16/config_tool.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dlcl16/newc_app.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dlcl16/newc_app.gif
new file mode 100644
index 0000000000..a8353f6375
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dlcl16/newc_app.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dlcl16/newcc_app.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dlcl16/newcc_app.gif
new file mode 100644
index 0000000000..9ed7487c24
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dlcl16/newcc_app.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dlcl16/open_include.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dlcl16/open_include.gif
new file mode 100644
index 0000000000..b902fca49e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dlcl16/open_include.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/alphab_sort_co.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/alphab_sort_co.gif
new file mode 100644
index 0000000000..a0245485d5
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/alphab_sort_co.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/build_menu.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/build_menu.gif
new file mode 100644
index 0000000000..825d4c15fb
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/build_menu.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/convert-normal.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/convert-normal.gif
new file mode 100644
index 0000000000..580eac5896
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/convert-normal.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/make.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/make.gif
new file mode 100644
index 0000000000..496f46b674
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/make.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/makefile.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/makefile.gif
new file mode 100644
index 0000000000..a66cba4228
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/makefile.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/newc_app.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/newc_app.gif
new file mode 100644
index 0000000000..a8353f6375
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/newc_app.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/newcc_app.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/newcc_app.gif
new file mode 100644
index 0000000000..9ed7487c24
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/newcc_app.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/segment_edit.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/segment_edit.gif
new file mode 100644
index 0000000000..8cbaa857b7
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/segment_edit.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/target_add.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/target_add.gif
new file mode 100644
index 0000000000..92003c4d62
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/target_add.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/target_build.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/target_build.gif
new file mode 100644
index 0000000000..f545148573
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/target_build.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/target_delete.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/target_delete.gif
new file mode 100644
index 0000000000..5bff52281b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/target_delete.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/target_edit.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/target_edit.gif
new file mode 100644
index 0000000000..5e4b501b7d
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/target_edit.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/update_old.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/update_old.gif
new file mode 100644
index 0000000000..1f378279aa
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/dtool16/update_old.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/elcl16/build_configs.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/elcl16/build_configs.gif
new file mode 100644
index 0000000000..c4c76d0008
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/elcl16/build_configs.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/elcl16/config_category.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/elcl16/config_category.gif
new file mode 100644
index 0000000000..ee7c485243
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/elcl16/config_category.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/elcl16/config_tool.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/elcl16/config_tool.gif
new file mode 100644
index 0000000000..c984fba703
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/elcl16/config_tool.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/elcl16/newc_app.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/elcl16/newc_app.gif
new file mode 100644
index 0000000000..23b0284f84
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/elcl16/newc_app.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/elcl16/newcc_app.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/elcl16/newcc_app.gif
new file mode 100644
index 0000000000..4b39411daf
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/elcl16/newcc_app.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/elcl16/open_include.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/elcl16/open_include.gif
new file mode 100644
index 0000000000..b902fca49e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/elcl16/open_include.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/alphab_sort_co.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/alphab_sort_co.gif
new file mode 100644
index 0000000000..7d27529b64
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/alphab_sort_co.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/build_menu.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/build_menu.gif
new file mode 100644
index 0000000000..ab543f4d49
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/build_menu.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/convert_normal.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/convert_normal.gif
new file mode 100644
index 0000000000..0b693cb5f6
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/convert_normal.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/make.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/make.gif
new file mode 100644
index 0000000000..def312aa12
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/make.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/makefile.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/makefile.gif
new file mode 100644
index 0000000000..7afb4948ba
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/makefile.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/newc_app.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/newc_app.gif
new file mode 100644
index 0000000000..23b0284f84
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/newc_app.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/newcc_app.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/newcc_app.gif
new file mode 100644
index 0000000000..4b39411daf
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/newcc_app.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/segment_edit.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/segment_edit.gif
new file mode 100644
index 0000000000..1b50ff8d67
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/segment_edit.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/target_add.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/target_add.gif
new file mode 100644
index 0000000000..7fe9625c8a
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/target_add.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/target_build.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/target_build.gif
new file mode 100644
index 0000000000..174965f26b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/target_build.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/target_delete.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/target_delete.gif
new file mode 100644
index 0000000000..b853d62333
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/target_delete.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/target_edit.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/target_edit.gif
new file mode 100644
index 0000000000..65b97a547f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/target_edit.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/target_filter.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/target_filter.gif
new file mode 100644
index 0000000000..5340ec9f41
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/target_filter.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/update_old.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/update_old.gif
new file mode 100644
index 0000000000..c40724d98b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/etool16/update_old.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/acmacro_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/acmacro_obj.gif
new file mode 100644
index 0000000000..98afb3e2f0
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/acmacro_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/command_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/command_obj.gif
new file mode 100644
index 0000000000..7b3a92e090
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/command_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/define_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/define_obj.gif
new file mode 100644
index 0000000000..87d583e1dd
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/define_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/environment_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/environment_obj.gif
new file mode 100644
index 0000000000..3150162350
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/environment_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/envvar_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/envvar_obj.gif
new file mode 100644
index 0000000000..0f07692697
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/envvar_obj.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/icons/views/error_st_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/error_obj.gif
index 0bc60689c6..0bc60689c6 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/icons/views/error_st_obj.gif
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/error_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/fatalerror_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/fatalerror_obj.gif
new file mode 100644
index 0000000000..75a92755b2
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/fatalerror_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/hfolder_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/hfolder_obj.gif
new file mode 100644
index 0000000000..b98b817279
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/hfolder_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/include_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/include_obj.gif
new file mode 100644
index 0000000000..612067c1f9
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/include_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/info_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/info_obj.gif
new file mode 100644
index 0000000000..745b884ff0
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/info_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/irule_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/irule_obj.gif
new file mode 100644
index 0000000000..975d7894b6
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/irule_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/lib_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/lib_obj.gif
new file mode 100644
index 0000000000..cb55e33b5e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/lib_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/macro_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/macro_obj.gif
new file mode 100644
index 0000000000..fdde5fbb95
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/macro_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/relation_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/relation_obj.gif
new file mode 100644
index 0000000000..edbd8a3551
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/relation_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/target_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/target_obj.gif
new file mode 100644
index 0000000000..def312aa12
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/target_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/trule_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/trule_obj.gif
new file mode 100644
index 0000000000..dd261127c8
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/trule_obj.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/warning_obj.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/warning_obj.gif
new file mode 100644
index 0000000000..1e5f5eb367
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/obj16/warning_obj.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/icons/sample.gif b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/sample.gif
index 34fb3c9d8c..34fb3c9d8c 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/icons/sample.gif
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/icons/sample.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/plugin.properties b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/plugin.properties
new file mode 100644
index 0000000000..6a64207ece
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/plugin.properties
@@ -0,0 +1,174 @@
+#################################################################################
+# Copyright (c) 2006, 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 Incorporated - initial API and implementation
+#################################################################################
+ConvertWizard.description=Convert to C/C++ Autotools Project
+ConvertWizard.name = Convert to a C/C++ Autotools Project
+
+NewCProjectV2.description=GNU C Autotools Project
+NewCCProjectV2.description=GNU C++ Autotools Project
+NewCWizardV2.name=GNU C Autotools Project
+NewCCWizardV2.name=GNU C++ Autotools Project
+
+Autotools.wizard.name=GNU Autotools Build Wizard
+
+Autoconf.editor.name=Autoconf Editor
+
+BuildProperty.value.name.default=Default;
+BuildProperty.type.name.autotools=GNU Autotools
+
+PreferenceAutotools.name=Autotools
+PreferenceAutomakeEditor.name=Automake Editor
+PreferenceAutoconfEditor.name=Autoconf Editor
+
+PropertyAutotools.name=Autotools
+PropertyAutotools.general.name=General
+PropertyAutotools.configure.name=Configure Settings
+PropertyTabEditor.name=Editors
+AutotoolsBuildPropertyTab.name=Behaviour
+AutotoolsEditorsPropertyTab.name=Editors
+AutotoolsToolsPropertyTab.name=Tools Settings
+AutotoolsConfigurePropertyTab.name=Configure Settings
+
+PropertyTabEditor.tooltip=Set options for Autotools-specific editors
+PropertyTabBuild.tooltip=Set additional Autotools build options
+
+Makefile.builder.name=Autotools Makefile Generator
+Autotools.projecttype.name=GNU Autotools
+AutotoolsNature.name=Autotools Project Nature
+AutotoolsNewNature.name=Autotools Project Nature V2
+Configuration.build.name=Build (GNU)
+Autotools.targetplatform.name=GNU Autotools Target Platform
+Autotools.gnu.toolchain.name=GNU Autotools Toolchain
+Configure.outputType=Configure Output (config.status)
+Autogen.outputType=Autogen Output (configure)
+
+CommandCategorySource.name=Source
+CommandCategorySource.description=Source commands
+CommandCategoryTools.name=Tools
+CommandCategoryTools.description=Autotool tools
+ShowTooltip.name=Show Tooltip Description
+ShowTooltip.description=Shows the tooltip description for the element at the cursor
+
+# Scope and Key Commands
+ACeditor.scope.name=Autoconf Editor
+ACeditor.scope.description=Editor for Autoconf Configuration Source Files
+
+Tool.configure=configure
+
+OptionCategory.configure.general=General
+Option.configure.name=Name
+Option.configure.builddir=Build directory
+Option.configure.builddir.tip=Subdirectory off of project where build will occur
+Option.configure.configdir=Configure tool directory
+Option.configure.configdir.tip=Subdirectory off of project containing configure scripts
+Option.configure.cache_file=Name of configuration cache file (--cache-file)
+Option.configure.cache_file.tip=Specify the name of the configuration cache file [config.cache]
+Option.configure.no_create=Turn off file creation <not advised> (--no-create)
+Option.configure.no_create.tip=This tells configuration not to generate the output files as part of configuration
+Option.configure.quiet=Turn off checking messages (--quiet)
+Option.configure.quiet.tip=This turns off "checking ..." style messages from the configuration console output
+Option.configure.help=Display help contents of top-level configuration (--help)
+Option.configure.help.tip=Ask configuration file to display its help documentation
+Option.configure.version=Display version of autotools used to create configuration (--version)
+Option.configure.version.tip=This outputs the version of the Autotools used to create the configuration files
+
+OptionCategory.configure.platform=Platform Specifiers
+Option.configure.host=Host platform (--host)
+Option.configure.host.tip=Platform that project will run on
+Option.configure.target=Target platform (--target)
+Option.configure.target.tip=Platform that project will target output for
+Option.configure.build=Build platform (--build)
+Option.configure.build.tip=Platform where project is being built
+
+OptionCategory.configure.directories=Directory specifiers
+Option.configure.prefix=Arch-independent install directory (--prefix)
+Option.configure.prefix.tip=Place where architecture-independent files are installed [/usr/local]
+Option.configure.exec_prefix=Arch-dependent install directory (--exec-prefix)
+Option.configure.exec_prefix.tip=Place where architecture-dependent files are installed [PREFIX]
+Option.configure.libdir=Object code library directory (--libdir)
+Option.configure.libdir.tip=Place where object code libraries are installed [EPREFIX/lib]
+Option.configure.bindir=User executable directory (--bindir)
+Option.configure.bindir.tip=Place where binary executables are installed [EPREFIX/bin]
+Option.configure.sbindir=System admin executable directory (--sbindir)
+Option.configure.sbindir.tip=Place where system admin executables are installed [EPREFIX/sbin]
+Option.configure.includedir=C Header file directory (--includdir)
+Option.configure.includedir.tip=Place where header files will be installed [PREFIX/include]
+Option.configure.datadir=Read-only architecture-independent data (--datadir)
+Option.configure.datadir.tip=Place where read-only architecture-independent data is installed [PREFIX/share]
+Option.configure.sysconfdir=Read-only single-machine data directory (--syconfdir)
+Option.configure.sysconfdir.tip=Place where read-only single-machine data is stored [PREFIX/etc]
+Option.configure.infodir=Info file documentation directory (--infodir)
+Option.configure.infodir.tip=Place where info files are installed [PREFIX/info]
+Option.configure.mandir=Man file documentation directory (--mandir)
+Option.configure.mandir.tip=Place where man file documentation is installed [PREFIX/man]
+Option.configure.srcdir=Sources directory (--srcdir)
+Option.configure.srcdir.tip=Place where configure can find sources [configure directory or ..]
+Option.configure.localstatedir=Modifiable single-machine data directory (--localstatedir)
+Option.configure.localstatedir.tip=Place where modifiable single-machine data is installed [PREFIX/var]
+Option.configure.sharedstatedir=Modifiable architecture-independent data directory (--sharedstatedir)
+Option.configure.sharedstatedir.tip=Place where modifiable architecture-independent data is installed [PREFIX/com}
+Option.configure.libexecdir=Program executable directory (--libexecdir)
+Option.configure.libexecdir=Place where program executables will be installed [EPREFIX/libexec]
+Option.configure.oldincludedir=Non-gcc C header file directory (--oldincludedir)
+Option.configure.oldincludedir.tip=Place where non-gcc C header files are installed [/usr/include]
+
+OptionCategory.configure.filenames=File-name transformations
+Option.configure.program_prefix=Installed program prefix (--program-prefix)
+Option.configure.program_prefix.tip=Prepend PREFIX to the beginning of installed program names
+Option.configure.program_suffix=Installed program suffix (--program-suffix)
+Option.configure.program_suffix.tip=Append SUFFIX to the end of installed program names
+Option.configure.program_transform_name=Installed program name transform (--program-transform-name)
+Option.configure.program_transform_name.tip=A sed string used to transform installed program names
+
+OptionCategory.configure.features=Features and packages
+Option.configure.enable_maintainer_mode=Enable maintainer mode (--enable-maintainer-mode)
+Option.configure.enable_maintainer_mode.tip=Specify this to have Makefiles generated with checks for Autotool configuration file changes
+Option.configure.user=User-specified configuration options
+Option.configure.user.tip=Specify one or more configuration options (e.g. --enable-FEATURE, --disable-FEATURE, or --with-PACKAGE)
+
+Tool.autogen = autogen.sh
+
+OptionCategory.autogen.general=Options
+Option.autogen.user=Command line options
+Option.autogen.user.tip=Specify options to pass to the top-level autogen.sh script
+
+RedHatVendor.name = Red Hat
+Bundle-Name.0 = Autotools UI Plug-in (Incubation)
+provider=Eclipse
+InvokeAutotools.label = Invoke Autotools
+InvokeAutotools.mnemonic = I
+InvokeAutoconf.label = Invoke Autoconf
+InvokeAutoconf.mnemonic = c
+InvokeAutoconf.description = Run autoconf in the selected directory
+InvokeAutoheader.label = Invoke Autoheader
+InvokeAutoheader.mnemonic = h
+InvokeAutoheader.description = Run autoheader from the selected directory
+InvokeAutomake.label = Invoke Automake
+InvokeAutomake.mnemonic = m
+InvokeAutomake.description = Run automake from the selected directory
+InvokeAutoreconf.label = Invoke Autoreconf
+InvokeAutoreconf.mnemonic = r
+InvokeAutoreconf.description = Run autoreconf from the selected directory
+InvokeAclocal.label = Invoke Aclocal
+InvokeAclocal.mnemonic = l
+InvokeAclocal.description = Run aclocal from the selected directory
+InvokeLibtoolize.label = Invoke Libtoolize
+InvokeLibtoolize.mnemonic = t
+InvokeLibtoolize.description = Run libtoolize in the selected directory
+Reconfigure.label = Reconfigure Project
+Reconfigure.mnemonic = f
+Reconfigure.description = Run configuration scripts for project
+DynamicBuild.label = Dynamic Build Info
+GetIncludePath.label = Get Include Path
+GetDefinedSymbols.label = Get Defined Symbols
+IncludesOption.name = includes
+SymbolsOption.name = symbols
+AutomakeEditor.name = AutomakeEditor
+Automake.name = automake \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/plugin.xml b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/plugin.xml
new file mode 100644
index 0000000000..5dbeb1d06a
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/plugin.xml
@@ -0,0 +1,740 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+ <extension
+ point="org.eclipse.ui.newWizards">
+ <wizard
+ category="org.eclipse.cdt.ui.newCWizards"
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.wizards.ConvertToAutotoolsProjectWizard"
+ finalPerspective="org.eclipse.cdt.ui.CPerspective"
+ hasPages="true"
+ icon="icons/ac16/convert_normal.gif"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.wizards.conversionWizard"
+ name="%ConvertWizard.name">
+ <description>
+ %ConvertWizard.description
+ </description>
+ <selection class="org.eclipse.core.resources.IProject"/>
+ </wizard>
+ <!--
+ <wizard
+ category="org.eclipse.cdt.ui.newCWizards"
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.wizards.AutotoolsNewCProjectWizardV2"
+ finalPerspective="org.eclipse.cdt.ui.CPerspective"
+ hasPages="true"
+ icon="icons/elcl16/newc_app.gif"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.wizard.c.v2"
+ name="%NewCWizardV2.name"
+ project="true">
+ <description>
+ %NewCProjectV2.description
+ </description>
+ <selection
+ class="org.eclipse.core.resources.IProject">
+ </selection>
+ </wizard>
+ <wizard
+ category="org.eclipse.cdt.ui.newCWizards"
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.wizards.AutotoolsNewCCProjectWizardV2"
+ finalPerspective="org.eclipse.cdt.ui.CPerspective"
+ hasPages="true"
+ icon="icons/elcl16/newcc_app.gif"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.wizard.cc.v2"
+ name="%NewCCWizardV2.name"
+ project="true">
+ <description>
+ %NewCCProjectV2.description
+ </description>
+ <selection
+ class="org.eclipse.core.resources.IProject">
+ </selection>
+ </wizard>
+ -->
+ </extension>
+ <!--
+ <extension
+ point="org.eclipse.ui.navigator.navigatorContent">
+ <commonWizard
+ associatedExtensionId="org.eclipse.cdt.ui.navigator.content"
+ menuGroupId="org.eclipse.cdt.ui.newProject"
+ type="new"
+ wizardId="org.eclipse.linuxtools.cdt.autotools.ui.wizards.conversionWizard">
+ <enablement>
+ <and>
+ <adapt type="org.eclipse.core.resources.IProject" />
+ <not>
+ <adapt type="org.eclipse.core.resources.IProject" >
+ <test
+ property="org.eclipse.core.resources.projectNature"
+ value="org.eclipse.linuxtools.cdt.autotools.core.autotoolsNatureV2"/>
+ </adapt>
+ </not>
+ </and>
+ </enablement>
+ </commonWizard>
+ </extension>
+ <extension
+ point="org.eclipse.ui.navigator.viewer">
+ <viewerContentBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
+ <includes>
+ <contentExtension pattern="org.eclipse.linuxtools.cdt.autotools.ui.wizards.*"/>
+ </includes>
+ </viewerContentBinding>
+ </extension>
+ -->
+ <extension
+ id="org.eclipse.linuxtools.cdt.autotools.ui.popup1"
+ point="org.eclipse.ui.popupMenus">
+ <objectContribution
+ adaptable="true"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.objectContribution.autoconf"
+ nameFilter="configure.ac"
+ objectClass="org.eclipse.core.resources.IResource">
+ <action
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.actions.InvokeAutoconfAction"
+ enablesFor="1"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.action.autoconf1"
+ label="%InvokeAutoconf.label"
+ menubarPath="additions">
+ </action>
+ </objectContribution>
+ <objectContribution
+ adaptable="true"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.objectContribution.autoconf2"
+ nameFilter="configure.in"
+ objectClass="org.eclipse.core.resources.IResource">
+ <action
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.actions.InvokeAutoconfAction"
+ enablesFor="1"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.action2"
+ label="%InvokeAutoconf.label"
+ menubarPath="additions">
+ </action>
+ </objectContribution>
+ </extension>
+ <extension
+ point="org.eclipse.cdt.core.CBuildConsole">
+ <CBuildConsole
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.CConfigureConsole"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.configureConsole"/>
+ <CBuildConsole
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.CBuildStepsConsole"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.buildStepsConsole">
+ </CBuildConsole>
+ <CBuildConsole
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.AutotoolsConsole"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.autotoolsConsole">
+ </CBuildConsole>
+ </extension>
+ <extension point="org.eclipse.core.contenttype.contentTypes">
+ <!-- declares a content type for automake files -->
+ <content-type id="org.eclipse.linuxtools.cdt.autotools.ui.automake" name="%Automake.name"
+ base-type="org.eclipse.core.runtime.text"
+ priority="high"/>
+ </extension>
+ <extension point="org.eclipse.core.contenttype.contentTypes">
+ <file-association
+ content-type="org.eclipse.linuxtools.cdt.autotools.ui.automake"
+ file-names="Makefile.am"
+ file-extensions="am"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.eclipse.linuxtools.cdt.autotools.ui.editors.AutoconfEditor"
+ contributorClass="org.eclipse.ui.texteditor.BasicTextEditorActionContributor"
+ default="true"
+ extensions="m4"
+ filenames="configure.in,configure.ac"
+ icon="icons/autoconf.gif"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.editor.autoconf"
+ name="%Autoconf.editor.name"/>
+ </extension>
+ <extension
+ id="org.eclipse.cdt.make.editor"
+ name="MakefileEditor"
+ point="org.eclipse.ui.editors">
+ <editor
+ name="%AutomakeEditor.name"
+ icon="icons/automake.gif"
+ contributorClass="org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake.MakefileEditorActionContributor"
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake.AutomakeEditor"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.editors.AutomakeEditor"
+ filenames="Makefile.am,Makefile.in">
+ <contentTypeBinding contentTypeId="org.eclipse.linuxtools.cdt.autotools.ui.automake"/>
+ </editor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.contexts">
+ <context
+ description="%ACeditor.scope.description"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.editor.scope"
+ name="%ACeditor.scope.name"
+ parentId="org.eclipse.ui.textEditorScope"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.eclipse.linuxtools.cdt.autotools.ui.editors.text.show.tooltip"
+ contextId="org.eclipse.linuxtools.cdt.autotools.ui.editor.scope"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="F2"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <category
+ description="%CommandCategorySource.description"
+ id="org.eclipse.linuxtools.cdt.ui.category.source"
+ name="%CommandCategorySource.name"/>
+ <command
+ categoryId="org.eclipse.linuxtools.cdt.ui.category.source"
+ description="%ShowTooltip.description"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.editors.text.show.tooltip"
+ name="%ShowTooltip.name"/>
+ </extension>
+ <extension
+ id="parsefileerror"
+ name="Autotools Parse Error Marker"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.core.resources.problemmarker"/>
+ <super type="org.eclipse.core.resources.textmarker"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ id="outlineparsefileerror"
+ name="Autotools Outline Page Parse Error"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.core.resources.problemmarker"/>
+ <super type="org.eclipse.core.resources.textmarker"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ id="org.eclipse.linuxtools.cdt.autoconf.docsetup"
+ name="Autoconf Editor Setup"
+ point="org.eclipse.core.filebuffers.documentSetup">
+ <participant
+ class="org.eclipse.linuxtools.cdt.autotools.ui.editors.AutoconfDocumentSetupParticipant"
+ extensions="m4"
+ fileNames="configure.in,configure.ac"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.cdt.ui.preferences.CPluginPreferencePage"
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.AutotoolsPreferencePage"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.preferences1"
+ name="%PreferenceAutotools.name">
+ </page>
+ <page
+ category="org.eclipse.linuxtools.cdt.autotools.ui.preferences1"
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.AutomakeEditorPreferencePage"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.preferences.automake.editor1"
+ name="%PreferenceAutomakeEditor.name">
+ </page>
+ <page
+ category="org.eclipse.linuxtools.cdt.autotools.ui.preferences1"
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.AutoconfEditorPreferencePage"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.preferences.autoconf.editor1"
+ name="%PreferenceAutoconfEditor.name">
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.cdt.ui.cPropertyTab">
+ <tab
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.properties.AutotoolsBuildPropertyPage"
+ icon="icons/autoconf.gif"
+ name="%AutotoolsBuildPropertyTab.name"
+ parent="org.eclipse.linuxtools.internal.cdt.autotools.ui.properties.AutotoolsHeadPropertyPage"
+ tooltip="%PropertyTabBuild.tooltip"
+ weight="002">
+ </tab>
+ <tab
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.properties.AutotoolsEditorPropertyTab"
+ name="%AutotoolsEditorsPropertyTab.name"
+ parent="org.eclipse.linuxtools.internal.cdt.autotools.ui.properties.AutotoolsGeneralPropertyPage">
+ </tab>
+ <tab
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.properties.AutotoolsToolsPropertyTab"
+ name="%AutotoolsToolsPropertyTab.name"
+ parent="org.eclipse.linuxtools.internal.cdt.autotools.ui.properties.AutotoolsGeneralPropertyPage">
+ </tab>
+ <tab
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.properties.AutotoolsConfigurePropertyTab"
+ name="%AutotoolsConfigurePropertyTab.name"
+ parent="org.eclipse.linuxtools.internal.cdt.autotools.ui.properties.AutotoolsConfigurePropertyPage">
+ </tab>
+ </extension>
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.properties.AutotoolsHeadPropertyPage"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.propertypage"
+ name="%PropertyAutotools.name"
+ >
+ <filter
+ name="projectNature"
+ value="org.eclipse.linuxtools.cdt.autotools.core.autotoolsNatureV2">
+ </filter>
+ <enabledWhen>
+ <or>
+ <instanceof value="org.eclipse.core.resources.IProject"/>
+ <instanceof value="org.eclipse.cdt.core.model.ICProject"/>
+
+ <instanceof value="org.eclipse.core.resources.IFolder"/>
+ <instanceof value="org.eclipse.cdt.core.model.ICContainer"/>
+
+ <instanceof value="org.eclipse.cdt.core.model.ITranslationUnit"/>
+ <instanceof value="org.eclipse.core.resources.IFile"/>
+ </or>
+ </enabledWhen>
+ </page>
+ <page
+ category="org.eclipse.linuxtools.cdt.autotools.ui.propertypage"
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.properties.AutotoolsGeneralPropertyPage"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.propertypage2"
+ name="%PropertyAutotools.general.name">
+ <filter
+ name="projectNature"
+ value="org.eclipse.linuxtools.cdt.autotools.core.autotoolsNatureV2">
+ </filter>
+ </page>
+ <page
+ category="org.eclipse.linuxtools.cdt.autotools.ui.propertypage"
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.properties.AutotoolsConfigurePropertyPage"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.propertypage3"
+ name="%PropertyAutotools.configure.name">
+ <filter
+ name="projectNature"
+ value="org.eclipse.linuxtools.cdt.autotools.core.autotoolsNatureV2">
+ </filter>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="menu:project?after=additions">
+ <menu
+ id="invokeAutotools"
+ label="%InvokeAutotools.label"
+ mnemonic="%InvokeAutotools.mnemonic">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ <test
+ property="org.eclipse.core.resources.projectNature"
+ value="org.eclipse.linuxtools.cdt.autotools.core.autotoolsNatureV2">
+ </test>
+ </adapt>
+ </iterate>
+ </and>
+ </visibleWhen>
+ </menu>
+ </menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="menu:project?after=additions">
+ <command
+ commandId="org.eclipse.linuxtools.cdt.autotools.ui.command.reconfigure"
+ id="reconfigure"
+ label="%Reconfigure.label"
+ mnemonic="%Reconfigure.mnemonic"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ <test
+ property="org.eclipse.core.resources.projectNature"
+ value="org.eclipse.linuxtools.cdt.autotools.core.autotoolsNatureV2">
+ </test>
+ </adapt>
+ </iterate>
+ </and>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="menu:invokeAutotools">
+ <command
+ commandId="org.eclipse.linuxtools.cdt.autotools.ui.command.autoconf"
+ id="autoconf"
+ label="%InvokeAutoconf.label"
+ mnemonic="%InvokeAutoconf.mnemonic"
+ style="push">
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.cdt.autotools.ui.command.autoheader"
+ id="autoheader"
+ label="%InvokeAutoheader.label"
+ mnemonic="%InvokeAutoheader.mnemonic"
+ style="push">
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.cdt.autotools.ui.command.automake"
+ id="automake"
+ label="%InvokeAutomake.label"
+ mnemonic="%InvokeAutomake.mnemonic"
+ style="push">
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.cdt.autotools.ui.command.autoreconf"
+ id="autoreconf"
+ label="%InvokeAutoreconf.label"
+ mnemonic="%InvokeAutoreconf.mnemonic"
+ style="push">
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.cdt.autotools.ui.command.aclocal"
+ id="aclocal"
+ label="%InvokeAclocal.label"
+ mnemonic="%InvokeAclocal.mnemonic"
+ style="push">
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.cdt.autotools.ui.command.libtoolize"
+ id="libtoolize"
+ label="%InvokeLibtoolize.label"
+ mnemonic="%InvokeLibtoolize.mnemonic"
+ style="push">
+ </command>
+ </menuContribution>
+ </extension>
+ <extension
+ id="org.eclipse.linuxtools.cdt.autotools.ui.commands"
+ name="Autoconf"
+ point="org.eclipse.ui.commands">
+ <category
+ id="org.eclipse.linuxtools.cdt.autotools.ui.category.invokeAutotools"
+ name="%InvokeAutotools.label">
+ </category>
+ <command
+ categoryId="org.eclipse.linuxtools.cdt.autotools.ui.category.invokeAutotools"
+ description="%InvokeAutoconf.description"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.command.autoconf"
+ name="%InvokeAutoconf.label">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.cdt.autotools.ui.category.invokeAutotools"
+ description="%InvokeAutoheader.description"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.command.autoheader"
+ name="%InvokeAutoheader.label">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.cdt.autotools.ui.category.invokeAutotools"
+ description="%InvokeAutomake.description"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.command.automake"
+ name="%InvokeAutomake.label">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.cdt.autotools.ui.category.invokeAutotools"
+ description="%InvokeAutoreconf.description"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.command.autoreconf"
+ name="%InvokeAutoreconf.label">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.cdt.autotools.ui.category.invokeAutotools"
+ description="%InvokeAclocal.description"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.command.aclocal"
+ name="%InvokeAclocal.label">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.cdt.autotools.ui.category.invokeAutotools"
+ description="%InvokeLibtoolize.description"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.command.libtoolize"
+ name="%InvokeLibtoolize.label">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.cdt.autotools.ui.category.invokeAutotools"
+ description="%Reconfigure.description"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.command.reconfigure"
+ name="%Reconfigure.label">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.actions.AutoconfHandler"
+ commandId="org.eclipse.linuxtools.cdt.autotools.ui.command.autoconf">
+ <activeWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.actions.AutoheaderHandler"
+ commandId="org.eclipse.linuxtools.cdt.autotools.ui.command.autoheader">
+ <activeWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.actions.AutomakeHandler"
+ commandId="org.eclipse.linuxtools.cdt.autotools.ui.command.automake">
+ <activeWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.actions.AutoreconfHandler"
+ commandId="org.eclipse.linuxtools.cdt.autotools.ui.command.autoreconf">
+ <activeWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.actions.AclocalHandler"
+ commandId="org.eclipse.linuxtools.cdt.autotools.ui.command.aclocal">
+ <activeWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.actions.LibtoolizeHandler"
+ commandId="org.eclipse.linuxtools.cdt.autotools.ui.command.libtoolize">
+ <activeWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.actions.ReconfigureHandler"
+ commandId="org.eclipse.linuxtools.cdt.autotools.ui.command.reconfigure">
+ <activeWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.cdt.core.templates">
+ <template
+ id="org.eclipse.linuxtools.cdt.autotools.ui.template.emptyProject"
+ location="templates/projecttemplates/EmptyProject/template.xml"
+ projectType="org.eclipse.linuxtools.cdt.autotools.core.projectType">
+ </template>
+ <template
+ filterPattern=".*gcc"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.template.helloWorldCProject"
+ location="templates/projecttemplates/HelloWorldCAutotoolsProject/template.xml"
+ projectType="org.eclipse.linuxtools.cdt.autotools.core.projectType">
+ </template>
+ <template
+ filterPattern=".*g\+\+"
+ id="org.eclipse.linuxtools.cdt.autotools.ui.template.helloWorldCPPProject"
+ location="templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.xml"
+ projectType="org.eclipse.linuxtools.cdt.autotools.core.projectType">
+ </template>
+ </extension>
+ <extension
+ point="org.eclipse.cdt.ui.CDTWizard">
+ <wizard
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.wizards.AutotoolsBuildWizard"
+ name="%Autotools.wizard.name">
+ </wizard>
+ </extension>
+</plugin>
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/AutotoolsUIPlugin.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/AutotoolsUIPlugin.java
new file mode 100644
index 0000000000..0f80ceeee9
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/AutotoolsUIPlugin.java
@@ -0,0 +1,257 @@
+/*******************************************************************************
+ * 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui;
+
+import java.lang.reflect.InvocationTargetException;
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class AutotoolsUIPlugin extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.cdt.autotools.ui"; //$NON-NLS-1$
+
+ // The shared instance
+ private static AutotoolsUIPlugin plugin;
+
+ private ResourceBundle resourceBundle;
+
+ /**
+ * The constructor.
+ */
+ public AutotoolsUIPlugin() {
+ plugin = this;
+ try {
+ resourceBundle = ResourceBundle.getBundle(PLUGIN_ID + ".Resources"); //$NON-NLS-1$
+ } catch (MissingResourceException x) {
+ resourceBundle = null;
+ }
+
+ }
+
+ public static String getPluginId() {
+ return PLUGIN_ID;
+ }
+
+ public static String getUniqueIdentifier() {
+ if (getDefault() == null) {
+ // If the default instance is not yet initialized,
+ // return a static identifier. This identifier must
+ // match the plugin id defined in plugin.xml
+ return PLUGIN_ID;
+ }
+ return getDefault().getBundle().getSymbolicName();
+ }
+
+ /**
+ * This method is called upon plug-in activation
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /**
+ * This method is called when the plug-in is stopped
+ */
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ plugin = null;
+ }
+
+ /**
+ * Returns the shared instance.
+ */
+ public static AutotoolsUIPlugin getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Returns active shell.
+ */
+ public static Shell getActiveWorkbenchShell() {
+ IWorkbenchWindow window = getDefault().getWorkbench().getActiveWorkbenchWindow();
+ if (window != null) {
+ return window.getShell();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the string from the plugin's resource bundle,
+ * or 'key' if not found.
+ *
+ * @param key the message key
+ * @return the resource bundle message
+ */
+ public static String getResourceString(String key) {
+ ResourceBundle bundle = AutotoolsUIPlugin.getDefault().getResourceBundle();
+ try {
+ return bundle.getString(key);
+ } catch (MissingResourceException e) {
+ return key;
+ }
+ }
+
+ /**
+ * Returns the string from the plugin's resource bundle,
+ * or 'key' if not found.
+ *
+ * @param key the message key
+ * @param args an array of substituition strings
+ * @return the resource bundle message
+ */
+ public static String getFormattedString(String key, String[] args) {
+ return MessageFormat.format(getResourceString(key), (Object[])args);
+ }
+
+ /**
+ * Returns the plugin's resource bundle,
+ */
+ public ResourceBundle getResourceBundle() {
+ return resourceBundle;
+ }
+
+ /**
+ * 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 AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+
+ public static void log(IStatus status) {
+ ResourcesPlugin.getPlugin().getLog().log(status);
+ }
+
+ public static void logErrorMessage(String message) {
+ log(new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.ERROR, message, null));
+ }
+
+ public static void logException(Throwable e, final String title, String message) {
+ if (e instanceof InvocationTargetException) {
+ e = ((InvocationTargetException) e).getTargetException();
+ }
+ IStatus status = null;
+ if (e instanceof CoreException)
+ status = ((CoreException) e).getStatus();
+ else {
+ if (message == null)
+ message = e.getMessage();
+ if (message == null)
+ message = e.toString();
+ status = new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.OK, message, e);
+ }
+ ResourcesPlugin.getPlugin().getLog().log(status);
+ Display display;
+ display = Display.getCurrent();
+ if (display == null)
+ display = Display.getDefault();
+ final IStatus fstatus = status;
+ display.asyncExec(new Runnable() {
+ public void run() {
+ ErrorDialog.openError(null, title, null, fstatus);
+ }
+ });
+ }
+
+ public static void logException(Throwable e) {
+ logException(e, null, null);
+ }
+
+ public static void log(Throwable e) {
+ if (e instanceof InvocationTargetException)
+ e = ((InvocationTargetException) e).getTargetException();
+ IStatus status = null;
+ if (e instanceof CoreException)
+ status = ((CoreException) e).getStatus();
+ else
+ status = new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.OK, e.getMessage(), e);
+ log(status);
+ }
+
+ /**
+ * Utility method with conventions
+ */
+ public static void errorDialog(Shell shell, String title, String message, IStatus s) {
+ log(s);
+ // if the 'message' resource string and the IStatus' message are the same,
+ // don't show both in the dialog
+ if (s != null && message.equals(s.getMessage())) {
+ message = null;
+ }
+ ErrorDialog.openError(shell, title, message, s);
+ }
+
+ /**
+ * Utility method with conventions
+ */
+ public static void errorDialog(Shell shell, String title, String message, Throwable t) {
+ log(t);
+ IStatus status;
+ if (t instanceof CoreException) {
+ status = ((CoreException) t).getStatus();
+ // if the 'message' resource string and the IStatus' message are the same,
+ // don't show both in the dialog
+ if (status != null && message.equals(status.getMessage())) {
+ message = null;
+ }
+ } else {
+ status = new Status(IStatus.ERROR, AutotoolsUIPlugin.getUniqueIdentifier(), -1, "Internal Error: ", t); //$NON-NLS-1$
+ }
+ ErrorDialog.openError(shell, title, message, status);
+ }
+
+ /**
+ * Returns the workspace instance.
+ */
+ public static IWorkspace getWorkspace() {
+ return ResourcesPlugin.getWorkspace();
+ }
+
+ /**
+ * Returns the active workbench window or <code>null</code> if none
+ */
+ public static IWorkbenchWindow getActiveWorkbenchWindow() {
+ return getDefault().getWorkbench().getActiveWorkbenchWindow();
+ }
+
+ /**
+ * Returns the active workbench page or <code>null</code> if none.
+ */
+ public static IWorkbenchPage getActivePage() {
+ IWorkbenchWindow window= getActiveWorkbenchWindow();
+ if (window != null) {
+ return window.getActivePage();
+ }
+ return null;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/Resources.properties b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/Resources.properties
new file mode 100644
index 0000000000..84ce7c0bf6
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/Resources.properties
@@ -0,0 +1,105 @@
+#################################################################################
+# Copyright (c) 2006, 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 Incorporated - initial API and implementation
+# IBM Rational Software - ManagedMakeMessages copied to AutotoolsMakefileBuilder
+#################################################################################
+MakeCWizard.title=C/Make Project
+MakeCWizard.description=Create a New C Project using 'make' to build it
+
+WARNING_UNSUPPORTED_CONFIGURATION=Warning: unsupported configuration
+
+AutotoolsMakefileBuilder.message.finished=Build complete for project {0}
+AutotoolsMakefileBuilder.message.stopped=Build stopped
+AutotoolsMakefileBuilder.type.clean=Clean-only build
+AutotoolsMakefileBuilder.message.clean.deleting.output=Removing build artifacts from {0}
+AutotoolsMakefileBuilder.message.console.header=**** {0} of configuration {1} for project {2} ****
+
+MakeGenerator.makefile.built=Makefile built
+MakeGenerator.refresh=Refresh
+MakeGenerator.refresh.error=Refresh error
+MakeGenerator.generation.error=Configuration failed with error
+MakeGenerator.configuring=Configuring
+MakeGenerator.make.message=Invoking {0} for project {1}
+MakeGenerator.config.error=Error {0} occurred while running {1}
+MakeGenerator.createdir.error=Error creating build directory: {0}
+MakeGenerator.run.config.status=Running config.status in build directory: {0}
+MakeGenerator.makefile.cvs=Invoking Makefile.cvs in build directory: {0}
+MakeGenerator.autogen.sh=Invoking autogen.sh in build directory: {0}
+MakeGenerator.autoreconf=Invoking autoreconf in directory: {0}
+MakeGenerator.gen.makefile=Generating Makefile in build directory: {0}
+MakeGenerator.clean.builddir=Cleaning build directory: {0}
+MakeGenerator.gen.configure=Generating configure
+MakeGenerator.unsupportedConfig=Warning: unsupported configuration {0}
+MakeGenerator.success=[Operation successful]
+MakeGenerator.didnt.generate=No Makefile generated
+MakeGenerator.refresh.MakeTargets=Refreshing Make Targets
+
+BuildDir.apply=Build directory already in use
+BuildDir.default=Default build directory to unused value?
+BuildDir.yes=Yes
+BuildDir.no=No
+
+WizardAutotoolsProjectConversion.title=Convert to C/C++ Autotools Project
+WizardAutotoolsProjectConversion.description=Convert an existing Project to a C/C++ Autotools Project
+WizardAutotoolsProjectConversion.message.add_nature=Adding C/C++ Autotools Managed Project Nature
+WizardAutotoolsProjectConversion.message.add_builder=Adding C/C++ Autotools Managed Project Builder
+WizardMakeProjectConversion.monitor.convertingToMakeProject=Converting Project...
+WizardAutotoolsConversion=C/C++ Autotools Conversion
+WizardAutotoolsConversion.windowTitle=Conversion to a C/C++ Autotools Project
+WizardAutotoolsConversion.config.title=Select a configuration
+WizardAutotoolsConversion.config.desc=Select the configuration you wish to deploy on
+WizardAutotoolsConversion.options.title=Additional Project Settings
+WizardAutotoolsConversion.options.desc=Define the inter-project dependencies, if any.
+WizardAutotoolsConversion.message.save=Saving new build options
+
+WizardAutotoolsNewCProject.title=Autotools C Project
+WizardAutotoolsNewCProject.description=Create a new C Autotools project
+WizardAutotoolsNewCProject.monitor.creatingProject=Creating Project...
+WizardAutotoolsNewCProject.windowTitle=GNU Autotools C Project
+WizardAutotoolsNewCProject.config.title=Select a configuration
+WizardAutotoolsNewCProject.config.desc=Select the configuration you wish to deploy on
+WizardAutotoolsNewCProject.options.title=Additional Project Settings
+WizardAutotoolsNewCProject.options.desc=Define the inter-project dependencies, if any.
+WizardAutotoolsNewCProject.message.save=Saving new build options
+
+WizardAutotoolsNewCProjectV2.title=Autotools C Project V2
+WizardAutotoolsNewCProjectV2.description=Create a new C Autotools project
+WizardAutotoolsNewCProjectV2.monitor.creatingProject=Creating Project...
+WizardAutotoolsNewCProjectV2.windowTitle=GNU Autotools C Project V2
+WizardAutotoolsNewCProjectV2.config.title=Select a configuration
+WizardAutotoolsNewCProjectV2.config.desc=Select the configuration you wish to deploy on
+WizardAutotoolsNewCProjectV2.options.title=Additional Project Settings
+WizardAutotoolsNewCProjectV2.options.desc=Define the inter-project dependencies, if any.
+WizardAutotoolsNewCProjectV2.message.save=Saving new build options
+
+WizardAutotoolsNewCCProject.title=Autotools C++ Project
+WizardAutotoolsNewCCProject.description=Create a new C++ Autotools project
+WizardAutotoolsNewCCProject.monitor.creatingProject=Creating Project...
+WizardAutotoolsNewCCProject.windowTitle=GNU Autotools C++ Project
+WizardAutotoolsNewCCProject.config.title=Select a configuration
+WizardAutotoolsNewCCProject.config.desc=Select the configuration you wish to deploy on
+WizardAutotoolsNewCCProject.options.title=Additional Project Settings
+WizardAutotoolsNewCCProject.options.desc=Define the inter-project dependencies, if any.
+WizardAutotoolsNewCCProject.message.save=Saving new build options
+
+
+BuildTargetDialog.title.buildTarget=Build Special Targets
+BuildTargetDialog.title.makeTargetsFor=Make targets for
+BuildTargetDialog.button.build=Build
+
+TargetListViewer.button.add=Add...
+TargetListViewer.button.remove=Remove
+TargetListViewer.button.edit=Edit...
+TargetListViewer.label.target=Target
+TargetListViewer.label.location=Location
+TargetListViewer.exception.error=Error
+TargetListViewer.exception.message=An error occurred performing the selected action
+
+AutotoolsPreferencePage.useAutotoolsFileScanner.label=Use make -w for includepath scanning
+MakeTargetPreferencePage.buildTargetInBackground.label=Build target in background
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfAnnotationHover.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfAnnotationHover.java
new file mode 100644
index 0000000000..444cef3511
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfAnnotationHover.java
@@ -0,0 +1,202 @@
+/*******************************************************************************
+ * Copyright (c) 2000 2005 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * QNX Software System
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.DefaultInformationControl;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IInformationControl;
+import org.eclipse.jface.text.IInformationControlCreator;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.IAnnotationHover;
+import org.eclipse.jface.text.source.IAnnotationHoverExtension;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.ILineRange;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.LineRange;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.HTMLPrinter;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.texteditor.MarkerAnnotation;
+
+
+public class AutoconfAnnotationHover implements IAnnotationHover, IAnnotationHoverExtension {
+
+ /**
+ * Returns the distance to the ruler line.
+ */
+ protected int compareRulerLine(Position position, IDocument document, int line) {
+
+ if (position.getOffset() > -1 && position.getLength() > -1) {
+ try {
+ int markerLine= document.getLineOfOffset(position.getOffset());
+ if (line == markerLine)
+ return 1;
+ if (markerLine <= line && line <= document.getLineOfOffset(position.getOffset() + position.getLength()))
+ return 2;
+ } catch (BadLocationException x) {
+ }
+ }
+
+ return 0;
+ }
+
+ /**
+ * Selects a set of markers from the two lists. By default, it just returns
+ * the set of exact matches.
+ */
+ protected List<IMarker> select(List<IMarker> exactMatch, List<IMarker> including) {
+ return exactMatch;
+ }
+
+ /**
+ * Returns one marker which includes the ruler's line of activity.
+ */
+ @SuppressWarnings("unchecked")
+ protected List<IMarker> getMarkersForLine(ISourceViewer viewer, int line) {
+
+ IDocument document= viewer.getDocument();
+ IAnnotationModel model= viewer.getAnnotationModel();
+
+ if (model == null)
+ return null;
+
+ List<IMarker> exact= new ArrayList<IMarker>();
+ List<IMarker> including= new ArrayList<IMarker>();
+
+ Iterator e= model.getAnnotationIterator();
+ while (e.hasNext()) {
+ Object o= e.next();
+ if (o instanceof MarkerAnnotation) {
+ MarkerAnnotation a= (MarkerAnnotation) o;
+ switch (compareRulerLine(model.getPosition(a), document, line)) {
+ case 1:
+ exact.add(a.getMarker());
+ break;
+ case 2:
+ including.add(a.getMarker());
+ break;
+ }
+ }
+ }
+
+ return select(exact, including);
+ }
+
+ /*
+ * @see IVerticalRulerHover#getHoverInfo(ISourceViewer, int)
+ */
+ public String getHoverInfo(ISourceViewer sourceViewer, int lineNumber) {
+ List<IMarker> markers= getMarkersForLine(sourceViewer, lineNumber);
+ if (markers != null && markers.size() > 0) {
+
+ if (markers.size() == 1) {
+
+ // optimization
+ IMarker marker= (IMarker) markers.get(0);
+ String message= marker.getAttribute(IMarker.MESSAGE, (String) null);
+ if (message != null && message.trim().length() > 0)
+ return formatSingleMessage(message);
+
+ } else {
+
+ List<String> messages= new ArrayList<String>();
+
+ Iterator<IMarker> e= markers.iterator();
+ while (e.hasNext()) {
+ IMarker marker= (IMarker) e.next();
+ String message= marker.getAttribute(IMarker.MESSAGE, (String) null);
+ if (message != null && message.trim().length() > 0)
+ messages.add(message.trim());
+ }
+
+ if (messages.size() == 1)
+ return formatSingleMessage((String) messages.get(0));
+
+ if (messages.size() > 1)
+ return formatMultipleMessages(messages);
+ }
+ }
+
+ return null;
+ }
+
+
+// private int getHoverWidth(Display display) {
+// Rectangle displayBounds= display.getBounds();
+// int hoverWidth= displayBounds.width - (display.getCursorLocation().x - displayBounds.x);
+// hoverWidth-= 12; // XXX: Add some space to the border, Revisit
+// if (hoverWidth < 200) {
+// hoverWidth= 200;
+// }
+// return hoverWidth;
+// }
+
+ /*
+ * Formats a message as HTML text.
+ */
+ private String formatSingleMessage(String message) {
+ StringBuffer buffer= new StringBuffer();
+ HTMLPrinter.addPageProlog(buffer);
+ HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(message));
+ HTMLPrinter.addPageEpilog(buffer);
+ return buffer.toString();
+ }
+
+ /*
+ * Formats several message as HTML text.
+ */
+ private String formatMultipleMessages(List<String> messages) {
+ StringBuffer buffer= new StringBuffer();
+ HTMLPrinter.addPageProlog(buffer);
+ HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(AutoconfEditorMessages.getString("AutoconfAnnotationHover.multipleMarkers"))); //$NON-NLS-1$
+
+ HTMLPrinter.startBulletList(buffer);
+ Iterator<String> e= messages.iterator();
+ while (e.hasNext())
+ HTMLPrinter.addBullet(buffer, HTMLPrinter.convertToHTMLContent((String) e.next()));
+ HTMLPrinter.endBulletList(buffer);
+
+ HTMLPrinter.addPageEpilog(buffer);
+ return buffer.toString();
+ }
+
+ // IAnnotationHoverExtension members
+ // We need to use the extension to get a Hover Control Creator which
+ // handles html.
+
+
+ public IInformationControlCreator getHoverControlCreator() {
+ return new IInformationControlCreator() {
+ public IInformationControl createInformationControl(Shell parent) {
+ return new DefaultInformationControl(parent, false);
+ }
+ };
+ }
+
+ public boolean canHandleMouseCursor() {
+ return false;
+ }
+
+ public ILineRange getHoverLineRange(ISourceViewer viewer, int lineNumber) {
+ return new LineRange(lineNumber, 1);
+ }
+
+ public Object getHoverInfo(ISourceViewer sourceViewer, ILineRange lineRange, int visibleNumberOfLines) {
+ return getHoverInfo(sourceViewer, lineRange.getStartLine());
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfCodeScanner.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfCodeScanner.java
new file mode 100644
index 0000000000..51e7e9eeec
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfCodeScanner.java
@@ -0,0 +1,256 @@
+/*******************************************************************************
+ * Copyright (c) 2006 Red Hat, Inc., (c) 2008 NOKIA 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
+ * Ed Swartz (NOKIA) - updates
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.StringConverter;
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.text.rules.EndOfLineRule;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.RuleBasedScanner;
+import org.eclipse.jface.text.rules.SingleLineRule;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.jface.text.rules.WhitespaceRule;
+import org.eclipse.jface.text.rules.WordRule;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsPlugin;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.AutotoolsEditorPreferenceConstants;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.ColorManager;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+
+
+public class AutoconfCodeScanner extends RuleBasedScanner {
+
+ private Map<String, IToken> fTokenMap= new HashMap<String, IToken>();
+ private String[] fPropertyNamesColor;
+
+ /**
+ * Preference keys for boolean preferences which are <code>true</code>,
+ * iff the corresponding token should be rendered bold.
+ */
+ private String[] fPropertyNamesBold;
+ /**
+ * Preference keys for boolean preferences which are <code>true</code>,
+ * iff the corresponding token should be rendered italic.
+ */
+ private String[] fPropertyNamesItalic;
+
+ private static String[] keywords = {
+ "case", "do", "done", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ "esac", "if", "elif", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ "else", "fi", "for", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ "in", "then" }; //$NON-NLS-1$ //$NON-NLS-2$
+
+ public static final String[] fTokenProperties = new String[] {
+ ColorManager.AUTOCONF_COMMENT_COLOR,
+ ColorManager.AUTOCONF_KEYWORD_COLOR,
+ ColorManager.AUTOCONF_ACMACRO_COLOR,
+ ColorManager.AUTOCONF_AMMACRO_COLOR,
+ ColorManager.AUTOCONF_VAR_REF_COLOR,
+ ColorManager.AUTOCONF_VAR_SET_COLOR,
+ ColorManager.AUTOCONF_CODESEQ_COLOR,
+ ColorManager.AUTOCONF_DEFAULT_COLOR,
+ };
+
+ public AutoconfCodeScanner() {
+
+ initialize();
+
+ IToken other= getToken(ColorManager.AUTOCONF_DEFAULT_COLOR);
+ IToken keyword = getToken(ColorManager.AUTOCONF_KEYWORD_COLOR);
+ IToken comment= getToken(ColorManager.AUTOCONF_COMMENT_COLOR);
+ IToken string = getToken(ColorManager.AUTOCONF_DEFAULT_COLOR);
+ IToken varRef = getToken(ColorManager.AUTOCONF_VAR_REF_COLOR);
+ IToken acmacro = getToken(ColorManager.AUTOCONF_ACMACRO_COLOR);
+ IToken ammacro = getToken(ColorManager.AUTOCONF_AMMACRO_COLOR);
+ IToken code = getToken(ColorManager.AUTOCONF_CODESEQ_COLOR);
+
+ List<IRule> rules= new ArrayList<IRule>();
+
+ // Add rule for single line comments.
+ rules.add(new EndOfLineRule("dnl", comment)); //$NON-NLS-1$
+ rules.add(new EndOfLineRule("#", comment, '\\')); //$NON-NLS-1$
+
+ // Add special recursive rule for strings which allows variable
+ // references to be internally tokenized.
+ RecursiveSingleLineRule stringRule =
+ new RecursiveSingleLineRule("\"", "\"", string, '\\'); //$NON-NLS-1$ //$NON-NLS-2$
+ stringRule.addRule(new SingleLineRule("${", "}", varRef)); //$NON-NLS-1$ //$NON-NLS-2$
+ rules.add(stringRule);
+
+ // Add rule for variable references
+ rules.add(new SingleLineRule("${", "}", varRef)); //$NON-NLS-1$ //$NON-NLS-2$
+ // Add rule for strings
+ rules.add(new SingleLineRule("\"", "\"", string, '\\')); //$NON-NLS-1$ //$NON-NLS-2$
+
+ // Add rule for PKG_ macros
+ rules.add(new AutoconfMacroRule("PKG_", new AutoconfPKGWordDetector(), acmacro)); //$NON-NLS-1$
+
+ // Add rule for AC_ macros
+ rules.add(new AutoconfMacroRule("AC_", new AutoconfMacroWordDetector(), acmacro)); //$NON-NLS-1$
+
+ // Add rule for AM_ macros
+ rules.add(new AutoconfMacroRule("AM_", new AutoconfMacroWordDetector(), ammacro)); //$NON-NLS-1$
+
+ // Add rule for m4_ macros
+ rules.add(new AutoconfMacroRule("m4_", new AutoconfM4WordDetector(), acmacro)); //$NON-NLS-1$
+
+ // Add rule for code sequences starting with <<EOF and ending with EOF
+ rules.add(new InlineDataRule(code));
+
+ // Add word rule for keywords.
+ WordRule wordRule= new WordRule(new AutoconfWordDetector(), Token.UNDEFINED);
+ for (int i= 0; i < keywords.length; i++)
+ wordRule.addWord(keywords[i], keyword);
+ rules.add(wordRule);
+
+ // Add word rule for identifier.
+ rules.add(new AutoconfIdentifierRule(other));
+
+ // Make sure we don't treat "\#" as comment start.
+ rules.add(new SingleLineRule("\\#", null, Token.UNDEFINED));
+
+ rules.add(new WhitespaceRule(new AutoconfWhitespaceDetector()));
+
+ setDefaultReturnToken(other);
+
+ IRule[] result= new IRule[rules.size()];
+ rules.toArray(result);
+ setRules(result);
+ }
+
+ protected Token getToken(String key) {
+ return (Token) fTokenMap.get(key);
+ }
+
+ private void addToken(String colorKey, String boldKey, String italicKey) {
+ fTokenMap.put(colorKey, new Token(createTextAttribute(colorKey, boldKey, italicKey)));
+ }
+
+ protected String[] getTokenProperties() {
+ return fTokenProperties;
+ }
+
+ private int indexOf(String property) {
+ if (property != null) {
+ int length= fPropertyNamesColor.length;
+ for (int i= 0; i < length; i++) {
+ if (property.equals(fPropertyNamesColor[i]) || property.equals(fPropertyNamesBold[i]) || property.equals(fPropertyNamesItalic[i]))
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ /*
+ * @see ITokenScanner#nextToken()
+ */
+ public IToken nextToken() {
+ return super.nextToken();
+ }
+
+ public boolean affectsBehavior(PropertyChangeEvent event) {
+ return indexOf(event.getProperty()) >= 0;
+ }
+
+ public void adaptToPreferenceChange(PropertyChangeEvent event) {
+ String p= event.getProperty();
+ int index= indexOf(p);
+ Token token= getToken(fPropertyNamesColor[index]);
+ if (fPropertyNamesColor[index].equals(p))
+ adaptToColorChange(event, token);
+ else if (fPropertyNamesBold[index].equals(p))
+ adaptToStyleChange(event, token, SWT.BOLD);
+ else if (fPropertyNamesItalic[index].equals(p))
+ adaptToStyleChange(event, token, SWT.ITALIC);
+ }
+
+ protected void adaptToColorChange(PropertyChangeEvent event, Token token) {
+ RGB rgb= null;
+ Object value= event.getNewValue();
+ if (value instanceof RGB) {
+ rgb= (RGB) value;
+ } else if (value instanceof String) {
+ rgb= StringConverter.asRGB((String) value);
+ }
+
+ if (rgb != null) {
+ TextAttribute attr= (TextAttribute) token.getData();
+ token.setData(new TextAttribute(ColorManager.getDefault().getColor(rgb), attr.getBackground(), attr.getStyle()));
+ }
+ }
+
+ protected void adaptToStyleChange(PropertyChangeEvent event, Token token, int styleAttribute) {
+ if (token == null) {
+ return;
+ }
+ boolean eventValue= false;
+ Object value= event.getNewValue();
+ if (value instanceof Boolean) {
+ eventValue= ((Boolean) value).booleanValue();
+ } else if (IPreferenceStore.TRUE.equals(value)) {
+ eventValue= true;
+ }
+
+ TextAttribute attr= (TextAttribute) token.getData();
+ boolean activeValue= (attr.getStyle() & styleAttribute) == styleAttribute;
+ if (activeValue != eventValue) {
+ token.setData(new TextAttribute(attr.getForeground(), attr.getBackground(), eventValue ? attr.getStyle() | styleAttribute : attr.getStyle() & ~styleAttribute));
+ }
+ }
+
+ protected TextAttribute createTextAttribute(String colorID, String boldKey, String italicKey) {
+ Color color= null;
+ if (colorID != null) {
+ color= AutoconfEditor.getPreferenceColor(colorID);
+ }
+ IPreferenceStore store= AutotoolsPlugin.getDefault().getPreferenceStore();
+ int style= store.getBoolean(boldKey) ? SWT.BOLD : SWT.NORMAL;
+ if (store.getBoolean(italicKey)) {
+ style |= SWT.ITALIC;
+ }
+ return new TextAttribute(color, null, style);
+ }
+
+ /**
+ * Must be called after the constructor has been called.
+ */
+ public final void initialize() {
+
+ fPropertyNamesColor= getTokenProperties();
+ int length= fPropertyNamesColor.length;
+ fPropertyNamesBold= new String[length];
+ fPropertyNamesItalic= new String[length];
+
+ for (int i= 0; i < length; i++) {
+ fPropertyNamesBold[i]= fPropertyNamesColor[i] + AutotoolsEditorPreferenceConstants.EDITOR_BOLD_SUFFIX;
+ fPropertyNamesItalic[i]= fPropertyNamesColor[i] + AutotoolsEditorPreferenceConstants.EDITOR_ITALIC_SUFFIX;
+ addToken(fPropertyNamesColor[i], fPropertyNamesBold[i], fPropertyNamesItalic[i]);
+ }
+ }
+
+ /*
+ * @see ICharacterScanner#unread()
+ */
+ public void unread() {
+ --fOffset;
+ fColumn = UNDEFINED;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfDocumentProvider.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfDocumentProvider.java
new file mode 100644
index 0000000000..dd7c38c51d
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfDocumentProvider.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import java.util.Iterator;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.ui.editors.text.TextFileDocumentProvider;
+
+public class AutoconfDocumentProvider extends TextFileDocumentProvider {
+
+ @SuppressWarnings("unchecked")
+ public void shutdown() {
+ Iterator e= getConnectedElementsIterator();
+ while (e.hasNext())
+ disconnect(e.next());
+ }
+
+ public void connect(Object element) throws CoreException {
+ super.connect(element);
+ // Remove all error markers for file as we will parse
+ // from scratch.
+// AutoconfErrorHandler h = new AutoconfErrorHandler(getDocument(element));
+// h.removeAllExistingMarkers();
+ }
+
+ public IDocument getDocument(Object element) {
+ FileInfo info= (FileInfo) getFileInfo(element);
+ if (info != null)
+ return info.fTextFileBuffer.getDocument();
+ return getParentProvider().getDocument(element);
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfDocumentSetupParticipant.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfDocumentSetupParticipant.java
new file mode 100644
index 0000000000..a3d0b1b91d
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfDocumentSetupParticipant.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import org.eclipse.core.filebuffers.IDocumentSetupParticipant;
+import org.eclipse.jface.text.DocumentEvent;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentExtension3;
+import org.eclipse.jface.text.IDocumentListener;
+
+public class AutoconfDocumentSetupParticipant implements
+ IDocumentSetupParticipant, IDocumentListener {
+
+ public void setup(IDocument document) {
+ AutoconfPartitioner partitioner =
+ new AutoconfPartitioner(
+ new AutoconfPartitionScanner(),
+ AutoconfPartitionScanner.AUTOCONF_PARTITION_TYPES);
+ partitioner.connect(document, 1);
+ if (document instanceof IDocumentExtension3) {
+ IDocumentExtension3 extension3= (IDocumentExtension3) document;
+ extension3.setDocumentPartitioner(AutoconfEditor.AUTOCONF_PARTITIONING, partitioner);
+ } else {
+ document.setDocumentPartitioner(partitioner);
+ }
+// document.addDocumentListener(this);
+ }
+
+ /*
+ * @see IDocumentListener#documentAboutToBeChanged(DocumentEvent)
+ */
+
+ public void documentAboutToBeChanged(DocumentEvent e) {
+ // do nothing
+ }
+
+ /*
+ * @see IDocumentListener#documentChanged(DocumentEvent)
+ */
+ public void documentChanged(DocumentEvent e) {
+ // do nothing
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditor.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditor.java
new file mode 100644
index 0000000000..a65cb24ee1
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditor.java
@@ -0,0 +1,787 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import java.util.ResourceBundle;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.jface.text.AbstractInformationControlManager;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.DefaultInformationControl;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IInformationControl;
+import org.eclipse.jface.text.IInformationControlCreator;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextHover;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.ITextViewerExtension;
+import org.eclipse.jface.text.ITextViewerExtension2;
+import org.eclipse.jface.text.ITextViewerExtension4;
+import org.eclipse.jface.text.ITextViewerExtension5;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.TextUtilities;
+import org.eclipse.jface.text.information.IInformationProvider;
+import org.eclipse.jface.text.information.IInformationProviderExtension;
+import org.eclipse.jface.text.information.IInformationProviderExtension2;
+import org.eclipse.jface.text.information.InformationPresenter;
+import org.eclipse.jface.text.rules.RuleBasedScanner;
+import org.eclipse.jface.text.source.IAnnotationHover;
+import org.eclipse.jface.text.source.IAnnotationHoverExtension;
+import org.eclipse.jface.text.source.ILineRange;
+import org.eclipse.jface.text.source.IOverviewRuler;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.ISourceViewerExtension3;
+import org.eclipse.jface.text.source.IVerticalRuler;
+import org.eclipse.jface.text.source.IVerticalRulerInfo;
+import org.eclipse.jface.text.source.projection.ProjectionAnnotationModel;
+import org.eclipse.jface.text.source.projection.ProjectionSupport;
+import org.eclipse.jface.text.source.projection.ProjectionViewer;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsPlugin;
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.outline.AutoconfContentOutlinePage;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfMacroDetector;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfParser;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.IAutoconfMacroValidator;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.AutotoolsPropertyConstants;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.autoconf.ProjectionFileUpdater;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake.IReconcilingParticipant;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake.MakefileEditorPreferenceConstants;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.AutoconfEditorPreferencePage;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.AutotoolsEditorPreferenceConstants;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.ColorManager;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.properties.AutotoolsPropertyManager;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.properties.IProjectPropertyListener;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.editors.text.TextEditor;
+import org.eclipse.ui.texteditor.ChainedPreferenceStore;
+import org.eclipse.ui.texteditor.ContentAssistAction;
+import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
+import org.eclipse.ui.texteditor.ResourceAction;
+import org.eclipse.ui.texteditor.TextEditorAction;
+import org.eclipse.ui.texteditor.TextOperationAction;
+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
+
+
+public class AutoconfEditor extends TextEditor implements IAutotoolsEditor, IProjectPropertyListener {
+
+ public final static String AUTOCONF_PARTITIONING= "autoconf_partitioning"; //$NON-NLS-1$
+
+
+ private AutoconfPartitionScanner fPartitionScanner;
+ private RuleBasedScanner fCodeScanner;
+ private RuleBasedScanner fMacroCodeScanner;
+ private static AutoconfDocumentProvider fDocumentProvider;
+ private AutoconfElement rootElement;
+ private AutoconfContentOutlinePage outlinePage;
+ private AutoconfParser fParser;
+ private IEditorInput input;
+ private IProject fProject;
+
+ /** The information provider used to present focusable information shells. */
+ private InformationPresenter fInformationPresenter;
+ /**
+ * This editor's projection support
+ */
+
+ ProjectionSupport fProjectionSupport;
+ ProjectionFileUpdater fProjectionFileUpdater;
+
+ /**
+ * Reconciling listeners
+ */
+ private ListenerList fReconcilingListeners= new ListenerList(ListenerList.IDENTITY);
+
+
+ public AutoconfEditor() {
+ super();
+ }
+
+ /**
+ * Adapted source viewer for CEditor
+ */
+
+ public class AdaptedSourceViewer extends ProjectionViewer implements ITextViewerExtension {
+
+
+ public AdaptedSourceViewer(Composite parent, IVerticalRuler ruler,
+ IOverviewRuler overviewRuler, boolean showsAnnotation, int styles) {
+ super(parent, ruler, overviewRuler, showsAnnotation, styles);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.source.ISourceViewer#setRangeIndication(int, int, boolean)
+ */
+ public void setRangeIndication(int offset, int length, boolean moveCursor) {
+ // Fixin a bug in the ProjectViewer implemenation
+ // PR: https://bugs.eclipse.org/bugs/show_bug.cgi?id=72914
+ if (isProjectionMode()) {
+ super.setRangeIndication(offset, length, moveCursor);
+ } else {
+ super.setRangeIndication(offset, length, false);
+ }
+ }
+ }
+
+ protected void initializeEditor() {
+ super.initializeEditor();
+ setDocumentProvider(getAutoconfDocumentProvider());
+ IPreferenceStore[] stores = new IPreferenceStore[2];
+ stores[0] = AutotoolsPlugin.getDefault().getPreferenceStore();
+ stores[1] = EditorsUI.getPreferenceStore();
+ ChainedPreferenceStore chainedStore = new ChainedPreferenceStore(stores);
+ setPreferenceStore(chainedStore);
+ setSourceViewerConfiguration(new AutoconfSourceViewerConfiguration(chainedStore, this));
+ AutotoolsEditorPreferenceConstants.initializeDefaultValues(stores[0]);
+ AutoconfEditorPreferencePage.initDefaults(stores[0]);
+ }
+
+ public static AutoconfDocumentProvider getAutoconfDocumentProvider() {
+ if (fDocumentProvider == null)
+ fDocumentProvider= new AutoconfDocumentProvider();
+ return fDocumentProvider;
+ }
+
+ public AutoconfElement getRootElement() {
+ return rootElement;
+ }
+
+ public void setRootElement(AutoconfElement element) {
+ rootElement = element;
+ }
+
+ public ISourceViewer getViewer() {
+ return getSourceViewer();
+ }
+
+ protected IDocument getInputDocument()
+ {
+ IDocument document = getDocumentProvider().getDocument(input);
+ return document;
+ }
+
+ protected void doSetInput(IEditorInput newInput) throws CoreException
+ {
+ // If this editor is for a project file, remove this editor as a property
+ // change listener.
+ if (fProject != null)
+ AutotoolsPropertyManager.getDefault().removeProjectPropertyListener(fProject, this);
+ this.fProject = null;
+ super.doSetInput(newInput);
+ this.input = newInput;
+
+ if (input instanceof IFileEditorInput) {
+ IFile f = ((IFileEditorInput)input).getFile();
+ fProject = f.getProject();
+ // This is a project file. We want to be notified if the Autoconf editor
+ // properties are changed such that the macro versions are changed.
+ AutotoolsPropertyManager.getDefault().addProjectPropertyListener(fProject, this);
+ }
+ getOutlinePage().setInput(input);
+ try
+ {
+ IDocument document = getInputDocument();
+
+ setRootElement(reparseDocument(document, newInput));
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public Object getAdapter(Class required) {
+ if (ProjectionAnnotationModel.class.equals(required)) {
+ if (fProjectionSupport != null) {
+ Object result = fProjectionSupport.getAdapter(getSourceViewer(), required);
+ if (result != null) {
+ return result;
+ }
+ }
+ } else if (IContentOutlinePage.class.equals(required)) {
+ return getOutlinePage();
+ }
+ return super.getAdapter(required);
+ }
+
+
+ public AutoconfContentOutlinePage getOutlinePage() {
+ if (outlinePage == null) {
+ outlinePage= new AutoconfContentOutlinePage(this);
+ if (getEditorInput() != null)
+ outlinePage.setInput(getEditorInput());
+ }
+ return outlinePage;
+ }
+
+ /**
+ * Return a scanner for creating Autoconf partitions.
+ *
+ * @return a scanner for creating Autoconf partitions
+ */
+ public AutoconfParser getAutoconfParser() {
+ if (fParser == null) {
+ AutoconfErrorHandler errorHandler = new AutoconfErrorHandler(input);
+ IAutoconfMacroValidator macroValidator = new AutoconfEditorMacroValidator(this);
+ fParser = new AutoconfParser(errorHandler, new AutoconfMacroDetector(), macroValidator);
+ }
+ return fParser;
+ }
+
+ /**
+ * Return a scanner for creating Autoconf partitions.
+ *
+ * @return a scanner for creating Autoconf partitions
+ */
+ public AutoconfPartitionScanner getAutoconfPartitionScanner() {
+ if (fPartitionScanner == null)
+ fPartitionScanner= new AutoconfPartitionScanner();
+ return fPartitionScanner;
+ }
+
+ /**
+ * Returns the Autoconf code scanner.
+ *
+ * @return the Autoconf code scanner
+ */
+ public RuleBasedScanner getAutoconfCodeScanner() {
+ if (fCodeScanner == null)
+ fCodeScanner= new AutoconfCodeScanner();
+ return fCodeScanner;
+ }
+
+ /**
+ * Returns the Autoconf code scanner.
+ *
+ * @return the Autoconf code scanner
+ */
+ public RuleBasedScanner getAutoconfMacroCodeScanner() {
+ if (fMacroCodeScanner == null)
+ fMacroCodeScanner= new AutoconfMacroCodeScanner();
+ return fMacroCodeScanner;
+ }
+
+ /**
+ * Returns the preference color, identified by the given preference.
+ */
+ public static Color getPreferenceColor(String key) {
+ return ColorManager.getDefault().getColor(PreferenceConverter.getColor(AutotoolsPlugin.getDefault().getPreferenceStore(), key));
+ }
+
+ public void handleProjectPropertyChanged(IProject project, String property) {
+ if (property.equals(AutotoolsPropertyConstants.AUTOCONF_MACRO_VERSIONING)) {
+ ISourceViewer sourceViewer= getSourceViewer();
+ if (sourceViewer == null)
+ return;
+ handleVersionChange(sourceViewer);
+ }
+ }
+
+ /**
+ * Handle the case whereby the Autoconf or Automake macro versions to use
+ * for this project are changed in which case we want to invalidate and reparse
+ * the document.
+ *
+ * @param sourceViewer
+ */
+ protected void handleVersionChange(ISourceViewer sourceViewer) {
+ sourceViewer.invalidateTextPresentation();
+ try {
+ IDocument document = getInputDocument();
+
+ setRootElement(reparseDocument(document, getEditorInput()));
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ private AutoconfElement reparseDocument(IDocument document,
+ IEditorInput editorInput) {
+ AutoconfParser parser = getAutoconfParser();
+ ((AutoconfErrorHandler)parser.getErrorHandler()).removeAllExistingMarkers();
+ return parser.parse(document);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.texteditor.AbstractTextEditor#handlePreferenceStoreChanged(org.eclipse.jface.util.PropertyChangeEvent)
+ */
+ protected void handlePreferenceStoreChanged(PropertyChangeEvent event) {
+ ISourceViewer sourceViewer= getSourceViewer();
+ if (sourceViewer == null)
+ return;
+
+ String property = event.getProperty();
+
+ AutoconfCodeScanner scanner = (AutoconfCodeScanner)getAutoconfCodeScanner();
+ if (scanner != null) {
+ if (scanner.affectsBehavior(event)) {
+ scanner.adaptToPreferenceChange(event);
+ sourceViewer.invalidateTextPresentation();
+ }
+ }
+
+ if (AutotoolsEditorPreferenceConstants.AUTOCONF_VERSION.equals(property) ||
+ AutotoolsEditorPreferenceConstants.AUTOMAKE_VERSION.equals(property)) {
+ handleVersionChange(sourceViewer);
+ } else if (AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_ENABLED.equals(property)) {
+ if (sourceViewer instanceof ProjectionViewer) {
+ ProjectionViewer projectionViewer= (ProjectionViewer) sourceViewer;
+ if (fProjectionFileUpdater != null)
+ fProjectionFileUpdater.uninstall();
+ // either freshly enabled or provider changed
+ fProjectionFileUpdater= new ProjectionFileUpdater();
+ if (fProjectionFileUpdater != null) {
+ fProjectionFileUpdater.install(this, projectionViewer);
+ }
+ }
+ return;
+ }
+
+ super.handlePreferenceStoreChanged(event);
+ }
+
+ /**
+ * Information provider used to present focusable information shells.
+ *
+ * @since 3.1.1
+ */
+ private static final class InformationProvider implements IInformationProvider, IInformationProviderExtension, IInformationProviderExtension2 {
+
+ private IRegion fHoverRegion;
+ private Object fHoverInfo;
+ private IInformationControlCreator fControlCreator;
+
+ InformationProvider(IRegion hoverRegion, Object hoverInfo, IInformationControlCreator controlCreator) {
+ fHoverRegion= hoverRegion;
+ fHoverInfo= hoverInfo;
+ fControlCreator= controlCreator;
+ }
+ /*
+ * @see org.eclipse.jface.text.information.IInformationProvider#getSubject(org.eclipse.jface.text.ITextViewer, int)
+ */
+ public IRegion getSubject(ITextViewer textViewer, int invocationOffset) {
+ return fHoverRegion;
+ }
+ /*
+ * @see org.eclipse.jface.text.information.IInformationProvider#getInformation(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion)
+ */
+ public String getInformation(ITextViewer textViewer, IRegion subject) {
+ return fHoverInfo.toString();
+ }
+
+ /*
+ * @see org.eclipse.jface.text.information.IInformationProviderExtension#getInformation2(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion)
+ * @since 3.2
+ */
+ public Object getInformation2(ITextViewer textViewer, IRegion subject) {
+ return fHoverInfo;
+ }
+ /*
+ * @see org.eclipse.jface.text.information.IInformationProviderExtension2#getInformationPresenterControlCreator()
+ */
+ public IInformationControlCreator getInformationPresenterControlCreator() {
+ return fControlCreator;
+ }
+ }
+
+ /**
+ * This action behaves in two different ways: If there is no current text
+ * hover, the tooltip is displayed using information presenter. If there is
+ * a current text hover, it is converted into a information presenter in
+ * order to make it sticky.
+ * @since 3.1.1
+ */
+ class InformationDispatchAction extends TextEditorAction {
+
+ /** The wrapped text operation action. */
+ private final TextOperationAction fTextOperationAction;
+
+ /**
+ * Creates a dispatch action.
+ *
+ * @param resourceBundle the resource bundle
+ * @param prefix the prefix
+ * @param textOperationAction the text operation action
+ */
+ public InformationDispatchAction(ResourceBundle resourceBundle, String prefix, final TextOperationAction textOperationAction) {
+ super(resourceBundle, prefix, AutoconfEditor.this);
+ if (textOperationAction == null)
+ throw new IllegalArgumentException();
+ fTextOperationAction= textOperationAction;
+ }
+
+ /*
+ * @see org.eclipse.jface.action.IAction#run()
+ */
+ public void run() {
+
+ ISourceViewer sourceViewer= getSourceViewer();
+ if (sourceViewer == null) {
+ fTextOperationAction.run();
+ return;
+ }
+
+ if (sourceViewer instanceof ITextViewerExtension4) {
+ ITextViewerExtension4 extension4= (ITextViewerExtension4) sourceViewer;
+ if (extension4.moveFocusToWidgetToken())
+ return;
+ }
+
+ if (sourceViewer instanceof ITextViewerExtension2) {
+ // does a text hover exist?
+ ITextHover textHover= ((ITextViewerExtension2) sourceViewer).getCurrentTextHover();
+ if (textHover != null && makeTextHoverFocusable(sourceViewer, textHover))
+ return;
+ }
+
+ if (sourceViewer instanceof ISourceViewerExtension3) {
+ // does an annotation hover exist?
+ IAnnotationHover annotationHover= ((ISourceViewerExtension3) sourceViewer).getCurrentAnnotationHover();
+ if (annotationHover != null && makeAnnotationHoverFocusable(sourceViewer, annotationHover))
+ return;
+ }
+
+ // otherwise, just display the tooltip
+ //fTextOperationAction.run();
+ }
+
+ /**
+ * Tries to make a text hover focusable (or "sticky").
+ *
+ * @param sourceViewer the source viewer to display the hover over
+ * @param textHover the hover to make focusable
+ * @return <code>true</code> if successful, <code>false</code> otherwise
+ */
+ @SuppressWarnings("deprecation")
+ private boolean makeTextHoverFocusable(ISourceViewer sourceViewer, ITextHover textHover) {
+ Point hoverEventLocation= ((ITextViewerExtension2) sourceViewer).getHoverEventLocation();
+ int offset= computeOffsetAtLocation(sourceViewer, hoverEventLocation.x, hoverEventLocation.y);
+ if (offset == -1)
+ return false;
+
+ try {
+ IRegion hoverRegion= textHover.getHoverRegion(sourceViewer, offset);
+ if (hoverRegion == null)
+ return false;
+
+ String hoverInfo= textHover.getHoverInfo(sourceViewer, hoverRegion);
+
+ IInformationControlCreator controlCreator= null;
+ if (textHover instanceof IInformationProviderExtension2)
+ controlCreator= ((IInformationProviderExtension2)textHover).getInformationPresenterControlCreator();
+
+ IInformationProvider informationProvider= new InformationProvider(hoverRegion, hoverInfo, controlCreator);
+
+ fInformationPresenter.setOffset(offset);
+ fInformationPresenter.setAnchor(AbstractInformationControlManager.ANCHOR_BOTTOM);
+ fInformationPresenter.setMargins(6, 6); // default values from AbstractInformationControlManager
+ String contentType= TextUtilities.getContentType(sourceViewer.getDocument(), AutoconfPartitionScanner.AUTOCONF_MACRO, offset, true);
+ fInformationPresenter.setInformationProvider(informationProvider, contentType);
+ fInformationPresenter.showInformation();
+
+ return true;
+
+ } catch (BadLocationException e) {
+ return false;
+ }
+ }
+
+ /**
+ * Tries to make an annotation hover focusable (or "sticky").
+ *
+ * @param sourceViewer the source viewer to display the hover over
+ * @param annotationHover the hover to make focusable
+ * @return <code>true</code> if successful, <code>false</code> otherwise
+ */
+ private boolean makeAnnotationHoverFocusable(ISourceViewer sourceViewer, IAnnotationHover annotationHover) {
+ IVerticalRulerInfo info= getVerticalRuler();
+ int line= info.getLineOfLastMouseButtonActivity();
+ if (line == -1)
+ return false;
+
+ try {
+
+ // compute the hover information
+ Object hoverInfo;
+ if (annotationHover instanceof IAnnotationHoverExtension) {
+ IAnnotationHoverExtension extension= (IAnnotationHoverExtension) annotationHover;
+ ILineRange hoverLineRange= extension.getHoverLineRange(sourceViewer, line);
+ if (hoverLineRange == null)
+ return false;
+ final int maxVisibleLines= Integer.MAX_VALUE; // allow any number of lines being displayed, as we support scrolling
+ hoverInfo= extension.getHoverInfo(sourceViewer, hoverLineRange, maxVisibleLines);
+ } else {
+ hoverInfo= annotationHover.getHoverInfo(sourceViewer, line);
+ }
+
+ // hover region: the beginning of the concerned line to place the control right over the line
+ IDocument document= sourceViewer.getDocument();
+ int offset= document.getLineOffset(line);
+ String contentType= TextUtilities.getContentType(document, AutoconfPartitionScanner.AUTOCONF_MACRO, offset, true);
+
+ IInformationControlCreator controlCreator= null;
+
+// /*
+// * XXX: This is a hack to avoid API changes at the end of 3.2,
+// * and should be fixed for 3.3, see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=137967
+// */
+// if ("org.eclipse.jface.text.source.projection.ProjectionAnnotationHover".equals(annotationHover.getClass().getName())) { //$NON-NLS-1$
+// controlCreator= new IInformationControlCreator() {
+// public IInformationControl createInformationControl(Shell shell) {
+// int shellStyle= SWT.RESIZE | SWT.TOOL | getOrientation();
+// int style= SWT.V_SCROLL | SWT.H_SCROLL;
+// return new SourceViewerInformationControl(shell, shellStyle, style);
+// }
+// };
+//
+// } else {
+ if (annotationHover instanceof IInformationProviderExtension2)
+ controlCreator= ((IInformationProviderExtension2) annotationHover).getInformationPresenterControlCreator();
+ else if (annotationHover instanceof IAnnotationHoverExtension)
+ controlCreator= ((IAnnotationHoverExtension) annotationHover).getHoverControlCreator();
+// }
+
+ IInformationProvider informationProvider= new InformationProvider(new Region(offset, 0), hoverInfo, controlCreator);
+
+ fInformationPresenter.setOffset(offset);
+ fInformationPresenter.setAnchor(AbstractInformationControlManager.ANCHOR_RIGHT);
+ fInformationPresenter.setMargins(4, 0); // AnnotationBarHoverManager sets (5,0), minus SourceViewer.GAP_SIZE_1
+ fInformationPresenter.setInformationProvider(informationProvider, contentType);
+ fInformationPresenter.showInformation();
+
+ return true;
+
+ } catch (BadLocationException e) {
+ return false;
+ }
+ }
+
+ // modified version from TextViewer
+ private int computeOffsetAtLocation(ITextViewer textViewer, int x, int y) {
+
+ StyledText styledText= textViewer.getTextWidget();
+ IDocument document= textViewer.getDocument();
+
+ if (document == null)
+ return -1;
+
+ try {
+ int widgetOffset= styledText.getOffsetAtLocation(new Point(x, y));
+ Point p= styledText.getLocationAtOffset(widgetOffset);
+ if (p.x > x)
+ widgetOffset--;
+
+ if (textViewer instanceof ITextViewerExtension5) {
+ ITextViewerExtension5 extension= (ITextViewerExtension5) textViewer;
+ return extension.widgetOffset2ModelOffset(widgetOffset);
+ } else {
+ IRegion visibleRegion= textViewer.getVisibleRegion();
+ return widgetOffset + visibleRegion.getOffset();
+ }
+ } catch (IllegalArgumentException e) {
+ return -1;
+ }
+
+ }
+ }
+
+ /**
+ * Adds the given listener.
+ * Has no effect if an identical listener was not already registered.
+ *
+ * @param listener The reconcile listener to be added
+ */
+ public final void addReconcilingParticipant(IReconcilingParticipant listener) {
+ synchronized (fReconcilingListeners) {
+ fReconcilingListeners.add(listener);
+ }
+ }
+
+ /**
+ * Removes the given listener.
+ * Has no effect if an identical listener was not already registered.
+ *
+ * @param listener the reconcile listener to be removed
+ */
+ final void removeReconcilingParticipant(IReconcilingParticipant listener) {
+ synchronized (fReconcilingListeners) {
+ fReconcilingListeners.remove(listener);
+ }
+ }
+
+ /*
+ */
+ public void reconciled() {
+ // Notify listeners
+ Object[] listeners = fReconcilingListeners.getListeners();
+ for (int i = 0, length= listeners.length; i < length; ++i) {
+ ((IReconcilingParticipant)listeners[i]).reconciled();
+ }
+ }
+
+ /**
+ * Determines is folding enabled.
+ * @return <code>true</code> if folding is enabled, <code>false</code> otherwise.
+ */
+ boolean isFoldingEnabled() {
+ return AutotoolsPlugin.getDefault().getPreferenceStore().getBoolean(MakefileEditorPreferenceConstants.EDITOR_FOLDING_ENABLED);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.editors.text.TextEditor#initializeKeyBindingScopes()
+ */
+ protected void initializeKeyBindingScopes() {
+ setKeyBindingScopes(new String [] { AutotoolsUIPlugin.getUniqueIdentifier() + ".editor.scope" } ); //$NON-NLS-1$
+ }
+
+
+ /**
+ * @see org.eclipse.ui.texteditor.AbstractTextEditor#createActions()
+ */
+ protected void createActions() {
+ super.createActions();
+ // TODO: Figure out how to do this later.
+// fFoldingGroup= new FoldingActionGroup(this, getSourceViewer());
+
+ // Sticky hover support
+ ResourceAction resAction= new TextOperationAction(AutoconfEditorMessages.getResourceBundle(), "ShowToolTip.", this, ISourceViewer.INFORMATION, true); //$NON-NLS-1$
+ resAction= new InformationDispatchAction(AutoconfEditorMessages.getResourceBundle(), "ShowToolTip.", (TextOperationAction) resAction); //$NON-NLS-1$
+ resAction.setActionDefinitionId(IAutotoolEditorActionDefinitionIds.SHOW_TOOLTIP);
+ setAction("ShowToolTip", resAction); //$NON-NLS-1$
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(resAction, IAutotoolHelpContextIds.SHOW_TOOLTIP_ACTION);
+
+ // Content assist
+ Action action = new ContentAssistAction(AutoconfEditorMessages.getResourceBundle(), "ContentAssistProposal.", this); //$NON-NLS-1$
+ action.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
+ setAction("ContentAssistProposal", action); //$NON-NLS-1$
+ markAsStateDependentAction("ContentAssistProposal", true); //$NON-NLS-1$
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(action, IAutotoolHelpContextIds.CONTENT_ASSIST);
+ }
+
+ /**
+ * The <code>AbstractTextEditor</code> implementation of this
+ * <code>IWorkbenchPart</code> method creates the vertical ruler and
+ * source viewer. Subclasses may extend.
+ *
+ * We attach our own mouseDown listener on the menu bar,
+ * and our own listener for cursor/key/selection events to update cursor position in
+ * status bar.
+
+ * @param parent Parent composite of the control.
+ */
+ public void createPartControl(Composite parent) {
+ super.createPartControl(parent);
+
+ // Sticky hover support
+ IInformationControlCreator informationControlCreator= new IInformationControlCreator() {
+ public IInformationControl createInformationControl(Shell shell) {
+ return new DefaultInformationControl(shell, true);
+ }
+ };
+
+ fInformationPresenter= new InformationPresenter(informationControlCreator);
+ fInformationPresenter.setSizeConstraints(60, 10, true, true);
+ fInformationPresenter.install(getSourceViewer());
+ fInformationPresenter.setDocumentPartitioning(AutoconfPartitionScanner.AUTOCONF_MACRO);
+
+ ProjectionViewer projectionViewer= (ProjectionViewer) getSourceViewer();
+
+ fProjectionSupport= new ProjectionSupport(projectionViewer, getAnnotationAccess(), getSharedColors());
+ fProjectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.error"); //$NON-NLS-1$
+ fProjectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.warning"); //$NON-NLS-1$
+ fProjectionSupport.install();
+
+ if (isFoldingEnabled())
+ projectionViewer.doOperation(ProjectionViewer.TOGGLE);
+
+ fProjectionFileUpdater= new ProjectionFileUpdater();
+ if (fProjectionFileUpdater != null) {
+ fProjectionFileUpdater.install(this, projectionViewer);
+ fProjectionFileUpdater.initialize();
+ }
+
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IAutotoolHelpContextIds.AC_EDITOR_VIEW);
+
+ // TODO: Do we need the following two lines?
+// fEditorSelectionChangedListener= new EditorSelectionChangedListener();
+// fEditorSelectionChangedListener.install(getSelectionProvider());
+ }
+
+ protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
+ ISourceViewer viewer = new AdaptedSourceViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles);
+
+ // ensure decoration support has been created and configured.
+ getSourceViewerDecorationSupport(viewer);
+
+ return viewer;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPart#dispose()
+ */
+ public void dispose() {
+ if (fProjectionFileUpdater != null) {
+ fProjectionFileUpdater.uninstall();
+ fProjectionFileUpdater= null;
+ }
+ if (fProject != null) {
+ AutotoolsPropertyManager.getDefault().removeProjectPropertyListener(fProject, this);
+ }
+ super.dispose();
+ }
+
+ /*
+ * @see org.eclipse.ui.texteditor.AbstractTextEditor#performRevert()
+ */
+ protected void performRevert() {
+ ProjectionViewer projectionViewer= (ProjectionViewer) getSourceViewer();
+ projectionViewer.setRedraw(false);
+ try {
+
+ boolean projectionMode= projectionViewer.isProjectionMode();
+ if (projectionMode) {
+ projectionViewer.disableProjection();
+ if (fProjectionFileUpdater != null)
+ fProjectionFileUpdater.uninstall();
+ }
+
+ super.performRevert();
+
+ if (projectionMode) {
+ if (fProjectionFileUpdater != null)
+ fProjectionFileUpdater.install(this, projectionViewer);
+ projectionViewer.enableProjection();
+ }
+
+ } finally {
+ projectionViewer.setRedraw(true);
+ }
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditorMacroValidator.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditorMacroValidator.java
new file mode 100644
index 0000000000..bae46a945f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditorMacroValidator.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat Corporation, (c) 2008 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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
+ * Ed Swartz (Nokia) - refactoring
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsPlugin;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfMacroElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.IAutoconfMacroValidator;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.ParseException;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.AutotoolsEditorPreferenceConstants;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.text.hover.AutoconfPrototype;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.text.hover.AutoconfTextHover;
+
+
+/**
+ * Validate a macro call by checking against the stored macro prototypes
+ */
+public class AutoconfEditorMacroValidator implements IAutoconfMacroValidator {
+ public final String AUTOCONF_MACRO_ARGS_TOO_FEW = "AutoconfMacroArgsTooFew"; //$NON-NLS-1$
+ public final String AUTOCONF_MACRO_ARGS_TOO_MANY = "AutoconfMacroArgsTooMany"; //$NON-NLS-1$
+
+ private AutoconfEditor fEditor;
+
+ public AutoconfEditorMacroValidator(AutoconfEditor autoconfEditor) {
+ fEditor = autoconfEditor;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.IAutoconfMacroValidator#validateMacroCall(org.eclipse.linuxtools.cdt.autotools.core.ui.editors.parser.AutoconfMacroElement)
+ */
+ public void validateMacroCall(AutoconfMacroElement macro)
+ throws ParseException {
+ AutoconfPrototype p = AutoconfTextHover.getPrototype(macro.getName(), fEditor);
+ if (p != null) {
+ boolean tooFew = false;
+ boolean tooMany = false;
+ boolean justRight = false;
+ int parms = macro.getParameterCount();
+ int numPrototypes = p.getNumPrototypes();
+ int minParms = 0;
+ int maxParms = 0;
+ for (int i = 0; i < numPrototypes; ++i) {
+ if (parms < p.getMinParms(i)) {
+ tooFew = true;
+ minParms = p.getMinParms(i);
+ } else if (parms > p.getMaxParms(i)) {
+ tooMany = true;
+ maxParms = p.getMaxParms(i);
+ } else {
+ justRight = true;
+ break;
+ }
+ }
+
+ int length = macro.getEndOffset() - macro.getStartOffset();
+ int start = macro.getStartOffset();
+ int end = macro.getEndOffset();
+ int lineNumber = 0;
+ try {
+ lineNumber = macro.getDocument().getLineOfOffset(start);
+ } catch (BadLocationException e) {
+
+ }
+
+ if (!justRight) {
+ if (tooFew) {
+ String formatString = AutoconfEditorMessages.getFormattedString(AUTOCONF_MACRO_ARGS_TOO_FEW,
+ AutotoolsPlugin.getDefault().getPreferenceStore().getString(AutotoolsEditorPreferenceConstants.AUTOCONF_VERSION),
+ p.getName(), Integer.toString(minParms));
+ throw new ParseException(
+ formatString,
+ start, end,
+ lineNumber, 0, length,
+ IMarker.SEVERITY_WARNING);
+ } else if (tooMany) {
+ String formatString = AutoconfEditorMessages.getFormattedString(AUTOCONF_MACRO_ARGS_TOO_MANY,
+ AutotoolsPlugin.getDefault().getPreferenceStore().getString(AutotoolsEditorPreferenceConstants.AUTOCONF_VERSION),
+ p.getName(), Integer.toString(maxParms));
+ throw new ParseException(
+ formatString,
+ start, end,
+ lineNumber, 0, length,
+ IMarker.SEVERITY_WARNING);
+ }
+ }
+ }
+
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditorMessages.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditorMessages.java
new file mode 100644
index 0000000000..d1f6f14e3d
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditorMessages.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+
+/**
+ * AutoconfEditorMessages
+ */
+public class AutoconfEditorMessages {
+
+ private static final String RESOURCE_BUNDLE= AutoconfEditorMessages.class.getName();
+
+ private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
+
+ private AutoconfEditorMessages() {
+ }
+
+ public static ResourceBundle getResourceBundle() {
+ return fgResourceBundle;
+ }
+
+ public static String getString(String key) {
+ try {
+ return fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+ }
+ }
+ /**
+ * Gets a string from the resource bundle and formats it with the argument
+ *
+ * @param key the string used to get the bundle value, must not be null
+ * @since 3.0
+ */
+ public static String getFormattedString(String key, Object arg) {
+ String format= null;
+ try {
+ format= fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+ }
+ if (arg == null)
+ arg= ""; //$NON-NLS-1$
+ return MessageFormat.format(format, new Object[] { arg });
+ }
+ /**
+ * Gets a string from the resource bundle and formats it with the arguments
+ *
+ * @param key the string used to get the bundle value, must not be null
+ * @since 3.0
+ */
+ public static String getFormattedString(String key, Object arg1, Object arg2) {
+ String format= null;
+ try {
+ format= fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+ }
+ if (arg1 == null)
+ arg1= ""; //$NON-NLS-1$
+ if (arg2 == null)
+ arg2= ""; //$NON-NLS-1$
+ return MessageFormat.format(format, new Object[] { arg1, arg2 });
+ }
+
+ /**
+ * Gets a string from the resource bundle and formats it with the arguments
+ *
+ * @param key the string used to get the bundle value, must not be null
+ * @since 3.0
+ */
+ public static String getFormattedString(String key, Object arg1, Object arg2, Object arg3) {
+ String format= null;
+ try {
+ format= fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+ }
+ if (arg1 == null)
+ arg1= ""; //$NON-NLS-1$
+ if (arg2 == null)
+ arg2= ""; //$NON-NLS-1$
+ if (arg3 == null)
+ arg3= ""; //$NON-NLS-1$
+ return MessageFormat.format(format, new Object[] { arg1, arg2, arg3 });
+ }
+
+ /**
+ * Gets a string from the resource bundle and formats it with the argument
+ *
+ * @param key the string used to get the bundle value, must not be null
+ * @since 3.0
+ */
+ public static String getFormattedString(String key, boolean arg) {
+ String format= null;
+ try {
+ format= fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+ }
+ return MessageFormat.format(format, new Object[] { new Boolean(arg) });
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditorMessages.properties b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditorMessages.properties
new file mode 100644
index 0000000000..692d0649fb
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditorMessages.properties
@@ -0,0 +1,47 @@
+#################################################################################
+# Copyright (c) 2007 Red Hat, Inc., (c) 2008 Nokia 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
+# Nokia Inc - refactoring
+#################################################################################
+UnmatchedRightParenthesis=Unmatched right parenthesis
+UnmatchedLeftParenthesis=Unmatched left parenthesis
+UnmatchedRightQuote=Unmatched right quote, expected {0}
+UnmatchedLeftQuote=Unmatched left quote, expected {0}
+UnmatchedCloseComment=Unmatched end of comment, expected {0}
+UnterminatedString=Unterminated string, expected {0}
+
+AutoconfMacroArgsTooFew=The autoconf version {0} definition of macro "{1}" requires at least {2} arguments
+AutoconfMacroArgsTooMany=The autoconf version {0} definition of macro "{1}" may have a maximum of {2} arguments
+M4MacroArgsTooFew=The m4 macro "{0}" requires at least {1} arguments
+M4MacroArgsTooMany=The m4 macro "{0}" may have a maximum of {1} arguments
+MissingSpecifier=Missing "{0}" specifier
+InvalidSpecifier=The specifier "{0}" should be separated from condition by semicolon or newline
+InvalidTermination=The specifier "{0}" should appear after semicolon or newline
+UnterminatedConstruct=This "{0}" construct is unterminated
+MissingCondition=Missing condition for {0} specifier
+InvalidElif=The "elif" keyword should appear in an "if" or "elif" construct
+InvalidElse=The "else" keyword should appear in an "if" or "elif" construct
+InvalidFi=The "fi" keyword should terminate an "if", "elif", or "else" construct
+InvalidEsac=The "esac" keyword should terminate a "case" statement
+InvalidDone=The "done" keyword should terminate a "for", "while", "until", or "select" statement
+InvalidDo=The "do" keyword should appear in a "for", "while", "until", or "select" statement
+InvalidThen=The "then" keyword should appear in an "if" or "elif" statement
+InvalidIn=The "in" keyword should appear in a "case" statement
+UnterminatedCaseCondition=Case condition is not terminated before "esac" keyword
+ImproperCaseCondition=Case condition expected to end with ")"
+UnterminatedInlineDocument=Inline document started with "<<" is unterminated
+IncompleteInlineMarker=Inline document marker has incomplete quote
+MissingInlineMarker=Inline document specification is missing end marker
+AutoconfAnnotationHover.multipleMarkers=Multiple markers at this line
+
+ShowToolTip.label=Show T&ooltip Description
+ContentAssistProposal.label=Co&ntent Assist
+ContentAssistProposal.tooltip=Content Assist
+ContentAssistProposal.description=Content Assist
+
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfErrorHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfErrorHandler.java
new file mode 100644
index 0000000000..14ea7f8d97
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfErrorHandler.java
@@ -0,0 +1,213 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.cdt.core.model.ICModelMarker;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.AnnotationModel;
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.IAutoconfErrorHandler;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.ParseException;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.texteditor.MarkerAnnotation;
+import org.eclipse.ui.texteditor.MarkerUtilities;
+
+
+public class AutoconfErrorHandler implements IAutoconfErrorHandler {
+
+ public static final String PARSE_ERROR_MARKER_ID = AutotoolsUIPlugin.PLUGIN_ID
+ + ".parsefileerror"; //$NON-NLS-1$
+
+ private Map<Position, MarkerAnnotation> annotations = new HashMap<Position, MarkerAnnotation>();
+ private AnnotationModel fAnnotationModel;
+
+ public AutoconfErrorHandler(IEditorInput input) {
+ this.fAnnotationModel = (AnnotationModel)AutoconfEditor.getAutoconfDocumentProvider().getAnnotationModel(input);
+ }
+
+ private class AutoconfMarker implements IMarker {
+ private Map<String, Object> attributes;
+ private String type;
+ private long id;
+
+ public void delete() throws CoreException {
+ // TODO Auto-generated method stub
+
+ }
+ public boolean equals(Object obj) {
+ // TODO Auto-generated method stub
+ return super.equals(obj);
+ }
+ public boolean exists() {
+ // TODO Auto-generated method stub
+ return true;
+ }
+ @SuppressWarnings("unchecked")
+ public Object getAdapter(Class adapter) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+ public Object getAttribute(String attributeName) throws CoreException {
+ return attributes.get(attributeName);
+ }
+ public boolean getAttribute(String attributeName, boolean defaultValue) {
+ Object o = attributes.get(attributeName);
+ if (o != null && o instanceof Boolean)
+ return ((Boolean)o).booleanValue();
+ return defaultValue;
+ }
+ public int getAttribute(String attributeName, int defaultValue) {
+ Object o = attributes.get(attributeName);
+ if (o != null && o instanceof Integer)
+ return ((Integer)o).intValue();
+ return defaultValue;
+ }
+ public String getAttribute(String attributeName, String defaultValue) {
+ Object o = attributes.get(attributeName);
+ if (o != null && o instanceof String)
+ return (String)o;
+ return defaultValue;
+ }
+ public Map<String, Object> getAttributes() throws CoreException {
+ return attributes;
+ }
+ public Object[] getAttributes(String[] attributeNames)
+ throws CoreException {
+ Collection<Object> c = attributes.values();
+ return c.toArray();
+ }
+ public long getCreationTime() throws CoreException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+ public long getId() {
+ return id;
+ }
+ public IResource getResource() {
+ return null;
+ }
+ public String getType() throws CoreException {
+ return type;
+ }
+ public boolean isSubtypeOf(String superType) throws CoreException {
+ if (superType.equals(type))
+ return true;
+ return false;
+ }
+ public void setAttribute(String attributeName, boolean value)
+ throws CoreException {
+ Boolean b = new Boolean(value);
+ attributes.put(attributeName, b);
+ }
+ public void setAttribute(String attributeName, int value)
+ throws CoreException {
+ Integer i = new Integer(value);
+ attributes.put(attributeName, i);
+ }
+ public void setAttribute(String attributeName, Object value)
+ throws CoreException {
+ attributes.put(attributeName, value);
+ }
+ @SuppressWarnings("unchecked")
+ public void setAttributes(Map map) throws CoreException {
+ attributes.putAll(map);
+ }
+ public void setAttributes(String[] attributeNames, Object[] values)
+ throws CoreException {
+ for (int i = 0; i < attributeNames.length; ++i) {
+ attributes.put(attributeNames[i], values[i]);
+ }
+ }
+ protected Object clone() throws CloneNotSupportedException {
+ // TODO Auto-generated method stub
+ return super.clone();
+ }
+ public AutoconfMarker(String type, long id) {
+ this.type = type;
+ this.id = id;
+ this.attributes = new HashMap<String, Object>();
+ }
+ }
+ private IMarker createMarker(Map<String, Object> attributes, String markerType) throws CoreException {
+ IMarker marker= new AutoconfMarker(markerType, -1);
+ marker.setAttributes(attributes);
+ return marker;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.cdt.autotools.ui.editors.IAutoconfErrorHandler#handleError(org.eclipse.linuxtools.cdt.autotools.core.ui.editors.parser.ParseException)
+ */
+ public void handleError(ParseException e) {
+
+ int lineNumber = e.getLineNumber();
+
+ Map<String, Object> map = new HashMap<String, Object>();
+ MarkerUtilities.setLineNumber(map, lineNumber);
+ MarkerUtilities.setMessage(map, e.getMessage());
+ map.put(IMarker.MESSAGE, e.getMessage());
+ map.put(IMarker.LOCATION, Integer.valueOf(lineNumber));
+
+ Integer charStart = new Integer(e.getStartOffset());
+ if (charStart != null) {
+ map.put(IMarker.CHAR_START, charStart);
+ }
+ Integer charEnd = new Integer(e.getEndOffset());
+ if (charEnd != null) {
+ map.put(IMarker.CHAR_END, charEnd);
+ }
+
+ // FIXME: add severity level
+ map.put(IMarker.SEVERITY, new Integer(e.getSeverity()));
+
+ try {
+ IMarker marker = createMarker(map, ICModelMarker.C_MODEL_PROBLEM_MARKER);
+
+ MarkerAnnotation annotation = new MarkerAnnotation(marker);
+ Position p = new Position(charStart.intValue(),charEnd.intValue() - charStart.intValue());
+ fAnnotationModel.addAnnotation(annotation, p);
+ annotations.put(p, annotation);
+ } catch (CoreException ce) {
+ // do nothing
+ }
+ return;
+ }
+
+ public void removeAllExistingMarkers()
+ {
+ fAnnotationModel.removeAllAnnotations();
+ annotations.clear();
+ }
+
+ @SuppressWarnings("unchecked")
+ public void removeExistingMarkers(int offset, int length)
+ {
+ Iterator i = fAnnotationModel.getAnnotationIterator();
+ while (i.hasNext()) {
+ Annotation annotation = (Annotation)i.next();
+ Position p = fAnnotationModel.getPosition(annotation);
+ int pStart = p.getOffset();
+ if (pStart >= offset && pStart < (offset + length)) {
+ // Remove directly from model instead of using
+ // iterator so position will be removed from document.
+ fAnnotationModel.removeAnnotation(annotation);
+ }
+ }
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfIdentifierRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfIdentifierRule.java
new file mode 100644
index 0000000000..4306541d85
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfIdentifierRule.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 20009 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.text.rules.ICharacterScanner;
+import org.eclipse.jface.text.rules.IPredicateRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.Token;
+
+public class AutoconfIdentifierRule implements IPredicateRule {
+
+ private IToken fToken;
+ private String fExtraChars = "_${@"; //$NON-NLS-1$
+
+ public AutoconfIdentifierRule(IToken token) {
+ Assert.isNotNull(token);
+ fToken = token;
+ }
+
+ public IToken getSuccessToken() {
+ return fToken;
+ }
+
+ /*
+ * @see IRule#evaluate(ICharacterScanner)
+ */
+ public IToken evaluate(ICharacterScanner scanner) {
+ return evaluate(scanner, false);
+ }
+
+ /*
+ * @see IPredicateRule#evaluate(ICharacterScanner, resume)
+ */
+ public IToken evaluate(ICharacterScanner scanner, boolean resume) {
+ int c = scanner.read();
+ if (Character.isLetterOrDigit((char)c) || fExtraChars.indexOf((char)c) >= 0) {
+ do {
+ c = scanner.read();
+ } while (Character.isLetterOrDigit((char)c) || fExtraChars.indexOf((char)c) >= 0);
+ scanner.unread();
+ return fToken;
+ }
+ scanner.unread();
+ return Token.UNDEFINED;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfKeywordDetector.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfKeywordDetector.java
new file mode 100644
index 0000000000..4007042879
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfKeywordDetector.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2006 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import org.eclipse.jface.text.rules.IWordDetector;
+
+public class AutoconfKeywordDetector implements IWordDetector {
+
+ /**
+ * @see IWordDetector#isWordPart(character)
+ */
+ public boolean isWordPart(char character) {
+ return (Character.isLetter(character) && Character.isLowerCase(character));
+ }
+
+ /**
+ * @see IWordDetector#isWordStart(char)
+ */
+ public boolean isWordStart(char character) {
+ return (Character.isLetter(character) && Character.isLowerCase(character));
+ }
+
+}
+
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfM4WordDetector.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfM4WordDetector.java
new file mode 100644
index 0000000000..2d4059da14
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfM4WordDetector.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2006 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import org.eclipse.jface.text.rules.IWordDetector;
+
+public class AutoconfM4WordDetector implements IWordDetector {
+
+ public boolean isWordPart(char c) {
+ // TODO Auto-generated method stub
+ return (Character.isLetter(c) ||
+ Character.isDigit(c) || c == '_');
+ }
+
+ public boolean isWordStart(char c) {
+ // TODO Auto-generated method stub
+ return (c == 'm');
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacro.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacro.java
new file mode 100644
index 0000000000..ced0c8844b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacro.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+public class AutoconfMacro implements Comparable<Object> {
+ protected String name;
+ protected String parms;
+
+ public AutoconfMacro(String name, String parms) {
+ this.name = name;
+ this.parms = parms;
+ }
+ public String getName() {
+ return name;
+ }
+ public String getTemplate() {
+ return name + (hasParms() ? "()" : ""); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ public String getParms() {
+ return parms;
+ }
+ public boolean hasParms() {
+ return (parms.length() > 0);
+ }
+ public int compareTo (Object x) {
+ AutoconfMacro y = (AutoconfMacro)x;
+ return getName().compareTo(y.getName());
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroCodeScanner.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroCodeScanner.java
new file mode 100644
index 0000000000..f0a088b627
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroCodeScanner.java
@@ -0,0 +1,277 @@
+/*******************************************************************************
+ * Copyright (c) 2006 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.StringConverter;
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.RuleBasedScanner;
+import org.eclipse.jface.text.rules.SingleLineRule;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.jface.text.rules.WhitespaceRule;
+import org.eclipse.jface.text.rules.WordRule;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsPlugin;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.AutotoolsEditorPreferenceConstants;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.ColorManager;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+
+
+public class AutoconfMacroCodeScanner extends RuleBasedScanner {
+
+ private Map<String, IToken> fTokenMap= new HashMap<String, IToken>();
+ private String[] fPropertyNamesColor;
+
+ private int quoteLevel;
+
+ /**
+ * Preference keys for boolean preferences which are <code>true</code>,
+ * iff the corresponding token should be rendered bold.
+ */
+ private String[] fPropertyNamesBold;
+ /**
+ * Preference keys for boolean preferences which are <code>true</code>,
+ * iff the corresponding token should be rendered italic.
+ */
+ private String[] fPropertyNamesItalic;
+
+ private static String[] keywords = {
+ "case", "do", "done", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ "esac", "if", "elif", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ "else", "fi", "for", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ "in", "then" }; //$NON-NLS-1$ //$NON-NLS-2$
+
+ public static final String[] fTokenProperties = new String[] {
+ ColorManager.AUTOCONF_COMMENT_COLOR,
+ ColorManager.AUTOCONF_KEYWORD_COLOR,
+ ColorManager.AUTOCONF_ACMACRO_COLOR,
+ ColorManager.AUTOCONF_AMMACRO_COLOR,
+ ColorManager.AUTOCONF_VAR_REF_COLOR,
+ ColorManager.AUTOCONF_VAR_SET_COLOR,
+ ColorManager.AUTOCONF_CODESEQ_COLOR,
+ ColorManager.AUTOCONF_DEFAULT_COLOR,
+ };
+
+ public AutoconfMacroCodeScanner() {
+
+ initialize();
+
+ IToken other= getToken(ColorManager.AUTOCONF_DEFAULT_COLOR);
+ IToken keyword = getToken(ColorManager.AUTOCONF_KEYWORD_COLOR);
+ IToken comment= getToken(ColorManager.AUTOCONF_COMMENT_COLOR);
+ IToken string = getToken(ColorManager.AUTOCONF_DEFAULT_COLOR);
+ IToken varRef = getToken(ColorManager.AUTOCONF_VAR_REF_COLOR);
+ IToken acmacro = getToken(ColorManager.AUTOCONF_ACMACRO_COLOR);
+ IToken ammacro = getToken(ColorManager.AUTOCONF_AMMACRO_COLOR);
+ IToken code = getToken(ColorManager.AUTOCONF_CODESEQ_COLOR);
+
+ List<IRule> rules= new ArrayList<IRule>();
+
+ // Add rule for single line comments.
+ rules.add(new RestrictedEndOfLineRule("dnl", "[]", comment)); //$NON-NLS-1$
+ rules.add(new RestrictedEndOfLineRule("#", "[]", comment, '\\')); //$NON-NLS-1$
+
+ // Add special recursive rule for strings which allows variable
+ // references to be internally tokenized.
+ RecursiveSingleLineRule stringRule =
+ new RecursiveSingleLineRule("\"", "\"", string, '\\'); //$NON-NLS-1$ //$NON-NLS-2$
+ stringRule.addRule(new SingleLineRule("${", "}", varRef)); //$NON-NLS-1$ //$NON-NLS-2$
+ rules.add(stringRule);
+
+ // Add rule for variable references
+ rules.add(new SingleLineRule("${", "}", varRef)); //$NON-NLS-1$ //$NON-NLS-2$
+ // Add rule for strings
+ rules.add(new SingleLineRule("\"", "\"", string, '\\')); //$NON-NLS-1$ //$NON-NLS-2$
+
+ // Add rule for AC_ macros
+ rules.add(new AutoconfMacroRule("AC_", new AutoconfMacroWordDetector(), acmacro)); //$NON-NLS-1$
+
+ // Add rule for AM_ macros
+ rules.add(new AutoconfMacroRule("AM_", new AutoconfMacroWordDetector(), ammacro)); //$NON-NLS-1$
+
+ // Add rule for m4_ macros
+ rules.add(new AutoconfMacroRule("m4_", new AutoconfM4WordDetector(), acmacro)); //$NON-NLS-1$
+
+ // Add rule for code sequences starting with <<EOF and ending with EOF
+ rules.add(new InlineDataRule(code));
+
+ // Add word rule for keywords.
+ WordRule wordRule= new WordRule(new AutoconfWordDetector(), other);
+ for (int i= 0; i < keywords.length; i++)
+ wordRule.addWord(keywords[i], keyword);
+ rules.add(wordRule);
+
+ // Add word rule for identifier.
+ rules.add(new AutoconfIdentifierRule(other));
+
+ // Make sure we don't treat "\#" as comment start.
+ rules.add(new SingleLineRule("\\#", null, Token.UNDEFINED));
+
+ rules.add(new WhitespaceRule(new AutoconfWhitespaceDetector()));
+
+ IRule[] result= new IRule[rules.size()];
+ rules.toArray(result);
+ setRules(result);
+ }
+
+ /*
+ * @see ITokenScanner#nextToken()
+ */
+ public IToken nextToken() {
+ int ch = read();
+ if (ch == '[') {
+ incQuoteLevel();
+ return getToken(ColorManager.AUTOCONF_DEFAULT_COLOR);
+ } else if (ch == ']') {
+ decQuoteLevel();
+ return getToken(ColorManager.AUTOCONF_DEFAULT_COLOR);
+ }
+ unread();
+ return super.nextToken();
+ }
+
+ protected Token getToken(String key) {
+ return (Token) fTokenMap.get(key);
+ }
+
+ private void addToken(String colorKey, String boldKey, String italicKey) {
+ fTokenMap.put(colorKey, new Token(createTextAttribute(colorKey, boldKey, italicKey)));
+ }
+
+ protected String[] getTokenProperties() {
+ return fTokenProperties;
+ }
+
+ private int indexOf(String property) {
+ if (property != null) {
+ int length= fPropertyNamesColor.length;
+ for (int i= 0; i < length; i++) {
+ if (property.equals(fPropertyNamesColor[i]) || property.equals(fPropertyNamesBold[i]) || property.equals(fPropertyNamesItalic[i]))
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ public void incQuoteLevel() {
+ ++quoteLevel;
+ }
+
+ public void decQuoteLevel() {
+ --quoteLevel;
+ }
+
+ public void resetQuoteLevel() {
+ quoteLevel = 0;
+ }
+
+ public int getQuoteLevel() {
+ return quoteLevel;
+ }
+
+ public boolean affectsBehavior(PropertyChangeEvent event) {
+ return indexOf(event.getProperty()) >= 0;
+ }
+
+ public void adaptToPreferenceChange(PropertyChangeEvent event) {
+ String p= event.getProperty();
+ int index= indexOf(p);
+ Token token= getToken(fPropertyNamesColor[index]);
+ if (fPropertyNamesColor[index].equals(p))
+ adaptToColorChange(event, token);
+ else if (fPropertyNamesBold[index].equals(p))
+ adaptToStyleChange(event, token, SWT.BOLD);
+ else if (fPropertyNamesItalic[index].equals(p))
+ adaptToStyleChange(event, token, SWT.ITALIC);
+ }
+
+ protected void adaptToColorChange(PropertyChangeEvent event, Token token) {
+ RGB rgb= null;
+ Object value= event.getNewValue();
+ if (value instanceof RGB) {
+ rgb= (RGB) value;
+ } else if (value instanceof String) {
+ rgb= StringConverter.asRGB((String) value);
+ }
+
+ if (rgb != null) {
+ TextAttribute attr= (TextAttribute) token.getData();
+ token.setData(new TextAttribute(ColorManager.getDefault().getColor(rgb), attr.getBackground(), attr.getStyle()));
+ }
+ }
+
+ protected void adaptToStyleChange(PropertyChangeEvent event, Token token, int styleAttribute) {
+ if (token == null) {
+ return;
+ }
+ boolean eventValue= false;
+ Object value= event.getNewValue();
+ if (value instanceof Boolean) {
+ eventValue= ((Boolean) value).booleanValue();
+ } else if (IPreferenceStore.TRUE.equals(value)) {
+ eventValue= true;
+ }
+
+ TextAttribute attr= (TextAttribute) token.getData();
+ boolean activeValue= (attr.getStyle() & styleAttribute) == styleAttribute;
+ if (activeValue != eventValue) {
+ token.setData(new TextAttribute(attr.getForeground(), attr.getBackground(), eventValue ? attr.getStyle() | styleAttribute : attr.getStyle() & ~styleAttribute));
+ }
+ }
+
+ protected TextAttribute createTextAttribute(String colorID, String boldKey, String italicKey) {
+ Color color= null;
+ if (colorID != null) {
+ color= AutoconfEditor.getPreferenceColor(colorID);
+ }
+ IPreferenceStore store= AutotoolsPlugin.getDefault().getPreferenceStore();
+ int style= store.getBoolean(boldKey) ? SWT.BOLD : SWT.NORMAL;
+ if (store.getBoolean(italicKey)) {
+ style |= SWT.ITALIC;
+ }
+ return new TextAttribute(color, null, style);
+ }
+
+ /**
+ * Must be called after the constructor has been called.
+ */
+ public final void initialize() {
+
+ resetQuoteLevel();
+ fPropertyNamesColor= getTokenProperties();
+ int length= fPropertyNamesColor.length;
+ fPropertyNamesBold= new String[length];
+ fPropertyNamesItalic= new String[length];
+
+ for (int i= 0; i < length; i++) {
+ fPropertyNamesBold[i]= fPropertyNamesColor[i] + AutotoolsEditorPreferenceConstants.EDITOR_BOLD_SUFFIX;
+ fPropertyNamesItalic[i]= fPropertyNamesColor[i] + AutotoolsEditorPreferenceConstants.EDITOR_ITALIC_SUFFIX;
+ addToken(fPropertyNamesColor[i], fPropertyNamesBold[i], fPropertyNamesItalic[i]);
+ }
+ }
+
+ /*
+ * @see ICharacterScanner#unread()
+ */
+ public void unread() {
+ --fOffset;
+ fColumn = UNDEFINED;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroContentAssistProcessor.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroContentAssistProcessor.java
new file mode 100644
index 0000000000..b1c9590a01
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroContentAssistProcessor.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import java.util.ArrayList;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.contentassist.CompletionProposal;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jface.text.contentassist.IContextInformationValidator;
+import org.eclipse.jface.text.rules.ICharacterScanner;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.text.hover.AutoconfTextHover;
+
+
+public class AutoconfMacroContentAssistProcessor implements
+ IContentAssistProcessor {
+
+ protected ICharacterScanner scanner;
+ protected AutoconfEditor editor;
+
+ public AutoconfMacroContentAssistProcessor(ICharacterScanner scanner, AutoconfEditor editor) {
+ this.scanner = scanner;
+ this.editor = editor;
+ }
+
+ private int computeMacroStart(IDocument document, int offset) {
+ try {
+ while (Character.isJavaIdentifierPart(document.getChar(offset - 1))) {
+ --offset;
+ }
+ } catch (BadLocationException e) {
+ // Do nothing
+ }
+ return offset;
+ }
+
+ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer,
+ int offset) {
+
+ IDocument document = viewer.getDocument();
+ String prefix = ""; //$NON-NLS-1$
+ AutoconfMacro[] macros = AutoconfTextHover.getMacroList(editor);
+ try {
+ int macroStart = computeMacroStart(document, offset);
+ if (macroStart < offset) {
+ prefix = prefix + document.get(macroStart, offset - macroStart);
+ }
+ } catch (BadLocationException e) {
+ // Do nothing. Leave prefix empty.
+ }
+ ICompletionProposal[] result = null;
+ if (macros != null) {
+ ArrayList<ICompletionProposal> validList = new ArrayList<ICompletionProposal>();
+ for (int i = 0; i < macros.length; ++i) {
+ String name = macros[i].getName();
+ if (name.length() >= prefix.length()) {
+ if (name.startsWith(prefix)) {
+ String template = macros[i].getTemplate();
+ int cursorPos = template.length();
+ int prefixLen = prefix.length();
+ if (template.charAt(template.length() - 1) == ')')
+ cursorPos -= 1;
+ AutoconfMacroProposalContextInformation ci = null;
+ if (macros[i].hasParms()) {
+ // Provide parameter info as context information that
+ // is tied to the completion proposal.
+ ci = new AutoconfMacroProposalContextInformation(macros[i].getParms(), macros[i].getParms());
+ ci.setContextInformationPosition(offset - prefixLen + cursorPos - 1);
+ }
+ ICompletionProposal cp = new CompletionProposal(template, offset - prefixLen, prefixLen, cursorPos, null,
+ name, ci, AutoconfTextHover.getIndexedInfo(name, editor));
+ validList.add(cp);
+ }
+ }
+ }
+ result = new ICompletionProposal[validList.size()];
+ result = (ICompletionProposal[])validList.toArray(result);
+ }
+ return result;
+ }
+
+ public IContextInformation[] computeContextInformation(ITextViewer viewer,
+ int offset) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public char[] getCompletionProposalAutoActivationCharacters() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public char[] getContextInformationAutoActivationCharacters() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public IContextInformationValidator getContextInformationValidator() {
+ // TODO Auto-generated method stub
+ return new AutoconfMacroParameterListValidator();
+ }
+
+ public String getErrorMessage() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroDamagerRepairer.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroDamagerRepairer.java
new file mode 100644
index 0000000000..c6ead68df8
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroDamagerRepairer.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import org.eclipse.jface.text.DocumentEvent;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.TextPresentation;
+import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
+import org.eclipse.jface.text.rules.ITokenScanner;
+
+public class AutoconfMacroDamagerRepairer extends DefaultDamagerRepairer {
+
+ public final static String UNMATCHED_RIGHT_PARENTHESIS = "UnmatchedRightParenthesis"; //$NON-NLS-1$
+ public final static String UNMATCHED_LEFT_PARENTHESIS = "UnmatchedLeftParenthesis"; //$NON-NLS-1$
+ public final static String UNMATCHED_RIGHT_QUOTE = "UnmatchedRightQuote"; //$NON-NLS-1$
+ public final static String UNMATCHED_LEFT_QUOTE = "UnmatchedLeftQuote"; //$NON-NLS-1$
+
+ /**
+ * Creates a damager/repairer that uses the given scanner. The scanner may not be <code>null</code>
+ * and is assumed to return only token that carry text attributes.
+ *
+ * @param scanner the token scanner to be used, may not be <code>null</code>
+ */
+ public AutoconfMacroDamagerRepairer(ITokenScanner scanner) {
+ super(scanner);
+ }
+
+ /*
+ * @see IPresentationDamager#getDamageRegion(ITypedRegion, DocumentEvent, boolean)
+ */
+ public IRegion getDamageRegion(ITypedRegion partition, DocumentEvent e, boolean documentPartitioningChanged) {
+ // In the case of a partition with multiline rules, we will punt to
+ // reparse the entire partition because we don't know if the line being
+ // edited is in the middle of an area covered by a multiline rule. In
+ // such a case, we need to back up and find the start sequence of the
+ // rule. It is easiest to just reparse the whole partition.
+ return partition;
+ }
+
+ /*
+ * @see IPresentationRepairer#createPresentation(TextPresentation, ITypedRegion)
+ */
+ public void createPresentation(TextPresentation presentation, ITypedRegion region) {
+
+// int offset = region.getOffset();
+// int length = region.getLength();
+
+ super.createPresentation(presentation, region);
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroParameterListValidator.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroParameterListValidator.java
new file mode 100644
index 0000000000..f59fbc53e9
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroParameterListValidator.java
@@ -0,0 +1,215 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.TextPresentation;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jface.text.contentassist.IContextInformationPresenter;
+import org.eclipse.jface.text.contentassist.IContextInformationValidator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyleRange;
+
+/**
+ * This class provides the macro call parameter parsing for the Autoconf Editor hover
+ * It is modified from the CDT class CParameterListValidator
+ *
+ * @author jjohnstn
+ *
+ */
+public class AutoconfMacroParameterListValidator implements IContextInformationValidator, IContextInformationPresenter {
+ private int fPosition;
+ private ITextViewer fViewer;
+ private IContextInformation fInformation;
+
+ private int fCurrentParameter;
+
+ public AutoconfMacroParameterListValidator() {
+ }
+
+ /**
+ * @see IContextInformationValidator#install(IContextInformation, ITextViewer, int)
+ * @see IContextInformationPresenter#install(IContextInformation, ITextViewer, int)
+ */
+ public void install(IContextInformation info, ITextViewer viewer, int documentPosition) {
+
+ fPosition= documentPosition;
+ fViewer= viewer;
+ fInformation= info;
+
+ fCurrentParameter= -1;
+ }
+
+ private int getStringEnd(IDocument d, int pos, int end, char ch) throws BadLocationException {
+ while (pos < end) {
+ char curr= d.getChar(pos);
+ pos++;
+ if (curr == '\\') {
+ // ignore escaped characters
+ pos++;
+ } else if (curr == ch) {
+ return pos;
+ }
+ }
+ return end;
+ }
+
+ private int getCharCount(IDocument document, int start, int end,
+ char increment, char decrement, boolean considerNesting) throws BadLocationException {
+
+ Assert.isTrue((increment != 0 || decrement != 0) && increment != decrement);
+
+ // There are two nesting levels to worry about. Arguments can be
+ // quoted with [] which means to treat the contents as one arg.
+ // As well, macro calls can be nested within macro calls so we
+ // have to handle parentheses.
+ int macroQuotingLevel = 0; // Pertaining to '[' and ']' quoted args.
+ int macroNestingLevel = -1; // Set to -1 to take into account first ( for function call
+ int charCount = 0;
+ while (start < end) {
+ char curr = document.getChar(start++);
+ switch (curr) {
+ case 'd':
+ if (start < end - 2) {
+ char next= document.getChar(start);
+ if (next == 'n') {
+ // a comment starts, advance to the comment end
+ next = document.getChar(start + 1);
+ if (next == 'l')
+ // dnl-comment: nothing to do anymore on this line
+ start= end;
+ }
+ }
+ break;
+ case '"':
+ case '\'':
+ start= getStringEnd(document, start, end, curr);
+ break;
+ default:
+ if ('[' == curr)
+ ++ macroQuotingLevel;
+ else if (']' == curr)
+ -- macroQuotingLevel;
+ if (macroQuotingLevel != 0)
+ break;
+ if (considerNesting) {
+ if ('(' == curr)
+ ++ macroNestingLevel;
+ else if (')' == curr) {
+ -- macroNestingLevel;
+ }
+ if (macroNestingLevel != 0)
+ break;
+ }
+ if (increment != 0) {
+ if (curr == increment) {
+ ++charCount;
+ }
+ }
+
+ if (decrement != 0) {
+ if (curr == decrement) {
+ -- charCount;
+ }
+ }
+ }
+ }
+
+ return charCount;
+ }
+
+ /**
+ * @see IContextInformationValidator#isContextInformationValid(int)
+ */
+ public boolean isContextInformationValid(int position) {
+
+ try {
+ if (position < fPosition)
+ return false;
+
+ IDocument document= fViewer.getDocument();
+ IRegion line= document.getLineInformationOfOffset(fPosition);
+
+ if (position > line.getOffset() + line.getLength())
+ return false;
+
+ return (getCharCount(document, fPosition, position, '(', ')', false) >= 0);
+
+ } catch (BadLocationException x) {
+ return false;
+ }
+ }
+
+ /**
+ * @see IContextInformationPresenter#updatePresentation(int, TextPresentation)
+ */
+ public boolean updatePresentation(int position, TextPresentation presentation) {
+
+ int currentParameter= -1;
+ try {
+ currentParameter= getCharCount(fViewer.getDocument(), fPosition, position, ',', (char) 0, true);
+ } catch (BadLocationException x) {
+ return false;
+ }
+
+ if (fCurrentParameter != -1) {
+ if (currentParameter == fCurrentParameter)
+ return false;
+ }
+
+ presentation.clear();
+ fCurrentParameter= currentParameter;
+
+ //Don't presume what has been done to the string, rather use as is
+ String s= fInformation.getInformationDisplayString();
+
+ //@@@ This is obviously going to have problems with functions such
+ //int myfunction(int (*function_argument)(void * extra, int param), void * extra)
+ //int myfunction(/*A comment, indeed */int a);
+ int start= 0;
+ int occurrences= 0;
+ while (occurrences < fCurrentParameter) {
+ int found= s.indexOf(',', start);
+ if (found == -1)
+ break;
+ start= found + 1;
+ ++ occurrences;
+ }
+
+ if (occurrences < fCurrentParameter) {
+ presentation.addStyleRange(new StyleRange(0, s.length(), null, null, SWT.NORMAL));
+ return true;
+ }
+
+ if (start == -1)
+ start= 0;
+
+ int end= s.indexOf(',', start);
+ if (end == -1)
+ end= s.length();
+
+ if (start > 0)
+ presentation.addStyleRange(new StyleRange(0, start, null, null, SWT.NORMAL));
+
+ if (end > start)
+ presentation.addStyleRange(new StyleRange(start, end - start, null, null, SWT.BOLD));
+
+ if (end < s.length())
+ presentation.addStyleRange(new StyleRange(end, s.length() - end, null, null, SWT.NORMAL));
+
+ return true;
+ }
+}
+
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroPartitionRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroPartitionRule.java
new file mode 100644
index 0000000000..49b05661c0
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroPartitionRule.java
@@ -0,0 +1,148 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import org.eclipse.jface.text.rules.ICharacterScanner;
+import org.eclipse.jface.text.rules.IPredicateRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.IWhitespaceDetector;
+import org.eclipse.jface.text.rules.IWordDetector;
+import org.eclipse.jface.text.rules.Token;
+
+
+public class AutoconfMacroPartitionRule implements IPredicateRule {
+ /**
+ * The default token to be returned on success and if nothing else has been
+ * specified.
+ */
+ protected IToken token;
+
+ private IWordDetector generalMacroWordDetector;
+ private IWordDetector m4MacroWordDetector;
+ protected IWordDetector fDetector;
+ protected IWhitespaceDetector fWsDetector = new AutoconfWhitespaceDetector();
+
+ /** The column constraint */
+ protected int fColumn = UNDEFINED;
+
+ /** Internal setting for the un-initialized column constraint */
+ protected static final int UNDEFINED = -1;
+
+ /** Buffer used for pattern detection */
+ private StringBuffer fBuffer = new StringBuffer();
+
+ public AutoconfMacroPartitionRule(IToken inToken) {
+ token = inToken;
+ generalMacroWordDetector = new AutoconfMacroWordDetector();
+ m4MacroWordDetector = new AutoconfM4WordDetector();
+ }
+
+ public IToken getSuccessToken() {
+ return token;
+ }
+
+ protected void matchParentheses(ICharacterScanner scanner) {
+ boolean finished = false;
+ int depth = 1;
+ int quoteDepth = 0;
+ int c = scanner.read();
+ while (!finished && c != ICharacterScanner.EOF) {
+ if (c == '[') {
+ ++quoteDepth;
+ }
+ else if (c == ']') {
+ --quoteDepth;
+ if (quoteDepth < 0)
+ finished = true;
+ }
+ if (quoteDepth == 0) {
+ if (c == ')') {
+ --depth;
+ if (depth <= 0)
+ finished = true;
+ }
+ else if (c == '(') {
+ ++depth;
+ }
+ }
+ c = scanner.read();
+ }
+ }
+
+ public IToken evaluate(ICharacterScanner scanner, boolean resume) {
+// if (resume)
+// return Token.UNDEFINED;
+ return evaluate(scanner);
+ }
+
+ public IToken evaluate(ICharacterScanner scanner) {
+ int c = scanner.read();
+ fBuffer.setLength(0);
+
+ fBuffer.append((char)c);
+ if (c == 'A') {
+ c = scanner.read();
+ fBuffer.append((char)c);
+ if (c != 'C' && c != 'H' && c != 'M') {
+ unreadBuffer(scanner);
+ return Token.UNDEFINED;
+ }
+ fDetector = generalMacroWordDetector;
+ } else if (c == 'm') {
+ c = scanner.read();
+ fBuffer.append((char)c);
+ if (c != 4) {
+ unreadBuffer(scanner);
+ return Token.UNDEFINED;
+ }
+ fDetector = m4MacroWordDetector;
+ } else {
+ unreadBuffer(scanner);
+ return Token.UNDEFINED;
+ }
+
+ c = scanner.read();
+ while (c != ICharacterScanner.EOF
+ && fDetector.isWordPart((char) c)) {
+ fBuffer.append((char) c);
+ c = scanner.read();
+ }
+
+ if (c != ICharacterScanner.EOF) {
+ if (c == ';' || fWsDetector.isWhitespace((char)c)) {
+ // We are done
+ }
+ else if (c == '(') {
+ matchParentheses(scanner);
+ }
+ else {
+ scanner.unread();
+ unreadBuffer(scanner);
+ return Token.UNDEFINED;
+ }
+ }
+
+ scanner.unread();
+ return token;
+ }
+
+ /**
+ * Returns the characters in the buffer to the scanner.
+ *
+ * @param scanner
+ * the scanner to be used
+ */
+ protected void unreadBuffer(ICharacterScanner scanner) {
+ for (int i = fBuffer.length() - 1; i >= 0; i--)
+ scanner.unread();
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroProposalContextInformation.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroProposalContextInformation.java
new file mode 100644
index 0000000000..e549af6aa7
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroProposalContextInformation.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 IBM Corporation 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:
+ * IBM Corp. - Rational Software - initial implementation
+ *******************************************************************************/
+/*
+ * Created on May 6, 2004
+ */
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jface.text.contentassist.IContextInformationExtension;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * @author aniefer
+ */
+public class AutoconfMacroProposalContextInformation implements IContextInformation, IContextInformationExtension {
+ /** The name of the context */
+ private String fContextDisplayString;
+ /** The information to be displayed */
+ private String fInformationDisplayString;
+ /** The position to display the information */
+ private int fInformationPosition;
+ /** The image to be displayed */
+ private Image fImage;
+
+ /**
+ * Creates a new context information without an image.
+ *
+ * @param contextDisplayString the string to be used when presenting the context
+ * @param informationDisplayString the string to be displayed when presenting the context information
+ */
+ public AutoconfMacroProposalContextInformation(String contextDisplayString, String informationDisplayString) {
+ this(null, contextDisplayString, informationDisplayString);
+ }
+
+ /**
+ * Creates a new context information with an image.
+ *
+ * @param image the image to display when presenting the context information
+ * @param contextDisplayString the string to be used when presenting the context
+ * @param informationDisplayString the string to be displayed when presenting the context information,
+ * may not be <code>null</code>
+ */
+ public AutoconfMacroProposalContextInformation(Image image, String contextDisplayString, String informationDisplayString) {
+ //Assert.isNotNull(informationDisplayString);
+ fImage= image;
+ fContextDisplayString= contextDisplayString;
+ fInformationDisplayString= informationDisplayString;
+ }
+
+ /*
+ * @see IContextInformation#equals(Object)
+ */
+ public boolean equals(Object object) {
+ if (object instanceof IContextInformation) {
+ IContextInformation contextInformation= (IContextInformation) object;
+ boolean equals= fInformationDisplayString.equalsIgnoreCase(contextInformation.getInformationDisplayString());
+ if (fContextDisplayString != null)
+ equals= equals && fContextDisplayString.equalsIgnoreCase(contextInformation.getContextDisplayString());
+ return equals;
+ }
+ return false;
+ }
+
+ /*
+ * @see IContextInformation#getInformationDisplayString()
+ */
+ public String getInformationDisplayString() {
+ return fInformationDisplayString;
+ }
+
+ /*
+ * @see IContextInformation#getImage()
+ */
+ public Image getImage() {
+ return fImage;
+ }
+
+ /*
+ * @see IContextInformation#getContextDisplayString()
+ */
+ public String getContextDisplayString() {
+ if (fContextDisplayString != null)
+ return fContextDisplayString;
+ return fInformationDisplayString;
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContextInformationExtension#getContextInformationPosition()
+ */
+ public int getContextInformationPosition() {
+ return fInformationPosition;
+ }
+
+ public void setContextInformationPosition( int pos ){
+ fInformationPosition = pos;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroRule.java
new file mode 100644
index 0000000000..caab3d69e9
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroRule.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2006 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import org.eclipse.jface.text.rules.ICharacterScanner;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.IWhitespaceDetector;
+import org.eclipse.jface.text.rules.IWordDetector;
+import org.eclipse.jface.text.rules.Token;
+
+public class AutoconfMacroRule implements IRule {
+ /**
+ * The default token to be returned on success and if nothing else has been
+ * specified.
+ */
+ protected IToken token;
+
+ protected IWordDetector fDetector;
+ protected IWhitespaceDetector fWsDetector = new AutoconfWhitespaceDetector();
+
+ /** The column constraint */
+ protected int fColumn = UNDEFINED;
+
+ /** Internal setting for the un-initialized column constraint */
+ protected static final int UNDEFINED = -1;
+
+ /** Buffer used for pattern detection */
+ private StringBuffer fBuffer = new StringBuffer();
+
+ private String fStartingSequence;
+
+ public AutoconfMacroRule(String startingSequence,
+ IWordDetector detector, IToken inToken) {
+ token = inToken;
+ fDetector = detector;
+ fStartingSequence = startingSequence;
+ }
+
+ public IToken evaluate(ICharacterScanner scanner) {
+ int c = scanner.read();
+ fBuffer.setLength(0);
+
+ for (int i = 0; i < fStartingSequence.length(); i++) {
+ fBuffer.append((char) c);
+ if (fStartingSequence.charAt(i) != c) {
+ unreadBuffer(scanner);
+ return Token.UNDEFINED;
+ }
+ c = scanner.read();
+ }
+
+ while (c != ICharacterScanner.EOF
+ && fDetector.isWordPart((char) c)) {
+ fBuffer.append((char) c);
+ c = scanner.read();
+ }
+
+ if (c != ICharacterScanner.EOF && c != '(' && c != ';'
+ && !fWsDetector.isWhitespace((char)c)) {
+ unreadBuffer(scanner);
+ return Token.UNDEFINED;
+ }
+
+ scanner.unread();
+ return token;
+ }
+
+ /**
+ * Returns the characters in the buffer to the scanner.
+ *
+ * @param scanner
+ * the scanner to be used
+ */
+ protected void unreadBuffer(ICharacterScanner scanner) {
+ for (int i = fBuffer.length() - 1; i >= 0; i--)
+ scanner.unread();
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroWordDetector.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroWordDetector.java
new file mode 100644
index 0000000000..2a0e0f8a74
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroWordDetector.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2006 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import org.eclipse.jface.text.rules.IWordDetector;
+
+public class AutoconfMacroWordDetector implements IWordDetector {
+
+ public boolean isWordPart(char c) {
+ return ((Character.isLetter(c) && Character.isUpperCase(c)) ||
+ Character.isDigit(c) || c == '_');
+ }
+
+ public boolean isWordStart(char c) {
+ return (c == 'A');
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfPKGWordDetector.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfPKGWordDetector.java
new file mode 100644
index 0000000000..49c923dc8f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfPKGWordDetector.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2008 NOKIA 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:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import org.eclipse.jface.text.rules.IWordDetector;
+
+public class AutoconfPKGWordDetector implements IWordDetector {
+
+ public boolean isWordPart(char c) {
+ return ((Character.isLetter(c) && Character.isUpperCase(c)) ||
+ Character.isDigit(c) || c == '_');
+ }
+
+ public boolean isWordStart(char c) {
+ return (c == 'P');
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfPartitionScanner.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfPartitionScanner.java
new file mode 100644
index 0000000000..7dd8f709b6
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfPartitionScanner.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2006 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.text.rules.EndOfLineRule;
+import org.eclipse.jface.text.rules.IPredicateRule;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.RuleBasedPartitionScanner;
+import org.eclipse.jface.text.rules.SingleLineRule;
+import org.eclipse.jface.text.rules.Token;
+
+public class AutoconfPartitionScanner extends RuleBasedPartitionScanner {
+
+ public final static String AUTOCONF_MACRO = "autoconf_macro"; //$NON-NLS-1$
+ public final static String AUTOCONF_COMMENT = "autoconf_comment"; //$NON-NLS-1$
+ public final static String[] AUTOCONF_PARTITION_TYPES=
+ new String[] { AUTOCONF_MACRO, AUTOCONF_COMMENT };
+
+ /**
+ * Creates the partitioner and sets up the appropriate rules.
+ */
+ public AutoconfPartitionScanner() {
+ super();
+
+ List<IRule> rules= new ArrayList<IRule>();
+ Token macro = new Token(AUTOCONF_MACRO);
+ Token comment = new Token(AUTOCONF_COMMENT);
+
+ // Add rule for target bodies.
+ rules.add(new AutoconfMacroPartitionRule(macro));
+
+
+ rules.add(new EndOfLineRule("dnl", comment)); //$NON-NLS-1$
+ rules.add(new SingleLineRule("\\#", null, Token.UNDEFINED));
+ rules.add(new EndOfLineRule("#", comment, '\\')); //$NON-NLS-1$
+
+ // We want to process identifiers that might have macro
+ // names inside them.
+ rules.add(new AutoconfIdentifierRule(Token.UNDEFINED));
+
+ IPredicateRule[] result= new IPredicateRule[rules.size()];
+ rules.toArray(result);
+ setPredicateRules(result);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfPartitioner.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfPartitioner.java
new file mode 100644
index 0000000000..c449f426d5
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfPartitioner.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.rules.FastPartitioner;
+import org.eclipse.jface.text.rules.IPartitionTokenScanner;
+
+public class AutoconfPartitioner extends FastPartitioner {
+
+ public AutoconfPartitioner(IPartitionTokenScanner scanner, String[] legalContentTypes) {
+ // TODO Auto-generated constructor stub
+ super(scanner, legalContentTypes);
+ }
+
+ public void connect(IDocument document, int blah) {
+ super.connect(document);
+ }
+
+ // To optionally show partitions, we must do so by overriding the computePartitioning
+ // method. We cannot do it at connect time because the document may be zero length
+ // at the time and we will end up getting default partitioning from then on.
+ public ITypedRegion[] computePartitioning(int offset, int length,
+ boolean includeZeroLength) {
+ ITypedRegion[] regions = super.computePartitioning(offset, length, includeZeroLength);
+ // Uncomment the following line to see partitioning.
+// printPartitions(regions);
+ return regions;
+ }
+
+ public void printPartitions(ITypedRegion[] partitions)
+ {
+ StringBuffer buffer = new StringBuffer();
+
+ for (int i = 0; i < partitions.length; i++)
+ {
+ try
+ {
+ buffer.append("Partition type: " + partitions[i].getType() //$NON-NLS-1$
+ + ", offset: " + partitions[i].getOffset() //$NON-NLS-1$
+ + ", length: " + partitions[i].getLength()); //$NON-NLS-1$
+ buffer.append("\n"); //$NON-NLS-1$
+ buffer.append("Text:\n"); //$NON-NLS-1$
+ buffer.append(super.fDocument.get(partitions[i].getOffset(), partitions[i].getLength()));
+ buffer.append("\n---------------------------\n\n\n"); //$NON-NLS-1$
+ }
+ catch (BadLocationException e)
+ {
+ e.printStackTrace();
+ }
+ }
+ System.out.print(buffer);
+ }
+} \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfReconcilingStrategy.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfReconcilingStrategy.java
new file mode 100644
index 0000000000..b81aead848
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfReconcilingStrategy.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.reconciler.DirtyRegion;
+import org.eclipse.jface.text.reconciler.IReconcilingStrategy;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.outline.AutoconfContentOutlinePage;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfParser;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+
+
+public class AutoconfReconcilingStrategy implements IReconcilingStrategy {
+
+ AutoconfContentOutlinePage outline;
+ int lastRegionOffset;
+ AutoconfEditor editor;
+ IDocumentProvider documentProvider;
+
+ public AutoconfReconcilingStrategy(AutoconfEditor editor) {
+ outline= editor.getOutlinePage();
+ lastRegionOffset = Integer.MAX_VALUE;
+ this.editor = editor;
+ documentProvider = editor.getDocumentProvider();
+ }
+
+ public void reconcile(IRegion partition) {
+ try {
+ AutoconfParser parser = editor.getAutoconfParser();
+ ((AutoconfErrorHandler)parser.getErrorHandler()).removeAllExistingMarkers();
+ editor.setRootElement(parser.parse(documentProvider.getDocument(editor.getEditorInput())));
+ outline.update();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setDocument(IDocument document) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java
new file mode 100644
index 0000000000..958cf70ee0
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextHover;
+import org.eclipse.jface.text.contentassist.ContentAssistant;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.contentassist.IContentAssistant;
+import org.eclipse.jface.text.presentation.IPresentationReconciler;
+import org.eclipse.jface.text.presentation.PresentationReconciler;
+import org.eclipse.jface.text.reconciler.IReconciler;
+import org.eclipse.jface.text.reconciler.MonoReconciler;
+import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
+import org.eclipse.jface.text.source.IAnnotationHover;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.text.hover.AutoconfTextHover;
+import org.eclipse.ui.editors.text.TextSourceViewerConfiguration;
+
+
+public class AutoconfSourceViewerConfiguration extends
+ TextSourceViewerConfiguration {
+
+ private ITextHover acHover;
+ private IAnnotationHover aaHover;
+ private AutoconfEditor fEditor;
+
+ public AutoconfSourceViewerConfiguration(IPreferenceStore prefs, AutoconfEditor editor) {
+ super(prefs);
+ fEditor = editor;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getConfiguredDocumentPartitioning(org.eclipse.jface.text.source.ISourceViewer)
+ */
+ public String getConfiguredDocumentPartitioning(ISourceViewer sourceViewer) {
+ return AutoconfEditor.AUTOCONF_PARTITIONING;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getContentAssistant(org.eclipse.jface.text.source.ISourceViewer)
+ */
+ public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
+ ContentAssistant assistant = new ContentAssistant();
+
+ IContentAssistProcessor macroContentAssistProcessor =
+ new AutoconfMacroContentAssistProcessor(new AutoconfMacroCodeScanner(), fEditor);
+ assistant.setContentAssistProcessor(macroContentAssistProcessor, AutoconfPartitionScanner.AUTOCONF_MACRO);
+ assistant.setContentAssistProcessor(macroContentAssistProcessor, IDocument.DEFAULT_CONTENT_TYPE);
+ assistant.enableAutoActivation(true);
+ assistant.setAutoActivationDelay(500);
+ assistant.setProposalPopupOrientation(IContentAssistant.PROPOSAL_OVERLAY);
+ assistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE);
+ assistant.setInformationControlCreator(AutoconfTextHover.getInformationControlCreator());
+
+ return assistant;
+ }
+
+ /* (non-Javadoc)
+ * Method declared on SourceViewerConfiguration
+ */
+ public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
+ return new String[] { IDocument.DEFAULT_CONTENT_TYPE,
+ AutoconfPartitionScanner.AUTOCONF_MACRO,
+ AutoconfPartitionScanner.AUTOCONF_COMMENT};
+ }
+
+ public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType) {
+ if (acHover == null)
+ acHover = new AutoconfTextHover(fEditor);
+ return acHover;
+ }
+
+ public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer) {
+ if (aaHover == null)
+ aaHover = new AutoconfAnnotationHover();
+ return aaHover;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getReconciler(org.eclipse.jface.text.source.ISourceViewer)
+ */
+ public IReconciler getReconciler(ISourceViewer sourceViewer) {
+ MonoReconciler reconciler= new MonoReconciler(new AutoconfReconcilingStrategy(fEditor), false);
+ reconciler.setDelay(1000);
+ reconciler.setProgressMonitor(new NullProgressMonitor());
+ return reconciler;
+ }
+ /* (non-Javadoc)
+ * Method declared on SourceViewerConfiguration
+ */
+ public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
+ PresentationReconciler reconciler = new PresentationReconciler();
+
+ DefaultDamagerRepairer dr= new AutoconfMacroDamagerRepairer(new AutoconfMacroCodeScanner());
+ reconciler.setDamager(dr, AutoconfPartitionScanner.AUTOCONF_MACRO);
+ reconciler.setRepairer(dr, AutoconfPartitionScanner.AUTOCONF_MACRO);
+
+ dr= new DefaultDamagerRepairer(new AutoconfCodeScanner());
+ reconciler.setDamager(dr, AutoconfPartitionScanner.AUTOCONF_COMMENT);
+ reconciler.setRepairer(dr, AutoconfPartitionScanner.AUTOCONF_COMMENT);
+
+ dr= new MultilineRuleDamagerRepairer(new AutoconfCodeScanner());
+ reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
+ reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
+
+ return reconciler;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfWhitespaceDetector.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfWhitespaceDetector.java
new file mode 100644
index 0000000000..1219c8d188
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfWhitespaceDetector.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2006 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import org.eclipse.jface.text.rules.IWhitespaceDetector;
+
+public class AutoconfWhitespaceDetector implements IWhitespaceDetector {
+
+ public boolean isWhitespace(char c) {
+ return (c == ' ' || c == '\t' || c == '\n' || c == '\r');
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfWordDetector.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfWordDetector.java
new file mode 100644
index 0000000000..1017f97627
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfWordDetector.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2006 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import org.eclipse.jface.text.rules.IWordDetector;
+
+public class AutoconfWordDetector implements IWordDetector {
+
+ private static final String correctStartSpecChars = "%*().><"; //$NON-NLS-1$
+ private static final String correctSpecChars = "@$/\\><"; //$NON-NLS-1$
+
+ /**
+ * @see IWordDetector#isWordPart(character)
+ */
+ public boolean isWordPart(char character) {
+ return Character.isLetterOrDigit(character) || (correctSpecChars.indexOf(character) >= 0);
+ }
+
+ /**
+ * @see IWordDetector#isWordStart(char)
+ */
+ public boolean isWordStart(char character) {
+ return Character.isLetterOrDigit(character) || (correctStartSpecChars.indexOf(character) >= 0);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/IAutotoolEditorActionDefinitionIds.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/IAutotoolEditorActionDefinitionIds.java
new file mode 100644
index 0000000000..74d4f160a7
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/IAutotoolEditorActionDefinitionIds.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+
+public interface IAutotoolEditorActionDefinitionIds {
+ public static final String SHOW_TOOLTIP = AutotoolsUIPlugin.getUniqueIdentifier() + ".editors.text.show.tooltip"; //$NON-NLS-1$
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/IAutotoolHelpContextIds.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/IAutotoolHelpContextIds.java
new file mode 100644
index 0000000000..cd822f4e23
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/IAutotoolHelpContextIds.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+
+public interface IAutotoolHelpContextIds {
+ public static final String PREFIX = AutotoolsUIPlugin.getUniqueIdentifier();
+ public static final String AC_EDITOR_VIEW = PREFIX + "autoconf_editor"; //$NON-NLS-1$
+ public static final String SHOW_TOOLTIP_ACTION = PREFIX + "show_tooltip_action"; //$NON-NLS-1$
+ public static final String CONTENT_ASSIST = PREFIX + "content_assist"; //$NON-NLS-1$
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/IAutotoolsEditor.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/IAutotoolsEditor.java
new file mode 100644
index 0000000000..0a2c73061b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/IAutotoolsEditor.java
@@ -0,0 +1,18 @@
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake.IReconcilingParticipant;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+
+public interface IAutotoolsEditor extends ITextEditor {
+
+ public Object getAdapter(Class<?> key);
+
+ /**
+ * Adds the given listener.
+ * Has no effect if an identical listener was not already registered.
+ *
+ * @param listener The reconcile listener to be added
+ */
+ public void addReconcilingParticipant(IReconcilingParticipant listener);
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/InlineDataRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/InlineDataRule.java
new file mode 100644
index 0000000000..658bae40d5
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/InlineDataRule.java
@@ -0,0 +1,165 @@
+/*******************************************************************************
+ * Copyright (c) 2006 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import org.eclipse.jface.text.rules.ICharacterScanner;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.IWhitespaceDetector;
+import org.eclipse.jface.text.rules.IWordDetector;
+import org.eclipse.jface.text.rules.Token;
+
+public class InlineDataRule implements IRule {
+ /**
+ * The default token to be returned on success and if nothing else has been
+ * specified.
+ */
+ protected IToken token;
+
+ protected IWordDetector fDetector;
+ protected IWhitespaceDetector fWsDetector = new AutoconfWhitespaceDetector();
+
+ /** The column constraint */
+ protected int fColumn = UNDEFINED;
+
+ /** Internal setting for the un-initialized column constraint */
+ protected static final int UNDEFINED = -1;
+
+ /** Buffer used for pattern detection */
+ private StringBuffer fBuffer = new StringBuffer();
+
+ private String fStartingSequence = "<<";
+
+ public InlineDataRule(IToken inToken) {
+ token = inToken;
+ }
+
+ // Confirm an EOL delimeter after already matching first delimeter character.
+ protected boolean confirmDelimeter(ICharacterScanner scanner, char[] delimeter) {
+ int c = scanner.read();
+ StringBuffer buffer = new StringBuffer();
+ buffer.append((char)c);
+ for (int i = 1; i < delimeter.length; ++i) {
+ if (c == delimeter[i]) {
+ c = scanner.read();
+ buffer.append((char)c);
+ } else {
+ for (int j = buffer.length() - 1; j >= 0; j--)
+ scanner.unread();
+ return false;
+ }
+ }
+ scanner.unread();
+ return true;
+ }
+ public IToken evaluate(ICharacterScanner scanner) {
+ int c = scanner.read();
+ fBuffer.setLength(0);
+
+ // Looking for <<WORD or <<-WORD or <<'WORD' at end of line.
+ for (int i = 0; i < fStartingSequence.length(); i++) {
+ fBuffer.append((char) c);
+ if (fStartingSequence.charAt(i) != c) {
+ unreadBuffer(scanner);
+ return Token.UNDEFINED;
+ }
+ c = scanner.read();
+ }
+
+ char[][] lineDelimeters = scanner.getLegalLineDelimiters();
+ StringBuffer endMarkerBuffer = new StringBuffer();
+ if (c == '-') {
+ fBuffer.append((char)c);
+ c = scanner.read();
+ } else if (c == '\'') {
+ fBuffer.append((char)c);
+ c = scanner.read();
+ }
+
+ while (c != ICharacterScanner.EOF &&
+ Character.isJavaIdentifierPart((char)c) &&
+ c != '\'') {
+ fBuffer.append((char)c);
+ endMarkerBuffer.append((char)c);
+ c = scanner.read();
+ }
+
+ if (c == '\'') {
+ fBuffer.append((char)c);
+ c = scanner.read();
+ }
+
+ if (endMarkerBuffer.length() == 0) {
+ unreadBuffer(scanner);
+ return Token.UNDEFINED;
+ }
+
+ // At this point we read until we find id by itself on its own line
+ boolean eol = false;
+ boolean finished = false;
+ boolean foundMarker = false;
+ String endMarker = endMarkerBuffer.toString();
+ while (!finished && c != ICharacterScanner.EOF) {
+ for (int i = 0; i < lineDelimeters.length; ++i) {
+ if (c == lineDelimeters[i][0]) {
+ if (confirmDelimeter(scanner, lineDelimeters[i])) {
+ c = scanner.read();
+ eol = true;
+ break;
+ }
+ }
+ }
+ if (eol) {
+ eol = false;
+ if (foundMarker) {
+ // We get here if we have found the marker by itself
+ // on the line
+ finished = true;
+ } else {
+ foundMarker = false;
+ int j = 0;
+ while (j < endMarker.length()) {
+ if (c == endMarker.charAt(j)) {
+ c = scanner.read();
+ ++j;
+ } else {
+ break;
+ }
+ }
+ if (j == endMarker.length()) {
+ foundMarker = true;
+ }
+ }
+ } else {
+ // otherwise ignore all other characters
+ eol = false;
+ foundMarker = false;
+ c = scanner.read();
+ }
+ }
+
+ // unread last character
+ scanner.unread();
+ return token;
+ }
+
+ /**
+ * Returns the characters in the buffer to the scanner.
+ *
+ * @param scanner
+ * the scanner to be used
+ */
+ protected void unreadBuffer(ICharacterScanner scanner) {
+ for (int i = fBuffer.length() - 1; i >= 0; i--)
+ scanner.unread();
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/MultilineRuleDamagerRepairer.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/MultilineRuleDamagerRepairer.java
new file mode 100644
index 0000000000..7f9329f68f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/MultilineRuleDamagerRepairer.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import org.eclipse.jface.text.DocumentEvent;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
+import org.eclipse.jface.text.rules.ITokenScanner;
+
+public class MultilineRuleDamagerRepairer extends DefaultDamagerRepairer {
+
+
+ /**
+ * Creates a damager/repairer that uses the given scanner. The scanner may not be <code>null</code>
+ * and is assumed to return only token that carry text attributes.
+ *
+ * @param scanner the token scanner to be used, may not be <code>null</code>
+ */
+ public MultilineRuleDamagerRepairer(ITokenScanner scanner) {
+ super(scanner);
+ }
+
+ /*
+ * @see IPresentationDamager#getDamageRegion(ITypedRegion, DocumentEvent, boolean)
+ */
+ public IRegion getDamageRegion(ITypedRegion partition, DocumentEvent e, boolean documentPartitioningChanged) {
+ // In the case of a partition with multiline rules, we will punt to
+ // reparse the entire partition because we don't know if the line being
+ // edited is in the middle of an area covered by a multiline rule. In
+ // such a case, we need to back up and find the start sequence of the
+ // rule. It is easiest to just reparse the whole partition.
+ return partition;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/ParseException.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/ParseException.java
new file mode 100644
index 0000000000..d3787ebfb8
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/ParseException.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+public class ParseException extends Exception {
+
+ static final long serialVersionUID = 1;
+ String message;
+ int severity;
+ int lineNumber;
+ int startColumn;
+ int endColumn;
+ public int getEndColumn() {
+ return endColumn;
+ }
+ public void setEndColumn(int endColumn) {
+ this.endColumn = endColumn;
+ }
+ public int getLineNumber() {
+ return lineNumber;
+ }
+ public void setLineNumber(int lineNumber) {
+ this.lineNumber = lineNumber;
+ }
+ public String getMessage() {
+ return message;
+ }
+ public void setMessage(String message) {
+ this.message = message;
+ }
+ public int getStartColumn() {
+ return startColumn;
+ }
+ public void setStartColumn(int startColumn) {
+ this.startColumn = startColumn;
+ }
+ public ParseException(String message, int lineNumber, int startColumn, int endColumn, int severity) {
+ super();
+ this.message = message;
+ this.lineNumber = lineNumber;
+ this.startColumn = startColumn;
+ this.endColumn = endColumn;
+ this.severity = severity;
+ }
+ public int getSeverity() {
+ return severity;
+ }
+ public void setSeverity(int severity) {
+ this.severity = severity;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/RecursiveSingleLineRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/RecursiveSingleLineRule.java
new file mode 100644
index 0000000000..f5818ab03b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/RecursiveSingleLineRule.java
@@ -0,0 +1,196 @@
+/*******************************************************************************
+ * Copyright (c) 2006 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import java.util.ArrayList;
+
+import org.eclipse.jface.text.rules.ICharacterScanner;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.SingleLineRule;
+import org.eclipse.jface.text.rules.Token;
+
+public class RecursiveSingleLineRule extends SingleLineRule {
+
+ private ArrayList<IRule> rules;
+ private int evalIndex;
+ private int startIndex;
+ private int endIndex;
+ private int endBoundary;
+ private String startSequence;
+ private String endSequence;
+ /**
+ * Creates a rule for the given starting and ending sequence
+ * which, if detected, will return the specified token.
+ *
+ * @param startSequence the pattern's start sequence
+ * @param endSequence the pattern's end sequence
+ * @param token the token to be returned on success
+ */
+ public RecursiveSingleLineRule(String startSequence, String endSequence, IToken token) {
+ this(startSequence, endSequence, token, (char) 0);
+ }
+
+ /**
+ * Creates a rule for the given starting and ending sequence
+ * which, if detected, will return the specified token.
+ * Any character which follows the given escape character
+ * will be ignored.
+ *
+ * @param startSequence the pattern's start sequence
+ * @param endSequence the pattern's end sequence
+ * @param token the token to be returned on success
+ * @param escapeCharacter the escape character
+ */
+ public RecursiveSingleLineRule(String startSequence, String endSequence, IToken token, char escapeCharacter) {
+ this(startSequence, endSequence, token, escapeCharacter, false);
+ }
+
+ /**
+ * Creates a rule for the given starting and ending sequence
+ * which, if detected, will return the specified token. Alternatively, the
+ * line can also be ended with the end of the file.
+ * Any character which follows the given escape character
+ * will be ignored.
+ *
+ * @param startSequence the pattern's start sequence
+ * @param endSequence the pattern's end sequence
+ * @param token the token to be returned on success
+ * @param escapeCharacter the escape character
+ * @param breaksOnEOF indicates whether the end of the file successfully terminates this rule
+ * @since 2.1
+ */
+ public RecursiveSingleLineRule(String startSequence, String endSequence, IToken token, char escapeCharacter, boolean breaksOnEOF) {
+ super(startSequence, endSequence, token, escapeCharacter, breaksOnEOF);
+ this.startSequence = startSequence;
+ this.endSequence = endSequence;
+ rules = new ArrayList<IRule>();
+ startIndex = 0;
+ endIndex = 0;
+ }
+
+ /**
+ * Creates a rule for the given starting and ending sequence
+ * which, if detected, will return the specified token. Alternatively, the
+ * line can also be ended with the end of the file.
+ * Any character which follows the given escape character
+ * will be ignored. In addition, an escape character immediately before an
+ * end of line can be set to continue the line.
+ *
+ * @param startSequence the pattern's start sequence
+ * @param endSequence the pattern's end sequence
+ * @param token the token to be returned on success
+ * @param escapeCharacter the escape character
+ * @param breaksOnEOF indicates whether the end of the file successfully terminates this rule
+ * @param escapeContinuesLine indicates whether the specified escape character is used for line
+ * continuation, so that an end of line immediately after the escape character does not
+ * terminate the line, even if <code>breakOnEOL</code> is true
+ * @since 3.0
+ */
+ public RecursiveSingleLineRule(String startSequence, String endSequence, IToken token, char escapeCharacter, boolean breaksOnEOF, boolean escapeContinuesLine) {
+ super(startSequence, endSequence, token, escapeCharacter, breaksOnEOF, escapeContinuesLine);
+ this.startSequence = startSequence;
+ this.endSequence = endSequence;
+ rules = new ArrayList<IRule>();
+ startIndex = 0;
+ endIndex = 0;
+ }
+
+ public void addRule(SingleLineRule rule) {
+ rules.add(rule);
+ }
+
+ public IToken getSuccessToken() {
+ // We need to be aware of what success token we are referring to.
+ // The current internal rule index will help us determine which
+ // one.
+ if (evalIndex < rules.size()) {
+ SingleLineRule x = (SingleLineRule)rules.get(evalIndex);
+ return x.getSuccessToken();
+ }
+ return super.getSuccessToken();
+ }
+
+ protected void backupScanner(ICharacterScanner scanner, int position) {
+ int count = scanner.getColumn() - position;
+ while (count-- > 0)
+ scanner.unread();
+ }
+
+ public IToken evaluate(ICharacterScanner scanner, boolean resume) {
+ int column = scanner.getColumn();
+ // Check if we are at EOF, in which case rules don't hold
+ if (column < 0)
+ return Token.UNDEFINED;
+ if (!resume) {
+ evalIndex = 0;
+ // Check if we are within outer rule boundaries.
+ if (column >= endIndex || column < startIndex) {
+ // If not, then we should evaluate to see if the
+ // outer rule is true starting at the current position.
+ startIndex = scanner.getColumn();
+ if (super.evaluate(scanner, false) != Token.UNDEFINED) {
+ // Outer rule is true for a section. Now we can
+ // set the boundaries for the internal rules.
+ // End boundary for internal rules is the start of
+ // the end sequence.
+ endIndex = scanner.getColumn();
+ endBoundary = endIndex - endSequence.length();
+ // Back up scanner to just after start sequence.
+ backupScanner(scanner, startIndex + startSequence.length());
+ return super.getSuccessToken();
+ }
+ else
+ // Outer rule doesn't hold.
+ return Token.UNDEFINED;
+ }
+ }
+
+ // At this point, we want to subdivide up the area covered by the
+ // outer rule into success tokens for internal areas separated by
+ // areas of the outer rule.
+
+ int start = scanner.getColumn();
+ column = start;
+ while (column < endBoundary) {
+ while (evalIndex < rules.size()) {
+ SingleLineRule x = (SingleLineRule)rules.get(evalIndex);
+ IToken token = x.evaluate(scanner, false);
+ if (!token.isUndefined()) {
+ // Found internal token. If we had to read to get
+ // to the start of the internal token, then back up
+ // the scanner to the start of the internal token and
+ // return the initial read area as part of an outer token.
+ // Otherwise, return the internal token.
+ if (column == start) {
+ evalIndex = 0;
+ return token;
+ } else {
+ backupScanner(scanner, column);
+ return super.getSuccessToken();
+ }
+ }
+ ++evalIndex;
+ }
+ evalIndex = 0;
+ scanner.read();
+ ++column;
+ }
+
+ // Outside internal area. Read until end of outer area and return
+ // outer token.
+ while (column++ < endIndex)
+ scanner.read();
+ startIndex = 0;
+ endIndex = 0;
+ return super.getSuccessToken();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/RestrictedEndOfLineRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/RestrictedEndOfLineRule.java
new file mode 100644
index 0000000000..80f7904274
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/RestrictedEndOfLineRule.java
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors;
+
+import java.util.ArrayList;
+
+import org.eclipse.jface.text.rules.EndOfLineRule;
+import org.eclipse.jface.text.rules.ICharacterScanner;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.SingleLineRule;
+import org.eclipse.jface.text.rules.Token;
+
+public class RestrictedEndOfLineRule extends EndOfLineRule {
+
+ private ArrayList<IRule> rules;
+ private int startIndex;
+ private int endIndex;
+ private String startSequence;
+ private String restrictedChars;
+ /**
+ * Creates a rule for the given starting and ending sequence
+ * which, if detected, will return the specified token.
+ *
+ * @param startSequence the pattern's start sequence
+ * @param restrictedChars chars that stop the sequence
+ * @param token the token to be returned on success
+ */
+ public RestrictedEndOfLineRule(String startSequence, String restrictedChars, IToken token) {
+ this(startSequence, restrictedChars, token, (char) 0);
+ }
+
+ /**
+ * Creates a rule for the given starting and ending sequence
+ * which, if detected, will return the specified token.
+ * Any character which follows the given escape character
+ * will be ignored.
+ *
+ * @param startSequence the pattern's start sequence
+ * @param restrictedChars chars that stop the sequence
+ * @param token the token to be returned on success
+ * @param escapeCharacter the escape character
+ */
+ public RestrictedEndOfLineRule(String startSequence, String restrictedChars, IToken token, char escapeCharacter) {
+ this(startSequence, restrictedChars, token, escapeCharacter, false);
+ }
+
+ /**
+ * Creates a rule for the given starting and ending sequence
+ * which, if detected, will return the specified token. Alternatively, the
+ * line can also be ended with the end of the file.
+ * Any character which follows the given escape character
+ * will be ignored.
+ *
+ * @param startSequence the pattern's start sequence
+ * @param restrictedChars chars that stop the sequence
+ * @param token the token to be returned on success
+ * @param escapeCharacter the escape character
+ * @param breaksOnEOF indicates whether the end of the file successfully terminates this rule
+ * @since 2.1
+ */
+ public RestrictedEndOfLineRule(String startSequence, String restrictedChars, IToken token, char escapeCharacter, boolean breaksOnEOF) {
+ super(startSequence, token, escapeCharacter, breaksOnEOF);
+ this.startSequence = startSequence;
+ this.restrictedChars = restrictedChars;
+ rules = new ArrayList<IRule>();
+ startIndex = 0;
+ endIndex = 0;
+ }
+
+
+ public void addRule(SingleLineRule rule) {
+ rules.add(rule);
+ }
+
+
+ protected void backupScanner(ICharacterScanner scanner, int position) {
+ int count = scanner.getColumn() - position;
+ while (count-- > 0)
+ scanner.unread();
+ }
+
+ public IToken evaluate(ICharacterScanner scanner, boolean resume) {
+ int column = scanner.getColumn();
+ // Check if we are at EOF, in which case rules don't hold
+ if (column < 0)
+ return Token.UNDEFINED;
+ if (!resume) {
+ startIndex = scanner.getColumn();
+ if (super.evaluate(scanner, false) != Token.UNDEFINED) {
+ // Outer rule is true for a section. Now we can
+ // set the boundaries for the internal rules.
+ // End boundary for internal rules is the start of
+ // the end sequence.
+ endIndex = scanner.getColumn();
+ // Back up scanner to just after start sequence.
+ backupScanner(scanner, startIndex + startSequence.length());
+ }
+ else
+ // Base rule doesn't hold.
+ return Token.UNDEFINED;
+ }
+
+ // At this point, we want to check for restricted chars in the
+ // token. If we find them, we stop there.
+
+ int start = scanner.getColumn();
+ column = start;
+ while (column < endIndex) {
+ int ch = scanner.read();
+ if (ch == ICharacterScanner.EOF
+ || restrictedChars.indexOf(ch) >= 0) {
+ scanner.unread();
+ return getSuccessToken();
+ }
+ ++column;
+ }
+ startIndex = 0;
+ endIndex = 0;
+ return getSuccessToken();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/outline/AutoconfContentOutlinePage.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/outline/AutoconfContentOutlinePage.java
new file mode 100644
index 0000000000..1b1d79268b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/outline/AutoconfContentOutlinePage.java
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.outline;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.AutoconfEditor;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfElement;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
+
+
+public class AutoconfContentOutlinePage extends ContentOutlinePage {
+
+ private ITextEditor editor;
+ private IEditorInput input;
+
+ public AutoconfContentOutlinePage(AutoconfEditor editor) {
+ super();
+ this.editor = editor;
+ }
+
+ public void setInput(IEditorInput editorInput) {
+ this.input = editorInput;
+ update();
+ }
+
+ @SuppressWarnings("unchecked")
+ protected ISelection updateSelection(ISelection sel) {
+ ArrayList<AutoconfElement> newSelection= new ArrayList<AutoconfElement>();
+ if (sel instanceof IStructuredSelection) {
+ Iterator iter= ((IStructuredSelection)sel).iterator();
+ for (;iter.hasNext();) {
+ //ICElement elem= fInput.findEqualMember((ICElement)iter.next());
+ Object o = iter.next();
+ if (o instanceof AutoconfElement) {
+ newSelection.add((AutoconfElement)o);
+ }
+ }
+ }
+ return new StructuredSelection(newSelection);
+ }
+
+ public void update() {
+ //set the input so that the outlines parse can be called
+ //update the tree viewer state
+ final TreeViewer viewer = getTreeViewer();
+
+ if (viewer != null)
+ {
+ final Control control = viewer.getControl();
+ if (control != null && !control.isDisposed())
+ {
+ control.getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ if (!control.isDisposed()) {
+// control.setRedraw(false);
+// if (input != null)
+// viewer.setInput(input);
+// viewer.expandAll();
+// control.setRedraw(true);
+ ISelection sel= viewer.getSelection();
+ viewer.setSelection(updateSelection(sel));
+ viewer.refresh();
+ }
+ }
+ });
+ }
+ }
+ }
+
+ public void createControl(Composite parent) {
+
+ super.createControl(parent);
+
+ TreeViewer viewer= getTreeViewer();
+ viewer.setContentProvider(new AutoconfContentProvider(editor));
+ viewer.setLabelProvider(new AutoconfLabelProvider());
+ viewer.addSelectionChangedListener(this);
+
+ if (input != null)
+ viewer.setInput(input);
+ }
+
+ /*
+ * Change in selection
+ */
+ public void selectionChanged(SelectionChangedEvent event)
+ {
+ super.selectionChanged(event);
+
+ //find out which item in tree viewer we have selected, and set highlight range accordingly
+ ISelection selection = event.getSelection();
+ if (selection.isEmpty()) {
+ editor.resetHighlightRange();
+ } else {
+ AutoconfElement element = (AutoconfElement) ((IStructuredSelection) selection)
+ .getFirstElement();
+
+ try {
+ int offset = element.getStartOffset();
+ int length = element.getEndOffset() - offset;
+ editor.setHighlightRange(offset, length, true);
+ editor.selectAndReveal(offset, length);
+ } catch (IllegalArgumentException x) {
+ editor.resetHighlightRange();
+ }
+ }
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/outline/AutoconfContentProvider.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/outline/AutoconfContentProvider.java
new file mode 100644
index 0000000000..ea2e4db4db
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/outline/AutoconfContentProvider.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.outline;
+
+import org.eclipse.jface.text.BadPositionCategoryException;
+import org.eclipse.jface.text.DefaultPositionUpdater;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IPositionUpdater;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.AutoconfEditor;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfElement;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+
+public class AutoconfContentProvider implements ITreeContentProvider {
+
+ private IDocumentProvider documentProvider;
+ private AutoconfEditor editor;
+ protected final static String SECTION_POSITIONS = "section_positions";
+ protected IPositionUpdater positionUpdater = new DefaultPositionUpdater(SECTION_POSITIONS);
+
+ public AutoconfContentProvider(ITextEditor editor) {
+ if (editor instanceof AutoconfEditor) {
+ this.editor = (AutoconfEditor) editor;
+ }
+ this.documentProvider = editor.getDocumentProvider();
+ }
+
+ public void dispose() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ if (oldInput != null)
+ {
+ IDocument document = documentProvider.getDocument(oldInput);
+ if (document != null)
+ {
+ try
+ {
+ document.removePositionCategory(SECTION_POSITIONS);
+ }
+ catch (BadPositionCategoryException x)
+ {
+ }
+ document.removePositionUpdater(positionUpdater);
+ }
+ }
+
+ if (newInput != null)
+ {
+ IDocument document = documentProvider.getDocument(newInput);
+ if (document != null)
+ {
+ document.addPositionCategory(SECTION_POSITIONS);
+ document.addPositionUpdater(positionUpdater);
+ }
+ }
+ }
+
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement instanceof AutoconfElement) {
+ AutoconfElement element = (AutoconfElement)parentElement;
+ return element.getChildren();
+ }
+ return new Object[0];
+ }
+
+ public Object getParent(Object element) {
+ return null;
+ }
+
+ public boolean hasChildren(Object element) {
+ if (element instanceof AutoconfElement) {
+ return ((AutoconfElement)element).hasChildren();
+ }
+ return false;
+ }
+
+ public Object[] getElements(Object inputElement) {
+ return this.getChildren(editor.getRootElement());
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/outline/AutoconfLabelProvider.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/outline/AutoconfLabelProvider.java
new file mode 100644
index 0000000000..944718e741
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/outline/AutoconfLabelProvider.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc., (c) 2008 NOKIA 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
+ * Ed Swartz (NOKIA) - refactoring
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.outline;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfCaseConditionElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfCaseElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfElifElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfElseElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfForElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfIfElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfMacroArgumentElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfMacroElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfSelectElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfUntilElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfWhileElement;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.AutotoolsUIPluginImages;
+import org.eclipse.swt.graphics.Image;
+
+
+public class AutoconfLabelProvider implements ILabelProvider {
+
+ public AutoconfLabelProvider() {
+ super();
+ }
+
+ public void addListener(ILabelProviderListener listener) {
+ }
+
+ public void dispose() {
+ }
+
+ public boolean isLabelProperty(Object element, String property) {
+ return false;
+ }
+
+ public void removeListener(ILabelProviderListener listener) {
+ }
+
+ public Image getImage(Object element) {
+ if (element instanceof AutoconfIfElement)
+ return AutotoolsUIPluginImages.get(AutotoolsUIPluginImages.IMG_OBJS_IF);
+ else if (element instanceof AutoconfElseElement)
+ return AutotoolsUIPluginImages.get(AutotoolsUIPluginImages.IMG_OBJS_ELSE);
+ else if (element instanceof AutoconfElifElement)
+ return AutotoolsUIPluginImages.get(AutotoolsUIPluginImages.IMG_OBJS_ELIF);
+ else if (element instanceof AutoconfCaseElement)
+ return AutotoolsUIPluginImages.get(AutotoolsUIPluginImages.IMG_OBJS_CASE);
+ else if (element instanceof AutoconfCaseConditionElement)
+ return AutotoolsUIPluginImages.get(AutotoolsUIPluginImages.IMG_OBJS_CONDITION);
+ else if (element instanceof AutoconfForElement)
+ return AutotoolsUIPluginImages.get(AutotoolsUIPluginImages.IMG_OBJS_FOR);
+ else if (element instanceof AutoconfWhileElement)
+ return AutotoolsUIPluginImages.get(AutotoolsUIPluginImages.IMG_OBJS_WHILE);
+ else if (element instanceof AutoconfUntilElement)
+ return AutotoolsUIPluginImages.get(AutotoolsUIPluginImages.IMG_OBJS_WHILE); // TODO
+ else if (element instanceof AutoconfSelectElement)
+ return AutotoolsUIPluginImages.get(AutotoolsUIPluginImages.IMG_OBJS_WHILE); // TODO
+ else if (element instanceof AutoconfMacroElement)
+ return AutotoolsUIPluginImages.get(AutotoolsUIPluginImages.IMG_OBJS_ACMACRO);
+ else if (element instanceof AutoconfMacroArgumentElement)
+ return AutotoolsUIPluginImages.get(AutotoolsUIPluginImages.IMG_OBJS_ACMACRO_ARG); // TODO
+ return null;
+ }
+
+ public String getText(Object element) {
+ if (element instanceof AutoconfElement) {
+ AutoconfElement e = (AutoconfElement)element;
+ String result;
+ String name = e.getName();
+ if (name.length() > 31)
+ name = name.substring(0, 31) + "...";
+ String var = e.getVar();
+ if (var != null) {
+ if (var.length() > 15)
+ var = var.substring(0, 15) + "...";
+ var = " " + var; //$NON-NLS-1$
+ } else {
+ var = "";
+ }
+ result = (name + var).replaceAll("(\r|\n| |\t|\f)+", " ");
+ return result;
+ } else if (element instanceof String) {
+ return (String) element;
+ }
+ return "";
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfCaseConditionElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfCaseConditionElement.java
new file mode 100644
index 0000000000..d06e73d091
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfCaseConditionElement.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+public class AutoconfCaseConditionElement extends AutoconfElement {
+
+ public AutoconfCaseConditionElement() {
+ super("");
+ }
+
+ public AutoconfCaseConditionElement(String name) {
+ super(name);
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfCaseElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfCaseElement.java
new file mode 100644
index 0000000000..c8ad284dd4
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfCaseElement.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+public class AutoconfCaseElement extends AutoconfElement {
+
+ public AutoconfCaseElement() {
+ super("case"); //$NON-NLS-1$
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElement.java
new file mode 100644
index 0000000000..4a804cb0be
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElement.java
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+
+public class AutoconfElement {
+
+ protected String name;
+ protected String var;
+ protected int startOffset;
+ protected int endOffset;
+ protected ArrayList<AutoconfElement> children;
+ protected AutoconfElement parent;
+ private IDocument document;
+
+ public AutoconfElement(String name) {
+ this(name, null);
+ }
+
+ public AutoconfElement(String name, String var) {
+ this.name = name;
+ this.var = var;
+ this.startOffset = 0;
+ this.children = new ArrayList<AutoconfElement>();
+ }
+
+
+ public String toString() {
+ String source = getSource();
+ if (source == null) {
+ StringBuffer kids = new StringBuffer();
+ for (Iterator<AutoconfElement> iterator = children.iterator(); iterator.hasNext();) {
+ AutoconfElement kid = (AutoconfElement) iterator.next();
+ kids.append(kid.toString());
+ kids.append(","); //$NON-NLS-1$
+ }
+ source = kids.toString();
+ }
+ return getClass().getSimpleName() + ": '" + source + "'"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public void addChild(AutoconfElement element) {
+ children.add(element);
+ if (element.getParent() == null)
+ element.setParent(this);
+ }
+
+ public void addSibling(AutoconfElement element) {
+ parent.addChild(element);
+ }
+
+ public AutoconfElement getLastChild() {
+ if (hasChildren())
+ return (AutoconfElement)children.get(children.size() - 1);
+ return null;
+ }
+
+ public AutoconfElement getParent() {
+ return parent;
+ }
+
+ public void setParent(AutoconfElement parent) {
+ this.parent = parent;
+ }
+
+ public AutoconfElement[] getChildren() {
+ return (AutoconfElement[]) children.toArray(new AutoconfElement[children.size()]);
+ }
+
+ public boolean hasChildren() {
+ return !children.isEmpty();
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String string) {
+ this.name = string;
+ }
+
+
+ public String getVar() {
+ return var;
+ }
+
+ public void setVar(String value) {
+ var = value;
+ }
+
+ public void setDocument(IDocument document) {
+ this.document = document;
+ }
+
+ public IDocument getDocument() {
+ return document;
+ }
+
+ public void setStartOffset(int offset) {
+ this.startOffset = offset;
+ }
+
+ public int getStartOffset() {
+ return startOffset;
+ }
+
+ public void setEndOffset(int offset) {
+ this.endOffset = offset;
+ }
+
+ public int getEndOffset() {
+ return endOffset;
+ }
+
+ public String getSource() {
+ if (document != null && startOffset >= 0 && endOffset >= startOffset) {
+ try {
+ return document.get(startOffset, endOffset - startOffset);
+ } catch (BadLocationException e) {
+ return null;
+ }
+ }
+ return null;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElifElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElifElement.java
new file mode 100644
index 0000000000..a990ea82d5
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElifElement.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+public class AutoconfElifElement extends AutoconfElement {
+
+ public AutoconfElifElement() {
+ super("elif"); //$NON-NLS-1$
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElseElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElseElement.java
new file mode 100644
index 0000000000..bbaa2c2c76
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElseElement.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+public class AutoconfElseElement extends AutoconfElement {
+
+ public AutoconfElseElement() {
+ super("else"); //$NON-NLS-1$
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfForElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfForElement.java
new file mode 100644
index 0000000000..6b0ffcc9a4
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfForElement.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+public class AutoconfForElement extends AutoconfElement {
+
+ public AutoconfForElement() {
+ super("for"); //$NON-NLS-1$
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfIfElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfIfElement.java
new file mode 100644
index 0000000000..6ad658979c
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfIfElement.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+public class AutoconfIfElement extends AutoconfElement {
+
+ public AutoconfIfElement() {
+ super("if"); //$NON-NLS-1$
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroArgumentElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroArgumentElement.java
new file mode 100644
index 0000000000..96e3e3d5f3
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroArgumentElement.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+/**
+ * This is a macro argument node. It may also hold
+ * other AutoconfMacroElements. The source range includes any quotes around an argument
+ * but the #getName() has them stripped.
+ * @author eswartz
+ *
+ */
+public class AutoconfMacroArgumentElement extends AutoconfElement {
+
+ public AutoconfMacroArgumentElement() {
+ super(""); // //$NON-NLS-N$
+ }
+ public AutoconfMacroArgumentElement(String name) {
+ super(name);
+ }
+ public String getVar() {
+ return super.getVar();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroDetector.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroDetector.java
new file mode 100644
index 0000000000..b5c1373583
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroDetector.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc., (c) 2008 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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
+ * Ed Swartz (Nokia) - refactoring
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+import java.util.regex.Pattern;
+
+/**
+ *
+ */
+public class AutoconfMacroDetector implements IAutoconfMacroDetector {
+
+ private static final Pattern AUTOCONF_MACRO_PATTERN = Pattern.compile("PKG_.*|AC_.*|AM_.*|m4.*"); //$NON-NLS-1$
+
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.cdt.autotools.core.ui.editors.parser.IAutoconfMacroDetector#isMacroIdentifier(java.lang.String)
+ */
+ public boolean isMacroIdentifier(String name) {
+ return AUTOCONF_MACRO_PATTERN.matcher(name).matches();
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroElement.java
new file mode 100644
index 0000000000..1168f910cc
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroElement.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ * Ed Swartz (NOKIA Inc) - support standalone parser
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+/**
+ * A call to a macro.
+ * <p>
+ * Macro element now stores arguments as AutoconfMacroElement or AutoconfMacroArgument children
+ *
+ */
+public class AutoconfMacroElement extends AutoconfElement {
+
+ public AutoconfMacroElement(String name) {
+ super(name);
+ }
+
+ public String getVar() {
+ if (children.size() > 0)
+ return getParameter(0);
+ else
+ return null;
+ }
+ public int getParameterCount() {
+ return children.size();
+ }
+
+ public String getParameter(int num) {
+ return ((AutoconfElement) children.get(num)).getName();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfOutlineErrorHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfOutlineErrorHandler.java
new file mode 100644
index 0000000000..e684ab250f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfOutlineErrorHandler.java
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+import org.eclipse.ui.IStorageEditorInput;
+import org.eclipse.ui.texteditor.MarkerUtilities;
+
+
+public class AutoconfOutlineErrorHandler {
+
+ public static final String PARSE_ERROR_MARKER_ID = AutotoolsUIPlugin.PLUGIN_ID
+ + ".outlineparsefileerror"; //$NON-NLS-1$
+
+ private IFile file;
+ private IDocument document;
+
+ public AutoconfOutlineErrorHandler(IStorageEditorInput input, IDocument document)
+ {
+ this.document = document;
+ IWorkspaceRoot root = CCorePlugin.getWorkspace().getRoot();
+ try {
+ IPath absPath = input.getStorage().getFullPath();
+ IPath rootPath = root.getLocation();
+ IPath relPath = new Path("");
+
+ for (int i = 0; i < rootPath.segmentCount(); ++i) {
+ relPath = relPath.append("../"); //$NON-NLS-1$
+ }
+ relPath = relPath.append(absPath);
+ this.file = root.getFileForLocation(relPath);
+ if (this.file == null) {
+ this.file = root.getFile(relPath);
+ }
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public IDocument getDocument() {
+ return document;
+ }
+
+ public void handleError(ParseException e) {
+ if (!file.exists())
+ return;
+
+ int lineNumber = e.getLineNumber();
+
+ Map<String, Object> map = new HashMap<String, Object>();
+ MarkerUtilities.setLineNumber(map, lineNumber);
+ MarkerUtilities.setMessage(map, e.getMessage());
+ map.put(IMarker.MESSAGE, e.getMessage());
+ map.put(IMarker.LOCATION, file.getFullPath().toString());
+
+ Integer charStart = getCharOffset(lineNumber, e.getStartColumn());
+ if (charStart != null) {
+ map.put(IMarker.CHAR_START, charStart);
+ }
+ Integer charEnd = getCharOffset(lineNumber, e.getEndColumn());
+ if (charEnd != null) {
+ map.put(IMarker.CHAR_END, charEnd);
+ }
+
+ // FIXME: add severity level
+ map.put(IMarker.SEVERITY, new Integer(e.getSeverity()));
+
+ try {
+ MarkerUtilities.createMarker(file, map, PARSE_ERROR_MARKER_ID);
+ } catch (CoreException ee) {
+ ee.printStackTrace();
+ }
+ return;
+ }
+
+ public void removeAllExistingMarkers() {
+ if (!file.exists())
+ return;
+
+ try {
+ file.deleteMarkers(PARSE_ERROR_MARKER_ID, true, IResource.DEPTH_ZERO);
+ } catch (CoreException e1) {
+ e1.printStackTrace();
+ }
+ }
+
+ public void removeExistingMarkers(int offset, int length) {
+ if (!file.exists())
+ return;
+
+ try {
+ IMarker[] markers = file.findMarkers(PARSE_ERROR_MARKER_ID, true, IResource.DEPTH_ZERO);
+ // Delete all markers that start in the given document range.
+ for (int i = 0; i < markers.length; ++i) {
+ IMarker marker = markers[i];
+ int charEnd = MarkerUtilities.getCharEnd(marker);
+ int charStart = MarkerUtilities.getCharStart(marker);
+ if (charStart >= offset && charEnd <= (offset + length))
+ marker.delete();
+ }
+ } catch (CoreException e1) {
+ e1.printStackTrace();
+ }
+ }
+
+ private Integer getCharOffset(int lineNumber, int columnNumber) {
+ try {
+ return new Integer(document.getLineOffset(lineNumber) + columnNumber);
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfParser.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfParser.java
new file mode 100644
index 0000000000..76963f3f40
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfParser.java
@@ -0,0 +1,1042 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Red Hat, Inc., (c) 2008 Nokia
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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
+ * Ed Swartz (Nokia) - refactoring
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.AutoconfEditorMessages;
+
+
+/**
+ * Tokenizing autoconf parser, based on original work by Jeff Johnston
+ * @author eswartz
+ */
+public class AutoconfParser {
+
+ public static final String MISSING_SPECIFIER = "MissingSpecifier"; //$NON-NLS-1$
+ public static final String INVALID_SPECIFIER = "InvalidSpecifier"; //$NON-NLS-1$
+ public static final String INVALID_TERMINATION = "InvalidTermination"; //$NON-NLS-1$
+ public static final String UNTERMINATED_CONSTRUCT = "UnterminatedConstruct"; //$NON-NLS-1$
+ public static final String MISSING_CONDITION = "MissingCondition"; //$NON-NLS-1$
+ public static final String INVALID_ELIF = "InvalidElif"; //$NON-NLS-1$
+ public static final String INVALID_ELSE = "InvalidElse"; //$NON-NLS-1$
+ public static final String INVALID_FI = "InvalidFi"; //$NON-NLS-1$
+ public static final String INVALID_DONE = "InvalidDone"; //$NON-NLS-1$
+ public static final String INVALID_ESAC = "InvalidEsac"; //$NON-NLS-1$
+ public static final String INVALID_DO = "InvalidDo"; //$NON-NLS-1$
+ public static final String INVALID_THEN = "InvalidThen"; //$NON-NLS-1$
+ public static final String INVALID_IN = "InvalidIn"; //$NON-NLS-1$
+ public static final String IMPROPER_CASE_CONDITION = "ImproperCaseCondition"; //$NON-NLS-1$
+ public static final String UNTERMINATED_CASE_CONDITION = "UnterminatedCaseCondition"; //$NON-NLS-1$
+ public static final String UNTERMINATED_INLINE_DOCUMENT = "UnterminatedInlineDocument"; //$NON-NLS-1$
+ public static final String INCOMPLETE_INLINE_MARKER="IncompleteInlineMarker"; //$NON-NLS-1$
+ public static final String MISSING_INLINE_MARKER="MissingInlineMarker"; //$NON-NLS-1$
+ public static final String UNMATCHED_RIGHT_PARENTHESIS = "UnmatchedRightParenthesis"; //$NON-NLS-1$
+ public static final String UNMATCHED_LEFT_PARENTHESIS = "UnmatchedLeftParenthesis"; //$NON-NLS-1$
+
+ private IAutoconfErrorHandler errorHandler;
+ private IAutoconfMacroValidator macroValidator;
+ private AutoconfTokenizer tokenizer;
+ private IAutoconfMacroDetector macroDetector;
+
+ private static final String M4_BUILTINS =
+ "define undefine defn pushdef popdef indir builtin ifdef ifelse shift reverse cond " + //$NON-NLS-1$
+ "dumpdef traceon traceoff debugmode debugfile dnl changequote changecom changeword " + //$NON-NLS-1$
+ "m4wrap " + //$NON-NLS-1$
+ "include sinclude divert undivert divnum len index regexp substr translit patsubst " + //$NON-NLS-1$
+ "format incr decr eval syscmd esyscmd sysval mkstemp maketemp errprint m4exit " + //$NON-NLS-1$
+ "__file__ __line__ __program__ "; //$NON-NLS-1$
+
+ private static List<String> m4builtins = new ArrayList<String>();
+ static {
+ m4builtins.addAll(Arrays.asList(M4_BUILTINS.split(" "))); //$NON-NLS-1$
+ }
+
+ /**
+ * Create a parser for autoconf-style sources.
+ * @param errorHandler
+ * @param macroDetector
+ * @param macroValidator
+ */
+ public AutoconfParser(IAutoconfErrorHandler errorHandler,
+ IAutoconfMacroDetector macroDetector,
+ IAutoconfMacroValidator macroValidator) {
+ this.errorHandler = errorHandler;
+ this.macroDetector = macroDetector;
+ this.macroValidator = macroValidator;
+ }
+
+ /**
+ * Parse the given document and produce an AutoconfElement tree
+ * @param errorHandler
+ * @param macroValidator
+ * @param document
+ * @return element tree
+ */
+ public AutoconfElement parse(IDocument document) {
+ return parse(document, true);
+ }
+
+ /**
+ * Parse the given document and produce an AutoconfElement tree,
+ * and control whether the initial quoting style is m4 style (`...')
+ * or autoconf style ([ ... ]).
+ * @param errorHandler
+ * @param macroValidator
+ * @param document
+ * @param useAutoconfQuotes
+ * @return element tree
+ */
+ public AutoconfElement parse(IDocument document, boolean useAutoconfQuotes) {
+ this.tokenizer = new AutoconfTokenizer(document, errorHandler);
+ if (useAutoconfQuotes)
+ tokenizer.setM4Quote("[", "]"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ AutoconfElement root = new AutoconfRootElement();
+ Token eof = parseTopLevel(root);
+
+ root.setStartOffset(0);
+ root.setDocument(document);
+
+ setSourceEnd(root, eof);
+
+ return root;
+ }
+
+
+ static class BlockEndCondition extends Exception {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+ private Token token;
+
+ public BlockEndCondition(Token token) {
+ this.token = token;
+ }
+
+ public Token getToken() {
+ return token;
+ }
+
+ }
+
+ static class ExprEndCondition extends Exception {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+ private Token token;
+
+ public ExprEndCondition(Token token) {
+ this.token = token;
+ }
+
+ public Token getToken() {
+ return token;
+ }
+
+ }
+
+ /**
+ * Parse individual top-level nodes: divide text into macro calls
+ * and recognized shell constructs. Anything else is not accounted for.
+ * @param parent
+ * @return
+ */
+ protected Token parseTopLevel(AutoconfElement parent) {
+ while (true) {
+ try {
+ parseStatement(parent);
+ } catch (BlockEndCondition e) {
+ // don't terminate here; we may have constructs closed too early
+ Token token = tokenizer.peekToken();
+ if (token.getType() == ITokenConstants.EOF)
+ return token;
+ }
+ }
+ }
+
+ /**
+ * Parse a block of nodes, which starts with an expression and contains
+ * subnodes. Divide text into macro calls and recognized shell constructs.
+ * Anything else is not accounted for.
+ * @param parent
+ */
+ protected void parseBlock(AutoconfElement parent, Token open, AutoconfElement block) throws BlockEndCondition {
+ parent.addChild(block);
+
+ setSourceStart(block, open);
+
+ // get the expression part
+ Token token;
+ try {
+ token = parseBlockExpression(open, block);
+ } catch (BlockEndCondition e) {
+ setSourceEndBefore(block, e.getToken());
+ throw e;
+ }
+
+ // parse the block proper
+ if (token.getType() != ITokenConstants.EOF) {
+ while (true) {
+ try {
+ parseStatement(block);
+ } catch (BlockEndCondition e) {
+ setSourceEnd(block, e.getToken());
+ return;
+ }
+ }
+ } else {
+ setSourceEnd(block, token);
+ }
+ }
+
+ private Token parseBlockExpression(Token open, AutoconfElement block) throws BlockEndCondition {
+ Token token;
+ try {
+ if (block instanceof AutoconfIfElement
+ || block instanceof AutoconfElifElement
+ || block instanceof AutoconfCaseElement
+ || block instanceof AutoconfWhileElement) {
+ token = parseExpression(block);
+ } else if (block instanceof AutoconfForElement) {
+ token = parseForExpression(block);
+ } else {
+ // no expression
+ return open;
+ }
+ block.setVar(getTokenSpanTextBetween(open, token));
+ } catch (BlockEndCondition e) {
+ // oops, premature end
+ setSourceEnd(block, e.getToken());
+ throw e;
+ }
+
+ // check for expected token
+ while (true) {
+ token = tokenizer.readToken();
+ if (token.getType() == ITokenConstants.EOF)
+ break;
+ if (token.getType() != ITokenConstants.EOL)
+ break;
+ }
+
+ if (token.getType() == ITokenConstants.SH_DO) {
+ checkBlockValidity(block, token,
+ new Class[] { AutoconfForElement.class, AutoconfWhileElement.class },
+ INVALID_DO);
+ }
+ else if (token.getType() == ITokenConstants.SH_THEN) {
+ checkBlockValidity(block, token,
+ new Class[] { AutoconfIfElement.class, AutoconfElifElement.class },
+ INVALID_THEN);
+ }
+ else {
+ String exp;
+ if (block instanceof AutoconfIfElement || block instanceof AutoconfElifElement)
+ exp = "then";
+ else
+ exp = "do";
+
+ handleError(block, token, AutoconfEditorMessages.getFormattedString(MISSING_SPECIFIER, exp));
+
+ // assume we're still in the block...
+ tokenizer.unreadToken(token);
+ }
+ return token;
+ }
+
+ /**
+ * Parse a case statement. Scoop up statements into case conditional blocks.
+ * <pre>
+ * 'case' EXPR 'in'
+ * { EXPR ')' { STMTS } ';;' }
+ * 'esac'
+ * </pre>
+ * @param parent
+ * @return
+ */
+ protected void parseCaseBlock(AutoconfElement parent, Token open, AutoconfElement block) throws BlockEndCondition {
+ parent.addChild(block);
+
+ setSourceStart(block, open);
+
+ // get the case expression, terminating at 'in'
+ Token token;
+ try {
+ token = parseCaseExpression(block);
+ } catch (BlockEndCondition e) {
+ // oops, premature end
+ setSourceEnd(block, e.getToken());
+ throw e;
+ }
+
+ block.setVar(getTokenSpanTextBetween(open, token));
+
+ // now get the statements, which are themselves blocks... just read statements
+ // that terminate with ';;' and stuff those into blocks.
+
+ while (true) {
+ AutoconfCaseConditionElement condition = new AutoconfCaseConditionElement();
+
+ // skip EOLs and get the first "real" token
+ while (true) {
+ token = tokenizer.readToken();
+ setSourceStart(condition, token);
+ if (token.getType() == ITokenConstants.EOF)
+ break;
+ if (token.getType() == ITokenConstants.EOL)
+ continue;
+ break;
+ }
+
+ if (token.getType() == ITokenConstants.SH_ESAC) {
+ break;
+ }
+
+ try {
+ Token start = token;
+ token = parseCaseExpression(condition);
+ condition.setName(getTokenSpanTextFromUpTo(start, token));
+
+ while (true) {
+ parseStatement(condition);
+ }
+ } catch (BlockEndCondition e) {
+ setSourceEnd(condition, e.getToken());
+
+ if (condition.getSource().length() > 0)
+ block.addChild(condition);
+
+ if (e.getToken().getType() != ITokenConstants.SH_CASE_CONDITION_END) {
+ token = e.getToken();
+ break;
+ }
+ }
+ }
+
+ setSourceEnd(block, token);
+
+ if (token.getType() != ITokenConstants.SH_ESAC) {
+ handleError(parent, token, AutoconfEditorMessages.getFormattedString(UNTERMINATED_CONSTRUCT, block.getName()));
+ }
+ }
+
+ private String getTokenSpanTextBetween(Token open, Token close) {
+ int startOffset = open.getOffset() + open.getLength();
+ int endOffset = close.getOffset();
+ if (open.getDocument() != close.getDocument())
+ return open.getText();
+
+ String text;
+ try {
+ text = open.getDocument().get(startOffset, endOffset - startOffset).trim();
+ } catch (BadLocationException e) {
+ text = open.getText();
+ // TODO: error
+ }
+
+ return text;
+ }
+
+ private String getTokenSpanTextFromUpTo(Token open, Token close) {
+ int startOffset = open.getOffset();
+ int endOffset = close.getOffset();
+ if (open.getDocument() != close.getDocument())
+ return open.getText();
+
+ String text;
+ try {
+ text = open.getDocument().get(startOffset, endOffset - startOffset).trim();
+ } catch (BadLocationException e) {
+ text = open.getText();
+ // TODO: error
+ }
+
+ return text;
+ }
+ private void setSourceStart(AutoconfElement block, Token open) {
+ int offset = open.getOffset();
+ block.setDocument(open.getDocument());
+ block.setStartOffset(offset);
+ }
+
+ private void setSourceEnd(AutoconfElement block, Token close) {
+ int offset = close.getOffset() + close.getLength();
+ if (block.getDocument() != null && block.getDocument() != close.getDocument())
+ throw new IllegalStateException();
+ block.setDocument(close.getDocument());
+ block.setEndOffset(offset);
+ }
+
+ private void setSourceEndBefore(AutoconfElement block, Token close) {
+ int offset = close.getOffset();
+ if (block.getDocument() != null && block.getDocument() != close.getDocument())
+ throw new IllegalStateException();
+ block.setDocument(close.getDocument());
+ block.setEndOffset(offset);
+ }
+
+ /**
+ * Parse a single statement (macro call or a shell construct).
+ * This can recursively invoke parseBlock() or parseStatement() to populate the tree.
+ * Whenever a token terminates a block, we check its validity and then throw BlockEndCondition.
+ * @param parent the parent into which to add statements. The type of this element is used
+ * to validate the legality of block closing tokens.
+ */
+ protected void parseStatement(AutoconfElement parent) throws BlockEndCondition {
+
+ boolean atStart = true;
+
+ while (true) {
+ Token token = tokenizer.readToken();
+
+ switch (token.getType()) {
+ // 0. Check EOF
+ case ITokenConstants.EOF:
+ AutoconfElement element = parent;
+ while (element != null && !(element instanceof AutoconfRootElement)) {
+ handleError(element, token, AutoconfEditorMessages.getFormattedString(UNTERMINATED_CONSTRUCT, element.getName()));
+ element = element.getParent();
+ }
+ throw new BlockEndCondition(token);
+
+
+ // 1. Check for end of statement
+ case ITokenConstants.EOL:
+ case ITokenConstants.SEMI:
+ return;
+
+
+ // 2. Check macro expansions
+ case ITokenConstants.WORD:
+ checkMacro(parent, token);
+ atStart = false;
+ break;
+
+ // Check for shell constructs. These should appear at the start of a line
+ // or after a semicolon. If they don't, just report an error and continue,
+ // to be tolerant of our own lax parsing.
+
+ // 3.a) Check dollar variables
+ case ITokenConstants.SH_DOLLAR:
+ // skip the next token
+ atStart = false;
+ token = tokenizer.readToken();
+ continue;
+
+ // 3.b) Look for if/else/elif/fi constructs,
+ // being tolerant of nesting problems by allowing
+ // stranded else/elif nodes but reporting errors.
+ case ITokenConstants.SH_IF:
+ checkLineStart(parent, token, atStart);
+ parseBlock(parent, token, new AutoconfIfElement());
+ break;
+
+ case ITokenConstants.SH_ELIF:
+ checkLineStart(parent, token, atStart);
+ checkBlockValidity(
+ parent, token,
+ new Class[] { AutoconfIfElement.class, AutoconfElifElement.class },
+ INVALID_ELIF);
+ parseBlock(parent, token, new AutoconfElifElement());
+ token = tokenizer.peekToken();
+ throw new BlockEndCondition(token);
+
+ case ITokenConstants.SH_ELSE:
+ checkLineStart(parent, token, atStart);
+ checkBlockValidity(
+ parent, token,
+ new Class[] { AutoconfIfElement.class, AutoconfElifElement.class },
+ INVALID_ELSE);
+ parseBlock(parent, token, new AutoconfElseElement());
+ token = tokenizer.peekToken();
+ throw new BlockEndCondition(token);
+
+ case ITokenConstants.SH_FI:
+ checkLineStart(parent, token, atStart);
+ checkBlockValidity(
+ parent, token,
+ new Class[] { AutoconfIfElement.class, AutoconfElifElement.class, AutoconfElseElement.class },
+ INVALID_FI);
+ throw new BlockEndCondition(token);
+
+
+ // 4. Look for for/while loops
+ case ITokenConstants.SH_FOR:
+ checkLineStart(parent, token, atStart);
+ parseBlock(parent, token, new AutoconfForElement());
+ break;
+
+ case ITokenConstants.SH_WHILE:
+ checkLineStart(parent, token, atStart);
+ parseBlock(parent, token, new AutoconfWhileElement());
+ break;
+
+ case ITokenConstants.SH_UNTIL:
+ checkLineStart(parent, token, atStart);
+ parseBlock(parent, token, new AutoconfUntilElement());
+ break;
+
+ case ITokenConstants.SH_SELECT:
+ checkLineStart(parent, token, atStart);
+ parseBlock(parent, token, new AutoconfSelectElement());
+ break;
+
+ case ITokenConstants.SH_DONE:
+ checkLineStart(parent, token, atStart);
+ checkBlockValidity(
+ parent, token,
+ new Class[] { AutoconfForElement.class, AutoconfWhileElement.class,
+ AutoconfUntilElement.class, AutoconfSelectElement.class },
+ INVALID_DONE);
+ throw new BlockEndCondition(token);
+
+ // 5. Look for case statements
+ case ITokenConstants.SH_CASE:
+ checkLineStart(parent, token, atStart);
+ parseCaseBlock(parent, token, new AutoconfCaseElement());
+ break;
+
+ case ITokenConstants.SH_CASE_CONDITION_END:
+ checkBlockValidity(
+ parent, token,
+ new Class[] { AutoconfCaseConditionElement.class },
+ IMPROPER_CASE_CONDITION);
+ throw new BlockEndCondition(token);
+
+ case ITokenConstants.SH_ESAC:
+ checkLineStart(parent, token, atStart);
+ checkBlockValidity(
+ parent, token,
+ // note: we don't strictly recurse here, so accept either parent
+ new Class[] { AutoconfCaseElement.class, AutoconfCaseConditionElement.class },
+ INVALID_ESAC);
+ throw new BlockEndCondition(token);
+
+
+ // 6. Check for HERE documents
+ case ITokenConstants.SH_HERE:
+ case ITokenConstants.SH_HERE_DASH:
+
+ parseHERE(parent, token);
+ break;
+ }
+ }
+ }
+
+ private void checkLineStart(AutoconfElement parent, Token token, boolean atStart) {
+ if (!atStart) {
+ handleError(parent, token, AutoconfEditorMessages.getFormattedString(INVALID_TERMINATION, token.getText()));
+ }
+ }
+
+ /**
+ * Parse the Here document, whose control token is provided (SH_HERE or SH_HERE_DASH).
+ * Contents are thrown away except for any macro calls.
+ * @param parent
+ * @param controlToken
+ */
+ private void parseHERE(AutoconfElement parent, Token controlToken) {
+ Token token = tokenizer.readToken();
+ if (token.getType() == ITokenConstants.EOL || token.getType() == ITokenConstants.EOF) {
+ handleError(parent, token,
+ AutoconfEditorMessages.getString(INCOMPLETE_INLINE_MARKER));
+
+ } else {
+ String hereTag = token.getText();
+
+ boolean atEOL = false;
+ while (true) {
+ token = tokenizer.readToken();
+ if (token.getType() == ITokenConstants.EOF) {
+ handleError(parent, token, AutoconfEditorMessages.getFormattedString(UNTERMINATED_CONSTRUCT, parent.getName()));
+ break;
+ } else if (token.getType() == ITokenConstants.EOL) {
+ atEOL = true;
+ } else {
+ if (atEOL && token.getText().equals(hereTag)) {
+ // only the end if it is also followed by EOL without any whitespace
+ Token eol = tokenizer.readToken();
+ if (eol.getType() == ITokenConstants.EOL && eol.getOffset() == token.getOffset() + token.getLength()) {
+ break;
+ }
+ }
+ if (token.getType() == ITokenConstants.WORD) {
+ checkMacro(parent, token);
+ }
+ atEOL = false;
+ }
+ }
+ }
+ }
+
+ /**
+ * Parse through a single expression up to a semicolon or newline.
+ * Add a macro call to the element or just return upon finding the desired token.
+ * Whenever a token terminates the expression, we check its validity and return the final token
+ * Throw {@link BlockEndCondition} if an unexpected token was found.
+ * @param parent the parent into which to add statements. The type of this element is used
+ * to validate the legality of block closing tokens.
+ */
+ protected Token parseExpression(AutoconfElement parent) throws BlockEndCondition {
+
+ while (true) {
+ Token token = tokenizer.readToken();
+
+ // 0. Ignore comments (tokenizer skipped them!)
+
+ switch (token.getType()) {
+ // 1. Check EOF
+ case ITokenConstants.EOF:
+ throw new BlockEndCondition(token);
+
+ // 2. Check macro expansions
+ case ITokenConstants.WORD:
+ token = checkMacro(parent, token);
+ break;
+
+ // 3. Check expression terminators
+ case ITokenConstants.SEMI:
+ case ITokenConstants.EOL:
+ return token;
+
+ // 4. Handle variables
+ case ITokenConstants.SH_DOLLAR:
+ token = tokenizer.readToken();
+ break;
+
+ case ITokenConstants.SH_IN:
+ // in 'for' or 'select, an 'in' may occur before 'do'
+ if (!(parent instanceof AutoconfForElement)
+ && !(parent instanceof AutoconfSelectElement))
+ return token;
+ // fall through
+
+ // 5. Abort on unexpected tokens
+ case ITokenConstants.SH_DO:
+ case ITokenConstants.SH_THEN:
+ handleError(parent, token, AutoconfEditorMessages.getFormattedString(INVALID_SPECIFIER, token.getText()));
+ tokenizer.unreadToken(token);
+ // close enough...
+ return token;
+
+ case ITokenConstants.SH_ESAC:
+ case ITokenConstants.SH_CASE:
+ case ITokenConstants.SH_CASE_CONDITION_END:
+ case ITokenConstants.SH_FOR:
+ case ITokenConstants.SH_IF:
+ case ITokenConstants.SH_ELIF:
+ case ITokenConstants.SH_ELSE:
+ case ITokenConstants.SH_FI:
+ case ITokenConstants.SH_DONE:
+ handleError(parent, token, AutoconfEditorMessages.getFormattedString(UNTERMINATED_CONSTRUCT, parent.getName()));
+ tokenizer.unreadToken(token);
+ throw new BlockEndCondition(token);
+ }
+ }
+ }
+
+ /**
+ * Parse through a single expression up to 'do'.
+ * Add a macro call to the element or just return upon finding the desired token.
+ * Whenever a token terminates the expression, we check its validity and then throw ExprEndCondition.
+ * Throw {@link BlockEndCondition} if an unexpected token was found.
+ * @param parent the parent into which to add statements. The type of this element is used
+ * to validate the legality of block closing tokens.
+ */
+ protected Token parseForExpression(AutoconfElement parent) throws BlockEndCondition {
+ while (true) {
+ Token token = tokenizer.readToken();
+
+ // 0. Ignore comments (tokenizer skipped them!)
+
+ // 1. Check EOF
+ if (token.getType() == ITokenConstants.EOF) {
+ throw new BlockEndCondition(token);
+ }
+
+ // 2. Check macro expansions
+ else if (token.getType() == ITokenConstants.WORD) {
+ token = checkMacro(parent, token);
+ }
+
+ // 3. Check expression terminators -- not ';' here, but 'do'
+ else if (token.getType() == ITokenConstants.SH_DO) {
+ tokenizer.unreadToken(token);
+ return tokenizer.peekToken();
+ }
+
+ // 4. Abort on unexpected tokens
+ else switch (token.getType()) {
+ case ITokenConstants.SH_THEN:
+ handleError(parent, token, AutoconfEditorMessages.getFormattedString(INVALID_SPECIFIER, token.getText()));
+ tokenizer.unreadToken(token);
+ // close enough...
+ //throw new ExprEndCondition(token);
+ return token;
+
+ case ITokenConstants.SH_ESAC:
+ case ITokenConstants.SH_CASE:
+ case ITokenConstants.SH_CASE_CONDITION_END:
+ case ITokenConstants.SH_FOR:
+ case ITokenConstants.SH_IF:
+ case ITokenConstants.SH_ELIF:
+ case ITokenConstants.SH_ELSE:
+ case ITokenConstants.SH_FI:
+ case ITokenConstants.SH_DONE:
+ handleError(parent, token, AutoconfEditorMessages.getFormattedString(UNTERMINATED_CONSTRUCT, parent.getName()));
+ tokenizer.unreadToken(token);
+ throw new BlockEndCondition(token);
+ }
+ }
+ }
+
+ /**
+ * Parse through a single expression up to 'in'.
+ * Add a macro call to the element or just return upon finding the desired token.
+ * Whenever a token terminates the expression, we check its validity and then throw ExprEndCondition.
+ * Throw {@link BlockEndCondition} if an unexpected token was found.
+ * @param parent the parent into which to add statements. The type of this element is used
+ * to validate the legality of block closing tokens.
+ */
+ protected Token parseCaseExpression(AutoconfElement parent) throws BlockEndCondition {
+ while (true) {
+ Token token = tokenizer.readToken();
+
+ // 0. Ignore comments (tokenizer skipped them!)
+
+ // 1. Check EOF
+ if (token.getType() == ITokenConstants.EOF) {
+ throw new BlockEndCondition(token);
+ }
+
+ // 2. Check macro expansions
+ else if (token.getType() == ITokenConstants.WORD) {
+ token = checkMacro(parent, token);
+ }
+
+ // 3. Check expression terminators
+ else if (parent instanceof AutoconfCaseElement && token.getType() == ITokenConstants.SH_IN) {
+ return token;
+ }
+ else if (parent instanceof AutoconfCaseConditionElement && token.getType() == ITokenConstants.RPAREN) {
+ return token;
+ }
+
+ // 4. Abort on unexpected tokens
+ else switch (token.getType()) {
+ case ITokenConstants.SEMI:
+ case ITokenConstants.SH_IN:
+ case ITokenConstants.RPAREN:
+ case ITokenConstants.SH_DO:
+ case ITokenConstants.SH_THEN:
+ if (parent instanceof AutoconfCaseElement)
+ handleError(parent, token, AutoconfEditorMessages.getString(INVALID_IN));
+ else
+ handleError(parent, token, AutoconfEditorMessages.getString(IMPROPER_CASE_CONDITION));
+ // close enough...
+ return token;
+
+ case ITokenConstants.SH_ESAC:
+ case ITokenConstants.SH_CASE:
+ case ITokenConstants.SH_CASE_CONDITION_END:
+ case ITokenConstants.SH_FOR:
+ case ITokenConstants.SH_IF:
+ case ITokenConstants.SH_ELIF:
+ case ITokenConstants.SH_ELSE:
+ case ITokenConstants.SH_FI:
+ case ITokenConstants.SH_DONE:
+ handleError(parent, token, AutoconfEditorMessages.getFormattedString(UNTERMINATED_CONSTRUCT, parent.getName()));
+ tokenizer.unreadToken(token);
+ throw new BlockEndCondition(token);
+ }
+ }
+ }
+
+ /**
+ * Check a given close block token against the current parent by checking that
+ * the parent's class is one of classes, If a match happens,
+ * optionally push back the token if it will be used to parse new statements in the parent.
+ * Report an error if the parent is not one of the expected kinds.
+ * @param parent
+ * @param token
+ * @param classes
+ */
+ private void checkBlockValidity(
+ AutoconfElement parent,
+ Token token,
+ Class<?>[] classes,
+ String errorMessage) {
+ for (int i = 0; i < classes.length; i++) {
+ if (classes[i].isInstance(parent)) {
+ return;
+ }
+ }
+
+ // not a match
+ handleError(parent, token,
+ AutoconfEditorMessages.getFormattedString(errorMessage, parent.getName(), token.getText()));
+ }
+
+ /**
+ * Check whether the given token is part of a macro, and parse it as such
+ * if necessary.
+ * @param parent
+ * @param token
+ * @return Token last read for the macro call
+ */
+ private Token checkMacro(AutoconfElement parent, Token token) {
+ String name = token.getText();
+
+ boolean hasArguments = tokenizer.peekToken().getType() == ITokenConstants.LPAREN;
+ if (macroDetector != null && macroDetector.isMacroIdentifier(name)) {
+ // ok
+ } else if (m4builtins.contains(name)) {
+ // all of these except dnl take arguments
+ if (!name.equals("dnl") && !hasArguments) //$NON-NLS-1$
+ return token;
+ } else {
+ return token;
+ }
+
+ AutoconfMacroElement macro = new AutoconfMacroElement(name);
+ token = parseMacro(macro, token);
+
+ // handle special macros here
+ if ("dnl".equals(name)) { //$NON-NLS-1$
+ // consume to EOL
+ while (true) {
+ token = tokenizer.readToken();
+ if (token.getType() == ITokenConstants.EOF || token.getType() == ITokenConstants.EOL)
+ break;
+ }
+
+ // ignore macro entirely
+ macro = null;
+ } else if ("changequote".equals(name)) { //$NON-NLS-1$
+ // change quote delimiters
+ validateMacroParameterCount(macro, token, 2);
+
+ // GNU behavior for invalid argument count
+ String parm0 = "`"; //$NON-NLS-1$
+ String parm1 = "'"; //$NON-NLS-1$
+ if (macro.getParameterCount() >= 1)
+ parm0 = macro.getParameter(0);
+ if (macro.getParameterCount() >= 2)
+ parm1 = macro.getParameter(1);
+
+ tokenizer.setM4Quote(parm0, parm1);
+ } else if ("changecom".equals(name)) { //$NON-NLS-1$
+ // change comment delimiters
+ validateMacroParameterCount(macro, token, 2);
+
+ // GNU behavior for invalid argument count
+ String parm0 = "#"; //$NON-NLS-1$
+ String parm1 = "\n"; //$NON-NLS-1$
+ if (macro.getParameterCount() >= 1)
+ parm0 = macro.getParameter(0);
+ if (macro.getParameterCount() >= 2)
+ parm1 = macro.getParameter(1);
+
+ tokenizer.setM4Comment(parm0, parm1);
+ }
+
+ if (macro != null) {
+ parent.addChild(macro);
+ }
+
+ // now validate that the macro is properly terminated
+ if (!(parent instanceof AutoconfMacroArgumentElement)
+ && !(parent instanceof AutoconfMacroElement)
+ && !(parent instanceof AutoconfForElement)) {
+ Token peek = tokenizer.peekToken();
+ if (peek.getType() == ITokenConstants.RPAREN) {
+ handleError(macro, peek, AutoconfEditorMessages.getString(UNMATCHED_RIGHT_PARENTHESIS));
+ }
+ }
+
+ return token;
+ }
+
+ private void validateMacroParameterCount(AutoconfMacroElement macro, Token token, int count) {
+ if (macro.getParameterCount() < count) {
+ handleError(macro, token, AutoconfEditorMessages.getFormattedString("M4MacroArgsTooFew", macro.getName(), new Integer(2))); //$NON-NLS-1$
+ } else if (macro.getParameterCount() > count) {
+ handleError(macro, token, AutoconfEditorMessages.getFormattedString("M4MacroArgsTooMany", macro.getName(), new Integer(2))); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * Start parsing a macro call at a suspected macro expansion location.
+ * @param macro
+ * @param line the line containing the start of the
+ * @param parent
+ * @return last token parsed
+ */
+ protected Token parseMacro(AutoconfMacroElement macro, Token macroName) {
+ setSourceStart(macro, macroName);
+
+ // parse any arguments
+ tokenizer.setM4Context(true);
+
+ Token token = tokenizer.readToken();
+ if (token.getType() == ITokenConstants.LPAREN) {
+ token = parseMacroArguments(macro, token);
+ setSourceEnd(macro, token);
+ } else {
+ tokenizer.unreadToken(token);
+ setSourceEnd(macro, macroName);
+ }
+
+ tokenizer.setM4Context(false);
+
+ // validate macro arguments?
+ if (macroValidator != null) {
+ try {
+ macroValidator.validateMacroCall(macro);
+ } catch (ParseException e) {
+ errorHandler.handleError(e);
+ }
+ }
+
+ return token;
+ }
+
+ /**
+ * Parse the arguments for the given macro. These are not interpreted as shell
+ * constructs but just as text with possibly more macro expansions inside.
+ * @param macro
+ * @return final token (')')
+ */
+ protected Token parseMacroArguments(AutoconfMacroElement macro, Token lparen) {
+ Token argStart = null;
+ Token argEnd = null;
+ Token token;
+
+ // When parsing, we want to ignore the whitespace around the arguments.
+ // So, instead of taking the source range "between" a parenthesis and a comma,
+ // track the exact tokens forming the start and end of an argument, defaulting
+ // to the borders of the parentheses and commas if no text is included.
+
+ StringBuffer argBuffer = new StringBuffer();
+ AutoconfMacroArgumentElement arg = new AutoconfMacroArgumentElement();
+
+ while (true) {
+ token = tokenizer.readToken();
+
+ if (token.getType() == ITokenConstants.EOL) {
+ if (argBuffer.length() > 0)
+ argBuffer.append(token.getText());
+ continue;
+ }
+
+ if (token.getType() == ITokenConstants.COMMA
+ || token.getType() == ITokenConstants.RPAREN
+ || token.getType() == ITokenConstants.EOF) {
+
+ arg.setName(argBuffer.toString());
+ argBuffer.setLength(0);
+
+ if (argStart != null && argEnd != null) {
+ setSourceStart(arg, argStart);
+ setSourceEnd(arg, argEnd);
+ } else if (argEnd != null) {
+ setSourceStart(arg, argStart);
+ setSourceEndBefore(arg, token);
+ } else {
+ // empty argument
+ setSourceStart(arg, token);
+ setSourceEndBefore(arg, token);
+ }
+
+ macro.addChild(arg);
+
+ if (token.getType() != ITokenConstants.COMMA)
+ break;
+
+ argStart = null;
+ argEnd = null;
+
+ arg = new AutoconfMacroArgumentElement();
+
+ } else {
+ if (argStart == null) {
+ argStart = token;
+ }
+ argEnd = token;
+
+ if (argBuffer.length() > 0 && token.followsSpace())
+ argBuffer.append(' ');
+ argBuffer.append(token.getText());
+
+ // handle nested macro calls in arguments
+ if (token.getType() == ITokenConstants.WORD) {
+ argEnd = checkMacro(arg, token);
+ }
+ }
+ }
+
+ if (token.getType() != ITokenConstants.RPAREN) {
+ handleError(macro, token, AutoconfEditorMessages.getString(UNMATCHED_LEFT_PARENTHESIS));
+ }
+
+ // note: moved 15-char truncation to AutoconfLabelProvider
+ AutoconfElement[] children = macro.getChildren();
+ if (children.length > 0)
+ macro.setVar(children[0].getVar());
+
+ return token;
+ }
+
+
+
+ protected void handleError(AutoconfElement element, Token token, String message) {
+ handleMessage(element, token, message, IMarker.SEVERITY_ERROR);
+ }
+ protected void handleWarning(AutoconfElement element, Token token, String message) {
+ handleMessage(element, token, message, IMarker.SEVERITY_WARNING);
+ }
+ protected void handleMessage(AutoconfElement element, Token token, String message, int severity) {
+ if (errorHandler != null) {
+ int lineNumber = 0;
+ int startColumn = 0;
+ int endColumn = 0;
+ try {
+ lineNumber = token.getDocument().getLineOfOffset(token.getOffset());
+ int lineOffs = token.getDocument().getLineOffset(lineNumber);
+ startColumn = token.getOffset() - lineOffs;
+ endColumn = startColumn + token.getLength();
+ } catch (BadLocationException e) {
+ // Don't care if we blow up trying to issue marker
+ }
+ errorHandler.handleError(new ParseException(
+ message,
+ token.getOffset(),
+ token.getOffset() + token.getLength(),
+ lineNumber,
+ startColumn, endColumn,
+ severity));
+ }
+ }
+
+ public IAutoconfErrorHandler getErrorHandler() {
+ return errorHandler;
+ }
+}
+
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfRootElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfRootElement.java
new file mode 100644
index 0000000000..105d00b88d
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfRootElement.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+public class AutoconfRootElement extends AutoconfElement {
+
+ public AutoconfRootElement() {
+ super(""); //$NON-NLS-1$
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfSelectElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfSelectElement.java
new file mode 100644
index 0000000000..204a45985e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfSelectElement.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+public class AutoconfSelectElement extends AutoconfElement {
+
+ public AutoconfSelectElement() {
+ super("select"); //$NON-NLS-1$
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfTokenizer.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfTokenizer.java
new file mode 100644
index 0000000000..6063be4716
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfTokenizer.java
@@ -0,0 +1,435 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.AutoconfEditorMessages;
+
+
+/**
+ * This tokenizer traverses autotools-style text (m4 or configure.ac) to support the
+ * autoconf parser. It tracks the current context (m4 macro call or shell commands)
+ * to detect appropriate tokens, and tracks the m4 current quote style as well.
+ * <p>
+ * In m4 mode, its primary purpose is to find word boundaries, detect comments and quoted
+ * strings, and to find the macro punctuation tokens. It will not interpret anything
+ * (e.g. '$1' inside a macro) -- this is up to the parser.
+ * <p>
+ * In shell script mode, its primary purpose is to identify enough
+ * tokens to get a general picture of the structure of source for use by the autoconf
+ * parser. This isn't intended to be used for full shell script parsing. In fact,
+ * aside from the known tokens and identifiers, only individual characters will be returned.
+ * <p>
+ * Both modes know about "words" or identifiers and use the same syntax to detect these.
+ * It's expected that the parser will detect a word as a macro or possible macro and
+ * switch the mode of the tokenizer to fit. The parser should invoke "setM4Context(...)"
+ * (and "unreadToken" if necessary) to switch modes.
+ * @author eswartz
+ *
+ */
+public class AutoconfTokenizer {
+
+ private static final String UNTERMINATED_STRING = "UnterminatedString"; //$NON-NLS-1$
+ public static final String UNMATCHED_RIGHT_QUOTE = "UnmatchedRightQuote"; //$NON-NLS-1$
+ public static final String UNMATCHED_LEFT_QUOTE = "UnmatchedLeftQuote"; //$NON-NLS-1$
+ public static final String UNMATCHED_CLOSE_COMMENT = "UnmatchedCloseComment"; //$NON-NLS-1$
+
+ private IDocument document;
+ private int offset;
+ private String m4OpenQuote;
+ private String m4CloseQuote;
+ private String m4OpenComment;
+ private String m4CloseComment;
+ private char[] chars;
+ private int startOffset;
+ private boolean isM4Context;
+ private Token eofToken;
+ private IAutoconfErrorHandler errorHandler;
+
+ /** Create a tokenizer for a document. */
+ public AutoconfTokenizer(IDocument document, IAutoconfErrorHandler errorHandler) {
+ if (document == null /* || macroDetector == null*/)
+ throw new IllegalArgumentException();
+ this.document = document;
+ this.errorHandler = errorHandler;
+
+ this.chars = document.get().toCharArray();
+ this.offset = 0;
+
+ this.eofToken = new Token(ITokenConstants.EOF, "", document, chars.length, 0);
+
+ this.m4OpenQuote = "`"; //$NON-NLS-1$
+ this.m4CloseQuote = "'"; //$NON-NLS-1$
+ this.m4OpenComment = "#"; //$NON-NLS-1$
+ this.m4CloseComment = "\n"; //$NON-NLS-1$
+ }
+
+ /**
+ * Tell whether the tokenizer considers itself to be in an m4 context.
+ * This determines what kinds of tokens it returns.
+ * @return
+ */
+ public boolean isM4Context() {
+ return isM4Context;
+ }
+
+ /**
+ * Switch the tokenizer into or out of m4 context.
+ * @return
+ */
+ public void setM4Context(boolean flag) {
+ isM4Context = flag;
+ }
+
+ /**
+ * Set the m4 quote delimiters
+ */
+ public void setM4Quote(String open, String close) {
+ this.m4OpenQuote = open;
+ this.m4CloseQuote = close;
+ }
+
+ /**
+ * Set the m4 comment delimiters
+ */
+ public void setM4Comment(String open, String close) {
+ this.m4OpenComment = open;
+ this.m4CloseComment = close;
+ }
+
+ /** Push back the given token. This allows the tokenizer to restart from its start position,
+ * potentially in a different context. */
+ public void unreadToken(Token token) {
+ if (token.getLength() > 0 && offset == token.getOffset())
+ throw new IllegalStateException();
+ offset = token.getOffset();
+ }
+
+ /** Read the next token. Returns an EOF token at EOF. */
+ public Token readToken() {
+ if (offset >= chars.length)
+ return eofToken;
+
+ char ch = chars[offset];
+
+ // skip whitespace (but not EOL)
+ while (isWhitespace(ch)) {
+ offset++;
+ if (offset >= chars.length)
+ return eofToken;
+ ch = chars[offset];
+ }
+
+ // in shell mode, strip comments up to eol
+ if (!isM4Context && ch == '#') {
+ while (offset < chars.length) {
+ ch = chars[offset];
+ if (ch == '\n')
+ break;
+ offset++;
+ }
+
+ // keep inside doc if we didn't find that EOL
+ if (offset >= chars.length)
+ offset--;
+ }
+
+ startOffset = offset;
+ StringBuffer buffer = new StringBuffer();
+
+ // check EOL
+ if (ch == '\r' || ch == '\n') {
+ buffer.append(ch);
+ offset++;
+ if (ch == '\r' && offset < chars.length && chars[offset] == '\n') {
+ buffer.append(chars[offset++]);
+ }
+ return makeToken(ITokenConstants.EOL, buffer.toString());
+ }
+
+ // TODO: this parser always uses fixed logic for identifier reading, ignoring m4's "changeword"
+ if (isLeadIdentifierChar(ch)) {
+ return parseWord(ch);
+ }
+
+ // check comments and quotes
+ if (isM4Context) {
+ if (lookAhead(m4OpenComment)) {
+ boolean found = false;
+ // keep reading until the close comment (these are NOT nested)
+ while (offset < chars.length) {
+ if (lookAhead(m4CloseComment)) {
+ found = true;
+ break;
+ }
+ offset++;
+ }
+ if (!found) {
+ handleError(startOffset, offset, AutoconfEditorMessages.getFormattedString(UNMATCHED_CLOSE_COMMENT,
+ m4CloseComment.equals("\n") ? "newline" : m4CloseComment)); //$NON-NLS-1$
+ }
+ return makeToken(ITokenConstants.M4_COMMENT);
+ }
+
+ if (lookAhead(m4OpenQuote)) {
+ return parseQuote();
+ }
+ }
+
+ // check shell punctuation
+ if (!isM4Context) {
+ if (ch == ';' && offset + 1 < chars.length && chars[offset + 1] == ';') {
+ offset += 2;
+ return makeToken(ITokenConstants.SH_CASE_CONDITION_END);
+ }
+ if (ch == '<' && offset + 1 < chars.length && chars[offset + 1] == '<') {
+ offset += 2;
+ if (offset < chars.length && chars[offset] == '-') {
+ offset++;
+ return makeToken(ITokenConstants.SH_HERE_DASH);
+ } else {
+ return makeToken(ITokenConstants.SH_HERE);
+ }
+ }
+ switch (ch) {
+ case '$':
+ offset++;
+ return makeToken(ITokenConstants.SH_DOLLAR);
+ case '[':
+ offset++;
+ return makeToken(ITokenConstants.SH_LBRACKET);
+ case ']':
+ offset++;
+ return makeToken(ITokenConstants.SH_RBRACKET);
+ case '{':
+ offset++;
+ return makeToken(ITokenConstants.SH_LBRACE);
+ case '}':
+ offset++;
+ return makeToken(ITokenConstants.SH_RBRACE);
+ case '\'':
+ return parseString(ITokenConstants.SH_STRING_SINGLE, ch);
+ case '\"':
+ return parseString(ITokenConstants.SH_STRING_DOUBLE, ch);
+ case '`':
+ return parseString(ITokenConstants.SH_STRING_BACKTICK, ch);
+ }
+ }
+
+ // check common punctuation
+ if (ch == ';') {
+ offset++;
+ return makeToken(ITokenConstants.SEMI);
+ }
+ if (ch == ',') {
+ offset++;
+ return makeToken(ITokenConstants.COMMA);
+ }
+ if (ch == '(') {
+ offset++;
+ return makeToken(ITokenConstants.LPAREN);
+ }
+ if (ch == ')') {
+ offset++;
+ return makeToken(ITokenConstants.RPAREN);
+ }
+
+ // unknown text
+ offset++;
+ return makeToken(ITokenConstants.TEXT);
+ }
+
+ private Token parseWord(char ch) {
+ StringBuffer buffer = new StringBuffer();
+
+ buffer.append(ch);
+ offset++;
+ do {
+ if (offset >= chars.length)
+ break;
+ ch = chars[offset];
+ if (!isIdentifierChar(ch))
+ break;
+ buffer.append(ch);
+ offset++;
+ } while (true);
+
+ String text = buffer.toString();
+
+ if (!isM4Context) {
+ // detect sh tokens
+ if ("case".equals(text))
+ return makeToken(ITokenConstants.SH_CASE, text);
+ if ("in".equals(text))
+ return makeToken(ITokenConstants.SH_IN, text);
+ if ("esac".equals(text))
+ return makeToken(ITokenConstants.SH_ESAC, text);
+ if ("while".equals(text))
+ return makeToken(ITokenConstants.SH_WHILE, text);
+ if ("select".equals(text))
+ return makeToken(ITokenConstants.SH_SELECT, text);
+ if ("until".equals(text))
+ return makeToken(ITokenConstants.SH_UNTIL, text);
+ if ("for".equals(text))
+ return makeToken(ITokenConstants.SH_FOR, text);
+ if ("do".equals(text))
+ return makeToken(ITokenConstants.SH_DO, text);
+ if ("done".equals(text))
+ return makeToken(ITokenConstants.SH_DONE, text);
+ if ("if".equals(text))
+ return makeToken(ITokenConstants.SH_IF, text);
+ if ("then".equals(text))
+ return makeToken(ITokenConstants.SH_THEN, text);
+ if ("else".equals(text))
+ return makeToken(ITokenConstants.SH_ELSE, text);
+ if ("elif".equals(text))
+ return makeToken(ITokenConstants.SH_ELIF, text);
+ if ("fi".equals(text))
+ return makeToken(ITokenConstants.SH_FI, text);
+ }
+
+ // other identifier-looking word
+ return makeToken(ITokenConstants.WORD, text);
+ }
+
+ private Token parseQuote() {
+ // read text, honoring nested quotes, but don't put the outermost quotes in the token
+
+ StringBuffer buffer = new StringBuffer();
+
+ int quoteLevel = 1;
+ // keep reading until the close quote
+ while (offset < chars.length) {
+ if (lookAhead(m4CloseQuote)) {
+ quoteLevel--;
+ if (quoteLevel == 0)
+ break;
+ buffer.append(m4CloseQuote);
+ } else if (lookAhead(m4OpenQuote)) {
+ buffer.append(m4OpenQuote);
+ quoteLevel++;
+ } else {
+ buffer.append(chars[offset]);
+ offset++;
+ }
+ }
+
+ if (quoteLevel > 0) {
+ handleError(startOffset, offset, AutoconfEditorMessages.getFormattedString(UNMATCHED_LEFT_QUOTE, m4CloseQuote));
+ } else if (quoteLevel < 0) {
+ handleError(startOffset, offset, AutoconfEditorMessages.getFormattedString(UNMATCHED_RIGHT_QUOTE, m4OpenQuote));
+ }
+
+ return makeToken(ITokenConstants.M4_STRING, buffer.toString());
+ }
+
+ private Token parseString(int type, char terminal) {
+ startOffset = offset;
+ offset++;
+
+ StringBuffer buffer = new StringBuffer();
+
+ char ch = 0;
+ while (offset < chars.length) {
+ ch = chars[offset++];
+ if (ch == '\\') {
+ if (offset < chars.length)
+ buffer.append(chars[offset++]);
+ else
+ buffer.append(ch);
+ } else if (ch == terminal) {
+ break;
+ } else {
+ buffer.append(ch);
+ }
+ }
+
+ if (ch != terminal) {
+ handleError(startOffset, offset, AutoconfEditorMessages.getFormattedString(UNTERMINATED_STRING, "" + ch));
+ }
+
+ return makeToken(type, buffer.toString());
+ }
+
+ private void handleError(int start, int end,
+ String message) {
+ if (errorHandler != null) {
+ int lineNumber = 0;
+ int startColumn = 0;
+ int endColumn = 0;
+ try {
+ lineNumber = document.getLineOfOffset(start);
+ int lineOffs = document.getLineOffset(lineNumber);
+ startColumn = start - lineOffs;
+ endColumn = end - lineOffs;
+ } catch (BadLocationException e) {
+ // Don't care if we blow up trying to issue marker
+ }
+ errorHandler.handleError(new ParseException(
+ message,
+ start, end,
+ lineNumber,
+ startColumn, endColumn,
+ IMarker.SEVERITY_ERROR));
+ }
+ }
+
+ /**
+ * Look ahead for the given string. If found, return true, and have
+ * offset updated. Otherwise, return false with offset unchanged.
+ * @param keyword
+ * @param text
+ * @return
+ */
+ private boolean lookAhead(String keyword) {
+ int length = keyword.length();
+ if (offset + length > chars.length) {
+ return false;
+ }
+ for (int idx = 0; idx < length; idx++) {
+ if (chars[offset + idx] != keyword.charAt(idx))
+ return false;
+ }
+ offset += length;
+ return true;
+ }
+
+ private boolean isWhitespace(char ch) {
+ return ch == ' ' || ch == '\t' || ch == '\f';
+ }
+
+ private Token makeToken(int type) {
+ return new Token(type,
+ new String(chars, startOffset, offset - startOffset),
+ document, startOffset, offset - startOffset);
+ }
+
+ private Token makeToken(int type, String text) {
+ return new Token(type, text, document, startOffset, offset - startOffset);
+ }
+
+ private boolean isIdentifierChar(char ch) {
+ return isLeadIdentifierChar(ch) || (ch >= '0' && ch <= '9');
+ }
+
+ private boolean isLeadIdentifierChar(char ch) {
+ return (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') || ch == '_';
+ }
+
+ public Token peekToken() {
+ Token token = readToken();
+ unreadToken(token);
+ return token;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfUntilElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfUntilElement.java
new file mode 100644
index 0000000000..979ffe4940
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfUntilElement.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+public class AutoconfUntilElement extends AutoconfElement {
+
+ public AutoconfUntilElement() {
+ super("until"); //$NON-NLS-1$
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfWhileElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfWhileElement.java
new file mode 100644
index 0000000000..169edd7ed0
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfWhileElement.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+public class AutoconfWhileElement extends AutoconfElement {
+
+ public AutoconfWhileElement() {
+ super("while"); //$NON-NLS-1$
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfErrorHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfErrorHandler.java
new file mode 100644
index 0000000000..1363240bbc
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfErrorHandler.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+
+/**
+ * Clients implement this interface to handle errors encountered while parsing.
+ * @author eswartz
+ *
+ */
+public interface IAutoconfErrorHandler {
+
+ /**
+ * Handle an exception associated with the given element
+ * @param exception the exception to handle; has a line number
+ * at the time of call
+ */
+ void handleError(ParseException exception);
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfMacroDetector.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfMacroDetector.java
new file mode 100644
index 0000000000..e4387316e5
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfMacroDetector.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+
+/**
+ * Clients implement this interface to identify what identifiers represent
+ * macros for the autoconf tree.
+ * @author eswartz
+ *
+ */
+public interface IAutoconfMacroDetector {
+
+ /**
+ * Tell if this identifier should be treated as an m4 macro call.
+ * The identifier has already been judged to be a valid candidate
+ * (i.e. it's not quoted).
+ * @param name the string to check
+ */
+ boolean isMacroIdentifier(String name);
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfMacroValidator.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfMacroValidator.java
new file mode 100644
index 0000000000..2a54ee4773
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfMacroValidator.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+
+/**
+ * Clients implement this interface to validate macro calls.
+ * @author eswartz
+ *
+ */
+public interface IAutoconfMacroValidator {
+
+ /**
+ * Validate the given macro call.
+ * @param element macro call, never <code>null</code>
+ * @throws ParseException if the call doesn't match the expected number of elements
+ */
+ void validateMacroCall(AutoconfMacroElement element) throws ParseException;
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IMacroDetector.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IMacroDetector.java
new file mode 100644
index 0000000000..b225942cfe
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IMacroDetector.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+/**
+ * Clients implement this interface to detect whether a given identifier
+ * represents a known or potential macro in m4 or configure.ac text.
+ * @author eswartz
+ *
+ */
+public interface IMacroDetector {
+ boolean isMacro(String identifier);
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/ITokenConstants.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/ITokenConstants.java
new file mode 100644
index 0000000000..b665115f8d
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/ITokenConstants.java
@@ -0,0 +1,87 @@
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+public interface ITokenConstants {
+
+ /** end of file */
+ public static final int EOF = 0;
+ /** end of line */
+ public static final int EOL = 1;
+
+ /** an open parenthesis */
+ public static final int LPAREN = 2;
+ /** a close parenthesis */
+ public static final int RPAREN = 3;
+ /** a comma */
+ public static final int COMMA = 4;
+ /** a semicolon */
+ public static final int SEMI = 5;
+
+ /** a word (either m4 word or shell identifier-looking word) */
+ public static final int WORD = 6;
+
+ /** other text (usually punctuation or number, one char at a time) */
+ public static final int TEXT = 7;
+
+ /** an m4 string (the text does not contain the outermost quotes) */
+ public static final int M4_STRING = 21;
+ /** an m4 comment (as determined by changecomment, NOT dnl) */
+ public static final int M4_COMMENT = 22;
+
+ /** the sh 'if' token */
+ public static final int SH_IF = 40;
+ /** the sh 'then' token */
+ public static final int SH_THEN = 41;
+ /** the sh 'else' token */
+ public static final int SH_ELSE = 42;
+ /** the sh 'elif' token */
+ public static final int SH_ELIF = 43;
+ /** the sh 'fi' token */
+ public static final int SH_FI = 44;
+
+ /** the sh 'while' token */
+ public static final int SH_WHILE = 45;
+ /** the sh 'for' token */
+ public static final int SH_FOR = 46;
+ /** the sh 'select' token */
+ public static final int SH_SELECT = 47;
+ /** the sh 'until' token */
+ public static final int SH_UNTIL = 48;
+ /** the sh 'do' token */
+ public static final int SH_DO = 49;
+ /** the sh 'done' token */
+ public static final int SH_DONE = 50;
+ /** the sh 'case' token */
+
+ public static final int SH_CASE = 51;
+ /** the sh 'in' token */
+ public static final int SH_IN = 52;
+ /** the sh ';;' token */
+ public static final int SH_CASE_CONDITION_END = 53;
+ /** the sh 'esac' token */
+ public static final int SH_ESAC = 54;
+
+ /** the sh '$' token */
+ public static final int SH_DOLLAR = 60;
+
+ /** the sh '{' token */
+ public static final int SH_LBRACE = 61;
+ /** the sh '}' token */
+ public static final int SH_RBRACE = 62;
+ /** the sh '[' token */
+ public static final int SH_LBRACKET = 63;
+ /** the sh ']' token */
+ public static final int SH_RBRACKET = 64;
+
+ /** the sh '<<' token */
+ public static final int SH_HERE = 65;
+ /** the sh '<<-' token */
+ public static final int SH_HERE_DASH = 66;
+ /** an sh double-quoted string */
+ public static final int SH_STRING_DOUBLE = 67;
+ /** an sh single-quoted string */
+ public static final int SH_STRING_SINGLE = 68;
+ /** an sh backtick-quoted string */
+ public static final int SH_STRING_BACKTICK = 69;
+
+
+} \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/ParseException.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/ParseException.java
new file mode 100644
index 0000000000..f0bc442469
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/ParseException.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+public class ParseException extends Exception {
+
+ static final long serialVersionUID = 1;
+ String message;
+ int severity;
+ int lineNumber;
+ int startColumn;
+ int endColumn;
+ private int startOffset;
+ private int endOffset;
+ public int getEndColumn() {
+ return endColumn;
+ }
+ public void setEndColumn(int endColumn) {
+ this.endColumn = endColumn;
+ }
+ public int getLineNumber() {
+ return lineNumber;
+ }
+ public void setLineNumber(int lineNumber) {
+ this.lineNumber = lineNumber;
+ }
+ public String getMessage() {
+ return message;
+ }
+ public void setMessage(String message) {
+ this.message = message;
+ }
+ public int getStartColumn() {
+ return startColumn;
+ }
+ public void setStartColumn(int startColumn) {
+ this.startColumn = startColumn;
+ }
+ public ParseException(String message,
+ int startOffset, int endOffset,
+ int lineNumber, int startColumn, int endColumn, int severity) {
+ super();
+ this.message = message;
+ this.startOffset = startOffset;
+ this.endOffset = endOffset;
+ this.lineNumber = lineNumber;
+ this.startColumn = startColumn;
+ this.endColumn = endColumn;
+ this.severity = severity;
+ }
+ public int getSeverity() {
+ return severity;
+ }
+ public void setSeverity(int severity) {
+ this.severity = severity;
+ }
+ public int getStartOffset() {
+ return startOffset;
+ }
+ public int getEndOffset() {
+ return endOffset;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/Token.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/Token.java
new file mode 100644
index 0000000000..9690363b4b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/Token.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+import org.eclipse.jface.text.IDocument;
+
+/**
+ * A single token parsed from an autotools-style file. This represents m4 and sh
+ * tokens. Punctuation characters shared by both are not in a namespace.
+ *
+ * @author eswartz
+ *
+ */
+public class Token implements ITokenConstants {
+ /** Type:
+ * @see ITokenConstants
+ */
+ final int type;
+ /**
+ * Text of token, possibly interpreted or reduced from original characters
+ */
+ final String text;
+ /**
+ * Offset of token before interpretation
+ */
+ final int offset;
+ /**
+ * Length of token before interpretation
+ */
+ final int length;
+ /**
+ * The document providing the text
+ */
+ final IDocument document;
+
+ public Token(int type, String text, IDocument document, int offset, int length) {
+ this.type = type;
+ this.text = text;
+ this.document = document;
+ this.offset = offset;
+ this.length = length;
+ }
+
+ public String toString() {
+ return text;
+ }
+
+ public int getType() {
+ return type;
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public IDocument getDocument() {
+ return document;
+ }
+
+ public int getOffset() {
+ return offset;
+ }
+
+ public int getLength() {
+ return length;
+ }
+
+ public boolean followsSpace() {
+ char[] text = document.get().toCharArray();
+ if (offset == 0)
+ return false;
+ return (" \t\r\n\f".indexOf(text[offset - 1]) >= 0);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/AbstractAutotoolsCPropertyTab.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/AbstractAutotoolsCPropertyTab.java
new file mode 100644
index 0000000000..3459ea07fb
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/AbstractAutotoolsCPropertyTab.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import org.eclipse.cdt.managedbuilder.ui.properties.AbstractCBuildPropertyTab;
+
+public abstract class AbstractAutotoolsCPropertyTab extends
+ AbstractCBuildPropertyTab {
+
+ public boolean isIndexerAffected() {
+ return false;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/AutotoolsConsole.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/AutotoolsConsole.java
new file mode 100644
index 0000000000..982764a120
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/AutotoolsConsole.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2004, 2009 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc - Adapted for Autotools usage
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import org.eclipse.cdt.ui.IBuildConsoleManager;
+import org.eclipse.core.resources.IProject;
+
+public class AutotoolsConsole extends Console {
+ IProject project;
+ IBuildConsoleManager fConsoleManager;
+
+ private static final String CONTEXT_MENU_ID = "CAutotoolsConsole"; //$NON-NLS-1$
+ private static final String CONSOLE_NAME = ConsoleMessages.getString("AutotoolsConsole.name"); //$NON-NLS-1$
+
+ public AutotoolsConsole() {
+ super(CONSOLE_NAME, CONTEXT_MENU_ID);
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/AutotoolsUIPluginImages.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/AutotoolsUIPluginImages.java
new file mode 100644
index 0000000000..7314abcbd0
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/AutotoolsUIPluginImages.java
@@ -0,0 +1,133 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007, 2009 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * QNX Software System
+ * Red Hat Inc. - completely modified for Autotools usage
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+import org.eclipse.swt.graphics.Image;
+
+
+/**
+ * Bundle of all images used by the C plugin.
+ */
+public class AutotoolsUIPluginImages {
+
+ // The plugin registry
+ private static ImageRegistry imageRegistry = new ImageRegistry(CUIPlugin.getStandardDisplay());
+
+ // Subdirectory (under the package containing this class) where 16 color images are
+ private static URL fgIconBaseURL;
+
+ static {
+ try {
+ fgIconBaseURL= new URL(AutotoolsUIPlugin.getDefault().getBundle().getEntry("/"), "icons/" ); //$NON-NLS-1$ //$NON-NLS-2$
+ } catch (MalformedURLException e) {
+ CUIPlugin.log(e);
+ }
+ }
+ private static final String NAME_PREFIX= AutotoolsUIPlugin.PLUGIN_ID + '.';
+ private static final int NAME_PREFIX_LENGTH= NAME_PREFIX.length();
+
+ public static final String T_OBJ= "ac16/"; //$NON-NLS-1$
+ public static final String T_BUILD= "elcl16/"; //$NON-NLS-1$
+
+ public static final String IMG_OBJS_IF= NAME_PREFIX + "if_obj.gif"; //$NON-NLS-1$
+ public static final String IMG_OBJS_ELSE= NAME_PREFIX + "else_obj.gif"; //$NON-NLS-1$
+ public static final String IMG_OBJS_ELIF= NAME_PREFIX + "elif_obj.gif"; //$NON-NLS-1$
+ public static final String IMG_OBJS_CASE= NAME_PREFIX + "case_obj.gif"; //$NON-NLS-1$
+ public static final String IMG_OBJS_CONDITION= NAME_PREFIX + "condition_obj.gif"; //$NON-NLS-1$
+ public static final String IMG_OBJS_FOR= NAME_PREFIX + "for_obj.gif"; //$NON-NLS-1$
+ public static final String IMG_OBJS_WHILE= NAME_PREFIX + "while_obj.gif"; //$NON-NLS-1$
+ public static final String IMG_OBJS_ACMACRO= NAME_PREFIX + "acmacro_obj.gif"; //$NON-NLS-1$
+ public static final String IMG_OBJS_AMMACRO= NAME_PREFIX + "ammacro_obj.gif"; //$NON-NLS-1$
+ public static final String IMG_OBJS_ACMACRO_ARG = NAME_PREFIX + "acmacro_arg_obj.gif"; // $NON-NLS-1$
+ public static final String IMG_BUILD_CONFIG = NAME_PREFIX + "build_configs.gif"; //$NON-NLS-1$
+ public static final String IMG_CFG_CATEGORY = NAME_PREFIX + "config_category.gif"; //$NON-NLS-1$
+ public static final String IMG_CFG_TOOL = NAME_PREFIX + "config_tool.gif"; //$NON-NLS-1$
+
+ public static final ImageDescriptor DESC_OBJS_IF= createManaged(T_OBJ, IMG_OBJS_IF);
+ public static final ImageDescriptor DESC_OBJS_ELSE= createManaged(T_OBJ, IMG_OBJS_ELSE);
+ public static final ImageDescriptor DESC_OBJS_ELIF= createManaged(T_OBJ, IMG_OBJS_ELIF);
+ public static final ImageDescriptor DESC_OBJS_CASE= createManaged(T_OBJ, IMG_OBJS_CASE);
+ public static final ImageDescriptor DESC_OBJS_CONDITION = createManaged(T_OBJ, IMG_OBJS_CONDITION);
+ public static final ImageDescriptor DESC_OBJS_FOR= createManaged(T_OBJ, IMG_OBJS_FOR);
+ public static final ImageDescriptor DESC_OBJS_WHILE= createManaged(T_OBJ, IMG_OBJS_WHILE);
+ public static final ImageDescriptor DESC_OBJS_ACMACRO= createManaged(T_OBJ, IMG_OBJS_ACMACRO);
+ public static final ImageDescriptor DESC_OBJS_AMMACRO= createManaged(T_OBJ, IMG_OBJS_AMMACRO);
+ public static final ImageDescriptor DESC_OBJS_ACMACRO_ARG= createManaged(T_OBJ, IMG_OBJS_ACMACRO_ARG);
+ public static final ImageDescriptor DESC_BUILD_CONFIG = createManaged(T_BUILD, IMG_BUILD_CONFIG);
+ public static final ImageDescriptor DESC_CFG_CATEGORY = createManaged(T_BUILD, IMG_CFG_CATEGORY);
+ public static final ImageDescriptor DESC_CFG_TOOL = createManaged(T_BUILD, IMG_CFG_TOOL);
+
+ private static ImageDescriptor createManaged(String prefix, String name) {
+ return createManaged(imageRegistry, prefix, name);
+ }
+
+ private static ImageDescriptor createManaged(ImageRegistry registry, String prefix, String name) {
+ ImageDescriptor result= ImageDescriptor.createFromURL(makeIconFileURL(prefix, name.substring(NAME_PREFIX_LENGTH)));
+ registry.put(name, result);
+ return result;
+ }
+
+ public static Image get(String key) {
+ return imageRegistry.get(key);
+ }
+
+ private static ImageDescriptor create(String prefix, String name) {
+ return ImageDescriptor.createFromURL(makeIconFileURL(prefix, name));
+ }
+
+ private static URL makeIconFileURL(String prefix, String name) {
+ StringBuffer buffer= new StringBuffer(prefix);
+ buffer.append(name);
+ try {
+ return new URL(fgIconBaseURL, buffer.toString());
+ } catch (MalformedURLException e) {
+ CUIPlugin.log(e);
+ return null;
+ }
+ }
+
+ /**
+ * Sets all available image descriptors for the given action.
+ */
+ public static void setImageDescriptors(IAction action, String type, String relPath) {
+ if (relPath.startsWith(NAME_PREFIX))
+ relPath= relPath.substring(NAME_PREFIX_LENGTH);
+ action.setDisabledImageDescriptor(create("d" + type, relPath)); //$NON-NLS-1$
+// action.setHoverImageDescriptor(create("c" + type, relPath)); //$NON-NLS-1$
+ action.setImageDescriptor(create("e" + type, relPath)); //$NON-NLS-1$
+
+ // We are still not sure about this, let see TF results first.
+ // Use the managed version so that we ensure that there is no resource handle leaks
+ // Let the widget itself manage the disabled/hover attribution. This was a huge leak
+ //ImageDescriptor desc = getImageRegistry().getDescriptor(relPath);
+ //if(desc == null) {
+ // desc = createManaged(T + "c" + type, relPath);
+ //}
+ //action.setImageDescriptor(desc);
+ }
+
+ /**
+ * Helper method to access the image registry from the CUIPlugin class.
+ */
+ static ImageRegistry getImageRegistry() {
+ return imageRegistry;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CBuildStepsConsole.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CBuildStepsConsole.java
new file mode 100644
index 0000000000..5ba325974f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CBuildStepsConsole.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2004, 2009 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc - Adapted for Autotools usage
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import org.eclipse.cdt.ui.IBuildConsoleManager;
+import org.eclipse.core.resources.IProject;
+
+public class CBuildStepsConsole extends Console {
+ IProject project;
+ IBuildConsoleManager fConsoleManager;
+
+ private static final String CONTEXT_MENU_ID = "CAutotoolsBuildStepsConsole"; //$NON-NLS-1$
+ private static final String CONSOLE_NAME = ConsoleMessages.getString("BuildStepsConsole.name"); //$NON-NLS-1$
+
+ public CBuildStepsConsole() {
+ super(CONSOLE_NAME, CONTEXT_MENU_ID);
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CConfigureConsole.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CConfigureConsole.java
new file mode 100644
index 0000000000..1925fcd7c2
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CConfigureConsole.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2004, 2009 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import org.eclipse.cdt.ui.IBuildConsoleManager;
+import org.eclipse.core.resources.IProject;
+
+public class CConfigureConsole extends Console {
+ IProject project;
+ IBuildConsoleManager fConsoleManager;
+
+ private static final String CONTEXT_MENU_ID = "CAutotoolsConfigureConsole"; //$NON-NLS-1$
+ private static final String CONSOLE_NAME = ConsoleMessages.getString("ConfigureConsole.name"); //$NON-NLS-1$
+
+ public CConfigureConsole() {
+ super(CONSOLE_NAME, CONTEXT_MENU_ID);
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CWordFinder.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CWordFinder.java
new file mode 100644
index 0000000000..cc28694b10
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CWordFinder.java
@@ -0,0 +1,283 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Region;
+
+
+/**
+ * This is a helper class for the text editor to be able to determine, given a
+ * particular offset in a document, various candidates segments for things like
+ * context help, proposals and hovering.
+ */
+public class CWordFinder {
+
+ private static final char CBRACE_L = '{';
+ private static final char CBRACE_R = '}';
+ private static final char BRACE_R = ')';
+
+ /**
+ * This method determines for a given offset into a given document what the
+ * region is which defines the current word. A word is defined as the set of
+ * non "C" identifiers. So assuming that ! indicated the current cursor
+ * postion: !afunction(int a, int b) --> word = length 0 afunc!tion(int a,
+ * int b) --> word = afunction afunction!(int a, int b) --> word = afunction
+ * afunction(!int a, int b) --> word = length 0 afunction(int a,! int b) -->
+ * word = length 0 afunction(!) --> word = length 0
+ *
+ * @param document
+ * The document to be examined
+ * @param offset
+ * The offset into the document where a word should be
+ * idendified.
+ * @return The region defining the current word, which may be a region of
+ * length 0 if the offset is not in a word, or null if there is an
+ * error accessing the docment data.
+ */
+ public static IRegion findWord(IDocument document, int offset) {
+ int start = -1;
+ int end = -1;
+
+ try {
+ int pos = offset;
+ char c;
+
+ while (pos >= 0) {
+ c = document.getChar(pos);
+ if (!Character.isJavaIdentifierPart(c))
+ break;
+ --pos;
+ }
+
+ start = pos + 1;
+
+ pos = offset;
+ int length = document.getLength();
+
+ while (pos < length) {
+ c = document.getChar(pos);
+ if (!Character.isJavaIdentifierPart(c))
+ break;
+ ++pos;
+ }
+
+ end = pos;
+
+ } catch (BadLocationException x) {
+ }
+
+ if (start > -1 && end > -1) {
+ if (start >= offset && end == offset)
+ return new Region(offset, 0);
+ else
+ return new Region(start, end - start);
+ }
+
+ return null;
+ }
+
+ /**
+ * This method will determine the region for the name of the function within
+ * which the current offset is contained.
+ *
+ * @param document
+ * The document to be examined
+ * @param offset
+ * The offset into the document where a word should be
+ * idendified.
+ * @return The region defining the current word, which may be a region of
+ * length 0 if the offset is not in a function, or null if there is
+ * an error accessing the docment data.
+ */
+ public static IRegion findFunction(IDocument document, int offset) {
+ int leftbracket = -1;
+ int leftbracketcount = 0;
+ int rightbracket = -1;
+ int rightbracketcount = 0;
+ int functionstart = -1;
+ int functionend = -1;
+
+ try {
+ int length = document.getLength();
+ int pos;
+ char c;
+
+ //Find most relevant right bracket from our position
+ pos = offset;
+ rightbracketcount = leftbracketcount = 0;
+ while (pos < length) {
+ c = document.getChar(pos);
+
+ if (c == ')') {
+ rightbracketcount++;
+ if (rightbracketcount >= leftbracketcount) {
+ rightbracket = pos;
+ break;
+ }
+ }
+
+ if (c == '(') {
+ leftbracketcount++;
+ }
+
+ if (c == ';') {
+ break;
+ }
+
+ pos++;
+ }
+
+ if (rightbracket == -1) {
+ return new Region(offset, 0);
+ }
+
+ //Now backtrack our way from the rightbracket to the left
+ pos = rightbracket;
+ rightbracketcount = leftbracketcount = 0;
+ while (pos >= 0) {
+ c = document.getChar(pos);
+
+ if (c == ')') {
+ rightbracketcount++;
+ }
+
+ if (c == '(') {
+ leftbracketcount++;
+ if (leftbracketcount >= rightbracketcount) {
+ leftbracket = pos;
+ break;
+ }
+ }
+
+ if (c == ';') {
+ break;
+ }
+
+ pos--;
+ }
+
+ if (leftbracket == -1) {
+ return new Region(offset, 0);
+ }
+
+ //Now work our way to the function name
+ pos = leftbracket - 1;
+ while (pos >= 0) {
+ c = document.getChar(pos);
+ if (functionend == -1 && c == ' ') {
+ pos--;
+ continue;
+ }
+
+ if (!Character.isJavaIdentifierPart(c)) {
+ break;
+ }
+
+ functionstart = pos;
+ if (functionend == -1) {
+ functionend = pos;
+ }
+
+ pos--;
+ }
+ } catch (BadLocationException x) {
+ /* Ignore */
+ }
+
+ if (functionstart > -1 && functionend > -1) {
+ return new Region(functionstart, functionend - functionstart + 1);
+ }
+
+ return null;
+ }
+
+ /**
+ * This method will determine whether current offset is contained
+ * in any function's body or it's outside it.
+ *
+ * @param document
+ * The document to be examined
+ * @param offset
+ * The offset into the document
+ * @return
+ * <code>true</code> if there is no function body around offset
+ * <code>false</code> otherwise
+ */
+ public static boolean isGlobal(IDocument document, int offset) {
+ try {
+ int pos = offset;
+ int bracketcount = 0;
+ char c;
+
+ //Find left curled bracket from our position
+ while (pos > 0) {
+ c = document.getChar(pos--);
+
+ if (c == CBRACE_R) {
+ bracketcount++; // take into account nested blocks
+ } else if (c == CBRACE_L) {
+ if (bracketcount-- == 0) {
+ do {
+ c = document.getChar(pos--);
+ if (c == BRACE_R) return false;
+ } while (Character.isWhitespace(c));
+ // container block seems to be not a function or statement body
+ pos++; // step back one symbol
+ bracketcount = 0; // let's search for upper block
+ }
+ }
+ }
+
+ } catch (BadLocationException x) { /* Ignore */ }
+ // return true in case of unknown result or exception
+ return true;
+ }
+
+ /**
+ * Searches for line feed symbols in string.
+ * First met '\r' or '\n' is treated as LF symbol
+ *
+ * @param s
+ * string to search in.
+ * @return number of LFs met.
+ */
+ public static int countLFs (String s) {
+ int counter = 0;
+ char lf = 0;
+ char c;
+ for (int i=0; i<s.length(); i++) {
+ c = s.charAt(i);
+ if (lf == 0) {
+ if (c == '\n' || c == '\r') {
+ lf = c;
+ counter++;
+ }
+ } else if (lf == c) counter++;
+ }
+ return counter;
+ }
+
+ /**
+ * Checks whether the string contains any C-block delimiters ( { } )
+ *
+ * @param s
+ * text to check
+ * @return true if curled brace found.
+ */
+ public static boolean hasCBraces (String s) {
+ if (s.indexOf(CBRACE_L) > -1 || s.indexOf(CBRACE_R) > -1) return true;
+ else return false;
+ }
+}
+
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/Console.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/Console.java
new file mode 100644
index 0000000000..695e489a1b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/Console.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2004 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import org.eclipse.cdt.core.ConsoleOutputStream;
+import org.eclipse.cdt.core.resources.IConsole;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.cdt.ui.IBuildConsoleManager;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+
+public class Console implements IConsole {
+ IProject project;
+ IBuildConsoleManager fConsoleManager;
+
+ public Console(String consoleName, String contextId) {
+ fConsoleManager = CUIPlugin.getDefault().getConsoleManager(consoleName,
+ contextId);
+ }
+
+// /**
+// * Constructor for ConfigureConsole.
+// */
+// public CConfigureConsole() {
+// fConsoleManager = AutotoolsPlugin.getDefault().getConsoleManager();
+// }
+//
+
+ public void start(IProject project ) {
+ this.project = project;
+ fConsoleManager.getConsole(project).start(project);
+ }
+
+ /**
+ * @throws CoreException
+ * @see org.eclipse.cdt.core.resources.IConsole#getOutputStream()
+ */
+ public ConsoleOutputStream getOutputStream() throws CoreException {
+ return fConsoleManager.getConsole(project).getOutputStream();
+ }
+
+ public ConsoleOutputStream getInfoStream() throws CoreException {
+ return fConsoleManager.getConsole(project).getInfoStream();
+ }
+
+ public ConsoleOutputStream getErrorStream() throws CoreException {
+ return fConsoleManager.getConsole(project).getErrorStream();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ConsoleMessages.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ConsoleMessages.java
new file mode 100644
index 0000000000..a9b3d21ef0
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ConsoleMessages.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2004 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class ConsoleMessages {
+
+ public static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.cdt.autotools.ui.ConsoleMessages";//$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+ private ConsoleMessages() {
+
+ }
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ConsoleMessages.properties b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ConsoleMessages.properties
new file mode 100644
index 0000000000..7c4510df87
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ConsoleMessages.properties
@@ -0,0 +1,25 @@
+###############################################################################
+# Copyright (c) 2003, 2004 QNX Software Systems 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:
+# QNX Software Systems - Initial API and implementation
+###############################################################################
+ConfigureConsole.name=Configure
+BuildStepsConsole.name=Build Steps
+AutotoolsConsole.name=Autotools
+
+find_replace_action.label=&Find/Replace...@Ctrl+F
+find_replace_action.tooltip=Find/Replace
+find_replace_action.image=
+find_replace_action.description=Find/Replace
+
+ConfigureConsolePage.&Copy@Ctrl+C_6=&Copy@Ctrl+C
+ConfigureConsolePage.Copy_7=Copy
+ConfigureConsolePage.Select_&All@Ctrl+A_12=Select &All@Ctrl+A
+ConfigureConsolePage.Select_All=Select All
+
+ScrollLockAction.Scroll_Lock_1=Scroll Lock
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ErrorParserBlock.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ErrorParserBlock.java
new file mode 100644
index 0000000000..fd1ad8674d
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ErrorParserBlock.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006 QNX Software Systems 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:
+ * QNX Software Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import org.eclipse.cdt.make.core.IMakeBuilderInfo;
+import org.eclipse.cdt.make.core.MakeBuilder;
+import org.eclipse.cdt.make.core.MakeCorePlugin;
+import org.eclipse.cdt.ui.dialogs.AbstractErrorParserBlock;
+import org.eclipse.cdt.ui.dialogs.ICOptionContainer;
+import org.eclipse.cdt.utils.ui.controls.ControlFactory;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Preferences;
+import org.eclipse.swt.widgets.Composite;
+
+@SuppressWarnings("deprecation")
+public class ErrorParserBlock extends AbstractErrorParserBlock {
+
+ // make builder enabled
+ IMakeBuilderInfo fBuildInfo;
+ boolean useBuildInfo = false;
+ Preferences fPrefs;
+
+ public ErrorParserBlock(Preferences preferences) {
+ super();
+ fPrefs = preferences;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createControl(Composite parent) {
+
+ if (useBuildInfo == true && fBuildInfo == null) {
+ Composite composite = ControlFactory.createComposite(parent, 1);
+ setControl(composite);
+ ControlFactory.createEmptySpace(composite);
+ ControlFactory.createLabel(composite, MakeUIMessages.getResourceString("ErrorParserBlock.label.missingBuilderInformation")); //$NON-NLS-1$
+ return;
+ }
+ super.createControl(parent);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.cdt.ui.dialogs.ErrorParserBlock#getErrorParserIDs(org.eclipse.core.resources.IProject)
+ */
+ protected String[] getErrorParserIDs(IProject project) {
+ if (getContainer().getProject() != null && fBuildInfo == null) {
+ try {
+ fBuildInfo = MakeCorePlugin.createBuildInfo(getContainer().getProject(), MakeBuilder.BUILDER_ID);
+ } catch (CoreException e) {
+ }
+ }
+ if (fBuildInfo != null) {
+ return fBuildInfo.getErrorParsers();
+ }
+ return new String[0];
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.cdt.ui.dialogs.ErrorParserBlock#saveErrorParsers(org.eclipse.core.resources.IProject,
+ * java.lang.String[])
+ */
+ public void saveErrorParsers(IProject project, String[] parserIDs) throws CoreException {
+ if (getContainer().getProject() != null) {
+ try {
+ fBuildInfo = MakeCorePlugin.createBuildInfo(getContainer().getProject(), MakeBuilder.BUILDER_ID);
+ } catch (CoreException e) {
+ }
+ }
+ if (fBuildInfo != null) {
+ fBuildInfo.setErrorParsers(parserIDs);
+ }
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.ui.dialogs.AbstractErrorParserBlock#saveErrorParsers(java.lang.String[])
+ */
+ protected void saveErrorParsers(String[] parserIDs) throws CoreException {
+ fBuildInfo = MakeCorePlugin.createBuildInfo(fPrefs, MakeBuilder.BUILDER_ID, false);
+ fBuildInfo.setErrorParsers(parserIDs);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.ui.dialogs.AbstractErrorParserBlock#getErrorParserIDs(boolean)
+ */
+ protected String[] getErrorParserIDs(boolean defaults) {
+ fBuildInfo = MakeCorePlugin.createBuildInfo(fPrefs, MakeBuilder.BUILDER_ID, defaults);
+ return fBuildInfo.getErrorParsers();
+ }
+
+ public void setContainer(ICOptionContainer container) {
+ super.setContainer(container);
+ if (getContainer().getProject() != null) {
+ try {
+ fBuildInfo = MakeCorePlugin.createBuildInfo(getContainer().getProject(), MakeBuilder.BUILDER_ID);
+ } catch (CoreException e) {
+ }
+ useBuildInfo = true;
+ } else {
+ }
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/FileRelevance.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/FileRelevance.java
new file mode 100644
index 0000000000..a360965f84
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/FileRelevance.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Broadcom 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:
+ * James Blackburn (Broadcom) - Initial API and implementation
+ * Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourceAttributes;
+
+/**
+ * This class computes a relevance for files in case we have to select
+ * from multiple files for the same file-system location.
+ */
+public class FileRelevance {
+ private static final int PREFERRED_PROJECT = 0x40;
+ private static final int CDT_PROJECT = 0x20;
+ private static final int ON_SOURCE_ROOT = 0x10;
+
+ // Penalty for undesirable attributes
+ private static final int LINK_PENALTY = 1;
+ private static final int INACCESSIBLE_SHIFT = 4;
+
+ /**
+ * Compute a relevance for the given file. The higher the score the more relevant the
+ * file. It is determined by the following criteria: <br>
+ * - file belongs to preferred project <br>
+ * - file belongs to a cdt-project <br>
+ * - file belongs to a source folder of a cdt-project <br>
+ * - file is accessible
+ * - file is not a link
+ * @param f the file to compute the relevance for
+ * @return integer representing file relevance. Larger numbers are more relevant
+ */
+ public static int getRelevance(IFile f, IProject preferredProject) {
+ int result= 0;
+ IProject p= f.getProject();
+ if (p.equals(preferredProject))
+ result+= PREFERRED_PROJECT;
+
+ if (CoreModel.hasCNature(p)) {
+ result+= CDT_PROJECT;
+ ICProject cproject= CoreModel.getDefault().create(p);
+ if (cproject.isOnSourceRoot(f))
+ result+= ON_SOURCE_ROOT;
+ }
+
+ if (!f.isAccessible())
+ result >>= INACCESSIBLE_SHIFT;
+ else {
+ ResourceAttributes ra = f.getResourceAttributes();
+ if (f.isLinked() || (ra != null && ra.isSymbolicLink()))
+ result -= LINK_PENALTY;
+ }
+
+ return result;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTML2TextReader.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTML2TextReader.java
new file mode 100644
index 0000000000..c4adcba055
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTML2TextReader.java
@@ -0,0 +1,260 @@
+/*******************************************************************************
+ * Copyright (c) 2000 2005 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * QNX Software System
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+
+import java.io.IOException;
+import java.io.PushbackReader;
+import java.io.Reader;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.jface.text.TextPresentation;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyleRange;
+
+
+/**
+ * Reads the text contents from a reader of HTML contents and translates
+ * the tags or cut them out.
+ */
+public class HTML2TextReader extends SubstitutionTextReader {
+
+
+ private static final String LINE_DELIM= System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+ private static final Map<String, String> fgEntityLookup;
+ private static final Set<String> fgTags;
+
+ static {
+
+ fgTags= new HashSet<String>();
+ fgTags.add("b"); //$NON-NLS-1$
+ fgTags.add("br"); //$NON-NLS-1$
+ fgTags.add("h5"); //$NON-NLS-1$
+ fgTags.add("p"); //$NON-NLS-1$
+ fgTags.add("dl"); //$NON-NLS-1$
+ fgTags.add("dt"); //$NON-NLS-1$
+ fgTags.add("dd"); //$NON-NLS-1$
+ fgTags.add("li"); //$NON-NLS-1$
+ fgTags.add("ul"); //$NON-NLS-1$
+
+ fgEntityLookup= new HashMap<String, String>(7);
+ fgEntityLookup.put("lt", "<"); //$NON-NLS-1$ //$NON-NLS-2$
+ fgEntityLookup.put("gt", ">"); //$NON-NLS-1$ //$NON-NLS-2$
+ fgEntityLookup.put("nbsp", " "); //$NON-NLS-1$ //$NON-NLS-2$
+ fgEntityLookup.put("amp", "&"); //$NON-NLS-1$ //$NON-NLS-2$
+ fgEntityLookup.put("circ", "^"); //$NON-NLS-1$ //$NON-NLS-2$
+ fgEntityLookup.put("tilde", "~"); //$NON-NLS-2$ //$NON-NLS-1$
+ fgEntityLookup.put("quot", "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ private int fCounter= 0;
+ private TextPresentation fTextPresentation;
+ private int fBold= 0;
+ private int fStartOffset= -1;
+ private boolean fInParagraph= false;
+
+ /**
+ * Transforms the html text from the reader to formatted text.
+ * @param presentation If not <code>null</code>, formattings will be applied to
+ * the presentation.
+ */
+ public HTML2TextReader(Reader reader, TextPresentation presentation) {
+ super(new PushbackReader(reader));
+ fTextPresentation= presentation;
+ }
+
+ public int read() throws IOException {
+ int c= super.read();
+ if (c != -1)
+ ++ fCounter;
+ return c;
+ }
+
+ protected void startBold() {
+ if (fBold == 0)
+ fStartOffset= fCounter;
+ ++ fBold;
+ }
+
+ protected void stopBold() {
+ -- fBold;
+ if (fBold == 0) {
+ if (fTextPresentation != null) {
+ fTextPresentation.addStyleRange(new StyleRange(fStartOffset, fCounter - fStartOffset, null, null, SWT.BOLD));
+ }
+ fStartOffset= -1;
+ }
+ }
+
+ /**
+ * @see SubstitutionTextReader#computeSubstitution(char)
+ */
+ protected String computeSubstitution(int c) throws IOException {
+ if (c == '<')
+ return processHTMLTag();
+ else if (c == '&')
+ return processEntity();
+
+ return null;
+ }
+
+ private String html2Text(String html) {
+
+ String tag= html;
+ if ('/' == tag.charAt(0))
+ tag= tag.substring(1);
+
+ if (!fgTags.contains(tag))
+ return ""; //$NON-NLS-1$
+
+ if ("b".equals(html)) { //$NON-NLS-1$
+ startBold();
+ return ""; //$NON-NLS-1$
+ }
+
+ if ("h5".equals(html) || "dt".equals(html)) { //$NON-NLS-1$ //$NON-NLS-2$
+ startBold();
+ return ""; //$NON-NLS-1$
+ }
+
+ if ("dl".equals(html)) //$NON-NLS-1$
+ return LINE_DELIM;
+
+ if ("dd".equals(html)) //$NON-NLS-1$
+ return "\t"; //$NON-NLS-1$
+
+ if ("li".equals(html)) //$NON-NLS-1$
+ return LINE_DELIM + "\t" + "-"; //$NON-NLS-1$ //$NON-NLS-2$
+
+ if ("/b".equals(html)) { //$NON-NLS-1$
+ stopBold();
+ return ""; //$NON-NLS-1$
+ }
+
+ if ("p".equals(html)) { //$NON-NLS-1$
+ fInParagraph= true;
+ return LINE_DELIM;
+ }
+
+ if ("br".equals(html)) //$NON-NLS-1$
+ return LINE_DELIM;
+
+ if ("/p".equals(html)) { //$NON-NLS-1$
+ boolean inParagraph= fInParagraph;
+ fInParagraph= false;
+ return inParagraph ? "" : LINE_DELIM; //$NON-NLS-1$
+ }
+
+ if ("/h5".equals(html) || "/dt".equals(html)) { //$NON-NLS-1$ //$NON-NLS-2$
+ stopBold();
+ return LINE_DELIM;
+ }
+
+ if ("/dd".equals(html)) //$NON-NLS-1$
+ return LINE_DELIM;
+
+ return ""; //$NON-NLS-1$
+ }
+
+ /*
+ * A '<' has been read. Process a html tag
+ */
+ private String processHTMLTag() throws IOException {
+
+ StringBuffer buf= new StringBuffer();
+ int ch;
+ do {
+
+ ch= nextChar();
+
+ while (ch != -1 && ch != '>') {
+ buf.append(Character.toLowerCase((char) ch));
+ ch= nextChar();
+ if (ch == '"'){
+ buf.append(Character.toLowerCase((char) ch));
+ ch= nextChar();
+ while (ch != -1 && ch != '"'){
+ buf.append(Character.toLowerCase((char) ch));
+ ch= nextChar();
+ }
+ }
+ if (ch == '<'){
+ unread(ch);
+ return '<' + buf.toString();
+ }
+ }
+
+ if (ch == -1)
+ return null;
+
+ int tagLen= buf.length();
+ // needs special treatment for comments
+ if ((tagLen >= 3 && "!--".equals(buf.substring(0, 3))) //$NON-NLS-1$
+ && !(tagLen >= 5 && "--!".equals(buf.substring(tagLen - 3)))) { //$NON-NLS-1$
+ // unfinished comment
+ buf.append(ch);
+ } else {
+ break;
+ }
+ } while (true);
+
+ return html2Text(buf.toString());
+ }
+
+ private void unread(int ch) throws IOException {
+ ((PushbackReader) getReader()).unread(ch);
+ }
+
+ protected String entity2Text(String symbol) {
+ if (symbol.length() > 1 && symbol.charAt(0) == '#') {
+ int ch;
+ try {
+ if (symbol.charAt(1) == 'x') {
+ ch= Integer.parseInt(symbol.substring(2), 16);
+ } else {
+ ch= Integer.parseInt(symbol.substring(1), 10);
+ }
+ return "" + (char)ch; //$NON-NLS-1$
+ } catch (NumberFormatException e) {
+ }
+ } else {
+ String str= (String) fgEntityLookup.get(symbol);
+ if (str != null) {
+ return str;
+ }
+ }
+ return "&" + symbol; // not found //$NON-NLS-1$
+ }
+
+ /*
+ * A '&' has been read. Process a entity
+ */
+ private String processEntity() throws IOException {
+ StringBuffer buf= new StringBuffer();
+ int ch= nextChar();
+ while (Character.isLetterOrDigit((char)ch) || ch == '#') {
+ buf.append((char) ch);
+ ch= nextChar();
+ }
+
+ if (ch == ';')
+ return entity2Text(buf.toString());
+
+ buf.insert(0, '&');
+ if (ch != -1)
+ buf.append((char) ch);
+ return buf.toString();
+ }
+} \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTMLPrinter.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTMLPrinter.java
new file mode 100644
index 0000000000..a9de7d1159
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTMLPrinter.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2000 2005 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * QNX Software System
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import java.io.IOException;
+import java.io.Reader;
+
+
+/**
+ * Provides a set of convenience methods for creating HTML pages.
+ */
+public class HTMLPrinter {
+
+ private HTMLPrinter() {
+ }
+
+ private static String replace(String text, char c, String s) {
+
+ int previous= 0;
+ int current= text.indexOf(c, previous);
+
+ if (current == -1)
+ return text;
+
+ StringBuffer buffer= new StringBuffer();
+ while (current > -1) {
+ buffer.append(text.substring(previous, current));
+ buffer.append(s);
+ previous= current + 1;
+ current= text.indexOf(c, previous);
+ }
+ buffer.append(text.substring(previous));
+
+ return buffer.toString();
+ }
+
+ public static String convertToHTMLContent(String content) {
+ content= replace(content, '<', "&lt;"); //$NON-NLS-1$
+ return replace(content, '>', "&gt;"); //$NON-NLS-1$
+ }
+
+ public static String read(Reader rd) {
+
+ StringBuffer buffer= new StringBuffer();
+ char[] readBuffer= new char[2048];
+
+ try {
+ int n= rd.read(readBuffer);
+ while (n > 0) {
+ buffer.append(readBuffer, 0, n);
+ n= rd.read(readBuffer);
+ }
+ return buffer.toString();
+ } catch (IOException x) {
+ }
+
+ return null;
+ }
+
+ public static void insertPageProlog(StringBuffer buffer, int position) {
+ buffer.insert(position, "<html><body text=\"#000000\" bgcolor=\"#FFFF88\"><font size=-1>"); //$NON-NLS-1$
+ }
+
+ public static void addPageProlog(StringBuffer buffer) {
+ insertPageProlog(buffer, buffer.length());
+ }
+
+ public static void addPageEpilog(StringBuffer buffer) {
+ buffer.append("</font></body></html>"); //$NON-NLS-1$
+ }
+
+ public static void startBulletList(StringBuffer buffer) {
+ buffer.append("<ul>"); //$NON-NLS-1$
+ }
+
+ public static void endBulletList(StringBuffer buffer) {
+ buffer.append("</ul>"); //$NON-NLS-1$
+ }
+
+ public static void addBullet(StringBuffer buffer, String bullet) {
+ if (bullet != null) {
+ buffer.append("<li>"); //$NON-NLS-1$
+ buffer.append(bullet);
+ buffer.append("</li>"); //$NON-NLS-1$
+ }
+ }
+
+ public static void addSmallHeader(StringBuffer buffer, String header) {
+ if (header != null) {
+ buffer.append("<h5>"); //$NON-NLS-1$
+ buffer.append(header);
+ buffer.append("</h5>"); //$NON-NLS-1$
+ }
+ }
+
+ public static void addParagraph(StringBuffer buffer, String paragraph) {
+ if (paragraph != null) {
+ buffer.append("<p>"); //$NON-NLS-1$
+ buffer.append(paragraph);
+ }
+ }
+
+ public static void addParagraph(StringBuffer buffer, Reader paragraphReader) {
+ if (paragraphReader != null)
+ addParagraph(buffer, read(paragraphReader));
+ }
+} \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTMLTextPresenter.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTMLTextPresenter.java
new file mode 100644
index 0000000000..233112ba1d
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTMLTextPresenter.java
@@ -0,0 +1,190 @@
+/*******************************************************************************
+ * Copyright (c) 2000 2005 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * QNX Software System
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.StringReader;
+import java.util.Iterator;
+
+import org.eclipse.jface.text.DefaultInformationControl;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.TextPresentation;
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.widgets.Display;
+
+
+public class HTMLTextPresenter implements DefaultInformationControl.IInformationPresenter {
+
+ private static final String LINE_DELIM= System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ private int fCounter;
+ private boolean fEnforceUpperLineLimit;
+
+ public HTMLTextPresenter(boolean enforceUpperLineLimit) {
+ super();
+ fEnforceUpperLineLimit= enforceUpperLineLimit;
+ }
+
+ public HTMLTextPresenter() {
+ this(true);
+ }
+
+ protected Reader createReader(String hoverInfo, TextPresentation presentation) {
+ return new HTML2TextReader(new StringReader(hoverInfo), presentation);
+ }
+
+ @SuppressWarnings("unchecked")
+ protected void adaptTextPresentation(TextPresentation presentation, int offset, int insertLength) {
+
+ int yoursStart= offset;
+ int yoursEnd= offset + insertLength -1;
+ yoursEnd= Math.max(yoursStart, yoursEnd);
+
+ Iterator e= presentation.getAllStyleRangeIterator();
+ while (e.hasNext()) {
+
+ StyleRange range= (StyleRange) e.next();
+
+ int myStart= range.start;
+ int myEnd= range.start + range.length -1;
+ myEnd= Math.max(myStart, myEnd);
+
+ if (myEnd < yoursStart)
+ continue;
+
+ if (myStart < yoursStart)
+ range.length += insertLength;
+ else
+ range.start += insertLength;
+ }
+ }
+
+ private void append(StringBuffer buffer, String string, TextPresentation presentation) {
+
+ int length= string.length();
+ buffer.append(string);
+
+ if (presentation != null)
+ adaptTextPresentation(presentation, fCounter, length);
+
+ fCounter += length;
+ }
+
+ private String getIndent(String line) {
+ int length= line.length();
+
+ int i= 0;
+ while (i < length && Character.isWhitespace(line.charAt(i))) ++i;
+
+ return (i == length ? line : line.substring(0, i)) + " "; //$NON-NLS-1$
+ }
+
+ /*
+ * @see IHoverInformationPresenter#updatePresentation(Display display, String, TextPresentation, int, int)
+ */
+ public String updatePresentation(Display display, String hoverInfo, TextPresentation presentation, int maxWidth, int maxHeight) {
+
+ if (hoverInfo == null)
+ return null;
+
+ GC gc= new GC(display);
+ try {
+
+ StringBuffer buffer= new StringBuffer();
+ int maxNumberOfLines= Math.round(maxHeight / gc.getFontMetrics().getHeight());
+
+ fCounter= 0;
+ LineBreakingReader reader= new LineBreakingReader(createReader(hoverInfo, presentation), gc, maxWidth);
+
+ boolean lastLineFormatted= false;
+ String lastLineIndent= null;
+
+ String line=reader.readLine();
+ boolean lineFormatted= reader.isFormattedLine();
+ boolean firstLineProcessed= false;
+
+ while (line != null) {
+
+ if (fEnforceUpperLineLimit && maxNumberOfLines <= 0)
+ break;
+
+ if (firstLineProcessed) {
+ if (!lastLineFormatted)
+ append(buffer, LINE_DELIM, null);
+ else {
+ append(buffer, LINE_DELIM, presentation);
+ if (lastLineIndent != null)
+ append(buffer, lastLineIndent, presentation);
+ }
+ }
+
+ append(buffer, line, null);
+ firstLineProcessed= true;
+
+ lastLineFormatted= lineFormatted;
+ if (!lineFormatted)
+ lastLineIndent= null;
+ else if (lastLineIndent == null)
+ lastLineIndent= getIndent(line);
+
+ line= reader.readLine();
+ lineFormatted= reader.isFormattedLine();
+
+ maxNumberOfLines--;
+ }
+
+ if (line != null) {
+ append(buffer, LINE_DELIM, lineFormatted ? presentation : null);
+ append(buffer, (""), presentation); //$NON-NLS-1$
+ }
+
+ return trim(buffer, presentation);
+
+ } catch (IOException e) {
+
+ AutotoolsUIPlugin.log(e);
+ return null;
+
+ } finally {
+ gc.dispose();
+ }
+ }
+
+ private String trim(StringBuffer buffer, TextPresentation presentation) {
+
+ int length= buffer.length();
+
+ int end= length -1;
+ while (end >= 0 && Character.isWhitespace(buffer.charAt(end)))
+ -- end;
+
+ if (end == -1)
+ return ""; //$NON-NLS-1$
+
+ if (end < length -1)
+ buffer.delete(end + 1, length);
+ else
+ end= length;
+
+ int start= 0;
+ while (start < end && Character.isWhitespace(buffer.charAt(start)))
+ ++ start;
+
+ buffer.delete(0, start);
+ presentation.setResultWindow(new Region(start, buffer.length()));
+ return buffer.toString();
+ }
+}
+
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/LineBreakingReader.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/LineBreakingReader.java
new file mode 100644
index 0000000000..52fb3e31e5
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/LineBreakingReader.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2000 2005 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * QNX Software System
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.Reader;
+
+import java.text.BreakIterator;
+import org.eclipse.swt.graphics.GC;
+
+/*
+ * Not a real reader. Could change if requested
+ */
+public class LineBreakingReader {
+
+ private BufferedReader fReader;
+ private GC fGC;
+ private int fMaxWidth;
+
+ private String fLine;
+ private int fOffset;
+
+ private BreakIterator fLineBreakIterator;
+ private int findNextBreakOffset(int currOffset) {
+ int currWidth= 0;
+ int nextOffset= fLineBreakIterator.following(currOffset);
+ while (nextOffset != BreakIterator.DONE) {
+ String word= fLine.substring(currOffset, nextOffset);
+ int wordWidth= fGC.textExtent(word).x;
+ int nextWidth= wordWidth + currWidth;
+ if (nextWidth > fMaxWidth) {
+ if (currWidth > 0) {
+ return currOffset;
+ }
+ return nextOffset;
+ }
+ currWidth= nextWidth;
+ currOffset= nextOffset;
+ nextOffset= fLineBreakIterator.next();
+ }
+ return nextOffset;
+ }
+ private int findWordBegin(int idx) {
+ while (idx < fLine.length() && Character.isWhitespace(fLine.charAt(idx))) {
+ idx++;
+ }
+ return idx;
+ }
+ /**
+ * Creates a reader that breaks an input text to fit in a given width.
+ * @param reader Reader of the input text
+ * @param gc The graphic context that defines the currently used font sizes
+ * @param maxLineWidth The max width (pixes) where the text has to fit in
+ */
+ public LineBreakingReader(Reader reader, GC gc, int maxLineWidth) {
+ fReader= new BufferedReader(reader);
+ fGC= gc;
+ fMaxWidth= maxLineWidth;
+ fOffset= 0;
+ fLine= null;
+ fLineBreakIterator= BreakIterator.getLineInstance();
+ }
+
+ public boolean isFormattedLine() {
+ return fLine != null;
+ }
+
+ /**
+ * Reads the next line. The lengths of the line will not exceed the gived maximum
+ * width.
+ */
+ public String readLine() throws IOException {
+ if (fLine == null) {
+ String line= fReader.readLine();
+ if (line == null) {
+ return null;
+ }
+
+ int lineLen= fGC.textExtent(line).x;
+ if (lineLen < fMaxWidth) {
+ return line;
+ }
+ fLine= line;
+ fLineBreakIterator.setText(line);
+ fOffset= 0;
+ }
+ int breakOffset= findNextBreakOffset(fOffset);
+ String res;
+ if (breakOffset != BreakIterator.DONE) {
+ res= fLine.substring(fOffset, breakOffset);
+ fOffset= findWordBegin(breakOffset);
+ if (fOffset == fLine.length()) {
+ fLine= null;
+ }
+ } else {
+ res= fLine.substring(fOffset);
+ fLine= null;
+ }
+ return res;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/LocationAdapter.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/LocationAdapter.java
new file mode 100644
index 0000000000..22b5584105
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/LocationAdapter.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+
+import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+
+/**
+ * Provides common functionality for URI and IPath
+ */
+abstract class LocationAdapter<T> {
+
+ public abstract String extractName(T location);
+ public abstract IFile[] platformsFindFilesForLocation(T location);
+ public abstract String getCanonicalPath(T location);
+ public abstract T getLocation(IFile file);
+
+ public static final LocationAdapter<IPath> PATH = new LocationAdapter<IPath>() {
+ @Override
+ public String extractName(IPath location) {
+ String name = location.lastSegment();
+ if (name != null)
+ return name;
+ return location.toString();
+ }
+
+ @Override
+ public IFile[] platformsFindFilesForLocation(IPath location) {
+ final IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ return root.findFilesForLocationURI(URIUtil.toURI(location.makeAbsolute()));
+ }
+
+ @Override
+ public String getCanonicalPath(IPath location) {
+ final File file= location.toFile();
+ try {
+ return file.getCanonicalPath();
+ } catch (IOException e) {
+ // use non-canonical version
+ return file.getAbsolutePath();
+ }
+ }
+
+ @Override
+ public IPath getLocation(IFile file) {
+ return file.getLocation();
+ }
+ };
+
+ public static final LocationAdapter<URI> URI = new LocationAdapter<URI>() {
+ @Override
+ public String extractName(URI location) {
+ String path= location.getPath();
+ int idx= path.lastIndexOf('/');
+ return path.substring(idx+1);
+ }
+
+ @Override
+ public IFile[] platformsFindFilesForLocation(URI location) {
+ return ResourcesPlugin.getWorkspace().getRoot().findFilesForLocationURI(location);
+ }
+
+ @Override
+ public String getCanonicalPath(URI location) {
+ if (!"file".equals(location.getScheme())) //$NON-NLS-1$
+ return null;
+
+ String path= location.getPath();
+ try {
+ return new File(path).getCanonicalPath();
+ } catch (IOException e) {
+ // use non-canonical version
+ return path;
+ }
+ }
+
+ @Override
+ public URI getLocation(IFile file) {
+ return file.getLocationURI();
+ }
+ };
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MakeUIImages.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MakeUIImages.java
new file mode 100644
index 0000000000..68bff558f0
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MakeUIImages.java
@@ -0,0 +1,140 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005, 2009 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+import org.eclipse.swt.graphics.Image;
+
+
+
+public class MakeUIImages {
+
+ /**
+ * Bundle of all images used by the Make plugin.
+ */
+ // The plugin registry
+ private static ImageRegistry imageRegistry = new ImageRegistry();
+
+ // Subdirectory (under the package containing this class) where 16 color images are
+ private static URL fgIconBaseURL;
+ static {
+ try {
+ fgIconBaseURL = new URL(AutotoolsUIPlugin.getDefault().getBundle().getEntry("/"), "icons/"); //$NON-NLS-1$ //$NON-NLS-2$
+ } catch (MalformedURLException e) {
+ AutotoolsUIPlugin.log(e);
+ }
+ }
+ private static final String NAME_PREFIX = AutotoolsUIPlugin.getUniqueIdentifier() + '.';
+ private static final int NAME_PREFIX_LENGTH = NAME_PREFIX.length();
+
+ public static final String OBJ = "obj16/"; //$NON-NLS-1$
+ public static final String T_TOOL= "tool16/"; //$NON-NLS-1$
+ public static final String T_LCL = "lcl16/"; //$NON-NLS-1$
+
+ // For the build image
+ public static final String IMG_OBJS_BUILD_TARGET = NAME_PREFIX + "target_obj.gif"; //$NON-NLS-1$
+ public static final ImageDescriptor DESC_BUILD_TARGET = createManaged(OBJ, IMG_OBJS_BUILD_TARGET);
+
+ public static final String IMG_OBJS_ERROR = NAME_PREFIX + "error_obj.gif"; //$NON-NLS-1$
+ public static final ImageDescriptor DESC_OBJ_ERROR = createManaged(OBJ, IMG_OBJS_ERROR);
+ public static final String IMG_OBJS_WARNING = NAME_PREFIX + "warning_obj.gif"; //$NON-NLS-1$
+ public static final ImageDescriptor DESC_OBJ_WARNING = createManaged(OBJ, IMG_OBJS_WARNING);
+
+ public static final String IMG_TOOLS_MAKE_TARGET_BUILD = NAME_PREFIX + "target_build.gif"; //$NON-NLS-1$
+ public static final String IMG_TOOLS_MAKE_TARGET_ADD = NAME_PREFIX + "target_add.gif"; //$NON-NLS-1$
+ public static final String IMG_TOOLS_MAKE_TARGET_DELETE = NAME_PREFIX + "target_delete.gif"; //$NON-NLS-1$
+ public static final String IMG_TOOLS_MAKE_TARGET_EDIT = NAME_PREFIX + "target_edit.gif"; //$NON-NLS-1$
+ public static final String IMG_TOOLS_MAKE_TARGET_FILTER = NAME_PREFIX + "target_filter.gif"; //$NON-NLS-1$
+
+ public static final String IMG_OBJS_MAKEFILE_MACRO = NAME_PREFIX + "macro_obj.gif"; //$NON-NLS-1$
+ public static final ImageDescriptor DESC_MAKEFILE_MACRO = createManaged(OBJ, IMG_OBJS_MAKEFILE_MACRO);
+
+ public static final String IMG_OBJS_MAKEFILE_ACMACRO = NAME_PREFIX + "acmacro_obj.gif"; //$NON-NLS-1$
+ public static final ImageDescriptor DESC_MAKEFILE_ACMACRO = createManaged(OBJ, IMG_OBJS_MAKEFILE_ACMACRO);
+
+ public static final String IMG_OBJS_MAKEFILE_TARGET_RULE = NAME_PREFIX + "trule_obj.gif"; //$NON-NLS-1$
+ public static final ImageDescriptor DESC_MAKEFILE_TARGET_RULE = createManaged(OBJ, IMG_OBJS_MAKEFILE_TARGET_RULE);
+
+ public static final String IMG_OBJS_MAKEFILE_INFERENCE_RULE = NAME_PREFIX + "irule_obj.gif"; //$NON-NLS-1$
+ public static final ImageDescriptor DESC_MAKEFILE_INFERENCE_RULE = createManaged(OBJ, IMG_OBJS_MAKEFILE_INFERENCE_RULE);
+
+ public static final String IMG_OBJS_MAKEFILE_RELATION = NAME_PREFIX + "relation_obj.gif"; //$NON-NLS-1$
+ public static final ImageDescriptor DESC_MAKEFILE_RELATION = createManaged(OBJ, IMG_OBJS_MAKEFILE_RELATION);
+
+ public static final String IMG_OBJS_MAKEFILE_COMMAND = NAME_PREFIX + "command_obj.gif"; //$NON-NLS-1$
+ public static final ImageDescriptor DESC_MAKEFILE_COMMAND = createManaged(OBJ, IMG_OBJS_MAKEFILE_COMMAND);
+
+ public static final String IMG_OBJS_MAKEFILE_INCLUDE = NAME_PREFIX + "include_obj.gif"; //$NON-NLS-1$
+ public static final ImageDescriptor DESC_MAKEFILE_INCLUDE = createManaged(OBJ, IMG_OBJS_MAKEFILE_INCLUDE);
+
+ public static final String IMG_OBJS_ENVIRONMNET = NAME_PREFIX + "environment_obj.gif"; //$NON-NLS-1$
+ public static final ImageDescriptor DESC_ENVIRONMENT = createManaged(OBJ, IMG_OBJS_ENVIRONMNET);
+
+ public static final String IMG_OBJS_ENV_VAR = NAME_PREFIX + "envvar_obj.gif"; //$NON-NLS-1$
+ public static final ImageDescriptor DESC_ENV_VAR = createManaged(OBJ, IMG_OBJS_ENV_VAR);
+
+ public static final String IMG_TOOLS_ALPHA_SORTING= NAME_PREFIX + "alphab_sort_co.gif"; //$NON-NLS-1$
+ public static final String IMG_TOOLS_MAKEFILE_SEGMENT_EDIT= NAME_PREFIX + "segment_edit.gif"; //$NON-NLS-1$
+
+ public static final String IMG_MENU_OPEN_INCLUDE= NAME_PREFIX + "open_include.gif"; //$NON-NLS-1$
+
+ private static ImageDescriptor createManaged(String prefix, String name) {
+ return createManaged(imageRegistry, prefix, name);
+ }
+
+ private static ImageDescriptor createManaged(ImageRegistry registry, String prefix, String name) {
+ ImageDescriptor result = ImageDescriptor.createFromURL(makeIconFileURL(prefix, name.substring(NAME_PREFIX_LENGTH)));
+ registry.put(name, result);
+ return result;
+ }
+
+ public static Image getImage(String key) {
+ return imageRegistry.get(key);
+ }
+
+ private static ImageDescriptor create(String prefix, String name) {
+ return ImageDescriptor.createFromURL(makeIconFileURL(prefix, name));
+ }
+
+ private static URL makeIconFileURL(String prefix, String name) {
+ StringBuffer buffer = new StringBuffer(prefix);
+ buffer.append(name);
+ try {
+ return new URL(fgIconBaseURL, buffer.toString());
+ } catch (MalformedURLException e) {
+ AutotoolsUIPlugin.log(e);
+ return null;
+ }
+ }
+
+ /**
+ * Sets all available image descriptors for the given action.
+ */
+ public static void setImageDescriptors(IAction action, String type, String relPath) {
+ relPath = relPath.substring(NAME_PREFIX_LENGTH);
+ action.setDisabledImageDescriptor(create("d" + type + "/", relPath)); //$NON-NLS-1$ //$NON-NLS-2$
+// action.setHoverImageDescriptor(create("e" + type + "/", relPath)); //$NON-NLS-1$ //$NON-NLS-2$
+ action.setImageDescriptor(create("e" + type + "/", relPath)); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * Helper method to access the image registry from the JavaPlugin class.
+ */
+ static ImageRegistry getImageRegistry() {
+ return imageRegistry;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MakeUIMessages.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MakeUIMessages.java
new file mode 100644
index 0000000000..a4ecd91784
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MakeUIMessages.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2004, 2009 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class MakeUIMessages {
+
+ public static final String BUNDLE_NAME = MakeUIMessages.class.getName();
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+ private MakeUIMessages() {
+
+ }
+ public static String getResourceString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+
+ /**
+ * Returns the plugin's resource bundle,
+ */
+ public static ResourceBundle getResourceBundle() {
+ return RESOURCE_BUNDLE;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MakeUIMessages.properties b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MakeUIMessages.properties
new file mode 100644
index 0000000000..4f49ba8d57
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MakeUIMessages.properties
@@ -0,0 +1,283 @@
+###############################################################################
+# Copyright (c) 2003, 2005, 2009 QNX Software Systems 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:
+# QNX Software Systems - initial API and implementation
+# Wind River Systems - fix for bugzilla 135150
+# Tianchao Li (tianchao.li@gmail.com) - arbitrary build directory (bug #136136)
+###############################################################################
+
+MakeCWizard.title=C/Make Project
+MakeCWizard.description=Create a New C Project using 'make' to build it
+MakeEnvironmentBlock.10=&Remove
+MakeEnvironmentBlock.11=New Environment Variable
+MakeEnvironmentBlock.12=Overwrite variable?
+MakeEnvironmentBlock.13=A variable named {0} already exists. Overwrite?
+MakeEnvironmentBlock.14=Select &environment variables to add:
+MakeEnvironmentBlock.15=Select Environment Variables
+MakeEnvironmentBlock.16=Edit Environment Variable
+MakeEnvironmentBlock.17=&Append environment to native environment
+MakeEnvironmentBlock.18=Re&place native environment with specified environment
+MakeCWizard.task_name=Creating C project with Make builder...
+
+MakeCCWizard.title=C++/Make Project
+MakeCCWizard.description=Create a New C++ Project using 'make' to build it
+MakeCCWizard.task_name=Creating C++ project with Make builder...
+MakeEnvironmentBlock.0=Variable
+MakeEnvironmentBlock.1=Value
+MakeEnvironmentBlock.2=&Name:
+MakeEnvironmentBlock.3=&Value:
+MakeEnvironmentBlock.4=Environment
+MakeEnvironmentBlock.5=Environment used for make builder
+MakeEnvironmentBlock.6=Environment variables to set
+MakeEnvironmentBlock.7=N&ew...
+MakeEnvironmentBlock.8=Se&lect...
+MakeEnvironmentBlock.9=E&dit...
+
+MakeCWizardSettings.title=C/Make Project Settings
+MakeCWizardSettings.description=Define the project and 'make' builder settings
+
+MakeCCWizardSettings.title=C++/Make Project Settings
+MakeCCWizardSettings.description=Define the project and 'make' builder settings
+
+WizardMakeProjectConversion.title=Convert to C/C++ Make project
+WizardMakeProjectConversion.description=Convert a project to a C/C++ project which uses 'make' to build it.
+WizardMakeProjectConversion.monitor.convertingToMakeProject=Converting to Make Project...
+
+MakeWizardUpdate.window_title=Make Project Migration
+MakeWizardUpdatePage.title=Make Project Migration
+MakeWizardUpdatePage.description=Migrate older make projects to new make builder.
+MakeWizardUpdatePage.projectList=Project list
+MakeWizardUpdatePage.status.noProjectsToUpdate=No projects to update
+MakeWizardUpdatePage.status.noProjectsSelected=No projects selected
+
+WizardCheckboxTablePart.WizardCheckboxTablePart.selectAll=Select All
+WizardCheckboxTablePart.WizardCheckboxTablePart.deselectAll=Deselect All
+WizardCheckboxTablePart.WizardCheckboxTablePart.counter={0} of {1} Selected
+
+SettingsBlock.label=Make Builder
+SettingsBlock.message=Make builder settings.
+SettingsBlock.makeSetting.group_label=Build Setting
+SettingsBlock.makeSetting.stopOnError=Stop on first build error.
+SettingsBlock.makeSetting.runAllBuilders=Run all project builders.
+SettingsBlock.makeCmd.group_label=Build command
+SettingsBlock.makeCmd.use_default=Use default
+SettingsBlock.makeCmd.label=Build command:
+SettingsBlock.makeLoc.group_label=Build Location
+SettingsBlock.makeDir.label=Build directory:
+SettingsBlock.makeDir.browseWorkspace=Workspace...
+SettingsBlock.makeDir.browseFilesystem=Filesystem...
+SettingsBlock.makeWorkbench.group_label=Workbench Build Behavior
+SettingsBlock.makeWorkbench.type=Workbench build type:
+SettingsBlock.makeWorkbench.target=Make build target:
+SettingsBlock.makeWorkbench.auto=Build on resource save (Auto Build)
+SettingsBlock.makeWorkbench.note=Note:
+SettingsBlock.makeWorkbench.autobuildMessage=See Workbench automatic build preference.
+SettingsBlock.makeWorkbench.incremental=Build (Incremental Build)
+SettingsBlock.makeWorkbench.clean=Clean
+SettingsBlock.makeWorkbench.autoBuildTarget=Auto Build Target
+SettingsBlock.makeWorkbench.incrementalBuildTarget=Incremental Build Target
+SettingsBlock.makeWorkbench.cleanTarget=Clean Target
+SettingsBlock.variables=Variables...
+TargetBlock.target.group_label=Target
+TargetBlock.target.label=Target Name:
+
+ErrorParserBlock.label.missingBuilderInformation=Builder is missing or disabled on project.
+
+BuildTarget.target.group_label=Make Target
+BuildTarget.target.label=Make Target:
+
+MakeTargetsPreferencePage.buildTargetInBackground.label=Build make targets in background.
+
+MakeDocumentProvider.exception.createElementInfo=Error creating element.
+
+AddBuildTargetAction.title=Add make Target
+AddBuildTargetAction.description=Add make Target
+AddBuildTargetAction.tooltip= Add make Target
+AddBuildTargetAction.exception.internal=Internal Error
+
+OpenIncludeAction.title=Open include directive
+OpenIncludeAction.description=Open an include directive
+OpenIncludeAction.tooltip= Include Directive
+OpenIncludeAction.exception.internal=Internal Error
+
+TargetBuild.execption.message=Target Build Error
+TargetBuild.monitor.beginTask=Building Targets...
+TargetBuild.backgroundTask.name=Building Targets.
+
+TargetListViewer.button.add=Add...
+TargetListViewer.button.remove=Remove
+TargetListViewer.button.edit=Edit...
+TargetListViewer.lable.target=Target
+TargetListViewer.lable.location=Location
+TargetListViewer.exception.error=Error
+TargetListViewer.exception.message=An error occurred performing the selected action
+
+UpdateMakeProjectAction.exception.error=Error
+UpdateMakeProjectAction.eception.message=Error updating Make Projects
+UpdateMakeProjectAction.monitor.convert=Converting Make Targets...
+UpdateMakeProjectAction.monitor.update=Updating make Projects...
+
+BuildPathInfoBlock.button.browse=Browse...
+BuildPathInfoBlock.description=Set the include paths and preprocessor symbols for this project
+BuildPathInfoBlock.monitor.settingScannerInfo=Setting Scanner Info
+
+BuildTargetDialog.title.buildTarget=Make Targets
+BuildTargetDialog.button.build=Build
+BuildTargetDialog.title.makeTargetsFor=Make Targets for:
+
+MakeTargetDialog.exception.noTargetBuilderOnProject=Not target builders on the project
+MakeTargetDialog.title.createMakeTarget=Create a new Make target
+MakeTargetDialog.title.modifyMakeTarget=Modify a Make target
+MakeTargetDialog.message.mustSpecifyName=Must specify a target name.
+MakeTargetDialog.message.targetWithNameExists=Target with that name already exits.
+MakeTargetDialog.message.mustSpecifyBuildCommand=Must specify a build command
+MakeTargetDialog.button.update=Update
+MakeTargetDialog.button.create=Create
+MakeTargetDialog.exception.makeTargetError=Make Target Error
+MakeTargetDialog.exception.errorAddingTarget=Error adding target
+
+SettingsBlock.title.selectLocationToBuildFrom=Selection Location to build from.
+SettingsBlock.label.missingBuilderInformation=Builder is missing or disabled on project.
+SettingsBlock.monitor.applyingSettings=Applying Settings...
+SettingsBlock.message.mustEnterBuildCommand=Must enter a build command
+
+DeleteTargetAction.label=Delete Make Target
+DeleteTargetAction.tooltip=Delete Make Target
+DeleteTargetAction.title.confirmDeletion=Confirm Target Deletion
+DeleteTargetAction.message.confirmDeleteion=Are you sure you want to delete ''{0}''?
+DeleteTargetAction.title.confirmMultipleDeletion=Confirm Multiple Target Deletion
+DeleteTargetAction.message.confirmMultipleDeletion=Are you sure you want to delete these {0} targets?
+DeleteTargetAction.exception.removeError=Make Target Remove Error
+DeleteTargetAction.exception.errorDeletingBuildTarget=Error deleting Make target
+
+BuildTargetAction.label=Build Make Target
+BuildTargetAction.tooltip=Build Make Target
+
+EditTargetAction.label=Edit Make Target
+EditTargetAction.tooltip=Edit Make Target
+EditTargetAction.exception.internalError=Internal Error
+EditTargetAction.exception.errorEditingTarget=Error editing target.
+
+AddTargetAction.label=Add Make Target
+AddTargetAction.tooltip=Add Make Target
+AddTargetAction.exception.internalError=Internal Error
+AddTargetAction.=Internal Error
+
+FilterEmptyFolderAction.label=Hide Empty Folders
+FilterEmptyFolderAction.tooltip=Hide Empty Folders
+
+# Startup messages
+MakeUIPlugin.update_project=Update make projects
+MakeUIPlugin.update_project_message=Older \'make\' projects have been detected in your workspace. \n These projects are no longer supported, would you like to convert these now?
+
+# Prefernece Page
+MakePreferencePage.description=Specify the settings used as defaults by the New Standard Make Project creation wizard.
+MakeTargetPreferencePage.buildTargetInBackground.label=Build Make target in the background.
+
+#Property Page
+MakeProjectPropertyPage.closedproject=Project Closed
+MakeProjectPropertyPage.internalError=An Internal error has occur please check error log.
+
+#-------------- Makefile Editor messages
+ContentAssistProposal.label=Content Assist@Ctrl+SPACE
+ContentAssistProposal.tooltip=Content Assist
+ContentAssistProposal.image=
+ContentAssistProposal.description=Content Assist
+
+ContentAssistTip.label=Content Tip@Ctrl+SHIFT+SPACE
+ContentAssistTip.tooltip=Content Tip
+ContentAssistTip.image=
+ContentAssistTip.description=Content Tip
+
+TogglePresentation.label=Show Source of Selected Element Only
+TogglePresentation.tooltip=Show Source of Selected Element Only
+TogglePresentation.description=Enable/Disable Segmented Source Viewer
+
+Comment.label=&Comment
+Comment.tooltip=Comment the Selected Lines
+Comment.description=Turn the selected lines into # style comments
+
+Uncomment.label=Uncommen&t
+Uncomment.tooltip=Uncomment the Selected # comment Lines
+Uncomment.description=Uncomment the selected # comment lines
+
+OpenDeclarationAction.label=&Open Declaration@F3
+OpenDeclarationAction.description=Open an editor on the referenced element
+OpenDeclarationAction.tooltip=Open an editor on the referenced element
+
+# ------- LexicalSortingAction------------
+
+LexicalSortingAction.label=Sort
+LexicalSortingAction.description=Sorts the elements in the outliner
+LexicalSortingAction.tooltip=Sort
+LexicalSortingAction.tooltip.on=Do Not Sort
+LexicalSortingAction.tooltip.off=Sort
+
+# --- ManageIncludePathsDialog dialog ---
+ManageIncludePathsDialog.title=Manage include paths
+ManageIncludePathsDialog.userGroup.title=User specified include paths
+ManageIncludePathsDialog.discoveredGroup.title=Discovered include paths
+
+ManageScannerConfigDialogCommon.discoveredGroup.selected.label=Selected:
+ManageScannerConfigDialogCommon.discoveredGroup.removed.label=Removed:
+ManageScannerConfigDialogCommon.discoveredGroup.buttons.up.label=Up
+ManageScannerConfigDialogCommon.discoveredGroup.buttons.down.label=Down
+ManageScannerConfigDialogCommon.discoveredGroup.buttons.disable.label=Disable
+ManageScannerConfigDialogCommon.discoveredGroup.buttons.enable.label=Enable
+ManageScannerConfigDialogCommon.discoveredGroup.buttons.delete.label=Delete
+ManageScannerConfigDialogCommon.discoveredGroup.buttons.deleteAll.label=Delete all
+ManageScannerConfigDialogCommon.discoveredGroup.annotation.disabled=disabled
+
+# --- ManageDefinedSymbolsDialog dialog ---
+ManageDefinedSymbolsDialog.title=Manage defined symbols
+ManageDefinedSymbolsDialog.userGroup.title=User specified symbol definitions
+ManageDefinedSymbolsDialog.discoveredGroup.title=Discovered symbol definitions
+
+# --- ScannerConfigOptionsDialog ---
+ScannerConfigOptionsDialog.title=Discovery Options
+ScannerConfigOptionsDialog.description=Set the scanner configuration discovery options for this project
+ScannerConfigOptionsDialog.scGroup.label=Automated discovery of paths and symbols
+ScannerConfigOptionsDialog.scGroup.enabled.button=Automate discovery of paths and symbols
+ScannerConfigOptionsDialog.scGroup.problemReporting.enabled.button=Report path detection problems
+ScannerConfigOptionsDialog.scGroup.selectedProfile.combo=Discovery profile:
+ScannerConfigOptionsDialog.profile.group.label=Discovery profile options
+ScannerConfigOptionsDialog.boProvider.parser.enabled.button=Enable build output scanner info discovery
+ScannerConfigOptionsDialog.boProvider.open.label=Load build output from file
+ScannerConfigOptionsDialog.boProvider.browse.button=Browse...
+ScannerConfigOptionsDialog.boProvider.browse.openFileDialog=Build output file:
+ScannerConfigOptionsDialog.boProvider.load.button=Load
+ScannerConfigOptionsDialog.siProvider.parser.enabled.button=Enable generate scanner info command
+ScannerConfigOptionsDialog.siProvider.command.label=Compiler invocation command
+ScannerConfigOptionsDialog.siProvider.browse.button=Browse...
+ScannerConfigOptionsDialog.siProvider.browse.runCommandDialog='gcc' command:
+ScannerConfigOptionsDialog.siProvider.command.errorMessage=Must enter compiler invocation command
+ScannerConfigOptionsDialog.apply.progressMessage=Setting scanner configuration discovery options...
+ScannerConfigOptionsDialog.common.variables.button=Variables...
+
+ScannerConfigOptionsDialog.unsavedchanges.title=Setting C/C++ Make Project Discovery Options
+ScannerConfigOptionsDialog.unsavedchanges.message=The C/C++ Make Project Discovery Options property page contains unsaved modifications. Do you want to save changes so that other discovery related settings can be updated?
+ScannerConfigOptionsDialog.unsavedchanges.button.save=Apply
+ScannerConfigOptionsDialog.unsavedchanges.button.cancel=Cancel
+
+ScannerConfigOptionsDialog.error.title=Error Setting Project Discovery options
+ScannerConfigOptionsDialog.error.message=An error occurred while setting the project discovery options
+
+# --- DiscoveredScannerConfigurationContainerPage ---
+DiscoveredScannerConfigurationContainerPage.title=Edit container
+DiscoveredScannerConfigurationContainerPage.description=Manage discovered scanner configuration
+DiscoveredScannerConfigurationContainerPage.list.title=Discovered include paths and symbol definitions
+DiscoveredScannerConfigurationContainerPage.initialization.error.message=Error initializing Discovered paths container
+
+CopyDiscoveredPathAction.title=Copy
+CopyDiscoveredPathAction.description=Copy as text
+CopyDiscoveredPathAction.tooltip=Copy as text
+MultipleInputDialog.0=&Browse...
+MultipleInputDialog.1=Select a file:
+MultipleInputDialog.2=Varia&bles...
+
+OptionalMessageDialog_dontShowAgain= Do not show this &message again
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MessageLine.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MessageLine.java
new file mode 100644
index 0000000000..f909063de9
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MessageLine.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import org.eclipse.jface.resource.JFaceColors;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.widgets.Composite;
+
+
+/**
+ * A message line. It distinguishes between "normal" messages and errors.
+ * Setting an error message hides a currently displayed message until
+ * <code>clearErrorMessage</code> is called.
+ */
+public class MessageLine extends CLabel {
+
+ private String fMessage;
+
+ private Color fNormalMsgAreaBackground;
+
+ private boolean hasErrorMessage;
+
+ /**
+ * Creates a new message line as a child of the given parent.
+ */
+ public MessageLine(Composite parent) {
+ this(parent, SWT.LEFT);
+ }
+
+ /**
+ * Creates a new message line as a child of the parent and with the given SWT stylebits.
+ */
+ public MessageLine(Composite parent, int style) {
+ super(parent, style);
+ fNormalMsgAreaBackground= getBackground();
+ }
+
+
+ /**
+ * Display the given error message. A currently displayed message
+ * is saved and will be redisplayed when the error message is cleared.
+ */
+ public void setErrorMessage(String message) {
+ if (message != null && message.length() > 0) {
+ hasErrorMessage = true;
+ setText(message);
+ setImage(MakeUIImages.getImage(MakeUIImages.IMG_OBJS_ERROR));
+ setBackground(JFaceColors.getErrorBackground(getDisplay()));
+ return;
+ }
+ hasErrorMessage = false;
+ setText(fMessage);
+ setImage(null);
+ setBackground(fNormalMsgAreaBackground);
+ }
+
+ public void setMessage(String message) {
+ fMessage = message;
+ setText(message);
+ }
+
+ public boolean hasErrorMessage() {
+ return hasErrorMessage;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/OptionalMessageDialog.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/OptionalMessageDialog.java
new file mode 100644
index 0000000000..a8e5781bb7
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/OptionalMessageDialog.java
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * Anton Leherbauer (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * This is a <code>MessageDialog</code> which allows the user
+ * to choose that the dialog isn't shown again the next time.
+ */
+public class OptionalMessageDialog extends MessageDialog {
+ // String constants for widgets
+ private static final String CHECKBOX_TEXT= MakeUIMessages.getResourceString("OptionalMessageDialog_dontShowAgain"); // $NON-NLS-1$
+
+ // Dialog store id constants
+ private static final String STORE_ID= "OptionalMessageDialog.hide."; //$NON-NLS-1$
+ private static final String KEY_DETAIL = ".detail"; //$NON-NLS-1$
+
+ public static final int NOT_SHOWN= IDialogConstants.CLIENT_ID + 1;
+ public static final int NO_DETAIL= -1;
+
+ private Button fHideDialogCheckBox;
+ private String fId;
+
+ /**
+ * Opens the dialog but only if the user hasn't choosen to hide it.
+ * Returns <code>NOT_SHOWN</code> if the dialog was not shown.
+ */
+ public static int open(String id, Shell parent, String title, Image titleImage, String message, int dialogType, String[] buttonLabels, int defaultButtonIndex) {
+ if (!isDialogEnabled(id))
+ return OptionalMessageDialog.NOT_SHOWN;
+
+ MessageDialog dialog= new OptionalMessageDialog(id, parent, title, titleImage, message, dialogType, buttonLabels, defaultButtonIndex);
+ return dialog.open();
+ }
+
+ protected OptionalMessageDialog(String id, Shell parent, String title, Image titleImage, String message, int dialogType, String[] buttonLabels, int defaultButtonIndex) {
+ super(parent, title, titleImage, message, dialogType, buttonLabels, defaultButtonIndex);
+ fId= id;
+ }
+
+ @Override
+ protected Control createCustomArea(Composite parent) {
+ Composite composite= new Composite(parent, SWT.NONE);
+ GridLayout layout= new GridLayout();
+ layout.marginHeight= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+ layout.marginWidth= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+ layout.horizontalSpacing= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+ composite.setLayout(layout);
+ composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ fHideDialogCheckBox= new Button(composite, SWT.CHECK | SWT.LEFT);
+ fHideDialogCheckBox.setText(CHECKBOX_TEXT);
+ fHideDialogCheckBox.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ setDialogEnabled(fId, !((Button)e.widget).getSelection());
+ }
+ });
+ applyDialogFont(fHideDialogCheckBox);
+ return fHideDialogCheckBox;
+ }
+
+ //--------------- Configuration handling --------------
+
+ /**
+ * Returns this dialog
+ *
+ * @return the settings to be used
+ */
+ private static IDialogSettings getDialogSettings() {
+ IDialogSettings settings= CUIPlugin.getDefault().getDialogSettings();
+ settings= settings.getSection(STORE_ID);
+ if (settings == null)
+ settings= CUIPlugin.getDefault().getDialogSettings().addNewSection(STORE_ID);
+ return settings;
+ }
+
+ /**
+ * Answers whether the optional dialog is enabled and should be shown.
+ */
+ public static boolean isDialogEnabled(String key) {
+ IDialogSettings settings= getDialogSettings();
+ return !settings.getBoolean(key);
+ }
+
+ /**
+ * Sets a detail for the dialog.
+ */
+ public static void setDialogDetail(String key, int detail) {
+ IDialogSettings settings= getDialogSettings();
+ settings.put(key+KEY_DETAIL, detail);
+ }
+
+ /**
+ * Returns the detail for this dialog, or NO_DETAIL, if none.
+ */
+ public static int getDialogDetail(String key) {
+ IDialogSettings settings= getDialogSettings();
+ try {
+ return settings.getInt(key+KEY_DETAIL);
+ } catch (NumberFormatException e) {
+ return NO_DETAIL;
+ }
+ }
+
+ /**
+ * Sets whether the optional dialog is enabled and should be shown.
+ */
+ public static void setDialogEnabled(String key, boolean isEnabled) {
+ IDialogSettings settings= getDialogSettings();
+ settings.put(key, !isEnabled);
+ }
+
+ /**
+ * Clears all remembered information about hidden dialogs
+ */
+ public static void clearAllRememberedStates() {
+ IDialogSettings settings= CUIPlugin.getDefault().getDialogSettings();
+ settings.addNewSection(STORE_ID);
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ResourceLookup.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ResourceLookup.java
new file mode 100644
index 0000000000..0479466cc5
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ResourceLookup.java
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import java.net.URI;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+
+/**
+ * Allows for looking up resources by location or name.
+ */
+public class ResourceLookup {
+ private static ResourceLookupTree lookupTree= new ResourceLookupTree();
+
+ public static void startup() {
+ lookupTree.startup();
+ }
+
+ public static void shutdown() {
+ lookupTree.shutdown();
+ }
+
+ /**
+ * Searches for files with the given location suffix.
+ *
+ * At this point the method works for sources and headers (no other content types), only.
+ * This is done to use less memory and can be changed if necessary.
+ * For linked resource files, the name of the link target is relevant.
+ *
+ * @param locationSuffix the suffix to match, always used as relative path.
+ * @param projects the projects to search
+ * @param ignoreCase whether or not to ignore case when comparing the suffix.
+ */
+ public static IFile[] findFilesByName(IPath locationSuffix, IProject[] projects, boolean ignoreCase) {
+ return lookupTree.findFilesByName(locationSuffix, projects, ignoreCase);
+ }
+
+ /**
+ * Uses a lookup-tree that finds resources for locations using the canonical representation
+ * of the path.
+ */
+ public static IFile[] findFilesForLocationURI(URI location) {
+ return lookupTree.findFilesForLocationURI(location);
+ }
+
+ /**
+ * Uses a lookup-tree that finds resources for locations using the canonical representation
+ * of the path. The method does not work for files where the name (last segment) of the
+ * resources differs from the name of the location.
+ */
+ public static IFile[] findFilesForLocation(IPath location) {
+ return lookupTree.findFilesForLocation(location);
+ }
+
+ /**
+ * Uses {@link #findFilesForLocationURI(URI)} and selects the most relevant file
+ * from the result. Files form the first project, from cdt-projects and those on source
+ * roots are preferred, see {@link FileRelevance}.
+ * @param location an URI for the location of the files to search for.
+ * @param preferredProject a project to be preferred over others, or <code>null</code>.
+ * @return a file for the location in one of the given projects, or <code>null</code>.
+ * NB the returned IFile may not exist
+ */
+ public static IFile selectFileForLocationURI(URI location, IProject preferredProject) {
+ return selectFile(findFilesForLocationURI(location), preferredProject);
+ }
+
+ /**
+ * Uses {@link #findFilesForLocation(IPath)} and selects the most relevant file
+ * from the result. Files form the preferred project, from cdt-projects and those on source
+ * roots are preferred, see {@link FileRelevance}.
+ * @param location a path for the location of the files to search for.
+ * @param preferredProject a project to be preferred over others, or <code>null</code>.
+ * @return a file for the location or <code>null</code>.
+ * NB the returned IFile may not exist
+ */
+ public static IFile selectFileForLocation(IPath location, IProject preferredProject) {
+ return selectFile(findFilesForLocation(location), preferredProject);
+ }
+
+ private static IFile selectFile(IFile[] files, IProject preferredProject) {
+ if (files.length == 0)
+ return null;
+
+ if (files.length == 1)
+ return files[0];
+
+ IFile best= null;
+ int bestRelevance= -1;
+
+ for (int i = 0; i < files.length; i++) {
+ IFile file = files[i];
+ int relevance= FileRelevance.getRelevance(file, preferredProject);
+ if (best == null || relevance > bestRelevance ||
+ (relevance == bestRelevance &&
+ best.getFullPath().toString().compareTo(file.getFullPath().toString()) > 0)) {
+ bestRelevance= relevance;
+ best= file;
+ }
+ }
+ return best;
+ }
+
+ /**
+ * Sorts files by relevance for CDT, by the criteria listed below. The most relevant files
+ * is listed first.
+ * <br> Accessible files
+ * <br> Files of preferred project
+ * <br> Files of CDT projects
+ * <br> Files on a source root of a CDT project
+ */
+ public static void sortFilesByRelevance(IFile[] filesToSort, final IProject preferredProject) {
+ Collections.sort(Arrays.asList(filesToSort), new Comparator<IFile>() {
+ public int compare(IFile f1, IFile f2) {
+ int r1= FileRelevance.getRelevance(f1, preferredProject);
+ int r2= FileRelevance.getRelevance(f2, preferredProject);
+
+ if (r1 > r2)
+ return -1;
+ if (r1 < r2)
+ return 1;
+
+ return f1.getFullPath().toString().compareTo(f2.getFullPath().toString());
+ }
+ });
+ }
+
+ /**
+ * For testing, only.
+ */
+ public static void dump() {
+ lookupTree.dump();
+ }
+ /**
+ * For testing, only.
+ */
+ public static void unrefNodeMap() {
+ lookupTree.unrefNodeMap();
+ }
+ /**
+ * For testing, only.
+ */
+ public static void simulateNodeMapCollection() {
+ lookupTree.simulateNodeMapCollection();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ResourceLookupTree.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ResourceLookupTree.java
new file mode 100644
index 0000000000..74fcfb3de9
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ResourceLookupTree.java
@@ -0,0 +1,861 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import java.lang.ref.SoftReference;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.cdt.core.CProjectNature;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.parser.util.CharArrayUtils;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.IResourceProxy;
+import org.eclipse.core.resources.IResourceProxyVisitor;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.content.IContentTypeManager;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+
+/**
+ * Allows for looking up resources by location or name. When using this class 100 bytes per resource
+ * are needed. Therefore the support is limited to header-files int non-cdt projects and all files
+ * except non-cdt-files in CDT projects.
+ *
+ * The information for a project is initialized when first requested and then it is kept up to date
+ * using a resource change listener. No memory is used, as long as the class is not used.
+ * When information is not used for more than 10 minutes, the data-structures will be held via a weak
+ * reference, only and are subject to garbage collection.
+ *
+ * The node map stores a map from hash-code of file-names to nodes.
+ * A node contains the name of a file plus a link to the parent resource. From that we can compute
+ * the resource path and obtain further information via the resource.
+ */
+class ResourceLookupTree implements IResourceChangeListener, IResourceDeltaVisitor, IResourceProxyVisitor {
+ private static final int UNREF_DELAY = 10 * 60000; // 10 min
+
+ private static final boolean VISIT_CHILDREN = true;
+ private static final boolean SKIP_CHILDREN = false;
+ private static final IFile[] NO_FILES = new IFile[0];
+ private static final int TRIGGER_RECALC=
+ IResourceDelta.TYPE | IResourceDelta.REPLACED |
+ IResourceDelta.LOCAL_CHANGED | IResourceDelta.OPEN;
+
+ private static class Extensions {
+ private final boolean fInvert;
+ private final Set<String> fExtensions;
+ Extensions(Set<String> extensions, boolean invert) {
+ fInvert= invert;
+ fExtensions= extensions;
+ }
+ boolean isRelevant(String filename) {
+ // accept all files without extension
+ final int idx= filename.lastIndexOf('.');
+ if (idx < 0)
+ return true;
+
+ return fExtensions.contains(filename.substring(idx+1).toUpperCase()) != fInvert;
+ }
+ }
+
+ private static class Node {
+ final Node fParent;
+ final char[] fResourceName;
+ final boolean fHasFileLocationName;
+ final boolean fIsFileLinkTarget;
+
+ boolean fDeleted;
+ boolean fHasChildren;
+ int fCanonicHash;
+
+ Node(Node parent, char[] name, boolean hasFileLocationName, boolean isFileLinkTarget) {
+ fParent= parent;
+ fResourceName= name;
+ fHasFileLocationName= hasFileLocationName;
+ fIsFileLinkTarget= isFileLinkTarget;
+ if (parent != null)
+ parent.fHasChildren= true;
+ }
+ }
+
+ private final Object fLock= new Object();
+ private final Job fUnrefJob;
+ private SoftReference<Map<Integer, Object>> fNodeMapRef;
+ private Map<Integer, Object> fNodeMap;
+ private final Map<String, Extensions> fFileExtensions;
+ private Extensions fCDTProjectExtensions;
+ private Extensions fDefaultExtensions;
+ private Extensions fCurrentExtensions;
+ private Node fRootNode;
+ private boolean fNeedCleanup;
+ private Node fLastFolderNode;
+
+ public ResourceLookupTree() {
+ fRootNode= new Node(null, CharArrayUtils.EMPTY, false, false) {};
+ fFileExtensions= new HashMap<String, Extensions>();
+ fUnrefJob= new Job("Timer") { //$NON-NLS-1$
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ unrefNodeMap();
+ return Status.OK_STATUS;
+ }
+ };
+ fUnrefJob.setSystem(true);
+ }
+
+ public void startup() {
+ final IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ workspace.addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE);
+ }
+
+ public void shutdown() {
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
+ synchronized (fLock) {
+ fNodeMap= null;
+ fNodeMapRef= null;
+ fFileExtensions.clear();
+ }
+ }
+
+ /**
+ * Handle resource change notifications.
+ */
+ public void resourceChanged(IResourceChangeEvent event) {
+ IResourceDelta delta= event.getDelta();
+ synchronized (fLock) {
+ if (fNodeMapRef == null)
+ return;
+ boolean unsetMap= false;
+ if (fNodeMap == null) {
+ fNodeMap= fNodeMapRef.get();
+ if (fNodeMap == null)
+ return;
+ unsetMap= true;
+ }
+ try {
+ delta.accept(this);
+ } catch (CoreException e) {
+ AutotoolsUIPlugin.log(e);
+ } finally {
+ if (fNeedCleanup)
+ cleanup();
+ fCurrentExtensions= null;
+ fNeedCleanup= false;
+ if (unsetMap)
+ fNodeMap= null;
+ }
+ }
+ }
+
+ /**
+ * Handles resource change notifications by visiting the delta.
+ */
+ public boolean visit(IResourceDelta delta) throws CoreException {
+ assert Thread.holdsLock(fLock);
+
+ final IResource res= delta.getResource();
+ if (res instanceof IWorkspaceRoot)
+ return VISIT_CHILDREN;
+
+ if (res instanceof IProject) {
+ // project not yet handled
+ final String name = res.getName();
+ final Extensions exts= fFileExtensions.get(name);
+ if (exts == null)
+ return SKIP_CHILDREN;
+
+ switch (delta.getKind()) {
+ case IResourceDelta.ADDED: // new projects should not yet be part of the tree
+ case IResourceDelta.REMOVED:
+ fFileExtensions.remove(name);
+ remove(res);
+ return SKIP_CHILDREN;
+
+ case IResourceDelta.CHANGED:
+ if ((delta.getFlags() & (TRIGGER_RECALC | IResourceDelta.DESCRIPTION)) != 0) {
+ fFileExtensions.remove(name);
+ remove(res);
+ return SKIP_CHILDREN;
+ }
+ break;
+ }
+ fCurrentExtensions= exts;
+ return VISIT_CHILDREN;
+ }
+
+ // file or folder
+ switch (delta.getKind()) {
+ case IResourceDelta.ADDED:
+ add(res);
+ return SKIP_CHILDREN;
+
+ case IResourceDelta.CHANGED:
+ if ((delta.getFlags() & TRIGGER_RECALC) != 0) {
+ remove(res);
+ add(res);
+ return SKIP_CHILDREN;
+ }
+ return VISIT_CHILDREN;
+
+ case IResourceDelta.REMOVED:
+
+ remove(res);
+ return SKIP_CHILDREN;
+ }
+ return VISIT_CHILDREN;
+ }
+
+
+ /**
+ * Add a resource to the tree.
+ */
+ private void add(IResource res) {
+ assert Thread.holdsLock(fLock);
+
+ if (res instanceof IFile) {
+ final String resName = res.getName();
+ String linkedName= null;
+ if (res.isLinked()) {
+ URI uri= res.getLocationURI();
+ if (uri != null) {
+ linkedName= LocationAdapter.URI.extractName(uri);
+ if (linkedName.length() > 0 && fCurrentExtensions.isRelevant(linkedName)) {
+ if (linkedName.equals(resName)) {
+ createFileNode(res.getFullPath(), null);
+ } else {
+ createFileNode(res.getFullPath(), linkedName);
+ }
+ }
+ }
+ } else if (fCurrentExtensions.isRelevant(resName)) {
+ createFileNode(res.getFullPath(), null);
+ }
+ } else {
+ try {
+ res.accept(this, 0);
+ } catch (CoreException e) {
+ AutotoolsUIPlugin.log(e);
+ }
+ }
+ }
+
+ /**
+ * Add a resource tree by using a resource proxy visitor.
+ */
+ public boolean visit(IResourceProxy proxy) throws CoreException {
+ if (proxy.getType() == IResource.FILE) {
+ if (fCurrentExtensions.isRelevant(proxy.getName())) {
+ if (proxy.isLinked()) {
+ IResource res= proxy.requestResource();
+ if (res instanceof IFile) {
+ add(res);
+ }
+ return true;
+ }
+ createFileNode(proxy.requestFullPath(), null);
+ }
+ }
+ return true;
+ }
+
+
+ public void unrefNodeMap() {
+ synchronized (fLock) {
+ fNodeMap= null;
+ }
+ }
+
+ public void simulateNodeMapCollection() {
+ synchronized (fLock) {
+ fNodeMap= null;
+ fNodeMapRef= new SoftReference<Map<Integer, Object>>(null);
+ }
+ }
+
+ /**
+ * Initializes nodes for the given projects. Also creates the node map if it was collected.
+ */
+ private void initializeProjects(IProject[] projects) {
+ assert Thread.holdsLock(fLock);
+
+ if (fNodeMap == null) {
+ if (fNodeMapRef != null) {
+ fNodeMap= fNodeMapRef.get();
+ }
+
+ if (fNodeMap == null) {
+ fFileExtensions.clear();
+ fNodeMap= new HashMap<Integer, Object>();
+ fNodeMapRef= new SoftReference<Map<Integer, Object>>(fNodeMap);
+ }
+ }
+ fUnrefJob.cancel();
+ fUnrefJob.schedule(UNREF_DELAY);
+
+ for (IProject project : projects) {
+ if (project.isOpen() && !fFileExtensions.containsKey(project.getName())) {
+ Extensions ext= fDefaultExtensions;
+ try {
+ if (project.hasNature(CProjectNature.C_NATURE_ID)) {
+ ext= fCDTProjectExtensions;
+ }
+ } catch (CoreException e) {
+ AutotoolsUIPlugin.log(e);
+ // treat as non-cdt project
+ }
+ fCurrentExtensions= ext;
+ add(project);
+ fFileExtensions.put(project.getName(), ext);
+ fCurrentExtensions= null;
+ }
+ }
+ }
+
+ /**
+ * Initializes file-extensions and node map
+ */
+ private void initFileExtensions() {
+
+ if (fDefaultExtensions == null) {
+ HashSet<String> cdtContentTypes= new HashSet<String>();
+ String[] registeredContentTypes= CoreModel.getRegistedContentTypeIds();
+ cdtContentTypes.addAll(Arrays.asList(registeredContentTypes));
+
+ final IContentTypeManager ctm= Platform.getContentTypeManager();
+ final IContentType[] ctts= ctm.getAllContentTypes();
+ Set<String> result= new HashSet<String>();
+ outer: for (IContentType ctt : ctts) {
+ IContentType basedOn= ctt;
+ while (basedOn != null) {
+ if (cdtContentTypes.contains(basedOn.getId()))
+ continue outer;
+ basedOn= basedOn.getBaseType();
+ }
+ // this is a non-cdt content type
+ addFileSpecs(ctt, result);
+ }
+ fCDTProjectExtensions= new Extensions(result, true);
+
+ result= new HashSet<String>();
+ for (IContentType ctt : ctts) {
+ IContentType basedOn= ctt;
+ while (basedOn != null) {
+ if (cdtContentTypes.contains(basedOn.getId())) {
+ addFileSpecs(ctt, result);
+ break;
+ }
+ basedOn= basedOn.getBaseType();
+ }
+ }
+ fDefaultExtensions= new Extensions(result, false);
+ }
+ }
+
+ private void addFileSpecs(IContentType ctt, Set<String> result) {
+ String[] fspecs= ctt.getFileSpecs(IContentType.FILE_EXTENSION_SPEC);
+ for (String fspec : fspecs) {
+ result.add(fspec.toUpperCase());
+ }
+ }
+
+ /**
+ * Inserts a node for the given path.
+ */
+ private void createFileNode(IPath fullPath, String fileLink) {
+ final String[] segments= fullPath.segments();
+ final boolean isFileLinkTarget= fileLink != null;
+ final char[][] charArraySegments = toCharArrayArray(segments, fileLink);
+ createNode(charArraySegments, charArraySegments.length, true, isFileLinkTarget);
+ }
+
+ private char[][] toCharArrayArray(String[] segments, String fileLink) {
+ final int segmentLen = segments.length;
+ char[][] chsegs;
+ if (fileLink != null) {
+ chsegs= new char[segmentLen+1][];
+ chsegs[segmentLen]= fileLink.toCharArray();
+ } else {
+ chsegs= new char[segmentLen][];
+ }
+ for (int i = 0; i < segmentLen; i++) {
+ chsegs[i]= segments[i].toCharArray();
+ }
+ return chsegs;
+ }
+
+ /**
+ * Inserts a node for the given path.
+ */
+ private Node createNode(char[][] segments, int segmentCount, boolean hasFileLocationName, boolean isFileLinkTarget) {
+ assert Thread.holdsLock(fLock);
+
+ if (segmentCount == 0)
+ return fRootNode;
+
+ if (!hasFileLocationName && fLastFolderNode != null) {
+ if (isNodeForSegments(fLastFolderNode, segments, segmentCount, isFileLinkTarget))
+ return fLastFolderNode;
+ }
+
+ final char[] name= segments[segmentCount-1];
+ final int hash= hashCode(name);
+
+ // search for existing node
+ Object obj= fNodeMap.get(hash);
+
+ Node[] nodes= null;
+ int len= 0;
+ if (obj != null) {
+ if (obj instanceof Node) {
+ Node node= (Node) obj;
+ if (isNodeForSegments(node, segments, segmentCount, isFileLinkTarget)) {
+ if (!hasFileLocationName)
+ fLastFolderNode= node;
+ return node;
+ }
+ nodes= new Node[]{node, null};
+ fNodeMap.put(hash, nodes);
+ len= 1;
+ } else {
+ nodes= (Node[]) obj;
+ for (len=0; len < nodes.length; len++) {
+ Node node = nodes[len];
+ if (node == null)
+ break;
+ if (isNodeForSegments(node, segments, segmentCount, isFileLinkTarget)) {
+ if (!hasFileLocationName)
+ fLastFolderNode= node;
+ return node;
+ }
+ }
+ }
+ }
+ final Node parent= createNode(segments, segmentCount-1, false, false);
+ Node node= new Node(parent, name, hasFileLocationName, isFileLinkTarget);
+ if (nodes == null) {
+ fNodeMap.put(hash, node);
+ } else {
+ if (len == nodes.length) {
+ Node[] newNodes= new Node[len+2];
+ System.arraycopy(nodes, 0, newNodes, 0, len);
+ nodes= newNodes;
+ fNodeMap.put(hash, nodes);
+ }
+ nodes[len]= node;
+ }
+
+ if (!hasFileLocationName)
+ fLastFolderNode= node;
+ return node;
+ }
+
+ /**
+ * Checks whether the given node matches the given segments.
+ */
+ private boolean isNodeForSegments(Node node, char[][] segments, int segmentLength, boolean isFileLinkTarget) {
+ assert Thread.holdsLock(fLock);
+
+ if (node.fIsFileLinkTarget != isFileLinkTarget)
+ return false;
+
+ while(segmentLength > 0 && node != null) {
+ if (!CharArrayUtils.equals(segments[--segmentLength], node.fResourceName))
+ return false;
+ node= node.fParent;
+ }
+ return node == fRootNode;
+ }
+
+ /**
+ * Remove a resource from the tree
+ */
+ private void remove(IResource res) {
+ assert Thread.holdsLock(fLock);
+
+ final char[] name= res.getName().toCharArray();
+ final int hash= hashCode(name);
+
+ Object obj= fNodeMap.get(hash);
+ if (obj == null)
+ return;
+
+ final IPath fullPath= res.getFullPath();
+ final int segmentCount= fullPath.segmentCount();
+ if (segmentCount == 0)
+ return;
+
+ final char[][]segments= toCharArrayArray(fullPath.segments(), null);
+ if (obj instanceof Node) {
+ final Node node= (Node) obj;
+ if (!node.fDeleted && isNodeForSegments(node, segments, segmentCount, false)) {
+ node.fDeleted= true;
+ if (node.fHasChildren)
+ fNeedCleanup= true;
+ fNodeMap.remove(hash);
+ }
+ } else {
+ final Node[] nodes= (Node[]) obj;
+ for (int i= 0; i < nodes.length; i++) {
+ Node node = nodes[i];
+ if (node == null)
+ return;
+ if (!node.fDeleted && isNodeForSegments(node, segments, segmentCount, false)) {
+ remove(nodes, i);
+
+ if (nodes[0] == null)
+ fNodeMap.remove(hash);
+
+ node.fDeleted= true;
+ if (node.fHasChildren)
+ fNeedCleanup= true;
+
+ return;
+ }
+ }
+ }
+ }
+
+ private void remove(Node[] nodes, int i) {
+ int idx= lastValid(nodes, i);
+ if (idx > 0) {
+ nodes[i]= nodes[idx];
+ nodes[idx]= null;
+ }
+ }
+
+ private int lastValid(Node[] nodes, int left) {
+ int right= nodes.length-1;
+ while (left < right) {
+ int mid= (left+right+1)/2; // ==> mid > left
+ if (nodes[mid] == null)
+ right= mid-1;
+ else
+ left= mid;
+ }
+ return right;
+ }
+
+ private void cleanup() {
+ assert Thread.holdsLock(fLock);
+ fLastFolderNode= null;
+
+ for (Iterator<Object> iterator = fNodeMap.values().iterator(); iterator.hasNext();) {
+ Object obj= iterator.next();
+ if (obj instanceof Node) {
+ if (isDeleted((Node) obj)) {
+ iterator.remove();
+ }
+ } else {
+ Node[] nodes= (Node[]) obj;
+ int j= 0;
+ for (int i = 0; i < nodes.length; i++) {
+ final Node node = nodes[i];
+ if (node == null) {
+ if (j==0) {
+ iterator.remove();
+ }
+ break;
+ }
+ if (!isDeleted(node)) {
+ if (i != j) {
+ nodes[j]= node;
+ nodes[i]= null;
+ }
+ j++;
+ } else {
+ nodes[i]= null;
+ }
+ }
+ }
+ }
+ }
+
+ private boolean isDeleted(Node node) {
+ while(node != null) {
+ if (node.fDeleted)
+ return true;
+ node= node.fParent;
+ }
+ return false;
+ }
+
+ /**
+ * Computes a case insensitive hash-code for file names.
+ */
+ private int hashCode(char[] name) {
+ int h= 0;
+ final int len = name.length;
+ for (int i = 0; i < len; i++) {
+ h = 31*h + Character.toUpperCase(name[i]);
+ }
+ return h;
+ }
+
+ /**
+ * Searches for all files with the given location. In case the name of the location is
+ * a cdt-content type the lookup tree is consulted, otherwise as a fallback the platform's
+ * method is called.
+ */
+ public IFile[] findFilesForLocationURI(URI location) {
+ return findFilesForLocation(location, LocationAdapter.URI);
+ }
+
+ /**
+ * Searches for all files with the given location. In case the name of the location is
+ * a cdt-content type the lookup tree is consulted, otherwise as a fallback the platform's
+ * method is called.
+ */
+ public IFile[] findFilesForLocation(IPath location) {
+ return findFilesForLocation(location, LocationAdapter.PATH);
+ }
+
+ /**
+ * Searches for all files with the given location. In case the name of the location is
+ * a cdt-content type the lookup tree is consulted, otherwise as a fallback the platform's
+ * method is called.
+ */
+ public <T> IFile[] findFilesForLocation(T location, LocationAdapter<T> adapter) {
+ initFileExtensions();
+ String name= adapter.extractName(location);
+ Node[] candidates= null;
+ synchronized (fLock) {
+ initializeProjects(ResourcesPlugin.getWorkspace().getRoot().getProjects());
+ Object obj= fNodeMap.get(hashCode(name.toCharArray()));
+ if (obj != null) {
+ candidates= convert(obj);
+ IFile[] result= extractMatchesForLocation(candidates, location, adapter);
+ if (result.length > 0)
+ return result;
+ }
+ }
+
+ // fall back to platform functionality
+ return adapter.platformsFindFilesForLocation(location);
+ }
+
+ private Node[] convert(Object obj) {
+ if (obj instanceof Node)
+ return new Node[] {(Node) obj};
+
+ final Node[] nodes= (Node[]) obj;
+ final int len= lastValid(nodes, -1)+1;
+ final Node[] result= new Node[len];
+ System.arraycopy(nodes, 0, result, 0, len);
+ return result;
+ }
+
+ /**
+ * Returns an array of files for the given name. Search is limited to the supplied projects.
+ */
+ public IFile[] findFilesByName(IPath relativeLocation, IProject[] projects, boolean ignoreCase) {
+ final int segCount= relativeLocation.segmentCount();
+ if (segCount < 1)
+ return NO_FILES;
+
+ final String name= relativeLocation.lastSegment();
+ Node[] candidates;
+
+ initFileExtensions();
+ synchronized (fLock) {
+ initializeProjects(projects);
+ Object obj= fNodeMap.get(hashCode(name.toCharArray()));
+ if (obj == null) {
+ return NO_FILES;
+ }
+ candidates= convert(obj);
+ }
+ String suffix= relativeLocation.toString();
+ while(suffix.startsWith("../")) { //$NON-NLS-1$
+ suffix= suffix.substring(3);
+ }
+ Set<String> prjset= new HashSet<String>();
+ for (IProject prj : projects) {
+ prjset.add(prj.getName());
+ }
+ return extractMatchesForName(candidates, name, suffix, ignoreCase, prjset);
+ }
+
+ /**
+ * Selects the actual matches for the list of candidate nodes.
+ */
+ private IFile[] extractMatchesForName(Node[] candidates, String name, String suffix, boolean ignoreCase, Set<String> prjSet) {
+ final char[] n1= name.toCharArray();
+ final int namelen = n1.length;
+ int resultIdx= 0;
+
+ if (ignoreCase) {
+ for (int j = 0; j < namelen; j++) {
+ n1[j]= Character.toUpperCase(n1[j]);
+ }
+ }
+ final int suffixLen= suffix.length();
+ final IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
+ IFile[] result= null;
+ outer: for (int i = 0; i < candidates.length; i++) {
+ final Node node = candidates[i];
+ if (node.fHasFileLocationName && checkProject(node, prjSet)) {
+ final char[] n2= node.fResourceName;
+ if (namelen == n2.length) {
+ for (int j = 0; j < n2.length; j++) {
+ final char c= ignoreCase ? Character.toUpperCase(n2[j]) : n2[j];
+ if (c != n1[j])
+ continue outer;
+ }
+ final IFile file= root.getFile(createPath(node));
+ final URI loc= file.getLocationURI();
+ if (loc != null) {
+ String path= loc.getPath();
+ final int len= path.length();
+ if (len >= suffixLen &&
+ suffix.regionMatches(ignoreCase, 0, path, len-suffixLen, suffixLen)) {
+ if (result == null)
+ result= new IFile[candidates.length-i];
+ result[resultIdx++]= root.getFile(createPath(node));
+ }
+ }
+ }
+ }
+ }
+ if (result==null)
+ return NO_FILES;
+
+ if (resultIdx < result.length) {
+ IFile[] copy= new IFile[resultIdx];
+ System.arraycopy(result, 0, copy, 0, resultIdx);
+ return copy;
+ }
+ return result;
+ }
+
+ private boolean checkProject(Node node, Set<String> prjSet) {
+ while(true) {
+ final Node n= node.fParent;
+ if (n == fRootNode)
+ break;
+ if (n == null)
+ return false;
+ node= n;
+ }
+ return prjSet.contains(new String(node.fResourceName));
+ }
+
+ private IPath createPath(Node node) {
+ if (node == fRootNode)
+ return Path.ROOT;
+
+ if (node.fIsFileLinkTarget)
+ return createPath(node.fParent);
+
+ return createPath(node.fParent).append(new String(node.fResourceName));
+ }
+
+ /**
+ * Selects the actual matches from the list of candidates
+ */
+ private <T> IFile[] extractMatchesForLocation(Node[] candidates, T location, LocationAdapter<T> adapter) {
+ final IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
+ final String searchPath= adapter.getCanonicalPath(location);
+ IFile[] result= null;
+ int resultIdx= 0;
+ for (int i = 0; i < candidates.length; i++) {
+ final Node node = candidates[i];
+ if (node.fHasFileLocationName) {
+ final IFile file= root.getFile(createPath(node));
+ final T loc= adapter.getLocation(file);
+ if (loc != null) {
+ if (!loc.equals(location)) {
+ if (searchPath == null)
+ continue;
+
+ if (node.fCanonicHash != 0 && node.fCanonicHash != searchPath.hashCode())
+ continue;
+
+ final String candPath= adapter.getCanonicalPath(loc);
+ if (candPath == null)
+ continue;
+
+ node.fCanonicHash= candPath.hashCode();
+ if (!candPath.equals(searchPath))
+ continue;
+ }
+ if (result == null)
+ result= new IFile[candidates.length-i];
+ result[resultIdx++]= root.getFile(createPath(node));
+ }
+ }
+ }
+ if (result==null)
+ return NO_FILES;
+
+ if (resultIdx < result.length) {
+ IFile[] copy= new IFile[resultIdx];
+ System.arraycopy(result, 0, copy, 0, resultIdx);
+ return copy;
+ }
+ return result;
+ }
+
+ @SuppressWarnings("nls")
+ public void dump() {
+ List<String> lines= new ArrayList<String>();
+ synchronized (fLock) {
+ for (Iterator<Object> iterator = fNodeMap.values().iterator(); iterator.hasNext();) {
+ Node[] nodes= convert(iterator.next());
+ for (int i = 0; i < nodes.length; i++) {
+ final Node node = nodes[i];
+ if (node == null) {
+ break;
+ }
+ lines.add(toString(node));
+ }
+ }
+ }
+ Collections.sort(lines);
+ System.out.println("Dumping files:");
+ for (Iterator<String> iterator = lines.iterator(); iterator.hasNext();) {
+ String line = iterator.next();
+ System.out.println(line);
+ }
+ System.out.flush();
+ }
+
+ @SuppressWarnings("nls")
+ private String toString(Node node) {
+ if (node == fRootNode)
+ return "";
+
+ return toString(node.fParent) + "/" + new String(node.fResourceName);
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/SingleCharReader.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/SingleCharReader.java
new file mode 100644
index 0000000000..1d48fcc21b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/SingleCharReader.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2000 2005 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * QNX Software System
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import java.io.IOException;
+import java.io.Reader;
+
+
+public abstract class SingleCharReader extends Reader {
+
+ /**
+ * @see Reader#read(char)
+ */
+ public abstract int read() throws IOException;
+
+
+ /**
+ * @see Reader#read(char[],int,int)
+ */
+ public int read(char cbuf[], int off, int len) throws IOException {
+ int end= off + len;
+ for (int i= off; i < end; i++) {
+ int ch= read();
+ if (ch == -1) {
+ if (i == off) {
+ return -1;
+ }
+ return i - off;
+ }
+ cbuf[i]= (char)ch;
+ }
+ return len;
+ }
+
+ /**
+ * @see Reader#ready()
+ */
+ public boolean ready() throws IOException {
+ return true;
+ }
+
+ /**
+ * Gets the content as a String
+ */
+ public String getString() throws IOException {
+ StringBuffer buf= new StringBuffer();
+ int ch;
+ while ((ch= read()) != -1) {
+ buf.append((char)ch);
+ }
+ return buf.toString();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/SubstitutionTextReader.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/SubstitutionTextReader.java
new file mode 100644
index 0000000000..16d8400b98
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/SubstitutionTextReader.java
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright (c) 2000 2005 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * QNX Software System
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+
+import java.io.IOException;
+import java.io.Reader;
+
+
+/**
+ * Reads the text contents from a reader and computes for each character
+ * a potential substitution. The substitution may eat more characters than
+ * only the one passed into the computation routine.
+ */
+public abstract class SubstitutionTextReader extends SingleCharReader {
+
+ protected static final String LINE_DELIM= System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ private Reader fReader;
+ private boolean fWasWhiteSpace;
+ private int fCharAfterWhiteSpace;
+
+ private boolean fReadFromBuffer;
+ private StringBuffer fBuffer;
+ private int fIndex;
+
+
+ protected SubstitutionTextReader(Reader reader) {
+ fReader= reader;
+ fBuffer= new StringBuffer();
+ fIndex= 0;
+ fReadFromBuffer= false;
+ fCharAfterWhiteSpace= -1;
+ fWasWhiteSpace= true;
+ }
+
+ /**
+ * Implement to compute the substitution for the given character and
+ * if necessary subsequent characters. Use <code>nextChar</code>
+ * to read subsequent characters.
+ */
+ protected abstract String computeSubstitution(int c) throws IOException;
+
+ /**
+ * Returns the internal reader.
+ */
+ protected Reader getReader() {
+ return fReader;
+ }
+
+ /**
+ * Returns the next character.
+ */
+ protected int nextChar() throws IOException {
+ fReadFromBuffer= (fBuffer.length() > 0);
+ if (fReadFromBuffer) {
+ char ch= fBuffer.charAt(fIndex++);
+ if (fIndex >= fBuffer.length()) {
+ fBuffer.setLength(0);
+ fIndex= 0;
+ }
+ return ch;
+ }
+ int ch= fCharAfterWhiteSpace;
+ if (ch == -1) {
+ ch= fReader.read();
+ }
+ if (Character.isWhitespace((char)ch)) {
+ do {
+ ch= fReader.read();
+ } while (Character.isWhitespace((char)ch));
+ if (ch != -1) {
+ fCharAfterWhiteSpace= ch;
+ return ' ';
+ }
+ } else {
+ fCharAfterWhiteSpace= -1;
+ }
+ return ch;
+ }
+
+ /**
+ * @see Reader#read()
+ */
+ public int read() throws IOException {
+ int c;
+ do {
+
+ c= nextChar();
+ while (!fReadFromBuffer) {
+ String s= computeSubstitution(c);
+ if (s == null)
+ break;
+ if (s.length() > 0)
+ fBuffer.insert(0, s);
+ c= nextChar();
+ }
+
+ } while (fWasWhiteSpace && (c == ' '));
+
+ fWasWhiteSpace= (c == ' ' || c == '\r' || c == '\n');
+ return c;
+ }
+
+ /**
+ * @see Reader#ready()
+ */
+ public boolean ready() throws IOException {
+ return fReader.ready();
+ }
+
+ /**
+ * @see Reader#close()
+ */
+ public void close() throws IOException {
+ fReader.close();
+ }
+
+ /**
+ * @see Reader#reset()
+ */
+ public void reset() throws IOException {
+ fReader.reset();
+ fWasWhiteSpace= true;
+ fCharAfterWhiteSpace= -1;
+ fBuffer.setLength(0);
+ fIndex= 0;
+ }
+} \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AbstractAutotoolsHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AbstractAutotoolsHandler.java
new file mode 100644
index 0000000000..f912af4a57
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AbstractAutotoolsHandler.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.actions;
+
+import java.util.Collection;
+
+import org.eclipse.cdt.core.model.ICContainer;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IResource;
+
+public abstract class AbstractAutotoolsHandler extends AbstractHandler {
+
+ @SuppressWarnings("unchecked")
+ protected IContainer getContainer(IEvaluationContext e) {
+ IContainer fContainer = null;
+
+ Object obj = e.getDefaultVariable();
+ if (obj instanceof Collection) {
+ Collection<Object> c = (Collection<Object>)obj;
+ Object[] objArray = c.toArray();
+ if (objArray.length > 0)
+ obj = objArray[0];
+ }
+ if (obj instanceof ICElement) {
+ if ( obj instanceof ICContainer || obj instanceof ICProject) {
+ fContainer = (IContainer) ((ICElement) obj).getUnderlyingResource();
+ } else {
+ obj = ((ICElement)obj).getResource();
+ if ( obj != null) {
+ fContainer = ((IResource)obj).getParent();
+ }
+ }
+ } else if (obj instanceof IResource) {
+ if (obj instanceof IContainer) {
+ fContainer = (IContainer) obj;
+ } else {
+ fContainer = ((IResource)obj).getParent();
+ }
+ } else {
+ fContainer = null;
+ }
+ return fContainer;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AbstractTargetAction.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AbstractTargetAction.java
new file mode 100644
index 0000000000..738faf088c
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AbstractTargetAction.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.actions;
+
+import org.eclipse.cdt.core.model.ICContainer;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsPlugin;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.actions.ActionDelegate;
+
+
+public abstract class AbstractTargetAction
+ extends ActionDelegate
+ implements IObjectActionDelegate, IWorkbenchWindowActionDelegate {
+ private IWorkbenchPart fPart;
+ private IWorkbenchWindow fWindow;
+ private IContainer fContainer;
+
+ protected Shell getShell() {
+ if (fPart != null) {
+ return fPart.getSite().getShell();
+ } else if (fWindow != null) {
+ return fWindow.getShell();
+ }
+ return AutotoolsPlugin.getActiveWorkbenchShell();
+ }
+
+ protected IContainer getSelectedContainer() {
+ return fContainer;
+ }
+
+ public void setSelectedContainer(IContainer container) {
+ fContainer = container;
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ fPart = targetPart;
+ }
+
+ public void init(IWorkbenchWindow window) {
+ fWindow = window;
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ boolean enabled = false;
+ if (selection instanceof IStructuredSelection) {
+ IStructuredSelection sel = (IStructuredSelection) selection;
+ Object obj = sel.getFirstElement();
+ if (obj instanceof ICElement) {
+ if ( obj instanceof ICContainer || obj instanceof ICProject) {
+ fContainer = (IContainer) ((ICElement) obj).getUnderlyingResource();
+ } else {
+ obj = ((ICElement)obj).getResource();
+ if ( obj != null) {
+ fContainer = ((IResource)obj).getParent();
+ }
+ }
+ } else if (obj instanceof IResource) {
+ if (obj instanceof IContainer) {
+ fContainer = (IContainer) obj;
+ } else {
+ fContainer = ((IResource)obj).getParent();
+ }
+ } else {
+ fContainer = null;
+ }
+ if (fContainer != null && AutotoolsPlugin.hasTargetBuilder(fContainer.getProject())) {
+ enabled = true;
+ }
+ }
+ action.setEnabled(enabled);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AclocalHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AclocalHandler.java
new file mode 100644
index 0000000000..e09ea2609e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AclocalHandler.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.actions;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.resources.IContainer;
+
+/**
+ * @author Jeff Johnston
+ *
+ */
+public class AclocalHandler extends AbstractAutotoolsHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ InvokeAclocalAction a = new InvokeAclocalAction();
+ Object o = event.getApplicationContext();
+ if (o instanceof IEvaluationContext) {
+ IContainer container = getContainer((IEvaluationContext)o);
+ if (container != null) {
+ a.setSelectedContainer(container);
+ a.run(null);
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AutoconfHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AutoconfHandler.java
new file mode 100644
index 0000000000..7991a519e4
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AutoconfHandler.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.actions;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.resources.IContainer;
+
+public class AutoconfHandler extends AbstractAutotoolsHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ InvokeAutoconfAction a = new InvokeAutoconfAction();
+ Object o = event.getApplicationContext();
+ if (o instanceof IEvaluationContext) {
+ IContainer container = getContainer((IEvaluationContext)o);
+ if (container != null) {
+ a.setSelectedContainer(container);
+ a.run(null);
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AutoheaderHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AutoheaderHandler.java
new file mode 100644
index 0000000000..473e71b4ea
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AutoheaderHandler.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.actions;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.resources.IContainer;
+
+/**
+ * @author Jeff Johnston
+ *
+ */
+public class AutoheaderHandler extends AbstractAutotoolsHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ InvokeAutoheaderAction a = new InvokeAutoheaderAction();
+ Object o = event.getApplicationContext();
+ if (o instanceof IEvaluationContext) {
+ IContainer container = getContainer((IEvaluationContext)o);
+ if (container != null) {
+ a.setSelectedContainer(container);
+ a.run(null);
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AutomakeHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AutomakeHandler.java
new file mode 100644
index 0000000000..23b8050d4e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AutomakeHandler.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.actions;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.resources.IContainer;
+
+public class AutomakeHandler extends AbstractAutotoolsHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ InvokeAutomakeAction a = new InvokeAutomakeAction();
+ Object o = event.getApplicationContext();
+ if (o instanceof IEvaluationContext) {
+ IContainer container = getContainer((IEvaluationContext)o);
+ if (container != null) {
+ a.setSelectedContainer(container);
+ a.run(null);
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AutoreconfHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AutoreconfHandler.java
new file mode 100644
index 0000000000..ae1923f806
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/AutoreconfHandler.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.actions;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.resources.IContainer;
+
+/**
+ * @author Jeff Johnston
+ *
+ */
+public class AutoreconfHandler extends AbstractAutotoolsHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ InvokeAutoreconfAction a = new InvokeAutoreconfAction();
+ Object o = event.getApplicationContext();
+ if (o instanceof IEvaluationContext) {
+ IContainer container = getContainer((IEvaluationContext)o);
+ if (container != null) {
+ a.setSelectedContainer(container);
+ a.run(null);
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAclocalAction.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAclocalAction.java
new file mode 100644
index 0000000000..1d03b33797
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAclocalAction.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.actions;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.AutotoolsPropertyConstants;
+import org.eclipse.swt.widgets.Shell;
+
+
+public class InvokeAclocalAction extends InvokeAction {
+
+ private static final String DEFAULT_OPTION = ""; //$NON-NLS-1$
+ private static final String DEFAULT_COMMAND = "aclocal"; //$NON-NLS-1$
+
+ public void run(IAction action) {
+
+ IContainer container = getSelectedContainer();
+ if (container == null)
+ return;
+
+ IPath execDir = getExecDir(container);
+ String cwd = InvokeMessages.getString("CWD") + getCWD(container); //$NON-NLS-1$
+
+ TwoInputDialog optionDialog = new TwoInputDialog(
+ new Shell(),
+ cwd,
+ InvokeMessages
+ .getString("InvokeAclocalAction.windowTitle.options"), //$NON-NLS-1$
+ InvokeMessages
+ .getString("InvokeAclocalAction.message.options.otherOptions"), //$NON-NLS-1$
+ InvokeMessages
+ .getString("InvokeAclocalAction.message.options.includeDir"), DEFAULT_OPTION, null); //$NON-NLS-1$
+
+ optionDialog.open();
+
+ // chop args into string array
+ String rawArgList = optionDialog.getValue();
+
+ String[] optionsList = separateOptions(rawArgList);
+
+ // chop args into string array
+ rawArgList = optionDialog.getSecondValue();
+
+ String[] targetList = separateTargets(rawArgList);
+
+ if (targetList == null) {
+
+ showError(InvokeMessages
+ .getString("InvokeAction.execute.windowTitle.error"), //$NON-NLS-1$
+ InvokeMessages
+ .getString("InvokeAction.windowTitle.quoteError")); //$NON-NLS-1$
+ return;
+ }
+
+ int iOption = 0;
+ if (targetList.length > 0)
+ iOption = 1;
+
+ String[] argumentList = new String[targetList.length
+ + optionsList.length + iOption];
+
+ System.arraycopy(optionsList, 0, argumentList, 0, optionsList.length);
+
+ if (iOption == 1)
+ argumentList[optionsList.length] = "-I"; //$NON-NLS-1$
+
+ System.arraycopy(targetList, 0, argumentList, optionsList.length
+ + iOption, targetList.length);
+
+ if (container != null) {
+ String aclocalCommand = null;
+ IProject project = getSelectedContainer().getProject();
+ try {
+ aclocalCommand = project.getPersistentProperty(AutotoolsPropertyConstants.ACLOCAL_TOOL);
+ } catch (CoreException e) {
+ // do nothing
+ }
+
+ // If unset, use default system path
+ if (aclocalCommand == null)
+ aclocalCommand = DEFAULT_COMMAND;
+
+ executeConsoleCommand(DEFAULT_COMMAND, aclocalCommand,
+ argumentList, execDir);
+ }
+ }
+
+ public void dispose() {
+
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAction.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAction.java
new file mode 100644
index 0000000000..600eef7708
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAction.java
@@ -0,0 +1,442 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.actions;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.StringTokenizer;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.CommandLauncher;
+import org.eclipse.cdt.core.ConsoleOutputStream;
+import org.eclipse.cdt.core.envvar.IEnvironmentVariable;
+import org.eclipse.cdt.core.resources.IConsole;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.AutotoolsNewMakeGenerator;
+import org.eclipse.swt.widgets.Shell;
+
+public abstract class InvokeAction extends AbstractTargetAction {
+
+ protected void showInformation(String title, String content) {
+
+ MessageDialog.openInformation(new Shell(), title, content);
+ }
+
+ protected void showError(String title, String content) {
+
+ MessageDialog.openError(new Shell(), title, content);
+ }
+
+ protected void showSuccess(String title) {
+ MessageDialog.openInformation(new Shell(), title,
+ InvokeMessages.getString("InvokeAction.success")); //$NON-NLS-1$
+ }
+
+ protected String showInput(String title, String content, String defaultTxt) {
+ InputDialog getOptionDialog = new InputDialog(new Shell(), title,
+ content, defaultTxt, null);
+
+ getOptionDialog.open();
+
+ return getOptionDialog.getValue();
+ }
+
+ /**
+ * Separate targets to array from a string.
+ *
+ * @param rawArgList
+ * @return targets in string[] array. if targets are not formatted properly,
+ * returns null
+ */
+ protected String[] separateTargets(String rawArgList) {
+
+ StringTokenizer st = new StringTokenizer(rawArgList, " "); //$NON-NLS-1$
+ ArrayList<String> targetList = new ArrayList<String>();
+
+ while (st.hasMoreTokens()) {
+ String currentWord = st.nextToken().trim();
+
+ if (currentWord.startsWith("'")) { //$NON-NLS-1$
+ String tmpTarget = ""; //$NON-NLS-1$
+ while (!currentWord.endsWith("'")) { //$NON-NLS-1$
+ tmpTarget += currentWord + " "; //$NON-NLS-1$
+ if (!st.hasMoreTokens()) {
+ // quote not closed properly, so return null
+ return null;
+ }
+ currentWord = st.nextToken().trim();
+ }
+
+ tmpTarget += currentWord;
+ targetList.add(tmpTarget);
+ continue;
+ }
+
+ if (currentWord.startsWith("\"")) { //$NON-NLS-1$
+ String tmpTarget = ""; //$NON-NLS-1$
+ while (!currentWord.endsWith("\"")) { //$NON-NLS-1$
+ tmpTarget += currentWord + " "; //$NON-NLS-1$
+ if (!st.hasMoreTokens()) {
+ // double quote not closed properly, so return null
+ return null;
+ }
+ currentWord = st.nextToken().trim();
+ }
+
+ tmpTarget += currentWord;
+ targetList.add(tmpTarget);
+ continue;
+ }
+
+ // for targets without quote/double quotes.
+ targetList.add(currentWord);
+
+ }
+
+ return (String[])targetList.toArray(new String[targetList.size()]);
+ }
+
+ protected String[] separateOptions(String rawArgList) {
+ ArrayList<String> argList = new ArrayList<String>();
+ // May be multiple user-specified options in which case we
+ // need to split them up into individual options
+ rawArgList = rawArgList.trim();
+ boolean finished = false;
+ int lastIndex = rawArgList.indexOf("--"); //$NON-NLS-1$
+ if (lastIndex != -1) {
+ while (!finished) {
+ int index = rawArgList.indexOf("--", lastIndex + 2); //$NON-NLS-1$
+ if (index != -1) {
+ String previous = rawArgList.substring(lastIndex, index)
+ .trim();
+ argList.add(previous);
+ rawArgList = rawArgList.substring(index);
+ } else {
+ argList.add(rawArgList);
+ finished = true;
+ }
+ }
+ }
+
+ return (String[])argList.toArray(new String[argList.size()]);
+
+ }
+
+ protected String[] simpleParseOptions(String rawArgList) {
+ ArrayList<String> argList = new ArrayList<String>();
+ int lastArgIndex = -1;
+ int i = 0;
+ while (i < rawArgList.length()) {
+ char ch = rawArgList.charAt(i);
+ // Skip white-space
+ while (Character.isWhitespace(ch)) {
+ ++i;
+ if (i < rawArgList.length())
+ ch = rawArgList.charAt(i);
+ else // Otherwise we are done
+ return argList.toArray(new String[argList.size()]);
+ }
+
+ // Simplistic parser. We break up into strings delimited
+ // by blanks. If quotes are used, we ignore blanks within.
+ // If a backslash is used, we ignore the next character and
+ // pass it through.
+ lastArgIndex = i;
+ boolean inString = false;
+ while (i < rawArgList.length()) {
+ ch = rawArgList.charAt(i);
+ if (ch == '\\') // escape character
+ ++i; // skip over the next character
+ else if (ch == '\"') { // double quotes
+ inString = !inString;
+ } else if (Character.isWhitespace(ch)) {
+ if (!inString) {
+ argList.add(rawArgList.substring(lastArgIndex, i));
+ break;
+ }
+ }
+ ++i;
+ }
+ // Look for the case where we ran out of chars for the last
+ // token.
+ if (i >= rawArgList.length())
+ argList.add(rawArgList.substring(lastArgIndex));
+ ++i;
+ }
+ return argList.toArray(new String[argList.size()]);
+ }
+
+ protected IPath getExecDir(IContainer container) {
+ int type = container.getType();
+ IPath execDir = null;
+ if (type == IContainer.FILE) {
+ execDir = container.getLocation().removeLastSegments(1);
+ } else {
+ execDir = container.getLocation();
+ }
+ return execDir;
+ }
+
+ protected IPath getCWD(IContainer container) {
+ int type = container.getType();
+ IPath cwd = null;
+ if (type == IContainer.FILE) {
+ cwd = container.getFullPath().removeLastSegments(1);
+ } else {
+ cwd = container.getFullPath();
+ }
+ return cwd;
+ }
+
+ private class ExecuteProgressDialog implements IRunnableWithProgress {
+ private IPath command;
+ private String[] argumentList;
+ private String[] envList;
+ private IPath execDir;
+ private int status;
+ private HashMap<String, String> outputs = null;
+
+ public ExecuteProgressDialog(IPath command, String[] argumentList,
+ String[] envList, IPath execDir) {
+ this.command = command;
+ this.argumentList = argumentList;
+ this.envList = envList;
+ this.execDir = execDir;
+ }
+
+ public void run(IProgressMonitor monitor)
+ throws InvocationTargetException, InterruptedException {
+ ByteArrayOutputStream stdout = new ByteArrayOutputStream();
+ ByteArrayOutputStream stderr = new ByteArrayOutputStream();
+ CommandLauncher cmdL = new CommandLauncher();
+ outputs = null;
+
+ // invoke command
+ try {
+ monitor.beginTask(
+ InvokeMessages.getFormattedString("InvokeAction.progress.message", // $NON-NLS-1$
+ new String[]{command.toOSString()}), IProgressMonitor.UNKNOWN);
+ monitor.worked(1);
+ Process process = cmdL.execute(command, argumentList, envList,
+ execDir, new NullProgressMonitor());
+
+ if (cmdL.waitAndRead(stdout, stderr) == CommandLauncher.OK) {
+ try {
+ status = 0;
+ monitor.done();
+ process.getOutputStream().close();
+ } catch (IOException e) {
+ // ignore
+ }
+ } else {
+ // failed to execute command
+ status = -1;
+ monitor.done();
+ return;
+ }
+ } catch (CoreException e) {
+ monitor.done();
+ throw new InvocationTargetException(e);
+ }
+
+ outputs = new HashMap<String, String>();
+
+ outputs.put("stdout", stdout.toString()); //$NON-NLS-1$
+ outputs.put("stderr", stderr.toString()); //$NON-NLS-1$
+
+ try {
+ stdout.close();
+ stderr.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
+
+ public HashMap<String, String> getOutputs() {
+ return outputs;
+ }
+
+ public int getStatus() {
+ return status;
+ }
+ }
+
+
+ protected HashMap<String, String> executeCommand(IPath command,
+ String[] argumentList, String[] envList, IPath execDir) {
+ try {
+ ExecuteProgressDialog d = new ExecuteProgressDialog(command,
+ argumentList, envList, execDir);
+ new ProgressMonitorDialog(new Shell()).run(false, false, d);
+ if (d.getStatus() == -1)
+ showError(InvokeMessages
+ .getString("InvokeAction.execute.windowTitle.error"), InvokeMessages //$NON-NLS-1$
+ .getString("InvokeAction.execute.message") //$NON-NLS-1$
+ + command.toOSString()); //$NON-NLS-1$
+ return d.getOutputs();
+ } catch (InvocationTargetException e) {
+ showError(InvokeMessages
+ .getString("InvokeAction.execute.windowTitle.error"), InvokeMessages //$NON-NLS-1$
+ .getString("InvokeAction.execute.message") //$NON-NLS-1$
+ + command.toOSString()); //$NON-NLS-1$
+ AutotoolsUIPlugin.logException(e);
+ return null;
+ } catch (InterruptedException e) {
+ return null;
+ }
+ }
+
+ protected void executeConsoleCommand(final String actionName, final String command,
+ final String[] argumentList, final IPath execDir) {
+ // We need to use a workspace root scheduling rule because adding MakeTargets
+ // may end up saving the project description which runs under a workspace root rule.
+ final ISchedulingRule rule = ResourcesPlugin.getWorkspace().getRoot();
+
+ Job backgroundJob = new Job(actionName) {
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
+
+ public void run(IProgressMonitor monitor) throws CoreException {
+ try {
+ String errMsg = null;
+ IProject project = getSelectedContainer().getProject();
+ // Get a build console for the project
+ IConsole console = CCorePlugin.getDefault().getConsole("org.eclipse.linuxtools.cdt.autotools.ui.autotoolsConsole"); //$NON-NLS-1$
+ console.start(project);
+ ConsoleOutputStream consoleOutStream = console.getOutputStream();
+ // FIXME: we want to remove need for ManagedBuilderManager, but how do we
+ // get environment variables.
+ IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+ IConfiguration cfg = info.getDefaultConfiguration();
+
+ StringBuffer buf = new StringBuffer();
+ String[] consoleHeader = new String[3];
+
+ consoleHeader[0] = actionName;
+ consoleHeader[1] = cfg.getName();
+ consoleHeader[2] = project.getName();
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ String invokeMsg = InvokeMessages.getFormattedString("InvokeAction.console.message", //$NON-NLS-1$
+ new String[]{actionName, execDir.toString()}); //$NON-NLS-1$
+ buf.append(invokeMsg);
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ consoleOutStream.write(buf.toString().getBytes());
+ consoleOutStream.flush();
+
+ ArrayList<String> additionalEnvs = new ArrayList<String>();
+ String strippedCommand = AutotoolsNewMakeGenerator.stripEnvVars(command, additionalEnvs);
+ // Get a launcher for the config command
+ CommandLauncher launcher = new CommandLauncher();
+ // Set the environment
+ IEnvironmentVariable variables[] = ManagedBuildManager
+ .getEnvironmentVariableProvider().getVariables(cfg, true);
+ String[] env = null;
+ ArrayList<String> envList = new ArrayList<String>();
+ if (variables != null) {
+ for (int i = 0; i < variables.length; i++) {
+ envList.add(variables[i].getName()
+ + "=" + variables[i].getValue()); //$NON-NLS-1$
+ }
+ if (additionalEnvs.size() > 0)
+ envList.addAll(additionalEnvs); // add any additional environment variables specified ahead of script
+ env = (String[]) envList.toArray(new String[envList.size()]);
+ }
+ OutputStream stdout = consoleOutStream;
+ OutputStream stderr = consoleOutStream;
+
+ launcher.showCommand(true);
+ // Run the shell script via shell command.
+ Process proc = launcher.execute(new Path(strippedCommand), argumentList, env,
+ execDir, new NullProgressMonitor());
+ if (proc != null) {
+ try {
+ // Close the input of the process since we will never write to
+ // it
+ proc.getOutputStream().close();
+ } catch (IOException e) {
+ }
+
+ if (launcher.waitAndRead(stdout, stderr, new SubProgressMonitor(
+ monitor, IProgressMonitor.UNKNOWN)) != CommandLauncher.OK) {
+ errMsg = launcher.getErrorMessage();
+ }
+
+ // Force a resync of the projects without allowing the user to
+ // cancel.
+ // This is probably unkind, but short of this there is no way to
+ // ensure
+ // the UI is up-to-date with the build results
+ // monitor.subTask(ManagedMakeMessages
+ // .getResourceString(REFRESH));
+ monitor.subTask(AutotoolsUIPlugin.getResourceString("MakeGenerator.refresh")); //$NON-NLS-1$
+ try {
+ project.refreshLocal(IResource.DEPTH_INFINITE, null);
+ } catch (CoreException e) {
+ monitor.subTask(AutotoolsUIPlugin
+ .getResourceString("MakeGenerator.refresh.error")); //$NON-NLS-1$
+ }
+ } else {
+ errMsg = launcher.getErrorMessage();
+ }
+
+ if (errMsg != null)
+ AutotoolsUIPlugin.logErrorMessage(errMsg);
+
+ } catch (IOException e) {
+ AutotoolsUIPlugin.log(e);
+ }
+ }
+ }, rule, IWorkspace.AVOID_UPDATE, monitor);
+ } catch (CoreException e) {
+ return e.getStatus();
+ }
+ IStatus returnStatus = Status.OK_STATUS;
+ return returnStatus;
+ }
+ };
+
+ backgroundJob.setRule(rule);
+ backgroundJob.schedule();
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAutoconfAction.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAutoconfAction.java
new file mode 100644
index 0000000000..81e323c9ba
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAutoconfAction.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.actions;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.AutotoolsPropertyConstants;
+
+
+/**
+ * Class responsible for invoking autoconf.
+ *
+ * @author klee
+ *
+ */
+public class InvokeAutoconfAction extends InvokeAction {
+
+ private final static String DEFAULT_COMMAND = "autoconf"; //$NON-NLS-1$
+ public void run(IAction action) {
+ IContainer container = getSelectedContainer();
+ if (container == null)
+ return;
+
+ IPath execDir = getExecDir(container);
+
+ if (container != null) {
+ IProject project = container.getProject();
+ String autoconfCommand = null;
+ try {
+ autoconfCommand = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOCONF_TOOL);
+ } catch (CoreException e) {
+ // do nothing
+ }
+
+ // If unset for the project, default to system path
+ if (autoconfCommand == null)
+ autoconfCommand = DEFAULT_COMMAND;
+
+ executeConsoleCommand(DEFAULT_COMMAND, autoconfCommand, new String[]{}, execDir);
+ }
+ }
+
+
+ public void dispose() {
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAutoheaderAction.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAutoheaderAction.java
new file mode 100644
index 0000000000..8c4e5779e4
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAutoheaderAction.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.actions;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.AutotoolsPropertyConstants;
+import org.eclipse.swt.widgets.Shell;
+
+
+public class InvokeAutoheaderAction extends InvokeAction {
+
+ private static final String DEFAULT_OPTION = ""; //$NON-NLS-1$
+ private static final String DEFAULT_COMMAND = "autoheader"; //$NON-NLS-1$
+
+ public void run(IAction action) {
+
+ IContainer container = getSelectedContainer();
+ if (container == null)
+ return;
+
+ IPath execDir = getExecDir(container);
+ String cwd = InvokeMessages.getString("CWD") + getCWD(container); //$NON-NLS-1$
+
+ InputDialog optionDialog = new SingleInputDialog(
+ new Shell(),
+ cwd,
+ InvokeMessages
+ .getString("InvokeAutoheaderAction.windowTitle.options"), //$NON-NLS-1$
+ InvokeMessages
+ .getString("InvokeAutoheaderAction.message.options.otherOptions"), //$NON-NLS-1$
+ DEFAULT_OPTION, null);
+ optionDialog.open();
+
+ // chop args into string array
+ String rawArgList = optionDialog.getValue();
+
+ String[] optionsList = simpleParseOptions(rawArgList);
+
+ String[] argumentList = new String[optionsList.length];
+
+ System.arraycopy(optionsList, 0, argumentList, 0, optionsList.length);
+
+ if (container != null) {
+ String autoheaderCommand = null;
+ IProject project = getSelectedContainer().getProject();
+ try {
+ autoheaderCommand = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOHEADER_TOOL);
+ } catch (CoreException e) {
+ // do nothing
+ }
+
+ // If unset, use default system path
+ if (autoheaderCommand == null)
+ autoheaderCommand = DEFAULT_COMMAND;
+
+ executeConsoleCommand(DEFAULT_COMMAND, autoheaderCommand,
+ argumentList, execDir);
+ }
+
+ }
+
+ public void dispose() {
+
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAutomakeAction.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAutomakeAction.java
new file mode 100644
index 0000000000..8210cd96ec
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAutomakeAction.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.actions;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.AutotoolsPropertyConstants;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ * Class responsible for invoking automake.
+ *
+ * @author klee
+ *
+ */
+public class InvokeAutomakeAction extends InvokeAction {
+
+ private static final String DEFAULT_OPTION = ""; //$NON-NLS-1$
+ private static final String DEFAULT_COMMAND = "automake"; //$NON-NLS-1$
+
+ public void run(IAction action) {
+
+ IContainer container = getSelectedContainer();
+ if (container == null)
+ return;
+
+ IPath execDir = getExecDir(container);
+ String cwd = InvokeMessages.getString("CWD") + getCWD(container); //$NON-NLS-1$
+;
+ TwoInputDialog optionDialog = new TwoInputDialog(new Shell(), cwd,
+ InvokeMessages
+ .getString("InvokeAutomakeAction.windowTitle.options"), //$NON-NLS-1$
+InvokeMessages
+ .getString("InvokeAutomakeAction.message.options.otherOptions"),InvokeMessages //$NON-NLS-1$
+ .getString("InvokeAutomakeAction.message.options.makeTargets"), DEFAULT_OPTION, null); //$NON-NLS-1$
+
+ optionDialog.open();
+
+ // chop args into string array
+ String rawArgList = optionDialog.getValue();
+
+ String[] optionsList = separateOptions(rawArgList);
+
+
+ // chop args into string array
+ rawArgList = optionDialog.getSecondValue();
+
+ String[] targetList = separateTargets(rawArgList);
+
+ if (targetList == null) {
+
+ showError(InvokeMessages.getString("InvokeAction.execute.windowTitle.error"), //$NON-NLS-1$
+ InvokeMessages.getString("InvokeAction.windowTitle.quoteError")); //$NON-NLS-1$
+ return;
+ }
+
+ String[] argumentList = new String[targetList.length
+ + optionsList.length];
+
+ System.arraycopy(optionsList, 0, argumentList, 0, optionsList.length);
+ System.arraycopy(targetList, 0, argumentList, optionsList.length,
+ targetList.length);
+
+ if (container != null) {
+ IProject project = container.getProject();
+ String automakeCommand = null;
+ try {
+ automakeCommand = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOMAKE_TOOL);
+ } catch (CoreException e) {
+ // do nothing
+ }
+
+ // If automake path not set for the project, default to system path
+ if (automakeCommand == null)
+ automakeCommand = DEFAULT_COMMAND;
+
+ executeConsoleCommand(DEFAULT_COMMAND, automakeCommand,
+ argumentList, execDir);
+ }
+ }
+
+ public void dispose() {
+
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAutoreconfAction.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAutoreconfAction.java
new file mode 100644
index 0000000000..ade71d9667
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeAutoreconfAction.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.actions;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.AutotoolsPropertyConstants;
+import org.eclipse.swt.widgets.Shell;
+
+
+public class InvokeAutoreconfAction extends InvokeAction {
+
+ private static final String DEFAULT_OPTION = ""; //$NON-NLS-1$
+ private static final String DEFAULT_COMMAND = "autoreconf"; //$NON-NLS-1$
+
+ public void run(IAction action) {
+
+ IContainer container = getSelectedContainer();
+ if (container == null)
+ return;
+
+ IPath execDir = getExecDir(container);
+ String cwd = InvokeMessages.getString("CWD") + getCWD(container); //$NON-NLS-1$
+
+ InputDialog optionDialog = new SingleInputDialog(
+ new Shell(),
+ cwd,
+ InvokeMessages
+ .getString("InvokeAutoreconfAction.windowTitle.options"), //$NON-NLS-1$
+ InvokeMessages
+ .getString("InvokeAutoreconfAction.message.options.otherOptions"), //$NON-NLS-1$
+ DEFAULT_OPTION, null);
+ optionDialog.open();
+
+ // chop args into string array
+ String rawArgList = optionDialog.getValue();
+
+ String[] optionsList = simpleParseOptions(rawArgList);
+
+ String[] argumentList = new String[optionsList.length];
+
+ System.arraycopy(optionsList, 0, argumentList, 0, optionsList.length);
+
+ if (container != null) {
+ String autoreconfCommand = null;
+ IProject project = getSelectedContainer().getProject();
+ try {
+ autoreconfCommand = project.getPersistentProperty(AutotoolsPropertyConstants.AUTORECONF_TOOL);
+ } catch (CoreException e) {
+ // do nothing
+ }
+
+ // If unset, use default system path
+ if (autoreconfCommand == null)
+ autoreconfCommand = DEFAULT_COMMAND;
+
+ executeConsoleCommand(DEFAULT_COMMAND, autoreconfCommand,
+ argumentList, execDir);
+ }
+ }
+
+ public void dispose() {
+
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeLibtoolizeAction.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeLibtoolizeAction.java
new file mode 100644
index 0000000000..02ec65d21d
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeLibtoolizeAction.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.actions;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.AutotoolsPropertyConstants;
+import org.eclipse.swt.widgets.Shell;
+
+
+public class InvokeLibtoolizeAction extends InvokeAction {
+
+ private static final String DEFAULT_OPTION = ""; //$NON-NLS-1$
+ private static final String DEFAULT_COMMAND = "libtoolize"; //$NON-NLS-1$
+
+ public void run(IAction action) {
+
+ IContainer container = getSelectedContainer();
+ if (container == null)
+ return;
+
+ IPath execDir = getExecDir(container);
+ String cwd = InvokeMessages.getString("CWD") + getCWD(container); //$NON-NLS-1$
+
+ InputDialog optionDialog = new SingleInputDialog(
+ new Shell(),
+ cwd,
+ InvokeMessages
+ .getString("InvokeLibtoolizeAction.windowTitle.options"), //$NON-NLS-1$
+ InvokeMessages
+ .getString("InvokeLibtoolizeAction.message.options.otherOptions"), //$NON-NLS-1$
+ DEFAULT_OPTION, null);
+ optionDialog.open();
+
+ // chop args into string array
+ String rawArgList = optionDialog.getValue();
+
+ String[] optionsList = simpleParseOptions(rawArgList);
+
+ String[] argumentList = new String[optionsList.length];
+
+ System.arraycopy(optionsList, 0, argumentList, 0, optionsList.length);
+
+ if (container != null) {
+ String libtoolizeCommand = null;
+ IProject project = getSelectedContainer().getProject();
+ try {
+ libtoolizeCommand = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOHEADER_TOOL);
+ } catch (CoreException e) {
+ // do nothing
+ }
+
+ // If unset, use default system path
+ if (libtoolizeCommand == null)
+ libtoolizeCommand = DEFAULT_COMMAND;
+
+ executeConsoleCommand(DEFAULT_COMMAND, libtoolizeCommand,
+ argumentList, execDir);
+ }
+ }
+
+ public void dispose() {
+
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeMessages.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeMessages.java
new file mode 100644
index 0000000000..5a3710c5e7
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeMessages.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.actions;
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class InvokeMessages {
+ private static final String BUNDLE_NAME = InvokeMessages.class.getName();
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private InvokeMessages() {
+ }
+
+ /**
+ * Returns the string from the resource bundle,
+ * or 'key' if not found.
+ *
+ * @param key the message key
+ * @return the resource bundle message
+ */
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+
+ /**
+ * Returns the formatted string from the resource bundle,
+ * or 'key' if not found.
+ *
+ * @param key the message key
+ * @param args an array of substituition strings
+ * @return the resource bundle message
+ */
+ public static String getFormattedString(String key, String[] args) {
+ return MessageFormat.format(getString(key), (Object[])args);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeMessages.properties b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeMessages.properties
new file mode 100644
index 0000000000..b2da117fef
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/InvokeMessages.properties
@@ -0,0 +1,56 @@
+#################################################################################
+# Copyright (c) 2006, 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 Incorporated - initial API and implementation
+#################################################################################
+CWD=Working Directory:
+
+InvokeAction.windowTitle.quoteError=Quote/Double quote not correct
+InvokeAction.progress.message=Running {0}
+InvokeAction.execute.windowTitle.error=Invoke Action Error
+InvokeAction.execute.message=Couldn't execute command :
+InvokeAction.success=Command executed successfully
+InvokeAction.console.message=Invoking {0} in {1}
+
+
+InvokeAutoconfAction.command=Running autoconf in {0}
+InvokeAutoconfAction.windowTitle.stdout=Invoke Autoconf - Output
+InvokeAutoconfAction.windowTitle.stderr=Invoke Autoconf - Error
+
+
+InvokeAutomakeAction.command=Running automake
+InvokeAutomakeAction.windowTitle.options=Automake Options
+InvokeAutomakeAction.message.options.makeTargets=Enter targets separated by space :
+InvokeAutomakeAction.message.options.otherOptions=Enter options separated by space :
+InvokeAutomakeAction.windowTitle.stdout=Invoke Automake - Output
+InvokeAutomakeAction.windowTitle.stderr=Invoke Automake - Error
+
+InvokeAutoheaderAction.command=Running autoheader
+InvokeAutoheaderAction.windowTitle.options=Autoheader Options
+InvokeAutoheaderAction.message.options.otherOptions=Enter options separated by space :
+InvokeAutoheaderAction.windowTitle.stdout=Invoke Autoheader - Output
+InvokeAutoheaderAction.windowTitle.stderr=Invoke Autoheader - Error
+
+InvokeAutoreconfAction.command=Running autoreconf
+InvokeAutoreconfAction.windowTitle.options=Autoreconf Options
+InvokeAutoreconfAction.message.options.otherOptions=Enter options separated by space :
+InvokeAutoreconfAction.windowTitle.stdout=Invoke Autoreconf - Output
+InvokeAutoreconfAction.windowTitle.stderr=Invoke Autoreconf - Error
+
+InvokeAclocalAction.command=Running aclocal
+InvokeAclocalAction.windowTitle.options=Aclocal Options
+InvokeAclocalAction.message.options.includeDir=Add directory to search list for .m4 files :
+InvokeAclocalAction.message.options.otherOptions=Enter options separated by space :
+InvokeAclocalAction.windowTitle.stdout=Invoke Automake - Output
+InvokeAclocalAction.windowTitle.stderr=Invoke Automake - Error
+
+InvokeLibtoolizeAction.command=Running libtoolize
+InvokeLibtoolizeAction.windowTitle.options=Libtoolize Options
+InvokeLibtoolizeAction.message.options.otherOptions=Enter options separated by space :
+InvokeLibtoolizeAction.windowTitle.stdout=Invoke Libtoolize - Output
+InvokeLibtoolizeAction.windowTitle.stderr=Invoke Libtoolize - Error
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/LibtoolizeHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/LibtoolizeHandler.java
new file mode 100644
index 0000000000..c2d6faf72e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/LibtoolizeHandler.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.actions;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.resources.IContainer;
+
+/**
+ * @author Jeff Johnston
+ *
+ */
+public class LibtoolizeHandler extends AbstractAutotoolsHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ InvokeLibtoolizeAction a = new InvokeLibtoolizeAction();
+ Object o = event.getApplicationContext();
+ if (o instanceof IEvaluationContext) {
+ IContainer container = getContainer((IEvaluationContext)o);
+ if (container != null) {
+ a.setSelectedContainer(container);
+ a.run(null);
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/ReconfigureAction.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/ReconfigureAction.java
new file mode 100644
index 0000000000..6ab2eb7088
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/ReconfigureAction.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.actions;
+
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.AutotoolsNewMakeGenerator;
+
+
+public class ReconfigureAction extends InvokeAction {
+
+ public void run(IAction action) {
+ IContainer container = getSelectedContainer();
+ if (container == null)
+ return;
+
+ // We need to use a workspace root scheduling rule because adding MakeTargets
+ // may end up saving the project description which runs under a workspace root rule.
+ final ISchedulingRule rule = ResourcesPlugin.getWorkspace().getRoot();
+
+ Job backgroundJob = new Job("Reconfigure Action"){ //$NON-NLS-1$
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
+
+ public void run(IProgressMonitor monitor) throws CoreException {
+ IProject project = getSelectedContainer().getProject();
+ AutotoolsNewMakeGenerator m = new AutotoolsNewMakeGenerator();
+ IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+ m.initialize(project, info, monitor);
+ try {
+ m.reconfigure();
+ } catch (CoreException e) {
+ // do nothing for now
+ }
+ }
+ }, rule, IWorkspace.AVOID_UPDATE, monitor);
+ } catch (CoreException e) {
+ return e.getStatus();
+ }
+ IStatus returnStatus = Status.OK_STATUS;
+ return returnStatus;
+ }
+ };
+
+ backgroundJob.setRule(rule);
+ backgroundJob.schedule();
+ }
+
+ public void dispose() {
+
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/ReconfigureHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/ReconfigureHandler.java
new file mode 100644
index 0000000000..586c5fa832
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/ReconfigureHandler.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.actions;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.resources.IContainer;
+
+/**
+ * @author Jeff Johnston
+ *
+ */
+public class ReconfigureHandler extends AbstractAutotoolsHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ ReconfigureAction a = new ReconfigureAction();
+ Object o = event.getApplicationContext();
+ if (o instanceof IEvaluationContext) {
+ IContainer container = getContainer((IEvaluationContext)o);
+ if (container != null) {
+ a.setSelectedContainer(container);
+ a.run(null);
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/SingleInputDialog.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/SingleInputDialog.java
new file mode 100644
index 0000000000..a7342f577d
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/SingleInputDialog.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.actions;
+
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IInputValidator;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+public class SingleInputDialog extends InputDialog {
+
+ private String firstMessage;
+
+ public SingleInputDialog(Shell parentShell, String firstMessage, String dialogTitle,
+ String dialogMessage, String initialValue,
+ IInputValidator validator) {
+ super(parentShell, dialogTitle, dialogMessage, initialValue, validator);
+
+ this.firstMessage = firstMessage;
+ }
+
+ /*
+ * (non-Javadoc) Method declared on Dialog.
+ */
+ protected void buttonPressed(int buttonId) {
+ super.buttonPressed(buttonId);
+ }
+
+ protected Control createDialogArea(Composite parent) {
+
+ // create composite
+ Composite composite = (Composite) super.createDialogArea(parent);
+
+ CLabel label0 = new CLabel(composite, SWT.WRAP);
+ label0.setText(firstMessage);
+ GridData data = new GridData(GridData.GRAB_HORIZONTAL
+ | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL
+ | GridData.VERTICAL_ALIGN_CENTER);
+ data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
+ label0.setLayoutData(data);
+ label0.setFont(parent.getFont());
+
+ // remove error message dialog from focusing.
+ composite.getTabList()[2].setVisible(false);
+ composite.getTabList()[2].setEnabled(false);
+
+ return composite;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/TwoInputDialog.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/TwoInputDialog.java
new file mode 100644
index 0000000000..5d1654c28f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/actions/TwoInputDialog.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.actions;
+
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IInputValidator;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+public class TwoInputDialog extends InputDialog {
+
+ private Text secondText;
+
+ private String secondValue;
+
+ private String secondMessage;
+
+ private String firstMessage;
+
+ public TwoInputDialog(Shell parentShell, String firstMessage, String dialogTitle,
+ String dialogMessage, String secondMessage, String initialValue,
+ IInputValidator validator) {
+ super(parentShell, dialogTitle, dialogMessage, initialValue, validator);
+
+ this.firstMessage = firstMessage;
+ this.secondMessage = secondMessage;
+ }
+
+ /*
+ * (non-Javadoc) Method declared on Dialog.
+ */
+ protected void buttonPressed(int buttonId) {
+ if (buttonId == IDialogConstants.OK_ID) {
+ secondValue = secondText.getText();
+ } else {
+ secondValue = null;
+ }
+ super.buttonPressed(buttonId);
+ }
+
+ protected Control createDialogArea(Composite parent) {
+
+ // create composite
+ Composite composite = (Composite) super.createDialogArea(parent);
+
+ CLabel label0 = new CLabel(composite, SWT.WRAP);
+ label0.setText(firstMessage);
+ Label label = new Label(composite, SWT.WRAP);
+ label.setText(secondMessage);
+ GridData data = new GridData(GridData.GRAB_HORIZONTAL
+ | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL
+ | GridData.VERTICAL_ALIGN_CENTER);
+ data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
+ label0.setLayoutData(data);
+ label0.setFont(parent.getFont());
+ label.setLayoutData(data);
+ label.setFont(parent.getFont());
+
+
+ secondText = new Text(composite, SWT.SINGLE | SWT.BORDER);
+ secondText.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
+ | GridData.HORIZONTAL_ALIGN_FILL));
+ secondText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ validateInput();
+ }
+ });
+
+ // remove error message dialog from focusing.
+ composite.getTabList()[2].setVisible(false);
+ composite.getTabList()[2].setEnabled(false);
+
+ return composite;
+ }
+
+ /**
+ * Returns the text area.
+ *
+ * @return the text area
+ */
+ protected Text getSecondText() {
+ return secondText;
+ }
+
+ /**
+ * Returns the string typed into this input dialog.
+ *
+ * @return the input string
+ */
+ public String getSecondValue() {
+ return secondValue;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/autoconf/ProjectionFileUpdater.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/autoconf/ProjectionFileUpdater.java
new file mode 100644
index 0000000000..0d5555299c
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/autoconf/ProjectionFileUpdater.java
@@ -0,0 +1,424 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - convert to use with Autoconf Editor
+ * Ed Swartz (NOKIA) - refactoring
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.autoconf;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.projection.IProjectionListener;
+import org.eclipse.jface.text.source.projection.ProjectionAnnotation;
+import org.eclipse.jface.text.source.projection.ProjectionAnnotationModel;
+import org.eclipse.jface.text.source.projection.ProjectionViewer;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsPlugin;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.AutoconfEditor;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfCaseElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfElifElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfElseElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfForElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfIfElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfMacroArgumentElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfMacroElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfRootElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfSelectElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfUntilElement;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.AutoconfWhileElement;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake.IReconcilingParticipant;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.AutotoolsEditorPreferenceConstants;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+
+
+/**
+ * ProjectionMakefileUpdater
+ */
+public class ProjectionFileUpdater implements IProjectionListener {
+
+ private static class AutoconfProjectionAnnotation extends ProjectionAnnotation {
+
+ private AutoconfElement fElement;
+ private boolean fIsComment;
+
+ public AutoconfProjectionAnnotation(AutoconfElement element, boolean isCollapsed, boolean isComment) {
+ super(isCollapsed);
+ fElement = element;
+ fIsComment = isComment;
+ }
+
+ public AutoconfElement getElement() {
+ return fElement;
+ }
+
+ public void setElement(AutoconfElement element) {
+ fElement = element;
+ }
+
+ public boolean isComment() {
+ return fIsComment;
+ }
+
+ }
+
+
+ public void install(AutoconfEditor editor, ProjectionViewer viewer) {
+ fEditor= editor;
+ fViewer= viewer;
+ fViewer.addProjectionListener(this);
+ }
+
+ public void uninstall() {
+ if (isInstalled()) {
+ projectionDisabled();
+ fViewer.removeProjectionListener(this);
+ fViewer= null;
+ fEditor= null;
+ }
+ }
+
+ protected boolean isInstalled() {
+ return fEditor != null;
+ }
+
+ private class ReconcilerParticipant implements IReconcilingParticipant {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake.IReconcilingParticipant#reconciled()
+ */
+ public void reconciled() {
+ processReconcile();
+ }
+ }
+
+ private IDocument fCachedDocument;
+ private AutoconfEditor fEditor;
+ private ProjectionViewer fViewer;
+ private IReconcilingParticipant fParticipant;
+
+ private boolean fAllowCollapsing = false;
+ private boolean fCollapseMacroDef = false;
+ private boolean fCollapseCase = false;
+ private boolean fCollapseConditional = false;
+ private boolean fCollapseLoop = false;
+
+ /*
+ * @see org.eclipse.jface.text.source.projection.IProjectionListener#projectionEnabled()
+ */
+ public void projectionEnabled() {
+ // http://home.ott.oti.com/teams/wswb/anon/out/vms/index.html
+ // projectionEnabled messages are not always paired with projectionDisabled
+ // i.e. multiple enabled messages may be sent out.
+ // we have to make sure that we disable first when getting an enable
+ // message.
+ projectionDisabled();
+
+ initialize();
+ fParticipant= new ReconcilerParticipant();
+ fEditor.addReconcilingParticipant(fParticipant);
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.projection.IProjectionListener#projectionDisabled()
+ */
+ public void projectionDisabled() {
+ fCachedDocument= null;
+ if (fParticipant != null) {
+ fEditor.addReconcilingParticipant(fParticipant);
+ fParticipant= null;
+ }
+ }
+
+ public void initialize() {
+
+ if (!isInstalled())
+ return;
+
+ initializePreferences();
+
+ try {
+
+ IDocumentProvider provider= fEditor.getDocumentProvider();
+ fCachedDocument= provider.getDocument(fEditor.getEditorInput());
+ fAllowCollapsing= true;
+
+// IWorkingCopyManager manager= AutomakeEditorFactory.getDefault().getWorkingCopyManager();
+ AutoconfElement fInput= fEditor.getRootElement();
+
+ if (fInput != null) {
+ ProjectionAnnotationModel model= (ProjectionAnnotationModel) fEditor.getAdapter(ProjectionAnnotationModel.class);
+ if (model != null) {
+ Map<AutoconfProjectionAnnotation, Position> additions= computeAdditions(fInput);
+ model.removeAllAnnotations();
+ model.replaceAnnotations(null, additions);
+ }
+ }
+
+ } finally {
+ fCachedDocument= null;
+ fAllowCollapsing= false;
+ }
+ }
+
+ private void initializePreferences() {
+ //FIXME: what to do with Makefile editor preferences
+ IPreferenceStore store = AutotoolsPlugin.getDefault().getPreferenceStore();
+ fCollapseMacroDef = store.getBoolean(AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_MACRODEF);
+ fCollapseCase = store.getBoolean(AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_CASE);
+ fCollapseConditional = store.getBoolean(AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_CONDITIONAL);
+ fCollapseLoop = store.getBoolean(AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_LOOP);
+ }
+
+ private Map<AutoconfProjectionAnnotation, Position> computeAdditions(AutoconfElement root) {
+ Map<AutoconfProjectionAnnotation, Position> map= new HashMap<AutoconfProjectionAnnotation, Position>();
+ if (root instanceof AutoconfRootElement)
+ computeAdditions(root.getChildren(), map);
+ return map;
+ }
+
+ private void computeAdditions(Object[] elements, Map<AutoconfProjectionAnnotation, Position> map) {
+ for (int i= 0; i < elements.length; i++) {
+ AutoconfElement element= (AutoconfElement)elements[i];
+
+ computeAdditions(element, map);
+
+ if (element.hasChildren()) {
+ computeAdditions(element.getChildren(), map);
+ }
+ }
+ }
+
+ private void computeAdditions(AutoconfElement element, Map<AutoconfProjectionAnnotation, Position> map) {
+
+ boolean createProjection= false;
+
+ @SuppressWarnings("unused")
+ boolean collapse= false;
+
+ if (element instanceof AutoconfIfElement ||
+ element instanceof AutoconfElseElement ||
+ element instanceof AutoconfElifElement) {
+ collapse= fAllowCollapsing && fCollapseConditional;
+ createProjection= true;
+ } else if (element instanceof AutoconfMacroElement) {
+ collapse= fAllowCollapsing && fCollapseMacroDef;
+ createProjection= true;
+ } else if (element instanceof AutoconfMacroArgumentElement) {
+ collapse= fAllowCollapsing && fCollapseMacroDef;
+ createProjection= true;
+ } else if (element instanceof AutoconfCaseElement) {
+ collapse= fAllowCollapsing && fCollapseCase;
+ createProjection= true;
+ } else if (element instanceof AutoconfForElement ||
+ element instanceof AutoconfWhileElement ||
+ element instanceof AutoconfUntilElement ||
+ element instanceof AutoconfSelectElement) {
+ collapse = fAllowCollapsing && fCollapseLoop;
+ createProjection = true;
+ }
+
+ if (createProjection) {
+ Position position= createProjectionPosition(element);
+ if (position != null) {
+ map.put(new AutoconfProjectionAnnotation(element, fAllowCollapsing, true), position);
+ }
+ }
+ }
+
+ private Position createProjectionPosition(AutoconfElement element) {
+ if (fCachedDocument == null)
+ return null;
+ int offset = 0;
+ try {
+ int startLine = 0;
+ int endLine = 0;
+ startLine = fCachedDocument.getLineOfOffset(element.getStartOffset());
+ endLine = fCachedDocument.getLineOfOffset(element.getEndOffset());
+
+ if (startLine != endLine) {
+ offset= fCachedDocument.getLineOffset(startLine);
+ int endOffset = fCachedDocument.getLineOffset(endLine) + fCachedDocument.getLineLength(endLine);
+ return new Position(offset, endOffset - offset);
+ }
+ } catch (BadLocationException x) {
+ // We should only get here if we try and read the line past EOF
+ return new Position(offset, fCachedDocument.getLength() - 1);
+ }
+ return null;
+ }
+
+ public void processReconcile() {
+ if (!isInstalled())
+ return;
+
+ ProjectionAnnotationModel model= (ProjectionAnnotationModel) fEditor.getAdapter(ProjectionAnnotationModel.class);
+ if (model == null)
+ return;
+
+ try {
+ IDocumentProvider provider= fEditor.getDocumentProvider();
+ fCachedDocument= provider.getDocument(fEditor.getEditorInput());
+ fAllowCollapsing= false;
+
+ Map<AutoconfProjectionAnnotation, Position> additions= new HashMap<AutoconfProjectionAnnotation, Position>();
+ List<AutoconfProjectionAnnotation> deletions= new ArrayList<AutoconfProjectionAnnotation>();
+ List<AutoconfProjectionAnnotation> updates = new ArrayList<AutoconfProjectionAnnotation>();
+
+ Map<AutoconfProjectionAnnotation, Position> updated= computeAdditions(fEditor.getRootElement());
+
+ Map<AutoconfElement, List<AutoconfProjectionAnnotation>> previous= createAnnotationMap(model);
+
+
+ Iterator<AutoconfProjectionAnnotation> e= updated.keySet().iterator();
+ while (e.hasNext()) {
+ AutoconfProjectionAnnotation annotation= (AutoconfProjectionAnnotation) e.next();
+ AutoconfElement element= annotation.getElement();
+ Position position= (Position) updated.get(annotation);
+
+ List<AutoconfProjectionAnnotation> annotations= previous.get(element);
+ if (annotations == null) {
+ additions.put(annotation, position);
+ } else {
+ Iterator<AutoconfProjectionAnnotation> x= annotations.iterator();
+ while (x.hasNext()) {
+ AutoconfProjectionAnnotation a= (AutoconfProjectionAnnotation) x.next();
+ if (annotation.isComment() == a.isComment()) {
+ Position p= model.getPosition(a);
+ if (p != null && !position.equals(p)) {
+ p.setOffset(position.getOffset());
+ p.setLength(position.getLength());
+ updates.add(a);
+ }
+ x.remove();
+ break;
+ }
+ }
+
+ if (annotations.isEmpty())
+ previous.remove(element);
+ }
+ }
+
+ Iterator<List<AutoconfProjectionAnnotation>> e2 = previous.values().iterator();
+ while (e2.hasNext()) {
+ List<AutoconfProjectionAnnotation> list= e2.next();
+ int size= list.size();
+ for (int i= 0; i < size; i++)
+ deletions.add(list.get(i));
+ }
+
+ match(model, deletions, additions, updates);
+
+ Annotation[] removals= new Annotation[deletions.size()];
+ deletions.toArray(removals);
+ Annotation[] changes= new Annotation[updates.size()];
+ updates.toArray(changes);
+ model.modifyAnnotations(removals, additions, changes);
+
+ } finally {
+ fCachedDocument= null;
+ fAllowCollapsing= true;
+ }
+ }
+
+ private void match(ProjectionAnnotationModel model, List<AutoconfProjectionAnnotation> deletions, Map<AutoconfProjectionAnnotation, Position> additions, List<AutoconfProjectionAnnotation> changes) {
+ if (deletions.isEmpty() || (additions.isEmpty() && changes.isEmpty()))
+ return;
+
+ List<AutoconfProjectionAnnotation> newDeletions= new ArrayList<AutoconfProjectionAnnotation>();
+ List<AutoconfProjectionAnnotation> newChanges= new ArrayList<AutoconfProjectionAnnotation>();
+
+ Iterator<AutoconfProjectionAnnotation> deletionIterator= deletions.iterator();
+ outer: while (deletionIterator.hasNext()) {
+ AutoconfProjectionAnnotation deleted= (AutoconfProjectionAnnotation) deletionIterator.next();
+ Position deletedPosition= model.getPosition(deleted);
+ if (deletedPosition == null)
+ continue;
+
+ Iterator<AutoconfProjectionAnnotation> changesIterator= changes.iterator();
+ while (changesIterator.hasNext()) {
+ AutoconfProjectionAnnotation changed= (AutoconfProjectionAnnotation) changesIterator.next();
+ if (deleted.isComment() == changed.isComment()) {
+ Position changedPosition= model.getPosition(changed);
+ if (changedPosition == null)
+ continue;
+
+ if (deletedPosition.getOffset() == changedPosition.getOffset()) {
+
+ deletedPosition.setLength(changedPosition.getLength());
+ deleted.setElement(changed.getElement());
+
+ deletionIterator.remove();
+ newChanges.add(deleted);
+
+ changesIterator.remove();
+ newDeletions.add(changed);
+
+ continue outer;
+ }
+ }
+ }
+
+ Iterator<AutoconfProjectionAnnotation> additionsIterator= additions.keySet().iterator();
+ while (additionsIterator.hasNext()) {
+ AutoconfProjectionAnnotation added= (AutoconfProjectionAnnotation) additionsIterator.next();
+ if (deleted.isComment() == added.isComment()) {
+ Position addedPosition= (Position) additions.get(added);
+
+ if (deletedPosition.getOffset() == addedPosition.getOffset()) {
+
+ deletedPosition.setLength(addedPosition.getLength());
+ deleted.setElement(added.getElement());
+
+ deletionIterator.remove();
+ newChanges.add(deleted);
+
+ additionsIterator.remove();
+
+ break;
+ }
+ }
+ }
+ }
+
+ deletions.addAll(newDeletions);
+ changes.addAll(newChanges);
+ }
+
+ @SuppressWarnings("unchecked")
+ private Map<AutoconfElement, List<AutoconfProjectionAnnotation>> createAnnotationMap(IAnnotationModel model) {
+ Map<AutoconfElement, List<AutoconfProjectionAnnotation>> map= new HashMap<AutoconfElement, List<AutoconfProjectionAnnotation>>();
+ Iterator e= model.getAnnotationIterator();
+ while (e.hasNext()) {
+ Object annotation= e.next();
+ if (annotation instanceof AutoconfProjectionAnnotation) {
+ AutoconfProjectionAnnotation directive= (AutoconfProjectionAnnotation) annotation;
+ List<AutoconfProjectionAnnotation> list= map.get(directive.getElement());
+ if (list == null) {
+ list= new ArrayList<AutoconfProjectionAnnotation>(2);
+ map.put(directive.getElement(), list);
+ }
+ list.add(directive);
+ }
+ }
+ return map;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AbstractElementListSelectionDialog.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AbstractElementListSelectionDialog.java
new file mode 100644
index 0000000000..f63da33227
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AbstractElementListSelectionDialog.java
@@ -0,0 +1,283 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * QNX Software System
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+
+/**
+ * A class to select one or more elements out of an indexed property
+ */
+public abstract class AbstractElementListSelectionDialog extends SelectionStatusDialog {
+
+ private ILabelProvider fRenderer;
+ private boolean fIgnoreCase;
+ private boolean fIsMultipleSelection;
+
+ private SelectionList fSelectionList;
+ private Label fMessage;
+ private ISelectionValidator fValidator;
+
+ private String fMessageText;
+ private String fEmptyListMessage;
+ private String fNothingSelectedMessage;
+
+ private StatusInfo fCurrStatus;
+
+ /*
+ * @private
+ */
+ protected void access$superOpen() {
+ super.open();
+ }
+ /*
+ * @private
+ * @see Dialog#cancelPressed
+ */
+ protected void cancelPressed() {
+ setResult(null);
+ super.cancelPressed();
+ }
+ protected Point computeInitialSize() {
+ return new Point(convertWidthInCharsToPixels(60), convertHeightInCharsToPixels(18));
+ }
+ /*
+ * @private
+ * @see Window#createDialogArea(Composite)
+ */
+ protected Control createDialogArea(Composite parent) {
+ Composite contents= (Composite)super.createDialogArea(parent);
+
+ fMessage= createMessage(contents);
+
+ int flags= fIsMultipleSelection ? SWT.MULTI : SWT.SINGLE;
+ fSelectionList= new SelectionList(contents, flags | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL,
+ fRenderer, fIgnoreCase);
+
+ fSelectionList.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ handleDoubleClick();
+ }
+ public void widgetSelected(SelectionEvent e) {
+ verifyCurrentSelection();
+ }
+ });
+
+ GridData spec= new GridData();
+ Point initialSize= computeInitialSize();
+ spec.widthHint= initialSize.x;
+ spec.heightHint= initialSize.y;
+ spec.grabExcessVerticalSpace= true;
+ spec.grabExcessHorizontalSpace= true;
+ spec.horizontalAlignment= GridData.FILL;
+ spec.verticalAlignment= GridData.FILL;
+ fSelectionList.setLayoutData(spec);
+
+ return contents;
+ }
+ /**
+ * Creates the message text widget and sets layout data.
+ */
+ protected Label createMessage(Composite parent) {
+ Label text= new Label(parent, SWT.NULL);
+ text.setText(fMessageText);
+ GridData spec= new GridData();
+ spec.grabExcessVerticalSpace= false;
+ spec.grabExcessHorizontalSpace= true;
+ spec.horizontalAlignment= GridData.FILL;
+ spec.verticalAlignment= GridData.BEGINNING;
+ text.setLayoutData(spec);
+ return text;
+ }
+ /*
+ * @private
+ * @see Window#create(Shell)
+ */
+ public void create() {
+ super.create();
+ if (isEmptyList()) {
+ fMessage.setEnabled(false);
+ fSelectionList.setEnabled(false);
+ } else {
+ verifyCurrentSelection();
+ fSelectionList.selectFilterText();
+ fSelectionList.setFocus();
+ }
+ }
+ /**
+ * Returns the currently used filter text.
+ */
+ protected String getFilter() {
+ return fSelectionList.getFilter();
+ }
+ /**
+ * Returns the selection indices.
+ */
+ protected int[] getSelectionIndices() {
+ return fSelectionList.getSelectionIndices();
+ }
+ /**
+ * Returns the widget selection. Returns empty list when the widget is not
+ * usable.
+ */
+ protected List<Object> getWidgetSelection() {
+ if (fSelectionList == null || fSelectionList.isDisposed())
+ return new ArrayList<Object>(0);
+ return fSelectionList.getSelection();
+ }
+ /**
+ * An element as been selected in the list by double clicking on it.
+ * Emulate a OK button pressed to close the dialog.
+ */
+ protected abstract void handleDoubleClick();
+ /**
+ * Checks whether the list of elements is empty or not.
+ */
+ protected boolean isEmptyList() {
+ if (fSelectionList == null)
+ return true;
+ return fSelectionList.isEmptyList();
+ }
+ /**
+ * Constructs a list selection dialog.
+ * @param renderer The label renderer used
+ * @param ignoreCase Decides if the match string ignores lower/upppr case
+ * @param multipleSelection Allow multiple selection
+ */
+ protected AbstractElementListSelectionDialog(Shell parent, String title, Image image, ILabelProvider renderer, boolean ignoreCase, boolean multipleSelection) {
+ super(parent);
+ setTitle(title);
+ setImage(image);
+ fRenderer= renderer;
+ fIgnoreCase= ignoreCase;
+ fIsMultipleSelection= multipleSelection;
+
+ fMessageText= ""; //$NON-NLS-1$
+
+ fCurrStatus= new StatusInfo();
+
+ fValidator= null;
+ fEmptyListMessage= ""; //$NON-NLS-1$
+ fNothingSelectedMessage= ""; //$NON-NLS-1$
+ }
+ /**
+ * Constructs a list selection dialog.
+ * @param renderer The label renderer used
+ * @param ignoreCase Decides if the match string ignores lower/upppr case
+ * @param multipleSelection Allow multiple selection
+ */
+ protected AbstractElementListSelectionDialog(Shell parent, ILabelProvider renderer, boolean ignoreCase, boolean multipleSelection) {
+ this(parent, "", null, renderer, ignoreCase, multipleSelection); //$NON-NLS-1$
+ }
+ /*
+ * @private
+ */
+ public int open() {
+ BusyIndicator.showWhile(null, new Runnable() {
+ public void run() {
+ access$superOpen();
+ }
+ });
+ return getReturnCode() ;
+ }
+ /**
+ * Refilters the current list according to the filter entered into the
+ * text edit field.
+ */
+ protected void refilter() {
+ fSelectionList.filter(true);
+ }
+ /**
+ * If a empty-list message is set, a error message is shown
+ * Must be set before widget creation
+ */
+ public void setEmptyListMessage(String message) {
+ fEmptyListMessage= message;
+ }
+ /**
+ * Sets the filter text to the given value.
+ */
+ protected void setFilter(String text, boolean refilter) {
+ fSelectionList.setFilter(text, refilter);
+ }
+ /**
+ * Sets the message to be shown above the match text field.
+ * Must be set before widget creation
+ */
+ public void setMessage(String message) {
+ fMessageText= message;
+ }
+ /**
+ * If the selection is empty, this message is shown
+ */
+ public void setNothingSelectedMessage(String message) {
+ fNothingSelectedMessage= message;
+ }
+ /**
+ * Selects the elements in the list determined by the given
+ * selection indices.
+ */
+ protected void setSelection(int[] selection) {
+ fSelectionList.setSelection(selection);
+ }
+ /**
+ * Initializes the selection list widget with the given list of
+ * elements.
+ */
+ protected void setSelectionListElements(List<Object> elements, boolean refilter) {
+ fSelectionList.setElements(elements, refilter);
+ }
+ /**
+ * A validator can be set to check if the current selection
+ * is valid
+ */
+ public void setValidator(ISelectionValidator validator) {
+ fValidator= validator;
+ }
+ /**
+ * Verifies the current selection and updates the status line
+ * accordingly.
+ */
+ protected boolean verifyCurrentSelection() {
+ List<Object> sel= getWidgetSelection();
+ int length= sel.size();
+ if (length > 0) {
+ if (fValidator != null) {
+ fValidator.isValid(sel.toArray(), fCurrStatus);
+ } else {
+ fCurrStatus.setOK();
+ }
+ } else {
+ if (isEmptyList()) {
+ fCurrStatus.setError(fEmptyListMessage);
+ } else {
+ fCurrStatus.setError(fNothingSelectedMessage);
+ }
+ }
+ updateStatus(fCurrStatus);
+ return fCurrStatus.isOK();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AbstractMakefile.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AbstractMakefile.java
new file mode 100644
index 0000000000..2ab28fce00
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AbstractMakefile.java
@@ -0,0 +1,286 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Makefile : ( statement ) *
+ * statement : rule | macro_definition | comments | empty
+ * rule : inference_rule | target_rule
+ * inference_rule : target ':' <nl> ( <tab> command <nl> ) +
+ * target_rule : target [ ( target ) * ] ':' [ ( prerequisite ) * ] [ ';' command ] <nl>
+ [ ( command ) * ]
+ * macro_definition : string '=' (string)*
+ * comments : ('#' (string) <nl>) *
+ * empty : <nl>
+ * command : <tab> prefix_command string <nl>
+ * target : string
+ * prefix_command : '-' | '@' | '+'
+ * internal_macro : "$<" | "$*" | "$@" | "$?" | "$%"
+ */
+
+public abstract class AbstractMakefile extends Parent implements IMakefile {
+
+ private URI filename;
+
+ public AbstractMakefile(Directive parent) {
+ super(parent);
+ }
+
+ public abstract IDirective[] getBuiltins();
+
+ public IRule[] getRules() {
+ IDirective[] stmts = getDirectives(true);
+ List<IRule> array = new ArrayList<IRule>(stmts.length);
+ for (int i = 0; i < stmts.length; i++) {
+ if (stmts[i] instanceof IRule) {
+ array.add((IRule)stmts[i]);
+ }
+ }
+ return (IRule[]) array.toArray(new IRule[0]);
+ }
+
+ public IRule[] getRules(String target) {
+ IRule[] rules = getRules();
+ List<IRule> array = new ArrayList<IRule>(rules.length);
+ for (int i = 0; i < rules.length; i++) {
+ if (rules[i].getTarget().equals(target)) {
+ array.add(rules[i]);
+ }
+ }
+ return (IRule[]) array.toArray(new IRule[0]);
+ }
+
+ public IInferenceRule[] getInferenceRules() {
+ IRule[] rules = getRules();
+ List<IInferenceRule> array = new ArrayList<IInferenceRule>(rules.length);
+ for (int i = 0; i < rules.length; i++) {
+ if (rules[i] instanceof IInferenceRule) {
+ array.add((IInferenceRule)rules[i]);
+ }
+ }
+ return (IInferenceRule[]) array.toArray(new IInferenceRule[0]);
+ }
+
+ public IInferenceRule[] getInferenceRules(String target) {
+ IInferenceRule[] irules = getInferenceRules();
+ List<IInferenceRule> array = new ArrayList<IInferenceRule>(irules.length);
+ for (int i = 0; i < irules.length; i++) {
+ if (irules[i].getTarget().equals(target)) {
+ array.add(irules[i]);
+ }
+ }
+ return (IInferenceRule[]) array.toArray(new IInferenceRule[0]);
+ }
+
+ public ITargetRule[] getTargetRules() {
+ IRule[] trules = getRules();
+ List<ITargetRule> array = new ArrayList<ITargetRule>(trules.length);
+ for (int i = 0; i < trules.length; i++) {
+ if (trules[i] instanceof ITargetRule) {
+ array.add((ITargetRule)trules[i]);
+ }
+ }
+ return (ITargetRule[]) array.toArray(new ITargetRule[0]);
+ }
+
+ public ITargetRule[] getTargetRules(String target) {
+ ITargetRule[] trules = getTargetRules();
+ List<ITargetRule> array = new ArrayList<ITargetRule>(trules.length);
+ for (int i = 0; i < trules.length; i++) {
+ if (trules[i].getTarget().equals(target)) {
+ array.add(trules[i]);
+ }
+ }
+ return (ITargetRule[]) array.toArray(new ITargetRule[0]);
+ }
+
+ public IMacroDefinition[] getMacroDefinitions() {
+ IDirective[] stmts = getDirectives(true);
+ List<IMacroDefinition> array = new ArrayList<IMacroDefinition>(stmts.length);
+ for (int i = 0; i < stmts.length; i++) {
+ if (stmts[i] instanceof IMacroDefinition) {
+ array.add((IMacroDefinition)stmts[i]);
+ }
+ }
+ return (IMacroDefinition[]) array.toArray(new IMacroDefinition[0]);
+ }
+
+ public IMacroDefinition[] getMacroDefinitions(String name) {
+ IMacroDefinition[] variables = getMacroDefinitions();
+ List<IMacroDefinition> array = new ArrayList<IMacroDefinition>(variables.length);
+ for (int i = 0; i < variables.length; i++) {
+ if (variables[i].getName().equals(name)) {
+ array.add(variables[i]);
+ }
+ }
+ return (IMacroDefinition[]) array.toArray(new IMacroDefinition[0]);
+ }
+
+ public IMacroDefinition[] getBuiltinMacroDefinitions() {
+ IDirective[] stmts = getBuiltins();
+ List<IMacroDefinition> array = new ArrayList<IMacroDefinition>(stmts.length);
+ for (int i = 0; i < stmts.length; i++) {
+ if (stmts[i] instanceof IMacroDefinition) {
+ array.add((IMacroDefinition)stmts[i]);
+ }
+ }
+ return (IMacroDefinition[]) array.toArray(new IMacroDefinition[0]);
+ }
+
+ public IMacroDefinition[] getBuiltinMacroDefinitions(String name) {
+ IMacroDefinition[] variables = getBuiltinMacroDefinitions();
+ List<IMacroDefinition> array = new ArrayList<IMacroDefinition>(variables.length);
+ for (int i = 0; i < variables.length; i++) {
+ if (variables[i].getName().equals(name)) {
+ array.add(variables[i]);
+ }
+ }
+ return (IMacroDefinition[]) array.toArray(new IMacroDefinition[0]);
+ }
+
+ public IInferenceRule[] getBuiltinInferenceRules() {
+ IDirective[] stmts = getBuiltins();
+ List<IInferenceRule> array = new ArrayList<IInferenceRule>(stmts.length);
+ for (int i = 0; i < stmts.length; i++) {
+ if (stmts[i] instanceof IInferenceRule) {
+ array.add((IInferenceRule)stmts[i]);
+ }
+ }
+ return (IInferenceRule[]) array.toArray(new IInferenceRule[0]);
+ }
+
+ public IInferenceRule[] getBuiltinInferenceRules(String target) {
+ IInferenceRule[] irules = getBuiltinInferenceRules();
+ List<IInferenceRule> array = new ArrayList<IInferenceRule>(irules.length);
+ for (int i = 0; i < irules.length; i++) {
+ if (irules[i].getTarget().equals(target)) {
+ array.add(irules[i]);
+ }
+ }
+ return (IInferenceRule[]) array.toArray(new IInferenceRule[0]);
+ }
+
+ public String expandString(String line) {
+ return expandString(line, false);
+ }
+
+ public String expandString(String line, boolean recursive) {
+ int len = line.length();
+ boolean foundDollar = false;
+ boolean inMacro = false;
+ StringBuffer buffer = new StringBuffer();
+ StringBuffer macroName = new StringBuffer();
+ for (int i = 0; i < len; i++) {
+ char c = line.charAt(i);
+ switch(c) {
+ case '$':
+ // '$$' --> '$'
+ if (foundDollar) {
+ buffer.append(c);
+ foundDollar = false;
+ } else {
+ foundDollar = true;
+ }
+ break;
+ case '(':
+ case '{':
+ if (foundDollar) {
+ inMacro = true;
+ } else {
+ buffer.append(c);
+ }
+ break;
+ case ')':
+ case '}':
+ if (inMacro) {
+ String name = macroName.toString();
+ if (name.length() > 0) {
+ IMacroDefinition[] defs = getMacroDefinitions(name);
+ if (defs.length == 0) {
+ defs = getBuiltinMacroDefinitions(name);
+ }
+ if (defs.length > 0) {
+ String result = defs[0].getValue().toString();
+ if (result.indexOf('$') != -1 && recursive) {
+ result = expandString(result, recursive);
+ }
+ buffer.append(result);
+ } else { // Do not expand
+ buffer.append('$').append('(').append(name).append(')');
+ }
+ }
+ macroName.setLength(0);
+ inMacro = false;
+ } else {
+ buffer.append(c);
+ }
+ break;
+ default:
+ if (inMacro) {
+ macroName.append(c);
+ } else if (foundDollar) {
+ String name = String.valueOf(c);
+ IMacroDefinition[] defs = getMacroDefinitions(name);
+ if (defs.length == 0) {
+ defs = getBuiltinMacroDefinitions(name);
+ }
+ if (defs.length > 0) {
+ String result = defs[0].getValue().toString();
+ if (result.indexOf('$') != -1 && recursive) {
+ result = expandString(result, recursive);
+ }
+ buffer.append(result);
+ } else {
+ // nothing found
+ buffer.append('$').append(c);
+ }
+ inMacro = false;
+ } else {
+ buffer.append(c);
+ }
+ foundDollar = false;
+ break;
+ }
+ }
+ return buffer.toString();
+ }
+
+ public URI getFileURI() {
+ return filename;
+ }
+
+ public void setFileURI(URI filename) {
+ this.filename = filename;
+ }
+
+
+ public IMakefile getMakefile() {
+ return this;
+ }
+
+ public IMakefileReaderProvider getMakefileReaderProvider() {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.make.core.makefile.IMakefile#parse(java.net.URI, org.eclipse.cdt.make.core.makefile.IMakefileReaderProvider)
+ */
+ public void parse(URI fileURI,
+ IMakefileReaderProvider makefileReaderProvider) throws IOException {
+ // not used
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AbstractMakefileCodeScanner.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AbstractMakefileCodeScanner.java
new file mode 100644
index 0000000000..0bb70e2e9c
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AbstractMakefileCodeScanner.java
@@ -0,0 +1,172 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - convert to use with Automake editor
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.StringConverter;
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.RuleBasedScanner;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsPlugin;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.ColorManager;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+
+
+/**
+ * AbstractMakefileEditorScanner
+ */
+public abstract class AbstractMakefileCodeScanner extends RuleBasedScanner {
+
+ private Map<String, Token> fTokenMap= new HashMap<String, Token>();
+ private String[] fPropertyNamesColor;
+ /**
+ * Preference keys for boolean preferences which are <code>true</code>,
+ * iff the corresponding token should be rendered bold.
+ */
+ private String[] fPropertyNamesBold;
+ /**
+ * Preference keys for boolean preferences which are <code>true</code>,
+ * iff the corresponding token should be rendered italic.
+ */
+ private String[] fPropertyNamesItalic;
+
+
+ /**
+ * Returns the list of preference keys which define the tokens
+ * used in the rules of this scanner.
+ */
+ abstract protected String[] getTokenProperties();
+
+ /**
+ * Creates the list of rules controlling this scanner.
+ */
+ abstract protected List<IRule> createRules();
+
+ /**
+ * Must be called after the constructor has been called.
+ */
+ public final void initialize() {
+
+ fPropertyNamesColor= getTokenProperties();
+ int length= fPropertyNamesColor.length;
+ fPropertyNamesBold= new String[length];
+ fPropertyNamesItalic= new String[length];
+
+ for (int i= 0; i < length; i++) {
+ fPropertyNamesBold[i]= fPropertyNamesColor[i] + MakefileEditorPreferenceConstants.EDITOR_BOLD_SUFFIX;
+ fPropertyNamesItalic[i]= fPropertyNamesColor[i] + MakefileEditorPreferenceConstants.EDITOR_ITALIC_SUFFIX;
+ addToken(fPropertyNamesColor[i], fPropertyNamesBold[i], fPropertyNamesItalic[i]);
+ }
+
+ initializeRules();
+ }
+
+ private void initializeRules() {
+ List<IRule> rules= createRules();
+ if (rules != null) {
+ IRule[] result= new IRule[rules.size()];
+ rules.toArray(result);
+ setRules(result);
+ }
+ }
+
+ protected Token getToken(String key) {
+ return (Token) fTokenMap.get(key);
+ }
+
+ private void addToken(String colorKey, String boldKey, String italicKey) {
+ fTokenMap.put(colorKey, new Token(createTextAttribute(colorKey, boldKey, italicKey)));
+ }
+
+ private int indexOf(String property) {
+ if (property != null) {
+ int length= fPropertyNamesColor.length;
+ for (int i= 0; i < length; i++) {
+ if (property.equals(fPropertyNamesColor[i]) || property.equals(fPropertyNamesBold[i]) || property.equals(fPropertyNamesItalic[i]))
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ public boolean affectsBehavior(PropertyChangeEvent event) {
+ return indexOf(event.getProperty()) >= 0;
+ }
+
+ public void adaptToPreferenceChange(PropertyChangeEvent event) {
+ String p= event.getProperty();
+ int index= indexOf(p);
+ Token token= getToken(fPropertyNamesColor[index]);
+ if (fPropertyNamesColor[index].equals(p))
+ adaptToColorChange(event, token);
+ else if (fPropertyNamesBold[index].equals(p))
+ adaptToStyleChange(event, token, SWT.BOLD);
+ else if (fPropertyNamesItalic[index].equals(p))
+ adaptToStyleChange(event, token, SWT.ITALIC);
+ }
+
+ protected void adaptToColorChange(PropertyChangeEvent event, Token token) {
+ RGB rgb= null;
+ Object value= event.getNewValue();
+ if (value instanceof RGB) {
+ rgb= (RGB) value;
+ } else if (value instanceof String) {
+ rgb= StringConverter.asRGB((String) value);
+ }
+
+ if (rgb != null) {
+ TextAttribute attr= (TextAttribute) token.getData();
+ token.setData(new TextAttribute(ColorManager.getDefault().getColor(rgb), attr.getBackground(), attr.getStyle()));
+ }
+ }
+
+ protected void adaptToStyleChange(PropertyChangeEvent event, Token token, int styleAttribute) {
+ if (token == null) {
+ return;
+ }
+ boolean eventValue= false;
+ Object value= event.getNewValue();
+ if (value instanceof Boolean) {
+ eventValue= ((Boolean) value).booleanValue();
+ } else if (IPreferenceStore.TRUE.equals(value)) {
+ eventValue= true;
+ }
+
+ TextAttribute attr= (TextAttribute) token.getData();
+ boolean activeValue= (attr.getStyle() & styleAttribute) == styleAttribute;
+ if (activeValue != eventValue) {
+ token.setData(new TextAttribute(attr.getForeground(), attr.getBackground(), eventValue ? attr.getStyle() | styleAttribute : attr.getStyle() & ~styleAttribute));
+ }
+ }
+
+ protected TextAttribute createTextAttribute(String colorID, String boldKey, String italicKey) {
+ Color color= null;
+ if (colorID != null) {
+ color= AutomakeEditorFactory.getPreferenceColor(colorID);
+ }
+ IPreferenceStore store= AutotoolsPlugin.getDefault().getPreferenceStore();
+ int style= store.getBoolean(boldKey) ? SWT.BOLD : SWT.NORMAL;
+ if (store.getBoolean(italicKey)) {
+ style |= SWT.ITALIC;
+ }
+ return new TextAttribute(color, null, style);
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AddBuildTargetAction.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AddBuildTargetAction.java
new file mode 100644
index 0000000000..1a738bf26e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AddBuildTargetAction.java
@@ -0,0 +1,154 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - convert to use with Automake editor
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.cdt.make.core.IMakeTarget;
+import org.eclipse.cdt.make.core.IMakeTargetManager;
+import org.eclipse.cdt.make.core.MakeCorePlugin;
+import org.eclipse.cdt.make.ui.dialogs.MakeTargetDialog;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.MakeUIMessages;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IFileEditorInput;
+
+
+/**
+ */
+public class AddBuildTargetAction extends Action {
+
+ MakefileContentOutlinePage fOutliner;
+ static final ITargetRule[] EMPTY_TARGET_RULES = {
+ };
+
+ public AddBuildTargetAction(MakefileContentOutlinePage outliner) {
+ super(MakeUIMessages.getResourceString("AddBuildTargetAction.title")); //$NON-NLS-1$
+ setDescription(MakeUIMessages.getResourceString("AddBuildTargetAction.description")); //$NON-NLS-1$
+ setToolTipText(MakeUIMessages.getResourceString("AddBuildTargetAction.tooltip")); //$NON-NLS-1$
+ fOutliner = outliner;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.action.IAction#run()
+ */
+ public void run() {
+ IMakeTargetManager manager = MakeCorePlugin.getDefault().getTargetManager();
+ IFile file = getFile();
+ Shell shell = fOutliner.getControl().getShell();
+ ITargetRule[] rules = getTargetRules(fOutliner.getSelection());
+ if (file != null && rules.length > 0 && shell != null) {
+ StringBuffer sbBuildName = new StringBuffer();
+ StringBuffer sbMakefileTarget = new StringBuffer();
+ for (int i = 0; i < rules.length; i++) {
+ String name = rules[i].getTarget().toString().trim();
+ if (sbBuildName.length() == 0) {
+ sbBuildName.append(name);
+ } else {
+ sbBuildName.append('_').append(name);
+ }
+ if (sbMakefileTarget.length() == 0) {
+ sbMakefileTarget.append(name);
+ } else {
+ sbMakefileTarget.append(' ').append(name);
+ }
+ }
+ String buildName = generateUniqueName(file.getParent(), sbBuildName.toString());
+ String makefileTarget = sbMakefileTarget.toString();
+ IMakeTarget target = null;
+ try {
+ String[] ids = manager.getTargetBuilders(file.getProject());
+ if (ids.length > 0) {
+ target = manager.createTarget(file.getProject(), buildName, ids[0]);
+ target.setBuildAttribute(IMakeTarget.BUILD_TARGET, makefileTarget);
+ target.setContainer(file.getParent());
+ }
+ } catch (CoreException e) {
+ AutotoolsUIPlugin.errorDialog(shell, MakeUIMessages.getResourceString("AddBuildTargetAction.exception.internal"), e.toString(), e); //$NON-NLS-1$
+ target = null;
+ }
+
+ // Always popup the dialog.
+ if (target != null) {
+ MakeTargetDialog dialog;
+ try {
+ dialog = new MakeTargetDialog(shell, target);
+ dialog.open();
+ } catch (CoreException e) {
+ AutotoolsUIPlugin.errorDialog(shell, MakeUIMessages.getResourceString("AddBuildTargetAction.exception.internal"), e.toString(), e); //$NON-NLS-1$
+ }
+ }
+ }
+ }
+
+ private String generateUniqueName(IContainer container, String targetString) {
+ String newName = targetString;
+ int i = 0;
+ IMakeTargetManager manager = MakeCorePlugin.getDefault().getTargetManager();
+ try {
+ while (manager.findTarget(container, newName) != null) {
+ i++;
+ newName = targetString + " (" + Integer.toString(i) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ } catch (CoreException e) {
+ }
+ return newName;
+ }
+
+ public boolean canActionBeAdded(ISelection selection) {
+ ITargetRule[] rules = getTargetRules(selection);
+ for (int i = 0; i < rules.length; i++) {
+ IFile file = getFile();
+ if (file == null)
+ return false;
+ if (!MakeCorePlugin.getDefault().getTargetManager().hasTargetBuilder(file.getProject()))
+ return false;
+ }
+ return true;
+ }
+
+ private IFile getFile() {
+ Object input = fOutliner.getInput();
+ if (input instanceof IFileEditorInput) {
+ return ((IFileEditorInput)input).getFile();
+ }
+ return null;
+ }
+
+ @SuppressWarnings("unchecked")
+ private ITargetRule[] getTargetRules(ISelection sel) {
+ if (!sel.isEmpty() && sel instanceof IStructuredSelection) {
+ List list = ((IStructuredSelection)sel).toList();
+ if (list.size() > 0) {
+ List<ITargetRule> targets = new ArrayList<ITargetRule>(list.size());
+ Object[] elements = list.toArray();
+ for (int i = 0; i < elements.length; i++) {
+ if (elements[i] instanceof ITargetRule) {
+ targets.add((ITargetRule)elements[i]);
+ }
+ }
+ return (ITargetRule[])targets.toArray(EMPTY_TARGET_RULES);
+ }
+ }
+ return EMPTY_TARGET_RULES;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ArchiveTarget.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ArchiveTarget.java
new file mode 100644
index 0000000000..0b6cf7e9a5
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ArchiveTarget.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * IArchiveTarget
+ */
+public class ArchiveTarget extends Target {
+
+ String member;
+
+ public ArchiveTarget(String lib, String obj) {
+ super(lib);
+ member = obj;
+ }
+
+ public String getMember() {
+ return member;
+ }
+
+ public String getLibaryName() {
+ return toString();
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutoconfSubstRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutoconfSubstRule.java
new file mode 100644
index 0000000000..c4f2e3ff38
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutoconfSubstRule.java
@@ -0,0 +1,92 @@
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.util.Arrays;
+import java.util.Comparator;
+
+import org.eclipse.jface.text.rules.ICharacterScanner;
+import org.eclipse.jface.text.rules.IPredicateRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.Token;
+
+public class AutoconfSubstRule implements IPredicateRule {
+
+ private IToken token;
+ private char[][] fLineDelimiters;
+ private char[][] fSortedLineDelimiters;
+
+ private static class DecreasingCharArrayLengthComparator implements Comparator<Object> {
+ public int compare(Object o1, Object o2) {
+ return ((char[]) o2).length - ((char[]) o1).length;
+ }
+ }
+
+ private Comparator<Object> fLineDelimiterComparator= new DecreasingCharArrayLengthComparator();
+
+ public AutoconfSubstRule(IToken token) {
+ this.token = token;
+ }
+
+ public IToken evaluate(ICharacterScanner scanner, boolean resume) {
+ char[][] originalDelimiters= scanner.getLegalLineDelimiters();
+ int count= originalDelimiters.length;
+ if (fLineDelimiters == null || originalDelimiters.length != count) {
+ fSortedLineDelimiters= new char[count][];
+ } else {
+ while (count > 0 && fLineDelimiters[count-1] == originalDelimiters[count-1])
+ count--;
+ }
+ if (count != 0) {
+ fLineDelimiters= originalDelimiters;
+ System.arraycopy(fLineDelimiters, 0, fSortedLineDelimiters, 0, fLineDelimiters.length);
+ Arrays.sort(fSortedLineDelimiters, fLineDelimiterComparator);
+ }
+
+ int c;
+ boolean okToScan = resume;
+ int charCount = 0;
+
+ if (!resume) {
+ // Not resuming. Verify first char is '@'.
+ c = scanner.read();
+ ++charCount;
+ if (c == '@') {
+ okToScan = true;
+ }
+ }
+
+ if (okToScan) {
+ // We want to make sure we have a valid id (not @@) or (@_@). When
+ // we resume, we have no choice but to assume it is valid so far.
+ boolean isId = resume;
+ ++charCount;
+ while ((c = scanner.read()) != ICharacterScanner.EOF) {
+ if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z') {
+ // A valid id has some alphabetic character in it.
+ isId = true;
+ }
+ else if (c >= '0' && c <= '9' || c == '_') {
+ ; // continue
+ }
+ else if (c == '@' && isId)
+ return getSuccessToken();
+ else
+ break;
+ ++charCount;
+ }
+ }
+
+ for (int i = 0; i < charCount; ++i)
+ scanner.unread();
+
+ return Token.UNDEFINED;
+ }
+
+ public IToken getSuccessToken() {
+ return token;
+ }
+
+ public IToken evaluate(ICharacterScanner scanner) {
+ return evaluate(scanner, false);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeCompletionProcessor.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeCompletionProcessor.java
new file mode 100644
index 0000000000..2cf72d54ba
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeCompletionProcessor.java
@@ -0,0 +1,236 @@
+/*******************************************************************************
+ * Mostly copied from makefileCompletionProcessor which has the following
+ * copyright notice:
+ *
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Comparator;
+
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.TextPresentation;
+import org.eclipse.jface.text.contentassist.CompletionProposal;
+import org.eclipse.jface.text.contentassist.ContextInformation;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jface.text.contentassist.IContextInformationPresenter;
+import org.eclipse.jface.text.contentassist.IContextInformationValidator;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.MakeUIImages;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IEditorPart;
+
+
+public class AutomakeCompletionProcessor implements IContentAssistProcessor {
+
+ /**
+ * Simple content assist tip closer. The tip is valid in a range
+ * of 5 characters around its popup location.
+ */
+ protected static class Validator implements IContextInformationValidator, IContextInformationPresenter {
+
+ protected int fInstallOffset;
+
+ /*
+ * @see IContextInformationValidator#isContextInformationValid(int)
+ */
+ public boolean isContextInformationValid(int offset) {
+ return Math.abs(fInstallOffset - offset) < 5;
+ }
+
+ /*
+ * @see IContextInformationValidator#install(IContextInformation, ITextViewer, int)
+ */
+ public void install(IContextInformation info, ITextViewer viewer, int offset) {
+ fInstallOffset = offset;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.contentassist.IContextInformationPresenter#updatePresentation(int, TextPresentation)
+ */
+ public boolean updatePresentation(int documentPosition, TextPresentation presentation) {
+ return false;
+ }
+ }
+
+ public class DirectiveComparator implements Comparator<Object> {
+
+ /* (non-Javadoc)
+ * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+ */
+ public int compare(Object o1, Object o2) {
+ String name1;
+ String name2;
+
+ if (o1 instanceof IMacroDefinition) {
+ name1 = ((IMacroDefinition)o1).getName();
+ } else if (o1 instanceof IRule) {
+ name1 = ((IRule)o1).getTarget().toString();
+ } else {
+ name1 =""; //$NON-NLS-1$
+ }
+
+ if (o2 instanceof IMacroDefinition) {
+ name2 = ((IMacroDefinition)o1).getName();
+ } else if (o2 instanceof IRule) {
+ name2 = ((IRule)o1).getTarget().toString();
+ } else {
+ name2 =""; //$NON-NLS-1$
+ }
+
+ //return String.CASE_INSENSITIVE_ORDER.compare(name1, name2);
+ return name1.compareToIgnoreCase(name2);
+ }
+
+ }
+ protected IContextInformationValidator fValidator = new Validator();
+ protected Image imageMacro = MakeUIImages.getImage(MakeUIImages.IMG_OBJS_MAKEFILE_MACRO);
+ protected Image imageTarget = MakeUIImages.getImage(MakeUIImages.IMG_OBJS_MAKEFILE_TARGET_RULE);
+
+ protected CompletionProposalComparator comparator = new CompletionProposalComparator();
+ protected IEditorPart fEditor;
+ protected IWorkingCopyManager fManager;
+
+ public AutomakeCompletionProcessor(IEditorPart editor) {
+ fEditor = editor;
+ fManager = AutomakeEditorFactory.getDefault().getWorkingCopyManager();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int)
+ */
+ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {
+ WordPartDetector wordPart = new WordPartDetector(viewer, documentOffset);
+ boolean macro = WordPartDetector.inMacro(viewer, documentOffset);
+ IMakefile makefile = fManager.getWorkingCopy(fEditor.getEditorInput());
+ IDirective[] statements = null;
+ if (macro) {
+ IDirective[] m1 = makefile.getMacroDefinitions();
+ IDirective[] m2 = makefile.getBuiltinMacroDefinitions();
+ statements = new IDirective[m1.length + m2.length];
+ System.arraycopy(m1, 0, statements, 0, m1.length);
+ System.arraycopy(m2, 0, statements, m1.length, m2.length);
+ } else {
+ statements = makefile.getTargetRules();
+ }
+
+ ArrayList<ICompletionProposal> proposalList = new ArrayList<ICompletionProposal>(statements.length);
+
+ // iterate over all the different categories
+ for (int i = 0; i < statements.length; i++) {
+ String name = null;
+ Image image = null;
+ String infoString = "";//getContentInfoString(name); //$NON-NLS-1$
+ if (statements[i] instanceof IMacroDefinition) {
+ name = ((IMacroDefinition) statements[i]).getName();
+ image = imageMacro;
+ infoString = ((IMacroDefinition)statements[i]).getValue().toString();
+ } else if (statements[i] instanceof IRule) {
+ name = ((IRule) statements[i]).getTarget().toString();
+ image = imageTarget;
+ infoString = name;
+ }
+ if (name != null && name.startsWith(wordPart.toString())) {
+ IContextInformation info = new ContextInformation(name, infoString);
+ String displayString = (name.equals(infoString) ? name : name + " - " + infoString); //$NON-NLS-1$
+ ICompletionProposal result =
+ new CompletionProposal(
+ name,
+ wordPart.getOffset(),
+ wordPart.toString().length(),
+ name.length(),
+ image,
+ displayString,
+ info,
+ infoString);
+ proposalList.add(result);
+ }
+ }
+ ICompletionProposal[] proposals = (ICompletionProposal[]) proposalList.toArray(new ICompletionProposal[0]);
+ Arrays.sort(proposals, comparator);
+ return proposals;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeContextInformation(org.eclipse.jface.text.ITextViewer, int)
+ */
+ public IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset) {
+ WordPartDetector wordPart = new WordPartDetector(viewer, documentOffset);
+ boolean macro = WordPartDetector.inMacro(viewer, documentOffset);
+ IMakefile makefile = fManager.getWorkingCopy(fEditor.getEditorInput());
+ ArrayList<String> contextList = new ArrayList<String>();
+ if (macro) {
+ IDirective[] statements = makefile.getMacroDefinitions();
+ for (int i = 0; i < statements.length; i++) {
+ if (statements[i] instanceof IMacroDefinition) {
+ String name = ((IMacroDefinition) statements[i]).getName();
+ if (name != null && name.equals(wordPart.toString())) {
+ String value = ((IMacroDefinition) statements[i]).getValue().toString();
+ if (value != null && value.length() > 0) {
+ contextList.add(value);
+ }
+ }
+ }
+ }
+ statements = makefile.getBuiltinMacroDefinitions();
+ for (int i = 0; i < statements.length; i++) {
+ if (statements[i] instanceof IMacroDefinition) {
+ String name = ((IMacroDefinition) statements[i]).getName();
+ if (name != null && name.equals(wordPart.toString())) {
+ String value = ((IMacroDefinition) statements[i]).getValue().toString();
+ if (value != null && value.length() > 0) {
+ contextList.add(value);
+ }
+ }
+ }
+ }
+ }
+
+ IContextInformation[] result = new IContextInformation[contextList.size()];
+ for (int i = 0; i < result.length; i++) {
+ String context = (String)contextList.get(i);
+ result[i] = new ContextInformation(imageMacro, wordPart.toString(), context);
+ }
+ return result;
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
+ */
+ public char[] getCompletionProposalAutoActivationCharacters() {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationAutoActivationCharacters()
+ */
+ public char[] getContextInformationAutoActivationCharacters() {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getErrorMessage()
+ */
+ public String getErrorMessage() {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationValidator()
+ */
+ public IContextInformationValidator getContextInformationValidator() {
+ return fValidator;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeConfigMacro.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeConfigMacro.java
new file mode 100644
index 0000000000..63c47d9201
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeConfigMacro.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 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
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+
+
+public class AutomakeConfigMacro extends Directive {
+ String name;
+
+ public AutomakeConfigMacro(Directive parent, String name) {
+ super(parent);
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String toString() {
+ return name + "\n";
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeDocumentProvider.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeDocumentProvider.java
new file mode 100644
index 0000000000..6bf93db123
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeDocumentProvider.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - Modified from MakefileDocumentProvider for Automake
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.io.IOException;
+import java.util.Iterator;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IURIEditorInput;
+import org.eclipse.ui.editors.text.TextFileDocumentProvider;
+
+
+public class AutomakeDocumentProvider extends TextFileDocumentProvider implements IMakefileDocumentProvider {
+
+ /**
+ * Remembers a IMakefile for each element.
+ */
+ protected class AutomakefileFileInfo extends FileInfo {
+ public IMakefile fCopy;
+ }
+
+ /*
+ * @see org.eclipse.ui.editors.text.TextFileDocumentProvider#createEmptyFileInfo()
+ */
+ protected FileInfo createEmptyFileInfo() {
+ return new AutomakefileFileInfo();
+ }
+
+ /*
+ * @see org.eclipse.ui.editors.text.TextFileDocumentProvider#createFileInfo(java.lang.Object)
+ */
+ protected FileInfo createFileInfo(Object element) throws CoreException {
+ IMakefile original = null;
+ if (element instanceof IFileEditorInput) {
+ IFileEditorInput input= (IFileEditorInput) element;
+ if (input.getFile().exists())
+ original= createMakefile(input.getFile().getLocation().toOSString());
+ } else if (element instanceof IURIEditorInput) {
+ IURIEditorInput input = (IURIEditorInput)element;
+ original = createMakefile(input.getURI().getPath().toString());
+ }
+ if (original == null)
+ return null;
+
+ FileInfo info= super.createFileInfo(element);
+ if (!(info instanceof AutomakefileFileInfo)) {
+ return null;
+ }
+
+ AutomakefileFileInfo makefileInfo= (AutomakefileFileInfo) info;
+ setUpSynchronization(makefileInfo);
+
+ makefileInfo.fCopy = original;
+
+ return makefileInfo;
+ }
+
+ /**
+ */
+ private IMakefile createMakefile(String fileName) {
+ IMakefile makefile = null;
+ Automakefile automakefile = new Automakefile();
+ try {
+ automakefile.parse(fileName);
+ } catch (IOException e) {
+ }
+ makefile = automakefile;
+ return makefile;
+ }
+
+ /*
+ * @see org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake.IMakefileDocumentProvider#getWorkingCopy(java.lang.Object)
+ */
+ public IMakefile getWorkingCopy(Object element) {
+ FileInfo fileInfo= getFileInfo(element);
+ if (fileInfo instanceof AutomakefileFileInfo) {
+ AutomakefileFileInfo info= (AutomakefileFileInfo) fileInfo;
+ return info.fCopy;
+ }
+ return null;
+ }
+
+ /*
+ * @see org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake.IMakefileDocumentProvider#shutdown()
+ */
+ @SuppressWarnings("unchecked")
+ public void shutdown() {
+ Iterator e= getConnectedElementsIterator();
+ while (e.hasNext())
+ disconnect(e.next());
+ }
+
+ public void connect(Object element) throws CoreException {
+ super.connect(element);
+ IMakefile makefile = getWorkingCopy(element);
+ IDocument document = getDocument(element);
+ AutomakeErrorHandler errorHandler = new AutomakeErrorHandler(document);
+ errorHandler.update(makefile);
+ }
+
+ public IDocument getDocument(Object element) {
+ FileInfo info= (FileInfo) getFileInfo(element);
+ if (info != null)
+ return info.fTextFileBuffer.getDocument();
+ return getParentProvider().getDocument(element);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeEditor.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeEditor.java
new file mode 100644
index 0000000000..a277744a16
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeEditor.java
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - Modified from MakefileEditor to support Automake files
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsPlugin;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.AutomakeEditorPreferencePage;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.AutotoolsEditorPreferenceConstants;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.texteditor.ChainedPreferenceStore;
+import org.eclipse.ui.texteditor.DefaultRangeIndicator;
+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
+
+
+public class AutomakeEditor extends MakefileEditor {
+
+ protected AutomakefileContentOutlinePage page;
+ private AutomakefileSourceConfiguration sourceViewerConfiguration;
+ private AutomakeErrorHandler errorHandler;
+ private static AutomakeEditor fgInstance;
+ private IEditorInput input;
+
+ public AutomakeEditor() {
+ super();
+ fgInstance = this;
+ }
+
+ /**
+ * Returns the default editor instance.
+ *
+ * @return the default editor instance
+ */
+ public static AutomakeEditor getDefault() {
+ return fgInstance;
+ }
+
+ protected void doSetInput(IEditorInput newInput) throws CoreException
+ {
+ super.doSetInput(newInput);
+ this.input = newInput;
+
+ getOutlinePage().setInput(input);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#initializeEditor()
+ */
+ protected void initializeEditor() {
+ setRangeIndicator(new DefaultRangeIndicator());
+ setEditorContextMenuId("#MakefileEditorContext"); //$NON-NLS-1$
+ setRulerContextMenuId("#MakefileRulerContext"); //$NON-NLS-1$
+ setDocumentProvider(AutomakeEditorFactory.getDefault().getAutomakefileDocumentProvider());
+ IPreferenceStore[] stores = new IPreferenceStore[2];
+ stores[0] = AutotoolsPlugin.getDefault().getPreferenceStore();
+ stores[1] = EditorsUI.getPreferenceStore();
+ ChainedPreferenceStore chainedStore = new ChainedPreferenceStore(stores);
+ setPreferenceStore(chainedStore);
+ sourceViewerConfiguration = new AutomakefileSourceConfiguration(chainedStore, this);
+ setSourceViewerConfiguration(sourceViewerConfiguration);
+ AutotoolsEditorPreferenceConstants.initializeDefaultValues(stores[0]);
+ AutomakeEditorPreferencePage.initDefaults(stores[0]);
+ configureInsertMode(SMART_INSERT, false);
+ setInsertMode(INSERT);
+ }
+
+ public AutomakeDocumentProvider getAutomakefileDocumentProvider() {
+ return (AutomakeDocumentProvider) AutomakeEditorFactory.getDefault().getAutomakefileDocumentProvider();
+ }
+
+ public AutomakefileContentOutlinePage getAutomakeOutlinePage() {
+ if (page == null) {
+ page = new AutomakefileContentOutlinePage(this);
+ page.addSelectionChangedListener(this);
+ page.setInput(getEditorInput());
+ }
+ return page;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createPartControl(Composite parent) {
+ super.createPartControl(parent);
+ }
+
+ /* (non-Javadoc)
+ * Method declared on IAdaptable
+ */
+ @SuppressWarnings("unchecked")
+ public Object getAdapter(Class key) {
+ if (key.equals(IContentOutlinePage.class)) {
+ return getAutomakeOutlinePage();
+ }
+ return super.getAdapter(key);
+ }
+
+ public AutomakefileSourceConfiguration getAutomakeSourceViewerConfiguration() {
+ return sourceViewerConfiguration;
+ }
+
+ protected void handlePreferenceStoreChanged(PropertyChangeEvent event) {
+ super.handlePreferenceStoreChanged(event);
+ }
+
+ public IMakefile getMakefile() {
+ return getAutomakefileDocumentProvider().getWorkingCopy(this.getEditorInput());
+ }
+
+ public ISourceViewer getAutomakeSourceViewer() {
+ return getSourceViewer();
+ }
+
+ public AutomakeErrorHandler getAutomakeErrorHandler() {
+ return errorHandler;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeEditorFactory.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeEditorFactory.java
new file mode 100644
index 0000000000..182bdb94ff
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeEditorFactory.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsPlugin;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.ColorManager;
+import org.eclipse.swt.graphics.Color;
+
+
+public class AutomakeEditorFactory {
+ private IWorkingCopyManager workingCopyManager;
+ private IMakefileDocumentProvider automakeFileDocumentProvider;
+ private static AutomakeEditorFactory factory;
+
+ /**
+ * The constructor.
+ */
+ private AutomakeEditorFactory() {
+ factory = this;
+ }
+
+ public synchronized IMakefileDocumentProvider getAutomakefileDocumentProvider() {
+ if (automakeFileDocumentProvider == null) {
+ automakeFileDocumentProvider= new AutomakeDocumentProvider();
+ }
+ return automakeFileDocumentProvider;
+ }
+
+ public synchronized IWorkingCopyManager getWorkingCopyManager() {
+ if (workingCopyManager == null) {
+ IMakefileDocumentProvider provider= getAutomakefileDocumentProvider();
+ workingCopyManager= new WorkingCopyManager(provider);
+ }
+ return workingCopyManager;
+ }
+
+ /**
+ * Returns the preference color, identified by the given preference.
+ */
+ public static Color getPreferenceColor(String key) {
+ //FIXME: what do we do with Makefile editor preferences?
+ return ColorManager.getDefault().getColor(PreferenceConverter.getColor(AutotoolsPlugin.getDefault().getPreferenceStore(), key));
+ }
+
+ public static AutomakeEditorFactory getDefault() {
+ if (factory == null)
+ factory = new AutomakeEditorFactory();
+ return factory;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeErrorHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeErrorHandler.java
new file mode 100644
index 0000000000..7186033545
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeErrorHandler.java
@@ -0,0 +1,226 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.AnnotationModel;
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.texteditor.MarkerAnnotation;
+import org.eclipse.ui.texteditor.MarkerUtilities;
+
+
+public class AutomakeErrorHandler {
+ public static final String AUTOMAKE_ERROR_MARKER_ID = AutotoolsUIPlugin.PLUGIN_ID
+ + ".parsefileerror";
+
+ private IDocument document;
+ private AnnotationModel fAnnotationModel;
+
+ public AutomakeErrorHandler(IDocument document)
+ {
+ this.document = document;
+ IEditorInput input = AutomakeEditor.getDefault().getEditorInput();
+ this.fAnnotationModel = (AnnotationModel)AutomakeEditorFactory.getDefault().getAutomakefileDocumentProvider().getAnnotationModel(input);
+ }
+
+ private class AutomakeMarker implements IMarker {
+ private Map<String, Object> attributes;
+ private String type;
+ private long id;
+
+ public void delete() throws CoreException {
+ // TODO Auto-generated method stub
+
+ }
+ public boolean equals(Object obj) {
+ // TODO Auto-generated method stub
+ return super.equals(obj);
+ }
+ public boolean exists() {
+ // TODO Auto-generated method stub
+ return true;
+ }
+ @SuppressWarnings("unchecked")
+ public Object getAdapter(Class adapter) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+ public Object getAttribute(String attributeName) throws CoreException {
+ return attributes.get(attributeName);
+ }
+ public boolean getAttribute(String attributeName, boolean defaultValue) {
+ Object o = attributes.get(attributeName);
+ if (o != null && o instanceof Boolean)
+ return ((Boolean)o).booleanValue();
+ return defaultValue;
+ }
+ public int getAttribute(String attributeName, int defaultValue) {
+ Object o = attributes.get(attributeName);
+ if (o != null && o instanceof Integer)
+ return ((Integer)o).intValue();
+ return defaultValue;
+ }
+ public String getAttribute(String attributeName, String defaultValue) {
+ Object o = attributes.get(attributeName);
+ if (o != null && o instanceof String)
+ return (String)o;
+ return defaultValue;
+ }
+ @SuppressWarnings("unchecked")
+ public Map getAttributes() throws CoreException {
+ return attributes;
+ }
+ public Object[] getAttributes(String[] attributeNames)
+ throws CoreException {
+ Collection<Object> c = attributes.values();
+ return c.toArray();
+ }
+ public long getCreationTime() throws CoreException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+ public long getId() {
+ return id;
+ }
+ public IResource getResource() {
+ return null;
+ }
+ public String getType() throws CoreException {
+ return type;
+ }
+ public boolean isSubtypeOf(String superType) throws CoreException {
+ if (superType.equals(type))
+ return true;
+ return false;
+ }
+ public void setAttribute(String attributeName, boolean value)
+ throws CoreException {
+ Boolean b = new Boolean(value);
+ attributes.put(attributeName, b);
+ }
+ public void setAttribute(String attributeName, int value)
+ throws CoreException {
+ Integer i = new Integer(value);
+ attributes.put(attributeName, i);
+ }
+ public void setAttribute(String attributeName, Object value)
+ throws CoreException {
+ attributes.put(attributeName, value);
+ }
+ @SuppressWarnings("unchecked")
+ public void setAttributes(Map map) throws CoreException {
+ attributes.putAll(map);
+ }
+ public void setAttributes(String[] attributeNames, Object[] values)
+ throws CoreException {
+ for (int i = 0; i < attributeNames.length; ++i) {
+ attributes.put(attributeNames[i], values[i]);
+ }
+ }
+ protected Object clone() throws CloneNotSupportedException {
+ // TODO Auto-generated method stub
+ return super.clone();
+ }
+ public AutomakeMarker(String type, long id) {
+ this.type = type;
+ this.id = id;
+ this.attributes = new HashMap<String, Object>();
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private IMarker createMarker(Map attributes, String markerType) throws CoreException {
+ IMarker marker= new AutomakeMarker(markerType, -1);
+ marker.setAttributes(attributes);
+ return marker;
+ }
+
+ public void update(IMakefile makefile) {
+ removeExistingMarkers();
+
+ // Recursively process all the directives in the Makefile
+ checkChildren(makefile);
+ }
+
+ private void checkChildren(IParent parent) {
+ IDirective[] directives = parent.getDirectives();
+ for (int i = 0; i < directives.length; i++) {
+ IDirective directive = directives[i];
+ if (directive instanceof IParent) {
+ checkChildren((IParent)directive);
+ } else if (directive instanceof BadDirective) {
+
+ int lineNumber = directive.getStartLine();
+
+ Map<String, Object> map = new HashMap<String, Object>();
+ MarkerUtilities.setLineNumber(map, lineNumber);
+ // FIXME: message
+ MarkerUtilities.setMessage(map, "Bad Directive");
+ map.put(IMarker.MESSAGE, "Bad Directive");
+ map.put(IMarker.LOCATION, Integer.valueOf(lineNumber));
+
+ Integer charStart = getCharOffset(lineNumber - 1, 0);
+ if (charStart != null) {
+ map.put(IMarker.CHAR_START, charStart);
+ }
+ // FIXME: probably a better way to do this
+ // This is the end character
+ Integer charEnd = new Integer(getCharOffset(directive.getEndLine(), 0).intValue() - 1);
+ if (charEnd != null) {
+ map.put(IMarker.CHAR_END, charEnd);
+ }
+
+ // FIXME: add severity level
+ map.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
+
+ try {
+ IMarker marker = createMarker(map, AUTOMAKE_ERROR_MARKER_ID); // ICModelMarker.C_MODEL_PROBLEM_MARKER);
+
+ MarkerAnnotation annotation = new MarkerAnnotation(marker);
+ Position p = new Position(charStart.intValue(),charEnd.intValue() - charStart.intValue());
+ fAnnotationModel.addAnnotation(annotation, p);
+ } catch (CoreException ce) {
+ // do nothing
+ }
+ }
+ }
+ return;
+ }
+
+ public void removeExistingMarkers()
+ {
+ fAnnotationModel.removeAllAnnotations();
+ }
+
+
+ private Integer getCharOffset(int lineNumber, int columnNumber)
+ {
+ try
+ {
+ return new Integer(document.getLineOffset(lineNumber) + columnNumber);
+ }
+ catch (BadLocationException e)
+ {
+ e.printStackTrace();
+ return null;
+ }
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeIfElse.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeIfElse.java
new file mode 100644
index 0000000000..a0b7abee1d
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeIfElse.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 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
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+
+
+public class AutomakeIfElse extends Parent {
+ String condition;
+ int startLine;
+ int endLine;
+ String type;
+ public AutomakeIfElse(Directive parent, String type, String condition) {
+ super(parent);
+ this.type = type;
+ this.condition = condition;
+ }
+ public String getCondition() {
+ return condition;
+ }
+ public void setCondition(String condition) {
+ this.condition = condition;
+ }
+ public void setLines(int startLine, int endLine) {
+ this.startLine = startLine;
+ this.endLine = endLine;
+ }
+ public String getType() {
+ return type;
+ }
+ public void setType(String type) {
+ this.type = type;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeMacroDefinitionRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeMacroDefinitionRule.java
new file mode 100644
index 0000000000..e4ef44ddc5
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeMacroDefinitionRule.java
@@ -0,0 +1,206 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - Modified from MacroDefinitionRule to support Automake files
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.jface.text.rules.ICharacterScanner;
+import org.eclipse.jface.text.rules.IPredicateRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.Token;
+
+class AutomakeMacroDefinitionRule implements IPredicateRule {
+ private static final int INIT_STATE = 0;
+ private static final int VAR_STATE = 1;
+ private static final int END_VAR_STATE = 2;
+ private static final int EQUAL_STATE = 3;
+ private static final int FINISH_STATE = 4;
+ private static final int ERROR_STATE = 5;
+
+ private IToken token;
+ private StringBuffer buffer = new StringBuffer();
+ protected IToken defaultToken;
+
+ public AutomakeMacroDefinitionRule(IToken token, IToken defaultToken) {
+ this.token = token;
+ this.defaultToken = defaultToken;
+ }
+
+ public IToken getSuccessToken() {
+ return token;
+ }
+
+ public IToken evaluate(ICharacterScanner scanner, boolean resume) {
+ buffer.setLength(0);
+ int c;
+ int state = INIT_STATE;
+
+ if (resume)
+ scanToBeginOfLine(scanner);
+
+ for (c = scanner.read(); c != ICharacterScanner.EOF; c = scanner.read()) {
+ switch (state) {
+ case INIT_STATE :
+ if (c != '\n' && Character.isWhitespace((char) c)) {
+ break;
+ }
+ if (isValidCharacter(c)) {
+ state = VAR_STATE;
+ } else {
+ state = ERROR_STATE;
+ }
+ break;
+ case VAR_STATE :
+ if (isValidCharacter(c)) {
+ break;
+ }
+ case END_VAR_STATE :
+ if (Character.isWhitespace((char) c)) {
+ state = END_VAR_STATE;
+ } else if (c == ':' || c == '+') {
+ state = EQUAL_STATE;
+ } else if (c == '=') {
+ state = FINISH_STATE;
+ } else {
+// if (state == END_VAR_STATE) {
+// scanner.unread(); // Return back to the space
+// }
+ state = ERROR_STATE;
+ }
+ break;
+ case EQUAL_STATE :
+ if (c == '=') {
+ state = FINISH_STATE;
+ } else {
+ state = ERROR_STATE;
+ }
+ break;
+ case FINISH_STATE :
+ break;
+ default :
+ break;
+ }
+ if (state >= FINISH_STATE) {
+ break;
+ }
+ buffer.append((char) c);
+ }
+
+ if (state == FINISH_STATE) {
+ scanToEndOfLine(scanner);
+ return token;
+ }
+
+ boolean debug = true;
+ if (debug) {
+// System.out.println("This should be a 'c': " + peek(scanner));
+// System.out.println("This is what's in the **REST OF** the buffer:");
+// int count = 0;
+// for (int c = scanner.read(); c != ICharacterScanner.EOF; c = scanner.read()) {
+// System.out.println((char) c);
+// count++;
+// }
+// // Unread what we just displayed
+// for (int i = 0; i < count; i++) {
+// scanner.unread();
+// }
+ }
+
+ if (defaultToken.isUndefined()) {
+ // If c is EOF, we've read it and broken out of the for loop above,
+ // but we need to unread it since it got read but not put into the
+ // buffer
+ if (state == ERROR_STATE || c == ICharacterScanner.EOF)
+ scanner.unread();
+ unreadBuffer(scanner);
+ debug = true;
+ if (debug) {
+// System.out.println("This should be an 'i': " + peek(scanner));
+// System.out.println("We've supposedly just unread the entire buffer. Here it is:");
+// int count = 0;
+// for (int c = scanner.read(); c != ICharacterScanner.EOF; c = scanner.read()) {
+// System.out.println((char) c);
+// count++;
+// }
+// // Unread what we just displayed
+// for (int i = 0; i < count + 1; i++) {
+// scanner.unread();
+// }
+// System.out.println("... just to be safe, here's the first character: " + peek(scanner));
+ }
+
+ }
+
+ return Token.UNDEFINED;
+ }
+
+ public char peek(ICharacterScanner scanner) {
+ char c = (char) scanner.read();
+ scanner.unread();
+ return c;
+ }
+
+ public IToken evaluate(ICharacterScanner scanner) {
+ return evaluate(scanner, false);
+ }
+
+ /**
+ * Returns the characters in the buffer to the scanner.
+ *
+ * @param scanner the scanner to be used
+ */
+ protected void unreadBuffer(ICharacterScanner scanner) {
+ for (int i = buffer.length() - 1; i >= 0; i--)
+ scanner.unread();
+ }
+
+ private void scanToEndOfLine(ICharacterScanner scanner) {
+ int c;
+ char[][] delimiters = scanner.getLegalLineDelimiters();
+ while ((c = scanner.read()) != ICharacterScanner.EOF) {
+ // Check for end of line since it can be used to terminate the pattern.
+ for (int i = 0; i < delimiters.length; i++) {
+ if (c == delimiters[i][0] && sequenceDetected(scanner, delimiters[i])) {
+ return;
+ }
+ }
+ }
+ }
+
+ private void scanToBeginOfLine(ICharacterScanner scanner) {
+ while(scanner.getColumn() != 0) {
+ scanner.unread();
+ }
+ }
+
+ private boolean sequenceDetected(ICharacterScanner scanner, char[] sequence) {
+ for (int i = 1; i < sequence.length; i++) {
+ int c = scanner.read();
+ if (c == ICharacterScanner.EOF) {
+ return true;
+ } else if (c != sequence[i]) {
+ // Non-matching character detected, rewind the scanner back to the start.
+ for (; i > 0; i--) {
+ scanner.unread();
+ }
+ return false;
+ }
+ }
+
+ return true;
+ }
+ protected boolean isValidCharacter(int c) {
+ char c0 = (char) c;
+ return Character.isLetterOrDigit(c0) || (c0 == '_') || (c0 == '-') ||
+ (c0 == '@') || (c0 == '+') || (c0 == '$') || (c0 == '(') || (c0 == ')');
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeMacroReferenceRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeMacroReferenceRule.java
new file mode 100644
index 0000000000..678f506224
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeMacroReferenceRule.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2006, Red Hat, Inc.
+ * Based on MacroReferenceRule which has the following copyright notice
+ *
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.jface.text.rules.ICharacterScanner;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.PatternRule;
+
+public class AutomakeMacroReferenceRule extends PatternRule {
+
+ int nOfBrackets;
+ int fBracket;
+
+// public MacroReferenceRule(IToken token) {
+// super("$(", ")", token, (char) 0, true); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+
+ public AutomakeMacroReferenceRule(IToken token, String startSeq, String endSeq) {
+ super(startSeq, endSeq, token, (char)0, true);
+ if (endSeq.length() > 0 && endSeq.charAt(0) == '}') {
+ fBracket = '{';
+ } else {
+ fBracket = '(';
+ }
+ }
+
+ protected IToken doEvaluate(ICharacterScanner scanner, boolean resume) {
+ nOfBrackets = 1;
+ return super.doEvaluate(scanner, resume);
+ }
+
+ protected boolean endSequenceDetected(ICharacterScanner scanner) {
+ int c;
+ char[][] delimiters = scanner.getLegalLineDelimiters();
+ while ((c = scanner.read()) != ICharacterScanner.EOF) {
+ if (fBracket == c) {
+ ++nOfBrackets;
+ }
+ if (fEndSequence.length > 0 && c == fEndSequence[0]) {
+ // Check if the specified end sequence has been found.
+ if (sequenceDetected(scanner, fEndSequence, true)) {
+ if (0 == --nOfBrackets) {
+ return true;
+ }
+ }
+ } else if (fBreaksOnEOL) {
+ // Check for end of line since it can be used to terminate the pattern.
+ for (int i = 0; i < delimiters.length; i++) {
+ if (c == delimiters[i][0] && sequenceDetected(scanner, delimiters[i], false)) {
+ return true;
+ }
+ }
+ }
+ }
+ scanner.unread();
+ return false;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeTextHover.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeTextHover.java
new file mode 100644
index 0000000000..1a0db5c763
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeTextHover.java
@@ -0,0 +1,185 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IInformationControlCreator;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextHover;
+import org.eclipse.jface.text.ITextHoverExtension;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Region;
+import org.eclipse.swt.graphics.Point;
+
+
+public class AutomakeTextHover implements ITextHover, ITextHoverExtension {
+
+ AutomakeEditor editor;
+
+ public AutomakeTextHover(AutomakeEditor editor) {
+ this.editor = editor;
+ }
+
+ public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
+ TargetRule target = null;
+ String[] preReqs = null;
+
+ if (hoverRegion == null || hoverRegion.getLength() == 0)
+ return null;
+ Automakefile makefile = (Automakefile) editor.getMakefile();
+ if (makefile == null)
+ return null;
+
+ String hoverText;
+ int hoverLine;
+ try {
+ hoverText = textViewer.getDocument().get(hoverRegion.getOffset(), hoverRegion.getLength());
+ hoverLine = textViewer.getDocument().getLineOfOffset(hoverRegion.getOffset());
+ } catch (BadLocationException e) {
+ return null;
+ }
+
+ // Automatic variables
+ if (hoverText.startsWith("$")) {
+ IDirective containingDirective = makefile.getDirectiveContainingLine(hoverLine);
+ if (containingDirective instanceof TargetRule) {
+ target = (TargetRule) containingDirective;
+ }
+ if (target == null)
+ return "";
+ switch (hoverText.charAt(1)) {
+ case '@':
+ return target.getTarget().toString();
+ case '<':
+ preReqs = target.getPrerequisites();
+ if (preReqs != null && preReqs.length > 0)
+ return preReqs[0];
+ break;
+ // FIXME: implement $* ?
+// case '*':
+// break;
+ case '?':
+ preReqs = target.getPrerequisites();
+ if (preReqs != null && preReqs.length > 0) {
+ String toReturn = "";
+ toReturn = preReqs[0];
+ for (int i = 1; i < preReqs.length; i++) {
+ toReturn += " " + preReqs[i];
+ }
+ return toReturn;
+ }
+ break;
+ case '%':
+// if (target instanceOf ArchiveTarget) {
+// return target.getMember();
+// } else {
+// error;
+// }
+// break;
+ default:
+ break;
+ }
+ } else {
+ // Macros
+ IMacroDefinition[] macroDefinitions = makefile.getMacroDefinitions(hoverText);
+ for (int i = 0; i < macroDefinitions.length; i++) {
+ IMacroDefinition definition = macroDefinitions[i];
+ if (definition.getName().equals(hoverText))
+ return definition.getValue().toString();
+ }
+ }
+
+// IRule[] rules = makefile.getRules();
+// for (int i = 0; i < rules.length; i++) {
+// rule = rules[i];
+// System.out.println("rule: " + rule);
+// System.out.println("target: " + rule.getTarget());
+// ICommand[] commands = rule.getCommands();
+// for (int j = 0; j < commands.length; j++) {
+// ICommand command = commands[j];
+// System.out.println("command: " + command);
+// }
+// }
+ return "";
+ }
+
+ public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
+
+ if (textViewer != null) {
+ /*
+ * If the hover offset falls within the selection range return the
+ * region for the whole selection.
+ */
+ Point selectedRange = textViewer.getSelectedRange();
+ if (selectedRange.x >= 0 && selectedRange.y > 0
+ && offset >= selectedRange.x
+ && offset <= selectedRange.x + selectedRange.y)
+ return new Region(selectedRange.x, selectedRange.y);
+ else {
+ return findWord(textViewer.getDocument(), offset);
+ }
+ }
+ return null;
+ }
+
+ private IRegion findWord(IDocument document, int offset) {
+ int start = -1;
+ int end = -1;
+
+ try {
+ int pos = offset;
+ char c;
+
+ while (pos >= 0) {
+ c = document.getChar(pos);
+ if (!Character.isJavaIdentifierPart(c) &&
+ (c != '@') && (c != '<') && (c != '*') && (c != '?') && (c != '%'))
+ break;
+ --pos;
+ }
+
+ start = pos;
+
+ pos = offset;
+ int length = document.getLength();
+
+ while (pos < length) {
+ c = document.getChar(pos);
+ if (!Character.isJavaIdentifierPart(c) &&
+ (c != '@') && (c != '<') && (c != '*') && (c != '?') && (c != '%'))
+ break;
+ ++pos;
+ }
+
+ end = pos;
+
+ } catch (BadLocationException x) {
+ }
+
+ if (start > -1 && end > -1) {
+ if (start == offset && end == offset)
+ return new Region(offset, 0);
+ else if (start == offset)
+ return new Region(start, end - start);
+ else
+ return new Region(start + 1, end - start - 1);
+ }
+
+ return null;
+ }
+
+ public IInformationControlCreator getHoverControlCreator() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeWordDetector.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeWordDetector.java
new file mode 100644
index 0000000000..941e7d4b1c
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakeWordDetector.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.jface.text.rules.IWordDetector;
+
+public class AutomakeWordDetector implements IWordDetector {
+
+ private static final String correctStartSpecChars = "$%*().><"; //$NON-NLS-1$
+ private static final String correctSpecChars = "?@$/\\<*%"; //$NON-NLS-1$
+
+ public boolean isWordStart(char character) {
+ return Character.isLetterOrDigit(character) || (correctStartSpecChars.indexOf(character) >= 0);
+ }
+
+ public boolean isWordPart(char character) {
+ return Character.isLetterOrDigit(character) || (correctSpecChars.indexOf(character) >= 0);
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Automakefile.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Automakefile.java
new file mode 100644
index 0000000000..61cc45dd58
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Automakefile.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - Modified from PosixMakeFile to support Automake files
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.io.IOException;
+
+public class Automakefile extends GNUAutomakefile {
+
+ public Automakefile() {
+ super();
+ }
+
+ protected IDirective getDirectiveContainingLine(int line) {
+ int startLine, endLine;
+ IDirective[] directives = this.getDirectives();
+ for (int i = 0; i < directives.length; i++) {
+ IDirective directive = directives[i];
+ startLine = directive.getStartLine();
+ endLine = directive.getEndLine();
+ if (startLine <= line && endLine >= line)
+ return directive;
+ }
+ return null;
+ }
+
+ public static void main(String[] args) {
+ try {
+ String filename = "Makefile.am"; //$NON-NLS-1$
+ if (args.length == 1) {
+ filename = args[0];
+ }
+ Automakefile makefile = new Automakefile();
+ makefile.parse(filename);
+ IDirective[] directives = makefile.getDirectives();
+ //IDirective[] directives = makefile.getBuiltins();
+ for (int i = 0; i < directives.length; i++) {
+ //System.out.println("Rule[" + i +"]");
+ System.out.print(directives[i]);
+ }
+ } catch (IOException e) {
+ System.out.println(e);
+ }
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileCodeScanner.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileCodeScanner.java
new file mode 100644
index 0000000000..7bd336b3be
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileCodeScanner.java
@@ -0,0 +1,150 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - Modified from MakefileCodeScanner to support Automake files
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.text.rules.EndOfLineRule;
+import org.eclipse.jface.text.rules.IPredicateRule;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.IWhitespaceDetector;
+import org.eclipse.jface.text.rules.MultiLineRule;
+import org.eclipse.jface.text.rules.SingleLineRule;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.jface.text.rules.WhitespaceRule;
+import org.eclipse.jface.text.rules.WordRule;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.AutoconfIdentifierRule;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.AutoconfWhitespaceDetector;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.ColorManager;
+
+
+public class AutomakefileCodeScanner extends AbstractMakefileCodeScanner {
+
+
+ private final static String[] keywords = { "define", "endef", "ifdef", "ifndef", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "ifeq", "ifneq", "else", "endif", "include", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ "-include", "sinclude", "override", "endef", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "export", "unexport", "vpath", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ "if", "@if", "@endif" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+ private final static String[] functions = { "subst", "patsubst", "strip", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ "findstring", "filter", "sort", "dir", "notdir", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ "suffix", "basename", "addsuffix", "addprefix", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "join", "word", "words", "wordlist", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "firstword", "wildcard", "error", "warning", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "shell", "origin", "foreach", "call" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ };
+
+ private final static String[] automaticVariables = { "$<" , "$*" , "$@" , "$?" , "$%"
+ };
+
+ public static final String[] fTokenProperties = new String[] {
+ ColorManager.MAKE_COMMENT_COLOR,
+ ColorManager.MAKE_KEYWORD_COLOR,
+ ColorManager.MAKE_FUNCTION_COLOR,
+ ColorManager.MAKE_MACRO_REF_COLOR,
+ ColorManager.MAKE_MACRO_DEF_COLOR,
+ ColorManager.MAKE_DEFAULT_COLOR
+ };
+
+ /**
+ * Constructor for AutomakefileCodeScanner
+ */
+ public AutomakefileCodeScanner() {
+ super();
+ initialize();
+ }
+
+ protected List<IRule> createRules() {
+ IToken keyword = getToken(ColorManager.MAKE_KEYWORD_COLOR);
+ IToken function = getToken(ColorManager.MAKE_FUNCTION_COLOR);
+ IToken comment = getToken(ColorManager.MAKE_COMMENT_COLOR);
+ IToken macroRef = getToken(ColorManager.MAKE_MACRO_REF_COLOR);
+ IToken macroDef = getToken(ColorManager.MAKE_MACRO_DEF_COLOR);
+ IToken other = getToken(ColorManager.MAKE_DEFAULT_COLOR);
+
+ List<IRule> rules = new ArrayList<IRule>();
+
+ // Add rule for single line comments.
+ rules.add(new EndOfLineRule("#", comment, '\\', true)); //$NON-NLS-1$
+
+ // Add generic whitespace rule.
+ rules.add(new WhitespaceRule(new IWhitespaceDetector() {
+ public boolean isWhitespace(char character) {
+ return Character.isWhitespace(character);
+ }
+ }));
+
+ // Put before the the word rules
+ MultiLineRule defineRule = new MultiLineRule("define", "endef", macroDef); //$NON-NLS-1$ //$NON-NLS-2$
+ defineRule.setColumnConstraint(0);
+ rules.add(defineRule);
+
+ rules.add(new AutomakeMacroDefinitionRule(macroDef, Token.UNDEFINED));
+
+ // @AC_SUBST_VAR@
+ IPredicateRule substVarRule = new AutoconfSubstRule(macroRef);
+ rules.add(substVarRule);
+
+ // Add word rule for keywords, types, and constants.
+ // We restring the detection of the keywords to be the first column to be valid.
+ WordRule keyWordRule = new WordRule(new MakefileWordDetector(), Token.UNDEFINED);
+ for (int i = 0; i < keywords.length; i++) {
+ keyWordRule.addWord(keywords[i], keyword);
+ }
+ keyWordRule.setColumnConstraint(0);
+ rules.add(keyWordRule);
+
+
+ WordRule functionRule = new WordRule(new MakefileWordDetector(), Token.UNDEFINED);
+ for (int i = 0; i < functions.length; i++)
+ functionRule.addWord(functions[i], function);
+ rules.add(functionRule);
+
+ WordRule automaticVarRule = new WordRule(new AutomakeWordDetector(), Token.UNDEFINED);
+ for (int i = 0; i < automaticVariables.length; i++)
+ automaticVarRule.addWord(automaticVariables[i], keyword);
+ rules.add(automaticVarRule);
+
+// rules.add(new SingleLineRule("$(", ")", macroRef)); //$NON-NLS-1$ //$NON-NLS-2$
+// rules.add(new SingleLineRule("${", "}", macroRef)); //$NON-NLS-1$ //$NON-NLS-2$
+ rules.add(new AutomakeMacroReferenceRule(macroRef, "$(", ")")); //$NON-NLS-1$ //$NON-NLS-2$
+ rules.add(new AutomakeMacroReferenceRule(macroRef, "${", "}")); //$NON-NLS-1$ //$NON-NLS-2$
+ // Add word rule for identifier.
+
+ rules.add(new AutoconfIdentifierRule(other));
+
+ // Make sure we don't treat "\#" as comment start.
+ rules.add(new SingleLineRule("\\#", null, Token.UNDEFINED));
+
+ rules.add(new WhitespaceRule(new AutoconfWhitespaceDetector()));
+
+ setDefaultReturnToken(other);
+
+ return rules;
+ }
+
+ public IToken nextToken() {
+ return super.nextToken();
+ }
+
+ /*
+ * @see AbstractMakefileCodeScanner#getTokenProperties()
+ */
+ protected String[] getTokenProperties() {
+ return fTokenProperties;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileContentOutlinePage.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileContentOutlinePage.java
new file mode 100644
index 0000000000..7d9b92db29
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileContentOutlinePage.java
@@ -0,0 +1,307 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - Modified from MakefileContentOutlinePage for Automake files
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.MakeUIImages;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
+
+
+public class AutomakefileContentOutlinePage extends ContentOutlinePage {
+
+ protected IMakefile makefile;
+ protected IMakefile nullMakefile = new NullMakefile();
+
+ private class AutomakefileContentProvider implements ITreeContentProvider {
+
+ protected boolean showMacroDefinition = true;
+ protected boolean showTargetRule = true;
+ protected boolean showInferenceRule = true;
+ protected boolean showIncludeChildren = false;
+
+ protected IMakefile makefile;
+ protected IMakefile nullMakefile = new NullMakefile();
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+ */
+ public Object[] getChildren(Object element) {
+ if (element == fInput) {
+ return getElements(makefile);
+ } else if (element instanceof IDirective) {
+ return getElements(element);
+ }
+ return new Object[0];
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+ */
+ public Object getParent(Object element) {
+ if (element instanceof IMakefile) {
+ return fInput;
+ } else if (element instanceof IDirective) {
+ return ((IDirective)element).getParent();
+ }
+ return fInput;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+ */
+ public boolean hasChildren(Object element) {
+ if (element == fInput) {
+ return true;
+ } else if (element instanceof IParent) {
+ // Do not drill down in includes.
+ if (element instanceof IInclude && !showIncludeChildren) {
+ return false;
+ }
+ return true;
+ }
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+ */
+ public Object[] getElements(Object inputElement) {
+ IDirective[] directives;
+ if (inputElement == fInput) {
+ directives = makefile.getDirectives();
+ } else if (inputElement instanceof IRule) {
+ directives = ((IRule)inputElement).getCommands();
+ } else if (inputElement instanceof IParent) {
+ if (inputElement instanceof IInclude && !showIncludeChildren) {
+ directives = new IDirective[0];
+ } else {
+ directives = ((IParent)inputElement).getDirectives();
+ }
+ } else {
+ directives = new IDirective[0];
+ }
+ List<IDirective> list = new ArrayList<IDirective>(directives.length);
+ for (int i = 0; i < directives.length; i++) {
+ if (showMacroDefinition && directives[i] instanceof IMacroDefinition) {
+ list.add(directives[i]);
+ } else if (showInferenceRule && directives[i] instanceof IInferenceRule) {
+ list.add(directives[i]);
+ } else if (showTargetRule && directives[i] instanceof ITargetRule) {
+ list.add(directives[i]);
+ } else if (showTargetRule && directives[i] instanceof AutomakeIfElse) {
+ list.add(directives[i]);
+ } else {
+ boolean irrelevant = (directives[i] instanceof IComment ||
+ directives[i] instanceof IEmptyLine ||
+ directives[i] instanceof ITerminal);
+ if (!irrelevant) {
+ list.add(directives[i]);
+ }
+ }
+ }
+ return list.toArray();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ public void dispose() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ if (oldInput != null) {
+ makefile = nullMakefile;
+ }
+
+ if (newInput != null) {
+ IWorkingCopyManager manager= AutomakeEditorFactory.getDefault().getWorkingCopyManager();
+ makefile = manager.getWorkingCopy((IEditorInput) newInput);
+ if (makefile == null) {
+ makefile = nullMakefile;
+ }
+ }
+ }
+ }
+
+ private class AutomakefileLabelProvider extends LabelProvider implements ILabelProvider {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
+ */
+ public Image getImage(Object element) {
+ if (element instanceof ITargetRule) {
+ return MakeUIImages.getImage(MakeUIImages.IMG_OBJS_MAKEFILE_TARGET_RULE);
+ } else if (element instanceof IInferenceRule) {
+ return MakeUIImages.getImage(MakeUIImages.IMG_OBJS_MAKEFILE_INFERENCE_RULE);
+ } else if (element instanceof IMacroDefinition) {
+ return MakeUIImages.getImage(MakeUIImages.IMG_OBJS_MAKEFILE_MACRO);
+ } else if (element instanceof IAutomakeConditional) {
+ // Must process this before ICommand because if/else are also ICommands
+ return super.getImage(element);
+ } else if (element instanceof ICommand) {
+ return MakeUIImages.getImage(MakeUIImages.IMG_OBJS_MAKEFILE_COMMAND);
+ } else if (element instanceof IInclude) {
+ return MakeUIImages.getImage(MakeUIImages.IMG_OBJS_MAKEFILE_INCLUDE);
+ } else if (element instanceof IBadDirective) {
+ return MakeUIImages.getImage(MakeUIImages.IMG_OBJS_ERROR);
+ } else if (element instanceof AutomakeConfigMacro) {
+ return MakeUIImages.getImage(MakeUIImages.IMG_OBJS_MAKEFILE_ACMACRO);
+ }
+
+ return super.getImage(element);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
+ */
+ public String getText(Object element) {
+ String name;
+ if (element instanceof IRule) {
+ name = ((IRule) element).getTarget().toString().trim();
+ } else if (element instanceof IMacroDefinition) {
+ name = ((IMacroDefinition) element).getName().trim();
+ } else if (element instanceof AutomakeIfElse) {
+ AutomakeIfElse ifelse = (AutomakeIfElse) element;
+ // FIXME: make this not a string comparison
+ if (ifelse.getType().equals("if")) {
+ name = "if " + ifelse.getCondition();
+ } else
+ name = "else";
+ } else if (element instanceof AutomakeConfigMacro) {
+ AutomakeConfigMacro macro = (AutomakeConfigMacro)element;
+ name = macro.getName();
+ } else {
+ name = super.getText(element);
+ }
+ if (name != null) {
+ name = name.trim();
+ if (name.length() > 25) {
+ name = name.substring(0, 25) + " ..."; //$NON-NLS-1$
+ }
+ }
+ return name;
+ }
+
+ }
+
+ protected AutomakeEditor fEditor;
+ protected Object fInput;
+
+ public AutomakefileContentOutlinePage(AutomakeEditor editor) {
+ super();
+ fEditor = editor;
+ }
+
+ /**
+ * Sets the input of the outline page
+ */
+ public void setInput(Object input) {
+ fInput = input;
+ update();
+ }
+
+ /**
+ * Updates the outline page.
+ */
+ public void update() {
+ final TreeViewer viewer = getTreeViewer();
+
+ if (viewer != null) {
+ final Control control = viewer.getControl();
+ if (control != null && !control.isDisposed()) {
+ control.getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ if (!control.isDisposed()) {
+ control.setRedraw(false);
+ viewer.setInput(fInput);
+ viewer.expandAll();
+ control.setRedraw(true);
+ }
+ }
+ });
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.part.IPage#createControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ TreeViewer viewer = getTreeViewer();
+ viewer.setContentProvider(new AutomakefileContentProvider());
+ viewer.setLabelProvider(new AutomakefileLabelProvider());
+ if (fInput != null) {
+ viewer.setInput(fInput);
+ }
+
+// MenuManager manager= new MenuManager("#MakefileOutlinerContext"); //$NON-NLS-1$
+// manager.setRemoveAllWhenShown(true);
+// manager.addMenuListener(new IMenuListener() {
+// public void menuAboutToShow(IMenuManager m) {
+// contextMenuAboutToShow(m);
+// }
+// });
+// Control tree = viewer.getControl();
+// Menu menu = manager.createContextMenu(tree);
+// tree.setMenu(menu);
+//
+// viewer.addDoubleClickListener(new IDoubleClickListener() {
+// /* (non-Javadoc)
+// * @see org.eclipse.jface.viewers.IDoubleClickListener#doubleClick(org.eclipse.jface.viewers.DoubleClickEvent)
+// */
+// public void doubleClick(DoubleClickEvent event) {
+// if (fOpenIncludeAction != null) {
+// fOpenIncludeAction.run();
+// }
+// }
+// });
+//
+// IPageSite site= getSite();
+// site.registerContextMenu(MakeUIPlugin.getPluginId() + ".outline", manager, viewer); //$NON-NLS-1$
+// site.setSelectionProvider(viewer);
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ if (oldInput != null) {
+ makefile = nullMakefile;
+ }
+
+ if (newInput != null) {
+ IWorkingCopyManager manager= AutomakeEditorFactory.getDefault().getWorkingCopyManager();
+ makefile = manager.getWorkingCopy((IEditorInput)newInput);
+ if (makefile == null) {
+ makefile = nullMakefile;
+ }
+ }
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileReconcilingStrategy.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileReconcilingStrategy.java
new file mode 100644
index 0000000000..f538a167ce
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileReconcilingStrategy.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - Modified from MakefileReconcilingStrategy for Automake files
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.io.IOException;
+import java.io.StringReader;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.reconciler.DirtyRegion;
+import org.eclipse.jface.text.reconciler.IReconcilingStrategy;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+
+public class AutomakefileReconcilingStrategy implements IReconcilingStrategy {
+
+ private int fLastRegionOffset;
+ private ITextEditor fEditor;
+ private IWorkingCopyManager fManager;
+ private IDocumentProvider fDocumentProvider;
+ private AutomakefileContentOutlinePage fOutliner;
+ private IReconcilingParticipant fMakefileReconcilingParticipant;
+ private AutomakeErrorHandler fErrorHandler;
+ private IEditorInput input;
+
+ public AutomakefileReconcilingStrategy(AutomakeEditor editor) {
+ fOutliner= editor.getAutomakeOutlinePage();
+ fLastRegionOffset = Integer.MAX_VALUE;
+ fEditor= editor;
+ input = (IEditorInput) fEditor.getEditorInput();
+ fManager= AutomakeEditorFactory.getDefault().getWorkingCopyManager();
+ fDocumentProvider= AutomakeEditorFactory.getDefault().getAutomakefileDocumentProvider();
+ fErrorHandler= new AutomakeErrorHandler(fDocumentProvider.getDocument(input));
+ if (fEditor instanceof IReconcilingParticipant) {
+ fMakefileReconcilingParticipant= (IReconcilingParticipant)fEditor;
+ }
+ }
+
+ /**
+ * @see IReconcilingStrategy#reconcile(document)
+ */
+ public void setDocument(IDocument document) {
+ }
+
+
+ /**
+ * @see IReconcilingStrategy#reconcile(region)
+ */
+ public void reconcile(IRegion region) {
+ // We use a trick to avoid running the reconciler multiple times
+ // on a file when it gets changed. This is because this gets called
+ // multiple times with different regions of the file, we do a
+ // complete parse on the first region.
+ if(region.getOffset() <= fLastRegionOffset) {
+ reconcile();
+ }
+ fLastRegionOffset = region.getOffset();
+ }
+
+ /**
+ * @see IReconcilingStrategy#reconcile(dirtyRegion, region)
+ */
+ public void reconcile(DirtyRegion dirtyRegion, IRegion region) {
+ // FIXME: This seems to generate too much flashing in
+ // the contentoutline viewer.
+ //reconcile();
+ }
+
+ private void reconcile() {
+ try {
+ IMakefile makefile = fManager.getWorkingCopy(fEditor.getEditorInput());
+ if (makefile != null) {
+ String content = fDocumentProvider.getDocument(input).get();
+ StringReader reader = new StringReader(content);
+ try {
+ makefile.parse(makefile.getFileURI(), reader);
+ } catch (IOException e) {
+ }
+
+ fOutliner.update();
+ fErrorHandler.update(makefile);
+ }
+ } finally {
+ try {
+ if (fMakefileReconcilingParticipant != null) {
+ fMakefileReconcilingParticipant.reconciled();
+ }
+ } finally {
+ //
+ }
+ }
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileSourceConfiguration.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileSourceConfiguration.java
new file mode 100644
index 0000000000..acffc5eb05
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileSourceConfiguration.java
@@ -0,0 +1,148 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - Modified from MakefileSourceConfiguration to support Automake
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextHover;
+import org.eclipse.jface.text.contentassist.ContentAssistant;
+import org.eclipse.jface.text.contentassist.IContentAssistant;
+import org.eclipse.jface.text.presentation.IPresentationReconciler;
+import org.eclipse.jface.text.presentation.PresentationReconciler;
+import org.eclipse.jface.text.reconciler.IReconciler;
+import org.eclipse.jface.text.reconciler.MonoReconciler;
+import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.SourceViewerConfiguration;
+import org.eclipse.jface.util.PropertyChangeEvent;
+
+
+public class AutomakefileSourceConfiguration extends
+ MakefileSourceConfiguration {
+
+ AutomakeEditor editor;
+ AutomakefileCodeScanner codeScanner;
+ AutomakeTextHover amHover;
+
+ /**
+ * Constructor for MakeConfiguration
+ */
+ public AutomakefileSourceConfiguration(IPreferenceStore preferenceStore) {
+ super(preferenceStore, null);
+ }
+
+ public AutomakefileSourceConfiguration(IPreferenceStore preferenceStore, AutomakeEditor editor) {
+ super(preferenceStore, editor);
+ this.editor = editor;
+ }
+
+ public AutomakefileCodeScanner getAutomakeCodeScanner() {
+ if (null == codeScanner)
+ codeScanner = new AutomakefileCodeScanner();
+ return codeScanner;
+
+ }
+
+ public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType) {
+ if (amHover == null)
+ amHover = new AutomakeTextHover(editor);
+ return amHover;
+ }
+
+ /**
+ * @param event
+ */
+ public void adaptToPreferenceChange(PropertyChangeEvent event) {
+ AutomakefileCodeScanner scanner = getAutomakeCodeScanner();
+ scanner.adaptToPreferenceChange(event);
+ }
+
+ /**
+ * @param event
+ * @return
+ */
+ public boolean affectsBehavior(PropertyChangeEvent event) {
+ AutomakefileCodeScanner scanner = getAutomakeCodeScanner();
+ return scanner.affectsBehavior(event);
+ }
+
+ public IPresentationReconciler getPresentationReconciler(ISourceViewer v) {
+
+ PresentationReconciler reconciler = new PresentationReconciler();
+
+ DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getAutomakeCodeScanner());
+ reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
+ reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
+
+ dr = new DefaultDamagerRepairer(getAutomakeCodeScanner());
+ reconciler.setDamager(dr, MakefilePartitionScanner.MAKEFILE_COMMENT_PARTITION);
+ reconciler.setRepairer(dr, MakefilePartitionScanner.MAKEFILE_COMMENT_PARTITION);
+
+ dr = new DefaultDamagerRepairer(getAutomakeCodeScanner());
+ reconciler.setDamager(dr, MakefilePartitionScanner.MAKEFILE_MACRO_ASSIGNEMENT_PARTITION);
+ reconciler.setRepairer(dr, MakefilePartitionScanner.MAKEFILE_MACRO_ASSIGNEMENT_PARTITION);
+
+ dr = new DefaultDamagerRepairer(getAutomakeCodeScanner());
+ reconciler.setDamager(dr, MakefilePartitionScanner.MAKEFILE_INCLUDE_BLOCK_PARTITION);
+ reconciler.setRepairer(dr, MakefilePartitionScanner.MAKEFILE_INCLUDE_BLOCK_PARTITION);
+
+ dr = new DefaultDamagerRepairer(getAutomakeCodeScanner());
+ reconciler.setDamager(dr, MakefilePartitionScanner.MAKEFILE_IF_BLOCK_PARTITION);
+ reconciler.setRepairer(dr, MakefilePartitionScanner.MAKEFILE_IF_BLOCK_PARTITION);
+
+ dr = new DefaultDamagerRepairer(getAutomakeCodeScanner());
+ reconciler.setDamager(dr, MakefilePartitionScanner.MAKEFILE_DEF_BLOCK_PARTITION);
+ reconciler.setRepairer(dr, MakefilePartitionScanner.MAKEFILE_DEF_BLOCK_PARTITION);
+
+ dr = new DefaultDamagerRepairer(getAutomakeCodeScanner());
+ reconciler.setDamager(dr, MakefilePartitionScanner.MAKEFILE_OTHER_PARTITION);
+ reconciler.setRepairer(dr, MakefilePartitionScanner.MAKEFILE_OTHER_PARTITION);
+ return reconciler;
+ }
+
+
+ /**
+ * @see SourceViewerConfiguration#getReconciler(ISourceViewer)
+ */
+ public IReconciler getReconciler(ISourceViewer sourceViewer) {
+ if (editor != null && editor.isEditable()) {
+ MonoReconciler reconciler= new MonoReconciler(new AutomakefileReconcilingStrategy(editor), false);
+ reconciler.setDelay(1000);
+ reconciler.setProgressMonitor(new NullProgressMonitor());
+ return reconciler;
+ }
+ return null;
+ }
+
+ /**
+ * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getContentAssistant(ISourceViewer)
+ */
+ public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
+ ContentAssistant assistant = new ContentAssistant();
+ assistant.setContentAssistProcessor(new AutomakeCompletionProcessor(editor), IDocument.DEFAULT_CONTENT_TYPE);
+ assistant.setContentAssistProcessor(new AutomakeCompletionProcessor(editor), MakefilePartitionScanner.MAKEFILE_COMMENT_PARTITION);
+ assistant.setContentAssistProcessor(new AutomakeCompletionProcessor(editor), MakefilePartitionScanner.MAKEFILE_DEF_BLOCK_PARTITION);
+ assistant.setContentAssistProcessor(new AutomakeCompletionProcessor(editor), MakefilePartitionScanner.MAKEFILE_IF_BLOCK_PARTITION);
+ assistant.setContentAssistProcessor(new AutomakeCompletionProcessor(editor), MakefilePartitionScanner.MAKEFILE_INCLUDE_BLOCK_PARTITION);
+ assistant.setContentAssistProcessor(new AutomakeCompletionProcessor(editor), MakefilePartitionScanner.MAKEFILE_MACRO_ASSIGNEMENT_PARTITION);
+
+ assistant.enableAutoActivation(true);
+ assistant.setAutoActivationDelay(500);
+
+ assistant.setProposalPopupOrientation(IContentAssistant.CONTEXT_INFO_BELOW);
+ assistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_BELOW);
+
+ return assistant;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileUtil.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileUtil.java
new file mode 100644
index 0000000000..1cc1f62aab
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/AutomakefileUtil.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+
+public class AutomakefileUtil {
+
+ // Look for Automake conditionals which optionally
+ // activate or disable a Makefile rule command.
+ public static boolean isAutomakeCommand(String line) {
+ return line.matches("^@[a-z_A-Z0-9]+@\\t.*$"); //$NON-NLS-1$
+ }
+
+ public static boolean isIfBlock(String line) {
+ return line.startsWith("if"); //$NON-NLS-1$
+ }
+
+ public static boolean isElseBlock(String line) {
+ return line.startsWith("else"); //$NON-NLS-1$
+ }
+
+ public static boolean isElseIfBlock(String line) {
+ return line.startsWith("else if"); //$NON-NLS-1$
+ }
+
+ public static boolean isEndifBlock(String line) {
+ return line.startsWith("endif"); //$NON-NLS-1$
+ }
+
+ public static boolean isConfigMacro(String line) {
+ return line.matches("\\s*@[a-z_A-Z0-9]+@"); //$NON-NLS-1$
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/BadDirective.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/BadDirective.java
new file mode 100644
index 0000000000..90bf4b3fb7
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/BadDirective.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+public class BadDirective extends Directive implements IBadDirective {
+
+ String line;
+
+ public BadDirective(Directive parent, String s) {
+ super(parent);
+ line = s;
+ }
+
+ public String toString() {
+ return line;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Command.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Command.java
new file mode 100644
index 0000000000..8b1815b31c
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Command.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.io.File;
+import java.io.IOException;
+
+/**
+ * Makefile : ( statement ) *
+ * statement : command | ..
+ * command : <tab> prefix_command string <nl>
+ * prefix_command : '-' | '@' | '+'
+ */
+public class Command extends Directive implements ICommand {
+
+ final public static char NL = '\n';
+
+ String command = ""; //$NON-NLS-1$
+ char prefix = '\0';
+
+ public Command(Directive parent, String cmd) {
+ super(parent);
+ parse(cmd);
+ }
+
+ /**
+ * - If the command prefix contains a hyphen, or the -i option is
+ * present, or the special target .IGNORE has either the current
+ * target as a prerequisite or has no prerequisites, any error
+ * found while executing the command will be ignored.
+ */
+ public boolean shouldIgnoreError() {
+ // Check for the prefix hyphen in the command.
+ if (getPrefix() == HYPHEN) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @ If the command prefix contains an at sign and the
+ * command-line -n option is not specified, or the -s option is
+ * present, or the special target .SILENT has either the current
+ * target as a prerequisite or has no prerequisites, the command
+ * will not be written to standard output before it is executed.
+ */
+ public boolean shouldBeSilent() {
+ // Check for the prefix at sign
+ if (getPrefix() == AT) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * + If the command prefix contains a plus sign, this indicates a
+ * command line that will be executed even if -n, -q or -t is
+ * specified.
+ */
+ public boolean shouldExecute() {
+ // Check for the prefix at sign
+ if (getPrefix() == PLUS) {
+ return true;
+ }
+ return false;
+ }
+
+ public String toString() {
+ StringBuffer cmd = new StringBuffer();
+ cmd.append( '\t');
+ if (getPrefix() != 0) {
+ cmd.append(getPrefix());
+ }
+ cmd.append(command).append('\n');
+ return cmd.toString();
+ }
+
+ public boolean equals(Command cmd) {
+ return cmd.toString().equals(toString());
+ }
+
+ char getPrefix() {
+ return prefix;
+ }
+
+ /**
+ * command : <tab> prefix_command string <nl>
+ */
+ void parse(String cmd) {
+ command = cmd.trim();
+ if (command.startsWith(HYPHEN_STRING) || command.startsWith(AT_STRING) || command.startsWith(PLUS_STRING)) {
+ prefix = command.charAt(0);
+ command = command.substring(1).trim();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.make.core.makefile.ICommand#execute(java.lang.String[], java.io.File)
+ */
+ public Process execute(String shell, String[] envp, File dir) throws IOException {
+ String[] cmdArray = new String[] { shell, "-c", command}; //$NON-NLS-1$
+ return Runtime.getRuntime().exec(cmdArray, envp, dir);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Comment.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Comment.java
new file mode 100644
index 0000000000..ddb3738fdb
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Comment.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+public class Comment extends Directive implements IComment {
+
+ String comment;
+
+ public Comment(Directive parent, String cmt) {
+ super(parent);
+ if (cmt.startsWith(POUND_STRING)) {
+ comment = cmt.substring(1);
+ } else {
+ comment = cmt;
+ }
+ }
+
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append(POUND_STRING).append(comment).append('\n');
+ return buffer.toString();
+ }
+
+ public boolean equals(Comment cmt) {
+ return cmt.toString().equals(toString());
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/CompletionProposalComparator.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/CompletionProposalComparator.java
new file mode 100644
index 0000000000..a92415dfc4
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/CompletionProposalComparator.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+
+import java.util.Comparator;
+
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+
+public class CompletionProposalComparator implements Comparator<ICompletionProposal> {
+
+ /**
+ * Constructor for CompletionProposalComparator.
+ */
+ public CompletionProposalComparator() {
+ }
+
+ /* (non-Javadoc)
+ * @see Comparator#compare(Object, Object)
+ */
+ public int compare(ICompletionProposal o1, ICompletionProposal o2) {
+ ICompletionProposal c1= (ICompletionProposal) o1;
+ ICompletionProposal c2= (ICompletionProposal) o2;
+ return c1.getDisplayString().compareToIgnoreCase(c2.getDisplayString());
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Conditional.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Conditional.java
new file mode 100644
index 0000000000..0a7e098541
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Conditional.java
@@ -0,0 +1,168 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - modified for Automake editor usage
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+
+public abstract class Conditional extends Parent implements IConditional {
+
+ private static final String EMPTY = ""; //$NON-NLS-1$
+ String cond;
+ String arg1;
+ String arg2;
+
+ public Conditional(Directive parent, String conditional) {
+ super(parent);
+ cond = conditional;
+ parse();
+ }
+
+ public Conditional(Directive parent) {
+ this(parent, EMPTY, EMPTY, EMPTY);
+ }
+
+ public Conditional(Directive parent, String conditional, String argument1, String argument2) {
+ super(parent);
+ arg1 = argument1;
+ arg2 = argument2;
+ cond = conditional;
+ }
+
+
+ public String getConditional() {
+ return cond;
+ }
+
+ public String getArg1() {
+ return arg1;
+ }
+
+ public String getArg2() {
+ return arg2;
+ }
+
+ public boolean isIf() {
+ return false;
+ }
+
+ public boolean isIfdef() {
+ return false;
+ }
+
+ public boolean isIfndef() {
+ return false;
+ }
+
+ public boolean isIfeq() {
+ return false;
+ }
+
+ public boolean isIfneq() {
+ return false;
+ }
+
+ public boolean isElse() {
+ return false;
+ }
+
+ public boolean isEndif() {
+ return false;
+ }
+
+ /**
+ * Formats of the conditional string.
+ * ifeq (ARG1, ARG2)
+ * ifeq 'ARG1' 'ARG2'
+ * ifeq "ARG1" "ARG2"
+ * ifeq "ARG1" 'ARG2'
+ * ifeq 'ARG1' "ARG2"
+ */
+ protected void parse() {
+ String line = getConditional().trim();
+
+ char terminal = line.charAt(0) == '(' ? ',' : line.charAt(0);
+
+ if (line.length() < 5 && terminal != ',' && terminal != '"' && terminal != '\'') {
+ arg1 = arg2 = EMPTY;
+ return;
+ }
+
+ // Find the end of the first string.
+ int count = 0;
+ // For the (ARG1, ARG2) format.
+
+ // get the first ARG1
+ if (terminal == ',') {
+ int paren = 0;
+ for (count = 1; count < line.length(); count++) {
+ char ch = line.charAt(count);
+ if (ch == '(') {
+ paren++;
+ } else if (ch == ')') {
+ paren--;
+ }
+ if (ch == terminal && paren <= 0) {
+ break;
+ }
+ }
+ } else {
+ for (count = 1; count < line.length(); count++) {
+ if (line.charAt(count) == terminal) {
+ break;
+ }
+ }
+ }
+
+ if (count >= line.length()) {
+ arg1 = arg2 = EMPTY;
+ return;
+ }
+
+ arg1 = line.substring(1, count);
+
+ /* Find the start of the second string. */
+ line = line.substring(count + 1).trim();
+
+ terminal = terminal == ',' ? ')' : line.charAt(0);
+ if (terminal != ')' && terminal != '"' && terminal != '\'') {
+ arg2 = EMPTY;
+ return;
+ }
+
+ count = 0;
+ /* Find the end of the second string. */
+ if (terminal == ')') {
+ int paren = 0;
+ for (count = 0; count < line.length(); count++) {
+ char ch = line.charAt(count);
+ if (ch == '(') {
+ paren++;
+ } else if (ch == ')') {
+ paren--;
+ }
+ if (ch == terminal && paren <= 0) {
+ break;
+ }
+ }
+ } else {
+ for (count = 1; count < line.length(); count++) {
+ if (line.charAt(count) == terminal) {
+ break;
+ }
+ }
+ }
+ if (count > line.length()) {
+ arg2 = EMPTY;
+ } else {
+ arg2 = line.substring(0, count);
+ }
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/DefaultRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/DefaultRule.java
new file mode 100644
index 0000000000..486ea85c3b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/DefaultRule.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .DEFAULT
+ * If the makefile uses this special target, the application shall ensure that it is
+ * specified with commands, but without prerequisites.
+ */
+public class DefaultRule extends SpecialRule implements IDefaultRule {
+
+ public DefaultRule(Directive parent, Command[] cmds) {
+ super(parent, new Target(MakeFileConstants.RULE_DEFAULT), new String[0], cmds);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/DefineVariable.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/DefineVariable.java
new file mode 100644
index 0000000000..b4bde3e768
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/DefineVariable.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+
+public class DefineVariable extends GNUVariableDef {
+
+ public DefineVariable(Directive parent, String name, StringBuffer value) {
+ super(parent, name, value);
+ }
+
+ public boolean isMultiLine() {
+ return true;
+ }
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer(GNUMakefileConstants.VARIABLE_DEFINE);
+ sb.append(getName()).append('\n');
+ sb.append(getValue());
+ sb.append(GNUMakefileConstants.TERMINAL_ENDEF);
+ return sb.toString();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/DeleteOnErrorRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/DeleteOnErrorRule.java
new file mode 100644
index 0000000000..d083723b60
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/DeleteOnErrorRule.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .DELETE_ON_ERROR
+ * If `.DELETE_ON_ERROR' is mentioned as a target anywhere in the
+ * makefile, then `make' will delete the target of a rule if it has
+ * changed and its commands exit with a nonzero exit status, just as
+ * it does when it receives a signal.
+ */
+public class DeleteOnErrorRule extends SpecialRule implements IDeleteOnErrorRule {
+
+ public DeleteOnErrorRule(Directive parent, String[] reqs) {
+ super(parent, new Target(GNUMakefileConstants.RULE_DELETE_ON_ERROR), reqs, new Command[0]);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Directive.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Directive.java
new file mode 100644
index 0000000000..b7a142a1d3
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Directive.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+public abstract class Directive implements IDirective {
+
+ int endLine;
+ int startLine;
+ String filename;
+ IMakefile makefile;
+ Directive parent;
+
+ public Directive(Directive owner) {
+ parent = owner;
+ }
+
+ public Directive(int start, int end) {
+ setLines(start, end);
+ }
+
+ public abstract String toString();
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.make.core.makefile.IDirective#getEndLine()
+ */
+ public int getEndLine() {
+ return endLine;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.make.core.makefile.IDirective#getStartLine()
+ */
+ public int getStartLine() {
+ return startLine;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.make.core.makefile.IDirective#getParent()
+ */
+ public IDirective getParent() {
+ return parent;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.make.core.makefile.IDirective#getFileName()
+ */
+ public String getFileName() {
+ if (filename == null) {
+ if (parent != null) {
+ filename = parent.getFileName();
+ }
+ }
+ return filename;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.make.core.makefile.IDirective#getMakefile()
+ */
+ public IMakefile getMakefile() {
+ if (makefile == null) {
+ if (parent != null) {
+ makefile = parent.getMakefile();
+ }
+ }
+ return makefile;
+ }
+
+ public void setParent(Directive owner) {
+ parent = owner;
+ }
+
+ public void setStartLine(int lineno) {
+ startLine = lineno;
+ }
+
+ public void setEndLine(int lineno) {
+ endLine = lineno;
+ }
+
+ public void setLines(int start, int end) {
+ setStartLine(start);
+ setEndLine(end);
+ }
+
+ public void setFilename(String name) {
+ filename = name;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/EditorUtility.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/EditorUtility.java
new file mode 100644
index 0000000000..ffb99a2322
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/EditorUtility.java
@@ -0,0 +1,561 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Markus Schorn (Wind River Systems)
+ * Norbert Ploett (Siemens AG)
+ * Anton Leherbauer (Wind River Systems)
+ * Ed Swartz (Nokia)
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.text.MessageFormat;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.IBinary;
+import org.eclipse.cdt.core.model.IBuffer;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.IIncludeReference;
+import org.eclipse.cdt.core.model.ISourceReference;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.model.IWorkingCopy;
+import org.eclipse.cdt.core.resources.FileStorage;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.core.filebuffers.FileBuffers;
+import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.resources.IContainer;
+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.resources.IStorage;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.jface.action.Action;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.ui.IEditorDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorRegistry;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.part.FileEditorInput;
+
+public class EditorUtility {
+
+ /**
+ * The ID of the default text editor
+ */
+ public static final String DEFAULT_TEXT_EDITOR_ID = EditorsUI.DEFAULT_TEXT_EDITOR_ID;
+
+ private EditorUtility () {
+ }
+
+ /**
+ * Tests if a cu is currently shown in an editor
+ * @return the IEditorPart if shown, null if element is not open in an editor
+ */
+ public static IEditorPart isOpenInEditor(Object inputElement) {
+ IEditorInput input = null;
+
+ try {
+ input = getEditorInput(inputElement);
+ } catch (CModelException x) {
+ //CUIPlugin.log(x.getStatus());
+ }
+
+ if (input != null) {
+ IWorkbenchPage p= CUIPlugin.getActivePage();
+ if (p != null) {
+ return p.findEditor(input);
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Opens an editor for an element such as <code>ICElement</code>,
+ * <code>IFile</code>, or <code>IStorage</code>.
+ * The editor is activated by default.
+ * @return the IEditorPart or null if wrong element type or opening failed
+ */
+ public static IEditorPart openInEditor(Object inputElement) throws CModelException, PartInitException {
+ return openInEditor(inputElement, true);
+ }
+
+ /**
+ * Opens an editor for an element (ICElement, IFile, IStorage...)
+ * @return the IEditorPart or null if wrong element type or opening failed
+ */
+ public static IEditorPart openInEditor(Object inputElement, boolean activate) throws CModelException, PartInitException {
+
+ if (inputElement instanceof IFile) {
+ return openInEditor((IFile) inputElement, activate);
+ }
+
+ IEditorInput input = getEditorInput(inputElement);
+
+ if (input != null) {
+ return openInEditor(input, getEditorID(input, inputElement), activate);
+ }
+
+ return null;
+ }
+
+ // Following is not needed and drags in internal reference to CEditor.
+
+// /**
+// * Selects a C Element in an editor
+// */
+// public static void revealInEditor(IEditorPart part, ICElement element) {
+// if (element != null && part instanceof CEditor) {
+// ((CEditor) part).setSelection(element);
+// }
+// }
+
+ private static IEditorPart openInEditor(IFile file, boolean activate) throws PartInitException {
+ if (!file.getProject().isAccessible()){
+ closedProject(file.getProject());
+ return null;
+ }
+
+ if (file != null) {
+ try {
+ if (!isLinked(file)) {
+ File tempFile = file.getRawLocation().toFile();
+
+ if (tempFile != null){
+ String canonicalPath = null;
+ try {
+ canonicalPath = tempFile.getCanonicalPath();
+ } catch (IOException e1) {}
+
+ if (canonicalPath != null){
+ IPath path = new Path(canonicalPath);
+ file = CUIPlugin.getWorkspace().getRoot().getFileForLocation(path);
+ }
+ }
+ }
+
+ IEditorInput input = getEditorInput(file);
+ if (input != null) {
+ return openInEditor(input, getEditorID(input, file), activate);
+ }
+ } catch (CModelException e) {}
+ }
+ return null;
+ }
+
+ @SuppressWarnings("deprecation")
+ public static boolean isLinked(IFile file) {
+ if (file.isLinked())
+ return true;
+
+ IPath path = file.getLocation();
+ while (path.segmentCount() > 0) {
+ path = path.removeLastSegments(1);
+ IContainer[] containers = ResourcesPlugin.getWorkspace().getRoot().findContainersForLocation(path);
+
+ for(int i=0; i<containers.length; i++) {
+ if (containers[i] instanceof IFolder && ((IFolder)containers[i]).isLinked()) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Open error dialog about closed project.
+ * @param project
+ */
+ private static void closedProject(IProject project) {
+ MessageBox errorMsg = new MessageBox(CUIPlugin.getActiveWorkbenchShell(), SWT.ICON_ERROR | SWT.OK);
+ errorMsg.setText(CUIPlugin.getResourceString("EditorUtility.closedproject")); //$NON-NLS-1$
+ String desc= CUIPlugin.getResourceString("Editorutility.closedproject.description"); //$NON-NLS-1$
+ errorMsg.setMessage (MessageFormat.format(desc, new Object[]{project.getName()}));
+ errorMsg.open();
+
+ }
+
+ private static IEditorPart openInEditor(IEditorInput input, String editorID, boolean activate) throws PartInitException {
+ if (input != null) {
+ IWorkbenchPage p= CUIPlugin.getActivePage();
+ if (p != null) {
+ IEditorPart editorPart= p.openEditor(input, editorID, activate);
+ return editorPart;
+ }
+ }
+ return null;
+ }
+
+ private static IEditorInput getEditorInput(ICElement element) throws CModelException {
+ while (element != null) {
+ if (element instanceof ISourceReference) {
+ ITranslationUnit tu = ((ISourceReference)element).getTranslationUnit();
+ if (tu != null) {
+ element = tu;
+ }
+ }
+ if (element instanceof IWorkingCopy && ((IWorkingCopy) element).isWorkingCopy())
+ element= ((IWorkingCopy) element).getOriginalElement();
+
+ if (element instanceof ITranslationUnit) {
+ ITranslationUnit unit= (ITranslationUnit) element;
+ IResource resource= unit.getResource();
+ if (resource instanceof IFile) {
+ return new FileEditorInput((IFile) resource);
+ }
+ return new ExternalEditorInput(unit, new FileStorage(unit.getPath()));
+ }
+
+ if (element instanceof IBinary) {
+ return new ExternalEditorInput(getStorage((IBinary)element), (IPath)null);
+ }
+
+ element= element.getParent();
+ }
+
+ return null;
+ }
+
+ public static IEditorInput getEditorInput(Object input) throws CModelException {
+ if (input instanceof ICElement) {
+ return getEditorInput((ICElement) input);
+ }
+ if (input instanceof IFile) {
+ return new FileEditorInput((IFile) input);
+ }
+ if (input instanceof IStorage) {
+ return new ExternalEditorInput((IStorage)input);
+ }
+ return null;
+ }
+
+ /**
+ * Utility method to open an editor for the given file system location
+ * using {@link #getEditorInputForLocation(IPath, ICElement)} to create
+ * the editor input.
+ *
+ * @param location a file system location
+ * @param element an element related to the target file, may be <code>null</code>
+ * @throws PartInitException
+ */
+ public static IEditorPart openInEditor(IPath location, ICElement element) throws PartInitException {
+ IEditorInput input= getEditorInputForLocation(location, element);
+ return EditorUtility.openInEditor(input, getEditorID(input, element), true);
+ }
+
+ /**
+ * Utility method to get an editor input for the given file system location.
+ * If the location denotes a workspace file, a <code>FileEditorInput</code>
+ * is returned, otherwise, the input is an <code>IStorageEditorInput</code>
+ * assuming the location points to an existing file in the file system.
+ * The <code>ICElement</code> is used to determine the associated project
+ * in case the location can not be resolved to a workspace <code>IFile</code>.
+ *
+ * @param location a valid file system location
+ * @param context an element related to the target file, may be <code>null</code>
+ * @return an editor input
+ */
+ public static IEditorInput getEditorInputForLocation(IPath location, ICElement context) {
+ IFile resource= getWorkspaceFileAtLocation(location, context);
+ if (resource != null) {
+ return new FileEditorInput(resource);
+ }
+
+ if (context == null) {
+ // try to synthesize a context for a location appearing on a project's
+ // include paths
+ try {
+ ICProject[] projects = CCorePlugin.getDefault().getCoreModel().getCModel().getCProjects();
+ outerFor: for (int i = 0; i < projects.length; i++) {
+ IIncludeReference[] includeReferences = projects[i].getIncludeReferences();
+ for (int j = 0; j < includeReferences.length; j++) {
+ if (includeReferences[j].isOnIncludeEntry(location)) {
+ context = projects[i];
+ break outerFor;
+ }
+ }
+ }
+ if (context == null && projects.length > 0) {
+ // last resort: just take any of them
+ context= projects[0];
+ }
+ } catch (CModelException e) {
+ }
+ }
+
+ if (context != null) {
+ // try to get a translation unit from the location and associated element
+ ICProject cproject= context.getCProject();
+ if (cproject != null) {
+ ITranslationUnit unit = CoreModel.getDefault().createTranslationUnitFrom(cproject, location);
+ if (unit != null) {
+ return new ExternalEditorInput(unit, new FileStorage(location));
+ }
+ // no translation unit - still try to get a sensible marker resource
+ // from the associated element
+ IResource markerResource= cproject.getProject();
+ return new ExternalEditorInput(new FileStorage(location), markerResource);
+ }
+ }
+ return new ExternalEditorInput(new FileStorage(location));
+ }
+
+
+ /**
+ * Utility method to resolve a file system location to a workspace resource.
+ * If a context element is given and there are multiple matches in the workspace,
+ * a resource with the same project of the context element are preferred.
+ *
+ * @param location a valid file system location
+ * @param context an element related to the target file, may be <code>null</code>
+ * @return an <code>IFile</code> or <code>null</code>
+ */
+ private static IFile getWorkspaceFileAtLocation(IPath location, ICElement context) {
+ IFile file= FileBuffers.getWorkspaceFileAtLocation(location);
+ if (file == null) {
+ // try to find a linked resource
+ IProject project= null;
+ if (context != null) {
+ ICProject cProject= context.getCProject();
+ if (cProject != null) {
+ project= cProject.getProject();
+ }
+ }
+ IFile bestMatch= null;
+ IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
+ IFile[] files= root.findFilesForLocationURI(URIUtil.toURI(location));
+ for (int i= 0; i < files.length; i++) {
+ file= files[i];
+ if (file.isAccessible()) {
+ if (project != null && file.getProject() == project) {
+ bestMatch= file;
+ break;
+ }
+ if (bestMatch == null) {
+ bestMatch= file;
+ if (project == null) {
+ break;
+ }
+ }
+ }
+ }
+ return bestMatch;
+ }
+ return file;
+ }
+
+ /**
+ * If the current active editor edits a c element return it, else
+ * return null
+ */
+ public static ICElement getActiveEditorCInput() {
+ IWorkbenchPage page= CUIPlugin.getActivePage();
+ if (page != null) {
+ IEditorPart part= page.getActiveEditor();
+ if (part != null) {
+ IEditorInput editorInput= part.getEditorInput();
+ if (editorInput != null) {
+ return (ICElement)editorInput.getAdapter(ICElement.class);
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Gets the working copy of an compilation unit opened in an editor
+ *
+ * @param cu the original compilation unit (or another working copy)
+ * @return the working copy of the compilation unit, or null if not found
+ */
+ public static ITranslationUnit getWorkingCopy(ITranslationUnit cu) {
+ if (cu == null)
+ return null;
+ if (cu.isWorkingCopy())
+ return cu;
+
+ return cu.findSharedWorkingCopy();
+ }
+
+ /**
+ * Determine the editor id from the given file name using
+ * the workspace-wide content-type definitions.
+ *
+ * @param name the file name
+ * @return a valid editor id, never <code>null</code>
+ */
+ public static String getEditorID(String name) {
+ IEditorRegistry registry = PlatformUI.getWorkbench().getEditorRegistry();
+ if (registry != null) {
+ IEditorDescriptor descriptor = registry.getDefaultEditor(name);
+ if (descriptor != null) {
+ return descriptor.getId();
+ }
+ }
+ return DEFAULT_TEXT_EDITOR_ID;
+ }
+
+ /**
+ * Determine the editor id from the given editor input and optional input object.
+ * When a translation unit can be obtained, the project-specific content-type
+ * mechanism is used to determine the correct editor id.
+ * If that fails, the editor id is determined by file name and extension using
+ * the workspace-wide content-type definitions.
+ *
+ * @param input the editor input
+ * @param inputObject the input object (used to create the editor input) or <code>null</code>
+ * @return a valid editor id, never <code>null</code>
+ */
+ public static String getEditorID(IEditorInput input, Object inputObject) {
+
+ ITranslationUnit tunit = null;
+ if (inputObject instanceof ITranslationUnit) {
+ tunit= (ITranslationUnit)inputObject;
+ } else if (input instanceof IFileEditorInput) {
+ IFileEditorInput editorInput = (IFileEditorInput)input;
+ IFile file = editorInput.getFile();
+ ICElement celement = CoreModel.getDefault().create(file);
+ if (celement instanceof ITranslationUnit) {
+ tunit = (ITranslationUnit)celement;
+ }
+ } else if (input instanceof ITranslationUnitEditorInput) {
+ ITranslationUnitEditorInput editorInput = (ITranslationUnitEditorInput)input;
+ tunit = editorInput.getTranslationUnit();
+ }
+
+ if (tunit != null) {
+ // Choose an editor based on the content type
+ String contentTypeId= tunit.getContentTypeId();
+ if (contentTypeId != null) {
+ IContentType contentType= Platform.getContentTypeManager().getContentType(contentTypeId);
+ IEditorRegistry registry = PlatformUI.getWorkbench().getEditorRegistry();
+ IEditorDescriptor desc= registry.getDefaultEditor(input.getName(), contentType);
+ if (desc != null) {
+ return desc.getId();
+ }
+ }
+ // Choose an editor based on the language (obsolete?)
+ if (tunit.isCLanguage()) {
+ return CUIPlugin.EDITOR_ID;
+ } else if (tunit.isCXXLanguage()) {
+ return CUIPlugin.EDITOR_ID;
+ } else if (tunit.isASMLanguage()) {
+ return "org.eclipse.cdt.ui.editor.asm.AsmEditor"; //$NON-NLS-1$
+ }
+ }
+
+ // Choose an editor based on filename/extension
+ String editorId = getEditorID(input.getName());
+
+ return editorId;
+ }
+
+ /**
+ * Maps the localized modifier name to a code in the same
+ * manner as #findModifier.
+ *
+ * @return the SWT modifier bit, or <code>0</code> if no match was found
+ */
+ public static int findLocalizedModifier(String token) {
+ if (token == null)
+ return 0;
+
+ if (token.equalsIgnoreCase(Action.findModifierString(SWT.CTRL)))
+ return SWT.CTRL;
+ if (token.equalsIgnoreCase(Action.findModifierString(SWT.SHIFT)))
+ return SWT.SHIFT;
+ if (token.equalsIgnoreCase(Action.findModifierString(SWT.ALT)))
+ return SWT.ALT;
+ if (token.equalsIgnoreCase(Action.findModifierString(SWT.COMMAND)))
+ return SWT.COMMAND;
+
+ return 0;
+ }
+
+ /**
+ * Returns the modifier string for the given SWT modifier
+ * modifier bits.
+ *
+ * @param stateMask the SWT modifier bits
+ * @return the modifier string
+ * @since 2.1.1
+ */
+ public static String getModifierString(int stateMask) {
+ String modifierString= ""; //$NON-NLS-1$
+ if ((stateMask & SWT.CTRL) == SWT.CTRL)
+ modifierString= appendModifierString(modifierString, SWT.CTRL);
+ if ((stateMask & SWT.ALT) == SWT.ALT)
+ modifierString= appendModifierString(modifierString, SWT.ALT);
+ if ((stateMask & SWT.SHIFT) == SWT.SHIFT)
+ modifierString= appendModifierString(modifierString, SWT.SHIFT);
+ if ((stateMask & SWT.COMMAND) == SWT.COMMAND)
+ modifierString= appendModifierString(modifierString, SWT.COMMAND);
+
+ return modifierString;
+ }
+
+ /**
+ * Appends to modifier string of the given SWT modifier bit
+ * to the given modifierString.
+ *
+ * @param modifierString the modifier string
+ * @param modifier an int with SWT modifier bit
+ * @return the concatenated modifier string
+ * @since 2.1.1
+ */
+ private static String appendModifierString(String modifierString, int modifier) {
+ if (modifierString == null)
+ modifierString= ""; //$NON-NLS-1$
+ String newModifierString= Action.findModifierString(modifier);
+ if (modifierString.length() == 0)
+ return newModifierString;
+ return MakefileMessages.getFormattedString("EditorUtility.concatModifierStrings", new String[] {modifierString, newModifierString}); //$NON-NLS-1$
+ }
+
+ public static IStorage getStorage(IBinary bin) {
+ IStorage store = null;
+ try {
+ IBuffer buffer = bin.getBuffer();
+ if (buffer != null) {
+ store = new FileStorage (new ByteArrayInputStream(buffer.getContents().getBytes()), bin.getPath());
+ }
+ } catch (CModelException e) {
+ // nothing;
+ }
+ return store;
+ }
+
+ public static IStorage getStorage(ITranslationUnit tu) {
+ IStorage store = null;
+ try {
+ store = new FileStorage (new ByteArrayInputStream(tu.getBuffer().getContents().getBytes()), tu.getPath());
+ } catch (CModelException e) {
+ // nothing;
+ }
+ return store;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ElementListSelectionDialog.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ElementListSelectionDialog.java
new file mode 100644
index 0000000000..82a7f71b0e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ElementListSelectionDialog.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * QNX Software System
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ILabelProvider;
+
+/**
+ * A class to select one or more elements out of an indexed property
+ */
+public class ElementListSelectionDialog extends AbstractElementListSelectionDialog {
+
+ private List<Object> fElements;
+
+ /*
+ * @private
+ */
+ protected void computeResult() {
+ setResult(getWidgetSelection());
+ }
+ /*
+ * @private
+ */
+ protected Control createDialogArea(Composite parent) {
+ Control result= super.createDialogArea(parent);
+
+ setSelectionListElements(fElements, false);
+ //a little trick to make the window come up faster
+ String initialFilter= null;
+ if (getPrimaryInitialSelection() instanceof String)
+ initialFilter= (String)getPrimaryInitialSelection();
+ if (initialFilter != null)
+ setFilter(initialFilter, true);
+ else
+ refilter();
+
+ return result;
+ }
+ public Object getSelectedElement() {
+ return getPrimaryResult();
+ }
+ public Object[] getSelectedElements() {
+ return getResult();
+ }
+ /*
+ * @private
+ */
+ protected void handleDoubleClick() {
+ if (verifyCurrentSelection()) {
+ buttonPressed(IDialogConstants.OK_ID);
+ }
+ }
+ /**
+ * Constructs a list selection dialog.
+ * @param renderer The label renderer used
+ * @param ignoreCase Decides if the match string ignores lower/upper case
+ * @param multipleSelection Allow multiple selection
+ */
+ public ElementListSelectionDialog(Shell parent, String title, Image image, ILabelProvider renderer, boolean ignoreCase, boolean multipleSelection) {
+ super (parent, title, image, renderer, ignoreCase, multipleSelection);
+ }
+ /**
+ * Constructs a list selection dialog.
+ * @param renderer The label renderer used
+ * @param ignoreCase Decides if the match string ignores lower/upppr case
+ * @param multipleSelection Allow multiple selection
+ */
+ public ElementListSelectionDialog(Shell parent, ILabelProvider renderer, boolean ignoreCase, boolean multipleSelection) {
+ this(parent, "", null, renderer, ignoreCase, multipleSelection); //$NON-NLS-1$
+ }
+ public int open(Object[] elements) {
+ return open(Arrays.asList(elements));
+ }
+ public int open(Object[] elements, String initialSelection) {
+ return open(Arrays.asList(elements), initialSelection);
+ }
+ /**
+ * Open the dialog.
+ * @param elements The elements to show in the list
+ * @return Returns OK or CANCEL
+ */
+ public int open(List<Object> elements) {
+ setElements(elements);
+ return open();
+ }
+ /**
+ * Open the dialog.
+ * @param elements The elements to show in the list
+ * @param initialSelection The initial content of the match text box.
+ * @return Returns OK or CANCEL
+ */
+ public int open(List<Object> elements, String initialSelection) {
+ setElements(elements);
+ setInitialSelection(initialSelection);
+ return open();
+ }
+ /**
+ * Sets the elements presented by this dialog.
+ */
+ public void setElements(List<Object> elements) {
+ fElements= elements;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Else.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Else.java
new file mode 100644
index 0000000000..1a2007e7cd
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Else.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - modified for Automake editor usage
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.io.File;
+import java.io.IOException;
+
+public class Else extends Conditional implements IAutomakeConditional, ICommand {
+
+ private boolean isAutomake;
+ private Rule[] rules;
+
+ public Else(Directive parent) {
+ super(parent);
+ }
+
+ public boolean isAutomake() {
+ return isAutomake;
+ }
+
+ public Rule[] getRules() {
+ return rules;
+ }
+
+ public void setRules(Rule[] rules) {
+ this.rules = rules;
+ }
+
+ public void setAutomake(boolean value) {
+ isAutomake = value;
+ }
+
+ public boolean isElse() {
+ return true;
+ }
+
+ public String toString() {
+ return GNUMakefileConstants.CONDITIONAL_ELSE;
+ }
+
+ // ICommand methods so Automake else can be a child of an IRule
+ public Process execute(String shell, String[] envp, File dir)
+ throws IOException {
+ return null;
+ }
+
+ public boolean shouldBeSilent() {
+ return false;
+ }
+
+ public boolean shouldIgnoreError() {
+ return false;
+ }
+
+ public boolean shouldExecute() {
+ return false;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/EmptyLine.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/EmptyLine.java
new file mode 100644
index 0000000000..e60b47581f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/EmptyLine.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+public class EmptyLine extends Directive implements IEmptyLine {
+
+ final public static char NL = '\n';
+ final public static String NL_STRING = "\n"; //$NON-NLS-1$
+
+ public EmptyLine(Directive parent) {
+ super(parent);
+ }
+
+ public String toString() {
+ return NL_STRING;
+ }
+
+ public boolean equals(IEmptyLine stmt) {
+ return true;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Endef.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Endef.java
new file mode 100644
index 0000000000..9bcc68bb23
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Endef.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+public class Endef extends Terminal {
+
+
+ public Endef(Directive parent) {
+ super(parent);
+ }
+
+ public boolean isEndef() {
+ return true;
+ }
+
+ public String toString() {
+ return GNUMakefileConstants.TERMINAL_ENDEF;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Endif.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Endif.java
new file mode 100644
index 0000000000..af77d40c5e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Endif.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+
+public class Endif extends Terminal {
+
+ public Endif(Directive parent) {
+ super(parent);
+ }
+
+ public boolean isEndif() {
+ return true;
+ }
+
+ public String toString() {
+ return GNUMakefileConstants.TERMINAL_ENDIF;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ExportAllVariablesRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ExportAllVariablesRule.java
new file mode 100644
index 0000000000..c0d32b791e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ExportAllVariablesRule.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .EXPORT_ALL_VARIABLES
+ * Simply by being mentioned as a target, this tells `make' to export
+ * all variables to child processes by default.
+ */
+public class ExportAllVariablesRule extends SpecialRule implements IExportAllVariablesRule {
+
+ public ExportAllVariablesRule(Directive parent, String[] reqs) {
+ super(parent, new Target(GNUMakefileConstants.RULE_EXPORT_ALL_VARIABLES), reqs, new Command[0]);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ExportVariable.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ExportVariable.java
new file mode 100644
index 0000000000..b98512dd16
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ExportVariable.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - Modified for Automake usage
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+public class ExportVariable extends GNUVariableDef {
+
+ public ExportVariable(Directive parent, String name, StringBuffer value, int type) {
+ super(parent, name, value, type);
+ }
+
+ public boolean isExport() {
+ return true;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ExternalEditorInput.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ExternalEditorInput.java
new file mode 100644
index 0000000000..a7087de46c
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ExternalEditorInput.java
@@ -0,0 +1,169 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Anton Leherbauer (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorRegistry;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.IPersistableElement;
+import org.eclipse.ui.IStorageEditorInput;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.editors.text.ILocationProvider;
+
+
+/**
+ * An EditorInput for an external (non-workspace) file.
+ */
+public class ExternalEditorInput implements ITranslationUnitEditorInput, IPersistableElement {
+
+ private IStorage externalFile;
+ private IResource markerResource;
+ private ITranslationUnit unit;
+ private IPath location;
+
+ /*
+ */
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (!(obj instanceof IStorageEditorInput))
+ return false;
+ IStorageEditorInput other = (IStorageEditorInput)obj;
+ try {
+ return externalFile.equals(other.getStorage());
+ } catch (CoreException exc) {
+ return false;
+ }
+ }
+
+ /*
+ * @see IEditorInput#exists()
+ */
+ public boolean exists() {
+ // External file can not be deleted
+ return true;
+ }
+
+ /*
+ * @see IAdaptable#getAdapter(Class)
+ */
+ @SuppressWarnings("unchecked")
+ public Object getAdapter(Class adapter) {
+ if (ILocationProvider.class.equals(adapter)) {
+ return this;
+ }
+ return Platform.getAdapterManager().getAdapter(this, adapter);
+ }
+
+ /*
+ * @see IEditorInput#getImageDescriptor()
+ */
+ public ImageDescriptor getImageDescriptor() {
+ IEditorRegistry registry= PlatformUI.getWorkbench().getEditorRegistry();
+ return registry.getImageDescriptor(externalFile.getFullPath().getFileExtension());
+ }
+
+ /*
+ * @see IEditorInput#getName()
+ */
+ public String getName() {
+ return externalFile.getName();
+ }
+
+ /*
+ * @see IEditorInput#getPersistable()
+ */
+ public IPersistableElement getPersistable() {
+ return this;
+ }
+
+ /*
+ * see IStorageEditorInput#getStorage()
+ */
+ public IStorage getStorage() {
+ return externalFile;
+ }
+
+ /*
+ * @see IEditorInput#getToolTipText()
+ */
+ public String getToolTipText() {
+ return externalFile.getFullPath().toString();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake.ITranslationUnitEditorInput#getTranslationUnit()
+ */
+ public ITranslationUnit getTranslationUnit() {
+ return unit;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.editors.text.ILocationProvider#getPath(java.lang.Object)
+ */
+ public IPath getPath(Object element) {
+ return location;
+ }
+
+ public ExternalEditorInput(ITranslationUnit unit, IStorage exFile) {
+ this(exFile, exFile.getFullPath());
+ this.unit = unit;
+ markerResource= unit.getCProject().getProject();
+ }
+
+ public ExternalEditorInput(IStorage exFile) {
+ this(exFile, exFile.getFullPath());
+ }
+
+ public ExternalEditorInput(IStorage exFile, IPath location) {
+ externalFile = exFile;
+ this.location = location;
+ }
+
+ /**
+ * This constructor accepts the storage for the editor
+ * and a reference to a resource which holds the markers for the external file.
+ */
+ public ExternalEditorInput(IStorage exFile, IResource markerResource) {
+ this(exFile, exFile.getFullPath());
+ this.markerResource = markerResource ;
+ }
+
+ /**
+ * Return the resource where markers for this external editor input are stored
+ */
+ public IResource getMarkerResource() {
+ return markerResource;
+ }
+
+ /*
+ * @see org.eclipse.ui.IPersistableElement#getFactoryId()
+ */
+ public String getFactoryId() {
+ return ExternalEditorInputFactory.ID;
+ }
+
+ /*
+ * @see org.eclipse.ui.IPersistable#saveState(org.eclipse.ui.IMemento)
+ */
+ public void saveState(IMemento memento) {
+ ExternalEditorInputFactory.saveState(memento, this);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ExternalEditorInputFactory.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ExternalEditorInputFactory.java
new file mode 100644
index 0000000000..2e8ebf6d4d
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ExternalEditorInputFactory.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Anton Leherbauer (Wind River Systems) - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.ui.IElementFactory;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.IPersistableElement;
+
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+
+/**
+ * The ExternalEditorInputFactory is used to save and recreate an ExternalEditorInput object.
+ * As such, it implements the IPersistableElement interface for storage
+ * and the IElementFactory interface for recreation.
+ *
+ * @see IMemento
+ * @see IPersistableElement
+ * @see IElementFactory
+ *
+ * @since 4.0
+ */
+public class ExternalEditorInputFactory implements IElementFactory {
+
+ public static final String ID = "org.eclipse.cdt.ui.ExternalEditorInputFactory"; //$NON-NLS-1$
+
+ private static final String TAG_PATH = "path";//$NON-NLS-1$
+ private static final String TAG_PROJECT = "project";//$NON-NLS-1$
+
+ /*
+ * @see org.eclipse.ui.IElementFactory#createElement(org.eclipse.ui.IMemento)
+ */
+ public IAdaptable createElement(IMemento memento) {
+ // Get the file name.
+ String fileName = memento.getString(TAG_PATH);
+ if (fileName == null) {
+ return null;
+ }
+
+ IPath location= new Path(fileName);
+ ICProject cProject= null;
+
+ String projectName= memento.getString(TAG_PROJECT);
+ if (projectName != null) {
+ IProject project= ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ if (project.isAccessible() && CoreModel.hasCNature(project)) {
+ cProject= CoreModel.getDefault().create(project);
+ }
+ }
+ return EditorUtility.getEditorInputForLocation(location, cProject);
+ }
+
+ /**
+ * Save the element state.
+ *
+ * @param memento the storage
+ * @param input the element
+ */
+ static void saveState(IMemento memento, ExternalEditorInput input) {
+ IPath location= input.getPath(input);
+ if (location != null) {
+ memento.putString(TAG_PATH, location.toOSString());
+ }
+ IProject project= null;
+ ITranslationUnit unit= input.getTranslationUnit();
+ if (unit != null) {
+ project= unit.getCProject().getProject();
+ }
+ if (project == null && input.getMarkerResource() instanceof IProject) {
+ project= (IProject)input.getMarkerResource();
+ }
+ if (project != null) {
+ memento.putString(TAG_PROJECT, project.getName());
+ }
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUAutomakefile.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUAutomakefile.java
new file mode 100644
index 0000000000..ca0a116e87
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUAutomakefile.java
@@ -0,0 +1,987 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - Modified for Automake editor usage
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.net.URI;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Stack;
+import java.util.StringTokenizer;
+
+import org.eclipse.cdt.make.core.MakeCorePlugin;
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileInfo;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+
+
+/**
+ * Makefile : ( statement ) *
+ * statement : rule | macro_definition | comments | empty
+ * rule : inference_rule | target_rule
+ * inference_rule : target ':' <nl> ( <tab> command <nl> ) +
+ * target_rule : target [ ( target ) * ] ':' [ ( prerequisite ) * ] [ ';' command ] <nl>
+ [ ( command ) * ]
+ * macro_definition : string '=' (string)*
+ * comments : ('#' (string) <nl>) *
+ * empty : <nl>
+ * command : <tab> prefix_command string <nl>
+ * target : string
+ * prefix_command : '-' | '@' | '+'
+ * internal_macro : "$<" | "$*" | "$@" | "$?" | "$%"
+ */
+
+public class GNUAutomakefile extends AbstractMakefile implements IGNUMakefile {
+
+ public static String PATH_SEPARATOR = System.getProperty("path.separator", ":"); //$NON-NLS-1$ //$NON-NLS-2$
+ public static String FILE_SEPARATOR = System.getProperty("file.separator", "/"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ String[] includeDirectories = new String[0];
+ IDirective[] builtins = null;
+
+ public GNUAutomakefile() {
+ super(null);
+ }
+
+ public void parse(String name) throws IOException {
+ FileReader stream = new FileReader(name);
+ parse(name, stream);
+ if (stream != null) {
+ try {
+ stream.close();
+ } catch (IOException e) {
+ }
+ }
+ }
+
+ public void parse(String filePath, Reader reader) throws IOException {
+ parse(URIUtil.toURI(filePath), new MakefileReader(reader));
+ }
+
+ public void parse(URI fileURI, Reader reader) throws IOException {
+ parse(fileURI, new MakefileReader(reader));
+ }
+
+
+ protected void parse(URI fileURI, MakefileReader reader) throws IOException {
+ String line;
+ Rule[] rules = null;
+ Stack<IDirective> conditions = new Stack<IDirective>();
+ Stack<GNUVariableDef> defines = new Stack<GNUVariableDef>();
+ int startLine = 0;
+ int endLine = 0;
+
+ // Clear any old directives.
+ clearDirectives();
+
+ setFileURI(fileURI);
+
+ while ((line = reader.readLine()) != null) {
+ startLine = endLine + 1;
+ endLine = reader.getLineNumber();
+
+ // Check if we enter in "define"
+ if (GNUMakefileUtil.isEndef(line)) {
+ // We should have a "define" for a "endef".
+ if (!defines.empty()) {
+ GNUVariableDef def = (GNUVariableDef) defines.pop();
+ def.setEndLine(endLine);
+ }
+ Endef endef = new Endef((Directive)this);
+ endef.setLines(startLine, endLine);
+ addDirective(conditions, endef);
+ continue;
+ } else if (GNUMakefileUtil.isDefine(line)) {
+ GNUVariableDef def = parseGNUVariableDef(line);
+ def.setLines(startLine, endLine);
+ addDirective(conditions, def);
+ defines.push(def);
+ continue;
+ } else if (GNUMakefileUtil.isOverrideDefine(line)) {
+ GNUVariableDef oDef = parseGNUVariableDef(line);
+ oDef.setLines(startLine, endLine);
+ addDirective(conditions, oDef);
+ defines.push(oDef);
+ continue;
+ }
+
+ // We still in a define.
+ if (!defines.empty()) {
+ GNUVariableDef def = (GNUVariableDef) defines.peek();
+ StringBuffer sb = def.getValue();
+ if (sb.length() > 0) {
+ sb.append('\n');
+ }
+ sb.append(line);
+ continue;
+ }
+
+ // 1- Try command first, since we can not strip '#' in command line
+ if (PosixMakefileUtil.isCommand(line) ||
+ AutomakefileUtil.isAutomakeCommand(line)) {
+ Command cmd = new Command(this, line);
+ cmd.setLines(startLine, endLine);
+ if (rules != null) {
+ // The command is added to the rules
+ for (int i = 0; i < rules.length; i++) {
+ rules[i].addDirective(cmd);
+ rules[i].setEndLine(endLine);
+ }
+ continue;
+ }
+ if (!conditions.isEmpty()) {
+ addDirective(conditions, cmd);
+ continue;
+ }
+ // If we have no rules/condition for the command,
+ // give the other directives a chance by falling through
+ }
+
+ // 2- Strip away any comments.
+ int pound = Util.indexOfComment(line);
+ if (pound != -1) {
+ Comment cmt = new Comment(this, line.substring(pound + 1));
+ cmt.setLines(startLine, endLine);
+ if (rules != null) {
+ // The comment is added to the rules.
+ for (int i = 0; i < rules.length; i++) {
+ rules[i].addDirective(cmt);
+ rules[i].setEndLine(endLine);
+ }
+ } else {
+ addDirective(conditions, cmt);
+ }
+ line = line.substring(0, pound);
+ // If all we have left are spaces continue
+ if (Util.isEmptyLine(line)) {
+ continue;
+ }
+ // The rest of the line maybe a valid directives.
+ // keep on trying by falling through.
+ }
+
+ // 3- Empty lines ?
+ if (Util.isEmptyLine(line)) {
+ Directive empty = new EmptyLine(this);
+ empty.setLines(startLine, endLine);
+ if (rules != null) {
+ // The EmptyLine is added to the rules.
+ for (int i = 0; i < rules.length; i++) {
+ rules[i].addDirective(empty);
+ rules[i].setEndLine(endLine);
+ }
+ } else {
+ addDirective(conditions, empty);
+ }
+ continue;
+ }
+
+ // 3b - look for if statement which is an Automake directive.
+ // These will be processed at configure time and all statements
+ // in-between are modified with a prefix. We will treat these as
+ // standard conditionals even though they can affect the behavior
+ // of lines that follow the construct. For
+ // example, an automake-if could start in the middle of a rule
+ // and the else might be outside a target.
+ if (GNUMakefileUtil.isIf(line)) {
+ // We cache the rules that were in effect at entry to the
+ // if/else block. We treat the endif as restoring the
+ // state of the rules at this point. It is possible for
+ // commands to follow the if/else that belong to different
+ // rules that start inside the if/else, but we are not
+ // prepared to handle that in an outline view and it is
+ // pretty bad Automake coding.
+ If ifDirective = parseIf(line, rules);
+ ifDirective.setLines(startLine, endLine);
+ if (rules != null) {
+ // The if statement is added to the rules.
+ for (int i = 0; i < rules.length; i++) {
+ rules[i].addDirective(ifDirective);
+ rules[i].setEndLine(endLine);
+ }
+ } else {
+ addDirective(conditions, ifDirective);
+ }
+ conditions.push(ifDirective);
+ rules = null;
+ continue;
+ }
+
+ // 3c - Check for else or endif
+
+ if (GNUMakefileUtil.isElse(line)) {
+ Else elseDirective = (Else)parseConditional(line);
+ elseDirective.setLines(startLine, endLine);
+ Conditional cond = null;
+ // FIXME: Are we missing a if condition ?
+ if (!conditions.empty()) {
+ cond = (Conditional) conditions.pop();
+ cond.setEndLine(endLine - 1);
+ }
+ if (cond != null && cond.isIf()) {
+ // See 3b above for description on automake if/else handling.
+ elseDirective.setAutomake(true);
+ rules = ((If)cond).getRules();
+ // We cache the rules at the time of entry into the if/else block.
+ elseDirective.setRules(rules);
+ if (rules != null) {
+ // The else is added to the rules.
+ for (int i = 0; i < rules.length; i++) {
+ rules[i].addDirective(elseDirective);
+ rules[i].setEndLine(endLine);
+ }
+ } else {
+ addDirective(conditions, elseDirective);
+ }
+ rules = null;
+ } else {
+ addDirective(conditions, elseDirective);
+ }
+ conditions.push(elseDirective);
+ continue;
+ } else if (GNUMakefileUtil.isEndif(line)) {
+ Endif endif = new Endif(this);
+ endif.setLines(startLine, endLine);
+ Conditional cond = null;
+ // FIXME: Are we missing a if/else condition ?
+ if (!conditions.empty()) {
+ cond = (Conditional) conditions.pop();
+ cond.setEndLine(endLine);
+ }
+ if (cond != null && cond instanceof IAutomakeConditional) {
+ rules = ((IAutomakeConditional)cond).getRules();
+ }
+ if (rules != null) {
+ // The endif is added to the rules.
+ for (int i = 0; i < rules.length; i++) {
+ rules[i].addDirective(endif);
+ rules[i].setEndLine(endLine);
+ }
+ } else {
+ addDirective(conditions, endif);
+ }
+ continue;
+ }
+
+ // 4 - reset rules to null
+ // The first non empty line that does not begin with a <TAB> or '#'
+ // shall begin a new entry.
+ rules = null;
+
+ // 5- Check for the conditionals.
+ Directive directive = processConditions(line);
+ if (directive != null) {
+ directive.setLines(startLine, endLine);
+ addDirective(conditions, directive);
+ conditions.push(directive);
+ continue;
+ }
+
+ // 6- Check for other special gnu directives.
+ directive = processGNUDirectives(line);
+ if (directive != null) {
+ directive.setLines(startLine, endLine);
+ addDirective(conditions, directive);
+ continue;
+ }
+
+ // 7- Check for GNU special rules.
+ SpecialRule special = processSpecialRules(line);
+ if (special != null) {
+ rules = new Rule[] { special };
+ special.setLines(startLine, endLine);
+ addDirective(conditions, special);
+ continue;
+ }
+
+ // - Check for inference rule.
+ if (PosixMakefileUtil.isInferenceRule(line)) {
+ InferenceRule irule = parseInferenceRule(line);
+ irule.setLines(startLine, endLine);
+ addDirective(conditions, irule);
+ rules = new Rule[] { irule };
+ continue;
+ }
+
+ // - Variable Definiton ?
+ if (GNUMakefileUtil.isVariableDefinition(line)) {
+ GNUVariableDef vd = parseGNUVariableDef(line);
+ vd.setLines(startLine, endLine);
+ addDirective(conditions, vd);
+ if (!vd.isTargetSpecific()) {
+ continue;
+ }
+ }
+
+ // - GNU Static Target rule ?
+ if (GNUMakefileUtil.isStaticTargetRule(line)) {
+ StaticTargetRule[] srules = parseStaticTargetRule(line);
+ for (int i = 0; i < srules.length; i++) {
+ srules[i].setLines(startLine, endLine);
+ addDirective(conditions, srules[i]);
+ }
+ rules = srules;
+ continue;
+ }
+
+ // - Target Rule ?
+ if (GNUMakefileUtil.isGNUTargetRule(line)) {
+ GNUTargetRule[] trules = parseGNUTargetRules(line);
+ for (int i = 0; i < trules.length; i++) {
+ trules[i].setLines(startLine, endLine);
+ addDirective(conditions, trules[i]);
+ }
+ rules = trules;
+ continue;
+ }
+
+ // - Configure macro (@xxxx@)
+ if (AutomakefileUtil.isConfigMacro(line)) {
+ AutomakeConfigMacro macro = parseConfigMacro(line);
+ if (macro != null) {
+ macro.setLines(startLine, endLine);
+ addDirective(macro);
+ continue;
+ }
+ }
+
+ // XXX ?? Should not be here.
+ BadDirective stmt = new BadDirective(this, line);
+ stmt.setLines(startLine, endLine);
+ addDirective(conditions, stmt);
+
+ }
+ setLines(1, endLine);
+ // TEST please remove.
+ //GNUMakefileValidator validator = new GNUMakefileValidator();
+ //validator.validateDirectives(null, getDirectives());
+ }
+
+ private void addDirective(Stack<IDirective> conditions, Directive directive) {
+ if (conditions.empty()) {
+ addDirective(directive);
+ } else {
+ Conditional cond = (Conditional) conditions.peek();
+ cond.addDirective(directive);
+ cond.setEndLine(directive.getEndLine());
+ }
+ }
+
+ protected Conditional processConditions(String line) {
+ Conditional stmt = null;
+ if (GNUMakefileUtil.isIfdef(line)) {
+ stmt = parseConditional(line);
+ } else if (GNUMakefileUtil.isIfndef(line)) {
+ stmt = parseConditional(line);
+ } else if (GNUMakefileUtil.isIfeq(line)) {
+ stmt = parseConditional(line);
+ } else if (GNUMakefileUtil.isIfneq(line)) {
+ stmt = parseConditional(line);
+ }
+ return stmt;
+ }
+
+ protected Directive processGNUDirectives(String line) {
+ Directive stmt = null;
+ if (GNUMakefileUtil.isUnExport(line)) {
+ stmt = parseUnExport(line);
+ } else if (GNUMakefileUtil.isVPath(line)) {
+ stmt = parseVPath(line);
+ } else if (GNUMakefileUtil.isInclude(line)) {
+ stmt = parseInclude(line);
+ }
+ return stmt;
+ }
+
+ protected SpecialRule processSpecialRules(String line) {
+ SpecialRule stmt = null;
+ if (PosixMakefileUtil.isIgnoreRule(line)) {
+ stmt = parseSpecialRule(line);
+ } else if (PosixMakefileUtil.isPosixRule(line)) {
+ stmt = parseSpecialRule(line);
+ } else if (PosixMakefileUtil.isPreciousRule(line)) {
+ stmt = parseSpecialRule(line);
+ } else if (PosixMakefileUtil.isSilentRule(line)) {
+ stmt = parseSpecialRule(line);
+ } else if (PosixMakefileUtil.isSuffixesRule(line)) {
+ stmt = parseSpecialRule(line);
+ } else if (PosixMakefileUtil.isDefaultRule(line)) {
+ stmt = parseSpecialRule(line);
+ } else if (PosixMakefileUtil.isSccsGetRule(line)) {
+ stmt = parseSpecialRule(line);
+ } else if (GNUMakefileUtil.isPhonyRule(line)) {
+ stmt = parseSpecialRule(line);
+ } else if (GNUMakefileUtil.isIntermediateRule(line)) {
+ stmt = parseSpecialRule(line);
+ } else if (GNUMakefileUtil.isSecondaryRule(line)) {
+ stmt = parseSpecialRule(line);
+ } else if (GNUMakefileUtil.isDeleteOnErrorRule(line)) {
+ stmt = parseSpecialRule(line);
+ } else if (GNUMakefileUtil.isLowResolutionTimeRule(line)) {
+ stmt = parseSpecialRule(line);
+ } else if (GNUMakefileUtil.isExportAllVariablesRule(line)) {
+ stmt = parseSpecialRule(line);
+ } else if (GNUMakefileUtil.isNotParallelRule(line)) {
+ stmt = parseSpecialRule(line);
+ }
+ return stmt;
+ }
+
+ /**
+ * @param line
+ * @return
+ */
+ protected SpecialRule parseSpecialRule(String line) {
+ line = line.trim();
+ String keyword = null;
+ String[] reqs = null;
+ SpecialRule special = null;
+ int index = Util.indexOf(line, ':');
+ if (index != -1) {
+ keyword = line.substring(0, index).trim();
+ String req = line.substring(index + 1);
+ reqs = PosixMakefileUtil.findPrerequisites(req);
+ } else {
+ keyword = line;
+ reqs = new String[0];
+ }
+ if (keyword.equals(MakeFileConstants.RULE_IGNORE)) {
+ special = new IgnoreRule(this, reqs);
+ } else if (keyword.equals(MakeFileConstants.RULE_POSIX)) {
+ special = new PosixRule(this);
+ } else if (keyword.equals(MakeFileConstants.RULE_PRECIOUS)) {
+ special = new PreciousRule(this, reqs);
+ } else if (keyword.equals(MakeFileConstants.RULE_SILENT)) {
+ special = new SilentRule(this, reqs);
+ } else if (keyword.equals(MakeFileConstants.RULE_SUFFIXES)) {
+ special = new SuffixesRule(this, reqs);
+ } else if (keyword.equals(MakeFileConstants.RULE_DEFAULT)) {
+ special = new DefaultRule(this, new Command[0]);
+ } else if (keyword.equals(MakeFileConstants.RULE_SCCS_GET)) {
+ special = new SccsGetRule(this, new Command[0]);
+ } else if (keyword.equals(GNUMakefileConstants.RULE_PHONY)) {
+ special = new PhonyRule(this, reqs);
+ } else if (keyword.equals(GNUMakefileConstants.RULE_INTERMEDIATE)) {
+ special = new IntermediateRule(this, reqs);
+ } else if (keyword.equals(GNUMakefileConstants.RULE_SECONDARY)) {
+ special = new SecondaryRule(this, reqs);
+ } else if (keyword.equals(GNUMakefileConstants.RULE_DELETE_ON_ERROR)) {
+ special = new DeleteOnErrorRule(this, reqs);
+ } else if (keyword.equals(GNUMakefileConstants.RULE_LOW_RESOLUTION_TIME)) {
+ special = new LowResolutionTimeRule(this, reqs);
+ } else if (keyword.equals(GNUMakefileConstants.RULE_EXPORT_ALL_VARIABLES)) {
+ special = new ExportAllVariablesRule(this, reqs);
+ } else if (keyword.equals(GNUMakefileConstants.RULE_NOT_PARALLEL)) {
+ special = new NotParallelRule(this, reqs);
+ }
+ return special;
+ }
+
+ /**
+ * if CONDITIONAL
+ *
+ * @param line
+ * @return
+ */
+ protected If parseIf(String line, Rule[] rules) {
+ line = line.trim();
+ String keyword = null;
+ // Move pass the keyword
+ for (int i = 0; i < line.length(); i++) {
+ if (Util.isSpace(line.charAt(i))) {
+ keyword = line.substring(0, i);
+ line = line.substring(i).trim();
+ break;
+ }
+ }
+ if (keyword == null) {
+ keyword = line;
+ }
+ if (keyword.equals(GNUMakefileConstants.CONDITIONAL_IF) ||
+ keyword.equals(GNUMakefileConstants.AT_CONDITIONAL_IF)) {
+ return new If(this, rules, line);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * ifdef CONDITIONAL
+ * ifeq CONDITIONAL
+ * ifneq CONDITIONAL
+ * else
+ *
+ * @param line
+ * @return
+ */
+ protected Conditional parseConditional(String line) {
+ Conditional condition = null;
+ line = line.trim();
+ String keyword = null;
+ // Move pass the keyword
+ for (int i = 0; i < line.length(); i++) {
+ if (Util.isSpace(line.charAt(i))) {
+ keyword = line.substring(0, i);
+ line = line.substring(i).trim();
+ break;
+ }
+ }
+ if (keyword == null) {
+ keyword = line;
+ }
+ if (keyword.equals(GNUMakefileConstants.CONDITIONAL_IFDEF)) {
+ condition = new Ifdef(this, line);
+ } else if (keyword.equals(GNUMakefileConstants.CONDITIONAL_IFNDEF)) {
+ condition = new Ifndef(this, line);
+ } else if (keyword.equals(GNUMakefileConstants.CONDITIONAL_IFEQ)) {
+ condition = new Ifeq(this, line);
+ } else if (keyword.equals(GNUMakefileConstants.CONDITIONAL_IFNEQ)) {
+ condition = new Ifneq(this, line);
+ } else if (keyword.equals(GNUMakefileConstants.CONDITIONAL_ELSE)) {
+ condition = new Else(this);
+ }
+ return condition;
+ }
+
+ /**
+ * An Autoconf directive of the form @xxx@
+ */
+ protected AutomakeConfigMacro parseConfigMacro(String line) {
+ String extraChars = "_-";
+ char[] ch = line.toCharArray();
+ int i = 1;
+ while (Character.isLetterOrDigit(ch[i]) ||
+ extraChars.indexOf(ch[i]) >= 0) {
+ ++i;
+ }
+ if (i > 1 && ch[i] == '@')
+ return new AutomakeConfigMacro(this, line.substring(0, i+1));
+ return null;
+ }
+ /**
+ * Format of the include directive:
+ * include filename1 filename2 ...
+ */
+ protected Include parseInclude(String line) {
+ String[] filenames;
+ StringTokenizer st = new StringTokenizer(line);
+ int count = st.countTokens();
+ if (count > 0) {
+ filenames = new String[count - 1];
+ for (int i = 0; i < count; i++) {
+ if (i == 0) {
+ st.nextToken();
+ // ignore the "include" keyword.
+ continue;
+ }
+ filenames[i - 1] = st.nextToken();
+ }
+ } else {
+ filenames = new String[0];
+ }
+ return new Include(this, filenames, getIncludeDirectories());
+ }
+
+ /**
+ * There are three forms of the "vpath" directive:
+ * "vpath PATTERN DIRECTORIES"
+ * Specify the search path DIRECTORIES for file names that match PATTERN.
+ *
+ * The search path, DIRECTORIES, is a list of directories to be
+ * searched, separated by colons (semi-colons on MS-DOS and
+ * MS-Windows) or blanks, just like the search path used in the `VPATH' variable.
+ *
+ * "vpath PATTERN"
+ * Clear out the search path associated with PATTERN.
+ *
+ * "vpath"
+ * Clear all search paths previously specified with `vpath' directives.
+ */
+ protected VPath parseVPath(String line) {
+ String pattern = null;
+ String[] directories;
+ StringTokenizer st = new StringTokenizer(line);
+ int count = st.countTokens();
+ List<String> dirs = new ArrayList<String>(count);
+ if (count > 0) {
+ for (int i = 0; i < count; i++) {
+ if (count == 0) {
+ // ignore the "vpath" directive
+ st.nextToken();
+ } else if (count == 1) {
+ pattern = st.nextToken();
+ } else if (count == 3) {
+ String delim = " \t\n\r\f" + GNUAutomakefile.PATH_SEPARATOR; //$NON-NLS-1$
+ dirs.add(st.nextToken(delim));
+ } else {
+ dirs.add(st.nextToken());
+ }
+ }
+ }
+ directories = (String[]) dirs.toArray(new String[0]);
+ if (pattern == null) {
+ pattern = new String();
+ }
+ return new VPath(this, pattern, directories);
+ }
+
+ /**
+ * @param line
+ * @return
+ */
+ protected UnExport parseUnExport(String line) {
+ // Pass over "unexport"
+ for (int i = 0; i < line.length(); i++) {
+ if (Util.isSpace(line.charAt(i))) {
+ line = line.substring(i).trim();
+ break;
+ }
+ }
+ return new UnExport(this, line);
+ }
+
+ protected GNUTargetRule[] parseGNUTargetRules(String line) {
+ String[] targetNames;
+ String[] normalReqs;
+ String[] orderReqs;
+ String cmd = null;
+ boolean doubleColon = false;
+ int index = Util.indexOf(line, ':');
+ if (index != -1) {
+ // Break the targets
+ String target = line.substring(0, index);
+ targetNames = PosixMakefileUtil.findTargets(target.trim());
+
+ // Some TargetRule have "::" for separator
+ String req = line.substring(index + 1);
+ doubleColon = req.startsWith(":"); //$NON-NLS-1$
+ if (doubleColon) {
+ // move pass the second ':'
+ req = req.substring(1);
+ }
+
+ // Check for command
+ int semicolon = Util.indexOf(req, ';');
+ if (semicolon != -1) {
+ cmd = req.substring(semicolon + 1);
+ req = req.substring(0, semicolon);
+ }
+
+ // Check for Normal and order prerequisites
+ String normalReq = null;
+ String orderReq = null;
+ int pipe = Util.indexOf(req, '|');
+ if (pipe != -1) {
+ normalReq = req.substring(0, pipe);
+ orderReq = req.substring(pipe + 1);
+ } else {
+ normalReq = req;
+ orderReq = ""; //$NON-NLS-1$
+ }
+
+ normalReqs = PosixMakefileUtil.findPrerequisites(normalReq.trim());
+ orderReqs = PosixMakefileUtil.findPrerequisites(orderReq.trim());
+ } else {
+ targetNames = PosixMakefileUtil.findTargets(line);
+ normalReqs = new String[0];
+ orderReqs = new String[0];
+ }
+
+ GNUTargetRule[] rules = new GNUTargetRule[targetNames.length];
+ for (int i = 0; i < targetNames.length; i++) {
+ rules[i] = new GNUTargetRule(this, new Target(targetNames[i]), doubleColon, normalReqs, orderReqs, new Command[0]);
+ if (cmd != null) {
+ rules[i].addDirective(new Command(this, cmd));
+ }
+ }
+ return rules;
+ }
+
+ protected GNUVariableDef parseGNUVariableDef(String line) {
+ line = line.trim();
+ GNUVariableDef vd;
+
+ // the default type.
+ int type = GNUVariableDef.TYPE_RECURSIVE_EXPAND;
+ boolean isDefine = false;
+ boolean isOverride = false;
+ boolean isTargetVariable = false;
+ boolean isExport = false;
+ String targetName = ""; //$NON-NLS-1$
+
+ String name;
+ StringBuffer value = new StringBuffer();
+
+ // Check for Target: Variable-assignment
+ isTargetVariable = GNUMakefileUtil.isTargetVariable(line);
+ if (isTargetVariable) {
+ // move to the first ':'
+ int colon = Util.indexOf(line, ':');
+ if (colon != -1) {
+ targetName = line.substring(0, colon).trim();
+ line = line.substring(colon + 1).trim();
+ } else {
+ targetName = ""; //$NON-NLS-1$
+ }
+ }
+
+ // Check for Override condition.
+ if (GNUMakefileUtil.isOverride(line)) {
+ isOverride = true;
+ // Move pass the keyword override.
+ for (int i = 0; i < line.length(); i++) {
+ if (Util.isSpace(line.charAt(i))) {
+ line = line.substring(i).trim();
+ break;
+ }
+ }
+ }
+
+ // Check for "define"
+ if (GNUMakefileUtil.isDefine(line)) {
+ isDefine = true;
+ // Move pass the keyword define.
+ for (int i = 0; i < line.length(); i++) {
+ if (Util.isSpace(line.charAt(i))) {
+ line = line.substring(i).trim();
+ break;
+ }
+ }
+ }
+
+ // Check for Override condition.
+ if (GNUMakefileUtil.isExport(line)) {
+ isExport = true;
+ // Move pass the keyword export.
+ for (int i = 0; i < line.length(); i++) {
+ if (Util.isSpace(line.charAt(i))) {
+ line = line.substring(i).trim();
+ break;
+ }
+ }
+ }
+
+ // Check for Target-variable
+
+ int index = line.indexOf('=');
+ if (index != -1) {
+ int separator = index;
+ // Check for "+=", ":=", "?="
+ if (index > 0) {
+ type = line.charAt(index - 1);
+ if (type == GNUVariableDef.TYPE_SIMPLE_EXPAND
+ || type == GNUVariableDef.TYPE_APPEND
+ || type == GNUVariableDef.TYPE_CONDITIONAL) {
+ separator = index - 1;
+ } else {
+ type = GNUVariableDef.TYPE_RECURSIVE_EXPAND;
+ }
+ }
+ name = line.substring(0, separator).trim();
+ value.append(line.substring(index + 1).trim());
+ } else {
+ name = line;
+ }
+
+ if (isTargetVariable) {
+ vd = new TargetVariable(this, targetName, name, value, isOverride, type);
+ } else if (isOverride && isDefine) {
+ vd = new OverrideDefine(this, name, value);
+ } else if (isDefine) {
+ vd = new DefineVariable(this, name, value);
+ } else if (isOverride) {
+ vd = new OverrideVariable(this, name, value, type);
+ } else if (isExport) {
+ vd = new ExportVariable(this, name, value, type);
+ } else {
+ vd = new GNUVariableDef(this, name, value, type);
+ }
+ return vd;
+ }
+
+ protected StaticTargetRule[] parseStaticTargetRule(String line) {
+ // first colon: the Targets
+ String targetPattern;
+ String[] prereqPatterns;
+ String[] targets;
+ int colon = Util.indexOf(line, ':');
+ if (colon > 1) {
+ String targetLine = line.substring(0, colon).trim();
+ targets = PosixMakefileUtil.findTargets(targetLine);
+ // second colon: Target-Pattern
+ line = line.substring(colon + 1);
+ colon = Util.indexOf(line, ':');
+ if (colon != -1) {
+ targetPattern = line.substring(0, colon).trim();
+ line = line.substring(colon + 1);
+ StringTokenizer st = new StringTokenizer(line);
+ int count = st.countTokens();
+ prereqPatterns = new String[count];
+ for (int i = 0; i < count; i++) {
+ prereqPatterns[i] = st.nextToken();
+ }
+ } else {
+ targetPattern = ""; //$NON-NLS-1$
+ prereqPatterns = new String[0];
+ }
+ } else {
+ targets = new String[0];
+ targetPattern = ""; //$NON-NLS-1$
+ prereqPatterns = new String[0];
+ }
+
+ StaticTargetRule[] staticRules = new StaticTargetRule[targets.length];
+ for (int i = 0; i < targets.length; i++) {
+ staticRules[i] = new StaticTargetRule(this, new Target(targets[i]), targetPattern, prereqPatterns, new Command[0]);
+ }
+ return staticRules;
+ }
+
+ /**
+ * @param line
+ * @return
+ */
+ protected InferenceRule parseInferenceRule(String line) {
+ String tgt;
+ int index = Util.indexOf(line, ':');
+ if (index != -1) {
+ tgt = line.substring(0, index);
+ } else {
+ tgt = line;
+ }
+ return new InferenceRule(this, new Target(tgt));
+ }
+
+ public IDirective[] getDirectives(boolean expand) {
+ if (!expand) {
+ return getDirectives();
+ }
+ IDirective[] dirs = getDirectives();
+ ArrayList<IDirective> list = new ArrayList<IDirective>(Arrays.asList(dirs));
+ for (int i = 0; i < dirs.length; ++i) {
+ if (dirs[i] instanceof Include) {
+ Include include = (Include)dirs[i];
+ IDirective[] includedMakefiles = include.getDirectives();
+ for (int j = 0; j < includedMakefiles.length; ++j) {
+ IMakefile includedMakefile = (IMakefile)includedMakefiles[j];
+ list.addAll(Arrays.asList(includedMakefile.getDirectives()));
+ }
+ }
+ }
+ return (IDirective[]) list.toArray(new IDirective[list.size()]);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake.AbstractMakefile#getBuiltins()
+ */
+ public IDirective[] getBuiltins() {
+ if (builtins == null) {
+ String location = "builtin" + File.separator + "gnu.mk"; //$NON-NLS-1$ //$NON-NLS-2$
+ try {
+ InputStream stream = FileLocator.openStream(MakeCorePlugin.getDefault().getBundle(), new Path(location), false);
+ GNUAutomakefile gnu = new GNUAutomakefile();
+ URL url = FileLocator.find(MakeCorePlugin.getDefault().getBundle(), new Path(location), null);
+ url = FileLocator.resolve(url);
+ location = url.getFile();
+ gnu.parse(location, new InputStreamReader(stream));
+ builtins = gnu.getDirectives();
+ for (int i = 0; i < builtins.length; i++) {
+ if (builtins[i] instanceof MacroDefinition) {
+ ((MacroDefinition)builtins[i]).setFromDefault(true);
+ }
+ }
+ } catch (Exception e) {
+ //e.printStackTrace();
+ }
+ if (builtins == null) {
+ builtins = new IDirective[0];
+ }
+ }
+ return builtins;
+ }
+
+ public void setIncludeDirectories(String[] dirs) {
+ includeDirectories = dirs;
+ }
+
+ public String[] getIncludeDirectories() {
+ return includeDirectories;
+ }
+
+ /**
+ * Create an IMakefile using the given IMakefileReaderProvider to fetch
+ * contents by name.
+ *
+ * @param fileURI URI of main file
+ * @param makefileReaderProvider may be <code>null</code> for EFS IFileStore reading
+ */
+ public static IMakefile createMakefile(IFile file) throws CoreException {
+ URI fileURI = file.getLocationURI();
+ IMakefile makefile = null;
+ GNUAutomakefile gnu = new GNUAutomakefile();
+ ArrayList<String> includeList = new ArrayList<String>();
+ includeList.add(new Path(fileURI.getPath()).removeLastSegments(1).toString());
+ includeList.addAll(Arrays.asList(gnu.getIncludeDirectories()));
+ String[] includes = includeList.toArray(new String[includeList.size()]);
+ gnu.setIncludeDirectories(includes);
+ try {
+ final IFileStore store = EFS.getStore(fileURI);
+ final IFileInfo info = store.fetchInfo();
+ if (!info.exists() || info.isDirectory())
+ throw new IOException();
+
+ MakefileReader reader = new MakefileReader(new InputStreamReader(
+ store.openInputStream(EFS.NONE, null)));
+ gnu.parse(fileURI, reader);
+ } catch (IOException e) {
+ AutotoolsUIPlugin.log(e);
+ Status status = new Status(IStatus.ERROR, AutotoolsUIPlugin.PLUGIN_ID, e.getLocalizedMessage());
+ throw new CoreException(status);
+ }
+ makefile = gnu;
+ return makefile;
+ }
+
+ public static void main(String[] args) {
+ try {
+ String filename = "Makefile"; //$NON-NLS-1$
+ if (args.length == 1) {
+ filename = args[0];
+ }
+ GNUAutomakefile makefile = new GNUAutomakefile();
+ makefile.parse(filename);
+ IDirective[] directive = makefile.getDirectives();
+ for (int i = 0; i < directive.length; i++) {
+ //System.out.println("Rule[" + i +"]");
+ System.out.print(directive[i]);
+ }
+ } catch (IOException e) {
+ System.out.println(e);
+ }
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUMakefileConstants.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUMakefileConstants.java
new file mode 100644
index 0000000000..a9ccdfb231
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUMakefileConstants.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - modified for Automake editor usage
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+
+public class GNUMakefileConstants extends MakeFileConstants {
+ static final String CONDITIONAL_ELSE = "else"; //$NON-NLS-1$
+ static final String CONDITIONAL_IF = "if"; //$NON-NLS-1$
+ static final String AT_CONDITIONAL_IF = "@if"; //$NON-NLS-1$
+ static final String CONDITIONAL_IFNEQ = "ifneq"; //$NON-NLS-1$
+ static final String CONDITIONAL_IFNDEF = "ifndef"; //$NON-NLS-1$
+ static final String CONDITIONAL_IFEQ = "ifeq"; //$NON-NLS-1$
+ static final String CONDITIONAL_IFDEF = "ifdef"; //$NON-NLS-1$
+
+ static final String TERMINAL_ENDEF = "endef"; //$NON-NLS-1$
+ static final String TERMINAL_ENDIF = "endif"; //$NON-NLS-1$
+ static final String AT_TERMINAL_ENDIF = "@endif"; //$NON-NLS-1$
+
+ static final String DIRECTIVE_VPATH = "vpath"; //$NON-NLS-1$
+ static final String DIRECTIVE_UNEXPORT = "unexport"; //$NON-NLS-1$
+
+ static final String VARIABLE_DEFINE = "define"; //$NON-NLS-1$
+ static final String VARIABLE_EXPORT = "export"; //$NON-NLS-1$
+ static final String VARIABLE_OVERRIDE = "override"; //$NON-NLS-1$
+
+ static final String DIRECTIVE_INCLUDE = "include"; //$NON-NLS-1$
+
+ static final String RULE_DELETE_ON_ERROR = ".DELETE_ON_ERROR"; //$NON-NLS-1$
+ static final String RULE_PHONY = ".PHONY"; //$NON-NLS-1$
+ static final String RULE_SECONDARY = ".SECONDARY"; //$NON-NLS-1$
+ static final String RULE_LOW_RESOLUTION_TIME = ".LOW_RESOLUTION_TIME"; //$NON-NLS-1$
+ static final String RULE_NOT_PARALLEL = ".NOTPARALLEL"; //$NON-NLS-1$
+ static final String RULE_EXPORT_ALL_VARIABLES = ".EXPORT_ALL_VARIABLES"; //$NON-NLS-1$
+ static final String RULE_INTERMEDIATE = ".INTERMEDIATE"; //$NON-NLS-1$
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUMakefileUtil.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUMakefileUtil.java
new file mode 100644
index 0000000000..80a3c452a7
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUMakefileUtil.java
@@ -0,0 +1,233 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - modified for Automake editor usage
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+
+/**
+ * GNUMakefile
+ */
+public class GNUMakefileUtil extends PosixMakefileUtil {
+
+ public static boolean isInclude(String line) {
+ line = line.trim();
+ boolean isInclude = line.startsWith(GNUMakefileConstants.DIRECTIVE_INCLUDE) && line.length() > 7 && Character.isWhitespace(line.charAt(7));
+ boolean isDashInclude = line.startsWith("-" + GNUMakefileConstants.DIRECTIVE_INCLUDE) && line.length() > 8 && Character.isWhitespace(line.charAt(8)); //$NON-NLS-1$
+ boolean isSInclude = line.startsWith("s" + GNUMakefileConstants.DIRECTIVE_INCLUDE) && line.length() > 8 && Character.isWhitespace(line.charAt(8)); //$NON-NLS-1$
+ return isInclude || isDashInclude || isSInclude;
+ }
+
+ public static boolean isVPath(String line) {
+ line = line.trim();
+ return line.equals(GNUMakefileConstants.DIRECTIVE_VPATH) || line.startsWith(GNUMakefileConstants.DIRECTIVE_VPATH) && line.length() > 5 && Character.isWhitespace(line.charAt(5));
+ }
+
+ public static boolean isExport(String line) {
+ line = line.trim();
+ return line.equals(GNUMakefileConstants.VARIABLE_EXPORT) || line.startsWith(GNUMakefileConstants.VARIABLE_EXPORT) && line.length() > 6 && Character.isWhitespace(line.charAt(6));
+ }
+
+ public static boolean isUnExport(String line) {
+ line = line.trim();
+ return line.startsWith(GNUMakefileConstants.DIRECTIVE_UNEXPORT) && line.length() > 8 && Character.isWhitespace(line.charAt(8));
+ }
+
+ public static boolean isDefine(String line) {
+ line = line.trim();
+ return line.startsWith(GNUMakefileConstants.VARIABLE_DEFINE) && line.length() > 6 && Character.isWhitespace(line.charAt(6));
+ }
+
+ public static boolean isEndef(String line) {
+ return line.trim().equals(GNUMakefileConstants.TERMINAL_ENDEF);
+ }
+
+ public static boolean isOverride(String line) {
+ line = line.trim();
+ return line.startsWith(GNUMakefileConstants.VARIABLE_OVERRIDE) && line.length() > 8 && Character.isWhitespace(line.charAt(8));
+ }
+
+ public static boolean isIf(String line) {
+ line = line.trim();
+ return (line.startsWith(GNUMakefileConstants.CONDITIONAL_IF) && line.length() > 2 && Character.isWhitespace(line.charAt(2))) ||
+ (line.startsWith(GNUMakefileConstants.AT_CONDITIONAL_IF) && line.length() > 3 && Character.isWhitespace(line.charAt(3)));
+ }
+
+ public static boolean isIfeq(String line) {
+ line = line.trim();
+ return line.startsWith(GNUMakefileConstants.CONDITIONAL_IFEQ) && line.length() > 4 && Character.isWhitespace(line.charAt(4));
+ }
+
+ public static boolean isIfneq(String line) {
+ line = line.trim();
+ return line.startsWith(GNUMakefileConstants.CONDITIONAL_IFNEQ) && line.length() > 5 && Character.isWhitespace(line.charAt(5));
+ }
+
+ public static boolean isIfdef(String line) {
+ line = line.trim();
+ return line.startsWith(GNUMakefileConstants.CONDITIONAL_IFDEF) && line.length() > 5 && Character.isWhitespace(line.charAt(5));
+ }
+
+ public static boolean isIfndef(String line) {
+ line = line.trim();
+ return line.startsWith(GNUMakefileConstants.CONDITIONAL_IFNDEF) && line.length() > 6 && Character.isWhitespace(line.charAt(6));
+ }
+
+ public static boolean isElse(String line) {
+ return line.trim().equals(GNUMakefileConstants.CONDITIONAL_ELSE);
+ }
+
+ public static boolean isEndif(String line) {
+ return line.trim().equals(GNUMakefileConstants.TERMINAL_ENDIF) ||
+ line.trim().startsWith(GNUMakefileConstants.AT_TERMINAL_ENDIF);
+ }
+
+ public static boolean isOverrideDefine(String line) {
+ line = line.trim();
+ if (line.startsWith(GNUMakefileConstants.VARIABLE_OVERRIDE)) {
+ int i = 8;
+ while(i < line.length() && Character.isWhitespace(line.charAt(i))) {
+ i++;
+ }
+ if (line.startsWith(GNUMakefileConstants.VARIABLE_DEFINE, i)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public static boolean isTargetVariable(String line) {
+ line = line.trim();
+ int index = Util.indexOf(line, ':');
+ if (index > 1) {
+ line = line.substring(index + 1).trim();
+ int equal = Util.indexOf(line, '=');
+ if (equal > 1) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public static boolean isVariableDefinition(String line) {
+ return isOverrideDefine(line)
+ || isTargetVariable(line)
+ || isDefine(line)
+ || isOverride(line)
+ || isExport(line)
+ || isMacroDefinition(line);
+ }
+
+ /**
+ * @param line
+ * @return
+ */
+ public static boolean isStaticTargetRule(String line) {
+ line = line.trim();
+ int colon1 = Util.indexOf(line, ':');
+ if (colon1 > 0) {
+ // move pass colon1
+ line = line.substring(colon1 + 1);
+ int colon2 = Util.indexOf(line, ':');
+ // Catch operator "::" not a static pattern rule
+ return (colon2 > 0);
+ }
+ return false;
+ }
+
+ /**
+ * @param line
+ * @return
+ */
+ public static boolean isGNUTargetRule(String line) {
+ line = line.trim();
+ int colon = Util.indexOf(line, ':');
+ if (colon > 0) {
+ colon++;
+ // Catch VariableDefiniton with operator ":="
+ if (colon < line.length()) {
+ return line.charAt(colon) != '=';
+ }
+ return true;
+ }
+ return false;
+ }
+
+ public static boolean isPhonyRule(String line) {
+ line = line.trim();
+ int colon = Util.indexOf(line, ':');
+ if (colon > 0) {
+ line = line.substring(0, colon).trim();
+ return line.equals(GNUMakefileConstants.RULE_PHONY);
+ }
+ return false;
+ }
+
+ public static boolean isIntermediateRule(String line) {
+ line = line.trim();
+ int colon = Util.indexOf(line, ':');
+ if (colon > 0) {
+ line = line.substring(0, colon).trim();
+ return line.equals(GNUMakefileConstants.RULE_INTERMEDIATE);
+ }
+ return false;
+ }
+
+ public static boolean isSecondaryRule(String line) {
+ line = line.trim();
+ int colon = Util.indexOf(line, ':');
+ if (colon > 0) {
+ line = line.substring(0, colon).trim();
+ return line.equals(GNUMakefileConstants.RULE_SECONDARY);
+ }
+ return false;
+ }
+
+ public static boolean isDeleteOnErrorRule(String line) {
+ line = line.trim();
+ int colon = Util.indexOf(line, ':');
+ if (colon > 0) {
+ line = line.substring(0, colon).trim();
+ return line.equals(GNUMakefileConstants.RULE_DELETE_ON_ERROR);
+ }
+ return false;
+ }
+
+ public static boolean isLowResolutionTimeRule(String line) {
+ line = line.trim();
+ int colon = Util.indexOf(line, ':');
+ if (colon > 0) {
+ line = line.substring(0, colon).trim();
+ return line.equals(GNUMakefileConstants.RULE_LOW_RESOLUTION_TIME);
+ }
+ return false;
+ }
+
+ public static boolean isExportAllVariablesRule(String line) {
+ line = line.trim();
+ int colon = Util.indexOf(line, ':');
+ if (colon > 0) {
+ line = line.substring(0, colon).trim();
+ return line.equals(GNUMakefileConstants.RULE_EXPORT_ALL_VARIABLES);
+ }
+ return false;
+ }
+
+ public static boolean isNotParallelRule(String line) {
+ line = line.trim();
+ int colon = Util.indexOf(line, ':');
+ if (colon > 0) {
+ line = line.substring(0, colon).trim();
+ return line.equals(GNUMakefileConstants.RULE_NOT_PARALLEL);
+ }
+ return false;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUTargetRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUTargetRule.java
new file mode 100644
index 0000000000..22d698d232
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUTargetRule.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ */
+public class GNUTargetRule extends TargetRule {
+
+ String[] orderOnlyPrerequisites;
+ boolean doubleColon;
+
+ public GNUTargetRule(Directive parent, Target target, boolean double_colon, String[] normal_prereqs, String[] order_prereqs, Command[] commands) {
+ super(parent, target, normal_prereqs, commands);
+ orderOnlyPrerequisites = order_prereqs;
+ doubleColon = double_colon;
+ }
+
+ public boolean isDoubleColon() {
+ return doubleColon;
+ }
+
+ public String[] getNormalPrerequisites() {
+ return getPrerequisites();
+ }
+
+ public String[] getOrderOnlyPrerequisites() {
+ return orderOnlyPrerequisites;
+ }
+
+
+ /**
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append(getTarget().toString());
+ buffer.append(':');
+ String[] reqs = getNormalPrerequisites();
+ for (int i = 0; i < reqs.length; i++) {
+ buffer.append(' ').append(reqs[i]);
+ }
+ reqs = getOrderOnlyPrerequisites();
+ if (reqs.length > 0) {
+ buffer.append(" |"); //$NON-NLS-1$
+ for (int i = 0; i < reqs.length; i++) {
+ buffer.append(' ').append(reqs[i]);
+ }
+ }
+ buffer.append('\n');
+ ICommand[] cmds = getCommands();
+ for (int i = 0; i < cmds.length; i++) {
+ buffer.append(cmds[i].toString());
+ }
+ return buffer.toString();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUVariableDef.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUVariableDef.java
new file mode 100644
index 0000000000..b7abd541ed
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/GNUVariableDef.java
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - Refactor name
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ */
+public class GNUVariableDef extends MacroDefinition implements IVariableDefinition {
+
+ /**
+ * ? is Conditional
+ * : is Simply-expanded
+ * + is append
+ * 0 is recursively-expanded.
+ */
+ final static int TYPE_RECURSIVE_EXPAND = 0;
+ final static int TYPE_SIMPLE_EXPAND = ':';
+ final static int TYPE_CONDITIONAL = '?';
+ final static int TYPE_APPEND = '+';
+ int type;
+ String varTarget;
+
+ public GNUVariableDef(Directive parent, String name, StringBuffer value) {
+ this(parent, name, value, TYPE_RECURSIVE_EXPAND);
+ }
+
+ public GNUVariableDef(Directive parent, String name, StringBuffer value, int type) {
+ this(parent, "", name, value, type); //$NON-NLS-1$
+ }
+
+ public GNUVariableDef(Directive parent, String target, String name, StringBuffer value, int type) {
+ super(parent, name, value);
+ varTarget = target;
+ this.type = type;
+ }
+
+ /**
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ StringBuffer sb = new StringBuffer();
+ if (isTargetSpecific()) {
+ sb.append(getTarget()).append(": "); //$NON-NLS-1$
+ }
+ if (isOverride()) {
+ sb.append(GNUMakefileConstants.VARIABLE_OVERRIDE);
+ }
+ if (isMultiLine()) {
+ sb.append(GNUMakefileConstants.VARIABLE_DEFINE);
+ sb.append(' ');
+ sb.append(getName()).append('\n');
+ sb.append(getValue()).append('\n');
+ sb.append(GNUMakefileConstants.TERMINAL_ENDEF);
+ sb.append('\n');
+ } else {
+ if (isExport()) {
+ sb.append(GNUMakefileConstants.VARIABLE_EXPORT);
+ sb.append(' ');
+ }
+ sb.append(getName());
+ if (isRecursivelyExpanded()) {
+ sb.append(" = "); //$NON-NLS-1$
+ } else if (isSimplyExpanded()) {
+ sb.append(" := "); //$NON-NLS-1$
+ } else if (isConditional()) {
+ sb.append(" ?= "); //$NON-NLS-1$
+ } else if (isAppend()) {
+ sb.append(" += "); //$NON-NLS-1$
+ }
+ sb.append(getValue()).append('\n');
+ }
+ return sb.toString();
+ }
+
+ public boolean isRecursivelyExpanded() {
+ return type == TYPE_RECURSIVE_EXPAND;
+ }
+
+ public boolean isSimplyExpanded() {
+ return type == TYPE_SIMPLE_EXPAND;
+ }
+
+ public boolean isConditional() {
+ return type == TYPE_CONDITIONAL;
+ }
+
+ public boolean isAppend() {
+ return type == TYPE_APPEND;
+ }
+
+ public boolean isTargetSpecific() {
+ String t = getTarget();
+ return t != null && t.length() > 0;
+ }
+
+ public boolean isExport() {
+ return false;
+ }
+
+ public boolean isMultiLine() {
+ return false;
+ }
+
+ /**
+ * Variable from an `override' directive.
+ */
+ public boolean isOverride() {
+ return false;
+ }
+
+ /**
+ * Automatic variable -- cannot be set.
+ */
+ public boolean isAutomatic() {
+ return false;
+ }
+
+ public String getTarget() {
+ return varTarget;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IArchiveTarget.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IArchiveTarget.java
new file mode 100644
index 0000000000..c368bd9410
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IArchiveTarget.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * IArchiveTarget
+ * Archive files, are files maintained by the program "ar".
+ * They contain objects, the members of the Archive.
+ * For example:
+ * foolib(hack.o) : hack.o
+ * ar cr foolib hack.o
+ * ArchiveTarget(member) -- foolib(hack.o);
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IArchiveTarget extends ITarget {
+
+ /**
+ * Returns the members the point by archive target.
+ * @return String
+ */
+ String[] getMembers();
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IAutomakeConditional.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IAutomakeConditional.java
new file mode 100644
index 0000000000..623d72b570
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IAutomakeConditional.java
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+public interface IAutomakeConditional {
+
+ public boolean isAutomake();
+ public void setAutomake(boolean value);
+ public Rule[] getRules();
+ public void setRules(Rule[] rules);
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IBadDirective.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IBadDirective.java
new file mode 100644
index 0000000000..8212945072
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IBadDirective.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * Represent an error in the makefile syntax
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IBadDirective {
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ICommand.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ICommand.java
new file mode 100644
index 0000000000..444038b1a0
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ICommand.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.io.File;
+import java.io.IOException;
+
+
+/**
+ * ICommand
+ * Commands are associated with a rule and executed by
+ * the make program when building a target.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface ICommand extends IDirective {
+
+ final public static char HYPHEN = '-';
+
+ final public static String HYPHEN_STRING = "-"; //$NON-NLS-1$
+
+ final public static char AT = '@';
+
+ final public static String AT_STRING = "@"; //$NON-NLS-1$
+
+ final public static char PLUS = '+';
+
+ final public static String PLUS_STRING = "+"; //$NON-NLS-1$
+
+ final public static char TAB = '\t';
+
+ /**
+ * - If the command prefix contains a hyphen, or the -i option is
+ * present, or the special target .IGNORE has either the current
+ * target as a prerequisite or has no prerequisites, any error
+ * found while executing the command will be ignored.
+ */
+ boolean shouldIgnoreError();
+
+ /**
+ * @ If the command prefix contains an at sign and the
+ * command-line -n option is not specified, or the -s option is
+ * present, or the special target .SILENT has either the current
+ * target as a prerequisite or has no prerequisites, the command
+ * will not be written to standard output before it is executed.
+ */
+ boolean shouldBeSilent();
+
+ /**
+ * + If the command prefix contains a plus sign, this indicates a
+ * command line that will be executed even if -n, -q or -t is
+ * specified.
+ */
+ boolean shouldExecute();
+
+
+ /**
+ * Executes the command in a separate process with the
+ * specified environment and working directory.
+ *
+ */
+ Process execute(String shell, String[] envp, File dir) throws IOException;
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IComment.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IComment.java
new file mode 100644
index 0000000000..bb99ac0b09
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IComment.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * Comments start with '#' and until the end of the line.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IComment extends IDirective {
+
+ final public static char POUND = '#';
+
+ final public static String POUND_STRING = "#"; //$NON-NLS-1$
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IConditional.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IConditional.java
new file mode 100644
index 0000000000..13e241f8ab
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IConditional.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IConditional extends IDirective {
+
+ String getConditional();
+
+ String getArg1();
+
+ String getArg2();
+
+ boolean isIfdef();
+
+ boolean isIfndef();
+
+ boolean isIfeq();
+
+ boolean isIfneq();
+
+ boolean isElse();
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IDefaultRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IDefaultRule.java
new file mode 100644
index 0000000000..62024ec99a
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IDefaultRule.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .DEFAULT
+ * If the makefile uses this special target, the application shall ensure that it is
+ * specified with commands, but without prerequisites.
+ * The commands shall be used by make if there are no other rules available to build a target.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IDefaultRule extends ISpecialRule {
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IDeleteOnErrorRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IDeleteOnErrorRule.java
new file mode 100644
index 0000000000..fc6113d65e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IDeleteOnErrorRule.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .DELETE_ON_ERROR'
+ * If `.DELETE_ON_ERROR' is mentioned as a target anywhere in the
+ * makefile, then `make' will delete the target of a rule if it has
+ * changed and its commands exit with a nonzero exit status, just as
+ * it does when it receives a signal.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IDeleteOnErrorRule extends ISpecialRule {
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IDirective.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IDirective.java
new file mode 100644
index 0000000000..a8e4efeea3
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IDirective.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * A Makefile can contain rules, macro definitons and comments.
+ * They are call directives.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IDirective {
+
+ /**
+ * @return the parent of this directive, null if none.
+ */
+ IDirective getParent();
+
+ /**
+ * @return the starting line number of this directive.
+ * The numbering starts at 1 .i.e the first line is not 0
+ */
+ int getStartLine();
+
+ /**
+ * @return the ending line number of this directive.
+ * The numbering starts at 1 .i.e the first line is not 0
+ */
+ int getEndLine();
+
+ /**
+ * Returns the makefile where the directive was found.
+ *
+ * @return <code>IMakefile</code>
+ */
+ IMakefile getMakefile();
+
+ String toString();
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IEmptyLine.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IEmptyLine.java
new file mode 100644
index 0000000000..f8c95486d8
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IEmptyLine.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * IEmptyLine
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IEmptyLine extends IDirective {
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IExportAllVariablesRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IExportAllVariablesRule.java
new file mode 100644
index 0000000000..8b621a4858
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IExportAllVariablesRule.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .EXPORT_ALL_VARIABLES
+ * Simply by being mentioned as a target, this tells `make' to export
+ * all variables to child processes by default.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IExportAllVariablesRule extends ISpecialRule {
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IGNUMakefile.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IGNUMakefile.java
new file mode 100644
index 0000000000..bda1d48d6c
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IGNUMakefile.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IGNUMakefile extends IMakefile {
+
+ /**
+ * Set the search include directories for the
+ * "include" directive
+ */
+ void setIncludeDirectories(String[] paths);
+
+ /**
+ * @return the include directories search paths.
+ */
+ String[] getIncludeDirectories();
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IIgnoreRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IIgnoreRule.java
new file mode 100644
index 0000000000..2746fa6094
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IIgnoreRule.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .IGNORE
+ * Prerequisites of this special target are targets themselves; this shall cause errors
+ * from commands associated with them to be ignored in the same manner as specified by the -i option.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IIgnoreRule extends ISpecialRule {
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IInclude.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IInclude.java
new file mode 100644
index 0000000000..59699f02a5
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IInclude.java
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IInclude extends IParent {
+ String[] getFilenames();
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IInferenceRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IInferenceRule.java
new file mode 100644
index 0000000000..0d1545a581
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IInferenceRule.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * IInferenceRules are formated as follows:
+ * target:
+ * <tab>command
+ * [<tab>command]
+ *
+ * The target is of the form .s2 or .s1.s2
+ * There are no prerequisites.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IInferenceRule extends IRule {
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IIntermediateRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IIntermediateRule.java
new file mode 100644
index 0000000000..2f46aa4bea
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IIntermediateRule.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .INTERMEDIATE
+ * The targets which `.INTERMEDIATE' depends on are treated as intermediate files.
+ * `.INTERMEDIATE' with no prerequisites has no effect.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IIntermediateRule extends ISpecialRule {
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ILowResolutionTimeRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ILowResolutionTimeRule.java
new file mode 100644
index 0000000000..60e47729e7
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ILowResolutionTimeRule.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .LOW_RESOLUTION_TIME
+ * If you specify prerequisites for `.LOW_RESOLUTION_TIME', `make'
+ * assumes that these files are created by commands that generate low
+ * resolution time stamps.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface ILowResolutionTimeRule extends ISpecialRule {
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMacroDefinition.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMacroDefinition.java
new file mode 100644
index 0000000000..c6a944f90e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMacroDefinition.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * IMacroDefinitions are in the form:
+ * string1 = [string2]
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IMacroDefinition extends IDirective {
+
+ /**
+ * @return the name of the macro
+ */
+ String getName();
+
+ /**
+ * @return the value of the macro
+ */
+ StringBuffer getValue();
+
+ /**
+ * @return the macro is a built-in
+ */
+ boolean isFromDefault();
+
+ /**
+ * @return the macro was found in a Makefile.
+ *
+ */
+ boolean isFromMakefile();
+
+ /**
+ * @return the macro came from the environment.
+ */
+ boolean isFromEnviroment();
+
+ /**
+ * The macro came from the make command option -e
+ */
+ boolean isFromEnvironmentOverride();
+
+ /**
+ * @return the macro was pass from an option to make.
+ */
+ boolean isFromCommand();
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefile.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefile.java
new file mode 100644
index 0000000000..101131089f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefile.java
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.net.URI;
+
+
+/**
+ * IMakefile:
+ *
+ * Makefile : ( directive ) *
+ * directive : rule | macro_definition | comments | empty
+ * rule : inference_rule | target_rule | special_rule
+ * inference_rule : target ':' [ ';' command ] <nl>
+ * [ ( command ) * ]
+ * target_rule : [ ( target ) + ] ':' [ ( prerequisite ) * ] [ ';' command ] <nl>
+ * [ ( command ) * ]
+ * macro_definition : string '=' ( string )*
+ * comments : ('#' ( string ) <nl>) *
+ * empty : <nl>
+ * command : <tab> prefix_command string <nl>
+ * target : string
+ * prefix_command : '-' | '@' | '+'
+ * internal_macro : "$<" | "$*" | "$@" | "$?" | "$%"
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IMakefile extends IParent {
+
+ /**
+ * ITargetRule | IInferenceRule | ISpecialRule
+ */
+ IRule[] getRules();
+
+ /**
+ * @return the IRule for target.
+ */
+ IRule[] getRules(String target);
+
+ /**
+ * @return IInferenceRule
+ *
+ */
+ IInferenceRule[] getInferenceRules();
+
+ /**
+ * @return the IInferenceRules for target.
+ */
+ IInferenceRule[] getInferenceRules(String target);
+
+ /**
+ * @return ITargetRule
+ */
+ ITargetRule[] getTargetRules();
+
+ /**
+ * @return the ITargetRules for name.
+ */
+ ITargetRule[] getTargetRules(String target);
+
+ /**
+ * @return the IMacroDefinitions.
+ */
+ IMacroDefinition[] getMacroDefinitions();
+
+ /**
+ * @return the IMacroDefinitions for name.
+ */
+ IMacroDefinition[] getMacroDefinitions(String name);
+
+ /**
+ * @return all the built-in directives.
+ */
+ IDirective[] getBuiltins();
+
+ /**
+ * @return all the built-in MacroDefintions
+ */
+ IMacroDefinition[] getBuiltinMacroDefinitions();
+
+ /**
+ * @return the built-in macro definition for name.
+ */
+ IMacroDefinition[] getBuiltinMacroDefinitions(String name);
+
+ /**
+ * @return line after expanding any macros.
+ */
+ String expandString(String line);
+
+ /**
+ * @return line after expanding any macros.
+ *
+ * @param line - line to expand
+ * @param recursive - if true recursively expand.
+ */
+ String expandString(String line, boolean recursive);
+
+ /**
+ * @return the makefile Reader provider used to create this makefile or <code>null</code>
+ */
+ IMakefileReaderProvider getMakefileReaderProvider();
+
+ /**
+ * Clear all statements and (re)parse the Makefile
+ */
+ void parse(String filePath, Reader makefile) throws IOException;
+
+ /**
+ * Clear all statements and (re)parse the Makefile
+ */
+ void parse(URI fileURI, Reader makefile) throws IOException;
+
+ /**
+ * Clear the all statements and (re)parse the Makefile
+ * using the given makefile Reader provider
+ *
+ * @param makefileReaderProvider provider, or <code>null</code> to use a FileReader
+ */
+ void parse(URI fileURI, IMakefileReaderProvider makefileReaderProvider) throws IOException;
+
+
+ /**
+ * @return the <code>URI</code> of this makefile
+ */
+ URI getFileURI();
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefileDocumentProvider.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefileDocumentProvider.java
new file mode 100644
index 0000000000..6a47fb4754
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefileDocumentProvider.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+/*
+ */
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.ui.texteditor.IDocumentProvider;
+
+/**
+ */
+public interface IMakefileDocumentProvider extends IDocumentProvider {
+
+ /**
+ * Shuts down this provider.
+ */
+ void shutdown();
+
+ /**
+ * Returns the working copy for the given element.
+ *
+ * @param element the element
+ * @return the working copy for the given element
+ */
+ IMakefile getWorkingCopy(Object element);
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefileEditorActionDefinitionIds.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefileEditorActionDefinitionIds.java
new file mode 100644
index 0000000000..c0c36c6f1b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefileEditorActionDefinitionIds.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+
+/**
+ */
+public interface IMakefileEditorActionDefinitionIds {
+
+ final String UNCOMMENT = "org.eclipse.cdt.make.ui.edit.text.makefile.uncomment"; //$NON-NLS-1$
+
+ final String COMMENT = "org.eclipse.cdt.make.ui.edit.text.makefile.comment"; //$NON-NLS-1$
+
+ final String OPEN_DECLARATION = "org.eclipse.cdt.make.ui.edit.text.makefile.opendcl"; //$NON-NLS-1$
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefileReaderProvider.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefileReaderProvider.java
new file mode 100644
index 0000000000..8a83c30b72
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefileReaderProvider.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Nokia 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:
+ * Nokia (Ed Swartz) - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.net.URI;
+
+/**
+ * Provide an abstraction to loading the contents of a makefile
+ * @author eswartz
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IMakefileReaderProvider {
+ /**
+ * Get a reader for the contents of the file at filename.
+ * @param fileURI the file to read. It's up to the implementation how to read
+ * it, but usually EFS.getFileStore(fileURI).getInputStream(...) is the best bet.
+ * @return Reader a reader for the contents of the existing file
+ * @throws IOException if the file cannot be found according to the implementation
+ */
+ Reader getReader(URI fileURI) throws IOException;
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefileValidator.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefileValidator.java
new file mode 100644
index 0000000000..47ac0aaea8
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IMakefileValidator.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.cdt.core.IMarkerGenerator;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+/**
+ * @author alain
+ *
+ * To change the template for this generated type comment go to
+ * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IMakefileValidator {
+ public abstract void setMarkerGenerator(IMarkerGenerator errorHandler);
+ public abstract void checkFile(IFile file, IProgressMonitor monitor);
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/INotParallelRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/INotParallelRule.java
new file mode 100644
index 0000000000..cab8ecd9fc
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/INotParallelRule.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .NOTPARALLEL
+ * If `.NOTPARALLEL' is mentioned as a target, then this invocation of
+ * `make' will be run serially, even if the `-j' option is given.
+ * Any recursively invoked `make' command will still be run in
+ * parallel (unless its makefile contains this target). Any
+ * prerequisites on this target are ignored.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface INotParallelRule extends ISpecialRule {
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IParent.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IParent.java
new file mode 100644
index 0000000000..6738c56cac
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IParent.java
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IParent extends IDirective {
+ IDirective[] getDirectives();
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IPhonyRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IPhonyRule.java
new file mode 100644
index 0000000000..9efbcf09b3
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IPhonyRule.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .PHONY
+ * The prerequisites of the special target `.PHONY' are considered to be phony targets.
+ * When it is time to consider such a target, `make' will run its commands unconditionally, regardless of
+ * whether a file with that name exists or what its last-modification time is.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IPhonyRule extends ISpecialRule {
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IPosixRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IPosixRule.java
new file mode 100644
index 0000000000..28e8a55142
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IPosixRule.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .POSIX
+ * The application shall ensure that this special target is specified without
+ * prerequisites or commands.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IPosixRule extends ISpecialRule {
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IPreciousRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IPreciousRule.java
new file mode 100644
index 0000000000..caa8bffd82
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IPreciousRule.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .PRECIOUS
+ * Prerequisites of this special target shall not be removed if make recieves an
+ * asynchronous events.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IPreciousRule extends ISpecialRule {
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IReconcilingParticipant.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IReconcilingParticipant.java
new file mode 100644
index 0000000000..783dff819d
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IReconcilingParticipant.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * IReconcilingParticipant
+ * Interface of an object participating in reconciling.
+ */
+public interface IReconcilingParticipant {
+
+ /**
+ * Called after reconciling has been finished.
+ */
+ void reconciled();
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IRule.java
new file mode 100644
index 0000000000..8ead17c15c
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IRule.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * There are several kinds of rules: Inference rules, target rules
+ * Some make provides special rules for example:
+ * .DEFAULT, .IGNORE etc ...
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IRule extends IParent {
+ /**
+ * @return Array of command for the rule.
+ */
+ ICommand[] getCommands();
+
+ /**
+ * @return The rule target name.
+ *
+ */
+ ITarget getTarget();
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISccsGetRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISccsGetRule.java
new file mode 100644
index 0000000000..caee3f0946
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISccsGetRule.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .SCCS_GET
+ * The application shall ensure that this special target is specified without prerequesites.
+ * The commands specified with this target shall replace the default
+ * commands associated with this special target.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface ISccsGetRule extends ISpecialRule {
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISecondaryRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISecondaryRule.java
new file mode 100644
index 0000000000..6c69913971
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISecondaryRule.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .SECONDARY
+ * The targets which `.SECONDARY' depends on are treated as
+ * intermediate files, except that they are never automatically deleted.
+ *
+ * `.SECONDARY' with no prerequisites causes all targets to be treated
+ * as secondary (i.e., no target is removed because it is considered intermediate).
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface ISecondaryRule extends ISpecialRule {
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISelectionValidator.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISelectionValidator.java
new file mode 100644
index 0000000000..38984ea6cf
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISelectionValidator.java
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * QNX Software System
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+public interface ISelectionValidator {
+ void isValid(Object[] selection, StatusInfo res);
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISilentRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISilentRule.java
new file mode 100644
index 0000000000..37bc9b3b32
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISilentRule.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .SILENT
+ * Prerequisites of this special target are targets themselves; this shall case
+ * commands associated with them not to be written to the standard output before
+ * they are executed.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface ISilentRule extends ISpecialRule {
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISpecialRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISpecialRule.java
new file mode 100644
index 0000000000..1c009b3f1d
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISpecialRule.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * Target rule that have special meaning for Make.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface ISpecialRule extends IRule {
+
+ /**
+ * The meaning of the prerequistes are specific to
+ * each rules.
+ */
+ String[] getPrerequisites();
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISuffixesRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISuffixesRule.java
new file mode 100644
index 0000000000..f617f4ef6b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ISuffixesRule.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .SUFFIXES
+ * Prerequesites of .SUFFIXES shall be appended to the list of known suffixes and are
+ * used in conjunction with the inference rules.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface ISuffixesRule extends ISpecialRule {
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ITarget.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ITarget.java
new file mode 100644
index 0000000000..85df73c56c
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ITarget.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface ITarget {
+
+ String toString();
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ITargetRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ITargetRule.java
new file mode 100644
index 0000000000..7fde2c3923
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ITargetRule.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface ITargetRule extends IRule {
+
+ String[] getPrerequisites();
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ITerminal.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ITerminal.java
new file mode 100644
index 0000000000..0a93e5ca05
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ITerminal.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * ITerminal finish a block.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface ITerminal extends IDirective {
+
+ boolean isEndef();
+
+ boolean isEndif();
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ITranslationUnitEditorInput.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ITranslationUnitEditorInput.java
new file mode 100644
index 0000000000..33db78b5d0
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ITranslationUnitEditorInput.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.ui.IStorageEditorInput;
+import org.eclipse.ui.editors.text.ILocationProvider;
+
+/**
+ * ITranslationUnitEditorInput
+ */
+public interface ITranslationUnitEditorInput extends IStorageEditorInput, ILocationProvider {
+
+ ITranslationUnit getTranslationUnit();
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IUnExport.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IUnExport.java
new file mode 100644
index 0000000000..eb4e5ff98f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IUnExport.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IUnExport extends IDirective {
+
+ String getVariable();
+}
+
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IVPath.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IVPath.java
new file mode 100644
index 0000000000..a75504a3ea
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IVPath.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IVPath extends IDirective {
+
+ String[] getDirectories();
+
+ String getPattern();
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IVariableDefinition.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IVariableDefinition.java
new file mode 100644
index 0000000000..99bc0fee2e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IVariableDefinition.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ */
+/**
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IVariableDefinition extends IMacroDefinition {
+
+ boolean isRecursivelyExpanded();
+
+ boolean isSimplyExpanded();
+
+ boolean isConditional();
+
+ boolean isAppend();
+
+ boolean isTargetSpecific();
+
+ boolean isExport();
+
+ boolean isMultiLine();
+
+ /**
+ * Variable from an `override' directive.
+ */
+ boolean isOverride();
+
+ /**
+ * Automatic variable -- cannot be set.
+ */
+ boolean isAutomatic();
+ String getTarget();
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IWorkingCopyManager.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IWorkingCopyManager.java
new file mode 100644
index 0000000000..2d66513ab8
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IWorkingCopyManager.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.core.runtime.CoreException;
+
+import org.eclipse.ui.IEditorInput;
+
+/**
+ * Interface for accessing working copies of <code>IMakefile</code>
+ * objects. The original unit is only given indirectly by means
+ * of an <code>IEditorInput</code>. The life cycle is as follows:
+ * <ul>
+ * <li> <code>connect</code> creates and remembers a working copy of the
+ * unit which is encoded in the given editor input</li>
+ * <li> <code>getWorkingCopy</code> returns the working copy remembered on
+ * <code>connect</code></li>
+ * <li> <code>disconnect</code> destroys the working copy remembered on
+ * <code>connect</code></li>
+ * </ul>
+ * <p>
+ * This interface is not intended to be implemented by clients.
+ * </p>
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IWorkingCopyManager {
+
+ /**
+ * Connects the given editor input to this manager. After calling
+ * this method, a working copy will be available for the compilation unit encoded
+ * in the given editor input (does nothing if there is no encoded compilation unit).
+ *
+ * @param input the editor input
+ * @exception CoreException if the working copy cannot be created for the
+ * unit
+ */
+ void connect(IEditorInput input) throws CoreException;
+
+ /**
+ * Disconnects the given editor input from this manager. After calling
+ * this method, a working copy for the compilation unit encoded
+ * in the given editor input will no longer be available. Does nothing if there
+ * is no encoded compilation unit, or if there is no remembered working copy for
+ * the compilation unit.
+ *
+ * @param input the editor input
+ */
+ void disconnect(IEditorInput input);
+
+ /**
+ * Returns the working copy remembered for the compilation unit encoded in the
+ * given editor input.
+ *
+ * @param input the editor input
+ * @return the working copy of the compilation unit, or <code>null</code> if the
+ * input does not encode an editor input, or if there is no remembered working
+ * copy for this compilation unit
+ */
+ IMakefile getWorkingCopy(IEditorInput input);
+
+ /**
+ * Shuts down this working copy manager. All working copies still remembered
+ * by this manager are destroyed.
+ */
+ void shutdown();
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IWorkingCopyManagerExtension.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IWorkingCopyManagerExtension.java
new file mode 100644
index 0000000000..189865d74a
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IWorkingCopyManagerExtension.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.ui.IEditorInput;
+
+/**
+ * Extension interface for <code>IWorkingCopyManager</code>.
+ * @since 2.1
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IWorkingCopyManagerExtension {
+
+ /**
+ * Sets the given working copy for the given editor input. If the given editor input
+ * is not connected to this working copy manager, this call has no effect. <p>
+ * This working copy manager does not assume the ownership of this working copy, i.e.,
+ * the given working copy is not automatically be freed when this manager is shut down.
+ *
+ * @param input the editor input
+ * @param workingCopy the working copy
+ */
+ void setWorkingCopy(IEditorInput input, IMakefile workingCopy);
+
+ /**
+ * Removes the working copy set for the given editor input. If there is no
+ * working copy set for this input or this input is not connected to this
+ * working copy manager, this call has no effect.
+ *
+ * @param input the editor input
+ */
+ void removeWorkingCopy(IEditorInput input);
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/If.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/If.java
new file mode 100644
index 0000000000..9bbcf8012f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/If.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - modified to be If class
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.io.File;
+import java.io.IOException;
+
+public class If extends Conditional implements IAutomakeConditional, ICommand {
+ private static final String EMPTY = ""; //$NON-NLS-1$
+ private Rule rules[] = null;
+
+ public If(Directive parent, Rule[] rules, String var) {
+ super(parent, var, EMPTY, EMPTY);
+ if (rules != null) {
+ this.rules = new Rule[rules.length];
+ System.arraycopy(rules, 0, this.rules, 0, rules.length);
+ }
+ }
+
+ public Rule[] getRules() {
+ return rules;
+ }
+
+ public void setRules(Rule[] rules) {
+ this.rules = rules;
+ }
+
+ public boolean isIf() {
+ return true;
+ }
+
+ public boolean isAutomake() {
+ return true;
+ }
+
+ public void setAutomake(boolean value) {
+ // ignore value
+ }
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IF);
+ sb.append(' ').append(getVariable());
+ return sb.toString();
+ }
+
+ public String getVariable() {
+ return getConditional();
+ }
+
+ // ICommand methods so Automake if can be a child of an IRule
+ public Process execute(String shell, String[] envp, File dir)
+ throws IOException {
+ return null;
+ }
+
+ public boolean shouldBeSilent() {
+ return false;
+ }
+
+ public boolean shouldIgnoreError() {
+ return false;
+ }
+
+ public boolean shouldExecute() {
+ return false;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Ifdef.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Ifdef.java
new file mode 100644
index 0000000000..f1e9dfb987
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Ifdef.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+
+public class Ifdef extends Conditional {
+ private static final String EMPTY = ""; //$NON-NLS-1$
+
+ public Ifdef(Directive parent, String var) {
+ super(parent, var, EMPTY, EMPTY);
+ }
+
+ public boolean isIfdef() {
+ return true;
+ }
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFDEF);
+ sb.append(' ').append(getVariable());
+ return sb.toString();
+ }
+
+ public String getVariable() {
+ return getConditional();
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Ifeq.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Ifeq.java
new file mode 100644
index 0000000000..ea02665997
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Ifeq.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+
+public class Ifeq extends Conditional {
+
+ public Ifeq(Directive parent, String cond) {
+ super(parent, cond);
+ }
+
+ public boolean isIfeq() {
+ return true;
+ }
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFEQ);
+ sb.append(' ').append(getConditional());
+ return sb.toString();
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Ifndef.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Ifndef.java
new file mode 100644
index 0000000000..336765b4a9
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Ifndef.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+
+public class Ifndef extends Conditional {
+
+ private static final String EMPTY = ""; //$NON-NLS-1$
+ public Ifndef(Directive parent, String var) {
+ super(parent, var, EMPTY, EMPTY);
+ }
+
+ public boolean isIfndef() {
+ return true;
+ }
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFNDEF);
+ sb.append(' ').append(getVariable());
+ return sb.toString();
+ }
+
+ public String getVariable() {
+ return getConditional();
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Ifneq.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Ifneq.java
new file mode 100644
index 0000000000..fa02a125ad
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Ifneq.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+
+public class Ifneq extends Conditional {
+
+ public Ifneq(Directive parent, String cond) {
+ super(parent, cond);
+ }
+
+ public boolean isIfneq() {
+ return true;
+ }
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFNEQ);
+ sb.append(' ').append(getConditional());
+ return sb.toString();
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IgnoreRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IgnoreRule.java
new file mode 100644
index 0000000000..c8ad68276b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IgnoreRule.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .IGNORE
+ * Prerequisites of this special target are targets themselves; this shall cause errors
+ * from commands associated with them to be ignored in the same manner as
+ * specified by the -i option.
+ */
+public class IgnoreRule extends SpecialRule implements IIgnoreRule {
+
+ public IgnoreRule(Directive parent, String[] reqs) {
+ super(parent, new Target(MakeFileConstants.RULE_IGNORE), reqs, new Command[0]);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Include.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Include.java
new file mode 100644
index 0000000000..35dc3a6378
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Include.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.io.IOException;
+
+public class Include extends Parent implements IInclude {
+
+ String[] filenames;
+ String[] dirs;
+
+ public Include(Directive parent, String[] files, String[] directories) {
+ super(parent);
+ filenames = files;
+ dirs = directories;
+ }
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer(GNUMakefileConstants.DIRECTIVE_INCLUDE);
+ for (int i = 0; i < filenames.length; i++) {
+ sb.append(' ').append(filenames[i]);
+ }
+ return sb.toString();
+ }
+
+ public String[] getFilenames() {
+ return filenames;
+ }
+
+ public IDirective[] getDirectives() {
+ clearDirectives();
+ for (int i = 0; i < filenames.length; i++) {
+ // Try the current directory.
+ GNUAutomakefile gnu = new GNUAutomakefile();
+ try {
+ gnu.parse(filenames[i]);
+ addDirective(gnu);
+ continue;
+ } catch (IOException e) {
+ }
+ if (!filenames[i].startsWith(GNUAutomakefile.FILE_SEPARATOR) && dirs != null) {
+ for (int j = 0; j < dirs.length; j++) {
+ try {
+ String filename = dirs[j] + GNUAutomakefile.FILE_SEPARATOR + filenames[i];
+ gnu = new GNUAutomakefile();
+ gnu.parse(filename);
+ addDirective(gnu);
+ break;
+ } catch (IOException e) {
+ }
+ }
+ }
+ }
+ return super.getDirectives();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/InferenceRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/InferenceRule.java
new file mode 100644
index 0000000000..275d17e405
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/InferenceRule.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+public class InferenceRule extends Rule {
+
+ public InferenceRule(Directive parent, Target target) {
+ this(parent, target, new Command[0]);
+ }
+
+ public InferenceRule(Directive parent, String tgt, Command[] cmds) {
+ this(parent, new Target(tgt), cmds);
+ }
+
+ public InferenceRule(Directive parent, Target target, Command[] cmds) {
+ super(parent, target, cmds);
+ }
+
+ /**
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append(getTarget().toString()).append(":\n"); //$NON-NLS-1$
+ ICommand[] cmds = getCommands();
+ for (int i = 0; i < cmds.length; i++) {
+ buffer.append(cmds[i].toString());
+ }
+ return buffer.toString();
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IntermediateRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IntermediateRule.java
new file mode 100644
index 0000000000..44fee5a2f7
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/IntermediateRule.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+
+/**
+ * .INTERMEDIATE
+ * The targets which `.INTERMEDIATE' depends on are treated as intermediate files.
+ * `.INTERMEDIATE' with no prerequisites has no effect.
+ */
+public class IntermediateRule extends SpecialRule implements IIntermediateRule {
+
+ public IntermediateRule(Directive parent, String[] reqs) {
+ super(parent, new Target(GNUMakefileConstants.RULE_INTERMEDIATE), reqs, new Command[0]);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/LexicalSortingAction.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/LexicalSortingAction.java
new file mode 100644
index 0000000000..fc15565ae9
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/LexicalSortingAction.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * QNX Software System
+ * Red Hat Inc. - convert to use with Automake editor
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.ViewerSorter;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.MakeUIImages;
+
+
+
+public class LexicalSortingAction extends Action {
+
+ private static final String ACTION_NAME= "LexicalSortingAction"; //$NON-NLS-1$
+ private static final String DIALOG_STORE_KEY= ACTION_NAME + ".sort"; //$NON-NLS-1$
+
+ private LexicalCSorter fSorter;
+ private TreeViewer fTreeViewer;
+
+ public LexicalSortingAction(TreeViewer treeViewer) {
+ super(CUIPlugin.getResourceString(ACTION_NAME + ".label")); //$NON-NLS-1$
+
+ setDescription(CUIPlugin.getResourceString(ACTION_NAME + ".description")); //$NON-NLS-1$
+ setToolTipText(CUIPlugin.getResourceString(ACTION_NAME + ".tooltip")); //$NON-NLS-1$
+
+ MakeUIImages.setImageDescriptors(this, MakeUIImages.T_TOOL, MakeUIImages.IMG_TOOLS_ALPHA_SORTING);
+
+ fTreeViewer= treeViewer;
+ fSorter= new LexicalCSorter();
+
+ boolean checked= CUIPlugin.getDefault().getDialogSettings().getBoolean(DIALOG_STORE_KEY);
+ valueChanged(checked, false);
+ }
+
+ public void run() {
+ valueChanged(isChecked(), true);
+ }
+
+ private void valueChanged(boolean on, boolean store) {
+ setChecked(on);
+ fTreeViewer.setSorter(on ? fSorter : null);
+
+ String key= ACTION_NAME + ".tooltip" + (on ? ".on" : ".off"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ setToolTipText(CUIPlugin.getResourceString(key));
+
+ if (store) {
+ CUIPlugin.getDefault().getDialogSettings().put(DIALOG_STORE_KEY, on);
+ }
+ }
+
+ private class LexicalCSorter extends ViewerSorter {
+ @SuppressWarnings("unused")
+ public boolean isSorterProperty(Object element, Object property) {
+ return true;
+ }
+
+ public int category(Object obj) {
+ if (obj instanceof ICElement) {
+ ICElement elem= (ICElement)obj;
+ switch (elem.getElementType()) {
+ case ICElement.C_MACRO: return 1;
+ case ICElement.C_INCLUDE: return 2;
+
+ case ICElement.C_CLASS: return 3;
+ case ICElement.C_STRUCT: return 4;
+ case ICElement.C_UNION: return 5;
+
+ case ICElement.C_FIELD: return 6;
+ case ICElement.C_FUNCTION: return 7;
+ }
+
+ }
+ return 0;
+ }
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/LowResolutionTimeRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/LowResolutionTimeRule.java
new file mode 100644
index 0000000000..a2073fa904
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/LowResolutionTimeRule.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .LOW_RESOLUTION_TIME'
+ * If you specify prerequisites for `.LOW_RESOLUTION_TIME', `make'
+ * assumes that these files are created by commands that generate low
+ * resolution time stamps.
+ */
+public class LowResolutionTimeRule extends SpecialRule implements ILowResolutionTimeRule {
+
+ public LowResolutionTimeRule(Directive parent, String[] reqs) {
+ super(parent, new Target(GNUMakefileConstants.RULE_LOW_RESOLUTION_TIME), reqs, new Command[0]);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MacroDefinition.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MacroDefinition.java
new file mode 100644
index 0000000000..6ef7868722
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MacroDefinition.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ */
+public class MacroDefinition extends Directive implements IMacroDefinition {
+ String name;
+ StringBuffer value;
+ boolean fromCommand;
+ boolean fromDefault;
+ boolean fromMakefile;
+ boolean fromEnvironment;
+ boolean fromEnvironmentOverride;
+
+ public MacroDefinition(Directive parent, String n, StringBuffer v) {
+ super(parent);
+ name = n;
+ value = v;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String n) {
+ name = (n == null) ? "" : n.trim() ; //$NON-NLS-1$
+ }
+
+ public StringBuffer getValue() {
+ return value;
+ }
+
+ /**
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append(getName()).append(" = ").append(getValue()).append('\n'); //$NON-NLS-1$
+ return buffer.toString();
+ }
+
+ public boolean equals(MacroDefinition v) {
+ return v.getName().equals(getName());
+ }
+
+ public void setFromCommand(boolean from) {
+ fromCommand = from;
+ }
+
+ public void setFromDefault(boolean from) {
+ fromDefault = from;
+ }
+
+ public void setFromEnviroment(boolean from) {
+ fromEnvironment = from;
+ }
+
+ public void setFromEnviromentOverride(boolean from) {
+ fromEnvironmentOverride = from;
+ }
+
+ public void setFromMakefile(boolean from) {
+ fromMakefile = from;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.make.core.makefile.IMacroDefinition#isFromCommand()
+ */
+ public boolean isFromCommand() {
+ return fromCommand;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.make.core.makefile.IMacroDefinition#isFromDefault()
+ */
+ public boolean isFromDefault() {
+ return fromDefault;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.make.core.makefile.IMacroDefinition#isFromEnviroment()
+ */
+ public boolean isFromEnviroment() {
+ return fromEnvironment;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.make.core.makefile.IMacroDefinition#isFromEnviroment()
+ */
+ public boolean isFromEnvironmentOverride() {
+ return fromEnvironmentOverride;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.make.core.makefile.IMacroDefinition#isFromMakefile()
+ */
+ public boolean isFromMakefile() {
+ return fromMakefile;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MacroDefinitionRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MacroDefinitionRule.java
new file mode 100644
index 0000000000..c1f86af6d9
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MacroDefinitionRule.java
@@ -0,0 +1,164 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.jface.text.rules.ICharacterScanner;
+import org.eclipse.jface.text.rules.IPredicateRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.Token;
+
+class MacroDefinitionRule implements IPredicateRule {
+ private static final int INIT_STATE = 0;
+ private static final int VAR_STATE = 1;
+ private static final int END_VAR_STATE = 2;
+ private static final int EQUAL_STATE = 3;
+ private static final int FINISH_STATE = 4;
+ private static final int ERROR_STATE = 5;
+
+ private IToken token;
+ private StringBuffer buffer = new StringBuffer();
+ protected IToken defaultToken;
+
+ public MacroDefinitionRule(IToken token, IToken defaultToken) {
+ this.token = token;
+ this.defaultToken = defaultToken;
+ }
+
+ public IToken getSuccessToken() {
+ return token;
+ }
+
+ public IToken evaluate(ICharacterScanner scanner, boolean resume) {
+ buffer.setLength(0);
+ int state = INIT_STATE;
+
+ if (resume)
+ scanToBeginOfLine(scanner);
+
+ for (int c = scanner.read(); c != ICharacterScanner.EOF; c = scanner.read()) {
+ switch (state) {
+ case INIT_STATE :
+ if (c != '\n' && Character.isWhitespace((char) c)) {
+ break;
+ }
+ if (isValidCharacter(c)) {
+ state = VAR_STATE;
+ } else {
+ state = ERROR_STATE;
+ }
+ break;
+ case VAR_STATE :
+ if (isValidCharacter(c)) {
+ break;
+ }
+ case END_VAR_STATE :
+ if (c != '\n' && Character.isWhitespace((char) c)) {
+ state = END_VAR_STATE;
+ } else if (c == ':' || c == '+') {
+ state = EQUAL_STATE;
+ } else if (c == '=') {
+ state = FINISH_STATE;
+ } else {
+ if (state == END_VAR_STATE) {
+ scanner.unread(); // Return back to the space
+ }
+ state = ERROR_STATE;
+ }
+ break;
+ case EQUAL_STATE :
+ if (c == '=') {
+ state = FINISH_STATE;
+ } else {
+ state = ERROR_STATE;
+ }
+ break;
+ case FINISH_STATE :
+ break;
+ default :
+ break;
+ }
+ if (state >= FINISH_STATE) {
+ break;
+ }
+ buffer.append((char) c);
+ }
+
+ scanner.unread();
+
+ if (state == FINISH_STATE) {
+ scanToEndOfLine(scanner);
+ return token;
+ }
+
+ if (defaultToken.isUndefined())
+ unreadBuffer(scanner);
+
+ return Token.UNDEFINED;
+
+ }
+
+ public IToken evaluate(ICharacterScanner scanner) {
+ return evaluate(scanner, false);
+ }
+
+ /**
+ * Returns the characters in the buffer to the scanner.
+ *
+ * @param scanner the scanner to be used
+ */
+ protected void unreadBuffer(ICharacterScanner scanner) {
+ for (int i = buffer.length() - 1; i >= 0; i--) {
+ scanner.unread();
+ }
+ }
+
+ private void scanToEndOfLine(ICharacterScanner scanner) {
+ int c;
+ char[][] delimiters = scanner.getLegalLineDelimiters();
+ while ((c = scanner.read()) != ICharacterScanner.EOF) {
+ // Check for end of line since it can be used to terminate the pattern.
+ for (int i = 0; i < delimiters.length; i++) {
+ if (c == delimiters[i][0] && sequenceDetected(scanner, delimiters[i])) {
+ return;
+ }
+ }
+ }
+ }
+
+ private void scanToBeginOfLine(ICharacterScanner scanner) {
+ while(scanner.getColumn() != 0) {
+ scanner.unread();
+ }
+ }
+
+ private boolean sequenceDetected(ICharacterScanner scanner, char[] sequence) {
+ for (int i = 1; i < sequence.length; i++) {
+ int c = scanner.read();
+ if (c == ICharacterScanner.EOF) {
+ return true;
+ } else if (c != sequence[i]) {
+ // Non-matching character detected, rewind the scanner back to the start.
+ for (; i > 0; i--) {
+ scanner.unread();
+ }
+ return false;
+ }
+ }
+
+ return true;
+ }
+ protected boolean isValidCharacter(int c) {
+ char c0 = (char) c;
+ return Character.isLetterOrDigit(c0) || (c0 == '_');
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MacroReferenceRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MacroReferenceRule.java
new file mode 100644
index 0000000000..a2ca12e211
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MacroReferenceRule.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.jface.text.rules.ICharacterScanner;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.PatternRule;
+
+public class MacroReferenceRule extends PatternRule {
+
+ int nOfBrackets;
+ int fBracket;
+
+// public MacroReferenceRule(IToken token) {
+// super("$(", ")", token, (char) 0, true); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+
+ public MacroReferenceRule(IToken token, String startSeq, String endSeq) {
+ super(startSeq, endSeq, token, (char)0, true);
+ if (endSeq.length() > 0 && endSeq.charAt(0) == '}') {
+ fBracket = '{';
+ } else {
+ fBracket = '(';
+ }
+ }
+
+ protected IToken doEvaluate(ICharacterScanner scanner, boolean resume) {
+ nOfBrackets = 1;
+ return super.doEvaluate(scanner, resume);
+ }
+
+ protected boolean endSequenceDetected(ICharacterScanner scanner) {
+ int c;
+ char[][] delimiters = scanner.getLegalLineDelimiters();
+ while ((c = scanner.read()) != ICharacterScanner.EOF) {
+ if (fBracket == c) {
+ ++nOfBrackets;
+ }
+ if (fEndSequence.length > 0 && c == fEndSequence[0]) {
+ // Check if the specified end sequence has been found.
+ if (sequenceDetected(scanner, fEndSequence, true)) {
+ if (0 == --nOfBrackets) {
+ return true;
+ }
+ }
+ } else if (fBreaksOnEOL) {
+ // Check for end of line since it can be used to terminate the pattern.
+ for (int i = 0; i < delimiters.length; i++) {
+ if (c == delimiters[i][0] && sequenceDetected(scanner, delimiters[i], false)) {
+ return true;
+ }
+ }
+ }
+ }
+ scanner.unread();
+ return true;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakeFileConstants.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakeFileConstants.java
new file mode 100644
index 0000000000..0ed46c2732
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakeFileConstants.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+
+public class MakeFileConstants {
+
+ public static final String RULE_DEFAULT = ".DEFAULT"; //$NON-NLS-1$
+ public static final String RULE_IGNORE =".IGNORE"; //$NON-NLS-1$
+ public static final String RULE_POSIX = ".POSIX"; //$NON-NLS-1$
+ public static final String RULE_PRECIOUS = ".PRECIOUS"; //$NON-NLS-1$
+ public static final String RULE_SCCS_GET = ".SCCS_GET"; //$NON-NLS-1$
+ public static final String RULE_SILENT = ".SILENT"; //$NON-NLS-1$
+ public static final String RULE_SUFFIXES = ".SUFFIXES"; //$NON-NLS-1$
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakeFileMessages.properties b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakeFileMessages.properties
new file mode 100644
index 0000000000..ae76283204
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakeFileMessages.properties
@@ -0,0 +1,27 @@
+###############################################################################
+# Copyright (c) 2003, 2006, 2007 QNX Software Systems 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:
+# QNX Software Systems - initial API and implementation
+# Red Hat Inc. - convert to use with Automake editor
+###############################################################################
+
+MakefileValidator.errorBuild=Error Build
+MakefileValidator.errorResource=Error resource
+MakefileValidator.warningInfo=Warning info
+MakefileValidator.warning=Warning
+MakefileValidator.unknown=unknown
+MakefileValidator.checkingFile=Checking file :
+MakefileValidator.fileChecked=File checked
+MakefileValidator.error.elseMissingIfCondition=else missing if condition
+MakefileValidator.error.endifMissingIfElseCondition=Endif missing if/else condition
+MakefileValidator.error.endefMissingOverrideDefine=endef missing [override] define
+MakefileValidator.error.unknownDirective=unknow directive
+MakefileValidator.error.noMatchingEndifForCondition=No matching endif for condition
+MakefileValidator.error.noMatchingEndefForOverrideDefine=No matching endef for [override] define
+
+EditorUtility.concatModifierStrings= {0} + {1} \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileAnnotationHover.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileAnnotationHover.java
new file mode 100644
index 0000000000..633fc85621
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileAnnotationHover.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - convert to use with Automake editor
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.source.IAnnotationHover;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.ui.IEditorPart;
+
+
+/**
+ * MakefileAnnotationHover
+ *
+ */
+public class MakefileAnnotationHover implements IAnnotationHover {
+
+ private IEditorPart fEditor;
+
+ /**
+ *
+ */
+ public MakefileAnnotationHover(IEditorPart editor) {
+ fEditor = editor;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.text.source.IAnnotationHover#getHoverInfo(org.eclipse.jface.text.source.ISourceViewer,
+ * int)
+ */
+ public String getHoverInfo(ISourceViewer sourceViewer, int lineNumber) {
+ IDocument document = sourceViewer.getDocument();
+ try {
+ IRegion info = document.getLineInformation(lineNumber);
+ String line = document.get(info.getOffset(), info.getLength());
+ int numberOfLines = document.getNumberOfLines();
+ while (line != null && line.endsWith("\\")) { //$NON-NLS-1$
+ line = line.substring(0, line.length() - 1);
+ lineNumber++;
+ if (lineNumber < numberOfLines) {
+ info = document.getLineInformation(lineNumber);
+ String l = document.get(info.getOffset(), info.getLength());
+ line += "\n" + l; //$NON-NLS-1$
+ }
+ }
+ if (line != null && line.indexOf('$') != -1 && line.length() > 1) {
+ IWorkingCopyManager fManager = AutomakeEditorFactory.getDefault().getWorkingCopyManager();
+ IMakefile makefile = fManager.getWorkingCopy(fEditor.getEditorInput());
+ line = makefile.expandString(line);
+ return line;
+ }
+ return line;
+ } catch (BadLocationException x) {
+ }
+ return null;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileCodeScanner.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileCodeScanner.java
new file mode 100644
index 0000000000..c7f5526d05
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileCodeScanner.java
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.text.rules.EndOfLineRule;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.IWhitespaceDetector;
+import org.eclipse.jface.text.rules.MultiLineRule;
+import org.eclipse.jface.text.rules.WhitespaceRule;
+import org.eclipse.jface.text.rules.WordRule;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.ColorManager;
+
+
+public class MakefileCodeScanner extends AbstractMakefileCodeScanner {
+
+ private final static String[] keywords = { "define", "endef", "ifdef", "ifndef", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "ifeq", "ifneq", "else", "endif", "include", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ "-include", "sinclude", "override", "endef", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "export", "unexport", "vpath" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ };
+
+ private final static String[] functions = { "subst", "patsubst", "strip", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ "findstring", "filter", "sort", "dir", "notdir", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ "suffix", "basename", "addsuffix", "addprefix", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "join", "word", "words", "wordlist", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "firstword", "wildcard", "error", "warning", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "shell", "origin", "foreach", "call" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ };
+
+ public static final String[] fTokenProperties = new String[] {
+ ColorManager.MAKE_COMMENT_COLOR,
+ ColorManager.MAKE_KEYWORD_COLOR,
+ ColorManager.MAKE_FUNCTION_COLOR,
+ ColorManager.MAKE_MACRO_REF_COLOR,
+ ColorManager.MAKE_MACRO_DEF_COLOR,
+ ColorManager.MAKE_DEFAULT_COLOR
+ };
+
+ /**
+ * Constructor for MakefileCodeScanner
+ */
+ public MakefileCodeScanner() {
+ super();
+ initialize();
+ }
+
+ protected List<IRule> createRules() {
+ IToken keyword = getToken(ColorManager.MAKE_KEYWORD_COLOR);
+ IToken function = getToken(ColorManager.MAKE_FUNCTION_COLOR);
+ IToken comment = getToken(ColorManager.MAKE_COMMENT_COLOR);
+ IToken macroRef = getToken(ColorManager.MAKE_MACRO_REF_COLOR);
+ IToken macroDef = getToken(ColorManager.MAKE_MACRO_DEF_COLOR);
+ IToken other = getToken(ColorManager.MAKE_DEFAULT_COLOR);
+
+ List<IRule> rules = new ArrayList<IRule>();
+
+ // Add rule for single line comments.
+ rules.add(new EndOfLineRule("#", comment, '\\', true)); //$NON-NLS-1$
+
+ // Add generic whitespace rule.
+ rules.add(new WhitespaceRule(new IWhitespaceDetector() {
+ public boolean isWhitespace(char character) {
+ return Character.isWhitespace(character);
+ }
+ }));
+
+ // Put before the the word rules
+ MultiLineRule defineRule = new MultiLineRule("define", "endef", macroDef); //$NON-NLS-1$ //$NON-NLS-2$
+ defineRule.setColumnConstraint(0);
+ rules.add(defineRule);
+ rules.add(new MacroDefinitionRule(macroDef, other));
+
+ // Add word rule for keywords, types, and constants.
+ // We restring the detection of the keywords to be the first column to be valid.
+ WordRule keyWordRule = new WordRule(new MakefileWordDetector(), other);
+ for (int i = 0; i < keywords.length; i++) {
+ keyWordRule.addWord(keywords[i], keyword);
+ }
+ keyWordRule.setColumnConstraint(0);
+ rules.add(keyWordRule);
+
+ WordRule functionRule = new WordRule(new MakefileWordDetector(), other);
+ for (int i = 0; i < functions.length; i++)
+ functionRule.addWord(functions[i], function);
+ rules.add(functionRule);
+
+ rules.add(new MacroReferenceRule(macroRef, "$(", ")")); //$NON-NLS-1$ //$NON-NLS-2$
+ rules.add(new MacroReferenceRule(macroRef, "${", "}")); //$NON-NLS-1$ //$NON-NLS-2$
+
+ setDefaultReturnToken(other);
+
+ return rules;
+ }
+
+ /*
+ * @see AbstractMakefileCodeScanner#getTokenProperties()
+ */
+ protected String[] getTokenProperties() {
+ return fTokenProperties;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileCompletionProcessor.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileCompletionProcessor.java
new file mode 100644
index 0000000000..a6c9307247
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileCompletionProcessor.java
@@ -0,0 +1,237 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - convert to use with Automake editor
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Comparator;
+
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.TextPresentation;
+import org.eclipse.jface.text.contentassist.CompletionProposal;
+import org.eclipse.jface.text.contentassist.ContextInformation;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jface.text.contentassist.IContextInformationPresenter;
+import org.eclipse.jface.text.contentassist.IContextInformationValidator;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.MakeUIImages;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IEditorPart;
+
+
+/**
+ * MakefileCompletionProcessor
+ */
+public class MakefileCompletionProcessor implements IContentAssistProcessor {
+
+ /**
+ * Simple content assist tip closer. The tip is valid in a range
+ * of 5 characters around its popup location.
+ */
+ protected static class Validator implements IContextInformationValidator, IContextInformationPresenter {
+
+ protected int fInstallOffset;
+
+ /*
+ * @see IContextInformationValidator#isContextInformationValid(int)
+ */
+ public boolean isContextInformationValid(int offset) {
+ return Math.abs(fInstallOffset - offset) < 5;
+ }
+
+ /*
+ * @see IContextInformationValidator#install(IContextInformation, ITextViewer, int)
+ */
+ public void install(IContextInformation info, ITextViewer viewer, int offset) {
+ fInstallOffset = offset;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.contentassist.IContextInformationPresenter#updatePresentation(int, TextPresentation)
+ */
+ public boolean updatePresentation(int documentPosition, TextPresentation presentation) {
+ return false;
+ }
+ }
+
+ public class DirectiveComparator implements Comparator<Object>{
+
+ /* (non-Javadoc)
+ * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+ */
+ public int compare(Object o1, Object o2) {
+ String name1;
+ String name2;
+
+ if (o1 instanceof IMacroDefinition) {
+ name1 = ((IMacroDefinition)o1).getName();
+ } else if (o1 instanceof IRule) {
+ name1 = ((IRule)o1).getTarget().toString();
+ } else {
+ name1 =""; //$NON-NLS-1$
+ }
+
+ if (o2 instanceof IMacroDefinition) {
+ name2 = ((IMacroDefinition)o1).getName();
+ } else if (o2 instanceof IRule) {
+ name2 = ((IRule)o1).getTarget().toString();
+ } else {
+ name2 =""; //$NON-NLS-1$
+ }
+
+ //return String.CASE_INSENSITIVE_ORDER.compare(name1, name2);
+ return name1.compareToIgnoreCase(name2);
+ }
+
+ }
+ protected IContextInformationValidator fValidator = new Validator();
+ protected Image imageMacro = MakeUIImages.getImage(MakeUIImages.IMG_OBJS_MAKEFILE_MACRO);
+ protected Image imageTarget = MakeUIImages.getImage(MakeUIImages.IMG_OBJS_MAKEFILE_TARGET_RULE);
+
+ protected CompletionProposalComparator comparator = new CompletionProposalComparator();
+ protected IEditorPart fEditor;
+ protected IWorkingCopyManager fManager;
+
+ public MakefileCompletionProcessor(IEditorPart editor) {
+ fEditor = editor;
+ fManager = AutomakeEditorFactory.getDefault().getWorkingCopyManager();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int)
+ */
+ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {
+ WordPartDetector wordPart = new WordPartDetector(viewer, documentOffset);
+ boolean macro = WordPartDetector.inMacro(viewer, documentOffset);
+ IMakefile makefile = fManager.getWorkingCopy(fEditor.getEditorInput());
+ IDirective[] statements = null;
+ if (macro) {
+ IDirective[] m1 = makefile.getMacroDefinitions();
+ IDirective[] m2 = makefile.getBuiltinMacroDefinitions();
+ statements = new IDirective[m1.length + m2.length];
+ System.arraycopy(m1, 0, statements, 0, m1.length);
+ System.arraycopy(m2, 0, statements, m1.length, m2.length);
+ } else {
+ statements = makefile.getTargetRules();
+ }
+
+ ArrayList<ICompletionProposal> proposalList = new ArrayList<ICompletionProposal>(statements.length);
+
+ // iterate over all the different categories
+ for (int i = 0; i < statements.length; i++) {
+ String name = null;
+ Image image = null;
+ String infoString = "";//getContentInfoString(name); //$NON-NLS-1$
+ if (statements[i] instanceof IMacroDefinition) {
+ name = ((IMacroDefinition) statements[i]).getName();
+ image = imageMacro;
+ infoString = ((IMacroDefinition)statements[i]).getValue().toString();
+ } else if (statements[i] instanceof IRule) {
+ name = ((IRule) statements[i]).getTarget().toString();
+ image = imageTarget;
+ infoString = name;
+ }
+ if (name != null && name.startsWith(wordPart.toString())) {
+ IContextInformation info = new ContextInformation(name, infoString);
+ String displayString = (name.equals(infoString) ? name : name + " - " + infoString); //$NON-NLS-1$
+ ICompletionProposal result =
+ new CompletionProposal(
+ name,
+ wordPart.getOffset(),
+ wordPart.toString().length(),
+ name.length(),
+ image,
+ displayString,
+ info,
+ infoString);
+ proposalList.add(result);
+ }
+ }
+ ICompletionProposal[] proposals = (ICompletionProposal[]) proposalList.toArray(new ICompletionProposal[0]);
+ Arrays.sort(proposals, comparator);
+ return proposals;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeContextInformation(org.eclipse.jface.text.ITextViewer, int)
+ */
+ public IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset) {
+ WordPartDetector wordPart = new WordPartDetector(viewer, documentOffset);
+ boolean macro = WordPartDetector.inMacro(viewer, documentOffset);
+ IMakefile makefile = fManager.getWorkingCopy(fEditor.getEditorInput());
+ ArrayList<String> contextList = new ArrayList<String>();
+ if (macro) {
+ IDirective[] statements = makefile.getMacroDefinitions();
+ for (int i = 0; i < statements.length; i++) {
+ if (statements[i] instanceof IMacroDefinition) {
+ String name = ((IMacroDefinition) statements[i]).getName();
+ if (name != null && name.equals(wordPart.toString())) {
+ String value = ((IMacroDefinition) statements[i]).getValue().toString();
+ if (value != null && value.length() > 0) {
+ contextList.add(value);
+ }
+ }
+ }
+ }
+ statements = makefile.getBuiltinMacroDefinitions();
+ for (int i = 0; i < statements.length; i++) {
+ if (statements[i] instanceof IMacroDefinition) {
+ String name = ((IMacroDefinition) statements[i]).getName();
+ if (name != null && name.equals(wordPart.toString())) {
+ String value = ((IMacroDefinition) statements[i]).getValue().toString();
+ if (value != null && value.length() > 0) {
+ contextList.add(value);
+ }
+ }
+ }
+ }
+ }
+
+ IContextInformation[] result = new IContextInformation[contextList.size()];
+ for (int i = 0; i < result.length; i++) {
+ String context = (String)contextList.get(i);
+ result[i] = new ContextInformation(imageMacro, wordPart.toString(), context);
+ }
+ return result;
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
+ */
+ public char[] getCompletionProposalAutoActivationCharacters() {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationAutoActivationCharacters()
+ */
+ public char[] getContextInformationAutoActivationCharacters() {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getErrorMessage()
+ */
+ public String getErrorMessage() {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationValidator()
+ */
+ public IContextInformationValidator getContextInformationValidator() {
+ return fValidator;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileContentOutlinePage.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileContentOutlinePage.java
new file mode 100644
index 0000000000..a61a9ec292
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileContentOutlinePage.java
@@ -0,0 +1,322 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - convert to use with Automake editor
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.MakeUIImages;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.part.IPageSite;
+import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
+
+
+/**
+ * MakefileContentOutlinePage
+ */
+public class MakefileContentOutlinePage extends ContentOutlinePage implements IContentOutlinePage {
+
+ private class MakefileContentProvider implements ITreeContentProvider {
+
+ protected boolean showMacroDefinition = true;
+ protected boolean showTargetRule = true;
+ protected boolean showInferenceRule = true;
+ protected boolean showIncludeChildren = false;
+
+ protected IMakefile makefile;
+ protected IMakefile nullMakefile = new NullMakefile();
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+ */
+ public Object[] getChildren(Object element) {
+ if (element == fInput) {
+ return getElements(makefile);
+ } else if (element instanceof IDirective) {
+ return getElements(element);
+ }
+ return new Object[0];
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+ */
+ public Object getParent(Object element) {
+ if (element instanceof IMakefile) {
+ return fInput;
+ } else if (element instanceof IDirective) {
+ return ((IDirective)element).getParent();
+ }
+ return fInput;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+ */
+ public boolean hasChildren(Object element) {
+ if (element == fInput) {
+ return true;
+ } else if (element instanceof IParent) {
+ // Do not drill down in includes.
+ if (element instanceof IInclude && !showIncludeChildren) {
+ return false;
+ }
+ return true;
+ }
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+ */
+ public Object[] getElements(Object inputElement) {
+ IDirective[] directives;
+ if (inputElement == fInput) {
+ directives = makefile.getDirectives();
+ } else if (inputElement instanceof IRule) {
+ directives = ((IRule)inputElement).getCommands();
+ } else if (inputElement instanceof IParent) {
+ if (inputElement instanceof IInclude && !showIncludeChildren) {
+ directives = new IDirective[0];
+ } else {
+ directives = ((IParent)inputElement).getDirectives();
+ }
+ } else {
+ directives = new IDirective[0];
+ }
+ List<Object> list = new ArrayList<Object>(directives.length);
+ for (int i = 0; i < directives.length; i++) {
+ if (showMacroDefinition && directives[i] instanceof IMacroDefinition) {
+ list.add(directives[i]);
+ } else if (showInferenceRule && directives[i] instanceof IInferenceRule) {
+ list.add(directives[i]);
+ } else if (showTargetRule && directives[i] instanceof ITargetRule) {
+ list.add(directives[i]);
+ } else {
+ boolean irrelevant = (directives[i] instanceof IComment ||
+ directives[i] instanceof IEmptyLine ||
+ directives[i] instanceof ITerminal);
+ if (!irrelevant) {
+ list.add(directives[i]);
+ }
+ }
+ }
+ return list.toArray();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ public void dispose() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ if (oldInput != null) {
+ makefile = nullMakefile;
+ }
+
+ if (newInput != null) {
+ IWorkingCopyManager manager= AutomakeEditorFactory.getDefault().getWorkingCopyManager();
+ makefile = manager.getWorkingCopy((IEditorInput)newInput);
+ if (makefile == null) {
+ makefile = nullMakefile;
+ }
+ }
+ }
+
+ }
+
+ private class MakefileLabelProvider extends LabelProvider implements ILabelProvider {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
+ */
+ public Image getImage(Object element) {
+ if (element instanceof ITargetRule) {
+ return MakeUIImages.getImage(MakeUIImages.IMG_OBJS_MAKEFILE_TARGET_RULE);
+ } else if (element instanceof IInferenceRule) {
+ return MakeUIImages.getImage(MakeUIImages.IMG_OBJS_MAKEFILE_INFERENCE_RULE);
+ } else if (element instanceof IMacroDefinition) {
+ return MakeUIImages.getImage(MakeUIImages.IMG_OBJS_MAKEFILE_MACRO);
+ } else if (element instanceof ICommand) {
+ return MakeUIImages.getImage(MakeUIImages.IMG_OBJS_MAKEFILE_COMMAND);
+ } else if (element instanceof IInclude) {
+ return MakeUIImages.getImage(MakeUIImages.IMG_OBJS_MAKEFILE_INCLUDE);
+ } else if (element instanceof IBadDirective) {
+ return MakeUIImages.getImage(MakeUIImages.IMG_OBJS_ERROR);
+ } else if (element instanceof IParent) {
+ return MakeUIImages.getImage(MakeUIImages.IMG_OBJS_MAKEFILE_RELATION);
+ }
+ return super.getImage(element);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
+ */
+ public String getText(Object element) {
+ String name;
+ if (element instanceof IRule) {
+ name = ((IRule) element).getTarget().toString().trim();
+ } else if (element instanceof IMacroDefinition) {
+ name = ((IMacroDefinition) element).getName().trim();
+ } else {
+ name = super.getText(element);
+ }
+ if (name != null) {
+ name = name.trim();
+ if (name.length() > 25) {
+ name = name.substring(0, 25) + " ..."; //$NON-NLS-1$
+ }
+ }
+ return name;
+ }
+
+ }
+
+ protected MakefileEditor fEditor;
+ protected Object fInput;
+ protected AddBuildTargetAction fAddBuildTargetAction;
+ protected OpenIncludeAction fOpenIncludeAction;
+
+ public MakefileContentOutlinePage(MakefileEditor editor) {
+ super();
+ fEditor = editor;
+ fAddBuildTargetAction = new AddBuildTargetAction(this);
+ fOpenIncludeAction = new OpenIncludeAction(this);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.part.IPage#createControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ TreeViewer viewer = getTreeViewer();
+ viewer.setContentProvider(new MakefileContentProvider());
+ viewer.setLabelProvider(new MakefileLabelProvider());
+ if (fInput != null) {
+ viewer.setInput(fInput);
+ }
+
+ MenuManager manager= new MenuManager("#MakefileOutlinerContext"); //$NON-NLS-1$
+ manager.setRemoveAllWhenShown(true);
+ manager.addMenuListener(new IMenuListener() {
+ public void menuAboutToShow(IMenuManager m) {
+ contextMenuAboutToShow(m);
+ }
+ });
+ Control tree = viewer.getControl();
+ Menu menu = manager.createContextMenu(tree);
+ tree.setMenu(menu);
+
+ viewer.addDoubleClickListener(new IDoubleClickListener() {
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IDoubleClickListener#doubleClick(org.eclipse.jface.viewers.DoubleClickEvent)
+ */
+ public void doubleClick(DoubleClickEvent event) {
+ if (fOpenIncludeAction != null) {
+ fOpenIncludeAction.run();
+ }
+ }
+ });
+
+ IPageSite site= getSite();
+ //FIXME: should pluginid below be MakeUIPlugin id?
+ site.registerContextMenu(AutotoolsUIPlugin.getPluginId() + ".outline", manager, viewer); //$NON-NLS-1$
+ site.setSelectionProvider(viewer);
+
+ }
+
+ /**
+ * called to create the context menu of the outline
+ */
+ protected void contextMenuAboutToShow(IMenuManager menu) {
+ if (OpenIncludeAction.canActionBeAdded(getSelection())) {
+ menu.add(fOpenIncludeAction);
+ }
+ if (fAddBuildTargetAction.canActionBeAdded(getSelection())) {
+ menu.add(fAddBuildTargetAction);
+ }
+ menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
+ menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS+"-end"));//$NON-NLS-1$
+ }
+
+ /**
+ * Sets the input of the outline page
+ */
+ public void setInput(Object input) {
+ fInput = input;
+ update();
+ }
+
+ public Object getInput() {
+ return fInput;
+ }
+
+ /**
+ * Updates the outline page.
+ */
+ public void update() {
+ final TreeViewer viewer = getTreeViewer();
+
+ if (viewer != null) {
+ final Control control = viewer.getControl();
+ if (control != null && !control.isDisposed()) {
+ control.getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ if (!control.isDisposed()) {
+ control.setRedraw(false);
+ viewer.setInput(fInput);
+ viewer.expandAll();
+ control.setRedraw(true);
+ }
+ }
+ });
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.part.IPage#setActionBars(org.eclipse.ui.IActionBars)
+ */
+ public void setActionBars(IActionBars actionBars) {
+ super.setActionBars(actionBars);
+ IToolBarManager toolBarManager= actionBars.getToolBarManager();
+
+ LexicalSortingAction action= new LexicalSortingAction(getTreeViewer());
+ toolBarManager.add(action);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileDocumentProvider.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileDocumentProvider.java
new file mode 100644
index 0000000000..6a3aa98281
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileDocumentProvider.java
@@ -0,0 +1,145 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Anton Leherbauer (Wind River Systems) - Fixed bug 141295
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.editors.text.ForwardingDocumentProvider;
+import org.eclipse.ui.editors.text.TextFileDocumentProvider;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+
+public class MakefileDocumentProvider extends TextFileDocumentProvider implements IMakefileDocumentProvider {
+
+ IMakefile fMakefile;
+
+ protected class MakefileAnnotationModel extends ResourceMarkerAnnotationModel /*implements IProblemRequestor */{
+ /**
+ * @param resource
+ */
+ public MakefileAnnotationModel(IResource resource) {
+ super(resource);
+ }
+
+ /**
+ * @param makefile
+ */
+ public void setMakefile(IMakefile makefile) {
+ fMakefile = makefile;
+ }
+ }
+
+ /**
+ * Remembers a IMakefile for each element.
+ */
+ protected class MakefileFileInfo extends FileInfo {
+ public IMakefile fCopy;
+ }
+
+ public MakefileDocumentProvider() {
+ IDocumentProvider provider= new TextFileDocumentProvider(new MakefileStorageDocumentProvider());
+ provider= new ForwardingDocumentProvider(MakefileDocumentSetupParticipant.MAKEFILE_PARTITIONING, new MakefileDocumentSetupParticipant(), provider);
+ setParentDocumentProvider(provider);
+ }
+
+ /**
+ */
+ private IMakefile createMakefile(IFile file) throws CoreException {
+ if (file.exists()) {
+ return GNUAutomakefile.createMakefile(file);
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.editors.text.TextFileDocumentProvider#createAnnotationModel(org.eclipse.core.resources.IFile)
+ */
+ protected IAnnotationModel createAnnotationModel(IFile file) {
+ return new MakefileAnnotationModel(file);
+ }
+
+ /*
+ * @see org.eclipse.ui.editors.text.TextFileDocumentProvider#createFileInfo(java.lang.Object)
+ */
+ protected FileInfo createFileInfo(Object element) throws CoreException {
+ if (!(element instanceof IFileEditorInput))
+ return null;
+
+ IFileEditorInput input= (IFileEditorInput) element;
+ IMakefile original= createMakefile(input.getFile());
+ if (original == null)
+ return null;
+
+ FileInfo info= super.createFileInfo(element);
+ if (!(info instanceof MakefileFileInfo)) {
+ return null;
+ }
+
+ MakefileFileInfo makefileInfo= (MakefileFileInfo) info;
+ setUpSynchronization(makefileInfo);
+
+ makefileInfo.fCopy = original;
+
+ if (makefileInfo.fModel instanceof MakefileAnnotationModel) {
+ MakefileAnnotationModel model= (MakefileAnnotationModel) makefileInfo.fModel;
+ model.setMakefile(makefileInfo.fCopy);
+ }
+ return makefileInfo;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.editors.text.TextFileDocumentProvider#disposeFileInfo(java.lang.Object, org.eclipse.ui.editors.text.TextFileDocumentProvider.FileInfo)
+ */
+ protected void disposeFileInfo(Object element, FileInfo info) {
+ if (info instanceof MakefileFileInfo) {
+ MakefileFileInfo makefileInfo= (MakefileFileInfo) info;
+ if (makefileInfo.fCopy != null) {
+ makefileInfo.fCopy = null;
+ }
+ }
+ super.disposeFileInfo(element, info);
+ }
+
+ /*
+ * @see org.eclipse.ui.editors.text.TextFileDocumentProvider#createEmptyFileInfo()
+ */
+ protected FileInfo createEmptyFileInfo() {
+ return new MakefileFileInfo();
+ }
+
+ /*
+ * @see org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake.IMakefileDocumentProvider#getWorkingCopy(java.lang.Object)
+ */
+ public IMakefile getWorkingCopy(Object element) {
+ FileInfo fileInfo= getFileInfo(element);
+ if (fileInfo instanceof MakefileFileInfo) {
+ MakefileFileInfo info= (MakefileFileInfo) fileInfo;
+ return info.fCopy;
+ }
+ return null;
+ }
+
+ /*
+ * @see org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake.MakefileDocumentProvider#shutdown()
+ */
+ @SuppressWarnings("unchecked")
+ public void shutdown() {
+ Iterator e= getConnectedElementsIterator();
+ while (e.hasNext())
+ disconnect(e.next());
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileDocumentSetupParticipant.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileDocumentSetupParticipant.java
new file mode 100644
index 0000000000..30bf900ae4
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileDocumentSetupParticipant.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2005 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.core.filebuffers.IDocumentSetupParticipant;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentExtension3;
+import org.eclipse.jface.text.IDocumentPartitioner;
+import org.eclipse.jface.text.rules.FastPartitioner;
+
+/**
+ * MakefileDocumentSetupParticipant
+ * The document setup participant for Ant.
+ */
+public class MakefileDocumentSetupParticipant implements IDocumentSetupParticipant {
+
+ /**
+ * The name of the Makefile partitioning.
+ */
+ public final static String MAKEFILE_PARTITIONING= "___makefile_partitioning"; //$NON-NLS-1$
+
+ public MakefileDocumentSetupParticipant() {
+ }
+
+ /*
+ * @see org.eclipse.core.filebuffers.IDocumentSetupParticipant#setup(org.eclipse.jface.text.IDocument)
+ */
+ public void setup(IDocument document) {
+ if (document instanceof IDocumentExtension3) {
+ IDocumentExtension3 extension3= (IDocumentExtension3) document;
+ IDocumentPartitioner partitioner = createDocumentPartitioner();
+ extension3.setDocumentPartitioner(MAKEFILE_PARTITIONING, partitioner);
+ partitioner.connect(document);
+ }
+ }
+
+ private IDocumentPartitioner createDocumentPartitioner() {
+ return new FastPartitioner(
+ new MakefilePartitionScanner(), MakefilePartitionScanner.MAKE_PARTITIONS);
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileEditor.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileEditor.java
new file mode 100644
index 0000000000..09bf10ec52
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileEditor.java
@@ -0,0 +1,461 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Anton Leherbauer, Wind River Systems, Inc.
+ * Red Hat Inc. - convert to use with Automake editor
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.util.ResourceBundle;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.FindReplaceDocumentAdapter;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextOperationTarget;
+import org.eclipse.jface.text.ITextViewerExtension;
+import org.eclipse.jface.text.rules.IWordDetector;
+import org.eclipse.jface.text.source.IOverviewRuler;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.IVerticalRuler;
+import org.eclipse.jface.text.source.SourceViewerConfiguration;
+import org.eclipse.jface.text.source.projection.ProjectionAnnotationModel;
+import org.eclipse.jface.text.source.projection.ProjectionSupport;
+import org.eclipse.jface.text.source.projection.ProjectionViewer;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsPlugin;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.MakeUIMessages;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IPartService;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.editors.text.TextEditor;
+import org.eclipse.ui.texteditor.ChainedPreferenceStore;
+import org.eclipse.ui.texteditor.DefaultRangeIndicator;
+import org.eclipse.ui.texteditor.ITextEditorActionConstants;
+import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
+import org.eclipse.ui.texteditor.TextOperationAction;
+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
+
+
+public class MakefileEditor extends TextEditor implements ISelectionChangedListener, IReconcilingParticipant {
+
+ /**
+ * The page that shows the outline.
+ */
+ protected MakefileContentOutlinePage page;
+ ProjectionSupport projectionSupport;
+ ProjectionMakefileUpdater fProjectionMakefileUpdater;
+ private FindReplaceDocumentAdapter fFindReplaceDocumentAdapter;
+
+ /**
+ * Reconciling listeners.
+ * @since 3.0
+ */
+ private ListenerList fReconcilingListeners= new ListenerList(ListenerList.IDENTITY);
+
+ /**
+ * Adapted source viewer for CEditor
+ */
+
+ public class AdaptedSourceViewer extends ProjectionViewer implements ITextViewerExtension {
+
+
+ public AdaptedSourceViewer(Composite parent, IVerticalRuler ruler,
+ IOverviewRuler overviewRuler, boolean showsAnnotation, int styles) {
+ super(parent, ruler, overviewRuler, showsAnnotation, styles);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.source.ISourceViewer#setRangeIndication(int, int, boolean)
+ */
+ public void setRangeIndication(int offset, int length, boolean moveCursor) {
+ // Fixin a bug in the ProjectViewer implemenation
+ // PR: https://bugs.eclipse.org/bugs/show_bug.cgi?id=72914
+ if (isProjectionMode()) {
+ super.setRangeIndication(offset, length, moveCursor);
+ } else {
+ super.setRangeIndication(offset, length, false);
+ }
+ }
+ }
+
+
+ MakefileSourceConfiguration getMakefileSourceConfiguration() {
+ SourceViewerConfiguration configuration = getSourceViewerConfiguration();
+ if (configuration instanceof MakefileSourceConfiguration) {
+ return (MakefileSourceConfiguration)configuration;
+ }
+ return null;
+ }
+
+ public MakefileContentOutlinePage getOutlinePage() {
+ if (page == null) {
+ page = new MakefileContentOutlinePage(this);
+ page.addSelectionChangedListener(this);
+ page.setInput(getEditorInput());
+ }
+ return page;
+ }
+
+ public MakefileEditor() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#initializeEditor()
+ */
+ protected void initializeEditor() {
+ setRangeIndicator(new DefaultRangeIndicator());
+ setEditorContextMenuId("#MakefileEditorContext"); //$NON-NLS-1$
+ setRulerContextMenuId("#MakefileRulerContext"); //$NON-NLS-1$
+ setDocumentProvider(AutomakeEditorFactory.getDefault().getAutomakefileDocumentProvider());
+ IPreferenceStore[] stores = new IPreferenceStore[2];
+ stores[0] = AutotoolsPlugin.getDefault().getPreferenceStore();
+ stores[1] = EditorsUI.getPreferenceStore();
+ ChainedPreferenceStore chainedStore = new ChainedPreferenceStore(stores);
+ setPreferenceStore(chainedStore);
+ setSourceViewerConfiguration(new MakefileSourceConfiguration(chainedStore, this));
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPart#dispose()
+ */
+ public void dispose() {
+ if (fProjectionMakefileUpdater != null) {
+ fProjectionMakefileUpdater.uninstall();
+ fProjectionMakefileUpdater= null;
+ }
+ super.dispose();
+ }
+
+ boolean isFoldingEnabled() {
+ return AutotoolsPlugin.getDefault().getPreferenceStore().getBoolean(MakefileEditorPreferenceConstants.EDITOR_FOLDING_ENABLED);
+ }
+
+ /*
+ * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#isTabsToSpacesConversionEnabled()
+ */
+ protected boolean isTabsToSpacesConversionEnabled() {
+ // always false for Makefiles
+ // see http://bugs.eclipse.org/186106
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createPartControl(Composite parent) {
+ super.createPartControl(parent);
+ ProjectionViewer projectionViewer = (ProjectionViewer) getSourceViewer();
+ projectionSupport = new ProjectionSupport(projectionViewer, getAnnotationAccess(), getSharedColors());
+ projectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.error"); //$NON-NLS-1$
+ projectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.warning"); //$NON-NLS-1$
+ projectionSupport.install();
+
+ if (isFoldingEnabled()) {
+ projectionViewer.doOperation(ProjectionViewer.TOGGLE);
+ }
+
+// ProjectionAnnotationModel model= (ProjectionAnnotationModel) getAdapter(ProjectionAnnotationModel.class);
+
+ fProjectionMakefileUpdater= new ProjectionMakefileUpdater();
+ if (fProjectionMakefileUpdater != null) {
+ fProjectionMakefileUpdater.install(this, projectionViewer);
+ fProjectionMakefileUpdater.initialize();
+ }
+ }
+
+ protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
+ ISourceViewer viewer = new AdaptedSourceViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles);
+
+ // ensure decoration support has been created and configured.
+ getSourceViewerDecorationSupport(viewer);
+
+ return viewer;
+ }
+
+ /* (non-Javadoc)
+ * Method declared on IAdaptable
+ */
+ @SuppressWarnings("unchecked")
+ public Object getAdapter(Class key) {
+ if (ProjectionAnnotationModel.class.equals(key)) {
+ if (projectionSupport != null) {
+ Object result = projectionSupport.getAdapter(getSourceViewer(), key);
+ if (result != null) {
+ return result;
+ }
+ }
+ } else if (key.equals(IContentOutlinePage.class)) {
+ return getOutlinePage();
+ }
+ return super.getAdapter(key);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.ISaveablePart#doSave(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ public void doSave(IProgressMonitor monitor) {
+ super.doSave(monitor);
+ if (page != null) {
+ page.update();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.texteditor.AbstractTextEditor#createActions()
+ */
+ protected void createActions() {
+ super.createActions();
+
+ ResourceBundle bundle = MakeUIMessages.getResourceBundle();
+
+ IAction a = new TextOperationAction(bundle, "ContentAssistProposal.", this, ISourceViewer.CONTENTASSIST_PROPOSALS); //$NON-NLS-1$
+ a.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
+ setAction("ContentAssistProposal", a); //$NON-NLS-1$
+
+ a = new TextOperationAction(bundle, "ContentAssistTip.", this, ISourceViewer.CONTENTASSIST_CONTEXT_INFORMATION); //$NON-NLS-1$
+ a.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_CONTEXT_INFORMATION);
+ setAction("ContentAssistTip", a); //$NON-NLS-1$
+
+ a = new TextOperationAction(bundle, "Comment.", this, ITextOperationTarget.PREFIX); //$NON-NLS-1$
+ a.setActionDefinitionId(IMakefileEditorActionDefinitionIds.COMMENT);
+ setAction("Comment", a); //$NON-NLS-1$
+ markAsStateDependentAction("Comment", true); //$NON-NLS-1$
+
+ a = new TextOperationAction(bundle, "Uncomment.", this, ITextOperationTarget.STRIP_PREFIX); //$NON-NLS-1$
+ a.setActionDefinitionId(IMakefileEditorActionDefinitionIds.UNCOMMENT);
+ setAction("Uncomment", a); //$NON-NLS-1$
+ markAsStateDependentAction("Uncomment", true); //$NON-NLS-1$
+
+ a = new OpenDeclarationAction(this);
+ a.setActionDefinitionId(IMakefileEditorActionDefinitionIds.OPEN_DECLARATION);
+ setAction("OpenDeclarationAction", a); //$NON-NLS-1$
+ markAsStateDependentAction("OpenDeclarationAction", true); //$NON-NLS-1$
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
+ */
+ public void selectionChanged(SelectionChangedEvent event) {
+ ISelection selection = event.getSelection();
+ if (selection.isEmpty()) {
+ resetHighlightRange();
+ } else if (selection instanceof IStructuredSelection){
+ if (!isActivePart() && AutotoolsPlugin.getActivePage() != null) {
+ AutotoolsPlugin.getActivePage().bringToTop(this);
+ }
+ Object element = ((IStructuredSelection) selection).getFirstElement();
+ if (element instanceof IDirective) {
+ IDirective statement = (IDirective)element;
+ setSelection(statement, !isActivePart());
+ }
+ }
+ }
+
+ /**
+ * Returns whether the editor is active.
+ */
+ private boolean isActivePart() {
+ IWorkbenchWindow window= getSite().getWorkbenchWindow();
+ IPartService service= window.getPartService();
+ IWorkbenchPart part= service.getActivePart();
+ return part != null && part.equals(this);
+ }
+
+ /**
+ * Returns the find/replace document adapter.
+ *
+ * @return the find/replace document adapter.
+ */
+ private FindReplaceDocumentAdapter getFindRepalceDocumentAdapter() {
+ if (fFindReplaceDocumentAdapter == null) {
+ IDocument doc = getDocumentProvider().getDocument(getEditorInput());
+ fFindReplaceDocumentAdapter= new FindReplaceDocumentAdapter(doc);
+ }
+ return fFindReplaceDocumentAdapter;
+ }
+
+ public void setSelection(IDirective directive, boolean moveCursor) {
+ int startLine = directive.getStartLine() - 1;
+ int endLine = directive.getEndLine() - 1;
+ try {
+ IDocument doc = getDocumentProvider().getDocument(getEditorInput());
+ int start = doc.getLineOffset(startLine);
+ int len = doc.getLineLength(endLine) - 1;
+ int length = (doc.getLineOffset(endLine) + len) - start;
+ setHighlightRange(start, length, true);
+ if (moveCursor) {
+ // Let see if we can move the cursor at the position also
+ String var = directive.toString().trim();
+ IWordDetector detector = new MakefileWordDetector();
+ for (len = 0; len < var.length(); len++) {
+ char c = var.charAt(len);
+ //if (! (Character.isLetterOrDigit(c) || c == '.' || c == '_')) {
+ if (!(detector.isWordPart(c) || detector.isWordStart(c) || c == '-' || c == '_')) {
+ break;
+ }
+ }
+ if (len > 0) {
+ var = var.substring(0, len);
+ }
+ IRegion region = getFindRepalceDocumentAdapter().find(start, var, true, true, true, false);
+
+ if (region != null) {
+ len = region.getOffset();
+ length = region.getLength();
+ getSourceViewer().revealRange(len, length);
+ // Selected region begins one index after offset
+ getSourceViewer().setSelectedRange(len, length);
+ }
+
+ }
+ } catch (IllegalArgumentException x) {
+ resetHighlightRange();
+ } catch (BadLocationException e) {
+ resetHighlightRange();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.texteditor.AbstractTextEditor#editorContextMenuAboutToShow(org.eclipse.jface.action.IMenuManager)
+ */
+ protected void editorContextMenuAboutToShow(IMenuManager menu) {
+ super.editorContextMenuAboutToShow(menu);
+ addAction(menu, ITextEditorActionConstants.GROUP_EDIT, "Comment"); //$NON-NLS-1$
+ addAction(menu, ITextEditorActionConstants.GROUP_EDIT, "Uncomment"); //$NON-NLS-1$
+ //addAction(menu, ITextEditorActionConstants.GROUP_EDIT, "OpenDeclarationAction"); //$NON-NLS-1$
+ }
+
+ /**
+ * Adds the given listener.
+ * Has no effect if an identical listener was not already registered.
+ *
+ * @param listener The reconcile listener to be added
+ * @since 3.0
+ */
+ final void addReconcilingParticipant(IReconcilingParticipant listener) {
+ synchronized (fReconcilingListeners) {
+ fReconcilingListeners.add(listener);
+ }
+ }
+
+ /**
+ * Removes the given listener.
+ * Has no effect if an identical listener was not already registered.
+ *
+ * @param listener the reconcile listener to be removed
+ * @since 3.0
+ */
+ final void removeReconcilingParticipant(IReconcilingParticipant listener) {
+ synchronized (fReconcilingListeners) {
+ fReconcilingListeners.remove(listener);
+ }
+ }
+
+ /*
+ */
+ public void reconciled() {
+ // Notify listeners
+ Object[] listeners = fReconcilingListeners.getListeners();
+ for (int i = 0, length= listeners.length; i < length; ++i) {
+ ((IReconcilingParticipant)listeners[i]).reconciled();
+ }
+ }
+
+ /*
+ * @see org.eclipse.ui.texteditor.AbstractTextEditor#performRevert()
+ */
+ protected void performRevert() {
+ ProjectionViewer projectionViewer= (ProjectionViewer) getSourceViewer();
+ projectionViewer.setRedraw(false);
+ try {
+
+ boolean projectionMode= projectionViewer.isProjectionMode();
+ if (projectionMode) {
+ projectionViewer.disableProjection();
+ if (fProjectionMakefileUpdater != null)
+ fProjectionMakefileUpdater.uninstall();
+ }
+
+ super.performRevert();
+
+ if (projectionMode) {
+ if (fProjectionMakefileUpdater != null)
+ fProjectionMakefileUpdater.install(this, projectionViewer);
+ projectionViewer.enableProjection();
+ }
+
+ } finally {
+ projectionViewer.setRedraw(true);
+ }
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.texteditor.AbstractTextEditor#handlePreferenceStoreChanged(org.eclipse.jface.util.PropertyChangeEvent)
+ */
+ protected void handlePreferenceStoreChanged(PropertyChangeEvent event) {
+ ISourceViewer sourceViewer= getSourceViewer();
+ if (sourceViewer == null)
+ return;
+
+ String property = event.getProperty();
+
+ MakefileSourceConfiguration makeConf = getMakefileSourceConfiguration();
+ if (makeConf != null) {
+ if (makeConf.affectsBehavior(event)) {
+ makeConf.adaptToPreferenceChange(event);
+ sourceViewer.invalidateTextPresentation();
+ }
+ }
+
+ if (MakefileEditorPreferenceConstants.EDITOR_FOLDING_ENABLED.equals(property)) {
+ if (sourceViewer instanceof ProjectionViewer) {
+ ProjectionViewer projectionViewer= (ProjectionViewer) sourceViewer;
+ if (fProjectionMakefileUpdater != null)
+ fProjectionMakefileUpdater.uninstall();
+ // either freshly enabled or provider changed
+ fProjectionMakefileUpdater= new ProjectionMakefileUpdater();
+ if (fProjectionMakefileUpdater != null) {
+ fProjectionMakefileUpdater.install(this, projectionViewer);
+ }
+ }
+ return;
+ }
+
+ super.handlePreferenceStoreChanged(event);
+ }
+
+ /*
+ * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#collectContextMenuPreferencePages()
+ */
+ protected String[] collectContextMenuPreferencePages() {
+ // Add Makefile Editor relevant pages
+ String[] parentPrefPageIds = super.collectContextMenuPreferencePages();
+ String[] prefPageIds = new String[parentPrefPageIds.length + 2];
+ int nIds = 0;
+ prefPageIds[nIds++] = "org.eclipse.cdt.make.ui.preferences.MakeFileEditorPreferencePage"; //$NON-NLS-1$
+ prefPageIds[nIds++] = "org.eclipse.cdt.make.ui.preferences.MakefileSettingPreferencePage"; //$NON-NLS-1$
+ System.arraycopy(parentPrefPageIds, 0, prefPageIds, nIds, parentPrefPageIds.length);
+ return prefPageIds;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileEditorActionContributor.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileEditorActionContributor.java
new file mode 100644
index 0000000000..d86e087073
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileEditorActionContributor.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Wind River Systems - fix for bugzilla 135150
+ * Red Hat Inc. - modify for usage with Automake editor
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.util.ResourceBundle;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.MakeUIMessages;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.texteditor.BasicTextEditorActionContributor;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
+import org.eclipse.ui.texteditor.RetargetTextEditorAction;
+
+
+/**
+ */
+public class MakefileEditorActionContributor extends BasicTextEditorActionContributor {
+
+ private MakefileEditorTogglePresentationAction fTogglePresentation;
+ private OpenDeclarationAction fOpenDeclarationAction;
+ protected RetargetTextEditorAction fContentAssistProposal;
+ protected RetargetTextEditorAction fContentAssistTip;
+
+ /**
+ * Constructor for MakefileEditorActionContributor.
+ */
+ public MakefileEditorActionContributor() {
+ super();
+ ResourceBundle bundle = MakeUIMessages.getResourceBundle();
+ fContentAssistProposal = new RetargetTextEditorAction(bundle, "ContentAssistProposal."); //$NON-NLS-1$
+ fContentAssistProposal.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
+ fContentAssistTip = new RetargetTextEditorAction(bundle, "ContentAssistTip."); //$NON-NLS-1$
+ fContentAssistTip.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_CONTEXT_INFORMATION);
+ fTogglePresentation = new MakefileEditorTogglePresentationAction();
+ fOpenDeclarationAction = new OpenDeclarationAction();
+
+ }
+
+ /**
+ * @see org.eclipse.ui.IEditorActionBarContributor#setActiveEditor(IEditorPart)
+ */
+ public void setActiveEditor(IEditorPart targetEditor) {
+ super.setActiveEditor(targetEditor);
+ doSetActiveEditor(targetEditor);
+ }
+
+ private void doSetActiveEditor(IEditorPart part) {
+ super.setActiveEditor(part);
+
+ ITextEditor editor = null;
+ if (part instanceof ITextEditor) {
+ editor = (ITextEditor) part;
+ }
+
+ fContentAssistProposal.setAction(getAction(editor, "ContentAssistProposal")); //$NON-NLS-1$
+ fContentAssistTip.setAction(getAction(editor, "ContentAssistTip")); //$NON-NLS-1$
+
+ fTogglePresentation.setEditor(editor);
+ fTogglePresentation.update();
+
+ fOpenDeclarationAction.setEditor(editor);
+ fOpenDeclarationAction.update();
+ }
+
+ /*
+ * @see IEditorActionBarContributor#dispose()
+ */
+ public void dispose() {
+ doSetActiveEditor(null);
+ super.dispose();
+ }
+
+ /**
+ * @see org.eclipse.ui.part.EditorActionBarContributor#init(IActionBars)
+ */
+ public void init(IActionBars bars) {
+ super.init(bars);
+ IMenuManager menuManager = bars.getMenuManager();
+ IMenuManager editMenu = menuManager.findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);
+ if (editMenu != null) {
+ editMenu.add(new Separator());
+ editMenu.add(fContentAssistProposal);
+ editMenu.add(fContentAssistTip);
+ editMenu.add(fOpenDeclarationAction);
+ }
+
+ bars.setGlobalActionHandler(ITextEditorActionDefinitionIds.TOGGLE_SHOW_SELECTED_ELEMENT_ONLY, fTogglePresentation);
+ // there is a global action in the toolbar, that is retargeted,
+ // there is no need to add another one.
+// IToolBarManager toolBarManager = bars.getToolBarManager();
+// if (toolBarManager != null) {
+// toolBarManager.add(new Separator());
+// toolBarManager.add(fTogglePresentation);
+// }
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileEditorPreferenceConstants.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileEditorPreferenceConstants.java
new file mode 100644
index 0000000000..169d791ac9
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileEditorPreferenceConstants.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2005 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+
+/**
+ * MakefileEditorPreferenceConstants
+ */
+public class MakefileEditorPreferenceConstants {
+
+ /**
+ *
+ */
+ private MakefileEditorPreferenceConstants() {
+ }
+
+ /**
+ * The symbolic names for colors for displaying code assist proposals
+ * @see org.eclipse.jface.resource.ColorRegistry
+ */
+ public static final String CURRENT_LINE_COLOR = "org.eclipse.cdt.make.ui.currentLineHightlightColor"; //$NON-NLS-1$
+ public static final String LINE_NUMBER_RULER_COLOR = "org.eclipse.cdt.make.ui.lineNumberForegroundColor"; //$NON-NLS-1$
+ public static final String PRINT_MARGIN_COLOR = "org.eclipse.cdt.make.ui.printMarginColor"; //$NON-NLS-1$
+
+ /**
+ * Preference key suffix for bold text style preference keys.
+ *
+ */
+ public static final String EDITOR_BOLD_SUFFIX= "_bold"; //$NON-NLS-1$
+
+ /**
+ * Preference key suffix for italic text style preference keys.
+ */
+ public static final String EDITOR_ITALIC_SUFFIX= "_italic"; //$NON-NLS-1$
+
+
+ public static final String EDITOR_FOLDING_MACRODEF = "editor_folding_default_macrodef"; //$NON-NLS-1$
+
+
+ public static final String EDITOR_FOLDING_RULE = "editor_folding_default_rule"; //$NON-NLS-1$
+
+
+ public static final String EDITOR_FOLDING_CONDITIONAL = "editor_folding_default_conditional"; //$NON-NLS-1$
+
+ public static final String EDITOR_FOLDING_ENABLED = "editor_folding_enabled"; //$NON-NLS-1$
+
+ public static void initializeDefaultValues(IPreferenceStore store) {
+
+ store.setDefault(MakefileEditorPreferenceConstants.EDITOR_FOLDING_ENABLED, false);
+ store.setDefault(MakefileEditorPreferenceConstants.EDITOR_FOLDING_MACRODEF, false);
+ store.setDefault(MakefileEditorPreferenceConstants.EDITOR_FOLDING_RULE, true);
+ store.setDefault(MakefileEditorPreferenceConstants.EDITOR_FOLDING_CONDITIONAL, true);
+
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileEditorTogglePresentationAction.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileEditorTogglePresentationAction.java
new file mode 100644
index 0000000000..cd9f159767
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileEditorTogglePresentationAction.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - modified for Automake editor usage
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.MakeUIImages;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.MakeUIMessages;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.texteditor.TextEditorAction;
+
+
+/**
+ */
+public class MakefileEditorTogglePresentationAction extends TextEditorAction {
+
+ /**
+ * Constructor for MakefileEditorTogglePresentationAction.
+ */
+ public MakefileEditorTogglePresentationAction() {
+ super(MakeUIMessages.getResourceBundle(), "TogglePresentation.", null); //$NON-NLS-1$
+ MakeUIImages.setImageDescriptors(this, MakeUIImages.T_TOOL, MakeUIImages.IMG_TOOLS_MAKEFILE_SEGMENT_EDIT);
+ update();
+ }
+
+ /**
+ * @see org.eclipse.jface.action.IAction#run()
+ */
+ public void run() {
+ ITextEditor editor= getTextEditor();
+ editor.resetHighlightRange();
+ boolean show = editor.showsHighlightRangeOnly();
+ setChecked(!show);
+ editor.showHighlightRangeOnly(!show);
+ }
+
+ /**
+ * @see org.eclipse.ui.texteditor.IUpdate#update()
+ */
+ public void update() {
+ setChecked(getTextEditor() != null && getTextEditor().showsHighlightRangeOnly());
+ setEnabled(true);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileMessages.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileMessages.java
new file mode 100644
index 0000000000..c8decc48e4
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileMessages.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Red Hat Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat Inc. - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class MakefileMessages {
+
+ private static final String BUNDLE_NAME = MakefileMessages.class.getName();
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private MakefileMessages() {
+ }
+
+ /**
+ * Returns the string from the plugin's resource bundle,
+ * or 'key' if not found.
+ *
+ * @param key the message key
+ * @return the resource bundle message
+ */
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+
+ /**
+ * Returns the string from the plugin's resource bundle,
+ * or 'key' if not found.
+ *
+ * @param key the message key
+ * @param args an array of substitution strings
+ * @return the resource bundle message
+ */
+ public static String getFormattedString(String key, String[] args) {
+ return MessageFormat.format(getString(key), (Object[])args);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefilePartitionScanner.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefilePartitionScanner.java
new file mode 100644
index 0000000000..fc9975807f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefilePartitionScanner.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.text.rules.EndOfLineRule;
+import org.eclipse.jface.text.rules.IPredicateRule;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.MultiLineRule;
+import org.eclipse.jface.text.rules.RuleBasedPartitionScanner;
+import org.eclipse.jface.text.rules.Token;
+
+public class MakefilePartitionScanner extends RuleBasedPartitionScanner {
+ // Partition types
+ public final static String MAKEFILE_COMMENT_PARTITION = "makefile_comment"; //$NON-NLS-1$
+ public final static String MAKEFILE_MACRO_ASSIGNEMENT_PARTITION = "makefile_macro_assignement"; //$NON-NLS-1$
+ public final static String MAKEFILE_INCLUDE_BLOCK_PARTITION = "makefile_include_block"; //$NON-NLS-1$
+ public final static String MAKEFILE_IF_BLOCK_PARTITION = "makefile_if_block"; //$NON-NLS-1$
+ public final static String MAKEFILE_DEF_BLOCK_PARTITION = "makefile_def_block"; //$NON-NLS-1$
+ public final static String MAKEFILE_OTHER_PARTITION = "makefile_other"; //$NON-NLS-1$
+
+ public final static String[] MAKE_PARTITIONS =
+ new String[] {
+ MAKEFILE_COMMENT_PARTITION,
+ MAKEFILE_MACRO_ASSIGNEMENT_PARTITION,
+ MAKEFILE_INCLUDE_BLOCK_PARTITION,
+ MAKEFILE_IF_BLOCK_PARTITION,
+ MAKEFILE_DEF_BLOCK_PARTITION,
+ MAKEFILE_OTHER_PARTITION,
+ };
+
+ /** The predefined delimiters of this tracker */
+ private char[][] fModDelimiters = { { '\r', '\n' }, { '\r' }, { '\n' } };
+
+ /**
+ * Constructor for MakefilePartitionScanner
+ */
+ public MakefilePartitionScanner() {
+ super();
+
+ IToken tComment = new Token(MAKEFILE_COMMENT_PARTITION);
+ IToken tMacro = new Token(MAKEFILE_MACRO_ASSIGNEMENT_PARTITION);
+ IToken tInclude = new Token(MAKEFILE_INCLUDE_BLOCK_PARTITION);
+ IToken tIf = new Token(MAKEFILE_IF_BLOCK_PARTITION);
+ IToken tDef = new Token(MAKEFILE_DEF_BLOCK_PARTITION);
+ IToken tOther = new Token(MAKEFILE_OTHER_PARTITION);
+
+ List<IRule> rules = new ArrayList<IRule>();
+
+ // Add rule for single line comments.
+
+ rules.add(new EndOfLineRule("#", tComment, '\\', true)); //$NON-NLS-1$
+
+ rules.add(new EndOfLineRule("include", tInclude)); //$NON-NLS-1$
+
+ rules.add(new EndOfLineRule("export", tDef)); //$NON-NLS-1$
+ rules.add(new EndOfLineRule("unexport", tDef)); //$NON-NLS-1$
+ rules.add(new EndOfLineRule("vpath", tDef)); //$NON-NLS-1$
+ rules.add(new EndOfLineRule("override", tDef)); //$NON-NLS-1$
+ rules.add(new MultiLineRule("define", "endef", tDef)); //$NON-NLS-1$ //$NON-NLS-2$
+ rules.add(new MultiLineRule("override define", "endef", tDef)); //$NON-NLS-1$ //$NON-NLS-2$
+
+ // Add rules for multi-line comments and javadoc.
+ rules.add(new MultiLineRule("ifdef", "endif", tIf)); //$NON-NLS-1$ //$NON-NLS-2$
+ rules.add(new MultiLineRule("ifndef", "endif", tIf)); //$NON-NLS-1$ //$NON-NLS-2$
+ rules.add(new MultiLineRule("ifeq", "endif", tIf)); //$NON-NLS-1$ //$NON-NLS-2$
+ rules.add(new MultiLineRule("ifnneq", "endif", tIf)); //$NON-NLS-1$ //$NON-NLS-2$
+
+ // Last rule must be supplied with default token!
+ rules.add(new MacroDefinitionRule(tMacro, tOther)); //$NON-NLS-1$
+
+ IPredicateRule[] result = new IPredicateRule[rules.size()];
+ rules.toArray(result);
+ setPredicateRules(result);
+
+ }
+
+ /*
+ * @see ICharacterScanner#getLegalLineDelimiters
+ */
+ public char[][] getLegalLineDelimiters() {
+ return fModDelimiters;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileReader.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileReader.java
new file mode 100644
index 0000000000..d06c0143f9
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileReader.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.io.IOException;
+import java.io.LineNumberReader;
+import java.io.Reader;
+
+/**
+ */
+public class MakefileReader extends LineNumberReader {
+
+
+ public MakefileReader(Reader reader) {
+ super(reader);
+ }
+
+ public MakefileReader(Reader reader, int sz) {
+ super(reader, sz);
+ }
+
+
+ public String readLine() throws IOException {
+ boolean done = false;
+ StringBuffer buffer = new StringBuffer();
+ boolean escapedLine = false;
+ boolean escapedCommand = false;
+ while (!done) {
+ String line = super.readLine();
+ if (line == null) {
+ return null;
+ }
+
+ if (escapedLine && line.length() > 0) {
+ // Eat the spaces at the beginning.
+ int i = 0;
+ while (i < line.length() && (Util.isSpace(line.charAt(i)))) {
+ i++ ;
+ }
+ line = line.substring(i);
+ } else if (escapedCommand && line.length() > 0) {
+ // Only eat the first tab
+ if (line.charAt(0) == '\t') {
+ line.substring(1);
+ }
+ }
+
+ // According to POSIX rules:
+ // When an escaped <newline>(one preceded by a backslash) is found
+ // anywhere in the makefile except in a command line, it shall be replaced,
+ // along with any leading white space on the following line, with a single <space>
+ //
+ // When an escaped <newline> is found in a command line in a makefile,
+ // the command line shall contain the backslash, the <newline>, and the next line,
+ // except that the first character of the next line shall not be included if it is a <tab>
+ if (Util.isEscapedLine(line)) {
+ int index = line.lastIndexOf('\\');
+ if (index > 0) {
+ if (!escapedLine && Util.isCommand(line)) {
+ escapedCommand = true;
+ buffer.append(line);
+ } else {
+ escapedLine = true;
+ buffer.append(line.substring(0, index));
+ buffer.append(' ');
+ }
+ }
+ } else {
+ done = true;
+ escapedLine = false;
+ escapedCommand = false;
+ buffer.append(line);
+ }
+ }
+ return buffer.toString();
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileReconcilingStrategy.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileReconcilingStrategy.java
new file mode 100644
index 0000000000..5482f1bb1c
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileReconcilingStrategy.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - convert to use with Automake editor
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.io.IOException;
+import java.io.StringReader;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.reconciler.DirtyRegion;
+import org.eclipse.jface.text.reconciler.IReconcilingStrategy;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+
+
+public class MakefileReconcilingStrategy implements IReconcilingStrategy {
+
+
+ private int fLastRegionOffset;
+ private ITextEditor fEditor;
+ private IWorkingCopyManager fManager;
+ private IDocumentProvider fDocumentProvider;
+ private MakefileContentOutlinePage fOutliner;
+ private IReconcilingParticipant fMakefileReconcilingParticipant;
+
+ public MakefileReconcilingStrategy(MakefileEditor editor) {
+ fOutliner= editor.getOutlinePage();
+ fLastRegionOffset = Integer.MAX_VALUE;
+ fEditor= editor;
+ fManager= AutomakeEditorFactory.getDefault().getWorkingCopyManager();
+ fDocumentProvider= AutomakeEditorFactory.getDefault().getAutomakefileDocumentProvider();
+ if (fEditor instanceof IReconcilingParticipant) {
+ fMakefileReconcilingParticipant= (IReconcilingParticipant)fEditor;
+ }
+
+ }
+
+ /**
+ * @see IReconcilingStrategy#reconcile(document)
+ */
+ public void setDocument(IDocument document) {
+ }
+
+
+ /**
+ * @see IReconcilingStrategy#reconcile(region)
+ */
+ public void reconcile(IRegion region) {
+ // We use a trick to avoid running the reconciler multiple times
+ // on a file when it gets changed. This is because this gets called
+ // multiple times with different regions of the file, we do a
+ // complete parse on the first region.
+ if(region.getOffset() <= fLastRegionOffset) {
+ reconcile();
+ }
+ fLastRegionOffset = region.getOffset();
+ }
+
+ /**
+ * @see IReconcilingStrategy#reconcile(dirtyRegion, region)
+ */
+ public void reconcile(DirtyRegion dirtyRegion, IRegion region) {
+ // FIXME: This seems to generate to much flashing in
+ // the contentouline viewer.
+ //reconcile();
+ }
+
+ private void reconcile() {
+ try {
+ IMakefile makefile = fManager.getWorkingCopy(fEditor.getEditorInput());
+ if (makefile != null) {
+ String content = fDocumentProvider.getDocument(fEditor.getEditorInput()).get();
+ StringReader reader = new StringReader(content);
+ try {
+ makefile.parse(makefile.getFileURI(), reader);
+ } catch (IOException e) {
+ }
+
+ fOutliner.update();
+ }
+ } finally {
+ try {
+ if (fMakefileReconcilingParticipant != null) {
+ fMakefileReconcilingParticipant.reconciled();
+ }
+ } finally {
+ //
+ }
+ }
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileSourceConfiguration.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileSourceConfiguration.java
new file mode 100644
index 0000000000..76b7f03029
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileSourceConfiguration.java
@@ -0,0 +1,191 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Anton Leherbauer (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextHover;
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.text.contentassist.ContentAssistant;
+import org.eclipse.jface.text.contentassist.IContentAssistant;
+import org.eclipse.jface.text.presentation.IPresentationReconciler;
+import org.eclipse.jface.text.presentation.PresentationReconciler;
+import org.eclipse.jface.text.reconciler.IReconciler;
+import org.eclipse.jface.text.reconciler.MonoReconciler;
+import org.eclipse.jface.text.rules.BufferedRuleBasedScanner;
+import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.jface.text.source.IAnnotationHover;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.SourceViewerConfiguration;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.ColorManager;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.ui.editors.text.TextSourceViewerConfiguration;
+
+
+public class MakefileSourceConfiguration extends TextSourceViewerConfiguration {
+
+ private ColorManager colorManager;
+ MakefileCodeScanner codeScanner;
+ private MakefileEditor fEditor;
+
+ /**
+ * Single token scanner.
+ */
+ static class SingleTokenScanner extends BufferedRuleBasedScanner {
+ public SingleTokenScanner(TextAttribute attribute) {
+ setDefaultReturnToken(new Token(attribute));
+ }
+ }
+
+ /**
+ * Constructor for MakeConfiguration
+ */
+ public MakefileSourceConfiguration(IPreferenceStore preferenceStore, MakefileEditor editor) {
+ super(preferenceStore);
+ fEditor = editor;
+ colorManager = ColorManager.getDefault();
+ }
+
+ /**
+ * @see SourceViewerConfiguration#getConfiguredContentTypes(ISourceViewer)
+ */
+ public String[] getConfiguredContentTypes(ISourceViewer v) {
+ return new String[] {
+ IDocument.DEFAULT_CONTENT_TYPE,
+ MakefilePartitionScanner.MAKEFILE_COMMENT_PARTITION,
+ MakefilePartitionScanner.MAKEFILE_IF_BLOCK_PARTITION,
+ MakefilePartitionScanner.MAKEFILE_DEF_BLOCK_PARTITION,
+ MakefilePartitionScanner.MAKEFILE_INCLUDE_BLOCK_PARTITION,
+ MakefilePartitionScanner.MAKEFILE_MACRO_ASSIGNEMENT_PARTITION,
+ };
+
+ }
+
+ /**
+ * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getContentAssistant(ISourceViewer)
+ */
+ public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
+ ContentAssistant assistant = new ContentAssistant();
+ assistant.setContentAssistProcessor(new MakefileCompletionProcessor(fEditor), IDocument.DEFAULT_CONTENT_TYPE);
+ assistant.setContentAssistProcessor(new MakefileCompletionProcessor(fEditor), MakefilePartitionScanner.MAKEFILE_COMMENT_PARTITION);
+ assistant.setContentAssistProcessor(new MakefileCompletionProcessor(fEditor), MakefilePartitionScanner.MAKEFILE_DEF_BLOCK_PARTITION);
+ assistant.setContentAssistProcessor(new MakefileCompletionProcessor(fEditor), MakefilePartitionScanner.MAKEFILE_IF_BLOCK_PARTITION);
+ assistant.setContentAssistProcessor(new MakefileCompletionProcessor(fEditor), MakefilePartitionScanner.MAKEFILE_INCLUDE_BLOCK_PARTITION);
+ assistant.setContentAssistProcessor(new MakefileCompletionProcessor(fEditor), MakefilePartitionScanner.MAKEFILE_MACRO_ASSIGNEMENT_PARTITION);
+
+ assistant.enableAutoActivation(true);
+ assistant.setAutoActivationDelay(500);
+
+ assistant.setProposalPopupOrientation(IContentAssistant.CONTEXT_INFO_BELOW);
+ assistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_BELOW);
+ //Set to Carolina blue
+ assistant.setContextInformationPopupBackground(colorManager.getColor(new RGB(0, 191, 255)));
+
+ return assistant;
+ }
+
+ protected MakefileCodeScanner getCodeScanner() {
+ if (null == codeScanner)
+ codeScanner = new MakefileCodeScanner();
+ return codeScanner;
+
+ }
+
+ public IPresentationReconciler getPresentationReconciler(ISourceViewer v) {
+
+ PresentationReconciler reconciler = new PresentationReconciler();
+
+ DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getCodeScanner());
+ reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
+ reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
+
+ dr = new DefaultDamagerRepairer(getCodeScanner());
+ dr = new DefaultDamagerRepairer(getCodeScanner());
+ reconciler.setDamager(dr, MakefilePartitionScanner.MAKEFILE_COMMENT_PARTITION);
+ reconciler.setRepairer(dr, MakefilePartitionScanner.MAKEFILE_COMMENT_PARTITION);
+
+ dr = new DefaultDamagerRepairer(getCodeScanner());
+ reconciler.setDamager(dr, MakefilePartitionScanner.MAKEFILE_MACRO_ASSIGNEMENT_PARTITION);
+ reconciler.setRepairer(dr, MakefilePartitionScanner.MAKEFILE_MACRO_ASSIGNEMENT_PARTITION);
+
+ dr = new DefaultDamagerRepairer(getCodeScanner());
+ reconciler.setDamager(dr, MakefilePartitionScanner.MAKEFILE_INCLUDE_BLOCK_PARTITION);
+ reconciler.setRepairer(dr, MakefilePartitionScanner.MAKEFILE_INCLUDE_BLOCK_PARTITION);
+
+ dr = new DefaultDamagerRepairer(getCodeScanner());
+ reconciler.setDamager(dr, MakefilePartitionScanner.MAKEFILE_IF_BLOCK_PARTITION);
+ reconciler.setRepairer(dr, MakefilePartitionScanner.MAKEFILE_IF_BLOCK_PARTITION);
+
+ dr = new DefaultDamagerRepairer(getCodeScanner());
+ reconciler.setDamager(dr, MakefilePartitionScanner.MAKEFILE_DEF_BLOCK_PARTITION);
+ reconciler.setRepairer(dr, MakefilePartitionScanner.MAKEFILE_DEF_BLOCK_PARTITION);
+
+ dr = new DefaultDamagerRepairer(getCodeScanner());
+ reconciler.setDamager(dr, MakefilePartitionScanner.MAKEFILE_OTHER_PARTITION);
+ reconciler.setRepairer(dr, MakefilePartitionScanner.MAKEFILE_OTHER_PARTITION);
+ return reconciler;
+ }
+
+ /**
+ * @see SourceViewerConfiguration#getReconciler(ISourceViewer)
+ */
+ public IReconciler getReconciler(ISourceViewer sourceViewer) {
+ if (fEditor != null && fEditor.isEditable()) {
+ MonoReconciler reconciler= new MonoReconciler(new MakefileReconcilingStrategy(fEditor), false);
+ reconciler.setDelay(1000);
+ reconciler.setProgressMonitor(new NullProgressMonitor());
+ return reconciler;
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getDefaultPrefixes(org.eclipse.jface.text.source.ISourceViewer, java.lang.String)
+ */
+ public String[] getDefaultPrefixes(ISourceViewer sourceViewer, String contentType) {
+ return new String[]{"#"}; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getTextHover(org.eclipse.jface.text.source.ISourceViewer, java.lang.String)
+ */
+ public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType) {
+ return new MakefileTextHover(fEditor);
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getAnnotationHover(org.eclipse.jface.text.source.ISourceViewer)
+ */
+ public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer) {
+ return new MakefileAnnotationHover(fEditor);
+ }
+
+ /**
+ * @param event
+ * @return
+ */
+ public boolean affectsBehavior(PropertyChangeEvent event) {
+ MakefileCodeScanner scanner = getCodeScanner();
+ return scanner.affectsBehavior(event);
+ }
+
+ /**
+ * @param event
+ */
+ public void adaptToPreferenceChange(PropertyChangeEvent event) {
+ MakefileCodeScanner scanner = getCodeScanner();
+ scanner.adaptToPreferenceChange(event);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileStorageDocumentProvider.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileStorageDocumentProvider.java
new file mode 100644
index 0000000000..cbcd643869
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileStorageDocumentProvider.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2005 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentExtension3;
+import org.eclipse.jface.text.IDocumentPartitioner;
+import org.eclipse.jface.text.rules.FastPartitioner;
+import org.eclipse.ui.editors.text.StorageDocumentProvider;
+
+/**
+ * MakefileStorageDocumentProvider
+ */
+public class MakefileStorageDocumentProvider extends StorageDocumentProvider {
+
+ /*
+ * @see org.eclipse.ui.editors.text.StorageDocumentProvider#setupDocument(java.lang.Object,
+ * org.eclipse.jface.text.IDocument)
+ */
+ protected void setupDocument(Object element, IDocument document) {
+ if (document != null) {
+ IDocumentPartitioner partitioner= createDocumentPartitioner();
+ if (document instanceof IDocumentExtension3) {
+ IDocumentExtension3 extension3= (IDocumentExtension3) document;
+ extension3.setDocumentPartitioner(MakefileDocumentSetupParticipant.MAKEFILE_PARTITIONING, partitioner);
+ } else {
+ document.setDocumentPartitioner(partitioner);
+ }
+ partitioner.connect(document);
+ }
+ }
+
+ private IDocumentPartitioner createDocumentPartitioner() {
+ return new FastPartitioner(
+ new MakefilePartitionScanner(), MakefilePartitionScanner.MAKE_PARTITIONS);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileTextHover.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileTextHover.java
new file mode 100644
index 0000000000..99d29a63e9
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileTextHover.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - convert to use with Automake editor
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextHover;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Region;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.ui.IEditorPart;
+
+
+/**
+ * MakefileTextHover
+ *
+ */
+public class MakefileTextHover implements ITextHover {
+
+ private IEditorPart fEditor;
+
+ /**
+ *
+ */
+ public MakefileTextHover(IEditorPart editor) {
+ fEditor = editor;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.text.ITextHover#getHoverInfo(org.eclipse.jface.text.ITextViewer,
+ * org.eclipse.jface.text.IRegion)
+ */
+ public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
+ if (hoverRegion != null) {
+ try {
+ int len = hoverRegion.getLength();
+ int offset = hoverRegion.getOffset();
+ textViewer.getDocument().get(offset, len); // check off/len validity
+ if (fEditor != null && len > -1) {
+ IWorkingCopyManager fManager = AutomakeEditorFactory.getDefault().getWorkingCopyManager();
+ IMakefile makefile = fManager.getWorkingCopy(fEditor.getEditorInput());
+ if (makefile != null) {
+ WordPartDetector wordPart = new WordPartDetector(textViewer, offset);
+ String name = wordPart.toString();
+ IMacroDefinition[] statements = null;
+ if (WordPartDetector.inMacro(textViewer, offset)) {
+ statements = makefile.getMacroDefinitions(name);
+ if (statements == null || statements.length == 0) {
+ statements = makefile.getBuiltinMacroDefinitions(name);
+ }
+ }
+
+ if (statements == null) {
+ statements = new IMacroDefinition[0];
+ }
+ // iterate over all the different categories
+ StringBuffer buffer = new StringBuffer();
+ for (int i = 0; i < statements.length; i++) {
+ if (i > 0) {
+ buffer.append("\n"); //$NON-NLS-1$
+ }
+ String infoString = statements[i].getValue().toString();
+ buffer.append(name);
+ buffer.append(" - "); //$NON-NLS-1$
+ buffer.append(infoString);
+ }
+ return buffer.toString();
+ }
+ }
+ } catch (BadLocationException e) {
+ }
+ }
+ return ""; //$NON-NLS-1$
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.text.ITextHover#getHoverRegion(org.eclipse.jface.text.ITextViewer,
+ * int)
+ */
+ public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
+ Point selection = textViewer.getSelectedRange();
+ if (selection.x <= offset && offset < selection.x + selection.y) {
+ return new Region(selection.x, selection.y);
+ }
+ return new Region(offset, 0);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileWordDetector.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileWordDetector.java
new file mode 100644
index 0000000000..3008721743
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MakefileWordDetector.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.jface.text.rules.IWordDetector;
+
+public class MakefileWordDetector implements IWordDetector {
+
+ private static final String correctStartSpecChars = "%*().><"; //$NON-NLS-1$
+ private static final String correctSpecChars = "@$/\\"; //$NON-NLS-1$
+
+ /**
+ * @see IWordDetector#isWordPart(character)
+ */
+ public boolean isWordPart(char character) {
+ return Character.isLetterOrDigit(character) || (correctSpecChars.indexOf(character) >= 0);
+ }
+
+ /**
+ * @see IWordDetector#isWordStart(char)
+ */
+ public boolean isWordStart(char character) {
+ return Character.isLetterOrDigit(character) || (correctStartSpecChars.indexOf(character) >= 0);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MessageLine.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MessageLine.java
new file mode 100644
index 0000000000..367c9ed9f5
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/MessageLine.java
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * QNX Software System
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * A message line. It distinguishs between "normal" messages and errors.
+ * Setting an error message hides a currently displayed message until
+ * <code>clearErrorMessage</code> is called.
+ */
+public class MessageLine extends CLabel {
+
+ private String fMessageText;
+ private String fErrorText;
+
+ private Color fDefaultColor;
+ private RGB fErrorRGB;
+ protected Color fErrorColor;
+
+ private static RGB fgErrorRGB= new RGB(200, 0, 0);
+
+ /**
+ * Clears the currently displayed error message and redisplayes
+ * the message which was active before the error message was set.
+ */
+ public void clearErrorMessage() {
+ setErrorMessage(null);
+ }
+ /**
+ * Clears the currently displayed message.
+ */
+ public void clearMessage() {
+ setMessage(null);
+ }
+ /**
+ * Get the currently displayed error text.
+ * @return The error message. If no error message is displayed <code>null</code> is returned.
+ */
+ public String getErrorMessage() {
+ return fErrorText;
+ }
+ /**
+ * Get the currently displayed message.
+ * @return The message. If no message is displayed <code>null<code> is returned.
+ */
+ public String getMessage() {
+ return fMessageText;
+ }
+ /**
+ * Creates a new message line as a child of the parent and with the given SWT stylebits.
+ * Error message will be shown with in the given rgb color.
+ */
+ public MessageLine(Composite parent, int style, RGB errorRGB) {
+ super(parent, style);
+ fDefaultColor= getForeground();
+ fErrorRGB= errorRGB;
+ }
+ /**
+ * Creates a new message line as a child of the parent and with the given SWT stylebits.
+ * Error message will be shown with in the rgb color 200,0,0.
+ */
+ public MessageLine(Composite parent, int style) {
+ super(parent, style);
+ fDefaultColor= getForeground();
+ fErrorRGB= fgErrorRGB;
+ }
+ /**
+ * Creates a new message line as a child of the given parent.
+ * Error message will be shown with in the rgb color 200,0,0.
+ */
+ public MessageLine(Composite parent) {
+ this(parent, SWT.LEFT);
+ }
+ /**
+ * Sets the default error color used by all message lines.
+ * Note: a call to this method only affects newly created MessageLines not existing ones.
+ */
+ public static void setErrorColor(RGB color) {
+ fgErrorRGB= color;
+ }
+ /**
+ * Display the given error message. A currently displayed message
+ * is saved and will be redisplayed when the error message is cleared.
+ */
+ public void setErrorMessage(String message) {
+ fErrorText= message;
+
+ if (message == null) {
+ setMessage(fMessageText);
+ } else {
+ if (fErrorColor == null) {
+ fErrorColor= new Color(getDisplay(), fErrorRGB);
+ addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent e) {
+ fErrorColor.dispose();
+ }
+ });
+ }
+ setForeground(fErrorColor);
+ setText(message);
+ }
+ }
+ /**
+ * Set the message text. If the message line currently displays an error,
+ * the message is stored and will be shown after a call to clearErrorMessage
+ */
+ public void setMessage(String message) {
+ fMessageText= message;
+ if (message == null)
+ message= ""; //$NON-NLS-1$
+ if (fErrorText == null) {
+ setForeground(fDefaultColor);
+ setText(message);
+ }
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/NotParallelRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/NotParallelRule.java
new file mode 100644
index 0000000000..8c767f439f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/NotParallelRule.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+
+/**
+ * .NOTPARALLEL
+ * If `.NOTPARALLEL' is mentioned as a target, then this invocation of
+ * `make' will be run serially, even if the `-j' option is given.
+ * Any recursively invoked `make' command will still be run in
+ * parallel (unless its makefile contains this target). Any
+ * prerequisites on this target are ignored.
+ */
+public class NotParallelRule extends SpecialRule implements INotParallelRule {
+
+ public NotParallelRule(Directive parent, String[] reqs) {
+ super(parent, new Target(GNUMakefileConstants.RULE_NOT_PARALLEL), reqs, new Command[0]);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/NullMakefile.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/NullMakefile.java
new file mode 100644
index 0000000000..f36a115360
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/NullMakefile.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.net.URI;
+
+/**
+ * Makefile : ( statement ) *
+ * statement : rule | macro_definition | comments | empty
+ * rule : inference_rule | target_rule
+ * inference_rule : target ':' <nl> ( <tab> command <nl> ) +
+ * target_rule : target [ ( target ) * ] ':' [ ( prerequisite ) * ] [ ';' command ] <nl>
+ [ ( command ) * ]
+ * macro_definition : string '=' (string)*
+ * comments : ('#' (string) <nl>) *
+ * empty : <nl>
+ * command : <tab> prefix_command string <nl>
+ * target : string
+ * prefix_command : '-' | '@' | '+'
+ * internal_macro : "$<" | "$*" | "$@" | "$?" | "$%"
+ */
+
+public class NullMakefile extends AbstractMakefile {
+
+ public final static IDirective[] EMPTY_DIRECTIVES = new IDirective[0];
+
+ public NullMakefile() {
+ super(null);
+ }
+
+ public IDirective[] getDirectives() {
+ return EMPTY_DIRECTIVES;
+ }
+
+ public IDirective[] getBuiltins() {
+ return EMPTY_DIRECTIVES;
+ }
+
+ public void addDirective(IDirective directive) {
+ }
+
+ public String toString() {
+ return new String();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.make.core.makefile.IMakefile#parse(java.io.Reader)
+ */
+ public void parse(String name, Reader makefile) throws IOException {
+ }
+
+ public void parse(URI fileURI, Reader reader) throws IOException {
+ }
+
+ protected void parse(URI fileURI, MakefileReader reader) throws IOException {
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/OpenDeclarationAction.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/OpenDeclarationAction.java
new file mode 100644
index 0000000000..a12fe2a6c5
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/OpenDeclarationAction.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * Red Hat Inc. - convert to use with Automake editor
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.net.URI;
+
+import org.eclipse.cdt.core.resources.FileStorage;
+import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.MakeUIMessages;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IStorageEditorInput;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.texteditor.TextEditorAction;
+
+
+public class OpenDeclarationAction extends TextEditorAction {
+
+ public OpenDeclarationAction() {
+ this(null);
+ }
+
+ public OpenDeclarationAction(ITextEditor editor) {
+ super(MakeUIMessages.getResourceBundle(), "OpenDeclarationAction.", editor); //$NON-NLS-1$
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.action.IAction#run()
+ */
+ public void run() {
+ ITextEditor editor = getTextEditor();
+ if (editor == null) {
+ return;
+ }
+ ISelectionProvider provider = editor.getSelectionProvider();
+ if (provider == null) {
+ return;
+ }
+ IDirective[] directives = null;
+ IWorkingCopyManager fManager = AutomakeEditorFactory.getDefault().getWorkingCopyManager();
+ IMakefile makefile = fManager.getWorkingCopy(editor.getEditorInput());
+ if (makefile != null) {
+ IDocumentProvider prov = editor.getDocumentProvider();
+ IDocument doc = prov.getDocument(editor.getEditorInput());
+ try {
+ ITextSelection textSelection = (ITextSelection) provider.getSelection();
+ int offset = textSelection.getOffset();
+ WordPartDetector wordPart = new WordPartDetector(doc, textSelection.getOffset());
+ String name = wordPart.toString();
+ if (WordPartDetector.inMacro(doc, offset)) {
+ directives = makefile.getMacroDefinitions(name);
+ if (directives.length == 0) {
+ directives = makefile.getBuiltinMacroDefinitions(name);
+ }
+ } else {
+ directives = makefile.getTargetRules(name);
+ }
+ if (directives != null && directives.length > 0) {
+ openInEditor(directives[0]);
+ }
+ } catch (Exception x) {
+ //
+ }
+ }
+ }
+
+ private static IEditorPart openInEditor(IDirective directive) throws PartInitException {
+ URI fileURI = directive.getMakefile().getFileURI();
+ IPath path = URIUtil.toPath(fileURI);
+ IFile file = AutotoolsUIPlugin.getWorkspace().getRoot().getFileForLocation(path);
+ if (file != null) {
+ IWorkbenchPage p = AutotoolsUIPlugin.getActivePage();
+ if (p != null) {
+ IEditorPart editorPart = IDE.openEditor(p, file, true);
+ if (editorPart instanceof MakefileEditor) {
+ ((MakefileEditor)editorPart).setSelection(directive, true);
+ }
+ return editorPart;
+ }
+ } else {
+ // External file
+ IStorage storage = new FileStorage(path);
+ IStorageEditorInput input = new ExternalEditorInput(storage);
+ IWorkbenchPage p = AutotoolsUIPlugin.getActivePage();
+ if (p != null) {
+ String editorID = "org.eclipse.cdt.make.editor"; //$NON-NLS-1$
+ IEditorPart editorPart = IDE.openEditor(p, input, editorID, true);
+ if (editorPart instanceof MakefileEditor) {
+ ((MakefileEditor)editorPart).setSelection(directive, true);
+ }
+ return editorPart;
+ }
+
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jdt.ui.actions.SelectionDispatchAction#selectionChanged(org.eclipse.jface.text.ITextSelection)
+ */
+ //public void selectionChanged(ITextSelection selection) {
+ //setEnabled(fEditor != null);
+ //}
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/OpenIncludeAction.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/OpenIncludeAction.java
new file mode 100644
index 0000000000..eabaa06b9d
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/OpenIncludeAction.java
@@ -0,0 +1,303 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * QNX Software System
+ * Sergey Prigogin, Google - https://bugs.eclipse.org/bugs/show_bug.cgi?id=13221
+ * Ed Swartz (Nokia)
+ * Anton Leherbauer (Wind River Systems)
+ * Red Hat Inc. - convert to use with Automake editor
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.IInclude;
+import org.eclipse.cdt.core.parser.ExtendedScannerInfo;
+import org.eclipse.cdt.core.parser.IExtendedScannerInfo;
+import org.eclipse.cdt.core.parser.IScannerInfo;
+import org.eclipse.cdt.core.parser.IScannerInfoProvider;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.cdt.utils.PathUtil;
+import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceProxy;
+import org.eclipse.core.resources.IResourceProxyVisitor;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.window.Window;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.MakeUIImages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.MessageBox;
+
+
+
+public class OpenIncludeAction extends Action {
+
+
+ private static final String PREFIX= "OpenIncludeAction."; //$NON-NLS-1$
+
+ private static final String DIALOG_TITLE= PREFIX + "dialog.title"; //$NON-NLS-1$
+ private static final String DIALOG_MESSAGE= PREFIX + "dialog.message"; //$NON-NLS-1$
+
+ private ISelectionProvider fSelectionProvider;
+
+
+ public OpenIncludeAction(ISelectionProvider provider) {
+ super(CUIPlugin.getResourceString(PREFIX + "label")); //$NON-NLS-1$
+ setDescription(CUIPlugin.getResourceString(PREFIX + "description")); //$NON-NLS-1$
+ setToolTipText(CUIPlugin.getResourceString(PREFIX + "tooltip")); //$NON-NLS-1$
+
+ MakeUIImages.setImageDescriptors(this, MakeUIImages.T_LCL, MakeUIImages.IMG_MENU_OPEN_INCLUDE);
+
+ fSelectionProvider= provider;
+ }
+
+ public void run() {
+ IInclude include= getIncludeStatement(fSelectionProvider.getSelection());
+ if (include == null) {
+ return;
+ }
+
+ try {
+ IResource res = include.getUnderlyingResource();
+ ArrayList<Object> filesFound = new ArrayList<Object>(4);
+ String fullFileName= include.getFullFileName();
+ if (fullFileName != null) {
+ IPath fullPath= new Path(fullFileName);
+ if (fullPath.isAbsolute() && fullPath.toFile().exists()) {
+ filesFound.add(fullPath);
+ }
+ }
+ if (filesFound.isEmpty() && res != null) {
+ IProject proj = res.getProject();
+ String includeName = include.getElementName();
+ // Search in the scannerInfo information
+ IScannerInfoProvider provider = CCorePlugin.getDefault().getScannerInfoProvider(proj);
+ if (provider != null) {
+ IScannerInfo info = provider.getScannerInformation(res);
+ // XXXX this should fall back to project by itself
+ if (info == null) {
+ info = provider.getScannerInformation(proj);
+ }
+ if (info != null) {
+ IExtendedScannerInfo scanInfo = new ExtendedScannerInfo(info);
+
+ boolean isSystemInclude = include.isStandard();
+
+ if (!isSystemInclude) {
+ // search in current directory
+ IPath location= include.getTranslationUnit().getLocation();
+ if (location != null) {
+ String currentDir= location.removeLastSegments(1).toOSString();
+ findFile(new String[] { currentDir }, includeName, filesFound);
+ }
+ if (filesFound.isEmpty()) {
+ // search in "..." include directories
+ String[] localIncludePaths = scanInfo.getLocalIncludePath();
+ findFile(localIncludePaths, includeName, filesFound);
+ }
+ }
+
+ if (filesFound.isEmpty()) {
+ // search in <...> include directories
+ String[] includePaths = scanInfo.getIncludePaths();
+ findFile(includePaths, includeName, filesFound);
+ }
+ }
+
+ if (filesFound.isEmpty()) {
+ // Fall back and search the project
+ findFile(proj, new Path(includeName), filesFound);
+ }
+ }
+ }
+ IPath fileToOpen;
+ int nElementsFound= filesFound.size();
+ if (nElementsFound == 0) {
+ noElementsFound();
+ fileToOpen= null;
+ } else if (nElementsFound == 1) {
+ fileToOpen= (IPath) filesFound.get(0);
+ } else {
+ fileToOpen= chooseFile(filesFound);
+ }
+
+ if (fileToOpen != null) {
+ EditorUtility.openInEditor(fileToOpen, include);
+ }
+ } catch (CModelException e) {
+ CUIPlugin.log(e.getStatus());
+ } catch (CoreException e) {
+ CUIPlugin.log(e.getStatus());
+ }
+ }
+
+ /**
+ *
+ */
+ private void noElementsFound() {
+ MessageBox errorMsg = new MessageBox(CUIPlugin.getActiveWorkbenchShell(), SWT.ICON_ERROR | SWT.OK);
+ errorMsg.setText(CUIPlugin.getResourceString("OpenIncludeAction.error")); //$NON-NLS-1$
+ errorMsg.setMessage (CUIPlugin.getResourceString("OpenIncludeAction.error.description")); //$NON-NLS-1$
+ errorMsg.open();
+ }
+
+ private boolean isInProject(IPath path) {
+ return getWorkspaceRoot().getFileForLocation(path) != null;
+ }
+
+ /**
+ * Returns the path as is, if it points to a workspace resource. If the path
+ * does not point to a workspace resource, but there are linked workspace
+ * resources pointing to it, returns the paths of these resources.
+ * Othervise, returns the path as is.
+ */
+ private IPath[] resolveIncludeLink(IPath path) {
+ if (!isInProject(path)) {
+ IFile[] files = getWorkspaceRoot().findFilesForLocationURI(URIUtil.toURI(path));
+ if (files.length > 0) {
+ IPath[] paths = new IPath[files.length];
+ for (int i = 0; i < files.length; i++) {
+ paths[i] = files[i].getFullPath();
+ }
+ return paths;
+ }
+ }
+
+ return new IPath[] { path };
+ }
+
+ private IWorkspaceRoot getWorkspaceRoot() {
+ return ResourcesPlugin.getWorkspace().getRoot();
+ }
+
+ private void findFile(String[] includePaths, String name, ArrayList<Object> list)
+ throws CoreException {
+ // in case it is an absolute path
+ IPath includeFile= new Path(name);
+ if (includeFile.isAbsolute()) {
+ includeFile = PathUtil.getCanonicalPath(includeFile);
+ if (includeFile.toFile().exists()) {
+ list.add(includeFile);
+ return;
+ }
+ }
+ HashSet<IPath> foundSet = new HashSet<IPath>();
+ for (int i = 0; i < includePaths.length; i++) {
+ IPath path = PathUtil.getCanonicalPath(new Path(includePaths[i]).append(includeFile));
+ File file = path.toFile();
+ if (file.exists()) {
+ IPath[] paths = resolveIncludeLink(path);
+ for (int j = 0; j < paths.length; j++) {
+ IPath p = paths[j];
+ if (foundSet.add(p)) {
+ list.add(p);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Recuse in the project.
+ * @param parent
+ * @param name
+ * @param list
+ * @throws CoreException
+ */
+ private void findFile(IContainer parent, final IPath name, final ArrayList<Object> list) throws CoreException {
+ parent.accept(new IResourceProxyVisitor() {
+
+ public boolean visit(IResourceProxy proxy) throws CoreException {
+ if (proxy.getType() == IResource.FILE && proxy.getName().equalsIgnoreCase(name.lastSegment())) {
+ IPath rPath = proxy.requestResource().getLocation();
+ int numSegToRemove = rPath.segmentCount() - name.segmentCount();
+ IPath sPath = rPath.removeFirstSegments(numSegToRemove);
+ sPath = sPath.setDevice(name.getDevice());
+ if (Platform.getOS().equals(Platform.OS_WIN32) ?
+ sPath.toOSString().equalsIgnoreCase(name.toOSString()) :
+ sPath.equals(name)) {
+ list.add(rPath);
+ }
+ return false;
+ }
+ return true;
+ }
+ }, 0);
+ }
+
+
+ private IPath chooseFile(ArrayList<Object> filesFound) {
+ ILabelProvider renderer= new LabelProvider() {
+ public String getText(Object element) {
+ if (element instanceof IPath) {
+ IPath file= (IPath)element;
+ return file.lastSegment() + " - " + file.toString(); //$NON-NLS-1$
+ }
+ return super.getText(element);
+ }
+ };
+
+ ElementListSelectionDialog dialog= new ElementListSelectionDialog(CUIPlugin.getActiveWorkbenchShell(), renderer, false, false);
+ dialog.setTitle(CUIPlugin.getResourceString(DIALOG_TITLE));
+ dialog.setMessage(CUIPlugin.getResourceString(DIALOG_MESSAGE));
+ dialog.setElements(filesFound);
+
+ if (dialog.open() == Window.OK) {
+ return (IPath) dialog.getSelectedElement();
+ }
+ return null;
+ }
+
+
+ @SuppressWarnings("unchecked")
+ private static IInclude getIncludeStatement(ISelection sel) {
+ if (!sel.isEmpty() && sel instanceof IStructuredSelection) {
+ List list= ((IStructuredSelection)sel).toList();
+ if (list.size() == 1) {
+ Object element= list.get(0);
+ if (element instanceof IInclude) {
+ return (IInclude)element;
+ }
+ }
+ }
+ return null;
+ }
+
+ public static boolean canActionBeAdded(ISelection selection) {
+ ICElement include = getIncludeStatement(selection);
+ if (include != null) {
+ IResource res = include.getUnderlyingResource();
+ if (res != null) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/OverrideDefine.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/OverrideDefine.java
new file mode 100644
index 0000000000..ff0ed3cfd1
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/OverrideDefine.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+
+public class OverrideDefine extends DefineVariable {
+
+ public OverrideDefine(Directive parent, String name, StringBuffer value) {
+ super(parent, name, value);
+ }
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer(GNUMakefileConstants.VARIABLE_OVERRIDE + " " + GNUMakefileConstants.VARIABLE_DEFINE); //$NON-NLS-1$
+ sb.append(getName()).append('\n');
+ sb.append(getValue());
+ sb.append(GNUMakefileConstants.TERMINAL_ENDEF);
+ return sb.toString();
+ }
+
+ public boolean isOverride() {
+ return true;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/OverrideVariable.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/OverrideVariable.java
new file mode 100644
index 0000000000..5fcfe6f4de
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/OverrideVariable.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - Modified for Automake usage
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+public class OverrideVariable extends GNUVariableDef {
+
+ public OverrideVariable(Directive parent, String name, StringBuffer value, int type) {
+ super(parent, name, value, type);
+ }
+
+ public boolean isOverride() {
+ return true;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Parent.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Parent.java
new file mode 100644
index 0000000000..4baa1f0bcc
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Parent.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+/**
+ * IParent
+ */
+
+public abstract class Parent extends Directive implements IParent {
+
+ ArrayList<IDirective> children = new ArrayList<IDirective>();
+
+ public Parent(Directive parent) {
+ super(parent);
+ }
+
+ public IDirective[] getDirectives(boolean expand) {
+ return getDirectives();
+ }
+
+ public IDirective[] getDirectives() {
+ children.trimToSize();
+ return (IDirective[]) children.toArray(new IDirective[0]);
+ }
+
+ public void addDirective(Directive directive) {
+ children.add(directive);
+ // reparent
+ directive.setParent(this);
+ }
+
+ public void addDirectives(Directive[] directives) {
+ children.addAll(Arrays.asList(directives));
+ // reparent
+ for (int i = 0; i < directives.length; i++) {
+ directives[i].setParent(this);
+ }
+ }
+
+ public void clearDirectives() {
+ children.clear();
+ }
+
+ public Directive[] getStatements() {
+ children.trimToSize();
+ return (Directive[]) children.toArray(new Directive[0]);
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ StringBuffer sb = new StringBuffer();
+ IDirective[] directives = getDirectives();
+ for (int i = 0; i < directives.length; i++) {
+ sb.append(directives[i]);
+ }
+ return sb.toString();
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/PhonyRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/PhonyRule.java
new file mode 100644
index 0000000000..e02ec61bc3
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/PhonyRule.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .PHONY
+ * The prerequisites of the special target `.PHONY' are considered to be phony targets.
+ * When it is time to consider such a target, `make' will run its commands unconditionally, regardless of
+ * whether a file with that name exists or what its last-modification time is.
+ */
+public class PhonyRule extends SpecialRule implements IPhonyRule {
+
+ public PhonyRule(Directive parent, String[] reqs) {
+ super(parent, new Target(GNUMakefileConstants.RULE_PHONY), reqs, new Command[0]);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/PosixMakefileUtil.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/PosixMakefileUtil.java
new file mode 100644
index 0000000000..9932c0196b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/PosixMakefileUtil.java
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ */
+public class PosixMakefileUtil {
+
+ public static String[] findPrerequisites(String line) {
+ return findTargets(line);
+ }
+
+ public static String[] findTargets(String line) {
+ List<String> aList = new ArrayList<String>();
+ int space;
+ // Trim away trailing and prepending spaces.
+ line = line.trim();
+ while ((space = Util.indexOf(line, " \t")) != -1) { //$NON-NLS-1$
+ aList.add(line.substring(0, space).trim());
+ line = line.substring(space + 1).trim();
+ }
+ // The last target.
+ if (line.length() > 0) {
+ aList.add(line);
+ }
+ return (String[]) aList.toArray(new String[0]);
+ }
+
+ public static boolean isMacroDefinition(String line) {
+ return Util.indexOf(line, '=') != -1;
+ }
+
+ public static boolean isTargetRule(String line) {
+ return Util.indexOf(line, ':') != -1;
+ }
+
+ public static boolean isCommand(String line) {
+ return line.length() > 1 && line.charAt(0) == '\t';
+ }
+
+ public static boolean isEmptyLine(String line) {
+ return line.trim().length() == 0;
+ }
+
+ public static boolean isInferenceRule(String line) {
+ line = line.trim();
+ if (line.startsWith(".")) { //$NON-NLS-1$
+ int index = Util.indexOf(line, ':');
+ if (index > 1) {
+ line = line.substring(index + 1).trim();
+ if (line.length() == 0 || line.equals(";")) { //$NON-NLS-1$
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ public static boolean isDefaultRule(String line) {
+ line = line.trim();
+ int colon = Util.indexOf(line, ':');
+ if (colon > 0) {
+ line = line.substring(0, colon).trim();
+ return line.equals(MakeFileConstants.RULE_DEFAULT);
+ }
+ return false;
+ }
+
+ public static boolean isIgnoreRule(String line) {
+ line = line.trim();
+ int colon = Util.indexOf(line, ':');
+ if (colon > 0) {
+ line = line.substring(0, colon).trim();
+ return line.equals(MakeFileConstants.RULE_IGNORE);
+ }
+ return false;
+ }
+
+ public static boolean isPosixRule(String line) {
+ line = line.trim();
+ int colon = Util.indexOf(line, ':');
+ if (colon > 0) {
+ line = line.substring(0, colon).trim();
+ return line.equals(MakeFileConstants.RULE_POSIX);
+ }
+ return false;
+ }
+
+ public static boolean isPreciousRule(String line) {
+ line = line.trim();
+ int colon = Util.indexOf(line, ':');
+ if (colon > 0) {
+ line = line.substring(0, colon).trim();
+ return line.equals(MakeFileConstants.RULE_PRECIOUS);
+ }
+ return false;
+ }
+
+ public static boolean isSccsGetRule(String line) {
+ line = line.trim();
+ int colon = Util.indexOf(line, ':');
+ if (colon > 0) {
+ line = line.substring(0, colon).trim();
+ return line.equals(MakeFileConstants.RULE_SCCS_GET);
+ }
+ return false;
+ }
+
+ public static boolean isSilentRule(String line) {
+ line = line.trim();
+ int colon = Util.indexOf(line, ':');
+ if (colon > 0) {
+ line = line.substring(0, colon).trim();
+ return line.equals(MakeFileConstants.RULE_SILENT);
+ }
+ return false;
+ }
+
+ public static boolean isSuffixesRule(String line) {
+ line = line.trim();
+ int colon = Util.indexOf(line, ':');
+ if (colon > 0) {
+ line = line.substring(0, colon).trim();
+ return line.equals(MakeFileConstants.RULE_SUFFIXES);
+ }
+ return false;
+ }
+
+ public static boolean isLibraryTarget(String line) {
+ char prev = 0;
+ int paren = 0;
+
+ for (int i = 0; i < line.length(); i++) {
+ char ch = line.charAt(i);
+ if (ch == '(' && prev != '$' && prev != '\\') {
+ paren++;
+ } else if (ch == ')' && prev != '\\') {
+ if (paren > 0) {
+ return true;
+ }
+ }
+ prev = ch;
+ }
+ return false;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/PosixRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/PosixRule.java
new file mode 100644
index 0000000000..558ca6b226
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/PosixRule.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .POSIX
+ * The appliation shall ensure that this special target is specified without
+ * prerequisites or commands.
+ */
+public class PosixRule extends SpecialRule implements IPosixRule {
+
+ public PosixRule(Directive parent) {
+ super(parent, new Target(MakeFileConstants.RULE_POSIX), new String[0], new Command[0]);
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/PreciousRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/PreciousRule.java
new file mode 100644
index 0000000000..7ffb6af55c
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/PreciousRule.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .PRECIOUS
+ * Prerequisites of this special target shall not be removed if make recieves an
+ * asynchronous events.
+ */
+public class PreciousRule extends SpecialRule implements IPreciousRule {
+
+ public PreciousRule(Directive parent, String[] reqs) {
+ super(parent, new Target(MakeFileConstants.RULE_PRECIOUS), reqs, new Command[0]);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ProjectionMakefileUpdater.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ProjectionMakefileUpdater.java
new file mode 100644
index 0000000000..3cba77cdea
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ProjectionMakefileUpdater.java
@@ -0,0 +1,391 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - convert to use with Automake editor
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.projection.IProjectionListener;
+import org.eclipse.jface.text.source.projection.ProjectionAnnotation;
+import org.eclipse.jface.text.source.projection.ProjectionAnnotationModel;
+import org.eclipse.jface.text.source.projection.ProjectionViewer;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsPlugin;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+
+
+/**
+ * ProjectionMakefileUpdater
+ */
+public class ProjectionMakefileUpdater implements IProjectionListener {
+
+ private static class MakefileProjectionAnnotation extends ProjectionAnnotation {
+
+ private IDirective fDirective;
+ private boolean fIsComment;
+
+ public MakefileProjectionAnnotation(IDirective element, boolean isCollapsed, boolean isComment) {
+ super(isCollapsed);
+ fDirective = element;
+ fIsComment = isComment;
+ }
+
+ public IDirective getElement() {
+ return fDirective;
+ }
+
+ public void setElement(IDirective element) {
+ fDirective = element;
+ }
+
+ public boolean isComment() {
+ return fIsComment;
+ }
+ }
+
+
+ public void install(MakefileEditor editor, ProjectionViewer viewer) {
+ fEditor= editor;
+ fViewer= viewer;
+ fViewer.addProjectionListener(this);
+ }
+
+ public void uninstall() {
+ if (isInstalled()) {
+ projectionDisabled();
+ fViewer.removeProjectionListener(this);
+ fViewer= null;
+ fEditor= null;
+ }
+ }
+
+ protected boolean isInstalled() {
+ return fEditor != null;
+ }
+
+ private class ReconcilerParticipant implements IReconcilingParticipant {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake.IReconcilingParticipant#reconciled()
+ */
+ public void reconciled() {
+ processReconcile();
+ }
+ }
+
+ private IDocument fCachedDocument;
+ private MakefileEditor fEditor;
+ private IDirective fInput;
+ private ProjectionViewer fViewer;
+ private IReconcilingParticipant fParticipant;
+
+ private boolean fAllowCollapsing = false;
+ @SuppressWarnings("unused")
+ private boolean fCollapseMacroDef = false;
+ @SuppressWarnings("unused")
+ private boolean fCollapseRule = false;
+ @SuppressWarnings("unused")
+ private boolean fCollapseConditional = false;
+
+ /*
+ * @see org.eclipse.jface.text.source.projection.IProjectionListener#projectionEnabled()
+ */
+ public void projectionEnabled() {
+ // http://home.ott.oti.com/teams/wswb/anon/out/vms/index.html
+ // projectionEnabled messages are not always paired with projectionDisabled
+ // i.e. multiple enabled messages may be sent out.
+ // we have to make sure that we disable first when getting an enable
+ // message.
+ projectionDisabled();
+
+ initialize();
+ fParticipant= new ReconcilerParticipant();
+ fEditor.addReconcilingParticipant(fParticipant);
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.projection.IProjectionListener#projectionDisabled()
+ */
+ public void projectionDisabled() {
+ fCachedDocument= null;
+ if (fParticipant != null) {
+ fEditor.addReconcilingParticipant(fParticipant);
+ fParticipant= null;
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public void initialize() {
+
+ if (!isInstalled())
+ return;
+
+ initializePreferences();
+
+ try {
+
+ IDocumentProvider provider= fEditor.getDocumentProvider();
+ fCachedDocument= provider.getDocument(fEditor.getEditorInput());
+ fAllowCollapsing= true;
+
+ IWorkingCopyManager manager= AutomakeEditorFactory.getDefault().getWorkingCopyManager();
+ fInput= manager.getWorkingCopy(fEditor.getEditorInput());
+
+ if (fInput != null) {
+ ProjectionAnnotationModel model= (ProjectionAnnotationModel) fEditor.getAdapter(ProjectionAnnotationModel.class);
+ if (model != null) {
+ Map additions= computeAdditions((IParent) fInput);
+ model.removeAllAnnotations();
+ model.replaceAnnotations(null, additions);
+ }
+ }
+
+ } finally {
+ fCachedDocument= null;
+ fAllowCollapsing= false;
+ }
+ }
+
+ private void initializePreferences() {
+ //FIXME: what to do with Makefile editor preferences
+ IPreferenceStore store = AutotoolsPlugin.getDefault().getPreferenceStore();
+ fCollapseMacroDef = store.getBoolean(MakefileEditorPreferenceConstants.EDITOR_FOLDING_MACRODEF);
+ fCollapseRule = store.getBoolean(MakefileEditorPreferenceConstants.EDITOR_FOLDING_RULE);
+ fCollapseConditional = store.getBoolean(MakefileEditorPreferenceConstants.EDITOR_FOLDING_CONDITIONAL);
+ }
+
+ private Map<MakefileProjectionAnnotation, Position> computeAdditions(IParent parent) {
+ Map<MakefileProjectionAnnotation, Position> map= new HashMap<MakefileProjectionAnnotation, Position>();
+ computeAdditions(parent.getDirectives(), map);
+ return map;
+ }
+
+ private void computeAdditions(IDirective[] elements, Map<MakefileProjectionAnnotation, Position> map) {
+ for (int i= 0; i < elements.length; i++) {
+ IDirective element= elements[i];
+
+ computeAdditions(element, map);
+
+ if (element instanceof IParent) {
+ IParent parent= (IParent) element;
+ computeAdditions(parent.getDirectives(), map);
+ }
+ }
+ }
+
+ private void computeAdditions(IDirective element, Map<MakefileProjectionAnnotation, Position> map) {
+
+ boolean createProjection= false;
+
+ if (element instanceof IConditional) {
+ createProjection= true;
+ } else if (element instanceof IMacroDefinition) {
+ createProjection= true;
+ } else if (element instanceof IRule) {
+ createProjection= true;
+ }
+
+ if (createProjection) {
+ Position position= createProjectionPosition(element);
+ if (position != null) {
+ map.put(new MakefileProjectionAnnotation(element, fAllowCollapsing, true), position);
+ }
+ }
+ }
+
+ private Position createProjectionPosition(IDirective element) {
+
+ if (fCachedDocument == null)
+ return null;
+
+ try {
+ int startLine= element.getStartLine() - 1;
+ int endLine= element.getEndLine() - 1;
+ if (startLine != endLine) {
+ int offset= fCachedDocument.getLineOffset(startLine);
+ int endOffset= fCachedDocument.getLineOffset(endLine + 1);
+ return new Position(offset, endOffset - offset);
+ }
+
+ } catch (BadLocationException x) {
+ }
+
+ return null;
+ }
+
+ public void processReconcile() {
+ if (!isInstalled())
+ return;
+
+ ProjectionAnnotationModel model= (ProjectionAnnotationModel) fEditor.getAdapter(ProjectionAnnotationModel.class);
+ if (model == null)
+ return;
+
+ try {
+ IDocumentProvider provider= fEditor.getDocumentProvider();
+ fCachedDocument= provider.getDocument(fEditor.getEditorInput());
+ fAllowCollapsing= false;
+
+ Map<MakefileProjectionAnnotation, Position> additions= new HashMap<MakefileProjectionAnnotation, Position>();
+ List<MakefileProjectionAnnotation> deletions= new ArrayList<MakefileProjectionAnnotation>();
+ List<MakefileProjectionAnnotation> updates= new ArrayList<MakefileProjectionAnnotation>();
+
+ Map<MakefileProjectionAnnotation, Position> updated= computeAdditions((IParent) fInput);
+ Map<IDirective, List<MakefileProjectionAnnotation>> previous= createAnnotationMap(model);
+
+
+ Iterator<MakefileProjectionAnnotation> e= updated.keySet().iterator();
+ while (e.hasNext()) {
+ MakefileProjectionAnnotation annotation= (MakefileProjectionAnnotation) e.next();
+ IDirective element= annotation.getElement();
+ Position position= (Position) updated.get(annotation);
+
+ List<MakefileProjectionAnnotation> annotations= previous.get(element);
+ if (annotations == null) {
+ additions.put(annotation, position);
+ } else {
+ Iterator<MakefileProjectionAnnotation> x= annotations.iterator();
+ while (x.hasNext()) {
+ MakefileProjectionAnnotation a= (MakefileProjectionAnnotation) x.next();
+ if (annotation.isComment() == a.isComment()) {
+ Position p= model.getPosition(a);
+ if (p != null && !position.equals(p)) {
+ p.setOffset(position.getOffset());
+ p.setLength(position.getLength());
+ updates.add(a);
+ }
+ x.remove();
+ break;
+ }
+ }
+
+ if (annotations.isEmpty())
+ previous.remove(element);
+ }
+ }
+
+ Iterator<List<MakefileProjectionAnnotation>> e2 = previous.values().iterator();
+ while (e.hasNext()) {
+ List<MakefileProjectionAnnotation> list= e2.next();
+ int size= list.size();
+ for (int i= 0; i < size; i++)
+ deletions.add(list.get(i));
+ }
+
+ match(model, deletions, additions, updates);
+
+ Annotation[] removals= new Annotation[deletions.size()];
+ deletions.toArray(removals);
+ Annotation[] changes= new Annotation[updates.size()];
+ updates.toArray(changes);
+ model.modifyAnnotations(removals, additions, changes);
+
+ } finally {
+ fCachedDocument= null;
+ fAllowCollapsing= true;
+ }
+ }
+
+ private void match(ProjectionAnnotationModel model, List<MakefileProjectionAnnotation> deletions,
+ Map<MakefileProjectionAnnotation, Position> additions, List<MakefileProjectionAnnotation> changes) {
+ if (deletions.isEmpty() || (additions.isEmpty() && changes.isEmpty()))
+ return;
+
+ List<MakefileProjectionAnnotation> newDeletions= new ArrayList<MakefileProjectionAnnotation>();
+ List<MakefileProjectionAnnotation> newChanges= new ArrayList<MakefileProjectionAnnotation>();
+
+ Iterator<MakefileProjectionAnnotation> deletionIterator= deletions.iterator();
+ outer: while (deletionIterator.hasNext()) {
+ MakefileProjectionAnnotation deleted= (MakefileProjectionAnnotation) deletionIterator.next();
+ Position deletedPosition= model.getPosition(deleted);
+ if (deletedPosition == null)
+ continue;
+
+ Iterator<MakefileProjectionAnnotation> changesIterator= changes.iterator();
+ while (changesIterator.hasNext()) {
+ MakefileProjectionAnnotation changed= (MakefileProjectionAnnotation) changesIterator.next();
+ if (deleted.isComment() == changed.isComment()) {
+ Position changedPosition= model.getPosition(changed);
+ if (changedPosition == null)
+ continue;
+
+ if (deletedPosition.getOffset() == changedPosition.getOffset()) {
+
+ deletedPosition.setLength(changedPosition.getLength());
+ deleted.setElement(changed.getElement());
+
+ deletionIterator.remove();
+ newChanges.add(deleted);
+
+ changesIterator.remove();
+ newDeletions.add(changed);
+
+ continue outer;
+ }
+ }
+ }
+
+ Iterator<MakefileProjectionAnnotation> additionsIterator= additions.keySet().iterator();
+ while (additionsIterator.hasNext()) {
+ MakefileProjectionAnnotation added= (MakefileProjectionAnnotation) additionsIterator.next();
+ if (deleted.isComment() == added.isComment()) {
+ Position addedPosition= (Position) additions.get(added);
+
+ if (deletedPosition.getOffset() == addedPosition.getOffset()) {
+
+ deletedPosition.setLength(addedPosition.getLength());
+ deleted.setElement(added.getElement());
+
+ deletionIterator.remove();
+ newChanges.add(deleted);
+
+ additionsIterator.remove();
+
+ break;
+ }
+ }
+ }
+ }
+
+ deletions.addAll(newDeletions);
+ changes.addAll(newChanges);
+ }
+
+ @SuppressWarnings("unchecked")
+ private Map<IDirective, List<MakefileProjectionAnnotation>> createAnnotationMap(IAnnotationModel model) {
+ Map<IDirective, List<MakefileProjectionAnnotation>> map= new HashMap<IDirective, List<MakefileProjectionAnnotation>>();
+ Iterator e= model.getAnnotationIterator();
+ while (e.hasNext()) {
+ Object annotation= e.next();
+ if (annotation instanceof MakefileProjectionAnnotation) {
+ MakefileProjectionAnnotation directive= (MakefileProjectionAnnotation) annotation;
+ List<MakefileProjectionAnnotation> list= map.get(directive.getElement());
+ if (list == null) {
+ list= new ArrayList<MakefileProjectionAnnotation>(2);
+ map.put(directive.getElement(), list);
+ }
+ list.add(directive);
+ }
+ }
+ return map;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ResourceMarkerAnnotationModel.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ResourceMarkerAnnotationModel.java
new file mode 100644
index 0000000000..1e1d1e2f5a
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/ResourceMarkerAnnotationModel.java
@@ -0,0 +1,210 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.util.HashSet;
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IMarkerDelta;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.text.Position;
+import org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel;
+import org.eclipse.ui.texteditor.MarkerAnnotation;
+
+/**
+ * A marker annotation model whose underlying source of markers is
+ * a resource in the workspace.
+ * <p>
+ * This class may be instantiated; it is not intended to be subclassed.</p>
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class ResourceMarkerAnnotationModel extends AbstractMarkerAnnotationModel {
+
+ /**
+ * Internal resource change listener.
+ */
+ class ResourceChangeListener implements IResourceChangeListener {
+ /*
+ * @see IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
+ */
+ public void resourceChanged(IResourceChangeEvent e) {
+ IResourceDelta delta= e.getDelta();
+ if (delta != null && fResource != null) {
+ IResourceDelta child= delta.findMember(fResource.getFullPath());
+ if (child != null)
+ update(child.getMarkerDeltas());
+ }
+ }
+ }
+
+ /** The workspace. */
+ private IWorkspace fWorkspace;
+ /** The resource. */
+ private IResource fResource;
+ /** The resource change listener. */
+ private IResourceChangeListener fResourceChangeListener= new ResourceChangeListener();
+
+
+ /**
+ * Creates a marker annotation model with the given resource as the source
+ * of the markers.
+ *
+ * @param resource the resource
+ */
+ public ResourceMarkerAnnotationModel(IResource resource) {
+ Assert.isNotNull(resource);
+ fResource= resource;
+ fWorkspace= resource.getWorkspace();
+ }
+
+ /*
+ * @see AbstractMarkerAnnotationModel#isAcceptable(IMarker)
+ */
+ protected boolean isAcceptable(IMarker marker) {
+ return marker != null && fResource.equals(marker.getResource());
+ }
+
+ /**
+ * Updates this model to the given marker deltas.
+ *
+ * @param markerDeltas the array of marker deltas
+ */
+ protected void update(IMarkerDelta[] markerDeltas) {
+
+ if (markerDeltas.length == 0)
+ return;
+
+ if (markerDeltas.length == 1) {
+ IMarkerDelta delta= markerDeltas[0];
+ switch (delta.getKind()) {
+ case IResourceDelta.ADDED :
+ addMarkerAnnotation(delta.getMarker());
+ break;
+ case IResourceDelta.REMOVED :
+ removeMarkerAnnotation(delta.getMarker());
+ break;
+ case IResourceDelta.CHANGED :
+ modifyMarkerAnnotation(delta.getMarker());
+ break;
+ }
+ } else
+ batchedUpdate(markerDeltas);
+
+ fireModelChanged();
+ }
+
+ /**
+ * Updates this model to the given marker deltas.
+ *
+ * @param markerDeltas the array of marker deltas
+ */
+ @SuppressWarnings("unchecked")
+ private void batchedUpdate(IMarkerDelta[] markerDeltas) {
+ HashSet removedMarkers= new HashSet(markerDeltas.length);
+ HashSet modifiedMarkers= new HashSet(markerDeltas.length);
+
+ for (int i= 0; i < markerDeltas.length; i++) {
+ IMarkerDelta delta= markerDeltas[i];
+ switch (delta.getKind()) {
+ case IResourceDelta.ADDED:
+ addMarkerAnnotation(delta.getMarker());
+ break;
+ case IResourceDelta.REMOVED:
+ removedMarkers.add(delta.getMarker());
+ break;
+ case IResourceDelta.CHANGED:
+ modifiedMarkers.add(delta.getMarker());
+ break;
+ }
+ }
+
+ if (modifiedMarkers.isEmpty() && removedMarkers.isEmpty())
+ return;
+
+ Iterator e= getAnnotationIterator(false);
+ while (e.hasNext()) {
+ Object o= e.next();
+ if (o instanceof MarkerAnnotation) {
+ MarkerAnnotation a= (MarkerAnnotation)o;
+ IMarker marker= a.getMarker();
+
+ if (removedMarkers.remove(marker))
+ removeAnnotation(a, false);
+
+ if (modifiedMarkers.remove(marker)) {
+ Position p= createPositionFromMarker(marker);
+ if (p != null) {
+ a.update();
+ modifyAnnotationPosition(a, p, false);
+ }
+ }
+
+ if (modifiedMarkers.isEmpty() && removedMarkers.isEmpty())
+ return;
+
+ }
+ }
+
+ Iterator iter= modifiedMarkers.iterator();
+ while (iter.hasNext())
+ addMarkerAnnotation((IMarker)iter.next());
+ }
+
+ /*
+ * @see AbstractMarkerAnnotationModel#listenToMarkerChanges(boolean)
+ */
+ protected void listenToMarkerChanges(boolean listen) {
+ if (listen)
+ fWorkspace.addResourceChangeListener(fResourceChangeListener);
+ else
+ fWorkspace.removeResourceChangeListener(fResourceChangeListener);
+ }
+
+ /*
+ * @see AbstractMarkerAnnotationModel#deleteMarkers(IMarker[])
+ */
+ protected void deleteMarkers(final IMarker[] markers) throws CoreException {
+ fWorkspace.run(new IWorkspaceRunnable() {
+ public void run(IProgressMonitor monitor) throws CoreException {
+ for (int i= 0; i < markers.length; ++i) {
+ markers[i].delete();
+ }
+ }
+ }, null, IWorkspace.AVOID_UPDATE, null);
+ }
+
+ /*
+ * @see AbstractMarkerAnnotationModel#retrieveMarkers()
+ */
+ protected IMarker[] retrieveMarkers() throws CoreException {
+ return fResource.findMarkers(IMarker.MARKER, true, IResource.DEPTH_ZERO);
+ }
+
+ /**
+ * Returns the resource serving as the source of markers for this annotation model.
+ *
+ * @return the resource serving as the source of markers for this annotation model
+ * @since 2.0
+ */
+ protected IResource getResource() {
+ return fResource;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Rule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Rule.java
new file mode 100644
index 0000000000..f2e37014a8
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Rule.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.util.ArrayList;
+
+public abstract class Rule extends Parent implements IRule {
+
+ Target target;
+
+ public Rule(Directive parent, Target tgt) {
+ this(parent, tgt, new Command[0]);
+ }
+
+ public Rule(Directive parent, Target tgt, Command[] cmds) {
+ super(parent);
+ target = tgt;
+ addDirectives(cmds);
+ }
+
+ public ICommand[] getCommands() {
+ IDirective[] directives = getDirectives();
+ ArrayList<IDirective> cmds = new ArrayList<IDirective>(directives.length);
+ for (int i = 0; i < directives.length; i++) {
+ if (directives[i] instanceof ICommand) {
+ cmds.add(directives[i]);
+ }
+ }
+ return (ICommand[])cmds.toArray(new ICommand[0]);
+ }
+
+ public ITarget getTarget() {
+ return target;
+ }
+
+ public void setTarget(Target tgt) {
+ target = tgt;
+ }
+
+ public boolean equals(Rule r) {
+ return r.getTarget().equals(getTarget());
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SccsGetRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SccsGetRule.java
new file mode 100644
index 0000000000..ff945f531f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SccsGetRule.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .SCCS_GET
+ * The application shall ensure that this special target is specified without
+ * prerequesites.
+ * The commands specifeied with this target shall replace the default
+ * commands associated with this special target.
+ */
+public class SccsGetRule extends SpecialRule implements ISccsGetRule {
+
+ public SccsGetRule(Directive parent, Command[] cmds) {
+ super(parent, new Target(MakeFileConstants.RULE_SCCS_GET), new String[0], cmds);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SecondaryRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SecondaryRule.java
new file mode 100644
index 0000000000..05c858d01e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SecondaryRule.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .SECONDARY
+ * The targets which `.SECONDARY' depends on are treated as
+ * intermediate files, except that they are never automatically deleted.
+ *
+ * `.SECONDARY' with no prerequisites causes all targets to be treated
+ * as secondary (i.e., no target is removed because it is considered intermediate).
+ */
+public class SecondaryRule extends SpecialRule implements ISecondaryRule {
+
+ public SecondaryRule(Directive parent, String[] reqs) {
+ super(parent, new Target(GNUMakefileConstants.RULE_SECONDARY), reqs, new Command[0]);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SelectionList.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SelectionList.java
new file mode 100644
index 0000000000..c28288336b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SelectionList.java
@@ -0,0 +1,252 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * QNX Software System
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * A selection widget that consists of a list and a text entry field. The list
+ * of elements presented are limited to the pattern entered into the text entry
+ * field.
+ */
+public class SelectionList extends Composite {
+
+ // State
+ private Object[] fElements;
+ protected ILabelProvider fRenderer;
+ private boolean fIgnoreCase;
+
+ // Implementation details
+ private String[] fRenderedStrings;
+ private int[] fFilteredElements;
+ private String fRememberedMatchText;
+
+ // SWT widgets
+ private Table fList;
+ private Text fText;
+
+ /**
+ * Adds a selection change listener to this widget.
+ */
+ public void addSelectionListener(SelectionListener listener) {
+ fList.addSelectionListener(listener);
+ }
+ private void createList(int style) {
+ fList= new Table(this, style);
+ fList.setLayoutData(new GridData(GridData.FILL_BOTH));
+ fList.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent e) {
+ fRenderer.dispose();
+ }
+ });
+ }
+ private void createText() {
+ fText= new Text(this, SWT.BORDER);
+ GridData spec= new GridData();
+ spec.grabExcessVerticalSpace= false;
+ spec.grabExcessHorizontalSpace= true;
+ spec.horizontalAlignment= GridData.FILL;
+ spec.verticalAlignment= GridData.BEGINNING;
+ fText.setLayoutData(spec);
+ Listener l= new Listener() {
+ public void handleEvent(Event evt) {
+ filter(false);
+ }
+ };
+ fText.addListener(SWT.Modify, l);
+ }
+ /**
+ * Filters the list of elements according to the pattern entered
+ * into the text entry field.
+ */
+ public void filter(boolean forceUpdate) {
+ int k= 0;
+ String text= fText.getText();
+ if (!forceUpdate && text.equals(fRememberedMatchText))
+ return;
+ fRememberedMatchText= text;
+ StringMatcher matcher= new StringMatcher(text+"*", fIgnoreCase, false); //$NON-NLS-1$
+ for (int i= 0; i < fElements.length; i++) {
+ if (matcher.match(fRenderedStrings[i])) {
+ fFilteredElements[k]= i;
+ k++;
+ }
+ }
+ fFilteredElements[k]= -1;
+ updateListWidget(fFilteredElements, k);
+ }
+ /**
+ * Returns the currently used filter text.
+ */
+ public String getFilter() {
+ return fText.getText();
+ }
+ /**
+ * Returns the selection indices.
+ */
+ public int[] getSelectionIndices() {
+ return fList.getSelectionIndices();
+ }
+ /**
+ * Returns a list of selected elements. Note that the type of the elements
+ * returned in the list are the same as the ones passed to the selection list
+ * via <code>setElements</code>. The list doesn't contain the rendered strings.
+ */
+ public List<Object> getSelection() {
+ if (fList == null || fList.isDisposed() || fList.getSelectionCount() == 0)
+ return new ArrayList<Object>(0);
+ int[] listSelection= fList.getSelectionIndices();
+ List<Object> selected= new ArrayList<Object>(listSelection.length);
+ for (int i= 0; i < listSelection.length; i++) {
+ selected.add(fElements[fFilteredElements[listSelection[i]]]);
+ }
+ return selected;
+ }
+ /**
+ * Returns <code>true</code> when the list of elements is empty.
+ */
+ public boolean isEmptyList() {
+ return fElements == null || fElements.length == 0;
+ }
+ /**
+ * Creates new instance of the widget.
+ */
+ public SelectionList(Composite parent, int style, ILabelProvider renderer, boolean ignoreCase) {
+ super(parent, SWT.NONE);
+ fRenderer= renderer;
+ fIgnoreCase= ignoreCase;
+ GridLayout layout= new GridLayout();
+ layout.marginHeight= 0; layout.marginWidth= 0;
+ //XXX: 1G9V58A: ITPUI:WIN2000 - Dialog.convert* methods should be static
+ setLayout(layout);
+ createText();
+ createList(style);
+ }
+ /**
+ * Removes a selection change listener to this widget.
+ */
+ public void removeSelectionListener(SelectionListener listener) {
+ fList.removeSelectionListener(listener);
+ }
+ private String[] renderStrings() {
+ String[] strings= new String[fElements.length];
+ for (int i= 0; i < strings.length; i++) {
+ strings[i]= fRenderer.getText(fElements[i]);
+ }
+ TwoArrayQuickSort.sort(strings, fElements, fIgnoreCase);
+ return strings;
+ }
+ /**
+ * Select the pattern text.
+ */
+ public void selectFilterText() {
+ fText.selectAll();
+ }
+ /**
+ * Sets the list of elements presented in the widget.
+ */
+ public void setElements(List<Object> elements, boolean refilter) {
+ // We copy the list since we sort it.
+ if (elements == null)
+ fElements= new Object[0];
+ else
+ fElements= elements.toArray();
+ fFilteredElements= new int[fElements.length+1];
+ fRenderedStrings= renderStrings();
+ if (refilter)
+ filter(true);
+ }
+ /*
+ * Non Java-doc
+ */
+ public void setEnabled(boolean enable) {
+ super.setEnabled(enable);
+ fText.setEnabled(enable);
+ fList.setEnabled(enable);
+ }
+ /**
+ * Sets the filter pattern. Current only prefix filter pattern are supported.
+ */
+ public void setFilter(String pattern, boolean refilter) {
+ fText.setText(pattern);
+ if (refilter)
+ filter(true);
+ }
+ /*
+ * Non Java-doc
+ */
+ public boolean setFocus() {
+ return fText.setFocus();
+ }
+ /*
+ * Non Java-doc
+ */
+ public void setFont(Font font) {
+ super.setFont(font);
+ fText.setFont(font);
+ fList.setFont(font);
+ }
+ /**
+ * Selects the elements in the list determined by the given
+ * selection indices.
+ */
+ protected void setSelection(int[] selection) {
+ fList.setSelection(selection);
+ }
+ private void updateListWidget(int[] indices, int size) {
+ if (fList == null || fList.isDisposed())
+ return;
+ fList.setRedraw(false);
+ int itemCount= fList.getItemCount();
+ if (size < itemCount) {
+ fList.remove(0, itemCount-size-1);
+ }
+
+ TableItem[] items= fList.getItems();
+ for (int i= 0; i < size; i++) {
+ TableItem ti= null;
+ if (i < itemCount) {
+ ti= items[i];
+ } else {
+ ti= new TableItem(fList, i);
+ }
+ ti.setText(fRenderedStrings[indices[i]]);
+ Image img= fRenderer.getImage(fElements[indices[i]]);
+ if (img != null)
+ ti.setImage(img);
+ }
+ if (fList.getItemCount() > 0) {
+ fList.setSelection(0);
+ }
+
+ fList.setRedraw(true);
+ Event event= new Event();
+ fList.notifyListeners(SWT.Selection, event);
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SelectionStatusDialog.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SelectionStatusDialog.java
new file mode 100644
index 0000000000..f480531efa
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SelectionStatusDialog.java
@@ -0,0 +1,195 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * QNX Software System
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.ui.dialogs.SelectionDialog;
+
+import org.eclipse.core.runtime.IStatus;
+
+/**
+ * An abstract base class for dialogs with a status bar and ok/cancel buttons.
+ * The status message must be passed over as StatusInfo object and can be
+ * an error, warning or ok. The OK button is enabled / disabled depending
+ * on the status.
+ */
+public abstract class SelectionStatusDialog extends SelectionDialog {
+
+ private MessageLine fStatusLine;
+ private IStatus fLastStatus;
+ private Image fImage;
+ private boolean fInitialSelectionSet;
+ private boolean fStatusLineAboveButtons= false;
+
+
+ /**
+ * Compute the result and return it.
+ */
+ protected abstract void computeResult();
+ /* (non-Javadoc)
+ * Method declared in Window.
+ */
+ protected void configureShell(Shell shell) {
+ super.configureShell(shell);
+ if (fImage != null)
+ shell.setImage(fImage);
+ }
+ /* (non-Javadoc)
+ * Method declared in Dialog.
+ */
+ protected Control createButtonBar(Composite parent) {
+ Composite composite= new Composite(parent, SWT.NULL);
+ GridLayout layout= new GridLayout();
+ if (fStatusLineAboveButtons) {
+ layout.verticalSpacing= 0;
+ } else {
+ layout.numColumns= 2;
+ }
+ layout.marginHeight= 0; layout.marginWidth= 0;
+ composite.setLayout(layout);
+ composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ fStatusLine= new MessageLine(composite);
+ fStatusLine.setAlignment(SWT.LEFT);
+ fStatusLine.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ fStatusLine.setMessage(""); //$NON-NLS-1$
+
+ super.createButtonBar(composite);
+ return composite;
+ }
+ /* (non-Javadoc)
+ * Method declared in Dialog.
+ */
+ public void create() {
+ super.create();
+ if (fLastStatus != null) {
+ updateStatus(fLastStatus);
+ }
+ }
+ /**
+ * Returns the first element of the initial selection or <code>null<code>
+ * if there isn't any initial selection.
+ * @return the first element of the initial selection.
+ */
+ @SuppressWarnings("unchecked")
+ protected Object getPrimaryInitialSelection() {
+ List result= getInitialElementSelections();
+ if (result == null || result.size() == 0)
+ return null;
+ return result.get(0);
+ }
+ /**
+ * Returns the first element from the list of results. Returns <code>null</code>
+ * if no element has been selected.
+ *
+ * @return the first result element if one exists. Otherwise <code>null</code> is
+ * returned.
+ */
+ public Object getPrimaryResult() {
+ Object[] result= getResult();
+ if (result == null || result.length == 0)
+ return null;
+ return result[0];
+ }
+ public SelectionStatusDialog(Shell parent) {
+ super(parent);
+ fInitialSelectionSet= false;
+ }
+ /* (non-Javadoc)
+ * Method declared in Dialog.
+ */
+ protected void okPressed() {
+ computeResult();
+ super.okPressed();
+ }
+ /**
+ * Sets the image for this dialog.
+ *
+ * @param image the dialog's image
+ */
+ public void setImage(Image image) {
+ fImage= image;
+ }
+ @SuppressWarnings("unchecked")
+ protected void setInitialSelection(int position, Object element) {
+ List l= getInitialElementSelections();
+ l.set(position, element);
+ fInitialSelectionSet= true;
+ }
+ /**
+ * Sets the initial selection to the given element.
+ */
+ public void setInitialSelection(Object element) {
+ // Allow clients to use set their own initial selection(s)
+ if (fInitialSelectionSet && element != null && element.equals("A")) //$NON-NLS-1$
+ return;
+
+ if (element != null) {
+ setInitialSelections(new Object[] { element });
+ } else {
+ setInitialSelections(new Object[0]);
+ }
+ }
+ public void setInitialSelections(Object[] selectedElements) {
+ super.setInitialSelections(selectedElements);
+ fInitialSelectionSet= true;
+ }
+ /**
+ * Sets a result element at the given position.
+ */
+ protected void setResult(int position, Object element) {
+ Object[] result= getResult();
+ result[position]= element;
+ setResult(Arrays.asList(result));
+ }
+ /**
+ * Controls whether status line appears to the left of the buttons (default)
+ * or above them.
+ *
+ * @param aboveButtons if <code>true</code> status line is placed above buttons; if
+ * <code>false</code> to the right
+ */
+ public void setStatusLineAboveButtons(boolean aboveButtons) {
+ fStatusLineAboveButtons= aboveButtons;
+ }
+ /**
+ * Update the status of the ok button to reflect the given status. Subclasses
+ * may override this method to update additional buttons.
+ */
+ protected void updateButtonsEnableState(IStatus status) {
+ Button okButton= getOkButton();
+ if (okButton != null && !okButton.isDisposed())
+ okButton.setEnabled(!status.matches(IStatus.ERROR));
+ }
+ /**
+ * Update the dialog's status line to reflect the given status. It is safe to call
+ * this method before the dialog has been opened.
+ */
+ protected void updateStatus(IStatus status) {
+ fLastStatus= status;
+ if (fStatusLine != null && !fStatusLine.isDisposed()) {
+ updateButtonsEnableState(status);
+ StatusTool.applyToStatusLine(fStatusLine, status);
+ }
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SilentRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SilentRule.java
new file mode 100644
index 0000000000..fe130e177d
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SilentRule.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .SILENT
+ * Prerequisties of this special target are targets themselves; this shall cause
+ * commands associated with them not to be written to the standard output before
+ * they are executed.
+ */
+public class SilentRule extends SpecialRule implements ISilentRule {
+
+ public SilentRule(Directive parent, String[] reqs) {
+ super(parent, new Target(MakeFileConstants.RULE_SILENT), reqs, new Command[0]);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SpecialRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SpecialRule.java
new file mode 100644
index 0000000000..857676b65c
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SpecialRule.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * Targets that have special meaning for Make.
+ */
+public abstract class SpecialRule extends Rule implements ISpecialRule {
+
+ String[] prerequisites;
+
+ public SpecialRule(Directive parent, Target target, String[] reqs, Command[] cmds) {
+ super(parent, target, cmds);
+ prerequisites = reqs;
+ }
+
+ public String[] getPrerequisites() {
+ return prerequisites;
+ }
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer();
+ sb.append(target).append(':');
+ String[] reqs = getPrerequisites();
+ for (int i = 0; i < reqs.length; i++) {
+ sb.append(' ').append(reqs[i]);
+ }
+ sb.append('\n');
+ ICommand[] cmds = getCommands();
+ for (int i = 0; i < cmds.length; i++) {
+ sb.append(cmds[i]);
+ }
+ return sb.toString();
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/StaticTargetRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/StaticTargetRule.java
new file mode 100644
index 0000000000..2275797ac1
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/StaticTargetRule.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * Here is the syntax of a static pattern rule:
+ *
+ * TARGETS ...: TARGET-PATTERN: DEP-PATTERNS ...
+ * COMMANDS
+ * ...
+ */
+public class StaticTargetRule extends InferenceRule implements IInferenceRule {
+
+ String targetPattern;
+ String[] prereqPatterns;
+
+ public StaticTargetRule(Directive parent, Target target, String target_pattern, String[] prereq_patterns, Command[] commands) {
+ super(parent, target, commands);
+ targetPattern = target_pattern;
+ prereqPatterns = prereq_patterns;
+ }
+
+ public String[] getPrerequisitePatterns() {
+ return prereqPatterns;
+ }
+
+ public void setPrerequesitePatterns(String[] prereqs) {
+ prereqPatterns = prereqs;
+ }
+
+ public String getTargetPattern() {
+ return targetPattern;
+ }
+
+ public void setTargetPattern(String target_pattern) {
+ targetPattern = target_pattern;
+ }
+
+ /**
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append(getTarget()).append(':');
+ String pattern = getTargetPattern();
+ if (pattern != null && pattern.length() > 0) {
+ buffer.append(' ').append(targetPattern);
+ }
+ buffer.append(':');
+ for (int i = 0; i < prereqPatterns.length; i++) {
+ buffer.append(' ').append(prereqPatterns[i]);
+ }
+ buffer.append('\n');
+ ICommand[] cmds = getCommands();
+ for (int i = 0; i < cmds.length; i++) {
+ buffer.append(cmds[i].toString());
+ }
+ return buffer.toString();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/StatusInfo.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/StatusInfo.java
new file mode 100644
index 0000000000..b73de9450c
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/StatusInfo.java
@@ -0,0 +1,148 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * QNX Software System
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.core.runtime.IStatus;
+
+import org.eclipse.cdt.ui.CUIPlugin;
+
+/**
+ * A settable IStatus
+ * Can be an error, warning, info or ok. For error, info and warning states,
+ * a message describes the problem
+ */
+public class StatusInfo implements IStatus {
+
+ public static final IStatus OK_STATUS= new StatusInfo();
+
+ private String fStatusMessage;
+ private int fSeverity;
+
+ /**
+ * Creates a status set to OK (no message)
+ */
+ public StatusInfo() {
+ this(OK, null);
+ }
+
+ /**
+ * Creates a status .
+ * @param severity The status severity: ERROR, WARNING, INFO and OK.
+ * @param message The message of the status. Applies only for ERROR,
+ * WARNING and INFO.
+ */
+ public StatusInfo(int severity, String message) {
+ fStatusMessage= message;
+ fSeverity= severity;
+ }
+
+ /**
+ * @see IStatus#getChildren()
+ */
+ public IStatus[] getChildren() {
+ return new IStatus[0];
+ }
+ /**
+ * @see IStatus#getCode()
+ */
+ public int getCode() {
+ return fSeverity;
+ }
+ /**
+ * @see IStatus#getException()
+ */
+ public Throwable getException() {
+ return null;
+ }
+ /**
+ * @see IStatus#getMessage
+ */
+ public String getMessage() {
+ return fStatusMessage;
+ }
+ /**
+ * @see IStatus#getPlugin()
+ */
+ public String getPlugin() {
+ return CUIPlugin.PLUGIN_ID;
+ }
+ /**
+ * @see IStatus#getSeverity()
+ */
+ public int getSeverity() {
+ return fSeverity;
+ }
+ public boolean isError() {
+ return fSeverity == IStatus.ERROR;
+ }
+ public boolean isInfo() {
+ return fSeverity == IStatus.INFO;
+ }
+ /**
+ * @see IStatus#isMultiStatus()
+ */
+ public boolean isMultiStatus() {
+ return false;
+ }
+ public boolean isOK() {
+ return fSeverity == IStatus.OK;
+ }
+ public boolean isWarning() {
+ return fSeverity == IStatus.WARNING;
+ }
+ /**
+ * @see IStatus#matches(int)
+ */
+ public boolean matches(int severityMask) {
+ return (fSeverity & severityMask) != 0;
+ }
+ public void setError(String errorMessage) {
+ fStatusMessage= errorMessage;
+ fSeverity= IStatus.ERROR;
+ }
+ public void setInfo(String infoMessage) {
+ fStatusMessage= infoMessage;
+ fSeverity= IStatus.INFO;
+ }
+ public void setOK() {
+ fStatusMessage= null;
+ fSeverity= IStatus.OK;
+ }
+ public void setWarning(String warningMessage) {
+ fStatusMessage= warningMessage;
+ fSeverity= IStatus.WARNING;
+ }
+
+ /**
+ * Returns a string representation of the status, suitable
+ * for debugging purposes only.
+ */
+ public String toString() {
+ StringBuffer buf = new StringBuffer();
+ buf.append("StatusInfo "); //$NON-NLS-1$
+ if (fSeverity == OK) {
+ buf.append("OK"); //$NON-NLS-1$
+ } else if (fSeverity == ERROR) {
+ buf.append("ERROR"); //$NON-NLS-1$
+ } else if (fSeverity == WARNING) {
+ buf.append("WARNING"); //$NON-NLS-1$
+ } else if (fSeverity == INFO) {
+ buf.append("INFO"); //$NON-NLS-1$
+ } else {
+ buf.append("severity="); //$NON-NLS-1$
+ buf.append(fSeverity);
+ }
+ buf.append(": "); //$NON-NLS-1$
+ buf.append(fStatusMessage);
+ return buf.toString();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/StatusTool.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/StatusTool.java
new file mode 100644
index 0000000000..0d849c90d7
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/StatusTool.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2005 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.core.runtime.IStatus;
+
+import org.eclipse.jface.dialogs.DialogPage;
+
+public class StatusTool {
+
+ /**
+ * Applies the status to the status line of a dialog page
+ */
+ public static void applyToStatusLine(MessageLine messageLine, IStatus status) {
+ String[] messages= getErrorMessages(status);
+ messageLine.setErrorMessage(messages[0]);
+ messageLine.setMessage(messages[1]);
+ }
+ /**
+ * Applies the status to the status line of a dialog page
+ */
+ public static void applyToStatusLine(DialogPage page, IStatus status) {
+ String[] messages= getErrorMessages(status);
+ page.setErrorMessage(messages[0]);
+ page.setMessage(messages[1]);
+ }
+ /**
+ * Returns error-message / warning-message for a status
+ */
+ public static String[] getErrorMessages(IStatus status) {
+ String message= status.getMessage();
+ if (status.matches(IStatus.ERROR) && !"".equals(message)) { //$NON-NLS-1$
+ return new String[] { message, null };
+ } else if (status.matches(IStatus.WARNING | IStatus.INFO)) {
+ return new String[] { null, message };
+ } else {
+ return new String[] { null, null };
+ }
+ }
+ /**
+ * Compare two IStatus. The more severe is returned:
+ * An error is more severe than a warning, and a warning is more severe
+ * than ok.
+ */
+ public static IStatus getMoreSevere(IStatus s1, IStatus s2) {
+ if (s1.getSeverity() > s2.getSeverity()) {
+ return s1;
+ }
+ return s2;
+ }
+ /**
+ * Finds the most severe status from a array of status
+ * An error is more severe than a warning, and a warning is more severe
+ * than ok.
+ */
+ public static IStatus getMostSevere(IStatus[] status) {
+ IStatus max= null;
+ for (int i= 0; i < status.length; i++) {
+ IStatus curr= status[i];
+ if (curr.matches(IStatus.ERROR)) {
+ return curr;
+ }
+ if (max == null || curr.getSeverity() > max.getSeverity()) {
+ max= curr;
+ }
+ }
+ return max;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/StringMatcher.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/StringMatcher.java
new file mode 100644
index 0000000000..880f3a4737
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/StringMatcher.java
@@ -0,0 +1,389 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2007 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * QNX Software System
+ * Markus Schorn (Wind River Systems)
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.util.Vector;
+
+public class StringMatcher {
+ protected String fPattern;
+ protected int fLength; // pattern length
+ protected boolean fIgnoreWildCards;
+ protected boolean fIgnoreCase;
+ protected boolean fHasLeadingStar;
+ protected boolean fHasTrailingStar;
+ protected String fSegments[]; //the given pattern is split into * separated segments
+
+ /* boundary value beyond which we don't need to search in the text */
+ protected int fBound= 0;
+
+ protected static final char fSingleWildCard= '\u0000';
+
+ public static class Position {
+ int start; //inclusive
+ int end; //exclusive
+ public Position(int start, int end) {
+ this.start= start;
+ this.end= end;
+ }
+ public int getStart() {
+ return start;
+ }
+ public int getEnd() {
+ return end;
+ }
+ }
+
+ /**
+ * Find the first occurrence of the pattern between <code>start</code)(inclusive)
+ * and <code>end</code>(exclusive).
+ * @param text the String object to search in
+ * @param start the starting index of the search range, inclusive
+ * @param end the ending index of the search range, exclusive
+ * @return an <code>StringMatcher.Position</code> object that keeps the starting
+ * (inclusive) and ending positions (exclusive) of the first occurrence of the
+ * pattern in the specified range of the text; return null if not found or subtext
+ * is empty (start==end). A pair of zeros is returned if pattern is empty string
+ * Note that for pattern like "*abc*" with leading and trailing stars, position of "abc"
+ * is returned. For a pattern like"*??*" in text "abcdf", (1,3) is returned
+ */
+
+ public StringMatcher.Position find(String text, int start, int end) {
+ if (fPattern == null || text == null)
+ throw new IllegalArgumentException();
+
+ int tlen= text.length();
+ if (start < 0)
+ start= 0;
+ if (end > tlen)
+ end= tlen;
+ if (end < 0 || start >= end)
+ return null;
+ if (fLength == 0)
+ return new Position(start, start);
+ if (fIgnoreWildCards) {
+ int x= posIn(text, start, end);
+ if (x < 0)
+ return null;
+ return new Position(x, x + fLength);
+ }
+
+ int segCount= fSegments.length;
+ if (segCount == 0) //pattern contains only '*'(s)
+ return new Position(start, end);
+
+ int curPos= start;
+ int matchStart= -1;
+ for (int i= 0; i < segCount && curPos < end; ++i) {
+ String current= fSegments[i];
+ int nextMatch= regExpPosIn(text, curPos, end, current);
+ if (nextMatch < 0)
+ return null;
+ if (i == 0)
+ matchStart= nextMatch;
+ curPos= nextMatch + current.length();
+ }
+ return new Position(matchStart, curPos);
+ }
+ /**
+ * StringMatcher constructor takes in a String object that is a simple
+ * pattern which may contain *  for 0 and many characters and
+ * ?  for exactly one character. Also takes as parameter a boolean object
+ * specifying if case should be ignored
+ * @deprecated Use StringMatcher(pattern, ignoreCase, ignoreWildCards).
+ */
+ public StringMatcher(String aPattern, boolean ignoreCase) {
+ this(aPattern, ignoreCase, false);
+ }
+ /**
+ * StringMatcher constructor takes in a String object that is a simple
+ * pattern which may contain *  for 0 and many characters and
+ * ?  for exactly one character.
+ *
+ * Literal '*' and '?' characters must be escaped in the pattern
+ * e.g., "\*" means literal "*", etc.
+ *
+ * Escaping any other character (including the escape character itself),
+ * just results in that character in the pattern.
+ * e.g., "\a" means "a" and "\\" means "\"
+ *
+ * If invoking the StringMatcher with string literals in Java, don't forget
+ * escape characters are represented by "\\".
+ *
+ * @param aPattern the pattern to match text against
+ * @param ignoreCase if true, case is ignored
+ * @param ignoreWildCards if true, wild cards and their escape sequences are ignored
+ * (everything is taken literally).
+ */
+ public StringMatcher(String aPattern, boolean ignoreCase, boolean ignoreWildCards) {
+ fIgnoreCase= ignoreCase;
+ fIgnoreWildCards= ignoreWildCards;
+ fLength= aPattern.length();
+
+ /* convert case */
+ if (fIgnoreCase) {
+ char[] chars= aPattern.toCharArray();
+ for (int i = 0; i < chars.length; i++) {
+ chars[i]= Character.toUpperCase(chars[i]);
+ }
+ fPattern= new String(chars);
+ } else {
+ fPattern= aPattern;
+ }
+
+ if (fIgnoreWildCards) {
+ parseNoWildCards();
+ } else {
+ parseWildCards();
+ }
+ }
+ /**
+ * Given the starting (inclusive) and the ending (exclusive) poisitions in the
+ * <code>text</code>, determine if the given substring matches with aPattern
+ * @return true if the specified portion of the text matches the pattern
+ * @param text a String object that contains the substring to match
+ * @param start marks the starting position (inclusive) of the substring
+ * @param end marks the ending index (exclusive) of the substring
+ */
+ public boolean match(String text, int start, int end) {
+ if (null == fPattern || null == text)
+ throw new IllegalArgumentException();
+
+ if (start > end)
+ return false;
+
+ if (fIgnoreWildCards)
+ return fPattern.regionMatches(fIgnoreCase, 0, text, start, fLength);
+ int segCount= fSegments.length;
+ if (segCount == 0) //pattern contains only '*'(s) or empty pattern
+ return true;
+ if (start == end)
+ return fLength == 0;
+ if (fLength == 0)
+ return start == end;
+
+ int tlen= text.length();
+ if (start < 0)
+ start= 0;
+ if (end > tlen)
+ end= tlen;
+
+ int tCurPos= start;
+ int bound= end - fBound;
+ if (bound < 0)
+ return false;
+ int i= 0;
+ String current= fSegments[i];
+ int segLength= current.length();
+
+ /* process first segment */
+ if (!fHasLeadingStar) {
+ if (!regExpRegionMatches(text, start, current, 0, segLength)) {
+ return false;
+ }
+ ++i;
+ tCurPos= tCurPos + segLength;
+ }
+
+ /* process middle segments */
+ for (; i < segCount && tCurPos <= bound; ++i) {
+ current= fSegments[i];
+ int currentMatch;
+ int k= current.indexOf(fSingleWildCard);
+ if (k < 0) {
+ currentMatch= textPosIn(text, tCurPos, end, current);
+ if (currentMatch < 0)
+ return false;
+ } else {
+ currentMatch= regExpPosIn(text, tCurPos, end, current);
+ if (currentMatch < 0)
+ return false;
+ }
+ tCurPos= currentMatch + current.length();
+ }
+
+ /* process final segment */
+ if (!fHasTrailingStar && tCurPos != end) {
+ int clen= current.length();
+ return regExpRegionMatches(text, end - clen, current, 0, clen);
+ }
+ return i == segCount;
+ }
+ /**
+ * match the given <code>text</code> with the pattern
+ * @return true if matched eitherwise false
+ * @param text a String object
+ */
+ public boolean match(String text) {
+ return match(text, 0, text.length());
+ }
+ /**
+ * This method parses the given pattern into segments seperated by wildcard '*' characters.
+ * Since wildcards are not being used in this case, the pattern consists of a single segment.
+ */
+ private void parseNoWildCards() {
+ fSegments= new String[1];
+ fSegments[0]= fPattern;
+ fBound= fLength;
+ }
+ /**
+ * This method parses the given pattern into segments seperated by wildcard '*' characters.
+ */
+ private void parseWildCards() {
+ if (fPattern.startsWith("*")) //$NON-NLS-1$
+ fHasLeadingStar= true;
+ if (fPattern.endsWith("*")) { //$NON-NLS-1$
+ /* make sure it's not an escaped wildcard */
+ if (fLength > 1 && fPattern.charAt(fLength - 2) != '\\') {
+ fHasTrailingStar= true;
+ }
+ }
+
+ Vector<String> temp= new Vector<String>();
+
+ int pos= 0;
+ StringBuffer buf= new StringBuffer();
+ while (pos < fLength) {
+ char c= fPattern.charAt(pos++);
+ switch (c) {
+ case '\\' :
+ if (pos >= fLength) {
+ buf.append(c);
+ } else {
+ char next= fPattern.charAt(pos++);
+ /* if it's an escape sequence */
+ if (next == '*' || next == '?' || next == '\\') {
+ buf.append(next);
+ } else {
+ /* not an escape sequence, just insert literally */
+ buf.append(c);
+ buf.append(next);
+ }
+ }
+ break;
+ case '*' :
+ if (buf.length() > 0) {
+ /* new segment */
+ temp.addElement(buf.toString());
+ fBound += buf.length();
+ buf.setLength(0);
+ }
+ break;
+ case '?' :
+ /* append special character representing single match wildcard */
+ buf.append(fSingleWildCard);
+ break;
+ default :
+ buf.append(c);
+ }
+ }
+
+ /* add last buffer to segment list */
+ if (buf.length() > 0) {
+ temp.addElement(buf.toString());
+ fBound += buf.length();
+ }
+
+ fSegments= new String[temp.size()];
+ temp.copyInto(fSegments);
+ }
+ /**
+ * @param text a string which contains no wildcard
+ * @param start the starting index in the text for search, inclusive
+ * @param end the stopping point of search, exclusive
+ * @return the starting index in the text of the pattern , or -1 if not found
+ */
+ protected int posIn(String text, int start, int end) { //no wild card in pattern
+ int max= end - fLength;
+
+ if (!fIgnoreCase) {
+ int i= text.indexOf(fPattern, start);
+ if (i == -1 || i > max)
+ return -1;
+ return i;
+ }
+
+ for (int i= start; i <= max; ++i) {
+ if (text.regionMatches(true, i, fPattern, 0, fLength))
+ return i;
+ }
+
+ return -1;
+ }
+ /**
+ * @param text a simple regular expression that may only contain '?'(s)
+ * @param start the starting index in the text for search, inclusive
+ * @param end the stopping point of search, exclusive
+ * @param p a simple regular expression that may contains '?'
+ * @return the starting index in the text of the pattern , or -1 if not found
+ */
+ protected int regExpPosIn(String text, int start, int end, String p) {
+ int plen= p.length();
+
+ int max= end - plen;
+ for (int i= start; i <= max; ++i) {
+ if (regExpRegionMatches(text, i, p, 0, plen))
+ return i;
+ }
+ return -1;
+ }
+
+ protected boolean regExpRegionMatches(String text, int tStart, String p, int pStart, int plen) {
+ while (plen-- > 0) {
+ char tchar= text.charAt(tStart++);
+ char pchar= p.charAt(pStart++);
+
+ /* process wild cards */
+ if (!fIgnoreWildCards) {
+ /* skip single wild cards */
+ if (pchar == fSingleWildCard) {
+ continue;
+ }
+ }
+ if (pchar == tchar)
+ continue;
+ if (fIgnoreCase) {
+ char tc= Character.toUpperCase(tchar);
+ if (tc == pchar)
+ continue;
+ }
+ return false;
+ }
+ return true;
+ }
+ /**
+ * @param text the string to match
+ * @param start the starting index in the text for search, inclusive
+ * @param end the stopping point of search, exclusive
+ * @param p a string that has no wildcard
+ * @return the starting index in the text of the pattern , or -1 if not found
+ */
+ protected int textPosIn(String text, int start, int end, String p) {
+
+ int plen= p.length();
+ int max= end - plen;
+
+ if (!fIgnoreCase) {
+ int i= text.indexOf(p, start);
+ if (i == -1 || i > max)
+ return -1;
+ return i;
+ }
+
+ for (int i= 0; i <= max; ++i) {
+ if (text.regionMatches(true, i, p, 0, plen))
+ return i;
+ }
+
+ return -1;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SuffixesRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SuffixesRule.java
new file mode 100644
index 0000000000..9e6c7b6967
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/SuffixesRule.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * .SUFFIXES
+ * Prerequisites of .SUFFIXES shall be appended to the list of known suffixes and are
+ * used in conjunction with the inference rules.
+ *
+ */
+public class SuffixesRule extends SpecialRule implements ISuffixesRule {
+
+ public SuffixesRule(Directive parent, String[] suffixes) {
+ super(parent, new Target(MakeFileConstants.RULE_SUFFIXES), suffixes, new Command[0]);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Target.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Target.java
new file mode 100644
index 0000000000..32f4c4aea5
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Target.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import java.io.File;
+
+public class Target implements ITarget {
+
+ String target;
+
+ public Target(String t) {
+ target = t;
+ }
+
+ public String toString() {
+ return target;
+ }
+
+ public boolean exits() {
+ return new File(target).exists();
+ }
+
+ public long lastModified() {
+ return new File(target).lastModified();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/TargetRule.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/TargetRule.java
new file mode 100644
index 0000000000..592eb7841e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/TargetRule.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * Makefile : ( statement ) *
+ * statement : rule | macro_definition | comments | empty
+ * rule : inference_rule | target_rule
+ * inference_rule : target ':' <nl> ( <tab> command <nl> ) +
+ * target_rule : target [ ( target ) * ] ':' [ ( prerequisite ) * ] [ ';' command ] <nl>
+ [ ( <tab> prefix_command command ) * ]
+ * macro_definition : string '=' (string)*
+ * comments : '#' (string) *
+ * empty : <nl>
+ * command : string <nl>
+ * target : string
+ * prefix_command : '-' | '@' | '+'
+ * internal_macro : "$<" | "$*" | "$@" | "$?" | "$%"
+ */
+
+public class TargetRule extends Rule implements ITargetRule {
+
+ String[] prerequisites;
+
+ public TargetRule(Directive parent, Target target) {
+ this(parent, target, new String[0], new Command[0]);
+ }
+
+ public TargetRule(Directive parent, Target target, String[] deps) {
+ this(parent, target, deps, new Command[0]);
+ }
+
+ public TargetRule(Directive parent, Target target, String[] reqs, Command[] commands) {
+ super(parent, target, commands);
+ prerequisites = reqs;
+ }
+
+ public String[] getPrerequisites() {
+ return prerequisites;
+ }
+
+ public void setDependecies(String[] reqs) {
+ prerequisites = reqs;
+ }
+
+ /**
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append(getTarget().toString());
+ buffer.append(':');
+ String[] reqs = getPrerequisites();
+ for (int i = 0; i < reqs.length; i++) {
+ buffer.append(' ').append(reqs[i]);
+ }
+ buffer.append('\n');
+ ICommand[] cmds = getCommands();
+ for (int i = 0; i < cmds.length; i++) {
+ buffer.append(cmds[i].toString());
+ }
+ return buffer.toString();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/TargetVariable.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/TargetVariable.java
new file mode 100644
index 0000000000..0e393e9c76
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/TargetVariable.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - modified for Automake usage
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * Here is the syntax of a static pattern rule:
+ *
+ * TARGETS ...: VARIABLE-ASSIGNMENT
+ * TARGETS ...: override VARIABLE-ASSIGNMENT
+ */
+public class TargetVariable extends GNUVariableDef {
+
+ boolean override;
+
+ public TargetVariable(Directive parent, String target, String name, StringBuffer value, boolean override, int type) {
+ super(parent, target, name, value, type);
+ this.override = override;
+ }
+
+ public boolean isOverride() {
+ return override;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Terminal.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Terminal.java
new file mode 100644
index 0000000000..e76b6f8445
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Terminal.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+public abstract class Terminal extends Directive implements ITerminal {
+
+ public Terminal(Directive parent) {
+ super(parent);
+ }
+
+ public boolean isEndif() {
+ return false;
+ }
+
+ public boolean isEndef() {
+ return false;
+ }
+
+ public String toString() {
+ return "\n"; //$NON-NLS-1$
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/TwoArrayQuickSort.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/TwoArrayQuickSort.java
new file mode 100644
index 0000000000..96049ba986
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/TwoArrayQuickSort.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2000 2005 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * QNX Software System
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.core.runtime.Assert;
+
+
+/**
+ * Quick sort to sort two arrays in parallel.
+ */
+public class TwoArrayQuickSort {
+
+ private static void internalSort(String[] keys, Object[] values, int left, int right, boolean ignoreCase) {
+
+ int original_left= left;
+ int original_right= right;
+
+ String mid= keys[(left + right) / 2];
+ do {
+ while (smaller(keys[left], mid, ignoreCase)) {
+ left++;
+ }
+ while (smaller(mid, keys[right], ignoreCase)) {
+ right--;
+ }
+ if (left <= right) {
+ String tmp= keys[left];
+ keys[left]= keys[right];
+ keys[right]= tmp;
+
+ Object tmp2= values[left];
+ values[left]= values[right];
+ values[right]= tmp2;
+
+ left++;
+ right--;
+ }
+ } while (left <= right);
+
+ if (original_left < right) {
+ internalSort(keys , values, original_left, right, ignoreCase);
+ }
+ if (left < original_right) {
+ internalSort(keys, values, left, original_right, ignoreCase);
+ }
+ }
+ private static boolean smaller(String left, String right, boolean ignoreCase) {
+ if (ignoreCase)
+ return left.compareToIgnoreCase(right) < 0;
+ return left.compareTo(right) < 0;
+ }
+ /**
+ * Sorts keys and values in parallel.
+ */
+ public static void sort(String[] keys, Object[] values, boolean ignoreCase) {
+ if (keys != null && values != null) {
+ Assert.isTrue(keys.length == values.length);
+ if (keys.length > 1)
+ internalSort(keys, values, 0, keys.length - 1, ignoreCase);
+ } else {
+ if (keys != null || values != null)
+ Assert.isTrue(false, "Either keys or values in null"); //$NON-NLS-1$
+ }
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/UnExport.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/UnExport.java
new file mode 100644
index 0000000000..231363404f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/UnExport.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+public class UnExport extends Directive implements IUnExport {
+
+ String variable;
+
+ public UnExport(Directive parent, String var) {
+ super(parent);
+ variable = var;
+ }
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer(GNUMakefileConstants.DIRECTIVE_UNEXPORT);
+ sb.append(' ').append(variable);
+ return sb.toString();
+ }
+
+ public String getVariable() {
+ return variable;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Util.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Util.java
new file mode 100644
index 0000000000..be70536da8
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/Util.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ * Utility methods.
+ */
+public class Util {
+
+ private Util() {
+ }
+
+ public static boolean isCommand(String line) {
+ return line.length() > 1 && line.startsWith("\t"); //$NON-NLS-1$
+ }
+
+ public static boolean isEscapedLine(String line) {
+ return (line.endsWith("\\") && !line.endsWith("\\\\")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public static boolean isEmptyLine(String line) {
+ return line.trim().length() == 0;
+ }
+
+ public static int indexOfComment(String line) {
+ boolean escaped = false;
+ for (int i = 0; i < line.length(); i++) {
+ if (line.charAt(i) == '#' && !escaped) {
+ return i;
+ }
+ escaped = line.charAt(i) == '\\';
+ }
+ return -1;
+ }
+
+ public static boolean isSpace(char c) {
+ return (c == ' ' || c == '\t' || c == '\r' || c == '\n');
+ }
+
+ public static int indexOf(String line, char c) {
+ return indexOf(line, new Character(c).toString());
+ }
+
+ /**
+ * Special indexOf() method that makes sure that what we are searching
+ * is not between parentheses and brackets like a macro $(foo) ${bar}
+ */
+ public static int indexOf(String line, String tokens) {
+ int paren = 0;
+ int bracket = 0;
+ char prev = 0;
+ char pprev = 0;
+ for (int i = 0; i < line.length(); i++) {
+ char ch = line.charAt(i);
+ if (ch == '(' && prev == '$' && pprev != '\\') {
+ paren++;
+ } else if (ch == '{' && prev == '$' && pprev != '\\') {
+ bracket++;
+ } else if (ch == ')' && prev != '\\') {
+ if (paren > 0) {
+ paren--;
+ }
+ } else if (ch == '}' && prev != '\\') {
+ if (bracket > 0) {
+ bracket--;
+ }
+ } else if (tokens.indexOf(ch) != -1) {
+ if (paren == 0 && bracket == 0) {
+ return i;
+ }
+ }
+ pprev = prev;
+ prev = ch;
+ }
+ return -1;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/VPath.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/VPath.java
new file mode 100644
index 0000000000..a700a840a7
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/VPath.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+public class VPath extends Directive implements IVPath {
+
+ String pattern;
+ String[] directories;
+
+ public VPath(Directive parent, String pat, String[] dirs) {
+ super(parent);
+ pattern = pat;
+ directories = dirs;
+ }
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer(GNUMakefileConstants.DIRECTIVE_VPATH);
+ if (pattern != null && pattern.length() > 0) {
+ sb.append(' ').append(pattern);
+ }
+ for (int i = 0; i < directories.length; i++) {
+ sb.append(' ').append(directories[i]);
+ }
+ return sb.toString();
+ }
+
+ public String[] getDirectories() {
+ return directories;
+ }
+
+ public String getPattern() {
+ return pattern;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/VariableDefinition.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/VariableDefinition.java
new file mode 100644
index 0000000000..36666ef535
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/VariableDefinition.java
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+/**
+ */
+public class VariableDefinition extends MacroDefinition implements IVariableDefinition {
+
+ /**
+ * ? is Conditional
+ * : is Simply-expanded
+ * + is append
+ * 0 is recursively-expanded.
+ */
+ final static int TYPE_RECURSIVE_EXPAND = 0;
+ final static int TYPE_SIMPLE_EXPAND = ':';
+ final static int TYPE_CONDITIONAL = '?';
+ final static int TYPE_APPEND = '+';
+ int type;
+ String varTarget;
+
+ public VariableDefinition(Directive parent, String name, StringBuffer value) {
+ this(parent, name, value, TYPE_RECURSIVE_EXPAND);
+ }
+
+ public VariableDefinition(Directive parent, String name, StringBuffer value, int type) {
+ this(parent, "", name, value, type); //$NON-NLS-1$
+ }
+
+ public VariableDefinition(Directive parent, String target, String name, StringBuffer value, int type) {
+ super(parent, name, value);
+ varTarget = target;
+ this.type = type;
+ }
+
+ /**
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ StringBuffer sb = new StringBuffer();
+ if (isTargetSpecific()) {
+ sb.append(getTarget()).append(": "); //$NON-NLS-1$
+ }
+ if (isOverride()) {
+ sb.append(GNUMakefileConstants.VARIABLE_OVERRIDE);
+ }
+ if (isMultiLine()) {
+ sb.append(GNUMakefileConstants.VARIABLE_DEFINE);
+ sb.append(' ');
+ sb.append(getName()).append('\n');
+ sb.append(getValue()).append('\n');
+ sb.append(GNUMakefileConstants.TERMINAL_ENDEF);
+ sb.append('\n');
+ } else {
+ if (isExport()) {
+ sb.append(GNUMakefileConstants.VARIABLE_EXPORT);
+ sb.append(' ');
+ }
+ sb.append(getName());
+ if (isRecursivelyExpanded()) {
+ sb.append(" = "); //$NON-NLS-1$
+ } else if (isSimplyExpanded()) {
+ sb.append(" := "); //$NON-NLS-1$
+ } else if (isConditional()) {
+ sb.append(" ?= "); //$NON-NLS-1$
+ } else if (isAppend()) {
+ sb.append(" += "); //$NON-NLS-1$
+ }
+ sb.append(getValue()).append('\n');
+ }
+ return sb.toString();
+ }
+
+ public boolean isRecursivelyExpanded() {
+ return type == TYPE_RECURSIVE_EXPAND;
+ }
+
+ public boolean isSimplyExpanded() {
+ return type == TYPE_SIMPLE_EXPAND;
+ }
+
+ public boolean isConditional() {
+ return type == TYPE_CONDITIONAL;
+ }
+
+ public boolean isAppend() {
+ return type == TYPE_APPEND;
+ }
+
+ public boolean isTargetSpecific() {
+ String t = getTarget();
+ return t != null && t.length() > 0;
+ }
+
+ public boolean isExport() {
+ return false;
+ }
+
+ public boolean isMultiLine() {
+ return false;
+ }
+
+ /**
+ * Variable from an `override' directive.
+ */
+ public boolean isOverride() {
+ return false;
+ }
+
+ /**
+ * Automatic variable -- cannot be set.
+ */
+ public boolean isAutomatic() {
+ return false;
+ }
+
+ public String getTarget() {
+ return varTarget;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/WordPartDetector.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/WordPartDetector.java
new file mode 100644
index 0000000000..4075dc1ac0
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/WordPartDetector.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextViewer;
+
+/**
+ * Used to scan and detect for SQL keywords
+ */
+public class WordPartDetector {
+ String wordPart = ""; //$NON-NLS-1$
+ int offset;
+
+ /**
+ * WordPartDetector.
+ * @param viewer is a text viewer
+ * @param documentOffset into the SQL document
+ */
+ public WordPartDetector(ITextViewer viewer, int documentOffset) {
+ this(viewer.getDocument(), documentOffset);
+ }
+
+ /**
+ *
+ * @param doc
+ * @param documentOffset
+ */
+ public WordPartDetector(IDocument doc, int documentOffset) {
+ offset = documentOffset - 1;
+ int endOffset = documentOffset;
+ try {
+ IRegion region = doc.getLineInformationOfOffset(documentOffset);
+ int top = region.getOffset();
+ int bottom = region.getLength() + top;
+ while (offset >= top && isMakefileLetter(doc.getChar(offset))) {
+ offset--;
+ }
+ while (endOffset < bottom && isMakefileLetter(doc.getChar(endOffset))) {
+ endOffset++;
+ }
+ //we've been one step too far : increase the offset
+ offset++;
+ wordPart = doc.get(offset, endOffset - offset);
+ } catch (BadLocationException e) {
+ // do nothing
+ }
+ }
+
+ public static boolean inMacro(ITextViewer viewer, int offset) {
+ return inMacro(viewer.getDocument(), offset);
+ }
+
+ public static boolean inMacro(IDocument document, int offset) {
+ boolean isMacro = false;
+ // Try to figure out if we are in a Macro.
+ try {
+ for (int index = offset - 1; index >= 0; index--) {
+ char c;
+ c = document.getChar(index);
+ if (c == '$') {
+ isMacro = true;
+ break;
+ } else if (Character.isWhitespace(c)) {
+ break;
+ }
+ }
+ } catch (BadLocationException e) {
+ }
+ return isMacro;
+ }
+
+
+ /**
+ * @return String
+ */
+ public String toString() {
+ return wordPart;
+ }
+
+ public int getOffset() {
+ return offset;
+ }
+
+ boolean isMakefileLetter(char c) {
+ return Character.isLetterOrDigit(c) || c == '_' || c == '.';
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/WorkingCopyManager.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/WorkingCopyManager.java
new file mode 100644
index 0000000000..f7ef53c06a
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/automake/WorkingCopyManager.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake;
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.ui.IEditorInput;
+
+
+/**
+ * This working copy manager works together with a given compilation unit document provider and
+ * additionally offers to "overwrite" the working copy provided by this document provider.
+ */
+public class WorkingCopyManager implements IWorkingCopyManager, IWorkingCopyManagerExtension {
+
+ private IMakefileDocumentProvider fDocumentProvider;
+ private Map<IEditorInput, IMakefile> fMap;
+ private boolean fIsShuttingDown;
+
+ /**
+ * Creates a new working copy manager that co-operates with the given
+ * compilation unit document provider.
+ *
+ * @param provider the provider
+ */
+ public WorkingCopyManager(IMakefileDocumentProvider provider) {
+ Assert.isNotNull(provider);
+ fDocumentProvider= provider;
+ }
+
+ /*
+ * @see org.eclipse.cdt.make.ui.IWorkingCopyManager#connect(org.eclipse.ui.IEditorInput)
+ */
+ public void connect(IEditorInput input) throws CoreException {
+ fDocumentProvider.connect(input);
+ }
+
+ /*
+ * @see org.eclipse.cdt.make.ui.IWorkingCopyManager#disconnect(org.eclipse.ui.IEditorInput)
+ */
+ public void disconnect(IEditorInput input) {
+ fDocumentProvider.disconnect(input);
+ }
+
+ /*
+ * @see org.eclipse.cdt.make.ui.IWorkingCopyManager#shutdown()
+ */
+ public void shutdown() {
+ if (!fIsShuttingDown) {
+ fIsShuttingDown= true;
+ try {
+ if (fMap != null) {
+ fMap.clear();
+ fMap= null;
+ }
+ fDocumentProvider.shutdown();
+ } finally {
+ fIsShuttingDown= false;
+ }
+ }
+ }
+
+ /*
+ * @see org.eclipse.cdt.make.ui.IWorkingCopyManager#getWorkingCopy(org.eclipse.ui.IEditorInput)
+ */
+ public IMakefile getWorkingCopy(IEditorInput input) {
+ IMakefile unit= fMap == null ? null : (IMakefile) fMap.get(input);
+ return unit != null ? unit : fDocumentProvider.getWorkingCopy(input);
+ }
+
+ /*
+ * @see org.eclipse.cdt.make.ui.IWorkingCopyManagerExtension#setWorkingCopy(org.eclipse.ui.IEditorInput, org.eclipse.cdt.make.core.makefile.IMakefile)
+ */
+ public void setWorkingCopy(IEditorInput input, IMakefile workingCopy) {
+ if (fDocumentProvider.getDocument(input) != null) {
+ if (fMap == null)
+ fMap= new HashMap<IEditorInput, IMakefile>();
+ fMap.put(input, workingCopy);
+ }
+ }
+
+ /*
+ * @see org.eclipse.linuxtools.internal.cdt.autotools.ui.editors.automake.IWorkingCopyManagerExtension#removeWorkingCopy(org.eclipse.ui.IEditorInput)
+ */
+ public void removeWorkingCopy(IEditorInput input) {
+ fMap.remove(input);
+ if (fMap.isEmpty())
+ fMap= null;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AbstractEditorPreferencePage.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AbstractEditorPreferencePage.java
new file mode 100644
index 0000000000..62c659cd80
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AbstractEditorPreferencePage.java
@@ -0,0 +1,328 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.text.MessageFormat;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.jface.dialogs.DialogPage;
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsPlugin;
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.osgi.service.prefs.BackingStoreException;
+
+
+/**
+ * AbstraceMakeEditorPreferencePage
+ */
+public abstract class AbstractEditorPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+ OverlayPreferenceStore fOverlayStore;
+
+ Map<Button, String> fCheckBoxes= new HashMap<Button, String>();
+ private SelectionListener fCheckBoxListener= new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ public void widgetSelected(SelectionEvent e) {
+ Button button= (Button) e.widget;
+ fOverlayStore.setValue((String) fCheckBoxes.get(button), button.getSelection());
+ }
+ };
+
+ Map<Text, String> fTextFields= new HashMap<Text, String>();
+ private ModifyListener fTextFieldListener= new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ Text text= (Text) e.widget;
+ fOverlayStore.setValue((String) fTextFields.get(text), text.getText());
+ }
+ };
+
+ private Map<Text, Object> fNumberFields= new HashMap<Text, Object>();
+ private ModifyListener fNumberFieldListener= new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ numberFieldChanged((Text) e.widget);
+ }
+ };
+
+ public AbstractEditorPreferencePage() {
+ super();
+ setPreferenceStore(AutotoolsPlugin.getDefault().getPreferenceStore());
+ fOverlayStore= createOverlayStore();
+ }
+
+ protected abstract OverlayPreferenceStore createOverlayStore();
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ public void init(IWorkbench workbench) {
+ }
+
+ protected void initializeFields() {
+ Map<Button, String> checkBoxes= getCheckBoxes();
+ Map<Text, String> textFields= getTextFields();
+ Iterator<Button> e= checkBoxes.keySet().iterator();
+ while (e.hasNext()) {
+ Button b= (Button) e.next();
+ String key= (String) checkBoxes.get(b);
+ b.setSelection(getOverlayStore().getBoolean(key));
+ }
+
+ Iterator<Text> e2 = textFields.keySet().iterator();
+ while (e.hasNext()) {
+ Text t= (Text) e2.next();
+ String key= (String) textFields.get(t);
+ t.setText(getOverlayStore().getString(key));
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferencePage#performOk()
+ */
+ public boolean performOk() {
+ getOverlayStore().propagate();
+ InstanceScope scope = new InstanceScope();
+ try {
+ scope.getNode(AutotoolsPlugin.PLUGIN_ID).flush();
+ } catch (BackingStoreException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return true;
+ }
+
+ protected OverlayPreferenceStore getOverlayStore() {
+ return fOverlayStore;
+ }
+
+ protected OverlayPreferenceStore setOverlayStore() {
+ return fOverlayStore;
+ }
+
+ protected Map<Button, String> getCheckBoxes() {
+ return fCheckBoxes;
+ }
+
+ protected Map<Text, String> getTextFields() {
+ return fTextFields;
+ }
+
+ protected Map<Text, Object> getNumberFields() {
+ return fNumberFields;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
+ */
+ protected void performDefaults() {
+ getOverlayStore().loadDefaults();
+ initializeFields();
+ handleDefaults();
+ super.performDefaults();
+ }
+
+ protected abstract void handleDefaults();
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.IDialogPage#dispose()
+ */
+ public void dispose() {
+ if (getOverlayStore() != null) {
+ getOverlayStore().stop();
+ fOverlayStore= null;
+ }
+ super.dispose();
+ }
+
+ protected Button addCheckBox(Composite parent, String labelText, String key, int indentation) {
+ Button checkBox= new Button(parent, SWT.CHECK);
+ checkBox.setText(labelText);
+ checkBox.setFont(parent.getFont());
+
+ GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
+ gd.horizontalIndent= indentation;
+ gd.horizontalSpan= 2;
+ checkBox.setLayoutData(gd);
+ checkBox.addSelectionListener(fCheckBoxListener);
+
+ getCheckBoxes().put(checkBox, key);
+
+ return checkBox;
+ }
+
+ protected Control addTextField(Composite composite, String labelText, String key, int textLimit, int indentation, String[] errorMessages) {
+ Font font= composite.getFont();
+
+ Label label= new Label(composite, SWT.NONE);
+ label.setText(labelText);
+ label.setFont(font);
+ GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
+ gd.horizontalIndent= indentation;
+ label.setLayoutData(gd);
+
+ Text textControl= new Text(composite, SWT.BORDER | SWT.SINGLE);
+ textControl.setFont(font);
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
+ gd.widthHint= convertWidthInCharsToPixels(textLimit + 1);
+ textControl.setLayoutData(gd);
+ textControl.setTextLimit(textLimit);
+ getTextFields().put(textControl, key);
+ if (errorMessages != null) {
+ getNumberFields().put(textControl, errorMessages);
+ textControl.addModifyListener(fNumberFieldListener);
+ } else {
+ textControl.addModifyListener(fTextFieldListener);
+ }
+
+ return textControl;
+ }
+
+ void numberFieldChanged(Text textControl) {
+ String number= textControl.getText();
+ IStatus status= validatePositiveNumber(number, (String[])getNumberFields().get(textControl));
+ if (!status.matches(IStatus.ERROR)) {
+ getOverlayStore().setValue((String) getTextFields().get(textControl), number);
+ }
+ updateStatus(status);
+ }
+
+ private IStatus validatePositiveNumber(String number, String[] errorMessages) {
+ StatusInfo status= new StatusInfo();
+ if (number.length() == 0) {
+ status.setError(errorMessages[0]);
+ } else {
+ try {
+ int value= Integer.parseInt(number);
+ if (value < 0)
+ status.setError(MessageFormat.format(errorMessages[1], new Object[]{number})); //$NON-NLS-1$
+ } catch (NumberFormatException e) {
+ status.setError(MessageFormat.format(errorMessages[1], new Object[]{number})); //$NON-NLS-1$
+ }
+ }
+ return status;
+ }
+
+ private void updateStatus(IStatus status) {
+ if (!status.matches(IStatus.ERROR)) {
+ Set<Text> keys= getNumberFields().keySet();
+ for (Iterator<Text> iter = keys.iterator(); iter.hasNext();) {
+ Text text = (Text) iter.next();
+ IStatus s= validatePositiveNumber(text.getText(), (String[])getNumberFields().get(text));
+ status= s.getSeverity() > status.getSeverity() ? s : status;
+ }
+ }
+ setValid(!status.matches(IStatus.ERROR));
+ applyToStatusLine(this, status);
+ }
+
+ /*
+ * Applies the status to the status line of a dialog page.
+ */
+ private void applyToStatusLine(DialogPage page, IStatus status) {
+ String message= status.getMessage();
+ switch (status.getSeverity()) {
+ case IStatus.OK:
+ page.setMessage(message, IMessageProvider.NONE);
+ page.setErrorMessage(null);
+ break;
+ case IStatus.WARNING:
+ page.setMessage(message, IMessageProvider.WARNING);
+ page.setErrorMessage(null);
+ break;
+ case IStatus.INFO:
+ page.setMessage(message, IMessageProvider.INFORMATION);
+ page.setErrorMessage(null);
+ break;
+ default:
+ if (message.length() == 0) {
+ message= null;
+ }
+ page.setMessage(null);
+ page.setErrorMessage(message);
+ break;
+ }
+ }
+
+ /**
+ * Returns an array of size 2:
+ * - first element is of type <code>Label</code>
+ * - second element is of type <code>Text</code>
+ * Use <code>getLabelControl</code> and <code>getTextControl</code> to get the 2 controls.
+ */
+ protected Control[] addLabelledTextField(Composite composite, String label, String key, int textLimit, int indentation, String[] errorMessages) {
+ Label labelControl= new Label(composite, SWT.NONE);
+ labelControl.setText(label);
+ labelControl.setFont(composite.getFont());
+ GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
+ gd.horizontalIndent= indentation;
+ labelControl.setLayoutData(gd);
+
+ Text textControl= new Text(composite, SWT.BORDER | SWT.SINGLE);
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
+ gd.widthHint= convertWidthInCharsToPixels(textLimit + 1);
+ textControl.setLayoutData(gd);
+ textControl.setTextLimit(textLimit);
+ textControl.setFont(composite.getFont());
+ fTextFields.put(textControl, key);
+ if (errorMessages != null) {
+ fNumberFields.put(textControl, errorMessages);
+ textControl.addModifyListener(fNumberFieldListener);
+ } else {
+ textControl.addModifyListener(fTextFieldListener);
+ }
+
+ return new Control[]{labelControl, textControl};
+ }
+
+ protected String loadPreviewContentFromFile(String filename) {
+ String line;
+ String separator= System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+ StringBuffer buffer= new StringBuffer(512);
+ BufferedReader reader= null;
+ try {
+ reader= new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(filename)));
+ while ((line= reader.readLine()) != null) {
+ buffer.append(line);
+ buffer.append(separator);
+ }
+ } catch (IOException io) {
+ AutotoolsUIPlugin.log(io);
+ } finally {
+ if (reader != null) {
+ try { reader.close(); } catch (IOException e) {}
+ }
+ }
+ return buffer.toString();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutoconfEditorPreferencePage.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutoconfEditorPreferencePage.java
new file mode 100644
index 0000000000..487537b23c
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutoconfEditorPreferencePage.java
@@ -0,0 +1,591 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - modification to use with Autoconf editor
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.cdt.make.ui.IMakeHelpContextIds;
+import org.eclipse.cdt.ui.PreferenceConstants;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.jface.viewers.IColorProvider;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.ui.model.WorkbenchViewerComparator;
+
+
+
+/**
+ * MakeEditorPreferencePage
+ * The page for setting the editor options.
+ */
+public class AutoconfEditorPreferencePage extends AbstractEditorPreferencePage {
+
+ private static String[] fACVersions = {"2.13", "2.59", "2.61"};
+ public static final String LATEST_AC_VERSION = fACVersions[fACVersions.length - 1];
+
+ private static String[] fAMVersions = {"1.4-p6", "1.9.5", "1.9.6"};
+ public static final String LATEST_AM_VERSION = fAMVersions[fAMVersions.length - 1];
+
+ /** The keys of the overlay store. */
+ private String[][] fSyntaxColorListModel;
+
+ private TableViewer fHighlightingColorListViewer;
+ private final List<HighlightingColorListItem> fHighlightingColorList= new ArrayList<HighlightingColorListItem>(5);
+
+ ColorEditor fAppearanceColorEditor;
+ Button fAppearanceColorDefault;
+ ColorEditor fSyntaxForegroundColorEditor;
+ ColorEditor fBackgroundColorEditor;
+ Button fBoldCheckBox;
+ Button fItalicCheckBox;
+
+ // folding
+ protected Button fFoldingCheckbox;
+
+ // version
+ protected Combo fACVersionCombo;
+ protected Combo fAMVersionCombo;
+
+ /**
+ * Item in the highlighting color list.
+ *
+ * @since 3.0
+ */
+ private class HighlightingColorListItem {
+ /** Display name */
+ private String fDisplayName;
+ /** Color preference key */
+ private String fColorKey;
+ /** Bold preference key */
+ private String fBoldKey;
+ /** Italic preference key */
+ private String fItalicKey;
+ /** Item color */
+ private Color fItemColor;
+
+ /**
+ * Initialize the item with the given values.
+ *
+ * @param displayName the display name
+ * @param colorKey the color preference key
+ * @param boldKey the bold preference key
+ * @param italicKey the italic preference key
+ * @param itemColor the item color
+ */
+ public HighlightingColorListItem(String displayName, String colorKey, String boldKey, String italicKey, Color itemColor) {
+ fDisplayName= displayName;
+ fColorKey= colorKey;
+ fBoldKey= boldKey;
+ fItalicKey= italicKey;
+ fItemColor= itemColor;
+ }
+
+ /**
+ * @return the bold preference key
+ */
+ public String getBoldKey() {
+ return fBoldKey;
+ }
+
+ /**
+ * @return the bold preference key
+ */
+ public String getItalicKey() {
+ return fItalicKey;
+ }
+
+ /**
+ * @return the color preference key
+ */
+ public String getColorKey() {
+ return fColorKey;
+ }
+
+ /**
+ * @return the display name
+ */
+ public String getDisplayName() {
+ return fDisplayName;
+ }
+
+ /**
+ * @return the item color
+ */
+ public Color getItemColor() {
+ return fItemColor;
+ }
+ }
+
+ /**
+ * Color list label provider.
+ *
+ * @since 3.0
+ */
+ private class ColorListLabelProvider extends LabelProvider implements IColorProvider {
+
+ /*
+ * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
+ */
+ public String getText(Object element) {
+ return ((HighlightingColorListItem)element).getDisplayName();
+ }
+
+ /*
+ * @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
+ */
+ public Color getForeground(Object element) {
+ return ((HighlightingColorListItem)element).getItemColor();
+ }
+
+ /*
+ * @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
+ */
+ public Color getBackground(Object element) {
+ return null;
+ }
+ }
+
+ /**
+ * Color list content provider.
+ *
+ * @since 3.0
+ */
+ private class ColorListContentProvider implements IStructuredContentProvider {
+
+ /*
+ * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+ */
+ @SuppressWarnings("unchecked")
+ public Object[] getElements(Object inputElement) {
+ return ((List<Object>)inputElement).toArray();
+ }
+
+ /*
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ public void dispose() {
+ }
+
+ /*
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+ }
+
+
+
+ /**
+ *
+ */
+ public AutoconfEditorPreferencePage() {
+ super();
+ }
+
+ protected OverlayPreferenceStore createOverlayStore() {
+ fSyntaxColorListModel= new String[][] {
+ {AutotoolsPreferencesMessages.getString("AutoconfEditorPreferencePage.autoconf_editor_comment"), ColorManager.AUTOCONF_COMMENT_COLOR, null}, //$NON-NLS-1$
+ {AutotoolsPreferencesMessages.getString("AutoconfEditorPreferencePage.autoconf_editor_acmacro"), ColorManager.AUTOCONF_ACMACRO_COLOR, null}, //$NON-NLS-1$
+ {AutotoolsPreferencesMessages.getString("AutoconfEditorPreferencePage.autoconf_editor_ammacro"), ColorManager.AUTOCONF_AMMACRO_COLOR, null}, //$NON-NLS-1$
+ {AutotoolsPreferencesMessages.getString("AutoconfEditorPreferencePage.autoconf_editor_code_seq"), ColorManager.AUTOCONF_CODESEQ_COLOR, null}, //$NON-NLS-1$
+ {AutotoolsPreferencesMessages.getString("AutoconfEditorPreferencePage.autoconf_editor_keyword"), ColorManager.AUTOCONF_KEYWORD_COLOR, null}, //$NON-NLS-1$
+ {AutotoolsPreferencesMessages.getString("AutoconfEditorPreferencePage.autoconf_editor_var_ref"), ColorManager.AUTOCONF_VAR_REF_COLOR, null}, //$NON-NLS-1$
+ {AutotoolsPreferencesMessages.getString("AutoconfEditorPreferencePage.autoconf_editor_var_set"), ColorManager.AUTOCONF_VAR_SET_COLOR, null}, //$NON-NLS-1$
+ {AutotoolsPreferencesMessages.getString("AutoconfEditorPreferencePage.autoconf_editor_default"), ColorManager.AUTOCONF_DEFAULT_COLOR, null}, //$NON-NLS-1$
+ };
+ ArrayList<OverlayPreferenceStore.OverlayKey> overlayKeys= new ArrayList<OverlayPreferenceStore.OverlayKey>();
+
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_ENABLED));
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_CONDITIONAL));
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_MACRODEF));
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_RULE));
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AutotoolsEditorPreferenceConstants.AUTOCONF_VERSION));
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AutotoolsEditorPreferenceConstants.AUTOMAKE_VERSION));
+
+ for (int i= 0; i < fSyntaxColorListModel.length; i++) {
+ String colorKey= fSyntaxColorListModel[i][1];
+ addTextKeyToCover(overlayKeys, colorKey);
+ }
+
+ OverlayPreferenceStore.OverlayKey[] keys= new OverlayPreferenceStore.OverlayKey[overlayKeys.size()];
+ overlayKeys.toArray(keys);
+ return new OverlayPreferenceStore(getPreferenceStore(), keys);
+ }
+
+ private void addTextKeyToCover(ArrayList<OverlayPreferenceStore.OverlayKey> overlayKeys, String mainKey) {
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, mainKey));
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, mainKey + AutotoolsEditorPreferenceConstants.EDITOR_BOLD_SUFFIX));
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, mainKey + AutotoolsEditorPreferenceConstants.EDITOR_ITALIC_SUFFIX));
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
+ */
+ protected Control createContents(Composite parent) {
+ AutotoolsUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), IMakeHelpContextIds.MAKE_EDITOR_PREFERENCE_PAGE);
+ getOverlayStore().load();
+ getOverlayStore().start();
+
+ TabFolder folder= new TabFolder(parent, SWT.NONE);
+ folder.setLayout(new TabFolderLayout());
+ folder.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ TabItem item= new TabItem(folder, SWT.NONE);
+ item.setText(AutotoolsPreferencesMessages.getString("AutomakeEditorPreferencePage.syntax")); //$NON-NLS-1$
+ item.setControl(createSyntaxPage(folder));
+
+ item= new TabItem(folder, SWT.NONE);
+ item.setText(AutotoolsPreferencesMessages.getString("AutoconfEditorPreferencePage.folding")); //$NON-NLS-1$
+ item.setControl(createFoldingTabContent(folder));
+
+ // Allow end-user to select which version of autoconf to use for hover help
+ // and syntax checking of macros.
+ item= new TabItem(folder, SWT.NONE);
+ item.setText(AutotoolsPreferencesMessages.getString("AutoconfEditorPreferencePage.version")); //$NON-NLS-1$
+ item.setControl(createVersionTabContent(folder));
+
+ initialize();
+
+ applyDialogFont(folder);
+ return folder;
+ }
+
+ private void initialize() {
+
+ initializeFields();
+
+ for (int i= 0, n= fSyntaxColorListModel.length; i < n; i++) {
+ fHighlightingColorList.add(
+ new HighlightingColorListItem (fSyntaxColorListModel[i][0], fSyntaxColorListModel[i][1],
+ fSyntaxColorListModel[i][1] + AutotoolsEditorPreferenceConstants.EDITOR_BOLD_SUFFIX,
+ fSyntaxColorListModel[i][1] + AutotoolsEditorPreferenceConstants.EDITOR_ITALIC_SUFFIX, null));
+ }
+ fHighlightingColorListViewer.setInput(fHighlightingColorList);
+ fHighlightingColorListViewer.setSelection(new StructuredSelection(fHighlightingColorListViewer.getElementAt(0)));
+
+ for (int i=0, n= fACVersions.length; i < n; i++) {
+ fACVersionCombo.setItem(i, fACVersions[i]);
+ }
+
+ initializeFolding();
+ initializeACVersion();
+ initializeAMVersion();
+ }
+
+ void initializeFolding() {
+ boolean enabled= getOverlayStore().getBoolean(PreferenceConstants.EDITOR_FOLDING_ENABLED);
+ fFoldingCheckbox.setSelection(enabled);
+ }
+
+ void initializeACVersion() {
+ // FIXME: What do we do here? There is no PreferenceConstants value for this.
+ // Perhaps we should be using our own overlay store.
+ String version = getOverlayStore().getString(AutotoolsEditorPreferenceConstants.AUTOCONF_VERSION);
+ String[] items = fACVersionCombo.getItems();
+ // Try and find which list item matches the current preference stored and
+ // select it in the list.
+ int i;
+ for (i = 0; i < items.length; ++i) {
+ if (items[i].equals(version))
+ break;
+ }
+ if (i >= items.length)
+ i = items.length - 1;
+ fACVersionCombo.select(i);
+ }
+
+ void initializeAMVersion() {
+ // FIXME: What do we do here? There is no PreferenceConstants value for this.
+ // Perhaps we should be using our own overlay store.
+ String version = getOverlayStore().getString(AutotoolsEditorPreferenceConstants.AUTOMAKE_VERSION);
+ String[] items = fAMVersionCombo.getItems();
+ // Try and find which list item matches the current preference stored and
+ // select it in the list.
+ int i;
+ for (i = 0; i < items.length; ++i) {
+ if (items[i].equals(version))
+ break;
+ }
+ if (i >= items.length)
+ i = items.length - 1;
+ fAMVersionCombo.select(i);
+ }
+
+ void initializeDefaultFolding() {
+ boolean enabled= getOverlayStore().getDefaultBoolean(PreferenceConstants.EDITOR_FOLDING_ENABLED);
+ fFoldingCheckbox.setSelection(enabled);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.AbstractAutomakeEditorPreferencePage#handleDefaults()
+ */
+ protected void handleDefaults() {
+ handleSyntaxColorListSelection();
+ initializeDefaultFolding();
+ }
+
+ private Control createSyntaxPage(Composite parent) {
+
+ Composite colorComposite= new Composite(parent, SWT.NONE);
+ colorComposite.setLayout(new GridLayout());
+
+ Label label= new Label(colorComposite, SWT.LEFT);
+ label.setText(AutotoolsPreferencesMessages.getString("AutomakeEditorPreferencePage.Foreground")); //$NON-NLS-1$
+ label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ Composite editorComposite= new Composite(colorComposite, SWT.NONE);
+ GridLayout layout= new GridLayout();
+ layout.numColumns= 2;
+ layout.marginHeight= 0;
+ layout.marginWidth= 0;
+ editorComposite.setLayout(layout);
+ GridData gd= new GridData(GridData.FILL_BOTH);
+ editorComposite.setLayoutData(gd);
+
+ fHighlightingColorListViewer= new TableViewer(editorComposite, SWT.SINGLE | SWT.V_SCROLL | SWT.BORDER | SWT.FULL_SELECTION);
+ fHighlightingColorListViewer.setLabelProvider(new ColorListLabelProvider());
+ fHighlightingColorListViewer.setContentProvider(new ColorListContentProvider());
+ fHighlightingColorListViewer.setComparator(new WorkbenchViewerComparator());
+ gd= new GridData(GridData.FILL_BOTH);
+ gd.heightHint= convertHeightInCharsToPixels(5);
+ fHighlightingColorListViewer.getControl().setLayoutData(gd);
+
+ Composite stylesComposite= new Composite(editorComposite, SWT.NONE);
+ layout= new GridLayout();
+ layout.marginHeight= 0;
+ layout.marginWidth= 0;
+ layout.numColumns= 2;
+ stylesComposite.setLayout(layout);
+ stylesComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ label= new Label(stylesComposite, SWT.LEFT);
+ label.setText(AutotoolsPreferencesMessages.getString("AutomakeEditorPreferencePage.color")); //$NON-NLS-1$
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ label.setLayoutData(gd);
+
+ fSyntaxForegroundColorEditor= new ColorEditor(stylesComposite);
+ Button foregroundColorButton= fSyntaxForegroundColorEditor.getButton();
+ gd= new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalAlignment= GridData.BEGINNING;
+ foregroundColorButton.setLayoutData(gd);
+
+ fBoldCheckBox= new Button(stylesComposite, SWT.CHECK);
+ fBoldCheckBox.setText(AutotoolsPreferencesMessages.getString("AutomakeEditorPreferencePage.bold")); //$NON-NLS-1$
+ gd= new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalAlignment= GridData.BEGINNING;
+ gd.horizontalSpan= 2;
+ fBoldCheckBox.setLayoutData(gd);
+
+ fItalicCheckBox= new Button(stylesComposite, SWT.CHECK);
+ fItalicCheckBox.setText(AutotoolsPreferencesMessages.getString("AutomakeEditorPreferencePage.italic")); //$NON-NLS-1$
+ gd= new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalAlignment= GridData.BEGINNING;
+ gd.horizontalSpan= 2;
+ fItalicCheckBox.setLayoutData(gd);
+
+ fHighlightingColorListViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ handleSyntaxColorListSelection();
+ }
+ });
+
+ foregroundColorButton.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // do nothing
+ }
+ public void widgetSelected(SelectionEvent e) {
+ HighlightingColorListItem item= getHighlightingColorListItem();
+ PreferenceConverter.setValue(getOverlayStore(), item.getColorKey(), fSyntaxForegroundColorEditor.getColorValue());
+ }
+ });
+
+ fBoldCheckBox.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // do nothing
+ }
+ public void widgetSelected(SelectionEvent e) {
+ HighlightingColorListItem item= getHighlightingColorListItem();
+ getOverlayStore().setValue(item.getBoldKey(), fBoldCheckBox.getSelection());
+ }
+ });
+
+ fItalicCheckBox.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // do nothing
+ }
+ public void widgetSelected(SelectionEvent e) {
+ HighlightingColorListItem item= getHighlightingColorListItem();
+ getOverlayStore().setValue(item.getItalicKey(), fItalicCheckBox.getSelection());
+ }
+ });
+
+ return colorComposite;
+ }
+
+
+ private Composite createFoldingTabContent(TabFolder folder) {
+ Composite composite= new Composite(folder, SWT.NULL);
+ // assume parent page uses griddata
+ GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_CENTER | GridData.VERTICAL_ALIGN_FILL);
+ composite.setLayoutData(gd);
+ GridLayout layout= new GridLayout();
+ layout.numColumns= 2;
+ //PixelConverter pc= new PixelConverter(composite);
+ //layout.verticalSpacing= pc.convertHeightInCharsToPixels(1) / 2;
+ composite.setLayout(layout);
+
+
+ /* check box for new editors */
+ fFoldingCheckbox= new Button(composite, SWT.CHECK);
+ fFoldingCheckbox.setText(AutotoolsPreferencesMessages.getString("AutomakeEditorPreferencePage.foldingenable")); //$NON-NLS-1$
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING);
+ fFoldingCheckbox.setLayoutData(gd);
+ fFoldingCheckbox.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ boolean enabled= fFoldingCheckbox.getSelection();
+ getOverlayStore().setValue(AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_ENABLED, enabled);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ return composite;
+ }
+
+ private Composite createVersionTabContent(TabFolder folder) {
+ Composite composite= new Composite(folder, SWT.NULL);
+ // assume parent page uses griddata
+ GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_CENTER | GridData.VERTICAL_ALIGN_FILL);
+ composite.setLayoutData(gd);
+ GridLayout layout= new GridLayout();
+ layout.numColumns= 2;
+ //PixelConverter pc= new PixelConverter(composite);
+ //layout.verticalSpacing= pc.convertHeightInCharsToPixels(1) / 2;
+ composite.setLayout(layout);
+
+
+ /* check box for new editors */
+ fACVersionCombo= new Combo(composite, SWT.CHECK | SWT.DROP_DOWN | SWT.READ_ONLY);
+ fACVersionCombo.setItems(fACVersions);
+ fACVersionCombo.select(fACVersions.length - 1);
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING);
+ fACVersionCombo.setLayoutData(gd);
+ fACVersionCombo.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ int index = fACVersionCombo.getSelectionIndex();
+ getOverlayStore().setValue(AutotoolsEditorPreferenceConstants.AUTOCONF_VERSION, fACVersionCombo.getItem(index));
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ Label label= new Label(composite, SWT.LEFT);
+ label.setText(AutotoolsPreferencesMessages.getString("AutoconfEditorPreferencePage.autoconfVersion")); //$NON-NLS-1$
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ label.setLayoutData(gd);
+
+ /* check box for new editors */
+ fAMVersionCombo= new Combo(composite, SWT.CHECK | SWT.DROP_DOWN | SWT.READ_ONLY);
+ fAMVersionCombo.setItems(fAMVersions);
+ fAMVersionCombo.select(fAMVersions.length - 1);
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING);
+ fAMVersionCombo.setLayoutData(gd);
+ fAMVersionCombo.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ int index = fAMVersionCombo.getSelectionIndex();
+ getOverlayStore().setValue(AutotoolsEditorPreferenceConstants.AUTOMAKE_VERSION, fAMVersionCombo.getItem(index));
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ Label label2= new Label(composite, SWT.LEFT);
+ label2.setText(AutotoolsPreferencesMessages.getString("AutoconfEditorPreferencePage.automakeVersion")); //$NON-NLS-1$
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ label2.setLayoutData(gd);
+
+ return composite;
+ }
+
+ void handleSyntaxColorListSelection() {
+ HighlightingColorListItem item= getHighlightingColorListItem();
+ RGB rgb= PreferenceConverter.getColor(getOverlayStore(), item.getColorKey());
+ fSyntaxForegroundColorEditor.setColorValue(rgb);
+ fBoldCheckBox.setSelection(getOverlayStore().getBoolean(item.getBoldKey()));
+ fItalicCheckBox.setSelection(getOverlayStore().getBoolean(item.getItalicKey()));
+ }
+
+ /**
+ * Returns the current highlighting color list item.
+ *
+ * @return the current highlighting color list item
+ * @since 3.0
+ */
+ HighlightingColorListItem getHighlightingColorListItem() {
+ IStructuredSelection selection= (IStructuredSelection) fHighlightingColorListViewer.getSelection();
+ return (HighlightingColorListItem) selection.getFirstElement();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferencePage#performOk()
+ */
+ public boolean performOk() {
+ return super.performOk();
+ }
+
+ /**
+ * @param preferenceStore
+ */
+ public static void initDefaults(IPreferenceStore prefs) {
+ // Makefile Editor color preferences
+ PreferenceConverter.setDefault(prefs, ColorManager.AUTOCONF_COMMENT_COLOR, ColorManager.AUTOCONF_COMMENT_RGB);
+ PreferenceConverter.setDefault(prefs, ColorManager.AUTOCONF_DEFAULT_COLOR, ColorManager.AUTOCONF_DEFAULT_RGB);
+ PreferenceConverter.setDefault(prefs, ColorManager.AUTOCONF_KEYWORD_COLOR, ColorManager.AUTOCONF_KEYWORD_RGB);
+ PreferenceConverter.setDefault(prefs, ColorManager.AUTOCONF_VAR_REF_COLOR, ColorManager.AUTOCONF_VAR_REF_RGB);
+ PreferenceConverter.setDefault(prefs, ColorManager.AUTOCONF_VAR_SET_COLOR, ColorManager.AUTOCONF_VAR_SET_RGB);
+ PreferenceConverter.setDefault(prefs, ColorManager.AUTOCONF_ACMACRO_COLOR, ColorManager.AUTOCONF_ACMACRO_RGB);
+ PreferenceConverter.setDefault(prefs, ColorManager.AUTOCONF_AMMACRO_COLOR, ColorManager.AUTOCONF_AMMACRO_RGB);
+ PreferenceConverter.setDefault(prefs, ColorManager.AUTOCONF_CODESEQ_COLOR, ColorManager.AUTOCONF_CODESEQ_RGB);
+ prefs.setDefault(ColorManager.AUTOCONF_CODESEQ_COLOR + AutotoolsEditorPreferenceConstants.EDITOR_ITALIC_SUFFIX, true);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutomakeEditorPreferencePage.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutomakeEditorPreferencePage.java
new file mode 100644
index 0000000000..3ef71c6758
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutomakeEditorPreferencePage.java
@@ -0,0 +1,468 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006, 2007 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - modification to use with Automake editor
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.cdt.make.ui.IMakeHelpContextIds;
+import org.eclipse.cdt.ui.PreferenceConstants;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.jface.viewers.IColorProvider;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.ui.model.WorkbenchViewerComparator;
+
+
+
+/**
+ * MakeEditorPreferencePage
+ * The page for setting the editor options.
+ */
+public class AutomakeEditorPreferencePage extends AbstractEditorPreferencePage {
+
+ /** The keys of the overlay store. */
+ private String[][] fSyntaxColorListModel;
+
+ private TableViewer fHighlightingColorListViewer;
+ private final List<HighlightingColorListItem> fHighlightingColorList= new ArrayList<HighlightingColorListItem>(5);
+
+ ColorEditor fAppearanceColorEditor;
+ Button fAppearanceColorDefault;
+ ColorEditor fSyntaxForegroundColorEditor;
+ ColorEditor fBackgroundColorEditor;
+ Button fBoldCheckBox;
+ Button fItalicCheckBox;
+
+ // folding
+ protected Button fFoldingCheckbox;
+
+ /**
+ * Item in the highlighting color list.
+ *
+ * @since 3.0
+ */
+ private class HighlightingColorListItem {
+ /** Display name */
+ private String fDisplayName;
+ /** Color preference key */
+ private String fColorKey;
+ /** Bold preference key */
+ private String fBoldKey;
+ /** Italic preference key */
+ private String fItalicKey;
+ /** Item color */
+ private Color fItemColor;
+
+ /**
+ * Initialize the item with the given values.
+ *
+ * @param displayName the display name
+ * @param colorKey the color preference key
+ * @param boldKey the bold preference key
+ * @param italicKey the italic preference key
+ * @param itemColor the item color
+ */
+ public HighlightingColorListItem(String displayName, String colorKey, String boldKey, String italicKey, Color itemColor) {
+ fDisplayName= displayName;
+ fColorKey= colorKey;
+ fBoldKey= boldKey;
+ fItalicKey= italicKey;
+ fItemColor= itemColor;
+ }
+
+ /**
+ * @return the bold preference key
+ */
+ public String getBoldKey() {
+ return fBoldKey;
+ }
+
+ /**
+ * @return the bold preference key
+ */
+ public String getItalicKey() {
+ return fItalicKey;
+ }
+
+ /**
+ * @return the color preference key
+ */
+ public String getColorKey() {
+ return fColorKey;
+ }
+
+ /**
+ * @return the display name
+ */
+ public String getDisplayName() {
+ return fDisplayName;
+ }
+
+ /**
+ * @return the item color
+ */
+ public Color getItemColor() {
+ return fItemColor;
+ }
+ }
+
+ /**
+ * Color list label provider.
+ *
+ * @since 3.0
+ */
+ private class ColorListLabelProvider extends LabelProvider implements IColorProvider {
+
+ /*
+ * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
+ */
+ public String getText(Object element) {
+ return ((HighlightingColorListItem)element).getDisplayName();
+ }
+
+ /*
+ * @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
+ */
+ public Color getForeground(Object element) {
+ return ((HighlightingColorListItem)element).getItemColor();
+ }
+
+ /*
+ * @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
+ */
+ public Color getBackground(Object element) {
+ return null;
+ }
+ }
+
+ /**
+ * Color list content provider.
+ *
+ * @since 3.0
+ */
+ private class ColorListContentProvider implements IStructuredContentProvider {
+
+ /*
+ * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+ */
+ @SuppressWarnings("unchecked")
+ public Object[] getElements(Object inputElement) {
+ return ((List<Object>)inputElement).toArray();
+ }
+
+ /*
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ public void dispose() {
+ }
+
+ /*
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+ }
+
+
+
+ /**
+ *
+ */
+ public AutomakeEditorPreferencePage() {
+ super();
+ }
+
+ protected OverlayPreferenceStore createOverlayStore() {
+ fSyntaxColorListModel= new String[][] {
+ {AutotoolsPreferencesMessages.getString("AutomakeEditorPreferencePage.makefile_editor_comment"), ColorManager.MAKE_COMMENT_COLOR, null}, //$NON-NLS-1$
+ {AutotoolsPreferencesMessages.getString("AutomakeEditorPreferencePage.makefile_editor_macro_ref"), ColorManager.MAKE_MACRO_REF_COLOR, null}, //$NON-NLS-1$
+ {AutotoolsPreferencesMessages.getString("AutomakeEditorPreferencePage.makefile_editor_macro_def"), ColorManager.MAKE_MACRO_DEF_COLOR, null}, //$NON-NLS-1$
+ {AutotoolsPreferencesMessages.getString("AutomakeEditorPreferencePage.makefile_editor_function"), ColorManager.MAKE_FUNCTION_COLOR, null}, //$NON-NLS-1$
+ {AutotoolsPreferencesMessages.getString("AutomakeEditorPreferencePage.makefile_editor_keyword"), ColorManager.MAKE_KEYWORD_COLOR, null}, //$NON-NLS-1$
+ {AutotoolsPreferencesMessages.getString("AutomakeEditorPreferencePage.makefile_editor_default"), ColorManager.MAKE_DEFAULT_COLOR, null}, //$NON-NLS-1$
+ };
+ ArrayList<OverlayPreferenceStore.OverlayKey> overlayKeys= new ArrayList<OverlayPreferenceStore.OverlayKey>();
+
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_ENABLED));
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_CONDITIONAL));
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_MACRODEF));
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_RULE));
+
+ for (int i= 0; i < fSyntaxColorListModel.length; i++) {
+ String colorKey= fSyntaxColorListModel[i][1];
+ addTextKeyToCover(overlayKeys, colorKey);
+ }
+
+ OverlayPreferenceStore.OverlayKey[] keys= new OverlayPreferenceStore.OverlayKey[overlayKeys.size()];
+ overlayKeys.toArray(keys);
+ return new OverlayPreferenceStore(getPreferenceStore(), keys);
+ }
+
+ private void addTextKeyToCover(ArrayList<OverlayPreferenceStore.OverlayKey> overlayKeys, String mainKey) {
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, mainKey));
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, mainKey + AutotoolsEditorPreferenceConstants.EDITOR_BOLD_SUFFIX));
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, mainKey + AutotoolsEditorPreferenceConstants.EDITOR_ITALIC_SUFFIX));
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
+ */
+ protected Control createContents(Composite parent) {
+ AutotoolsUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), IMakeHelpContextIds.MAKE_EDITOR_PREFERENCE_PAGE);
+ getOverlayStore().load();
+ getOverlayStore().start();
+
+ TabFolder folder= new TabFolder(parent, SWT.NONE);
+ folder.setLayout(new TabFolderLayout());
+ folder.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ TabItem item= new TabItem(folder, SWT.NONE);
+ item.setText(AutotoolsPreferencesMessages.getString("AutomakeEditorPreferencePage.syntax")); //$NON-NLS-1$
+ item.setControl(createSyntaxPage(folder));
+
+ item= new TabItem(folder, SWT.NONE);
+ item.setText(AutotoolsPreferencesMessages.getString("AutomakeEditorPreferencePage.folding")); //$NON-NLS-1$
+ item.setControl(createFoldingTabContent(folder));
+
+ initialize();
+
+ applyDialogFont(folder);
+ return folder;
+ }
+
+ private void initialize() {
+
+ initializeFields();
+
+ for (int i= 0, n= fSyntaxColorListModel.length; i < n; i++) {
+ fHighlightingColorList.add(
+ new HighlightingColorListItem (fSyntaxColorListModel[i][0], fSyntaxColorListModel[i][1],
+ fSyntaxColorListModel[i][1] + AutotoolsEditorPreferenceConstants.EDITOR_BOLD_SUFFIX,
+ fSyntaxColorListModel[i][1] + AutotoolsEditorPreferenceConstants.EDITOR_ITALIC_SUFFIX, null));
+ }
+ fHighlightingColorListViewer.setInput(fHighlightingColorList);
+ fHighlightingColorListViewer.setSelection(new StructuredSelection(fHighlightingColorListViewer.getElementAt(0)));
+
+ initializeFolding();
+ }
+
+ void initializeFolding() {
+ boolean enabled= getOverlayStore().getBoolean(PreferenceConstants.EDITOR_FOLDING_ENABLED);
+ fFoldingCheckbox.setSelection(enabled);
+ }
+
+ void initializeDefaultFolding() {
+ boolean enabled= getOverlayStore().getDefaultBoolean(PreferenceConstants.EDITOR_FOLDING_ENABLED);
+ fFoldingCheckbox.setSelection(enabled);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.AbstractAutomakeEditorPreferencePage#handleDefaults()
+ */
+ protected void handleDefaults() {
+ handleSyntaxColorListSelection();
+ initializeDefaultFolding();
+ }
+
+ private Control createSyntaxPage(Composite parent) {
+
+ Composite colorComposite= new Composite(parent, SWT.NONE);
+ colorComposite.setLayout(new GridLayout());
+
+ Label label= new Label(colorComposite, SWT.LEFT);
+ label.setText(AutotoolsPreferencesMessages.getString("AutomakeEditorPreferencePage.Foreground")); //$NON-NLS-1$
+ label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ Composite editorComposite= new Composite(colorComposite, SWT.NONE);
+ GridLayout layout= new GridLayout();
+ layout.numColumns= 2;
+ layout.marginHeight= 0;
+ layout.marginWidth= 0;
+ editorComposite.setLayout(layout);
+ GridData gd= new GridData(GridData.FILL_BOTH);
+ editorComposite.setLayoutData(gd);
+
+ fHighlightingColorListViewer= new TableViewer(editorComposite, SWT.SINGLE | SWT.V_SCROLL | SWT.BORDER | SWT.FULL_SELECTION);
+ fHighlightingColorListViewer.setLabelProvider(new ColorListLabelProvider());
+ fHighlightingColorListViewer.setContentProvider(new ColorListContentProvider());
+ fHighlightingColorListViewer.setComparator(new WorkbenchViewerComparator());
+ gd= new GridData(GridData.FILL_BOTH);
+ gd.heightHint= convertHeightInCharsToPixels(5);
+ fHighlightingColorListViewer.getControl().setLayoutData(gd);
+
+ Composite stylesComposite= new Composite(editorComposite, SWT.NONE);
+ layout= new GridLayout();
+ layout.marginHeight= 0;
+ layout.marginWidth= 0;
+ layout.numColumns= 2;
+ stylesComposite.setLayout(layout);
+ stylesComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ label= new Label(stylesComposite, SWT.LEFT);
+ label.setText(AutotoolsPreferencesMessages.getString("AutomakeEditorPreferencePage.color")); //$NON-NLS-1$
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ label.setLayoutData(gd);
+
+ fSyntaxForegroundColorEditor= new ColorEditor(stylesComposite);
+ Button foregroundColorButton= fSyntaxForegroundColorEditor.getButton();
+ gd= new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalAlignment= GridData.BEGINNING;
+ foregroundColorButton.setLayoutData(gd);
+
+ fBoldCheckBox= new Button(stylesComposite, SWT.CHECK);
+ fBoldCheckBox.setText(AutotoolsPreferencesMessages.getString("AutomakeEditorPreferencePage.bold")); //$NON-NLS-1$
+ gd= new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalAlignment= GridData.BEGINNING;
+ gd.horizontalSpan= 2;
+ fBoldCheckBox.setLayoutData(gd);
+
+ fItalicCheckBox= new Button(stylesComposite, SWT.CHECK);
+ fItalicCheckBox.setText(AutotoolsPreferencesMessages.getString("AutomakeEditorPreferencePage.italic")); //$NON-NLS-1$
+ gd= new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalAlignment= GridData.BEGINNING;
+ gd.horizontalSpan= 2;
+ fItalicCheckBox.setLayoutData(gd);
+
+ fHighlightingColorListViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ handleSyntaxColorListSelection();
+ }
+ });
+
+ foregroundColorButton.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // do nothing
+ }
+ public void widgetSelected(SelectionEvent e) {
+ HighlightingColorListItem item= getHighlightingColorListItem();
+ PreferenceConverter.setValue(getOverlayStore(), item.getColorKey(), fSyntaxForegroundColorEditor.getColorValue());
+ }
+ });
+
+ fBoldCheckBox.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // do nothing
+ }
+ public void widgetSelected(SelectionEvent e) {
+ HighlightingColorListItem item= getHighlightingColorListItem();
+ getOverlayStore().setValue(item.getBoldKey(), fBoldCheckBox.getSelection());
+ }
+ });
+
+ fItalicCheckBox.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // do nothing
+ }
+ public void widgetSelected(SelectionEvent e) {
+ HighlightingColorListItem item= getHighlightingColorListItem();
+ getOverlayStore().setValue(item.getItalicKey(), fItalicCheckBox.getSelection());
+ }
+ });
+
+ return colorComposite;
+ }
+
+
+ private Composite createFoldingTabContent(TabFolder folder) {
+ Composite composite= new Composite(folder, SWT.NULL);
+ // assume parent page uses griddata
+ GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_CENTER | GridData.VERTICAL_ALIGN_FILL);
+ composite.setLayoutData(gd);
+ GridLayout layout= new GridLayout();
+ layout.numColumns= 2;
+ //PixelConverter pc= new PixelConverter(composite);
+ //layout.verticalSpacing= pc.convertHeightInCharsToPixels(1) / 2;
+ composite.setLayout(layout);
+
+
+ /* check box for new editors */
+ fFoldingCheckbox= new Button(composite, SWT.CHECK);
+ fFoldingCheckbox.setText(AutotoolsPreferencesMessages.getString("AutomakeEditorPreferencePage.foldingenable")); //$NON-NLS-1$
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING);
+ fFoldingCheckbox.setLayoutData(gd);
+ fFoldingCheckbox.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ boolean enabled= fFoldingCheckbox.getSelection();
+ getOverlayStore().setValue(AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_ENABLED, enabled);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ return composite;
+ }
+
+ void handleSyntaxColorListSelection() {
+ HighlightingColorListItem item= getHighlightingColorListItem();
+ RGB rgb= PreferenceConverter.getColor(getOverlayStore(), item.getColorKey());
+ fSyntaxForegroundColorEditor.setColorValue(rgb);
+ fBoldCheckBox.setSelection(getOverlayStore().getBoolean(item.getBoldKey()));
+ fItalicCheckBox.setSelection(getOverlayStore().getBoolean(item.getItalicKey()));
+ }
+
+ /**
+ * Returns the current highlighting color list item.
+ *
+ * @return the current highlighting color list item
+ * @since 3.0
+ */
+ HighlightingColorListItem getHighlightingColorListItem() {
+ IStructuredSelection selection= (IStructuredSelection) fHighlightingColorListViewer.getSelection();
+ return (HighlightingColorListItem) selection.getFirstElement();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferencePage#performOk()
+ */
+ public boolean performOk() {
+ return super.performOk();
+ }
+
+ /**
+ * @param preferenceStore
+ */
+ public static void initDefaults(IPreferenceStore prefs) {
+ // Makefile Editor color preferences
+ PreferenceConverter.setDefault(prefs, ColorManager.MAKE_COMMENT_COLOR, ColorManager.MAKE_COMMENT_RGB);
+ PreferenceConverter.setDefault(prefs, ColorManager.MAKE_DEFAULT_COLOR, ColorManager.MAKE_DEFAULT_RGB);
+ PreferenceConverter.setDefault(prefs, ColorManager.MAKE_FUNCTION_COLOR, ColorManager.MAKE_FUNCTION_RGB);
+ PreferenceConverter.setDefault(prefs, ColorManager.MAKE_KEYWORD_COLOR, ColorManager.MAKE_KEYWORD_RGB);
+ PreferenceConverter.setDefault(prefs, ColorManager.MAKE_MACRO_DEF_COLOR, ColorManager.MAKE_MACRO_DEF_RGB);
+ PreferenceConverter.setDefault(prefs, ColorManager.MAKE_MACRO_REF_COLOR, ColorManager.MAKE_MACRO_REF_RGB);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsEditorPreferenceConstants.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsEditorPreferenceConstants.java
new file mode 100644
index 0000000000..ec329afce7
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsEditorPreferenceConstants.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2005, 2007, 2009 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - rename to use with Autotools editors
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+
+/**
+ * MakefileEditorPreferenceConstants
+ */
+public class AutotoolsEditorPreferenceConstants {
+
+ /**
+ *
+ */
+ private AutotoolsEditorPreferenceConstants() {
+ }
+
+ /**
+ * The symbolic names for colors for displaying code assist proposals
+ * @see org.eclipse.jface.resource.ColorRegistry
+ */
+ public static final String CURRENT_LINE_COLOR = "org.eclipse.linuxtools.cdt.autotools.ui.automake.currentLineHightlightColor"; //$NON-NLS-1$
+ public static final String LINE_NUMBER_RULER_COLOR = "org.eclipse.linuxtools.cdt.autotools.ui.automake.lineNumberForegroundColor"; //$NON-NLS-1$
+ public static final String PRINT_MARGIN_COLOR = "org.eclipse.linuxtools.cdt.autotools.ui.automake.printMarginColor"; //$NON-NLS-1$
+
+ /**
+ * Preference key suffix for bold text style preference keys.
+ *
+ */
+ public static final String EDITOR_BOLD_SUFFIX= "_bold"; //$NON-NLS-1$
+
+ /**
+ * Preference key suffix for italic text style preference keys.
+ */
+ public static final String EDITOR_ITALIC_SUFFIX= "_italic"; //$NON-NLS-1$
+
+
+ public static final String EDITOR_FOLDING_MACRODEF = "editor_folding_default_macrodef"; //$NON-NLS-1$
+
+ public static final String EDITOR_FOLDING_RULE = "editor_folding_default_rule"; //$NON-NLS-1$
+
+ public static final String EDITOR_FOLDING_CASE = "editor_folding_default_case"; //$NON-NLS-1$
+
+ public static final String EDITOR_FOLDING_CONDITIONAL = "editor_folding_default_conditional"; //$NON-NLS-1$
+
+ public static final String EDITOR_FOLDING_LOOP = "editor_folding_default_loop"; //$NON-NLS-1$
+
+ public static final String EDITOR_FOLDING_ENABLED = "editor_folding_enabled"; //$NON-NLS-1$
+
+ public static final String AUTOCONF_VERSION = "autoconf_version";
+
+ public static final String AUTOMAKE_VERSION = "automake_version";
+
+ public static void initializeDefaultValues(IPreferenceStore store) {
+
+ store.setDefault(AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_ENABLED, false);
+ store.setDefault(AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_MACRODEF, false);
+ store.setDefault(AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_RULE, true);
+ store.setDefault(AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_CASE, true);
+ store.setDefault(AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_CONDITIONAL, true);
+ store.setDefault(AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_LOOP, true);
+ store.setDefault(AutotoolsEditorPreferenceConstants.AUTOCONF_VERSION, AutoconfEditorPreferencePage.LATEST_AC_VERSION);
+ store.setDefault(AutotoolsEditorPreferenceConstants.AUTOMAKE_VERSION, AutoconfEditorPreferencePage.LATEST_AM_VERSION);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsPreferencePage.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsPreferencePage.java
new file mode 100644
index 0000000000..525657f292
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsPreferencePage.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006, 2009 IBM Corporation 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsPlugin;
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+
+public class AutotoolsPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+
+ private static final String PREF_BUILD_TARGET_IN_BACKGROUND = "MakeTargetPrefs.buildTargetInBackground"; //$NON-NLS-1$
+ private static final String TARGET_BUILDS_IN_BACKGROUND = "MakeTargetPreferencePage.buildTargetInBackground.label"; //$NON-NLS-1$
+
+ public AutotoolsPreferencePage() {
+ super(GRID);
+ setPreferenceStore(AutotoolsPlugin.getDefault().getPreferenceStore());
+ }
+
+ /**
+ * @see FieldEditorPreferencePage#createControl(Composite)
+ */
+ protected void createFieldEditors() {
+ Composite parent = getFieldEditorParent();
+
+ BooleanFieldEditor targetBackgroundEditor = new BooleanFieldEditor(PREF_BUILD_TARGET_IN_BACKGROUND,
+ AutotoolsUIPlugin.getResourceString(TARGET_BUILDS_IN_BACKGROUND), parent);
+ addField(targetBackgroundEditor);
+ }
+
+ public static boolean isBuildTargetInBackground() {
+ return AutotoolsPlugin.getDefault().getPreferenceStore().getBoolean(PREF_BUILD_TARGET_IN_BACKGROUND);
+ }
+
+ public static void setBuildTargetInBackground(boolean enable) {
+ AutotoolsPlugin.getDefault().getPreferenceStore().setValue(PREF_BUILD_TARGET_IN_BACKGROUND, enable);
+ }
+
+ /**
+ * Initializes the default values of this page in the preference bundle.
+ */
+ public static void initDefaults(IPreferenceStore prefs) {
+ prefs.setDefault(PREF_BUILD_TARGET_IN_BACKGROUND, true);
+ }
+
+ public void init(IWorkbench workbench) {
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsPreferencesMessages.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsPreferencesMessages.java
new file mode 100644
index 0000000000..3f24110de2
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsPreferencesMessages.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006, 2009 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * MakefilePreferencesMessages
+ */
+public class AutotoolsPreferencesMessages {
+
+ /**
+ *
+ */
+ private AutotoolsPreferencesMessages() {
+ }
+
+ private static final String BUNDLE_NAME = AutotoolsPreferencesMessages.class.getName();
+
+ public static String getString(String key) {
+ try {
+ return ResourceBundle.getBundle(BUNDLE_NAME).getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ } catch (NullPointerException e) {
+ return '#' + key + '#';
+ }
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsPreferencesMessages.properties b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsPreferencesMessages.properties
new file mode 100644
index 0000000000..40b5380683
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsPreferencesMessages.properties
@@ -0,0 +1,108 @@
+###############################################################################
+# Copyright (c) 2000, 2006, 2007 IBM Corporation 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:
+# IBM Corporation - initial API and implementation
+# Red Hat Inc. - convert for usage with Automake and Autoconf editors
+###############################################################################
+
+AutomakeEditorPreferencePage.description=Automake Editor settings:
+AutomakeEditorPreferencePage.invalid_input_print_margin= Invalid print margin column specified
+AutomakeEditorPreferencePage.empty_input_print_margin= No print margin column specified
+AutomakeEditorPreferencePage.appearance=Appeara&nce
+AutomakeEditorPreferencePage.printMarginColumn=Print margin col&umn:
+AutomakeEditorPreferencePage.showOverviewRuler=Show overview &ruler
+AutomakeEditorPreferencePage.showLineNumbers=Show lin&e numbers
+AutomakeEditorPreferencePage.highlightCurrentLine=Hi&ghlight current line
+AutomakeEditorPreferencePage.showPrintMargin=Sho&w print margin
+AutomakeEditorPreferencePage.color=C&olor:
+AutomakeEditorPreferencePage.appearanceOptions=Appearance co&lor options:
+AutomakeEditorPreferencePage.lineNumberForegroundColor=Line number foreground
+AutomakeEditorPreferencePage.currentLineHighlighColor=Current line highlight
+AutomakeEditorPreferencePage.printMarginColor=Print margin
+AutomakeEditorPreferencePage.Makefile_editor_text_1=Text
+AutomakeEditorPreferencePage.Makefile_editor_processing_instuctions_2=Processing instructions
+AutomakeEditorPreferencePage.Makefile_editor_constMakefile_strings_3=ConstMakefile strings
+AutomakeEditorPreferencePage.Makefile_editor_tags_4=Tags
+AutomakeEditorPreferencePage.Makefile_editor_comments_5=Comments
+AutomakeEditorPreferencePage.tabwidth=Displayed &tab width:
+AutomakeEditorPreferencePage.notabwidth=No tab width specified
+AutomakeEditorPreferencePage.39=Invalid tab width specified
+AutomakeEditorPreferencePage.systemdefault=System de&fault
+AutomakeEditorPreferencePage.spacetabs=&Insert spaces for tabs when typing
+AutomakeEditorPreferencePage.foreground= Selection foreground color
+AutomakeEditorPreferencePage.background= Selection background color
+AutomakeEditorPreferencePage.syntax=Synta&x
+AutomakeEditorPreferencePage.backcolor=Background color
+AutomakeEditorPreferencePage.custom=C&ustom:
+AutomakeEditorPreferencePage.Foreground=Fore&ground:
+AutomakeEditorPreferencePage.bold=&Bold
+AutomakeEditorPreferencePage.italic=I&talic
+
+AutomakeEditorPreferencePage.folding= &Folding
+AutomakeEditorPreferencePage.foldingenable= Enable folding when &opening a new editor
+
+AutomakeEditorPreferencePage.makefile_editor_comment=comment
+AutomakeEditorPreferencePage.makefile_editor_macro_def=macro definition
+AutomakeEditorPreferencePage.makefile_editor_macro_ref=macro reference
+AutomakeEditorPreferencePage.makefile_editor_function=function
+AutomakeEditorPreferencePage.makefile_editor_keyword=keyword
+AutomakeEditorPreferencePage.makefile_editor_target=target
+AutomakeEditorPreferencePage.makefile_editor_default=default
+
+
+AutomakeSettingsPreferencePage.style=Style of Makefile
+AutomakeSettingsPreferencePage.path.label=Makefile include directories
+AutomakeSettingsPreferencePage.path.browse=directory
+
+AutoconfEditorPreferencePage.description=Autoconf Editor settings:
+AutoconfEditorPreferencePage.invalid_input_print_margin= Invalid print margin column specified
+AutoconfEditorPreferencePage.empty_input_print_margin= No print margin column specified
+AutoconfEditorPreferencePage.appearance=Appeara&nce
+AutoconfEditorPreferencePage.printMarginColumn=Print margin col&umn:
+AutoconfEditorPreferencePage.showOverviewRuler=Show overview &ruler
+AutoconfEditorPreferencePage.showLineNumbers=Show lin&e numbers
+AutoconfEditorPreferencePage.highlightCurrentLine=Hi&ghlight current line
+AutoconfEditorPreferencePage.showPrintMargin=Sho&w print margin
+AutoconfEditorPreferencePage.color=C&olor:
+AutoconfEditorPreferencePage.appearanceOptions=Appearance co&lor options:
+AutoconfEditorPreferencePage.lineNumberForegroundColor=Line number foreground
+AutoconfEditorPreferencePage.currentLineHighlighColor=Current line highlight
+AutoconfEditorPreferencePage.printMarginColor=Print margin
+AutoconfEditorPreferencePage.Makefile_editor_text_1=Text
+AutoconfEditorPreferencePage.Makefile_editor_processing_instuctions_2=Processing instructions
+AutoconfEditorPreferencePage.Makefile_editor_constMakefile_strings_3=ConstMakefile strings
+AutoconfEditorPreferencePage.Makefile_editor_tags_4=Tags
+AutoconfEditorPreferencePage.Makefile_editor_comments_5=Comments
+AutoconfEditorPreferencePage.tabwidth=Displayed &tab width:
+AutoconfEditorPreferencePage.notabwidth=No tab width specified
+AutoconfEditorPreferencePage.39=Invalid tab width specified
+AutoconfEditorPreferencePage.systemdefault=System de&fault
+AutoconfEditorPreferencePage.spacetabs=&Insert spaces for tabs when typing
+AutoconfEditorPreferencePage.foreground= Selection foreground color
+AutoconfEditorPreferencePage.background= Selection background color
+AutoconfEditorPreferencePage.syntax=Synta&x
+AutoconfEditorPreferencePage.backcolor=Background color
+AutoconfEditorPreferencePage.custom=C&ustom:
+AutoconfEditorPreferencePage.Foreground=Fore&ground:
+AutoconfEditorPreferencePage.bold=&Bold
+AutoconfEditorPreferencePage.italic=I&talic
+
+AutoconfEditorPreferencePage.folding= &Folding
+AutoconfEditorPreferencePage.foldingenable= Enable folding when &opening a new editor
+
+AutoconfEditorPreferencePage.version= &Version
+AutoconfEditorPreferencePage.autoconfVersion = Default version of Autoconf to use for syntax checking
+AutoconfEditorPreferencePage.automakeVersion = Default version of Automake to use for syntax checking
+AutoconfEditorPreferencePage.autoconf_editor_comment=comment
+AutoconfEditorPreferencePage.autoconf_editor_acmacro=autoconf macro
+AutoconfEditorPreferencePage.autoconf_editor_ammacro=automake macro
+AutoconfEditorPreferencePage.autoconf_editor_var_ref=variable reference
+AutoconfEditorPreferencePage.autoconf_editor_keyword=keyword
+AutoconfEditorPreferencePage.autoconf_editor_var_set=variable set
+AutoconfEditorPreferencePage.autoconf_editor_code_seq=inlined code sequence
+AutoconfEditorPreferencePage.autoconf_editor_default=default \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/ColorEditor.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/ColorEditor.java
new file mode 100644
index 0000000000..fb4ff1094f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/ColorEditor.java
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences;
+
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.ColorDialog;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * A "button" of a certain color determined by the color picker
+ */
+public class ColorEditor {
+
+ private Point fExtent;
+ Image fImage;
+ RGB fColorValue;
+ Color fColor;
+ Button fButton;
+
+ public ColorEditor(Composite parent) {
+
+ fButton= new Button(parent, SWT.PUSH);
+ fExtent= computeImageSize(parent);
+ fImage= new Image(parent.getDisplay(), fExtent.x, fExtent.y);
+
+ GC gc= new GC(fImage);
+ gc.setBackground(fButton.getBackground());
+ gc.fillRectangle(0, 0, fExtent.x, fExtent.y);
+ gc.dispose();
+
+ fButton.setImage(fImage);
+ fButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent event) {
+ ColorDialog colorDialog= new ColorDialog(fButton.getShell());
+ colorDialog.setRGB(fColorValue);
+ RGB newColor = colorDialog.open();
+ if (newColor != null) {
+ fColorValue= newColor;
+ updateColorImage();
+ }
+ }
+ });
+
+ fButton.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent event) {
+ if (fImage != null) {
+ fImage.dispose();
+ fImage= null;
+ }
+ if (fColor != null) {
+ fColor.dispose();
+ fColor= null;
+ }
+ }
+ });
+ }
+
+ public RGB getColorValue() {
+ return fColorValue;
+ }
+
+ public void setColorValue(RGB rgb) {
+ fColorValue= rgb;
+ updateColorImage();
+ }
+
+ public Button getButton() {
+ return fButton;
+ }
+
+ protected void updateColorImage() {
+
+ Display display= fButton.getDisplay();
+
+ GC gc= new GC(fImage);
+ gc.setForeground(display.getSystemColor(SWT.COLOR_BLACK));
+ gc.drawRectangle(0, 2, fExtent.x - 1, fExtent.y - 4);
+
+ if (fColor != null)
+ fColor.dispose();
+
+ fColor= new Color(display, fColorValue);
+ gc.setBackground(fColor);
+ gc.fillRectangle(1, 3, fExtent.x - 2, fExtent.y - 5);
+ gc.dispose();
+
+ fButton.setImage(fImage);
+ }
+
+ protected Point computeImageSize(Control window) {
+ GC gc= new GC(window);
+ Font f= JFaceResources.getFontRegistry().get(JFaceResources.DEFAULT_FONT);
+ gc.setFont(f);
+ int height= gc.getFontMetrics().getHeight();
+ gc.dispose();
+ Point p= new Point(height * 3 - 6, height);
+ return p;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/ColorManager.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/ColorManager.java
new file mode 100644
index 0000000000..726af8d295
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/ColorManager.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.jface.text.source.ISharedTextColors;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Display;
+
+public class ColorManager implements ISharedTextColors {
+
+ public static final String MAKE_COMMENT_COLOR ="org.eclipse.linuxtools.cdt.autotools.ui.automake.editor.comment"; //$NON-NLS-1$
+ public static final String MAKE_KEYWORD_COLOR = "org.eclipse.linuxtools.cdt.autotools.ui.automake.editor.keyword"; //$NON-NLS-1$
+ public static final String MAKE_FUNCTION_COLOR = "org.eclipse.linuxtools.cdt.autotools.ui.automake.editor.function"; //$NON-NLS-1$
+ public static final String MAKE_MACRO_REF_COLOR = "org.eclipse.linuxtools.cdt.autotools.ui.automake.editor.macro_ref"; //$NON-NLS-1$
+ public static final String MAKE_MACRO_DEF_COLOR = "org.eclipse.linuxtools.cdt.autotools.ui.automake.editor.macro_def"; //$NON-NLS-1$
+ public static final String MAKE_DEFAULT_COLOR = "org.eclipse.linuxtools.cdt.autotools.ui.automake.editor.default"; //$NON-NLS-1$
+
+ public static final String AUTOCONF_COMMENT_COLOR ="org.eclipse.linuxtools.cdt.autotools.ui.autoconf.editor.comment"; //$NON-NLS-1$
+ public static final String AUTOCONF_KEYWORD_COLOR = "org.eclipse.linuxtools.cdt.autotools.ui.autoconf.editor.keyword"; //$NON-NLS-1$
+ public static final String AUTOCONF_VAR_REF_COLOR = "org.eclipse.linuxtools.cdt.autotools.ui.autoconf.editor.var_ref"; //$NON-NLS-1$
+ public static final String AUTOCONF_VAR_SET_COLOR = "org.eclipse.linuxtools.cdt.autotools.ui.autoconf.editor.var_set"; //$NON-NLS-1$
+ public static final String AUTOCONF_ACMACRO_COLOR = "org.eclipse.linuxtools.cdt.autotools.ui.autoconf.editor.acmacro"; //$NON-NLS-1$
+ public static final String AUTOCONF_AMMACRO_COLOR = "org.eclipse.linuxtools.cdt.autotools.ui.autoconf.editor.ammacro"; //$NON-NLS-1$
+ public static final String AUTOCONF_CODESEQ_COLOR = "org.eclipse.linuxtools.cdt.autotools.ui.autoconf.editor.codeseq"; //$NON-NLS-1$
+ public static final String AUTOCONF_DEFAULT_COLOR = "org.eclipse.linuxtools.cdt.autotools.ui.autoconf.editor.default"; //$NON-NLS-1$
+
+ public static final RGB MAKE_COMMENT_RGB = new RGB(128, 0, 0);
+ public static final RGB MAKE_KEYWORD_RGB = new RGB(128, 255, 0);
+ public static final RGB MAKE_FUNCTION_RGB = new RGB(128, 0, 128);
+ public static final RGB MAKE_MACRO_DEF_RGB = new RGB(0, 0, 128);
+ public static final RGB MAKE_MACRO_REF_RGB = new RGB(0, 128, 0);
+ public static final RGB MAKE_DEFAULT_RGB = new RGB(0, 0, 0);
+
+ public static final RGB AUTOCONF_COMMENT_RGB = new RGB(63, 95, 191);
+ public static final RGB AUTOCONF_KEYWORD_RGB = new RGB(127, 0, 85);
+ public static final RGB AUTOCONF_VAR_REF_RGB = new RGB(128, 0, 0);
+ public static final RGB AUTOCONF_VAR_SET_RGB = new RGB(255, 101, 52);
+ public static final RGB AUTOCONF_ACMACRO_RGB = new RGB(0, 0, 128);
+ public static final RGB AUTOCONF_AMMACRO_RGB = new RGB(0, 128, 0);
+ public static final RGB AUTOCONF_CODESEQ_RGB = new RGB(0, 100, 0);
+ public static final RGB AUTOCONF_DEFAULT_RGB = new RGB(0, 0, 0);
+
+ private static ColorManager fgColorManager;
+
+ private ColorManager() {
+ }
+
+ public static ColorManager getDefault() {
+ if (fgColorManager == null) {
+ fgColorManager= new ColorManager();
+ }
+ return fgColorManager;
+ }
+
+ protected Map<RGB, Color> fColorTable = new HashMap<RGB, Color>(10);
+
+ /**
+ * @see IMakefileColorManager#dispose()
+ */
+ public void dispose() {
+ Iterator<Color> e = fColorTable.values().iterator();
+ while (e.hasNext())
+ ((Color) e.next()).dispose();
+ }
+
+ /**
+ * @see IMakefileColorManager#getColor(RGB)
+ */
+ public Color getColor(RGB rgb) {
+ Color color = (Color) fColorTable.get(rgb);
+ if (color == null) {
+ color = new Color(Display.getCurrent(), rgb);
+ fColorTable.put(rgb, color);
+ }
+ return color;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/OverlayPreferenceStore.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/OverlayPreferenceStore.java
new file mode 100644
index 0000000000..3c6a672572
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/OverlayPreferenceStore.java
@@ -0,0 +1,455 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceStore;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+
+/**
+ * OverlayPreferenceStore
+ */
+/**
+ * An overlaying preference store.
+ */
+class OverlayPreferenceStore implements IPreferenceStore {
+
+
+ public static final class TypeDescriptor {
+ TypeDescriptor() {
+ }
+ }
+
+ public static final TypeDescriptor BOOLEAN= new TypeDescriptor();
+ public static final TypeDescriptor DOUBLE= new TypeDescriptor();
+ public static final TypeDescriptor FLOAT= new TypeDescriptor();
+ public static final TypeDescriptor INT= new TypeDescriptor();
+ public static final TypeDescriptor LONG= new TypeDescriptor();
+ public static final TypeDescriptor STRING= new TypeDescriptor();
+
+ public static class OverlayKey {
+
+ TypeDescriptor fDescriptor;
+ String fKey;
+
+ public OverlayKey(TypeDescriptor descriptor, String key) {
+ fDescriptor= descriptor;
+ fKey= key;
+ }
+ }
+
+ private class PropertyListener implements IPropertyChangeListener {
+
+ /*
+ * @see IPropertyChangeListener#propertyChange(PropertyChangeEvent)
+ */
+ public void propertyChange(PropertyChangeEvent event) {
+ OverlayKey key= findOverlayKey(event.getProperty());
+ if (key != null)
+ propagateProperty(fParent, key, fStore);
+ }
+ }
+
+
+ IPreferenceStore fParent;
+ IPreferenceStore fStore;
+ private OverlayKey[] fOverlayKeys;
+
+ private PropertyListener fPropertyListener;
+
+
+ public OverlayPreferenceStore(IPreferenceStore parent, OverlayKey[] overlayKeys) {
+ fParent= parent;
+ fOverlayKeys= overlayKeys;
+ fStore= new PreferenceStore();
+ }
+
+ OverlayKey findOverlayKey(String key) {
+ for (int i= 0; i < fOverlayKeys.length; i++) {
+ if (fOverlayKeys[i].fKey.equals(key))
+ return fOverlayKeys[i];
+ }
+ return null;
+ }
+
+ private boolean covers(String key) {
+ return (findOverlayKey(key) != null);
+ }
+
+ void propagateProperty(IPreferenceStore orgin, OverlayKey key, IPreferenceStore target) {
+
+ if (orgin.isDefault(key.fKey)) {
+ if (!target.isDefault(key.fKey))
+ target.setToDefault(key.fKey);
+ return;
+ }
+
+ TypeDescriptor d= key.fDescriptor;
+ if (BOOLEAN == d) {
+
+ boolean originValue= orgin.getBoolean(key.fKey);
+ boolean targetValue= target.getBoolean(key.fKey);
+ if (targetValue != originValue)
+ target.setValue(key.fKey, originValue);
+
+ } else if (DOUBLE == d) {
+
+ double originValue= orgin.getDouble(key.fKey);
+ double targetValue= target.getDouble(key.fKey);
+ if (targetValue != originValue)
+ target.setValue(key.fKey, originValue);
+
+ } else if (FLOAT == d) {
+
+ float originValue= orgin.getFloat(key.fKey);
+ float targetValue= target.getFloat(key.fKey);
+ if (targetValue != originValue)
+ target.setValue(key.fKey, originValue);
+
+ } else if (INT == d) {
+
+ int originValue= orgin.getInt(key.fKey);
+ int targetValue= target.getInt(key.fKey);
+ if (targetValue != originValue)
+ target.setValue(key.fKey, originValue);
+
+ } else if (LONG == d) {
+
+ long originValue= orgin.getLong(key.fKey);
+ long targetValue= target.getLong(key.fKey);
+ if (targetValue != originValue)
+ target.setValue(key.fKey, originValue);
+
+ } else if (STRING == d) {
+
+ String originValue= orgin.getString(key.fKey);
+ String targetValue= target.getString(key.fKey);
+ if (targetValue != null && originValue != null && !targetValue.equals(originValue))
+ target.setValue(key.fKey, originValue);
+
+ }
+ }
+
+ public void propagate() {
+ for (int i= 0; i < fOverlayKeys.length; i++)
+ propagateProperty(fStore, fOverlayKeys[i], fParent);
+ }
+
+ private void loadProperty(IPreferenceStore orgin, OverlayKey key, IPreferenceStore target, boolean forceInitialization) {
+ TypeDescriptor d= key.fDescriptor;
+ if (BOOLEAN == d) {
+
+ if (forceInitialization)
+ target.setValue(key.fKey, true);
+ target.setValue(key.fKey, orgin.getBoolean(key.fKey));
+ target.setDefault(key.fKey, orgin.getDefaultBoolean(key.fKey));
+
+ } else if (DOUBLE == d) {
+
+ if (forceInitialization)
+ target.setValue(key.fKey, 1.0D);
+ target.setValue(key.fKey, orgin.getDouble(key.fKey));
+ target.setDefault(key.fKey, orgin.getDefaultDouble(key.fKey));
+
+ } else if (FLOAT == d) {
+
+ if (forceInitialization)
+ target.setValue(key.fKey, 1.0F);
+ target.setValue(key.fKey, orgin.getFloat(key.fKey));
+ target.setDefault(key.fKey, orgin.getDefaultFloat(key.fKey));
+
+ } else if (INT == d) {
+
+ if (forceInitialization)
+ target.setValue(key.fKey, 1);
+ target.setValue(key.fKey, orgin.getInt(key.fKey));
+ target.setDefault(key.fKey, orgin.getDefaultInt(key.fKey));
+
+ } else if (LONG == d) {
+
+ if (forceInitialization)
+ target.setValue(key.fKey, 1L);
+ target.setValue(key.fKey, orgin.getLong(key.fKey));
+ target.setDefault(key.fKey, orgin.getDefaultLong(key.fKey));
+
+ } else if (STRING == d) {
+
+ if (forceInitialization)
+ target.setValue(key.fKey, "1"); //$NON-NLS-1$
+ target.setValue(key.fKey, orgin.getString(key.fKey));
+ target.setDefault(key.fKey, orgin.getDefaultString(key.fKey));
+
+ }
+ }
+
+ public void load() {
+ for (int i= 0; i < fOverlayKeys.length; i++)
+ loadProperty(fParent, fOverlayKeys[i], fStore, true);
+ }
+
+ public void loadDefaults() {
+ for (int i= 0; i < fOverlayKeys.length; i++)
+ setToDefault(fOverlayKeys[i].fKey);
+ }
+
+ public void start() {
+ if (fPropertyListener == null) {
+ fPropertyListener= new PropertyListener();
+ fParent.addPropertyChangeListener(fPropertyListener);
+ }
+ }
+
+ public void stop() {
+ if (fPropertyListener != null) {
+ fParent.removePropertyChangeListener(fPropertyListener);
+ fPropertyListener= null;
+ }
+ }
+
+ /*
+ * @see IPreferenceStore#addPropertyChangeListener(IPropertyChangeListener)
+ */
+ public void addPropertyChangeListener(IPropertyChangeListener listener) {
+ fStore.addPropertyChangeListener(listener);
+ }
+
+ /*
+ * @see IPreferenceStore#removePropertyChangeListener(IPropertyChangeListener)
+ */
+ public void removePropertyChangeListener(IPropertyChangeListener listener) {
+ fStore.removePropertyChangeListener(listener);
+ }
+
+ /*
+ * @see IPreferenceStore#firePropertyChangeEvent(String, Object, Object)
+ */
+ public void firePropertyChangeEvent(String name, Object oldValue, Object newValue) {
+ fStore.firePropertyChangeEvent(name, oldValue, newValue);
+ }
+
+ /*
+ * @see IPreferenceStore#contains(String)
+ */
+ public boolean contains(String name) {
+ return fStore.contains(name);
+ }
+
+ /*
+ * @see IPreferenceStore#getBoolean(String)
+ */
+ public boolean getBoolean(String name) {
+ return fStore.getBoolean(name);
+ }
+
+ /*
+ * @see IPreferenceStore#getDefaultBoolean(String)
+ */
+ public boolean getDefaultBoolean(String name) {
+ return fStore.getDefaultBoolean(name);
+ }
+
+ /*
+ * @see IPreferenceStore#getDefaultDouble(String)
+ */
+ public double getDefaultDouble(String name) {
+ return fStore.getDefaultDouble(name);
+ }
+
+ /*
+ * @see IPreferenceStore#getDefaultFloat(String)
+ */
+ public float getDefaultFloat(String name) {
+ return fStore.getDefaultFloat(name);
+ }
+
+ /*
+ * @see IPreferenceStore#getDefaultInt(String)
+ */
+ public int getDefaultInt(String name) {
+ return fStore.getDefaultInt(name);
+ }
+
+ /*
+ * @see IPreferenceStore#getDefaultLong(String)
+ */
+ public long getDefaultLong(String name) {
+ return fStore.getDefaultLong(name);
+ }
+
+ /*
+ * @see IPreferenceStore#getDefaultString(String)
+ */
+ public String getDefaultString(String name) {
+ return fStore.getDefaultString(name);
+ }
+
+ /*
+ * @see IPreferenceStore#getDouble(String)
+ */
+ public double getDouble(String name) {
+ return fStore.getDouble(name);
+ }
+
+ /*
+ * @see IPreferenceStore#getFloat(String)
+ */
+ public float getFloat(String name) {
+ return fStore.getFloat(name);
+ }
+
+ /*
+ * @see IPreferenceStore#getInt(String)
+ */
+ public int getInt(String name) {
+ return fStore.getInt(name);
+ }
+
+ /*
+ * @see IPreferenceStore#getLong(String)
+ */
+ public long getLong(String name) {
+ return fStore.getLong(name);
+ }
+
+ /*
+ * @see IPreferenceStore#getString(String)
+ */
+ public String getString(String name) {
+ return fStore.getString(name);
+ }
+
+ /*
+ * @see IPreferenceStore#isDefault(String)
+ */
+ public boolean isDefault(String name) {
+ return fStore.isDefault(name);
+ }
+
+ /*
+ * @see IPreferenceStore#needsSaving()
+ */
+ public boolean needsSaving() {
+ return fStore.needsSaving();
+ }
+
+ /*
+ * @see IPreferenceStore#putValue(String, String)
+ */
+ public void putValue(String name, String value) {
+ if (covers(name))
+ fStore.putValue(name, value);
+ }
+
+ /*
+ * @see IPreferenceStore#setDefault(String, double)
+ */
+ public void setDefault(String name, double value) {
+ if (covers(name))
+ fStore.setDefault(name, value);
+ }
+
+ /*
+ * @see IPreferenceStore#setDefault(String, float)
+ */
+ public void setDefault(String name, float value) {
+ if (covers(name))
+ fStore.setDefault(name, value);
+ }
+
+ /*
+ * @see IPreferenceStore#setDefault(String, int)
+ */
+ public void setDefault(String name, int value) {
+ if (covers(name))
+ fStore.setDefault(name, value);
+ }
+
+ /*
+ * @see IPreferenceStore#setDefault(String, long)
+ */
+ public void setDefault(String name, long value) {
+ if (covers(name))
+ fStore.setDefault(name, value);
+ }
+
+ /*
+ * @see IPreferenceStore#setDefault(String, String)
+ */
+ public void setDefault(String name, String value) {
+ if (covers(name))
+ fStore.setDefault(name, value);
+ }
+
+ /*
+ * @see IPreferenceStore#setDefault(String, boolean)
+ */
+ public void setDefault(String name, boolean value) {
+ if (covers(name))
+ fStore.setDefault(name, value);
+ }
+
+ /*
+ * @see IPreferenceStore#setToDefault(String)
+ */
+ public void setToDefault(String name) {
+ fStore.setToDefault(name);
+ }
+
+ /*
+ * @see IPreferenceStore#setValue(String, double)
+ */
+ public void setValue(String name, double value) {
+ if (covers(name))
+ fStore.setValue(name, value);
+ }
+
+ /*
+ * @see IPreferenceStore#setValue(String, float)
+ */
+ public void setValue(String name, float value) {
+ if (covers(name))
+ fStore.setValue(name, value);
+ }
+
+ /*
+ * @see IPreferenceStore#setValue(String, int)
+ */
+ public void setValue(String name, int value) {
+ if (covers(name))
+ fStore.setValue(name, value);
+ }
+
+ /*
+ * @see IPreferenceStore#setValue(String, long)
+ */
+ public void setValue(String name, long value) {
+ if (covers(name))
+ fStore.setValue(name, value);
+ }
+
+ /*
+ * @see IPreferenceStore#setValue(String, String)
+ */
+ public void setValue(String name, String value) {
+ if (covers(name))
+ fStore.setValue(name, value);
+ }
+
+ /*
+ * @see IPreferenceStore#setValue(String, boolean)
+ */
+ public void setValue(String name, boolean value) {
+ if (covers(name))
+ fStore.setValue(name, value);
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/StatusInfo.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/StatusInfo.java
new file mode 100644
index 0000000000..d01fc663e9
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/StatusInfo.java
@@ -0,0 +1,173 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006, 2009 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+
+
+/**
+ * A settable IStatus.
+ * Can be an error, warning, info or ok. For error, info and warning states,
+ * a message describes the problem.
+ */
+public class StatusInfo implements IStatus {
+
+ private String fStatusMessage;
+ private int fSeverity;
+
+ /**
+ * Creates a status set to OK (no message)
+ */
+ public StatusInfo() {
+ this(OK, null);
+ }
+
+ /**
+ * Creates a status .
+ * @param severity The status severity: ERROR, WARNING, INFO and OK.
+ * @param message The message of the status. Applies only for ERROR,
+ * WARNING and INFO.
+ */
+ public StatusInfo(int severity, String message) {
+ fStatusMessage= message;
+ fSeverity= severity;
+ }
+
+ /**
+ * Returns if the status' severity is OK.
+ */
+ public boolean isOK() {
+ return fSeverity == IStatus.OK;
+ }
+
+ /**
+ * Returns if the status' severity is WARNING.
+ */
+ public boolean isWarning() {
+ return fSeverity == IStatus.WARNING;
+ }
+
+ /**
+ * Returns if the status' severity is INFO.
+ */
+ public boolean isInfo() {
+ return fSeverity == IStatus.INFO;
+ }
+
+ /**
+ * Returns if the status' severity is ERROR.
+ */
+ public boolean isError() {
+ return fSeverity == IStatus.ERROR;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IStatus#getMessage()
+ */
+ public String getMessage() {
+ return fStatusMessage;
+ }
+
+ /**
+ * Sets the status to ERROR.
+ * @param errorMessage The error message (can be empty, but not null)
+ */
+ public void setError(String errorMessage) {
+ Assert.isNotNull(errorMessage);
+ fStatusMessage= errorMessage;
+ fSeverity= IStatus.ERROR;
+ }
+
+ /**
+ * Sets the status to WARNING.
+ * @param warningMessage The warning message (can be empty, but not null)
+ */
+ public void setWarning(String warningMessage) {
+ Assert.isNotNull(warningMessage);
+ fStatusMessage= warningMessage;
+ fSeverity= IStatus.WARNING;
+ }
+
+ /**
+ * Sets the status to INFO.
+ * @param infoMessage The info message (can be empty, but not null)
+ */
+ public void setInfo(String infoMessage) {
+ Assert.isNotNull(infoMessage);
+ fStatusMessage= infoMessage;
+ fSeverity= IStatus.INFO;
+ }
+
+ /**
+ * Sets the status to OK.
+ */
+ public void setOK() {
+ fStatusMessage= null;
+ fSeverity= IStatus.OK;
+ }
+
+ /*
+ * @see IStatus#matches(int)
+ */
+ public boolean matches(int severityMask) {
+ return (fSeverity & severityMask) != 0;
+ }
+
+ /**
+ * Returns always <code>false</code>.
+ * @see IStatus#isMultiStatus()
+ */
+ public boolean isMultiStatus() {
+ return false;
+ }
+
+ /*
+ * @see IStatus#getSeverity()
+ */
+ public int getSeverity() {
+ return fSeverity;
+ }
+
+ /*
+ * @see IStatus#getPlugin()
+ */
+ public String getPlugin() {
+ return AutotoolsUIPlugin.getPluginId();
+ }
+
+ /**
+ * Returns always <code>null</code>.
+ * @see IStatus#getException()
+ */
+ public Throwable getException() {
+ return null;
+ }
+
+ /**
+ * Returns always the error severity.
+ * @see IStatus#getCode()
+ */
+ public int getCode() {
+ return fSeverity;
+ }
+
+ /**
+ * Returns always <code>null</code>.
+ * @see IStatus#getChildren()
+ */
+ public IStatus[] getChildren() {
+ return new IStatus[0];
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/TabFolderLayout.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/TabFolderLayout.java
new file mode 100644
index 0000000000..bda23b843a
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/TabFolderLayout.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Layout;
+
+public class TabFolderLayout extends Layout {
+
+ protected Point computeSize (Composite composite, int wHint, int hHint, boolean flushCache) {
+ if (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT)
+ return new Point(wHint, hHint);
+
+ Control [] children = composite.getChildren ();
+ int count = children.length;
+ int maxWidth = 0, maxHeight = 0;
+ for (int i=0; i<count; i++) {
+ Control child = children [i];
+ Point pt = child.computeSize (SWT.DEFAULT, SWT.DEFAULT, flushCache);
+ maxWidth = Math.max (maxWidth, pt.x);
+ maxHeight = Math.max (maxHeight, pt.y);
+ }
+
+ if (wHint != SWT.DEFAULT)
+ maxWidth= wHint;
+ if (hHint != SWT.DEFAULT)
+ maxHeight= hHint;
+
+ return new Point(maxWidth, maxHeight);
+
+ }
+
+ protected void layout (Composite composite, boolean flushCache) {
+ Rectangle rect= composite.getClientArea();
+
+ Control[] children = composite.getChildren();
+ for (int i = 0; i < children.length; i++) {
+ children[i].setBounds(rect);
+ }
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AbstractConfigurePropertyOptionsPage.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AbstractConfigurePropertyOptionsPage.java
new file mode 100644
index 0000000000..f844dd9b55
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AbstractConfigurePropertyOptionsPage.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.properties;
+
+import org.eclipse.jface.preference.FieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.util.PropertyChangeEvent;
+
+public abstract class AbstractConfigurePropertyOptionsPage extends
+ FieldEditorPreferencePage {
+
+ private boolean dirty = false;
+ private String name;
+
+ protected AbstractConfigurePropertyOptionsPage(String name) {
+ this(GRID);
+ this.name = name;
+ }
+
+ protected String getName() {
+ return name;
+ }
+
+ protected AbstractConfigurePropertyOptionsPage(int style) {
+ super(style);
+ noDefaultAndApplyButton();
+ }
+
+ @Override
+ protected void createFieldEditors() {
+ // Get the preference store for the build settings
+ IPreferenceStore settings = getConfigurePrefStore();
+ setPreferenceStore(settings);
+ }
+
+ /**
+ * Return the tool settings preference store
+ */
+ protected AutotoolsConfigurePrefStore getConfigurePrefStore() {
+ return AutotoolsConfigurePrefStore.getInstance();
+ }
+
+ /**
+ * Method called when the value of a dialog field changes
+ */
+ public void propertyChange(PropertyChangeEvent event) {
+ super.propertyChange(event);
+ if (event.getProperty().equals(FieldEditor.VALUE)) {
+ setDirty(true);
+ }
+ }
+
+ public void setDirty(boolean b) { dirty = b; }
+ public boolean isDirty() { return dirty; }
+ public void storeSettings() { super.performOk(); }
+
+ public abstract void updateFields();
+ public abstract void setValues();
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsBuildPropertyPage.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsBuildPropertyPage.java
new file mode 100644
index 0000000000..3ec1077b58
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsBuildPropertyPage.java
@@ -0,0 +1,241 @@
+/*******************************************************************************
+ * 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.properties;
+
+import org.eclipse.cdt.core.settings.model.ICResourceDescription;
+import org.eclipse.cdt.managedbuilder.ui.properties.AbstractCBuildPropertyTab;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsPlugin;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.AutotoolsPropertyConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+
+public class AutotoolsBuildPropertyPage extends AbstractCBuildPropertyTab {
+
+ private String TRUE = "true"; // $NON-NLS-1$
+ private String FALSE = "false"; // $NON-NLS-1$
+ private String CLEAN_DELETE_LABEL = "CleanDelete.label"; // $NON-NLS-1$
+ private String CLEAN_MAKE_LABEL = "CleanMake.label"; // $NON-NLS-1$
+ private String CLEAN_MAKETARGET_LABEL = "CleanMakeTarget.label"; // $NON-NLS-1$
+ private String CLEAN_MAKETARGET_TOOLTIP = "CleanMakeTarget.tooltip"; // $NON-NLS-1$
+ private String AUTO_BUILDNAME_LABEL = "AutoBuildName.label"; // $NON-NLS-1$
+ private String AUTO_BUILDNAME_TOOLTIP = "AutoBuildName.tooltip"; // $NON-NLS-1$
+
+ protected Button fCleanDelete;
+ protected Button fCleanMake;
+ protected Button fAutoName;
+ protected Text fCleanMakeTarget;
+
+ private IProject getProject() {
+ return (IProject)getCfg().getManagedProject().getOwner();
+ }
+
+ public boolean canBeVisible() {
+ return AutotoolsPlugin.hasTargetBuilder(getProject());
+ }
+
+ public void createControls(Composite parent) {
+ super.createControls(parent);
+ Composite composite= usercomp;
+ // assume parent page uses griddata
+ GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_CENTER | GridData.VERTICAL_ALIGN_FILL | GridData.FILL_HORIZONTAL);
+ composite.setLayoutData(gd);
+ GridLayout layout= new GridLayout();
+ layout.numColumns= 2;
+ //PixelConverter pc= new PixelConverter(composite);
+ //layout.verticalSpacing= pc.convertHeightInCharsToPixels(1) / 2;
+ composite.setLayout(layout);
+
+ Group g = new Group(composite, SWT.SHADOW_ETCHED_IN);
+ g.setText(AutotoolsPropertyMessages.getString("CleanBehavior.title"));
+ gd = new GridData(GridData.HORIZONTAL_ALIGN_CENTER | GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ g.setLayoutData(gd);
+ layout= new GridLayout();
+ layout.numColumns= 2;
+ g.setLayout(layout);
+
+ fCleanDelete = new Button(g, SWT.RADIO);
+ fCleanDelete.setText(AutotoolsPropertyMessages.getString(CLEAN_DELETE_LABEL));
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ gd.horizontalSpan = 2;
+ fCleanDelete.setLayoutData(gd);
+ fCleanMake = new Button(g, SWT.RADIO);
+ fCleanMake.setText(AutotoolsPropertyMessages.getString(CLEAN_MAKE_LABEL));
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ gd.horizontalSpan = 2;
+ fCleanMake.setLayoutData(gd);
+
+ Label label = new Label(g, SWT.LEFT);
+ label.setText(AutotoolsPropertyMessages.getString(CLEAN_MAKETARGET_LABEL));
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ label.setLayoutData(gd);
+
+ fCleanMakeTarget = new Text(g, SWT.SINGLE | SWT.BORDER);
+ fCleanMakeTarget.setText(AutotoolsPropertyConstants.CLEAN_MAKE_TARGET_DEFAULT);
+ fCleanMakeTarget.setToolTipText(AutotoolsPropertyMessages.getString(CLEAN_MAKETARGET_TOOLTIP));
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
+ fCleanMakeTarget.setLayoutData(gd);
+
+ fCleanDelete.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ fCleanMake.setSelection(false);
+ fCleanDelete.setSelection(true);
+ fCleanMakeTarget.setEnabled(false);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // do nothing
+ }
+ });
+
+ fCleanMake.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ fCleanDelete.setSelection(false);
+ fCleanMake.setSelection(true);
+ fCleanMakeTarget.setEnabled(true);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // do nothing
+ }
+ });
+
+ fCleanMakeTarget.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ if (fCleanMakeTarget.getText().equals("")) { // $NON-NLS-1$
+ // FIXME: should probably issue warning here, but how?
+ }
+ }
+ });
+
+ fAutoName = new Button(composite, SWT.LEFT | SWT.CHECK);
+ fAutoName.setText(AutotoolsPropertyMessages.getString(AUTO_BUILDNAME_LABEL));
+ fAutoName.setToolTipText(AutotoolsPropertyMessages.getString(AUTO_BUILDNAME_TOOLTIP));
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ gd.horizontalSpan = 2;
+ fAutoName.setLayoutData(gd);
+
+ initialize();
+ }
+
+ protected void performOK() {
+ IProject project = getProject();
+ if (fCleanDelete.getSelection()) {
+ try {
+ project.setPersistentProperty(AutotoolsPropertyConstants.CLEAN_DELETE, TRUE);
+ } catch (CoreException ce) {
+ // FIXME: what can we do here?
+ }
+ } else {
+ try {
+ project.setPersistentProperty(AutotoolsPropertyConstants.CLEAN_DELETE, FALSE);
+ } catch (CoreException ce) {
+ // FIXME: what can we do here?
+ }
+ try {
+ project.setPersistentProperty(AutotoolsPropertyConstants.CLEAN_MAKE_TARGET, fCleanMakeTarget.getText());
+ } catch (CoreException ce) {
+ // FIXME: what can we do here?
+ }
+ }
+
+ if (fAutoName.getSelection()) {
+ try {
+ project.setPersistentProperty(AutotoolsPropertyConstants.AUTO_BUILD_NAME, TRUE);
+ } catch (CoreException ce) {
+ // FIXME: what can we do here?
+ }
+ } else {
+ try {
+ project.setPersistentProperty(AutotoolsPropertyConstants.AUTO_BUILD_NAME, FALSE);
+ } catch (CoreException ce) {
+ // FIXME: what can we do here?
+ }
+ }
+
+ }
+
+ protected void performApply(ICResourceDescription src, ICResourceDescription dst) {
+ performOK();
+ }
+
+ protected void performDefaults() {
+ fCleanDelete.setSelection(false);
+ fCleanMake.setSelection(true);
+ fCleanMakeTarget.setText(AutotoolsPropertyConstants.CLEAN_MAKE_TARGET_DEFAULT);
+ fCleanMakeTarget.setEnabled(true);
+ fAutoName.setEnabled(true);
+ }
+
+ public void updateData(ICResourceDescription cfgd) {
+ // what to do here?
+ }
+
+ public void updateButtons() {
+ // what to do here?
+ }
+
+ public void setVisible (boolean b) {
+ super.setVisible(b);
+ }
+
+ private void initialize() {
+ IProject project = getProject();
+ String cleanDelete = null;
+ String autoName = null;
+ String cleanMakeTarget = null;
+ try {
+ cleanDelete = project.getPersistentProperty(AutotoolsPropertyConstants.CLEAN_DELETE);
+ cleanMakeTarget = project.getPersistentProperty(AutotoolsPropertyConstants.CLEAN_MAKE_TARGET);
+ autoName = project.getPersistentProperty(AutotoolsPropertyConstants.AUTO_BUILD_NAME);
+ } catch (CoreException e) {
+ // do nothing
+ }
+
+ if (cleanMakeTarget == null) {
+ cleanMakeTarget = AutotoolsPropertyConstants.CLEAN_MAKE_TARGET_DEFAULT;
+ }
+ fCleanMakeTarget.setText(cleanMakeTarget);
+
+ if (cleanDelete == null || cleanDelete.equals(FALSE)) {
+ fCleanDelete.setSelection(false);
+ fCleanMake.setSelection(true);
+ fCleanMakeTarget.setEnabled(true);
+ } else {
+ fCleanDelete.setSelection(true);
+ fCleanMake.setSelection(false);
+ fCleanMakeTarget.setEnabled(false);
+ }
+
+ if (autoName == null || autoName.equals(TRUE))
+ fAutoName.setSelection(true);
+ else
+ fAutoName.setSelection(false);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsCategoryPropertyOptionPage.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsCategoryPropertyOptionPage.java
new file mode 100644
index 0000000000..452fa181df
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsCategoryPropertyOptionPage.java
@@ -0,0 +1,139 @@
+/*******************************************************************************
+ * 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.properties;
+
+import java.util.ArrayList;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditor;
+import org.eclipse.jface.preference.StringFieldEditor;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.AutotoolsConfiguration;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.IAConfiguration;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.IConfigureOption;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+public class AutotoolsCategoryPropertyOptionPage extends
+ AbstractConfigurePropertyOptionsPage {
+
+ private String catName = "";
+ private IAConfiguration cfg;
+ // Label class for a preference page.
+ class LabelFieldEditor extends FieldEditor {
+ private String fTitle;
+ private Label fTitleLabel;
+
+ public LabelFieldEditor( Composite parent, String title ) {
+ fTitle = title;
+ this.createControl( parent );
+ }
+
+ protected void adjustForNumColumns( int numColumns ) {
+ ((GridData)fTitleLabel.getLayoutData()).horizontalSpan = 2;
+ }
+
+ protected void doFillIntoGrid( Composite parent, int numColumns ) {
+ fTitleLabel = new Label( parent, SWT.WRAP );
+ fTitleLabel.setText( fTitle );
+ GridData gd = new GridData();
+ gd.verticalAlignment = SWT.TOP;
+ gd.grabExcessHorizontalSpace = false;
+ gd.horizontalSpan = 2;
+ fTitleLabel.setLayoutData( gd );
+ }
+
+ public int getNumberOfControls() { return 1; }
+ /**
+ * The label field editor is only used to present a text label on a preference page.
+ */
+ protected void doLoad() {}
+ protected void doLoadDefault() {}
+ protected void doStore() {}
+ }
+
+ private ArrayList<FieldEditor> fieldEditors;
+
+ public AutotoolsCategoryPropertyOptionPage(ToolListElement element, IAConfiguration cfg) {
+ super(element.getName());
+ this.catName = element.getName();
+ this.cfg = cfg;
+ fieldEditors = new ArrayList<FieldEditor>();
+ }
+
+ public String getName() {
+ return super.getName();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+ */
+ protected void createFieldEditors() {
+ super.createFieldEditors();
+ Composite parent = getFieldEditorParent();
+// FontMetrics fm = AbstractCPropertyTab.getFontMetrics(parent);
+ AutotoolsConfiguration.Option[] options = AutotoolsConfiguration.getChildOptions(catName);
+ for (int i = 0; i < options.length; ++i) {
+ AutotoolsConfiguration.Option option = options[i];
+ switch (option.getType()) {
+ case IConfigureOption.STRING:
+ case IConfigureOption.INTERNAL:
+ case IConfigureOption.MULTIARG:
+ parent = getFieldEditorParent();
+ StringFieldEditor f = new StringFieldEditor(option.getName(), option.getDescription(), 20, parent);
+ f.getLabelControl(parent).setToolTipText(option.getToolTip());
+ addField(f);
+ fieldEditors.add(f);
+ break;
+ case IConfigureOption.BIN:
+ parent = getFieldEditorParent();
+ BooleanFieldEditor b = new BooleanFieldEditor(option.getName(), option.getDescription(), parent);
+ b.getDescriptionControl(parent).setToolTipText(option.getToolTip());
+ addField(b);
+ fieldEditors.add(b);
+ break;
+ }
+ }
+ }
+
+ protected FieldEditor createLabelEditor( Composite parent, String title ) {
+ return new LabelFieldEditor( parent, title );
+ }
+
+ /**
+ * Update the field editor that displays all the build options
+ */
+ public void updateFields() {
+ setValues();
+ }
+
+ public void setValues() {
+ for (int i = 0; i < fieldEditors.size(); ++i) {
+ fieldEditors.get(i).load();
+ }
+ }
+
+ public void propertyChange(PropertyChangeEvent event) {
+ // allow superclass to handle as well
+ super.propertyChange(event);
+
+ if (event.getSource() instanceof StringFieldEditor) {
+ StringFieldEditor f = (StringFieldEditor)event.getSource();
+ cfg.setOption(f.getPreferenceName(), f.getStringValue());
+ } else if (event.getSource() instanceof BooleanFieldEditor) {
+ BooleanFieldEditor b = (BooleanFieldEditor)event.getSource();
+ cfg.setOption(b.getPreferenceName(), Boolean.toString(b.getBooleanValue()));
+ }
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsConfigurePrefStore.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsConfigurePrefStore.java
new file mode 100644
index 0000000000..6c3c6671f5
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsConfigurePrefStore.java
@@ -0,0 +1,283 @@
+/*******************************************************************************
+ * 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.properties;
+
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.IAConfiguration;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.IConfigureOption;
+
+/**
+ * @author jjohnstn
+ *
+ */
+public class AutotoolsConfigurePrefStore implements IPreferenceStore {
+
+ public final static String EMPTY_STRING = new String();
+ public final static String ALL_OPTIONS_ID = EMPTY_STRING;
+
+ private static AutotoolsConfigurePrefStore instance = null;
+ private ToolListElement selectedElement;
+ private IAConfiguration cfg;
+ private ListenerList listenerList;
+ private boolean isdirty;
+
+ private AutotoolsConfigurePrefStore() {
+ // private constructor
+ }
+
+ public static AutotoolsConfigurePrefStore getInstance() {
+ if (instance == null)
+ instance = new AutotoolsConfigurePrefStore();
+ return instance;
+ }
+
+ public void setSelection(IAConfiguration cfg, ToolListElement element) {
+ this.cfg = cfg;
+ selectedElement = element;
+ }
+
+ /* (non-Javadoc)
+ *
+ * @see org.eclipse.jface.preference.IPreferenceStore#addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
+ */
+ public void addPropertyChangeListener(IPropertyChangeListener listener) {
+ listenerList.add(listener);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#contains(java.lang.String)
+ */
+ public boolean contains(String name) {
+ return cfg.getOption(name) != null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#firePropertyChangeEvent(java.lang.String, java.lang.Object, java.lang.Object)
+ */
+ public void firePropertyChangeEvent(String name, Object oldValue,
+ Object newValue) {
+ Object[] listeners = listenerList.getListeners();
+ if (listeners.length > 0 && (oldValue == null || !oldValue.equals(newValue)))
+ {
+ PropertyChangeEvent pe = new PropertyChangeEvent(this, name, oldValue, newValue);
+ for (int i = 0; i < listeners.length; ++i)
+ {
+ IPropertyChangeListener l = (IPropertyChangeListener)listeners[i];
+ l.propertyChange( pe );
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#getBoolean(java.lang.String)
+ */
+ public boolean getBoolean(String name) {
+ IConfigureOption option = cfg.getOption(name);
+ if (option != null && option.getType() == IConfigureOption.BIN) {
+ return Boolean.parseBoolean(option.getValue());
+ }
+ // otherwise punt
+ return getDefaultBoolean(name);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#getDefaultBoolean(java.lang.String)
+ */
+ public boolean getDefaultBoolean(String name) {
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#getDefaultDouble(java.lang.String)
+ */
+ public double getDefaultDouble(String name) {
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#getDefaultFloat(java.lang.String)
+ */
+ public float getDefaultFloat(String name) {
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#getDefaultInt(java.lang.String)
+ */
+ public int getDefaultInt(String name) {
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#getDefaultLong(java.lang.String)
+ */
+ public long getDefaultLong(String name) {
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#getDefaultString(java.lang.String)
+ */
+ public String getDefaultString(String name) {
+ return EMPTY_STRING;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#getDouble(java.lang.String)
+ */
+ public double getDouble(String name) {
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#getFloat(java.lang.String)
+ */
+ public float getFloat(String name) {
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#getInt(java.lang.String)
+ */
+ public int getInt(String name) {
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#getLong(java.lang.String)
+ */
+ public long getLong(String name) {
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#getString(java.lang.String)
+ */
+ public String getString(String name) {
+ if (name.equals(ALL_OPTIONS_ID) && selectedElement.getType() == IConfigureOption.TOOL) {
+ return cfg.getToolParameters(selectedElement.getName());
+ }
+ IConfigureOption option = cfg.getOption(name);
+ if (option != null) {
+ return option.getValue();
+ }
+ // otherwise punt
+ return getDefaultString(name);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#isDefault(java.lang.String)
+ */
+ public boolean isDefault(String name) {
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#needsSaving()
+ */
+ public boolean needsSaving() {
+ return isdirty;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#putValue(java.lang.String, java.lang.String)
+ */
+ public void putValue(String name, String value) {
+ setValue(name, value);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
+ */
+ public void removePropertyChangeListener(IPropertyChangeListener listener) {
+ listenerList.remove(listener);
+ }
+
+ protected void setDirty(boolean isdirty) {
+ this.isdirty = isdirty;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#setDefault(java.lang.String, double)
+ */
+ public void setDefault(String name, double value) {}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#setDefault(java.lang.String, float)
+ */
+ public void setDefault(String name, float value) {}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#setDefault(java.lang.String, int)
+ */
+ public void setDefault(String name, int value) {}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#setDefault(java.lang.String, long)
+ */
+ public void setDefault(String name, long value) {}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#setDefault(java.lang.String, java.lang.String)
+ */
+ public void setDefault(String name, String defaultObject) {}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#setDefault(java.lang.String, boolean)
+ */
+ public void setDefault(String name, boolean value) {}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#setToDefault(java.lang.String)
+ */
+ public void setToDefault(String name) {}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#setValue(java.lang.String, double)
+ */
+ public void setValue(String name, double value) {}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#setValue(java.lang.String, float)
+ */
+ public void setValue(String name, float value) {}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#setValue(java.lang.String, int)
+ */
+ public void setValue(String name, int value) {}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#setValue(java.lang.String, long)
+ */
+ public void setValue(String name, long value) {}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#setValue(java.lang.String, java.lang.String)
+ */
+ public void setValue(String name, String value) {
+ IConfigureOption option = cfg.getOption(name);
+ if (option != null)
+ option.setValue(value);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.IPreferenceStore#setValue(java.lang.String, boolean)
+ */
+ public void setValue(String name, boolean value) {
+ IConfigureOption option = cfg.getOption(name);
+ if (option != null)
+ option.setValue(Boolean.toString(value));
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsConfigurePropertyPage.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsConfigurePropertyPage.java
new file mode 100644
index 0000000000..301a1d0881
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsConfigurePropertyPage.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Red Hat Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.properties;
+
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
+import org.eclipse.cdt.ui.newui.AbstractPage;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.AutotoolsConfigurationManager;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.IAConfiguration;
+
+public class AutotoolsConfigurePropertyPage extends AbstractPage {
+
+ private ICConfigurationDescription cfgd;
+
+ protected boolean isSingle() {
+ return true;
+ }
+
+ /**
+ * Default constructor
+ */
+ public AutotoolsConfigurePropertyPage() {
+ super();
+ }
+
+ public ICConfigurationDescription getCfgd() {
+ return cfgd;
+ }
+
+ public void getAllConfigurationData() {
+ ICConfigurationDescription[] cfgds = getCfgsEditable();
+ for (int i = 0; i < cfgds.length; ++i) {
+ @SuppressWarnings("unused")
+ // Following will trigger an option value handler check which will
+ // clone a configuration if necessary
+ CConfigurationData data = cfgds[i].getConfigurationData();
+ }
+ }
+
+ public IAConfiguration getConfiguration(ICConfigurationDescription cfgd) {
+ IAConfiguration acfg = AutotoolsConfigurationManager.getInstance().getTmpConfiguration(getProject(), cfgd);
+ return acfg;
+ }
+
+ protected void cfgChanged(ICConfigurationDescription _cfgd) {
+ cfgd = _cfgd;
+ // Let super update all pages
+ super.cfgChanged(_cfgd);
+ }
+}
+
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsConfigurePropertyTab.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsConfigurePropertyTab.java
new file mode 100644
index 0000000000..06a3c7447b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsConfigurePropertyTab.java
@@ -0,0 +1,390 @@
+/*******************************************************************************
+ * 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.properties;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICResourceDescription;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IMultiConfiguration;
+import org.eclipse.cdt.ui.newui.AbstractPage;
+import org.eclipse.cdt.ui.newui.PageLayout;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.preference.IPreferencePageContainer;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.AutotoolsConfigurationManager;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.IAConfiguration;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.IConfigureOption;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.AbstractAutotoolsCPropertyTab;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.ScrollBar;
+
+public class AutotoolsConfigurePropertyTab extends AbstractAutotoolsCPropertyTab implements IPreferencePageContainer {
+
+ private TreeViewer fTree;
+ private SashForm sashForm;
+ private Composite settingsPageContainer;
+ private AutotoolsConfigurePrefStore settingsStore;
+ private AbstractConfigurePropertyOptionsPage currentSettingsPage;
+ private ScrolledComposite containerSC;
+ private ToolListContentProvider listprovider;
+ private ToolListElement selectedElement;
+ private ICConfigurationDescription icfgd;
+
+ private Map<String, List<AbstractConfigurePropertyOptionsPage>> configToPageListMap;
+
+ private IProject getProject() {
+ return page.getProject();
+ }
+
+ public boolean canBeVisible() {
+ if (page.isForProject() || page.isForPrefs()) {
+ return true;
+ }
+ return false;
+ }
+
+ public IAConfiguration getAutotoolsCfg() {
+ AutotoolsConfigurePropertyPage ap = (AutotoolsConfigurePropertyPage)page;
+ // We call getConfigurationData() to get the name because if the configuration has been renamed,
+ // it will cause the option value handler to clone the IAConfiguration
+ return ap.getConfiguration(icfgd);
+ }
+
+ private void syncClones() {
+ AutotoolsConfigurePropertyPage ap = (AutotoolsConfigurePropertyPage)page;
+ // We call getConfigurationData() to get the name because if the configuration has been renamed,
+ // it will cause the option value handler to clone the IAConfiguration
+ ap.getAllConfigurationData();
+ }
+
+ public IPreferenceStore getPreferenceStore() {
+ return settingsStore;
+ }
+
+ public void createControls(Composite parent) {
+ AutotoolsConfigurationManager.getInstance().clearTmpConfigurations(getProject());
+ syncClones();
+
+ super.createControls(parent);
+ Composite composite= usercomp;
+
+ settingsStore = AutotoolsConfigurePrefStore.getInstance();
+ configToPageListMap = new HashMap<String, List<AbstractConfigurePropertyOptionsPage>>();
+
+ // assume parent page uses griddata
+ GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_CENTER | GridData.VERTICAL_ALIGN_FILL | GridData.FILL_HORIZONTAL
+ | GridData.FILL_VERTICAL);
+ composite.setLayoutData(gd);
+ GridLayout layout= new GridLayout();
+// layout.numColumns= 2;
+ //PixelConverter pc= new PixelConverter(composite);
+ //layout.verticalSpacing= pc.convertHeightInCharsToPixels(1) / 2;
+ composite.setLayout(layout);
+
+ // Create the sash form
+ sashForm = new SashForm(usercomp, SWT.NONE);
+ sashForm.setOrientation(SWT.HORIZONTAL);
+ sashForm.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ layout = new GridLayout(2, true);
+ layout.marginHeight = 5;
+ sashForm.setLayout(layout);
+ createSelectionArea(sashForm);
+ createEditArea(sashForm);
+
+// usercomp.addControlListener(new ControlAdapter() {
+// @Override
+// public void controlResized(ControlEvent e) {
+// specificResize();
+// }});
+
+ }
+
+// private void specificResize() {
+// Point p1 = fTree.getTree().computeSize(-1, -1);
+// Point p2 = fTree.getTree().getSize();
+// Point p3 = usercomp.getSize();
+// p1.x += calcExtra();
+// if (p3.x >= p1.x && (p1.x < p2.x || (p2.x * 2 < p3.x))) {
+// fTree.getTree().setSize(p1.x , p2.y);
+// sashForm.setWeights(new int[] {p1.x, (p3.x - p1.x)});
+// }
+// }
+//
+// private int calcExtra() {
+// int x = fTree.getTree().getBorderWidth() * 2;
+// ScrollBar sb = fTree.getTree().getVerticalBar();
+// if (sb != null) x += sb.getSize().x;
+// return x;
+// }
+
+ protected void createSelectionArea (Composite parent) {
+ fTree = new TreeViewer(parent, SWT.SINGLE|SWT.H_SCROLL|SWT.V_SCROLL|SWT.BORDER);
+ fTree.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ handleOptionSelection();
+ }});
+ fTree.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
+ // Create a temporary default AutotoolsConfiguration to use for label info
+ IAConfiguration tmp = AutotoolsConfigurationManager.getInstance().createDefaultConfiguration(getProject(), "");
+ fTree.setLabelProvider(new ToolListLabelProvider(tmp));
+ }
+
+ protected void createEditArea(Composite parent) {
+ containerSC = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+ containerSC.setExpandHorizontal(true);
+ containerSC.setExpandVertical(true);
+
+ // Add a container for the build settings page
+ settingsPageContainer = new Composite(containerSC, SWT.NONE);
+ settingsPageContainer.setLayout(new PageLayout());
+
+ containerSC.setContent(settingsPageContainer);
+// containerSC.setMinSize(settingsPageContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+ settingsPageContainer.layout();
+ }
+
+ protected void setValues() {
+ /*
+ * This method updates the context of the build property pages
+ * - Which configuration/resource configuration is selected
+ * - Which tool/option category is selected
+ *
+ * It is called:
+ * - When a property page becomes visible
+ * - When the user changes the configuration selection
+ * - When the user changes the "exclude" setting for a resource
+ */
+
+
+ IConfiguration icfg = getCfg(icfgd.getConfiguration());
+ if (icfg instanceof IMultiConfiguration) {
+ fTree.setInput(null);
+ fTree.getControl().setEnabled(false);
+ currentSettingsPage.setVisible(false);
+ return;
+ }
+
+ IAConfiguration currCfg = getAutotoolsCfg();
+
+ // Create the Tree Viewer content provider if first time
+ if (listprovider == null) {
+ listprovider = new ToolListContentProvider();
+ fTree.setContentProvider(listprovider);
+ }
+
+ // Update the selected configuration and the Tree Viewer
+ ToolListElement[] newElements;
+
+ fTree.setInput(currCfg);
+ fTree.getControl().setEnabled(true);
+ newElements = (ToolListElement[])listprovider.getElements(currCfg);
+ fTree.expandAll();
+
+ selectedElement = newElements[0];
+ fTree.setSelection(new StructuredSelection(selectedElement), true);
+
+// // Determine what the selection in the tree should be
+// // If the saved selection is not null, try to match the saved selection
+// // with an object in the new element list.
+// // Otherwise, select the first tool in the tree
+// Object primaryObject = null;
+// if (selectedElement != null) {
+// selectedElement = matchSelectionElement(selectedElement, newElements);
+// }
+//
+// if (selectedElement == null) {
+// selectedElement = (newElements != null && newElements.length > 0 ? newElements[0] : null);
+// }
+//
+// if (selectedElement != null) {
+// primaryObject = selectedElement.getTool();
+// if (primaryObject == null) {
+// primaryObject = selectedElement.getOptionCategory();
+// }
+// if (primaryObject != null) {
+// if (primaryObject instanceof IOptionCategory) {
+// ((ToolSettingsPrefStore)settingsStore).setSelection(getResDesc(), selectedElement, (IOptionCategory)primaryObject);
+// }
+// optionList.setSelection(new StructuredSelection(selectedElement), true);
+// }
+// }
+// specificResize();
+ }
+
+ private void handleOptionSelection() {
+ // Get the selection from the tree list
+ if (fTree == null) return;
+ IStructuredSelection selection = (IStructuredSelection) fTree.getSelection();
+ ToolListElement element = (ToolListElement)selection.getFirstElement();
+ if (element != null) {
+ displayPageForElement(element);
+ }
+
+ ScrollBar sb = containerSC.getHorizontalBar();
+ if (sb != null && sb.isVisible()) {
+ settingsPageContainer.pack(true);
+ containerSC.setMinSize(settingsPageContainer.getSize());
+ ((AbstractPage)page).resize();
+ }
+ }
+
+ private void displayPageForElement(ToolListElement element) {
+ selectedElement = element;
+ settingsStore.setSelection(getAutotoolsCfg(), selectedElement);
+
+ AbstractConfigurePropertyOptionsPage oldPage = currentSettingsPage;
+ currentSettingsPage = null;
+
+ // Create a new settings page if necessary
+ List<AbstractConfigurePropertyOptionsPage> pages = getPagesForConfig();
+ ListIterator<AbstractConfigurePropertyOptionsPage> iter = pages.listIterator();
+
+ while (iter.hasNext()) {
+ AbstractConfigurePropertyOptionsPage page = iter.next();
+ if (page.getName().equals(element.getName())) {
+ currentSettingsPage = page;
+ break;
+ }
+ }
+ if (currentSettingsPage == null) {
+ if (element.getType() == IConfigureOption.TOOL) {
+ currentSettingsPage = new AutotoolsToolPropertyOptionPage(
+ element, getAutotoolsCfg());
+ }
+ else {
+ currentSettingsPage = new AutotoolsCategoryPropertyOptionPage(
+ element, getAutotoolsCfg());
+ }
+ pages.add(currentSettingsPage);
+ currentSettingsPage.setContainer(this);
+ if (currentSettingsPage.getControl() == null) {
+ currentSettingsPage.createControl(settingsPageContainer);
+ }
+ }
+
+ // Make all the other pages invisible
+ Control[] children = settingsPageContainer.getChildren();
+ Control currentControl = currentSettingsPage.getControl();
+ for (int i = 0; i < children.length; i++) {
+ if (children[i] != currentControl)
+ children[i].setVisible(false);
+ }
+ currentSettingsPage.setVisible(true);
+ currentSettingsPage.updateFields();
+
+ if (oldPage != null && oldPage != currentSettingsPage)
+ oldPage.setVisible(false);
+
+ // Set the size of the scrolled area
+ containerSC.setMinSize(currentSettingsPage.computeSize());
+ settingsPageContainer.layout();
+
+ }
+
+ /* (non-Javadoc)
+ * Answers the list of settings pages for the selected configuration
+ */
+ private List<AbstractConfigurePropertyOptionsPage> getPagesForConfig() {
+ if (getCfg() == null) return null;
+ List<AbstractConfigurePropertyOptionsPage> pages = configToPageListMap.get(getCfg().getName());
+ if (pages == null) {
+ pages = new ArrayList<AbstractConfigurePropertyOptionsPage>();
+ configToPageListMap.put(getCfg().getName(), pages);
+ }
+ return pages;
+ }
+
+ /**
+ * Returns the "dirty" state
+ */
+ public boolean isDirty() {
+ // Check each settings page
+ List<AbstractConfigurePropertyOptionsPage> pages = getPagesForConfig();
+ // Make sure we have something to work on
+ if (pages == null) {
+ // Nothing to do
+ return false;
+ }
+ ListIterator<AbstractConfigurePropertyOptionsPage> iter = pages.listIterator();
+ while (iter.hasNext()) {
+ AbstractConfigurePropertyOptionsPage page = iter.next();
+ if (page == null) continue;
+ if (page.isDirty()) return true;
+ }
+ return false;
+ }
+
+ protected void performOK() {
+ ICConfigurationDescription[] cfgs = page.getCfgsEditable();
+ AutotoolsConfigurePropertyPage ap = (AutotoolsConfigurePropertyPage)page;
+ Map<String, IAConfiguration> cfgList = new HashMap<String, IAConfiguration>();
+ for (int i = 0; i < cfgs.length; ++i) {
+ ICConfigurationDescription cd = cfgs[i];
+ IAConfiguration acfg = ap.getConfiguration(cd);
+ cfgList.put(cd.getId(), acfg);
+ }
+ IProject project = getProject();
+ AutotoolsConfigurationManager.getInstance().replaceProjectConfigurations(project, cfgList, cfgs);
+ AutotoolsConfigurationManager.getInstance().clearTmpConfigurations(project);
+ }
+
+ protected void performCancel() {
+ AutotoolsConfigurationManager.getInstance().clearTmpConfigurations(getProject());
+ }
+
+ protected void performApply(ICResourceDescription src, ICResourceDescription dst) {
+ IProject project = getProject();
+ ICConfigurationDescription[] cfgs = page.getCfgsEditable();
+ // Apply all changes to existing saved configurations and new configurations, but do not perform
+ // deletions.
+ AutotoolsConfigurationManager.getInstance().applyConfigs(project.getName(), cfgs);
+ }
+
+ protected void performDefaults() {
+ IAConfiguration cfg = getAutotoolsCfg();
+ cfg.setDefaultOptions();
+ setValues();
+ }
+
+ protected void updateData(ICResourceDescription rd) {
+ if (rd == null) return;
+ icfgd = rd.getConfiguration();
+ setValues();
+ }
+
+ public void setVisible (boolean b) {
+ super.setVisible(b);
+ }
+
+ // IPreferencePageContainer methods
+ @Override
+ public void updateButtons() {}
+ public void updateMessage() {}
+ public void updateTitle() {}
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsEditorPropertyTab.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsEditorPropertyTab.java
new file mode 100644
index 0000000000..26d044384b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsEditorPropertyTab.java
@@ -0,0 +1,276 @@
+/*******************************************************************************
+ * 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.properties;
+
+import org.eclipse.cdt.core.settings.model.ICResourceDescription;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsPlugin;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.AutotoolsPropertyConstants;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.AbstractAutotoolsCPropertyTab;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.AutotoolsEditorPreferenceConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+
+public class AutotoolsEditorPropertyTab extends AbstractAutotoolsCPropertyTab {
+
+ protected Combo fACVersionCombo;
+ protected Combo fAMVersionCombo;
+ IProject project;
+
+// private class ACVersionSelectionListener implements SelectionListener {
+// ICPropertyProvider p;
+// public ACVersionSelectionListener(ICPropertyProvider p) {
+// this.p = p;
+// }
+//
+// public void widgetSelected(SelectionEvent e) {
+// int index = fACVersionCombo.getSelectionIndex();
+// try {
+// AutotoolsEditorPropertyTab.getProject(p).setPersistentProperty(AutotoolsPropertyConstants.AUTOCONF_VERSION, fACVersionCombo.getItem(index));
+// } catch (CoreException ce) {
+// // FIXME: what can we do here?
+// }
+// }
+//
+// public void widgetDefaultSelected(SelectionEvent e) {
+// // do nothing
+// }
+// }
+//
+// private class AMVersionSelectionListener implements SelectionListener {
+// ICPropertyProvider p;
+// public AMVersionSelectionListener(ICPropertyProvider p) {
+// this.p = p;
+// }
+//
+// public void widgetSelected(SelectionEvent e) {
+// int index = fAMVersionCombo.getSelectionIndex();
+// try {
+// AutotoolsEditorPropertyTab.getProject(p).setPersistentProperty(AutotoolsPropertyConstants.AUTOMAKE_VERSION, fAMVersionCombo.getItem(index));
+// } catch (CoreException ce) {
+// // FIXME: what can we do here?
+// }
+// }
+//
+// public void widgetDefaultSelected(SelectionEvent e) {
+// // do nothing
+// }
+// }
+
+ private IProject getProject() {
+ return page.getProject();
+ }
+
+ public boolean canBeVisible() {
+ return true;
+ }
+
+ public void createControls(Composite parent) {
+ // TODO Auto-generated method stub
+ super.createControls(parent);
+ Composite composite= usercomp;
+
+ // assume parent page uses griddata
+ GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_CENTER | GridData.VERTICAL_ALIGN_FILL);
+ composite.setLayoutData(gd);
+ GridLayout layout= new GridLayout();
+ layout.numColumns= 2;
+ //PixelConverter pc= new PixelConverter(composite);
+ //layout.verticalSpacing= pc.convertHeightInCharsToPixels(1) / 2;
+ composite.setLayout(layout);
+
+ project = getProject();
+
+ /* check box for new editors */
+ fACVersionCombo= new Combo(composite, SWT.CHECK | SWT.DROP_DOWN | SWT.READ_ONLY);
+ fACVersionCombo.setItems(AutotoolsPropertyConstants.fACVersions);
+ fACVersionCombo.select(AutotoolsPropertyConstants.fACVersions.length - 1);
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING);
+ fACVersionCombo.setLayoutData(gd);
+
+ Label label= new Label(composite, SWT.LEFT);
+ label.setText(AutotoolsPropertyMessages.getString("ACEditor.autoconfVersion")); //$NON-NLS-1$
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ label.setLayoutData(gd);
+
+ /* check box for new editors */
+ fAMVersionCombo= new Combo(composite, SWT.CHECK | SWT.DROP_DOWN | SWT.READ_ONLY);
+ fAMVersionCombo.setItems(AutotoolsPropertyConstants.fAMVersions);
+ fAMVersionCombo.select(AutotoolsPropertyConstants.fAMVersions.length - 1);
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING);
+ fAMVersionCombo.setLayoutData(gd);
+
+ Label label2= new Label(composite, SWT.LEFT);
+ label2.setText(AutotoolsPropertyMessages.getString("ACEditor.automakeVersion")); //$NON-NLS-1$
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ label2.setLayoutData(gd);
+
+ initialize();
+ }
+
+ public void performOK() {
+ String acVer = null;
+ String amVer = null;
+ boolean changed = false;
+ try {
+ acVer = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOCONF_VERSION);
+ amVer = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOMAKE_VERSION);
+ } catch (CoreException e) {
+ acVer = "";
+ amVer = "";
+ }
+ int index = fACVersionCombo.getSelectionIndex();
+ String acVerSelected = fACVersionCombo.getItem(index);
+ if (!acVerSelected.equals(acVer)) {
+ changed = true;
+ try {
+ project.setPersistentProperty(AutotoolsPropertyConstants.AUTOCONF_VERSION, fACVersionCombo.getItem(index));
+ } catch (CoreException ce) {
+ // Not much we can do at this point
+ }
+ }
+
+ index = fAMVersionCombo.getSelectionIndex();
+ String amVerSelected = fAMVersionCombo.getItem(index);
+ if (!amVerSelected.equals(amVer)) {
+ changed = true;
+ try {
+ project.setPersistentProperty(AutotoolsPropertyConstants.AUTOMAKE_VERSION, fAMVersionCombo.getItem(index));
+ } catch (CoreException ce) {
+ // Not much we can do here either
+ }
+ }
+
+ // Notify any Autoconf editors that are open for this project that macro versioning
+ // has changed.
+ if (changed)
+ AutotoolsPropertyManager.getDefault().notifyPropertyListeners(project, AutotoolsPropertyConstants.AUTOCONF_MACRO_VERSIONING);
+ }
+
+ protected void performApply(ICResourceDescription src, ICResourceDescription dst) {
+ performOK();
+ }
+
+ public void performDefaults() {
+ // For default Autoconf and Automake versions, use the setting from the
+ // Autotools preference dialog.
+ String version = AutotoolsPlugin.getDefault().getPreferenceStore().getString(AutotoolsEditorPreferenceConstants.AUTOCONF_VERSION);
+ String[] items = fACVersionCombo.getItems();
+ // Try and find which list item matches the current preference stored and
+ // select it in the list.
+ int i;
+ for (i = 0; i < items.length; ++i) {
+ if (items[i].equals(version))
+ break;
+ }
+ if (i >= items.length)
+ i = items.length - 1;
+ fACVersionCombo.select(i);
+
+ version = AutotoolsPlugin.getDefault().getPreferenceStore().getString(AutotoolsEditorPreferenceConstants.AUTOMAKE_VERSION);
+ items = fAMVersionCombo.getItems();
+ // Try and find which list item matches the current preference stored and
+ // select it in the list
+ for (i = 0; i < items.length; ++i) {
+ if (items[i].equals(version))
+ break;
+ }
+ if (i >= items.length)
+ i = items.length - 1;
+ fAMVersionCombo.select(i);
+ }
+
+ public void updateData(ICResourceDescription cfgd) {
+ // Nothing to do
+ }
+
+ public void updateButtons() {
+ // Nothing to do
+ }
+
+ public void setVisible (boolean b) {
+ super.setVisible(b);
+ }
+
+// private IProject getProject(ICPropertyProvider provider) {
+// Object element = provider.getElement();
+// if (element != null) {
+// if (element instanceof IFile ||
+// element instanceof IProject ||
+// element instanceof IFolder)
+// {
+// IResource f = (IResource) element;
+// return f.getProject();
+// }
+// else if (element instanceof ICProject)
+// return ((ICProject)element).getProject();
+// }
+// return null;
+// }
+
+ private void initialize() {
+ initializeACVersion();
+ initializeAMVersion();
+ }
+
+ void initializeACVersion() {
+ String version = "";
+ try {
+ version = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOCONF_VERSION);
+ if (version == null)
+ version = AutotoolsPlugin.getDefault().getPreferenceStore().getString(AutotoolsEditorPreferenceConstants.AUTOCONF_VERSION);
+ } catch (CoreException e) {
+ // do nothing
+ }
+ String[] items = fACVersionCombo.getItems();
+ // Try and find which list item matches the current preference stored and
+ // select it in the list.
+ int i;
+ for (i = 0; i < items.length; ++i) {
+ if (items[i].equals(version))
+ break;
+ }
+ if (i >= items.length)
+ i = items.length - 1;
+ fACVersionCombo.select(i);
+ }
+
+ void initializeAMVersion() {
+ String version = "";
+ try {
+ version = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOMAKE_VERSION);
+ if (version == null)
+ version = AutotoolsPlugin.getDefault().getPreferenceStore().getString(AutotoolsEditorPreferenceConstants.AUTOMAKE_VERSION);
+ } catch (CoreException e) {
+ // do nothing
+ }
+ String[] items = fAMVersionCombo.getItems();
+ // Try and find which list item matches the current preference stored and
+ // select it in the list.
+ int i;
+ for (i = 0; i < items.length; ++i) {
+ if (items[i].equals(version))
+ break;
+ }
+ if (i >= items.length)
+ i = items.length - 1;
+ fAMVersionCombo.select(i);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsGeneralPropertyPage.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsGeneralPropertyPage.java
new file mode 100644
index 0000000000..b7f234d49f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsGeneralPropertyPage.java
@@ -0,0 +1,15 @@
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.properties;
+
+import org.eclipse.cdt.ui.newui.AbstractPage;
+
+public class AutotoolsGeneralPropertyPage extends AbstractPage {
+
+ @Override
+ protected boolean isSingle() {
+ return false;
+ }
+
+ @Override
+ protected boolean showsConfig() { return false; }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsHeadPropertyPage.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsHeadPropertyPage.java
new file mode 100644
index 0000000000..dfba7fc7b8
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsHeadPropertyPage.java
@@ -0,0 +1,15 @@
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.properties;
+
+import org.eclipse.cdt.ui.newui.AbstractPage;
+
+public class AutotoolsHeadPropertyPage extends AbstractPage {
+
+ @Override
+ protected boolean isSingle() {
+ return true;
+ }
+
+ @Override
+ protected boolean showsConfig() { return false; }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsPropertyManager.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsPropertyManager.java
new file mode 100644
index 0000000000..21f27d39f7
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsPropertyManager.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.properties;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.ListenerList;
+
+public class AutotoolsPropertyManager implements IPropertyChangeManager {
+
+ private static AutotoolsPropertyManager fInstance;
+ private Map<IProject, ListenerList> projectList;
+
+ private AutotoolsPropertyManager() {
+ projectList = new HashMap<IProject, ListenerList>();
+ }
+
+ public static AutotoolsPropertyManager getDefault() {
+ if (fInstance == null)
+ fInstance = new AutotoolsPropertyManager();
+ return fInstance;
+ }
+
+ public synchronized void addProjectPropertyListener(IProject project,
+ IProjectPropertyListener listener) {
+ ListenerList list = (ListenerList)projectList.get(project);
+ if (list == null) {
+ list = new ListenerList();
+ projectList.put(project, list);
+ }
+ list.add(listener);
+ }
+
+ public synchronized void notifyPropertyListeners(IProject project, String property) {
+ ListenerList list = (ListenerList)projectList.get(project);
+ if (list != null) {
+ Object[] listeners = list.getListeners();
+ for (int i = 0; i < listeners.length; ++i) {
+ ((IProjectPropertyListener)listeners[i]).handleProjectPropertyChanged(project, property);
+ }
+ }
+ }
+
+ public synchronized void removeProjectPropertyListener(IProject project,
+ IProjectPropertyListener listener) {
+ ListenerList list = (ListenerList)projectList.get(project);
+ if (list != null)
+ list.remove(listener);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsPropertyMessages.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsPropertyMessages.java
new file mode 100644
index 0000000000..44f2174473
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsPropertyMessages.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006, 2009 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.properties;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * MakefilePreferencesMessages
+ */
+public class AutotoolsPropertyMessages {
+
+ /**
+ *
+ */
+ private AutotoolsPropertyMessages() {
+ }
+
+ private static final String BUNDLE_NAME = AutotoolsPropertyMessages.class.getName();
+
+ public static String getString(String key) {
+ try {
+ return ResourceBundle.getBundle(BUNDLE_NAME).getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ } catch (NullPointerException e) {
+ return '#' + key + '#';
+ }
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsPropertyMessages.properties b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsPropertyMessages.properties
new file mode 100644
index 0000000000..a9c612595a
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsPropertyMessages.properties
@@ -0,0 +1,44 @@
+###############################################################################
+# Copyright (c) 2007, 2009 Red Hat Inc. and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat Inc. - initial API and implementation
+###############################################################################
+
+Edit.name=Editors
+Build.name=Build
+
+Autotools.aclocalPath=aclocal
+Autotools.aclocalPath.tooltip=Specify desired aclocal to use for project
+Autotools.automakePath=automake
+Autotools.automakePath.tooltip=Specify desired automake to use for project
+Autotools.autoconfPath=autoconf
+Autotools.autoconfPath.tooltip=Specify desired autoconf to use for project
+Autotools.autoheaderPath=autoheader
+Autotools.autoheaderPath.tooltip=Specify desired autoheader to use for project
+Autotools.autoreconfPath=autoreconf
+Autotools.autoreconfPath.tooltip=Specify desired autoreconf to use for project
+Autotools.libtoolizePath=libtoolize
+Autotools.libtoolizePath.tooltip=Specify desired libtoolize to use for project
+
+ACEditor.version=&Version
+ACEditor.autoconfVersion=Version of Autoconf to use for syntax checking
+ACEditor.automakeVersion=Version of Automake to use for syntax checking
+
+ScannerMakeW.label=Use make -n -w per file to generate scanner info
+ScannerMakeW.tooltip=Use this option only if necessary to get correct include path
+
+CleanBehavior.title=Clean Build Behavior
+
+CleanDelete.label=Delete build directory on "clean" operation
+CleanMake.label=Use make target to clean
+CleanMakeTarget.label=Make target:
+CleanMakeTarget.default=distclean
+CleanMakeTarget.tooltip=Specify a top-level make target to clean build directory
+
+AutoBuildName.label=Automatically generate build directory names for additional configurations
+AutoBuildName.tooltip=When a configuration other than the first configuration is created, generate a unique build directory using the configuration name.
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsToolPropertyOptionPage.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsToolPropertyOptionPage.java
new file mode 100644
index 0000000000..c7f50485ea
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsToolPropertyOptionPage.java
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat Inc.
+ * are made available under the 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.properties;
+
+import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
+import org.eclipse.cdt.ui.newui.MultiLineTextFieldEditor;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.preference.FieldEditor;
+import org.eclipse.jface.preference.StringFieldEditor;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.ConfigureMessages;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.IAConfiguration;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.FontMetrics;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+public class AutotoolsToolPropertyOptionPage extends
+ AbstractConfigurePropertyOptionsPage {
+
+ private ToolListElement element;
+ private String toolName = "";
+ private IAConfiguration cfg;
+ // Label class for a preference page.
+ class LabelFieldEditor extends FieldEditor {
+ private String fTitle;
+ private Label fTitleLabel;
+
+ public LabelFieldEditor( Composite parent, String title ) {
+ fTitle = title;
+ this.createControl( parent );
+ }
+
+ protected void adjustForNumColumns( int numColumns ) {
+ ((GridData)fTitleLabel.getLayoutData()).horizontalSpan = 2;
+ }
+
+ protected void doFillIntoGrid( Composite parent, int numColumns ) {
+ fTitleLabel = new Label( parent, SWT.WRAP );
+ fTitleLabel.setText( fTitle );
+ GridData gd = new GridData();
+ gd.verticalAlignment = SWT.TOP;
+ gd.grabExcessHorizontalSpace = false;
+ gd.horizontalSpan = 2;
+ fTitleLabel.setLayoutData( gd );
+ }
+
+ public int getNumberOfControls() { return 1; }
+ /**
+ * The label field editor is only used to present a text label on a preference page.
+ */
+ protected void doLoad() {}
+ protected void doLoadDefault() {}
+ protected void doStore() {}
+ }
+
+ public AutotoolsToolPropertyOptionPage(ToolListElement element, IAConfiguration cfg) {
+ super(element.getName());
+ this.element = element;
+ this.toolName = element.getName();
+ this.cfg = cfg;
+ }
+
+ public String getName() {
+ return super.getName();
+ }
+
+ public ToolListElement getElement() {
+ return element;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+ */
+ protected void createFieldEditors() {
+ super.createFieldEditors();
+ // Add a string editor to edit the tool command
+ Composite parent = getFieldEditorParent();
+ FontMetrics fm = AbstractCPropertyTab.getFontMetrics(parent);
+ commandStringField = new StringFieldEditor(toolName,
+ ConfigureMessages.getString(COMMAND),
+ parent);
+ commandStringField.setEmptyStringAllowed(false);
+ GridData gd = ((GridData)commandStringField.getTextControl(parent).getLayoutData());
+ gd.grabExcessHorizontalSpace = true;
+ gd.minimumWidth = Dialog.convertWidthInCharsToPixels(fm, 3);
+ addField(commandStringField);
+ // Add a field editor that displays overall build options
+ Composite par = getFieldEditorParent();
+ allOptionFieldEditor = new MultiLineTextFieldEditor(AutotoolsConfigurePrefStore.ALL_OPTIONS_ID,
+ ConfigureMessages.getString(ALL_OPTIONS), par);
+ allOptionFieldEditor.getTextControl(par).setEditable(false);
+// gd = ((GridData)allOptionFieldEditor.getTextControl().getLayoutData());
+ gd.grabExcessHorizontalSpace = true;
+ gd.minimumWidth = Dialog.convertWidthInCharsToPixels(fm, 20);
+ addField(allOptionFieldEditor);
+ }
+
+ protected FieldEditor createLabelEditor( Composite parent, String title ) {
+ return new LabelFieldEditor( parent, title );
+ }
+
+ // field editor that displays all the build options for a particular tool
+ private MultiLineTextFieldEditor allOptionFieldEditor;
+ //tool command field
+ private StringFieldEditor commandStringField;
+ // all build options field editor label
+ private static final String ALL_OPTIONS = "Tool.allopts"; //$NON-NLS-1$
+ // Field editor label for tool command
+ private static final String COMMAND = "Tool.command"; //$NON-NLS-1$
+
+ /**
+ * Update the field editor that displays all the build options
+ */
+ public void updateFields() {
+ allOptionFieldEditor.load();
+ }
+
+ public void setValues(){
+ commandStringField.load();
+ updateFields();
+ }
+
+ public void propertyChange(PropertyChangeEvent event) {
+ // allow superclass to handle as well
+ super.propertyChange(event);
+
+ if(event.getSource() == commandStringField){
+ cfg.setOption(toolName, commandStringField.getStringValue());
+ updateFields();
+ }
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsToolsPropertyTab.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsToolsPropertyTab.java
new file mode 100644
index 0000000000..2d8268e961
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/AutotoolsToolsPropertyTab.java
@@ -0,0 +1,346 @@
+/*******************************************************************************
+ * 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.properties;
+
+import org.eclipse.cdt.core.settings.model.ICResourceDescription;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.AutotoolsPropertyConstants;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.AutotoolsConfiguration;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.AbstractAutotoolsCPropertyTab;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+public class AutotoolsToolsPropertyTab extends AbstractAutotoolsCPropertyTab {
+
+ public static final String DEFAULT_ACLOCAL = "aclocal"; // $NON-NLS-1$
+ public static final String DEFAULT_AUTOMAKE = "automake"; // $NON-NLS-1$
+ public static final String DEFAULT_AUTOCONF = "autoconf"; // $NON-NLS-1$
+ public static final String DEFAULT_AUTOHEADER = "autoheader"; // $NON-NLS-1$
+ public static final String DEFAULT_AUTORECONF = "autoreconf"; // $NON-NLS-1$
+ public static final String DEFAULT_LIBTOOLIZE = "libtoolize"; // $NON-NLS-1$
+
+ protected Text fAclocalPath;
+ protected Text fAutomakePath;
+ protected Text fAutoconfPath;
+ protected Text fAutoheaderPath;
+ protected Text fAutoreconfPath;
+ protected Text fLibtoolizePath;
+ private IProject project;
+
+
+ private IProject getProject() {
+ return page.getProject();
+ }
+
+ public boolean canBeVisible() {
+ return true;
+ }
+
+ public void cfgChanged(AutotoolsConfiguration cfg) {
+ // Nothing to do
+ }
+
+ public void createControls(Composite parent) {
+ // TODO Auto-generated method stub
+ super.createControls(parent);
+ Composite composite= usercomp;
+
+ // assume parent page uses griddata
+ GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_CENTER | GridData.VERTICAL_ALIGN_FILL | GridData.FILL_HORIZONTAL);
+ composite.setLayoutData(gd);
+ GridLayout layout= new GridLayout();
+ layout.numColumns= 2;
+ //PixelConverter pc= new PixelConverter(composite);
+ //layout.verticalSpacing= pc.convertHeightInCharsToPixels(1) / 2;
+ composite.setLayout(layout);
+
+ project = getProject();
+
+ Label label= new Label(composite, SWT.LEFT);
+ label.setText(AutotoolsPropertyMessages.getString("Autotools.aclocalPath")); //$NON-NLS-1$
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ label.setLayoutData(gd);
+
+ /* text window for aclocal path */
+ fAclocalPath = new Text(composite, SWT.BORDER | SWT.SINGLE);
+ fAclocalPath.setToolTipText(AutotoolsPropertyMessages.getString("Autotools.aclocalPath.tooltip")); // $NON-NLS-1$
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
+ fAclocalPath.setLayoutData(gd);
+
+ Label label2= new Label(composite, SWT.LEFT);
+ label2.setText(AutotoolsPropertyMessages.getString("Autotools.automakePath")); //$NON-NLS-1$
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ label2.setLayoutData(gd);
+
+ /* text window for automake path */
+ fAutomakePath = new Text(composite, SWT.BORDER | SWT.SINGLE);
+ fAutomakePath.setToolTipText(AutotoolsPropertyMessages.getString("Autotools.automakePath.tooltip")); // $NON-NLS-1#
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
+ fAutomakePath.setLayoutData(gd);
+
+ Label label3 = new Label(composite, SWT.LEFT);
+ label3.setText(AutotoolsPropertyMessages.getString("Autotools.autoconfPath")); //$NON-NLS-1$
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ label3.setLayoutData(gd);
+
+ /* text window for autoconf path */
+ fAutoconfPath = new Text(composite, SWT.BORDER | SWT.SINGLE);
+ fAutoconfPath.setToolTipText(AutotoolsPropertyMessages.getString("Autotools.autoconfPath.tooltip")); // $NON-NLS-1$
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
+ fAutoconfPath.setLayoutData(gd);
+
+ Label label4= new Label(composite, SWT.LEFT);
+ label4.setText(AutotoolsPropertyMessages.getString("Autotools.autoheaderPath")); //$NON-NLS-1$
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ label4.setLayoutData(gd);
+
+ /* text window for autoheader path */
+ fAutoheaderPath = new Text(composite, SWT.BORDER | SWT.SINGLE);
+ fAutoheaderPath.setToolTipText(AutotoolsPropertyMessages.getString("Autotools.autoheaderPath.tooltip")); // $NON-NLS-1$
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
+ fAutoheaderPath.setLayoutData(gd);
+
+ Label label5= new Label(composite, SWT.LEFT);
+ label5.setText(AutotoolsPropertyMessages.getString("Autotools.autoreconfPath")); //$NON-NLS-1$
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ label5.setLayoutData(gd);
+
+ /* text window for autoreconf path */
+ fAutoreconfPath = new Text(composite, SWT.BORDER | SWT.SINGLE);
+ fAutoreconfPath.setToolTipText(AutotoolsPropertyMessages.getString("Autotools.autoreconfPath.tooltip")); // $NON-NLS-1$
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
+ fAutoreconfPath.setLayoutData(gd);
+
+ Label label6= new Label(composite, SWT.LEFT);
+ label6.setText(AutotoolsPropertyMessages.getString("Autotools.libtoolizePath")); //$NON-NLS-1$
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ label6.setLayoutData(gd);
+
+ /* text window for libtoolize path */
+ fLibtoolizePath = new Text(composite, SWT.BORDER | SWT.SINGLE);
+ fLibtoolizePath.setToolTipText(AutotoolsPropertyMessages.getString("Autotools.libtoolizePath.tooltip")); // $NON-NLS-1$
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
+ fLibtoolizePath.setLayoutData(gd);
+
+ initialize();
+ }
+
+ public void performOK() {
+ String aclocalPath = null;
+ String automakePath = null;
+ String autoconfPath = null;
+ String autoheaderPath = null;
+ String autoreconfPath = null;
+ String libtoolizePath = null;
+ try {
+ aclocalPath = project.getPersistentProperty(AutotoolsPropertyConstants.ACLOCAL_TOOL);
+ } catch (CoreException e1) {
+ aclocalPath = DEFAULT_ACLOCAL;
+ }
+
+ String newAclocalPath = fAclocalPath.getText().trim();
+ if (aclocalPath == null || !newAclocalPath.equals(aclocalPath)) {
+ try {
+ project.setPersistentProperty(AutotoolsPropertyConstants.ACLOCAL_TOOL, newAclocalPath);
+ } catch (CoreException e1) {
+ // Not much we can do at this point
+ }
+ }
+
+ try {
+ automakePath = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOMAKE_TOOL);
+ } catch (CoreException e1) {
+ automakePath = DEFAULT_AUTOMAKE;
+ }
+
+ String newAutomakePath = fAutomakePath.getText().trim();
+ if (automakePath == null || !newAutomakePath.equals(automakePath)) {
+ try {
+ project.setPersistentProperty(AutotoolsPropertyConstants.AUTOMAKE_TOOL, newAutomakePath);
+ } catch (CoreException e2) {
+ // Not much we can do at this point
+ }
+ }
+
+ try {
+ autoconfPath = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOCONF_TOOL);
+ } catch (CoreException e1) {
+ autoconfPath = DEFAULT_AUTOCONF;
+ }
+
+ String newAutoconfPath = fAutoconfPath.getText().trim();
+ if (autoconfPath == null || !newAutoconfPath.equals(autoconfPath)) {
+ try {
+ project.setPersistentProperty(AutotoolsPropertyConstants.AUTOCONF_TOOL, newAutoconfPath);
+ } catch (CoreException e2) {
+ // Not much we can do at this point
+ }
+ }
+
+ try {
+ autoheaderPath = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOHEADER_TOOL);
+ } catch (CoreException e1) {
+ autoheaderPath = DEFAULT_AUTOHEADER;
+ }
+
+ String newAutoheaderPath = fAutoheaderPath.getText().trim();
+ if (autoheaderPath == null || !newAutoheaderPath.equals(autoheaderPath)) {
+ try {
+ project.setPersistentProperty(AutotoolsPropertyConstants.AUTOHEADER_TOOL, newAutoheaderPath);
+ } catch (CoreException e2) {
+ // Not much we can do at this point
+ }
+ }
+
+ try {
+ autoreconfPath = project.getPersistentProperty(AutotoolsPropertyConstants.AUTORECONF_TOOL);
+ } catch (CoreException e1) {
+ autoreconfPath = DEFAULT_AUTORECONF;
+ }
+
+ String newAutoreconfPath = fAutoreconfPath.getText().trim();
+ if (autoreconfPath == null || !newAutoreconfPath.equals(autoreconfPath)) {
+ try {
+ project.setPersistentProperty(AutotoolsPropertyConstants.AUTORECONF_TOOL, newAutoreconfPath);
+ } catch (CoreException e2) {
+ // Not much we can do at this point
+ }
+ }
+
+ try {
+ libtoolizePath = project.getPersistentProperty(AutotoolsPropertyConstants.LIBTOOLIZE_TOOL);
+ } catch (CoreException e1) {
+ libtoolizePath = DEFAULT_LIBTOOLIZE;
+ }
+
+ String newLibtoolizePath = fLibtoolizePath.getText().trim();
+ if (libtoolizePath == null || !newLibtoolizePath.equals(libtoolizePath)) {
+ try {
+ project.setPersistentProperty(AutotoolsPropertyConstants.LIBTOOLIZE_TOOL, newLibtoolizePath);
+ } catch (CoreException e2) {
+ // Not much we can do at this point
+ }
+ }
+ }
+
+ protected void performApply(ICResourceDescription src, ICResourceDescription dst) {
+ performOK();
+ }
+
+ public void performDefaults() {
+ // For default tool settings, simply default the base tool names
+ fAclocalPath.setText(DEFAULT_ACLOCAL);
+ fAutomakePath.setText(DEFAULT_AUTOMAKE);
+ fAutoconfPath.setText(DEFAULT_AUTOCONF);
+ fAutoheaderPath.setText(DEFAULT_AUTOHEADER);
+ fAutoreconfPath.setText(DEFAULT_AUTORECONF);
+ fLibtoolizePath.setText(DEFAULT_LIBTOOLIZE);
+ }
+
+ public void updateData(ICResourceDescription cfgd) {
+ // Nothing to do
+ }
+
+ public void updateButtons() {
+ // Nothing to do
+ }
+
+ public void setVisible (boolean b) {
+ super.setVisible(b);
+ }
+
+ private void initialize() {
+ String aclocalPath = null;
+ String automakePath = null;
+ String autoconfPath = null;
+ String autoheaderPath = null;
+ String autoreconfPath = null;
+ String libtoolizePath = null;
+
+ try {
+ aclocalPath = project.getPersistentProperty(AutotoolsPropertyConstants.ACLOCAL_TOOL);
+ } catch (CoreException e1) {
+ // do nothing
+ }
+
+ if (aclocalPath == null)
+ aclocalPath = DEFAULT_ACLOCAL;
+
+ fAclocalPath.setText(aclocalPath);
+
+ try {
+ automakePath = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOMAKE_TOOL);
+ } catch (CoreException e1) {
+ // do nothing
+ }
+
+ if (automakePath == null)
+ automakePath = DEFAULT_AUTOMAKE;
+
+ fAutomakePath.setText(automakePath);
+
+ try {
+ autoconfPath = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOCONF_TOOL);
+ } catch (CoreException e1) {
+ // do nothing
+ }
+
+ if (autoconfPath == null)
+ autoconfPath = DEFAULT_AUTOCONF;
+
+ fAutoconfPath.setText(autoconfPath);
+
+ try {
+ autoheaderPath = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOHEADER_TOOL);
+ } catch (CoreException e1) {
+ // do nothing
+ }
+
+ if (autoheaderPath == null)
+ autoheaderPath = DEFAULT_AUTOHEADER;
+
+ fAutoheaderPath.setText(autoheaderPath);
+
+ try {
+ autoreconfPath = project.getPersistentProperty(AutotoolsPropertyConstants.AUTORECONF_TOOL);
+ } catch (CoreException e1) {
+ // do nothing
+ }
+
+ if (autoreconfPath == null)
+ autoreconfPath = DEFAULT_AUTORECONF;
+
+ fAutoreconfPath.setText(autoreconfPath);
+
+ try {
+ libtoolizePath = project.getPersistentProperty(AutotoolsPropertyConstants.LIBTOOLIZE_TOOL);
+ } catch (CoreException e1) {
+ // do nothing
+ }
+
+ if (libtoolizePath == null)
+ libtoolizePath = DEFAULT_LIBTOOLIZE;
+
+ fLibtoolizePath.setText(libtoolizePath);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/IProjectPropertyListener.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/IProjectPropertyListener.java
new file mode 100644
index 0000000000..133b46ee36
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/IProjectPropertyListener.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.properties;
+
+import org.eclipse.core.resources.IProject;
+
+public interface IProjectPropertyListener {
+
+ /**
+ * Handler for property changes
+ *
+ * @param project the project to which the property changed
+ * @param property the name of the property changed
+ */
+ void handleProjectPropertyChanged(IProject project, String property);
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/IPropertyChangeManager.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/IPropertyChangeManager.java
new file mode 100644
index 0000000000..5ae066b558
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/IPropertyChangeManager.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.properties;
+
+import org.eclipse.core.resources.IProject;
+
+public interface IPropertyChangeManager {
+
+ /**
+ * Add a project property listener for given project.
+ *
+ * @param project the project to which the listener is interested
+ * @param listener the listener to notify
+ */
+ void addProjectPropertyListener(IProject project, IProjectPropertyListener listener);
+
+ /**
+ * Remove a project property listener.
+ *
+ * @param listener the listener to remove
+ */
+ void removeProjectPropertyListener(IProject project, IProjectPropertyListener listener);
+
+ /**
+ * Notify all listeners of project that a property has changed.
+ *
+ * @param project the project for which the property has changed
+ * @param property the property that has changed
+ */
+ void notifyPropertyListeners(IProject project, String property);
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/ToolListContentProvider.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/ToolListContentProvider.java
new file mode 100644
index 0000000000..2ca2281438
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/ToolListContentProvider.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.properties;
+
+import java.util.ArrayList;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.AutotoolsConfiguration;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.IConfigureOption;
+
+public class ToolListContentProvider implements ITreeContentProvider {
+
+ private ToolListElement[] elements;
+
+ private ToolListElement[] createElements() {
+ ArrayList<ToolListElement> toolList = new ArrayList<ToolListElement>();
+ AutotoolsConfiguration.Option[] options = AutotoolsConfiguration.getTools();
+ for (int i = 0; i < options.length; ++i) {
+ AutotoolsConfiguration.Option opt = options[i];
+ String optName = opt.getName();
+ ToolListElement tool = new ToolListElement(optName, IConfigureOption.TOOL);
+ toolList.add(tool);
+ AutotoolsConfiguration.Option[] categories =
+ AutotoolsConfiguration.getChildOptions(optName);
+ for (int j = 0; j < categories.length; ++j) {
+ String catName = categories[j].getName();
+ ToolListElement newItem = new ToolListElement(catName, IConfigureOption.CATEGORY);
+ tool.addChild(newItem);
+ }
+ }
+ return toolList.toArray(new ToolListElement[toolList.size()]);
+ }
+
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement instanceof AutotoolsConfiguration) {
+ return elements;
+ }
+ return ((ToolListElement)parentElement).getChildren();
+ }
+
+ public Object getParent(Object element) {
+ return ((ToolListElement)element).getParent();
+ }
+
+ public boolean hasChildren(Object element) {
+ return ((ToolListElement)element).hasChildren();
+ }
+
+ public Object[] getElements(Object inputElement) {
+ return elements;
+ }
+
+ public void dispose() {
+ // nothing needed
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ // TODO Auto-generated method stub
+ elements = createElements();
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/ToolListElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/ToolListElement.java
new file mode 100644
index 0000000000..1c3e6bec05
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/ToolListElement.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.properties;
+
+import java.util.ArrayList;
+
+public class ToolListElement {
+
+ private ArrayList<ToolListElement> children;
+ private ToolListElement parent;
+ private String name;
+ private int type;
+
+ public ToolListElement(String name, int type) {
+ this.name = name;
+ this.type = type;
+ this.children = new ArrayList<ToolListElement>();
+ }
+
+ public void setParent(ToolListElement p) {
+ parent = p;
+ }
+
+ public ToolListElement getParent() {
+ return parent;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public int getType() {
+ return type;
+ }
+
+ public void addChild(ToolListElement e) {
+ children.add(e);
+ e.setParent(this);
+ }
+
+ public boolean hasChildren() {
+ return children.size() > 0;
+ }
+
+ public Object[] getChildren() {
+ return children.toArray();
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/ToolListLabelProvider.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/ToolListLabelProvider.java
new file mode 100644
index 0000000000..07b8ce0211
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/properties/ToolListLabelProvider.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2007, 2009 IBM Corporation 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:
+ * IBM Rational Software - Initial API and implementation
+ * Red Hat Inc. - Modification for Autotools usage
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.properties;
+
+import org.eclipse.cdt.ui.newui.UIMessages;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.IAConfiguration;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.IConfigureOption;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.AutotoolsUIPluginImages;
+import org.eclipse.swt.graphics.Image;
+
+public class ToolListLabelProvider extends LabelProvider {
+ private final Image IMG_TOOL = AutotoolsUIPluginImages.get(AutotoolsUIPluginImages.IMG_CFG_TOOL);
+ private final Image IMG_CAT = AutotoolsUIPluginImages.get(AutotoolsUIPluginImages.IMG_CFG_CATEGORY);
+ private static final String ERROR_UNKNOWN_ELEMENT = "ConfigurePropertyPage.error.Unknown_tree_element"; //$NON-NLS-1$
+
+ private ImageDescriptor descriptor = null;
+ private ResourceManager manager = null;
+ private IAConfiguration cfg = null;
+
+ public ToolListLabelProvider(IAConfiguration cfg) {
+ this.cfg = cfg;
+ }
+
+ public IAConfiguration getCfg() {
+ return cfg;
+ }
+
+ public void setCfg(IAConfiguration cfg) {
+ this.cfg = cfg;
+ }
+
+ public Image getImage(Object element) {
+ if (!(element instanceof ToolListElement)) {
+ throw unknownElement(element);
+ }
+ Image defaultImage = IMG_CAT;
+ ToolListElement toolListElement = (ToolListElement)element;
+ IConfigureOption cat = cfg.getOption(toolListElement.getName());
+
+ if (cat == null) {
+ defaultImage = IMG_TOOL;
+ }
+
+ // Use default icon for display
+ return defaultImage;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ILabelProvider#getText(Object)
+ */
+ public String getText(Object element) {
+ if (!(element instanceof ToolListElement)) {
+ throw unknownElement(element);
+ }
+ ToolListElement toolListElement = (ToolListElement)element;
+ IConfigureOption cat = cfg.getOption(toolListElement.getName());
+
+ if (cat == null) {
+ return toolListElement.getName();
+ }
+ else {
+ return cat.getDescription();
+ }
+ }
+
+ protected RuntimeException unknownElement(Object element) {
+ return new RuntimeException(UIMessages.getFormattedString(ERROR_UNKNOWN_ELEMENT, element.getClass().getName()));
+ }
+
+ /**
+ * Disposing any images that were allocated for it.
+ *
+ * @since 3.0
+ */
+ public void dispose() {
+ if (descriptor != null && manager != null) {
+ manager.destroyImage(descriptor);
+ }
+ };
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/text/hover/AutoconfPrototype.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/text/hover/AutoconfPrototype.java
new file mode 100644
index 0000000000..88b1702045
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/text/hover/AutoconfPrototype.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.text.hover;
+
+import java.util.ArrayList;
+
+public class AutoconfPrototype {
+ protected String name;
+ protected int numPrototypes;
+ protected ArrayList<Integer> minParms;
+ protected ArrayList<Integer> maxParms;
+ protected ArrayList<ArrayList<String>> parmList;
+
+ public AutoconfPrototype() {
+ numPrototypes = 0;
+ minParms = new ArrayList<Integer>();
+ maxParms = new ArrayList<Integer>();
+ parmList = new ArrayList<ArrayList<String>>();
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String newName) {
+ name = newName;
+ }
+
+ public int getNumPrototypes() {
+ return numPrototypes;
+ }
+
+ public void setNumPrototypes(int num) {
+ numPrototypes = num;
+ }
+
+ public int getMinParms(int prototypeNum) {
+ return ((Integer)minParms.get(prototypeNum)).intValue();
+ }
+
+ public void setMinParms(int prototypeNum, int value) {
+ minParms.add(prototypeNum, new Integer(value));
+ }
+
+ public int getMaxParms(int prototypeNum) {
+ return ((Integer)maxParms.get(prototypeNum)).intValue();
+ }
+
+ public void setMaxParms(int prototypeNum, int value) {
+ maxParms.add(prototypeNum, new Integer(value));
+ }
+
+ public String getParmName(int prototypeNum, int parmNum) {
+ ArrayList<String> parms = parmList.get(prototypeNum);
+ return (String)parms.get(parmNum);
+ }
+
+ // This function assumes that parms will be added in order starting
+ // with lowest prototype first.
+ public void setParmName(int prototypeNum, int parmNum, String value) {
+ ArrayList<String> parms;
+ if (parmList.size() == prototypeNum) {
+ parms = new ArrayList<String>();
+ parmList.add(parms);
+ }
+ else
+ parms = parmList.get(prototypeNum);
+ if (parms.size() == parmNum)
+ parms.add(value);
+ else
+ parms.set(parmNum, value);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/text/hover/AutoconfTextHover.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/text/hover/AutoconfTextHover.java
new file mode 100644
index 0000000000..73f7dc6073
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/text/hover/AutoconfTextHover.java
@@ -0,0 +1,595 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.text.hover;
+
+import java.io.BufferedReader;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.DefaultInformationControl;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IInformationControl;
+import org.eclipse.jface.text.IInformationControlCreator;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextHover;
+import org.eclipse.jface.text.ITextHoverExtension;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Region;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsPlugin;
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.AutoconfEditor;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.AutoconfMacro;
+import org.eclipse.linuxtools.cdt.autotools.ui.editors.IAutotoolEditorActionDefinitionIds;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.AutotoolsPropertyConstants;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.CWordFinder;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.HTMLPrinter;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.HTMLTextPresenter;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.AutotoolsEditorPreferenceConstants;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.keys.IBindingService;
+import org.osgi.framework.Bundle;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+
+
+public class AutoconfTextHover implements ITextHover, ITextHoverExtension {
+
+ public static String LOCAL_AUTOCONF_MACROS_DOC_NAME = "macros/acmacros";
+ public static String LOCAL_AUTOMAKE_MACROS_DOC_NAME = "macros/ammacros";
+ public static String AUTOCONF_MACROS_DOC_NAME = "http://www.sourceware.org/eclipse/autotools/acmacros"; //$NON-NLS-1$
+ public static String AUTOMAKE_MACROS_DOC_NAME = "http://www.sourceware.org/eclipse/autotools/ammacros"; //$NON-NLS-1$
+
+ private static class AutotoolsHoverDoc {
+ public Document[] documents = new Document[2];
+ public AutotoolsHoverDoc(Document ac_document, Document am_document) {
+ this.documents[0] = ac_document;
+ this.documents[1] = am_document;
+ }
+ public Document getAcDocument() {
+ return documents[0];
+ }
+ public Document getAmDocument() {
+ return documents[1];
+ }
+ public Document[] getDocuments() {
+ return documents;
+ }
+ };
+
+ private static Map<String, Document> acHoverDocs;
+ private static Map<String, Document> amHoverDocs;
+ private static Map<Document, ArrayList<AutoconfMacro>> acHoverMacros;
+ private static String fgStyleSheet;
+ private static AutoconfEditor fEditor;
+
+ /* Mapping key to action */
+ private static IBindingService fBindingService;
+ {
+ fBindingService= (IBindingService)PlatformUI.getWorkbench().getAdapter(IBindingService.class);
+ }
+
+ public static String getAutoconfMacrosDocName(String version) {
+ return AUTOCONF_MACROS_DOC_NAME + "-" //$NON-NLS-1$
+ + version
+ + ".xml"; //$NON-NLS-1$
+ }
+
+ public static String getLocalAutoconfMacrosDocName(String version) {
+ return LOCAL_AUTOCONF_MACROS_DOC_NAME + "-" //$NON-NLS-1$
+ + version
+ + ".xml"; //$NON-NLS-1$
+ }
+
+ /* Get the preferences default for the autoconf macros document name. */
+ public static String getDefaultAutoconfMacrosVer() {
+ return AutotoolsPlugin.getDefault().getPreferenceStore().getString(AutotoolsEditorPreferenceConstants.AUTOCONF_VERSION);
+ }
+
+ public static String getAutomakeMacrosDocName(String version) {
+ return AUTOMAKE_MACROS_DOC_NAME + "-" //$NON-NLS-1$
+ + version
+ + ".xml"; //$NON-NLS-1$
+ }
+
+ public static String getLocalAutomakeMacrosDocName(String version) {
+ return LOCAL_AUTOMAKE_MACROS_DOC_NAME + "-" //$NON-NLS-1$
+ + version
+ + ".xml"; //$NON-NLS-1$
+ }
+
+ /* Get the preferences default for the autoconf macros document name. */
+ public static String getDefaultAutomakeMacrosVer() {
+ return AutotoolsPlugin.getDefault().getPreferenceStore().getString(AutotoolsEditorPreferenceConstants.AUTOMAKE_VERSION);
+ }
+
+ protected static Document getACDoc(String acDocVer) {
+ Document ac_document = null;
+ if (acHoverDocs == null) {
+ acHoverDocs = new HashMap<String, Document>();
+ }
+ ac_document = (Document)acHoverDocs.get(acDocVer);
+ if (ac_document == null) {
+ Document doc = null;
+ try {
+ // see comment in initialize()
+ try {
+ InputStream docStream = null;
+ try {
+ URI uri = new URI(getLocalAutoconfMacrosDocName(acDocVer));
+ IPath p = URIUtil.toPath(uri);
+ // Try to open the file as local to this plug-in.
+ docStream = FileLocator.openStream(AutotoolsPlugin.getDefault().getBundle(), p, false);
+ } catch (IOException e) {
+ // Local open failed. Try normal external location.
+ URI acDoc = new URI(getAutoconfMacrosDocName(acDocVer));
+ IPath p = URIUtil.toPath(acDoc);
+ if (p == null) {
+ URL url = acDoc.toURL();
+ docStream = url.openStream();
+ } else {
+ docStream = new FileInputStream(p.toFile());
+ }
+ }
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ factory.setValidating(false);
+ try {
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ doc = builder.parse(docStream);
+ }
+ catch (SAXParseException saxException) {
+ doc = null;
+ }
+ catch (SAXException saxEx) {
+ doc = null;
+ }
+ catch (ParserConfigurationException pce) {
+ doc = null;
+ }
+ catch (IOException ioe) {
+ doc = null;
+ }
+ } catch (FileNotFoundException e) {
+ AutotoolsPlugin.log(e);
+ } catch (MalformedURLException e) {
+ AutotoolsPlugin.log(e);
+ } catch (URISyntaxException e) {
+ AutotoolsPlugin.log(e);
+ }
+ ac_document = doc;
+ }
+ catch (IOException ioe) {
+ }
+ }
+ acHoverDocs.put(acDocVer, ac_document);
+ return ac_document;
+ }
+
+ protected static Document getAMDoc(String amDocVer) {
+ Document am_document = null;
+ if (amHoverDocs == null) {
+ amHoverDocs = new HashMap<String, Document>();
+ }
+ am_document = (Document)amHoverDocs.get(amDocVer);
+ if (am_document == null) {
+ Document doc = null;
+ try {
+ // see comment in initialize()
+ try {
+ InputStream docStream = null;
+ try {
+ URI uri = new URI(getLocalAutomakeMacrosDocName(amDocVer));
+ IPath p = URIUtil.toPath(uri);
+ // Try to open the file as local to this plug-in.
+ docStream = FileLocator.openStream(AutotoolsPlugin.getDefault().getBundle(), p, false);
+ } catch (IOException e) {
+ // Local open failed. Try normal external location.
+ URI acDoc = new URI(getAutomakeMacrosDocName(amDocVer));
+ IPath p = URIUtil.toPath(acDoc);
+ if (p == null) {
+ URL url = acDoc.toURL();
+ docStream = url.openStream();
+ } else {
+ docStream = new FileInputStream(p.toFile());
+ }
+ }
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ factory.setValidating(false);
+ try {
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ doc = builder.parse(docStream);
+ }
+ catch (SAXParseException saxException) {
+ doc = null;
+ }
+ catch (SAXException saxEx) {
+ doc = null;
+ }
+ catch (ParserConfigurationException pce) {
+ doc = null;
+ }
+ catch (IOException ioe) {
+ doc = null;
+ }
+ } catch (FileNotFoundException e) {
+ AutotoolsPlugin.log(e);
+ } catch (MalformedURLException e) {
+ AutotoolsPlugin.log(e);
+ } catch (URISyntaxException e) {
+ AutotoolsPlugin.log(e);
+ }
+ am_document = doc;
+ }
+ catch (IOException ioe) {
+ }
+ }
+ amHoverDocs.put(amDocVer, am_document);
+ return am_document;
+ }
+
+ protected static AutotoolsHoverDoc getHoverDoc(IEditorInput input) {
+ String acDocVer = getDefaultAutoconfMacrosVer();
+ String amDocVer = getDefaultAutomakeMacrosVer();
+ if (input instanceof IFileEditorInput) {
+ IFileEditorInput fe = (IFileEditorInput)input;
+ IFile f = fe.getFile();
+ IProject p = f.getProject();
+ try {
+ String acVer = p.getPersistentProperty(AutotoolsPropertyConstants.AUTOCONF_VERSION);
+ if (acVer != null)
+ acDocVer = acVer;
+ else { // look for compat project properties
+ acVer = p.getPersistentProperty(AutotoolsPropertyConstants.AUTOCONF_VERSION_COMPAT);
+ if (acVer != null)
+ acDocVer = acVer;
+ }
+ } catch (CoreException ce1) {
+ // do nothing
+ }
+ try {
+ String amVer = p.getPersistentProperty(AutotoolsPropertyConstants.AUTOMAKE_VERSION);
+ if (amVer != null)
+ amDocVer = amVer;
+ else { // look for compat project properties
+ amVer = p.getPersistentProperty(AutotoolsPropertyConstants.AUTOMAKE_VERSION_COMPAT);
+ if (amVer != null)
+ amDocVer = amVer;
+ }
+ } catch (CoreException ce2) {
+ // do nothing
+ }
+ }
+ Document ac_document = getACDoc(acDocVer);
+ Document am_document = getAMDoc(amDocVer);
+ return new AutoconfTextHover.AutotoolsHoverDoc(ac_document, am_document);
+ }
+
+ public AutoconfTextHover(AutoconfEditor editor) {
+ fEditor = editor;
+ }
+
+ public static String getIndexedInfo(String name, AutoconfEditor editor) {
+ AutotoolsHoverDoc h = getHoverDoc(editor.getEditorInput());
+ String x = getIndexedInfoFromDocument(name, h.getAcDocument());
+ if (x == null)
+ x = getIndexedInfoFromDocument(name, h.getAmDocument());
+ return x;
+ }
+
+ private static String getIndexedInfoFromDocument(String name, Document document) {
+ StringBuffer buffer = new StringBuffer();
+
+ if (document != null && name != null) {
+ Element elem = document.getElementById(name);
+ if (null != elem) {
+ int prototypeCount = 0;
+ buffer.append("<B>Macro:</B> " + name);
+ NodeList nl = elem.getChildNodes();
+ for (int i = 0; i < nl.getLength(); ++i) {
+ Node n = nl.item(i);
+ String nodeName = n.getNodeName();
+ if (nodeName.equals("prototype")) { //$NON-NLS-1$
+ String prototype = "";
+ ++prototypeCount;
+ if (prototypeCount == 1) {
+ buffer.append(" (");
+ } else
+ buffer.append(" <B>or</B> " + name + " (<I>"); //$NON-NLS-2$
+ NodeList varList = n.getChildNodes();
+ for (int j = 0; j < varList.getLength(); ++j) {
+ Node v = varList.item(j);
+ String vnodeName = v.getNodeName();
+ if (vnodeName.equals("parameter")) { //$NON-NLS-1$
+ NamedNodeMap parms = v.getAttributes();
+ Node parmNode = parms.item(0);
+ String parm = parmNode.getNodeValue();
+ prototype = (prototype.equals(""))
+ ? parm
+ : prototype + ", " + parm;
+ }
+ }
+ buffer.append(prototype + "</I>)<br>"); //$NON-NLS-1$
+ }
+ if (nodeName.equals("synopsis")) { //$NON-NLS-1$
+ Node textNode = n.getLastChild();
+ buffer.append("<br><B>Synopsis:</B> ");
+ buffer.append(textNode.getNodeValue());
+ }
+ }
+ }
+ }
+ if (buffer.length() > 0) {
+ HTMLPrinter.insertPageProlog(buffer, 0);
+ HTMLPrinter.addPageEpilog(buffer);
+ return buffer.toString();
+ }
+
+ return null;
+ }
+
+ public static AutoconfMacro[] getMacroList(AutoconfEditor editor) {
+ IEditorInput input = editor.getEditorInput();
+ AutotoolsHoverDoc hoverdoc = getHoverDoc(input);
+ AutoconfMacro[] macros = getMacroList(hoverdoc);
+ return macros;
+ }
+
+ private static AutoconfMacro[] getMacroList(AutotoolsHoverDoc hoverdoc) {
+ if (acHoverMacros == null) {
+ acHoverMacros = new HashMap<Document, ArrayList<AutoconfMacro>>();
+ }
+
+ ArrayList<AutoconfMacro> masterList = new ArrayList<AutoconfMacro>();
+ Document[] doc = hoverdoc.getDocuments();
+ for (int ix = 0; ix < doc.length; ++ix) {
+ Document macroDoc = doc[ix];
+ ArrayList<AutoconfMacro> list = acHoverMacros.get(macroDoc);
+ if (list == null && macroDoc != null) {
+ list = new ArrayList<AutoconfMacro>();
+ NodeList nl = macroDoc.getElementsByTagName("macro"); //$NON-NLS-1$
+ for (int i = 0; i < nl.getLength(); ++i) {
+ Node macro = nl.item(i);
+ NamedNodeMap macroAttrs = macro.getAttributes();
+ Node n2 = macroAttrs.getNamedItem("id"); //$NON-NLS-1$
+ if (n2 != null) {
+ String name = n2.getNodeValue();
+ String parms = "";
+ NodeList macroChildren = macro.getChildNodes();
+ for (int j = 0; j < macroChildren.getLength(); ++j) {
+ Node x = macroChildren.item(j);
+ if (x.getNodeName().equals("prototype")) { //$NON-NLS-1$
+ // Use parameters for context info.
+ NodeList parmList = x.getChildNodes();
+ int parmCount = 0;
+ for (int k = 0; k < parmList.getLength(); ++k) {
+ Node n3 = parmList.item(k);
+ if (n3.getNodeName() == "parameter") { //$NON-NLS-1$
+ NamedNodeMap parmVals = n3.getAttributes();
+ Node parmVal = parmVals.item(0);
+ if (parmCount > 0)
+ parms = parms + ", "; //$NON-NLS-1$
+ parms = parms + parmVal.getNodeValue();
+ ++parmCount;
+ }
+ }
+ }
+ }
+ AutoconfMacro m = new AutoconfMacro(name, parms);
+ list.add(m);
+ }
+ }
+ // Cache the arraylist of macros for later usage.
+ acHoverMacros.put(macroDoc, list);
+ }
+ masterList.addAll(list);
+ }
+ // Convert to a sorted array of macros and return result.
+ AutoconfMacro[] macros = new AutoconfMacro[masterList.size()];
+ masterList.toArray(macros);
+ Arrays.sort(macros);
+ return macros;
+ }
+
+ public static AutoconfPrototype getPrototype(String name, AutoconfEditor editor) {
+ IEditorInput input = editor.getEditorInput();
+ AutotoolsHoverDoc hoverdoc = getHoverDoc(input);
+ AutoconfPrototype x = getPrototype(name, hoverdoc.getAcDocument());
+ if (x == null)
+ x = getPrototype(name, hoverdoc.getAmDocument());
+ return x;
+ }
+
+ private static AutoconfPrototype getPrototype(String name, Document document) {
+ AutoconfPrototype p = null;
+ if (document != null && name != null) {
+ Element elem = document.getElementById(name);
+ if (null != elem) {
+ int prototypeCount = -1;
+ p = new AutoconfPrototype();
+ p.setName(name);
+ NodeList nl = elem.getChildNodes();
+ for (int i = 0; i < nl.getLength(); ++i) {
+ Node n = nl.item(i);
+ String nodeName = n.getNodeName();
+ if (nodeName.equals("prototype")) { //$NON-NLS-1$
+ ++prototypeCount;
+ int parmCount = 0;
+ int minParmCount = -1;
+ p.setNumPrototypes(prototypeCount + 1);
+ NodeList varList = n.getChildNodes();
+ for (int j = 0; j < varList.getLength(); ++j) {
+ Node v = varList.item(j);
+ String vnodeName = v.getNodeName();
+ if (vnodeName.equals("parameter")) { //$NON-NLS-1$
+ ++parmCount;
+ NamedNodeMap parms = v.getAttributes();
+ Node parmNode = parms.item(0);
+ String parm = parmNode.getNodeValue();
+ // Check for first optional parameter which means
+ // we know the minimum number of parameters needed.
+ if (minParmCount < 0 && (parm.charAt(0) == '[' ||
+ parm.startsWith("...")))
+ minParmCount = parmCount - 1;
+ // Old style documentation sometimes had '[' in
+ // prototypes so look for one at end of a parm too.
+ else if (minParmCount < 0 && parm.endsWith("["))
+ minParmCount = parmCount;
+ p.setParmName(prototypeCount, parmCount - 1, parm);
+ }
+ }
+ p.setMaxParms(prototypeCount, parmCount);
+ // If we see no evidence of optional parameters, then
+ // the min and max number of parameters are equal.
+ if (minParmCount < 0)
+ minParmCount = parmCount;
+ p.setMinParms(prototypeCount, minParmCount);
+ }
+ }
+ }
+ }
+ return p;
+ }
+
+ public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
+
+ String hoverInfo = null;
+
+ IDocument d = textViewer.getDocument();
+
+ try {
+ String name = d.get(hoverRegion.getOffset(), hoverRegion.getLength());
+ hoverInfo = getIndexedInfo(name, fEditor);
+ } catch (BadLocationException e) {
+ // do nothing
+ }
+ // TODO Auto-generated method stub
+ return hoverInfo;
+ }
+
+ /*
+ * @see ITextHover#getHoverRegion(ITextViewer, int)
+ */
+ public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
+
+ if (textViewer != null) {
+ /*
+ * If the hover offset falls within the selection range return the
+ * region for the whole selection.
+ */
+ Point selectedRange = textViewer.getSelectedRange();
+ if (selectedRange.x >= 0 && selectedRange.y > 0
+ && offset >= selectedRange.x
+ && offset <= selectedRange.x + selectedRange.y)
+ return new Region(selectedRange.x, selectedRange.y);
+ else {
+ return CWordFinder.findWord(textViewer.getDocument(), offset);
+ }
+ }
+ return null;
+ }
+
+ /*
+ * @see ITextHoverExtension#getHoverControlCreator()
+ * @since 3.0
+ */
+ public IInformationControlCreator getHoverControlCreator() {
+ return new IInformationControlCreator() {
+ public IInformationControl createInformationControl(Shell parent) {
+ return new DefaultInformationControl(parent, getTooltipAffordanceString(),
+ new HTMLTextPresenter(false));
+ }
+ };
+ }
+
+ /*
+ * Static member function to allow content assist to add hover help.
+ */
+ public static IInformationControlCreator getInformationControlCreator() {
+ return new IInformationControlCreator() {
+ public IInformationControl createInformationControl(Shell parent) {
+ return new DefaultInformationControl(parent, getTooltipAffordanceString(),
+ new HTMLTextPresenter(false));
+ }
+ };
+ }
+
+ protected static String getTooltipAffordanceString() {
+ if (fBindingService == null)
+ return null;
+
+ String keySequence= fBindingService.getBestActiveBindingFormattedFor(IAutotoolEditorActionDefinitionIds.SHOW_TOOLTIP);
+ if (keySequence == null)
+ return null;
+
+ return HoverMessages.getFormattedString("ToolTipFocus", keySequence == null ? "" : keySequence); //$NON-NLS-1$
+ }
+
+ /**
+ * Returns the style sheet.
+ *
+ * @since 3.2
+ */
+ protected static String getStyleSheet() {
+ if (fgStyleSheet == null) {
+ Bundle bundle= Platform.getBundle(AutotoolsUIPlugin.PLUGIN_ID);
+ URL styleSheetURL= bundle.getEntry("/AutoconfHoverStyleSheet.css"); //$NON-NLS-1$
+ if (styleSheetURL != null) {
+ try {
+ styleSheetURL= FileLocator.toFileURL(styleSheetURL);
+ BufferedReader reader= new BufferedReader(new InputStreamReader(styleSheetURL.openStream()));
+ StringBuffer buffer= new StringBuffer(200);
+ String line= reader.readLine();
+ while (line != null) {
+ buffer.append(line);
+ buffer.append('\n');
+ line= reader.readLine();
+ }
+ fgStyleSheet= buffer.toString();
+ } catch (IOException ex) {
+ AutotoolsUIPlugin.log(ex);
+ fgStyleSheet= ""; //$NON-NLS-1$
+ }
+ }
+ }
+ return fgStyleSheet;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/text/hover/HoverMessages.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/text/hover/HoverMessages.java
new file mode 100644
index 0000000000..e3757a4a86
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/text/hover/HoverMessages.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.text.hover;
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+
+/**
+ * AutoconfEditorMessages
+ */
+public class HoverMessages {
+
+ private static final String RESOURCE_BUNDLE= HoverMessages.class.getName();
+
+ private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
+
+ private HoverMessages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+ }
+ }
+ /**
+ * Gets a string from the resource bundle and formats it with the argument
+ *
+ * @param key the string used to get the bundle value, must not be null
+ * @since 3.0
+ */
+ public static String getFormattedString(String key, Object arg) {
+ String format= null;
+ try {
+ format= fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+ }
+ if (arg == null)
+ arg= ""; //$NON-NLS-1$
+ return MessageFormat.format(format, new Object[] { arg });
+ }
+ /**
+ * Gets a string from the resource bundle and formats it with the arguments
+ *
+ * @param key the string used to get the bundle value, must not be null
+ * @since 3.0
+ */
+ public static String getFormattedString(String key, Object arg1, Object arg2) {
+ String format= null;
+ try {
+ format= fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+ }
+ if (arg1 == null)
+ arg1= ""; //$NON-NLS-1$
+ if (arg2 == null)
+ arg2= ""; //$NON-NLS-1$
+ return MessageFormat.format(format, new Object[] { arg1, arg2 });
+ }
+
+ /**
+ * Gets a string from the resource bundle and formats it with the argument
+ *
+ * @param key the string used to get the bundle value, must not be null
+ * @since 3.0
+ */
+ public static String getFormattedString(String key, boolean arg) {
+ String format= null;
+ try {
+ format= fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+ }
+ return MessageFormat.format(format, new Object[] { new Boolean(arg) });
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/text/hover/HoverMessages.properties b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/text/hover/HoverMessages.properties
new file mode 100644
index 0000000000..d9326d9d0a
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/text/hover/HoverMessages.properties
@@ -0,0 +1,11 @@
+#################################################################################
+# Copyright (c) 2006 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
+#################################################################################
+ToolTipFocus="Press ''{0}'' for focus." \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsBuildWizard.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsBuildWizard.java
new file mode 100644
index 0000000000..920d80ba5b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsBuildWizard.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008, 2009 Intel Corporation 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:
+ * Intel Corporation - initial API and implementation
+ * Red Hat Inc - modification for Autotools project
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.wizards;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.SortedMap;
+
+import org.eclipse.cdt.managedbuilder.buildproperties.IBuildPropertyManager;
+import org.eclipse.cdt.managedbuilder.buildproperties.IBuildPropertyType;
+import org.eclipse.cdt.managedbuilder.buildproperties.IBuildPropertyValue;
+import org.eclipse.cdt.managedbuilder.core.BuildListComparator;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.core.IToolChain;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.ui.properties.Messages;
+import org.eclipse.cdt.managedbuilder.ui.wizards.AbstractCWizard;
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSWizardHandler;
+import org.eclipse.cdt.ui.newui.CDTPrefUtil;
+import org.eclipse.cdt.ui.wizards.EntryDescriptor;
+import org.eclipse.jface.wizard.IWizard;
+
+/**
+ *
+ */
+public class AutotoolsBuildWizard extends AbstractCWizard {
+ public static final String OTHERS_LABEL = Messages.getString("CNewWizard.0"); //$NON-NLS-1$
+ public static final String AUTOTOOLS_PROJECTTYPE_ID = "org.eclipse.linuxtools.cdt.autotools.core.projectType"; //$NON-NLS-1$
+
+ /**
+ * @since 5.1
+ */
+ public static final String EMPTY_PROJECT = Messages.getString("AbstractCWizard.0"); //$NON-NLS-1$
+ /**
+ * Creates and returns an array of items to be displayed
+ */
+ public EntryDescriptor[] createItems(boolean supportedOnly, IWizard wizard) {
+ IBuildPropertyManager bpm = ManagedBuildManager.getBuildPropertyManager();
+ IBuildPropertyType bpt = bpm.getPropertyType(MBSWizardHandler.ARTIFACT);
+ IBuildPropertyValue[] vs = bpt.getSupportedValues();
+ Arrays.sort(vs, BuildListComparator.getInstance());
+ ArrayList<EntryDescriptor> items = new ArrayList<EntryDescriptor>();
+
+ // look for Autotools project type
+ EntryDescriptor oldsRoot = null;
+ SortedMap<String, IProjectType> sm = ManagedBuildManager.getExtensionProjectTypeMap();
+ for (String s : sm.keySet()) {
+ IProjectType pt = (IProjectType)sm.get(s);
+ if (pt.getId().equals(AUTOTOOLS_PROJECTTYPE_ID)) {
+ AutotoolsBuildWizardHandler h = new AutotoolsBuildWizardHandler(pt, parent, wizard);
+ IToolChain[] tcs = ManagedBuildManager.getExtensionToolChains(pt);
+ for(int i = 0; i < tcs.length; i++){
+ IToolChain t = tcs[i];
+ if(t.isSystemObject())
+ continue;
+ if (!isValid(t, supportedOnly, wizard))
+ continue;
+
+ h.addTc(t);
+ }
+
+ String pId = null;
+ if (CDTPrefUtil.getBool(CDTPrefUtil.KEY_OTHERS)) {
+ if (oldsRoot == null) {
+ oldsRoot = new EntryDescriptor(OTHERS_LABEL, null, OTHERS_LABEL, true, null, null);
+ items.add(oldsRoot);
+ }
+ pId = oldsRoot.getId();
+ } else { // do not group to <Others>
+ pId = null;
+ }
+ items.add(new EntryDescriptor(pt.getId(), pId, pt.getName(), true, h, null));
+ }
+ }
+ return (EntryDescriptor[])items.toArray(new EntryDescriptor[items.size()]);
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsBuildWizardHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsBuildWizardHandler.java
new file mode 100644
index 0000000000..35f541a1be
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsBuildWizardHandler.java
@@ -0,0 +1,42 @@
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.wizards;
+
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSWizardHandler;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsNewProjectNature;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.AutotoolsConfigurationManager;
+import org.eclipse.swt.widgets.Composite;
+
+public class AutotoolsBuildWizardHandler extends MBSWizardHandler {
+ public AutotoolsBuildWizardHandler(Composite p, IWizard w) {
+ super(AutotoolsWizardMessages.getResourceString("AutotoolsBuildWizard.0"), p, w); //$NON-NLS-1$
+ }
+
+ public AutotoolsBuildWizardHandler(IProjectType pt, Composite parent, IWizard wizard) {
+ super(pt, parent, wizard);
+ }
+
+ @Override
+ public void convertProject(IProject proj, IProgressMonitor monitor) throws CoreException {
+ super.convertProject(proj, monitor);
+ AutotoolsNewProjectNature.addAutotoolsNature(proj, monitor);
+
+ // For each IConfiguration, create a corresponding Autotools Configuration
+ IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(proj);
+ IConfiguration[] cfgs = info.getManagedProject().getConfigurations();
+ for (int i = 0; i < cfgs.length; ++i) {
+ IConfiguration cfg = cfgs[i];
+ ICConfigurationDescription cfgd = ManagedBuildManager.getDescriptionForConfiguration(cfg);
+ String id = cfgd.getId();
+ AutotoolsConfigurationManager.getInstance().getConfiguration(proj, id, true);
+ }
+ AutotoolsConfigurationManager.getInstance().saveConfigs(proj);
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsNewCCProjectWizardV2.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsNewCCProjectWizardV2.java
new file mode 100644
index 0000000000..9ab81be4b7
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsNewCCProjectWizardV2.java
@@ -0,0 +1,340 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2005, 2009 IBM Corporation 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:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.wizards;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.ICDescriptor;
+import org.eclipse.cdt.managedbuilder.core.BuildException;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IManagedProject;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
+import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPageManager;
+import org.eclipse.cdt.ui.newui.CDTHelpContextIds;
+import org.eclipse.cdt.ui.wizards.NewCCProjectWizard;
+import org.eclipse.cdt.ui.wizards.NewCProjectWizardPage;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsNewProjectNature;
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.AutotoolsPropertyConstants;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.PlatformUI;
+
+
+
+@SuppressWarnings("deprecation")
+public class AutotoolsNewCCProjectWizardV2 extends NewCCProjectWizard {
+
+ /* (non-Javadoc)
+ * String constants
+ */
+ protected static final String PREFIX = "WizardAutotoolsNewCCProjectV2"; //$NON-NLS-1$
+ protected static final String OP_ERROR = PREFIX + ".op_error"; //$NON-NLS-1$
+ protected static final String WZ_TITLE = PREFIX + ".title"; //$NON-NLS-1$
+ protected static final String WZ_DESC = PREFIX + ".description"; //$NON-NLS-1$
+ protected static final String WINDOW_TITLE = PREFIX + ".windowTitle"; //$NON-NLS-1$
+ protected static final String CONF_TITLE = PREFIX + ".config.title"; //$NON-NLS-1$
+ protected static final String CONF_DESC = PREFIX + ".config.desc"; //$NON-NLS-1$
+ protected static final String OPTIONS_TITLE = PREFIX + ".options.title"; //$NON-NLS-1$
+ protected static final String OPTIONS_DESC = PREFIX + ".options.desc"; //$NON-NLS-1$
+ protected static final String MSG_ADD_NATURE = PREFIX + ".message.add_nature"; //$NON-NLS-1$
+ protected static final String MSG_ADD_BUILDER = PREFIX + ".message.add_builder"; //$NON-NLS-1$
+ protected static final String MSG_SAVE = PREFIX + ".message.save"; //$NON-NLS-1$
+
+ // Wizard pages
+ protected CProjectPlatformPage projectConfigurationPage;
+ protected NewAutotoolsProjectOptionPage optionPage;
+ protected IProjectType projectType;
+
+ public AutotoolsNewCCProjectWizardV2() {
+ this(AutotoolsUIPlugin.getResourceString(WZ_TITLE), AutotoolsUIPlugin.getResourceString(WZ_DESC));
+ }
+
+ public AutotoolsNewCCProjectWizardV2(String title, String description) {
+ super(title, description);
+ }
+ /**
+ * Method getWzDescriptionResource, allows Wizard description label value
+ * to be changed by subclasses
+ *
+ * @return String
+ */
+ protected static String getWzDescriptionResource() {
+ return AutotoolsUIPlugin.getResourceString(WZ_DESC);
+ }
+
+ /**
+ * Method getWzTitleResource, allows Wizard description label value
+ * to be changed by subclasses
+ *
+ * @return String
+ */
+ protected static String getWzTitleResource() {
+ return AutotoolsUIPlugin.getResourceString(WZ_TITLE);
+ }
+
+ /**
+ * Method getWindowTitleResource, allows Wizard Title label value to be
+ * changed by subclasses
+ *
+ * @return String
+ */
+ protected static String getWindowTitleResource() {
+ return AutotoolsUIPlugin.getResourceString(WINDOW_TITLE);
+ }
+
+ /**
+ * Method getPrefix, allows prefix value to be changed by subclasses
+ *
+ * @return String
+ */
+ protected static String getPrefix() {
+ return PREFIX;
+ }
+
+ public void addPages() {
+ // Add the default page for all new projects
+ super.addPages();
+
+ // Add the configuration selection page
+ projectConfigurationPage = new CProjectPlatformPage(PREFIX, this);
+ projectConfigurationPage.setTitle(AutotoolsUIPlugin.getResourceString(CONF_TITLE));
+ projectConfigurationPage.setDescription(AutotoolsUIPlugin.getResourceString(CONF_DESC));
+ addPage(projectConfigurationPage);
+
+ // Add the options (tabbed) page
+ optionPage = new NewAutotoolsProjectOptionPage(PREFIX, this);
+ optionPage.setTitle(AutotoolsUIPlugin.getResourceString(OPTIONS_TITLE));
+ optionPage.setDescription(AutotoolsUIPlugin.getResourceString(OPTIONS_DESC));
+ addPage(optionPage);
+
+ // add custom pages
+ MBSCustomPageManager.init();
+
+ // add stock pages
+ MBSCustomPageManager.addStockPage(fMainPage, NewCProjectWizardPage.PAGE_ID);
+ MBSCustomPageManager.addStockPage(projectConfigurationPage, CProjectPlatformPage.PAGE_ID);
+ MBSCustomPageManager.addStockPage(optionPage, NewAutotoolsProjectOptionPage.PAGE_ID);
+
+ }
+
+ public void createPageControls(Composite pageContainer) {
+ super.createPageControls( pageContainer );
+
+ IWizardPage [] pages = getPages();
+
+ if (pages != null) {
+ for (int i = 0; i < pages.length; i++) {
+ IWizardPage page = pages[i];
+ if (page instanceof NewCProjectWizardPage) {
+ // Setup the help information
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(pageContainer, CDTHelpContextIds.MAN_PROJ_WIZ_NAME_PAGE);
+ }
+ else if (page instanceof NewAutotoolsProjectOptionPage) {
+ NewAutotoolsProjectOptionPage optionPage = (NewAutotoolsProjectOptionPage) page;
+ optionPage.setupHelpContextIds();
+ }
+ // The other built-in page is the CProjectPlatformPage which already has a help id.
+ }
+ }
+ }
+
+ public void updateProjectTypeProperties() {
+ // Update the error parser list
+ optionPage.updateProjectTypeProperties();
+ }
+
+ protected void addNature(IProgressMonitor monitor) throws CoreException {
+ monitor.beginTask("", 4);
+ monitor.subTask(AutotoolsUIPlugin.getResourceString(MSG_ADD_NATURE));
+ ManagedCProjectNature.addManagedNature(newProject, new SubProgressMonitor(monitor, 1));
+ monitor.subTask(AutotoolsUIPlugin.getResourceString(MSG_ADD_BUILDER));
+ ManagedCProjectNature.addManagedBuilder(newProject, new SubProgressMonitor(monitor, 1));
+ monitor.subTask(AutotoolsUIPlugin.getResourceString(MSG_ADD_NATURE));
+ AutotoolsNewProjectNature.addAutotoolsNature(newProject, new SubProgressMonitor(monitor, 1));
+ monitor.subTask(AutotoolsUIPlugin.getResourceString(MSG_ADD_BUILDER));
+ AutotoolsNewProjectNature.addAutotoolsBuilder(newProject, new SubProgressMonitor(monitor, 1));
+ monitor.done();
+ }
+
+ public IProjectType getProjectType() {
+ return projectConfigurationPage.getProjectType();
+ }
+
+ protected void doRun(IProgressMonitor monitor) throws CoreException {
+ if (monitor == null) {
+ monitor = new NullProgressMonitor();
+ }
+
+ // super.doRun() just creates the project and does not assign a builder to it.
+ super.doRun(new SubProgressMonitor(monitor, 5));
+
+ // Add the managed build nature and builder
+ try {
+ addNature(new SubProgressMonitor(monitor, 2));
+ } catch (CoreException e) {
+ AutotoolsUIPlugin.log(e);
+ }
+ // FIXME: Default scanner property: make -w - eventually we want to use Make core's build scanner
+ newProject.setPersistentProperty(AutotoolsPropertyConstants.SCANNER_USE_MAKE_W, AutotoolsPropertyConstants.TRUE);
+
+ CCorePlugin.getDefault().mapCProjectOwner(newProject, getProjectID(), true);
+
+ // Add the ManagedProject to the project
+ IManagedProject newManagedProject = null;
+ IManagedBuildInfo info = null;
+ try {
+ info = ManagedBuildManager.createBuildInfo(newProject);
+ IProjectType parent = getProjectType();
+ newManagedProject = ManagedBuildManager.createManagedProject(newProject, parent);
+ if (newManagedProject != null) {
+ IConfiguration [] selectedConfigs = getSelectedConfigurations();
+ for (int i = 0; i < selectedConfigs.length; i++) {
+ IConfiguration config = selectedConfigs[i];
+ int id = ManagedBuildManager.getRandomNumber();
+ IConfiguration newConfig = newManagedProject.createConfiguration(config, config.getId() + "." + id); //$NON-NLS-1$
+ newConfig.setArtifactName(newManagedProject.getDefaultArtifactName());
+ }
+ // Now add the first supported config in the list as the default
+ IConfiguration defaultCfg = null;
+ IConfiguration[] newConfigs = newManagedProject.getConfigurations();
+ for(int i = 0; i < newConfigs.length; i++) {
+ if(newConfigs[i].isSupported()){
+ defaultCfg = newConfigs[i];
+ break;
+ }
+ }
+
+ if(defaultCfg == null && newConfigs.length > 0)
+ defaultCfg = newConfigs[0];
+
+ if(defaultCfg != null) {
+ ManagedBuildManager.setDefaultConfiguration(newProject, defaultCfg);
+ ManagedBuildManager.setSelectedConfiguration(newProject, defaultCfg);
+ }
+ ManagedBuildManager.setNewProjectVersion(newProject);
+ ICDescriptor desc = null;
+ try {
+ desc = CCorePlugin.getDefault().getCProjectDescription(newProject, true);
+ desc.create(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID, ManagedBuildManager.INTERFACE_IDENTITY);
+ // TODO: The binary parser setting is currently per-project in the rest of CDT.
+ // In the MBS, it is per-coonfiguration. For now, select the binary parsers of the
+ // first configuration.
+// if (newConfigs.length > 0) {
+// IToolChain tc = newConfigs[0].getToolChain();
+// ITargetPlatform targetPlatform = tc.getTargetPlatform();
+// }
+ } catch (CoreException e) {
+ AutotoolsUIPlugin.log(e);
+ }
+ }
+ } catch (BuildException e) {
+ AutotoolsUIPlugin.log(e);
+ }
+
+ // Following is a bit of a hack because changing the project options
+ // causes a change event to be fired which will try to reindex the project.
+ // We are in the middle of setting the project indexer which may end up
+ // being the null indexer. In that case, we don't want the default indexer
+ // (Fast Indexer) to be invoked.
+ //IPDOMManager manager = CCorePlugin.getPDOMManager();
+ //ICProject cproject = CoreModel.getDefault().create(newProject);
+ //manager.setIndexerId(cproject, ConvertToAutotoolsProjectWizard.NULL_INDEXER_ID);
+
+ // Modify the project settings
+ if (newProject != null) {
+ optionPage.performApply(new SubProgressMonitor(monitor, 2));
+ }
+
+ // Save the build options
+ monitor.subTask(AutotoolsUIPlugin.getResourceString(MSG_SAVE));
+ if (info != null) {
+ info.setValid(true);
+ ManagedBuildManager.saveBuildInfo(newProject, true);
+ }
+
+ IStatus initResult = ManagedBuildManager.initBuildInfoContainer(newProject);
+ if (initResult.getCode() != IStatus.OK) {
+ // At this point, I can live with a failure
+ AutotoolsUIPlugin.log(initResult);
+ }
+
+ monitor.done();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.ui.wizards.NewCProjectWizard#doRunPrologue(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected void doRunPrologue(IProgressMonitor monitor) {
+ // Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.ui.wizards.NewCProjectWizard#doRunEpilogue(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected void doRunEpilogue(IProgressMonitor monitor) {
+ // Get my initializer to run
+ if(newProject == null)
+ return;
+
+ IStatus initResult = ManagedBuildManager.initBuildInfoContainer(newProject);
+ if (initResult.getCode() != IStatus.OK) {
+ // At this point, I can live with a failure
+ AutotoolsUIPlugin.log(initResult);
+ }
+
+ // execute any operations specified by custom pages
+ // execute any operations specified by custom pages
+ IRunnableWithProgress operations[] = MBSCustomPageManager.getOperations();
+
+ if (operations != null)
+ {
+ for(int k = 0; k < operations.length; k++)
+ {
+ try {
+ operations[k].run(monitor);
+ } catch(InvocationTargetException e) {
+ //TODO: what should we do?
+ } catch(InterruptedException e) {
+ //TODO: what should we do?
+ }
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.ui.wizards.NewCProjectWizard#getProjectID()
+ */
+ public String getProjectID() {
+// return "org.eclipse.cdt.make.core.make"; //$NON-NLS-1$
+ return ManagedBuilderCorePlugin.MANAGED_MAKE_PROJECT_ID;
+ }
+
+// public IProjectType getSelectedProjectType() {
+// return projectConfigurationPage.getSelectedProjectType();
+// }
+
+ public IConfiguration[] getSelectedConfigurations() {
+ return projectConfigurationPage.getSelectedConfigurations();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsNewCProjectWizardV2.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsNewCProjectWizardV2.java
new file mode 100644
index 0000000000..3e647b2b92
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsNewCProjectWizardV2.java
@@ -0,0 +1,340 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2005, 2009 IBM Corporation 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:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.wizards;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.ICDescriptor;
+import org.eclipse.cdt.managedbuilder.core.BuildException;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IManagedProject;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
+import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPageManager;
+import org.eclipse.cdt.ui.newui.CDTHelpContextIds;
+import org.eclipse.cdt.ui.wizards.NewCProjectWizard;
+import org.eclipse.cdt.ui.wizards.NewCProjectWizardPage;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsNewProjectNature;
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.AutotoolsPropertyConstants;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.PlatformUI;
+
+
+
+@SuppressWarnings("deprecation")
+public class AutotoolsNewCProjectWizardV2 extends NewCProjectWizard {
+
+ /* (non-Javadoc)
+ * String constants
+ */
+ protected static final String PREFIX = "WizardAutotoolsNewCProjectV2"; //$NON-NLS-1$
+ protected static final String OP_ERROR = PREFIX + ".op_error"; //$NON-NLS-1$
+ protected static final String WZ_TITLE = PREFIX + ".title"; //$NON-NLS-1$
+ protected static final String WZ_DESC = PREFIX + ".description"; //$NON-NLS-1$
+ protected static final String WINDOW_TITLE = PREFIX + ".windowTitle"; //$NON-NLS-1$
+ protected static final String CONF_TITLE = PREFIX + ".config.title"; //$NON-NLS-1$
+ protected static final String CONF_DESC = PREFIX + ".config.desc"; //$NON-NLS-1$
+ protected static final String OPTIONS_TITLE = PREFIX + ".options.title"; //$NON-NLS-1$
+ protected static final String OPTIONS_DESC = PREFIX + ".options.desc"; //$NON-NLS-1$
+ protected static final String MSG_ADD_NATURE = PREFIX + ".message.add_nature"; //$NON-NLS-1$
+ protected static final String MSG_ADD_BUILDER = PREFIX + ".message.add_builder"; //$NON-NLS-1$
+ protected static final String MSG_SAVE = PREFIX + ".message.save"; //$NON-NLS-1$
+
+ // Wizard pages
+ protected CProjectPlatformPage projectConfigurationPage;
+ protected NewAutotoolsProjectOptionPage optionPage;
+ protected IProjectType projectType;
+
+ public AutotoolsNewCProjectWizardV2() {
+ this(AutotoolsUIPlugin.getResourceString(WZ_TITLE), AutotoolsUIPlugin.getResourceString(WZ_DESC));
+ }
+
+ public AutotoolsNewCProjectWizardV2(String title, String description) {
+ super(title, description);
+ }
+ /**
+ * Method getWzDescriptionResource, allows Wizard description label value
+ * to be changed by subclasses
+ *
+ * @return String
+ */
+ protected static String getWzDescriptionResource() {
+ return AutotoolsUIPlugin.getResourceString(WZ_DESC);
+ }
+
+ /**
+ * Method getWzTitleResource, allows Wizard description label value
+ * to be changed by subclasses
+ *
+ * @return String
+ */
+ protected static String getWzTitleResource() {
+ return AutotoolsUIPlugin.getResourceString(WZ_TITLE);
+ }
+
+ /**
+ * Method getWindowTitleResource, allows Wizard Title label value to be
+ * changed by subclasses
+ *
+ * @return String
+ */
+ protected static String getWindowTitleResource() {
+ return AutotoolsUIPlugin.getResourceString(WINDOW_TITLE);
+ }
+
+ /**
+ * Method getPrefix, allows prefix value to be changed by subclasses
+ *
+ * @return String
+ */
+ protected static String getPrefix() {
+ return PREFIX;
+ }
+
+ public void addPages() {
+ // Add the default page for all new projects
+ super.addPages();
+
+ // Add the configuration selection page
+ projectConfigurationPage = new CProjectPlatformPage(PREFIX, this);
+ projectConfigurationPage.setTitle(AutotoolsUIPlugin.getResourceString(CONF_TITLE));
+ projectConfigurationPage.setDescription(AutotoolsUIPlugin.getResourceString(CONF_DESC));
+ addPage(projectConfigurationPage);
+
+ // Add the options (tabbed) page
+ optionPage = new NewAutotoolsProjectOptionPage(PREFIX, this);
+ optionPage.setTitle(AutotoolsUIPlugin.getResourceString(OPTIONS_TITLE));
+ optionPage.setDescription(AutotoolsUIPlugin.getResourceString(OPTIONS_DESC));
+ addPage(optionPage);
+
+ // add custom pages
+ MBSCustomPageManager.init();
+
+ // add stock pages
+ MBSCustomPageManager.addStockPage(fMainPage, NewCProjectWizardPage.PAGE_ID);
+ MBSCustomPageManager.addStockPage(projectConfigurationPage, CProjectPlatformPage.PAGE_ID);
+ MBSCustomPageManager.addStockPage(optionPage, NewAutotoolsProjectOptionPage.PAGE_ID);
+
+ }
+
+ public void createPageControls(Composite pageContainer) {
+ super.createPageControls( pageContainer );
+
+ IWizardPage [] pages = getPages();
+
+ if (pages != null) {
+ for (int i = 0; i < pages.length; i++) {
+ IWizardPage page = pages[i];
+ if (page instanceof NewCProjectWizardPage) {
+ // Setup the help information
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(pageContainer, CDTHelpContextIds.MAN_PROJ_WIZ_NAME_PAGE);
+ }
+ else if (page instanceof NewAutotoolsProjectOptionPage) {
+ NewAutotoolsProjectOptionPage optionPage = (NewAutotoolsProjectOptionPage) page;
+ optionPage.setupHelpContextIds();
+ }
+ // The other built-in page is the CProjectPlatformPage which already has a help id.
+ }
+ }
+ }
+
+ public void updateProjectTypeProperties() {
+ // Update the error parser list
+ optionPage.updateProjectTypeProperties();
+ }
+
+ protected void addNature(IProgressMonitor monitor) throws CoreException {
+ monitor.beginTask("", 4);
+ monitor.subTask(AutotoolsUIPlugin.getResourceString(MSG_ADD_NATURE));
+ ManagedCProjectNature.addManagedNature(newProject, new SubProgressMonitor(monitor, 1));
+ monitor.subTask(AutotoolsUIPlugin.getResourceString(MSG_ADD_BUILDER));
+ ManagedCProjectNature.addManagedBuilder(newProject, new SubProgressMonitor(monitor, 1));
+ monitor.subTask(AutotoolsUIPlugin.getResourceString(MSG_ADD_NATURE));
+ AutotoolsNewProjectNature.addAutotoolsNature(newProject, new SubProgressMonitor(monitor, 1));
+ monitor.subTask(AutotoolsUIPlugin.getResourceString(MSG_ADD_BUILDER));
+ AutotoolsNewProjectNature.addAutotoolsBuilder(newProject, new SubProgressMonitor(monitor, 1));
+ monitor.done();
+ }
+
+ public IProjectType getProjectType() {
+ return projectConfigurationPage.getProjectType();
+ }
+
+ protected void doRun(IProgressMonitor monitor) throws CoreException {
+ if (monitor == null) {
+ monitor = new NullProgressMonitor();
+ }
+
+ // super.doRun() just creates the project and does not assign a builder to it.
+ super.doRun(new SubProgressMonitor(monitor, 5));
+
+ // Add the managed build nature and builder
+ try {
+ addNature(new SubProgressMonitor(monitor, 2));
+ } catch (CoreException e) {
+ AutotoolsUIPlugin.log(e);
+ }
+ // FIXME: Default scanner property: make -w - eventually we want to use Make core's build scanner
+ newProject.setPersistentProperty(AutotoolsPropertyConstants.SCANNER_USE_MAKE_W, AutotoolsPropertyConstants.TRUE);
+
+ CCorePlugin.getDefault().mapCProjectOwner(newProject, getProjectID(), true);
+
+ // Add the ManagedProject to the project
+ IManagedProject newManagedProject = null;
+ IManagedBuildInfo info = null;
+ try {
+ info = ManagedBuildManager.createBuildInfo(newProject);
+ IProjectType parent = getProjectType();
+ newManagedProject = ManagedBuildManager.createManagedProject(newProject, parent);
+ if (newManagedProject != null) {
+ IConfiguration [] selectedConfigs = getSelectedConfigurations();
+ for (int i = 0; i < selectedConfigs.length; i++) {
+ IConfiguration config = selectedConfigs[i];
+ int id = ManagedBuildManager.getRandomNumber();
+ IConfiguration newConfig = newManagedProject.createConfiguration(config, config.getId() + "." + id); //$NON-NLS-1$
+ newConfig.setArtifactName(newManagedProject.getDefaultArtifactName());
+ }
+ // Now add the first supported config in the list as the default
+ IConfiguration defaultCfg = null;
+ IConfiguration[] newConfigs = newManagedProject.getConfigurations();
+ for(int i = 0; i < newConfigs.length; i++) {
+ if(newConfigs[i].isSupported()){
+ defaultCfg = newConfigs[i];
+ break;
+ }
+ }
+
+ if(defaultCfg == null && newConfigs.length > 0)
+ defaultCfg = newConfigs[0];
+
+ if(defaultCfg != null) {
+ ManagedBuildManager.setDefaultConfiguration(newProject, defaultCfg);
+ ManagedBuildManager.setSelectedConfiguration(newProject, defaultCfg);
+ }
+ ManagedBuildManager.setNewProjectVersion(newProject);
+ ICDescriptor desc = null;
+ try {
+ desc = CCorePlugin.getDefault().getCProjectDescription(newProject, true);
+ desc.create(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID, ManagedBuildManager.INTERFACE_IDENTITY);
+ // TODO: The binary parser setting is currently per-project in the rest of CDT.
+ // In the MBS, it is per-coonfiguration. For now, select the binary parsers of the
+ // first configuration.
+// if (newConfigs.length > 0) {
+// IToolChain tc = newConfigs[0].getToolChain();
+// ITargetPlatform targetPlatform = tc.getTargetPlatform();
+// }
+ } catch (CoreException e) {
+ AutotoolsUIPlugin.log(e);
+ }
+ }
+ } catch (BuildException e) {
+ AutotoolsUIPlugin.log(e);
+ }
+
+ // Following is a bit of a hack because changing the project options
+ // causes a change event to be fired which will try to reindex the project.
+ // We are in the middle of setting the project indexer which may end up
+ // being the null indexer. In that case, we don't want the default indexer
+ // (Fast Indexer) to be invoked.
+ //IPDOMManager manager = CCorePlugin.getPDOMManager();
+ //ICProject cproject = CoreModel.getDefault().create(newProject);
+ //manager.setIndexerId(cproject, ConvertToAutotoolsProjectWizard.NULL_INDEXER_ID);
+
+ // Modify the project settings
+ if (newProject != null) {
+ optionPage.performApply(new SubProgressMonitor(monitor, 2));
+ }
+
+ // Save the build options
+ monitor.subTask(AutotoolsUIPlugin.getResourceString(MSG_SAVE));
+ if (info != null) {
+ info.setValid(true);
+ ManagedBuildManager.saveBuildInfo(newProject, true);
+ }
+
+ IStatus initResult = ManagedBuildManager.initBuildInfoContainer(newProject);
+ if (initResult.getCode() != IStatus.OK) {
+ // At this point, I can live with a failure
+ AutotoolsUIPlugin.log(initResult);
+ }
+
+ monitor.done();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.ui.wizards.NewCProjectWizard#doRunPrologue(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected void doRunPrologue(IProgressMonitor monitor) {
+ // Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.ui.wizards.NewCProjectWizard#doRunEpilogue(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected void doRunEpilogue(IProgressMonitor monitor) {
+ // Get my initializer to run
+ if(newProject == null)
+ return;
+
+ IStatus initResult = ManagedBuildManager.initBuildInfoContainer(newProject);
+ if (initResult.getCode() != IStatus.OK) {
+ // At this point, I can live with a failure
+ AutotoolsUIPlugin.log(initResult);
+ }
+
+ // execute any operations specified by custom pages
+ // execute any operations specified by custom pages
+ IRunnableWithProgress operations[] = MBSCustomPageManager.getOperations();
+
+ if (operations != null)
+ {
+ for(int k = 0; k < operations.length; k++)
+ {
+ try {
+ operations[k].run(monitor);
+ } catch(InvocationTargetException e) {
+ //TODO: what should we do?
+ } catch(InterruptedException e) {
+ //TODO: what should we do?
+ }
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.ui.wizards.NewCProjectWizard#getProjectID()
+ */
+ public String getProjectID() {
+// return "org.eclipse.cdt.make.core.make"; //$NON-NLS-1$
+ return ManagedBuilderCorePlugin.MANAGED_MAKE_PROJECT_ID;
+ }
+
+// public IProjectType getSelectedProjectType() {
+// return projectConfigurationPage.getSelectedProjectType();
+// }
+
+ public IConfiguration[] getSelectedConfigurations() {
+ return projectConfigurationPage.getSelectedConfigurations();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsWizardMessages.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsWizardMessages.java
new file mode 100644
index 0000000000..adccbfd3f9
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsWizardMessages.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007, 2009 IBM Corporation 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:
+ * IBM - Initial API and implementation
+ * Red Hat - Copy from org.eclipse.cdt.wizards to here plus rename
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.wizards;
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * @since 2.0
+ */
+public class AutotoolsWizardMessages {
+ // Bundle ID
+ private static final String BUNDLE_ID = AutotoolsWizardMessages.class.getName();
+ //Resource bundle.
+ private static ResourceBundle resourceBundle;
+
+ static {
+ try {
+ resourceBundle = ResourceBundle.getBundle(BUNDLE_ID);
+ } catch (MissingResourceException x) {
+ resourceBundle = null;
+ }
+ }
+
+ public static String getFormattedString(String key, String arg) {
+ return MessageFormat.format(getResourceString(key), new Object[] { arg });
+ }
+
+ public static String getFormattedString(String key, String[] args) {
+ return MessageFormat.format(getResourceString(key), (Object[])args);
+ }
+
+ public static String getResourceString(String key) {
+ try {
+ return resourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!"; //$NON-NLS-1$ //$NON-NLS-2$
+ } catch (NullPointerException e) {
+ return "#" + key + "#"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ private AutotoolsWizardMessages() {
+ // No constructor
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsWizardMessages.properties b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsWizardMessages.properties
new file mode 100644
index 0000000000..ca7ddaace6
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/AutotoolsWizardMessages.properties
@@ -0,0 +1,366 @@
+###############################################################################
+# Copyright (c) 2000, 2006, 2007 IBM Corporation 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:
+# IBM - Initial API and implementation
+# Red Hat - Copy to AutotoolsWizardMessages.properties
+###############################################################################
+
+# ------- Project Update Messages -------
+ManagedBuilderStartup.update.20x.title=Update Managed Make Project
+ManagedBuilderStartup.update.20x.message=The project {0} has been detected in your workspace.\n Its build settings are stored in a format that is no longer supported.\n Would you like to convert them now?
+
+AutotoolsBuildWizard.0=GNU Autotools project
+
+# ------- NewProjectCreationPluginPage-------
+MngMakeProjectWizard.op_error=Managed Make Error
+MngMakeProjectWizard.title=Managed Make Project
+MngMakeProjectWizard.description=Create a new Managed Make project.
+#MngMakeProjectWizardSettings.title=Managed Make Settings
+#MngMakeProjectWizardSettings.description=Define the Managed Make build settings.
+MngMakeProjectWizard.message.add_nature=Adding Managed Nature
+MngMakeProjectWizard.message.add_builder=Adding Makefile Generator
+MngMakeProjectWizard.message.save=Saving new build options
+
+MngCWizard.title=Managed Make C Project
+MngCWizard.description=Create a new Managed Make C project.
+MngCWizardSettings.title=Managed Make C Settings
+MngCWizardSettings.description=Define the Managed Make C build settings.
+
+MngCCWizard.title=Managed Make C++ Project
+MngCCWizard.description=Create a new Managed Make C++ Project.
+MngCCWizard.message.creating=Creating a new C++ Project with a makefile generator
+MngCCWizardSettings.title=Managed Make C++ Settings
+MngCCWizardSettings.description=Define the Managed Make C++ build settings.
+
+ReferenceBlock_task_ReferenceProjects=Reference Projects
+
+# -- Strings for the platform selection page --
+MngMakeProjectWizard.config.title=Select a type of project
+MngMakeProjectWizard.config.desc=Select the platform and configurations you wish to deploy on
+PlatformBlock.tip.platform=Select the type of project for the build goal
+PlatformBlock.tip.forcedconfigs=There are no buildable configurations on this platform for this project type.\n By default, all configurations selected.
+PlatformBlock.label.platform=Project Type:
+PlatformBlock.label.configs=Configurations:
+PlatformBlock.label.showall=Show All Project Types
+PlatformBlock.label.showall.config=Show All Configurations
+PlatformBlock.label.selectAll=Select All
+PlatformBlock.label.deselectAll=Deselect All
+PlatformBlock.message.error.noconfigs=You must select at least one configuration
+
+# -- Strings for the additional options tab
+MngMakeProjectWizard.options.title=Additional Project Settings
+MngMakeProjectWizard.options.desc=Define the inter-project dependencies, if any.
+
+# ----------- Configuration Selection Page -----------
+BuildPropertyPage.label.Platform=Project Type:
+BuildPropertyPage.label.Configuration=Configuration:
+BuildPropertyPage.label.Active=Active configuration
+BuildPropertyPage.label.Settings=Configuration Settings
+BuildPropertyPage.label.AddConfButton=Manage...
+BuildPropertyPage.selection.configuration.all=All configurations
+BuildPropertyPage.tip.platform=Select a platform for the project
+BuildPropertyPage.tip.config=Select the configuration to edit
+BuildPropertyPage.tip.addconf=Add configurations for the platform
+BuildPropertyPage.tip.remconf=Remove configurations for the platform
+BuildPropertyPage.manage.title=Manage
+BuildPropertyPage.error.Unknown_tree_element=Unknown type of element in tree of type {0}
+BuildPropertyPage.error.version_low=The Managed Make project settings for this project are not available.
+BuildPropertyPage.defaults.title=Reset Configuration Tools
+BuildPropertyPage.defaults.message=This action will reset all of the tools in the selected configuration to their default settings.\n\nDo you want to proceed?
+BuildPropertyPage.changes.save.title=Apply Configuration Changes
+BuildPropertyPage.changes.save.question=You have made changes to the {0} configuration.\n\nDo you want to apply these changes before switching to the {1} configuration?
+BuildPropertyPage.changes.save.error=The configuration changes could not be applied.
+BuildPropertyPage.unsupported.proj=The project support is not installed on the system
+BuildPropertyPage.unsupported.config=The configuration support is not installed on the system
+BuildPropertyPage.config.notselected=No configurations selected
+
+# ----------- Managed Build Custom Wizard Page Manager Error Strings -----------
+MBSCustomPageManager.error0=Unknown element type
+MBSCustomPageManager.error1=\ for extension point
+MBSCustomPageManager.error2=Unknown child element type
+MBSCustomPageManager.error3=\ for wizardPage element in extension point
+MBSCustomPageManager.error4=Missing projectType ID
+MBSCustomPageManager.error5=Missing projectType ID
+MBSCustomPageManager.error6=Missing nature ID
+
+
+# ----------- Managed Build Preference Page -----------
+BuildPreferencePage.label.Settings=Workspace Settings
+BuildPreferencePage.job.rebuild=Rebuilding the Managed Projects
+BuildPreferencePage.apply.internal.error=An Internal error has occured please check error log.
+
+#--------------- Resource Configuration Selection Page --------------
+ResourceBuildPropertyPage.defaults.title=Reset Resource Configuration Tool
+ResourceBuildPropertyPage.defaults.message=This action will reset all options of the tool in the current resource configuration to their default settings.\n\nDo you want to proceed?
+
+# ----------- Tools Settings Block -----------
+ToolsSettingsBlock.label.Settings=Tool Settings
+ToolsSettingsBlock.label.ToolTree=Tools
+ToolsSettingsBlock.label.ToolOptions=Options
+
+# ----------- Build Settings Block -----------
+BuildSettingsBlock.label.Settings=Build Settings
+BuildSettingsBlock.label.makecmdgroup=Build command
+BuildSettingsBlock.label.makecmddef=Use default command
+BuildSettingsBlock.label.output.group=Build output
+BuildSettingsBlock.label.output.name=Artifact name:
+BuildSettingsBlock.label.output.extension=Artifact extension:
+BuildSettingsBlock.defaults.title=Reset Build Settings
+BuildSettingsBlock.defaults.message=This action will reset the build settings to their default settings.\n\nDo you want to proceed?
+BuildSettingsBlock.label.macros.group=Build Macros usage
+BuildSettingsBlock.label.macros.expand=Expand Build Environment Macros
+BuildSettingsBlock.label.internal.builder.group=Internal Builder
+BuildSettingsBlock.label.internal.builder.enable=Enable Internal Builder
+BuildSettingsBlock.label.internal.builder.ignore.err=Ignore build errorors
+BuildSettingsBlock.label.internal.builder.experimental.note=NOTE: This is experimental functionality
+
+
+# ----------- Build Steps Block -----------
+BuildStepSettingsBlock.label.Settings=Build Steps
+BuildStepSettingsBlock.label.prebuildstep.group=Pre-build step:
+BuildStepSettingsBlock.label.prebuildstep.cmd=Command:
+BuildStepSettingsBlock.label.prebuildstep.desc=Description:
+BuildStepSettingsBlock.label.postbuildstep.group=Post-build step:
+BuildStepSettingsBlock.label.postbuildstep.cmd=Command:
+BuildStepSettingsBlock.label.postbuildstep.desc=Description:
+BuildStepsSettingsBlock.defaults.title=Reset Build Steps
+BuildStepsSettingsBlock.defaults.message=This action will reset the pre-build and post-build steps to their default settings.\n\nDo you want to proceed?
+
+# ----------- Environment Set Block -----------
+EnvironmentSetBlock.label.environment=Environment
+EnvironmentSetBlock.label.environment.group=Environment variables
+EnvironmentSetBlock.label.tab.configuration=Configuration
+EnvironmentSetBlock.label.tab.project=Project
+EnvironmentSetBlock.label.tab.workspace=Workspace
+EnvironmentSetBlock.label.tab.eclipse=Eclipse Environment
+
+# ----------- Environment Block -----------
+EnvironmentBlock.label.header.name=Name
+EnvironmentBlock.label.header.value=Value
+EnvironmentBlock.label.button.new=New
+EnvironmentBlock.label.button.edit=Edit
+EnvironmentBlock.label.button.delete=Delete
+EnvironmentBlock.label.button.undef=Undefine
+EnvironmentBlock.label.value.undef=<UNDEFINED>
+EnvironmentBlock.label.button.check.chow.parent=Show parent level variables
+EnvironmentBlock.label.user.var=User Variables
+EnvironmentBlock.label.system.var=System Variables
+EnvironmentBlock.label.delete.confirm.title=Variable deletion confirmation
+EnvironmentBlock.label.delete.confirm.message=Are you sure you want to delete the selected user variable(s)?
+EnvironmentBlock.label.delete.all.confirm.title=Variable deletion confirmation
+EnvironmentBlock.label.delete.all.confirm.message=Are you sure you want to delete all user variables?
+
+# ----------- New Env Var Dialog -----------
+NewEnvVarDialog.label.name=Name
+NewEnvVarDialog.label.value=Value
+NewEnvVarDialog.label.delimiter=Delimiter
+NewEnvVarDialog.label.operation=Operation
+NewEnvVarDialog.label.operation.replace=Replace
+NewEnvVarDialog.label.operation.prepend=Prepend
+NewEnvVarDialog.label.operation.append=Append
+NewEnvVarDialog.label.operation.remove=Remove
+NewEnvVarDialog.label.value.prepend=Prepended Value
+NewEnvVarDialog.label.value.append=Appended Value
+NewEnvVarDialog.label.value.undef=<UNDEFINED>
+NewEnvVarDialog.label.title.new=Define a new variable
+NewEnvVarDialog.label.title.edit=Edit existing variable
+NewEnvVarDialog.label.status.cannot.create=The "{0}" Variable can not be created by user
+
+# ----------- Macros Set Block -----------
+MacrosSetBlock.label.macros=Macros
+MacrosSetBlock.label.macros.group=Macros
+MacrosSetBlock.label.tab.configuration=Configuration
+MacrosSetBlock.label.tab.project=Project
+MacrosSetBlock.label.tab.workspace=Workspace
+
+# ----------- Macros Block -----------
+MacrosBlock.label.header.name=Name
+MacrosBlock.label.header.type=Type
+MacrosBlock.label.header.value=Value
+MacrosBlock.label.button.new=New
+MacrosBlock.label.button.edit=Edit
+MacrosBlock.label.button.delete=Delete
+MacrosBlock.label.button.check.chow.parent=Show parent context macros
+MacrosBlock.label.user.macros=User Macros
+MacrosBlock.label.system.macros=System Macros
+MacrosBlock.label.delete.confirm.title=Macro deletion confirmation
+MacrosBlock.label.delete.confirm.message=Are you sure you want to delete the selected user Macro(s)?
+MacrosBlock.label.delete.all.confirm.title=Macro deletion confirmation
+MacrosBlock.label.delete.all.confirm.message=Are you sure you want to delete all user macros?
+MacrosBlock.label.value.eclipse.dynamic=<ECLIPSE DYNAMIC VARIABLE>
+MacrosBlock.label.type.text=String
+MacrosBlock.label.type.text.list=StringList
+MacrosBlock.label.type.path.file=File
+MacrosBlock.label.type.path.dir=Dir
+MacrosBlock.label.type.path.file.list=FileList
+MacrosBlock.label.type.path.dir.list=DirList
+MacrosBlock.label.type.path.any=Path
+MacrosBlock.label.type.path.any.list=PathList
+
+
+# ----------- New Build Macro Dialog -----------
+NewBuildMacroDialog.label.name=Name
+NewBuildMacroDialog.label.value=Value
+NewBuildMacroDialog.label.type=Type
+NewBuildMacroDialog.label.type.text=String
+NewBuildMacroDialog.label.type.text.list=List of Strings
+NewBuildMacroDialog.label.type.path.file=File
+NewBuildMacroDialog.label.type.path.dir=Directory
+NewBuildMacroDialog.label.type.path.file.list=List of Files
+NewBuildMacroDialog.label.type.path.dir.list=List of Directories
+NewBuildMacroDialog.label.type.path.any=File or Directory
+NewBuildMacroDialog.label.type.path.any.list=List of Files or Directories
+NewBuildMacroDialog.label.browse=Browse
+NewBuildMacroDialog.label.title.new=Define a new macro
+NewBuildMacroDialog.label.title.edit=Edit existing macro
+NewBuildMacroDialog.label.list.title=Macro Value
+NewBuildMacroDialog.label.status.cannot.create=The "{0}" Macro can not be created by user
+
+# ------------Resource Configuration Selection Page
+ResourceBuildPropertyPage.label.ActiveResource=Active Resource configuration
+ResourceBuildPropertyPage.label.ResourceSettings=Resource Configuration settings
+ResourceBuildPropertyPage.label.Configuration=Configuration:
+ResourceBuildPropertyPage.label.ExcludeCheckBox= Exclude from build
+ResourceBuildPropertyPage.selection.configuration.all=All configurations
+ResourceBuildPropertyPage.label.ToolTree=Tools
+ResourceBuildPropertyPage.label.ToolOptions=Options
+ResourceBuildPropertyPage.label.NotMBSFile=The project is closed or the file is not contained within a Managed Make project.
+ResourceBuildPropertyPage.error.version_low=The Managed Make project settings for this project are not available.
+ResourceBuildPropertyPage.tip.excludecheck=Exclude the file from building in the selected configuration
+ResourceBuildPropertyPage.tip.config=Select the configuration to edit
+ResourceBuildPropertyPage.unsupported.proj=The project support is not installed on the system
+ResourceBuildPropertyPage.unsupported.config=The configuration support is not installed on the system
+ResourceBuildPropertyPage.config.notselected=No configurations selected
+ResourceBuildPropertyPage.rc.non.build=Managed Build settings for this resource are not available
+ResourceBuildPropertyPage.rc.generated=The selected resource is created by the buildfile generator
+
+# ----------- Resource Custom Build Step Block -----------
+ResourceCustomBuildStepBlock.label.settings=Custom Build Steps
+ResourceCustomBuildStepBlock.label.tool.group=Resource Custom Build Step
+ResourceCustomBuildStepBlock.label.applicability=Custom Build Step Applicability
+ResourceCustomBuildStepBlock.label.applicability.rule.before=Apply Custom Build Step Before Other Tools
+ResourceCustomBuildStepBlock.label.applicability.rule.after=Apply Custom Build Step After Other Tools
+ResourceCustomBuildStepBlock.label.applicability.rule.override=Apply Custom Build Step Overriding Other Tools
+ResourceCustomBuildStepBlock.label.applicability.rule.disable=Disable Custom Build Step
+ResourceCustomBuildStepBlock.label.input.filenames=Additional Input file name(s):
+ResourceCustomBuildStepBlock.label.output.filenames=Output file name(s):
+ResourceCustomBuildStepBlock.label.command.cmd=Command:
+ResourceCustomBuildStepBlock.label.description.desc=Description:
+ResourceCustomBuildStepBlock.tip.applicability=specifies how to apply the custom build step with respect to other resource configuration tools
+ResourceCustomBuildStepBlock.tip.inputs=a semicolon separated list of additional input files for this build step. Paths are interpreted as relative to the Project directory.
+ResourceCustomBuildStepBlock.tip.outputs=a semicolon separated list of the output files produced by this build step. Paths are interpreted as relative to the Build directory.
+ResourceCustomBuildStepBlock.tip.command=a semicolon separated list of commands or a single command to be executed by this build step. Paths are interpreted as relative to the Build directory.
+ResourceCustomBuildStepBlock.tip.announcement=a message to be output in the build log upon execution of this build step
+ResourceCustomBuildStepBlock.defaults.title=Reset Resource Custom Build Step
+ResourceCustomBuildStepBlock.defaults.message=This action will reset the resource custom build step to the default settings.\n\nDo you want to proceed?
+
+# ----------- Entry Dialog -----------
+BrowseEntryDialog.error.Folder_name_invalid = Folder name invalid
+BrowseEntryDialog.message.file = File:
+BrowseEntryDialog.message.directory = Directory:
+BrowseEntryDialog.file.title.add=Add file path
+BrowseEntryDialog.dir.title.add=Add directory path
+BrowseEntryDialog.file.title.edit=Edit file path
+BrowseEntryDialog.dir.title.edit=Edit directory path
+BrowseEntryDialog.wsp.dir.dlg.title=Folder selection
+BrowseEntryDialog.wsp.file.dlg.title=File selection
+BrowseEntryDialog.wsp.dir.dlg.msg=Select a folder from workspace:
+BrowseEntryDialog.wsp.file.dlg.msg=Select a file from workspace:
+BrowseEntryDialog.wsp.file.dlg.err=The selected element is not a file.
+BrowseEntryDialog.fs.dir.dlg.msg=Select a folder from file system:
+
+# ----------- New Configuration -----------
+NewConfiguration.label.name=Name:
+NewConfiguration.label.description=Description:
+NewConfiguration.label.group=Copy settings from
+NewConfiguration.label.copy=Default configuration:
+NewConfiguration.label.clone=Existing configuration:
+NewConfiguration.label.showall=Show unsupported configurations
+NewConfiguration.error.duplicateName=A configuration named "{0}" already exists.
+NewConfiguration.error.caseName=A configuration name that differs only in case to "{0}" exists.
+NewConfiguration.error.invalidName=The name "{0}" is invalid.
+
+# ----------- Rename Configuration -----------
+RenameConfiguration.label.name=Name:
+RenameConfiguration.label.description=Description:
+RenameConfiguration.error.duplicateName=A configuration named "{0}" already exists.
+RenameConfiguration.error.caseName=A configuration name that differs only in case to "{0}" exists.
+RenameConfiguration.error.invalidName=The name "{0}" is invalid.
+
+# ----------- Target/Config management dialog -----------------
+ManageConfig.label.configs=Manage configurations
+ManageConfig.label.rename=Rename
+ManageConfig.label.conversionTargetLabel=Tool chain conversion targets:
+ManageConfig.label.convertTarget=Convert
+ManageConfig.label.new.config.dialog=Create configuration
+ManageConfig.label.rename.config.dialog=Rename configuration
+ManageConfig.deletedialog.message=Are you sure you want to delete the "{0}" configuration?
+ManageConfig.deletedialog.title=Confirm Delete
+
+# Toolchain Conversion Target confirmation Dialog
+ConfigurationConvert.confirmdialog.message=Currently the "{0}" Configuration uses "{1}" tool-chain. After conversion it will use "{2}" tool-chain. Do you want to proceed?
+ConfigurationConvert.confirmdialog.title=Confirm Configuration Conversion
+
+# ----------- Build Property Common -----------
+BuildPropertyCommon.label.title=Enter Value
+BuildPropertyCommon.label.new=New...
+BuildPropertyCommon.label.remove=Remove
+BuildPropertyCommon.label.up=Up
+BuildPropertyCommon.label.down=Down
+BuildPropertyCommon.label.editVar=Edit...
+BuildPropertyCommon.label.addVar=Add
+BuildPropertyCommon.label.message=Value:
+BuildPropertyCommon.label.browse=Browse...
+BuildPropertyCommon.label.configs=Defined configurations:
+
+# ----------- Field Editors -----------
+Multiline.error.message=Please give correct input
+
+# ----------- Build Tool Settings -----------
+BuildToolSettingsPage.alloptions=All options:
+BuildToolSettingsPage.tool.command=Command:
+BuildToolSettingsPage.tool.commandLinePattern=Command\nline pattern:
+BuildToolSettingsPage.tool.advancedSettings=Expert settings:
+
+# ----------- File List Control -----------
+FileListControl.add=Add
+FileListControl.delete=Delete
+FileListControl.edit=Edit
+FileListControl.moveup=Move Up
+FileListControl.movedown=Move Down
+FileListControl.filedialog.title=Select File
+FileListControl.dirdialog.title=Select Include Directory
+FileListControl.dirdialog.desc=Select Include Paths
+FileListControl.deletedialog.message=Are you sure you want to delete the selected files or directories?
+FileListControl.deletedialog.title=Confirm Delete
+FileListControl.editdialog.title=Edit Dialog
+FileListControl.newdialog.title=New Dialog
+FileListControl.button.workspace=Workspace...
+FileListControl.button.fs=File system...
+
+# ----------- Property Page ----------
+MngMakeProjectPropertyPage.closedproject=Project Closed
+MngMakeProjectPropertyPage.internalError=An Internal error has occur please check error log.
+
+# Copies from org.eclipse.ui.workbench
+showAdvanced = &Advanced >>
+hideAdvanced = << &Advanced
+NewFolderDialog.folderNameEmpty = Folder name must be specified
+
+# Project Conversion Dialog messages
+ProjectConvert.confirmdialog.title=Confirm Project Conversion
+ProjectConvert.confirmdialog.message=The selected project {0} will be converted. Do you want to proceed ?
+
+ProjectConvert.conversionErrordialog.title=Project Conversion Error
+ProjectConvert.conversionErrordialog.message=Error has occured during the conversion of the project {0} .
+
+ProjectConvert.noConverterErrordialog.title=Project Conversion Error
+ProjectConvert.noConverterErrordialog.message=There are no converters available to convert the project {0} .
+
+ProjectConvert.title=Project Converters for {0}
+ProjectConvert.convertersList=Converters List
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/CProjectPlatformPage.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/CProjectPlatformPage.java
new file mode 100644
index 0000000000..323349d854
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/CProjectPlatformPage.java
@@ -0,0 +1,319 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2005 IBM Corporation 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:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.wizards;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.cdt.core.CProjectNature;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.core.IToolChain;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPageManager;
+import org.eclipse.cdt.ui.newui.CDTHelpContextIds;
+import org.eclipse.cdt.ui.wizards.NewCProjectWizard;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.CheckboxTableViewer;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ * Class that implements the project type and configuration selection page in the new
+ * project wizard for managed builder projects.
+ *
+ * @since 1.2
+ */
+public class CProjectPlatformPage extends WizardPage {
+ /*
+ * Dialog variables and string constants
+ */
+ private static final String PREFIX = "PlatformBlock"; //$NON-NLS-1$
+ private static final String LABEL = PREFIX + ".label"; //$NON-NLS-1$
+ private static final String TIP = PREFIX + ".tip"; //$NON-NLS-1$
+ private static final String CONFIG_LABEL = LABEL + ".configs"; //$NON-NLS-1$
+ private static final String TARGET_LABEL = LABEL + ".platform"; //$NON-NLS-1$
+ private static final String TARGET_TIP = TIP + ".platform"; //$NON-NLS-1$
+ private static final String FORCEDCONFIG_TIP = TIP + ".forcedconfigs"; //$NON-NLS-1$
+
+ // support for exporting data to custom wizard pages
+ public static final String PAGE_ID = "org.eclipse.cdt.managedbuilder.ui.wizard.platformPage"; //$NON-NLS-1$
+ public static final String PROJECT_TYPE = "projectType"; //$NON-NLS-1$
+ public static final String TOOLCHAIN = "toolchain"; //$NON-NLS-1$
+ public static final String NATURE = "nature"; //$NON-NLS-1$
+
+ protected Wizard parentWizard;
+ protected Text platformSelection;
+ private ArrayList<Object> selectedConfigurations;
+ protected IProjectType projectType;
+ protected Button showAllConfigs;
+ protected boolean showAllConfigsForced;
+ protected CheckboxTableViewer tableViewer;
+ protected IConfiguration configurations[];
+
+ /**
+ * Constructor.
+ * @param pageName
+ * @param wizard
+ */
+ public CProjectPlatformPage(String pageName, Wizard parentWizard) {
+ super(pageName);
+ setPageComplete(false);
+ projectType = ManagedBuildManager.getExtensionProjectType("org.eclipse.linuxtools.cdt.autotools.core.projectType"); //$NON-NLS-1$
+ selectedConfigurations = new ArrayList<Object>(0);
+ this.parentWizard = parentWizard;
+ showAllConfigsForced = false;
+ }
+
+ /**
+ * @see org.eclipse.jface.wizard.IWizardPage#canFlipToNextPage()
+ */
+ public boolean canFlipToNextPage() {
+ return validatePage();
+ }
+
+ private void createConfigSelectionGroup (Composite parent) {
+ // Create the group composite
+ Composite composite = new Composite(parent, SWT.NULL);
+ composite.setFont(parent.getFont());
+ composite.setLayout(new GridLayout());
+ composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ // Create a check box table of valid configurations
+ final Label configLabel = new Label(composite, SWT.LEFT);
+ configLabel.setFont(composite.getFont());
+ configLabel.setText(AutotoolsWizardMessages.getResourceString(CONFIG_LABEL));
+
+ Table table = new Table(composite, SWT.CHECK | SWT.BORDER | SWT.MULTI
+ | SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL);
+ table.setLayoutData(new GridData(GridData.FILL_BOTH));
+ table.setHeaderVisible(true);
+ table.setLinesVisible(false);
+
+ // Add a table layout to the table
+ TableLayout tableLayout = new TableLayout();
+ table.setHeaderVisible(false);
+ table.setLayout(tableLayout);
+
+ // Add the viewer
+ tableViewer = new CheckboxTableViewer(table);
+ tableViewer.setLabelProvider(new ConfigurationLabelProvider());
+ tableViewer.setContentProvider(new ConfigurationContentProvider());
+ tableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent e) {
+ // will default to false until a selection is made
+ handleConfigurationSelectionChange();
+ }
+ });
+
+ }
+
+ /**
+ * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createControl(Composite parent) {
+ // Create the composite control for the tab
+ Composite composite = new Composite(parent, SWT.NULL);
+ composite.setFont(parent.getFont());
+ composite.setLayout(new GridLayout());
+ composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ // Setup the help information
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, CDTHelpContextIds.MAN_PROJ_PLATFORM_HELP);
+
+ // Create the widgets
+ createTypeSelectGroup(composite);
+ createConfigSelectionGroup(composite);
+
+ // Publish which project type has been chosen with the custom wizard page manager
+ MBSCustomPageManager.addPageProperty(PAGE_ID, PROJECT_TYPE, projectType.getId());
+
+ // Select configuration
+ populateConfigurations();
+ setPageComplete(validatePage());
+
+ // Do the nasty
+ setErrorMessage(null);
+ setMessage(null);
+ setControl(composite);
+ }
+
+
+ private void createTypeSelectGroup(Composite parent) {
+ // Create the group composite
+ Composite composite = new Composite(parent, SWT.NULL);
+ composite.setFont(parent.getFont());
+ composite.setLayout(new GridLayout(2, false));
+ composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ // Create the platform selection label and combo widgets
+ final Label platformLabel = new Label(composite, SWT.LEFT);
+ platformLabel.setFont(composite.getFont());
+ platformLabel.setText(AutotoolsWizardMessages.getResourceString(TARGET_LABEL));
+
+ platformSelection = new Text(composite, SWT.READ_ONLY);
+// platformSelection = new Combo(composite, SWT.READ_ONLY | SWT.BORDER);
+ platformSelection.setFont(composite.getFont());
+ platformSelection.setToolTipText(AutotoolsWizardMessages.getResourceString(TARGET_TIP));
+ platformSelection.setText("GNU Autotools"); //$NON-NLS-1$
+ platformSelection.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent e) {
+ platformSelection = null;
+ }
+ });
+
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ // Make this the same as NewCProjectWizardPage.SIZING_TEXT_FIELD_WIDTH
+ gd.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH + 50;
+ platformSelection.setLayoutData(gd);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.ui.dialogs.ICOptionContainer#getProject()
+ */
+ public IProject getProject() {
+ return ((NewCProjectWizard)getWizard()).getNewProject();
+ }
+
+ /**
+ * @return
+ */
+ public IConfiguration[] getSelectedConfigurations() {
+ return (IConfiguration[]) selectedConfigurations.toArray(new IConfiguration[selectedConfigurations.size()]);
+ }
+
+ /**
+ * Returns the selected project type.
+ *
+ * @return IProjectType Selected type or <code>null</code> if an invalid selection
+ * has been made.
+ */
+ public IProjectType getProjectType() {
+ return projectType;
+ }
+
+ private void handleConfigurationSelectionChange() {
+ // Get the selections from the table viewer
+ selectedConfigurations.clear();
+ selectedConfigurations.addAll(Arrays.asList(tableViewer.getCheckedElements()));
+
+ // support for publishing the toolchains for the selected configs so that custom wizard
+ // pages will know which toolchains have been selected
+
+ // get the toolchains from the selected configs and put them into a set
+ Set<IToolChain> toolchainSet = new LinkedHashSet<IToolChain>();
+ for(int k = 0; k < selectedConfigurations.size(); k++)
+ {
+ IConfiguration config = (IConfiguration) selectedConfigurations.get(k);
+ IToolChain toolchain = config.getToolChain();
+ toolchainSet.add(toolchain);
+ }
+
+ // publish the set of selected toolchains with the custom page manager
+ MBSCustomPageManager.addPageProperty(PAGE_ID, TOOLCHAIN, toolchainSet);
+
+ // TODO: Don't know where this goes and how to find true nature
+ MBSCustomPageManager.addPageProperty(CProjectPlatformPage.PAGE_ID, CProjectPlatformPage.NATURE, CProjectNature.C_NATURE_ID);
+
+ setPageComplete(validatePage());
+ }
+
+ /**
+ * Populate the table viewer with either all known configurations
+ * or only with the supported configurations depending on whether a user
+ * has chosen to display unsupported configurations or not
+ * By default, only supported configurations are selected.
+ */
+ private void populateConfigurations() {
+ if (projectType == null)
+ return;
+ IConfiguration selected[] = null;
+
+ configurations = filterSupportedConfigurations(projectType.getConfigurations());
+ selected = configurations;
+
+ // Check for buildable configs on this platform
+ if (selected.length == 0) {
+ // Indicate that there are no buildable configurations on this platform for this project
+ // type and that all configurations will be selected
+ setMessage(AutotoolsWizardMessages.getResourceString(FORCEDCONFIG_TIP), WARNING);
+ }
+ else {
+ setMessage(null, NONE);
+ }
+
+ tableViewer.setInput(configurations);
+ tableViewer.setCheckedElements(selected);
+ handleConfigurationSelectionChange();
+ }
+
+ /**
+ * Returns the array of supported configurations found in the configurations
+ * passed to this method
+ */
+ IConfiguration[] filterSupportedConfigurations(IConfiguration cfgs[]){
+ ArrayList<IConfiguration> supported = new ArrayList<IConfiguration>();
+ String os = Platform.getOS();
+ String arch = Platform.getOSArch();
+
+ for (int i = 0; i < cfgs.length; i++) {
+ // First, filter on supported state
+ if (cfgs[i].isSupported()) {
+ // Now, apply the OS and ARCH filters to determine if the configuration should be shown
+ // Determine if the configuration's tool-chain supports this OS & Architecture.
+ IToolChain tc = cfgs[i].getToolChain();
+ List<String> osList = Arrays.asList(tc.getOSList());
+ if (osList.contains("all") || osList.contains(os)) { //$NON-NLS-1$
+ List<String> archList = Arrays.asList(tc.getArchList());
+ if (archList.contains("all") || archList.contains(arch)) { //$NON-NLS-1$
+ supported.add(cfgs[i]);
+ }
+ }
+ }
+ }
+ return (IConfiguration[])supported.toArray(new IConfiguration[supported.size()]);
+ }
+
+
+ /**
+ * @return
+ */
+ private boolean validatePage() {
+ // TODO some validation ... maybe
+ if ((tableViewer.getCheckedElements()).length > 0) {
+ setErrorMessage(null);
+ return true;
+ } else {
+ setErrorMessage(AutotoolsWizardMessages.getResourceString("PlatformBlock.message.error.noconfigs")); //$NON-NLS-1$
+ return false;
+ }
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConfigurationContentProvider.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConfigurationContentProvider.java
new file mode 100644
index 0000000000..7fc4b20343
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConfigurationContentProvider.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2005, 2007 IBM Corporation 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:
+ * IBM Rational Software - Initial API and implementation
+ * Red Hat Inc. - Copy from CDT 3.1.2 to here
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.wizards;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+public class ConfigurationContentProvider implements IStructuredContentProvider {
+ // The contents of the parent of the table is a list of configurations
+ public Object[] getElements(Object parent) {
+ // The content is an array of configurations
+ Object array[] = (Object[])parent;
+ return (array == null || array.length == 0) ? new Object[0] : array;
+ }
+
+ public void dispose() {
+ }
+
+ public void inputChanged(
+ Viewer viewer,
+ Object oldInput,
+ Object newInput) {
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConfigurationLabelProvider.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConfigurationLabelProvider.java
new file mode 100644
index 0000000000..3d7f3de0c2
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConfigurationLabelProvider.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2005, 2007 Rational Software Corporation 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:
+ * IBM Rational Software - Initial API and implementation
+ * Red Hat Inc. - Copy from CDT 3.1.2 to here
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.wizards;
+
+
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.AutotoolsUIPluginImages;
+import org.eclipse.swt.graphics.Image;
+
+
+public class ConfigurationLabelProvider extends LabelProvider implements ITableLabelProvider {
+ private final Image IMG_CFG =
+ AutotoolsUIPluginImages.get(AutotoolsUIPluginImages.IMG_BUILD_CONFIG);
+
+ //
+ public String getColumnText(Object obj, int index) {
+ if (obj instanceof IConfiguration) {
+ IConfiguration tmpConfig = (IConfiguration) obj;
+
+ if( (tmpConfig.getDescription() == null)|| (tmpConfig.getDescription().equals("")) ) //$NON-NLS-1$
+ return ((IConfiguration) obj).getName();
+ else
+ return ( tmpConfig.getName() + " ( " + tmpConfig.getDescription() + " )"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ return new String();
+ }
+
+ public Image getColumnImage(Object obj, int index) {
+ return IMG_CFG;
+ }
+}
+
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConvertToAutotoolsProjectWizard.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConvertToAutotoolsProjectWizard.java
new file mode 100644
index 0000000000..a21c768d54
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConvertToAutotoolsProjectWizard.java
@@ -0,0 +1,219 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004, 2009 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.wizards;
+
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPageManager;
+import org.eclipse.cdt.ui.wizards.NewCProjectWizardPage;
+import org.eclipse.cdt.ui.wizards.conversion.ConversionWizard;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+
+
+/**
+ * This wizard provides a method by which the user can
+ * add a C nature to a project that previously had no nature associated with it.
+ */
+public class ConvertToAutotoolsProjectWizard extends ConversionWizard {
+
+ private static final String WZ_TITLE = "WizardAutotoolsProjectConversion.title"; //$NON-NLS-1$
+ private static final String WZ_DESC = "WizardAutotoolsProjectConversion.description"; //$NON-NLS-1$
+ private static final String PREFIX = "WizardAutotoolsConversion"; //$NON-NLS-1$
+ private static final String WINDOW_TITLE = "WizardAutotoolsConversion.windowTitle"; //$NON-NLS-1$
+ protected static final String CONF_TITLE = PREFIX + ".config.title"; //$NON-NLS-1$
+ protected static final String CONF_DESC = PREFIX + ".config.desc"; //$NON-NLS-1$
+ protected static final String MSG_SAVE = PREFIX + ".message.save"; //$NON-NLS-1$
+ protected static final String OPTIONS_TITLE = PREFIX + ".options.title"; //$NON-NLS-1$
+ protected static final String OPTIONS_DESC = PREFIX + ".options.desc"; //$NON-NLS-1$
+
+ public static final String NULL_INDEXER_ID = "org.eclipse.cdt.core.nullindexer"; //$NON-NLS-1$
+
+ protected CProjectPlatformPage projectConfigurationPage;
+ protected NewAutotoolsProjectOptionPage optionPage;
+
+ protected IProject curProject;
+
+ /**
+ * ConvertToAutotoolsConversionWizard Wizard constructor
+ */
+ public ConvertToAutotoolsProjectWizard() {
+ this(getWindowTitleResource(), getWzDescriptionResource());
+ }
+ /**
+ * ConvertToAutotoolsConversionWizard Wizard constructor
+ *
+ * @param title
+ * @param desc
+ */
+ public ConvertToAutotoolsProjectWizard(String title, String desc) {
+ super(title, desc);
+ }
+
+ /**
+ * Method getWzDescriptionResource, allows Wizard description label value
+ * to be changed by subclasses
+ *
+ * @return String
+ */
+ protected static String getWzDescriptionResource() {
+ return AutotoolsUIPlugin.getResourceString(WZ_DESC);
+ }
+
+ /**
+ * Method getWzTitleResource, allows Wizard description label value
+ * to be changed by subclasses
+ *
+ * @return String
+ */
+ protected static String getWzTitleResource() {
+ return AutotoolsUIPlugin.getResourceString(WZ_TITLE);
+ }
+
+ /**
+ * Method getWindowTitleResource, allows Wizard Title label value to be
+ * changed by subclasses
+ *
+ * @return String
+ */
+ protected static String getWindowTitleResource() {
+ return AutotoolsUIPlugin.getResourceString(WINDOW_TITLE);
+ }
+
+ /**
+ * Method getPrefix, allows prefix value to be changed by subclasses
+ *
+ * @return String
+ */
+ protected static String getPrefix() {
+ return PREFIX;
+ }
+
+ /**
+ * Method addPages adds our Simple to C conversion Wizard page.
+ *
+ * @see Wizard#createPages
+ */
+ public void addPages() {
+ addPage(mainPage = new ConvertToAutotoolsProjectWizardPage(getPrefix(), this));
+
+ // Add the configuration selection page
+ projectConfigurationPage = new CProjectPlatformPage(PREFIX, this);
+ projectConfigurationPage.setTitle(AutotoolsUIPlugin.getResourceString(CONF_TITLE));
+ projectConfigurationPage.setDescription(AutotoolsUIPlugin.getResourceString(CONF_DESC));
+ addPage(projectConfigurationPage);
+
+ // Add the options (tabbed) page
+ optionPage = new NewAutotoolsProjectOptionPage(PREFIX, this);
+ optionPage.setTitle(AutotoolsUIPlugin.getResourceString(OPTIONS_TITLE));
+ optionPage.setDescription(AutotoolsUIPlugin.getResourceString(OPTIONS_DESC));
+ addPage(optionPage);
+
+ // add custom pages
+ MBSCustomPageManager.init();
+
+ // add stock pages
+ MBSCustomPageManager.addStockPage(fMainPage, NewCProjectWizardPage.PAGE_ID);
+ MBSCustomPageManager.addStockPage(projectConfigurationPage, CProjectPlatformPage.PAGE_ID);
+ MBSCustomPageManager.addStockPage(optionPage, NewAutotoolsProjectOptionPage.PAGE_ID);
+ }
+
+ public String getProjectID() {
+ return ManagedBuilderCorePlugin.MANAGED_MAKE_PROJECT_ID;
+ }
+
+ public IProjectType getProjectType() {
+ return projectConfigurationPage.getProjectType();
+ }
+
+ public IConfiguration[] getSelectedConfigurations() {
+ return projectConfigurationPage.getSelectedConfigurations();
+ }
+
+ protected void setCurrentProject (IProject project) {
+ curProject = project;
+ }
+
+ public IProject getProject() {
+ return curProject;
+ }
+
+ @SuppressWarnings("deprecation")
+ public void applyOptions(IProject project, IProgressMonitor monitor) {
+ // When applying the project options, we need to specify which
+ // project because the conversion wizard allows us to convert
+ // more than one project at once. We accomplish this by setting
+ // the current project we are working on. The optionPage when
+ // applying options will ask the wizard (us) to get the project which
+ // we will report is the current project being converted.
+ setCurrentProject(project);
+ optionPage.performApply(monitor);
+ }
+
+ protected void doRun(IProgressMonitor monitor) throws CoreException {
+ monitor.beginTask(AutotoolsUIPlugin.getResourceString("WizardAutotoolsProjectConversion.monitor.convertingToMakeProject"), 2); //$NON-NLS-1$
+ try {
+ super.doRun(new SubProgressMonitor(monitor, 5));
+ } finally {
+ monitor.done();
+ }
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.ui.wizards.NewCProjectWizard#doRunPrologue(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected void doRunPrologue(IProgressMonitor monitor) {
+ // Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.ui.wizards.NewCProjectWizard#doRunEpilogue(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected void doRunEpilogue(IProgressMonitor monitor) {
+ // Get my initializer to run
+// if (project == null)
+// return;
+//
+// IStatus initResult = ManagedBuildManager.initBuildInfoContainer(project);
+// if (initResult.getCode() != IStatus.OK) {
+// // At this point, I can live with a failure
+// ManagedBuilderUIPlugin.log(initResult);
+// }
+
+ // execute any operations specified by custom pages
+ IRunnableWithProgress operations[] = MBSCustomPageManager.getOperations();
+
+ if (operations != null)
+ {
+ for(int k = 0; k < operations.length; k++)
+ {
+ try {
+ operations[k].run(monitor);
+ } catch(InvocationTargetException e) {
+ //TODO: what should we do?
+ } catch(InterruptedException e) {
+ //TODO: what should we do?
+ }
+ }
+ }
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConvertToAutotoolsProjectWizardPage.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConvertToAutotoolsProjectWizardPage.java
new file mode 100644
index 0000000000..ab1c3e489c
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ConvertToAutotoolsProjectWizardPage.java
@@ -0,0 +1,224 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004, 2009 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.wizards;
+
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.managedbuilder.core.BuildException;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IManagedProject;
+import org.eclipse.cdt.managedbuilder.core.IProjectType;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
+import org.eclipse.cdt.ui.wizards.conversion.ConvertProjectWizardPage;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.linuxtools.cdt.autotools.core.AutotoolsNewProjectNature;
+import org.eclipse.linuxtools.cdt.autotools.ui.AutotoolsUIPlugin;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.AutotoolsPropertyConstants;
+import org.eclipse.linuxtools.internal.cdt.autotools.core.configure.AutotoolsConfigurationManager;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
+
+
+/**
+ *
+ * ConvertToAutotoolsProjectWizardPage
+ * Standard main page for a wizard that adds a Managed Make C project Nature to a project with no nature associated with it.
+ * This conversion is one way in that the project cannot be converted back (i.e have the nature removed).
+ *
+ * @author Jeff Johnston
+ * @since Feb 8, 2006
+ *<p>
+ * Example useage:
+ * <pre>
+ * mainPage = new ConvertToAutotoolsProjectWizardPage("ConvertProjectPage");
+ * mainPage.setTitle("Project Conversion");
+ * mainPage.setDescription("Add C or C++ Managed Make Nature to a project.");
+ * </pre>
+ * </p>
+ */
+public class ConvertToAutotoolsProjectWizardPage extends ConvertProjectWizardPage {
+
+ private static final String WZ_TITLE = "WizardAutotoolsProjectConversion.title"; //$NON-NLS-1$
+ private static final String WZ_DESC = "WizardAutotoolsProjectConversion.description"; //$NON-NLS-1$
+ private static final String PREFIX = "WizardAutotoolsProjectConversion";
+ protected static final String MSG_ADD_NATURE = PREFIX + ".message.add_nature"; //$NON-NLS-1$
+ protected static final String MSG_ADD_BUILDER = PREFIX + ".message.add_builder"; //$NON-NLS-1$
+ protected static final String MSG_SAVE = PREFIX + ".message.save"; //$NON-NLS-1$
+
+ /**
+ * Constructor for ConvertToStdMakeProjectWizardPage.
+ * @param pageName
+ */
+ public ConvertToAutotoolsProjectWizardPage(String pageName, ConvertToAutotoolsProjectWizard wizard) {
+ super(pageName);
+ setWizard(wizard);
+ }
+
+ /**
+ * Method getWzTitleResource returns the correct Title Label for this class
+ * overriding the default in the superclass.
+ */
+ protected String getWzTitleResource(){
+ return AutotoolsUIPlugin.getResourceString(WZ_TITLE);
+ }
+
+ /**
+ * Method getWzDescriptionResource returns the correct description
+ * Label for this class overriding the default in the superclass.
+ */
+ protected String getWzDescriptionResource(){
+ return AutotoolsUIPlugin.getResourceString(WZ_DESC);
+ }
+
+ /**
+ * Method isCandidate returns true for all projects.
+ *
+ * @param project
+ * @return boolean
+ */
+ public boolean isCandidate(IProject project) {
+ return true; // all
+ }
+
+ protected IProjectType getProjectType() {
+ return ((ConvertToAutotoolsProjectWizard)getWizard()).getProjectType();
+ }
+
+ protected IConfiguration[] getSelectedConfigurations() {
+ return ((ConvertToAutotoolsProjectWizard)getWizard()).getSelectedConfigurations();
+ }
+
+ protected void applyOptions(IProject project, IProgressMonitor monitor) {
+ ((ConvertToAutotoolsProjectWizard)getWizard()).applyOptions(project, monitor);
+ }
+
+ public void convertProject(IProject project, IProgressMonitor monitor, String projectID) throws CoreException {
+ monitor.beginTask(AutotoolsUIPlugin.getResourceString("WizardMakeProjectConversion.monitor.convertingToMakeProject"), 7); //$NON-NLS-1$
+ IConfiguration defaultCfg = null;
+ try {
+ super.convertProject(project, new SubProgressMonitor(monitor, 1), projectID);
+ monitor.subTask(AutotoolsUIPlugin.getResourceString(MSG_ADD_NATURE));
+ ManagedCProjectNature.addManagedNature(project, new SubProgressMonitor(monitor, 1));
+ AutotoolsNewProjectNature.addAutotoolsNature(project, new SubProgressMonitor(monitor, 1));
+ // We need to remove any old Autotools nature, if one exists.
+ AutotoolsNewProjectNature.removeOldAutotoolsNature(project, new SubProgressMonitor(monitor, 1));
+ monitor.subTask(AutotoolsUIPlugin.getResourceString(MSG_ADD_BUILDER));
+// ManagedCProjectNature.addManagedBuilder(project, new SubProgressMonitor(monitor, 1));
+ AutotoolsNewProjectNature.addAutotoolsBuilder(project, new SubProgressMonitor(monitor,1));
+ // FIXME: Default scanner property: make -w - eventually we want to use Make core's build scanner
+ project.setPersistentProperty(AutotoolsPropertyConstants.SCANNER_USE_MAKE_W, AutotoolsPropertyConstants.TRUE);
+ CCorePlugin.getDefault().mapCProjectOwner(project, projectID, true);
+ // Add the ManagedProject to the project
+ IManagedProject newManagedProject = null;
+ IManagedBuildInfo info = null;
+ try {
+ info = ManagedBuildManager.createBuildInfo(project);
+ IProjectType parent = getProjectType();
+ newManagedProject = ManagedBuildManager.createManagedProject(project, parent);
+ if (newManagedProject != null) {
+ IConfiguration [] selectedConfigs = getSelectedConfigurations();
+ for (int i = 0; i < selectedConfigs.length; i++) {
+ IConfiguration config = selectedConfigs[i];
+ int id = ManagedBuildManager.getRandomNumber();
+ IConfiguration newConfig = newManagedProject.createConfiguration(config, config.getId() + "." + id); //$NON-NLS-1$
+ newConfig.setArtifactName(newManagedProject.getDefaultArtifactName());
+ }
+ // Now add the first supported config in the list as the default
+ IConfiguration[] newConfigs = newManagedProject.getConfigurations();
+ for(int i = 0; i < newConfigs.length; i++) {
+ if(newConfigs[i].isSupported()){
+ defaultCfg = newConfigs[i];
+ break;
+ }
+ }
+
+ if(defaultCfg == null && newConfigs.length > 0)
+ defaultCfg = newConfigs[0];
+
+
+ if(defaultCfg != null) {
+ ManagedBuildManager.setDefaultConfiguration(project, defaultCfg);
+ ManagedBuildManager.setSelectedConfiguration(project, defaultCfg);
+ }
+ ManagedBuildManager.setNewProjectVersion(project);
+ }
+ } catch (BuildException e) {
+ AutotoolsUIPlugin.log(e);
+ }
+
+ // Following is a bit of a hack because changing the project options
+ // causes a change event to be fired which will try to reindex the project.
+ // We are in the middle of setting the project indexer which may end up
+ // being the null indexer. In that case, we don't want the default indexer
+ // (Fast Indexer) to be invoked.
+ //IIndexManager manager = CCorePlugin.getIndexManager();
+ //ICProject cproject = CoreModel.getDefault().create(project);
+ //manager.setIndexerId(cproject, ConvertToAutotoolsProjectWizard.NULL_INDEXER_ID);
+
+ // Modify the project settings
+ if (project != null) {
+ applyOptions(project, new SubProgressMonitor(monitor, 2));
+ }
+
+// Set the ScannerInfoProvider. We must do this after
+// applying the options because changing the ScannerInfoProvider
+// is considered a change to the project and a reindex will
+// occur. One of the options being applied above is the indexer
+// selected by the user. Thus, we wait until now.
+// try {
+// AutotoolsUIPlugin.setScannerInfoProvider(project);
+// } catch (CoreException e) {
+// ManagedBuilderUIPlugin.log(e);
+// }
+
+ // Save the build options
+ monitor.subTask(AutotoolsUIPlugin.getResourceString(MSG_SAVE));
+ if (info != null) {
+ info.setValid(true);
+ ManagedBuildManager.saveBuildInfo(project, true);
+ }
+ } finally {
+ // Create a default Autotools configuration and save it.
+ // We must do this after the ManagedBuildManager does a save because
+ // we might not yet have a Configuration Description set up for the
+ // default configuration and we need the id to create our own form
+ // of configuration.
+ ICConfigurationDescription cfgd = ManagedBuildManager.getDescriptionForConfiguration(defaultCfg);
+ String id = cfgd.getId();
+ AutotoolsConfigurationManager.getInstance().getConfiguration(project, id, true);
+ AutotoolsConfigurationManager.getInstance().saveConfigs(project);
+ IStatus initResult = ManagedBuildManager.initBuildInfoContainer(project);
+ if (initResult.getCode() != IStatus.OK) {
+ // At this point, I can live with a failure
+ AutotoolsUIPlugin.log(initResult);
+ }
+ monitor.done();
+ }
+ }
+
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ IStructuredSelection sel = ((BasicNewResourceWizard)getWizard()).getSelection();
+ if ( sel != null) {
+ tableViewer.setCheckedElements(sel.toArray());
+ setPageComplete(validatePage());
+ }
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ManagedProjectOptionBlock.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ManagedProjectOptionBlock.java
new file mode 100644
index 0000000000..f2f4048d58
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ManagedProjectOptionBlock.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2005, 2007 IBM Corporation 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:
+ * IBM Rational Software - Initial API and implementation
+ * Red Hat - Copy from CDT 3.1.2
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.wizards;
+
+import org.eclipse.cdt.ui.dialogs.BinaryParserBlock;
+import org.eclipse.cdt.ui.dialogs.ICOptionContainer;
+import org.eclipse.cdt.ui.dialogs.TabFolderOptionBlock;
+import org.eclipse.cdt.ui.newui.CDTHelpContextIds;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.ErrorParserBlock;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.PlatformUI;
+
+
+@SuppressWarnings("deprecation")
+public class ManagedProjectOptionBlock extends TabFolderOptionBlock {
+
+ private ErrorParserBlock errParserBlock;
+ private BinaryParserBlock binaryParserBlock;
+
+ /**
+ * @param parent
+ */
+ public ManagedProjectOptionBlock(ICOptionContainer parent) {
+ super(parent, false);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.ui.dialogs.TabFolderOptionBlock#addTabs()
+ */
+ protected void addTabs() {
+ errParserBlock = new ErrorParserBlock(null);
+ addTab(errParserBlock);
+ addTab(binaryParserBlock = new BinaryParserBlock());
+ }
+
+ public BinaryParserBlock getBinaryParserBlock() {
+ return binaryParserBlock;
+ }
+
+ public ErrorParserBlock getErrorParserBlock() {
+ return errParserBlock;
+ }
+
+ public Control createContents(Composite parent) {
+ Control control = super.createContents( parent );
+ ((GridLayout)((Composite)control).getLayout()).marginWidth = 1;
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ ((Composite)control).setLayoutData(gd);
+
+ if (getErrorParserBlock()!= null)
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(getErrorParserBlock().getControl(), CDTHelpContextIds.MAN_PROJ_ERROR_PARSER);
+
+ return control;
+ }
+
+ public void updateValues() {
+ if (getErrorParserBlock()!= null) {
+ getErrorParserBlock().updateValues();
+ }
+ if (getBinaryParserBlock()!= null) {
+ // TODO
+ //getBinaryParserBlock().updateValues();
+ }
+ }
+
+ public void update() {
+ super.update();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/NewAutotoolsProjectOptionPage.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/NewAutotoolsProjectOptionPage.java
new file mode 100644
index 0000000000..9b671057bd
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/NewAutotoolsProjectOptionPage.java
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2005 IBM Corporation 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:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.wizards;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.cdt.managedbuilder.ui.properties.ManagedBuilderUIPlugin;
+import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPageManager;
+import org.eclipse.cdt.ui.dialogs.ICOptionPage;
+import org.eclipse.cdt.ui.dialogs.IndexerBlock;
+import org.eclipse.cdt.ui.dialogs.TabFolderOptionBlock;
+import org.eclipse.cdt.ui.newui.CDTHelpContextIds;
+import org.eclipse.cdt.ui.wizards.NewCProjectWizard;
+import org.eclipse.cdt.ui.wizards.NewCProjectWizardOptionPage;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Preferences;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.ErrorParserBlock;
+import org.eclipse.ui.PlatformUI;
+
+
+@SuppressWarnings("deprecation")
+public class NewAutotoolsProjectOptionPage extends NewCProjectWizardOptionPage {
+
+ public static final String PAGE_ID = "org.eclipse.cdt.managedbuilder.ui.wizard.projectOptionsPage"; //$NON-NLS-1$
+
+ public class ManagedWizardOptionBlock extends ManagedProjectOptionBlock {
+
+ NewAutotoolsProjectOptionPage parent;
+ ErrorParserBlock errorParsers;
+ IndexerBlock indexBlock;
+
+
+ public ManagedWizardOptionBlock(NewAutotoolsProjectOptionPage parentPage) {
+ super(parentPage);
+ parent = parentPage;
+ }
+
+ public class AutotoolsReferenceBlock extends ReferenceBlock {
+ AutotoolsReferenceBlock() {
+ super();
+ }
+
+ public void performApply(IProgressMonitor monitor) throws CoreException {
+ try {
+ super.performApply(monitor);
+ } catch (RuntimeException e) {
+ // TODO: Fix ReferenceBlock not to generate NullPointerException
+ // when no projects are referenced
+ }
+ }
+ }
+ public void updateProjectTypeProperties() {
+ // Update the error parser list
+ if (errorParsers != null) {
+ errorParsers.updateValues();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.ui.dialogs.TabFolderOptionBlock#addTabs()
+ */
+ protected void addTabs() {
+ addTab(new AutotoolsReferenceBlock());
+ // NOTE: The setting of error parsers is commented out here
+ // because they need to be set per-configuration.
+ // The other tabs on this page are per-project.
+ // Error parsers can be selected per configuration in the
+ // project properties
+ //errorParsers = new ErrorParserBlock();
+ //addTab(errorParsers);
+ addTab(indexBlock = new IndexerBlock());
+ }
+
+ public void setupHelpContextIds(){
+ List<ICOptionPage> pages = getOptionPages();
+
+ Iterator<ICOptionPage> iter = pages.iterator();
+ for( int i = 0; i < 3 && iter.hasNext(); i++ ) {
+ ICOptionPage page = (ICOptionPage) iter.next();
+
+ String id = null;
+ if (page instanceof ReferenceBlock) {
+ id = CDTHelpContextIds.MAN_PROJ_WIZ_PROJECTS_TAB;
+ } else if (page instanceof ErrorParserBlock) {
+ id = CDTHelpContextIds.MAN_PROJ_WIZ_ERRORPARSERS_TAB;
+ } else if (page instanceof IndexerBlock) {
+ id = CDTHelpContextIds.MAN_PROJ_WIZ_INDEXER_TAB;
+ }
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(page.getControl(), id);
+ }
+ }
+ }
+
+ protected ManagedWizardOptionBlock optionBlock;
+ protected NewCProjectWizard parentWizard;
+
+ /**
+ * @param pageName
+ */
+ public NewAutotoolsProjectOptionPage(String pageName, NewCProjectWizard parentWizard) {
+ super(pageName);
+ this.parentWizard = parentWizard;
+ optionBlock = new ManagedWizardOptionBlock(this);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.ui.wizards.NewCProjectWizardOptionPage#createOptionBlock()
+ */
+ protected TabFolderOptionBlock createOptionBlock() {
+ return optionBlock;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.ui.dialogs.ICOptionContainer#getProject()
+ */
+ public IProject getProject() {
+ if (getWizard() instanceof ConvertToAutotoolsProjectWizard)
+ return ((ConvertToAutotoolsProjectWizard)getWizard()).getProject();
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.ui.dialogs.ICOptionContainer#getPreferenceStore()
+ */
+ public Preferences getPreferences() {
+ return ManagedBuilderUIPlugin.getDefault().getPluginPreferences();
+ }
+
+ public void updateProjectTypeProperties() {
+ // Update the error parser list
+ optionBlock.updateProjectTypeProperties();
+ }
+
+ public void setupHelpContextIds(){
+ optionBlock.setupHelpContextIds();
+ }
+
+ public IWizardPage getNextPage()
+ {
+ return MBSCustomPageManager.getNextPage(PAGE_ID); // get first custom page, if any
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ReferenceBlock.java b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ReferenceBlock.java
new file mode 100644
index 0000000000..3018802b1b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/wizards/ReferenceBlock.java
@@ -0,0 +1,191 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2010 IBM Corporation 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.wizards;
+
+import java.util.ArrayList;
+
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.cdt.ui.dialogs.AbstractCOptionPage;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.jface.viewers.CheckboxTableViewer;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.model.WorkbenchContentProvider;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+
+/**
+ * @deprecated as of CDT 4.0. This Block was used for New Project Wizard
+ * for 3.X style projects.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+@Deprecated
+public class ReferenceBlock extends AbstractCOptionPage {
+
+ private static final String PREFIX = "ReferenceBlock"; // $NON-NLS-1$ //$NON-NLS-1$
+ private static final String LABEL = PREFIX + ".label"; // $NON-NLS-1$ //$NON-NLS-1$
+ private static final String DESC = PREFIX + ".desc"; // $NON-NLS-1$ //$NON-NLS-1$
+
+ private CheckboxTableViewer referenceProjectsViewer;
+
+ private static final int PROJECT_LIST_MULTIPLIER = 10;
+
+ public ReferenceBlock() {
+ super(CUIPlugin.getResourceString(LABEL));
+ setDescription(CUIPlugin.getResourceString(DESC));
+ }
+
+ @Override
+ public Image getImage() {
+ return PlatformUI.getWorkbench().getSharedImages().getImage(IDE.SharedImages.IMG_OBJ_PROJECT);
+ }
+
+ /**
+ * Returns a content provider for the reference project
+ * viewer. It will return all projects in the workspace.
+ *
+ * @return the content provider
+ */
+ protected IStructuredContentProvider getContentProvider() {
+ return new WorkbenchContentProvider() {
+ @Override
+ public Object[] getChildren(Object element) {
+ if (!(element instanceof IWorkspace))
+ return new Object[0];
+ ArrayList<IProject> aList = new ArrayList<IProject>(15);
+ final IProject[] projects = ((IWorkspace)element).getRoot().getProjects();
+ for (int i = 0; i < projects.length; i++) {
+ if (CoreModel.hasCNature(projects[i])) {
+ // Do not show the actual project being look at
+ if ((getContainer().getProject() != null) && getContainer().getProject().equals(projects[i])) {
+ continue;
+ }
+ aList.add(projects[i]);
+ }
+ }
+ return aList.toArray();
+ }
+ };
+ }
+
+ protected void initializeValues () {
+ if (getContainer().getProject() != null) {
+ try {
+ IProject[] referenced = getContainer().getProject().getReferencedProjects();
+ referenceProjectsViewer.setCheckedElements(referenced);
+ } catch (CoreException e) {
+ }
+ }
+ }
+
+ /**
+ * Returns the referenced projects selected by the user.
+ *
+ * @return the referenced projects
+ */
+ public IProject[] getReferencedProjects() {
+ Object[] elements = referenceProjectsViewer.getCheckedElements();
+ IProject[] projects = new IProject[elements.length];
+ System.arraycopy(elements, 0, projects, 0, elements.length);
+ return projects;
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+ composite.setLayout(new GridLayout());
+ composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ Label label = new Label(composite, SWT.LEFT);
+ label.setText(CUIPlugin.getResourceString(DESC));
+ GridData lbldata = new GridData(GridData.FILL_HORIZONTAL);
+ lbldata.horizontalSpan = 1;
+ label.setLayoutData(lbldata);
+
+
+ referenceProjectsViewer =
+ CheckboxTableViewer.newCheckList(composite, SWT.TOP | SWT.BORDER);
+ GridData data = new GridData(GridData.FILL_BOTH);
+ data.grabExcessHorizontalSpace = true;
+ data.heightHint =
+ getDefaultFontHeight(
+ referenceProjectsViewer.getTable(),
+ PROJECT_LIST_MULTIPLIER);
+
+ //Only set a height hint if it will not result in a cut off dialog
+ referenceProjectsViewer.getTable().setLayoutData(data);
+
+ referenceProjectsViewer.setLabelProvider(new WorkbenchLabelProvider());
+ referenceProjectsViewer.setContentProvider(getContentProvider());
+ referenceProjectsViewer.setInput(ResourcesPlugin.getWorkspace());
+
+ initializeValues();
+ setControl(composite);
+ }
+
+ /**
+ * Get the defualt widget height for the supplied control.
+ * @return int
+ * @param control - the control being queried about fonts
+ * @param lines - the number of lines to be shown on the table.
+ */
+ private static int getDefaultFontHeight(Control control, int lines) {
+ FontData[] viewerFontData = control.getFont().getFontData();
+ int fontHeight = 10;
+
+ //If we have no font data use our guess
+ if (viewerFontData.length > 0)
+ fontHeight = viewerFontData[0].getHeight();
+ return lines * fontHeight;
+
+ }
+
+ @Override
+ public void performApply(IProgressMonitor monitor) throws CoreException {
+ IProject[] refProjects = getReferencedProjects();
+ if (refProjects != null) {
+ IProject project = getContainer().getProject();
+ if (monitor == null) {
+ monitor = new NullProgressMonitor();
+ }
+ monitor.beginTask(AutotoolsWizardMessages.getResourceString("ReferenceBlock_task_ReferenceProjects"), 1);
+ try {
+ IProjectDescription description = project.getDescription();
+ description.setReferencedProjects(refProjects);
+ project.setDescription(description, new SubProgressMonitor(monitor, 1));
+ } catch (CoreException e) {
+ }
+ }
+
+ }
+
+ @Override
+ public void performDefaults() {
+ initializeValues();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/EmptyProject/template.properties b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/EmptyProject/template.properties
new file mode 100644
index 0000000000..d7af2dca95
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/EmptyProject/template.properties
@@ -0,0 +1,14 @@
+###############################################################################
+# Copyright (c) 2008 IBM Corporation 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:
+# IBM Corporation - initial API and implementation
+###############################################################################
+
+#Template Default Values
+EmptyProject.template.label=Empty Project
+EmptyProject.template.description=An empty project template
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/EmptyProject/template.xml b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/EmptyProject/template.xml
new file mode 100644
index 0000000000..4ab97961cf
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/EmptyProject/template.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="ProjTempl" version="1.0" supplier="Eclipse.org" revision="1.0" author="Intel Corporation"
+ copyright="Copyright (c) 2007 Intel Corporation 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"
+ id="EmptyProject" label="%EmptyProject.template.label" description="%EmptyProject.template.description"
+ help="help.html">
+
+ <process type="org.eclipse.linuxtools.cdt.autotools.core.NewAutotoolsProject">
+ <simple name="name" value="$(projectName)" />
+ <simple name="artifactExtension" value="exe" />
+ <simple name="isCProject" value="false" />
+ </process>
+
+</template>
+
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/AUTHORS b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/AUTHORS
new file mode 100644
index 0000000000..9d38b85b26
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/AUTHORS
@@ -0,0 +1 @@
+$(author)
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/Basename.c b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/Basename.c
new file mode 100644
index 0000000000..9f48078cef
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/Basename.c
@@ -0,0 +1,17 @@
+/*
+ ============================================================================
+ Name : $(baseName).c
+ Author : $(author)
+ Version :
+ Copyright : $(copyright)
+ Description : Hello World in C, Ansi-style
+ ============================================================================
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+int main(void) {
+ puts("$(message)"); /* prints $(message) */
+ return EXIT_SUCCESS;
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/COPYING b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/COPYING
new file mode 100644
index 0000000000..54c4590d27
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/COPYING
@@ -0,0 +1 @@
+<Place your desired license here.> \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/ChangeLog b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/ChangeLog
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/ChangeLog
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/Makefile.am.src b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/Makefile.am.src
new file mode 100644
index 0000000000..727c953306
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/Makefile.am.src
@@ -0,0 +1,3 @@
+bin_PROGRAMS=a.out
+a_out_SOURCES=$(projectName).c
+
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/Makefile.am.top b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/Makefile.am.top
new file mode 100644
index 0000000000..3e024d5c91
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/Makefile.am.top
@@ -0,0 +1 @@
+SUBDIRS=$(sourceDir)
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/NEWS b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/NEWS
new file mode 100644
index 0000000000..97e91a4d2e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/NEWS
@@ -0,0 +1 @@
+Sample NEWS file for $(projectName) project.
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/README b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/README
new file mode 100644
index 0000000000..d791b0b447
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/README
@@ -0,0 +1 @@
+Sample readme file for $(projectName) project.
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/configure.ac.top b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/configure.ac.top
new file mode 100644
index 0000000000..f272ccddd7
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/src/configure.ac.top
@@ -0,0 +1,14 @@
+dnl Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.59)
+AC_INIT($(projectName), 1.0)
+
+
+AC_CANONICAL_SYSTEM
+AM_INIT_AUTOMAKE()
+
+AC_PROG_CC
+
+AC_CONFIG_FILES(Makefile $(sourceDir)/Makefile)
+AC_OUTPUT
+
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/template.properties b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/template.properties
new file mode 100644
index 0000000000..ab982e4f15
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/template.properties
@@ -0,0 +1,30 @@
+###############################################################################
+# Copyright (c) 2007, 2009 Symbian Software Private Ltd. 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:
+# Bala Torati (Symbian) - initial API and implementation
+# Red Hat Inc - modification to use with Autotools project
+###############################################################################
+
+#Template Default Values
+HelloWorld.CCtemplate.label=Hello World C++ Autotools Project
+HelloWorld.CCtemplate.description=A skeletal C++ Hello World Autotools project. Creates a folder for sources and another for include.
+HelloWorld.CAnsitemplate.label=Hello World ANSI C Autotools Project
+HelloWorld.CAnsitemplate.description=A skeletal C Hello World Autotools project. Creates a folder for sources and another for include.
+HelloWorld.basics.label=Basic Settings
+HelloWorld.basics.description=Basic properties of a project
+HelloWorld.author.label=Author
+HelloWorld.author.description=Name of the author
+HelloWorld.copyright.label=Copyright notice
+HelloWorld.copyright.description=Your copyright notice
+HelloWorld.copyright.default=Your copyright notice
+HelloWorld.message.default=Hello World
+HelloWorld.message.description=Your hello world greeting message
+HelloWorld.message.label=Hello world greeting
+HelloWorld.sourceDir.label=Source
+HelloWorld.sourceDir.description=Directory for hello world project source files
+HelloWorld.sourceDir.default=src
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/template.xml b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/template.xml
new file mode 100644
index 0000000000..a9a56a111a
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCAutotoolsProject/template.xml
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="ProjTempl" version="1.0" supplier="Eclipse.org" revision="1.0" author="Bala Torati (Symbian)"
+ copyright="Copyright (c) 2007,2009 Symbian Software Limited 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 athttp://www.eclipse.org/legal/epl-v10.html"
+ id="HelloWorldCAutotoolsProject" label="%HelloWorld.CAnsitemplate.label" description="%HelloWorld.CAnsitemplate.description"
+ help="help.html">
+
+ <property-group id="basics" label="%HelloWorld.basics.label" description="%HelloWorld.basics.description" type="PAGES-ONLY" help="help.html">
+ <property id="author"
+ label="%HelloWorld.author.label"
+ description="%HelloWorld.author.description"
+ type="input"
+ pattern=".*"
+ default=""
+ hidden="false"
+ persist="true"/>
+ <property id="copyright"
+ label="%HelloWorld.copyright.label"
+ description="%HelloWorld.copyright.description"
+ type="input"
+ pattern=".*"
+ default="%HelloWorld.copyright.default"
+ hidden="false"
+ persist="true"/>
+ <property id="message"
+ label="%HelloWorld.message.label"
+ description="%HelloWorld.message.description"
+ type="input"
+ pattern=".*"
+ default="%HelloWorld.message.default"
+ hidden="false"
+ persist="true"/>
+ <property id="sourceDir"
+ label="%HelloWorld.sourceDir.label"
+ description="%HelloWorld.sourceDir.description"
+ type="input"
+ default="%HelloWorld.sourceDir.default"
+ pattern="[a-zA-Z0-9]+"
+ mandatory="false"
+ persist="true"/>
+ </property-group>
+
+ <process type="org.eclipse.linuxtools.cdt.autotools.core.NewAutotoolsProject">
+ <simple name="name" value="$(projectName)" />
+ <simple name="artifactExtension" value="exe" />
+ <simple name="isCProject" value="true" />
+ </process>
+
+ <process type="org.eclipse.cdt.core.CreateSourceFolder">
+ <simple name="projectName" value="$(projectName)"/>
+ <simple name="path" value="$(sourceDir)"/>
+ </process>
+
+ <process type="org.eclipse.cdt.core.AddFiles">
+ <simple name="projectName" value="$(projectName)"/>
+ <complex-array name="files">
+ <element>
+ <simple name="source" value="src/Basename.c"/>
+ <simple name="target" value="$(sourceDir)/$(projectName).c"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="src/configure.ac.top"/>
+ <simple name="target" value="configure.ac"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="src/AUTHORS"/>
+ <simple name="target" value="AUTHORS"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="src/NEWS"/>
+ <simple name="target" value="NEWS"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="src/README"/>
+ <simple name="target" value="README"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="src/ChangeLog"/>
+ <simple name="target" value="ChangeLog"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="src/COPYING"/>
+ <simple name="target" value="COPYING"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="src/Makefile.am.top"/>
+ <simple name="target" value="Makefile.am"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="src/Makefile.am.src"/>
+ <simple name="target" value="$(sourceDir)/Makefile.am"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ </complex-array>
+ </process>
+
+</template>
+
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/AUTHORS b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/AUTHORS
new file mode 100644
index 0000000000..9d38b85b26
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/AUTHORS
@@ -0,0 +1 @@
+$(author)
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Basename.cpp b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Basename.cpp
new file mode 100644
index 0000000000..8e191ac3c2
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Basename.cpp
@@ -0,0 +1,18 @@
+/*
+ ============================================================================
+ Name : $(baseName).cpp
+ Author : $(author)
+ Version :
+ Copyright : $(copyright)
+ Description : Hello World in C++,
+ ============================================================================
+ */
+
+#include <iostream>
+
+using namespace std;
+
+int main(void) {
+ cout << "$(message)" << endl; /* prints $(message) */
+ return 0;
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/COPYING b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/COPYING
new file mode 100644
index 0000000000..54c4590d27
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/COPYING
@@ -0,0 +1 @@
+<Place your desired license here.> \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/ChangeLog b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/ChangeLog
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/ChangeLog
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Makefile.am.src b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Makefile.am.src
new file mode 100644
index 0000000000..7b3125bbdd
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Makefile.am.src
@@ -0,0 +1,3 @@
+bin_PROGRAMS=a.out
+a_out_SOURCES=$(projectName).cpp
+
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Makefile.am.top b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Makefile.am.top
new file mode 100644
index 0000000000..3e024d5c91
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Makefile.am.top
@@ -0,0 +1 @@
+SUBDIRS=$(sourceDir)
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/NEWS b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/NEWS
new file mode 100644
index 0000000000..97e91a4d2e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/NEWS
@@ -0,0 +1 @@
+Sample NEWS file for $(projectName) project.
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/README b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/README
new file mode 100644
index 0000000000..d791b0b447
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/README
@@ -0,0 +1 @@
+Sample readme file for $(projectName) project.
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/configure.ac.top b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/configure.ac.top
new file mode 100644
index 0000000000..e58a4fe1aa
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/configure.ac.top
@@ -0,0 +1,14 @@
+dnl Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.59)
+AC_INIT($(projectName), 1.0)
+
+
+AC_CANONICAL_SYSTEM
+AM_INIT_AUTOMAKE()
+
+AC_PROG_CXX
+
+AC_CONFIG_FILES(Makefile $(sourceDir)/Makefile)
+AC_OUTPUT
+
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.properties b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.properties
new file mode 100644
index 0000000000..ab982e4f15
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.properties
@@ -0,0 +1,30 @@
+###############################################################################
+# Copyright (c) 2007, 2009 Symbian Software Private Ltd. 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:
+# Bala Torati (Symbian) - initial API and implementation
+# Red Hat Inc - modification to use with Autotools project
+###############################################################################
+
+#Template Default Values
+HelloWorld.CCtemplate.label=Hello World C++ Autotools Project
+HelloWorld.CCtemplate.description=A skeletal C++ Hello World Autotools project. Creates a folder for sources and another for include.
+HelloWorld.CAnsitemplate.label=Hello World ANSI C Autotools Project
+HelloWorld.CAnsitemplate.description=A skeletal C Hello World Autotools project. Creates a folder for sources and another for include.
+HelloWorld.basics.label=Basic Settings
+HelloWorld.basics.description=Basic properties of a project
+HelloWorld.author.label=Author
+HelloWorld.author.description=Name of the author
+HelloWorld.copyright.label=Copyright notice
+HelloWorld.copyright.description=Your copyright notice
+HelloWorld.copyright.default=Your copyright notice
+HelloWorld.message.default=Hello World
+HelloWorld.message.description=Your hello world greeting message
+HelloWorld.message.label=Hello world greeting
+HelloWorld.sourceDir.label=Source
+HelloWorld.sourceDir.description=Directory for hello world project source files
+HelloWorld.sourceDir.default=src
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.xml b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.xml
new file mode 100644
index 0000000000..38a4cc6909
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools.ui/templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.xml
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template type="ProjTempl" version="1.0" supplier="Eclipse.org" revision="1.0" author="Bala Torati (Symbian)"
+ copyright="Copyright (c) 2007,2009 Symbian Software Limited 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 athttp://www.eclipse.org/legal/epl-v10.html"
+ id="HelloWorldCPPAutotoolsProject" label="%HelloWorld.CCtemplate.label" description="%HelloWorld.CCtemplate.description"
+ help="help.html">
+
+ <property-group id="basics" label="%HelloWorld.basics.label" description="%HelloWorld.basics.description" type="PAGES-ONLY" help="help.html">
+ <property id="author"
+ label="%HelloWorld.author.label"
+ description="%HelloWorld.author.description"
+ type="input"
+ pattern=".*"
+ default=""
+ hidden="false"
+ persist="true"/>
+ <property id="copyright"
+ label="%HelloWorld.copyright.label"
+ description="%HelloWorld.copyright.description"
+ type="input"
+ pattern=".*"
+ default="%HelloWorld.copyright.default"
+ hidden="false"
+ persist="true"/>
+ <property id="message"
+ label="%HelloWorld.message.label"
+ description="%HelloWorld.message.description"
+ type="input"
+ pattern=".*"
+ default="%HelloWorld.message.default"
+ hidden="false"
+ persist="true"/>
+ <property id="sourceDir"
+ label="%HelloWorld.sourceDir.label"
+ description="%HelloWorld.sourceDir.description"
+ type="input"
+ default="%HelloWorld.sourceDir.default"
+ pattern="[a-zA-Z0-9]+"
+ mandatory="false"
+ persist="true"/>
+ </property-group>
+
+ <process type="org.eclipse.linuxtools.cdt.autotools.core.NewAutotoolsProject">
+ <simple name="name" value="$(projectName)" />
+ <simple name="artifactExtension" value="exe" />
+ <simple name="isCProject" value="false" />
+ </process>
+
+ <process type="org.eclipse.cdt.core.CreateSourceFolder">
+ <simple name="projectName" value="$(projectName)"/>
+ <simple name="path" value="$(sourceDir)"/>
+ </process>
+
+ <process type="org.eclipse.cdt.core.AddFiles">
+ <simple name="projectName" value="$(projectName)"/>
+ <complex-array name="files">
+ <element>
+ <simple name="source" value="src/Basename.cpp"/>
+ <simple name="target" value="$(sourceDir)/$(projectName).cpp"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="src/configure.ac.top"/>
+ <simple name="target" value="configure.ac"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="src/AUTHORS"/>
+ <simple name="target" value="AUTHORS"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="src/NEWS"/>
+ <simple name="target" value="NEWS"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="src/README"/>
+ <simple name="target" value="README"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="src/ChangeLog"/>
+ <simple name="target" value="ChangeLog"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="src/COPYING"/>
+ <simple name="target" value="COPYING"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="src/Makefile.am.top"/>
+ <simple name="target" value="Makefile.am"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ <element>
+ <simple name="source" value="src/Makefile.am.src"/>
+ <simple name="target" value="$(sourceDir)/Makefile.am"/>
+ <simple name="replaceable" value="true"/>
+ </element>
+ </complex-array>
+ </process>
+
+</template>
+
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/.classpath b/autotools/org.eclipse.linuxtools.cdt.autotools/.classpath
index 751c8f2e50..751c8f2e50 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/.classpath
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/.classpath
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/.cvsignore b/autotools/org.eclipse.linuxtools.cdt.autotools/.cvsignore
new file mode 100644
index 0000000000..50c1b30a80
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/.cvsignore
@@ -0,0 +1,4 @@
+bin
+@dot
+javaCompiler...args
+build.xml
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/.project b/autotools/org.eclipse.linuxtools.cdt.autotools/.project
new file mode 100644
index 0000000000..dd372b35f6
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.cdt.autotools</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/autotools/org.eclipse.linuxtools.cdt.autotools/.settings/org.eclipse.jdt.core.prefs b/autotools/org.eclipse.linuxtools.cdt.autotools/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..93e9280e28
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Wed Mar 18 16:28:06 EDT 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.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/.settings/org.eclipse.jdt.ui.prefs b/autotools/org.eclipse.linuxtools.cdt.autotools/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000000..4c7131801a
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,3 @@
+#Tue Jan 02 14:11:13 EST 2007
+eclipse.preferences.version=1
+internal.default.compliance=default
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/ChangeLog b/autotools/org.eclipse.linuxtools.cdt.autotools/ChangeLog
new file mode 100644
index 0000000000..2399555902
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/ChangeLog
@@ -0,0 +1,4050 @@
+2010-06-14 Andrew Overholt <overholt@redhat.com>
+
+ * build.properties: Add about.html to binary build.
+
+2010-02-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #303616
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java (getAutogenArgs): Fall
+ back to default value for uninitialized environment variable.
+ (getConfigArgs): Ditto.
+ (initializeBuildConfigDirs): Ditto.
+
+2009-12-10 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #297260
+ * plugin.xml: Make org.eclipse.linuxtools.cdt.autotools.builder abstract as it is used as
+ a superclass only.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsBuilder.java (getOutputEntries): Override
+ to ensure we don't use the Builder default for this method which returns an output entry
+ based on the configuration name.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java (build): Set the
+ build location and makefile generator element for the old builder to ensure the build path
+ set by the configure settings will always be returned.
+
+2009-11-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Fix dependencies to support CDT 6.0.0 and up.
+
+2009-11-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.properties: Add new messages.
+ * plugin.xml: Add GCCMakefilePerProjectProfile discovery profile ids to configure and
+ autogen.sh inputs.
+
+2009-10-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ Add back some UI elements needed for compatibility.
+
+ * icons/autoconf.gif: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AbstractAutotoolsHandler.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AbstractTargetAction.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AclocalHandler.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AutoconfHandler.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AutoheaderHandler.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AutomakeHandler.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AutoreconfHandler.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAclocalAction.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAction.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoconfAction.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoheaderAction.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutomakeAction.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoreconfAction.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeLibtoolizeAction.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeMessages.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeMessages.properties: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/LibtoolizeHandler.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/ReconfigureAction.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/ReconfigureHandler.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/SingleInputDialog.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/TwoInputDialog.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsBuildPropertyPage.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsEditorPropertyPage.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyMessages.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyMessages.properties: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyPage.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsToolsPropertyPage.java: New file.
+ * build.properties: Add icons directory to bin group.
+ * META-INF/MANIFEST.MF: Add autotools.core and autotools.ui dependency and lower cdt.ui requirement.
+ * plugin.xml: Add menus for autotool invocation. Add back old Autotools property page and
+ build settings tabs.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsDefaultBuildDirHandler.java (isOptionVisible): Add
+ a check for includes or symbols in which case return false.
+
+2009-10-21 Jeff Johnston <jjohnstn@redhat.com>
+
+ Change org.eclipse.linuxtools.cdt.autotools to be a compatibility plug-in to
+ support building of old projects. Remove all UI elements except for the Autoconf
+ parser code which was exposed as a public API.
+
+ * .settings/org.eclipse.core.resources.prefs: Removed.
+ * html/maintopic.html: Removed.
+ * html/subtopic.html: Removed.
+ * html/toc.html: Removed.
+ * icons/ac16/acmacro_arg_obj.gif: Removed.
+ * icons/ac16/acmacro_obj.gif: Removed.
+ * icons/ac16/ammacro_obj.gif: Removed.
+ * icons/ac16/case_obj.gif: Removed.
+ * icons/ac16/condition_obj.gif: Removed.
+ * icons/ac16/convert-normal.gif: Removed.
+ * icons/ac16/elif_obj.gif: Removed.
+ * icons/ac16/else_obj.gif: Removed.
+ * icons/ac16/for_obj.gif: Removed.
+ * icons/ac16/if_obj.gif: Removed.
+ * icons/ac16/while_obj.gif: Removed.
+ * icons/autoconf.gif: Removed.
+ * icons/automake.gif: Removed.
+ * icons/dlcl16/build_configs.gif: Removed.
+ * icons/dlcl16/newc_app.gif: Removed.
+ * icons/dlcl16/newcc_app.gif: Removed.
+ * icons/dlcl16/open_include.gif: Removed.
+ * icons/dtool16/alphab_sort_co.gif: Removed.
+ * icons/dtool16/build_menu.gif: Removed.
+ * icons/dtool16/convert-normal.gif: Removed.
+ * icons/dtool16/make.gif: Removed.
+ * icons/dtool16/makefile.gif: Removed.
+ * icons/dtool16/newc_app.gif: Removed.
+ * icons/dtool16/newcc_app.gif: Removed.
+ * icons/dtool16/segment_edit.gif: Removed.
+ * icons/dtool16/target_add.gif: Removed.
+ * icons/dtool16/target_build.gif: Removed.
+ * icons/dtool16/target_delete.gif: Removed.
+ * icons/dtool16/target_edit.gif: Removed.
+ * icons/dtool16/update_old.gif: Removed.
+ * icons/elcl16/build_configs.gif: Removed.
+ * icons/elcl16/newc_app.gif: Removed.
+ * icons/elcl16/newcc_app.gif: Removed.
+ * icons/elcl16/open_include.gif: Removed.
+ * icons/etool16/alphab_sort_co.gif: Removed.
+ * icons/etool16/build_menu.gif: Removed.
+ * icons/etool16/convert-normal.gif: Removed.
+ * icons/etool16/make.gif: Removed.
+ * icons/etool16/makefile.gif: Removed.
+ * icons/etool16/newc_app.gif: Removed.
+ * icons/etool16/newcc_app.gif: Removed.
+ * icons/etool16/segment_edit.gif: Removed.
+ * icons/etool16/target_add.gif: Removed.
+ * icons/etool16/target_build.gif: Removed.
+ * icons/etool16/target_delete.gif: Removed.
+ * icons/etool16/target_edit.gif: Removed.
+ * icons/etool16/target_filter.gif: Removed.
+ * icons/etool16/update_old.gif: Removed.
+ * icons/obj16/acmacro_obj.gif: Removed.
+ * icons/obj16/command_obj.gif: Removed.
+ * icons/obj16/define_obj.gif: Removed.
+ * icons/obj16/environment_obj.gif: Removed.
+ * icons/obj16/envvar_obj.gif: Removed.
+ * icons/obj16/error_obj.gif: Removed.
+ * icons/obj16/hfolder_obj.gif: Removed.
+ * icons/obj16/include_obj.gif: Removed.
+ * icons/obj16/irule_obj.gif: Removed.
+ * icons/obj16/lib_obj.gif: Removed.
+ * icons/obj16/macro_obj.gif: Removed.
+ * icons/obj16/relation_obj.gif: Removed.
+ * icons/obj16/target_obj.gif: Removed.
+ * icons/obj16/trule_obj.gif: Removed.
+ * icons/sample.gif: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AbstractAutotoolsHandler.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AbstractTargetAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AclocalHandler.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AutoconfHandler.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AutoheaderHandler.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AutomakeHandler.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AutoreconfHandler.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAclocalAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoconfAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoheaderAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutomakeAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoreconfAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeLibtoolizeAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeMessages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeMessages.properties: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/LibtoolizeHandler.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/ReconfigureAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/ReconfigureHandler.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/SingleInputDialog.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/TwoInputDialog.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakeTargetManager.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutoconfSubstRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeCompletionProcessor.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeConfigMacro.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeDocumentProvider.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeEditor.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeEditorFactory.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeErrorHandler.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/Automakefile.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileCodeScanner.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileContentOutlinePage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileReconcilingStrategy.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileSourceConfiguration.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileUtil.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeIfElse.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeMacroDefinitionRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeMacroReferenceRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeTextHover.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeWordDetector.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/popup/actions/GetDefinedSymbolsAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/popup/actions/GetIncludePathAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfAnnotationHover.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfCodeScanner.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfDocumentProvider.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfDocumentSetupParticipant.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditor.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditorMacroValidator.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditorMessages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditorMessages.properties: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfErrorHandler.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfIdentifierRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfKeywordDetector.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfM4WordDetector.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacro.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroCodeScanner.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroContentAssistProcessor.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroDamagerRepairer.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroParameterListValidator.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroPartitionRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroProposalContextInformation.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroWordDetector.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfPartitioner.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfPartitionScanner.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfPKGWordDetector.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfReconcilingStrategy.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfWhitespaceDetector.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfWordDetector.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/IAutotoolEditorActionDefinitionIds.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/IAutotoolHelpContextIds.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/IAutotoolsEditor.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/InlineDataRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/MultilineRuleDamagerRepairer.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/outline/AutoconfContentOutlinePage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/outline/AutoconfContentProvider.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/outline/AutoconfLabelProvider.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/ParseException.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/RecursiveSingleLineRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/RestrictedEndOfLineRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsBuildPropertyPage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsEditorPropertyPage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyMessages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyMessages.properties: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyPage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsToolsPropertyPage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/ConvertToAutotoolsProjectWizard.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/CProjectPlatformPage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/NewAutotoolsCCProjectWizard.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/NewAutotoolsCProjectWizard.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/NewAutotoolsProjectOptionPage.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/AbstractElementListSelectionDialog.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/AbstractMakefile.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/AbstractMakefileCodeScanner.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/AddBuildTargetAction.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/ArchiveTarget.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/BadDirective.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Command.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Comment.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/CompletionProposalComparator.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Conditional.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/DefaultRule.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/DefineVariable.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/DeleteOnErrorRule.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Directive.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/EditorUtility.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/ElementListSelectionDialog.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Else.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/EmptyLine.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Endef.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Endif.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/ExportAllVariablesRule.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/ExportVariable.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/ExternalEditorInput.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/ExternalEditorInputFactory.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/GNUAutomakefile.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/GNUMakefileConstants.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/GNUMakefileUtil.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/GNUTargetRule.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/GNUVariableDef.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/IAutomakeConditional.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/If.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Ifdef.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Ifeq.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Ifndef.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Ifneq.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/IgnoreRule.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/IMakefileDocumentProvider.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/IMakefileEditorActionDefinitionIds.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Include.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/InferenceRule.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/IntermediateRule.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/IReconcilingParticipant.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/ISelectionValidator.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/ITranslationUnitEditorInput.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/LexicalSortingAction.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/LowResolutionTimeRule.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MacroDefinition.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MacroDefinitionRule.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MacroReferenceRule.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileAnnotationHover.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileCodeScanner.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileCompletionProcessor.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakeFileConstants.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileContentOutlinePage.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileDocumentProvider.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileDocumentSetupParticipant.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileEditor.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileEditorActionContributor.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileEditorPreferenceConstants.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileEditorTogglePresentationAction.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileMessages.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefilePartitionScanner.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileReader.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileReconcilingStrategy.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakeFileResources.properties: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileSourceConfiguration.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileStorageDocumentProvider.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileTextHover.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileWordDetector.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MessageLine.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/NotParallelRule.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/NullMakefile.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/OpenDeclarationAction.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/OpenIncludeAction.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/OverrideDefine.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/OverrideVariable.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Parent.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/PhonyRule.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/PosixMakefileUtil.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/PosixRule.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/PreciousRule.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/ProjectionMakefileUpdater.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Rule.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/SccsGetRule.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/SecondaryRule.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/SelectionList.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/SelectionStatusDialog.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/SilentRule.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/SpecialRule.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/StaticTargetRule.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/StatusInfo.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/StatusTool.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/StringMatcher.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/SuffixesRule.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Target.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/TargetRule.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/TargetVariable.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Terminal.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/TwoArrayQuickSort.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/UnExport.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Util.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/VariableDefinition.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/VPath.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/WordPartDetector.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/WorkingCopyManager.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/MakeMessages.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/MakeTarget.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/MakeTargetManager.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ProjectTargets.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/text/hover/AutoconfPrototype.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/text/hover/AutoconfTextHover.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/text/hover/HoverMessages.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/text/hover/HoverMessages.properties: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/AutotoolsPluginImages.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/autoconf/ProjectionFileUpdater.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ErrorParserBlock.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTML2TextReader.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTMLTextPresenter.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MakeResources.properties: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MakeUIImages.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MakeUIMessages.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MessageLine.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AbstractEditorPreferencePage.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutoconfEditorPreferencePage.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutomakeEditorPreferencePage.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsPreferencePage.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsPreferencesMessages.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsPreferencesMessages.properties: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/ColorEditor.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/ColorManager.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/TabFolderLayout.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/wizards/AutotoolsBuildWizard.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/wizards/AutotoolsWizardMessages.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/wizards/AutotoolsWizardMessages.properties: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/wizards/ConfigurationContentProvider.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/wizards/ConfigurationLabelProvider.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/wizards/ManagedProjectOptionBlock.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/wizards/NewAutotoolsProject.java: Removed.
+ * templates/projecttemplates/EmptyProject/template.properties: Removed.
+ * templates/projecttemplates/EmptyProject/template.xml: Removed.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src/AUTHORS: Removed.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src/Basename.c: Removed.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src/configure.ac.top: Removed.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src/COPYING: Removed.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src/Makefile.am.src: Removed.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src/Makefile.am.top: Removed.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src/NEWS: Removed.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src/README: Removed.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/template.properties: Removed.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/template.xml: Removed.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/AUTHORS: Removed.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Basename.cpp: Removed.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/configure.ac.top: Removed.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/COPYING: Removed.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Makefile.am.src: Removed.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/Makefile.am.top: Removed.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/NEWS: Removed.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src/README: Removed.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.properties: Removed.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.xml: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfEditorMessages.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfEditorMessages.properties: New file.
+ * build.properties: Remove UI elements that are no longer used.
+ * META-INF/MANIFEST.MF: Update exposed packages and required bundles. Bump to 2.0.0.
+ * plugin.xml: Remove all UI extensions.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsPlugin.java (getTargetManager): Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfParser.java: Fixed to build.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfTokenizer.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsEditorPreferenceConstants.java (initializeDefaultValues):
+ Add latest AM and AC macro version constants as the initial source of these constants has been removed.
+
+2009-10-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Bump version to 1.0.5.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/text/hover/AutoconfTextHover.java (getHoverDoc):
+ Change to get document versions and pass these to getACDoc and getAMDoc.
+ (getDefaultAutomakeMacrosVer): New method.
+ (getAMDoc): Change to take doc version rather than name and to support document in local plugin.
+ (getDefaultAutoconfMacrosVer): New method.
+ (getLocalAutoconfMacrosDocName): New method.
+ (getACDoc): Change to take doc version rather than name and to support document in local plugin.
+ (getLocalAutomakeMacrosDocName): New method.
+
+2009-10-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/NewAutotoolsCCProjectWizard.java (doRun): Fix warnings.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/NewAutotoolsCProjectWizard.java (doRun): Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ProjectTargets.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsPlugin.java (setScannerInfoProvider): Fix
+ deprecated warnings.
+ (verifyScannerInfoProvider): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java: Ditto.
+
+2009-10-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/wizards/AutotoolsBuildWizard.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/wizards/NewAutotoolsProject.java: New file.
+ * templates/projecttemplates/EmptyProject/template.properties: New file.
+ * templates/projecttemplates/EmptyProject/template.xml: New file.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/src: New file.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/template.properties: New file.
+ * templates/projecttemplates/HelloWorldCAutotoolsProject/template.xml: New file.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/src: New file.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.properties: New file.
+ * templates/projecttemplates/HelloWorldCPPAutotoolsProject/template.xml: New file.
+ * build.properties: Add templates directory to binary contents.
+ * plugin.properties: Add new strings to support additions in plugin.xml.
+ * plugin.xml: Remove name from Autotools project type so it will get a category in the C/C++
+ new project wizard UI. Connect the gcc and g++ tools to their proper parents in the CDT.
+ Add template and wizard support for Autotools. Remove project conversion stuff that shouldn't
+ have been checked in.
+
+2009-10-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #292272
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsBuilder.java (AutotoolsBuilder): Use
+ a super copy constructor rather than a parent chained super constructor.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java (clean): Save old
+ builder and replace back when build is complete.
+ (build): Ditto.
+
+2009-09-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #289557
+ * plugin.xml: Add ApplicabilityCalculator for includes and symbols for
+ configure tool to prevent values from being added to the command line in the
+ Tool Settings tab.
+
+2009-09-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #289558
+ * plugin.xml: Put GNU C++ Project Wizard under C/C++ project category.
+
+2009-09-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #289555
+ * plugin.xml: Add back org.eclipse.linuxtools.cdt.autotools.toolchain.tool.gcc and
+ org.eclipse.linuxtools.cdt.autotools.toolchain.tool.gpp to Autotools toolchain to
+ prevent older projects from getting NPEs. Do not tie these tools to the real
+ CDT core gcc and gpp tools and make them unused children of the toolchain so new
+ projects won't put them in the Settings UI nor the .cproject.
+
+2009-09-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #289819
+ * plugin.properties: Change convert message to match the same format as CDT's
+ convertor.
+
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java (createDirectory): Changed
+ to use Java File and mkdirs method.
+ (regenerateMakefiles): Use Java File for existence checking and do not use Workspace
+ root because file may be external. As well, share console if autoreconf required
+ prior to configuration.
+ * src/org/eclipse/linuxtools/cdt/autotools/Resources.properties: Add create dir error
+ message.
+
+
+2009-08-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #286543
+ * plugin.xml: Add input types for configure tool so we
+ can specify CDT gcc and g++ language ids which are checked
+ for in the CDT New C/C++ Project Wizards. Also add the
+ Autotools build artefact type as a supported property of the
+ Autotools tool chain.
+
+2009-08-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #285865
+ * plugin.properties: Change Provider to Eclipse instead of Eclipse.org.
+
+2009-08-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #267538
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java (getAbsoluteDirectory):
+ Call getPathString to get the directory path instead of calling toOSString.
+ (getPathString): New method that gets the path string and handles MingW paths.
+ (runScript): Call getPathString to convert the command path instead of
+ using toOSString.
+
+2009-08-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Make autotools.tests able to see internal classes.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/text/hover/AutoconfTextHover.java (getAMDoc): Remove
+ printlns and log errors with AutotoolsPlugin instead of CUIPlugin.
+
+2009-08-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #267197
+ (getACDoc):
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsDefaultBuildDirHandler.java (handleValue): Continue
+ loop if no tool for config.status is found.
+
+2009-07-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Bump release to 1.0.4.
+
+2009-07-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ Rename all internal classes to adhere to Eclipse naming conventions. Change all references appropriately.
+
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/AbstractElementListSelectionDialog.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/AbstractMakefile.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/AbstractMakefileCodeScanner.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/AddBuildTargetAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/ArchiveTarget.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/BadDirective.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Command.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Comment.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/CompletionProposalComparator.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Conditional.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/DefaultRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/DefineVariable.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/DeleteOnErrorRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Directive.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/EditorUtility.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/ElementListSelectionDialog.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Else.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/EmptyLine.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Endef.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Endif.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/ExportAllVariablesRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/ExportVariable.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/ExternalEditorInput.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/ExternalEditorInputFactory.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/GNUAutomakefile.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/GNUMakefileConstants.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/GNUMakefileUtil.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/GNUTargetRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/GNUVariableDef.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/IAutomakeConditional.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/If.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Ifdef.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Ifeq.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Ifndef.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Ifneq.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/IgnoreRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/IMakefileDocumentProvider.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/IMakefileEditorActionDefinitionIds.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Include.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/InferenceRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/IntermediateRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/IReconcilingParticipant.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/ISelectionValidator.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/ITranslationUnitEditorInput.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/LexicalSortingAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/LowResolutionTimeRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MacroDefinition.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MacroDefinitionRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MacroReferenceRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileAnnotationHover.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileCodeScanner.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileCompletionProcessor.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakeFileConstants.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileContentOutlinePage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileDocumentProvider.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileDocumentSetupParticipant.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileEditor.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileEditorActionContributor.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileEditorPreferenceConstants.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileEditorTogglePresentationAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileMessages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefilePartitionScanner.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileReader.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileReconcilingStrategy.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakeFileResources.properties: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileSourceConfiguration.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileStorageDocumentProvider.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileTextHover.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileWordDetector.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MessageLine.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/NotParallelRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/NullMakefile.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/OpenDeclarationAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/OpenIncludeAction.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/OverrideDefine.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/OverrideVariable.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Parent.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/PhonyRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/PosixMakefileUtil.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/PosixRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/PreciousRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/ProjectionMakefileUpdater.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Rule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/SccsGetRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/SecondaryRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/SelectionList.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/SelectionStatusDialog.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/SilentRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/SpecialRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/StaticTargetRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/StatusInfo.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/StatusTool.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/StringMatcher.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/SuffixesRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Target.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/TargetRule.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/TargetVariable.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Terminal.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/TwoArrayQuickSort.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/UnExport.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Util.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/VariableDefinition.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/VPath.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/WordPartDetector.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/WorkingCopyManager.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/MakeMessages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/MakeTarget.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/MakeTargetManager.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/MarkerGenerator.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ProjectTargets.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/text/hover/AutoconfPrototype.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/text/hover/AutoconfTextHover.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/text/hover/HoverMessages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/text/hover/HoverMessages.properties: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/AutotoolsConsole.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/AutotoolsPluginImages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/CBuildStepsConsole.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/CConfigureConsole.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/Console.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/ConsoleMessages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/ConsoleMessages.properties: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/CWordFinder.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/editors/autoconf/ProjectionFileUpdater.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/ErrorParserBlock.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/HTML2TextReader.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/HTMLPrinter.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/HTMLTextPresenter.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/LineBreakingReader.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/MakeResources.properties: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/MakeUIImages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/MakeUIMessages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/MessageLine.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/AbstractEditorPreferencePage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/AutoconfEditorPreferencePage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/AutomakeEditorPreferencePage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/AutotoolsEditorPreferenceConstants.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/AutotoolsPreferencePage.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/AutotoolsPreferencesMessages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/AutotoolsPreferencesMessages.properties: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/ColorEditor.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/ColorManager.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/OverlayPreferenceStore.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/StatusInfo.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/TabFolderLayout.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/SingleCharReader.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/SubstitutionTextReader.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/wizards/AutotoolsWizardMessages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/wizards/AutotoolsWizardMessages.properties: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/wizards/ConfigurationContentProvider.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/wizards/ConfigurationLabelProvider.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/wizards/ManagedProjectOptionBlock.java: Removed.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/MakeMessages.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/MakeTarget.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/MakeTargetManager.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/MarkerGenerator.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ProjectTargets.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/AutotoolsConsole.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/AutotoolsPluginImages.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CBuildStepsConsole.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CConfigureConsole.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/Console.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ConsoleMessages.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ConsoleMessages.properties: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CWordFinder.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ErrorParserBlock.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTML2TextReader.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTMLPrinter.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTMLTextPresenter.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/LineBreakingReader.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MakeResources.properties: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MakeUIImages.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MakeUIMessages.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/MessageLine.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/SingleCharReader.java: New file.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/SubstitutionTextReader.java: New file.
+ * plugin.xml: Change any internal class references to new naming convention.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakeTargetManager.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeCompletionProcessor.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeConfigMacro.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeDocumentProvider.java (getWorkingCopy): Ditto.
+ (shutdown): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeEditor.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeEditorFactory.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeErrorHandler.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/Automakefile.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileCodeScanner.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileReconcilingStrategy.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileSourceConfiguration.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeIfElse.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeTextHover.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfAnnotationHover.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfCodeScanner.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditor.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditorMacroValidator.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroCodeScanner.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroContentAssistProcessor.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/IAutotoolsEditor.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/outline/AutoconfLabelProvider.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsEditorPropertyPage.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/CProjectPlatformPage.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/NewAutotoolsProjectOptionPage.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/AbstractElementListSelectionDialog.java:
+ Ditto.
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/AbstractMakefile.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/AbstractMakefileCodeScanner.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/AddBuildTargetAction.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/ArchiveTarget.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/BadDirective.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Command.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Comment.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/CompletionProposalComparator.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Conditional.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/DefaultRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/DefineVariable.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/DeleteOnErrorRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Directive.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/EditorUtility.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/ElementListSelectionDialog.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Else.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/EmptyLine.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Endef.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Endif.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/ExportAllVariablesRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/ExportVariable.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/ExternalEditorInput.java (getTranslationUnit): Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/ExternalEditorInputFactory.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/GNUAutomakefile.java (getBuiltins): Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/GNUMakefileConstants.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/GNUMakefileUtil.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/GNUTargetRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/GNUVariableDef.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/IAutomakeConditional.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/If.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Ifdef.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Ifeq.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Ifndef.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Ifneq.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/IgnoreRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/IMakefileDocumentProvider.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/IMakefileEditorActionDefinitionIds.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Include.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/InferenceRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/IntermediateRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/IReconcilingParticipant.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/ISelectionValidator.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/ITranslationUnitEditorInput.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/LexicalSortingAction.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/LowResolutionTimeRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MacroDefinition.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MacroDefinitionRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MacroReferenceRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileAnnotationHover.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileCodeScanner.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileCompletionProcessor.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakeFileConstants.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileContentOutlinePage.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileDocumentProvider.java (getWorkingCopy): Ditto.
+ (shutdown):
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileDocumentSetupParticipant.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileEditor.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileEditorActionContributor.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileEditorPreferenceConstants.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileEditorTogglePresentationAction.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileMessages.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefilePartitionScanner.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileReader.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileReconcilingStrategy.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileSourceConfiguration.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileStorageDocumentProvider.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileTextHover.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MakefileWordDetector.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/MessageLine.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/NotParallelRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/NullMakefile.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/OpenDeclarationAction.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/OpenIncludeAction.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/OverrideDefine.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/OverrideVariable.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Parent.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/PhonyRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/PosixMakefileUtil.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/PosixRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/PreciousRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/ProjectionMakefileUpdater.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Rule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/SccsGetRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/SecondaryRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/SelectionList.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/SelectionStatusDialog.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/SilentRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/SpecialRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/StaticTargetRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/StatusInfo.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/StatusTool.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/StringMatcher.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/SuffixesRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Target.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/TargetRule.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/TargetVariable.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Terminal.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/TwoArrayQuickSort.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/UnExport.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/Util.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/VariableDefinition.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/VPath.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/WordPartDetector.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/editors/automake/WorkingCopyManager.java (removeWorkingCopy): Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/text/hover/AutoconfPrototype.java: Ditto.
+
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/text/hover/AutoconfTextHover.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/text/hover/HoverMessages.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/editors/autoconf/ProjectionFileUpdater.java: Ditto.
+
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AbstractEditorPreferencePage.java: Ditto.
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutoconfEditorPreferencePage.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutomakeEditorPreferencePage.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsEditorPreferenceConstants.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsPreferencePage.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsPreferencesMessages.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/ColorEditor.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/ColorManager.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/OverlayPreferenceStore.java: Ditto.l
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/StatusInfo.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/TabFolderLayout.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/wizards/AutotoolsWizardMessages.java: Ditto.
+
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/wizards/ConfigurationContentProvider.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/wizards/ConfigurationLabelProvider.java: Ditto.
+ * src/org/eclipse/linuxtools/internal/cdt/autotools/wizards/ManagedProjectOptionBlock.java: Ditto.
+
+2009-07-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Fix visibility of Reconfigure Project menu item.
+
+2009-07-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/AutotoolsConsole.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/Console.java: New file.
+ * plugin.xml: Add build consoles for Autotools and Build Steps.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAction.java:
+ (executeConsoleCommand): New method to run commands in the console.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAclocalAction.java (run): Use
+ executeConsoleCommand.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoconfAction.java (run): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoheaderAction.java (run): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutomakeAction.java (run): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoreconfAction.java (run): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeLibtoolizeAction.java (run): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeMessages.properties: Add working directory
+ message and special message for invoking tools.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/CBuildStepsConsole.java (CBuildStepsConsole):
+ Changed to inherit from Console class.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/CConfigureConsole.java (CConfigureConsole): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/ConsoleMessages.properties: Add messages
+ for build steps and autotools console names.
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java (stripEnvVars): Make public static.
+
+2009-07-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #283828
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/ReconfigureAction.java (run): Use
+ workspace root scheduling rule instead of project modification rule because MakeTargets
+ may end up saving project description.
+
+2009-07-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/ReconfigureAction.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/ReconfigureHandler.java: New file.
+ * plugin.properties: Add messages for new reconfigure action.
+ * plugin.xml: Add new reconfigure command to Project menu.
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java (removeConfigSettings): New
+ method.
+
+2009-07-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java (saveConfigArgs): Use toFile
+ method for config settings path.
+ (regenerateMakefiles): Ditto.
+
+2009-07-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #281850
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java (getConfigSettingsPath): Save configure
+ settings file in project working directory for Autotools plugin.
+
+2009-07-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #269974
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java (build): Look for make target
+ arguments as any arguments added to the build command in a MakeTarget will be stripped off and given as
+ one of the fields in args. Take any make arguments given and set them for the builder.
+
+2009-07-10 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java (stripEnvVars): Add support for stripping off
+ recursive env var references even though they are not interpreted. Also remove single and double quotes from
+ env var if variable value is quoted.
+
+2009-07-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #282696, #283084
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java (getAutogenPath): Change to
+ strip off environment variable settings prior to command string using stripEnvVars method.
+ (getConfigurePath): Ditto.
+ (runScript): Add additional environment variable parameters.
+ (stripEnvVars): New method.
+ (regenerateMakefiles): Fix needs full reconfiguration to use designated clean method
+ instead of deleting build directory.
+ (makeArray): New method.
+ * src/org/eclipse/linuxtools/cdt/autotools/Resources.properties: Add cleaning build directory
+ message.
+
+2009-07-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #281811
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java (postBuildErrMsg): New.
+ (preBuildErrMsg): Ditto.
+ (clean): Set the build generator element acquired from the AutotoolsPlugin.
+ (build): Add prebuild/postbuild step support. Add sub-directory make target support and fix
+ problem with GNU Make Generator being used by setting the build generator element acquired from the
+ AutotoolsPlugin.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsPlugin.java (getImageDescriptor):
+ (getGeneratorElement): New method.
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java (initializeBuildConfigDirs): Don't set
+ builder working directory since this is done by AutotoolsMakefileBuilder.
+
+2009-07-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java (clean): Don't ask
+ the ManagedBuildManager for the generator as it may default to the GnuMakefileGenerator.
+ (removeBuildDir): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java (regenerateMakefiles): Add
+ MakeTargets when autogen.sh runs configure successfully.
+
+2009-06-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #281583, #281582
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java (build): Don't ask the
+ ManagedBuildManager for the generator as it will default to the GnuMakefileGenerator until we tell
+ it otherwise. Just get a new Autotools MakeGenerator.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfo.java (getCompilationString): Add support
+ for g++, top-level builds, and compilation strings with continuation characters.
+
+2009-06-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #280696
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAction.java (showSuccess):
+ Changed to issue a information dialog that does not have a cancel button.
+ (executeCommand): Changed to create a ProgressMonitorDialog that is issued
+ until the command completes successfully or with failure.
+ (ExecuteProgressDialog): New private internal class that implements IRunnableWithProgress
+ which is used to run the command for a ProgressMonitorDialog.
+
+2009-06-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeMessages.properties:
+ Resolves #280509
+ * META-INF/MANIFEST.MF: Bump version to 1.0.3.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsBuilder.java (getBuildFileGenerator): New
+ method to override Builder method so we get Autotools Makefile generator.
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java (regenerateMakefiles): Add
+ logic to use autoreconf if no configure script and no autogen.sh.
+ * src/org/eclipse/linuxtools/cdt/autotools/Resources.properties: Add messages.
+
+2009-06-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #280504, #280505, #280506.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AutoheaderHandler.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AutoreconfHandler.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoheaderAction.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoreconfAction.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeLibtoolizeAction.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/LibtoolizeHandler.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/SingleInputDialog.java: New file.
+ * plugin.properties: Add new messages for additional tools/commands added.
+ * plugin.xml: Change invoking autotools to be a single menu item in Project menu which
+ expands to show all tools available, including aclocal, autoconf, autoheader, automake,
+ autoreconf, and libtoolize.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAction.java (simpleParseOptions): New
+ method to parse options and account for quoted strings.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeMessages.properties: Add support
+ for autoheader, autoreconf, and libtoolize.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyConstants.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyMessages.properties: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsToolsPropertyPage.java (createControls):
+ Ditto.
+ (initialize): Ditto.
+ (performDefaults): Ditto.
+ (performOK): Ditto.
+
+2009-06-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #280117
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfo.java (buildFile): Fix so
+ loop doesn't exit early before finding build directory.
+
+2009-06-05 Andrew Overholt <overholt@redhat.com>
+
+ * Fix up after erroneous SVN operation.
+
+2009-05-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * .classpath: Updated.
+
+2009-05-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #273830
+ * plugin.xml: Remove warnings.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAction.java (executeCommand): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/TwoInputDialog.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsBuilder.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsDefaultBuildDirHandler.java (handleValue): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java (clean): Ditto.
+ (build): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsPlugin.java (setScannerInfoProvider): Ditto.
+ (verifyScannerInfoProvider): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfo.java (buildFile): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfoProvider.java (setDirty): Ditto.
+ (getScannerInformation): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutoconfSubstRule.java (DecreasingCharArrayLengthComparator): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeDocumentProvider.java (connect): Ditto.
+ (shutdown): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeEditor.java (getAdapter): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeErrorHandler.java (AutomakeMarker): Ditto.
+ (checkChildren): Ditto.
+ (AutomakeMarker.setAttributes): Ditto.
+ (AutomakeMarker.getAttributes): Ditto.
+ (createMarker): Ditto.
+ (AutomakeMarker.AutomakeMarker): Ditto.
+ (AutomakeMarker.getAdapter): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/EditorUtility.java (getWorkspaceFileAtLocation): Ditto.
+ (isLinked): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/ElementListSelectionDialog.java (open): Ditto.
+ (setElements): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/ExternalEditorInput.java (getAdapter): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/GNUAutomakefile.java (getBuiltins): Ditto.
+ (addDirective): Ditto.
+ (parseVPath): Ditto.
+ (getDirectives): Ditto.
+ (parse): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/LexicalSortingAction.java (LexicalCSorter.isSorterProperty): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileCompletionProcessor.java (DirectiveComparator): Ditto.
+ (computeContextInformation): Ditto.
+ (computeCompletionProposals): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileContentOutlinePage.java (MakefileContentProvider.getElements): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileDocumentProvider.java (shutdown): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileEditor.java (getAdapter): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileMessages.java (getFormattedString): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefilePartitionScanner.java (MakefilePartitionScanner): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/NullMakefile.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/OpenIncludeAction.java (resolveIncludeLink): Ditto.
+ (findFile): Ditto.
+ (getIncludeStatement): Ditto.
+ (chooseFile): Ditto.
+ (run): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Parent.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/PosixMakefileUtil.java (findTargets): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/ProjectionMakefileUpdater.java (createAnnotationMap): Ditto.
+ (fCollapseConditional): Ditto.
+ (fCollapseRule): Ditto.
+ (fCollapseMacroDef): Ditto.
+ (match): Ditto.
+ (processReconcile): Ditto.
+ (computeAdditions): Ditto.
+ (initialize): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/Rule.java (getCommands): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/SelectionStatusDialog.java (setInitialSelection): Ditto.
+ (getPrimaryInitialSelection): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/StringMatcher.java (parseWildCards): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/WorkingCopyManager.java (setWorkingCopy): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/MakeTarget.java (getAdapter): Ditto.
+ (getEnvironment): Ditto.
+ (setEnvironment): Ditto.
+ (build): Ditto.
+ (getExpandedEnvironment): Ditto.
+ (getAttributeMap): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/MakeTargetManager.java (initializeBuilders): Ditto.
+ (getTargetBuilders): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ProjectTargets.java (findTarget): Ditto.
+ (remove): Ditto.
+ (get): Ditto.
+ (getAsXML): Ditto.
+ (translateCDTProjectToDocument): Ditto.
+ (translateDocumentToCDTProject): Ditto.
+ (contains): Ditto.
+ (add): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/editors/autoconf/ProjectionFileUpdater.java (createAnnotationMap): Ditto.
+ (match): Ditto.
+ (processReconcile): Ditto.
+ (computeAdditions): Ditto.
+ (initialize): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/ErrorParserBlock.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/HTML2TextReader.java (static initializer): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/HTMLTextPresenter.java (updatePresentation): Ditto.
+ (adaptTextPresentation): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/ColorManager.java (dispose): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/StatusInfo.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java (runScript): Ditto.
+ (runCommand): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/popup/actions/GetDefinedSymbolsAction.java (run): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfDocumentProvider.java (shutdown): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfEditor.java (getAdapter): Ditto.
+ (InformationDispatchAction.makeTextHoverFocusable): Ditto.
+ (.createInformationControl): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfErrorHandler.java (AutoconfMarker.getAttributes): Ditto.
+ (handleError): Ditto.
+ (AutoconfMarker.getAdapter): Ditto.
+ (createMarker): Ditto.
+ (AutoconfMarker.setAttributes): Ditto.
+ (removeExistingMarkers): Ditto.
+ (AutoconfMarker.AutoconfMarker): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfIdentifierRule.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacro.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroDamagerRepairer.java (createPresentation): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroParameterListValidator.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/IAutotoolsEditor.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/InlineDataRule.java (evaluate): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfOutlineErrorHandler.java (handleError): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/RecursiveSingleLineRule.java (RecursiveSingleLineRule): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/RestrictedEndOfLineRule.java (RestrictedEndOfLineRule): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyManager.java (AutotoolsPropertyManager): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsToolsPropertyPage.java (performOK): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/CProjectPlatformPage.java (handleConfigurationSelectionChange): Ditto.
+ (CProjectPlatformPage): Ditto.
+ (filterSupportedConfigurations): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/NewAutotoolsCCProjectWizard.java (doRun): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/NewAutotoolsCProjectWizard.java (doRun): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/NewAutotoolsProjectOptionPage.java (ManagedWizardOptionBlock.setupHelpContextIds): Ditto.
+
+2009-05-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #276204
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsProjectNature.java (removeNature):
+ (addAutotoolsBuilder): Fix compiler warnings.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeCompletionProcessor.java (DirectiveComparator): Ditto.
+ (computeContextInformation): Ditto.
+ (computeCompletionProposals): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileCodeScanner.java (createRules): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileContentOutlinePage.java (AutomakefileContentProvider.getElements): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/AbstractElementListSelectionDialog.java (setSelectionListElements): Ditto.
+ (getWidgetSelection): Ditto.
+ (verifyCurrentSelection): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/AbstractMakefile.java (getMacroDefinitions): Ditto.
+ (getBuiltinInferenceRules): Ditto.
+ (getRules): Ditto.
+ (getInferenceRules): Ditto.
+ (getTargetRules): Ditto.
+ (getBuiltinMacroDefinitions): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/AddBuildTargetAction.java (getTargetRules): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/CompletionProposalComparator.java (compare): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/SelectionList.java (getSelection): Ditto.
+ (setElements): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/text/hover/AutoconfPrototype.java (AutoconfPrototype): Ditto.
+ (getParmName): Ditto.
+ (setParmName): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/text/hover/AutoconfTextHover.java (getAMDoc): Ditto.
+ (getMacroList): Ditto.
+ (getACDoc): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/AutoconfEditorPreferencePage.java (fHighlightingColorList): Ditto.
+ (ColorListContentProvider.getElements): Ditto.
+ (addTextKeyToCover): Ditto.
+ (createSyntaxPage): Ditto.
+ (createOverlayStore): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/AutomakeEditorPreferencePage.java (fHighlightingColorList): Ditto.
+ (ColorListContentProvider.getElements): Ditto.
+ (addTextKeyToCover): Ditto.
+ (createSyntaxPage): Ditto.
+ (createOverlayStore): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfAnnotationHover.java (getMarkersForLine): Ditto.
+ (select): Ditto.
+ (getHoverInfo): Ditto.
+ (formatMultipleMessages): Ditto.
+ (.createInformationControl): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfCodeScanner.java (AutoconfCodeScanner): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfMacroContentAssistProcessor.java (computeCompletionProposals): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfPartitionScanner.java (AutoconfPartitionScanner): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/outline/AutoconfContentOutlinePage.java (updateSelection): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElement.java (AutoconfElement): Ditto.
+ (toString): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfParser.java (ExprEndCondition): Ditto.
+ (ExprEndCondition.serialVersionUID): Ditto.
+ (BlockEndCondition): Ditto.
+ (checkBlockValidity): Ditto.
+ (BlockEndCondition.serialVersionUID): Ditto.
+
+2009-05-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAclocalAction.java (run): Fix to
+ add type for result of InvokeAction.executeCommand call.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoconfAction.java (run): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutomakeAction.java (run): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAction.java (separateTargets): Fix
+ compiler warnings.
+ (separateOptions): Ditto.
+ (executeCommand): Add type for resulting Collection. Regress previous fix until Galileo
+ build catches up to recent CDT changes.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfo.java (buildFile): Regress
+ previous fix until Galileo build catches up to recent CDT changes.
+ (getDefinedSymbols): Fix compiler warnings.
+ (getIncludePaths): Ditto.
+ (definedSymbols): Ditto.
+
+2009-05-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAction.java (executeCommand): Use new
+ launcher execute method which isn't deprecated and handle CoreException.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfo.java (buildFile): Ditto.
+
+2009-04-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #249199
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AbstractAutotoolsHandler.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AutoconfHandler.java: New file.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AutomakeHandler.java: New file.
+ * plugin.properties: Add messages for invoking autotools.
+ * plugin.xml: Change invoke autotools actions from Actions in an ActionSet to instead
+ use org.eclipse.ui.menus, org.eclipse.ui.commands, and org.eclipse.ui.handlers and
+ do not add these actions to project menu if not an Autotools project.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/AclocalHandler.java (execute): Implemented.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAclocalAction.java (run): Add check
+ for null container.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoconfAction.java (run): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutomakeAction.java (run): Ditto.
+
+2009-04-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #270518.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java (getPostBuildErrMsg):
+ New method.
+ (getPreBuildErrMsg): Ditto.
+ (getTargets): Fix warnings.
+ (makeArrayList): Ditto.
+ (build): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java (addMakeTargetsToManager): Add
+ check for non-existent Makefile.
+ (regenerateMakefiles): Check for Makefile at end and if not present, always return error.
+ * src/org/eclipse/linuxtools/cdt/autotools/Resources.properties: Change message for
+ non-generation of Makefile.
+
+2009-04-20 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/HTMLTextPresenter.java
+ (updatePresentation): Fix compiler warnings.
+
+2009-04-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #272924
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/OpenIncludeAction.java (run):
+ Fix compiler warnings.
+ (getIncludeStatement): Ditto.
+ (chooseFile): Ditto.
+ (.visit): Ditto.
+ (findFile): Ditto.
+
+2009-04-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #272923
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileMessages.java (getFormattedString): Fix
+ compiler warnings.
+
+2009-04-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #272922
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java (getAutogenArgs): Fix compiler
+ warnings.
+ (addMakeTargetsToManager): Ditto.
+ (runScript): Ditto.
+ (getConfigArgs): Ditto.
+ (MakeTargetComparator): Ditto.
+ (makeArray): Ditto.
+ (runCommand): Ditto.
+
+2009-04-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #272921
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeMessages.java (getFormattedString):
+ Cast 2nd argument for message fomatting to avoid compile warnings.
+
+2009-04-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #272920
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/wizards/AutotoolsWizardMessages.java (getFormattedString):
+ Cast 2nd argument for message formatting to avoid compiler warnings.
+ (getFormattedString): Ditto.
+
+2009-04-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #272919
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/AutotoolsPluginImages.java (makeIconFileURL):
+ Fix static member reference to avoid compiler warning.
+ (static initializer): Ditto.
+
+2009-04-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #272918
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsPlugin.java (getFormattedString): Cast
+ 2nd argument to avoid compiler warning.
+
+2009-04-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #272917
+ * .settings: Updated.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/preferences/AbstractEditorPreferencePage.java (validatePositiveNumber):
+ Properly template containers.
+ (getTextFields): Ditto.
+ (initializeFields): Ditto.
+ (updateStatus): Ditto.
+ (getCheckBoxes): Ditto.
+ (getNumberFields): Ditto.
+
+2009-04-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #272916.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileCodeScanner.java (createRules): Use templated
+ List.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/MakefileCodeScanner.java (createRules): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/editors/automake/AbstractMakefileCodeScanner.java (createTextAttribute):
+ Correctly access static member function.
+ (initializeRules): Use templated List.
+
+2009-04-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #270680
+
+ * plugin.xml: Fix Autotools properties page to only show up for Autotools nature.
+ Add gcc and g++ to Toolchain so indexing will work.
+
+2009-03-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java (build): Add
+ logic to also respect the makefile command being changed in the Makefile target.
+
+2009-03-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #269974
+
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java (build): Add
+ logic to handle a makefile target being for a subdirectory Makefile as opposed to
+ the main Makefile.
+
+2009-03-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java (build): Use
+ System.arraycopy rather than Arrays.copyOfRange because the latter is a 1.6 API.
+
+2009-03-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #265996
+
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java (regenerateMakefiles): If we are
+ doing full reconfigure, use same cleaning method on build directory as "clean" build.
+ (makeArray): New method to convert String into array of Strings.
+ * src/org/eclipse/linuxtools/cdt/autotools/Resources.properties: Add message when cleaning
+ build directory prior to reconfigure.
+
+2009-03-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #266451
+
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java (build): Use
+ property "line.separator" instead of "lineSeparator".
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java (initializeBuildConfigDirs):
+ Store a workspace-neutral builddir that can be moved to another workspace.
+ Use IBuilder.setBuildPath method instead of IBuilder.setBuildAttribute to set the new build
+ dir. Also, check to see if the builddir has changed first.
+
+2009-03-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #264935
+
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/CBuildStepsConsole.java: New file.
+ * plugin.xml: Add CBuildSteps console.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java (build): Perform
+ prebuild and postbuild steps if present.
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/ui/ConsoleMessages.properties: Add name
+ for Build Steps console.
+
+2009-02-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #265873
+
+ * META-INF/MANIFEST.MF: Add dependency on org.eclipse.core.net.
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsPlugin.java (stop): Add call to
+ ServiceTracker close() method.
+ (start): Add ServiceTracker open() call for IProxyService.
+ (getProxyService): New method to get IProxyService.
+
+2009-01-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #261717
+
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/text/hover/AutoconfTextHover.java (getMacroList):
+ Don't bother processing macros if the macro document turns out to be null.
+
+2009-01-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #261257
+
+ * META-INF/MANIFEST.MF: Update plug-in to add .qualifier to id and update
+ to 1.0.2.qualifier.
+ * plugin.xml: Update invoke autotools action set to set visible to true.
+
+2009-01-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java (getConfigArgs): If there
+ are no -- args in the user arguments, still pass them on to configure.
+
+2008-11-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #472731
+
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java (hasTargetBuilder):
+ Add check for ManagedProject being null which is apparently possible.
+
+2008-11-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeDocumentProvider.java: Change
+ Copyright to make Red Hat a contributor to the copyright of the original file modified to make
+ this new class.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeEditor.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/Automakefile.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileCodeScanner.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileContentOutlinePage.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileReconcilingStrategy.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileSourceConfiguration.java: Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakeMacroDefinitionRule.java: Ditto.
+
+2008-11-03 Andrew Overholt <overholt@redhat.com>
+
+ * build.properties: Remove libhoverdocs/.
+
+2008-10-31 Andrew Overholt <overholt@redhat.com>
+
+ * META-INF/MANIFEST.MF: Use plugin.properties for provider.
+ * plugin.properties: Add "(Incubation)" to Bundle-Name.
+
+2008-10-28 Andrew Overholt <overholt@redhat.com>
+
+ * META-INF/MANIFEST.MF: Update BREE to J2SE-1.5.
+
+2008-10-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Bump up release to 1.0.1.
+
+2008-10-10 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java (build): Add check for default
+ configuration coming back null from buildinfo.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsBuildPropertyPage.java (performDefaults):
+ Set make -w default to be true.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java (convertProject):
+ Set make -w project property to true and don't turn off indexer.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/NewAutotoolsCCProjectWizard.java (doRun): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/wizards/NewAutotoolsCProjectWizard.java (doRun): Ditto.
+
+2008-10-10 Jeff Johnston <jjohnstn@redhat.com>
+
+ Fix for #249416
+
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java: Fix addition of MakeTargets to run faster.
+ (addMakeTargetsToManager): Rewritten to not use MakeTargetManager addTarget or removeTarget methods which
+ cause a rewrite of the .cproject file each time.
+ (isValidTarget): Remove checking MakeTargetManager existing target.
+ (translateDocumentToCDTProject): New method which outputs the MakeTargets to the .cproject file.
+ (MakeTargetComparator): New Comparator for sorting MakeTargets.
+ (createTargetElement): New method.
+ * src/org/eclipse/linuxtools/cdt/autotools/Resources.properties: Add subtask message for refreshing Make Targets
+ which might take some time.
+
+2008-10-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ Fix for #249231
+
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java (getAutogenArgs): Add
+ support to resolve build macros.
+ (getConfigArgs): Ditto.
+ (initializeBuildConfigDirs): Ditto.
+
+2008-10-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ Fix for #249644.
+
+ * plugin.xml: Change visible to true for invoke autotools action set. Also add
+ new popupmenus for running autoconf directly on configure.ac or configure.in.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAclocalAction.java (run): Use
+ getCWD to get the relative current working directory and pass a string to the new
+ TwoInputDialog constructor.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutomakeAction.java (run): Ditto.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAction.java (getCWD): New method
+ to get the relative CWD for an autotools action.
+ * src/org/eclipse/linuxtools/cdt/autotools/actions/TwoInputDialog.java (createDialogArea):
+ Use CLabel instead of Label for first label (the CWD).
+ (TwoInputDialog): Change to accept a String for the first message instead of an IPath.
+ * src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java (addMakeTargetsToManager):
+ Temporarily disable.
+
+2008-10-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfo.java (getIncludePaths): Fix bug that
+ was properly resolving relative paths. Also add support for parsing -isystem specifiers and putting
+ the paths on the include path list.
+
+2008-09-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Change Eclipse-AutoStart over to Bundle-ActivationPolicy.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/LibHover.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/LibHoverMessages.java: Removed.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/LibHoverMessages.properties: Removed.
+ * plugin.xml: Remove CHelpProvider library hover extension as this functionality
+ has been moved into its own plugin.
+
+2008-09-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/editors/automake/AutomakefileCodeScanner.java (createRules):
+ Specify Token.UNDEFINED for WordRules default token. Otherwise, just getting the first possible
+ character of a word detector will result in default token being returned and no further parsing.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/editors/AutoconfCodeScanner.java (AutoconfCodeScanner):
+ Ditto.
+
+2008-09-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfoProvider.java (getScannerInformation):
+ Return null if project is not an Autotools project.
+ (unsubscribe): Check scanner info for null before accessing.
+
+2008-09-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ Refactored from com.redhat.eclipse.cdt.autotools to org.eclipse.linuxtools.cdt.autotools
+
+ * src/org/eclipse/linuxtools/cdt/autotools/internal/text/hover/AutoconfTextHover.java:
+ (AUTOCONF_MACROS_DOC_NAME): Change to use default URL pointing to sourceware.org.
+ (AUTOMAKE_MACROS_DOC_NAME): Ditto.
+ (getHoverDoc): Remove unused variable.
+ (getAMDoc): Modify to handle either a file or URL.
+ (getACDoc): Ditto.
+ (.createInformationControl): Switch to use non-deprecated constructor.
+ * src/org/eclipse/linuxtools/cdt/autotools/ui/LibHover.java (getLibHoverDocs): Modify to handle
+ either an external file name or URL.
+ (getLibHoverDocName): New method that returns default URL pointing to sourceware.org.
+ (HelpResource.getHref): Change to return URL.
+ (getFunctionInfo): Remove unread variable.
+
+2008-09-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder(hasTargetBuilder): Change logic
+ to look for ProjectType id rather than looking at builder id of configuration since ManagedProject
+ might have had configuration removed. Resolves #461647.
+ * plugin.xml: Fix typo in referenced nature of autoolsNature. Resolves #461201.
+
+2008-08-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Update version number to 1.0.0 and specify minimum/maximum versions
+ for all dependencies now that CDT 5.0 and Eclipse 3.4 must be used.
+
+2008-07-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * icons/ac16/acmacro_arg_obj.gif: New File.
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsEditorPropertyPage.java:
+ (getproject): Remove.
+ * META-INF/MANIFEST.MF: Add org.eclipse.core.filesystem as dependency.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java: Update imports.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/outline/AutoconfLabelProvider.java (getImage):
+ Use special image for acmacro argument.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutoconfEditorPreferencePage.java:
+ Update imports.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/AutotoolsPluginImages.java: Add image for
+ acmacro argument.
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/AutoconfTextHover.java: Update imports.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileReconcilingStrategy.java (reconcile):
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeDocumentProvider.java: Update imports.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileReconcilingStrategy.java (reconcile):
+ Call new form of parse method.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Directive.java:
+ (getMakefile): New required method.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/GNUAutomakefile.java:
+ (parse): New required method.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/AbstractMakefile.java:
+ (getFileURI): New required method.
+ (getMakefile): Ditto.
+ (setFileURI): Ditto.
+ (getMakefileReaderProvider): Ditto.
+ (parse): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/OpenDeclarationAction.java:
+ (openInEditor): Use URI instead of File.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/NullMakefile.java:
+ (parse): New required method to implement.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileDocumentProvider.java (createMakefile):
+ Add throws modifier.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroCodeScanner.java: Update imports.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroContentAssistProcessor.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroDamagerRepairer.java: Ditto.
+
+2008-07-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Bump release to 0.9.7.
+
+2008-04-17 14:12 Ed Swartz <ed.swartz@nokia.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/:
+ internal/ui/editors/autoconf/ProjectionFileUpdater.java,
+ ui/editors/AutoconfCodeScanner.java,
+ ui/editors/AutoconfPKGWordDetector.java,
+ ui/editors/outline/AutoconfLabelProvider.java: Collapse and
+ decorate long macro arguments, and notice PKG_ macros
+
+2008-04-17 13:13 Ed Swartz <ed.swartz@nokia.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/:
+ internal/ui/editors/autoconf/ProjectionFileUpdater.java,
+ ui/editors/AutoconfEditorMacroValidator.java,
+ ui/editors/parser/AutoconfElement.java,
+ ui/editors/parser/AutoconfParser.java: Fix editor collapsing and
+ remove line number metadata from AutoconfElement, since the "end
+ line" is only meaningful in the context of the client.
+
+2008-04-17 10:43 Ed Swartz <ed.swartz@nokia.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/:
+ AutoconfEditorMessages.properties,
+ outline/AutoconfContentOutlinePage.java,
+ parser/AutoconfCaseConditionElement.java,
+ parser/AutoconfCaseElement.java, parser/AutoconfElement.java,
+ parser/AutoconfElifElement.java, parser/AutoconfElseElement.java,
+ parser/AutoconfForElement.java, parser/AutoconfIfElement.java,
+ parser/AutoconfMacroDetector.java,
+ parser/AutoconfMacroElement.java,
+ parser/AutoconfOutlineErrorHandler.java,
+ parser/AutoconfParser.java, parser/AutoconfRootElement.java,
+ parser/AutoconfTokenizer.java, parser/AutoconfWhileElement.java,
+ parser/OldAutoconfParser.java, parser/Token.java: More autoconf
+ parser work. Remove old parser and standardize AST node
+ constructors. Add more tests and fix some bugs.
+
+2008-04-10 15:40 Ed Swartz <ed.swartz@nokia.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/:
+ internal/ui/editors/autoconf/ProjectionFileUpdater.java,
+ ui/editors/AutoconfEditor.java,
+ ui/editors/AutoconfEditorMacroValidator.java,
+ ui/editors/AutoconfEditorMessages.properties,
+ ui/editors/AutoconfErrorHandler.java,
+ ui/editors/AutoconfReconcilingStrategy.java,
+ ui/editors/outline/AutoconfLabelProvider.java,
+ ui/editors/parser/AutoconfElement.java,
+ ui/editors/parser/AutoconfMacroArgumentElement.java,
+ ui/editors/parser/AutoconfMacroElement.java,
+ ui/editors/parser/AutoconfParser.java,
+ ui/editors/parser/AutoconfParser2.java,
+ ui/editors/parser/AutoconfSelectElement.java,
+ ui/editors/parser/AutoconfTokenizer.java,
+ ui/editors/parser/AutoconfUntilElement.java,
+ ui/editors/parser/AutoconfWhileElement.java,
+ ui/editors/parser/ITokenConstants.java,
+ ui/editors/parser/OldAutoconfParser.java,
+ ui/editors/parser/ParseException.java: More autoconf parser work.
+
+2008-04-09 14:38 Ed Swartz <ed.swartz@nokia.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/:
+ AutoconfEditorMacroValidator.java,
+ AutoconfEditorMessages.properties, AutoconfErrorHandler.java,
+ parser/AutoconfCaseConditionElement.java,
+ parser/AutoconfElement.java,
+ parser/AutoconfMacroArgumentElement.java,
+ parser/AutoconfMacroDetector.java, parser/AutoconfParser.java,
+ parser/AutoconfParser2.java, parser/AutoconfTokenizer.java,
+ parser/IAutoconfErrorHandler.java,
+ parser/IAutoconfMacroDetector.java, parser/IMacroDetector.java,
+ parser/ITokenConstants.java, parser/Token.java: New autoconf
+ parser work in progress
+
+2008-04-07 14:06 Ed Swartz <ed.swartz@nokia.com>
+
+ * META-INF/MANIFEST.MF,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditorMacroValidator.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfErrorHandler.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroPartitionRule.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroWordDetector.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfReconcilingStrategy.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/ParseException.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/outline/AutoconfLabelProvider.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfElement.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfMacroArgumentElement.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfMacroElement.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfOutlineErrorHandler.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfParser.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/IAutoconfErrorHandler.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/IAutoconfMacroValidator.java,
+ src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/ParseException.java:
+ Initial checkpoint for autotools parser changes
+
+
+2008-01-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/actions/AclocalHandler.java: New file for
+ future menu support.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsProjectNature.java: New file.
+ * META-INF/MANIFEST.MF: Release updated.
+ * plugin.properties: Add some new messages for autotools tool invocation.
+ * plugin.xml: Update release to 0.9.6. Add autotools project nature. Make
+ autotools commands enablement dependent on autotools project nature.
+ Specify enablesFor 1 for all autotools tool actions.
+ * src/com/redhat/eclipse/cdt/autotools/actions/AbstractTargetAction.java (setSelectedContainer): New
+ method for future menu support.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java (hasTargetBuilder): Use
+ AutotoolsProjectNature static addAutotoolsBuilder method.
+ (addAutotoolsBuilder): Moved to AutotoolsProjectNature.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (runScript): New method to
+ run scripts.
+ (regenerateMakefiles): Use runScript method to run configuration scripts. Use
+ runCommand for executables like "make".
+ (runCommand): Added comments.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java (convertProject):
+ Add new autotools project nature.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/NewAutotoolsCCProjectWizard.java (addNature):
+ Ditto plus set up autotools builder.
+ (doRun): Don't set up autotools builder since it is done in addNature.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/NewAutotoolsCProjectWizard.java (addNature):
+ Add new autotools project nature and set up autotools builder.
+ (doRun): Don't set up autotools builder since it is done in addNature.
+
+2007-12-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Update release to 0.9.5.3.
+
+2007-12-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #412651, #412661
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (getConfigurePath): Fetch tool command
+ name instead of hard-wiring to "configure".
+ (autogenExists): Fetch command name from autogen.sh options.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java: (removeBuildDir): New method.
+ (clean): If user has specified remove build directory, then use removeBuildDir method.
+ * src/com/redhat/eclipse/cdt/autotools/Resources.properties: New messages for supporting
+ build directory removal operation.
+
+2007-11-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/LibHoverMessages.java: New File.
+ * src/com/redhat/eclipse/cdt/autotools/ui/LibHoverMessages.properties: New File.
+ * src/com/redhat/eclipse/cdt/autotools/ui/LibHover.java: Add references to
+ LibHoverMessages instead of hard-coded strings.
+ * libhoverdocs/glibc-2.7-2.xml: Regenerated.
+
+2007-11-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/LibHover.java
+ (HelpResource.getHref): Use latest glibc doc version.
+ (getLibHoverDocs): Ditto.
+ * libhoverdocs/glibc-2.7-2.xml: New C library docs based on glibc-2.7-2 manual.
+ * libhoverdocs/glibc.xml: Old glibc docs removed.
+
+2007-11-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Update release to 0.9.5.2. Also clear all OS lists for build definitions to
+ default to "all" OSes.
+
+2007-11-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #385991
+ * src/com/redhat/eclipse/cdt/autotools/ui/LibHover.java (getMatchingFunctions): New method.
+ (FunctionSummary.compareTo): New method to support Comparable interface.
+ (FunctionSummary.getIncludes): Fix to avoid type cast exception/
+ (getFunctionInfo): Revised to call getFunctionSummaryFromNode method.
+ (FunctionSummary): Add Comparable interface.
+ (getFunctionSummaryFromNode): New method.
+ (FunctionSummary.FunctionPrototypeSummary.getPrototypeString): Add NLS
+ comments.
+
+
+2007-11-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsToolsPropertyPage.java: New File for
+ setting tool paths for the various autotools.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAclocalAction.java (run): Use the
+ project properties setting to determine what tools to use.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAutoconfAction.java (run): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAutomakeAction.java (run): Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsPropertyMessages.properties: New
+ messages.
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsPropertyConstants.java: Add new
+ constants for setting the tool paths for aclocal, automake, and autoconf.
+ * plugin.xml: Add tools settings property page for Autotools.
+ * plugin.properties: New message for added property page.
+
+2007-10-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #359311, #359301, #359321
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacro.java: New File.
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsPropertyManager.java: New File.
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/IProjectPropertyListener.java: New File.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsProjectPropertyTester.java: New File.
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/IPropertyChangeManager.java: New File.
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/AutoconfTextHover.java:
+ (getAMDoc): New method.
+ (fBindingService):
+ (getAutomakeMacrosDocName): Modified to take a version parameter.
+ (getAutoconfMacrosDocName): Ditto.
+ (getPrototype): Changed to take an editor input.
+ (getAutoconfMacrosDocName): Ditto.
+ (AutotoolsHoverDoc): New internal class.
+ (getMacroList): New method to merge AC and AM macros together based on version
+ properties.
+ (getACDoc): New method.
+ (getIndexedInfo): Changed to take editor input.
+ (getHoverDoc): New metohd.
+ (getIndexedInfoFromDocument): New method that will parse the given document.
+ (getDefaultAutoconfMacrosDocName): New method to get the default preference
+ Autoconf macros doc name.
+ (getHoverRegion): Modified to get editor from elsewhere.
+ (getDefaultAutomakeMacrosDocName): New method to get the default preference
+ Autoconf AM macros doc name.
+ (getHoverInfo): Changed to take an editor input.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroParser.java: Removed.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/editors/autoconf/ProjectionFileUpdater.java (initialize):
+ (processReconcile): Use stored editor.
+ (install): Change input parameter to AutoconfEditor.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfParser.java (parseMacro):
+ (parse): Modified to take IEditorInput argument and pass that on to AutoconfErrorHandler.
+ (AutoconfParser): Modified to take an editor parameter.
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsDefaultBuildDirHandler.java: Updated
+ copyright to just Red Hat Inc.
+ * plugin.properties: New messages.
+ * plugin.xml: Add ICPropertyTab extension for editor properties. Add properties
+ page for Autotools properties.
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsEditorPropertyPage.java: New file.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsPropertyPage.java: Rewritten.
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsBuildPropertyPage.java:
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsPropertyConstants.java:
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfErrorHandler.java (AutoconfErrorHandler):
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java
+ (AutoconfSourceViewerConfiguration): Take editor as parameter.
+ (getPresentationReconciler): Pass along or use editor passed in.
+ (getContentAssistant): Ditto.
+ (getReconciler): Ditto.
+ (getTextHover): Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java (connect):
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroDamagerRepairer.java:
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroContentAssistProcessor.java (computeCompletionProposals):
+ (AutoconfMacroContentAssistProcessor): Take editor input.
+ (computeMacroStart): Use editor.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfReconcilingStrategy.java (reconcile):
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java: Make this implement
+ IProjectPropertyListener
+ (handlePreferenceStoreChanged): Modified to call handleVersionChange method if a
+ autoconf or automake macro version preference change has occurred.
+ (doSetInput): Deregister editor as property listener if editor was for a project
+ file previously and register editor as property listener if editor is now for a
+ project.
+ (getAutoconfDocumentProvider): Make static.
+ (getAutoconfCodeScanner): Pass this to constructor.
+ (handleVersionChange): New method.
+ (handleProjectPropertyChanged): New IProjectPropertyListener method.
+ (initializeEditor): Pass this to source viewer configuration constructor.
+ (getAutoconfParser): Pass this to constructor.
+ (dispose): Deregister editor as property listener for a project if applicable.
+ (getAutoconfMacroCodeScanner): Pass this to constructor.
+
+2007-10-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroCodeScanner.java: New File.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/RestrictedEndOfLineRule.java: New File.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfPartitionScanner.java (AutoconfPartitionScanner):
+ Move macro partitioning ahead of comments.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java (getPresentationReconciler):
+ Use AutoconfMacroCodeScanner for macro damager repairer.
+ (getContentAssistant): Use AutoconfMacroCodeScanner for macro content assist.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfCodeScanner.java (nextToken):
+ New method that simply defaults to super.nextToken to be used for debugging purposes.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java (getAutoconfMacroCodeScanner):
+
+ * plugin.xml: Update to release 0.9.5.1.
+
+2007-10-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #330701
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsBuildPropertyPage.java: New File to
+ add property settings for how to clean an Autotools project and whether or not to use the
+ current Autotools info scanner.
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsPropertyMessages.java: New File.
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsPropertyConstants.java: New File.
+ * src/com/redhat/eclipse/cdt/autotools/ui/properties/AutotoolsPropertyMessages.properties: New File.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfParser.java (parseLines):
+ Process macros ahead of stripping out comments as this prevents removing quotes inside the
+ macro which have precedence over # (e.g. used to specify #include and not meaning a
+ comment to end of line).
+ (parseWhile): Change comment typo.
+ (parseFor): Ditto.
+ * plugin.properties: Add new messages regarding property pages.
+ * plugin.xml: Add Autotools build IcPropertyTab (AutotoolsBuildPropertyPage). Also
+ specify that AutotoolsDefaultBuildDirHandler is also an option applicability tester.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutotoolsPreferencesMessages.properties:
+ Change the message for autoconf and automake versions to include the word "Default".
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfPartitioner.java (computePartitioning):
+ Add override method as way to print out partitions. Cannot compute and print out partitions at
+ connect time as in 4.0.1 we initially are given an empty document that is later filled.
+ (printPartitions): Change argument to be an array of partition regions.
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java (build):
+ (clean): New method. Pay attention to user clean method preference.
+ (getTargets): Pay attention to user clean target preference.
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfo.java (getCompilationString):
+ Pay attention to user preference on scanner info retrieval and disable if need be.
+ (createIncludeChain): Use AutotoolsPropertyConstants to get property names to use.
+ (followIncludeChain): Ditto.
+ (getMakefile): Add nls comments.
+ (AutotoolsScannerInfo): Ditto.
+ (getDefinedSymbols): Ditto.
+ (buildFile): Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (regenerateMakefiles): Don't
+ call AutotoolsScannerInfoProvider.setDirty method anymore. Instead, set a project property
+ to indicate the scanner info is dirty.
+ (addMakeTargetsToManager): Add a try/catch statement to prevent duplicate entries from
+ stopping loop that adds make targets.
+ (initializeBuildConfigDirs): Formatting change.
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfoProvider.java (getScannerInformation):
+ Add a check for project property indicating the scanner info is dirty in which case call
+ setDirty method.
+ (setDirty): Make private.
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsDefaultBuildDirHandler.java: Now implements
+ IOptionApplicability.
+ (isOptionEnabled): New interface method to implement.
+ (isOptionVisible): Ditto.
+ (isOptionUsedInCommandLine): Ditto (set to false).
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsBuilder.java (getProject): New method.
+ (AutotoolsBuilder): Add project argument.
+ (getCleanBuildTarget): Implemented using new Autotools CLEAN_MAKE_TARGET property.
+
+ * src/com/redhat/eclipse/cdt/autotools/Resources.properties: Add new message.
+
+2007-10-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #323641
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfo.java (getDefinedSymbols): Use
+ the patch provided by Jose Fonseca to provide a proper regular expression for parsing
+ the defined symbols from the make output.
+
+2007-10-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Ensure the ids for InvokeAutoconf and InvokeAutomake actions are unique.
+
+2007-10-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsDefaultBuildDirHandler.java (handleValue):
+ Add some place holders for supporting the user manually setting the build directory.
+ * src/com/redhat/eclipse/cdt/autotools/Resources.properties: Add some dialog messages for
+ future usage.
+ * plugin.xml: Update version to 0.9.5.
+
+2007-10-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #315811
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsDefaultBuildDirHandler.java: New File.
+ * plugin.xml: Change build definition to version 4.0.0. Remove unused project converter
+ extension. For build directory, specify an option handler which is implemented by
+ AutotoolsDefaultBuildDirHandler.
+
+2007-09-24 Andrew Overholt <overholt@redhat.com>
+
+ * plugin.xml: Update version to 0.9.4.
+
+2007-09-21 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAutoconfAction.java (run):
+ Fix array indexing.
+
+2007-09-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Add ELF and GNU_ELF binary parsers as default for an Autotools project.
+
+2007-09-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #274551
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfo.java (getCompilationString): Support
+ the case where the file isn't part of the build and there is no scanner info to gather.
+ (buildFile): Minor cosmetic changes.
+
+ * META-INF/MANIFEST.MF: Update release.
+
+2007-09-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (regenerateMakefiles): Add a
+ clause to check for the case whereby there was no way to generate the Makefile and one
+ didn't already exist.
+ * src/com/redhat/eclipse/cdt/autotools/Resources.properties (Makegenerator.didnt.generate):
+ New message.
+
+2007-08-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #254248
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/outline/AutoconfContentOutlinePage.java (selectionChanged):
+ Make call to editor.selectAndReveal method to focus editor page on selected outline item.
+
+2007-08-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #254246
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/CWordFinder.java (findWord): Fix
+ to handle being in the first word of the file.
+
+2007-08-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #253331
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java (build): Enable
+ autobuilding.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (regenerateMakefiles): If
+ the configuration options change, clean the previous build directory so a full rebuild
+ will occur.
+
+2007-08-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * META-INF/MANIFEST.MF: Change release to 0.9.2 and specify minimum java runtime as
+ 1.4.
+
+2007-08-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #251412
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java (addAutotoolsBuilder):
+ When calling IProject.setDescription(), pass a NullProgressMonitor instead of
+ null, despite what the function API says because an isCancelled() call may occur
+ and will result in an exception thrown. Also, use a try/catch block to handle any
+ of the legitimate exceptions that might occur in this operation.
+
+2007-08-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/Resources.properties: Add new messages
+ for new C and C++ project wizards.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/NewAutotoolsProjectWizard.java: Renamed...
+ * src/com/redhat/eclipse/cdt/autotools/wizards/NewAutotoolsCProjectWizard.java: ..to this.
+ (doRun): Rewritten based on conversion wizard to properly set up project.
+ (getProjectType): New method.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/NewAutotoolsCCProjectWizard.java: New file
+ copied from NewAutotoolsCProjectWizard but inherits from NewCCProjectWizard.
+
+ * icons/dlcl16/newc_app.gif: New gif.
+ * icons/dlcl16/newcc_app.gif: Ditto.
+ * icons/elcl16/newc_app.gif: Ditto.
+ * icons/elcl16/newcc_app.gif: Ditto.
+
+ * plugin.properties: Add new strings for new C and C++ project wizards.
+ * plugin.xml: Add new C and C++ project wizards.
+
+2007-08-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #251604
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (getAutogenArgs): New method.
+ (regenerateMakefiles): Pass user-specified autogen.sh options when invoking autogen.sh.
+ * plugin.xml: Add autogen.sh tool support with user options.
+ * plugin.properties: Add new autogen tool message strings.
+
+2007-07-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java
+ (handlePreferenceStoreChanged): Add support for changing automake macros version.
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/AutoconfTextHover.java
+ (getAutomakeMacrosDocument):
+ New method.
+ (getIndexInfo, getPrototype): Create private versions of these that take a document
+ as an input parameter. Change the public static methods to call the private
+ versions with the autoconf macro document and the automake macro document, if
+ the macro isn't found yet.
+ (init): Set up the autoconf macro document and automake macro document.
+ (reinit): Reset both the autoconf and automake macro documents.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutoconfEditorPreferencePage.java
+ (LATEST_VERSION): Replace with LATEST_AC_VERSION and LATEST_AM_VERSION.
+ (createOverlayStore): Add automake version setting.
+ (initializeVersion): Replace with initializeACVersion and initializeAMVersion.
+ (initialize): Call the two replacements of initializeVersion.
+ (createVersionTabContent): Add automake version support.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutotoolsEditorPreferenceConstants.java
+ Add automake version support.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutotoolsPreferencesMessages.properties:
+ Add messages used in automake version preference.
+
+ * libhoverdocs/ammacros-1.4-p6.xml: New automake macro docs for 1.4-p6.
+ * libhoverdocs/ammacros-1.9.5.xml: New automake macro docs for 1.9.5.
+ * libhoverdocs/ammacros-1.9.6.xml: New automake macro docs for 1.9.6.
+
+2007-07-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * MANIFEST.MF: Bump up release to 0.9.1.
+
+2007-07-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/GNUAutomakefile.java
+ (parse): Fix Automake if/else constructs to be child/parent directives as appropriate.
+ (bypassIf, bypassElse, isTrue): Removed.
+ (parseIf): Add rules parameter.
+ (addDirective): Remove caveat when dealing with automake if/else.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/IAutomakeConditional.java
+ (getRules, setRules): New methods for the interface.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Else.java: Add ICommand
+ interface and implement required methods including new ones add to IAutomakeConditional.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/If.java: Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeErrorHandler.java
+ (update): Change to call checkChildren for makefile.
+ (checkChildren): New recursive method to check for bad directives.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileContentOutlinePage.java
+ (AutomakefileLabelProvider.getImage): Add support for IAutomakeConditional elements and
+ remove reference to AutomakeIfElse class.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeMacroDefinitionRule.java
+ (isValidCharacter): Add support for "+-$()@" chars.
+
+2007-07-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/GNUAutomakefile.java
+ (parseIf): Add @if support.
+ (isTrue): Default to true for if conditions.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/GNUMakefileConstants.java:
+ Add @if and @endif macros.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/GNUMakefileUtil.java
+ (isIf): Add @if support.
+ (isEndif): Add @endif support.
+
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileCodeScanner.java:
+ Add support for @if and @endif keywords.
+ (createRules): Add support for whitespace and simple identifiers.
+
+2007-07-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #247518
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileCodeScanner.java
+ (createRules): Use new AutoconfSubstRule class for identifying autoconf substituitions.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileUtil.java (isConfigMacro):
+ Refine so that macro must start and end with @ and contain at least one valid char.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutoconfSubstRule.java: New file.
+
+2007-07-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #246153
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeDocumentProvider.java (createFileInfo):
+ Rewrite to handle workspace files as well as external ones.
+ (createMakefile): Change to accept a file name rather than an IFile.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor
+ (getDefault): New method.
+ (doSetInput): Ditto.
+ (initializeEditor): Add a few lines that would have been performed by
+ base class initializeEditor.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeErrorHandler
+ (AutomakeMarker): New internal class for error marking.
+ (update): Switch to using internal markers and directly updating the
+ Annotation model.
+ (removeExistingMarkers): Directly reference the annotation model.
+ (AutomakeErrorHandler): Fetch and store the annotation model for the input.
+ Change prototype.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileReconcilingStrategy.java
+ (AutomakefileReconcilingStrategy): Change to store an IEditorInput. Use new
+ AutomakeErrorHandler interface.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileEditor.java
+ (initializeEditor): Remove fixme comment.
+
+2007-07-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #246783
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java:
+ (initializeEditor): Call AutotoolsEditorPreferenceConstants.initializeDefaultValues
+ to ensure the editor default values are set.
+
+2007-06-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #246154
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsBuilder.java: New proxy
+ class to wrap an existing IBuilder and override build path functionality.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java:
+ (build): Wrap the builder using the new AutotoolsBuilder class so the
+ build path will work properly.
+
+2007-06-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #246134
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfErrorHandler.java:
+ (AutoconfErrorHandler): Change constructor to just take IDocument input.
+ (AutoconfMarker): New private class for marking autoconf document.
+ (createMarker): New private method to create AutoconfMarker in document.
+ (handleError): Create a marker and add it to annotation model durectly
+ instead of using MarkerUtilities.
+ (removeAllMarkers): Remove directly from annotation model instead of using file.
+ (removeExistingMarkers): Ditto.
+ (getDocument): New method.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java:
+ (connect): Change constructor call to AutoconfErrorHandler.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java:
+ (getViewer): New method to return the source viewer for the editor.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroParser.java:
+ (AutoconfMacroParser): Change constructor call to AutoconfErrorHandler.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfParser.java:
+ Change all uses of AutoconfOutlineErrorHandler to AutoconfErrorHandler.
+
+2007-06-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #245820
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileUtil.java (isAutomakeCommand):
+ New method.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Conditional.java (isIf): New
+ method.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/IAutomakeConditional.java:
+ New interface.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Else.java: Changed to
+ implement new IAutomakeConditional interface.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/If.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/GNUAutomakefile.java
+ (parse): Add Automake if/else parsing and support for Makefile.in processed if/else blocks.
+ (bypassIf, bypassElse, parseIf): New private methods.
+ (addDirective): Don't add directives to an Automake if or else construct.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/GNUMakefileConstants.java:
+ Add CONDITIONAL_IF constant.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/GNUMakefileUtil.java
+ (isIf): New method.
+
+2007-06-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileEditorTogglePresentationAction.java:
+ New file.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileEditorActionContributor.java: Ditto.
+
+ * icons/etool16/alphab_sort_co.gif: New icon.
+ * icons/etool16/build_menu.gif: Ditto.
+ * icons/etool16/convert_normal.gif: Ditto.
+ * icons/etool16/make.gif: Ditto.
+ * icons/etool16/makefile.gif: Ditto.
+ * icons/etool16/newc_app.gif: Ditto.
+ * icons/etool16/newcc_app.gif: Ditto.
+ * icons/etool16/segment_edit.gif: Ditto.
+ * icons/etool16/target_add.gif: Ditto.
+ * icons/etool16/target_build.gif: Ditto.
+ * icons/etool16/target_delete.gif: Ditto.
+ * icons/etool16/target_edit.gif: Ditto.
+ * icons/etool16/target_filter.gif: Ditto.
+ * icons/etool16/update_old.gif: Ditto.
+
+ * plugin.xml: Change Automake editor to use new internal MakefileEditorActionContributor
+ class rather than point to the internal one in internal CDT make.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentSetupParticipant.java:
+ (setup): Don't bother registering this as document listener.
+ (documentAboutToBeChanged): Remove body of method as this is no longer needed.
+
+2007-06-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #245611
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroContentAssistProcessor.java
+ (getMacroList): Change to call AutoconfTextHover to get the name of the macros
+ document since it will depend on current preferences.
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/AutoconfTextHover.java
+ (getAutoconfMacrosDocName): New static method.
+
+2007-06-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libhoverdocs/acmacros-2.59.xml: New autoconf hover text and syntax info
+ for autoconf 2.59.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutoconfEditorPreferencePage.java:
+ Add 2.59 support.
+
+2007-06-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libhoverdocs/acmacros-2.13.xml: New autoconf hover text and syntax info
+ for autoconf 2.13.
+ * libhoverdocs/acmacros-2.61.xml: New autoconf hover text and syntax info
+ for autoconf 2.61.
+ * libhoverdocs/acmacros.xml: Replaced with files above.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover (init): Change document
+ to be dependent on autoconf version preference.
+ (reinit): New method to force reinitialization of help document.
+ (getPrototype): Fix to allow for earlier versions which specify multiple
+ prototypes in one using "[,", for example.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutoconfEditorPreferencePage.java:
+ Add version preference support.
+ (createOverlayStore): Add version support.
+ (createContents): Add version tab.
+ (initializeVersion): New method.
+ (createVersionTabContents): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutotoolsEditorPreferenceConstants.java:
+ Add AUTOCONF_VERSION and initialize the default autoconf version value to be the
+ highest possible.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutotoolsPreferencesMessages.properties:
+ Add new messages pertaining to autoconf version.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java (handlePreferenceStoreChanged):
+ If the autoconf version is changed, invalidate the document and force a reparse.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditorMessages.java (getFormattedString):
+ Add new method which takes 3 replacement strings.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditorMessages.properties:
+ Change macro error messages to take the autoconf version as a parameter.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfParser.java: Fix
+ typo for too many args message id.
+ (parseMacro): For wrong number of argument messages, get the current autoconf version preference
+ and pass it in to the message.
+
+2007-06-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/Automakefile.java: Rebase on
+ GNUAutomakefile class. Remove all parsing methods.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeDocumentProvider.java: Fix
+ comments to refer to internal Autotools classes as appropriate.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Conditional.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/DefineVariable.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/DeleteOnErrorRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Else.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Endef.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Endif.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/ExportAllVariablesRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/ExternalEditorInput.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/GNUAutomakefile.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/GNUTargetRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/GNUVariableDef.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Ifdef.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Ifeq.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Ifndef.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Ifneq.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Include.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/IntermediateRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/LowResolutionTimeRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/NotParallelRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/OverrideDefine.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/OverrideVariable.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/PhonyRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/SecondaryRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/StaticTargetRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/TargetVariable.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Terminal.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/UnExport.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/VPath.java: Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/ExternalEditorInput.java: Update comments
+ that should refer to internal Autotools classes.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/MakefileDocumentProvider.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/ProjectionMakefileUpdater.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/WorkingCopyManager.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/editors/autoconf/ProjectionFileUpdater.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutoconfEditorPreferencePage.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutomakeEditorPreferencePage.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java: Ditto.
+
+2007-06-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #243184
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeConfigMacro.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/Automakefile.java (parse): Add
+ support for autoconf macros.
+ (parseConfigMacro): New method.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileCodeScanner.java
+ (createRules): Add rule for configure macros.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileContentOutlinePage.java
+ (getImage): Add support for AutomakeConfigMacro.
+ (getText): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileUtil.java (isConfigMacro):
+ New method.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/MakeUIImages.java: Add acmacro_obj image.
+ * icons/obj16/acmacro_obj.gif: New icon.
+
+2007-06-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/actions/BuildSpecial.java: Removed. No
+ longer used now that MakeTargets work.
+ * src/com/redhat/eclipse/cdt/autotools/actions/CheckboxTablePart.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/MakeContentProvider.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/MakeTargetDialog.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/SharedPart.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/SharedPartWithButtons.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/StructuredViewerPart.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/TargetListViewerPart.java: Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/editors/autoconf/ProjectionFileUpdater.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutotoolsEditorPreferenceConstants.java:
+ Add new constants for Autoconf editor folding.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/IAutotoolsEditor.java: New interface.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java: Make class
+ implement IAutotoolsEditor interface. This allows ProjectionFileUpdater class to
+ work. Add folding support based on MakefileEditor class.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfElement.java
+ (getStartOffset, setStartOffset, getEndLineNumber, setEndLineNumber): New methods.
+ (getEndOffset, setEndOffset, getLastChild): Ditto.
+ (AutoconfElement): New constructor which takes start offset.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfCaseElement.java:
+ Add new constructor to match that of AutoconfElement.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfElifElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfElseElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfForElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfIfElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfMacroElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfWhileElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfParser.java:
+ (AutoconfLineReader): New internal class to replace LineNumberReader class. Change
+ all internal parse routines to use this class instead of LineNumberReader.
+ (parseLines): When a semicolon is found that denotes a multistatement line, update the end
+ offset of the previous construct and set the start offset for the next construct to be after
+ the semicolon and additional whitespace.
+ (parseMacro, parseIf, parseElif, parseElse, parseCase, parseFor, parseWhile): Construct with
+ start offset based on previous mark. After processing, set the end line number for the
+ element.
+
+2007-06-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java:
+ Refactor AutomakeEditorPreferenceConstants to AutotoolsEditorPreferenceConstants.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/ColorManager.java: Moved from here to..
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/ColorManager.java: ...here
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditorFactory.java:
+ Changed due to movement of ColorManager class.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileCodeScanner.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/AbstractMakefileCodeScanner.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileCodeScanner.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileSourceConfiguration.java: Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AbstractAutomakeEditorPreferencePaga.java:
+ Refactored to be...
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AbstractEditorPreferencePage.java:
+ ...this.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutoconfEditorPreferencePage.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutomakeEditorPreferenceConstants.java:
+ Refactored to be...
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutotoolsEditorPreferenceConstants.java:
+ ...this.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutomakePreferencesMessages.java:
+ Refactored to be...
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutotoolsPreferencesMessages.java:
+ ...this.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutomakePreferencesMessages.properties:
+ Refactored to be...
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutotoolsPreferencesMessages.properties:
+ ...this.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutomakeEditorPreferencePage.java:
+ Use new refactored classes.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfCodeScanner.java: Add color preference
+ support.
+ (AutoconfCodeScanner): A color provider is no longer needed as input.
+ (getToken, getTokenProperties, addToken, indexOf, affectsBehavior): New methods.
+ (adaptToPreferenceChange, adaptToColorChange, adaptToStyleChange); Ditto.
+ (createTextAttribute, initialize): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfColorProvider.java: Removed and replaced
+ with ColorManager.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java: Change to use
+ ColorManager.
+ (initializeEditor): Set the preference change store and initialize the editor preferences.
+ (getAutoconfCodeScanner): Changed to match new AutoconfCodeScanner constructor.
+ (getPreferenceColor): New method.
+ (getColorProvider): Removed.
+ (handlePreferenceStoreChanged): New method.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java:
+ Inherit from TextSourceViewerConfiguration. Store the preference store.
+ * plugin.properties: Add new internationalized string for Autoconf editor preferences.
+ * plugin.xml: Add Autoconf editor preference page.
+
+2007-05-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #241908
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (addMakeTargetsToManager):
+ Change builder id used to one used in plugin.xml.
+
+2007-05-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #241782
+ * src/com/redhat/eclipse/cdt/autotools/Resources.properties: Add new message
+ for Autotools preference page.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java
+ (initializeEditor): Initialize color and folding preference defaults.
+ (handlePreferenceStoreChanges): Call super method to refresh editor.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/ColorManager.java:
+ Change constants to be in Autotools domain.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AbstractAutomakeEditorPreferencePage.java:
+ New file.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutomakeEditorPreferenceConstants.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutomakeEditorPreferencePage.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutomakePreferencesMessages.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutomakePreferencesMessages.properties:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/AutotoolsPreferencePage.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/ColorEditor.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/OverlayPreferenceStore.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/StatusInfo.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/preferences/TabFolderLayout.java: Ditto.
+
+ * plugin.properties: Add new internationalized strings from plugin.xml.
+ * plugin.xml: Add Autotools and Automake Editor preference pages. Also
+ clean up some extensions to use internationalized strings.
+
+2007-05-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #241612
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsPlugin.java:
+ Add utility methods from MakeUIPlugin to log messages and
+ issue error dialogs, etc..
+ * src/com/redhat/eclipse/cdt/autotools/actions/MakeTargetDialog.java:
+ Use MakeUIMessages instead of MakeUIPlugin for messages.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeCompletionProcessor.java:
+ Replace internal CDT classes with internal Autotools classes.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeDocumentProvider.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditorFactory.java:
+ Ditto.
+ (getPreferenceColor): New method.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeErrorHandler.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/Automakefile.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileCodeScanner.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileContentOutlinePage.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileReconcilingStrategy.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileSourceConfiguration.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeIfElse.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeMacroDefinitionRule.java:
+ Ditto.
+ (evaluate): Remove unused local variable ch.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeTextHover.java: Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/AbstractElementListSelectionDialog.java:
+ New file transported from CDT internals.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/AbstractMakefile.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/AbstractMakefileCodeScanner.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/AddBuildTargetAction.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/ArchiveTarget.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/BadDirective.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/ColorManager.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Command.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Comment.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/CompletionProposalComparator.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/DefaultRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Directive.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/EditorUtility.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/ElementListSelectionDialog.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/EmptyLine.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/ExternalEditorInput.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/ExternalEditorInputFactory: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/GNUMakefileConstants.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/IgnoreRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/IMakefileDocumentProvider.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/IMakefileEditorActionDefinitionIds.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/InferenceRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/IReconcilingParticipant.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/ISelectionValidator.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/ITranslationUnitEditorInput.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/LexicalSortingAction.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MacroDefinition.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MacroDefinitionRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MacroReferenceRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileAnnotationHover.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileCodeScanner.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileCompletionProcessor.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileConstants.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileContentOutlinePage.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileDocumentProvider.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileDocumentSetupParticipant.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileEditor.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileEditorPreferenceConstants.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileMessages.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefilePartitionScanner.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileReader.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileReconcilingStrategy.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakeFileResources.properties: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileSourceConfiguration.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileStorageDocumentProvider.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileTextHover.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MakefileWordDetector.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/MessageLine.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/NullMakefile.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/OpenDeclarationAction.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/OpenIncludeAction.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Parent.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/PosixMakefileUtil.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/PosixRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/PreciousRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/ProjectionMakefileUpdater.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Rule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/SccsGetRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/SelectionList.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/SilentRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/SpecialRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/StatusInfo.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/StringMatcher.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/SuffixesRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Target.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/TargetRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/TwoArrayQuickSort.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/Util.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/VariableDefinition.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/WordPartDetector.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/editors/automake/WorkingCopyManager.java: Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/AutotoolsPluginImages.java: Switch to
+ use new ac16 icon directory instead of etools16.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ErrorParserBlock.java: Use
+ MakeUIMessages instead of MakeUIPlugin for messages.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/MakeUIImages.java: Use
+ AutotoolsPlugin for error dialogs. Add new images.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/MakeUIMessages.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/MakeUIPlugin.java: Removed.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/MessageLine.java: Fix typo.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/wizards/AutotoolsWizardMessages.java:
+ Fix bundle id for messages.
+
+ * plugin.xml: Fix icon references.
+
+ * icons/ac16: New folder containing icons that used to be in etool16.
+ * icons/dlcl16/build_configs.gif: New icon.
+ * icons/dlcl16/open_include.gif: Ditto.
+ * icons/elcl16/build_configs.gif: Ditto.
+ * icons/elcl16/open_include.gif: Ditto.
+ * icons/dtool16/alphab_sort_co.gif: Ditto.
+ * icons/dtool16/build_menu.gif: Ditto.
+ * icons/dtool16/convert-normal.gif: Ditto.
+ * icons/dtool16/make.gif: Ditto.
+ * icons/dtool16/makefile.gif: Ditto.
+ * icons/dtool16/newc_app.gif: Ditto.
+ * icons/dtool16/newcc_app.gif: Ditto.
+ * icons/dtool16/segment_edit.gif: Ditto.
+ * icons/dtool16/target_add.gif: Ditto.
+ * icons/dtool16/target_build.gif: Ditto.
+ * icons/dtool16/target_delete.gif: Ditto.
+ * icons/dtool16/target_edit.gif: Ditto.
+ * icons/dtool16/update_old.gif: Ditto.
+ * icons/etool16: Move autoconf editor icons to ac16 folder.
+ * icons/obj16/command_obj.gif: New icon.
+ * icons/obj16/define_obj.gif: Ditto.
+ * icons/obj16/environment_obj.gif: Ditto.
+ * icons/obj16/envvar_obj.gif: Ditto.
+ * icons/obj16/error_obj.gif: Ditto.
+ * icons/obj16/hfolder_obj.gif: Ditto.
+ * icons/obj16/include_obj.gif: Ditto.
+ * icons/obj16/irule_obj.gif: Ditto.
+ * icons/obj16/lib_obj.gif: Ditto.
+ * icons/obj16/macro_obj.gif: Ditto.
+ * icons/obj16/relation_obj.gif: Ditto.
+ * icons/obj16/target_obj.gif: Ditto.
+ * icons/obj16/trule_obj.gif: Ditto.
+
+2007-05-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java:
+ (addMakeTargetsToManager): Use MakeCorePlugin to get an IMakefile
+ rather than use the internal PosixMakefile class directly.
+
+2007-05-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java:
+ (initialize): Store the configuration for later usage.
+ (getConfigSettingsPath): Use stored configuration instead of fetching
+ it each time.
+ (runCommand): Ditto.
+ (addMakeTargetsToManager): Use the real MakeTargetManager to store
+ targets. Mark targets added by parsing the Makefile with special
+ tag. Delete all MakeTargets with special tag before adding the
+ new targets.
+ (initializeBuildConfigDirs): Use stored configuration to get the
+ tool options rather than the ManagedBuildInfo.
+ (getConfigArgs): Ditto.
+ (addMakeTargetsToManager):
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java:
+ Inherit from CommonBuilder.
+ (build): Change to fetch make target name from args map and store for
+ later use.
+ (getTargets): Change to get make target from stored make target name.
+
+ * plugin.xml: Remove Build Special Targets menu item as it is no longer
+ needed. Add MakeTargetBuilder extension so we can use MakeTargets.
+
+2007-05-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #239886
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAclocalAction.java (run):
+ Pass the CWD to TwoInputDialog and use it when executing the command. On
+ success, show a success dialog.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAutoconfAction.java (run):
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/TwoInputDialog.java (TwoInputDialog):
+ Take the CWD as a parameter.
+ (createDialogArea): Add label with CWD.
+
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAutomakeAction.java (run):
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeMessages.java (getString):
+ Add comments.
+ (getFormattedString): New method.
+
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAction.java (getExecDir):
+ New method to return the CWD.
+ (showSuccess): New method to display a success dialog.
+
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeMessages.properties: Add new
+ messages.
+
+2007-05-10 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #238173
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfIdentifierRule.java (evaluate):
+ Cast read character to char before invoking Character methods to avoid gcj bug.
+
+2007-04-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #238493
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/RecursiveSingleLineRule.java (evaluate):
+ Add check for scanner column < 0 which means we are already at EOF.
+
+2007-04-25 jjohnstn <jjohnstn@toocool.toronto.redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/wizards/NewAutotoolsProjectOptionPage.java (ManagedWizardOptionBlock.setupHelpContextIds):
+ Switch to use CDTHelpContextIds for static help context id.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/CProjectPlatformPage.java (createControl):
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/wizards/ManagedProjectOptionBlock.java (createContents):
+ Ditto.
+
+2007-04-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ Bugzilla #182821
+
+ 2007-04-25 Mikhail Sennikovsky
+ * plugin.xml: Add plugin extensions which let the CDT know that includes and
+ defined symbols are supported for the Autotools tool-chain.
+
+2007-04-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #236304
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (runCommand): Use the
+ job description as a message in the console.
+ (regenerateMakefiles): Fix autogen.sh logic to run configure after invoking
+ autogen.sh if config.status doesn't exist. Make sure console is reused for
+ 2nd step. Change some of the status messages with new ones.
+ (autogenExists): Fix bug where path to autogen.sh wasn't being set on return.
+ * src/com/redhat/eclipse/cdt/autotools/Resources.properties: Add new MakeGenerator messages.
+
+2007-04-11 jjohnstn <jjohnstn@toocool.toronto.redhat.com>
+
+ Bugzilla #236077
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/CWordFinder.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/AutoconfTextHover.java: Replace
+ CDT internal classes with Autotools internal classes.
+ * src/com/redhat/eclipse/cdt/autotools/internal/wizards/ManagedProjectOptionBlock.java (createContents):
+ Replace WorkbenchHelp reference with non-deprecated alternative.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakeTargetManager.java: Fix
+ imports.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (runCommand): Replace
+ deprecated environmental variable method being used.
+ (createFile): Make protected instead of private.
+ (getInvalidDirList): Remove.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java (convertProject):
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsPlugin.java (getWorkingCopyManager):
+ Moved into AutomakeEditorFactory.
+ (getAutomakefileDocumentProvider): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditorFactory.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeCompletionProcessor.java:
+ Change all calls to getWorkingCopyManager and getAutomakefileDocumentProvider to use
+ new AutomakeEditorFactory class.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileContentOutlinePage.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileReconcilingStrategy.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeCompletionProcessor.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditorMessages.java (getResourceBundle):
+ New method.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditorMessages.properties: Add
+ new messages that were formerly fetched internally from CDT.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java: Comment out unused
+ projectSupport.
+ (createActions): Use AutoconfEditorMessages.
+ (InformationDispatchAction.makeAnnotationHoverFocusable): Ditto.
+ (fProjectionModelUpdater): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfAnnotationHover.java (formatMultipleMessages):
+ Use AutoconfEditorMessages instead of CUIMessages.
+ * src/com/redhat/eclipse/cdt/autotools/interenal/ui/ErrorParserBlock.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/CProjectPlatformPage.java (createControl): Remove
+ usage of WorkbenchHelp class which is deprecated.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/NewAutotoolsProjectOptionPage.java (ManagedWizardOptionBlock.setupHelpContextIds):
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java (convertProject):
+ Remove unused code. Switch to use non-deprecated interface for getting
+ indexer.
+
+2007-04-10 jjohnstn <jjohnstn@toocool.toronto.redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/wizards/NewAutotoolsProjectWizard.java:
+ Removed.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/NewAutotoolsProjectOptionPage.java:
+ Use new internal ManagedProjectOptionBlock class.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/CProjectPlatformPage.java:
+ Switch to use new AutotoolsWizardMessages internal class.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java:
+ Fix imports.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizard.java (doRunEpilogue):
+ Switch to new IRunnableWithProgress interface.
+ * src/com/redhat/eclipse/cdt/autotools/internal/wizards/AutotoolsWizardMessages.java:
+ New file to support old wizard code.
+ * src/com/redhat/eclipse/cdt/autotools/internal/wizards/AutotoolsWizardMessages.properties:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/wizards/ConfigurationContentProvider.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/wizards/ConfigurationLabelProvider.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/wizards/ManagedProjectOptionBlock:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/AutotoolsPluginImages.java:
+ Add build_configs.gif for Wizard support.
+ * src/com/redhat/eclipse/cdt/autotools/internal/MarkerGenerator.java (addMarker):
+ New method required by IMarkerGenerator interface.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (getProject):
+ New method.
+ (initializeBuildConfigDirs): Change the default build directory
+ for the configuration's builder.
+ Add support for CDT 4.0 M6.
+ * cdtpatches/*: Removed.
+ * icons/eclcl16: New icon directory.
+ * icons/eclcl16/build_configs.gif: New icon.
+ * plugin.properties: Add new strings used in plugin.xml.
+ * plugin.xml: Add buildType and buildArtefactType extensions. Add
+ toolchain to Autotools project buildDefinitions extension.
+
+2007-04-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #235076
+ * src/com/redhat/eclipse/cdt/autotools/wizards/CProjectPlatformPage.java (CProjectPlatformPage):
+ Add missing NLS comment.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (makefileCvsExists): Use
+ getMakefileCVSPath method.
+ (configureExists): Use getConfigurePath method.
+ (getConfigurePath): New method.
+ (getMakefileCVSPath): New method.
+ (regenerateMakefiles): Use getConfigurePath and getMakefileCVSPath to get the
+ command to use when either of these is found to exist.
+ (autogenExists): Change to protected method.
+
+2007-03-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroDamagerRepairer.java (createPresentation):
+ Comment out macro parsing as this is now done by the reconciler and overall parsing.
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/AutoconfTextHover.java (getPrototype):
+ Fix so it is properly setting minimum and maximum parm counts for a macro.
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/AutoconfPrototype.java (setMaxParms):
+ Fix typo.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfParser.java (matchParentheses):
+ Update logic.
+ (parseMacro): Add error checking for minimum and maximum parameters as well as unmatched
+ parentheses or square-brackets.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfMacroElement.java (setParmCount):
+ New method.
+ (setQuoteDepth): Ditto.
+ (getParmCount): Ditto.
+ (getQuoteDepth): Ditto.
+ (setDepth): Ditto.
+ (getDepth): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditorMessages.properties: Add
+ new error messages for parsing of macros.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/outline/AutoconfContentOutlinePage (update):
+ Use viewer refresh instead of redraw when updating.
+ (updateSelection): New method.
+
+2007-03-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/Makegenerator.java (regenerateMakefiles):
+ Refine algorithm so we don't cause a reconfigure if the configuration settings
+ file doesn't contain the project name. If the configuration arguments are
+ unchanged and the settings file is the old style, rewrite with project
+ name.
+
+2007-03-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #230128
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (saveConfigArgs): Add
+ the project name as first argument saved.
+ (regenerateMakefiles): Read off first argument and verify that it matches the
+ current project name.
+
+2007-03-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #232965
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (runCommand):
+ Change prototype to accept a console and a boolean which when true
+ means to restart the console which may possibly clear the console.
+ (regenerateMakefiles): Change calls to runCommand. For multiple
+ actions (e.g. autogen.sh then configure), opt for the 2nd, 3rd, etc...
+ calls to not clear the console. Don't run config.status unless
+ the top-level Makefile is missing.
+ * src/com/redhat/eclipse/cdt/autotools/Resources.properties: Add new
+ MakeGenerator.unsupportedConfig message.
+
+2007-03-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (regenerateMakefiles):
+ If configuration parameters have changed, mark all Scanner Info as dirty.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfoProvider.java (getCollectionName):
+ Make synchronized to avoid concurrent access of the infoCollection.
+ (getScannerInformation): Ditto.
+ (setDirty): New method.
+
+2007-03-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzilla #230493
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfo.java (getDefinedSymbols):
+ Recalculate each time if compilation string is null.
+ (getIncludePaths): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfoProvider.java (getScannerInformation):
+ Use a map of configurations to keep ScannerInfo seperate per configuration. Use
+ current configuration to fetch scanner info.
+
+2007-02-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Bump up release to 0.0.8.1.
+
+2007-02-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves Bugzillas #230253, #205310.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakeTargetManager.java (addTargets):
+ New method to do mass add of MakeTargets for performance improvement.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java:
+ (addMakeTargetsToManager): Use new AutotoolsMakeTargetManager addTargets method.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/NewAutotoolsProjectWizard.java (doRun):
+ Set indexer to NullIndexer before applying options.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java (convertProject):
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizard.java:
+ Add new NULL_INDEXER_ID.
+ * src/com/redhat/eclipse/cdt/autotools/internal/MakeTargetManager.java: Expose
+ projectTargetMap to inheriting classes.
+
+2007-02-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ Fix for Bugzilla 229891.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java (getMakeTargets):
+ Use Make Target info to find the real build target which may have been set by the
+ Build Special Targets action.
+ (build): Set up the IMakeBuildInfo needed to fetch Make Target from.
+
+2007-02-22 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeMessages.properties: Fix a few
+ typos.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentSetupParticipant.java (setup):
+ Use IDocumentExtension3 version of setDocumentParitioner if document is an instance of
+ IDocumentExtension3.
+
+2007-02-22 Andrew Overholt <overholt@redhat.com>
+
+ * icons/automake.gif: New craptacular icon for automake editor.
+ * icons/autoconf.gif: Another manifestation of my poor artistic skills.
+ * plugin.xml: Use new icons.
+
+2007-02-21 Jeff Johnston <jjohnstn@redhat.com>
+
+ Fix for Bugzilla 229893.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java: Switch
+ to superclass TextFileDocumentProvider instead of FileDocumentProvider so as to fix
+ undo support.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentSetupParticipant.java:
+ New file.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditorMessages.properties: Fix typo.
+ * plugin.xml: Add extension for document setup that ties document setup for configuration
+ files to AutoconfDocumentSetupParticipant.
+
+2007-02-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfParser.java (findDelimeter): Ignore
+ escaped character.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfPartitionScanner.java (AutoconfPartitionScanner):
+ Add escape character for # format comment and eat "\#" as character.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfCodeScanner.java (AutoconfCodeScanner):
+ Ditto.
+ * plugin.xml: Update release to 0.0.8.
+
+2007-02-20 Andrew Overholt <overholt@redhat.com>
+
+ Patch from Jordy Potman
+ http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=229352
+
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileSourceConfiguration.java
+ (AutomakefileSourceConfiguration): Update super constructor call to reflect
+ change in CDT 3.1.2.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java
+ (initializeEditor): Likewise.
+
+2007-02-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfElement.java: New class.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfElifElement: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfElseElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfOutlineErrorHandler.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfMacroElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfIfElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfRootElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfWhileElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfCaseElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfForElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfCaseConditionElement.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfCodeScanner.java (AutoconfCodeScanner):
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/parser/AutoconfParser.java: New class to
+ do Autoconf file parsing and error marking.
+ Add AutoconfIdentifierRule and InlineDataRule.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java (createDocument):
+ Changed to use new AutoconfErrorHandler interface.
+ (documentAboutToBeChanged): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfErrorHandler.java (removeExistingMarkers):
+ Add verification that file exists.
+ (removeAllExistingMarkers): Ditto.
+ (handleError): Ditto.
+ (getCharOffset): Reformatted.
+ (AutoconfErrorHandler): Change constructor to take an IStorageEditorInput rather than
+ an IFile. This allows external files to be edited without error handling.
+ * src/com/redhat/eclipse/cdt/autotools/editors/AutoconfEditorMessages.properties: New messages
+ added for outline parsing.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfPartitionScanner.java (AutoconfPartitionScanner):
+ Use new AutoconfIdentifierRule.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java (getPresentationReconciler):
+ Change default partition to use MultilineRuleDamagerRepairer.
+ (getReconciler): New method.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroDamagerRepairer.java (createPresentation):
+ Change to use new AutoconfErrorHandler constructor.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroParser.java (AutoconfMacroParser): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java (doSetInput): New.
+ (getInputDocument): Ditto.
+ (getRootElement): Ditto.
+ (getAutoconfParser): Ditto.
+ (getAdapter): Ditto.
+ (InformationProvider): Ditto.
+ (getOutlinePage): Ditto.
+ (setRootElement): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/outline/AutoconfContentOutlinePage.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/outline/AutoconfContentProvider.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/outline/AutoconfLabelProvider.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfIdentifierRule.java: New class to
+ prevent matches of other strings that happen to be inside common identifiers.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/InlineDataRule.java: New class to
+ recognize inline data files.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/MultilineRuleDamagerRepairer.java: New class
+ to handle damage/repair when multiline rules are used.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfReconciliingStrategy.java: New class
+ for delayed document-change parsing.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/AutotoolsPluginImages.java: New class
+ to handle image repository.
+ * icons/etool16/acmacro_obj.gif: New image for Autoconf outline view.
+ * icons/etool16/ammacro_obj.gif: Ditto.
+ * icons/etool16/case_obj.gif: Ditto.
+ * icons/etool16/condition_obj.gif: Ditto.
+ * icons/etool16/elif_obj.gif: Ditto.
+ * icons/etool16/for_obj.gif: Ditto.
+ * icons/etool16/if_obj.gif: Ditto.
+ * icons/etool16/while_obj.gif: Ditto.
+ * plugin.xml: Add new error marker extension for outline view.
+
+2007-02-02 Andrew Overholt <overholt@redhat.com>
+
+ * cdtpatches/README: Fix CVS location of managedbuilder.
+
+2007-02-02 Andrew Overholt <overholt@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeCompletionProcessor.java:
+ New file.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/Automakefile.java (getBuiltins):
+ Add $<, $@, and $?.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileSourceConfiguration.java
+ (getContentAssistant): Make use of AutomakeCompletionProcessor.
+
+2007-01-31 Jeff Johnston <jjohnstn@redhat.com>
+
+ * cdtpatches/cdt.ui.buildconsole.patch: New file that contains the
+ 3.1.1 version of the patch for Bugzilla 153816 which adds multiple
+ build console support to CDT 4.0.
+ * cdtpatches/cdt.ui.patch: Altered to remove any build console patches.
+ * cdtpatches/README: Updated to include the new patch.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/CConfigureConsole.java (CConfigureConsole):
+ Modified to use new CUIPlugin build console manager interface.
+
+2007-01-31 Andrew Overholt <overholt@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeErrorHandler.java: New class.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java: Remove unnecessary import.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeDocumentProvider.java
+ (connect): New method. Update error markers at document load time.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileReconcilingStrategy.java
+ (reconcile): Update error markers.
+ (AutomakefileReconcilingStrategy): Set class-wide variables.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java
+ (getAutomakeErrorHandler): New method.
+
+2007-01-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ Fix for Bugzilla 224644.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java (getMakeTargets):
+ Don't add "clean" for fullbuild anymore. It causes unnecessary extra building to occur.
+ (build): Set a flag that build was called.
+ (clean): Only clean if this method is called directly and via a call to build method.
+ Clean by doing a make clean rather than calling super.clean.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (runCommand): When an
+ error occurs in configure, we want to set the status of the project to "needs rebuild".
+ (getConfigSettingsPath): New method to generate name of config settings file.
+ (saveConfigArgs): Use new getConfigSettingsPath method.
+ (regenerateMakefiles): Ditto, when checking if config options have changed.
+ (autogenExists): Clean up unused variables.
+ (getMakefileName): Return "Makefile" instead of "makefile".
+
+2007-01-22 Andrew Overholt <overholt@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileCodeScanner.java:
+ Update copyright.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeDocumentProvider.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeIfElse.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileReconcilingStrategy.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileUtil.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/Automakefile.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileSourceConfiguration.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java
+ (getAutomakeSourceViewer): New method. Update copyright.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileContentOutlinePage.java:
+ Update copyright.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeTextHover.java
+ (getHoverInfo): Remove debugging println. Update copyright.
+
+2007-01-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ Fix for Bugzilla 214624.
+ * src/com/redhat/eclipse/cdt/autotools/internal/MarkerGenerator.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (runCommand): Add check
+ for return code being 0 or 1 to reveal whether command ran correctly.
+ (regenerateMakefiles): Add boolean checking for runCmd calls and also quit
+ if runCmd fails. For autogen.sh cases, check if configure is run by autogen.sh
+ and don't bother calling configure afterwards if true. Add error checking to
+ ensure a second command is not run if the first fails.
+ (PathVar): New private class.
+ (autogenExists): Fixed to take a path parameter to fill in. It also looks for
+ any file that ends in autogen.sh to handle projects like Gnome.
+ * Resources.properties: Add new messages used by MakeGenerator.
+ * cdtpatches/managedbuilder.core.patch: New patch to cause ManagedMake build
+ to stop if an error occurs generating Makefile.
+ * cdtpatches/README: Add details on how to install new patch.
+
+2007-01-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroParser.java: New code
+ to parse an Autoconf macro.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroDamagerRepairer.java (createPresentation):
+ Use new AutoconfMacroParser.parse method instead of embedding the code. Remove
+ all corresponding parse methods.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java (documentAboutToBeChanged):
+ Add checks for whether we should remove the error markers in an autoconf_macro
+ partition.
+
+2007-01-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * about.html: New EPL license file.
+
+2007-01-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/ParseException.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditorMessages.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfErrorHandler.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/AutoconfPrototype.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfAnnotationHover.java: Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfCodeScanner.java: Add
+ copyright info.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfColorProvider.java: Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java: Ditto.
+ (createDocument): New method.
+ (documentChanged): Ditto.
+ (documentAboutToBeChanged): Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfKeywordDetector.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfM4WordDetector.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroContentAssistProcessor.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroDamagerRepairer.java: Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroPartitionRule.java : Ditto.
+ (matchParentheses): Fix up logic.
+ (evaluate):
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroWordDetector.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfPartitioner.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfPartitionScanner.java: Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java: Ditto.
+ (getPresentationReconciler): Use AutoconfMacroDamagerRepairer for macro partition.
+ (getAnnotationHover): New method.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfWhitespaceDetector.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfWordDetector.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/IAutotoolEditorActionDefinitionIds.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/IAutotoolHelpContextIds.java: Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/RecursiveSingleLineRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/LibHover.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/popup/actions/GetDefinedSymbolsAction.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/popup/actions/GetIncludePathAction.java: Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/AutoconfTextHover.java: Ditto.
+ (getIndexedInfo): New method.
+ (getPrototype): Ditto.
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/HoverMessages.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeWordDetector.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/BuildSpecial.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAclocalAction.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAction.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAutoconfAction.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAutomakeAction.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeMessages.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/TwoInputDialog.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfoProvider.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfo.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsPlugin.java: Ditto.
+
+2007-01-12 Andrew Overholt <overholt@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeTextHover.java: New class. Hover help provider for automake editor.
+ (getHoverControlCreator): New method. Return null for now.
+ (AutomakeTextHover): New method.
+ (getHoverRegion): New method. Return an IRegion from an offset in the document.
+ (findWord): New method. Return an IRegion of the hover region.
+ (getHoverInfo): New method. Return the hover information for a particular region.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileSourceConfiguration.java (getTextHover): New method.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/Automakefile.java (getDirectiveContainingLine): Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java (getMakefile): Likewise.
+
+2007-01-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java: Revert
+ to version 1.2 prior to 2006-11-27. This reversion is required because the previous
+ fix causes a regression in autoconf partitioning.
+
+2007-01-08 Andrew Overholt <overholt@redhat.com>
+
+ * libhoverdocs/acmacros.xml: Add PKG_* macros from pkgconfig.
+
+2007-01-05 Andrew Overholt <overholt@redhat.com>
+
+ * libhoverdocs/acmacros.xml: Add AM_* macros from automake's Public-macros.html.
+
+2007-01-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (regenerateMakefiles):
+ Add check for Makefile.cvs ahead of configure check. Use resource strings
+ for runCommand descriptions.
+ (makefileCvsExists): New internal method.
+ * src/com/redhat/eclipse/cdt/autotools/Resources.properties: Add new
+ resource strings.
+
+2007-01-02 Andrew Overholt <overholt@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileCodeScanner.java
+ (automaticVariables): New $<, etc. variables.
+ (createRules): Add automatic variables as keywords. Also add @AC_SUBST_VAR@
+ highlighting.
+ (nextToken): New method.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeDocumentProvider.java
+ (getDocument): New method.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeWordDetector.java:
+ New file.
+
+2006-12-15 Andrew Overholt <overholt@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileSourceConfiguration.java
+ (getAutomakeCodeScanner): New method.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java
+ (getAutomakeSourceViewerConfiguration): Likewise.
+ (getAutomakefileDocumentProvider): Likewise
+ (initializeEditor): Set up field variables.
+
+2006-12-12 Andrew Overholt <overholt@redhat.com>
+
+ * META-INF/MANIFEST.MF: Add package visibility for tests.
+ * plugin.xml: Add filename associations for AutomakeEditor.
+
+2006-12-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * MANIFEST.MF: Update release to 0.0.6.
+
+2006-12-11 Kyu Lee <klee@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/actions/TwoInputDialog.java: New class
+ for getting 2 text field inputs.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeMessages.java: New class
+ for NLS strings.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAutomakeAction.java: New
+ class for handling invoke automake.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAutoconfAction.java: New
+ class for handling invoke autoconf.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAction.java: New super
+ class for invoking autotools classes.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeAclocalAction.java: New
+ class for handling invoke aclocal.
+ * src/com/redhat/eclipse/cdt/autotools/actions/InvokeMessages.properties:
+ Property file for NLS strings.
+ * plugin.xml: Added menu options for invoking autotools under project menu.
+
+2006-12-11 Andrew Overholt <overholt@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsPlugin.java
+ (getWorkingCopyManager): New method.
+ (getAutomakefileDocumentProvider): Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java
+ (initializeEditor): New method.
+ (getAutomakeOutlinePage): Likewise.
+ (createPartControl): Likewise.
+ (getAdapter): Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeDocumentProvider.java:
+ New file.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeMacroReferenceRule.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeMacroDefinitionRule.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeIfElse.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileUtil.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileSourceConfiguration.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileReconcilingStrategy.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakefileContentOutlinePage.java:
+ Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/Automakefile.java:
+ Likewise.
+
+2006-12-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizard.java
+ (setCurrentProject): Make protected to allow subclasses to use.
+ * MANIFEST.MF: Export org.eclipse.linuxtools.cdt.autotools.wizards classes to the
+ autotools.tests plug-in.
+
+2006-12-01 Andrew Overholt <overholt@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake: New directory.
+ * src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java: New
+ file. Simple extension of MakefileEditor for now.
+ * plugin.xml: Add automake editor.
+
+2006-11-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Add .m4 file support to the Autoconf editor.
+
+2006-11-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java
+ (performRevert): Method copied from CDT and JDT editors.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java:
+ Change base class to be TextFileDocumentProvider. This means no longer providing
+ a createDocument() method.
+ (createDocument): Deleted.
+ (AutoconfStorageDocumentProvider.AutoconfStorageDocumentProvider): New internal
+ class based on StorageDocumentProvider.
+ (AutoconfStorageDocumentProvider.setupDocument): New method of internal class.
+ (AutoconfDocumentProvider): New constructor which sets up a
+ TextFileDocumentProvider that takes the internal AutoconfStorageDocumentProvider
+ class as parent DocumentProvider. This emulates what the CDT CEditor does and is
+ done to provide proper edit reversion support.
+
+2006-11-22 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/IAutotoolHelpContextIds.java:
+ Add CONTENT_ASSIST string.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java
+ (getContentAssistant): New routine to add content assist support.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java
+ (createActions): Add action for content assist.
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/AutoconfTextHover.java
+ (getIndexedInfo):
+ (getInformationControlCreator): New method.
+ (getTooltipAffordanceString): Make static.
+ (init): Ditto.
+ (getIndexedInfo): Ditto plus add call to init.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroContentAssistProcessor.java:
+ New class for macro content assist.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroParameterListValidator.java:
+ New class for content assist to help with macro call parameters.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroProposalContextInformation.java:
+ New file for parameter context assist information.
+
+2006-11-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfPartitionScanner.java
+ (AutoconfPartitionScanner): Change partitions to be comments, macros, and
+ default.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java
+ (getPresentationReconciler): Change to match new paritioning. Use a special new
+ MultiLineDamagerRepairer for macros.
+ (getConfiguredContentTypes): Change to list of new partitions.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java
+ (createPartControl): Specify new AUTOCONF_MACRO partition.
+ (InformationDispatchAction.makeAnnotationHoverFocusable): Ditto.
+ (InformationDispatchAction.makeTextHoverFocusable): Ditto.
+ (getAutoconfInlineCodeScanner, getAutoconfStringScanner): Removed.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfInlineCodeScanner.java:
+ Removed.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfSectionRule.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfStringScanner.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfCodeScanner.java
+ (AutoconfCodeScanner): Change rules to add a recursive single line rule for
+ strings and a multiline rule for inlined code. Also add a rule to discover m4
+ macros.
+ * src/com/redhat/eclipse.cdt/autotools/ui/editors/AutoconfM4WordDetector.java:
+ New file.
+ * src/com/redhat/eclipse.cdt/autotools/ui/editors/AutoconfMacroPartitionRule.java:
+ Ditto.
+ * src/com/redhat/eclipse.cdt/autotools/ui/editors/MultiLineDamagerRepairer.java:
+ Ditto.
+ * src/com/redhat/eclipse.cdt/autotools/ui/editors/RecursiveSingleLineRule.java:
+ Ditto.
+
+2006-10-31 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/AutoconfTextHover.java
+ (init): Turn off parser validation.
+ * libhoverdocs/acmacros.xml: Update including m4 macros.
+
+2006-10-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java:
+ Remove unneeded import.
+ * src/com/redhat/eclipse/cdt/autotools/ui/LibHover.java
+ (getLibHoverDocs): Specify no xml validation since there may be duplicate
+ function ids due to multiple standard definitions used in glibc.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java
+ (getTextHover): New method to add text hover for autoconf editor.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfPartitioner.java
+ (connect): Remove calls to print debug messages.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java
+ (isFoldingEnabled):
+ (InformationDispatchAction.InformationDispatchAction): New for scrollable
+ tooltip support.
+ (createPartControl): Ditto.
+ (fProjectionModelUpdater): Ditto.
+ (InformationProvider.getInformation): Ditto.
+ (InformationDispatchAction): Ditto.
+ (initializeKeyBindingScopes): Ditto.
+ (InformationDispatchAction.makeTextHoverFocusable): Ditto.
+ (InformationProvider.getInformation2): Ditto.
+ (InformationProvider): Ditto.
+ (InformationDispatchAction.computeOffsetAtLocation): Ditto.
+ (fInformationPresenter): Ditto.
+ (.createInformationControl): Ditto.
+ (InformationProvider.getInformationPresenterControlCreator): Ditto.
+ (createActions): Ditto.
+ (InformationDispatchAction..createInformationControl): Ditto.
+ (InformationDispatchAction.run): Ditto.
+ (InformationDispatchAction.fTextOperationAction): Ditto.
+ (InformationDispatchAction.makeAnnotationHoverFocusable): Ditto.
+ (fProjectionSupport): Ditto.
+ (InformationProvider.getSubject): Ditto.
+ (InformationProvider.InformationProvider): Ditto.
+ * src/libhoverdocs/acmacros.xml: New file containing autoconf hover help.
+ * src/libhoverdocs/glibc.xml: Updated.
+ * src/libhoverdocs/LIBHOVERDOCS.LICENSE: New file with licensing info.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/IAutotoolEditorActionDefinitionIds.java:
+ New file.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editoros/IAutotoolHelpContextIds.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/AutoconfTextHover.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/HoverMessages.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/text/hover/HoverMessages.properties:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/HTML2TextReader.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/HTMLPrinter.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/HTMLTextPresenter.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/LineBreakingReader.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/SingleCharReader.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/SubstitutionTextReader.java:
+ Ditto.
+ * plugin.xml: Fix autoconf editor to look for configure.in or configure.ac. Add
+ hover help for autoconf editor and set up F2 key binding for scrollable tooltips.
+ * plugin.properties: Add autoconf editor strings.
+
+2006-10-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfCodeScanner.java: New
+ file.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfWordDetector.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfWhitespaceDetector.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfStringScanner.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfSourceViewerConfiguration.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfSectionRule.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfPartitionScanner.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfPartitioner.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroWordDetector.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfMacroRule.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfKeywordDetector.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfInlineCodeScanner.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfEditor.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfDocumentProvider.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/ui/editors/AutoconfColorProvider.java:
+ Ditto.
+ * plugin.properties: Add Autoconf editor name.
+ * plugin.xml: Add Autoconf editor.
+
+2006-10-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ Fix for Bugzilla 209161.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java
+ (initializeBuildConfigDirs): New method.
+ (initialize): Call initializeBuildConfigDirs().
+ (regenerateMakefiles): Ditto if configuration parameters have changed.
+ (createDirectory): Return project path if input directory is empty string or
+ ".".
+
+2006-09-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * build.properties: Update so plugin.properties built into binary.
+ * build.xml: New file.
+
+2006-09-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Bump up release number to 0.0.5.
+
+2006-09-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ Fix for Bugzilla 206719
+ * plugin.xml: Comment out deprecated ManagedBuildInfo extension and replace with
+ new org.eclipse.cdt.managedbuilder.core.buildDefinitions extension point.
+ * plugin.properties: Add new strings from new build definition.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/CProjectPlatformPage.java
+ (CProjectPlatformPage): Fix project type reference to refer to new project type
+ id in build definition.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java
+ (initialize): Switch over to new option ids in new build definition.
+ (getConfigArgs): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfo.java
+ (getCompilationString): Don't bother if input resource isn't a file.
+ (buildFile): Fix how build directory is fetched to work with new build
+ definition.
+ (AutotoolsScannerInfo): Save the original resource reference.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java
+ (AUTOTOOLS_CONFIG_ID): Change to match new build definition.
+
+2006-09-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ Fix for Bugzilla 206359
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsPlugin.java
+ (verifyScannerInfoProvider): New method to check ScannerInfoProvider and set it
+ only if necessary.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java
+ (hasTargetBuilder): Call verifyScannerInfoProvider instead of
+ setScannerInfoProvider to prevent changing the project file every time the
+ hasTargetBuilder check is made.
+
+2006-09-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ Fix for Bugzilla 206164.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfo.java
+ (followIncludeChain): Follow the session property as far as possible. When it
+ ends try looking for the new OPEN_INCLUDE_P persistent property to re-establish
+ the chain.
+ (createIncludeChain): Set a new persistent property OPEN_INCLUDE_P that is the
+ location of the resource.
+
+2006-09-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * cdtpatches/cdt.ui.patch: Update patch to include defined symbol hover help.
+
+2006-09-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfo.java
+ (getDefinedSymbols): Prepare code for failure to get compilation string.
+
+2006-09-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * cdtpatches/README: New file to instruct how to apply patches to the CDT.
+ * cdtpatches/cdt.core.patch: Patch for org.eclipse.cdt.core.
+ * cdtpatches/cdt.ui.patch: Patch for org.eclipse.cdt.ui.
+
+2006-08-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Replace DynamicScannerInfo extension hack with existing CDT
+ ScannerInfoProvider extension. Change version to 0.0.4.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/CConfigureConsole.java
+ (CConfigureConsole): Use new getSubConsoleManager method of CUIPlugin.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsole.java: No
+ longer needed, so removed.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsoleDocument.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsoleManager.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsolePage.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsolePartition.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsolePartitioner.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsoleStream.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsoleViewer.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConsoleEvent.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConsoleOutputTextStore.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ScrollLockAction.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java
+ (convertProject): Set scanner info provider for project.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfoProvider.java: Extend
+ AbstractCExtension.
+ (getScannerInformation): Call AutotoolsScannerInfo.followIncludeChain method to
+ get real underlying resource to get dynamic build info from.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfo.java: Implement new
+ interface IScannerInfoPlus.
+ (followIncludeChain): New method to adhere to new interface.
+ (createIncludeChain): New method.
+ (getDefinedSymbols): Add defined symbols found by ManagedBuildManager.
+ (getIncludePaths): Append include path found by ManagedBuildManager.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsPlugin.java
+ (setScannerInfoProvider): New method.
+ (getConsoleManager): Removed.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java:
+ (hasTargetBuilder): Replace the default scanner provider for Managed Make
+ projects with AutotoolsScannerInfoProvider.
+
+2006-08-21 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/actions/BuildSpecial.java
+ (run): If there are no targets yet
+ (i.e. no makefile), try and regenerate the makefile.* src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java (getConfigArgs):
+ Make sure there is an "other" string to process rather than adding an empty
+ argument.
+
+2006-08-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java
+ (regenerateMakefiles): Add logic to check if the configuration arguments have
+ changed since the last configuration and reconfigure if they have.
+ (saveConfigArgs): New method.
+
+2006-08-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java
+ (addAutotoolsBuilder): Check for ManagedMake's genmakebuilder and remove if
+ found.
+ (hasTargetBuilder): Look for Autotools default configuration and if found, add
+ the Autotools Makefile builder.
+
+2006-07-31 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/LibHover.java
+ (getLibHoverDocs): New method which replaces buildDocPath and fetches libhover
+ base data file from the plugin's jar.
+ * src/com/redhat/eclipse/cdt/autotools/ui/LibHover.java
+ (buildDocPath): Replaced by getLibHoverDocs. Change all callers.
+ * src/com/redhat/eclipse/cdt/autotools/ui/LibHover.java
+ (getDocument): Removed.
+
+2006-07-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Remove unused sample extensions.
+ * src/com/redhat/eclipse/cdt/autotools/editors/*: Remove all files.
+ * src/com/redhat/eclipse/cdt/autotools/preferences/*: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/properties/*: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/views/*: Ditto.
+
+2006-07-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Update release.
+ * META-INF/MANIFEST.MF: Export libhoverdocs.
+
+2006-07-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Update release.
+
+2006-07-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java
+ (getMakeTargets): Use IMakeBuildInfo.BUILD_TARGET_INCREMENTAL instead of
+ IMakeBuildInfo.BUILD_TARGET_FULL which is now obsoleted and not set by the
+ MakeTargets.
+ (clean): Ditto.
+
+2006-07-10 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Add new "other" option which allows the end-user to specify any
+ configuration option manually.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java
+ (getConfigArgs): New function to get configure arguments from preferences.
+ (runCommand): Change prototype to take an argument array.
+ (regenerateMakefiles): Only when running full configure, pass args to runCommand
+ and get these from getConfigArgs method.
+
+2006-07-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfo.java
+ (getCompilationString): Don't use previous compilation string if we have marked
+ the scanner info as dirty.
+ (getIncludePaths): Don't continue processing if the compilation string is null.
+
+2006-06-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/popup/actions/GetDefinedSymbolsAction.java:
+ New file.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfo.java
+ (getDefinedSymbols): Fill in function details to fetch flags used in dynamic
+ compilation info.
+ (getCompilationString): New function to get and save the actual compilation
+ string from the make invocation.
+ (getIncludePaths): Move logic into getCompilationString.
+ (compilationString): New field to store compilation string.
+ (definedSymbols): New field to store map of defined symbols.
+ * plugin.xml: Add defined symbols menu item.
+
+2006-06-20 jjohnstn <jjohnstn@toy.toronto.redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/popup/actions/GetIncludePathAction.java:
+ Remove unused imports.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/MakeUIImages.java: New class
+ copied from Std Make internal packages to local internal package.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/MessageLine.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/MakeUIPlugin.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/MakeResources.properties: New
+ properties message file used by MakeUIPlugin.
+ * src/com/redhat/eclipse/cdt/autotools/actions/TargetListViewerPart.java: Use
+ Autotools StructureViewPart instead of internal one from Std Make plugin.
+ * src/com/redhat/eclipse/cdt/autotools/actions/MakeTargetDialog.java: Use new
+ Autotools internal classes rather than internal ones from Std Make plugin.
+ * src/com/redhat/eclipse/cdt/autotools/actions/AbstractTargetAction.java
+ (getShell): Use new AutotoolsPlugin getActiveWorkbenchShell method instead of
+ the one in internal MakeUIPlugin.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java: Remove
+ unused imports.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsPlugin.java
+ (getActiveWorkbenchShell): New method.
+
+2006-06-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Add dependency on org.eclipse.core.variables.
+ * src/com/redhat/eclipse/cdt/autotools/internal/MakeTargetManager: New internal
+ class copied from Std Make projects.
+ * src/com/redhat/eclipse/cdt/autotools/internal/MakeTarget: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ProjectTargets: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/MakeMessages: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakeTargetManager: Base on local
+ internal MakeTargetManager class rather than unpublished Std Make internal class.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator: Remove reference to Std
+ Make MakeMessages internal class.
+ * src/com/redhat/eclipse/cdt/autotools/Resources.properties: Add new message
+ about invoking make for the project.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsPlugin.java
+ (getFormattedString): New method to get resource string with arguments.
+
+2006-06-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Added "org.eclipse.cdt.core.DynamicScannerInfoProvider" extension.
+ * src/com/redhat/eclipse/cdt/autotools/popup/actions/GetIncludePathAction.java
+ (run): Altered to use new AutotoolsScannerInfo class.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfoProvider.java: New
+ class used to hook up to added extension point:
+ org.eclipse.cdt.core.DynamicScannerInfoProvider.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsScannerInfo.java: New file based
+ on AutotoolsMakefileMiner.java. Class implements IScannerInfo interface.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileMiner.java: Transformed
+ into AutotoolsScannerInfo.java.
+
+2006-06-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/popup/actions/GetIncludePathAction.java:
+ Fix up imports.
+
+2006-06-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Make provider Red Hat.
+
+2006-06-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileMiner.java: New file.
+ * src/com/redhat/eclipse/cdt/autotools/popup/actions: GetIncludePathAction.java:
+ Ditto.
+ * plugin.xml: Add extensions to create menu for source files that will grab the
+ dynamic include path for the build and display it in a message dialog. This is
+ just a temporary test.
+
+2006-05-19 Andrew Overholt <overholt@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/actions/BuildSpecial.java
+ (run): Create our target selection dialog in-line. Make this dialog have a
+ filter for selection of make target.
+ * src/com/redhat/eclipse/cdt/autotools/actions/BuildTargetDialog.java: Remove:
+ no longer necessary.
+
+2006-05-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java
+ (clean): Overriding method to check for MakeTargets in which case we don't want
+ to clean out directory.
+ * plugin.xml: Remove unneeded extension.
+
+2006-04-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/LibHover.java
+ (getHref): Change to reference the glibc book rather than the Gnu help.
+
+2006-04-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/ui/LibHover.java: New file based on Chris
+ Moller's hover help, using ICHelpProvider interface.
+ * plugin.xml: Add CHelpProvider extension to supply hover help.
+ * libhoverdocs/glibc.xml: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/AutoconfPlugin.java: Refactored.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsPlugin.java: Refactored from
+ AutoconfPlugin.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/CConfigureConsole.java:
+ Refactor AutoconfPlugin to AutotoolsPlugin.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/CProjectPlatformPage.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizard.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/preferences/PreferenceInitializer.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/TargetListViewerPart.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/MakeTargetDialog.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/MakeContentProvider.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/BuildTargetDialog.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/BuildSpecial.java: Ditto.
+
+2006-04-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Remove toc extension since we have moved docs to a separate
+ plug-in.
+ * getdocs.sh: Moved to autotools-doc plugin.
+ * doc.zip: Ditto.
+ * toc.xml: Ditto.
+ * testToc.xml: Removed.
+
+2006-04-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * toc.xml: Add references for Gnu Tools documents.
+ * doc.zip: New file containing zipped up html files for Gnu tools.
+ * getdocs.sh: Shell script to get html files from the web and build doc.zip.
+ * plugin.xml: Connect toc extension to toc.xml so that Gnu tools help is
+ provided with Autotools plugin.
+
+2006-03-21 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/AutoconfPlugin.java
+ (getConsoleManager): New method.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java
+ (runCommand): Specify the Autotools configure console to use for configuration
+ output.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/CConfigureConsole.java: New
+ file stodified from ManagedBuild Project internal directory.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsoleDocument.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsoleManager.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsolePage.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsolePartitioner.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsolePartition.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsoleStream.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsoleViewer.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConfigureConsole.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConsoleEvent.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConsoleMessages.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ConsoleMessages.properties:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/internal/ui/ScrollLockAction.java: Ditto.
+ * plugin.xml: Set up CBuildConsole extension to be CConfigureConsole.
+
+2006-03-15 Andrew Overholt <overholt@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java
+ (addMakeTargetsToManager): New method.
+ (regenerateMakefiles): Call addMakeTargetsToManager after Makefile is generated.
+
+2006-03-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/wizards/NewAutotoolsProjectOptionPage.java
+ (getProject): If dealing with a ConvertToAutotoolsProjectWizard, use it's
+ getProject method.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizard.java
+ (setCurrentProject): New method.
+ (applyOptions): Change prototype to accept project as input. Call
+ setCurrentProject method using the project variable before getting the optionPage
+ to performApply.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java
+ (applyOptions): Add project as input variable and pass this on call.
+ (convertProject): Pass project when calling applyOptions method.
+
+2006-03-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java
+ (getMakeTargets): When doing a full build, we don't want to do a "clean" if the
+ target is not "all".
+
+2006-03-09 Andrew Overholt <overholt@redhat.com>
+
+ * .cvsignore: Initial checkin. Ignore bin.
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java
+ (regenerateMakefiles): Rename CONFIG_STATUS_NAME to CONFIG_STATUS. Call
+ autogen.sh first if configure does not exist.
+ (configureExists): New method.
+ (autogenExists): New method.
+ (runCommand): New method. Run configure or autogen and report success.
+ * plugin.properties: Change "CVS Autotools" to Autotools.
+ * plugin.xml: Likewise.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/NewAutotoolsProjectWizard.java
+ (NewAutotoolsProjectWizard): Likewise.
+
+2006-03-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * plugin.xml: Set up default gcc scanner in our ManagedMakeProject target
+ extension -
+ org.eclipse.cdt.managedbuilder.internal.scannerconfig.DefaultGCCScannerInfoCollector.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java
+ (convertProject): Remove commented code about setting ScannerConfig as we now
+ set the default GCC scanner collector in our ManagedMakeProject extension.
+
+2006-03-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/AutoconfPlugin.java
+ (ftargetManager): New field.
+ (getUniqueIdentifier): New method.
+ (getTargetManager): Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakefileBuilder.java: New
+ builder that extends ManagedMakeProject's GeneratedMakefileBuilder and allows us
+ to override behavior.
+ * src/com/redhat/eclipse/cdt/autotools/AutotoolsMakeTargetManager.java: New
+ class that extends a Std MakeProject's MakeTargetManager and allows us to
+ override behavior.
+ * src/com/redhat/eclipse/cdt/autotools/Resources.properties: New strings added
+ to support BuildSpecial functionality.
+ * src/com/redhat/eclipse/cdt/autotools/AbstractTargetAction.java: New file based
+ on Std MakeProject class.
+ * src/com/redhat/eclipse/cdt/autotools/actions/BuildSpecial.java: Rewritten to
+ extend AbstractTargetAction and to create a dialog rather than print out hello
+ world.
+ * src/com/redhat/eclipse/cdt/autotools/actions/BuildTargetDialog.java: New file
+ that implements the Build Special Targets dialog. Based on a Std Make Project's
+ BuildTargetDialog.
+ * src/com/redhat/eclipse/cdt/autotools/actions/CheckboxTablePart.java: New file
+ to support new dialogs.
+ * src/com/redhat/eclipse/cdt/autotools/actions/MakeContentProvider.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/MakeTargetDialog.java: New file
+ that implements the Make Target dialog allowing management of make targets. Based
+ on Std Make Project's MakeTargetDialog.
+ * src/com/redhat/eclipse/cdt/autotools/actions/SharedPartWithButtons.java:
+ Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/StructuredViewerPart.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/actions/TargetListViewerPart.java: Ditto.
+ * src/com/redhat/eclipse/cdt/autotools/wizards/ConvertToAutotoolsProjectWizardPage.java:
+ Instead of adding a ManagedProject builder, add our new AutotoolsMakefileBuilder.
+ * plugin.xml: Add our new AutotoolsMakefileBuilder as an official builder.
+
+2006-02-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/com/redhat/eclipse/cdt/autotools/MakeGenerator.java: Remove some warnings.
+ * plugin.xml: Fix duplicate target configuration options and re-add in --build
+ option.
+
+2006-02-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Initial import.
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/META-INF/MANIFEST.MF b/autotools/org.eclipse.linuxtools.cdt.autotools/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..a9de97b862
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/META-INF/MANIFEST.MF
@@ -0,0 +1,34 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name.0
+Bundle-SymbolicName: org.eclipse.linuxtools.cdt.autotools;singleton:=true
+Bundle-Version: 2.0.0.qualifier
+Bundle-Activator: org.eclipse.linuxtools.cdt.autotools.AutotoolsPlugin
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.4.0",
+ org.eclipse.jface.text;bundle-version="3.4.0",
+ org.eclipse.core.resources;bundle-version="3.4.0",
+ org.eclipse.cdt.managedbuilder.core;bundle-version="5.0.100",
+ org.eclipse.cdt.core;bundle-version="5.1.0",
+ org.eclipse.cdt.managedbuilder.ui;bundle-version="5.0.100",
+ org.eclipse.cdt.managedbuilder.gnu.ui;bundle-version="5.0.100",
+ org.eclipse.cdt.make.core;bundle-version="5.1.0",
+ org.eclipse.ui.console;bundle-version="3.3.0",
+ org.eclipse.help;bundle-version="3.3.100",
+ org.eclipse.core.variables;bundle-version="3.2.100",
+ org.eclipse.ui.views;bundle-version="3.3.0",
+ org.eclipse.core.filesystem;bundle-version="1.2.0",
+ org.eclipse.ui;bundle-version="3.5.0",
+ org.eclipse.cdt.ui;bundle-version="5.1.0",
+ org.eclipse.ui.ide;bundle-version="3.5.0",
+ org.eclipse.ui.editors;bundle-version="3.5.0",
+ org.eclipse.linuxtools.cdt.autotools.core;bundle-version="1.0.0",
+ org.eclipse.linuxtools.cdt.autotools.ui;bundle-version="1.0.0"
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: %provider
+Export-Package: org.eclipse.linuxtools.cdt.autotools;x-friends:="org.eclipse.linuxtools.cdt.autotools.tests",
+ org.eclipse.linuxtools.cdt.autotools.ui.properties;x-friends:="org.eclipse.linuxtools.cdt.autotools.tests",
+ org.eclipse.linuxtools.internal.cdt.autotools;x-friends:="org.eclipse.linuxtools.cdt.autotools.tests",
+ org.eclipse.linuxtools.internal.cdt.autotools.ui;x-friends:="org.eclipse.linuxtools.cdt.autotools.tests",
+ org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences;x-friends:="org.eclipse.linuxtools.cdt.autotools.tests"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/about.html b/autotools/org.eclipse.linuxtools.cdt.autotools/about.html
new file mode 100644
index 0000000000..23506a4bae
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/about.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>About</title>
+</head><body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). 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, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html> \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/build.properties b/autotools/org.eclipse.linuxtools.cdt.autotools/build.properties
new file mode 100644
index 0000000000..fd22e48c71
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ .,\
+ plugin.properties,\
+ icons/,\
+ about.html
+
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/icons/autoconf.gif b/autotools/org.eclipse.linuxtools.cdt.autotools/icons/autoconf.gif
new file mode 100644
index 0000000000..98afb3e2f0
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/icons/autoconf.gif
Binary files differ
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/plugin.properties b/autotools/org.eclipse.linuxtools.cdt.autotools/plugin.properties
new file mode 100644
index 0000000000..128cd2af8e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/plugin.properties
@@ -0,0 +1,170 @@
+#################################################################################
+# Copyright (c) 2006, 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 Incorporated - initial API and implementation
+#################################################################################
+ConvertWizard.description=Convert to C/C++ Autotools Project
+NewCProject.description=GNU C Autotools Project
+NewCCProject.description=GNU C++ Autotools Project
+NewCWizard.name=GNU C Autotools Project
+NewCCWizard.name=GNU C++ Autotools Project
+
+Autotools.wizard.name=GNU Autotools Build Wizard
+
+Autoconf.editor.name=Autoconf Editor
+
+BuildProperty.value.name.default=Default;
+BuildProperty.type.name.autotools=GNU Autotools
+
+PreferenceAutotools.name=Autotools
+PreferenceAutomakeEditor.name=Automake Editor
+PreferenceAutoconfEditor.name=Autoconf Editor
+
+PropertyAutotools.name=Autotools
+PropertyTabEditor.name=Editors
+AutotoolsBuildPropertyTab.name=Autotools
+AutotoolsEditorsPropertyTab.name=Editors
+AutotoolsToolsPropertyTab.name=Tools Settings
+
+PropertyTabEditor.tooltip=Set options for Autotools-specific editors
+PropertyTabBuild.tooltip=Set additional Autotools build options
+
+Makefile.builder.name=Autotools Makefile Generator
+Autotools.projecttype.name=GNU Autotools
+AutotoolsNature.name=Autotools Project Nature
+Configuration.build.name=Build (GNU)
+Autotools.targetplatform.name=GNU Autotools Target Platform
+Autotools.gnu.toolchain.name=GNU Autotools Toolchain
+Configure.outputType=Configure Output (config.status)
+Autogen.outputType=Autogen Output (configure)
+
+CommandCategorySource.name=Source
+CommandCategorySource.description=Source commands
+CommandCategoryTools.name=Tools
+CommandCategoryTools.description=Autotool tools
+ShowTooltip.name=Show Tooltip Description
+ShowTooltip.description=Shows the tooltip description for the element at the cursor
+
+# Scope and Key Commands
+ACeditor.scope.name=Autoconf Editor
+ACeditor.scope.description=Editor for Autoconf Configuration Source Files
+
+Tool.configure=configure
+
+OptionCategory.configure.general=General
+Option.configure.builddir=Build directory
+Option.configure.builddir.tip=Subdirectory off of project where build will occur
+Option.configure.configdir=Configure tool directory
+Option.configure.configdir.tip=Subdirectory to change to before invoking configure
+Option.configure.cache_file=Name of configuration cache file (--cache-file)
+Option.configure.cache_file.tip=Specify the name of the configuration cache file [config.cache]
+Option.configure.no_create=Turn off file creation <not advised> (--no-create)
+Option.configure.no_create.tip=This tells configuration not to generate the output files as part of configuration
+Option.configure.quiet=Turn off checking messages (--quiet)
+Option.configure.quiet.tip=This turns off "checking ..." style messages from the configuration console output
+Option.configure.help=Display help contents of top-level configuration (--help)
+Option.configure.help.tip=Ask configuration file to display its help documentation
+Option.configure.version=Display version of autotools used to create configuration (--version)
+Option.configure.version.tip=This outputs the version of the Autotools used to create the configuration files
+
+OptionCategory.configure.platform=Platform Specifiers
+Option.configure.host=Host platform (--host)
+Option.configure.host.tip=Platform that project will run on
+Option.configure.target=Target platform (--target)
+Option.configure.target.tip=Platform that project will target output for
+Option.configure.build=Build platform (--build)
+Option.configure.build.tip=Platform where project is being built
+
+OptionCategory.configure.directories=Directory specifiers
+Option.configure.prefix=Arch-independent install directory (--prefix)
+Option.configure.prefix.tip=Place where architecture-independent files are installed [/usr/local]
+Option.configure.exec_prefix=Arch-dependent install directory (--exec-prefix)
+Option.configure.exec_prefix.tip=Place where architecture-dependent files are installed [PREFIX]
+Option.configure.libdir=Object code library directory (--libdir)
+Option.configure.libdir.tip=Place where object code libraries are installed [EPREFIX/lib]
+Option.configure.bindir=User executable directory (--bindir)
+Option.configure.bindir.tip=Place where binary executables are installed [EPREFIX/bin]
+Option.configure.sbindir=System admin executable directory (--sbindir)
+Option.configure.sbindir.tip=Place where system admin executables are installed [EPREFIX/sbin]
+Option.configure.includedir=C Header file directory (--includdir)
+Option.configure.includedir.tip=Place where header files will be installed [PREFIX/include]
+Option.configure.datadir=Read-only architecture-independent data (--datadir)
+Option.configure.datadir.tip=Place where read-only architecture-independent data is installed [PREFIX/share]
+Option.configure.sysconfdir=Read-only single-machine data directory (--syconfdir)
+Option.configure.sysconfdir.tip=Place where read-only single-machine data is stored [PREFIX/etc]
+Option.configure.infodir=Info file documentation directory (--infodir)
+Option.configure.infodir.tip=Place where info files are installed [PREFIX/info]
+Option.configure.mandir=Man file documentation directory (--mandir)
+Option.configure.mandir.tip=Place where man file documentation is installed [PREFIX/man]
+Option.configure.srcdir=Sources directory (--srcdir)
+Option.configure.srcdir.tip=Place where configure can find sources [configure directory or ..]
+Option.configure.localstatedir=Modifiable single-machine data directory (--localstatedir)
+Option.configure.localstatedir.tip=Place where modifiable single-machine data is installed [PREFIX/var]
+Option.configure.sharedstatedir=Modifiable architecture-independent data directory (--sharedstatedir)
+Option.configure.sharedstatedir.tip=Place where modifiable architecture-independent data is installed [PREFIX/com}
+Option.configure.libexecdir=Program executable directory (--libexecdir)
+Option.configure.libexecdir=Place where program executables will be installed [EPREFIX/libexec]
+Option.configure.oldincludedir=Non-gcc C header file directory (--oldincludedir)
+Option.configure.oldincludedir.tip=Place where non-gcc C header files are installed [/usr/include]
+
+OptionCategory.configure.filenames=File-name transformations
+Option.configure.program_prefix=Installed program prefix (--program-prefix)
+Option.configure.program_prefix.tip=Prepend PREFIX to the beginning of installed program names
+Option.configure.program_suffix=Installed program suffix (--program-suffix)
+Option.configure.program_suffix.tip=Append SUFFIX to the end of installed program names
+Option.configure.program_transform_name=Installed program name transform (--program-transform-name)
+Option.configure.program_transform_name.tip=A sed string used to transform installed program names
+
+OptionCategory.configure.features=Features and packages
+Option.configure.enable_maintainer_mode=Enable maintainer mode (--enable-maintainer-mode)
+Option.configure.enable_maintainer_mode.tip=Specify this to have Makefiles generated with checks for Autotool configuration file changes
+Option.configure.user=User-specified configuration options
+Option.configure.user.tip=Specify one or more configuration options (e.g. --enable-FEATURE, --disable-FEATURE, or --with-PACKAGE)
+
+Tool.autogen = autogen.sh
+
+OptionCategory.autogen.general=Options
+Option.autogen.user=Command line options
+Option.autogen.user.tip=Specify options to pass to the top-level autogen.sh script
+
+RedHatVendor.name = Red Hat
+Bundle-Name.0 = Autotools Plug-in (Incubation)
+provider=Eclipse
+ConvertWizard.name = Convert to a C/C++ Autotools Project
+InvokeAutotools.label = Invoke Autotools
+InvokeAutotools.mnemonic = I
+InvokeAutoconf.label = Invoke Autoconf
+InvokeAutoconf.mnemonic = c
+InvokeAutoconf.description = Run autoconf in the selected directory
+InvokeAutoheader.label = Invoke Autoheader
+InvokeAutoheader.mnemonic = h
+InvokeAutoheader.description = Run autoheader from the selected directory
+InvokeAutomake.label = Invoke Automake
+InvokeAutomake.mnemonic = m
+InvokeAutomake.description = Run automake from the selected directory
+InvokeAutoreconf.label = Invoke Autoreconf
+InvokeAutoreconf.mnemonic = r
+InvokeAutoreconf.description = Run autoreconf from the selected directory
+InvokeAclocal.label = Invoke Aclocal
+InvokeAclocal.mnemonic = l
+InvokeAclocal.description = Run aclocal from the selected directory
+InvokeLibtoolize.label = Invoke Libtoolize
+InvokeLibtoolize.mnemonic = t
+InvokeLibtoolize.description = Run libtoolize in the selected directory
+Reconfigure.label = Reconfigure Project
+Reconfigure.mnemonic = f
+Reconfigure.description = Run configuration scripts for project
+DynamicBuild.label = Dynamic Build Info
+GetIncludePath.label = Get Include Path
+GetDefinedSymbols.label = Get Defined Symbols
+IncludesOption.name = includes
+SymbolsOption.name = symbols
+AutomakeEditor.name = AutomakeEditor
+Automake.name = automake
+ConfigureScript.name=Configure Script
+AutogenScript.name=Autogen Script \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/plugin.xml b/autotools/org.eclipse.linuxtools.cdt.autotools/plugin.xml
new file mode 100644
index 0000000000..04c6fa3dbf
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/plugin.xml
@@ -0,0 +1,1031 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+ <extension
+ id="autotoolsProperties"
+ name="Autotools Build Properties"
+ point="org.eclipse.cdt.managedbuilder.core.buildProperties">
+ <propertyValue
+ property="org.eclipse.cdt.build.core.buildType"
+ id="org.eclipse.linuxtools.cdt.autotools.buildType.default"
+ name="%BuildProperty.value.name.default"/>
+ <propertyValue
+ property="org.eclipse.cdt.build.core.buildArtefactType"
+ id="org.eclipse.linuxtools.cdt.autotools.buildArtefactType.autotools"
+ name="%BuildProperty.type.name.autotools"/>
+ </extension>
+ <extension
+ id="cdt.autootols.managed.build.info"
+ name="Autotools Managed Build Info"
+ point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
+ <managedBuildRevision fileVersion="4.0.0"/>
+ <tool
+ command="configure"
+ id="org.eclipse.linuxtools.cdt.autotools.tool.configure"
+ isAbstract="false"
+ name="%Tool.configure"
+ natureFilter="both">
+ <optionCategory
+ id="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.general"
+ name="%OptionCategory.configure.general"
+ owner="org.eclipse.linuxtools.cdt.autotools.tool.configure"/>
+ <option
+ applicabilityCalculator="org.eclipse.linuxtools.cdt.autotools.AutotoolsDefaultBuildDirHandler"
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.general"
+ defaultValue="build"
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.builddir"
+ isAbstract="false"
+ name="%Option.configure.builddir"
+ resourceFilter="all"
+ tip="%Option.configure.builddir.tip"
+ valueHandler="org.eclipse.linuxtools.cdt.autotools.AutotoolsDefaultBuildDirHandler"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.general"
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.configdir"
+ isAbstract="false"
+ name="%Option.configure.configdir"
+ resourceFilter="all"
+ tip="%Option.configure.configdir.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.general"
+ command="--cache-file="
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.cache_file"
+ isAbstract="false"
+ name="%Option.configure.cache_file"
+ resourceFilter="all"
+ tip="%Option.configure.cache_file.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.general"
+ command="--help"
+ defaultValue="false"
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.help"
+ isAbstract="false"
+ name="%Option.configure.help"
+ resourceFilter="all"
+ tip="%Option.configure.help.tip"
+ valueType="boolean"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.general"
+ command="--no-create"
+ defaultValue="false"
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.no_create"
+ isAbstract="false"
+ name="%Option.configure.no_create"
+ resourceFilter="all"
+ tip="%Option.configure.no_create.tip"
+ valueType="boolean"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.general"
+ command="--quiet"
+ defaultValue="false"
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.quiet"
+ isAbstract="false"
+ name="%Option.configure.quiet"
+ resourceFilter="all"
+ tip="%Option.configure.quiet.tip"
+ valueType="boolean"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.general"
+ command="--version"
+ defaultValue="false"
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.version"
+ isAbstract="false"
+ name="%Option.configure.version"
+ resourceFilter="all"
+ tip="%Option.configure.version.tip"
+ valueType="boolean"/>
+ <optionCategory
+ id="org.eclipse.linuxtools.cdt.autotools.configure.optionCategory.configure.platform"
+ name="%OptionCategory.configure.platform"
+ owner="org.eclipse.linuxtools.cdt.autotools.tool.configure"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.configure.optionCategory.configure.platform"
+ command="--host="
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.host"
+ isAbstract="false"
+ name="%Option.configure.host"
+ resourceFilter="all"
+ tip="%Option.configure.host.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.configure.optionCategory.configure.platform"
+ command="--target="
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.target"
+ isAbstract="false"
+ name="%Option.configure.target"
+ resourceFilter="all"
+ tip="%Option.configure.target.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.configure.optionCategory.configure.platform"
+ command="--build="
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.build"
+ isAbstract="false"
+ name="%Option.configure.build"
+ resourceFilter="all"
+ tip="%Option.configure.build.tip"
+ valueType="string"/>
+ <optionCategory
+ id="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.directories"
+ name="%OptionCategory.configure.directories"
+ owner="org.eclipse.linuxtools.cdt.autotools.tool.configure"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.directories"
+ command="--prefix="
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.prefix"
+ isAbstract="false"
+ name="%Option.configure.prefix"
+ resourceFilter="all"
+ tip="%Option.configure.prefix.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.directories"
+ command="--exec-prefix="
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.exec_prefix"
+ isAbstract="false"
+ name="%Option.configure.exec_prefix"
+ resourceFilter="all"
+ tip="%Option.configure.exec_prefix.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.directories"
+ command="--libdir="
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.libdir"
+ isAbstract="false"
+ name="%Option.configure.libdir"
+ resourceFilter="all"
+ tip="%Option.configure.libdir.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.directories"
+ command="--bindir="
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.bindir"
+ isAbstract="false"
+ name="%Option.configure.bindir"
+ resourceFilter="all"
+ tip="%Option.configure.bindir.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.directories"
+ command="--sbindir="
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.sbindir"
+ isAbstract="false"
+ name="%Option.configure.sbindir"
+ resourceFilter="all"
+ tip="%Option.configure.sbindir.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.directories"
+ command="--includedir="
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.includedir"
+ isAbstract="false"
+ name="%Option.configure.includedir"
+ resourceFilter="all"
+ tip="%Option.configure.includedir.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.directories"
+ command="--datadir="
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.datadir"
+ isAbstract="false"
+ name="%Option.configure.datadir"
+ resourceFilter="all"
+ tip="%Option.configure.datadir.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.directories"
+ command="--sysconfdir="
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.sysconfdir"
+ isAbstract="false"
+ name="%Option.configure.sysconfdir"
+ resourceFilter="all"
+ tip="%Option.configure.sysconfdir.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.directories"
+ command="--infodir="
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.infodir"
+ isAbstract="false"
+ name="%Option.configure.infodir"
+ resourceFilter="all"
+ tip="%Option.configure.infodir.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.directories"
+ command="--mandir="
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.mandir"
+ isAbstract="false"
+ name="%Option.configure.mandir"
+ resourceFilter="all"
+ tip="%Option.configure.mandir.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.directories"
+ command="--srcdir="
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.srcdir"
+ isAbstract="false"
+ name="%Option.configure.srcdir"
+ resourceFilter="all"
+ tip="%Option.configure.srcdir.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.directories"
+ command="--localstatedir="
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.localstatedir"
+ isAbstract="false"
+ name="%Option.configure.localstatedir"
+ resourceFilter="all"
+ tip="%Option.configure.localstatedir"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.directories"
+ command="--sharedstatedir="
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.sharedstatedir"
+ isAbstract="false"
+ name="%Option.configure.sharedstatedir"
+ resourceFilter="all"
+ tip="%Option.configure.sharedstatedir"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.directories"
+ command="--libexecdir="
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.libexecdir"
+ isAbstract="false"
+ name="%Option.configure.libexecdir"
+ resourceFilter="all"
+ tip="%Option.configure.libexecdir"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.directories"
+ command="--oldincludedir="
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.oldincludedir"
+ isAbstract="false"
+ name="%Option.configure.oldincludedir"
+ resourceFilter="all"
+ tip="%Option.configure.oldincludedir.tip"
+ valueType="string"/>
+ <optionCategory
+ id="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.filenames"
+ name="%OptionCategory.configure.filenames"
+ owner="org.eclipse.linuxtools.cdt.autotools.tool.configure"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.filenames"
+ command="--program-prefix="
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.program_prefix"
+ isAbstract="false"
+ name="%Option.configure.program_prefix"
+ resourceFilter="all"
+ tip="%Option.configure.program_prefix.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.filenames"
+ command="--program-suffix="
+ id="org.eclipse.linuxtools.cdt.autotools.option.program_suffix"
+ isAbstract="false"
+ name="%Option.configure.program_suffix"
+ resourceFilter="all"
+ tip="%Option.configure.program_suffix.tip"
+ valueType="string"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.filenames"
+ command="--program-transform-name="
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.program_transform_name"
+ isAbstract="false"
+ name="%Option.configure.program_transform_name"
+ resourceFilter="all"
+ tip="%Option.configure.program_transform_name.tip"
+ valueType="string"/>
+ <optionCategory
+ id="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.features"
+ name="%OptionCategory.configure.features"
+ owner="org.eclipse.linuxtools.cdt.autotools.tool.configure"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.features"
+ command="--enable-maintainer-mode"
+ defaultValue="false"
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.enable_maintainer_mode"
+ isAbstract="false"
+ name="%Option.configure.enable_maintainer_mode"
+ resourceFilter="all"
+ tip="%Option.configure.enable_maintainer_mode.tip"
+ valueType="boolean"/>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.features"
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.user"
+ isAbstract="false"
+ name="%Option.configure.user"
+ resourceFilter="all"
+ tip="%Option.configure.user.tip"
+ valueType="string"/>
+ <option
+ applicabilityCalculator="org.eclipse.linuxtools.cdt.autotools.AutotoolsDefaultBuildDirHandler"
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.general"
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.includes"
+ isAbstract="false"
+ name="%IncludesOption.name"
+ valueType="includePath">
+ <enablement type="UI_VISIBILITY|UI_ENABLEMENT">
+ <false/>
+ </enablement>
+ </option>
+ <option
+ applicabilityCalculator="org.eclipse.linuxtools.cdt.autotools.AutotoolsDefaultBuildDirHandler"
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.configure.general"
+ id="org.eclipse.linuxtools.cdt.autotools.option.configure.symbols"
+ isAbstract="false"
+ name="%SymbolsOption.name"
+ valueType="definedSymbols">
+ <enablement type="UI_VISIBILITY|UI_ENABLEMENT">
+ <false/>
+ </enablement>
+ </option>
+ <outputType
+ id="org.eclipse.linuxtools.cdt.autotools.outputType.configure"
+ name="%Configure.outputType"
+ outputs="status"
+ primaryOutput="true"/>
+ <inputType
+ id="org.eclipse.linuxtools.cdt.autotools.inputType.configure"
+ scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"
+ languageId="org.eclipse.cdt.core.gcc">
+ </inputType>
+ <inputType
+ id="org.eclipse.linuxtools.cdt.autotools.inputType.configure1"
+ scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"
+ languageId="org.eclipse.cdt.core.g++">
+ </inputType>
+ </tool>
+ <tool
+ command="autogen.sh"
+ id="org.eclipse.linuxtools.cdt.autotools.tool.autogen"
+ isAbstract="false"
+ name="%Tool.autogen"
+ natureFilter="both">
+ <optionCategory
+ id="org.eclipse.linuxtools.cdt.autotools.optionCategory.autogen.general"
+ name="%OptionCategory.autogen.general"
+ owner="org.eclipse.linuxtools.cdt.autotools.tool.autogen">
+ </optionCategory>
+ <option
+ category="org.eclipse.linuxtools.cdt.autotools.optionCategory.autogen.general"
+ id="org.eclipse.linuxtools.cdt.autotools.option.autogen.user"
+ isAbstract="false"
+ name="%Option.autogen.user"
+ resourceFilter="all"
+ tip="%Option.autogen.user.tip"
+ valueType="string">
+ </option>
+ <outputType
+ id="org.eclipse.linuxtools.cdt.autotools.autogen.outputType"
+ name="%Autogen.outputType"
+ outputNames="configure"
+ primaryOutput="true">
+ </outputType>
+ <inputType
+ id="org.eclipse.linuxtools.cdt.autotools.autogen.inputType"
+ multipleOfType="false"
+ name="autogenScript"
+ scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"
+ sourceContentType="org.eclipse.linuxtools.cdt.autotools.autogenScript">
+ </inputType>
+ </tool>
+ <builder
+ arguments="-k"
+ buildfileGenerator="org.eclipse.linuxtools.cdt.autotools.MakeGenerator"
+ command="make"
+ id="org.eclipse.linuxtools.cdt.autotools.builder"
+ isAbstract="true"
+ isVariableCaseSensitive="false"
+ name="%Makefile.builder.name"/>
+ <targetPlatform
+ archList="all"
+ binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF"
+ id="org.eclipse.linuxtools.cdt.autotools.targetPlatform"
+ isAbstract="false"
+ name="%Autotools.targetplatform.name"/>
+ <projectType
+ buildArtefactType="org.eclipse.linuxtools.cdt.autotools.buildArtefactType.autotools"
+ id="org.eclipse.linuxtools.cdt.autotools.projectType"
+ isAbstract="false">
+ <configuration
+ buildProperties="org.eclipse.linuxtools.cdt.autotools.buildType.default"
+ cleanCommand="rm -rf"
+ errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser"
+ id="org.eclipse.linuxtools.cdt.autotools.configuration.build"
+ name="%Configuration.build.name">
+ <toolChain
+ archList="all"
+ id="org.eclipse.linuxtools.cdt.autotools.toolChain"
+ name="%Autotools.gnu.toolchain.name"
+ scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProject"
+ targetTool="org.eclipse.linuxtools.cdt.autotools.tool.configure"
+ unusedChildren="org.eclipse.linuxtools.cdt.autotools.toolchain.tool.gcc;org.eclipse.linuxtools.cdt.autotools.toolchain.tool.gpp">
+ <tool
+ id="org.eclipse.linuxtools.cdt.autotools.gnu.toolchain.tool.configure"
+ isAbstract="false"
+ natureFilter="both"
+ superClass="org.eclipse.linuxtools.cdt.autotools.tool.configure"/>
+ <tool
+ id="org.eclipse.linuxtools.cdt.autotools.toolchain.tool.autogen"
+ isAbstract="false"
+ natureFilter="both"
+ superClass="org.eclipse.linuxtools.cdt.autotools.tool.autogen">
+ </tool>
+ <tool
+ id="org.eclipse.linuxtools.cdt.autotools.toolchain.tool.gcc"
+ isAbstract="false"
+ superClass="cdt.managedbuild.tool.gnu.c.compiler">
+ </tool>
+ <tool
+ id="org.eclipse.linuxtools.cdt.autotools.toolchain.tool.gpp"
+ isAbstract="false"
+ superClass="cdt.managedbuild.tool.gnu.cpp.compiler">
+ </tool>
+ <builder
+ id="org.eclipse.linuxtools.cdt.autotools.toolchain.builder"
+ isAbstract="false"
+ isVariableCaseSensitive="false"
+ superClass="org.eclipse.linuxtools.cdt.autotools.builder"/>
+ <targetPlatform
+ id="org.eclipse.linuxtools.cdt.autotools.toolchain.targetPlatform"
+ isAbstract="false"
+ name="%Autotools.targetplatform.name"
+ superClass="org.eclipse.linuxtools.cdt.autotools.targetPlatform">
+ </targetPlatform>
+ <supportedProperties>
+ <property
+ id="org.eclipse.cdt.build.core.buildArtefactType">
+ <value
+ id="org.eclipse.linuxtools.cdt.autotools.buildArtefactType.autotools">
+ </value>
+ </property>
+ </supportedProperties>
+ </toolChain>
+ </configuration>
+ </projectType>
+ </extension>
+ <extension
+ id="genmakebuilder"
+ name="Autotools generated make builder"
+ point="org.eclipse.core.resources.builders">
+ <builder
+ callOnEmptyDelta="true"
+ hasNature="false">
+ <run class="org.eclipse.linuxtools.cdt.autotools.AutotoolsMakefileBuilder"/>
+ </builder>
+ </extension>
+ <extension
+ point="org.eclipse.cdt.core.CBuildConsole">
+ <CBuildConsole
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.CConfigureConsole"
+ id="org.eclipse.linuxtools.cdt.autotools.configureConsole"/>
+ <CBuildConsole
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.CBuildStepsConsole"
+ id="org.eclipse.linuxtools.cdt.autotools.buildStepsConsole">
+ </CBuildConsole>
+ <CBuildConsole
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.AutotoolsConsole"
+ id="org.eclipse.linuxtools.cdt.autotools.autotoolsConsole">
+ </CBuildConsole>
+ </extension>
+ <extension
+ id="AutotoolsScannerInfoProvider"
+ point="org.eclipse.cdt.core.ScannerInfoProvider">
+ <cextension>
+ <run
+ class="org.eclipse.linuxtools.cdt.autotools.AutotoolsScannerInfoProvider">
+ </run>
+ </cextension>
+ </extension>
+ <extension
+ id="parsefileerror"
+ name="Autotools Parse Error Marker"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.core.resources.problemmarker"/>
+ <super type="org.eclipse.core.resources.textmarker"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ id="outlineparsefileerror"
+ name="Autotools Outline Page Parse Error"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.core.resources.problemmarker"/>
+ <super type="org.eclipse.core.resources.textmarker"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ point="org.eclipse.cdt.make.core.MakeTargetBuilder">
+ <builder
+ builderID="org.eclipse.linuxtools.cdt.autotools.genmakebuilder"
+ id="org.eclipse.linuxtools.cdt.autotools.builder1">
+ </builder>
+ </extension>
+ <extension
+ point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.eclipse.linuxtools.cdt.autotools.AutotoolsProjectPropertyTester"
+ id="org.eclipse.linuxtools.cdt.autotools.propertyTester.isAutotoolsProject"
+ namespace="org.eclipse.linuxtools.cdt.autotools"
+ properties="isAutotoolsProject"
+ type="org.eclipse.core.resources.IResource">
+ </propertyTester>
+ </extension>
+ <extension
+ id="autotoolsNature"
+ name="%AutotoolsNature.name"
+ point="org.eclipse.core.resources.natures">
+ <requires-nature
+ id="org.eclipse.cdt.managedbuilder.core.managedBuildNature">
+ </requires-nature>
+ <runtime>
+ <run
+ class="org.eclipse.linuxtools.cdt.autotools.AutotoolsProjectNature">
+ </run>
+ </runtime>
+ </extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="menu:project?after=additions">
+ <menu
+ id="invokeAutotoolsOld"
+ label="%InvokeAutotools.label"
+ mnemonic="%InvokeAutotools.mnemonic">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ <test
+ property="org.eclipse.core.resources.projectNature"
+ value="org.eclipse.linuxtools.cdt.autotools.autotoolsNature">
+ </test>
+ </adapt>
+ </iterate>
+ </and>
+ </visibleWhen>
+ </menu>
+ </menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="menu:project?after=additions">
+ <command
+ commandId="org.eclipse.linuxtools.cdt.autotools.command.reconfigure"
+ id="reconfigure"
+ label="%Reconfigure.label"
+ mnemonic="%Reconfigure.mnemonic"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ <test
+ property="org.eclipse.core.resources.projectNature"
+ value="org.eclipse.linuxtools.cdt.autotools.autotoolsNature">
+ </test>
+ </adapt>
+ </iterate>
+ </and>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="menu:invokeAutotoolsOld">
+ <command
+ commandId="org.eclipse.linuxtools.cdt.autotools.command.autoconf"
+ id="autoconf"
+ label="%InvokeAutoconf.label"
+ mnemonic="%InvokeAutoconf.mnemonic"
+ style="push">
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.cdt.autotools.command.autoheader"
+ id="autoheader"
+ label="%InvokeAutoheader.label"
+ mnemonic="%InvokeAutoheader.mnemonic"
+ style="push">
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.cdt.autotools.command.automake"
+ id="automake"
+ label="%InvokeAutomake.label"
+ mnemonic="%InvokeAutomake.mnemonic"
+ style="push">
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.cdt.autotools.command.autoreconf"
+ id="autoreconf"
+ label="%InvokeAutoreconf.label"
+ mnemonic="%InvokeAutoreconf.mnemonic"
+ style="push">
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.cdt.autotools.command.aclocal"
+ id="aclocal"
+ label="%InvokeAclocal.label"
+ mnemonic="%InvokeAclocal.mnemonic"
+ style="push">
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.cdt.autotools.command.libtoolize"
+ id="libtoolize"
+ label="%InvokeLibtoolize.label"
+ mnemonic="%InvokeLibtoolize.mnemonic"
+ style="push">
+ </command>
+ </menuContribution>
+ </extension>
+ <extension
+ id="org.eclipse.linuxtools.cdt.autotools.commands"
+ name="Autoconf"
+ point="org.eclipse.ui.commands">
+ <category
+ id="org.eclipse.linuxtools.cdt.autotools.category.invokeAutotools"
+ name="%InvokeAutotools.label">
+ </category>
+ <command
+ categoryId="org.eclipse.linuxtools.cdt.autotools.category.invokeAutotools"
+ description="%InvokeAutoconf.description"
+ id="org.eclipse.linuxtools.cdt.autotools.command.autoconf"
+ name="%InvokeAutoconf.label">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.cdt.autotools.category.invokeAutotools"
+ description="%InvokeAutoheader.description"
+ id="org.eclipse.linuxtools.cdt.autotools.command.autoheader"
+ name="%InvokeAutoheader.label">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.cdt.autotools.category.invokeAutotools"
+ description="%InvokeAutomake.description"
+ id="org.eclipse.linuxtools.cdt.autotools.command.automake"
+ name="%InvokeAutomake.label">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.cdt.autotools.category.invokeAutotools"
+ description="%InvokeAutoreconf.description"
+ id="org.eclipse.linuxtools.cdt.autotools.command.autoreconf"
+ name="%InvokeAutoreconf.label">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.cdt.autotools.category.invokeAutotools"
+ description="%InvokeAclocal.description"
+ id="org.eclipse.linuxtools.cdt.autotools.command.aclocal"
+ name="%InvokeAclocal.label">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.cdt.autotools.category.invokeAutotools"
+ description="%InvokeLibtoolize.description"
+ id="org.eclipse.linuxtools.cdt.autotools.command.libtoolize"
+ name="%InvokeLibtoolize.label">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.cdt.autotools.category.invokeAutotools"
+ description="%Reconfigure.description"
+ id="org.eclipse.linuxtools.cdt.autotools.command.reconfigure"
+ name="%Reconfigure.label">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.linuxtools.cdt.autotools.actions.AutoconfHandler"
+ commandId="org.eclipse.linuxtools.cdt.autotools.command.autoconf">
+ <activeWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.cdt.autotools.actions.AutoheaderHandler"
+ commandId="org.eclipse.linuxtools.cdt.autotools.command.autoheader">
+ <activeWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.cdt.autotools.actions.AutomakeHandler"
+ commandId="org.eclipse.linuxtools.cdt.autotools.command.automake">
+ <activeWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.cdt.autotools.actions.AutoreconfHandler"
+ commandId="org.eclipse.linuxtools.cdt.autotools.command.autoreconf">
+ <activeWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.cdt.autotools.actions.AclocalHandler"
+ commandId="org.eclipse.linuxtools.cdt.autotools.command.aclocal">
+ <activeWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.cdt.autotools.actions.LibtoolizeHandler"
+ commandId="org.eclipse.linuxtools.cdt.autotools.command.libtoolize">
+ <activeWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.cdt.autotools.actions.ReconfigureHandler"
+ commandId="org.eclipse.linuxtools.cdt.autotools.command.reconfigure">
+ <activeWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ </adapt>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.cdt.core.CBuildConsole">
+ <CBuildConsole
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.CConfigureConsole"
+ id="org.eclipse.linuxtools.cdt.autotools.configureConsole"/>
+ <CBuildConsole
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.CBuildStepsConsole"
+ id="org.eclipse.linuxtools.cdt.autotools.buildStepsConsole">
+ </CBuildConsole>
+ <CBuildConsole
+ class="org.eclipse.linuxtools.internal.cdt.autotools.ui.AutotoolsConsole"
+ id="org.eclipse.linuxtools.cdt.autotools.autotoolsConsole">
+ </CBuildConsole>
+ </extension>
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ class="org.eclipse.linuxtools.cdt.autotools.ui.properties.AutotoolsPropertyPage"
+ id="org.eclipse.linuxtools.cdt.autotools.propertypage"
+ name="%PropertyAutotools.name"
+ >
+ <filter
+ name="projectNature"
+ value="org.eclipse.linuxtools.cdt.autotools.autotoolsNature">
+ </filter>
+ <enabledWhen>
+ <or>
+ <instanceof value="org.eclipse.core.resources.IProject"/>
+ <instanceof value="org.eclipse.cdt.core.model.ICProject"/>
+
+ <instanceof value="org.eclipse.core.resources.IFolder"/>
+ <instanceof value="org.eclipse.cdt.core.model.ICContainer"/>
+
+ <instanceof value="org.eclipse.core.resources.IFile"/>
+ <instanceof value="org.eclipse.cdt.core.model.ITranslationUnit"/>
+ </or>
+ </enabledWhen>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.cdt.ui.cPropertyTab">
+ <tab
+ class="org.eclipse.linuxtools.cdt.autotools.ui.properties.AutotoolsBuildPropertyPage"
+ icon="icons/autoconf.gif"
+ name="%AutotoolsBuildPropertyTab.name"
+ parent="org.eclipse.cdt.managedbuilder.ui.properties.Page_BuildSettings"
+ tooltip="%PropertyTabBuild.tooltip"
+ weight="002">
+ </tab>
+ <tab
+ class="org.eclipse.linuxtools.cdt.autotools.ui.properties.AutotoolsEditorPropertyPage"
+ name="%AutotoolsEditorsPropertyTab.name"
+ parent="org.eclipse.linuxtools.cdt.autotools.ui.properties.AutotoolsPropertyPage">
+ </tab>
+ <tab
+ class="org.eclipse.linuxtools.cdt.autotools.ui.properties.AutotoolsToolsPropertyPage"
+ name="%AutotoolsToolsPropertyTab.name"
+ parent="org.eclipse.linuxtools.cdt.autotools.ui.properties.AutotoolsPropertyPage">
+ </tab>
+ </extension>
+ <extension
+ point="org.eclipse.core.contenttype.contentTypes">
+ <content-type
+ id="org.eclipse.linuxtools.cdt.autotools.configureScript"
+ name="%ConfigureScript.name"
+ priority="high">
+ </content-type>
+ <content-type
+ id="org.eclipse.linuxtools.cdt.autotools.autogenScript"
+ name="%AutogenScript.name"
+ priority="high">
+ </content-type>
+ <file-association
+ content-type="org.eclipse.linuxtools.cdt.autotools.configureScript"
+ file-names="configure">
+ </file-association>
+ <file-association
+ content-type="org.eclipse.linuxtools.cdt.autotools.autogenScript"
+ file-names="autogen.sh">
+ </file-association>
+ </extension>
+ </plugin>
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsBuilder.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsBuilder.java
new file mode 100644
index 0000000000..f51c2b64d7
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsBuilder.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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 implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools;
+
+import org.eclipse.cdt.core.settings.model.COutputEntry;
+import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
+import org.eclipse.cdt.core.settings.model.ICOutputEntry;
+import org.eclipse.cdt.managedbuilder.core.IBuilder;
+import org.eclipse.cdt.managedbuilder.internal.core.Builder;
+import org.eclipse.cdt.managedbuilder.internal.core.ToolChain;
+import org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.linuxtools.cdt.autotools.ui.properties.AutotoolsPropertyConstants;
+
+
+
+// Proxy class for IBuilder to allow overriding of getBuildLocation().
+
+@SuppressWarnings("restriction")
+public class AutotoolsBuilder extends Builder {
+
+ private String buildPath;
+ private IProject project;
+
+ public AutotoolsBuilder(IBuilder builder, IProject project, ToolChain toolChain) {
+ super(toolChain, builder.getId(), builder.getName(), (Builder)builder);
+ this.project = project;
+ }
+
+ protected IProject getProject() {
+ return project;
+ }
+
+
+ public String getBuildPath() {
+ // TODO Auto-generated method stub
+ return buildPath;
+ }
+
+
+ public void setBuildPath(String path) {
+ // TODO Auto-generated method stub
+ this.buildPath = path;
+ }
+
+ public String getCleanBuildTarget() {
+ String target = null;
+ try {
+ target = getProject().getPersistentProperty(AutotoolsPropertyConstants.CLEAN_MAKE_TARGET);
+ } catch (CoreException ce) {
+ // do nothing
+ }
+ if (target == null)
+ target = AutotoolsPropertyConstants.CLEAN_MAKE_TARGET_DEFAULT;
+ return target;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.managedbuilder.core.IBuilder#getBuildFileGenerator()
+ */
+ public IManagedBuilderMakefileGenerator getBuildFileGenerator() {
+ return new MakeGenerator();
+ }
+
+ /* @override */
+ public ICOutputEntry[] getOutputEntries() {
+ return new ICOutputEntry[]{new COutputEntry(buildPath, null, ICLanguageSettingEntry.VALUE_WORKSPACE_PATH | ICLanguageSettingEntry.RESOLVED)};
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsDefaultBuildDirHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsDefaultBuildDirHandler.java
new file mode 100644
index 0000000000..e1a3e5ae59
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsDefaultBuildDirHandler.java
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools;
+
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import org.eclipse.cdt.managedbuilder.core.BuildException;
+import org.eclipse.cdt.managedbuilder.core.IBuildObject;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
+import org.eclipse.cdt.managedbuilder.core.IManagedOptionValueHandler;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.IOptionApplicability;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.ManagedOptionValueHandler;
+
+public class AutotoolsDefaultBuildDirHandler extends ManagedOptionValueHandler
+ implements IOptionApplicability {
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.managedbuilder.core.IManagedOptionValueHandler#handleValue(IConfiguration,IToolChain,IOption,String,int)
+ */
+
+ public final static String DEFAULT_BUILD_DIR = "build"; //$NON-NLS-1$
+ public final static String CONFIGURE_TOOL_ID = "org.eclipse.linuxtools.cdt.autotools.gnu.toolchain.tool.configure"; //$NON-NLS-1$
+ public final static String BUILD_DIR_OPTION_ID = "org.eclipse.linuxtools.cdt.autotools.option.configure.builddir"; //$NON-NLS-1$
+ public final static String BUILD_DIR_APPLY = "BuildDir.apply"; //$NON-NLS-1$
+ public final static String BUILD_DIR_DEFAULT_QUESTION = "BuildDir.default"; //$NON-NLS-1$
+ public final static String BUILD_DIR_YES = "BuildDir.yes"; //$NON-NLS-1$
+ public final static String BUILD_DIR_NO = "BuildDir.no"; //$NON-NLS-1$
+
+ //FIXME: Use holder to set option value, not the "option" parameter
+ public boolean handleValue(IBuildObject buildObject,
+ IHoldsOptions holder,
+ IOption option,
+ String extraArgument, int event)
+ {
+ // Get the current value of the build dir option.
+ String value = (String)option.getValue();
+ String valueBase = value;
+
+ if (buildObject instanceof IConfiguration &&
+ (event == IManagedOptionValueHandler.EVENT_OPEN)) {
+// || event == IManagedOptionValueHandler.EVENT_APPLY)) {
+ SortedSet<Integer> nums = new TreeSet<Integer>();
+ IConfiguration configuration = (IConfiguration)buildObject;
+ IConfiguration[] cfgs = configuration.getManagedProject().getConfigurations();
+ int index = 1;
+ boolean valueFound = false;
+ for (int i = 0; i < cfgs.length; ++i) {
+ IConfiguration config = cfgs[i];
+ if (config == null || config.getName().equals(configuration.getName())) {
+ continue;
+ }
+ ITool tool = config.getToolFromOutputExtension("status"); //$NON-NLS-1$
+ if (tool == null) // can happen if user has purposely mixed autotools and non-autotools cfgs
+ continue;
+
+ // We now want to get the builddir option for the tool. If we use
+ // getOptionById(), we must know the full id which in our case has a generated
+ // numeric extension at the end. Otherwise, the base builddir option id
+ // will get us the default option, not the one for the configuration we
+ // are currently looking at. We use getOptionBySuperClassId() instead
+ // which will find us options that are based off the original builddir
+ // option which include those with generated extensions at the end.
+ IOption buildDirOption = tool.getOptionBySuperClassId(BUILD_DIR_OPTION_ID);
+ String buildDir = (String)buildDirOption.getValue();
+ if (buildDir.equals(value)) {
+ valueFound = true;
+ }
+ // For "buildXX" values, store the XX values in a list of used extensions.
+ if (buildDir.startsWith(DEFAULT_BUILD_DIR)) {
+ String numstr = buildDir.substring(DEFAULT_BUILD_DIR.length());
+ try {
+ Integer k = Integer.valueOf(numstr);
+ // Assume the value to start with is the last value in the list
+ // plus 1.
+ index = k.intValue() + 1;
+ nums.add(k);
+ } catch (NumberFormatException e) {
+ // ignore
+ }
+ }
+ }
+
+ // If there is no name collision for the configurations, then we simply return.
+ if (!valueFound)
+ return true;
+
+// // If the user has applied a change and it matches an existing build directory,
+// // then warn and ask if the user wants the value defaulted to a safe value.
+// if (event == EVENT_APPLY) {
+// String title = AutotoolsPlugin.getResourceString(BUILD_DIR_APPLY);
+// String question = AutotoolsPlugin.getResourceString(BUILD_DIR_DEFAULT_QUESTION);
+// String[] buttonLabels = new String[2];
+// buttonLabels[0] = AutotoolsPlugin.getResourceString(BUILD_DIR_YES);
+// buttonLabels[1] = AutotoolsPlugin.getResourceString(BUILD_DIR_NO);
+// MessageDialog d = new MessageDialog(AutotoolsPlugin.getActiveWorkbenchShell(),
+// title, null, question, MessageDialog.QUESTION, buttonLabels, 0);
+// int result = d.open();
+// if (result == 1)
+// return true;
+// }
+
+ // For defaulted buildXX values, we support defaulting a unique XX value.
+ if (value.startsWith(DEFAULT_BUILD_DIR)) {
+ valueBase = DEFAULT_BUILD_DIR;
+ // Try and establish a unique "buildXX" name that hasn't been used yet.
+ while (nums.contains(Integer.valueOf(index))) {
+ ++index;
+ }
+ }
+
+ // Reset the default build directory for this opened configuration.
+ try {
+ IOption optionToSet = holder.getOptionToSet(option, false);
+ optionToSet.setValue(valueBase + index);
+ } catch (BuildException e) {
+ return false;
+ }
+ }
+
+ // The event was not handled, thus return false
+ return true;
+ }
+
+ // IOptionApplicability methods
+
+ public boolean isOptionEnabled(IBuildObject configuration,
+ IHoldsOptions holder, IOption option) {
+ return true;
+ }
+
+ public boolean isOptionUsedInCommandLine(IBuildObject configuration,
+ IHoldsOptions holder, IOption option) {
+ return false;
+ }
+
+ public boolean isOptionVisible(IBuildObject configuration,
+ IHoldsOptions holder, IOption option) {
+ if (option.getName().equals("includes") || option.getName().equals("symbols"))
+ return false;
+ return true;
+ }
+
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java
new file mode 100644
index 0000000000..198d89d075
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsMakefileBuilder.java
@@ -0,0 +1,512 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2005, 2007 IBM Corporation 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:
+ * IBM Rational Software - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.CommandLauncher;
+import org.eclipse.cdt.core.ConsoleOutputStream;
+import org.eclipse.cdt.core.envvar.IEnvironmentVariable;
+import org.eclipse.cdt.core.resources.IConsole;
+import org.eclipse.cdt.make.core.IMakeCommonBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IBuilder;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IManagedProject;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
+import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
+import org.eclipse.cdt.managedbuilder.internal.core.Builder;
+import org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder;
+import org.eclipse.cdt.managedbuilder.internal.core.ToolChain;
+import org.eclipse.cdt.managedbuilder.macros.BuildMacroException;
+import org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider;
+import org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator;
+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.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.linuxtools.cdt.autotools.ui.properties.AutotoolsPropertyConstants;
+
+
+/**
+ * This is the incremental builder associated with a managed build project. It dynamically
+ * decides the makefile generator it wants to use for a specific target.
+ *
+ * @since 1.2
+ */
+@SuppressWarnings("restriction")
+public class AutotoolsMakefileBuilder extends CommonBuilder {
+ public static final String BUILDER_NAME = "genmakebuilder"; //$NON-NLS-1$
+ public static final String BUILDER_ID = AutotoolsPlugin.getUniqueIdentifier() + "." + BUILDER_NAME; //$NON-NLS-1$
+ public static final String MANAGED_BUILDER_ID = ManagedBuilderCorePlugin.getUniqueIdentifier() + "." + BUILDER_NAME; //$NON-NLS-1$
+ public static final String AUTOTOOLS_CONFIG_ID = AutotoolsPlugin.getUniqueIdentifier() + ".configuration.build"; //$NON-NLS-1$
+ public static final String AUTOTOOLS_PROJECT_TYPE_ID = AutotoolsPlugin.getUniqueIdentifier() + ".projectType"; //$NON-NLS-1$
+
+ private static final String BUILD_FINISHED = "AutotoolsMakefileBuilder.message.finished"; //$NON-NLS-1$
+ private static final String TYPE_CLEAN = "AutotoolsMakefileBuilder.type.clean"; //$NON-NLS-1$
+ private static final String CONSOLE_HEADER = "AutotoolsMakefileBuilder.message.console.header"; //$NON-NLS-1$
+
+ private static final String EMPTY_STRING = new String();
+ public final String WHITESPACE = " "; //$NON-NLS-1$
+
+ protected boolean buildCalled;
+
+ private String makeTargetName;
+
+ @SuppressWarnings("unused")
+ private String preBuildErrMsg = new String();
+ @SuppressWarnings("unused")
+ private String postBuildErrMsg = new String();
+
+ public static String getBuilderId() {
+ return BUILDER_ID;
+ }
+
+ public static boolean hasTargetBuilder(IProject project) {
+ try {
+ // When a project is converted to an Autotools project, we
+ // replace the ManagedMake builder with a special one that
+ // handles MakeTargets. If a project is brought into Eclipse and
+ // uses the New Project Wizard to create a ManagedMake project that
+ // is of type: Autotools, this added step is not done. If we know
+ // we have an Autotools project from the configuration id, then
+ // we should add the builder now. We also should replace the
+ // default ManagedMake scanner provider with the Autotools one,
+ // then return true.
+ if (project.getNature(ManagedCProjectNature.MNG_NATURE_ID) != null) {
+ IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+ IManagedProject m = info.getManagedProject();
+ if (m != null && m.getProjectType().getId().equals(AUTOTOOLS_PROJECT_TYPE_ID)) {
+ AutotoolsProjectNature.addAutotoolsBuilder(project, new NullProgressMonitor());
+ AutotoolsPlugin.verifyScannerInfoProvider(project);
+ return true;
+ }
+ }
+ } catch (CoreException e) {
+ // Don't care...fall through to not found.
+ } catch (Exception f) {
+ // Don't care...fall through to not found.
+ }
+ // Otherwise not found.
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.internal.events.InternalBuilder#build(int, java.util.Map, org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @SuppressWarnings({ "unchecked", "deprecation" })
+ protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException {
+ IProject[] results = null;
+ IProject project = getProject();
+ IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+ IManagedBuilderMakefileGenerator generator = null;
+ try {
+ // Figure out the working directory for the build and make sure there is a makefile there
+ // If not, mark a rebuild is required so that configuration will get
+ // invoked.
+ IWorkspace workspace = project.getWorkspace();
+ if (workspace != null) {
+ IWorkspaceRoot root = workspace.getRoot();
+ if (root != null) {
+ if (info.getDefaultConfiguration() == null)
+ return null;
+ generator = new MakeGenerator();
+ generator.initialize(getProject(), info, monitor);
+ IPath buildDir = project.getLocation().append(generator.getBuildWorkingDir());
+ IPath makefilePath = buildDir.append(generator.getMakefileName());
+ IFile makefile = root.getFileForLocation(makefilePath);
+ if (makefile == null || !makefile.exists()) {
+ info.setRebuildState(true);
+ }
+ }
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ makeTargetName = (String)args.get("org.eclipse.cdt.make.core.build.target.inc"); //$NON-NLS-1$
+
+ buildCalled = true;
+ /**
+ * @see IncrementalProjectBuilder#build
+ */
+// fBuildSet.start(this);
+
+ // Hijack the build. This is because the CommonBuilder code will
+ // try and create builders for a MakeTarget build. We don't want
+ // that because this will default to using the GnuMakefileGenerator
+ // which fails. We want to use our Autotools MakeGenerator and
+ // perform a make from the top-level.
+ if(VERBOSE)
+ outputTrace(project.getName(), ">>build requested, type = " + kind); //$NON-NLS-1$
+
+ IConfiguration cfg = info.getDefaultConfiguration();
+
+ // Assemble the information needed to generate the targets
+ String prebuildStep = cfg.getPrebuildStep();
+ try{
+ //try to resolve the build macros in the prebuild step
+ prebuildStep = ManagedBuildManager.getBuildMacroProvider().resolveValueToMakefileFormat(
+ prebuildStep,
+ EMPTY_STRING,
+ WHITESPACE,
+ IBuildMacroProvider.CONTEXT_CONFIGURATION,
+ cfg);
+ } catch (BuildMacroException e){
+ }
+ prebuildStep = prebuildStep.trim(); // Remove leading and trailing whitespace (and control characters)
+
+ String postbuildStep = cfg.getPostbuildStep();
+ try{
+ //try to resolve the build macros in the postbuild step
+ postbuildStep = ManagedBuildManager.getBuildMacroProvider().resolveValueToMakefileFormat(
+ postbuildStep,
+ EMPTY_STRING,
+ WHITESPACE,
+ IBuildMacroProvider.CONTEXT_CONFIGURATION,
+ cfg);
+
+ } catch (BuildMacroException e){
+ }
+ postbuildStep = postbuildStep.trim(); // Remove leading and trailing whitespace (and control characters)
+ String preannouncebuildStep = cfg.getPreannouncebuildStep();
+ String postannouncebuildStep = cfg.getPostannouncebuildStep();
+
+ IConsole console = null;
+ ConsoleOutputStream consoleOutStream = null;
+ CommandLauncher launcher = null;
+ String[] env = null;
+ Process proc = null;
+ OutputStream stdout = null;
+ OutputStream stderr = null;
+
+ // If we have a prebuild or postbuild step, set up a command launcher to use.
+ if (!prebuildStep.equals("") || !postbuildStep.equals("")) {
+ console = CCorePlugin.getDefault().getConsole("org.eclipse.linuxtools.cdt.autotools.buildStepsConsole"); // $NON-NLS-1$
+ console.start(project);
+ consoleOutStream = console.getOutputStream();
+ stdout = consoleOutStream;
+ stderr = consoleOutStream;
+ launcher = new CommandLauncher();
+ // Set the environment
+ IEnvironmentVariable variables[] = ManagedBuildManager
+ .getEnvironmentVariableProvider().getVariables(cfg, true);
+ ArrayList<String> envList = new ArrayList<String>();
+ if (variables != null) {
+ for (int i = 0; i < variables.length; i++) {
+ envList.add(variables[i].getName()
+ + "=" + variables[i].getValue()); //$NON-NLS-1$
+ }
+ env = (String[]) envList.toArray(new String[envList.size()]);
+ }
+ }
+
+ // Check for a prebuild step and execute it if it exists.
+ if (!prebuildStep.equals("")) {
+ monitor.subTask(preannouncebuildStep);
+
+ StringBuffer buffer = new StringBuffer();
+ buffer.append(preannouncebuildStep);
+ buffer.append(System.getProperty("line.separator", "\n")); // $NON-NLS-1$ // $NON-NLS-2$
+
+ try {
+ consoleOutStream.write(buffer.toString().getBytes());
+ consoleOutStream.flush();
+ } catch (IOException e) {
+ // do nothing
+ }
+
+ launcher.showCommand(true);
+ String[] tmp = prebuildStep.split("\\s");
+ String[] cmdargs = new String[tmp.length - 1];
+ if (tmp.length > 1)
+ System.arraycopy(tmp, 1, cmdargs, 0, tmp.length - 1);
+ proc = launcher.execute(new Path(tmp[0]), cmdargs, env,
+ project.getLocation().append(generator.getBuildWorkingDir()), monitor);
+ if (proc != null) {
+ try {
+ // Close the input of the process since we will never write to
+ // it
+ proc.getOutputStream().close();
+ } catch (IOException e) {
+ }
+
+ if (launcher.waitAndRead(stdout, stderr, new SubProgressMonitor(
+ monitor, IProgressMonitor.UNKNOWN)) != CommandLauncher.OK) {
+ preBuildErrMsg = launcher.getErrorMessage();
+ }
+ }
+ }
+
+ // Perform build
+
+ ToolChain toolChain = (ToolChain)cfg.getToolChain();
+ IBuilder oldBuilder = cfg.getBuilder();
+ String workingDir = generator.getBuildWorkingDir().toString();
+ IPath location = project.getLocation().append(workingDir);
+ oldBuilder.setBuildPath(location.toString());
+ oldBuilder.setBuildFileGeneratorElement(AutotoolsPlugin.getDefault().getGeneratorElement());
+ IBuilder builder = new AutotoolsBuilder(cfg.getEditableBuilder(), project, toolChain);
+ String buildLocation = null;
+ String buildCommand = null;
+ String buildArguments = null;
+ if (makeTargetName != null) {
+ // We have a MakeTarget. Get the location and command.
+ buildLocation = (String)args.get("org.eclipse.cdt.make.core.build.location"); // $NON-NLS-1$
+ buildCommand = (String)args.get("org.eclipse.cdt.make.core.build.command"); // $NON-NLS-1$
+ buildArguments = (String)args.get("org.eclipse.cdt.make.core.build.arguments"); // $NON-NLS-1$
+ }
+ if (buildLocation == null) {
+ builder.setBuildPath(location.toString());
+ }
+ else {
+ IWorkspace workspace = project.getWorkspace();
+ builder.setBuildPath(workspace.getRoot().getLocation().append(buildLocation).toString());
+ builder.setManagedBuildOn(false); // needed to avoid ManagedBuild from defaulting directory of makefile.
+ }
+ if (buildCommand != null)
+ builder.setBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND, buildCommand);
+ if (buildArguments != null)
+ builder.setBuildAttribute(IMakeCommonBuildInfo.BUILD_ARGUMENTS, buildArguments);
+ builder.setAutoBuildEnable(true);
+ builder.setCleanBuildEnable(false); // Don't want clean build done ahead of our build.
+ // Following is needed to circumvent the CommonBuilder from using the default
+ // GNUMakefileGenerator.
+ builder.setBuildFileGeneratorElement(AutotoolsPlugin.getDefault().getGeneratorElement());
+ toolChain.setBuilder((Builder)builder);
+
+ IProject[] projects = null;
+ try {
+ projects = super.build(kind, args, monitor);
+ } finally {
+ // Must ensure we reset everything back so configuration will be run in future.
+ toolChain.setBuilder((Builder)oldBuilder);
+ }
+
+ if(VERBOSE)
+ outputTrace(project.getName(), "<<done build requested, type = " + kind); //$NON-NLS-1$
+
+ results = projects;
+ buildCalled = false;
+ // Check for a postbuild step and execute it if it exists.
+ if (!postbuildStep.equals("")) {
+ monitor.subTask(postannouncebuildStep);
+ StringBuffer buffer = new StringBuffer();
+ buffer.append(postannouncebuildStep);
+ buffer.append(System.getProperty("line.separator", "\n")); // $NON-NLS-1$ // $NON-NLS-2$
+
+ try {
+ consoleOutStream.write(buffer.toString().getBytes());
+ consoleOutStream.flush();
+ } catch (IOException e) {
+ // do nothing
+ }
+ String[] tmp = postbuildStep.split("\\s");
+ String[] cmdargs = new String[tmp.length - 1];
+ if (tmp.length > 1)
+ System.arraycopy(tmp, 1, cmdargs, 0, tmp.length - 1);
+ proc = launcher.execute(new Path(tmp[0]), cmdargs, env,
+ project.getLocation().append(generator.getBuildWorkingDir()), monitor);
+ if (proc != null) {
+ try {
+ // Close the input of the process since we will never write to
+ // it
+ proc.getOutputStream().close();
+ } catch (IOException e) {
+ }
+
+ if (launcher.waitAndRead(stdout, stderr, new SubProgressMonitor(
+ monitor, IProgressMonitor.UNKNOWN)) != CommandLauncher.OK) {
+ postBuildErrMsg = launcher.getErrorMessage();
+ }
+ }
+ }
+ }
+ return results;
+ }
+
+ @SuppressWarnings({ "unchecked", "deprecation" })
+ protected void clean(IProgressMonitor monitor) throws CoreException {
+ // See what type of cleaning the user has set up in the
+ // build properties dialog.
+ String cleanDelete = null;
+ try {
+ cleanDelete = getProject().getPersistentProperty(AutotoolsPropertyConstants.CLEAN_DELETE);
+ } catch (CoreException ce) {
+ // do nothing
+ }
+
+ if (cleanDelete != null && cleanDelete.equals(AutotoolsPropertyConstants.TRUE))
+ removeBuildDir(monitor);
+ else {
+ IProject project = getProject();
+ IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+ IConfiguration cfg = info.getDefaultConfiguration();
+ IManagedBuilderMakefileGenerator generator = new MakeGenerator();
+ generator.initialize(getProject(), info, monitor);
+
+// // Hijack the builder itself so that instead of ManagedMake
+// // policy of defaulting the build path to the configuration name,
+// // we get the build occurring in the builddir configure tool setting.
+// builders[0] = new AutotoolsBuilder(cfg.getEditableBuilder(), project);
+// builders[0].setBuildPath(project.getLocation().append(generator.getBuildWorkingDir()).toOSString());
+// builders[0].setAutoBuildEnable(true);
+// builders[0].setCleanBuildEnable(true);
+// builders[0].setManagedBuildOn(false);
+
+ ToolChain toolChain = (ToolChain)cfg.getToolChain();
+ IBuilder oldBuilder = cfg.getBuilder();
+ IBuilder builder = new AutotoolsBuilder(cfg.getEditableBuilder(), project, toolChain);
+ builder.setBuildPath(project.getLocation().append(generator.getBuildWorkingDir()).toOSString());
+ builder.setAutoBuildEnable(true);
+ builder.setCleanBuildEnable(true);
+ builder.setManagedBuildOn(false);
+ // Following is needed to circumvent the CommonBuilder from using the default
+ // GNUMakefileGenerator.
+ builder.setBuildFileGeneratorElement(AutotoolsPlugin.getDefault().getGeneratorElement());
+ toolChain.setBuilder((Builder)builder);
+
+ try {
+ super.build(CLEAN_BUILD, (Map)null, monitor);
+ } finally {
+ toolChain.setBuilder((Builder)oldBuilder);
+ }
+ }
+ }
+
+ protected void removeBuildDir(IProgressMonitor monitor) {
+ try {
+ // use brute force approach
+ IProject project = getProject();
+ IWorkspace workspace = AutotoolsPlugin.getWorkspace();
+ IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+ IConfiguration cfg = info.getDefaultConfiguration();
+ IManagedBuilderMakefileGenerator generator = new MakeGenerator();
+ generator.initialize(getProject(), info, monitor);
+ String buildPath = project.getFullPath().append(generator.getBuildWorkingDir()).toOSString();
+ IResource rc = workspace.getRoot().findMember(buildPath);
+ if (rc == null || rc.getType() != IResource.FOLDER)
+ return;
+ IFolder buildDir = (IFolder)rc;
+ String status = AutotoolsPlugin.getFormattedString("AutotoolsMakefileBuilder.message.clean.deleting.output", new String[]{buildDir.getName()}); //$NON-NLS-1$
+ monitor.subTask(status);
+ workspace.delete(new IResource[]{buildDir}, true, monitor);
+ StringBuffer buf = new StringBuffer();
+ // write to the console
+
+// IConsole console = CCorePlugin.getDefault().getConsole();
+// console.start(getProject());
+ // Get a build console for the project
+ IConsole console = CCorePlugin.getDefault().getConsole();
+ console.start(project);
+// IConsole console = bInfo.getConsole();
+ ConsoleOutputStream consoleOutStream = console.getOutputStream();
+ String[] consoleHeader = new String[3];
+ consoleHeader[0] = AutotoolsPlugin.getResourceString(TYPE_CLEAN);
+ consoleHeader[1] = cfg.getName();
+ consoleHeader[2] = project.getName();
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ buf.append(AutotoolsPlugin.getFormattedString(CONSOLE_HEADER, consoleHeader));
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ consoleOutStream.write(buf.toString().getBytes());
+ consoleOutStream.flush();
+ buf = new StringBuffer();
+ // Report a successful clean
+ String successMsg = AutotoolsPlugin.getFormattedString(BUILD_FINISHED, new String[]{project.getName()});
+ buf.append(successMsg);
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
+ consoleOutStream.write(buf.toString().getBytes());
+ consoleOutStream.flush();
+ consoleOutStream.close();
+ } catch (IOException io) {
+ // Ignore console failures...
+ } catch (CoreException e) {
+ // Ignore console failures...
+ }
+ }
+
+ /* (non-javadoc)
+ * Answers an array of strings with the proper make targets
+ * for a build with no custom prebuild/postbuild steps
+ *
+ * @param fullBuild
+ * @return
+ */
+ protected String[] getTargets(int kind, IBuilder builder) {
+ List<String> args = new ArrayList<String>();
+ String buildTarget = "all";
+ switch (kind) {
+ case CLEAN_BUILD:
+ // For a clean build, we use the clean make target set up by the user
+ // in the build properties dialog. Otherwise, we use the default for
+ // an autotools project.
+ String target = null;
+ try {
+ target = getProject().getPersistentProperty(AutotoolsPropertyConstants.CLEAN_MAKE_TARGET);
+ } catch (CoreException ce) {
+ // do nothing
+ }
+ if (target == null)
+ target = AutotoolsPropertyConstants.CLEAN_MAKE_TARGET_DEFAULT;
+ args.add(target);
+ break;
+ case FULL_BUILD:
+ if (makeTargetName != null)
+ buildTarget = makeTargetName;
+ case AUTO_BUILD:
+ case INCREMENTAL_BUILD:
+ args.addAll(makeArrayList(buildTarget));
+ break;
+ }
+ return (String[])args.toArray(new String[args.size()]);
+ }
+
+ // Turn the string into an array.
+ ArrayList<String> makeArrayList(String string) {
+ string.trim();
+ char[] array = string.toCharArray();
+ ArrayList<String> aList = new ArrayList<String>();
+ StringBuffer buffer = new StringBuffer();
+ boolean inComment = false;
+ for (int i = 0; i < array.length; i++) {
+ char c = array[i];
+ if (array[i] == '"' || array[i] == '\'') {
+ if (i > 0 && array[i - 1] == '\\') {
+ inComment = false;
+ } else {
+ inComment = !inComment;
+ }
+ }
+ if (c == ' ' && !inComment) {
+ aList.add(buffer.toString());
+ buffer = new StringBuffer();
+ } else {
+ buffer.append(c);
+ }
+ }
+ if (buffer.length() > 0)
+ aList.add(buffer.toString());
+ return aList;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsPlugin.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsPlugin.java
new file mode 100644
index 0000000000..5e2e495cbe
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsPlugin.java
@@ -0,0 +1,324 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools;
+
+import java.lang.reflect.InvocationTargetException;
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.ICDescriptor;
+import org.eclipse.cdt.core.ICExtensionReference;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+@SuppressWarnings("deprecation")
+public class AutotoolsPlugin extends AbstractUIPlugin {
+
+ //The shared instance.
+ private static AutotoolsPlugin plugin;
+ private ResourceBundle resourceBundle;
+
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.cdt.autotools"; //$NON-NLS-1$
+
+ private IConfigurationElement generatorElement;
+
+ public static final String EXTENSION_POINT_ID = ManagedBuilderCorePlugin.getUniqueIdentifier() + ".buildDefinitions"; //$NON-NLS-1$
+ public static final String BUILDER = "builder"; //$NON-NLS-1$
+ public static final String ID_ELEMENT_NAME = "id"; // $NON-NLS-1$
+ public static final String AUTOTOOLS_BUILDER_ID = PLUGIN_ID + ".builder"; // $NON-NLS-1$
+
+ /**
+ * The constructor.
+ */
+ public AutotoolsPlugin() {
+ plugin = this;
+ try {
+ resourceBundle = ResourceBundle.getBundle("org.eclipse.linuxtools.cdt.autotools.Resources"); //$NON-NLS-1$
+ } catch (MissingResourceException x) {
+ resourceBundle = null;
+ }
+
+ }
+
+ public static String getPluginId() {
+ return PLUGIN_ID;
+ }
+
+ public static String getUniqueIdentifier() {
+ if (getDefault() == null) {
+ // If the default instance is not yet initialized,
+ // return a static identifier. This identifier must
+ // match the plugin id defined in plugin.xml
+ return PLUGIN_ID;
+ }
+ return getDefault().getBundle().getSymbolicName();
+ }
+
+ public static void verifyScannerInfoProvider(IProject project) throws CoreException {
+ boolean found = false;
+ ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(project, true);
+ ICExtensionReference[] refs = desc.get(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID);
+ for (int i = 0; i < refs.length; ++i) {
+ if (refs[i].getID().equals(AutotoolsScannerInfoProvider.INTERFACE_IDENTITY))
+ found = true;
+ }
+ if (!found) {
+ setScannerInfoProvider(project);
+ }
+ }
+
+ public static void setScannerInfoProvider(IProject project) throws CoreException {
+ ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(project, true);
+ desc.remove(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID);
+ desc.create(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID, AutotoolsScannerInfoProvider.INTERFACE_IDENTITY);
+ }
+
+ /**
+ * This method is called upon plug-in activation
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /**
+ * This method is called when the plug-in is stopped
+ */
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ plugin = null;
+ }
+
+ /**
+ * Returns the shared instance.
+ */
+ public static AutotoolsPlugin getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Returns active shell.
+ */
+ public static Shell getActiveWorkbenchShell() {
+ IWorkbenchWindow window = getDefault().getWorkbench().getActiveWorkbenchWindow();
+ if (window != null) {
+ return window.getShell();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the string from the plugin's resource bundle,
+ * or 'key' if not found.
+ *
+ * @param key the message key
+ * @return the resource bundle message
+ */
+ public static String getResourceString(String key) {
+ ResourceBundle bundle = AutotoolsPlugin.getDefault().getResourceBundle();
+ try {
+ return bundle.getString(key);
+ } catch (MissingResourceException e) {
+ return key;
+ }
+ }
+
+ /**
+ * Returns the string from the plugin's resource bundle,
+ * or 'key' if not found.
+ *
+ * @param key the message key
+ * @param args an array of substituition strings
+ * @return the resource bundle message
+ */
+ public static String getFormattedString(String key, String[] args) {
+ return MessageFormat.format(getResourceString(key), (Object[])args);
+ }
+
+ /**
+ * Returns the plugin's resource bundle,
+ */
+ public ResourceBundle getResourceBundle() {
+ return resourceBundle;
+ }
+
+ /**
+ * Get the configuration element for the Autotools Makefile generator
+ * @return the generator element
+ */
+ public IConfigurationElement getGeneratorElement() {
+ if (generatorElement == null) {
+ IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(EXTENSION_POINT_ID);
+ if( extensionPoint != null) {
+ IExtension[] extensions = extensionPoint.getExtensions();
+ if (extensions != null) {
+ for (int i = 0; i < extensions.length; ++i) {
+ IExtension extension = extensions[i];
+
+ IConfigurationElement[] elements = extension.getConfigurationElements();
+
+ // Get the managedBuildRevsion of the extension.
+ for (int j = 0; j < elements.length; j++) {
+ IConfigurationElement element = elements[j];
+ if (element.getName().equals(BUILDER)) {
+ String id = element.getAttribute(ID_ELEMENT_NAME);
+ if (id.equals(AUTOTOOLS_BUILDER_ID)) {
+ generatorElement = element;
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return generatorElement;
+ }
+
+ /**
+ * 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 AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.linuxtools.cdt.autotools", path);
+ }
+
+ public static void log(IStatus status) {
+ ResourcesPlugin.getPlugin().getLog().log(status);
+ }
+
+ public static void logErrorMessage(String message) {
+ log(new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.ERROR, message, null));
+ }
+
+ public static void logException(Throwable e, final String title, String message) {
+ if (e instanceof InvocationTargetException) {
+ e = ((InvocationTargetException) e).getTargetException();
+ }
+ IStatus status = null;
+ if (e instanceof CoreException)
+ status = ((CoreException) e).getStatus();
+ else {
+ if (message == null)
+ message = e.getMessage();
+ if (message == null)
+ message = e.toString();
+ status = new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.OK, message, e);
+ }
+ ResourcesPlugin.getPlugin().getLog().log(status);
+ Display display;
+ display = Display.getCurrent();
+ if (display == null)
+ display = Display.getDefault();
+ final IStatus fstatus = status;
+ display.asyncExec(new Runnable() {
+ public void run() {
+ ErrorDialog.openError(null, title, null, fstatus);
+ }
+ });
+ }
+
+ public static void logException(Throwable e) {
+ logException(e, null, null);
+ }
+
+ public static void log(Throwable e) {
+ if (e instanceof InvocationTargetException)
+ e = ((InvocationTargetException) e).getTargetException();
+ IStatus status = null;
+ if (e instanceof CoreException)
+ status = ((CoreException) e).getStatus();
+ else
+ status = new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.OK, e.getMessage(), e);
+ log(status);
+ }
+
+ /**
+ * Utility method with conventions
+ */
+ public static void errorDialog(Shell shell, String title, String message, IStatus s) {
+ log(s);
+ // if the 'message' resource string and the IStatus' message are the same,
+ // don't show both in the dialog
+ if (s != null && message.equals(s.getMessage())) {
+ message = null;
+ }
+ ErrorDialog.openError(shell, title, message, s);
+ }
+
+ /**
+ * Utility method with conventions
+ */
+ public static void errorDialog(Shell shell, String title, String message, Throwable t) {
+ log(t);
+ IStatus status;
+ if (t instanceof CoreException) {
+ status = ((CoreException) t).getStatus();
+ // if the 'message' resource string and the IStatus' message are the same,
+ // don't show both in the dialog
+ if (status != null && message.equals(status.getMessage())) {
+ message = null;
+ }
+ } else {
+ status = new Status(IStatus.ERROR, AutotoolsPlugin.getUniqueIdentifier(), -1, "Internal Error: ", t); //$NON-NLS-1$
+ }
+ ErrorDialog.openError(shell, title, message, status);
+ }
+
+ /**
+ * Returns the workspace instance.
+ */
+ public static IWorkspace getWorkspace() {
+ return ResourcesPlugin.getWorkspace();
+ }
+
+ /**
+ * Returns the active workbench window or <code>null</code> if none
+ */
+ public static IWorkbenchWindow getActiveWorkbenchWindow() {
+ return getDefault().getWorkbench().getActiveWorkbenchWindow();
+ }
+
+ /**
+ * Returns the active workbench page or <code>null</code> if none.
+ */
+ public static IWorkbenchPage getActivePage() {
+ IWorkbenchWindow window= getActiveWorkbenchWindow();
+ if (window != null) {
+ return window.getActivePage();
+ }
+ return null;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsProjectNature.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsProjectNature.java
new file mode 100644
index 0000000000..5a7f311a29
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsProjectNature.java
@@ -0,0 +1,175 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat Inc.. and others
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat Incorporated - initial implementation
+ * IBM Rational Software - add and remove nature static methods
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Vector;
+
+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;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+public class AutotoolsProjectNature implements IProjectNature {
+
+ public static final String AUTOTOOLS_NATURE_ID = AutotoolsPlugin.getUniqueIdentifier() + ".autotoolsNature"; //$NON-NLS-1$
+
+ private IProject project;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.resources.IProjectNature#configure()
+ */
+ public void configure() throws CoreException {
+ addAutotoolsBuilder(project, new NullProgressMonitor());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.resources.IProjectNature#deconfigure()
+ */
+ public void deconfigure() throws CoreException {
+ // TODO remove builder from here
+ }
+
+ /* (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;
+ }
+
+ /**
+ * Add the Autotools builder to the project
+ * @param project
+ * @param monitor
+ * @throws CoreException
+ */
+ public static void addAutotoolsBuilder(IProject project, IProgressMonitor monitor) throws CoreException {
+ // Add the builder to the project
+ IProjectDescription description = project.getDescription();
+ ICommand[] commands = description.getBuildSpec();
+
+ // TODO Remove the cbuilder check when the new StandardBuild nature adds the cbuilder
+ for (int i = 0; i < commands.length; i++) {
+ ICommand command = commands[i];
+ String builderName = command.getBuilderName();
+ // If there is a ManagedMake makefile generator, remove it as it will
+ // cause an additional build "all" to occur when we are making any target.
+ if (builderName.equals("org.eclipse.cdt.core.cbuilder") ||
+ builderName.equals(AutotoolsMakefileBuilder.MANAGED_BUILDER_ID)) { //$NON-NLS-1$
+ // Remove the command
+ Vector<ICommand> vec = new Vector<ICommand>(Arrays.asList(commands));
+ vec.removeElementAt(i);
+ vec.trimToSize();
+ ICommand[] tempCommands = (ICommand[]) vec.toArray(new ICommand[commands.length-1]);
+ description.setBuildSpec(tempCommands);
+ project.setDescription(description, new NullProgressMonitor());
+ break;
+ }
+ }
+
+ commands = description.getBuildSpec();
+ boolean found = false;
+ // See if the builder is already there
+ for (int i = 0; i < commands.length; ++i) {
+ if (commands[i].getBuilderName().equals(AutotoolsMakefileBuilder.BUILDER_ID)) {
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ //add builder to project
+ ICommand command = description.newCommand();
+ command.setBuilderName(AutotoolsMakefileBuilder.BUILDER_ID);
+ ICommand[] newCommands = new ICommand[commands.length + 1];
+ // Add it before other builders.
+ System.arraycopy(commands, 0, newCommands, 1, commands.length);
+ newCommands[0] = command;
+ description.setBuildSpec(newCommands);
+ project.setDescription(description, new NullProgressMonitor());
+ }
+ }
+
+ /**
+ * Utility method for adding an autotools nature to a project.
+ *
+ * @param proj the project to add the autotools nature to.
+ * @param monitor a progress monitor to indicate the duration of the operation, or
+ * <code>null</code> if progress reporting is not required.
+ */
+ public static void addAutotoolsNature(IProject project, IProgressMonitor monitor) throws CoreException {
+ addNature(project, AUTOTOOLS_NATURE_ID, monitor);
+ }
+
+ /**
+ * Utility method for adding a nature to a project.
+ *
+ * @param proj the project to add the nature to.
+ * @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.
+ */
+ public static void addNature(IProject project, String natureId, IProgressMonitor monitor) throws CoreException {
+ IProjectDescription description = project.getDescription();
+ String[] prevNatures = description.getNatureIds();
+ for (int i = 0; i < prevNatures.length; i++) {
+ if (natureId.equals(prevNatures[i]))
+ return;
+ }
+ 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 to remove the autotools nature from a project.
+ *
+ * @param project to remove the autotools nature from
+ * @param mon progress monitor to indicate the duration of the operation, or
+ * <code>null</code> if progress reporting is not required.
+ * @throws CoreException
+ */
+ public static void removeAutotoolsNature(IProject project, IProgressMonitor mon) throws CoreException {
+ removeNature(project, AUTOTOOLS_NATURE_ID, mon);
+ }
+
+ /**
+ * 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.
+ */
+ public 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((String[])newNatures.toArray(new String[newNatures.size()]));
+ project.setDescription(description, monitor);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsProjectPropertyTester.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsProjectPropertyTester.java
new file mode 100644
index 0000000000..a561d6a4d8
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsProjectPropertyTester.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+
+public class AutotoolsProjectPropertyTester extends PropertyTester {
+
+ public AutotoolsProjectPropertyTester() {
+ // nothing needed
+ }
+
+ public boolean test(Object receiver, String property, Object[] args,
+ Object expectedValue) {
+ IProject project = null;
+ IResource resource = (IResource)receiver;
+ project = resource.getProject();
+ return AutotoolsMakefileBuilder.hasTargetBuilder(project);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfo.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfo.java
new file mode 100644
index 0000000000..83c331d6e1
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfo.java
@@ -0,0 +1,431 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.CommandLauncher;
+import org.eclipse.cdt.core.parser.IScannerInfo;
+import org.eclipse.cdt.core.parser.IScannerInfoChangeListener;
+import org.eclipse.cdt.managedbuilder.core.BuildException;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.linuxtools.cdt.autotools.ui.properties.AutotoolsPropertyConstants;
+
+
+// This class is used to get and store information from the Autotools
+// makefiles for a specific file in a specific Autotools project.
+// It gets information by invoking make with special options
+// to find out what occurs if the file in question has changed.
+public class AutotoolsScannerInfo implements IScannerInfo {
+
+ private IResource res;
+ private IProject project;
+ private IPath filePath;
+ private String[] includePaths;
+ @SuppressWarnings("unchecked")
+ private HashMap definedSymbols;
+ private boolean isDirty;
+ private String compilationString;
+ private String dirName;
+ private HashSet<IScannerInfoChangeListener> listeners = new HashSet<IScannerInfoChangeListener>();
+
+ public AutotoolsScannerInfo (IResource res) {
+ this.res = res;
+ this.project = res.getProject();
+ this.filePath = res.getFullPath();
+ }
+
+ public void addListener(IScannerInfoChangeListener listener) {
+ if (!listeners.contains(listener)) {
+ listeners.add(listener);
+ }
+ }
+
+ public void removeListener(IScannerInfoChangeListener listener) {
+ if (listeners.contains(listener)) {
+ listeners.remove(listener);
+ }
+ }
+
+ // TODO: Should make a listener to watch all Makefiles up the
+ // tree from the resource. If any change, the include
+ // paths and options passed to make the file in question
+ // could change.
+ public void setDirty (boolean isDirty) {
+ this.isDirty = isDirty;
+ }
+
+ private String buildFile (IPath filePath, IFile makefile, IManagedBuildInfo info) {
+ String outString = "";
+ IPath dir = makefile.getFullPath().removeLastSegments(1);
+ IPath relFilePath = filePath.removeFirstSegments(dir.segmentCount());
+ CommandLauncher launcher = new CommandLauncher();
+ String[] env = null;
+ ByteArrayOutputStream stdout = new ByteArrayOutputStream();
+ ByteArrayOutputStream stderr = stdout;
+ IPath makeCommandPath = new Path(info.getBuildCommand());
+ ITool tool = info.getToolFromOutputExtension("status"); // $NON-NLS-1$
+ IOption[] options = tool.getOptions();
+ IPath runPath = null;
+ boolean done = false;
+
+ for (int i = 0; i < options.length && !done; ++i) {
+ try {
+ if (options[i].getValueType() == IOption.STRING) {
+ String value = (String) options[i].getValue();
+ String id = options[i].getId();
+ if (id.indexOf("builddir") > 0) { // $NON-NLS-1$
+ runPath = makefile.getProject().getLocation().append(value.trim());
+ done = true;
+ }
+ }
+ } catch (BuildException e) {
+ // do nothing
+ }
+ }
+
+ IProgressMonitor monitor = new NullProgressMonitor();
+ String errMsg = null;
+ String[] makeArgs = new String[3];
+ makeArgs[0] = "-n"; // $NON-NLS-1$
+ makeArgs[1] = "all"; // $NON-NLS-1$
+ makeArgs[2] = "MAKE=make -W " + relFilePath.toOSString(); //$NON-NLS-1$
+
+ try {
+ Process proc = launcher.execute(makeCommandPath, makeArgs, env,
+ runPath, new NullProgressMonitor());
+ if (proc != null) {
+ try {
+ // Close the input of the process since we will never write to
+ // it
+ proc.getOutputStream().close();
+ } catch (IOException e) {
+ }
+
+ if (launcher.waitAndRead(stdout, stderr, new SubProgressMonitor(
+ monitor, IProgressMonitor.UNKNOWN)) != CommandLauncher.OK) {
+ errMsg = launcher.getErrorMessage();
+ }
+ outString = stdout.toString();
+ } else {
+ errMsg = launcher.getErrorMessage();
+ }
+ } catch (CoreException e) {
+ errMsg = e.getLocalizedMessage();
+ AutotoolsPlugin.logErrorMessage(errMsg);
+ }
+ return outString;
+ }
+
+ private IFile getMakefile (IManagedBuildInfo info, IPath filePath) {
+ IWorkspaceRoot root = CCorePlugin.getWorkspace().getRoot();
+ IPath dir = filePath.removeLastSegments(1);
+ IFile makefile = null;
+ boolean done = false;
+ IPath makefilePath = null;
+ // Look starting at source file directory for the
+ // Makefile.in or Makefile for the given file.
+ while (!done) {
+ makefilePath = dir.append("Makefile.in"); // $NON-NLS-1$
+ makefile = root.getFile(makefilePath);
+ if (makefile != null && makefile.exists()) {
+ done = true;
+ continue;
+ }
+ makefilePath = dir.append("Makefile"); // $NON-NLS-1$
+ makefile = root.getFile(makefilePath);
+ if (makefile != null && makefile.exists()) {
+ done = true;
+ }
+ else {
+ dir = dir.removeLastSegments(1);
+ if (dir.lastSegment() == null)
+ done = true;
+ }
+ }
+ return makefile;
+ }
+
+ private String getCompilationString() {
+ if (compilationString != null && !isDirty)
+ return compilationString;
+ String makeWEnabled = null;
+ try {
+ makeWEnabled = project.getPersistentProperty(AutotoolsPropertyConstants.SCANNER_USE_MAKE_W);
+ } catch (CoreException e) {
+ // do nothing
+ }
+ if (!(res instanceof IFile) ||
+ makeWEnabled == null ||
+ makeWEnabled.equals("false")) // $NON-NLS-1$
+ return null;
+ isDirty = false;
+ IWorkspaceRoot root = CCorePlugin.getWorkspace().getRoot();
+ IFile file = root.getFile(filePath);
+ IFile makefile = null;
+ IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+ // If the given file exists and we have a ManagedBuild, we may have
+ // an Autotools project source file.
+ if (file != null && file.exists() && info != null) {
+ makefile = getMakefile(info, filePath);
+ }
+ // We now have the closest directory to the given path
+ // that contains a Makefile.in or Makefile. This Makefile
+ // should contain a relative reference to the file in
+ // question. We now want to try and extract the include
+ // path from the top-level make run with the assumption
+ // that the file in question has been altered.
+ if (makefile != null) {
+ IPath dir = makefile.getFullPath().removeLastSegments(1);
+ // Get relative name of file as we assume the Makefile will
+ // refer to it this way.
+ String out = buildFile(filePath, makefile, info);
+ try {
+ boolean topLevel = dir.equals(project.getFullPath());
+ Pattern p = null;
+ Matcher m = null;
+ if (!topLevel) {
+ String regex1 = "^Making.*in.*" + dir.lastSegment(); // $NON-NLS-1$
+ p = Pattern.compile(regex1, Pattern.MULTILINE);
+ m = p.matcher(out);
+ }
+ if (topLevel || m.find()) {
+ Pattern p2 = null;
+ Matcher m2 = null;
+ String substr2 = out;
+ if (!topLevel) {
+ substr2 = out.substring(m.end());
+ String regex2 = "^make.*Entering directory.*`(.*)'"; // $NON-NLS-1$
+ p2 = Pattern.compile(regex2, Pattern.MULTILINE);
+ m2 = p2.matcher(substr2);
+ }
+ if (topLevel || m2.find()) {
+ String substr3 = null;
+ if (!topLevel) {
+ dirName = m2.group(1);
+ substr3 = substr2.substring(m2.start());
+ } else {
+ dirName = "";
+ substr3 = out;
+ }
+ // We need to test for both gcc and g++ compilers.
+ String regex3 = "^.*gcc.*?-I.*?" + filePath.lastSegment(); // $NON-NLS-1$
+ String regex4 = "^.*g[+][+].*?-I.*?" + filePath.lastSegment(); // $NON-NLS-1$
+ // Replace all continuation markers so we don't have to worry about newlines in
+ // the middle of a compilation string.
+ substr3 = substr3.replaceAll("\\\\\\n", "");
+ Pattern p3 = Pattern.compile(regex3, Pattern.MULTILINE);
+ Matcher m3 = p3.matcher(substr3);
+ if (m3.find())
+ compilationString = substr3.substring(m3.start(),m3.end());
+ else {
+ String substr4 = substr3;
+ Pattern p4 = Pattern.compile(regex4, Pattern.MULTILINE);
+ Matcher m4 = p4.matcher(substr4);
+ if (m4.find())
+ compilationString = substr3.substring(m4.start(),m4.end());
+ }
+ }
+ } else if (!out.equals("")) {
+ compilationString = "";
+ }
+ } catch (IllegalStateException t) {
+ // Mark as dirty for next time.
+ isDirty = true;
+ }
+ }
+ return compilationString;
+ }
+
+ public String[] getIncludePaths() {
+ String[] pathArray = new String[0];
+ if (project == null || filePath == null)
+ return pathArray;
+ if (includePaths != null && !isDirty && compilationString != null) {
+ return includePaths;
+ }
+ ArrayList<String> pathList = new ArrayList<String>();
+ String cs = getCompilationString();
+ if (cs != null) {
+ // Grab include paths specified via -I
+ Pattern p4 = Pattern.compile(" -I");
+ String[] tokens = p4.split(cs);
+ for (int j = 1; j < tokens.length; ++j) {
+ String x = tokens[j].trim();
+ int firstSpace = x.indexOf(' ');
+ if (firstSpace != -1) {
+ x = x.substring(0, firstSpace);
+ }
+ if (x.charAt(0) == '/') {
+ pathList.add(x);
+ } else {
+ IPath relPath = new Path(dirName);
+ relPath = relPath.append(x);
+ pathList.add(relPath.toOSString());
+ }
+ }
+ // Grab include paths that are specified via -isystem
+ Pattern p5 = Pattern.compile(" -isystem");
+ tokens = p5.split(cs);
+ for (int j = 1; j < tokens.length; ++j) {
+ String x = tokens[j].trim();
+ int firstSpace = x.indexOf(' ');
+ if (firstSpace != -1) {
+ x = x.substring(0, firstSpace);
+ }
+ if (x.charAt(0) == '/') {
+ pathList.add(x);
+ } else {
+ IPath relPath = new Path(dirName);
+ relPath = relPath.append(x);
+ pathList.add(relPath.toOSString());
+ }
+ }
+ }
+
+ // The ManagedBuildManager is the normal default IScannerInfoProvider
+ // for Managed Projects. It has the ability to check gcc for the
+ // default include paths and we don't want to lose that. Append
+ // the include paths from it to the end of our list which is dynamically
+ // picking up the -I options.
+
+ // TODO: Should we even allow the user-defined includePaths in settings?
+ // These will be picked up by the ManagedBuildManager.
+ IScannerInfo info = (IScannerInfo)ManagedBuildManager.getBuildInfo(project);
+ if (info != null) {
+ String[] extraIncludePaths = info.getIncludePaths();
+ for (int i = 0; i < extraIncludePaths.length; ++i) {
+ pathList.add(extraIncludePaths[i]);
+ }
+ }
+
+ includePaths = (String[])pathList.toArray(pathArray);
+
+ // FIXME: Info has been updated. Is this the best place to notify listeners?
+ Iterator<IScannerInfoChangeListener> i = listeners.iterator();
+ while (i.hasNext()) {
+ IScannerInfoChangeListener listener = (IScannerInfoChangeListener)i.next();
+ listener.changeNotification(project, this);
+ }
+ return includePaths;
+ }
+
+ @SuppressWarnings("unchecked")
+ public Map getDefinedSymbols () {
+ HashMap symbolMap = new HashMap();
+ if (project == null || filePath == null)
+ return symbolMap;
+ if (definedSymbols != null && !isDirty && compilationString != null) {
+ return definedSymbols;
+ }
+ // Extract -D directives from the compilation string.
+ // TODO: Handle -U directives as well.
+ String cs = getCompilationString();
+ if (cs != null) {
+ Pattern p4 = Pattern.compile("\\s-D([^\\s=]+)(?:=(\\\\\".*?\\\\\"|\\S*))?"); // $NON-NLS-1$
+ Matcher m = p4.matcher(cs);
+ while(m.find()) {
+ String name = m.group(1);
+ String value = m.group(2);
+ if(value != null)
+ symbolMap.put(name, value.replace("\\", "")); // $NON-NLS-1$ $NON-NLS-2$
+ else
+ symbolMap.put(name, "");
+ }
+ }
+ // Add the defined symbols from ManagedBuildManager. This will include
+ // the builtin implicit defines from the compiler and the user-set
+ // defines from settings. Since these are added last, they will overwrite
+ // existing defines fished out of the Makefiles above. For the user-defined
+ // symbols, this is the correct behavior. For the implicit defines,
+ // this is not; however, this is not valid programming behavior and
+ // the compiler definitely warns against it.
+ IScannerInfo info = (IScannerInfo)ManagedBuildManager.getBuildInfo(project);
+ if (info != null) {
+ Map builtinDefinedSymbols = info.getDefinedSymbols();
+ symbolMap.putAll(builtinDefinedSymbols);
+ }
+
+ definedSymbols = symbolMap;
+ return definedSymbols;
+ }
+
+ public void createIncludeChain(IFile include, IResource res) {
+ try {
+ // We store two different values. The first only lasts for the
+ // the session and is the actual resource. We prefer to work with
+ // this form as it is quicker. To handle persistence across
+ // sessions, we also store a persistent copy of the resource's
+ // path. When the session is brought back again, we will recreate
+ // the session chain again using the persistent data.
+ include.setSessionProperty(AutotoolsPropertyConstants.OPEN_INCLUDE, res);
+ include.setPersistentProperty(AutotoolsPropertyConstants.OPEN_INCLUDE_P, res.getLocation().toPortableString());
+ } catch (CoreException e) {
+ // Do nothing
+ }
+ }
+
+ /**
+ *
+ * @param resource the resource we are scanning
+ * @return the final resource in the include chain if one exists
+ * otherwise the resource itself
+ */
+ public static IResource followIncludeChain(IResource resource) {
+ IResource res = resource;
+ try {
+ boolean done = false;
+ // In the case of include files, we chain to the file that
+ // included the header file. This may end up ultimately as
+ // a source file which has build parameters such as flag
+ // defines and a separate include path.
+ while (!done) {
+ while (res.getSessionProperty(AutotoolsPropertyConstants.OPEN_INCLUDE) != null)
+ res = (IResource)res.getSessionProperty(AutotoolsPropertyConstants.OPEN_INCLUDE);
+ String chainPath = res.getPersistentProperty(AutotoolsPropertyConstants.OPEN_INCLUDE_P);
+ if (chainPath != null) {
+ IPath location = Path.fromPortableString(chainPath);
+ IResource next = res.getWorkspace().getRoot().getFileForLocation(location);
+ res.setSessionProperty(AutotoolsPropertyConstants.OPEN_INCLUDE, next);
+ res = next;
+ } else
+ done = true;
+ }
+ } catch (CoreException e) {
+ // Do nothing
+ } finally {
+ resource = res;
+ }
+ return resource;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfoProvider.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfoProvider.java
new file mode 100644
index 0000000000..572ce76d5e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/AutotoolsScannerInfoProvider.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.cdt.core.AbstractCExtension;
+import org.eclipse.cdt.core.parser.IScannerInfo;
+import org.eclipse.cdt.core.parser.IScannerInfoChangeListener;
+import org.eclipse.cdt.core.parser.IScannerInfoProvider;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.linuxtools.cdt.autotools.ui.properties.AutotoolsPropertyConstants;
+
+
+public class AutotoolsScannerInfoProvider extends AbstractCExtension implements IScannerInfoProvider {
+
+ static private Map<String, Map<IResource, AutotoolsScannerInfo>> infoCollections = new HashMap<String, Map<IResource, AutotoolsScannerInfo>>();
+ static public final String INTERFACE_IDENTITY =
+ AutotoolsPlugin.PLUGIN_ID + "." + "AutotoolsScannerInfoProvider"; // $NON-NLS-1$
+
+ protected String getCollectionName(IProject project) {
+ IManagedBuildInfo buildInfo = ManagedBuildManager.getBuildInfo(project);
+ String config = project.getName() + "." + buildInfo.getConfigurationName();
+ return config;
+ }
+
+ public synchronized IScannerInfo getScannerInformation(IResource resource) {
+ IResource res = AutotoolsScannerInfo.followIncludeChain(resource);
+ // We keep scanner info separate per configuration.
+ // This is because one configuration may result in a file being
+ // compiled with one include path while another configuration
+ // may change the include path / defined symbols.
+ IProject project = resource.getProject();
+
+ // We punt for non-Autotools projects. This ScannerInfoProvider is used for
+ // all C Projects and we might get called for a non-Autotools project (e.g.
+ // unsubscribe operation when converting to C project).
+ if (!AutotoolsMakefileBuilder.hasTargetBuilder(project))
+ return null;
+
+ // Check if the scanner info has been marked dirty, in which case we need
+ // to mark all entries dirty.
+ Boolean isDirty = Boolean.FALSE;
+ try {
+ isDirty = (Boolean)project.getSessionProperty(AutotoolsPropertyConstants.SCANNER_INFO_DIRTY);
+ } catch (CoreException e) {
+ // do nothing
+ }
+ if (isDirty != null && isDirty.equals(Boolean.TRUE)) {
+ setDirty(project);
+ try {
+ project.setSessionProperty(AutotoolsPropertyConstants.SCANNER_INFO_DIRTY, Boolean.FALSE);
+ } catch (CoreException ce) {
+ // do nothing
+ }
+ }
+ String config = getCollectionName(project);
+ // Get the ScannerInfo collection for current configuration or else
+ // create an empty collection if one doesn't already exist.
+ Map<IResource, AutotoolsScannerInfo> infoCollection = infoCollections.get(config);
+ if (infoCollection == null) {
+ infoCollection = new HashMap<IResource, AutotoolsScannerInfo>();
+ infoCollections.put(config, infoCollection);
+ }
+ AutotoolsScannerInfo info = (AutotoolsScannerInfo)infoCollection.get(res);
+ if (info == null) {
+ info = new AutotoolsScannerInfo(res);
+ infoCollection.put(res, info);
+ }
+ return info;
+ }
+
+ private void setDirty(IProject project) {
+ String config = getCollectionName(project);
+ Map<IResource, AutotoolsScannerInfo> infoCollection = infoCollections.get(config);
+ if (infoCollection != null) {
+ Collection<AutotoolsScannerInfo> s = infoCollection.values();
+ for (Iterator<AutotoolsScannerInfo> i = s.iterator(); i.hasNext();) {
+ AutotoolsScannerInfo info = (AutotoolsScannerInfo)i.next();
+ info.setDirty(true);
+ }
+ }
+ }
+
+ public void subscribe(IResource resource,
+ IScannerInfoChangeListener listener) {
+ AutotoolsScannerInfo info = (AutotoolsScannerInfo)getScannerInformation(resource);
+ info.addListener(listener);
+ }
+
+ public void unsubscribe(IResource resource,
+ IScannerInfoChangeListener listener) {
+ AutotoolsScannerInfo info = (AutotoolsScannerInfo)getScannerInformation(resource);
+ if (info != null)
+ info.removeListener(listener);
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java
new file mode 100644
index 0000000000..aca5677d0e
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/MakeGenerator.java
@@ -0,0 +1,1374 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.EOFException;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.CommandLauncher;
+import org.eclipse.cdt.core.ConsoleOutputStream;
+import org.eclipse.cdt.core.ICDescriptor;
+import org.eclipse.cdt.core.envvar.IEnvironmentVariable;
+import org.eclipse.cdt.core.resources.IConsole;
+import org.eclipse.cdt.core.settings.model.ICStorageElement;
+import org.eclipse.cdt.make.core.IMakeTarget;
+import org.eclipse.cdt.make.core.IMakeTargetManager;
+import org.eclipse.cdt.make.core.MakeCorePlugin;
+import org.eclipse.cdt.make.core.makefile.IMakefile;
+import org.eclipse.cdt.make.core.makefile.ITarget;
+import org.eclipse.cdt.make.core.makefile.ITargetRule;
+import org.eclipse.cdt.managedbuilder.core.BuildException;
+import org.eclipse.cdt.managedbuilder.core.IBuilder;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.ITool;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.managedbuilder.macros.BuildMacroException;
+import org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider;
+import org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator;
+import org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator2;
+import org.eclipse.cdt.newmake.core.IMakeCommonBuildInfo;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceStatus;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.linuxtools.cdt.autotools.ui.properties.AutotoolsPropertyConstants;
+import org.eclipse.linuxtools.internal.cdt.autotools.MarkerGenerator;
+
+
+@SuppressWarnings("deprecation")
+public class MakeGenerator extends MarkerGenerator implements IManagedBuilderMakefileGenerator, IManagedBuilderMakefileGenerator2 {
+
+ public final String CONFIG_STATUS = "config.status"; //$NON-NLS-1$
+ public final String MAKEFILE = "Makefile"; //$NON-NLS-1$
+ public final String MAKEFILE_CVS = "Makefile.cvs"; //$NON-NLS-1$
+ public final String SETTINGS_FILE_NAME = ".cdtconfigure"; //$NON-NLS-1$
+ public final String SHELL_COMMAND = "sh"; //$NON-NLS-1$
+
+ public final String AUTOGEN_TOOL_ID = "org.eclipse.linuxtools.cdt.autotools.tool.autogen"; //$NON-NLS-1$
+ public final String CONFIGURE_TOOL_ID = "org.eclipse.linuxtools.cdt.autotools.tool.configure"; //$NON-NLS-1$
+
+ public final String GENERATED_TARGET = AutotoolsPlugin.PLUGIN_ID + ".generated.MakeTarget"; //$NON-NLS-1$
+
+ private static final String MAKE_TARGET_KEY = MakeCorePlugin.getUniqueIdentifier() + ".buildtargets"; //$NON-NLS-1$
+ private static final String BUILD_TARGET_ELEMENT = "buildTargets"; //$NON-NLS-1$
+ private static final String TARGET_ELEMENT = "target"; //$NON-NLS-1$
+ private static final String TARGET_ATTR_ID = "targetID"; //$NON-NLS-1$
+ private static final String TARGET_ATTR_PATH = "path"; //$NON-NLS-1$
+ private static final String TARGET_ATTR_NAME = "name"; //$NON-NLS-1$
+ private static final String TARGET_STOP_ON_ERROR = "stopOnError"; //$NON-NLS-1$
+ private static final String TARGET_USE_DEFAULT_CMD = "useDefaultCommand"; //$NON-NLS-1$
+ private static final String TARGET_ARGUMENTS = "buildArguments"; //$NON-NLS-1$
+ private static final String TARGET_COMMAND = "buildCommand"; //$NON-NLS-1$
+ private static final String TARGET_RUN_ALL_BUILDERS = "runAllBuilders";
+ private static final String TARGET = "buildTarget"; //$NON-NLS-1$
+
+ private IProject project;
+
+ private IProgressMonitor monitor;
+
+ private String buildDir;
+ private String srcDir;
+
+ private IConfiguration cfg;
+ private IBuilder builder;
+
+ public void generateDependencies() throws CoreException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public MultiStatus generateMakefiles(IResourceDelta delta)
+ throws CoreException {
+ return regenerateMakefiles();
+ }
+
+ private void initializeBuildConfigDirs() {
+ ITool tool = cfg.getToolFromOutputExtension("status"); //$NON-NLS-1$
+ IOption[] options = tool.getOptions();
+ for (int i = 0; i < options.length; ++i) {
+ String id = options[i].getId();
+ if (id.indexOf("builddir") > 0) { //$NON-NLS-1$
+ buildDir = (String) options[i].getValue();
+ try {
+ String resolved = ManagedBuildManager.getBuildMacroProvider().resolveValue(buildDir, "build", null,
+ IBuildMacroProvider.CONTEXT_CONFIGURATION, cfg);
+ buildDir = resolved;
+ } catch (BuildMacroException e) {
+ // do nothing
+ }
+// try {
+// builder.setBuildAttribute(IMakeCommonBuildInfo.BUILD_LOCATION,
+// project.getLocation().append(buildDir).toOSString());
+// } catch (CoreException e) {
+// e.printStackTrace();
+// }
+ } else if (id.indexOf("configdir") > 0) { //$NON-NLS-1$
+ srcDir = (String) options[i].getValue();
+ try {
+ String resolved = ManagedBuildManager.getBuildMacroProvider().resolveValue(srcDir, "", null,
+ IBuildMacroProvider.CONTEXT_CONFIGURATION, cfg);
+ srcDir = resolved;
+ } catch (BuildMacroException e) {
+ // do nothing
+ }
+ }
+ }
+ }
+
+ public void initialize(IProject project, IManagedBuildInfo info,
+ IProgressMonitor monitor) {
+ this.project = project;
+ this.cfg = info.getDefaultConfiguration();
+ this.builder = cfg.getBuilder();
+ this.monitor = monitor;
+ initializeBuildConfigDirs();
+ }
+
+ public void initialize(int buildKind, IConfiguration cfg, IBuilder builder,
+ IProgressMonitor monitor) {
+ this.cfg = cfg;
+ this.builder = builder;
+ this.monitor = monitor;
+ this.project = (IProject)cfg.getManagedProject().getOwner();
+ initializeBuildConfigDirs();
+ }
+
+ public IProject getProject() {
+ return project;
+ }
+
+ public boolean isGeneratedResource(IResource resource) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void regenerateDependencies(boolean force) throws CoreException {
+ // TODO Auto-generated method stub
+
+ }
+
+ /*
+ * (non-Javadoc) Check whether the build has been cancelled. Cancellation
+ * requests propagated to the caller by throwing <code>OperationCanceledException</code>.
+ *
+ * @see org.eclipse.core.runtime.OperationCanceledException#OperationCanceledException()
+ */
+ protected void checkCancel() {
+ if (monitor != null && monitor.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+ }
+
+ /*
+ * (non-Javadoc) Return or create the makefile needed for the build. If we
+ * are creating the resource, set the derived bit to true so the CM system
+ * ignores the contents. If the resource exists, respect the existing
+ * derived setting.
+ *
+ * @param makefilePath @return IFile
+ */
+ protected IFile createFile(IPath makefilePath) throws CoreException {
+ // Create or get the handle for the makefile
+ IWorkspaceRoot root = CCorePlugin.getWorkspace().getRoot();
+ IFile newFile = root.getFileForLocation(makefilePath);
+ if (newFile == null) {
+ newFile = root.getFile(makefilePath);
+ }
+ // Create the file if it does not exist
+ ByteArrayInputStream contents = new ByteArrayInputStream(new byte[0]);
+ try {
+ newFile.create(contents, false, new SubProgressMonitor(monitor, 1));
+ // Make sure the new file is marked as derived
+ if (!newFile.isDerived()) {
+ newFile.setDerived(true);
+ }
+
+ } catch (CoreException e) {
+ // If the file already existed locally, just refresh to get contents
+ if (e.getStatus().getCode() == IResourceStatus.PATH_OCCUPIED)
+ newFile.refreshLocal(IResource.DEPTH_ZERO, null);
+ else
+ throw e;
+ }
+
+ return newFile;
+ }
+
+ /*
+ * (non-Javadoc) Return or create the folder needed for the build output. If
+ * we are creating the folder, set the derived bit to true so the CM system
+ * ignores the contents. If the resource exists, respect the existing
+ * derived setting.
+ *
+ * @param string @return IPath
+ */
+ private boolean createDirectory(String dirName) throws CoreException {
+ // Create or get the handle for the build directory
+ boolean rc = true;
+ IPath path = new Path(dirName);
+ if (dirName.length() == 0 || dirName.startsWith(".") || !dirName.startsWith("/"))
+ path = project.getLocation().append(dirName);
+ File f = path.toFile();
+ if (!f.exists())
+ rc = f.mkdirs();
+
+ return rc;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator#getBuildWorkingDir()
+ */
+ public IPath getBuildWorkingDir() {
+ return new Path(buildDir);
+ }
+
+ /*
+ * (non-Javadoc) Get the project's absolute path. @return IPath
+ */
+ private IPath getProjectLocation() {
+ return project.getLocation();
+ }
+
+ private String getAbsoluteDirectory(String dir) {
+ IPath path = new Path(dir);
+ if (!path.isAbsolute()) {
+ IPath absPath = getProjectLocation().addTrailingSeparator().append(
+ path);
+ return getPathString(absPath);
+ }
+ return dir;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator#getMakefileName()
+ */
+ public String getMakefileName() {
+ return new String(MAKEFILE);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @return the path to the configuration settings file
+ */
+ protected IPath getConfigSettingsPath() {
+ IPath path = project.getWorkingLocation(AutotoolsPlugin.PLUGIN_ID).append(SETTINGS_FILE_NAME + "." + cfg.getName()); //$NON-NLS-1$
+ return path;
+ }
+
+ public void removeConfigSettings() {
+ File f = getConfigSettingsPath().toFile();
+ try {
+ f.delete();
+ } catch (Exception e) {
+ // do nothing
+ }
+ }
+
+ public MultiStatus regenerateMakefiles() throws CoreException {
+ MultiStatus status;
+ int rc = IStatus.OK;
+ String errMsg = new String();
+ boolean needFullConfigure = true;
+
+ // See if the user has cancelled the build
+ checkCancel();
+
+ // Create the top-level directory for the build output
+ if (!createDirectory(buildDir)) {
+ rc = IStatus.ERROR;
+ errMsg = AutotoolsPlugin.getFormattedString("MakeGenerator.createdir.error", //$NON-NLS-1$
+ new String[] {buildDir});
+ return new MultiStatus(AutotoolsPlugin.getUniqueIdentifier(),
+ rc, errMsg, null);
+ }
+
+ checkCancel();
+
+ // // How did we do
+ // if (!getInvalidDirList().isEmpty()) {
+ // status = new MultiStatus (
+ // ManagedBuilderCorePlugin.getUniqueIdentifier(),
+ // IStatus.WARNING,
+ // new String(),
+ // null);
+ // // Add a new status for each of the bad folders
+ // iter = getInvalidDirList().iterator();
+ // while (iter.hasNext()) {
+ // status.add(new Status (
+ // IStatus.WARNING,
+ // ManagedBuilderCorePlugin.getUniqueIdentifier(),
+ // SPACES_IN_PATH,
+ // ((IContainer)iter.next()).getFullPath().toString(),
+ // null));
+ // }
+ // } else {
+ // status = new MultiStatus(
+ // ManagedBuilderCorePlugin.getUniqueIdentifier(),
+ // IStatus.OK,
+ // new String(),
+ // null);
+ // }
+
+ // Get a build console for the project
+ IConsole console = CCorePlugin.getDefault().getConsole("org.eclipse.linuxtools.cdt.autotools.configureConsole"); //$NON-NLS-1$
+
+ // Get the project and make sure there's a monitor to cancel the build
+ if (monitor == null) {
+ monitor = new NullProgressMonitor();
+ }
+
+ try {
+ // If a config.status file exists in the build directory, we call it
+ // to
+ // regenerate the makefile
+ IPath configfile = getProjectLocation().append(buildDir).append(
+ CONFIG_STATUS);
+ IPath makefilePath = getProjectLocation().append(buildDir).append(MAKEFILE);
+ File configStatus = configfile.toFile();
+ File makefile = makefilePath.toFile();
+ IPath configSettingsPath = getConfigSettingsPath();
+ File configSettings = configSettingsPath.toFile();
+ String[] configArgs = getConfigArgs();
+
+ // We need to figure out if the end-user has changed the configuration
+ // settings. In such a case, we need to reconfigure from scratch
+ // regardless of whether config.status exists or not.
+ // We figure this out by saving the configuration settings to
+ // a special file and reading/comparing whenever we are asked to build.
+ if (configSettings.exists()) {
+ int i = 0;
+ boolean needSaveConfigArgs = false;
+ needFullConfigure = false;
+ try {
+ DataInputStream settings = new DataInputStream(
+ new BufferedInputStream(new FileInputStream(configSettings)));
+ // Get the first String in the configure settings file.
+ // Newer configure settings file start with the project name.
+ // If the project name is present and doesn't match the
+ // current project name, the project has been refactored and
+ // we need to do a full reconfigure.
+ settings.mark(100);
+ String s = settings.readUTF();
+ if (s.startsWith("project=")) { //$NON-NLS-1$
+ if (!s.substring(8).equals(project.getName())) {
+ needFullConfigure = true;
+ }
+ } else {
+ // An older configure arguments file. Reset
+ // to beginning and process as normal.
+ needSaveConfigArgs = true;
+ settings.reset();
+ }
+ while (i < configArgs.length) {
+ s = settings.readUTF();
+ if (!s.equals(configArgs[i])) {
+ i = configArgs.length;
+ needFullConfigure = true;
+ }
+ ++i;
+ }
+ if (settings.available() > 0)
+ needFullConfigure = true;
+ } catch (EOFException e) {
+ needFullConfigure = true;
+ } catch (IOException e) {
+ needFullConfigure = true;
+ }
+ if (needFullConfigure) {
+ // If we are going to do a full reconfigure, then if the current
+ // build directory exists, we should clean it out first. This is
+ // because the reconfiguration could change compile flags, etc..
+ // and the Makefile might not detect a rebuild is required. In
+ // addition, the build directory itself could have been changed and
+ // we should remove the previous build.
+ File r = project.getLocation().append(buildDir).toFile();
+ if (r != null && r.exists()) {
+ // See what type of cleaning the user has set up in the
+ // build properties dialog.
+ String cleanDelete = null;
+ try {
+ cleanDelete = getProject().getPersistentProperty(AutotoolsPropertyConstants.CLEAN_DELETE);
+ } catch (CoreException ce) {
+ // do nothing
+ }
+
+ if (cleanDelete != null && cleanDelete.equals(AutotoolsPropertyConstants.TRUE)) {
+ SubProgressMonitor sub = new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN);
+ sub.beginTask(AutotoolsPlugin.getResourceString("MakeGenerator.clean.builddir"), IProgressMonitor.UNKNOWN);
+ try {
+ r.delete();
+ } finally {
+ sub.done();
+ }
+ }
+ else {
+ // There is a make target for cleaning.
+ if (makefile != null && makefile.exists()) {
+ String[] makeargs = new String[1];
+ IPath makeCmd = new Path("make"); //$NON-NLS-1$
+ String target = null;
+ try {
+ target = getProject().getPersistentProperty(AutotoolsPropertyConstants.CLEAN_MAKE_TARGET);
+ } catch (CoreException ce) {
+ // do nothing
+ }
+ if (target == null)
+ target = AutotoolsPropertyConstants.CLEAN_MAKE_TARGET_DEFAULT;
+ String args = builder.getBuildArguments();
+ if (args != null && !(args = args.trim()).equals("")) { //$NON-NLS-1$
+ String[] newArgs = makeArray(args);
+ makeargs = new String[newArgs.length + 1];
+ System.arraycopy(newArgs, 0, makeargs, 0, newArgs.length);
+ }
+ makeargs[makeargs.length - 1] = target;
+ rc = runCommand(makeCmd,
+ project.getLocation().append(buildDir),
+ makeargs,
+ AutotoolsPlugin.getResourceString("MakeGenerator.clean.builddir"), //$NON-NLS-1$
+ errMsg, console, true);
+ }
+ }
+ }
+ initializeBuildConfigDirs();
+ createDirectory(buildDir);
+ // Mark the scanner info as dirty.
+ try {
+ project.setSessionProperty(AutotoolsPropertyConstants.SCANNER_INFO_DIRTY, Boolean.TRUE);
+ } catch (CoreException ce) {
+ // do nothing
+ }
+ } else if (needSaveConfigArgs) {
+ // No change in configuration args, but we have old
+ // style settings format which can't determine if project has
+ // been renamed. Refresh the settings file.
+ saveConfigArgs(configArgs);
+ }
+ }
+
+ ArrayList<String> configureEnvs = new ArrayList<String>();
+ IPath configurePath = getConfigurePath(configureEnvs);
+ ArrayList<String> autogenEnvs = new ArrayList<String>();
+ IPath autogenPath = getAutogenPath(autogenEnvs);
+
+ // Check if we have a config.status (meaning configure has already run).
+ if (!needFullConfigure && configStatus != null && configStatus.exists()) {
+ // If no corresponding Makefile in the same build location, then we
+ // can simply run config.status again to ensure the top level Makefile has been
+ // created.
+ if (makefile == null || !makefile.exists()) {
+ rc = runScript(configfile, project.getLocation().append(
+ buildDir), null,
+ AutotoolsPlugin.getResourceString("MakeGenerator.run.config.status"), //$NON-NLS-1$
+ errMsg, console, null, true);
+ }
+ }
+ // Look for configure and configure from scratch
+ else if (configurePath.toFile().exists()) {
+ rc = runScript(configurePath,
+ project.getLocation().append(buildDir),
+ configArgs,
+ AutotoolsPlugin.getResourceString("MakeGenerator.gen.makefile"), //$NON-NLS-1$
+ errMsg, console, configureEnvs, true);
+ if (rc != IStatus.ERROR) {
+ File makefileFile = project.getLocation().append(buildDir)
+ .append(MAKEFILE).toFile();
+ addMakeTargetsToManager(makefileFile);
+ // TODO: should we do something special if configure doesn't
+ // return ok?
+ saveConfigArgs(configArgs);
+ }
+ }
+ // If no configure, look for autogen.sh which may create configure and
+ // possibly even run it.
+ else if (autogenPath.toFile().exists()) {
+ // Remove the existing config.status file since we use it
+ // to figure out if configure was run.
+ if (configStatus.exists())
+ configStatus.delete();
+ // Get any user-specified arguments for autogen.
+ String[] autogenArgs = getAutogenArgs();
+ rc = runScript(autogenPath,
+ autogenPath.removeLastSegments(1), autogenArgs,
+ AutotoolsPlugin.getResourceString("MakeGenerator.autogen.sh"), //$NON-NLS-1$
+ errMsg, console, autogenEnvs, true);
+ if (rc != IStatus.ERROR) {
+ configStatus =configfile.toFile();
+ // Check for config.status. If it is created, then
+ // autogen.sh ran configure and we should not run it
+ // ourselves.
+ if (configStatus == null || !configStatus.exists()) {
+ rc = runScript(configurePath,
+ project.getLocation().append(buildDir),
+ configArgs,
+ AutotoolsPlugin.getResourceString("MakeGenerator.gen.makefile"), //$NON-NLS-1$
+ errMsg, console, configureEnvs, false);
+ if (rc != IStatus.ERROR) {
+ File makefileFile = project.getLocation().append(buildDir)
+ .append(MAKEFILE).toFile();
+ addMakeTargetsToManager(makefileFile);
+ }
+ } else {
+ File makefileFile = project.getLocation().append(buildDir)
+ .append(MAKEFILE).toFile();
+ addMakeTargetsToManager(makefileFile);
+ }
+ }
+ }
+ // If nothing this far, look for a Makefile.cvs file which needs to be run.
+ else if (makefileCvsExists()) {
+ String[] makeargs = new String[1];
+ IPath makeCmd = new Path("make"); //$NON-NLS-1$
+ makeargs[0] = "-f" + getMakefileCVSPath().toOSString(); //$NON-NLS-1$
+ rc = runCommand(makeCmd,
+ project.getLocation().append(buildDir),
+ makeargs,
+ AutotoolsPlugin.getResourceString("MakeGenerator.makefile.cvs"), //$NON-NLS-1$
+ errMsg, console, true);
+ if (rc != IStatus.ERROR) {
+ File makefileFile = project.getLocation().append(buildDir)
+ .append(MAKEFILE).toFile();
+ addMakeTargetsToManager(makefileFile);
+ saveConfigArgs(configArgs);
+ }
+ }
+ // If nothing this far, try running autoreconf -i
+ else {
+ String[] reconfArgs = new String[1];
+ String reconfCmd = project.getPersistentProperty(AutotoolsPropertyConstants.AUTORECONF_TOOL);
+ if (reconfCmd == null)
+ reconfCmd = "autoreconf"; // $NON-NLS-1$
+ IPath reconfCmdPath = new Path(reconfCmd);
+ reconfArgs[0] = "-i"; //$NON-NLS-1$
+ rc = runCommand(reconfCmdPath,
+ project.getLocation().append(srcDir),
+ reconfArgs,
+ AutotoolsPlugin.getResourceString("MakeGenerator.autoreconf"), //$NON-NLS-1$
+ errMsg, console, true);
+ // Check if configure generated and if yes, run it.
+ if (rc != IStatus.ERROR) {
+ if (configurePath.toFile().exists()) {
+
+ rc = runScript(configurePath,
+ project.getLocation().append(buildDir),
+ configArgs,
+ AutotoolsPlugin.getResourceString("MakeGenerator.gen.makefile"), //$NON-NLS-1$
+ errMsg, console, configureEnvs, false);
+ if (rc != IStatus.ERROR) {
+ File makefileFile = project.getLocation().append(buildDir)
+ .append(MAKEFILE).toFile();
+ addMakeTargetsToManager(makefileFile);
+ // TODO: should we do something special if configure doesn't
+ // return ok?
+ saveConfigArgs(configArgs);
+ }
+ }
+ }
+ }
+
+ // Treat no Makefile as generation error.
+ if (makefile == null || !makefile.exists()) {
+ rc = IStatus.ERROR;
+ errMsg = AutotoolsPlugin.getResourceString("MakeGenerator.didnt.generate"); //$NON-NLS-1$
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ // forgetLastBuiltState();
+ rc = IStatus.ERROR;
+ } finally {
+ // getGenerationProblems().clear();
+ status = new MultiStatus(AutotoolsPlugin
+ .getUniqueIdentifier(), rc, errMsg, null);
+ }
+ return status;
+ }
+
+ /**
+ * Strip a command of VAR=VALUE pairs that appear ahead of the command and add
+ * them to a list of environment variables.
+ *
+ * @param command - command to strip
+ * @param envVars - ArrayList to add environment variables to
+ * @return stripped command
+ */
+ public static String stripEnvVars(String command, ArrayList<String> envVars) {
+ Pattern p = Pattern.compile("(\\w+[=]([$]?\\w+[:;]?)+\\s+)\\w+.*");
+ Pattern p2 = Pattern.compile("(\\w+[=]\\\".*?\\\"\\s+)\\w+.*");
+ Pattern p3 = Pattern.compile("(\\w+[=]'.*?'\\s+)\\w+.*");
+ boolean finished = false;
+ while (!finished) {
+ Matcher m = p.matcher(command);
+ if (m.matches()) {
+ command = command.replaceFirst("\\w+[=]([$]?\\w+[:;]?)+", "").trim();
+ envVars.add(m.group(1).trim());
+ } else {
+ Matcher m2 = p2.matcher(command);
+ if (m2.matches()) {
+ command = command.replaceFirst("\\w+[=]\\\".*?\\\"","").trim();
+ String s = m2.group(1).trim();
+ envVars.add(s.replaceAll("\\\"", ""));
+ } else {
+ Matcher m3 = p3.matcher(command);
+ if (m3.matches()) {
+ command = command.replaceFirst("\\w+[=]'.*?'", "").trim();
+ String s = m3.group(1).trim();
+ envVars.add(s.replaceAll("'", ""));
+ } else {
+ finished = true;
+ }
+ }
+ }
+ }
+ return command;
+ }
+
+ protected IPath getConfigurePath(ArrayList<String> envVars) {
+ IPath configPath;
+ ITool[] tool = cfg.getToolsBySuperClassId(CONFIGURE_TOOL_ID);
+ String command = stripEnvVars(tool[0].getToolCommand().trim(), envVars);
+
+ if (srcDir.equals(""))
+ configPath = project.getLocation().append(command);
+ else
+ configPath = project.getLocation().append(srcDir).append(command);
+ return configPath;
+ }
+
+ protected IPath getMakefileCVSPath() {
+ IPath makefileCVSPath;
+ if (srcDir.equals(""))
+ makefileCVSPath = project.getLocation().append(MAKEFILE_CVS);
+ else
+ makefileCVSPath= project.getLocation().append(srcDir).append(
+ MAKEFILE_CVS);
+ return makefileCVSPath;
+ }
+
+ protected boolean makefileCvsExists() {
+ IPath makefileCVSPath = getMakefileCVSPath();
+ return makefileCVSPath.toFile().exists();
+ }
+
+ protected IPath getAutogenPath(ArrayList<String> envVars) {
+ IPath autogenPath;
+ ITool[] tool = cfg.getToolsBySuperClassId(AUTOGEN_TOOL_ID);
+ String command = stripEnvVars(tool[0].getToolCommand().trim(), envVars);
+
+ if (srcDir.equals(""))
+ autogenPath = project.getLocation().append(command);
+ else
+ autogenPath = project.getLocation().append(srcDir).append(command);
+ return autogenPath;
+ }
+
+ private void saveConfigArgs(String[] args) {
+ IPath settingsPath = getConfigSettingsPath();
+ try {
+ File f = settingsPath.toFile();
+ DataOutputStream settings = new DataOutputStream(
+ new BufferedOutputStream(new FileOutputStream(f)));
+ // Write the project name in the configure arguments
+ // so we know if the project gets refactored.
+ settings.writeUTF("project=" + project.getName()); //$NON-NLS-1$
+ for (int i = 0; i < args.length; ++i) {
+ settings.writeUTF(args[i]);
+ }
+ settings.close();
+ } catch (IOException e) {
+ /* What should we do? */
+ }
+ }
+
+ private String[] getAutogenArgs() throws BuildException {
+ // Get the arguments to be passed to config from build model
+ ITool[] tool = cfg.getToolsBySuperClassId(AUTOGEN_TOOL_ID);
+ IOption[] options = tool[0].getOptions();
+ ArrayList<String> autogenArgs = new ArrayList<String>();
+
+ for (int i = 0; i < options.length; ++i) {
+ if (options[i].getValueType() == IOption.STRING) {
+ String value = (String) options[i].getValue();
+ try {
+ String resolved = ManagedBuildManager.getBuildMacroProvider().resolveValue(value, "", null,
+ IBuildMacroProvider.CONTEXT_CONFIGURATION, cfg);
+ value = resolved;
+ } catch (BuildMacroException e) {
+ // do nothing
+ }
+ String id = options[i].getId();
+ if (id.indexOf("user") > 0) { //$NON-NLS-1$
+ // May be multiple user-specified options in which case we
+ // need to split them up into individual options
+ value = value.trim();
+ boolean finished = false;
+ int lastIndex = value.indexOf("--"); //$NON-NLS-1$
+ if (lastIndex != -1) {
+ while (!finished) {
+ int index = value.indexOf("--",lastIndex+2); //$NON-NLS-1$
+ if (index != -1) {
+ String previous = value.substring(lastIndex, index).trim();
+ autogenArgs.add(previous);
+ value = value.substring(index);
+ } else {
+ autogenArgs.add(value);
+ finished = true;
+ }
+ }
+ }
+ }
+ }
+ }
+ return (String[]) autogenArgs.toArray(new String[autogenArgs.size()]);
+ }
+
+ private String[] getConfigArgs() throws BuildException {
+ // Get the arguments to be passed to config from build model
+ ITool tool = cfg.getToolFromOutputExtension("status"); //$NON-NLS-1$
+ IOption[] options = tool.getOptions();
+ ArrayList<String> configArgs = new ArrayList<String>();
+ for (int i = 0; i < options.length; ++i) {
+ if (options[i].getValueType() == IOption.STRING) {
+ String value = (String) options[i].getValue();
+ try {
+ String resolved = ManagedBuildManager.getBuildMacroProvider().resolveValue(value, "", null,
+ IBuildMacroProvider.CONTEXT_CONFIGURATION, cfg);
+ value = resolved;
+ } catch (BuildMacroException e) {
+ // do nothing
+ }
+ String id = options[i].getId();
+ if (id.indexOf("configdir") > 0 || id.indexOf("builddir") > 0) //$NON-NLS-1$ $NON-NLS-2$
+ continue;
+ else if (id.indexOf("user") > 0) { //$NON-NLS-1$
+ // May be multiple user-specified options in which case we
+ // need to split them up into individual options
+ value = value.trim();
+ boolean finished = false;
+ int lastIndex = value.indexOf("--"); //$NON-NLS-1$
+ if (lastIndex != -1) {
+ while (!finished) {
+ int index = value.indexOf("--",lastIndex+2); //$NON-NLS-1$
+ if (index != -1) {
+ String previous = value.substring(lastIndex, index).trim();
+ configArgs.add(previous);
+ value = value.substring(index);
+ } else {
+ configArgs.add(value);
+ finished = true;
+ }
+ }
+ } else {
+ // No --xxx arguments, but there might still be some NAME=VALUE args
+ // and we should pass them on regardless
+ configArgs.add(value);
+ }
+ }
+ else if (value.trim().length() > 0) {
+ String categoryId = options[i].getCategory().getId();
+ if (categoryId.indexOf("directories") >= 0) //$NON-NLS-1$
+ value = getAbsoluteDirectory(value);
+ String cmd = options[i].getCommand().concat(value);
+ configArgs.add(cmd);
+ }
+ } else if (options[i].getValueType() == IOption.BOOLEAN) {
+ Boolean value = (Boolean) options[i].getValue();
+ if (value.booleanValue())
+ configArgs.add(options[i].getCommand());
+ else if (!options[i].getCommandFalse().equals(""))
+ configArgs.add(options[i].getCommandFalse());
+ }
+ }
+ return (String[]) configArgs.toArray(new String[configArgs.size()]);
+ }
+
+ // Run a command or executable (e.g. make).
+ private int runCommand(IPath commandPath, IPath runPath, String[] args,
+ String jobDescription, String errMsg, IConsole console,
+ boolean consoleStart) throws BuildException, CoreException,
+ NullPointerException, IOException {
+ // TODO: Figure out what this next stuff is used for
+ // //try to resolve the build macros in the builder command
+ // try{
+ // String resolved =
+ // ManagedBuildManager.getBuildMacroProvider().resolveValueToMakefileFormat(
+ // configCmd,
+ // "", //$NON-NLS-1$
+ // " ", //$NON-NLS-1$
+ // IBuildMacroProvider.CONTEXT_CONFIGURATION,
+ // info.getDefaultConfiguration());
+ // if((resolved = resolved.trim()).length() > 0)
+ // configCmd = resolved;
+ // } catch (BuildMacroException e){
+ // }
+
+ int rc = IStatus.OK;
+
+ removeAllMarkers(project);
+
+ String[] configTargets = args;
+ if (args == null)
+ configTargets = new String[0];
+
+ String[] msgs = new String[2];
+ msgs[0] = commandPath.toString();
+ msgs[1] = project.getName();
+ monitor.subTask(AutotoolsPlugin.getFormattedString(
+ "MakeGenerator.make.message", msgs)); //$NON-NLS-1$
+
+
+ ConsoleOutputStream consoleOutStream = null;
+ StringBuffer buf = new StringBuffer();
+
+ // Launch command - main invocation
+ if (consoleStart)
+ console.start(project);
+ consoleOutStream = console.getOutputStream();
+ String[] consoleHeader = new String[3];
+
+ consoleHeader[0] = jobDescription;
+ consoleHeader[1] = cfg.getName();
+ consoleHeader[2] = project.getName();
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ buf.append(jobDescription);
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+
+ if (!cfg.isSupported()) {
+ String msgArgs[] = new String[1];
+ msgArgs[0] = cfg.getName();
+ buf.append(AutotoolsPlugin.getFormattedString("MakeGenerator.unsupportedConfig", msgArgs));
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ consoleOutStream.write(buf.toString().getBytes());
+ consoleOutStream.flush();
+
+ // Get a launcher for the config command
+ CommandLauncher launcher = new CommandLauncher();
+ // Set the environment
+ IEnvironmentVariable variables[] = ManagedBuildManager
+ .getEnvironmentVariableProvider().getVariables(cfg, true);
+ String[] env = null;
+ ArrayList<String> envList = new ArrayList<String>();
+ if (variables != null) {
+ for (int i = 0; i < variables.length; i++) {
+ envList.add(variables[i].getName()
+ + "=" + variables[i].getValue()); //$NON-NLS-1$
+ }
+ env = (String[]) envList.toArray(new String[envList.size()]);
+ }
+
+ // // Hook up an error parser manager
+ // String[] errorParsers =
+ // info.getDefaultConfiguration().getErrorParserList();
+ // ErrorParserManager epm = new ErrorParserManager(project, topBuildDir,
+ // this, errorParsers);
+ // epm.setOutputStream(consoleOutStream);
+ OutputStream stdout = consoleOutStream;
+ OutputStream stderr = consoleOutStream;
+
+ launcher.showCommand(true);
+ Process proc = launcher.execute(commandPath, configTargets, env,
+ runPath, new NullProgressMonitor());
+ if (proc != null) {
+ try {
+ // Close the input of the process since we will never write to
+ // it
+ proc.getOutputStream().close();
+ } catch (IOException e) {
+ }
+
+ if (launcher.waitAndRead(stdout, stderr, new SubProgressMonitor(
+ monitor, IProgressMonitor.UNKNOWN)) != CommandLauncher.OK) {
+ errMsg = launcher.getErrorMessage();
+ }
+
+ // Force a resync of the projects without allowing the user to
+ // cancel.
+ // This is probably unkind, but short of this there is no way to
+ // ensure
+ // the UI is up-to-date with the build results
+ // monitor.subTask(ManagedMakeMessages
+ // .getResourceString(REFRESH));
+ monitor.subTask(AutotoolsPlugin.getResourceString("MakeGenerator.refresh")); //$NON-NLS-1$
+ try {
+ project.refreshLocal(IResource.DEPTH_INFINITE, null);
+ } catch (CoreException e) {
+ monitor.subTask(AutotoolsPlugin
+ .getResourceString("MakeGenerator.refresh.error")); //$NON-NLS-1$
+ }
+ } else {
+ errMsg = launcher.getErrorMessage();
+ }
+
+ // Report either the success or failure of our mission
+ buf = new StringBuffer();
+ if (errMsg != null && errMsg.length() > 0) {
+ String errorDesc = AutotoolsPlugin
+ .getResourceString("MakeGenerator.generation.error"); //$NON-NLS-1$
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
+ buf.append(errorDesc);
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
+ buf.append("(").append(errMsg).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
+ rc = IStatus.ERROR;
+ } else if (proc.exitValue() >= 1 || proc.exitValue() < 0) {
+ // We have an invalid return code from configuration.
+ String[] errArg = new String[2];
+ errArg[0] = Integer.toString(proc.exitValue());
+ errArg[1] = commandPath.toString();
+ errMsg = AutotoolsPlugin.getFormattedString(
+ "MakeGenerator.config.error", errArg); //$NON-NLS-1$
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
+ buf.append(AutotoolsPlugin.getResourceString("MakeGenerator.generation.error")); //$NON-NLS-1$
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
+ if (proc.exitValue() == 1)
+ rc = IStatus.WARNING;
+ else
+ rc = IStatus.ERROR;
+ } else {
+ // Report a successful build
+ String successMsg =
+ AutotoolsPlugin.getResourceString("MakeGenerator.success"); //$NON-NLS-1$
+ buf.append(successMsg);
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
+ rc = IStatus.OK;
+ }
+
+ // Write message on the console
+ consoleOutStream.write(buf.toString().getBytes());
+ consoleOutStream.flush();
+
+ // // Generate any error markers that the build has discovered
+ // monitor.subTask(ManagedMakeMessages
+ // .getResourceString(MARKERS));
+ // epm.reportProblems();
+ consoleOutStream.close();
+
+ // TODO: For now, add a marker with our generated error message.
+ // In the future, we might add an error parser to do this properly
+ // and give the actual error line, etc..
+ if (rc == IStatus.ERROR) {
+ addMarker(project, -1, errMsg, SEVERITY_ERROR_BUILD, null);
+ // Mark the configuration as needing a full rebuild.
+ cfg.setRebuildState(true);
+ }
+
+ return rc;
+ }
+
+ // Get the path string. We add a Win check to handle MingW.
+ // For MingW, we would rather represent C:\a\b as /C/a/b which
+ // doesn't cause Makefile to choke.
+ // TODO: further logic would be needed to handle cygwin if desired
+ private String getPathString(IPath path) {
+ String s = path.toString();
+ if (Platform.getOS().equals(Platform.OS_WIN32))
+ s = s.replaceAll("^([A-Z])(:)", "/$1");
+ return s;
+ }
+
+ // Run an autotools script (e.g. configure, autogen.sh, config.status).
+ private int runScript(IPath commandPath, IPath runPath, String[] args,
+ String jobDescription, String errMsg, IConsole console,
+ ArrayList<String> additionalEnvs,
+ boolean consoleStart) throws BuildException, CoreException,
+ NullPointerException, IOException {
+ // TODO: Figure out what this next stuff is used for
+ // //try to resolve the build macros in the builder command
+ // try{
+ // String resolved =
+ // ManagedBuildManager.getBuildMacroProvider().resolveValueToMakefileFormat(
+ // configCmd,
+ // "", //$NON-NLS-1$
+ // " ", //$NON-NLS-1$
+ // IBuildMacroProvider.CONTEXT_CONFIGURATION,
+ // info.getDefaultConfiguration());
+ // if((resolved = resolved.trim()).length() > 0)
+ // configCmd = resolved;
+ // } catch (BuildMacroException e){
+ // }
+
+ int rc = IStatus.OK;
+
+ removeAllMarkers(project);
+
+ // We want to run the script via the shell command. So, we add the command
+ // script as the first argument and expect "sh" to be on the runtime path.
+ // Any other arguments are placed after the script name.
+ String[] configTargets = null;
+ if (args == null)
+ configTargets = new String[1];
+ else {
+ configTargets = new String[args.length+1];
+ System.arraycopy(args, 0, configTargets, 1, args.length);
+ }
+ configTargets[0] = getPathString(commandPath);
+
+ String[] msgs = new String[2];
+ msgs[0] = commandPath.toString();
+ msgs[1] = project.getName();
+ monitor.subTask(AutotoolsPlugin.getFormattedString(
+ "MakeGenerator.make.message", msgs)); //$NON-NLS-1$
+
+
+ ConsoleOutputStream consoleOutStream = null;
+ StringBuffer buf = new StringBuffer();
+
+ // Launch command - main invocation
+ if (consoleStart)
+ console.start(project);
+ consoleOutStream = console.getOutputStream();
+ String[] consoleHeader = new String[3];
+
+ consoleHeader[0] = jobDescription;
+ consoleHeader[1] = cfg.getName();
+ consoleHeader[2] = project.getName();
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ buf.append(jobDescription);
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+
+ if (!cfg.isSupported()) {
+ String msgArgs[] = new String[1];
+ msgArgs[0] = cfg.getName();
+ buf.append(AutotoolsPlugin.getFormattedString("MakeGenerator.unsupportedConfig", msgArgs)); // $NON-NLS-1$
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ consoleOutStream.write(buf.toString().getBytes());
+ consoleOutStream.flush();
+
+ // Get a launcher for the config command
+ CommandLauncher launcher = new CommandLauncher();
+ // Set the environment
+ IEnvironmentVariable variables[] = ManagedBuildManager
+ .getEnvironmentVariableProvider().getVariables(cfg, true);
+ String[] env = null;
+ ArrayList<String> envList = new ArrayList<String>();
+ if (variables != null) {
+ for (int i = 0; i < variables.length; i++) {
+ envList.add(variables[i].getName()
+ + "=" + variables[i].getValue()); //$NON-NLS-1$
+ }
+ if (additionalEnvs != null)
+ envList.addAll(additionalEnvs); // add any additional environment variables specified ahead of script
+ env = (String[]) envList.toArray(new String[envList.size()]);
+ }
+
+ // // Hook up an error parser manager
+ // String[] errorParsers =
+ // info.getDefaultConfiguration().getErrorParserList();
+ // ErrorParserManager epm = new ErrorParserManager(project, topBuildDir,
+ // this, errorParsers);
+ // epm.setOutputStream(consoleOutStream);
+ OutputStream stdout = consoleOutStream;
+ OutputStream stderr = consoleOutStream;
+
+ launcher.showCommand(true);
+ // Run the shell script via shell command.
+ Process proc = launcher.execute(new Path(SHELL_COMMAND), configTargets, env,
+ runPath, new NullProgressMonitor());
+ if (proc != null) {
+ try {
+ // Close the input of the process since we will never write to
+ // it
+ proc.getOutputStream().close();
+ } catch (IOException e) {
+ }
+
+ if (launcher.waitAndRead(stdout, stderr, new SubProgressMonitor(
+ monitor, IProgressMonitor.UNKNOWN)) != CommandLauncher.OK) {
+ errMsg = launcher.getErrorMessage();
+ }
+
+ // Force a resync of the projects without allowing the user to
+ // cancel.
+ // This is probably unkind, but short of this there is no way to
+ // ensure
+ // the UI is up-to-date with the build results
+ // monitor.subTask(ManagedMakeMessages
+ // .getResourceString(REFRESH));
+ monitor.subTask(AutotoolsPlugin.getResourceString("MakeGenerator.refresh")); //$NON-NLS-1$
+ try {
+ project.refreshLocal(IResource.DEPTH_INFINITE, null);
+ } catch (CoreException e) {
+ monitor.subTask(AutotoolsPlugin
+ .getResourceString("MakeGenerator.refresh.error")); //$NON-NLS-1$
+ }
+ } else {
+ errMsg = launcher.getErrorMessage();
+ }
+
+ // Report either the success or failure of our mission
+ buf = new StringBuffer();
+ if (errMsg != null && errMsg.length() > 0) {
+ String errorDesc = AutotoolsPlugin
+ .getResourceString("MakeGenerator.generation.error"); //$NON-NLS-1$
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
+ buf.append(errorDesc);
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
+ buf.append("(").append(errMsg).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
+ rc = IStatus.ERROR;
+ } else if (proc.exitValue() >= 1 || proc.exitValue() < 0) {
+ // We have an invalid return code from configuration.
+ String[] errArg = new String[2];
+ errArg[0] = Integer.toString(proc.exitValue());
+ errArg[1] = commandPath.toString();
+ errMsg = AutotoolsPlugin.getFormattedString(
+ "MakeGenerator.config.error", errArg); //$NON-NLS-1$
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
+ buf.append(AutotoolsPlugin.getResourceString("MakeGenerator.generation.error")); //$NON-NLS-1$
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
+ if (proc.exitValue() == 1)
+ rc = IStatus.WARNING;
+ else
+ rc = IStatus.ERROR;
+ } else {
+ // Report a successful build
+ String successMsg =
+ AutotoolsPlugin.getResourceString("MakeGenerator.success"); //$NON-NLS-1$
+ buf.append(successMsg);
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
+ rc = IStatus.OK;
+ }
+
+ // Write message on the console
+ consoleOutStream.write(buf.toString().getBytes());
+ consoleOutStream.flush();
+
+ // // Generate any error markers that the build has discovered
+ // monitor.subTask(ManagedMakeMessages
+ // .getResourceString(MARKERS));
+ // epm.reportProblems();
+ consoleOutStream.close();
+
+ // TODO: For now, add a marker with our generated error message.
+ // In the future, we might add an error parser to do this properly
+ // and give the actual error line, etc..
+ if (rc == IStatus.ERROR) {
+ addMarker(project, -1, errMsg, SEVERITY_ERROR_BUILD, null);
+ // Mark the configuration as needing a full rebuild.
+ cfg.setRebuildState(true);
+ }
+
+ return rc;
+ }
+
+ private ICStorageElement createTargetElement(ICStorageElement parent, IMakeTarget target) {
+ ICStorageElement targetElem = parent.createChild(TARGET_ELEMENT);
+ targetElem.setAttribute(TARGET_ATTR_NAME, target.getName());
+ targetElem.setAttribute(TARGET_ATTR_ID, target.getTargetBuilderID());
+ targetElem.setAttribute(TARGET_ATTR_PATH, target.getContainer().getProjectRelativePath().toString());
+ ICStorageElement elem = targetElem.createChild(TARGET_COMMAND);
+ elem.setValue(target.getBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND, "make")); //$NON-NLS-1$
+
+ String targetAttr = target.getBuildAttribute(IMakeCommonBuildInfo.BUILD_ARGUMENTS, null);
+ if ( targetAttr != null) {
+ elem = targetElem.createChild(TARGET_ARGUMENTS);
+ elem.setValue(targetAttr);
+ }
+
+ targetAttr = target.getBuildAttribute(IMakeTarget.BUILD_TARGET, null);
+ if (targetAttr != null) {
+ elem = targetElem.createChild(TARGET);
+ elem.setValue(targetAttr);
+ }
+
+ elem = targetElem.createChild(TARGET_STOP_ON_ERROR);
+ elem.setValue(new Boolean(target.isStopOnError()).toString());
+
+ elem = targetElem.createChild(TARGET_USE_DEFAULT_CMD);
+ elem.setValue(new Boolean(target.isDefaultBuildCmd()).toString());
+
+ elem = targetElem.createChild(TARGET_RUN_ALL_BUILDERS);
+ elem.setValue(new Boolean(target.runAllBuilders()).toString());
+
+ return targetElem;
+ }
+
+ /**
+ * This output method saves the information into the .cdtproject metadata file.
+ *
+ * @param doc
+ * @throws CoreException
+ */
+ private void saveTargets(IMakeTarget[] makeTargets) throws CoreException {
+ ICDescriptor descriptor = CCorePlugin.getDefault().getCProjectDescription(getProject(), true);
+ ICStorageElement rootElement = descriptor.getProjectStorageElement(MAKE_TARGET_KEY);
+
+ //Nuke the children since we are going to write out new ones
+ rootElement.clear();
+
+ // Fetch the ProjectTargets as ICStorageElements
+ rootElement = rootElement.createChild(BUILD_TARGET_ELEMENT);
+ for (int i = 0; i < makeTargets.length; ++i)
+ createTargetElement(rootElement, makeTargets[i]);
+
+ //Save the results
+ descriptor.saveProjectData();
+ }
+
+
+ protected class MakeTargetComparator implements Comparator<Object> {
+ public int compare(Object a, Object b) {
+ IMakeTarget make1 = (IMakeTarget)a;
+ IMakeTarget make2 = (IMakeTarget)b;
+ return make1.getName().compareToIgnoreCase(make2.getName());
+ }
+
+ }
+
+ /**
+ * This method parses the given Makefile and produces MakeTargets for all targets so the
+ * end-user can access them from the MakeTargets popup-menu.
+ *
+ * @param makefileFile the Makefile to parse
+ * @throws CoreException
+ */
+ private void addMakeTargetsToManager(File makefileFile) throws CoreException {
+ // Return immediately if no Makefile.
+ if (makefileFile == null || !makefileFile.exists())
+ return;
+
+ checkCancel();
+ if (monitor == null)
+ monitor = new NullProgressMonitor();
+ String statusMsg = AutotoolsPlugin.getResourceString("MakeGenerator.refresh.MakeTargets"); //$NON-NLS-1$
+ monitor.subTask(statusMsg);
+
+ IMakeTargetManager makeTargetManager =
+ MakeCorePlugin.getDefault().getTargetManager();
+
+ IMakefile makefile = MakeCorePlugin.createMakefile(makefileFile.toURI(), false, null);
+ ITargetRule[] targets = makefile.getTargetRules();
+ ITarget target = null;
+ Map<String, IMakeTarget> makeTargets = new HashMap<String, IMakeTarget>(); // use a HashMap so duplicate names are handled
+ for (int i = 0; i < targets.length; i++) {
+ target = targets[i].getTarget();
+ String targetName = target.toString();
+ if (!isValidTarget(targetName, makeTargetManager))
+ continue;
+ try {
+ IMakeTarget makeTarget = makeTargetManager.createTarget(
+ project, targetName, "org.eclipse.linuxtools.cdt.autotools.builder1"); //$NON-NLS-1$
+ makeTarget.setContainer(project);
+ makeTarget.setStopOnError(true);
+ makeTarget.setRunAllBuilders(false);
+ makeTarget.setUseDefaultBuildCmd(true);
+
+ makeTarget.setBuildAttribute(GENERATED_TARGET, "true");
+ makeTarget.setBuildAttribute(IMakeTarget.BUILD_TARGET,
+ targetName);
+
+ makeTarget.setBuildAttribute(IMakeTarget.BUILD_LOCATION,
+ buildDir);
+ makeTargets.put(makeTarget.getName(), makeTarget);
+ } catch (CoreException e) {
+ // Duplicate target. Ignore.
+ }
+ }
+
+ IMakeTarget[] makeTargetArray = new IMakeTarget[makeTargets.size()];
+ Collection<IMakeTarget> values = makeTargets.values();
+ ArrayList<IMakeTarget> valueList = new ArrayList<IMakeTarget>(values);
+ valueList.toArray(makeTargetArray);
+ MakeTargetComparator compareMakeTargets = new MakeTargetComparator();
+ Arrays.sort(makeTargetArray, compareMakeTargets);
+
+ saveTargets(makeTargetArray);
+ }
+
+ private boolean isValidTarget(String targetName, IMakeTargetManager makeTargetManager) {
+ return !(targetName.endsWith("-am") //$NON-NLS-1$
+ || targetName.endsWith("PROGRAMS") //$NON-NLS-1$
+ || targetName.endsWith("-generic") //$NON-NLS-1$
+ || (targetName.indexOf('$') >= 0)
+ || (targetName.charAt(0) == '.')
+ || targetName.equals(targetName.toUpperCase()));
+ }
+
+ // Turn the string into an array.
+ private String[] makeArray(String string) {
+ string = string.trim();
+ char[] array = string.toCharArray();
+ ArrayList<String> aList = new ArrayList<String>();
+ StringBuilder buffer = new StringBuilder();
+ boolean inComment = false;
+ for (int i = 0; i < array.length; i++) {
+ char c = array[i];
+ boolean needsToAdd = true;
+ if (array[i] == '"' || array[i] == '\'') {
+ if (i > 0 && array[i - 1] == '\\') {
+ inComment = false;
+ } else {
+ inComment = !inComment;
+ needsToAdd = false; // skip it
+ }
+ }
+ if (c == ' ' && !inComment) {
+ if (buffer.length() > 0){
+ String str = buffer.toString().trim();
+ if(str.length() > 0){
+ aList.add(str);
+ }
+ }
+ buffer = new StringBuilder();
+ } else {
+ if (needsToAdd)
+ buffer.append(c);
+ }
+ }
+ if (buffer.length() > 0){
+ String str = buffer.toString().trim();
+ if(str.length() > 0){
+ aList.add(str);
+ }
+ }
+ return (String[])aList.toArray(new String[aList.size()]);
+ }
+
+} \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/Resources.properties b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/Resources.properties
new file mode 100644
index 0000000000..7b4c9179b2
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/Resources.properties
@@ -0,0 +1,95 @@
+#################################################################################
+# Copyright (c) 2006, 2007 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
+# IBM Rational Software - ManagedMakeMessages copied to AutotoolsMakefileBuilder
+#################################################################################
+MakeCWizard.title=C/Make Project
+MakeCWizard.description=Create a New C Project using 'make' to build it
+
+WARNING_UNSUPPORTED_CONFIGURATION=Warning: unsupported configuration
+
+AutotoolsMakefileBuilder.message.finished=Build complete for project {0}
+AutotoolsMakefileBuilder.type.clean=Clean-only build
+AutotoolsMakefileBuilder.message.clean.deleting.output=Removing build artifacts from {0}
+AutotoolsMakefileBuilder.message.console.header=**** {0} of configuration {1} for project {2} ****
+
+MakeGenerator.makefile.built=Makefile built
+MakeGenerator.refresh=Refresh
+MakeGenerator.refresh.error=Refresh error
+MakeGenerator.generation.error=Configuration failed with error
+MakeGenerator.configuring=Configuring
+MakeGenerator.createdir.error=Error creating build directory: {0}
+MakeGenerator.make.message=Invoking {0} for project {1}
+MakeGenerator.config.error=Error {0} occurred while running {1}
+MakeGenerator.run.config.status=Running config.status
+MakeGenerator.makefile.cvs=Invoking Makefile.cvs
+MakeGenerator.autogen.sh=Invoking autogen.sh
+MakeGenerator.autoreconf=Invoking autoreconf
+MakeGenerator.gen.makefile=Generating Makefile
+MakeGenerator.gen.configure=Generating configure
+MakeGenerator.unsupportedConfig=Warning: unsupported configuration {0}
+MakeGenerator.success=[Operation successful]
+MakeGenerator.didnt.generate=No Makefile generated
+MakeGenerator.refresh.MakeTargets=Refreshing Make Targets
+MakeGenerator.clean.builddir=Cleaning build directory before reconfiguring
+
+
+BuildDir.apply=Build directory already in use
+BuildDir.default=Default build directory to unused value?
+BuildDir.yes=Yes
+BuildDir.no=No
+
+WizardAutotoolsProjectConversion.title=Convert to a CVS C/C++ Autotools Project
+WizardAutotoolsProjectConversion.description=Convert a CVS source repository to C/C++ Autotools Project
+WizardAutotoolsProjectConversion.message.add_nature=Adding C/C++ Autotools Managed Project Nature
+WizardAutotoolsProjectConversion.message.add_builder=Adding C/C++ Autotools Managed Project Builder
+WizardMakeProjectConversion.monitor.convertingToMakeProject=Converting Project...
+WizardAutotoolsConversion=CVS C/C++ Autotools Conversion
+WizardAutotoolsConversion.windowTitle=Conversion to CVS C/C++ Autotools Project
+WizardAutotoolsConversion.config.title=Select a configuration
+WizardAutotoolsConversion.config.desc=Select the configuration you wish to deploy on
+WizardAutotoolsConversion.options.title=Additional Project Settings
+WizardAutotoolsConversion.options.desc=Define the inter-project dependencies, if any.
+WizardAutotoolsConversion.message.save=Saving new build options
+
+WizardAutotoolsNewCProject.title=Autotools C Project
+WizardAutotoolsNewCProject.description=Create a new C Autotools project
+WizardAutotoolsNewCProject.monitor.creatingProject=Creating Project...
+WizardAutotoolsNewCProject.windowTitle=GNU Autotools C Project
+WizardAutotoolsNewCProject.config.title=Select a configuration
+WizardAutotoolsNewCProject.config.desc=Select the configuration you wish to deploy on
+WizardAutotoolsNewCProject.options.title=Additional Project Settings
+WizardAutotoolsNewCProject.options.desc=Define the inter-project dependencies, if any.
+WizardAutotoolsNewCProject.message.save=Saving new build options
+
+WizardAutotoolsNewCCProject.title=Autotools C++ Project
+WizardAutotoolsNewCCProject.description=Create a new C++ Autotools project
+WizardAutotoolsNewCCProject.monitor.creatingProject=Creating Project...
+WizardAutotoolsNewCCProject.windowTitle=GNU Autotools C++ Project
+WizardAutotoolsNewCCProject.config.title=Select a configuration
+WizardAutotoolsNewCCProject.config.desc=Select the configuration you wish to deploy on
+WizardAutotoolsNewCCProject.options.title=Additional Project Settings
+WizardAutotoolsNewCCProject.options.desc=Define the inter-project dependencies, if any.
+WizardAutotoolsNewCCProject.message.save=Saving new build options
+
+
+BuildTargetDialog.title.buildTarget=Build Special Targets
+BuildTargetDialog.title.makeTargetsFor=Make targets for
+BuildTargetDialog.button.build=Build
+
+TargetListViewer.button.add=Add...
+TargetListViewer.button.remove=Remove
+TargetListViewer.button.edit=Edit...
+TargetListViewer.label.target=Target
+TargetListViewer.label.location=Location
+TargetListViewer.exception.error=Error
+TargetListViewer.exception.message=An error occurred performing the selected action
+
+AutotoolsPreferencePage.useAutotoolsFileScanner.label=Use make -w for includepath scanning
+MakeTargetPreferencePage.buildTargetInBackground.label=Build target in background
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AbstractAutotoolsHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AbstractAutotoolsHandler.java
new file mode 100644
index 0000000000..be54ee8fb5
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AbstractAutotoolsHandler.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.actions;
+
+import java.util.Collection;
+
+import org.eclipse.cdt.core.model.ICContainer;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IResource;
+
+public abstract class AbstractAutotoolsHandler extends AbstractHandler {
+
+ @SuppressWarnings("unchecked")
+ protected IContainer getContainer(IEvaluationContext e) {
+ IContainer fContainer = null;
+
+ Object obj = e.getDefaultVariable();
+ if (obj instanceof Collection) {
+ Collection<Object> c = (Collection<Object>)obj;
+ Object[] objArray = c.toArray();
+ if (objArray.length > 0)
+ obj = objArray[0];
+ }
+ if (obj instanceof ICElement) {
+ if ( obj instanceof ICContainer || obj instanceof ICProject) {
+ fContainer = (IContainer) ((ICElement) obj).getUnderlyingResource();
+ } else {
+ obj = ((ICElement)obj).getResource();
+ if ( obj != null) {
+ fContainer = ((IResource)obj).getParent();
+ }
+ }
+ } else if (obj instanceof IResource) {
+ if (obj instanceof IContainer) {
+ fContainer = (IContainer) obj;
+ } else {
+ fContainer = ((IResource)obj).getParent();
+ }
+ } else {
+ fContainer = null;
+ }
+ return fContainer;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AbstractTargetAction.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AbstractTargetAction.java
new file mode 100644
index 0000000000..367d63a7be
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AbstractTargetAction.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.actions;
+
+import org.eclipse.cdt.core.model.ICContainer;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.linuxtools.cdt.autotools.AutotoolsMakefileBuilder;
+import org.eclipse.linuxtools.cdt.autotools.AutotoolsPlugin;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.actions.ActionDelegate;
+
+
+public abstract class AbstractTargetAction
+ extends ActionDelegate
+ implements IObjectActionDelegate, IWorkbenchWindowActionDelegate {
+ private IWorkbenchPart fPart;
+ private IWorkbenchWindow fWindow;
+ private IContainer fContainer;
+
+ protected Shell getShell() {
+ if (fPart != null) {
+ return fPart.getSite().getShell();
+ } else if (fWindow != null) {
+ return fWindow.getShell();
+ }
+ return AutotoolsPlugin.getActiveWorkbenchShell();
+ }
+
+ protected IContainer getSelectedContainer() {
+ return fContainer;
+ }
+
+ public void setSelectedContainer(IContainer container) {
+ fContainer = container;
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ fPart = targetPart;
+ }
+
+ public void init(IWorkbenchWindow window) {
+ fWindow = window;
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ boolean enabled = false;
+ if (selection instanceof IStructuredSelection) {
+ IStructuredSelection sel = (IStructuredSelection) selection;
+ Object obj = sel.getFirstElement();
+ if (obj instanceof ICElement) {
+ if ( obj instanceof ICContainer || obj instanceof ICProject) {
+ fContainer = (IContainer) ((ICElement) obj).getUnderlyingResource();
+ } else {
+ obj = ((ICElement)obj).getResource();
+ if ( obj != null) {
+ fContainer = ((IResource)obj).getParent();
+ }
+ }
+ } else if (obj instanceof IResource) {
+ if (obj instanceof IContainer) {
+ fContainer = (IContainer) obj;
+ } else {
+ fContainer = ((IResource)obj).getParent();
+ }
+ } else {
+ fContainer = null;
+ }
+ if (fContainer != null && AutotoolsMakefileBuilder.hasTargetBuilder(fContainer.getProject())) {
+ enabled = true;
+ }
+ }
+ action.setEnabled(enabled);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AclocalHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AclocalHandler.java
new file mode 100644
index 0000000000..b534cfe06a
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AclocalHandler.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.actions;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.resources.IContainer;
+
+/**
+ * @author Jeff Johnston
+ *
+ */
+public class AclocalHandler extends AbstractAutotoolsHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ InvokeAclocalAction a = new InvokeAclocalAction();
+ Object o = event.getApplicationContext();
+ if (o instanceof IEvaluationContext) {
+ IContainer container = getContainer((IEvaluationContext)o);
+ if (container != null) {
+ a.setSelectedContainer(container);
+ a.run(null);
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AutoconfHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AutoconfHandler.java
new file mode 100644
index 0000000000..9dc28e2935
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AutoconfHandler.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.actions;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.resources.IContainer;
+
+public class AutoconfHandler extends AbstractAutotoolsHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ InvokeAutoconfAction a = new InvokeAutoconfAction();
+ Object o = event.getApplicationContext();
+ if (o instanceof IEvaluationContext) {
+ IContainer container = getContainer((IEvaluationContext)o);
+ if (container != null) {
+ a.setSelectedContainer(container);
+ a.run(null);
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AutoheaderHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AutoheaderHandler.java
new file mode 100644
index 0000000000..e64ad41799
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AutoheaderHandler.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.actions;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.resources.IContainer;
+
+/**
+ * @author Jeff Johnston
+ *
+ */
+public class AutoheaderHandler extends AbstractAutotoolsHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ InvokeAutoheaderAction a = new InvokeAutoheaderAction();
+ Object o = event.getApplicationContext();
+ if (o instanceof IEvaluationContext) {
+ IContainer container = getContainer((IEvaluationContext)o);
+ if (container != null) {
+ a.setSelectedContainer(container);
+ a.run(null);
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AutomakeHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AutomakeHandler.java
new file mode 100644
index 0000000000..c1bbcf4f47
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AutomakeHandler.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.actions;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.resources.IContainer;
+
+public class AutomakeHandler extends AbstractAutotoolsHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ InvokeAutomakeAction a = new InvokeAutomakeAction();
+ Object o = event.getApplicationContext();
+ if (o instanceof IEvaluationContext) {
+ IContainer container = getContainer((IEvaluationContext)o);
+ if (container != null) {
+ a.setSelectedContainer(container);
+ a.run(null);
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AutoreconfHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AutoreconfHandler.java
new file mode 100644
index 0000000000..d9b0c8c72f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/AutoreconfHandler.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.actions;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.resources.IContainer;
+
+/**
+ * @author Jeff Johnston
+ *
+ */
+public class AutoreconfHandler extends AbstractAutotoolsHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ InvokeAutoreconfAction a = new InvokeAutoreconfAction();
+ Object o = event.getApplicationContext();
+ if (o instanceof IEvaluationContext) {
+ IContainer container = getContainer((IEvaluationContext)o);
+ if (container != null) {
+ a.setSelectedContainer(container);
+ a.run(null);
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAclocalAction.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAclocalAction.java
new file mode 100644
index 0000000000..0834ef434b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAclocalAction.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.actions;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.linuxtools.cdt.autotools.ui.properties.AutotoolsPropertyConstants;
+import org.eclipse.swt.widgets.Shell;
+
+
+public class InvokeAclocalAction extends InvokeAction {
+
+ private static final String DEFAULT_OPTION = ""; //$NON-NLS-1$
+ private static final String DEFAULT_COMMAND = "aclocal"; //$NON-NLS-1$
+
+ public void run(IAction action) {
+
+ IContainer container = getSelectedContainer();
+ if (container == null)
+ return;
+
+ IPath execDir = getExecDir(container);
+ String cwd = InvokeMessages.getString("CWD") + getCWD(container); //$NON-NLS-1$
+
+ TwoInputDialog optionDialog = new TwoInputDialog(
+ new Shell(),
+ cwd,
+ InvokeMessages
+ .getString("InvokeAclocalAction.windowTitle.options"), //$NON-NLS-1$
+ InvokeMessages
+ .getString("InvokeAclocalAction.message.options.otherOptions"), //$NON-NLS-1$
+ InvokeMessages
+ .getString("InvokeAclocalAction.message.options.includeDir"), DEFAULT_OPTION, null); //$NON-NLS-1$
+
+ optionDialog.open();
+
+ // chop args into string array
+ String rawArgList = optionDialog.getValue();
+
+ String[] optionsList = separateOptions(rawArgList);
+
+ // chop args into string array
+ rawArgList = optionDialog.getSecondValue();
+
+ String[] targetList = separateTargets(rawArgList);
+
+ if (targetList == null) {
+
+ showError(InvokeMessages
+ .getString("InvokeAction.execute.windowTitle.error"), //$NON-NLS-1$
+ InvokeMessages
+ .getString("InvokeAction.windowTitle.quoteError")); //$NON-NLS-1$
+ return;
+ }
+
+ int iOption = 0;
+ if (targetList.length > 0)
+ iOption = 1;
+
+ String[] argumentList = new String[targetList.length
+ + optionsList.length + iOption];
+
+ System.arraycopy(optionsList, 0, argumentList, 0, optionsList.length);
+
+ if (iOption == 1)
+ argumentList[optionsList.length] = "-I"; //$NON-NLS-1$
+
+ System.arraycopy(targetList, 0, argumentList, optionsList.length
+ + iOption, targetList.length);
+
+ if (container != null) {
+ String aclocalCommand = null;
+ IProject project = getSelectedContainer().getProject();
+ try {
+ aclocalCommand = project.getPersistentProperty(AutotoolsPropertyConstants.ACLOCAL_TOOL);
+ } catch (CoreException e) {
+ // do nothing
+ }
+
+ // If unset, use default system path
+ if (aclocalCommand == null)
+ aclocalCommand = DEFAULT_COMMAND;
+
+ executeConsoleCommand(DEFAULT_COMMAND, aclocalCommand,
+ argumentList, execDir);
+ }
+ }
+
+ public void dispose() {
+
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAction.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAction.java
new file mode 100644
index 0000000000..01979735f6
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAction.java
@@ -0,0 +1,442 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.actions;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.StringTokenizer;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.CommandLauncher;
+import org.eclipse.cdt.core.ConsoleOutputStream;
+import org.eclipse.cdt.core.envvar.IEnvironmentVariable;
+import org.eclipse.cdt.core.resources.IConsole;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.linuxtools.cdt.autotools.AutotoolsPlugin;
+import org.eclipse.linuxtools.cdt.autotools.MakeGenerator;
+import org.eclipse.swt.widgets.Shell;
+
+public abstract class InvokeAction extends AbstractTargetAction {
+
+ protected void showInformation(String title, String content) {
+
+ MessageDialog.openInformation(new Shell(), title, content);
+ }
+
+ protected void showError(String title, String content) {
+
+ MessageDialog.openError(new Shell(), title, content);
+ }
+
+ protected void showSuccess(String title) {
+ MessageDialog.openInformation(new Shell(), title,
+ InvokeMessages.getString("InvokeAction.success")); //$NON-NLS-1$
+ }
+
+ protected String showInput(String title, String content, String defaultTxt) {
+ InputDialog getOptionDialog = new InputDialog(new Shell(), title,
+ content, defaultTxt, null);
+
+ getOptionDialog.open();
+
+ return getOptionDialog.getValue();
+ }
+
+ /**
+ * Separate targets to array from a string.
+ *
+ * @param rawArgList
+ * @return targets in string[] array. if targets are not formatted properly,
+ * returns null
+ */
+ protected String[] separateTargets(String rawArgList) {
+
+ StringTokenizer st = new StringTokenizer(rawArgList, " "); //$NON-NLS-1$
+ ArrayList<String> targetList = new ArrayList<String>();
+
+ while (st.hasMoreTokens()) {
+ String currentWord = st.nextToken().trim();
+
+ if (currentWord.startsWith("'")) { //$NON-NLS-1$
+ String tmpTarget = ""; //$NON-NLS-1$
+ while (!currentWord.endsWith("'")) { //$NON-NLS-1$
+ tmpTarget += currentWord + " "; //$NON-NLS-1$
+ if (!st.hasMoreTokens()) {
+ // quote not closed properly, so return null
+ return null;
+ }
+ currentWord = st.nextToken().trim();
+ }
+
+ tmpTarget += currentWord;
+ targetList.add(tmpTarget);
+ continue;
+ }
+
+ if (currentWord.startsWith("\"")) { //$NON-NLS-1$
+ String tmpTarget = ""; //$NON-NLS-1$
+ while (!currentWord.endsWith("\"")) { //$NON-NLS-1$
+ tmpTarget += currentWord + " "; //$NON-NLS-1$
+ if (!st.hasMoreTokens()) {
+ // double quote not closed properly, so return null
+ return null;
+ }
+ currentWord = st.nextToken().trim();
+ }
+
+ tmpTarget += currentWord;
+ targetList.add(tmpTarget);
+ continue;
+ }
+
+ // for targets without quote/double quotes.
+ targetList.add(currentWord);
+
+ }
+
+ return (String[])targetList.toArray(new String[targetList.size()]);
+ }
+
+ protected String[] separateOptions(String rawArgList) {
+ ArrayList<String> argList = new ArrayList<String>();
+ // May be multiple user-specified options in which case we
+ // need to split them up into individual options
+ rawArgList = rawArgList.trim();
+ boolean finished = false;
+ int lastIndex = rawArgList.indexOf("--"); //$NON-NLS-1$
+ if (lastIndex != -1) {
+ while (!finished) {
+ int index = rawArgList.indexOf("--", lastIndex + 2); //$NON-NLS-1$
+ if (index != -1) {
+ String previous = rawArgList.substring(lastIndex, index)
+ .trim();
+ argList.add(previous);
+ rawArgList = rawArgList.substring(index);
+ } else {
+ argList.add(rawArgList);
+ finished = true;
+ }
+ }
+ }
+
+ return (String[])argList.toArray(new String[argList.size()]);
+
+ }
+
+ protected String[] simpleParseOptions(String rawArgList) {
+ ArrayList<String> argList = new ArrayList<String>();
+ int lastArgIndex = -1;
+ int i = 0;
+ while (i < rawArgList.length()) {
+ char ch = rawArgList.charAt(i);
+ // Skip white-space
+ while (Character.isWhitespace(ch)) {
+ ++i;
+ if (i < rawArgList.length())
+ ch = rawArgList.charAt(i);
+ else // Otherwise we are done
+ return argList.toArray(new String[argList.size()]);
+ }
+
+ // Simplistic parser. We break up into strings delimited
+ // by blanks. If quotes are used, we ignore blanks within.
+ // If a backslash is used, we ignore the next character and
+ // pass it through.
+ lastArgIndex = i;
+ boolean inString = false;
+ while (i < rawArgList.length()) {
+ ch = rawArgList.charAt(i);
+ if (ch == '\\') // escape character
+ ++i; // skip over the next character
+ else if (ch == '\"') { // double quotes
+ inString = !inString;
+ } else if (Character.isWhitespace(ch)) {
+ if (!inString) {
+ argList.add(rawArgList.substring(lastArgIndex, i));
+ break;
+ }
+ }
+ ++i;
+ }
+ // Look for the case where we ran out of chars for the last
+ // token.
+ if (i >= rawArgList.length())
+ argList.add(rawArgList.substring(lastArgIndex));
+ ++i;
+ }
+ return argList.toArray(new String[argList.size()]);
+ }
+
+ protected IPath getExecDir(IContainer container) {
+ int type = container.getType();
+ IPath execDir = null;
+ if (type == IContainer.FILE) {
+ execDir = container.getLocation().removeLastSegments(1);
+ } else {
+ execDir = container.getLocation();
+ }
+ return execDir;
+ }
+
+ protected IPath getCWD(IContainer container) {
+ int type = container.getType();
+ IPath cwd = null;
+ if (type == IContainer.FILE) {
+ cwd = container.getFullPath().removeLastSegments(1);
+ } else {
+ cwd = container.getFullPath();
+ }
+ return cwd;
+ }
+
+ private class ExecuteProgressDialog implements IRunnableWithProgress {
+ private IPath command;
+ private String[] argumentList;
+ private String[] envList;
+ private IPath execDir;
+ private int status;
+ private HashMap<String, String> outputs = null;
+
+ public ExecuteProgressDialog(IPath command, String[] argumentList,
+ String[] envList, IPath execDir) {
+ this.command = command;
+ this.argumentList = argumentList;
+ this.envList = envList;
+ this.execDir = execDir;
+ }
+
+ public void run(IProgressMonitor monitor)
+ throws InvocationTargetException, InterruptedException {
+ ByteArrayOutputStream stdout = new ByteArrayOutputStream();
+ ByteArrayOutputStream stderr = new ByteArrayOutputStream();
+ CommandLauncher cmdL = new CommandLauncher();
+ outputs = null;
+
+ // invoke command
+ try {
+ monitor.beginTask(
+ InvokeMessages.getFormattedString("InvokeAction.progress.message", // $NON-NLS-1$
+ new String[]{command.toOSString()}), IProgressMonitor.UNKNOWN);
+ monitor.worked(1);
+ Process process = cmdL.execute(command, argumentList, envList,
+ execDir, new NullProgressMonitor());
+
+ if (cmdL.waitAndRead(stdout, stderr) == CommandLauncher.OK) {
+ try {
+ status = 0;
+ monitor.done();
+ process.getOutputStream().close();
+ } catch (IOException e) {
+ // ignore
+ }
+ } else {
+ // failed to execute command
+ status = -1;
+ monitor.done();
+ return;
+ }
+ } catch (CoreException e) {
+ monitor.done();
+ throw new InvocationTargetException(e);
+ }
+
+ outputs = new HashMap<String, String>();
+
+ outputs.put("stdout", stdout.toString()); //$NON-NLS-1$
+ outputs.put("stderr", stderr.toString()); //$NON-NLS-1$
+
+ try {
+ stdout.close();
+ stderr.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
+
+ public HashMap<String, String> getOutputs() {
+ return outputs;
+ }
+
+ public int getStatus() {
+ return status;
+ }
+ }
+
+
+ protected HashMap<String, String> executeCommand(IPath command,
+ String[] argumentList, String[] envList, IPath execDir) {
+ try {
+ ExecuteProgressDialog d = new ExecuteProgressDialog(command,
+ argumentList, envList, execDir);
+ new ProgressMonitorDialog(new Shell()).run(false, false, d);
+ if (d.getStatus() == -1)
+ showError(InvokeMessages
+ .getString("InvokeAction.execute.windowTitle.error"), InvokeMessages //$NON-NLS-1$
+ .getString("InvokeAction.execute.message") //$NON-NLS-1$
+ + command.toOSString()); //$NON-NLS-1$
+ return d.getOutputs();
+ } catch (InvocationTargetException e) {
+ showError(InvokeMessages
+ .getString("InvokeAction.execute.windowTitle.error"), InvokeMessages //$NON-NLS-1$
+ .getString("InvokeAction.execute.message") //$NON-NLS-1$
+ + command.toOSString()); //$NON-NLS-1$
+ AutotoolsPlugin.logException(e);
+ return null;
+ } catch (InterruptedException e) {
+ return null;
+ }
+ }
+
+ protected void executeConsoleCommand(final String actionName, final String command,
+ final String[] argumentList, final IPath execDir) {
+ // We need to use a workspace root scheduling rule because adding MakeTargets
+ // may end up saving the project description which runs under a workspace root rule.
+ final ISchedulingRule rule = ResourcesPlugin.getWorkspace().getRoot();
+
+ Job backgroundJob = new Job(actionName) {
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
+
+ public void run(IProgressMonitor monitor) throws CoreException {
+ try {
+ String errMsg = null;
+ IProject project = getSelectedContainer().getProject();
+ // Get a build console for the project
+ IConsole console = CCorePlugin.getDefault().getConsole("org.eclipse.linuxtools.cdt.autotools.autotoolsConsole"); //$NON-NLS-1$
+ console.start(project);
+ ConsoleOutputStream consoleOutStream = console.getOutputStream();
+ // FIXME: we want to remove need for ManagedBuilderManager, but how do we
+ // get environment variables.
+ IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+ IConfiguration cfg = info.getDefaultConfiguration();
+
+ StringBuffer buf = new StringBuffer();
+ String[] consoleHeader = new String[3];
+
+ consoleHeader[0] = actionName;
+ consoleHeader[1] = cfg.getName();
+ consoleHeader[2] = project.getName();
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ String invokeMsg = InvokeMessages.getFormattedString("InvokeAction.console.message", //$NON-NLS-1$
+ new String[]{actionName, execDir.toString()}); //$NON-NLS-1$
+ buf.append(invokeMsg);
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ consoleOutStream.write(buf.toString().getBytes());
+ consoleOutStream.flush();
+
+ ArrayList<String> additionalEnvs = new ArrayList<String>();
+ String strippedCommand = MakeGenerator.stripEnvVars(command, additionalEnvs);
+ // Get a launcher for the config command
+ CommandLauncher launcher = new CommandLauncher();
+ // Set the environment
+ IEnvironmentVariable variables[] = ManagedBuildManager
+ .getEnvironmentVariableProvider().getVariables(cfg, true);
+ String[] env = null;
+ ArrayList<String> envList = new ArrayList<String>();
+ if (variables != null) {
+ for (int i = 0; i < variables.length; i++) {
+ envList.add(variables[i].getName()
+ + "=" + variables[i].getValue()); //$NON-NLS-1$
+ }
+ if (additionalEnvs.size() > 0)
+ envList.addAll(additionalEnvs); // add any additional environment variables specified ahead of script
+ env = (String[]) envList.toArray(new String[envList.size()]);
+ }
+ OutputStream stdout = consoleOutStream;
+ OutputStream stderr = consoleOutStream;
+
+ launcher.showCommand(true);
+ // Run the shell script via shell command.
+ Process proc = launcher.execute(new Path(strippedCommand), argumentList, env,
+ execDir, new NullProgressMonitor());
+ if (proc != null) {
+ try {
+ // Close the input of the process since we will never write to
+ // it
+ proc.getOutputStream().close();
+ } catch (IOException e) {
+ }
+
+ if (launcher.waitAndRead(stdout, stderr, new SubProgressMonitor(
+ monitor, IProgressMonitor.UNKNOWN)) != CommandLauncher.OK) {
+ errMsg = launcher.getErrorMessage();
+ }
+
+ // Force a resync of the projects without allowing the user to
+ // cancel.
+ // This is probably unkind, but short of this there is no way to
+ // ensure
+ // the UI is up-to-date with the build results
+ // monitor.subTask(ManagedMakeMessages
+ // .getResourceString(REFRESH));
+ monitor.subTask(AutotoolsPlugin.getResourceString("MakeGenerator.refresh")); //$NON-NLS-1$
+ try {
+ project.refreshLocal(IResource.DEPTH_INFINITE, null);
+ } catch (CoreException e) {
+ monitor.subTask(AutotoolsPlugin
+ .getResourceString("MakeGenerator.refresh.error")); //$NON-NLS-1$
+ }
+ } else {
+ errMsg = launcher.getErrorMessage();
+ }
+
+ if (errMsg != null)
+ AutotoolsPlugin.logErrorMessage(errMsg);
+
+ } catch (IOException e) {
+ AutotoolsPlugin.log(e);
+ }
+ }
+ }, rule, IWorkspace.AVOID_UPDATE, monitor);
+ } catch (CoreException e) {
+ return e.getStatus();
+ }
+ IStatus returnStatus = Status.OK_STATUS;
+ return returnStatus;
+ }
+ };
+
+ backgroundJob.setRule(rule);
+ backgroundJob.schedule();
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoconfAction.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoconfAction.java
new file mode 100644
index 0000000000..6440dfa025
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoconfAction.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.actions;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.linuxtools.cdt.autotools.ui.properties.AutotoolsPropertyConstants;
+
+
+/**
+ * Class responsible for invoking autoconf.
+ *
+ * @author klee
+ *
+ */
+public class InvokeAutoconfAction extends InvokeAction {
+
+ private final static String DEFAULT_COMMAND = "autoconf"; //$NON-NLS-1$
+ public void run(IAction action) {
+ IContainer container = getSelectedContainer();
+ if (container == null)
+ return;
+
+ IPath execDir = getExecDir(container);
+
+ if (container != null) {
+ IProject project = container.getProject();
+ String autoconfCommand = null;
+ try {
+ autoconfCommand = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOCONF_TOOL);
+ } catch (CoreException e) {
+ // do nothing
+ }
+
+ // If unset for the project, default to system path
+ if (autoconfCommand == null)
+ autoconfCommand = DEFAULT_COMMAND;
+
+ executeConsoleCommand(DEFAULT_COMMAND, autoconfCommand, new String[]{}, execDir);
+ }
+ }
+
+
+ public void dispose() {
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoheaderAction.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoheaderAction.java
new file mode 100644
index 0000000000..1057d45743
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoheaderAction.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.actions;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.linuxtools.cdt.autotools.ui.properties.AutotoolsPropertyConstants;
+import org.eclipse.swt.widgets.Shell;
+
+
+public class InvokeAutoheaderAction extends InvokeAction {
+
+ private static final String DEFAULT_OPTION = ""; //$NON-NLS-1$
+ private static final String DEFAULT_COMMAND = "autoheader"; //$NON-NLS-1$
+
+ public void run(IAction action) {
+
+ IContainer container = getSelectedContainer();
+ if (container == null)
+ return;
+
+ IPath execDir = getExecDir(container);
+ String cwd = InvokeMessages.getString("CWD") + getCWD(container); //$NON-NLS-1$
+
+ InputDialog optionDialog = new SingleInputDialog(
+ new Shell(),
+ cwd,
+ InvokeMessages
+ .getString("InvokeAutoheaderAction.windowTitle.options"), //$NON-NLS-1$
+ InvokeMessages
+ .getString("InvokeAutoheaderAction.message.options.otherOptions"), //$NON-NLS-1$
+ DEFAULT_OPTION, null);
+ optionDialog.open();
+
+ // chop args into string array
+ String rawArgList = optionDialog.getValue();
+
+ String[] optionsList = simpleParseOptions(rawArgList);
+
+ String[] argumentList = new String[optionsList.length];
+
+ System.arraycopy(optionsList, 0, argumentList, 0, optionsList.length);
+
+ if (container != null) {
+ String autoheaderCommand = null;
+ IProject project = getSelectedContainer().getProject();
+ try {
+ autoheaderCommand = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOHEADER_TOOL);
+ } catch (CoreException e) {
+ // do nothing
+ }
+
+ // If unset, use default system path
+ if (autoheaderCommand == null)
+ autoheaderCommand = DEFAULT_COMMAND;
+
+ executeConsoleCommand(DEFAULT_COMMAND, autoheaderCommand,
+ argumentList, execDir);
+ }
+
+ }
+
+ public void dispose() {
+
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutomakeAction.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutomakeAction.java
new file mode 100644
index 0000000000..2e973849f9
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutomakeAction.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.actions;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.linuxtools.cdt.autotools.ui.properties.AutotoolsPropertyConstants;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ * Class responsible for invoking automake.
+ *
+ * @author klee
+ *
+ */
+public class InvokeAutomakeAction extends InvokeAction {
+
+ private static final String DEFAULT_OPTION = ""; //$NON-NLS-1$
+ private static final String DEFAULT_COMMAND = "automake"; //$NON-NLS-1$
+
+ public void run(IAction action) {
+
+ IContainer container = getSelectedContainer();
+ if (container == null)
+ return;
+
+ IPath execDir = getExecDir(container);
+ String cwd = InvokeMessages.getString("CWD") + getCWD(container); //$NON-NLS-1$
+;
+ TwoInputDialog optionDialog = new TwoInputDialog(new Shell(), cwd,
+ InvokeMessages
+ .getString("InvokeAutomakeAction.windowTitle.options"), //$NON-NLS-1$
+InvokeMessages
+ .getString("InvokeAutomakeAction.message.options.otherOptions"),InvokeMessages //$NON-NLS-1$
+ .getString("InvokeAutomakeAction.message.options.makeTargets"), DEFAULT_OPTION, null); //$NON-NLS-1$
+
+ optionDialog.open();
+
+ // chop args into string array
+ String rawArgList = optionDialog.getValue();
+
+ String[] optionsList = separateOptions(rawArgList);
+
+
+ // chop args into string array
+ rawArgList = optionDialog.getSecondValue();
+
+ String[] targetList = separateTargets(rawArgList);
+
+ if (targetList == null) {
+
+ showError(InvokeMessages.getString("InvokeAction.execute.windowTitle.error"), //$NON-NLS-1$
+ InvokeMessages.getString("InvokeAction.windowTitle.quoteError")); //$NON-NLS-1$
+ return;
+ }
+
+ String[] argumentList = new String[targetList.length
+ + optionsList.length];
+
+ System.arraycopy(optionsList, 0, argumentList, 0, optionsList.length);
+ System.arraycopy(targetList, 0, argumentList, optionsList.length,
+ targetList.length);
+
+ if (container != null) {
+ IProject project = container.getProject();
+ String automakeCommand = null;
+ try {
+ automakeCommand = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOMAKE_TOOL);
+ } catch (CoreException e) {
+ // do nothing
+ }
+
+ // If automake path not set for the project, default to system path
+ if (automakeCommand == null)
+ automakeCommand = DEFAULT_COMMAND;
+
+ executeConsoleCommand(DEFAULT_COMMAND, automakeCommand,
+ argumentList, execDir);
+ }
+ }
+
+ public void dispose() {
+
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoreconfAction.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoreconfAction.java
new file mode 100644
index 0000000000..b16de919d3
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeAutoreconfAction.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.actions;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.linuxtools.cdt.autotools.ui.properties.AutotoolsPropertyConstants;
+import org.eclipse.swt.widgets.Shell;
+
+
+public class InvokeAutoreconfAction extends InvokeAction {
+
+ private static final String DEFAULT_OPTION = ""; //$NON-NLS-1$
+ private static final String DEFAULT_COMMAND = "autoreconf"; //$NON-NLS-1$
+
+ public void run(IAction action) {
+
+ IContainer container = getSelectedContainer();
+ if (container == null)
+ return;
+
+ IPath execDir = getExecDir(container);
+ String cwd = InvokeMessages.getString("CWD") + getCWD(container); //$NON-NLS-1$
+
+ InputDialog optionDialog = new SingleInputDialog(
+ new Shell(),
+ cwd,
+ InvokeMessages
+ .getString("InvokeAutoreconfAction.windowTitle.options"), //$NON-NLS-1$
+ InvokeMessages
+ .getString("InvokeAutoreconfAction.message.options.otherOptions"), //$NON-NLS-1$
+ DEFAULT_OPTION, null);
+ optionDialog.open();
+
+ // chop args into string array
+ String rawArgList = optionDialog.getValue();
+
+ String[] optionsList = simpleParseOptions(rawArgList);
+
+ String[] argumentList = new String[optionsList.length];
+
+ System.arraycopy(optionsList, 0, argumentList, 0, optionsList.length);
+
+ if (container != null) {
+ String autoreconfCommand = null;
+ IProject project = getSelectedContainer().getProject();
+ try {
+ autoreconfCommand = project.getPersistentProperty(AutotoolsPropertyConstants.AUTORECONF_TOOL);
+ } catch (CoreException e) {
+ // do nothing
+ }
+
+ // If unset, use default system path
+ if (autoreconfCommand == null)
+ autoreconfCommand = DEFAULT_COMMAND;
+
+ executeConsoleCommand(DEFAULT_COMMAND, autoreconfCommand,
+ argumentList, execDir);
+ }
+ }
+
+ public void dispose() {
+
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeLibtoolizeAction.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeLibtoolizeAction.java
new file mode 100644
index 0000000000..03e04273db
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeLibtoolizeAction.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.actions;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.linuxtools.cdt.autotools.ui.properties.AutotoolsPropertyConstants;
+import org.eclipse.swt.widgets.Shell;
+
+
+public class InvokeLibtoolizeAction extends InvokeAction {
+
+ private static final String DEFAULT_OPTION = ""; //$NON-NLS-1$
+ private static final String DEFAULT_COMMAND = "libtoolize"; //$NON-NLS-1$
+
+ public void run(IAction action) {
+
+ IContainer container = getSelectedContainer();
+ if (container == null)
+ return;
+
+ IPath execDir = getExecDir(container);
+ String cwd = InvokeMessages.getString("CWD") + getCWD(container); //$NON-NLS-1$
+
+ InputDialog optionDialog = new SingleInputDialog(
+ new Shell(),
+ cwd,
+ InvokeMessages
+ .getString("InvokeLibtoolizeAction.windowTitle.options"), //$NON-NLS-1$
+ InvokeMessages
+ .getString("InvokeLibtoolizeAction.message.options.otherOptions"), //$NON-NLS-1$
+ DEFAULT_OPTION, null);
+ optionDialog.open();
+
+ // chop args into string array
+ String rawArgList = optionDialog.getValue();
+
+ String[] optionsList = simpleParseOptions(rawArgList);
+
+ String[] argumentList = new String[optionsList.length];
+
+ System.arraycopy(optionsList, 0, argumentList, 0, optionsList.length);
+
+ if (container != null) {
+ String libtoolizeCommand = null;
+ IProject project = getSelectedContainer().getProject();
+ try {
+ libtoolizeCommand = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOHEADER_TOOL);
+ } catch (CoreException e) {
+ // do nothing
+ }
+
+ // If unset, use default system path
+ if (libtoolizeCommand == null)
+ libtoolizeCommand = DEFAULT_COMMAND;
+
+ executeConsoleCommand(DEFAULT_COMMAND, libtoolizeCommand,
+ argumentList, execDir);
+ }
+ }
+
+ public void dispose() {
+
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeMessages.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeMessages.java
new file mode 100644
index 0000000000..b62632a1c2
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeMessages.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.actions;
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class InvokeMessages {
+ private static final String BUNDLE_NAME = InvokeMessages.class.getName();
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private InvokeMessages() {
+ }
+
+ /**
+ * Returns the string from the resource bundle,
+ * or 'key' if not found.
+ *
+ * @param key the message key
+ * @return the resource bundle message
+ */
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+
+ /**
+ * Returns the formatted string from the resource bundle,
+ * or 'key' if not found.
+ *
+ * @param key the message key
+ * @param args an array of substituition strings
+ * @return the resource bundle message
+ */
+ public static String getFormattedString(String key, String[] args) {
+ return MessageFormat.format(getString(key), (Object[])args);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeMessages.properties b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeMessages.properties
new file mode 100644
index 0000000000..b2da117fef
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/InvokeMessages.properties
@@ -0,0 +1,56 @@
+#################################################################################
+# Copyright (c) 2006, 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 Incorporated - initial API and implementation
+#################################################################################
+CWD=Working Directory:
+
+InvokeAction.windowTitle.quoteError=Quote/Double quote not correct
+InvokeAction.progress.message=Running {0}
+InvokeAction.execute.windowTitle.error=Invoke Action Error
+InvokeAction.execute.message=Couldn't execute command :
+InvokeAction.success=Command executed successfully
+InvokeAction.console.message=Invoking {0} in {1}
+
+
+InvokeAutoconfAction.command=Running autoconf in {0}
+InvokeAutoconfAction.windowTitle.stdout=Invoke Autoconf - Output
+InvokeAutoconfAction.windowTitle.stderr=Invoke Autoconf - Error
+
+
+InvokeAutomakeAction.command=Running automake
+InvokeAutomakeAction.windowTitle.options=Automake Options
+InvokeAutomakeAction.message.options.makeTargets=Enter targets separated by space :
+InvokeAutomakeAction.message.options.otherOptions=Enter options separated by space :
+InvokeAutomakeAction.windowTitle.stdout=Invoke Automake - Output
+InvokeAutomakeAction.windowTitle.stderr=Invoke Automake - Error
+
+InvokeAutoheaderAction.command=Running autoheader
+InvokeAutoheaderAction.windowTitle.options=Autoheader Options
+InvokeAutoheaderAction.message.options.otherOptions=Enter options separated by space :
+InvokeAutoheaderAction.windowTitle.stdout=Invoke Autoheader - Output
+InvokeAutoheaderAction.windowTitle.stderr=Invoke Autoheader - Error
+
+InvokeAutoreconfAction.command=Running autoreconf
+InvokeAutoreconfAction.windowTitle.options=Autoreconf Options
+InvokeAutoreconfAction.message.options.otherOptions=Enter options separated by space :
+InvokeAutoreconfAction.windowTitle.stdout=Invoke Autoreconf - Output
+InvokeAutoreconfAction.windowTitle.stderr=Invoke Autoreconf - Error
+
+InvokeAclocalAction.command=Running aclocal
+InvokeAclocalAction.windowTitle.options=Aclocal Options
+InvokeAclocalAction.message.options.includeDir=Add directory to search list for .m4 files :
+InvokeAclocalAction.message.options.otherOptions=Enter options separated by space :
+InvokeAclocalAction.windowTitle.stdout=Invoke Automake - Output
+InvokeAclocalAction.windowTitle.stderr=Invoke Automake - Error
+
+InvokeLibtoolizeAction.command=Running libtoolize
+InvokeLibtoolizeAction.windowTitle.options=Libtoolize Options
+InvokeLibtoolizeAction.message.options.otherOptions=Enter options separated by space :
+InvokeLibtoolizeAction.windowTitle.stdout=Invoke Libtoolize - Output
+InvokeLibtoolizeAction.windowTitle.stderr=Invoke Libtoolize - Error
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/LibtoolizeHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/LibtoolizeHandler.java
new file mode 100644
index 0000000000..202f1b6476
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/LibtoolizeHandler.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.actions;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.resources.IContainer;
+
+/**
+ * @author Jeff Johnston
+ *
+ */
+public class LibtoolizeHandler extends AbstractAutotoolsHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ InvokeLibtoolizeAction a = new InvokeLibtoolizeAction();
+ Object o = event.getApplicationContext();
+ if (o instanceof IEvaluationContext) {
+ IContainer container = getContainer((IEvaluationContext)o);
+ if (container != null) {
+ a.setSelectedContainer(container);
+ a.run(null);
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/ReconfigureAction.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/ReconfigureAction.java
new file mode 100644
index 0000000000..96ef9a6823
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/ReconfigureAction.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.actions;
+
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.linuxtools.cdt.autotools.MakeGenerator;
+
+
+public class ReconfigureAction extends InvokeAction {
+
+ public void run(IAction action) {
+ IContainer container = getSelectedContainer();
+ if (container == null)
+ return;
+
+ // We need to use a workspace root scheduling rule because adding MakeTargets
+ // may end up saving the project description which runs under a workspace root rule.
+ final ISchedulingRule rule = ResourcesPlugin.getWorkspace().getRoot();
+
+ Job backgroundJob = new Job("Reconfigure Action"){ //$NON-NLS-1$
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
+
+ public void run(IProgressMonitor monitor) throws CoreException {
+ IProject project = getSelectedContainer().getProject();
+ MakeGenerator m = new MakeGenerator();
+ IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
+ m.initialize(project, info, monitor);
+ m.removeConfigSettings();
+ try {
+ m.regenerateMakefiles();
+ } catch (CoreException e) {
+ // do nothing for now
+ }
+ }
+ }, rule, IWorkspace.AVOID_UPDATE, monitor);
+ } catch (CoreException e) {
+ return e.getStatus();
+ }
+ IStatus returnStatus = Status.OK_STATUS;
+ return returnStatus;
+ }
+ };
+
+ backgroundJob.setRule(rule);
+ backgroundJob.schedule();
+ }
+
+ public void dispose() {
+
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/ReconfigureHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/ReconfigureHandler.java
new file mode 100644
index 0000000000..843d7bbabc
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/ReconfigureHandler.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.actions;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.resources.IContainer;
+
+/**
+ * @author Jeff Johnston
+ *
+ */
+public class ReconfigureHandler extends AbstractAutotoolsHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ ReconfigureAction a = new ReconfigureAction();
+ Object o = event.getApplicationContext();
+ if (o instanceof IEvaluationContext) {
+ IContainer container = getContainer((IEvaluationContext)o);
+ if (container != null) {
+ a.setSelectedContainer(container);
+ a.run(null);
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/SingleInputDialog.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/SingleInputDialog.java
new file mode 100644
index 0000000000..8a5f8bc456
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/SingleInputDialog.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.actions;
+
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IInputValidator;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+public class SingleInputDialog extends InputDialog {
+
+ private String firstMessage;
+
+ public SingleInputDialog(Shell parentShell, String firstMessage, String dialogTitle,
+ String dialogMessage, String initialValue,
+ IInputValidator validator) {
+ super(parentShell, dialogTitle, dialogMessage, initialValue, validator);
+
+ this.firstMessage = firstMessage;
+ }
+
+ /*
+ * (non-Javadoc) Method declared on Dialog.
+ */
+ protected void buttonPressed(int buttonId) {
+ super.buttonPressed(buttonId);
+ }
+
+ protected Control createDialogArea(Composite parent) {
+
+ // create composite
+ Composite composite = (Composite) super.createDialogArea(parent);
+
+ CLabel label0 = new CLabel(composite, SWT.WRAP);
+ label0.setText(firstMessage);
+ GridData data = new GridData(GridData.GRAB_HORIZONTAL
+ | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL
+ | GridData.VERTICAL_ALIGN_CENTER);
+ data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
+ label0.setLayoutData(data);
+ label0.setFont(parent.getFont());
+
+ // remove error message dialog from focusing.
+ composite.getTabList()[2].setVisible(false);
+ composite.getTabList()[2].setEnabled(false);
+
+ return composite;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/TwoInputDialog.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/TwoInputDialog.java
new file mode 100644
index 0000000000..f786e449f2
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/actions/TwoInputDialog.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.actions;
+
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IInputValidator;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+public class TwoInputDialog extends InputDialog {
+
+ private Text secondText;
+
+ private String secondValue;
+
+ private String secondMessage;
+
+ private String firstMessage;
+
+ public TwoInputDialog(Shell parentShell, String firstMessage, String dialogTitle,
+ String dialogMessage, String secondMessage, String initialValue,
+ IInputValidator validator) {
+ super(parentShell, dialogTitle, dialogMessage, initialValue, validator);
+
+ this.firstMessage = firstMessage;
+ this.secondMessage = secondMessage;
+ }
+
+ /*
+ * (non-Javadoc) Method declared on Dialog.
+ */
+ protected void buttonPressed(int buttonId) {
+ if (buttonId == IDialogConstants.OK_ID) {
+ secondValue = secondText.getText();
+ } else {
+ secondValue = null;
+ }
+ super.buttonPressed(buttonId);
+ }
+
+ protected Control createDialogArea(Composite parent) {
+
+ // create composite
+ Composite composite = (Composite) super.createDialogArea(parent);
+
+ CLabel label0 = new CLabel(composite, SWT.WRAP);
+ label0.setText(firstMessage);
+ Label label = new Label(composite, SWT.WRAP);
+ label.setText(secondMessage);
+ GridData data = new GridData(GridData.GRAB_HORIZONTAL
+ | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL
+ | GridData.VERTICAL_ALIGN_CENTER);
+ data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
+ label0.setLayoutData(data);
+ label0.setFont(parent.getFont());
+ label.setLayoutData(data);
+ label.setFont(parent.getFont());
+
+
+ secondText = new Text(composite, SWT.SINGLE | SWT.BORDER);
+ secondText.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
+ | GridData.HORIZONTAL_ALIGN_FILL));
+ secondText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ validateInput();
+ }
+ });
+
+ // remove error message dialog from focusing.
+ composite.getTabList()[2].setVisible(false);
+ composite.getTabList()[2].setEnabled(false);
+
+ return composite;
+ }
+
+ /**
+ * Returns the text area.
+ *
+ * @return the text area
+ */
+ protected Text getSecondText() {
+ return secondText;
+ }
+
+ /**
+ * Returns the string typed into this input dialog.
+ *
+ * @return the input string
+ */
+ public String getSecondValue() {
+ return secondValue;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfCaseConditionElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfCaseConditionElement.java
new file mode 100644
index 0000000000..d06e73d091
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfCaseConditionElement.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+public class AutoconfCaseConditionElement extends AutoconfElement {
+
+ public AutoconfCaseConditionElement() {
+ super("");
+ }
+
+ public AutoconfCaseConditionElement(String name) {
+ super(name);
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfCaseElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfCaseElement.java
new file mode 100644
index 0000000000..c8ad284dd4
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfCaseElement.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+public class AutoconfCaseElement extends AutoconfElement {
+
+ public AutoconfCaseElement() {
+ super("case"); //$NON-NLS-1$
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfEditorMessages.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfEditorMessages.java
new file mode 100644
index 0000000000..53c7a7d857
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfEditorMessages.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+
+/**
+ * AutoconfEditorMessages
+ */
+public class AutoconfEditorMessages {
+
+ private static final String RESOURCE_BUNDLE= AutoconfEditorMessages.class.getName();
+
+ private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
+
+ private AutoconfEditorMessages() {
+ }
+
+ public static ResourceBundle getResourceBundle() {
+ return fgResourceBundle;
+ }
+
+ public static String getString(String key) {
+ try {
+ return fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+ }
+ }
+ /**
+ * Gets a string from the resource bundle and formats it with the argument
+ *
+ * @param key the string used to get the bundle value, must not be null
+ * @since 3.0
+ */
+ public static String getFormattedString(String key, Object arg) {
+ String format= null;
+ try {
+ format= fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+ }
+ if (arg == null)
+ arg= ""; //$NON-NLS-1$
+ return MessageFormat.format(format, new Object[] { arg });
+ }
+ /**
+ * Gets a string from the resource bundle and formats it with the arguments
+ *
+ * @param key the string used to get the bundle value, must not be null
+ * @since 3.0
+ */
+ public static String getFormattedString(String key, Object arg1, Object arg2) {
+ String format= null;
+ try {
+ format= fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+ }
+ if (arg1 == null)
+ arg1= ""; //$NON-NLS-1$
+ if (arg2 == null)
+ arg2= ""; //$NON-NLS-1$
+ return MessageFormat.format(format, new Object[] { arg1, arg2 });
+ }
+
+ /**
+ * Gets a string from the resource bundle and formats it with the arguments
+ *
+ * @param key the string used to get the bundle value, must not be null
+ * @since 3.0
+ */
+ public static String getFormattedString(String key, Object arg1, Object arg2, Object arg3) {
+ String format= null;
+ try {
+ format= fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+ }
+ if (arg1 == null)
+ arg1= ""; //$NON-NLS-1$
+ if (arg2 == null)
+ arg2= ""; //$NON-NLS-1$
+ if (arg3 == null)
+ arg3= ""; //$NON-NLS-1$
+ return MessageFormat.format(format, new Object[] { arg1, arg2, arg3 });
+ }
+
+ /**
+ * Gets a string from the resource bundle and formats it with the argument
+ *
+ * @param key the string used to get the bundle value, must not be null
+ * @since 3.0
+ */
+ public static String getFormattedString(String key, boolean arg) {
+ String format= null;
+ try {
+ format= fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+ }
+ return MessageFormat.format(format, new Object[] { new Boolean(arg) });
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfEditorMessages.properties b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfEditorMessages.properties
new file mode 100644
index 0000000000..692d0649fb
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfEditorMessages.properties
@@ -0,0 +1,47 @@
+#################################################################################
+# Copyright (c) 2007 Red Hat, Inc., (c) 2008 Nokia 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
+# Nokia Inc - refactoring
+#################################################################################
+UnmatchedRightParenthesis=Unmatched right parenthesis
+UnmatchedLeftParenthesis=Unmatched left parenthesis
+UnmatchedRightQuote=Unmatched right quote, expected {0}
+UnmatchedLeftQuote=Unmatched left quote, expected {0}
+UnmatchedCloseComment=Unmatched end of comment, expected {0}
+UnterminatedString=Unterminated string, expected {0}
+
+AutoconfMacroArgsTooFew=The autoconf version {0} definition of macro "{1}" requires at least {2} arguments
+AutoconfMacroArgsTooMany=The autoconf version {0} definition of macro "{1}" may have a maximum of {2} arguments
+M4MacroArgsTooFew=The m4 macro "{0}" requires at least {1} arguments
+M4MacroArgsTooMany=The m4 macro "{0}" may have a maximum of {1} arguments
+MissingSpecifier=Missing "{0}" specifier
+InvalidSpecifier=The specifier "{0}" should be separated from condition by semicolon or newline
+InvalidTermination=The specifier "{0}" should appear after semicolon or newline
+UnterminatedConstruct=This "{0}" construct is unterminated
+MissingCondition=Missing condition for {0} specifier
+InvalidElif=The "elif" keyword should appear in an "if" or "elif" construct
+InvalidElse=The "else" keyword should appear in an "if" or "elif" construct
+InvalidFi=The "fi" keyword should terminate an "if", "elif", or "else" construct
+InvalidEsac=The "esac" keyword should terminate a "case" statement
+InvalidDone=The "done" keyword should terminate a "for", "while", "until", or "select" statement
+InvalidDo=The "do" keyword should appear in a "for", "while", "until", or "select" statement
+InvalidThen=The "then" keyword should appear in an "if" or "elif" statement
+InvalidIn=The "in" keyword should appear in a "case" statement
+UnterminatedCaseCondition=Case condition is not terminated before "esac" keyword
+ImproperCaseCondition=Case condition expected to end with ")"
+UnterminatedInlineDocument=Inline document started with "<<" is unterminated
+IncompleteInlineMarker=Inline document marker has incomplete quote
+MissingInlineMarker=Inline document specification is missing end marker
+AutoconfAnnotationHover.multipleMarkers=Multiple markers at this line
+
+ShowToolTip.label=Show T&ooltip Description
+ContentAssistProposal.label=Co&ntent Assist
+ContentAssistProposal.tooltip=Content Assist
+ContentAssistProposal.description=Content Assist
+
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElement.java
new file mode 100644
index 0000000000..2bf2a28c39
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElement.java
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+
+public class AutoconfElement {
+
+ protected String name;
+ protected String var;
+ protected int startOffset;
+ protected int endOffset;
+ protected ArrayList<AutoconfElement> children;
+ protected AutoconfElement parent;
+ private IDocument document;
+
+ public AutoconfElement(String name) {
+ this(name, null);
+ }
+
+ public AutoconfElement(String name, String var) {
+ this.name = name;
+ this.var = var;
+ this.startOffset = 0;
+ this.children = new ArrayList<AutoconfElement>();
+ }
+
+
+ public String toString() {
+ String source = getSource();
+ if (source == null) {
+ StringBuffer kids = new StringBuffer();
+ for (Iterator<AutoconfElement> iterator = children.iterator(); iterator.hasNext();) {
+ AutoconfElement kid = (AutoconfElement) iterator.next();
+ kids.append(kid.toString());
+ kids.append(",");
+ }
+ source = kids.toString();
+ }
+ return getClass().getSimpleName() + ": '" + source + "'";
+ }
+
+ public void addChild(AutoconfElement element) {
+ children.add(element);
+ if (element.getParent() == null)
+ element.setParent(this);
+ }
+
+ public void addSibling(AutoconfElement element) {
+ parent.addChild(element);
+ }
+
+ public AutoconfElement getLastChild() {
+ if (hasChildren())
+ return (AutoconfElement)children.get(children.size() - 1);
+ return null;
+ }
+
+ public AutoconfElement getParent() {
+ return parent;
+ }
+
+ public void setParent(AutoconfElement parent) {
+ this.parent = parent;
+ }
+
+ public AutoconfElement[] getChildren() {
+ return (AutoconfElement[]) children.toArray(new AutoconfElement[children.size()]);
+ }
+
+ public boolean hasChildren() {
+ return !children.isEmpty();
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String string) {
+ this.name = string;
+ }
+
+
+ public String getVar() {
+ return var;
+ }
+
+ public void setVar(String value) {
+ var = value;
+ }
+
+ public void setDocument(IDocument document) {
+ this.document = document;
+ }
+
+ public IDocument getDocument() {
+ return document;
+ }
+
+ public void setStartOffset(int offset) {
+ this.startOffset = offset;
+ }
+
+ public int getStartOffset() {
+ return startOffset;
+ }
+
+ public void setEndOffset(int offset) {
+ this.endOffset = offset;
+ }
+
+ public int getEndOffset() {
+ return endOffset;
+ }
+
+ public String getSource() {
+ if (document != null && startOffset >= 0 && endOffset >= startOffset) {
+ try {
+ return document.get(startOffset, endOffset - startOffset);
+ } catch (BadLocationException e) {
+ return null;
+ }
+ }
+ return null;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElifElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElifElement.java
new file mode 100644
index 0000000000..a990ea82d5
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElifElement.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+public class AutoconfElifElement extends AutoconfElement {
+
+ public AutoconfElifElement() {
+ super("elif"); //$NON-NLS-1$
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElseElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElseElement.java
new file mode 100644
index 0000000000..bbaa2c2c76
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfElseElement.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+public class AutoconfElseElement extends AutoconfElement {
+
+ public AutoconfElseElement() {
+ super("else"); //$NON-NLS-1$
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfForElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfForElement.java
new file mode 100644
index 0000000000..6b0ffcc9a4
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfForElement.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+public class AutoconfForElement extends AutoconfElement {
+
+ public AutoconfForElement() {
+ super("for"); //$NON-NLS-1$
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfIfElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfIfElement.java
new file mode 100644
index 0000000000..6ad658979c
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfIfElement.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+public class AutoconfIfElement extends AutoconfElement {
+
+ public AutoconfIfElement() {
+ super("if"); //$NON-NLS-1$
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroArgumentElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroArgumentElement.java
new file mode 100644
index 0000000000..24bf1d5f0b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroArgumentElement.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+/**
+ * This is a macro argument node. It may also hold
+ * other AutoconfMacroElements. The source range includes any quotes around an argument
+ * but the #getName() has them stripped.
+ * @author eswartz
+ *
+ */
+public class AutoconfMacroArgumentElement extends AutoconfElement {
+
+ public AutoconfMacroArgumentElement() {
+ super(""); // //$NON-NLS-N$
+ }
+ public AutoconfMacroArgumentElement(String name) {
+ super(name); // //$NON-NLS-N$
+ }
+ public String getVar() {
+ return super.getVar();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroDetector.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroDetector.java
new file mode 100644
index 0000000000..3635bcd5a9
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroDetector.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc., (c) 2008 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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
+ * Ed Swartz (Nokia) - refactoring
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+import java.util.regex.Pattern;
+
+/**
+ *
+ */
+public class AutoconfMacroDetector implements IAutoconfMacroDetector {
+
+ private static final Pattern AUTOCONF_MACRO_PATTERN = Pattern.compile("PKG_.*|AC_.*|AM_.*|m4.*"); //$NON-NLS-1$
+
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.cdt.autotools.ui.editors.parser.IAutoconfMacroDetector#isMacroIdentifier(java.lang.String)
+ */
+ public boolean isMacroIdentifier(String name) {
+ return AUTOCONF_MACRO_PATTERN.matcher(name).matches();
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroElement.java
new file mode 100644
index 0000000000..1168f910cc
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfMacroElement.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ * Ed Swartz (NOKIA Inc) - support standalone parser
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+/**
+ * A call to a macro.
+ * <p>
+ * Macro element now stores arguments as AutoconfMacroElement or AutoconfMacroArgument children
+ *
+ */
+public class AutoconfMacroElement extends AutoconfElement {
+
+ public AutoconfMacroElement(String name) {
+ super(name);
+ }
+
+ public String getVar() {
+ if (children.size() > 0)
+ return getParameter(0);
+ else
+ return null;
+ }
+ public int getParameterCount() {
+ return children.size();
+ }
+
+ public String getParameter(int num) {
+ return ((AutoconfElement) children.get(num)).getName();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfOutlineErrorHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfOutlineErrorHandler.java
new file mode 100644
index 0000000000..9a5100eff7
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfOutlineErrorHandler.java
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.linuxtools.cdt.autotools.AutotoolsPlugin;
+import org.eclipse.ui.IStorageEditorInput;
+import org.eclipse.ui.texteditor.MarkerUtilities;
+
+
+public class AutoconfOutlineErrorHandler {
+
+ public static final String PARSE_ERROR_MARKER_ID = AutotoolsPlugin.PLUGIN_ID
+ + ".outlineparsefileerror";
+
+ private IFile file;
+ private IDocument document;
+
+ public AutoconfOutlineErrorHandler(IStorageEditorInput input, IDocument document)
+ {
+ this.document = document;
+ IWorkspaceRoot root = CCorePlugin.getWorkspace().getRoot();
+ try {
+ IPath absPath = input.getStorage().getFullPath();
+ IPath rootPath = root.getLocation();
+ IPath relPath = new Path("");
+
+ for (int i = 0; i < rootPath.segmentCount(); ++i) {
+ relPath = relPath.append("../");
+ }
+ relPath = relPath.append(absPath);
+ this.file = root.getFileForLocation(relPath);
+ if (this.file == null) {
+ this.file = root.getFile(relPath);
+ }
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public IDocument getDocument() {
+ return document;
+ }
+
+ public void handleError(ParseException e) {
+ if (!file.exists())
+ return;
+
+ int lineNumber = e.getLineNumber();
+
+ Map<String, Object> map = new HashMap<String, Object>();
+ MarkerUtilities.setLineNumber(map, lineNumber);
+ MarkerUtilities.setMessage(map, e.getMessage());
+ map.put(IMarker.MESSAGE, e.getMessage());
+ map.put(IMarker.LOCATION, file.getFullPath().toString());
+
+ Integer charStart = getCharOffset(lineNumber, e.getStartColumn());
+ if (charStart != null) {
+ map.put(IMarker.CHAR_START, charStart);
+ }
+ Integer charEnd = getCharOffset(lineNumber, e.getEndColumn());
+ if (charEnd != null) {
+ map.put(IMarker.CHAR_END, charEnd);
+ }
+
+ // FIXME: add severity level
+ map.put(IMarker.SEVERITY, new Integer(e.getSeverity()));
+
+ try {
+ MarkerUtilities.createMarker(file, map, PARSE_ERROR_MARKER_ID);
+ } catch (CoreException ee) {
+ ee.printStackTrace();
+ }
+ return;
+ }
+
+ public void removeAllExistingMarkers() {
+ if (!file.exists())
+ return;
+
+ try {
+ file.deleteMarkers(PARSE_ERROR_MARKER_ID, true, IResource.DEPTH_ZERO);
+ } catch (CoreException e1) {
+ e1.printStackTrace();
+ }
+ }
+
+ public void removeExistingMarkers(int offset, int length) {
+ if (!file.exists())
+ return;
+
+ try {
+ IMarker[] markers = file.findMarkers(PARSE_ERROR_MARKER_ID, true, IResource.DEPTH_ZERO);
+ // Delete all markers that start in the given document range.
+ for (int i = 0; i < markers.length; ++i) {
+ IMarker marker = markers[i];
+ int charEnd = MarkerUtilities.getCharEnd(marker);
+ int charStart = MarkerUtilities.getCharStart(marker);
+ if (charStart >= offset && charEnd <= (offset + length))
+ marker.delete();
+ }
+ } catch (CoreException e1) {
+ e1.printStackTrace();
+ }
+ }
+
+ private Integer getCharOffset(int lineNumber, int columnNumber) {
+ try {
+ return new Integer(document.getLineOffset(lineNumber) + columnNumber);
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfParser.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfParser.java
new file mode 100644
index 0000000000..e6996035c2
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfParser.java
@@ -0,0 +1,1041 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc., (c) 2008 Nokia
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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
+ * Ed Swartz (Nokia) - refactoring
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+
+
+/**
+ * Tokenizing autoconf parser, based on original work by Jeff Johnston
+ * @author eswartz
+ */
+public class AutoconfParser {
+
+ public static final String MISSING_SPECIFIER = "MissingSpecifier"; //$NON-NLS-1$
+ public static final String INVALID_SPECIFIER = "InvalidSpecifier"; //$NON-NLS-1$
+ public static final String INVALID_TERMINATION = "InvalidTermination"; //$NON-NLS-1$
+ public static final String UNTERMINATED_CONSTRUCT = "UnterminatedConstruct"; //$NON-NLS-1$
+ public static final String MISSING_CONDITION = "MissingCondition"; //$NON-NLS-1$
+ public static final String INVALID_ELIF = "InvalidElif"; //$NON-NLS-1$
+ public static final String INVALID_ELSE = "InvalidElse"; //$NON-NLS-1$
+ public static final String INVALID_FI = "InvalidFi"; //$NON-NLS-1$
+ public static final String INVALID_DONE = "InvalidDone"; //$NON-NLS-1$
+ public static final String INVALID_ESAC = "InvalidEsac"; //$NON-NLS-1$
+ public static final String INVALID_DO = "InvalidDo"; //$NON-NLS-1$
+ public static final String INVALID_THEN = "InvalidThen"; //$NON-NLS-1$
+ public static final String INVALID_IN = "InvalidIn"; //$NON-NLS-1$
+ public static final String IMPROPER_CASE_CONDITION = "ImproperCaseCondition"; //$NON-NLS-1$
+ public static final String UNTERMINATED_CASE_CONDITION = "UnterminatedCaseCondition"; //$NON-NLS-1$
+ public static final String UNTERMINATED_INLINE_DOCUMENT = "UnterminatedInlineDocument"; //$NON-NLS-1$
+ public static final String INCOMPLETE_INLINE_MARKER="IncompleteInlineMarker"; //$NON-NLS-1$
+ public static final String MISSING_INLINE_MARKER="MissingInlineMarker"; //$NON-NLS-1$
+ public static final String UNMATCHED_RIGHT_PARENTHESIS = "UnmatchedRightParenthesis"; //$NON-NLS-1$
+ public static final String UNMATCHED_LEFT_PARENTHESIS = "UnmatchedLeftParenthesis"; //$NON-NLS-1$
+
+ private IAutoconfErrorHandler errorHandler;
+ private IAutoconfMacroValidator macroValidator;
+ private AutoconfTokenizer tokenizer;
+ private IAutoconfMacroDetector macroDetector;
+
+ private static final String M4_BUILTINS =
+ "define undefine defn pushdef popdef indir builtin ifdef ifelse shift reverse cond " +
+ "dumpdef traceon traceoff debugmode debugfile dnl changequote changecom changeword " +
+ "m4wrap " +
+ "include sinclude divert undivert divnum len index regexp substr translit patsubst " +
+ "format incr decr eval syscmd esyscmd sysval mkstemp maketemp errprint m4exit " +
+ "__file__ __line__ __program__ ";
+
+ private static List<String> m4builtins = new ArrayList<String>();
+ static {
+ m4builtins.addAll(Arrays.asList(M4_BUILTINS.split(" ")));
+ }
+
+ /**
+ * Create a parser for autoconf-style sources.
+ * @param errorHandler
+ * @param macroDetector
+ * @param macroValidator
+ */
+ public AutoconfParser(IAutoconfErrorHandler errorHandler,
+ IAutoconfMacroDetector macroDetector,
+ IAutoconfMacroValidator macroValidator) {
+ this.errorHandler = errorHandler;
+ this.macroDetector = macroDetector;
+ this.macroValidator = macroValidator;
+ }
+
+ /**
+ * Parse the given document and produce an AutoconfElement tree
+ * @param errorHandler
+ * @param macroValidator
+ * @param document
+ * @return element tree
+ */
+ public AutoconfElement parse(IDocument document) {
+ return parse(document, true);
+ }
+
+ /**
+ * Parse the given document and produce an AutoconfElement tree,
+ * and control whether the initial quoting style is m4 style (`...')
+ * or autoconf style ([ ... ]).
+ * @param errorHandler
+ * @param macroValidator
+ * @param document
+ * @param useAutoconfQuotes
+ * @return element tree
+ */
+ public AutoconfElement parse(IDocument document, boolean useAutoconfQuotes) {
+ this.tokenizer = new AutoconfTokenizer(document, errorHandler);
+ if (useAutoconfQuotes)
+ tokenizer.setM4Quote("[", "]");
+
+ AutoconfElement root = new AutoconfRootElement();
+ Token eof = parseTopLevel(root);
+
+ root.setStartOffset(0);
+ root.setDocument(document);
+
+ setSourceEnd(root, eof);
+
+ return root;
+ }
+
+
+ static class BlockEndCondition extends Exception {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+ private Token token;
+
+ public BlockEndCondition(Token token) {
+ this.token = token;
+ }
+
+ public Token getToken() {
+ return token;
+ }
+
+ }
+
+ static class ExprEndCondition extends Exception {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+ private Token token;
+
+ public ExprEndCondition(Token token) {
+ this.token = token;
+ }
+
+ public Token getToken() {
+ return token;
+ }
+
+ }
+
+ /**
+ * Parse individual top-level nodes: divide text into macro calls
+ * and recognized shell constructs. Anything else is not accounted for.
+ * @param parent
+ * @return
+ */
+ protected Token parseTopLevel(AutoconfElement parent) {
+ while (true) {
+ try {
+ parseStatement(parent);
+ } catch (BlockEndCondition e) {
+ // don't terminate here; we may have constructs closed too early
+ Token token = tokenizer.peekToken();
+ if (token.getType() == ITokenConstants.EOF)
+ return token;
+ }
+ }
+ }
+
+ /**
+ * Parse a block of nodes, which starts with an expression and contains
+ * subnodes. Divide text into macro calls and recognized shell constructs.
+ * Anything else is not accounted for.
+ * @param parent
+ */
+ protected void parseBlock(AutoconfElement parent, Token open, AutoconfElement block) throws BlockEndCondition {
+ parent.addChild(block);
+
+ setSourceStart(block, open);
+
+ // get the expression part
+ Token token;
+ try {
+ token = parseBlockExpression(open, block);
+ } catch (BlockEndCondition e) {
+ setSourceEndBefore(block, e.getToken());
+ throw e;
+ }
+
+ // parse the block proper
+ if (token.getType() != ITokenConstants.EOF) {
+ while (true) {
+ try {
+ parseStatement(block);
+ } catch (BlockEndCondition e) {
+ setSourceEnd(block, e.getToken());
+ return;
+ }
+ }
+ } else {
+ setSourceEnd(block, token);
+ }
+ }
+
+ private Token parseBlockExpression(Token open, AutoconfElement block) throws BlockEndCondition {
+ Token token;
+ try {
+ if (block instanceof AutoconfIfElement
+ || block instanceof AutoconfElifElement
+ || block instanceof AutoconfCaseElement
+ || block instanceof AutoconfWhileElement) {
+ token = parseExpression(block);
+ } else if (block instanceof AutoconfForElement) {
+ token = parseForExpression(block);
+ } else {
+ // no expression
+ return open;
+ }
+ block.setVar(getTokenSpanTextBetween(open, token));
+ } catch (BlockEndCondition e) {
+ // oops, premature end
+ setSourceEnd(block, e.getToken());
+ throw e;
+ }
+
+ // check for expected token
+ while (true) {
+ token = tokenizer.readToken();
+ if (token.getType() == ITokenConstants.EOF)
+ break;
+ if (token.getType() != ITokenConstants.EOL)
+ break;
+ }
+
+ if (token.getType() == ITokenConstants.SH_DO) {
+ checkBlockValidity(block, token,
+ new Class[] { AutoconfForElement.class, AutoconfWhileElement.class },
+ INVALID_DO);
+ }
+ else if (token.getType() == ITokenConstants.SH_THEN) {
+ checkBlockValidity(block, token,
+ new Class[] { AutoconfIfElement.class, AutoconfElifElement.class },
+ INVALID_THEN);
+ }
+ else {
+ String exp;
+ if (block instanceof AutoconfIfElement || block instanceof AutoconfElifElement)
+ exp = "then";
+ else
+ exp = "do";
+
+ handleError(block, token, AutoconfEditorMessages.getFormattedString(MISSING_SPECIFIER, exp));
+
+ // assume we're still in the block...
+ tokenizer.unreadToken(token);
+ }
+ return token;
+ }
+
+ /**
+ * Parse a case statement. Scoop up statements into case conditional blocks.
+ * <pre>
+ * 'case' EXPR 'in'
+ * { EXPR ')' { STMTS } ';;' }
+ * 'esac'
+ * </pre>
+ * @param parent
+ * @return
+ */
+ protected void parseCaseBlock(AutoconfElement parent, Token open, AutoconfElement block) throws BlockEndCondition {
+ parent.addChild(block);
+
+ setSourceStart(block, open);
+
+ // get the case expression, terminating at 'in'
+ Token token;
+ try {
+ token = parseCaseExpression(block);
+ } catch (BlockEndCondition e) {
+ // oops, premature end
+ setSourceEnd(block, e.getToken());
+ throw e;
+ }
+
+ block.setVar(getTokenSpanTextBetween(open, token));
+
+ // now get the statements, which are themselves blocks... just read statements
+ // that terminate with ';;' and stuff those into blocks.
+
+ while (true) {
+ AutoconfCaseConditionElement condition = new AutoconfCaseConditionElement();
+
+ // skip EOLs and get the first "real" token
+ while (true) {
+ token = tokenizer.readToken();
+ setSourceStart(condition, token);
+ if (token.getType() == ITokenConstants.EOF)
+ break;
+ if (token.getType() == ITokenConstants.EOL)
+ continue;
+ break;
+ }
+
+ if (token.getType() == ITokenConstants.SH_ESAC) {
+ break;
+ }
+
+ try {
+ Token start = token;
+ token = parseCaseExpression(condition);
+ condition.setName(getTokenSpanTextFromUpTo(start, token));
+
+ while (true) {
+ parseStatement(condition);
+ }
+ } catch (BlockEndCondition e) {
+ setSourceEnd(condition, e.getToken());
+
+ if (condition.getSource().length() > 0)
+ block.addChild(condition);
+
+ if (e.getToken().getType() != ITokenConstants.SH_CASE_CONDITION_END) {
+ token = e.getToken();
+ break;
+ }
+ }
+ }
+
+ setSourceEnd(block, token);
+
+ if (token.getType() != ITokenConstants.SH_ESAC) {
+ handleError(parent, token, AutoconfEditorMessages.getFormattedString(UNTERMINATED_CONSTRUCT, block.getName()));
+ }
+ }
+
+ private String getTokenSpanTextBetween(Token open, Token close) {
+ int startOffset = open.getOffset() + open.getLength();
+ int endOffset = close.getOffset();
+ if (open.getDocument() != close.getDocument())
+ return open.getText();
+
+ String text;
+ try {
+ text = open.getDocument().get(startOffset, endOffset - startOffset).trim();
+ } catch (BadLocationException e) {
+ text = open.getText();
+ // TODO: error
+ }
+
+ return text;
+ }
+
+ private String getTokenSpanTextFromUpTo(Token open, Token close) {
+ int startOffset = open.getOffset();
+ int endOffset = close.getOffset();
+ if (open.getDocument() != close.getDocument())
+ return open.getText();
+
+ String text;
+ try {
+ text = open.getDocument().get(startOffset, endOffset - startOffset).trim();
+ } catch (BadLocationException e) {
+ text = open.getText();
+ // TODO: error
+ }
+
+ return text;
+ }
+ private void setSourceStart(AutoconfElement block, Token open) {
+ int offset = open.getOffset();
+ block.setDocument(open.getDocument());
+ block.setStartOffset(offset);
+ }
+
+ private void setSourceEnd(AutoconfElement block, Token close) {
+ int offset = close.getOffset() + close.getLength();
+ if (block.getDocument() != null && block.getDocument() != close.getDocument())
+ throw new IllegalStateException();
+ block.setDocument(close.getDocument());
+ block.setEndOffset(offset);
+ }
+
+ private void setSourceEndBefore(AutoconfElement block, Token close) {
+ int offset = close.getOffset();
+ if (block.getDocument() != null && block.getDocument() != close.getDocument())
+ throw new IllegalStateException();
+ block.setDocument(close.getDocument());
+ block.setEndOffset(offset);
+ }
+
+ /**
+ * Parse a single statement (macro call or a shell construct).
+ * This can recursively invoke parseBlock() or parseStatement() to populate the tree.
+ * Whenever a token terminates a block, we check its validity and then throw BlockEndCondition.
+ * @param parent the parent into which to add statements. The type of this element is used
+ * to validate the legality of block closing tokens.
+ */
+ protected void parseStatement(AutoconfElement parent) throws BlockEndCondition {
+
+ boolean atStart = true;
+
+ while (true) {
+ Token token = tokenizer.readToken();
+
+ switch (token.getType()) {
+ // 0. Check EOF
+ case ITokenConstants.EOF:
+ AutoconfElement element = parent;
+ while (element != null && !(element instanceof AutoconfRootElement)) {
+ handleError(element, token, AutoconfEditorMessages.getFormattedString(UNTERMINATED_CONSTRUCT, element.getName()));
+ element = element.getParent();
+ }
+ throw new BlockEndCondition(token);
+
+
+ // 1. Check for end of statement
+ case ITokenConstants.EOL:
+ case ITokenConstants.SEMI:
+ return;
+
+
+ // 2. Check macro expansions
+ case ITokenConstants.WORD:
+ checkMacro(parent, token);
+ atStart = false;
+ break;
+
+ // Check for shell constructs. These should appear at the start of a line
+ // or after a semicolon. If they don't, just report an error and continue,
+ // to be tolerant of our own lax parsing.
+
+ // 3.a) Check dollar variables
+ case ITokenConstants.SH_DOLLAR:
+ // skip the next token
+ atStart = false;
+ token = tokenizer.readToken();
+ continue;
+
+ // 3.b) Look for if/else/elif/fi constructs,
+ // being tolerant of nesting problems by allowing
+ // stranded else/elif nodes but reporting errors.
+ case ITokenConstants.SH_IF:
+ checkLineStart(parent, token, atStart);
+ parseBlock(parent, token, new AutoconfIfElement());
+ break;
+
+ case ITokenConstants.SH_ELIF:
+ checkLineStart(parent, token, atStart);
+ checkBlockValidity(
+ parent, token,
+ new Class[] { AutoconfIfElement.class, AutoconfElifElement.class },
+ INVALID_ELIF);
+ parseBlock(parent, token, new AutoconfElifElement());
+ token = tokenizer.peekToken();
+ throw new BlockEndCondition(token);
+
+ case ITokenConstants.SH_ELSE:
+ checkLineStart(parent, token, atStart);
+ checkBlockValidity(
+ parent, token,
+ new Class[] { AutoconfIfElement.class, AutoconfElifElement.class },
+ INVALID_ELSE);
+ parseBlock(parent, token, new AutoconfElseElement());
+ token = tokenizer.peekToken();
+ throw new BlockEndCondition(token);
+
+ case ITokenConstants.SH_FI:
+ checkLineStart(parent, token, atStart);
+ checkBlockValidity(
+ parent, token,
+ new Class[] { AutoconfIfElement.class, AutoconfElifElement.class, AutoconfElseElement.class },
+ INVALID_FI);
+ throw new BlockEndCondition(token);
+
+
+ // 4. Look for for/while loops
+ case ITokenConstants.SH_FOR:
+ checkLineStart(parent, token, atStart);
+ parseBlock(parent, token, new AutoconfForElement());
+ break;
+
+ case ITokenConstants.SH_WHILE:
+ checkLineStart(parent, token, atStart);
+ parseBlock(parent, token, new AutoconfWhileElement());
+ break;
+
+ case ITokenConstants.SH_UNTIL:
+ checkLineStart(parent, token, atStart);
+ parseBlock(parent, token, new AutoconfUntilElement());
+ break;
+
+ case ITokenConstants.SH_SELECT:
+ checkLineStart(parent, token, atStart);
+ parseBlock(parent, token, new AutoconfSelectElement());
+ break;
+
+ case ITokenConstants.SH_DONE:
+ checkLineStart(parent, token, atStart);
+ checkBlockValidity(
+ parent, token,
+ new Class[] { AutoconfForElement.class, AutoconfWhileElement.class,
+ AutoconfUntilElement.class, AutoconfSelectElement.class },
+ INVALID_DONE);
+ throw new BlockEndCondition(token);
+
+ // 5. Look for case statements
+ case ITokenConstants.SH_CASE:
+ checkLineStart(parent, token, atStart);
+ parseCaseBlock(parent, token, new AutoconfCaseElement());
+ break;
+
+ case ITokenConstants.SH_CASE_CONDITION_END:
+ checkBlockValidity(
+ parent, token,
+ new Class[] { AutoconfCaseConditionElement.class },
+ IMPROPER_CASE_CONDITION);
+ throw new BlockEndCondition(token);
+
+ case ITokenConstants.SH_ESAC:
+ checkLineStart(parent, token, atStart);
+ checkBlockValidity(
+ parent, token,
+ // note: we don't strictly recurse here, so accept either parent
+ new Class[] { AutoconfCaseElement.class, AutoconfCaseConditionElement.class },
+ INVALID_ESAC);
+ throw new BlockEndCondition(token);
+
+
+ // 6. Check for HERE documents
+ case ITokenConstants.SH_HERE:
+ case ITokenConstants.SH_HERE_DASH:
+
+ parseHERE(parent, token);
+ break;
+ }
+ }
+ }
+
+ private void checkLineStart(AutoconfElement parent, Token token, boolean atStart) {
+ if (!atStart) {
+ handleError(parent, token, AutoconfEditorMessages.getFormattedString(INVALID_TERMINATION, token.getText()));
+ }
+ }
+
+ /**
+ * Parse the Here document, whose control token is provided (SH_HERE or SH_HERE_DASH).
+ * Contents are thrown away except for any macro calls.
+ * @param parent
+ * @param controlToken
+ */
+ private void parseHERE(AutoconfElement parent, Token controlToken) {
+ Token token = tokenizer.readToken();
+ if (token.getType() == ITokenConstants.EOL || token.getType() == ITokenConstants.EOF) {
+ handleError(parent, token,
+ AutoconfEditorMessages.getString(INCOMPLETE_INLINE_MARKER));
+
+ } else {
+ String hereTag = token.getText();
+
+ boolean atEOL = false;
+ while (true) {
+ token = tokenizer.readToken();
+ if (token.getType() == ITokenConstants.EOF) {
+ handleError(parent, token, AutoconfEditorMessages.getFormattedString(UNTERMINATED_CONSTRUCT, parent.getName()));
+ break;
+ } else if (token.getType() == ITokenConstants.EOL) {
+ atEOL = true;
+ } else {
+ if (atEOL && token.getText().equals(hereTag)) {
+ // only the end if it is also followed by EOL without any whitespace
+ Token eol = tokenizer.readToken();
+ if (eol.getType() == ITokenConstants.EOL && eol.getOffset() == token.getOffset() + token.getLength()) {
+ break;
+ }
+ }
+ if (token.getType() == ITokenConstants.WORD) {
+ checkMacro(parent, token);
+ }
+ atEOL = false;
+ }
+ }
+ }
+ }
+
+ /**
+ * Parse through a single expression up to a semicolon or newline.
+ * Add a macro call to the element or just return upon finding the desired token.
+ * Whenever a token terminates the expression, we check its validity and return the final token
+ * Throw {@link BlockEndCondition} if an unexpected token was found.
+ * @param parent the parent into which to add statements. The type of this element is used
+ * to validate the legality of block closing tokens.
+ */
+ protected Token parseExpression(AutoconfElement parent) throws BlockEndCondition {
+
+ while (true) {
+ Token token = tokenizer.readToken();
+
+ // 0. Ignore comments (tokenizer skipped them!)
+
+ switch (token.getType()) {
+ // 1. Check EOF
+ case ITokenConstants.EOF:
+ throw new BlockEndCondition(token);
+
+ // 2. Check macro expansions
+ case ITokenConstants.WORD:
+ token = checkMacro(parent, token);
+ break;
+
+ // 3. Check expression terminators
+ case ITokenConstants.SEMI:
+ case ITokenConstants.EOL:
+ return token;
+
+ // 4. Handle variables
+ case ITokenConstants.SH_DOLLAR:
+ token = tokenizer.readToken();
+ break;
+
+ case ITokenConstants.SH_IN:
+ // in 'for' or 'select, an 'in' may occur before 'do'
+ if (!(parent instanceof AutoconfForElement)
+ && !(parent instanceof AutoconfSelectElement))
+ return token;
+ // fall through
+
+ // 5. Abort on unexpected tokens
+ case ITokenConstants.SH_DO:
+ case ITokenConstants.SH_THEN:
+ handleError(parent, token, AutoconfEditorMessages.getFormattedString(INVALID_SPECIFIER, token.getText()));
+ tokenizer.unreadToken(token);
+ // close enough...
+ return token;
+
+ case ITokenConstants.SH_ESAC:
+ case ITokenConstants.SH_CASE:
+ case ITokenConstants.SH_CASE_CONDITION_END:
+ case ITokenConstants.SH_FOR:
+ case ITokenConstants.SH_IF:
+ case ITokenConstants.SH_ELIF:
+ case ITokenConstants.SH_ELSE:
+ case ITokenConstants.SH_FI:
+ case ITokenConstants.SH_DONE:
+ handleError(parent, token, AutoconfEditorMessages.getFormattedString(UNTERMINATED_CONSTRUCT, parent.getName()));
+ tokenizer.unreadToken(token);
+ throw new BlockEndCondition(token);
+ }
+ }
+ }
+
+ /**
+ * Parse through a single expression up to 'do'.
+ * Add a macro call to the element or just return upon finding the desired token.
+ * Whenever a token terminates the expression, we check its validity and then throw ExprEndCondition.
+ * Throw {@link BlockEndCondition} if an unexpected token was found.
+ * @param parent the parent into which to add statements. The type of this element is used
+ * to validate the legality of block closing tokens.
+ */
+ protected Token parseForExpression(AutoconfElement parent) throws BlockEndCondition {
+ while (true) {
+ Token token = tokenizer.readToken();
+
+ // 0. Ignore comments (tokenizer skipped them!)
+
+ // 1. Check EOF
+ if (token.getType() == ITokenConstants.EOF) {
+ throw new BlockEndCondition(token);
+ }
+
+ // 2. Check macro expansions
+ else if (token.getType() == ITokenConstants.WORD) {
+ token = checkMacro(parent, token);
+ }
+
+ // 3. Check expression terminators -- not ';' here, but 'do'
+ else if (token.getType() == ITokenConstants.SH_DO) {
+ tokenizer.unreadToken(token);
+ return tokenizer.peekToken();
+ }
+
+ // 4. Abort on unexpected tokens
+ else switch (token.getType()) {
+ case ITokenConstants.SH_THEN:
+ handleError(parent, token, AutoconfEditorMessages.getFormattedString(INVALID_SPECIFIER, token.getText()));
+ tokenizer.unreadToken(token);
+ // close enough...
+ //throw new ExprEndCondition(token);
+ return token;
+
+ case ITokenConstants.SH_ESAC:
+ case ITokenConstants.SH_CASE:
+ case ITokenConstants.SH_CASE_CONDITION_END:
+ case ITokenConstants.SH_FOR:
+ case ITokenConstants.SH_IF:
+ case ITokenConstants.SH_ELIF:
+ case ITokenConstants.SH_ELSE:
+ case ITokenConstants.SH_FI:
+ case ITokenConstants.SH_DONE:
+ handleError(parent, token, AutoconfEditorMessages.getFormattedString(UNTERMINATED_CONSTRUCT, parent.getName()));
+ tokenizer.unreadToken(token);
+ throw new BlockEndCondition(token);
+ }
+ }
+ }
+
+ /**
+ * Parse through a single expression up to 'in'.
+ * Add a macro call to the element or just return upon finding the desired token.
+ * Whenever a token terminates the expression, we check its validity and then throw ExprEndCondition.
+ * Throw {@link BlockEndCondition} if an unexpected token was found.
+ * @param parent the parent into which to add statements. The type of this element is used
+ * to validate the legality of block closing tokens.
+ */
+ protected Token parseCaseExpression(AutoconfElement parent) throws BlockEndCondition {
+ while (true) {
+ Token token = tokenizer.readToken();
+
+ // 0. Ignore comments (tokenizer skipped them!)
+
+ // 1. Check EOF
+ if (token.getType() == ITokenConstants.EOF) {
+ throw new BlockEndCondition(token);
+ }
+
+ // 2. Check macro expansions
+ else if (token.getType() == ITokenConstants.WORD) {
+ token = checkMacro(parent, token);
+ }
+
+ // 3. Check expression terminators
+ else if (parent instanceof AutoconfCaseElement && token.getType() == ITokenConstants.SH_IN) {
+ return token;
+ }
+ else if (parent instanceof AutoconfCaseConditionElement && token.getType() == ITokenConstants.RPAREN) {
+ return token;
+ }
+
+ // 4. Abort on unexpected tokens
+ else switch (token.getType()) {
+ case ITokenConstants.SEMI:
+ case ITokenConstants.SH_IN:
+ case ITokenConstants.RPAREN:
+ case ITokenConstants.SH_DO:
+ case ITokenConstants.SH_THEN:
+ if (parent instanceof AutoconfCaseElement)
+ handleError(parent, token, AutoconfEditorMessages.getString(INVALID_IN));
+ else
+ handleError(parent, token, AutoconfEditorMessages.getString(IMPROPER_CASE_CONDITION));
+ // close enough...
+ return token;
+
+ case ITokenConstants.SH_ESAC:
+ case ITokenConstants.SH_CASE:
+ case ITokenConstants.SH_CASE_CONDITION_END:
+ case ITokenConstants.SH_FOR:
+ case ITokenConstants.SH_IF:
+ case ITokenConstants.SH_ELIF:
+ case ITokenConstants.SH_ELSE:
+ case ITokenConstants.SH_FI:
+ case ITokenConstants.SH_DONE:
+ handleError(parent, token, AutoconfEditorMessages.getFormattedString(UNTERMINATED_CONSTRUCT, parent.getName()));
+ tokenizer.unreadToken(token);
+ throw new BlockEndCondition(token);
+ }
+ }
+ }
+
+ /**
+ * Check a given close block token against the current parent by checking that
+ * the parent's class is one of classes, If a match happens,
+ * optionally push back the token if it will be used to parse new statements in the parent.
+ * Report an error if the parent is not one of the expected kinds.
+ * @param parent
+ * @param token
+ * @param classes
+ */
+ private void checkBlockValidity(
+ AutoconfElement parent,
+ Token token,
+ Class<?>[] classes,
+ String errorMessage) {
+ for (int i = 0; i < classes.length; i++) {
+ if (classes[i].isInstance(parent)) {
+ return;
+ }
+ }
+
+ // not a match
+ handleError(parent, token,
+ AutoconfEditorMessages.getFormattedString(errorMessage, parent.getName(), token.getText()));
+ }
+
+ /**
+ * Check whether the given token is part of a macro, and parse it as such
+ * if necessary.
+ * @param parent
+ * @param token
+ * @return Token last read for the macro call
+ */
+ private Token checkMacro(AutoconfElement parent, Token token) {
+ String name = token.getText();
+
+ boolean hasArguments = tokenizer.peekToken().getType() == ITokenConstants.LPAREN;
+ if (macroDetector != null && macroDetector.isMacroIdentifier(name)) {
+ // ok
+ } else if (m4builtins.contains(name)) {
+ // all of these except dnl take arguments
+ if (!name.equals("dnl") && !hasArguments)
+ return token;
+ } else {
+ return token;
+ }
+
+ AutoconfMacroElement macro = new AutoconfMacroElement(name);
+ token = parseMacro(macro, token);
+
+ // handle special macros here
+ if ("dnl".equals(name)) {
+ // consume to EOL
+ while (true) {
+ token = tokenizer.readToken();
+ if (token.getType() == ITokenConstants.EOF || token.getType() == ITokenConstants.EOL)
+ break;
+ }
+
+ // ignore macro entirely
+ macro = null;
+ } else if ("changequote".equals(name)) {
+ // change quote delimiters
+ validateMacroParameterCount(macro, token, 2);
+
+ // GNU behavior for invalid argument count
+ String parm0 = "`";
+ String parm1 = "'";
+ if (macro.getParameterCount() >= 1)
+ parm0 = macro.getParameter(0);
+ if (macro.getParameterCount() >= 2)
+ parm1 = macro.getParameter(1);
+
+ tokenizer.setM4Quote(parm0, parm1);
+ } else if ("changecom".equals(name)) {
+ // change comment delimiters
+ validateMacroParameterCount(macro, token, 2);
+
+ // GNU behavior for invalid argument count
+ String parm0 = "#";
+ String parm1 = "\n";
+ if (macro.getParameterCount() >= 1)
+ parm0 = macro.getParameter(0);
+ if (macro.getParameterCount() >= 2)
+ parm1 = macro.getParameter(1);
+
+ tokenizer.setM4Comment(parm0, parm1);
+ }
+
+ if (macro != null) {
+ parent.addChild(macro);
+ }
+
+ // now validate that the macro is properly terminated
+ if (!(parent instanceof AutoconfMacroArgumentElement)
+ && !(parent instanceof AutoconfMacroElement)
+ && !(parent instanceof AutoconfForElement)) {
+ Token peek = tokenizer.peekToken();
+ if (peek.getType() == ITokenConstants.RPAREN) {
+ handleError(macro, peek, AutoconfEditorMessages.getString(UNMATCHED_RIGHT_PARENTHESIS));
+ }
+ }
+
+ return token;
+ }
+
+ private void validateMacroParameterCount(AutoconfMacroElement macro, Token token, int count) {
+ if (macro.getParameterCount() < count) {
+ handleError(macro, token, AutoconfEditorMessages.getFormattedString("M4MacroArgsTooFew", macro.getName(), new Integer(2)));
+ } else if (macro.getParameterCount() > count) {
+ handleError(macro, token, AutoconfEditorMessages.getFormattedString("M4MacroArgsTooMany", macro.getName(), new Integer(2)));
+ }
+ }
+
+ /**
+ * Start parsing a macro call at a suspected macro expansion location.
+ * @param macro
+ * @param line the line containing the start of the
+ * @param parent
+ * @return last token parsed
+ */
+ protected Token parseMacro(AutoconfMacroElement macro, Token macroName) {
+ setSourceStart(macro, macroName);
+
+ // parse any arguments
+ tokenizer.setM4Context(true);
+
+ Token token = tokenizer.readToken();
+ if (token.getType() == ITokenConstants.LPAREN) {
+ token = parseMacroArguments(macro, token);
+ setSourceEnd(macro, token);
+ } else {
+ tokenizer.unreadToken(token);
+ setSourceEnd(macro, macroName);
+ }
+
+ tokenizer.setM4Context(false);
+
+ // validate macro arguments?
+ if (macroValidator != null) {
+ try {
+ macroValidator.validateMacroCall(macro);
+ } catch (ParseException e) {
+ errorHandler.handleError(e);
+ }
+ }
+
+ return token;
+ }
+
+ /**
+ * Parse the arguments for the given macro. These are not interpreted as shell
+ * constructs but just as text with possibly more macro expansions inside.
+ * @param macro
+ * @return final token (')')
+ */
+ protected Token parseMacroArguments(AutoconfMacroElement macro, Token lparen) {
+ Token argStart = null;
+ Token argEnd = null;
+ Token token;
+
+ // When parsing, we want to ignore the whitespace around the arguments.
+ // So, instead of taking the source range "between" a parenthesis and a comma,
+ // track the exact tokens forming the start and end of an argument, defaulting
+ // to the borders of the parentheses and commas if no text is included.
+
+ StringBuffer argBuffer = new StringBuffer();
+ AutoconfMacroArgumentElement arg = new AutoconfMacroArgumentElement();
+
+ while (true) {
+ token = tokenizer.readToken();
+
+ if (token.getType() == ITokenConstants.EOL) {
+ if (argBuffer.length() > 0)
+ argBuffer.append(token.getText());
+ continue;
+ }
+
+ if (token.getType() == ITokenConstants.COMMA
+ || token.getType() == ITokenConstants.RPAREN
+ || token.getType() == ITokenConstants.EOF) {
+
+ arg.setName(argBuffer.toString());
+ argBuffer.setLength(0);
+
+ if (argStart != null && argEnd != null) {
+ setSourceStart(arg, argStart);
+ setSourceEnd(arg, argEnd);
+ } else if (argEnd != null) {
+ setSourceStart(arg, argStart);
+ setSourceEndBefore(arg, token);
+ } else {
+ // empty argument
+ setSourceStart(arg, token);
+ setSourceEndBefore(arg, token);
+ }
+
+ macro.addChild(arg);
+
+ if (token.getType() != ITokenConstants.COMMA)
+ break;
+
+ argStart = null;
+ argEnd = null;
+
+ arg = new AutoconfMacroArgumentElement();
+
+ } else {
+ if (argStart == null) {
+ argStart = token;
+ }
+ argEnd = token;
+
+ if (argBuffer.length() > 0 && token.followsSpace())
+ argBuffer.append(' ');
+ argBuffer.append(token.getText());
+
+ // handle nested macro calls in arguments
+ if (token.getType() == ITokenConstants.WORD) {
+ argEnd = checkMacro(arg, token);
+ }
+ }
+ }
+
+ if (token.getType() != ITokenConstants.RPAREN) {
+ handleError(macro, token, AutoconfEditorMessages.getString(UNMATCHED_LEFT_PARENTHESIS));
+ }
+
+ // note: moved 15-char truncation to AutoconfLabelProvider
+ AutoconfElement[] children = macro.getChildren();
+ if (children.length > 0)
+ macro.setVar(children[0].getVar());
+
+ return token;
+ }
+
+
+
+ protected void handleError(AutoconfElement element, Token token, String message) {
+ handleMessage(element, token, message, IMarker.SEVERITY_ERROR);
+ }
+ protected void handleWarning(AutoconfElement element, Token token, String message) {
+ handleMessage(element, token, message, IMarker.SEVERITY_WARNING);
+ }
+ protected void handleMessage(AutoconfElement element, Token token, String message, int severity) {
+ if (errorHandler != null) {
+ int lineNumber = 0;
+ int startColumn = 0;
+ int endColumn = 0;
+ try {
+ lineNumber = token.getDocument().getLineOfOffset(token.getOffset());
+ int lineOffs = token.getDocument().getLineOffset(lineNumber);
+ startColumn = token.getOffset() - lineOffs;
+ endColumn = startColumn + token.getLength();
+ } catch (BadLocationException e) {
+ // Don't care if we blow up trying to issue marker
+ }
+ errorHandler.handleError(new ParseException(
+ message,
+ token.getOffset(),
+ token.getOffset() + token.getLength(),
+ lineNumber,
+ startColumn, endColumn,
+ severity));
+ }
+ }
+
+ public IAutoconfErrorHandler getErrorHandler() {
+ return errorHandler;
+ }
+}
+
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfRootElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfRootElement.java
new file mode 100644
index 0000000000..105d00b88d
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfRootElement.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+public class AutoconfRootElement extends AutoconfElement {
+
+ public AutoconfRootElement() {
+ super(""); //$NON-NLS-1$
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfSelectElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfSelectElement.java
new file mode 100644
index 0000000000..aded97c871
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfSelectElement.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+public class AutoconfSelectElement extends AutoconfElement {
+
+ public AutoconfSelectElement() {
+ super("select");
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfTokenizer.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfTokenizer.java
new file mode 100644
index 0000000000..a34cbb2448
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfTokenizer.java
@@ -0,0 +1,434 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+
+
+/**
+ * This tokenizer traverses autotools-style text (m4 or configure.ac) to support the
+ * autoconf parser. It tracks the current context (m4 macro call or shell commands)
+ * to detect appropriate tokens, and tracks the m4 current quote style as well.
+ * <p>
+ * In m4 mode, its primary purpose is to find word boundaries, detect comments and quoted
+ * strings, and to find the macro punctuation tokens. It will not interpret anything
+ * (e.g. '$1' inside a macro) -- this is up to the parser.
+ * <p>
+ * In shell script mode, its primary purpose is to identify enough
+ * tokens to get a general picture of the structure of source for use by the autoconf
+ * parser. This isn't intended to be used for full shell script parsing. In fact,
+ * aside from the known tokens and identifiers, only individual characters will be returned.
+ * <p>
+ * Both modes know about "words" or identifiers and use the same syntax to detect these.
+ * It's expected that the parser will detect a word as a macro or possible macro and
+ * switch the mode of the tokenizer to fit. The parser should invoke "setM4Context(...)"
+ * (and "unreadToken" if necessary) to switch modes.
+ * @author eswartz
+ *
+ */
+public class AutoconfTokenizer {
+
+ private static final String UNTERMINATED_STRING = "UnterminatedString"; //$NON-NLS-1$
+ public static final String UNMATCHED_RIGHT_QUOTE = "UnmatchedRightQuote"; //$NON-NLS-1$
+ public static final String UNMATCHED_LEFT_QUOTE = "UnmatchedLeftQuote"; //$NON-NLS-1$
+ public static final String UNMATCHED_CLOSE_COMMENT = "UnmatchedCloseComment"; //$NON-NLS-1$
+
+ private IDocument document;
+ private int offset;
+ private String m4OpenQuote;
+ private String m4CloseQuote;
+ private String m4OpenComment;
+ private String m4CloseComment;
+ private char[] chars;
+ private int startOffset;
+ private boolean isM4Context;
+ private Token eofToken;
+ private IAutoconfErrorHandler errorHandler;
+
+ /** Create a tokenizer for a document. */
+ public AutoconfTokenizer(IDocument document, IAutoconfErrorHandler errorHandler) {
+ if (document == null /* || macroDetector == null*/)
+ throw new IllegalArgumentException();
+ this.document = document;
+ this.errorHandler = errorHandler;
+
+ this.chars = document.get().toCharArray();
+ this.offset = 0;
+
+ this.eofToken = new Token(ITokenConstants.EOF, "", document, chars.length, 0);
+
+ this.m4OpenQuote = "`";
+ this.m4CloseQuote = "'";
+ this.m4OpenComment = "#";
+ this.m4CloseComment = "\n";
+ }
+
+ /**
+ * Tell whether the tokenizer considers itself to be in an m4 context.
+ * This determines what kinds of tokens it returns.
+ * @return
+ */
+ public boolean isM4Context() {
+ return isM4Context;
+ }
+
+ /**
+ * Switch the tokenizer into or out of m4 context.
+ * @return
+ */
+ public void setM4Context(boolean flag) {
+ isM4Context = flag;
+ }
+
+ /**
+ * Set the m4 quote delimiters
+ */
+ public void setM4Quote(String open, String close) {
+ this.m4OpenQuote = open;
+ this.m4CloseQuote = close;
+ }
+
+ /**
+ * Set the m4 comment delimiters
+ */
+ public void setM4Comment(String open, String close) {
+ this.m4OpenComment = open;
+ this.m4CloseComment = close;
+ }
+
+ /** Push back the given token. This allows the tokenizer to restart from its start position,
+ * potentially in a different context. */
+ public void unreadToken(Token token) {
+ if (token.getLength() > 0 && offset == token.getOffset())
+ throw new IllegalStateException();
+ offset = token.getOffset();
+ }
+
+ /** Read the next token. Returns an EOF token at EOF. */
+ public Token readToken() {
+ if (offset >= chars.length)
+ return eofToken;
+
+ char ch = chars[offset];
+
+ // skip whitespace (but not EOL)
+ while (isWhitespace(ch)) {
+ offset++;
+ if (offset >= chars.length)
+ return eofToken;
+ ch = chars[offset];
+ }
+
+ // in shell mode, strip comments up to eol
+ if (!isM4Context && ch == '#') {
+ while (offset < chars.length) {
+ ch = chars[offset];
+ if (ch == '\n')
+ break;
+ offset++;
+ }
+
+ // keep inside doc if we didn't find that EOL
+ if (offset >= chars.length)
+ offset--;
+ }
+
+ startOffset = offset;
+ StringBuffer buffer = new StringBuffer();
+
+ // check EOL
+ if (ch == '\r' || ch == '\n') {
+ buffer.append(ch);
+ offset++;
+ if (ch == '\r' && offset < chars.length && chars[offset] == '\n') {
+ buffer.append(chars[offset++]);
+ }
+ return makeToken(ITokenConstants.EOL, buffer.toString());
+ }
+
+ // TODO: this parser always uses fixed logic for identifier reading, ignoring m4's "changeword"
+ if (isLeadIdentifierChar(ch)) {
+ return parseWord(ch);
+ }
+
+ // check comments and quotes
+ if (isM4Context) {
+ if (lookAhead(m4OpenComment)) {
+ boolean found = false;
+ // keep reading until the close comment (these are NOT nested)
+ while (offset < chars.length) {
+ if (lookAhead(m4CloseComment)) {
+ found = true;
+ break;
+ }
+ offset++;
+ }
+ if (!found) {
+ handleError(startOffset, offset, AutoconfEditorMessages.getFormattedString(UNMATCHED_CLOSE_COMMENT,
+ m4CloseComment.equals("\n") ? "newline" : m4CloseComment)); //$NON-NLS-1$
+ }
+ return makeToken(ITokenConstants.M4_COMMENT);
+ }
+
+ if (lookAhead(m4OpenQuote)) {
+ return parseQuote();
+ }
+ }
+
+ // check shell punctuation
+ if (!isM4Context) {
+ if (ch == ';' && offset + 1 < chars.length && chars[offset + 1] == ';') {
+ offset += 2;
+ return makeToken(ITokenConstants.SH_CASE_CONDITION_END);
+ }
+ if (ch == '<' && offset + 1 < chars.length && chars[offset + 1] == '<') {
+ offset += 2;
+ if (offset < chars.length && chars[offset] == '-') {
+ offset++;
+ return makeToken(ITokenConstants.SH_HERE_DASH);
+ } else {
+ return makeToken(ITokenConstants.SH_HERE);
+ }
+ }
+ switch (ch) {
+ case '$':
+ offset++;
+ return makeToken(ITokenConstants.SH_DOLLAR);
+ case '[':
+ offset++;
+ return makeToken(ITokenConstants.SH_LBRACKET);
+ case ']':
+ offset++;
+ return makeToken(ITokenConstants.SH_RBRACKET);
+ case '{':
+ offset++;
+ return makeToken(ITokenConstants.SH_LBRACE);
+ case '}':
+ offset++;
+ return makeToken(ITokenConstants.SH_RBRACE);
+ case '\'':
+ return parseString(ITokenConstants.SH_STRING_SINGLE, ch);
+ case '\"':
+ return parseString(ITokenConstants.SH_STRING_DOUBLE, ch);
+ case '`':
+ return parseString(ITokenConstants.SH_STRING_BACKTICK, ch);
+ }
+ }
+
+ // check common punctuation
+ if (ch == ';') {
+ offset++;
+ return makeToken(ITokenConstants.SEMI);
+ }
+ if (ch == ',') {
+ offset++;
+ return makeToken(ITokenConstants.COMMA);
+ }
+ if (ch == '(') {
+ offset++;
+ return makeToken(ITokenConstants.LPAREN);
+ }
+ if (ch == ')') {
+ offset++;
+ return makeToken(ITokenConstants.RPAREN);
+ }
+
+ // unknown text
+ offset++;
+ return makeToken(ITokenConstants.TEXT);
+ }
+
+ private Token parseWord(char ch) {
+ StringBuffer buffer = new StringBuffer();
+
+ buffer.append(ch);
+ offset++;
+ do {
+ if (offset >= chars.length)
+ break;
+ ch = chars[offset];
+ if (!isIdentifierChar(ch))
+ break;
+ buffer.append(ch);
+ offset++;
+ } while (true);
+
+ String text = buffer.toString();
+
+ if (!isM4Context) {
+ // detect sh tokens
+ if ("case".equals(text))
+ return makeToken(ITokenConstants.SH_CASE, text);
+ if ("in".equals(text))
+ return makeToken(ITokenConstants.SH_IN, text);
+ if ("esac".equals(text))
+ return makeToken(ITokenConstants.SH_ESAC, text);
+ if ("while".equals(text))
+ return makeToken(ITokenConstants.SH_WHILE, text);
+ if ("select".equals(text))
+ return makeToken(ITokenConstants.SH_SELECT, text);
+ if ("until".equals(text))
+ return makeToken(ITokenConstants.SH_UNTIL, text);
+ if ("for".equals(text))
+ return makeToken(ITokenConstants.SH_FOR, text);
+ if ("do".equals(text))
+ return makeToken(ITokenConstants.SH_DO, text);
+ if ("done".equals(text))
+ return makeToken(ITokenConstants.SH_DONE, text);
+ if ("if".equals(text))
+ return makeToken(ITokenConstants.SH_IF, text);
+ if ("then".equals(text))
+ return makeToken(ITokenConstants.SH_THEN, text);
+ if ("else".equals(text))
+ return makeToken(ITokenConstants.SH_ELSE, text);
+ if ("elif".equals(text))
+ return makeToken(ITokenConstants.SH_ELIF, text);
+ if ("fi".equals(text))
+ return makeToken(ITokenConstants.SH_FI, text);
+ }
+
+ // other identifier-looking word
+ return makeToken(ITokenConstants.WORD, text);
+ }
+
+ private Token parseQuote() {
+ // read text, honoring nested quotes, but don't put the outermost quotes in the token
+
+ StringBuffer buffer = new StringBuffer();
+
+ int quoteLevel = 1;
+ // keep reading until the close quote
+ while (offset < chars.length) {
+ if (lookAhead(m4CloseQuote)) {
+ quoteLevel--;
+ if (quoteLevel == 0)
+ break;
+ buffer.append(m4CloseQuote);
+ } else if (lookAhead(m4OpenQuote)) {
+ buffer.append(m4OpenQuote);
+ quoteLevel++;
+ } else {
+ buffer.append(chars[offset]);
+ offset++;
+ }
+ }
+
+ if (quoteLevel > 0) {
+ handleError(startOffset, offset, AutoconfEditorMessages.getFormattedString(UNMATCHED_LEFT_QUOTE, m4CloseQuote));
+ } else if (quoteLevel < 0) {
+ handleError(startOffset, offset, AutoconfEditorMessages.getFormattedString(UNMATCHED_RIGHT_QUOTE, m4OpenQuote));
+ }
+
+ return makeToken(ITokenConstants.M4_STRING, buffer.toString());
+ }
+
+ private Token parseString(int type, char terminal) {
+ startOffset = offset;
+ offset++;
+
+ StringBuffer buffer = new StringBuffer();
+
+ char ch = 0;
+ while (offset < chars.length) {
+ ch = chars[offset++];
+ if (ch == '\\') {
+ if (offset < chars.length)
+ buffer.append(chars[offset++]);
+ else
+ buffer.append(ch);
+ } else if (ch == terminal) {
+ break;
+ } else {
+ buffer.append(ch);
+ }
+ }
+
+ if (ch != terminal) {
+ handleError(startOffset, offset, AutoconfEditorMessages.getFormattedString(UNTERMINATED_STRING, "" + ch));
+ }
+
+ return makeToken(type, buffer.toString());
+ }
+
+ private void handleError(int start, int end,
+ String message) {
+ if (errorHandler != null) {
+ int lineNumber = 0;
+ int startColumn = 0;
+ int endColumn = 0;
+ try {
+ lineNumber = document.getLineOfOffset(start);
+ int lineOffs = document.getLineOffset(lineNumber);
+ startColumn = start - lineOffs;
+ endColumn = end - lineOffs;
+ } catch (BadLocationException e) {
+ // Don't care if we blow up trying to issue marker
+ }
+ errorHandler.handleError(new ParseException(
+ message,
+ start, end,
+ lineNumber,
+ startColumn, endColumn,
+ IMarker.SEVERITY_ERROR));
+ }
+ }
+
+ /**
+ * Look ahead for the given string. If found, return true, and have
+ * offset updated. Otherwise, return false with offset unchanged.
+ * @param keyword
+ * @param text
+ * @return
+ */
+ private boolean lookAhead(String keyword) {
+ int length = keyword.length();
+ if (offset + length > chars.length) {
+ return false;
+ }
+ for (int idx = 0; idx < length; idx++) {
+ if (chars[offset + idx] != keyword.charAt(idx))
+ return false;
+ }
+ offset += length;
+ return true;
+ }
+
+ private boolean isWhitespace(char ch) {
+ return ch == ' ' || ch == '\t' || ch == '\f';
+ }
+
+ private Token makeToken(int type) {
+ return new Token(type,
+ new String(chars, startOffset, offset - startOffset),
+ document, startOffset, offset - startOffset);
+ }
+
+ private Token makeToken(int type, String text) {
+ return new Token(type, text, document, startOffset, offset - startOffset);
+ }
+
+ private boolean isIdentifierChar(char ch) {
+ return isLeadIdentifierChar(ch) || (ch >= '0' && ch <= '9');
+ }
+
+ private boolean isLeadIdentifierChar(char ch) {
+ return (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') || ch == '_';
+ }
+
+ public Token peekToken() {
+ Token token = readToken();
+ unreadToken(token);
+ return token;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfUntilElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfUntilElement.java
new file mode 100644
index 0000000000..bf6eb597eb
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfUntilElement.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+public class AutoconfUntilElement extends AutoconfElement {
+
+ public AutoconfUntilElement() {
+ super("until");
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfWhileElement.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfWhileElement.java
new file mode 100644
index 0000000000..8d247f73d3
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/AutoconfWhileElement.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+public class AutoconfWhileElement extends AutoconfElement {
+
+ public AutoconfWhileElement() {
+ super("while");
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfErrorHandler.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfErrorHandler.java
new file mode 100644
index 0000000000..1363240bbc
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfErrorHandler.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+
+/**
+ * Clients implement this interface to handle errors encountered while parsing.
+ * @author eswartz
+ *
+ */
+public interface IAutoconfErrorHandler {
+
+ /**
+ * Handle an exception associated with the given element
+ * @param exception the exception to handle; has a line number
+ * at the time of call
+ */
+ void handleError(ParseException exception);
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfMacroDetector.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfMacroDetector.java
new file mode 100644
index 0000000000..e4387316e5
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfMacroDetector.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+
+/**
+ * Clients implement this interface to identify what identifiers represent
+ * macros for the autoconf tree.
+ * @author eswartz
+ *
+ */
+public interface IAutoconfMacroDetector {
+
+ /**
+ * Tell if this identifier should be treated as an m4 macro call.
+ * The identifier has already been judged to be a valid candidate
+ * (i.e. it's not quoted).
+ * @param name the string to check
+ */
+ boolean isMacroIdentifier(String name);
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfMacroValidator.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfMacroValidator.java
new file mode 100644
index 0000000000..2a54ee4773
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IAutoconfMacroValidator.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+
+/**
+ * Clients implement this interface to validate macro calls.
+ * @author eswartz
+ *
+ */
+public interface IAutoconfMacroValidator {
+
+ /**
+ * Validate the given macro call.
+ * @param element macro call, never <code>null</code>
+ * @throws ParseException if the call doesn't match the expected number of elements
+ */
+ void validateMacroCall(AutoconfMacroElement element) throws ParseException;
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IMacroDetector.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IMacroDetector.java
new file mode 100644
index 0000000000..b225942cfe
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/IMacroDetector.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+/**
+ * Clients implement this interface to detect whether a given identifier
+ * represents a known or potential macro in m4 or configure.ac text.
+ * @author eswartz
+ *
+ */
+public interface IMacroDetector {
+ boolean isMacro(String identifier);
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/ITokenConstants.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/ITokenConstants.java
new file mode 100644
index 0000000000..b665115f8d
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/ITokenConstants.java
@@ -0,0 +1,87 @@
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+public interface ITokenConstants {
+
+ /** end of file */
+ public static final int EOF = 0;
+ /** end of line */
+ public static final int EOL = 1;
+
+ /** an open parenthesis */
+ public static final int LPAREN = 2;
+ /** a close parenthesis */
+ public static final int RPAREN = 3;
+ /** a comma */
+ public static final int COMMA = 4;
+ /** a semicolon */
+ public static final int SEMI = 5;
+
+ /** a word (either m4 word or shell identifier-looking word) */
+ public static final int WORD = 6;
+
+ /** other text (usually punctuation or number, one char at a time) */
+ public static final int TEXT = 7;
+
+ /** an m4 string (the text does not contain the outermost quotes) */
+ public static final int M4_STRING = 21;
+ /** an m4 comment (as determined by changecomment, NOT dnl) */
+ public static final int M4_COMMENT = 22;
+
+ /** the sh 'if' token */
+ public static final int SH_IF = 40;
+ /** the sh 'then' token */
+ public static final int SH_THEN = 41;
+ /** the sh 'else' token */
+ public static final int SH_ELSE = 42;
+ /** the sh 'elif' token */
+ public static final int SH_ELIF = 43;
+ /** the sh 'fi' token */
+ public static final int SH_FI = 44;
+
+ /** the sh 'while' token */
+ public static final int SH_WHILE = 45;
+ /** the sh 'for' token */
+ public static final int SH_FOR = 46;
+ /** the sh 'select' token */
+ public static final int SH_SELECT = 47;
+ /** the sh 'until' token */
+ public static final int SH_UNTIL = 48;
+ /** the sh 'do' token */
+ public static final int SH_DO = 49;
+ /** the sh 'done' token */
+ public static final int SH_DONE = 50;
+ /** the sh 'case' token */
+
+ public static final int SH_CASE = 51;
+ /** the sh 'in' token */
+ public static final int SH_IN = 52;
+ /** the sh ';;' token */
+ public static final int SH_CASE_CONDITION_END = 53;
+ /** the sh 'esac' token */
+ public static final int SH_ESAC = 54;
+
+ /** the sh '$' token */
+ public static final int SH_DOLLAR = 60;
+
+ /** the sh '{' token */
+ public static final int SH_LBRACE = 61;
+ /** the sh '}' token */
+ public static final int SH_RBRACE = 62;
+ /** the sh '[' token */
+ public static final int SH_LBRACKET = 63;
+ /** the sh ']' token */
+ public static final int SH_RBRACKET = 64;
+
+ /** the sh '<<' token */
+ public static final int SH_HERE = 65;
+ /** the sh '<<-' token */
+ public static final int SH_HERE_DASH = 66;
+ /** an sh double-quoted string */
+ public static final int SH_STRING_DOUBLE = 67;
+ /** an sh single-quoted string */
+ public static final int SH_STRING_SINGLE = 68;
+ /** an sh backtick-quoted string */
+ public static final int SH_STRING_BACKTICK = 69;
+
+
+} \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/ParseException.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/ParseException.java
new file mode 100644
index 0000000000..f0bc442469
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/ParseException.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+public class ParseException extends Exception {
+
+ static final long serialVersionUID = 1;
+ String message;
+ int severity;
+ int lineNumber;
+ int startColumn;
+ int endColumn;
+ private int startOffset;
+ private int endOffset;
+ public int getEndColumn() {
+ return endColumn;
+ }
+ public void setEndColumn(int endColumn) {
+ this.endColumn = endColumn;
+ }
+ public int getLineNumber() {
+ return lineNumber;
+ }
+ public void setLineNumber(int lineNumber) {
+ this.lineNumber = lineNumber;
+ }
+ public String getMessage() {
+ return message;
+ }
+ public void setMessage(String message) {
+ this.message = message;
+ }
+ public int getStartColumn() {
+ return startColumn;
+ }
+ public void setStartColumn(int startColumn) {
+ this.startColumn = startColumn;
+ }
+ public ParseException(String message,
+ int startOffset, int endOffset,
+ int lineNumber, int startColumn, int endColumn, int severity) {
+ super();
+ this.message = message;
+ this.startOffset = startOffset;
+ this.endOffset = endOffset;
+ this.lineNumber = lineNumber;
+ this.startColumn = startColumn;
+ this.endColumn = endColumn;
+ this.severity = severity;
+ }
+ public int getSeverity() {
+ return severity;
+ }
+ public void setSeverity(int severity) {
+ this.severity = severity;
+ }
+ public int getStartOffset() {
+ return startOffset;
+ }
+ public int getEndOffset() {
+ return endOffset;
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/Token.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/Token.java
new file mode 100644
index 0000000000..9690363b4b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/editors/parser/Token.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.cdt.autotools.ui.editors.parser;
+
+import org.eclipse.jface.text.IDocument;
+
+/**
+ * A single token parsed from an autotools-style file. This represents m4 and sh
+ * tokens. Punctuation characters shared by both are not in a namespace.
+ *
+ * @author eswartz
+ *
+ */
+public class Token implements ITokenConstants {
+ /** Type:
+ * @see ITokenConstants
+ */
+ final int type;
+ /**
+ * Text of token, possibly interpreted or reduced from original characters
+ */
+ final String text;
+ /**
+ * Offset of token before interpretation
+ */
+ final int offset;
+ /**
+ * Length of token before interpretation
+ */
+ final int length;
+ /**
+ * The document providing the text
+ */
+ final IDocument document;
+
+ public Token(int type, String text, IDocument document, int offset, int length) {
+ this.type = type;
+ this.text = text;
+ this.document = document;
+ this.offset = offset;
+ this.length = length;
+ }
+
+ public String toString() {
+ return text;
+ }
+
+ public int getType() {
+ return type;
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public IDocument getDocument() {
+ return document;
+ }
+
+ public int getOffset() {
+ return offset;
+ }
+
+ public int getLength() {
+ return length;
+ }
+
+ public boolean followsSpace() {
+ char[] text = document.get().toCharArray();
+ if (offset == 0)
+ return false;
+ return (" \t\r\n\f".indexOf(text[offset - 1]) >= 0);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsBuildPropertyPage.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsBuildPropertyPage.java
new file mode 100644
index 0000000000..8bc173fe35
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsBuildPropertyPage.java
@@ -0,0 +1,243 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.properties;
+
+import org.eclipse.cdt.core.settings.model.ICResourceDescription;
+import org.eclipse.cdt.managedbuilder.ui.properties.AbstractCBuildPropertyTab;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.linuxtools.cdt.autotools.AutotoolsMakefileBuilder;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+
+public class AutotoolsBuildPropertyPage extends AbstractCBuildPropertyTab {
+
+ private String TRUE = "true"; // $NON-NLS-1$
+ private String FALSE = "false"; // $NON-NLS-1$
+ private String SCANNERMAKEW_LABEL = "ScannerMakeW.label"; // $NON-NLS-1$
+ private String SCANNERMAKEW_TOOLTIP = "ScannerMakeW.tooltip"; // $NON-NLS-1$
+
+ protected Button fCleanDelete;
+ protected Button fCleanMake;
+ protected Text fCleanMakeTarget;
+ protected Button fScannerMakeW;
+
+ private IProject getProject() {
+ return (IProject)getCfg().getManagedProject().getOwner();
+ }
+
+ public boolean canBeVisible() {
+ return AutotoolsMakefileBuilder.hasTargetBuilder(getProject());
+ }
+
+ public void createControls(Composite parent) {
+ super.createControls(parent);
+ Composite composite= usercomp;
+ // assume parent page uses griddata
+ GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_CENTER | GridData.VERTICAL_ALIGN_FILL | GridData.FILL_HORIZONTAL);
+ composite.setLayoutData(gd);
+ GridLayout layout= new GridLayout();
+ layout.numColumns= 2;
+ //PixelConverter pc= new PixelConverter(composite);
+ //layout.verticalSpacing= pc.convertHeightInCharsToPixels(1) / 2;
+ composite.setLayout(layout);
+
+ Group g = new Group(composite, SWT.SHADOW_ETCHED_IN);
+ g.setText(AutotoolsPropertyMessages.getString("CleanBehavior.title"));
+ gd = new GridData(GridData.HORIZONTAL_ALIGN_CENTER | GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ g.setLayoutData(gd);
+ layout= new GridLayout();
+ layout.numColumns= 2;
+ g.setLayout(layout);
+
+ fCleanDelete = new Button(g, SWT.RADIO);
+ fCleanDelete.setText(AutotoolsPropertyMessages.getString("CleanDelete.label"));
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ gd.horizontalSpan = 2;
+ fCleanDelete.setLayoutData(gd);
+ fCleanMake = new Button(g, SWT.RADIO);
+ fCleanMake.setText(AutotoolsPropertyMessages.getString("CleanMake.label"));
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ gd.horizontalSpan = 2;
+ fCleanMake.setLayoutData(gd);
+
+ Label label = new Label(g, SWT.LEFT);
+ label.setText(AutotoolsPropertyMessages.getString("CleanMakeTarget.label"));
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ label.setLayoutData(gd);
+
+ fCleanMakeTarget = new Text(g, SWT.SINGLE | SWT.BORDER);
+ fCleanMakeTarget.setText(AutotoolsPropertyConstants.CLEAN_MAKE_TARGET_DEFAULT);
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
+ fCleanMakeTarget.setLayoutData(gd);
+
+ fCleanDelete.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ fCleanMake.setSelection(false);
+ fCleanDelete.setSelection(true);
+ fCleanMakeTarget.setEnabled(false);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // do nothing
+ }
+ });
+
+ fCleanMake.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ fCleanDelete.setSelection(false);
+ fCleanMake.setSelection(true);
+ fCleanMakeTarget.setEnabled(true);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // do nothing
+ }
+ });
+
+ fCleanMakeTarget.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ if (fCleanMakeTarget.getText().equals("")) { // $NON-NLS-1$
+ // FIXME: should probably issue warning here, but how?
+ }
+ }
+ });
+
+ fScannerMakeW = new Button(composite, SWT.LEFT | SWT.CHECK);
+ fScannerMakeW.setText(AutotoolsPropertyMessages.getString(SCANNERMAKEW_LABEL));
+ fScannerMakeW.setToolTipText(AutotoolsPropertyMessages.getString(SCANNERMAKEW_TOOLTIP));
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING);
+ fScannerMakeW.setLayoutData(gd);
+
+ initialize();
+ }
+
+ protected void performOK() {
+ IProject project = getProject();
+ if (fCleanDelete.getSelection()) {
+ try {
+ project.setPersistentProperty(AutotoolsPropertyConstants.CLEAN_DELETE, TRUE);
+ } catch (CoreException ce) {
+ // FIXME: what can we do here?
+ }
+ } else {
+ try {
+ project.setPersistentProperty(AutotoolsPropertyConstants.CLEAN_DELETE, FALSE);
+ } catch (CoreException ce) {
+ // FIXME: what can we do here?
+ }
+ try {
+ project.setPersistentProperty(AutotoolsPropertyConstants.CLEAN_MAKE_TARGET, fCleanMakeTarget.getText());
+ } catch (CoreException ce) {
+ // FIXME: what can we do here?
+ }
+ }
+ boolean setScannerInfoDirty = false;
+ try {
+ // Get old scanner method setting to see if it has changed.
+ String oldScannerMakeW = project.getPersistentProperty(AutotoolsPropertyConstants.SCANNER_USE_MAKE_W);
+ if (fScannerMakeW.getSelection()) {
+ project.setPersistentProperty(AutotoolsPropertyConstants.SCANNER_USE_MAKE_W, TRUE);
+ if (oldScannerMakeW == null || !oldScannerMakeW.equals(TRUE))
+ setScannerInfoDirty = true;
+ } else {
+ project.setPersistentProperty(AutotoolsPropertyConstants.SCANNER_USE_MAKE_W, null);
+ if (oldScannerMakeW != null && oldScannerMakeW.equals(TRUE))
+ setScannerInfoDirty = true;
+ }
+ } catch (CoreException ce) {
+ ce.printStackTrace(); // FIXME: what can we do here?
+ }
+ // If the scanner info method changes, we must mark the current data as
+ // dirty so it will be recalculated.
+ if (setScannerInfoDirty) {
+ try {
+ project.setSessionProperty(AutotoolsPropertyConstants.SCANNER_INFO_DIRTY, Boolean.TRUE);
+ } catch (CoreException ce2) {
+ // FIXME: what can we do here?
+ }
+ }
+ }
+
+ protected void performApply(ICResourceDescription src, ICResourceDescription dst) {
+ performOK();
+ }
+
+ protected void performDefaults() {
+ fCleanDelete.setSelection(false);
+ fCleanMake.setSelection(true);
+ fCleanMakeTarget.setText(AutotoolsPropertyConstants.CLEAN_MAKE_TARGET_DEFAULT);
+ fCleanMakeTarget.setEnabled(true);
+ fScannerMakeW.setSelection(true);
+ }
+
+ public void updateData(ICResourceDescription cfgd) {
+ // what to do here?
+ }
+
+ public void updateButtons() {
+ // what to do here?
+ }
+
+ public void setVisible (boolean b) {
+ super.setVisible(b);
+ }
+
+ private void initialize() {
+ IProject project = getProject();
+ String cleanDelete = null;
+ String cleanMakeTarget = null;
+ String scannerMakeW = null;
+ try {
+ cleanDelete = project.getPersistentProperty(AutotoolsPropertyConstants.CLEAN_DELETE);
+ cleanMakeTarget = project.getPersistentProperty(AutotoolsPropertyConstants.CLEAN_MAKE_TARGET);
+ scannerMakeW = project.getPersistentProperty(AutotoolsPropertyConstants.SCANNER_USE_MAKE_W);
+ } catch (CoreException e) {
+ // do nothing
+ }
+
+ if (cleanMakeTarget == null) {
+ cleanMakeTarget = AutotoolsPropertyConstants.CLEAN_MAKE_TARGET_DEFAULT;
+ }
+ fCleanMakeTarget.setText(cleanMakeTarget);
+
+ if (cleanDelete == null || cleanDelete.equals(FALSE)) {
+ fCleanDelete.setSelection(false);
+ fCleanMake.setSelection(true);
+ fCleanMakeTarget.setEnabled(true);
+ } else {
+ fCleanDelete.setSelection(true);
+ fCleanMake.setSelection(false);
+ fCleanMakeTarget.setEnabled(false);
+ }
+
+ if (scannerMakeW == null || !scannerMakeW.equals(TRUE)) {
+ fScannerMakeW.setSelection(false);
+ } else
+ fScannerMakeW.setSelection(true);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsEditorPropertyPage.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsEditorPropertyPage.java
new file mode 100644
index 0000000000..9ee6a4bf7a
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsEditorPropertyPage.java
@@ -0,0 +1,278 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.properties;
+
+import org.eclipse.cdt.core.settings.model.ICResourceDescription;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.linuxtools.cdt.autotools.AutotoolsPlugin;
+import org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences.AutotoolsEditorPreferenceConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+
+public class AutotoolsEditorPropertyPage extends AbstractCPropertyTab {
+
+ protected Combo fACVersionCombo;
+ protected Combo fAMVersionCombo;
+ IProject project;
+
+// private class ACVersionSelectionListener implements SelectionListener {
+// ICPropertyProvider p;
+// public ACVersionSelectionListener(ICPropertyProvider p) {
+// this.p = p;
+// }
+//
+// public void widgetSelected(SelectionEvent e) {
+// int index = fACVersionCombo.getSelectionIndex();
+// try {
+// AutotoolsEditorPropertyPage.getProject(p).setPersistentProperty(AutotoolsPropertyConstants.AUTOCONF_VERSION, fACVersionCombo.getItem(index));
+// } catch (CoreException ce) {
+// // FIXME: what can we do here?
+// }
+// }
+//
+// public void widgetDefaultSelected(SelectionEvent e) {
+// // do nothing
+// }
+// }
+//
+// private class AMVersionSelectionListener implements SelectionListener {
+// ICPropertyProvider p;
+// public AMVersionSelectionListener(ICPropertyProvider p) {
+// this.p = p;
+// }
+//
+// public void widgetSelected(SelectionEvent e) {
+// int index = fAMVersionCombo.getSelectionIndex();
+// try {
+// AutotoolsEditorPropertyPage.getProject(p).setPersistentProperty(AutotoolsPropertyConstants.AUTOMAKE_VERSION, fAMVersionCombo.getItem(index));
+// } catch (CoreException ce) {
+// // FIXME: what can we do here?
+// }
+// }
+//
+// public void widgetDefaultSelected(SelectionEvent e) {
+// // do nothing
+// }
+// }
+
+ private IProject getProject() {
+ IConfiguration c = ManagedBuildManager.getConfigurationForDescription(getResDesc().getConfiguration());
+ return (IProject)c.getManagedProject().getOwner();
+ }
+
+ public boolean canBeVisible() {
+ return true;
+ }
+
+ public void createControls(Composite parent) {
+ // TODO Auto-generated method stub
+ super.createControls(parent);
+ Composite composite= usercomp;
+
+ // assume parent page uses griddata
+ GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_CENTER | GridData.VERTICAL_ALIGN_FILL);
+ composite.setLayoutData(gd);
+ GridLayout layout= new GridLayout();
+ layout.numColumns= 2;
+ //PixelConverter pc= new PixelConverter(composite);
+ //layout.verticalSpacing= pc.convertHeightInCharsToPixels(1) / 2;
+ composite.setLayout(layout);
+
+ project = getProject();
+
+ /* check box for new editors */
+ fACVersionCombo= new Combo(composite, SWT.CHECK | SWT.DROP_DOWN | SWT.READ_ONLY);
+ fACVersionCombo.setItems(AutotoolsPropertyConstants.fACVersions);
+ fACVersionCombo.select(AutotoolsPropertyConstants.fACVersions.length - 1);
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING);
+ fACVersionCombo.setLayoutData(gd);
+
+ Label label= new Label(composite, SWT.LEFT);
+ label.setText(AutotoolsPropertyMessages.getString("ACEditor.autoconfVersion")); //$NON-NLS-1$
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ label.setLayoutData(gd);
+
+ /* check box for new editors */
+ fAMVersionCombo= new Combo(composite, SWT.CHECK | SWT.DROP_DOWN | SWT.READ_ONLY);
+ fAMVersionCombo.setItems(AutotoolsPropertyConstants.fAMVersions);
+ fAMVersionCombo.select(AutotoolsPropertyConstants.fAMVersions.length - 1);
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING);
+ fAMVersionCombo.setLayoutData(gd);
+
+ Label label2= new Label(composite, SWT.LEFT);
+ label2.setText(AutotoolsPropertyMessages.getString("ACEditor.automakeVersion")); //$NON-NLS-1$
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ label2.setLayoutData(gd);
+
+ initialize();
+ }
+
+ public void performOK() {
+ String acVer = null;
+ String amVer = null;
+ boolean changed = false;
+ try {
+ acVer = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOCONF_VERSION);
+ amVer = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOMAKE_VERSION);
+ } catch (CoreException e) {
+ acVer = "";
+ amVer = "";
+ }
+ int index = fACVersionCombo.getSelectionIndex();
+ String acVerSelected = fACVersionCombo.getItem(index);
+ if (!acVerSelected.equals(acVer)) {
+ changed = true;
+ try {
+ project.setPersistentProperty(AutotoolsPropertyConstants.AUTOCONF_VERSION, fACVersionCombo.getItem(index));
+ } catch (CoreException ce) {
+ // Not much we can do at this point
+ }
+ }
+
+ index = fAMVersionCombo.getSelectionIndex();
+ String amVerSelected = fAMVersionCombo.getItem(index);
+ if (!amVerSelected.equals(amVer)) {
+ changed = true;
+ try {
+ project.setPersistentProperty(AutotoolsPropertyConstants.AUTOMAKE_VERSION, fAMVersionCombo.getItem(index));
+ } catch (CoreException ce) {
+ // Not much we can do here either
+ }
+ }
+
+ // Notify any Autoconf editors that are open for this project that macro versioning
+ // has changed.
+ if (changed)
+ AutotoolsPropertyManager.getDefault().notifyPropertyListeners(project, AutotoolsPropertyConstants.AUTOCONF_MACRO_VERSIONING);
+ }
+
+ protected void performApply(ICResourceDescription src, ICResourceDescription dst) {
+ performOK();
+ }
+
+ public void performDefaults() {
+ // For default Autoconf and Automake versions, use the setting from the
+ // Autotools preference dialog.
+ String version = AutotoolsPlugin.getDefault().getPreferenceStore().getString(AutotoolsEditorPreferenceConstants.AUTOCONF_VERSION);
+ String[] items = fACVersionCombo.getItems();
+ // Try and find which list item matches the current preference stored and
+ // select it in the list.
+ int i;
+ for (i = 0; i < items.length; ++i) {
+ if (items[i].equals(version))
+ break;
+ }
+ if (i >= items.length)
+ i = items.length - 1;
+ fACVersionCombo.select(i);
+
+ version = AutotoolsPlugin.getDefault().getPreferenceStore().getString(AutotoolsEditorPreferenceConstants.AUTOMAKE_VERSION);
+ items = fAMVersionCombo.getItems();
+ // Try and find which list item matches the current preference stored and
+ // select it in the list
+ for (i = 0; i < items.length; ++i) {
+ if (items[i].equals(version))
+ break;
+ }
+ if (i >= items.length)
+ i = items.length - 1;
+ fAMVersionCombo.select(i);
+ }
+
+ public void updateData(ICResourceDescription cfgd) {
+ // what to do here?
+ }
+
+ public void updateButtons() {
+ // what to do here?
+ }
+
+ public void setVisible (boolean b) {
+ super.setVisible(b);
+ }
+
+// private IProject getProject(ICPropertyProvider provider) {
+// Object element = provider.getElement();
+// if (element != null) {
+// if (element instanceof IFile ||
+// element instanceof IProject ||
+// element instanceof IFolder)
+// {
+// IResource f = (IResource) element;
+// return f.getProject();
+// }
+// else if (element instanceof ICProject)
+// return ((ICProject)element).getProject();
+// }
+// return null;
+// }
+
+ private void initialize() {
+ initializeACVersion();
+ initializeAMVersion();
+ }
+
+ void initializeACVersion() {
+ String version = "";
+ try {
+ version = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOCONF_VERSION);
+ if (version == null)
+ version = AutotoolsPlugin.getDefault().getPreferenceStore().getString(AutotoolsEditorPreferenceConstants.AUTOCONF_VERSION);
+ } catch (CoreException e) {
+ // do nothing
+ }
+ String[] items = fACVersionCombo.getItems();
+ // Try and find which list item matches the current preference stored and
+ // select it in the list.
+ int i;
+ for (i = 0; i < items.length; ++i) {
+ if (items[i].equals(version))
+ break;
+ }
+ if (i >= items.length)
+ i = items.length - 1;
+ fACVersionCombo.select(i);
+ }
+
+ void initializeAMVersion() {
+ String version = "";
+ try {
+ version = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOMAKE_VERSION);
+ if (version == null)
+ version = AutotoolsPlugin.getDefault().getPreferenceStore().getString(AutotoolsEditorPreferenceConstants.AUTOMAKE_VERSION);
+ } catch (CoreException e) {
+ // do nothing
+ }
+ String[] items = fAMVersionCombo.getItems();
+ // Try and find which list item matches the current preference stored and
+ // select it in the list.
+ int i;
+ for (i = 0; i < items.length; ++i) {
+ if (items[i].equals(version))
+ break;
+ }
+ if (i >= items.length)
+ i = items.length - 1;
+ fAMVersionCombo.select(i);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyConstants.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyConstants.java
new file mode 100644
index 0000000000..f020ce0252
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyConstants.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.properties;
+
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.linuxtools.cdt.autotools.AutotoolsPlugin;
+
+
+public class AutotoolsPropertyConstants {
+
+ static final String PREFIX = AutotoolsPlugin.getUniqueIdentifier() + "."; // $NON-NLS-1$
+ public static final String AUTOMAKE_VERSION_STRING = "AutoconfEditorAutomakeVersion"; // $NON-NLS-1$
+ public static final QualifiedName AUTOMAKE_VERSION = new QualifiedName(PREFIX, AUTOMAKE_VERSION_STRING);
+ public static final String AUTOCONF_VERSION_STRING = "AutoconfEditorAutoconfVersion"; // $NON-NLS-1$
+ public static final QualifiedName AUTOCONF_VERSION = new QualifiedName(PREFIX, AUTOCONF_VERSION_STRING);
+ public static final String AUTOCONF_MACRO_VERSIONING = "AutoconfEditorMacroVersioning"; // $NON-NLS-1$
+ public static final QualifiedName AUTOCONF_TOOL = new QualifiedName(PREFIX, "AutoconfToolPath"); // $NON-NLS-1$
+ public static final QualifiedName AUTOMAKE_TOOL = new QualifiedName(PREFIX, "AutomakeToolPath"); // $NON-NLS-1$
+ public static final QualifiedName ACLOCAL_TOOL = new QualifiedName(PREFIX, "AclocalToolPath"); // $NON-NLS-1$
+ public static final QualifiedName AUTOHEADER_TOOL = new QualifiedName(PREFIX, "AutoheaderToolPath"); // $NON-NLS-1$
+ public static final QualifiedName AUTORECONF_TOOL = new QualifiedName(PREFIX, "AutoreconfToolPath"); // $NON-NLS-1$
+ public static final QualifiedName LIBTOOLIZE_TOOL = new QualifiedName(PREFIX, "LibtoolizePath"); // $NON-NLS-1$
+ public static final QualifiedName CLEAN_DELETE = new QualifiedName(PREFIX, "CleanDelete"); // $NON-NLS-1$
+ public static final QualifiedName CLEAN_MAKE_TARGET = new QualifiedName(PREFIX, "CleanMakeTarget"); // $NON-NLS-1$
+ public static final QualifiedName SCANNER_USE_MAKE_W = new QualifiedName(PREFIX, "ScannerUseMakeW");
+ public static final QualifiedName OPEN_INCLUDE = new QualifiedName(PREFIX, "IncludeResourceMapping"); // $NON-NLS-1$
+ public static final QualifiedName OPEN_INCLUDE_P = new QualifiedName(PREFIX, "PersistentIncludeResourceMapping"); //$NON-NLS-1$
+ public static final QualifiedName SCANNER_INFO_DIRTY = new QualifiedName(PREFIX, "ScannerInfoDirty"); // $NON-NLSp-1$
+
+ static String[] fACVersions = {"2.13", "2.59", "2.61"}; // $NON-NLS-1$
+ static final String LATEST_AC_VERSION = fACVersions[fACVersions.length - 1];
+
+ static String[] fAMVersions = {"1.4-p6", "1.9.5", "1.9.6"}; // $NON-NLS-1$
+ static final String LATEST_AM_VERSION = fAMVersions[fAMVersions.length - 1];
+
+ public static final String CLEAN_MAKE_TARGET_DEFAULT = "distclean"; // $NON-NLS-1$
+ public static final String TRUE = "true"; // $NON-NLS-1$
+ public static final String FALSE = "false"; // $NON-NLS-1$
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyManager.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyManager.java
new file mode 100644
index 0000000000..1bdcca5ac1
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyManager.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.properties;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.ListenerList;
+
+public class AutotoolsPropertyManager implements IPropertyChangeManager {
+
+ private static AutotoolsPropertyManager fInstance;
+ private Map<IProject, ListenerList> projectList;
+
+ private AutotoolsPropertyManager() {
+ projectList = new HashMap<IProject, ListenerList>();
+ }
+
+ public static AutotoolsPropertyManager getDefault() {
+ if (fInstance == null)
+ fInstance = new AutotoolsPropertyManager();
+ return fInstance;
+ }
+
+ public synchronized void addProjectPropertyListener(IProject project,
+ IProjectPropertyListener listener) {
+ ListenerList list = (ListenerList)projectList.get(project);
+ if (list == null) {
+ list = new ListenerList();
+ projectList.put(project, list);
+ }
+ list.add(listener);
+ }
+
+ public synchronized void notifyPropertyListeners(IProject project, String property) {
+ ListenerList list = (ListenerList)projectList.get(project);
+ if (list != null) {
+ Object[] listeners = list.getListeners();
+ for (int i = 0; i < listeners.length; ++i) {
+ ((IProjectPropertyListener)listeners[i]).handleProjectPropertyChanged(project, property);
+ }
+ }
+ }
+
+ public synchronized void removeProjectPropertyListener(IProject project,
+ IProjectPropertyListener listener) {
+ ListenerList list = (ListenerList)projectList.get(project);
+ if (list != null)
+ list.remove(listener);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyMessages.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyMessages.java
new file mode 100644
index 0000000000..8fb1becc62
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyMessages.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.cdt.autotools.ui.properties;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * MakefilePreferencesMessages
+ */
+public class AutotoolsPropertyMessages {
+
+ /**
+ *
+ */
+ private AutotoolsPropertyMessages() {
+ }
+
+ private static final String BUNDLE_NAME = AutotoolsPropertyMessages.class.getName();
+
+ public static String getString(String key) {
+ try {
+ return ResourceBundle.getBundle(BUNDLE_NAME).getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ } catch (NullPointerException e) {
+ return '#' + key + '#';
+ }
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyMessages.properties b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyMessages.properties
new file mode 100644
index 0000000000..d729559cc6
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyMessages.properties
@@ -0,0 +1,41 @@
+###############################################################################
+# Copyright (c) 2007 Red Hat Inc. and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat Inc. - initial API and implementation
+###############################################################################
+
+Edit.name=Editors
+Build.name=Build
+
+Autotools.aclocalPath=aclocal
+Autotools.aclocalPath.tooltip=Specify desired aclocal to use for project
+Autotools.automakePath=automake
+Autotools.automakePath.tooltip=Specify desired automake to use for project
+Autotools.autoconfPath=autoconf
+Autotools.autoconfPath.tooltip=Specify desired autoconf to use for project
+Autotools.autoheaderPath=autoheader
+Autotools.autoheaderPath.tooltip=Specify desired autoheader to use for project
+Autotools.autoreconfPath=autoreconf
+Autotools.autoreconfPath.tooltip=Specify desired autoreconf to use for project
+Autotools.libtoolizePath=libtoolize
+Autotools.libtoolizePath.tooltip=Specify desired libtoolize to use for project
+
+ACEditor.version=&Version
+ACEditor.autoconfVersion=Version of Autoconf to use for syntax checking
+ACEditor.automakeVersion=Version of Automake to use for syntax checking
+
+ScannerMakeW.label=Use make -n -w per file to generate scanner info
+ScannerMakeW.tooltip=Use this option only if necessary to get correct include path
+
+CleanBehavior.title=Clean Build Behavior
+
+CleanDelete.label=Delete build directory on "clean" operation
+CleanMake.label=Use make target to clean
+CleanMakeTarget.label=Make target:
+CleanMakeTarget.default=distclean
+CleanMakeTarget.tooltip=Specify a top-level make target to clean build directory
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyPage.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyPage.java
new file mode 100644
index 0000000000..95fb589c95
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsPropertyPage.java
@@ -0,0 +1,376 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.properties;
+
+import org.eclipse.cdt.ui.newui.AbstractPage;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+public class AutotoolsPropertyPage extends AbstractPage {
+
+ public AutotoolsPropertyPage() {
+ super();
+ }
+
+ protected boolean isSingle() {
+ return false;
+ }
+
+ protected Control createContents(Composite parent) {
+ return super.createContents(parent);
+ }
+
+ protected boolean showsConfig() {
+ return false;
+ }
+
+// protected Combo fACVersionCombo;
+// protected Combo fAMVersionCombo;
+//
+// protected Button fCleanDelete;
+// protected Button fCleanMake;
+// protected Combo fCleanMakeTarget;
+// protected Button fScannerMakeW;
+//
+//
+// public boolean isApplicable() {
+// IProject project = getProject();
+// if (project != null && !AutotoolsMakefileBuilder.hasTargetBuilder(project))
+// return false;
+// else
+// return super.isApplicable();
+// }
+//
+// protected Control createContents(Composite parent) {
+//
+// TabFolder folder= new TabFolder(parent, SWT.NONE);
+// folder.setLayout(new TabFolderLayout());
+// folder.setLayoutData(new GridData(GridData.FILL_BOTH));
+//
+// // Allow end-user to select which version of autoconf to use for hover help
+// // and syntax checking of macros.
+// TabItem item= new TabItem(folder, SWT.NONE);
+// item.setText(AutotoolsPropertyMessages.getString("Edit.name")); //$NON-NLS-1$
+// item.setControl(createEditTabContent(folder));
+//
+// // Build options.
+// item= new TabItem(folder, SWT.NONE);
+// item.setText(AutotoolsPropertyMessages.getString("Build.name")); //$NON-NLS-1$
+// item.setControl(createBuildTabContent(folder));
+//
+// initialize();
+//
+// applyDialogFont(folder);
+// return folder;
+// }
+//
+// private Composite createEditTabContent(TabFolder folder) {
+// Composite composite= new Composite(folder, SWT.NULL);
+// // assume parent page uses griddata
+// GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_CENTER | GridData.VERTICAL_ALIGN_FILL);
+// composite.setLayoutData(gd);
+// GridLayout layout= new GridLayout();
+// layout.numColumns= 2;
+// //PixelConverter pc= new PixelConverter(composite);
+// //layout.verticalSpacing= pc.convertHeightInCharsToPixels(1) / 2;
+// composite.setLayout(layout);
+//
+//
+// /* check box for new editors */
+// fACVersionCombo= new Combo(composite, SWT.CHECK | SWT.DROP_DOWN | SWT.READ_ONLY);
+// fACVersionCombo.setItems(AutotoolsPropertyConstants.fACVersions);
+// fACVersionCombo.select(AutotoolsPropertyConstants.fACVersions.length - 1);
+// gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING);
+// fACVersionCombo.setLayoutData(gd);
+// fACVersionCombo.addSelectionListener(new SelectionListener() {
+// public void widgetSelected(SelectionEvent e) {
+// int index = fACVersionCombo.getSelectionIndex();
+// try {
+// getProject().setPersistentProperty(AutotoolsPropertyConstants.AUTOCONF_VERSION, fACVersionCombo.getItem(index));
+// } catch (CoreException ce) {
+// // FIXME: what can we do here?
+// }
+// }
+//
+// public void widgetDefaultSelected(SelectionEvent e) {
+// String version = AutotoolsPlugin.getDefault().getPreferenceStore().getString(AutotoolsEditorPreferenceConstants.AUTOCONF_VERSION);
+// String[] items = fACVersionCombo.getItems();
+// // Try and find which list item matches the current preference stored and
+// // select it in the list.
+// int i;
+// for (i = 0; i < items.length; ++i) {
+// if (items[i].equals(version))
+// break;
+// }
+// if (i >= items.length)
+// i = items.length - 1;
+// fACVersionCombo.select(i);
+// }
+// });
+//
+// Label label= new Label(composite, SWT.LEFT);
+// label.setText(AutotoolsPropertyMessages.getString("ACEditor.autoconfVersion")); //$NON-NLS-1$
+// gd= new GridData();
+// gd.horizontalAlignment= GridData.BEGINNING;
+// label.setLayoutData(gd);
+//
+// /* check box for new editors */
+// fAMVersionCombo= new Combo(composite, SWT.CHECK | SWT.DROP_DOWN | SWT.READ_ONLY);
+// fAMVersionCombo.setItems(AutotoolsPropertyConstants.fAMVersions);
+// fAMVersionCombo.select(AutotoolsPropertyConstants.fAMVersions.length - 1);
+// gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING);
+// fAMVersionCombo.setLayoutData(gd);
+// fAMVersionCombo.addSelectionListener(new SelectionListener() {
+// public void widgetSelected(SelectionEvent e) {
+// int index = fAMVersionCombo.getSelectionIndex();
+// try {
+// getProject().setPersistentProperty(AutotoolsPropertyConstants.AUTOMAKE_VERSION, fAMVersionCombo.getItem(index));
+// } catch (CoreException ce) {
+// // FIXME: what can we do here?
+// }
+// }
+//
+// public void widgetDefaultSelected(SelectionEvent e) {
+// String version = AutotoolsPlugin.getDefault().getPreferenceStore().getString(AutotoolsEditorPreferenceConstants.AUTOMAKE_VERSION);
+// String[] items = fAMVersionCombo.getItems();
+// // Try and find which list item matches the current preference stored and
+// // select it in the list.
+// int i;
+// for (i = 0; i < items.length; ++i) {
+// if (items[i].equals(version))
+// break;
+// }
+// if (i >= items.length)
+// i = items.length - 1;
+// fAMVersionCombo.select(i);
+// }
+// });
+//
+// Label label2= new Label(composite, SWT.LEFT);
+// label2.setText(AutotoolsPropertyMessages.getString("ACEditor.automakeVersion")); //$NON-NLS-1$
+// gd= new GridData();
+// gd.horizontalAlignment= GridData.BEGINNING;
+// label2.setLayoutData(gd);
+//
+// return composite;
+// }
+//
+// private Composite createBuildTabContent(TabFolder folder) {
+// Composite composite= new Composite(folder, SWT.NULL);
+// // assume parent page uses griddata
+// GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_CENTER | GridData.VERTICAL_ALIGN_FILL);
+// composite.setLayoutData(gd);
+// GridLayout layout= new GridLayout();
+// layout.numColumns= 2;
+// //PixelConverter pc= new PixelConverter(composite);
+// //layout.verticalSpacing= pc.convertHeightInCharsToPixels(1) / 2;
+// composite.setLayout(layout);
+//
+//
+// Group g = new Group(composite, SWT.SHADOW_ETCHED_IN);
+// g.setText(AutotoolsPropertyMessages.getString("CleanBehavior.title"));
+// gd = new GridData(GridData.HORIZONTAL_ALIGN_CENTER | GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
+// gd.horizontalSpan = 2;
+// g.setLayoutData(gd);
+// layout= new GridLayout();
+// layout.numColumns= 2;
+// g.setLayout(layout);
+//
+// fCleanDelete = new Button(g, SWT.RADIO);
+// fCleanDelete.setText(AutotoolsPropertyMessages.getString("CleanDelete.label"));
+// gd= new GridData();
+// gd.horizontalAlignment= GridData.BEGINNING;
+// gd.horizontalSpan = 2;
+// fCleanDelete.setLayoutData(gd);
+// fCleanMake = new Button(g, SWT.RADIO);
+// fCleanMake.setText(AutotoolsPropertyMessages.getString("CleanMake.label"));
+// gd= new GridData();
+// gd.horizontalAlignment= GridData.BEGINNING;
+// gd.horizontalSpan = 2;
+// fCleanMake.setLayoutData(gd);
+//
+// Label label = new Label(g, SWT.LEFT);
+// label.setText(AutotoolsPropertyMessages.getString("CleanMakeTarget.label"));
+// gd= new GridData();
+// gd.horizontalAlignment= GridData.BEGINNING;
+// label.setLayoutData(gd);
+//
+// fCleanMakeTarget = new Combo(g, SWT.SIMPLE);
+// fCleanMakeTarget.setText(AutotoolsPropertyMessages.getString("CleanMakeTarget.default"));
+// fCleanMakeTarget.setTextLimit(40);
+// fCleanMakeTarget.setVisibleItemCount(0);
+// gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING);
+// fCleanMakeTarget.setLayoutData(gd);
+//
+// fCleanDelete.addSelectionListener(new SelectionListener() {
+// public void widgetSelected(SelectionEvent e) {
+// fCleanMake.setSelection(false);
+// fCleanDelete.setSelection(true);
+// fCleanMakeTarget.setEnabled(false);
+// try {
+// getProject().setPersistentProperty(AutotoolsPropertyConstants.CLEAN_DELETE, "true");
+// } catch (CoreException ce) {
+// // FIXME: what can we do here?
+// }
+// }
+//
+// public void widgetDefaultSelected(SelectionEvent e) {
+// fCleanDelete.setSelection(false);
+// fCleanMake.setSelection(true);
+// fCleanMakeTarget.setEnabled(true);
+// try {
+// getProject().setPersistentProperty(AutotoolsPropertyConstants.CLEAN_DELETE, "false");
+// getProject().setPersistentProperty(AutotoolsPropertyConstants.CLEAN_MAKE_TARGET, "distclean");
+// } catch (CoreException ce) {
+// // FIXME: what can we do here?
+// }
+// }
+// });
+//
+// fCleanMake.addSelectionListener(new SelectionListener() {
+// public void widgetSelected(SelectionEvent e) {
+// fCleanDelete.setSelection(false);
+// fCleanMake.setSelection(true);
+// fCleanMakeTarget.setEnabled(true);
+// try {
+// getProject().setPersistentProperty(AutotoolsPropertyConstants.CLEAN_DELETE, "false");
+// } catch (CoreException ce) {
+// // FIXME: what can we do here?
+// }
+// }
+//
+// public void widgetDefaultSelected(SelectionEvent e) {
+//// fCleanDelete.setSelection(false);
+//// fCleanMake.setSelection(true);
+//// try {
+//// getProject().setPersistentProperty(AutotoolsPropertyConstants.CLEAN_DELETE, "false");
+//// getProject().setPersistentProperty(AutotoolsPropertyConstants.CLEAN_MAKE_TARGET, "distclean");
+//// } catch (CoreException ce) {
+//// // FIXME: what can we do here?
+//// }
+// }
+// });
+//
+// fCleanMakeTarget.addModifyListener(new ModifyListener() {
+// public void modifyText(ModifyEvent e) {
+// try {
+// getProject().setPersistentProperty(AutotoolsPropertyConstants.CLEAN_MAKE_TARGET, fCleanMakeTarget.getText());
+// } catch (CoreException ce) {
+// // FIXME: what can we do here?
+// }
+// }
+// });
+//
+// fScannerMakeW = new Button(composite, SWT.LEFT | SWT.CHECK);
+// fScannerMakeW.setText(AutotoolsPropertyMessages.getString("ScannerMakeW.label"));
+// fScannerMakeW.setToolTipText(AutotoolsPropertyMessages.getString("ScannerMakeW.tooltip"));
+// gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING);
+// fScannerMakeW.setLayoutData(gd);
+// fScannerMakeW.addSelectionListener(new SelectionListener() {
+// public void widgetSelected(SelectionEvent e) {
+// try {
+// getProject().setPersistentProperty(AutotoolsPropertyConstants.SCANNER_USE_MAKE_W, "true");
+// } catch (CoreException ce) {
+// // FIXME: what can we do here?
+// }
+// }
+//
+// public void widgetDefaultSelected(SelectionEvent e) {
+// fScannerMakeW.setSelection(false);
+// try {
+// // This is only a temporary work-around so we remove the property rather than set it false.
+// getProject().setPersistentProperty(AutotoolsPropertyConstants.SCANNER_USE_MAKE_W, null);
+// } catch (CoreException ce) {
+// // FIXME: what can we do here?
+// }
+// }
+// });
+//
+// return composite;
+// }
+//
+// void initializeACVersion() {
+// String version = "";
+// try {
+// version = getProject().getPersistentProperty(AutotoolsPropertyConstants.AUTOCONF_VERSION);
+// if (version == null)
+// version = AutotoolsPlugin.getDefault().getPreferenceStore().getString(AutotoolsEditorPreferenceConstants.AUTOCONF_VERSION);
+// } catch (CoreException e) {
+// // do nothing
+// }
+// String[] items = fACVersionCombo.getItems();
+// // Try and find which list item matches the current preference stored and
+// // select it in the list.
+// int i;
+// for (i = 0; i < items.length; ++i) {
+// if (items[i].equals(version))
+// break;
+// }
+// if (i >= items.length)
+// i = items.length - 1;
+// fACVersionCombo.select(i);
+// }
+//
+// void initializeAMVersion() {
+// String version = "";
+// try {
+// version = getProject().getPersistentProperty(AutotoolsPropertyConstants.AUTOMAKE_VERSION);
+// if (version == null)
+// version = AutotoolsPlugin.getDefault().getPreferenceStore().getString(AutotoolsEditorPreferenceConstants.AUTOMAKE_VERSION);
+// } catch (CoreException e) {
+// // do nothing
+// }
+// String[] items = fAMVersionCombo.getItems();
+// // Try and find which list item matches the current preference stored and
+// // select it in the list.
+// int i;
+// for (i = 0; i < items.length; ++i) {
+// if (items[i].equals(version))
+// break;
+// }
+// if (i >= items.length)
+// i = items.length - 1;
+// fAMVersionCombo.select(i);
+// }
+//
+// void initializeBuild() {
+// String cleanDelete = null;
+// String cleanMakeTarget = null;
+// try {
+// cleanDelete = getProject().getPersistentProperty(AutotoolsPropertyConstants.CLEAN_DELETE);
+// cleanMakeTarget = getProject().getPersistentProperty(AutotoolsPropertyConstants.CLEAN_MAKE_TARGET);
+// } catch (CoreException e) {
+// // do nothing
+// }
+//
+// if (cleanMakeTarget == null) {
+// cleanMakeTarget = AutotoolsPropertyMessages.getString("CleanMakeTarget.default"); // $NON-NLS-1$
+// fCleanMakeTarget.setText(cleanMakeTarget);
+// }
+//
+// if (cleanDelete == null || cleanDelete.equals("false")) {
+// fCleanDelete.setSelection(false);
+// fCleanMake.setSelection(true);
+// fCleanMakeTarget.setEnabled(true);
+// } else {
+// fCleanDelete.setSelection(true);
+// fCleanMake.setSelection(false);
+// fCleanMakeTarget.setEnabled(false);
+// }
+// }
+//
+// private void initialize() {
+// initializeACVersion();
+// initializeAMVersion();
+// initializeBuild();
+// }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsToolsPropertyPage.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsToolsPropertyPage.java
new file mode 100644
index 0000000000..7b56c2b213
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/AutotoolsToolsPropertyPage.java
@@ -0,0 +1,343 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.properties;
+
+import org.eclipse.cdt.core.settings.model.ICResourceDescription;
+import org.eclipse.cdt.managedbuilder.core.IConfiguration;
+import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+public class AutotoolsToolsPropertyPage extends AbstractCPropertyTab {
+
+ public static final String DEFAULT_ACLOCAL = "aclocal"; // $NON-NLS-1$
+ public static final String DEFAULT_AUTOMAKE = "automake"; // $NON-NLS-1$
+ public static final String DEFAULT_AUTOCONF = "autoconf"; // $NON-NLS-1$
+ public static final String DEFAULT_AUTOHEADER = "autoheader"; // $NON-NLS-1$
+ public static final String DEFAULT_AUTORECONF = "autoreconf"; // $NON-NLS-1$
+ public static final String DEFAULT_LIBTOOLIZE = "libtoolize"; // $NON-NLS-1$
+
+ protected Text fAclocalPath;
+ protected Text fAutoheaderPath;
+ protected Text fAutomakePath;
+ protected Text fAutoreconfPath;
+ protected Text fAutoconfPath;
+ protected Text fLibtoolizePath;
+ private IProject project;
+
+
+ private IProject getProject() {
+ IConfiguration c = ManagedBuildManager.getConfigurationForDescription(getResDesc().getConfiguration());
+ return (IProject)c.getManagedProject().getOwner();
+ }
+
+ public boolean canBeVisible() {
+ return true;
+ }
+
+ public void createControls(Composite parent) {
+ // TODO Auto-generated method stub
+ super.createControls(parent);
+ Composite composite= usercomp;
+
+ // assume parent page uses griddata
+ GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_CENTER | GridData.VERTICAL_ALIGN_FILL | GridData.FILL_HORIZONTAL);
+ composite.setLayoutData(gd);
+ GridLayout layout= new GridLayout();
+ layout.numColumns= 2;
+ //PixelConverter pc= new PixelConverter(composite);
+ //layout.verticalSpacing= pc.convertHeightInCharsToPixels(1) / 2;
+ composite.setLayout(layout);
+
+ project = getProject();
+
+ Label label= new Label(composite, SWT.LEFT);
+ label.setText(AutotoolsPropertyMessages.getString("Autotools.aclocalPath")); //$NON-NLS-1$
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ label.setLayoutData(gd);
+
+ /* text window for aclocal path */
+ fAclocalPath = new Text(composite, SWT.BORDER | SWT.SINGLE);
+ fAclocalPath.setToolTipText(AutotoolsPropertyMessages.getString("Autotools.aclocalPath.tooltip")); // $NON-NLS-1$
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
+ fAclocalPath.setLayoutData(gd);
+
+ Label label2= new Label(composite, SWT.LEFT);
+ label2.setText(AutotoolsPropertyMessages.getString("Autotools.automakePath")); //$NON-NLS-1$
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ label2.setLayoutData(gd);
+
+ /* text window for automake path */
+ fAutomakePath = new Text(composite, SWT.BORDER | SWT.SINGLE);
+ fAutomakePath.setToolTipText(AutotoolsPropertyMessages.getString("Autotools.automakePath.tooltip")); // $NON-NLS-1#
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
+ fAutomakePath.setLayoutData(gd);
+
+ Label label3 = new Label(composite, SWT.LEFT);
+ label3.setText(AutotoolsPropertyMessages.getString("Autotools.autoconfPath")); //$NON-NLS-1$
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ label3.setLayoutData(gd);
+
+ /* text window for autoconf path */
+ fAutoconfPath = new Text(composite, SWT.BORDER | SWT.SINGLE);
+ fAutoconfPath.setToolTipText(AutotoolsPropertyMessages.getString("Autotools.autoconfPath.tooltip")); // $NON-NLS-1$
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
+ fAutoconfPath.setLayoutData(gd);
+
+ Label label4= new Label(composite, SWT.LEFT);
+ label4.setText(AutotoolsPropertyMessages.getString("Autotools.autoheaderPath")); //$NON-NLS-1$
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ label4.setLayoutData(gd);
+
+ /* text window for aclocal path */
+ fAutoheaderPath = new Text(composite, SWT.BORDER | SWT.SINGLE);
+ fAutoheaderPath.setToolTipText(AutotoolsPropertyMessages.getString("Autotools.autoheaderPath.tooltip")); // $NON-NLS-1$
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
+ fAutoheaderPath.setLayoutData(gd);
+
+ Label label5= new Label(composite, SWT.LEFT);
+ label5.setText(AutotoolsPropertyMessages.getString("Autotools.autoreconfPath")); //$NON-NLS-1$
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ label5.setLayoutData(gd);
+
+ /* text window for aclocal path */
+ fAutoreconfPath = new Text(composite, SWT.BORDER | SWT.SINGLE);
+ fAutoreconfPath.setToolTipText(AutotoolsPropertyMessages.getString("Autotools.autoreconfPath.tooltip")); // $NON-NLS-1$
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
+ fAutoreconfPath.setLayoutData(gd);
+
+ Label label6= new Label(composite, SWT.LEFT);
+ label6.setText(AutotoolsPropertyMessages.getString("Autotools.libtoolizePath")); //$NON-NLS-1$
+ gd= new GridData();
+ gd.horizontalAlignment= GridData.BEGINNING;
+ label6.setLayoutData(gd);
+
+ /* text window for aclocal path */
+ fLibtoolizePath = new Text(composite, SWT.BORDER | SWT.SINGLE);
+ fLibtoolizePath.setToolTipText(AutotoolsPropertyMessages.getString("Autotools.libtoolizePath.tooltip")); // $NON-NLS-1$
+ gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
+ fLibtoolizePath.setLayoutData(gd);
+
+ initialize();
+ }
+
+ public void performOK() {
+ String aclocalPath = null;
+ String automakePath = null;
+ String autoconfPath = null;
+ String autoheaderPath = null;
+ String autoreconfPath = null;
+ String libtoolizePath = null;
+ try {
+ aclocalPath = project.getPersistentProperty(AutotoolsPropertyConstants.ACLOCAL_TOOL);
+ } catch (CoreException e1) {
+ aclocalPath = DEFAULT_ACLOCAL;
+ }
+
+ String newAclocalPath = fAclocalPath.getText().trim();
+ if (aclocalPath == null || !newAclocalPath.equals(aclocalPath)) {
+ try {
+ project.setPersistentProperty(AutotoolsPropertyConstants.ACLOCAL_TOOL, newAclocalPath);
+ } catch (CoreException e1) {
+ // Not much we can do at this point
+ }
+ }
+
+ try {
+ automakePath = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOMAKE_TOOL);
+ } catch (CoreException e1) {
+ automakePath = DEFAULT_AUTOMAKE;
+ }
+
+ String newAutomakePath = fAutomakePath.getText().trim();
+ if (automakePath == null || !newAutomakePath.equals(automakePath)) {
+ try {
+ project.setPersistentProperty(AutotoolsPropertyConstants.AUTOMAKE_TOOL, newAutomakePath);
+ } catch (CoreException e2) {
+ // Not much we can do at this point
+ }
+ }
+
+ try {
+ autoconfPath = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOCONF_TOOL);
+ } catch (CoreException e1) {
+ autoconfPath = DEFAULT_AUTOCONF;
+ }
+
+ String newAutoconfPath = fAutoconfPath.getText().trim();
+ if (autoconfPath == null || !newAutoconfPath.equals(autoconfPath)) {
+ try {
+ project.setPersistentProperty(AutotoolsPropertyConstants.AUTOCONF_TOOL, newAutoconfPath);
+ } catch (CoreException e2) {
+ // Not much we can do at this point
+ }
+ }
+
+ try {
+ autoheaderPath = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOHEADER_TOOL);
+ } catch (CoreException e1) {
+ autoheaderPath = DEFAULT_AUTOHEADER;
+ }
+
+ String newAutoheaderPath = fAutoheaderPath.getText().trim();
+ if (autoheaderPath == null || !newAutoheaderPath.equals(autoheaderPath)) {
+ try {
+ project.setPersistentProperty(AutotoolsPropertyConstants.AUTOHEADER_TOOL, newAutoheaderPath);
+ } catch (CoreException e2) {
+ // Not much we can do at this point
+ }
+ }
+
+ try {
+ autoreconfPath = project.getPersistentProperty(AutotoolsPropertyConstants.AUTORECONF_TOOL);
+ } catch (CoreException e1) {
+ autoreconfPath = DEFAULT_AUTORECONF;
+ }
+
+ String newAutoreconfPath = fAutoreconfPath.getText().trim();
+ if (autoreconfPath == null || !newAutoreconfPath.equals(autoreconfPath)) {
+ try {
+ project.setPersistentProperty(AutotoolsPropertyConstants.AUTORECONF_TOOL, newAutoreconfPath);
+ } catch (CoreException e2) {
+ // Not much we can do at this point
+ }
+ }
+
+ try {
+ libtoolizePath = project.getPersistentProperty(AutotoolsPropertyConstants.LIBTOOLIZE_TOOL);
+ } catch (CoreException e1) {
+ libtoolizePath = DEFAULT_LIBTOOLIZE;
+ }
+
+ String newLibtoolizePath = fLibtoolizePath.getText().trim();
+ if (libtoolizePath == null || !newLibtoolizePath.equals(libtoolizePath)) {
+ try {
+ project.setPersistentProperty(AutotoolsPropertyConstants.LIBTOOLIZE_TOOL, newLibtoolizePath);
+ } catch (CoreException e2) {
+ // Not much we can do at this point
+ }
+ }
+ }
+
+ protected void performApply(ICResourceDescription src, ICResourceDescription dst) {
+ performOK();
+ }
+
+ public void performDefaults() {
+ // For default tool settings, simply default the base tool names
+ fAclocalPath.setText(DEFAULT_ACLOCAL);
+ fAutomakePath.setText(DEFAULT_AUTOMAKE);
+ fAutoconfPath.setText(DEFAULT_AUTOCONF);
+ fAutoheaderPath.setText(DEFAULT_AUTOHEADER);
+ fAutoreconfPath.setText(DEFAULT_AUTORECONF);
+ fLibtoolizePath.setText(DEFAULT_LIBTOOLIZE);
+ }
+
+ public void updateData(ICResourceDescription cfgd) {
+ // what to do here?
+ }
+
+ public void updateButtons() {
+ // what to do here?
+ }
+
+ public void setVisible (boolean b) {
+ super.setVisible(b);
+ }
+
+ private void initialize() {
+ String aclocalPath = null;
+ String automakePath = null;
+ String autoconfPath = null;
+ String autoheaderPath = null;
+ String autoreconfPath = null;
+ String libtoolizePath = null;
+
+ try {
+ aclocalPath = project.getPersistentProperty(AutotoolsPropertyConstants.ACLOCAL_TOOL);
+ } catch (CoreException e1) {
+ // do nothing
+ }
+
+ if (aclocalPath == null)
+ aclocalPath = DEFAULT_ACLOCAL;
+
+ fAclocalPath.setText(aclocalPath);
+
+ try {
+ automakePath = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOMAKE_TOOL);
+ } catch (CoreException e1) {
+ // do nothing
+ }
+
+ if (automakePath == null)
+ automakePath = DEFAULT_AUTOMAKE;
+
+ fAutomakePath.setText(automakePath);
+
+ try {
+ autoconfPath = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOCONF_TOOL);
+ } catch (CoreException e1) {
+ // do nothing
+ }
+
+ if (autoconfPath == null)
+ autoconfPath = DEFAULT_AUTOCONF;
+
+ fAutoconfPath.setText(autoconfPath);
+
+ try {
+ autoheaderPath = project.getPersistentProperty(AutotoolsPropertyConstants.AUTOHEADER_TOOL);
+ } catch (CoreException e1) {
+ // do nothing
+ }
+
+ if (autoheaderPath == null)
+ autoheaderPath = DEFAULT_AUTOHEADER;
+
+ fAutoheaderPath.setText(autoheaderPath);
+
+ try {
+ autoreconfPath = project.getPersistentProperty(AutotoolsPropertyConstants.AUTORECONF_TOOL);
+ } catch (CoreException e1) {
+ // do nothing
+ }
+
+ if (autoreconfPath == null)
+ autoreconfPath = DEFAULT_AUTORECONF;
+
+ fAutoreconfPath.setText(autoreconfPath);
+
+ try {
+ libtoolizePath = project.getPersistentProperty(AutotoolsPropertyConstants.LIBTOOLIZE_TOOL);
+ } catch (CoreException e1) {
+ // do nothing
+ }
+
+ if (libtoolizePath == null)
+ libtoolizePath = DEFAULT_LIBTOOLIZE;
+
+ fLibtoolizePath.setText(libtoolizePath);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/IProjectPropertyListener.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/IProjectPropertyListener.java
new file mode 100644
index 0000000000..f9752307fb
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/IProjectPropertyListener.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.properties;
+
+import org.eclipse.core.resources.IProject;
+
+public interface IProjectPropertyListener {
+
+ /**
+ * Handler for property changes
+ *
+ * @param project the project to which the property changed
+ * @param property the name of the property changed
+ */
+ void handleProjectPropertyChanged(IProject project, String property);
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/IPropertyChangeManager.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/IPropertyChangeManager.java
new file mode 100644
index 0000000000..65b4fada2d
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/cdt/autotools/ui/properties/IPropertyChangeManager.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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 Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.cdt.autotools.ui.properties;
+
+import org.eclipse.core.resources.IProject;
+
+public interface IPropertyChangeManager {
+
+ /**
+ * Add a project property listener for given project.
+ *
+ * @param project the project to which the listener is interested
+ * @param listener the listener to notify
+ */
+ void addProjectPropertyListener(IProject project, IProjectPropertyListener listener);
+
+ /**
+ * Remove a project property listener.
+ *
+ * @param listener the listener to remove
+ */
+ void removeProjectPropertyListener(IProject project, IProjectPropertyListener listener);
+
+ /**
+ * Notify all listeners of project that a property has changed.
+ *
+ * @param project the project for which the property has changed
+ * @param property the property that has changed
+ */
+ void notifyPropertyListeners(IProject project, String property);
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/MarkerGenerator.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/MarkerGenerator.java
new file mode 100644
index 0000000000..c43f040b21
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/MarkerGenerator.java
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.IMarkerGenerator;
+import org.eclipse.cdt.core.ProblemMarkerInfo;
+import org.eclipse.cdt.core.model.ICModelMarker;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.runtime.CoreException;
+
+public abstract class MarkerGenerator implements IMarkerGenerator {
+
+ /**
+ * Constructor for MarkerGenerator
+ */
+ public MarkerGenerator() {
+ super();
+ }
+
+ /*
+ * callback from Output Parser
+ */
+ public void addMarker(IResource file, int lineNumber, String errorDesc, int severity, String errorVar) {
+
+ try {
+ IMarker[] cur = file.findMarkers(ICModelMarker.C_MODEL_PROBLEM_MARKER, false, IResource.DEPTH_ONE);
+ /*
+ * Try to find matching markers and don't put in duplicates
+ */
+ if ((cur != null) && (cur.length > 0)) {
+ for (int i = 0; i < cur.length; i++) {
+ int line = ((Integer) cur[i].getAttribute(IMarker.LOCATION)).intValue();
+ int sev = ((Integer) cur[i].getAttribute(IMarker.SEVERITY)).intValue();
+ String mesg = (String) cur[i].getAttribute(IMarker.MESSAGE);
+ if (line == lineNumber && sev == mapMarkerSeverity(severity) && mesg.equals(errorDesc)) {
+ return;
+ }
+ }
+ }
+
+ IMarker marker = file.createMarker(ICModelMarker.C_MODEL_PROBLEM_MARKER);
+ marker.setAttribute(IMarker.LOCATION, lineNumber);
+ marker.setAttribute(IMarker.MESSAGE, errorDesc);
+ marker.setAttribute(IMarker.SEVERITY, mapMarkerSeverity(severity));
+ marker.setAttribute(IMarker.LINE_NUMBER, lineNumber);
+ marker.setAttribute(IMarker.CHAR_START, -1);
+ marker.setAttribute(IMarker.CHAR_END, -1);
+ if (errorVar != null) {
+ marker.setAttribute(ICModelMarker.C_MODEL_MARKER_VARIABLE, errorVar);
+ }
+ }
+ catch (CoreException e) {
+ CCorePlugin.log(e.getStatus());
+ }
+
+ }
+
+ public abstract IProject getProject();
+
+ /*
+ * callback from Output Parser
+ */
+ public void addMarker(ProblemMarkerInfo problemMarkerInfo) {
+ try {
+ IResource markerResource = problemMarkerInfo.file ;
+ if (markerResource==null) {
+ markerResource = getProject();
+ }
+ IMarker[] cur = markerResource.findMarkers(ICModelMarker.C_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_ONE);
+ /*
+ * Try to find matching markers and don't put in duplicates
+ */
+ if ((cur != null) && (cur.length > 0)) {
+ for (int i = 0; i < cur.length; i++) {
+ int line = ((Integer) cur[i].getAttribute(IMarker.LOCATION)).intValue();
+ int sev = ((Integer) cur[i].getAttribute(IMarker.SEVERITY)).intValue();
+ String mesg = (String) cur[i].getAttribute(IMarker.MESSAGE);
+ if (line == problemMarkerInfo.lineNumber && sev == mapMarkerSeverity(problemMarkerInfo.severity) && mesg.equals(problemMarkerInfo.description)) {
+ return;
+ }
+ }
+ }
+
+ IMarker marker = markerResource.createMarker(ICModelMarker.C_MODEL_PROBLEM_MARKER);
+ marker.setAttribute(IMarker.LOCATION, problemMarkerInfo.lineNumber);
+ marker.setAttribute(IMarker.MESSAGE, problemMarkerInfo.description);
+ marker.setAttribute(IMarker.SEVERITY, mapMarkerSeverity(problemMarkerInfo.severity));
+ marker.setAttribute(IMarker.LINE_NUMBER, problemMarkerInfo.lineNumber);
+ marker.setAttribute(IMarker.CHAR_START, -1);
+ marker.setAttribute(IMarker.CHAR_END, -1);
+ if (problemMarkerInfo.variableName != null) {
+ marker.setAttribute(ICModelMarker.C_MODEL_MARKER_VARIABLE, problemMarkerInfo.variableName);
+ }
+ if (problemMarkerInfo.externalPath != null) {
+ marker.setAttribute(ICModelMarker.C_MODEL_MARKER_EXTERNAL_LOCATION, problemMarkerInfo.externalPath.toOSString());
+ }
+ }
+ catch (CoreException e) {
+ CCorePlugin.log(e.getStatus());
+ }
+ }
+
+ private int mapMarkerSeverity(int severity) {
+ switch (severity) {
+ case SEVERITY_ERROR_BUILD :
+ case SEVERITY_ERROR_RESOURCE :
+ return IMarker.SEVERITY_ERROR;
+ case SEVERITY_INFO :
+ return IMarker.SEVERITY_INFO;
+ case SEVERITY_WARNING :
+ return IMarker.SEVERITY_WARNING;
+ }
+ return IMarker.SEVERITY_ERROR;
+ }
+
+ /* (non-Javadoc)
+ * Removes the IMarkers for the project specified in the argument if the
+ * project exists, and is open.
+ *
+ * @param project
+ */
+ public void removeAllMarkers(IProject project) {
+ if (project == null || !project.isAccessible()) return;
+
+ // Clear out the problem markers
+ IWorkspace workspace = project.getWorkspace();
+ IMarker[] markers;
+ try {
+ markers = project.findMarkers(ICModelMarker.C_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_INFINITE);
+ } catch (CoreException e) {
+ // Handled just about every case in the sanity check
+ return;
+ }
+ if (markers != null) {
+ try {
+ workspace.deleteMarkers(markers);
+ } catch (CoreException e) {
+ // The only situation that might cause this is some sort of resource change event
+ return;
+ }
+ }
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/AutotoolsConsole.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/AutotoolsConsole.java
new file mode 100644
index 0000000000..982764a120
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/AutotoolsConsole.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2004, 2009 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc - Adapted for Autotools usage
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import org.eclipse.cdt.ui.IBuildConsoleManager;
+import org.eclipse.core.resources.IProject;
+
+public class AutotoolsConsole extends Console {
+ IProject project;
+ IBuildConsoleManager fConsoleManager;
+
+ private static final String CONTEXT_MENU_ID = "CAutotoolsConsole"; //$NON-NLS-1$
+ private static final String CONSOLE_NAME = ConsoleMessages.getString("AutotoolsConsole.name"); //$NON-NLS-1$
+
+ public AutotoolsConsole() {
+ super(CONSOLE_NAME, CONTEXT_MENU_ID);
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CBuildStepsConsole.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CBuildStepsConsole.java
new file mode 100644
index 0000000000..5ba325974f
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CBuildStepsConsole.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2004, 2009 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc - Adapted for Autotools usage
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import org.eclipse.cdt.ui.IBuildConsoleManager;
+import org.eclipse.core.resources.IProject;
+
+public class CBuildStepsConsole extends Console {
+ IProject project;
+ IBuildConsoleManager fConsoleManager;
+
+ private static final String CONTEXT_MENU_ID = "CAutotoolsBuildStepsConsole"; //$NON-NLS-1$
+ private static final String CONSOLE_NAME = ConsoleMessages.getString("BuildStepsConsole.name"); //$NON-NLS-1$
+
+ public CBuildStepsConsole() {
+ super(CONSOLE_NAME, CONTEXT_MENU_ID);
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CConfigureConsole.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CConfigureConsole.java
new file mode 100644
index 0000000000..1925fcd7c2
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CConfigureConsole.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2004, 2009 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import org.eclipse.cdt.ui.IBuildConsoleManager;
+import org.eclipse.core.resources.IProject;
+
+public class CConfigureConsole extends Console {
+ IProject project;
+ IBuildConsoleManager fConsoleManager;
+
+ private static final String CONTEXT_MENU_ID = "CAutotoolsConfigureConsole"; //$NON-NLS-1$
+ private static final String CONSOLE_NAME = ConsoleMessages.getString("ConfigureConsole.name"); //$NON-NLS-1$
+
+ public CConfigureConsole() {
+ super(CONSOLE_NAME, CONTEXT_MENU_ID);
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CWordFinder.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CWordFinder.java
new file mode 100644
index 0000000000..cc28694b10
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/CWordFinder.java
@@ -0,0 +1,283 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Region;
+
+
+/**
+ * This is a helper class for the text editor to be able to determine, given a
+ * particular offset in a document, various candidates segments for things like
+ * context help, proposals and hovering.
+ */
+public class CWordFinder {
+
+ private static final char CBRACE_L = '{';
+ private static final char CBRACE_R = '}';
+ private static final char BRACE_R = ')';
+
+ /**
+ * This method determines for a given offset into a given document what the
+ * region is which defines the current word. A word is defined as the set of
+ * non "C" identifiers. So assuming that ! indicated the current cursor
+ * postion: !afunction(int a, int b) --> word = length 0 afunc!tion(int a,
+ * int b) --> word = afunction afunction!(int a, int b) --> word = afunction
+ * afunction(!int a, int b) --> word = length 0 afunction(int a,! int b) -->
+ * word = length 0 afunction(!) --> word = length 0
+ *
+ * @param document
+ * The document to be examined
+ * @param offset
+ * The offset into the document where a word should be
+ * idendified.
+ * @return The region defining the current word, which may be a region of
+ * length 0 if the offset is not in a word, or null if there is an
+ * error accessing the docment data.
+ */
+ public static IRegion findWord(IDocument document, int offset) {
+ int start = -1;
+ int end = -1;
+
+ try {
+ int pos = offset;
+ char c;
+
+ while (pos >= 0) {
+ c = document.getChar(pos);
+ if (!Character.isJavaIdentifierPart(c))
+ break;
+ --pos;
+ }
+
+ start = pos + 1;
+
+ pos = offset;
+ int length = document.getLength();
+
+ while (pos < length) {
+ c = document.getChar(pos);
+ if (!Character.isJavaIdentifierPart(c))
+ break;
+ ++pos;
+ }
+
+ end = pos;
+
+ } catch (BadLocationException x) {
+ }
+
+ if (start > -1 && end > -1) {
+ if (start >= offset && end == offset)
+ return new Region(offset, 0);
+ else
+ return new Region(start, end - start);
+ }
+
+ return null;
+ }
+
+ /**
+ * This method will determine the region for the name of the function within
+ * which the current offset is contained.
+ *
+ * @param document
+ * The document to be examined
+ * @param offset
+ * The offset into the document where a word should be
+ * idendified.
+ * @return The region defining the current word, which may be a region of
+ * length 0 if the offset is not in a function, or null if there is
+ * an error accessing the docment data.
+ */
+ public static IRegion findFunction(IDocument document, int offset) {
+ int leftbracket = -1;
+ int leftbracketcount = 0;
+ int rightbracket = -1;
+ int rightbracketcount = 0;
+ int functionstart = -1;
+ int functionend = -1;
+
+ try {
+ int length = document.getLength();
+ int pos;
+ char c;
+
+ //Find most relevant right bracket from our position
+ pos = offset;
+ rightbracketcount = leftbracketcount = 0;
+ while (pos < length) {
+ c = document.getChar(pos);
+
+ if (c == ')') {
+ rightbracketcount++;
+ if (rightbracketcount >= leftbracketcount) {
+ rightbracket = pos;
+ break;
+ }
+ }
+
+ if (c == '(') {
+ leftbracketcount++;
+ }
+
+ if (c == ';') {
+ break;
+ }
+
+ pos++;
+ }
+
+ if (rightbracket == -1) {
+ return new Region(offset, 0);
+ }
+
+ //Now backtrack our way from the rightbracket to the left
+ pos = rightbracket;
+ rightbracketcount = leftbracketcount = 0;
+ while (pos >= 0) {
+ c = document.getChar(pos);
+
+ if (c == ')') {
+ rightbracketcount++;
+ }
+
+ if (c == '(') {
+ leftbracketcount++;
+ if (leftbracketcount >= rightbracketcount) {
+ leftbracket = pos;
+ break;
+ }
+ }
+
+ if (c == ';') {
+ break;
+ }
+
+ pos--;
+ }
+
+ if (leftbracket == -1) {
+ return new Region(offset, 0);
+ }
+
+ //Now work our way to the function name
+ pos = leftbracket - 1;
+ while (pos >= 0) {
+ c = document.getChar(pos);
+ if (functionend == -1 && c == ' ') {
+ pos--;
+ continue;
+ }
+
+ if (!Character.isJavaIdentifierPart(c)) {
+ break;
+ }
+
+ functionstart = pos;
+ if (functionend == -1) {
+ functionend = pos;
+ }
+
+ pos--;
+ }
+ } catch (BadLocationException x) {
+ /* Ignore */
+ }
+
+ if (functionstart > -1 && functionend > -1) {
+ return new Region(functionstart, functionend - functionstart + 1);
+ }
+
+ return null;
+ }
+
+ /**
+ * This method will determine whether current offset is contained
+ * in any function's body or it's outside it.
+ *
+ * @param document
+ * The document to be examined
+ * @param offset
+ * The offset into the document
+ * @return
+ * <code>true</code> if there is no function body around offset
+ * <code>false</code> otherwise
+ */
+ public static boolean isGlobal(IDocument document, int offset) {
+ try {
+ int pos = offset;
+ int bracketcount = 0;
+ char c;
+
+ //Find left curled bracket from our position
+ while (pos > 0) {
+ c = document.getChar(pos--);
+
+ if (c == CBRACE_R) {
+ bracketcount++; // take into account nested blocks
+ } else if (c == CBRACE_L) {
+ if (bracketcount-- == 0) {
+ do {
+ c = document.getChar(pos--);
+ if (c == BRACE_R) return false;
+ } while (Character.isWhitespace(c));
+ // container block seems to be not a function or statement body
+ pos++; // step back one symbol
+ bracketcount = 0; // let's search for upper block
+ }
+ }
+ }
+
+ } catch (BadLocationException x) { /* Ignore */ }
+ // return true in case of unknown result or exception
+ return true;
+ }
+
+ /**
+ * Searches for line feed symbols in string.
+ * First met '\r' or '\n' is treated as LF symbol
+ *
+ * @param s
+ * string to search in.
+ * @return number of LFs met.
+ */
+ public static int countLFs (String s) {
+ int counter = 0;
+ char lf = 0;
+ char c;
+ for (int i=0; i<s.length(); i++) {
+ c = s.charAt(i);
+ if (lf == 0) {
+ if (c == '\n' || c == '\r') {
+ lf = c;
+ counter++;
+ }
+ } else if (lf == c) counter++;
+ }
+ return counter;
+ }
+
+ /**
+ * Checks whether the string contains any C-block delimiters ( { } )
+ *
+ * @param s
+ * text to check
+ * @return true if curled brace found.
+ */
+ public static boolean hasCBraces (String s) {
+ if (s.indexOf(CBRACE_L) > -1 || s.indexOf(CBRACE_R) > -1) return true;
+ else return false;
+ }
+}
+
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/Console.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/Console.java
new file mode 100644
index 0000000000..695e489a1b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/Console.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2004 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import org.eclipse.cdt.core.ConsoleOutputStream;
+import org.eclipse.cdt.core.resources.IConsole;
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.cdt.ui.IBuildConsoleManager;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+
+public class Console implements IConsole {
+ IProject project;
+ IBuildConsoleManager fConsoleManager;
+
+ public Console(String consoleName, String contextId) {
+ fConsoleManager = CUIPlugin.getDefault().getConsoleManager(consoleName,
+ contextId);
+ }
+
+// /**
+// * Constructor for ConfigureConsole.
+// */
+// public CConfigureConsole() {
+// fConsoleManager = AutotoolsPlugin.getDefault().getConsoleManager();
+// }
+//
+
+ public void start(IProject project ) {
+ this.project = project;
+ fConsoleManager.getConsole(project).start(project);
+ }
+
+ /**
+ * @throws CoreException
+ * @see org.eclipse.cdt.core.resources.IConsole#getOutputStream()
+ */
+ public ConsoleOutputStream getOutputStream() throws CoreException {
+ return fConsoleManager.getConsole(project).getOutputStream();
+ }
+
+ public ConsoleOutputStream getInfoStream() throws CoreException {
+ return fConsoleManager.getConsole(project).getInfoStream();
+ }
+
+ public ConsoleOutputStream getErrorStream() throws CoreException {
+ return fConsoleManager.getConsole(project).getErrorStream();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ConsoleMessages.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ConsoleMessages.java
new file mode 100644
index 0000000000..a9b3d21ef0
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ConsoleMessages.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2004 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class ConsoleMessages {
+
+ public static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.cdt.autotools.ui.ConsoleMessages";//$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+ private ConsoleMessages() {
+
+ }
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ConsoleMessages.properties b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ConsoleMessages.properties
new file mode 100644
index 0000000000..7c4510df87
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/ConsoleMessages.properties
@@ -0,0 +1,25 @@
+###############################################################################
+# Copyright (c) 2003, 2004 QNX Software Systems 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:
+# QNX Software Systems - Initial API and implementation
+###############################################################################
+ConfigureConsole.name=Configure
+BuildStepsConsole.name=Build Steps
+AutotoolsConsole.name=Autotools
+
+find_replace_action.label=&Find/Replace...@Ctrl+F
+find_replace_action.tooltip=Find/Replace
+find_replace_action.image=
+find_replace_action.description=Find/Replace
+
+ConfigureConsolePage.&Copy@Ctrl+C_6=&Copy@Ctrl+C
+ConfigureConsolePage.Copy_7=Copy
+ConfigureConsolePage.Select_&All@Ctrl+A_12=Select &All@Ctrl+A
+ConfigureConsolePage.Select_All=Select All
+
+ScrollLockAction.Scroll_Lock_1=Scroll Lock
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTMLPrinter.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTMLPrinter.java
new file mode 100644
index 0000000000..a9de7d1159
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/HTMLPrinter.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2000 2005 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * QNX Software System
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import java.io.IOException;
+import java.io.Reader;
+
+
+/**
+ * Provides a set of convenience methods for creating HTML pages.
+ */
+public class HTMLPrinter {
+
+ private HTMLPrinter() {
+ }
+
+ private static String replace(String text, char c, String s) {
+
+ int previous= 0;
+ int current= text.indexOf(c, previous);
+
+ if (current == -1)
+ return text;
+
+ StringBuffer buffer= new StringBuffer();
+ while (current > -1) {
+ buffer.append(text.substring(previous, current));
+ buffer.append(s);
+ previous= current + 1;
+ current= text.indexOf(c, previous);
+ }
+ buffer.append(text.substring(previous));
+
+ return buffer.toString();
+ }
+
+ public static String convertToHTMLContent(String content) {
+ content= replace(content, '<', "&lt;"); //$NON-NLS-1$
+ return replace(content, '>', "&gt;"); //$NON-NLS-1$
+ }
+
+ public static String read(Reader rd) {
+
+ StringBuffer buffer= new StringBuffer();
+ char[] readBuffer= new char[2048];
+
+ try {
+ int n= rd.read(readBuffer);
+ while (n > 0) {
+ buffer.append(readBuffer, 0, n);
+ n= rd.read(readBuffer);
+ }
+ return buffer.toString();
+ } catch (IOException x) {
+ }
+
+ return null;
+ }
+
+ public static void insertPageProlog(StringBuffer buffer, int position) {
+ buffer.insert(position, "<html><body text=\"#000000\" bgcolor=\"#FFFF88\"><font size=-1>"); //$NON-NLS-1$
+ }
+
+ public static void addPageProlog(StringBuffer buffer) {
+ insertPageProlog(buffer, buffer.length());
+ }
+
+ public static void addPageEpilog(StringBuffer buffer) {
+ buffer.append("</font></body></html>"); //$NON-NLS-1$
+ }
+
+ public static void startBulletList(StringBuffer buffer) {
+ buffer.append("<ul>"); //$NON-NLS-1$
+ }
+
+ public static void endBulletList(StringBuffer buffer) {
+ buffer.append("</ul>"); //$NON-NLS-1$
+ }
+
+ public static void addBullet(StringBuffer buffer, String bullet) {
+ if (bullet != null) {
+ buffer.append("<li>"); //$NON-NLS-1$
+ buffer.append(bullet);
+ buffer.append("</li>"); //$NON-NLS-1$
+ }
+ }
+
+ public static void addSmallHeader(StringBuffer buffer, String header) {
+ if (header != null) {
+ buffer.append("<h5>"); //$NON-NLS-1$
+ buffer.append(header);
+ buffer.append("</h5>"); //$NON-NLS-1$
+ }
+ }
+
+ public static void addParagraph(StringBuffer buffer, String paragraph) {
+ if (paragraph != null) {
+ buffer.append("<p>"); //$NON-NLS-1$
+ buffer.append(paragraph);
+ }
+ }
+
+ public static void addParagraph(StringBuffer buffer, Reader paragraphReader) {
+ if (paragraphReader != null)
+ addParagraph(buffer, read(paragraphReader));
+ }
+} \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/LineBreakingReader.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/LineBreakingReader.java
new file mode 100644
index 0000000000..52fb3e31e5
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/LineBreakingReader.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2000 2005 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * QNX Software System
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.Reader;
+
+import java.text.BreakIterator;
+import org.eclipse.swt.graphics.GC;
+
+/*
+ * Not a real reader. Could change if requested
+ */
+public class LineBreakingReader {
+
+ private BufferedReader fReader;
+ private GC fGC;
+ private int fMaxWidth;
+
+ private String fLine;
+ private int fOffset;
+
+ private BreakIterator fLineBreakIterator;
+ private int findNextBreakOffset(int currOffset) {
+ int currWidth= 0;
+ int nextOffset= fLineBreakIterator.following(currOffset);
+ while (nextOffset != BreakIterator.DONE) {
+ String word= fLine.substring(currOffset, nextOffset);
+ int wordWidth= fGC.textExtent(word).x;
+ int nextWidth= wordWidth + currWidth;
+ if (nextWidth > fMaxWidth) {
+ if (currWidth > 0) {
+ return currOffset;
+ }
+ return nextOffset;
+ }
+ currWidth= nextWidth;
+ currOffset= nextOffset;
+ nextOffset= fLineBreakIterator.next();
+ }
+ return nextOffset;
+ }
+ private int findWordBegin(int idx) {
+ while (idx < fLine.length() && Character.isWhitespace(fLine.charAt(idx))) {
+ idx++;
+ }
+ return idx;
+ }
+ /**
+ * Creates a reader that breaks an input text to fit in a given width.
+ * @param reader Reader of the input text
+ * @param gc The graphic context that defines the currently used font sizes
+ * @param maxLineWidth The max width (pixes) where the text has to fit in
+ */
+ public LineBreakingReader(Reader reader, GC gc, int maxLineWidth) {
+ fReader= new BufferedReader(reader);
+ fGC= gc;
+ fMaxWidth= maxLineWidth;
+ fOffset= 0;
+ fLine= null;
+ fLineBreakIterator= BreakIterator.getLineInstance();
+ }
+
+ public boolean isFormattedLine() {
+ return fLine != null;
+ }
+
+ /**
+ * Reads the next line. The lengths of the line will not exceed the gived maximum
+ * width.
+ */
+ public String readLine() throws IOException {
+ if (fLine == null) {
+ String line= fReader.readLine();
+ if (line == null) {
+ return null;
+ }
+
+ int lineLen= fGC.textExtent(line).x;
+ if (lineLen < fMaxWidth) {
+ return line;
+ }
+ fLine= line;
+ fLineBreakIterator.setText(line);
+ fOffset= 0;
+ }
+ int breakOffset= findNextBreakOffset(fOffset);
+ String res;
+ if (breakOffset != BreakIterator.DONE) {
+ res= fLine.substring(fOffset, breakOffset);
+ fOffset= findWordBegin(breakOffset);
+ if (fOffset == fLine.length()) {
+ fLine= null;
+ }
+ } else {
+ res= fLine.substring(fOffset);
+ fLine= null;
+ }
+ return res;
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/SingleCharReader.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/SingleCharReader.java
new file mode 100644
index 0000000000..1d48fcc21b
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/SingleCharReader.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2000 2005 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * QNX Software System
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+import java.io.IOException;
+import java.io.Reader;
+
+
+public abstract class SingleCharReader extends Reader {
+
+ /**
+ * @see Reader#read(char)
+ */
+ public abstract int read() throws IOException;
+
+
+ /**
+ * @see Reader#read(char[],int,int)
+ */
+ public int read(char cbuf[], int off, int len) throws IOException {
+ int end= off + len;
+ for (int i= off; i < end; i++) {
+ int ch= read();
+ if (ch == -1) {
+ if (i == off) {
+ return -1;
+ }
+ return i - off;
+ }
+ cbuf[i]= (char)ch;
+ }
+ return len;
+ }
+
+ /**
+ * @see Reader#ready()
+ */
+ public boolean ready() throws IOException {
+ return true;
+ }
+
+ /**
+ * Gets the content as a String
+ */
+ public String getString() throws IOException {
+ StringBuffer buf= new StringBuffer();
+ int ch;
+ while ((ch= read()) != -1) {
+ buf.append((char)ch);
+ }
+ return buf.toString();
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/SubstitutionTextReader.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/SubstitutionTextReader.java
new file mode 100644
index 0000000000..16d8400b98
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/SubstitutionTextReader.java
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright (c) 2000 2005 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * QNX Software System
+ *******************************************************************************/
+package org.eclipse.linuxtools.internal.cdt.autotools.ui;
+
+
+import java.io.IOException;
+import java.io.Reader;
+
+
+/**
+ * Reads the text contents from a reader and computes for each character
+ * a potential substitution. The substitution may eat more characters than
+ * only the one passed into the computation routine.
+ */
+public abstract class SubstitutionTextReader extends SingleCharReader {
+
+ protected static final String LINE_DELIM= System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ private Reader fReader;
+ private boolean fWasWhiteSpace;
+ private int fCharAfterWhiteSpace;
+
+ private boolean fReadFromBuffer;
+ private StringBuffer fBuffer;
+ private int fIndex;
+
+
+ protected SubstitutionTextReader(Reader reader) {
+ fReader= reader;
+ fBuffer= new StringBuffer();
+ fIndex= 0;
+ fReadFromBuffer= false;
+ fCharAfterWhiteSpace= -1;
+ fWasWhiteSpace= true;
+ }
+
+ /**
+ * Implement to compute the substitution for the given character and
+ * if necessary subsequent characters. Use <code>nextChar</code>
+ * to read subsequent characters.
+ */
+ protected abstract String computeSubstitution(int c) throws IOException;
+
+ /**
+ * Returns the internal reader.
+ */
+ protected Reader getReader() {
+ return fReader;
+ }
+
+ /**
+ * Returns the next character.
+ */
+ protected int nextChar() throws IOException {
+ fReadFromBuffer= (fBuffer.length() > 0);
+ if (fReadFromBuffer) {
+ char ch= fBuffer.charAt(fIndex++);
+ if (fIndex >= fBuffer.length()) {
+ fBuffer.setLength(0);
+ fIndex= 0;
+ }
+ return ch;
+ }
+ int ch= fCharAfterWhiteSpace;
+ if (ch == -1) {
+ ch= fReader.read();
+ }
+ if (Character.isWhitespace((char)ch)) {
+ do {
+ ch= fReader.read();
+ } while (Character.isWhitespace((char)ch));
+ if (ch != -1) {
+ fCharAfterWhiteSpace= ch;
+ return ' ';
+ }
+ } else {
+ fCharAfterWhiteSpace= -1;
+ }
+ return ch;
+ }
+
+ /**
+ * @see Reader#read()
+ */
+ public int read() throws IOException {
+ int c;
+ do {
+
+ c= nextChar();
+ while (!fReadFromBuffer) {
+ String s= computeSubstitution(c);
+ if (s == null)
+ break;
+ if (s.length() > 0)
+ fBuffer.insert(0, s);
+ c= nextChar();
+ }
+
+ } while (fWasWhiteSpace && (c == ' '));
+
+ fWasWhiteSpace= (c == ' ' || c == '\r' || c == '\n');
+ return c;
+ }
+
+ /**
+ * @see Reader#ready()
+ */
+ public boolean ready() throws IOException {
+ return fReader.ready();
+ }
+
+ /**
+ * @see Reader#close()
+ */
+ public void close() throws IOException {
+ fReader.close();
+ }
+
+ /**
+ * @see Reader#reset()
+ */
+ public void reset() throws IOException {
+ fReader.reset();
+ fWasWhiteSpace= true;
+ fCharAfterWhiteSpace= -1;
+ fBuffer.setLength(0);
+ fIndex= 0;
+ }
+} \ No newline at end of file
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsEditorPreferenceConstants.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsEditorPreferenceConstants.java
new file mode 100644
index 0000000000..5fbd71076a
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/AutotoolsEditorPreferenceConstants.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2005, 2007, 2009 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ * Red Hat Inc. - rename to use with Autotools editors
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+
+/**
+ * MakefileEditorPreferenceConstants
+ */
+public class AutotoolsEditorPreferenceConstants {
+
+ /**
+ *
+ */
+ private AutotoolsEditorPreferenceConstants() {
+ }
+
+ /**
+ * The symbolic names for colors for displaying code assist proposals
+ * @see org.eclipse.jface.resource.ColorRegistry
+ */
+ public static final String CURRENT_LINE_COLOR = "org.eclipse.linuxtools.cdt.autotools.automake.ui.currentLineHightlightColor"; //$NON-NLS-1$
+ public static final String LINE_NUMBER_RULER_COLOR = "org.eclipse.linuxtools.cdt.autotools.automake.ui.lineNumberForegroundColor"; //$NON-NLS-1$
+ public static final String PRINT_MARGIN_COLOR = "org.eclipse.linuxtools.cdt.autotools.automake.ui.printMarginColor"; //$NON-NLS-1$
+
+ /**
+ * Preference key suffix for bold text style preference keys.
+ *
+ */
+ public static final String EDITOR_BOLD_SUFFIX= "_bold"; //$NON-NLS-1$
+
+ /**
+ * Preference key suffix for italic text style preference keys.
+ */
+ public static final String EDITOR_ITALIC_SUFFIX= "_italic"; //$NON-NLS-1$
+
+
+ public static final String EDITOR_FOLDING_MACRODEF = "editor_folding_default_macrodef"; //$NON-NLS-1$
+
+ public static final String EDITOR_FOLDING_RULE = "editor_folding_default_rule"; //$NON-NLS-1$
+
+ public static final String EDITOR_FOLDING_CASE = "editor_folding_default_case"; //$NON-NLS-1$
+
+ public static final String EDITOR_FOLDING_CONDITIONAL = "editor_folding_default_conditional"; //$NON-NLS-1$
+
+ public static final String EDITOR_FOLDING_LOOP = "editor_folding_default_loop"; //$NON-NLS-1$
+
+ public static final String EDITOR_FOLDING_ENABLED = "editor_folding_enabled"; //$NON-NLS-1$
+
+ public static final String AUTOCONF_VERSION = "autoconf_version"; //$NON-NLS-1$
+
+ public static final String AUTOMAKE_VERSION = "automake_version"; //$NON-NLS-1$
+
+ public static final String LATEST_AC_VERSION = "2.61"; //$NON-NLS-1$
+
+ public static final String LATEST_AM_VERSION = "1.9.6"; //$NON-NLS-1$
+
+ public static void initializeDefaultValues(IPreferenceStore store) {
+
+ store.setDefault(AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_ENABLED, false);
+ store.setDefault(AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_MACRODEF, false);
+ store.setDefault(AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_RULE, true);
+ store.setDefault(AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_CASE, true);
+ store.setDefault(AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_CONDITIONAL, true);
+ store.setDefault(AutotoolsEditorPreferenceConstants.EDITOR_FOLDING_LOOP, true);
+ store.setDefault(AutotoolsEditorPreferenceConstants.AUTOCONF_VERSION, LATEST_AC_VERSION);
+ store.setDefault(AutotoolsEditorPreferenceConstants.AUTOMAKE_VERSION, LATEST_AM_VERSION);
+ }
+
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/OverlayPreferenceStore.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/OverlayPreferenceStore.java
new file mode 100644
index 0000000000..3c6a672572
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/OverlayPreferenceStore.java
@@ -0,0 +1,455 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceStore;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+
+/**
+ * OverlayPreferenceStore
+ */
+/**
+ * An overlaying preference store.
+ */
+class OverlayPreferenceStore implements IPreferenceStore {
+
+
+ public static final class TypeDescriptor {
+ TypeDescriptor() {
+ }
+ }
+
+ public static final TypeDescriptor BOOLEAN= new TypeDescriptor();
+ public static final TypeDescriptor DOUBLE= new TypeDescriptor();
+ public static final TypeDescriptor FLOAT= new TypeDescriptor();
+ public static final TypeDescriptor INT= new TypeDescriptor();
+ public static final TypeDescriptor LONG= new TypeDescriptor();
+ public static final TypeDescriptor STRING= new TypeDescriptor();
+
+ public static class OverlayKey {
+
+ TypeDescriptor fDescriptor;
+ String fKey;
+
+ public OverlayKey(TypeDescriptor descriptor, String key) {
+ fDescriptor= descriptor;
+ fKey= key;
+ }
+ }
+
+ private class PropertyListener implements IPropertyChangeListener {
+
+ /*
+ * @see IPropertyChangeListener#propertyChange(PropertyChangeEvent)
+ */
+ public void propertyChange(PropertyChangeEvent event) {
+ OverlayKey key= findOverlayKey(event.getProperty());
+ if (key != null)
+ propagateProperty(fParent, key, fStore);
+ }
+ }
+
+
+ IPreferenceStore fParent;
+ IPreferenceStore fStore;
+ private OverlayKey[] fOverlayKeys;
+
+ private PropertyListener fPropertyListener;
+
+
+ public OverlayPreferenceStore(IPreferenceStore parent, OverlayKey[] overlayKeys) {
+ fParent= parent;
+ fOverlayKeys= overlayKeys;
+ fStore= new PreferenceStore();
+ }
+
+ OverlayKey findOverlayKey(String key) {
+ for (int i= 0; i < fOverlayKeys.length; i++) {
+ if (fOverlayKeys[i].fKey.equals(key))
+ return fOverlayKeys[i];
+ }
+ return null;
+ }
+
+ private boolean covers(String key) {
+ return (findOverlayKey(key) != null);
+ }
+
+ void propagateProperty(IPreferenceStore orgin, OverlayKey key, IPreferenceStore target) {
+
+ if (orgin.isDefault(key.fKey)) {
+ if (!target.isDefault(key.fKey))
+ target.setToDefault(key.fKey);
+ return;
+ }
+
+ TypeDescriptor d= key.fDescriptor;
+ if (BOOLEAN == d) {
+
+ boolean originValue= orgin.getBoolean(key.fKey);
+ boolean targetValue= target.getBoolean(key.fKey);
+ if (targetValue != originValue)
+ target.setValue(key.fKey, originValue);
+
+ } else if (DOUBLE == d) {
+
+ double originValue= orgin.getDouble(key.fKey);
+ double targetValue= target.getDouble(key.fKey);
+ if (targetValue != originValue)
+ target.setValue(key.fKey, originValue);
+
+ } else if (FLOAT == d) {
+
+ float originValue= orgin.getFloat(key.fKey);
+ float targetValue= target.getFloat(key.fKey);
+ if (targetValue != originValue)
+ target.setValue(key.fKey, originValue);
+
+ } else if (INT == d) {
+
+ int originValue= orgin.getInt(key.fKey);
+ int targetValue= target.getInt(key.fKey);
+ if (targetValue != originValue)
+ target.setValue(key.fKey, originValue);
+
+ } else if (LONG == d) {
+
+ long originValue= orgin.getLong(key.fKey);
+ long targetValue= target.getLong(key.fKey);
+ if (targetValue != originValue)
+ target.setValue(key.fKey, originValue);
+
+ } else if (STRING == d) {
+
+ String originValue= orgin.getString(key.fKey);
+ String targetValue= target.getString(key.fKey);
+ if (targetValue != null && originValue != null && !targetValue.equals(originValue))
+ target.setValue(key.fKey, originValue);
+
+ }
+ }
+
+ public void propagate() {
+ for (int i= 0; i < fOverlayKeys.length; i++)
+ propagateProperty(fStore, fOverlayKeys[i], fParent);
+ }
+
+ private void loadProperty(IPreferenceStore orgin, OverlayKey key, IPreferenceStore target, boolean forceInitialization) {
+ TypeDescriptor d= key.fDescriptor;
+ if (BOOLEAN == d) {
+
+ if (forceInitialization)
+ target.setValue(key.fKey, true);
+ target.setValue(key.fKey, orgin.getBoolean(key.fKey));
+ target.setDefault(key.fKey, orgin.getDefaultBoolean(key.fKey));
+
+ } else if (DOUBLE == d) {
+
+ if (forceInitialization)
+ target.setValue(key.fKey, 1.0D);
+ target.setValue(key.fKey, orgin.getDouble(key.fKey));
+ target.setDefault(key.fKey, orgin.getDefaultDouble(key.fKey));
+
+ } else if (FLOAT == d) {
+
+ if (forceInitialization)
+ target.setValue(key.fKey, 1.0F);
+ target.setValue(key.fKey, orgin.getFloat(key.fKey));
+ target.setDefault(key.fKey, orgin.getDefaultFloat(key.fKey));
+
+ } else if (INT == d) {
+
+ if (forceInitialization)
+ target.setValue(key.fKey, 1);
+ target.setValue(key.fKey, orgin.getInt(key.fKey));
+ target.setDefault(key.fKey, orgin.getDefaultInt(key.fKey));
+
+ } else if (LONG == d) {
+
+ if (forceInitialization)
+ target.setValue(key.fKey, 1L);
+ target.setValue(key.fKey, orgin.getLong(key.fKey));
+ target.setDefault(key.fKey, orgin.getDefaultLong(key.fKey));
+
+ } else if (STRING == d) {
+
+ if (forceInitialization)
+ target.setValue(key.fKey, "1"); //$NON-NLS-1$
+ target.setValue(key.fKey, orgin.getString(key.fKey));
+ target.setDefault(key.fKey, orgin.getDefaultString(key.fKey));
+
+ }
+ }
+
+ public void load() {
+ for (int i= 0; i < fOverlayKeys.length; i++)
+ loadProperty(fParent, fOverlayKeys[i], fStore, true);
+ }
+
+ public void loadDefaults() {
+ for (int i= 0; i < fOverlayKeys.length; i++)
+ setToDefault(fOverlayKeys[i].fKey);
+ }
+
+ public void start() {
+ if (fPropertyListener == null) {
+ fPropertyListener= new PropertyListener();
+ fParent.addPropertyChangeListener(fPropertyListener);
+ }
+ }
+
+ public void stop() {
+ if (fPropertyListener != null) {
+ fParent.removePropertyChangeListener(fPropertyListener);
+ fPropertyListener= null;
+ }
+ }
+
+ /*
+ * @see IPreferenceStore#addPropertyChangeListener(IPropertyChangeListener)
+ */
+ public void addPropertyChangeListener(IPropertyChangeListener listener) {
+ fStore.addPropertyChangeListener(listener);
+ }
+
+ /*
+ * @see IPreferenceStore#removePropertyChangeListener(IPropertyChangeListener)
+ */
+ public void removePropertyChangeListener(IPropertyChangeListener listener) {
+ fStore.removePropertyChangeListener(listener);
+ }
+
+ /*
+ * @see IPreferenceStore#firePropertyChangeEvent(String, Object, Object)
+ */
+ public void firePropertyChangeEvent(String name, Object oldValue, Object newValue) {
+ fStore.firePropertyChangeEvent(name, oldValue, newValue);
+ }
+
+ /*
+ * @see IPreferenceStore#contains(String)
+ */
+ public boolean contains(String name) {
+ return fStore.contains(name);
+ }
+
+ /*
+ * @see IPreferenceStore#getBoolean(String)
+ */
+ public boolean getBoolean(String name) {
+ return fStore.getBoolean(name);
+ }
+
+ /*
+ * @see IPreferenceStore#getDefaultBoolean(String)
+ */
+ public boolean getDefaultBoolean(String name) {
+ return fStore.getDefaultBoolean(name);
+ }
+
+ /*
+ * @see IPreferenceStore#getDefaultDouble(String)
+ */
+ public double getDefaultDouble(String name) {
+ return fStore.getDefaultDouble(name);
+ }
+
+ /*
+ * @see IPreferenceStore#getDefaultFloat(String)
+ */
+ public float getDefaultFloat(String name) {
+ return fStore.getDefaultFloat(name);
+ }
+
+ /*
+ * @see IPreferenceStore#getDefaultInt(String)
+ */
+ public int getDefaultInt(String name) {
+ return fStore.getDefaultInt(name);
+ }
+
+ /*
+ * @see IPreferenceStore#getDefaultLong(String)
+ */
+ public long getDefaultLong(String name) {
+ return fStore.getDefaultLong(name);
+ }
+
+ /*
+ * @see IPreferenceStore#getDefaultString(String)
+ */
+ public String getDefaultString(String name) {
+ return fStore.getDefaultString(name);
+ }
+
+ /*
+ * @see IPreferenceStore#getDouble(String)
+ */
+ public double getDouble(String name) {
+ return fStore.getDouble(name);
+ }
+
+ /*
+ * @see IPreferenceStore#getFloat(String)
+ */
+ public float getFloat(String name) {
+ return fStore.getFloat(name);
+ }
+
+ /*
+ * @see IPreferenceStore#getInt(String)
+ */
+ public int getInt(String name) {
+ return fStore.getInt(name);
+ }
+
+ /*
+ * @see IPreferenceStore#getLong(String)
+ */
+ public long getLong(String name) {
+ return fStore.getLong(name);
+ }
+
+ /*
+ * @see IPreferenceStore#getString(String)
+ */
+ public String getString(String name) {
+ return fStore.getString(name);
+ }
+
+ /*
+ * @see IPreferenceStore#isDefault(String)
+ */
+ public boolean isDefault(String name) {
+ return fStore.isDefault(name);
+ }
+
+ /*
+ * @see IPreferenceStore#needsSaving()
+ */
+ public boolean needsSaving() {
+ return fStore.needsSaving();
+ }
+
+ /*
+ * @see IPreferenceStore#putValue(String, String)
+ */
+ public void putValue(String name, String value) {
+ if (covers(name))
+ fStore.putValue(name, value);
+ }
+
+ /*
+ * @see IPreferenceStore#setDefault(String, double)
+ */
+ public void setDefault(String name, double value) {
+ if (covers(name))
+ fStore.setDefault(name, value);
+ }
+
+ /*
+ * @see IPreferenceStore#setDefault(String, float)
+ */
+ public void setDefault(String name, float value) {
+ if (covers(name))
+ fStore.setDefault(name, value);
+ }
+
+ /*
+ * @see IPreferenceStore#setDefault(String, int)
+ */
+ public void setDefault(String name, int value) {
+ if (covers(name))
+ fStore.setDefault(name, value);
+ }
+
+ /*
+ * @see IPreferenceStore#setDefault(String, long)
+ */
+ public void setDefault(String name, long value) {
+ if (covers(name))
+ fStore.setDefault(name, value);
+ }
+
+ /*
+ * @see IPreferenceStore#setDefault(String, String)
+ */
+ public void setDefault(String name, String value) {
+ if (covers(name))
+ fStore.setDefault(name, value);
+ }
+
+ /*
+ * @see IPreferenceStore#setDefault(String, boolean)
+ */
+ public void setDefault(String name, boolean value) {
+ if (covers(name))
+ fStore.setDefault(name, value);
+ }
+
+ /*
+ * @see IPreferenceStore#setToDefault(String)
+ */
+ public void setToDefault(String name) {
+ fStore.setToDefault(name);
+ }
+
+ /*
+ * @see IPreferenceStore#setValue(String, double)
+ */
+ public void setValue(String name, double value) {
+ if (covers(name))
+ fStore.setValue(name, value);
+ }
+
+ /*
+ * @see IPreferenceStore#setValue(String, float)
+ */
+ public void setValue(String name, float value) {
+ if (covers(name))
+ fStore.setValue(name, value);
+ }
+
+ /*
+ * @see IPreferenceStore#setValue(String, int)
+ */
+ public void setValue(String name, int value) {
+ if (covers(name))
+ fStore.setValue(name, value);
+ }
+
+ /*
+ * @see IPreferenceStore#setValue(String, long)
+ */
+ public void setValue(String name, long value) {
+ if (covers(name))
+ fStore.setValue(name, value);
+ }
+
+ /*
+ * @see IPreferenceStore#setValue(String, String)
+ */
+ public void setValue(String name, String value) {
+ if (covers(name))
+ fStore.setValue(name, value);
+ }
+
+ /*
+ * @see IPreferenceStore#setValue(String, boolean)
+ */
+ public void setValue(String name, boolean value) {
+ if (covers(name))
+ fStore.setValue(name, value);
+ }
+}
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/StatusInfo.java b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/StatusInfo.java
new file mode 100644
index 0000000000..3ae395a617
--- /dev/null
+++ b/autotools/org.eclipse.linuxtools.cdt.autotools/src/org/eclipse/linuxtools/internal/cdt/autotools/ui/preferences/StatusInfo.java
@@ -0,0 +1,173 @@
+/*******************************************************************************
+ * Copyright (c) 2002, 2006 QNX Software Systems 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:
+ * QNX Software Systems - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.cdt.autotools.ui.preferences;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.linuxtools.cdt.autotools.AutotoolsPlugin;
+
+
+/**
+ * A settable IStatus.
+ * Can be an error, warning, info or ok. For error, info and warning states,
+ * a message describes the problem.
+ */
+public class StatusInfo implements IStatus {
+
+ private String fStatusMessage;
+ private int fSeverity;
+
+ /**
+ * Creates a status set to OK (no message)
+ */
+ public StatusInfo() {
+ this(OK, null);
+ }
+
+ /**
+ * Creates a status .
+ * @param severity The status severity: ERROR, WARNING, INFO and OK.
+ * @param message The message of the status. Applies only for ERROR,
+ * WARNING and INFO.
+ */
+ public StatusInfo(int severity, String message) {
+ fStatusMessage= message;
+ fSeverity= severity;
+ }
+
+ /**
+ * Returns if the status' severity is OK.
+ */
+ public boolean isOK() {
+ return fSeverity == IStatus.OK;
+ }
+
+ /**
+ * Returns if the status' severity is WARNING.
+ */
+ public boolean isWarning() {
+ return fSeverity == IStatus.WARNING;
+ }
+
+ /**
+ * Returns if the status' severity is INFO.
+ */
+ public boolean isInfo() {
+ return fSeverity == IStatus.INFO;
+ }
+
+ /**
+ * Returns if the status' severity is ERROR.
+ */
+ public boolean isError() {
+ return fSeverity == IStatus.ERROR;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IStatus#getMessage()
+ */
+ public String getMessage() {
+ return fStatusMessage;
+ }
+
+ /**
+ * Sets the status to ERROR.
+ * @param errorMessage The error message (can be empty, but not null)
+ */
+ public void setError(String errorMessage) {
+ Assert.isNotNull(errorMessage);
+ fStatusMessage= errorMessage;
+ fSeverity= IStatus.ERROR;
+ }
+
+ /**
+ * Sets the status to WARNING.
+ * @param warningMessage The warning message (can be empty, but not null)
+ */
+ public void setWarning(String warningMessage) {
+ Assert.isNotNull(warningMessage);
+ fStatusMessage= warningMessage;
+ fSeverity= IStatus.WARNING;
+ }
+
+ /**
+ * Sets the status to INFO.
+ * @param infoMessage The info message (can be empty, but not null)
+ */
+ public void setInfo(String infoMessage) {
+ Assert.isNotNull(infoMessage);
+ fStatusMessage= infoMessage;
+ fSeverity= IStatus.INFO;
+ }
+
+ /**
+ * Sets the status to OK.
+ */
+ public void setOK() {
+ fStatusMessage= null;
+ fSeverity= IStatus.OK;
+ }
+
+ /*
+ * @see IStatus#matches(int)
+ */
+ public boolean matches(int severityMask) {
+ return (fSeverity & severityMask) != 0;
+ }
+
+ /**
+ * Returns always <code>false</code>.
+ * @see IStatus#isMultiStatus()
+ */
+ public boolean isMultiStatus() {
+ return false;
+ }
+
+ /*
+ * @see IStatus#getSeverity()
+ */
+ public int getSeverity() {
+ return fSeverity;
+ }
+
+ /*
+ * @see IStatus#getPlugin()
+ */
+ public String getPlugin() {
+ return AutotoolsPlugin.getPluginId();
+ }
+
+ /**
+ * Returns always <code>null</code>.
+ * @see IStatus#getException()
+ */
+ public Throwable getException() {
+ return null;
+ }
+
+ /**
+ * Returns always the error severity.
+ * @see IStatus#getCode()
+ */
+ public int getCode() {
+ return fSeverity;
+ }
+
+ /**
+ * Returns always <code>null</code>.
+ * @see IStatus#getChildren()
+ */
+ public IStatus[] getChildren() {
+ return new IStatus[0];
+ }
+
+}
diff --git a/changelog/.cvsignore b/changelog/.cvsignore
deleted file mode 100644
index 1578cb25fb..0000000000
--- a/changelog/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-bin
-temp.folder
-changelog.jar
-changelogsrc.zip
diff --git a/changelog/.template b/changelog/.template
deleted file mode 100644
index 35895fac89..0000000000
--- a/changelog/.template
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<form>
- <p><b>Generated content</b></p><p>This plug-in has been created using content templates. The following templates were used:</p>
- <li style="text" value="1."><b>Sample Popup Menu.</b>This template adds a submenu and a new action to a target object's popup menu. This contribution will appear in all viewers where an object of the specified type is selected.</li>
- <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/changelog/ChangeLog b/changelog/ChangeLog
deleted file mode 100644
index f1fc786dd6..0000000000
--- a/changelog/ChangeLog
+++ /dev/null
@@ -1,693 +0,0 @@
-2007-01-24 Kyu Lee <klee@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/parsers/PythonParser.java:
- Changed copyright to Phil Muldoon.
- * src/com/redhat/eclipse/changelog/core/parsers/JavaParser.java:
- Ditto.
- * src/com/redhat/eclipse/changelog/core/parsers/CParser.java:
- Ditto.
- * src/com/redhat/eclipse/changelog/core/parsers/CompareParser.java:
- Ditto.
- * src/com/redhat/eclipse/changelog/core/formatters/GNUFormat.java:
- Ditto.
- * src/com/redhat/eclipse/changelog/core/actions/InsertChangeLogKeyHandler.java:
- Ditto.
- * src/com/redhat/eclipse/changelog/core/IParserChangeLogContrib.java:
- Ditto.
- * src/com/redhat/eclipse/changelog/core/IFormatterChangeLogContrib.java:
- Ditto.
- * src/com/redhat/eclipse/changelog/core/ChangeLogPreferencesPage.java:
- Ditto.
- * src/com/redhat/eclipse/changelog/core/ChangelogPlugin.java:
- Ditto.
-
-2007-01-23 Kyu Lee <klee@redhat.com>
-
- * : All .java files has been updated with new copyright/license information.
-
-2007-01-22 Kyu Lee <klee@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/actions/PrepareChangeLogAction.java:
- Error checking.
- * src/com/redhat/eclipse/changelog/core/actions/PatchRangeElement.java:
- Minor design changes.
- * src/com/redhat/eclipse/changelog/core/actions/PatchFile.java:
- Ditto.
- * src/com/redhat/eclipse/changelog/core/actions/InsertChangeLogKeyHandler.java:
- Files without proper parsers to guess function names generates changelog entry.
- * plubin.xml: Bumped version to 2.3.4.
-
-2007-01-11 Kyu Lee <klee@redhat.com>
-
- * *.java: Updated Copyright notices and license information on all files.
-
-2006-11-16 Kyu Lee <klee@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/actions/ChangeLogAction.java
- (getDocumentLocation): Improved error handling. Returns empty string when
- current editor/workspace is not set properly.
-
-2006-11-15 Kyu Lee <klee@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/actions/PrepareChangelogKeyHandler.java
- (execute): Prepare ChangeLog defaults to currently-selected project. BZ#214430.
-
-2006-11-13 Kyu Lee <klee@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/actions/PrepareCommitAction.java
- New class for implementation of filling clipboard with changes in ChangeLog.
-
- * src/com/redhat/eclipse/changelog/core/actions/PrepareCommitHandler.java
- New class that handles keybinding.
-
- * src/com/redhat/eclipse/changelog/core/editors/ChangeLogEditor.java
- (editorContextMenuAboutToShow): Addes Fomratter action to context menu.
- (ChangeLogEditor): Ditto.
-
- * plugin.xml: Keybindings for changelog formatter and prepare commit added.
-
-2006-10-13 Kyu Lee <klee@redhat.com>
-
- * plugin.xml: Bump to version 2.3.3.
-
-2006-10-06 Kyu Lee <klee@redhat.com>
-
- * plugin.xml: Rename of KeyAction class to InsertChangeLogKeyHandler.
- * src/com/redhat/eclipse/changelog/core/ChangeLogWriter.java :
- Debug output.
- * src/com/redhat/eclipse/changelog/core/actions/ChangeLogAction.java :
- Clean up.
- * src/com/redhat/eclipse/changelog/core/actions/InsertChangeLogKeyHandler.java :
- Replaces KeyAction.java.
- * src/com/redhat/eclipse/changelog/core/actions/KeyAction.java :
- Removed. Replaced by InsertChangeLogKeyHandler.java.
- * src/com/redhat/eclipse/changelog/core/actions/PrepareChangeLogAction.java :
- Clean up.
- * src/com/redhat/eclipse/changelog/core/actions/PrepareChangelogKeyHandler.java :
- Clean up.
- (execute): Opens resource selection window to let users choose files that will
- be used in prepare changelog feature.
- * src/com/redhat/eclipse/changelog/core/ui/ChangeLogActionProvider :
- Clean up.
-
-2006-10-03 Kyu Lee <klee@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/ChangeLogWriter.java :
- Added.
- * src/com/redhat/eclipse/changelog/core/actions/ChangeLogAction.java:
- (insertChangelog): Removed. Refactored to a new class ChangeLogWriter.
- * src/com/redhat/eclipse/changelog/core/actions/KeyAction.java:
- (run): Uses new ChangeLogWriter class.
- * src/com/redhat/eclipse/changelog/core/actions/PrepareChangeLogAction.java:
- (outputMultipleEntryChangeLog): Uses new ChangeLogWriter class.
-
-2006-09-29 Kyu Lee <klee@redhat.com>
-
- * plugin.xml: Added prepare changelog key binding(not implemented yet).
- Bumped version to 2.3.2.
- * src/com/redhat/eclipse/changelog/core/ui/ChangeLogActionProvider.java:
- Some cleanup.
- * src/com/redhat/eclipse/changelog/core/actions/PrepareChangeLogAction.java:
- (parseCurrentFunctionAtOffset): Modified to use new extension manager.
- * src/com/redhat/eclipse/changelog/core/actions/KeyAction.java :
- Implemented new abstract methods.
- (run): Runs super's run instead.
- * src/com/redhat/eclipse/changelog/core/actions/ChangeLogAction.java (run):
- Uses prepareChangelog instead.
- (reportErr): New method for reporting errors.
- (insertChangelog): More generalized, clean, intuitive way of inserting changelog.
- (getEntryFilePath): Returns file path of changelog entry.
- (getEditorName): Returns name of responsible editor for file specified in entry.
- (parseFunctionName): Guesses current function name with given parser from
- extension point.
- (getChangelog): Finds/creates Changelog file.
- * src/com/redhat/eclipse/changelog/core/actions/PrepareChangelogKeyHandler.java:
- New Class reponsible for binding key to prepare changelog action.
- * src/com/redhat/eclipse/changelog/core/ChangeLogExtensionManager.java :
- New Class that manages extensions of changelog.
-
-
-2006-09-18 Kyu Lee <klee@redhat.com>
-
- * plugin.xml: Bump version to 2.3.1.
- * src/com/redhat/eclipse/changelog/core/actions/KeyAction.java (run):
- Handles exception when no editor is open.
-
-2006-09-14 Kyu Lee <klee@redhat.com>
-
- * plugin.xml: Bump version to 2.3.0 to differentiate with 2.2.X.
- Fixed key binding.
-
-2006-09-07 Igor Foox <ifoox@redhat.com>
-
- * plugin.xml: Change definition of
- com.redhat.eclipse.changelog.core.formatterContribution extension to new format.
- * src/com/redhat/eclipse/changelog/core/ChangeLogPreferencesPage.java
- (populateFormatList): Change the logic to not add in-file formatters to the
- preference list.
- * schema/formatterContribution.exsd: Create new, more extensible, format for the
- extension, as well as documentation.
- * src/com/redhat/eclipse/changelog/core/actions/KeyAction.java: Change to work
- with new ChangeLogAction.runParserContributors().
- * src/com/redhat/eclipse/changelog/core/actions/PrepareChangeLogAction.java
- (outputMultipleEntryChangeLog): Likewise.
- * src/com/redhat/eclipse/changelog/core/actions/ChangeLogAction.java
- (runFormatterContributor): Change to differentiate between in-file and external
- formatters and handle them accordingly. Also add caching of formatters so they
- would not get looped over every time the action gets invoked.
- (getDocumentLocation): Refactor to use getDocumentIFile().
- (getDocumentIFile): New method.
- (setChangeLogFile): Likewise.
- (addChangeLogEntry): Likewise.
- (createChangeLog): Formatting fixes.
- (LoadPreferences): Remove redundant setting of pref_ChangeLogName.
-
-2006-09-01 Kyu Lee <klee@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/parsers/CompareParser.java
- (parseCurrentFunction): Currently not supported.
- * plugin.xml: Bump version to 2.2.3 for FC6-Test3.
-
-2006-08-30 Kyu Lee <klee@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/actions/GenerateDiffFile.java Removed.
- * src/com/redhat/eclipse/changelog/core/actions/StringDiffOperation.java
- (EMPTY_DIFF): Constant inherited from removed class GenerateDiffFile.
- * plugin.xml: org.eclipse.team.cvs.core version requirement set to >=3.2.0.
- * src/com/redhat/eclipse/changelog/core/actions/PrepareChangeLogAction.java
- (preapreChangeLog): Adds new files to prepare changelog. RHBug#203438.
- (parseStandardPatch): When ChangeLog was part of a file path prepareChangelog
- ignored that file, but now it only ignores a file named 'ChangeLog'.
-
-2006-08-21 Kyu Lee <klee@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/actions/KeyAction.java: Cleaned.
- * src/com/redhat/eclipse/changelog/core/editors/ChangeLogFormattingStrategy.java
- (format): Added Content formatting feature.
-
-2006-08-04 Kyu Lee <klee@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/parsers/PythonParser.java: Removed
- unused code due to deprecated method in 3.2.
- * plugin.xml: Cleaned.
- * src/com/redhat/eclipse/changelog/core/parsers/CompareParser.java
- (parseCurrentFunction): Removed unused code.
- * src/com/redhat/eclipse/changelog/core/editors/GNUElementScanner.java
- (GNUElementScanner): More strick coloring for method names.
- * src/com/redhat/eclipse/changelog/core/ui/ChangeLogActionProvider.java Removed
- unused imports.
- (getResourceMappings, getResourceMapping): Removed unused code.
-
-2006-08-03 Kyu Lee <klee@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/editors/GNUEditorConfiguration.java
- (getContentFormatter): Added. Adds context formatter to changelog editor.
- * src/com/redhat/eclipse/changelog/core/editors/ChangeLogFormattingStrategy.java:
- Added. Actual implementation that formats text.
- * src/com/redhat/eclipse/changelog/core/editors/ChangeLogEditor.java
- (editorContextMenuAboutToShow): Added. Configures changelog editor context
- menus.
- * src/com/redhat/eclipse/changelog/core/actions/FormatChangeLogAction.java:
- Added. Action that formats changelog.
-
-2006-08-01 Kyu Lee <klee@redhat.com>
-
- * plugin.xml: Changed version to 2.2.2.
- * src/com/redhat/eclipse/changelog/core/actions/GenerateDiffFile.java: Removed
- unused imports.
- * src/com/redhat/eclipse/changelog/core/actions/KeyAction.java
- (KeyAction): Constructor creates empty actin menu title.
-
-2006-07-31 Kyu Lee <klee@redhat.com>
-
- * plugin.xml: Instead of using objectContribution to add action menu, now uses
- Action Provider for Common Navigator Framework in Eclipse 3.2.
- * src/com/redhat/eclipse/changelog/core/ui/ChangeLogActionProvider.java: Added.
- Provides action menu
- (Prepare ChangeLog) to UI.* src/com/redhat/eclipse/changelog/core/actions/PrepareChangeLogAction.java (PrepareChangeLogAction):
- Initializes text of menu button.
- (preapreChangeLog): projectPath variable is set from IResource of selected
- object.
- * src/com/redhat/eclipse/changelog/core/actions/KeyAction.java
- (KeyAction): Initializer sets text of menu button.
- * src/com/redhat/eclipse/changelog/core/actions/ChangeLogAction.java
- (ChangeLogAction): Now extends Action to be used from ChangeLogActionProvider.
-
-2006-07-25 Kyu Lee <klee@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/parsers/PythonParser.java
- (parseCurrentFunction): Python Parser removed temporarily.
- * plugin.xml: Changed property of pop-up menu item to work with 3.2.
- * src/com/redhat/eclipse/changelog/core/actions/StringDiffOperation.java: Added.
- Replaces GenerateDiffFile which is not supported anymore in 3.2.
- * src/com/redhat/eclipse/changelog/core/actions/GenerateDiffFile.java: Not used
- anymore.
- * src/com/redhat/eclipse/changelog/core/actions/PrepareChangeLogAction.java
- (preapreChangeLog): Uses new StringDiffOperation to get diff result.
-
-2006-07-21 Kyu Lee <klee@redhat.com>
-
- * Merged from PrepareChangeLogExperiment branch to HEAD.
-
-2006-07-21 Kyu Lee <klee@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/parsers/CompareParser.java
- (parseCurrentFunction): Changed default function name.
- * src/com/redhat/eclipse/changelog/core/actions/PrepareChangeLogAction.java
- (preapreChangeLog): Added information dialog to tell user that there is no
- change.
- * src/com/redhat/eclipse/changelog/core/editors/GNUHyperlinkDetector.java:
- Removed unused field.
-
-2006-07-20 Kyu Lee <klee@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/actions/PrepareChangeLogAction.java
- (run, preapreChangeLog, parseStandardPatch): Added progress monitor.
- * src/com/redhat/eclipse/changelog/core/actions/KeyAction.java
- (outputChangeLog): Refactored method from ChangeLogAction class.
- * src/com/redhat/eclipse/changelog/core/actions/GenerateDiffFile.java
- (run): Changed progress monitor's text.
- * src/com/redhat/eclipse/changelog/core/actions/ChangeLogAction.java: Revactored
- outputChangeLog method to sub classes.
-
-2006-07-19 Kyu Lee <klee@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/actions/ChangeLogAction.java: Added.
- Refactoring class for KeyAction and PrepareChangeLogAction.
- * src/com/redhat/eclipse/changelog/core/actions/PrepareChangeLogAction.java:
- Refactored some methods to ChangeLogAction.
- * src/com/redhat/eclipse/changelog/core/actions/KeyAction.java: Refactored some
- methods to ChangeLogAction.
-
-2006-07-18 Kyu Lee <klee@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/parsers/PythonParser.java
- (parseCurrentFunction): Added to support new IParserChangeLogContrib.
- * src/com/redhat/eclipse/changelog/core/parsers/JavaParser.java
- (parseCurrentFunction): Added to support new IParserChangeLogContrib.
- * src/com/redhat/eclipse/changelog/core/parsers/CParser.java
- (parseCurrentFunction): Added to support new IParserChangeLogContrib.
- * src/com/redhat/eclipse/changelog/core/parsers/CompareParser.java
- (parseCurrentFunction): Added to support new IParserChangeLogContrib.
- * src/com/redhat/eclipse/changelog/core/actions/PrepareChangeLogAction.java
- (guessFunctionNames): Uses extension point parserContribution.
- * src/com/redhat/eclipse/changelog/core/IParserChangeLogContrib.java
- (parseCurrentFunction): New overloaded function that supports input parameters
- from PrepareChangeLogAction.
-
-2006-07-14 Kyu Lee <klee@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/actions/PrepareChangeLogAction.java
- (parseStandardPatch): Now it parses standard diff instead of unified.
- * src/com/redhat/eclipse/changelog/core/actions/GenerateDiffFile.java
- (generateDiff): Changed diff option so that it generates standard diff.
-
-2006-07-13 Kyu Lee <klee@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/actions/PrepareChangeLogAction.java
- (parseStandardPatch): Return type changed.
- (guessFunctionNames): Return type changed and fixed minor bugs.
- (run): Added error checking, refactored.
- * src/com/redhat/eclipse/changelog/core/actions/PatchFile.java
- (countRanges): Added.
- * src/com/redhat/eclipse/changelog/core/actions/GenerateDiffFile.java
- (generateDiff): Renamed the method from generateDiffToClipboard.
-
-2006-07-10 Kyu Lee <klee@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/actions/PatchRangeElement.java: Added.
- Class that describes a block of change in a file in patch.
- * src/com/redhat/eclipse/changelog/core/actions/PatchFile.java: Added. Class
- that describes a file in patch.
- * plugin.xml: Added dependencies for CVS diff operation.
- * src/com/redhat/eclipse/changelog/core/ChangelogPlugin.java: Cleaned import.
- * src/com/redhat/eclipse/changelog/core/actions/PrepareChangeLogAction.java
- (run): Outputs patch to System.out.
- (parseUnifiedPatch): Parses a patch(unified diff with remote resource) and
- stores it in PatchFile array.
- * src/com/redhat/eclipse/changelog/core/actions/GenerateDiffFile.java: Added.
- Generates cvs diff from selected resource.
-
-2006-06-23 Kyu Lee <klee@redhat.com>
-
- * plugin.xml: Added popup menu for prepare chagelog.
- * src/com/redhat/eclipse/changelog/core/actions/PrepareChangeLogAction.java:
- Added. Action class that prepares ChangeLog from selected files/folders.
- * src/com/redhat/eclipse/changelog/core/editors/GNUEditorConfiguration.java
- (GNUEditorConfiguration): Changed to 0-argument constructor.
- (setTextEditor): Sets TextEditor(since constructor no longer gets it).
- * src/com/redhat/eclipse/changelog/core/editors/ChangeLogEditor.java
- (getConfig): Implemented. Works as expected.
- * src/com/redhat/eclipse/changelog/core/IEditorChangeLogContrib.java
- (setTextEditor): Added. Since IConfigurationElement always instantiated using
- its 0-argument public constructor, we need another way to set TextEditor(Used to
- be passed in through constructor).
- * src/com/redhat/eclipse/changelog/core/ChangeLogPreferencesPage.java
- (populateEditorList): Fixed minor typo.
- * src/com/redhat/eclipse/changelog/core/ChangelogPlugin.java
- (initializeDefaultPreferences): Sets default value for editor.
-
-2006-06-22 Kyu Lee <klee@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/ChangeLogPreferencesPage.java: Added
- preference settings for editor.
- * src/com/redhat/eclipse/changelog/core/strings.properties: Property text for
- editor added.
- * schema/editorContribution.exsd: Extension point element was re-defined.
- * plugin.xml: Extension point element for editor fixed. And cleaned up some
- extension elements for parsers.
- * plugin.properties: Added a variable for Editor.
-
-2006-06-21 Kyu Lee <klee@redhat.com>
-
- * plugin.xml: Editor extension class has been changed to ChangeLogEditor from
- GNUChangeLogEditor.
- * src/com/redhat/eclipse/changelog/core/editors/GNUChangeLogEditor.java:
- Removed. Replaced with ChangeLogEditor.java.
- * src/com/redhat/eclipse/changelog/core/editors/ChangeLogEditor.java: Added.
- Refactored from GNUChangeLogEditor.java. No longer the extension point for
- editorContribution.
- * src/com/redhat/eclipse/changelog/core/editors/GNUEditorConfiguration.java: Now
- this class is the extension point for editorContribution.
- * src/com/redhat/eclipse/changelog/core/IEditorChangeLogContrib.java: Replaced
- classes that were required by old extension point to classes required by new
- extension point.
-
-2006-06-20 Kyu Lee <klee@redhat.com>
-
- * plugin.xml: Changed version to 2.1.0.
- * src/com/redhat/eclipse/changelog/core/editors/FileHyperlink.java: Added. Opens
- files in new editor window.
- * src/com/redhat/eclipse/changelog/core/editors/GNUHyperlinkDetector.java
- (detectHyperlinks): Hyperlink for file names is now type FileHyperlink.
- * src/com/redhat/eclipse/changelog/core/editors/GNUChangeLogConfiguration.java
- (GNUChangeLogConfiguration): TextEditor parameter added to determine the path of
- current project.
-
-2006-06-16 Kyu Lee <klee@redhat.com>
-
- * schema/editorContribution.exsd: Added. Schema file for ChangeLog extension
- point.
-
-2006-06-15 Kyu Lee <klee@redhat.com>
-
- * plugin.xml: Added extension point for editorContribution. Fixed editor
- extension class name.
- * src/com/redhat/eclipse/changelog/core/IEditorChangeLogContrib.java: Added.
- Interface for editorContribution extension point.
- * src/com/redhat/eclipse/changelog/core/editors/IChangeLogColorConstants.java:
- Added. Holds color scheme for syntax highlighters.
- * src/com/redhat/eclipse/changelog/core/editors/GNUHyperlinkDetector.java:
- Added. Detects hyperlinks from GNU style changelogs.
- * src/com/redhat/eclipse/changelog/core/editors/GNUElementScanner.java: Added.
- Detects elements from GNU style changelogs.
- * src/com/redhat/eclipse/changelog/core/editors/GNUChangeLogEditor.java: Added.
- Main class that defines GNU changelog editor.
- * src/com/redhat/eclipse/changelog/core/editors/GNUChangeLogConfiguration.java:
- Added. Configures GNU changelog editor.
- * src/com/redhat/eclipse/changelog/core/editors/ColorManager.java: Added.
- Manages color scheme.
- * src/com/redhat/eclipse/changelog/core/editors/ChangeLogDocumentProvider.java:
- Added. Connects the file with eidtor.
- * src/com/redhat/eclipse/changelog/core/ChangeLogPreferencesPage.java: Removed
- unused imports.
-
-2006-06-09 Kyu Lee <klee@redhat.com>
-
- * plugin.xml: categoryId is set properly so that keybindings page displays
- ChangeLog keybinding without error.
- * src/com/redhat/eclipse/changelog/core/ChangeLogPreferencesPage.java
- (getHostName): Defaults hostname to 'localhost.localdomain' if it can not be
- resolved.
-
-2006-06-08 Tom Tromey <tromey@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/ChangeLogPreferencesPage.java
- (getUserName): Check for gnu.gcj.user.realname property.
-
-2006-06-08 Kyu Lee <klee@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/parsers/CParser.java
- (parseCurrentFunction): Fix RH bug 168694.
- * src/com/redhat/eclipse/changelog/core/parsers/JavaParser.java
- (parseCurrentFunction): Fix RH bug 168694.
-
-2006-05-31 Andrew Overholt <overholt@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/strings.properties: Fix typo.
-
-2006-05-23 ifoox <ifoox@redhat.com>
-
- * plugin.xml: Bump version to 2.0.4.
-
-2006-05-23 Kyu Lee <klee@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/parsers/JavaParser.java
- (parseCurrentFunction): Fix RH bug 168682.
-
-2006-03-24 Igor Foox <ifoox@redhat.com>
-
- * plugin.xml: Bump version to 2.0.3.
-
-2006-03-15 Igor Foox <ifoox@redhat.com>
-
- * plugin.xml: Bump version to 2.0.2.
-
-2006-03-11 Tom Tromey <tromey@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/formatters/GNUFormat.java
- (findChangeLogEntry): Removed unused code. Only reuse an existing entry if it is
- at the beginning of the file.
-
-2006-03-11 Tom Tromey <tromey@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/ChangeLogPreferencesPage.java
- (createContents): Externalized strings.
- * src/com/redhat/eclipse/changelog/core/strings.properties: Cleaned up.
-
-2006-03-11 Tom Tromey <tromey@redhat.com>
-
- Warning patrol:
- * src/com/redhat/eclipse/changelog/core/ChangeLogPreferencesPage.java
- (createCheckBox): Removed unused method.
- (createRadioButton): Likewise.
- (tabForward): Likewise.
- * src/com/redhat/eclipse/changelog/core/actions/KeyAction.java
- (outputChangeLog): Removed unused variables.
- (getChangelog): Likewise.
- (getDocumentName): Removed unused method.
- (LoadPreferences): Use 'store'.
- (document, caret_offset): Removed unused fields.
- * src/com/redhat/eclipse/changelog/core/formatters/GNUFormat.java
- (findChangeLogEntry): Removed unused variable.
-
-2005-04-20 Phil Muldoon <pmuldoon@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/parsers/PythonParser.java: Reworked
- imports
- * src/com/redhat/eclipse/changelog/core/actions/KeyAction.java: Removed unused
- imports
- * plugin.xml: Removed unused dependencies. Added %pyParser as name
- * plugin.properties: Added pyParser string
-
-2005-03-03 Phil Muldoon <pmuldoon@redhat.com>
-
- * plugin.xml: Added python optional dependencies. Added python parser extension
- contributions
-
-2005-03-02 Phil Muldoon <pmuldoon@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/parsers/PythonParser.java: Added
-
-2005-03-01 Phil Muldoon <pmuldoon@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/formatters/GNUFormat.java
- (findChangeLogEntry): Changed search to regex
- * schema/formatterContribution.exsd: Added sequence details
- * schema/parserContribution.exsd: Added sequence detilas
-
-2005-02-25 Phil Muldoon <pmuldoon@redhat.com>
-
- * plugin.xml: Made CDT dependencies optional; bumped version.
-
-2004-11-10 Phil Muldoon <pmuldoon@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/formatters/GNUFormat.java
- (mergeChangelog): Fixed extra spaces on continuation line
- (mergeChangelog): Remove excess spaces from non function guess entries
- (mergeChangelog): Install a special case where the Date line has been set, and a
- continuance has neithier a file, nor function entry
- * src/com/redhat/eclipse/changelog/core/parsers/CParser.java
- (parseCurrentFunction): Added NPE check for extracted CElement
- * src/com/redhat/eclipse/changelog/core/parsers/JavaParser.java
- (parseCurrentFunction): Added NPE check for extracted JavaElement
- * plugin.xml: Extracted strings
- * plugin.properties: Added strings from plugin.xml Added prefTitle for
- Preferences Page. Fixed Changelog -> ChangeLog in several places
- * Cleaned up @author and license headers
-
-2004-09-27 Phil Muldoon <pmuldoon@redhat.com>
-
- * plugin.xml: Changed keybinding to Ctrl-Alt-C
- * src/com/redhat/eclipse/changelog/core/formatters/GNUFormat.java
- (formatFunction): Fixed formatting errors with function
- * src/com/redhat/eclipse/changelog/core/parsers/JavaParser.java
- (parseCurrentFunction): Check JavaElement in JavaParser corresponds to a
- function or compilation unit.
- * src/com/redhat/eclipse/changelog/core/parsers/CParser.java
- (parseCurrentFunction): Check ICElement in CParser corresponds to
- class,function,enum,struct or a union
-
-2004-09-24 Phil Muldoon <pmuldoon@redhat.com>
-
- * plugin.xml : Added org.eclipse.linuxtools.changelog.core.parsers.JavaParser. Added
- org.eclipse.linuxtools.changelog.core.parsers.CParser. Added
- org.eclipse.linuxtools.changelog.core.parsers.CompareParser. Added
- org.eclipse.linuxtools.changelog.core.formatters.GNUFormat Added
- com.redhat.eclipse.changelog.core.actions.KeyAction Removed
- com.redhat.eclipse.changelog.core.AddAction Added schema/parserContribution.exsd
- extension schema ref. Added schema/formatterContribution.exsd extension schema
- ref.
- * schema/parserContribution.exsd: Added. Define extension
- com.redhat.eclipse.changelog.core.parserContribution for parser contributions.
- * schema/formatterContribution.exsd: Added. Define extension
- com.redhat.eclipse.changelog.core.formatterContribution for formatter
- contributions.
- * src/com/redhat/eclipse/changelog/core/popup/actions/AddAction.java: Removed
- * src/com/redhat/eclipse/changelog/core/parsers/JavaParser.java: Added.
- Implements IParserChangeLogContrib for parserContribution.
- * src/com/redhat/eclipse/changelog/core/parsers/CParser.java: Added. Implements
- IParserChangeLogContrib for parserContribution.
- * src/com/redhat/eclipse/changelog/core/parsers/CompareParser.java: Added.
- Implements IParserChangeLogContrib for parserContribution.
- * src/com/redhat/eclipse/changelog/core/formatters/GNUFormat.java: Added.
- Implements IFormatterChangeLogContrib for formatterContribution. Defined a GNU
- Style Changelog layout.
- * src/com/redhat/eclipse/changelog/core/actions/KeyAction.java: Added. Calls the
- relevant parser and formatter module, and creates changelog entries.
- * src/com/redhat/eclipse/changelog/core/IParserChangeLogContrib.java: Added.
- Interface for parserContribution extension point.
- * src/com/redhat/eclipse/changelog/core/IFormatterChangeLogContrib.java: Added.
- Interface for formatterContribution extension point.
-
-2004-07-19 Phil Muldoon <pmuldoon@redhat.com>
-
- * build.properties : Added plugin.properties to bin.includes
-
-2004-07-16 Phil Muldoon <pmuldoon@redhat.com>
-
- * src/com/redhat/eclipse/changelog/core/ChangeLogPreferencesPage.java
- (createComposite):
- * plugin.xml: Fixed provider name. Upgraded version Use plugin.properties where
- needed
- * plugin.properties: Added
-
-2004-07-13 Phil Muldoon <pmuldoon@redhat.com>
-
- * ChangelogPlugin.java
- (initializeDefaultPreferences):
- * Correctly populate programmed defaults
- * ChangeLogPreferencesPage.java
- (getUserName): Make static
- (getHostName): Make static
- * AddAction.java
- (outputChangeLog): Fixed NPE on Region when
- * FindReplaceDocumentAdapter returns a null Region
-
-2004-07-12 Phil Muldoon <pmuldoon@redhat.com>
-
- * plugin.xml: Removed unused dependencies
-
-2004-07-12 Phil Muldoon <pmuldoon@redhat.com>
-
- * Refactored to com.redhat.eclipse.changelog.core: plugin.xml build.xml
- src/(...)/popup/actions/AddAction.java src/ChangelogPlugin.java
- src/ChangeLogPreferences.java src/Messages.Java src/strings.properties
-
-2004-07-09 Phil Muldoon <pmuldoon@redhat.com>
-
- * build.xml: 3.0 migration. Regenerated build.xml. Changed classpath. Added
- baseClassPath variable to work temporarily until releng plug-in is written.
-
-2004-07-08 Phil Muldoon <pmuldoon@redhat.com>
-
- * plugin.xml: 3.0 auto migration path
- * ChangelogPlugin.java : Removed IPluginDescriptor
- (getResourceBundle): Made failsafe
- (start(BundleContext context)): Added
- (stop(BundleContext context)): Added
- * AddAction.java
- (openEditor): Modified openEditor to use org.eclipse.ui.ide.IDE.openEditor for
- 3.0 migration
- (outputChangeLog): Modified IDocument.search() to FindReplaceDocumentAdapter
- model for 3.0
-
-2004-02-24 Phil Muldoon <pmuldoon@redhat.com>
-
- * AddAction.java
- (guessGenericFunction): Added == as a token
- (askChangeLogLocation): Add Cancel button check
-
-2004-02-23 Phil Muldoon <pmuldoon@redhat.com>
-
- * AddAction.java
- (outputChangeLog): Fixed gnu continuance bugs
- (guessGenericFunction): Added +- to delimeters for C nuggets of gold such as
- (*foo)++;. Added anumber of other tokens2004-02-19 Phil Muldoon <pmuldoon@redhat.com>* AddAction.java (outputChangeLog):
- Shortened date search delimeter by size of date search string
-
-2004-02-12 Phil Muldoon <pmuldoon@redhat.com>
-
- * AddAction.java : Modified class variables scope to private
- (formatFunctionDetail): Created
- (guessGenericFunction): Renamed
- (outputChangeLog): functionDetail and fileDetail evolved out
- (formatFileDetail): Created
- (outputChangeLog): Renamed
- (askChangeLogLocation): Renamed
- * ChangeLogPreferencesPage.java
- (initializeValues): refactored
-
-2004-02-10 Phil Muldoon <pmuldoon@redhat.com>
-
- * build.xml: Removed classpath versions
- * build.xml : Changed classpath to reflect gcj build
- * ChangeLogPreferencesPage.java
- (getUserName): Added
- (import) Removed Redundant exports(getHostName): Added
- (initializeDefaultPreferences): Added sligtly more sensible name and email guess
- * AddAction.java
- (OutputChangeLog): Added maintenance boundary paths to file entries for
- changelogs on maintenance boundaries
- * plugin.xml: Changed Changelog Entry to Add Changelog Entry
-
-2004-02-05 Phil Muldoon <pmuldoon@redhat.com>
-
- * AddAction.java
- (matchDatePattern): Added function
- * AddAction.java
- (OutputChangeLog): Added GNU Style Continuance for single file, multiple
- function entries
-
-2004-01-30 Phil Muldoon <pmuldoon@redhat.com>
-
- * AddAction.java
- (guessJavaFunction): Changed token
- * to /*
- (to fix C pointers)* AddAction.java : Removed various debug System.out's2004-01-22 Phil Muldoon <pmuldoon@redhat.com>* AddAction.java (guessJavaFunction):
- Fixed Region Info
- (use both getLinebyOffset).Added Support for functions that span more than one line2004-01-21 Phil Muldoon <pmuldoon@redhat.com>* AddAction.java (formatJavaFunction):
- Fixed tokenize on parenthesis
- * AddAction.java
- (guessJavaFunction): Added parenthesis to tokenizer to assist in tokenzing
- function headers
- * plugin.xml: Added #CEditorContext
- * build.xml: Added
-
-2004-01-21 Phil Muldoon <pmuldoon@redhat.com>
-
- * Version 1.0 check-in
-
-2003-11-24 Phil Muldoon <pmuldoon@redhat.com>
-
- * Initial check-in. Does not work. Experimental. \ No newline at end of file
diff --git a/changelog/icons/file_obj.gif b/changelog/icons/file_obj.gif
deleted file mode 100644
index b226e41c52..0000000000
--- a/changelog/icons/file_obj.gif
+++ /dev/null
Binary files differ
diff --git a/changelog/org.eclipse.linuxtools.changelog-feature/ChangeLog b/changelog/org.eclipse.linuxtools.changelog-feature/ChangeLog
index fcd09ab3a2..426c410782 100644
--- a/changelog/org.eclipse.linuxtools.changelog-feature/ChangeLog
+++ b/changelog/org.eclipse.linuxtools.changelog-feature/ChangeLog
@@ -1,3 +1,22 @@
+2010-05-18 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Fix provider name.
+
+2010-04-26 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Match consistent license text (bug #306627). Update
+ copyright year.
+ * license.html: New file. HTML version of SUA (bug #306627).
+ * build.properties: Include license.html.
+
+2010-04-12 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Match consistent license text (bug #306627).
+
+2010-02-08 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Capitalize words in featureName.
+
2009-08-05 Andrew Overholt <overholt@redhat.com>
* feature.properties: Variable-ize some strings.
diff --git a/changelog/org.eclipse.linuxtools.changelog-feature/build.properties b/changelog/org.eclipse.linuxtools.changelog-feature/build.properties
index d38c93ef10..6fe2c10222 100644
--- a/changelog/org.eclipse.linuxtools.changelog-feature/build.properties
+++ b/changelog/org.eclipse.linuxtools.changelog-feature/build.properties
@@ -1,9 +1,11 @@
bin.includes = feature.xml,\
epl-v10.html,\
- feature.properties
+ feature.properties,\
+ license.html
src.includes = feature.xml,\
feature.properties,\
build.properties,\
+ license.html,\
.classpath,\
.project,\
ChangeLog
diff --git a/changelog/org.eclipse.linuxtools.changelog-feature/feature.properties b/changelog/org.eclipse.linuxtools.changelog-feature/feature.properties
index 5c8f7326af..dc449e5db0 100644
--- a/changelog/org.eclipse.linuxtools.changelog-feature/feature.properties
+++ b/changelog/org.eclipse.linuxtools.changelog-feature/feature.properties
@@ -4,14 +4,14 @@
# java.io.Properties file (ISO 8859-1 with "\" escapes)
# This file should be translated.
-featureProvider=Eclipse
-featureName=ChangeLog management tools (Incubation)
+featureProvider=Eclipse Linux Tools
+featureName=ChangeLog Management Tools (Incubation)
featureDescription=The Changelog plug-in provides the ability to maintain and create GNU-style ChangeLogs from within Eclipse.
-copyright=Copyright 2004-2009 Red Hat, Inc.
-licenseURL=epl-v10.html
+copyright=Copyright 2004-2010 Red Hat, Inc.
+licenseURL=license.html
license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
\n\
Usage Of Content\n\
\n\
@@ -19,42 +19,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
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\
+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\
+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\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this 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\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software 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? 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\
+ - 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\
The terms and conditions governing Plug-ins and Fragments should be\n\
contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -63,46 +59,76 @@ 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\
+ - 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\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update 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\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\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\
+ - 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\
+ - 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\
+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\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+ 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+ the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+ extending or updating the functionality of an Eclipse-based product.\n\
+ 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+ Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+ 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+ govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+ Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+ with the Specification. Such Installable Software Agreement must inform the user of the\n\
+ terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+ the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+ indication of agreement by the user, the provisioning Technology will complete installation\n\
+ of the Installable Software.\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\
+regulations and policies concerning the import, possession, or use, and\n\
+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 \ No newline at end of file
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
diff --git a/changelog/org.eclipse.linuxtools.changelog-feature/license.html b/changelog/org.eclipse.linuxtools.changelog-feature/license.html
new file mode 100644
index 0000000000..c184ca36a9
--- /dev/null
+++ b/changelog/org.eclipse.linuxtools.changelog-feature/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 14, 2010</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 Foundation source code
+ repository (&quot;Repository&quot;) in software 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 Provisioning Technology (as defined below), 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>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>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ (&quot;Specification&quot;).</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
+ on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<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>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/ChangeLog b/changelog/org.eclipse.linuxtools.changelog.core/ChangeLog
index f9cd88acd2..dc6b6468d7 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/ChangeLog
+++ b/changelog/org.eclipse.linuxtools.changelog.core/ChangeLog
@@ -1,3 +1,88 @@
+2010-06-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #315976
+ * src/org/eclipse/linuxtools/changelog/core/actions/PrepareChangeLogAction.java (outputMultipleEntryChangeLog): For
+ inline ChangeLog, we cannot assume the editor is already open so we must open it.
+
+2010-06-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogAction.java (askChangeLogLocation): Don't continue
+ if the given_resource ends up null.
+ * src/org/eclipse/linuxtools/changelog/core/actions/InsertChangeLogKeyHandler.java (execute): Don't continue
+ if the result of getChangeLog is null.
+
+2010-05-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogAction.java
+ (getDocumentLocation): Add support for FileStoreEditorInput. Do not assume
+ loc is non-null at end of method.
+
+2010-03-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #306247
+ * src/org/eclipse/linuxtools/changelog/core/actions/PrepareChangeLogAction.java (outputMultipleEntryChangeLog): Make
+ a check for inline formatter before searching for a ChangeLog file. If the file does not have an inline formatter,
+ do not create a ChangeLog.
+
+2010-03-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #304185
+ * META-INF/MANIFEST.MF: Change dependency on org.eclipse.core.resources to not have specific versions.
+ * src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogContainerContentProvider.java (getChildren): Add specific
+ check for ChangeLogRootContainer which is no longer an IContainer.
+ * src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogContainerSelectionGroup.java (createTreeViewer): Change
+ call to ChangeLogRootContainer constructor which now takes the project as input.
+ * src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogRootContainer.java (ChangeLogRootContainer): Do not
+ implement IContainer which is not meant to be implemented externally and instead just create a simple class. Also
+ take the project as a constructor parameter.
+ * src/org/eclipse/linuxtools/changelog/core/ChangeLogPreferencesPage.java (performOk): Add deprecation annotation to
+ remove warning.
+
+2010-02-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #299974
+ * src/org/eclipse/linuxtools/changelog/core/actions/SourceEditorInput.java: New file.
+ * src/org/eclipse/linuxtools/changelog/core/actions/StorageEditorInput.java: New file.
+ * src/org/eclipse/linuxtools/changelog/core/actions/PatchFile.java (addLineRange): New
+ parameter that reveals whether patch is to local file or ancestor.
+ (getStorage): New method.
+ (setStorage): Ditto.
+ * src/org/eclipse/linuxtools/changelog/core/actions/PatchRangeElement.java (equals): Modified
+ to compare local change field instead of patch field which is never used and has been
+ removed.
+ (PatchRangeElement): Add new boolean which is set to true if patch is to local file.
+ Remove setting of patch text which is never used.
+ (isLocalChange): New method.
+ * src/org/eclipse/linuxtools/changelog/core/actions/PrepareChangeLogAction.java (guessFunctionNames): Add
+ support for finding function names for changes to ancestor file which will be backed only by storage
+ and not a local file.
+ (MyStorageDocumentProvider): New private class.
+ (getChangedLines): Add changes to ancestor file and save the storage we get back to later
+ guess function names.
+
+2010-01-27 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/changelog/core/ChangelogPreferenceInitializer.java: New file.
+ * plugin.xml: Register preferenceInitializer.
+ * src/org/eclipse/linuxtools/changelog/core/ChangelogPlugin.java: Remove parts that belong to the preference initializer.
+ * src/org/eclipse/linuxtools/changelog/core/ChangeLogPreferencesPage.java (createTextField): Don't register modify listener.
+ (getHostName): Removed.
+ (getUserEmail): Removed.
+ (getUserName): Removed.
+ (getUserRealName): Removed.
+ (init): Do not initialize properties.
+ (initializeDefaultPreferences): Removed.
+ (modifyText): Removed.
+ (widgetDefaultSelected): Removed.
+ (widgetSelected): Removed.
+
+2010-01-27 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/changelog/core/editors/GNUFileEntryDamagerRepairer.java (getDamageRegion): Add missing @Override.
+ (createPresentation): Remove dead variables.
+ * src/org/eclipse/linuxtools/changelog/core/editors/GNUPartitionScanner.java (nextToken): Add missing @Override.
+ * src/org/eclipse/linuxtools/changelog/core/editors/MultilineRuleDamagerRepairer.java (getDamageRegion): Likewise.
+
2009-12-22 Andrew Overholt <overholt@redhat.com>
* META-INF/MANIFEST.MF: Fix o.e.c.resources bundle version range.
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/META-INF/MANIFEST.MF b/changelog/org.eclipse.linuxtools.changelog.core/META-INF/MANIFEST.MF
index f8fb559d94..4107f58217 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/META-INF/MANIFEST.MF
+++ b/changelog/org.eclipse.linuxtools.changelog.core/META-INF/MANIFEST.MF
@@ -11,13 +11,13 @@ Require-Bundle: org.eclipse.team.ui,
org.eclipse.ui.ide,
org.eclipse.jface.text;bundle-version="3.3.0",
org.eclipse.ui.workbench.texteditor,
- org.eclipse.core.resources;bundle-version="[3.3.0,3.5.2]",
org.eclipse.core.runtime;bundle-version="3.3.100",
org.eclipse.ui;bundle-version="3.3.0",
org.eclipse.ui.editors;bundle-version="3.3.0",
org.eclipse.team.core,
org.eclipse.ui.navigator,
- org.eclipse.compare
+ org.eclipse.compare,
+ org.eclipse.core.resources
Export-Package: org.eclipse.linuxtools.changelog.core;
uses:="org.eclipse.jface.text.hyperlink,
org.eclipse.core.runtime,
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/about.html b/changelog/org.eclipse.linuxtools.changelog.core/about.html
new file mode 100644
index 0000000000..23506a4bae
--- /dev/null
+++ b/changelog/org.eclipse.linuxtools.changelog.core/about.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>About</title>
+</head><body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). 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, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html> \ No newline at end of file
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/build.properties b/changelog/org.eclipse.linuxtools.changelog.core/build.properties
index fb895aa41e..38e1e926a1 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/build.properties
+++ b/changelog/org.eclipse.linuxtools.changelog.core/build.properties
@@ -3,6 +3,7 @@ bin.includes = plugin.xml,\
*.jar,\
META-INF/,\
.,\
+ about.html,\
schema/
jars.compile.order = .
source.. = src/
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/plugin.properties b/changelog/org.eclipse.linuxtools.changelog.core/plugin.properties
index d5bc973660..983cf7744c 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/plugin.properties
+++ b/changelog/org.eclipse.linuxtools.changelog.core/plugin.properties
@@ -1,6 +1,6 @@
pluginName=ChangeLog Plugin
-providerName=Eclipse
+providerName=Eclipse Linux Tools
compareParser=Compare Editor Parser
cParser=C Editor Parser
javaParser=Java Editor Parser
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/plugin.xml b/changelog/org.eclipse.linuxtools.changelog.core/plugin.xml
index 3b4a62874b..765bf7f986 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/plugin.xml
+++ b/changelog/org.eclipse.linuxtools.changelog.core/plugin.xml
@@ -1,5 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
+<?eclipse version="3.0"?><!--
+ Copyright (c) 2010 Red Hat, Inc.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Alexander Kurtakov (Red Hat) - initial API and implementation
+ -->
+
<plugin>
<extension-point id="parserContribution"
@@ -208,4 +218,8 @@
fileNames="ChangeLog">
</participant>
</extension>
+ <extension point="org.eclipse.core.runtime.preferences">
+ <initializer
+ class="org.eclipse.linuxtools.changelog.core.ChangelogPreferenceInitializer" />
+ </extension>
</plugin>
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/ChangeLogPreferencesPage.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/ChangeLogPreferencesPage.java
index 905273b535..989252e906 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/ChangeLogPreferencesPage.java
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/ChangeLogPreferencesPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006 Phil Muldoon <pkmuldoon@picobot.org>.
+ * Copyright (c) 2006, 2010 Phil Muldoon <pkmuldoon@picobot.org> 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
@@ -8,21 +8,16 @@
* Contributors:
* Phil Muldoon <pmuldoon@redhat.com> - initial API and implementation
* Kyu Lee <klee@redhat.com> - editor support
+ * Alexander Kurtakov (Red Hat) - remove parts notneeded
*******************************************************************************/
package org.eclipse.linuxtools.changelog.core;
-import java.net.UnknownHostException;
-
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
@@ -42,7 +37,7 @@ import org.eclipse.ui.IWorkbenchPreferencePage;
* preference dialog based on the registration.
*/
public class ChangeLogPreferencesPage extends PreferencePage implements
- IWorkbenchPreferencePage, SelectionListener, ModifyListener {
+ IWorkbenchPreferencePage {
private Text emailField;
@@ -80,7 +75,6 @@ public class ChangeLogPreferencesPage extends PreferencePage implements
private Text createTextField(Composite parent) {
Text text = new Text(parent, SWT.SINGLE | SWT.BORDER);
- text.addModifyListener(this);
GridData data = new GridData();
data.horizontalAlignment = GridData.FILL;
data.grabExcessHorizontalSpace = true;
@@ -103,60 +97,12 @@ public class ChangeLogPreferencesPage extends PreferencePage implements
return list;
}
- @Override
- protected IPreferenceStore doGetPreferenceStore() {
- return ChangelogPlugin.getDefault().getPreferenceStore();
- }
-
public void init(IWorkbench workbench) {
- initializeDefaultPreferences(getPreferenceStore());
- }
-
- protected static String getUserRealName() {
- String realUserName = System.getenv("ECLIPSE_CHANGELOG_REALNAME"); // $NON-NLS-1$
- if (realUserName != null)
- return realUserName;
- return System.getProperty("gnu.gcj.user.realname", //$NON-NLS-1$
- getUserName());
}
- protected static String getUserEmail() {
- String emailID = System.getenv("ECLIPSE_CHANGELOG_EMAIL"); // $NON-NLS-1$
- if (emailID != null)
- return emailID;
- return getUserName() + "@" + getHostName(); // $NON-NLS-1$
- }
-
- protected static String getUserName() {
- return System.getProperty("user.name"); //$NON-NLS-1$
- }
-
- protected static String getHostName() {
- try {
- return java.net.InetAddress.getLocalHost().getHostName();
- } catch (UnknownHostException e) {
- // instead of throwing exception, return default host name
- // RH bug#194406
- return "localhost.localdomain"; //$NON-NLS-1$
- }
- }
-
- protected void initializeDefaultPreferences(IPreferenceStore store) {
- // store.setDefault("IChangeLogConstants.AUTHOR_NAME", getUserName());
- // //$NON-NLS-1$ //$NON-NLS-2$
- // store
- // .setDefault(
- // "IChangeLogConstants.AUTHOR_EMAIL", getUserName() + "@" +
- // getHostName()); //$NON-NLS-1$ //$NON-NLS-2$
- //
- store.setDefault("IChangeLogConstants.AUTHOR_NAME", getUserRealName()); //$NON-NLS-1$
- store.setDefault("IChangeLogConstants.AUTHOR_EMAIL", getUserEmail()); //$NON-NLS-1$
-
- store.setDefault("IChangeLogConstants.DEFAULT_FORMATTER", // $NON-NLS-1$
- Messages.getString("ChangeLogPreferencesPage.gnuFormatter")); //$NON-NLS-1$
- store.setDefault("IChangeLogConstants.DEFAULT_EDITOR", // $NON-NLS-1$
- Messages.getString("ChangeLogPreferencesPage.gnuEditorConfig")); //$NON-NLS-1$
-
+ @Override
+ protected IPreferenceStore doGetPreferenceStore() {
+ return ChangelogPlugin.getDefault().getPreferenceStore();
}
private void initializeDefaults() {
@@ -270,10 +216,6 @@ public class ChangeLogPreferencesPage extends PreferencePage implements
}
- public void modifyText(ModifyEvent event) {
- // Do nothing on a modification in this example
- }
-
/*
* (non-Javadoc) Method declared on PreferencePage
*/
@@ -287,6 +229,7 @@ public class ChangeLogPreferencesPage extends PreferencePage implements
/*
* (non-Javadoc) Method declared on PreferencePage
*/
+ @SuppressWarnings("deprecation")
@Override
public boolean performOk() {
storeValues();
@@ -320,15 +263,4 @@ public class ChangeLogPreferencesPage extends PreferencePage implements
return new Composite(parent, SWT.NULL);
}
-
- public void widgetDefaultSelected(SelectionEvent event) {
- // Handle a default selection. Do nothing in this example
- }
-
- /**
- * (non-Javadoc) Method declared on SelectionListener
- */
- public void widgetSelected(SelectionEvent event) {
- // Do nothing on selection in this example;
- }
} \ No newline at end of file
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/ChangelogPlugin.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/ChangelogPlugin.java
index 56b4e0af30..2ae33d8b9a 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/ChangelogPlugin.java
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/ChangelogPlugin.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006 Phil Muldoon <pkmuldoon@picobot.org>.
+ * Copyright (c) 2006, 2010 Phil Muldoon <pkmuldoon@picobot.org> 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
@@ -8,17 +8,11 @@
* Contributors:
* Phil Muldoon <pmuldoon@redhat.com> - initial API and implementation
* Kyu Lee <klee@redhat.com> - editor support
+ * Alexander Kurtakov (Red Hat) - remove preferences initializing
*******************************************************************************/
package org.eclipse.linuxtools.changelog.core;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.resources.IWorkspace;
-
-import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
/**
* @author pmuldoon (Phil Muldoon)
@@ -34,22 +28,12 @@ public class ChangelogPlugin extends AbstractUIPlugin {
// The shared instance.
private static ChangelogPlugin plugin;
- // Resource bundle.
- private ResourceBundle resourceBundle;
-
/**
* The constructor.
*/
public ChangelogPlugin() {
// super();
plugin = this;
- try {
- resourceBundle = ResourceBundle
- .getBundle("org.eclipse.linuxtools.changelog.core.strings"); // $NON-NLS-1$
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
-
}
/**
@@ -59,60 +43,4 @@ public class ChangelogPlugin extends AbstractUIPlugin {
return plugin;
}
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- }
-
- /**
- * Returns the workspace instance.
- */
- public static IWorkspace getWorkspace() {
- return ChangelogPlugin.getWorkspace();
- }
-
- /**
- * Returns the string from the plugin's resource bundle, or 'key' if not
- * found.
- */
- public static String getResourceString(String key) {
- ResourceBundle bundle = ChangelogPlugin.getDefault()
- .getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- return resourceBundle;
- }
-
- @Override
- protected void initializeDefaultPreferences(IPreferenceStore store) {
- store.setDefault("IChangeLogConstants.DATE_FORMAT", "true"); // $NON-NLS-1$ // $NON-NLS-2$
- store.setDefault("IChangeLogConstants.APPEND_RESOURCE_PATH", "false"); // $NON-NLS-1$ // $NON-NLS-2$
-
- store.setDefault("IChangeLogConstants.AUTHOR_NAME", // $NON-NLS-1$
- ChangeLogPreferencesPage.getUserRealName());
- store.setDefault("IChangeLogConstants.AUTHOR_EMAIL", // $NON-NLS-2$
- ChangeLogPreferencesPage.getUserEmail());
- store.setDefault("IChangeLogConstants.DEFAULT_FORMATTER", // $NON-NLS-1$
- getResourceString("ChangeLogPreferencesPage.gnuFormatter")); // $NON-NLS-1$
- store.setDefault("IChangeLogConstants.DEFAULT_EDITOR", // $NON-NLS-1$
- getResourceString("ChangeLogPreferencesPage.gnuEditorConfig")); // $NON-NLS-1$
-
- }
}
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/ChangelogPreferenceInitializer.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/ChangelogPreferenceInitializer.java
new file mode 100644
index 0000000000..ab4e6e640b
--- /dev/null
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/ChangelogPreferenceInitializer.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Alexander Kurtakov (Red Hat) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.changelog.core;
+
+import java.net.UnknownHostException;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+
+public class ChangelogPreferenceInitializer extends
+ AbstractPreferenceInitializer {
+
+ @Override
+ public void initializeDefaultPreferences() {
+ IPreferenceStore store = ChangelogPlugin.getDefault()
+ .getPreferenceStore();
+ store.setDefault("IChangeLogConstants.DATE_FORMAT", "true"); // $NON-NLS-1$
+ // //
+ // $NON-NLS-2$
+ store.setDefault("IChangeLogConstants.APPEND_RESOURCE_PATH", "false"); // $NON-NLS-1$
+ // //
+ // $NON-NLS-2$
+
+ store.setDefault("IChangeLogConstants.AUTHOR_NAME", // $NON-NLS-1$
+ getUserRealName());
+ store.setDefault("IChangeLogConstants.AUTHOR_EMAIL", // $NON-NLS-2$
+ getUserEmail());
+ store.setDefault("IChangeLogConstants.DEFAULT_FORMATTER", // $NON-NLS-1$
+ Messages.getString("ChangeLogPreferencesPage.gnuFormatter")); // $NON-NLS-1$
+ store.setDefault("IChangeLogConstants.DEFAULT_EDITOR", // $NON-NLS-1$
+ Messages.getString("ChangeLogPreferencesPage.gnuEditorConfig")); // $NON-NLS-1$
+ }
+
+ private String getUserRealName() {
+ String realUserName = System.getenv("ECLIPSE_CHANGELOG_REALNAME"); // $NON-NLS-1$
+ if (realUserName != null)
+ return realUserName;
+ return System.getProperty("gnu.gcj.user.realname", //$NON-NLS-1$
+ getUserName());
+ }
+
+ private String getUserEmail() {
+ String emailID = System.getenv("ECLIPSE_CHANGELOG_EMAIL"); // $NON-NLS-1$
+ if (emailID != null)
+ return emailID;
+ return getUserName() + "@" + getHostName(); // $NON-NLS-1$
+ }
+
+ private String getUserName() {
+ return System.getProperty("user.name"); //$NON-NLS-1$
+ }
+
+ private String getHostName() {
+ try {
+ return java.net.InetAddress.getLocalHost().getHostName();
+ } catch (UnknownHostException e) {
+ // instead of throwing exception, return default host name
+ // RH bug#194406
+ return "localhost.localdomain"; //$NON-NLS-1$
+ }
+ }
+
+}
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogAction.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogAction.java
index 7f683ea585..eaa1281e91 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogAction.java
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogAction.java
@@ -45,6 +45,7 @@ import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
+import org.eclipse.ui.ide.FileStoreEditorInput;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.part.MultiPageEditorPart;
@@ -164,6 +165,9 @@ public abstract class ChangeLogAction extends Action {
IResource given_resource = myWorkspaceRoot.findMember(editorLoc);
+ if (given_resource == null)
+ return null;
+
ChangeLogContainerSelectionDialog dialog = new ChangeLogContainerSelectionDialog(ws
.getActiveWorkbenchWindow().getShell(), given_resource
.getParent(), false, Messages
@@ -289,24 +293,23 @@ public abstract class ChangeLogAction extends Action {
String WorkspaceRoot;
try {
- IWorkspaceRoot myWorkspaceRoot = getWorkspaceRoot();
- WorkspaceRoot = myWorkspaceRoot.getLocation().toOSString();
-
- if (currentEditor instanceof MultiPageEditorPart) {
- Object ed = ((MultiPageEditorPart) currentEditor).getSelectedPage();
- if (ed instanceof IEditorPart)
- cc = ((IEditorPart) ed).getEditorInput();
- if (cc instanceof FileEditorInput)
- return (appendRoot) ? WorkspaceRoot + ((FileEditorInput) cc).getFile().getFullPath().toOSString() :
- ((FileEditorInput) cc).getFile().getFullPath().toOSString();
- }
-
-
- cc = currentEditor.getEditorInput();
+ IWorkspaceRoot myWorkspaceRoot = getWorkspaceRoot();
+ WorkspaceRoot = myWorkspaceRoot.getLocation().toOSString();
+
+ if (currentEditor instanceof MultiPageEditorPart) {
+ Object ed = ((MultiPageEditorPart) currentEditor).getSelectedPage();
+ if (ed instanceof IEditorPart)
+ cc = ((IEditorPart) ed).getEditorInput();
+ if (cc instanceof FileEditorInput)
+ return (appendRoot) ? WorkspaceRoot + ((FileEditorInput) cc).getFile().getFullPath().toOSString() :
+ ((FileEditorInput) cc).getFile().getFullPath().toOSString();
+ }
+
+ cc = currentEditor.getEditorInput();
+
} catch(Exception e) {
return "";
}
-
if (cc == null)
return "";
@@ -319,7 +322,7 @@ public abstract class ChangeLogAction extends Action {
return "";
} else if (test.getCompareResult() instanceof ICompareInput) {
ITypedElement leftCompare = ((ICompareInput) test.getCompareResult())
- .getLeft();
+ .getLeft();
if (leftCompare instanceof IResourceProvider){
String localPath = ((IResourceProvider)leftCompare).getResource().getFullPath().toString();
if (appendRoot) {
@@ -332,20 +335,24 @@ public abstract class ChangeLogAction extends Action {
return WorkspaceRoot + test.getCompareResult().toString();
return test.getCompareResult().toString();
}
+ } else if (cc instanceof FileStoreEditorInput) {
+ return ((FileStoreEditorInput)cc).getName();
}
-
+
if (appendRoot) {
return WorkspaceRoot + loc.getFullPath().toOSString();
- } else {
+ } else if (loc != null) {
return loc.getFullPath().toOSString();
+ } else {
+ return "";
}
}
protected void loadPreferences() {
IPreferenceStore store = ChangelogPlugin.getDefault()
- .getPreferenceStore();
+ .getPreferenceStore();
pref_AuthorName = store.getString("IChangeLogConstants.AUTHOR_NAME"); //$NON-NLS-1$
pref_AuthorEmail = store.getString("IChangeLogConstants.AUTHOR_EMAIL"); //$NON-NLS-1$
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogContainerContentProvider.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogContainerContentProvider.java
index 3e70c3fa62..efb8184607 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogContainerContentProvider.java
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogContainerContentProvider.java
@@ -76,8 +76,18 @@ public class ChangeLogContainerContentProvider implements ITreeContentProvider {
// this should never happen because we call #isAccessible before invoking #members
}
}
+ } else if (element instanceof ChangeLogRootContainer) {
+ ChangeLogRootContainer container = (ChangeLogRootContainer) element;
+ List<IResource> children = new ArrayList<IResource>();
+ IResource[] members = container.members();
+ for (int i = 0; i < members.length; i++) {
+ if (members[i].getType() != IResource.FILE) {
+ children.add(members[i]);
+ }
+ }
+ return children.toArray();
}
- return new Object[0];
+ return new Object[0];
}
/*
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogContainerSelectionGroup.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogContainerSelectionGroup.java
index 2140510147..bb8da78080 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogContainerSelectionGroup.java
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogContainerSelectionGroup.java
@@ -299,8 +299,7 @@ public class ChangeLogContainerSelectionGroup extends Composite {
* This helps in displaying all folders under the document
* root as well as the actual root itself.
*/
- ChangeLogRootContainer root = new ChangeLogRootContainer();
- root.setProject(this.initialSelection.getProject());
+ ChangeLogRootContainer root = new ChangeLogRootContainer(this.initialSelection.getProject());
// This has to be done after the viewer has been laid out
treeViewer.setInput(root);
}
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogRootContainer.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogRootContainer.java
index 98612b3486..1c90e7ea49 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogRootContainer.java
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogRootContainer.java
@@ -10,399 +10,18 @@
*******************************************************************************/
package org.eclipse.linuxtools.changelog.core.actions;
-import java.net.URI;
-import java.util.Map;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceProxy;
-import org.eclipse.core.resources.IResourceProxyVisitor;
-import org.eclipse.core.resources.IResourceVisitor;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourceAttributes;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-public class ChangeLogRootContainer implements IContainer {
+public class ChangeLogRootContainer {
private IProject proj;
- public void setProject(IProject project){
+ public ChangeLogRootContainer(IProject project) {
proj = project;
}
-
-
- public boolean exists(IPath path) {
- return false;
- }
- public IFile[] findDeletedMembersWithHistory(int depth,
- IProgressMonitor monitor) throws CoreException {
- return null;
- }
-
- public IResource findMember(String name) {
- return null;
- }
-
- public IResource findMember(IPath path) {
- return null;
- }
-
- public IResource findMember(String name, boolean includePhantoms) {
- return null;
- }
-
- public IResource findMember(IPath path, boolean includePhantoms) {
- return null;
- }
-
- public String getDefaultCharset() throws CoreException {
- return null;
- }
-
- public String getDefaultCharset(boolean checkImplicit) throws CoreException {
- return null;
- }
-
- public IFile getFile(IPath path) {
- return null;
- }
-
- public IFolder getFolder(IPath path) {
- return null;
- }
-
- public IResource[] members() throws CoreException {
+ public IResource[] members() {
return new IResource[]{proj};
}
-
- public IResource[] members(boolean includePhantoms) throws CoreException {
- return null;
- }
-
- public IResource[] members(int memberFlags) throws CoreException {
- return null;
- }
-
- public void setDefaultCharset(String charset) throws CoreException {
-
- }
-
- public void setDefaultCharset(String charset, IProgressMonitor monitor)
- throws CoreException {
-
- }
-
- public void accept(IResourceVisitor visitor) throws CoreException {
-
- }
-
- public void accept(IResourceProxyVisitor visitor, int memberFlags)
- throws CoreException {
-
- }
-
- public void accept(IResourceVisitor visitor, int depth,
- boolean includePhantoms) throws CoreException {
-
- }
-
- public void accept(IResourceVisitor visitor, int depth, int memberFlags)
- throws CoreException {
-
- }
-
- public void clearHistory(IProgressMonitor monitor) throws CoreException {
-
- }
-
- public void copy(IPath destination, boolean force, IProgressMonitor monitor)
- throws CoreException {
-
- }
-
- public void copy(IPath destination, int updateFlags,
- IProgressMonitor monitor) throws CoreException {
-
- }
-
- public void copy(IProjectDescription description, boolean force,
- IProgressMonitor monitor) throws CoreException {
-
- }
-
- public void copy(IProjectDescription description, int updateFlags,
- IProgressMonitor monitor) throws CoreException {
-
- }
-
- public IMarker createMarker(String type) throws CoreException {
- return null;
- }
-
- public IResourceProxy createProxy() {
- return null;
- }
-
- public void delete(boolean force, IProgressMonitor monitor)
- throws CoreException {
-
- }
-
- public void delete(int updateFlags, IProgressMonitor monitor)
- throws CoreException {
-
- }
-
- public void deleteMarkers(String type, boolean includeSubtypes, int depth)
- throws CoreException {
-
- }
-
- public boolean exists() {
- return false;
- }
-
- public IMarker findMarker(long id) throws CoreException {
- return null;
- }
-
- public IMarker[] findMarkers(String type, boolean includeSubtypes, int depth)
- throws CoreException {
- return null;
- }
-
- public int findMaxProblemSeverity(String type, boolean includeSubtypes,
- int depth) throws CoreException {
- return 0;
- }
-
- public String getFileExtension() {
- return null;
- }
-
- public IPath getFullPath() {
- return null;
- }
-
- public long getLocalTimeStamp() {
- return 0;
- }
-
- public IPath getLocation() {
- return null;
- }
-
- public URI getLocationURI() {
- return null;
- }
-
- public IMarker getMarker(long id) {
- return null;
- }
-
- public long getModificationStamp() {
- return 0;
- }
-
- public String getName() {
- return null;
- }
-
- public IContainer getParent() {
- return null;
- }
-
- public Map<?, ?> getPersistentProperties() throws CoreException {
- return null;
- }
-
- public String getPersistentProperty(QualifiedName key) throws CoreException {
- return null;
- }
-
- public IProject getProject() {
- return null;
- }
-
- public IPath getProjectRelativePath() {
- return null;
- }
-
- public IPath getRawLocation() {
- return null;
- }
-
- public URI getRawLocationURI() {
- return null;
- }
-
- public ResourceAttributes getResourceAttributes() {
- return null;
- }
-
- public Map<?, ?> getSessionProperties() throws CoreException {
- return null;
- }
-
- public Object getSessionProperty(QualifiedName key) throws CoreException {
- return null;
- }
-
- public int getType() {
- return 0;
- }
-
- public IWorkspace getWorkspace() {
- return null;
- }
-
- public boolean isAccessible() {
- return true;
- }
-
- public boolean isDerived() {
- return false;
- }
-
- public boolean isDerived(int options) {
- return false;
- }
-
- public boolean isHidden() {
- return false;
- }
-
- public boolean isHidden(int options) {
- return false;
- }
-
- public boolean isLinked() {
- return false;
- }
-
- public boolean isLinked(int options) {
- return false;
- }
-
- public boolean isLocal(int depth) {
- return false;
- }
-
- public boolean isPhantom() {
- return false;
- }
-
- public boolean isReadOnly() {
- return false;
- }
-
- public boolean isSynchronized(int depth) {
- return false;
- }
-
- public boolean isTeamPrivateMember() {
- return false;
- }
-
- public boolean isTeamPrivateMember(int options) {
- return false;
- }
-
- public void move(IPath destination, boolean force, IProgressMonitor monitor)
- throws CoreException {
-
- }
-
- public void move(IPath destination, int updateFlags,
- IProgressMonitor monitor) throws CoreException {
-
- }
-
- public void move(IProjectDescription description, int updateFlags,
- IProgressMonitor monitor) throws CoreException {
-
- }
-
- public void move(IProjectDescription description, boolean force,
- boolean keepHistory, IProgressMonitor monitor) throws CoreException {
-
- }
-
- public void refreshLocal(int depth, IProgressMonitor monitor)
- throws CoreException {
-
- }
-
- public void revertModificationStamp(long value) throws CoreException {
-
- }
-
- public void setDerived(boolean isDerived) throws CoreException {
-
- }
-
- public void setHidden(boolean isHidden) throws CoreException {
-
- }
-
- public void setLocal(boolean flag, int depth, IProgressMonitor monitor)
- throws CoreException {
-
- }
-
- public long setLocalTimeStamp(long value) throws CoreException {
- return 0;
- }
-
- public void setPersistentProperty(QualifiedName key, String value)
- throws CoreException {
-
- }
-
- public void setReadOnly(boolean readOnly) {
-
- }
-
- public void setResourceAttributes(ResourceAttributes attributes)
- throws CoreException {
-
- }
-
- public void setSessionProperty(QualifiedName key, Object value)
- throws CoreException {
-
- }
-
- public void setTeamPrivateMember(boolean isTeamPrivate)
- throws CoreException {
-
- }
-
- public void touch(IProgressMonitor monitor) throws CoreException {
-
- }
-
- @SuppressWarnings("unchecked")
- public Object getAdapter(Class adapter) {
- return null;
- }
-
- public boolean contains(ISchedulingRule rule) {
- return false;
- }
-
- public boolean isConflicting(ISchedulingRule rule) {
- return false;
- }
-
}
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/InsertChangeLogKeyHandler.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/InsertChangeLogKeyHandler.java
index b3f5fbd3c1..4c2fdaf736 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/InsertChangeLogKeyHandler.java
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/InsertChangeLogKeyHandler.java
@@ -147,6 +147,8 @@ public class InsertChangeLogKeyHandler extends ChangeLogAction implements
// select changelog
clw.setChangelog(getChangelog());
+ if (clw.getChangelog() == null)
+ return null;
// write to changelog
clw.setDateLine(clw.getFormatter().formatDateLine(pref_AuthorName,
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/PatchFile.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/PatchFile.java
index 74794325c1..8fff90a685 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/PatchFile.java
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/PatchFile.java
@@ -15,6 +15,7 @@ package org.eclipse.linuxtools.changelog.core.actions;
import java.util.ArrayList;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
@@ -26,6 +27,7 @@ import org.eclipse.core.runtime.Path;
public class PatchFile {
private IPath fpath;
+ private IStorage storage;
private ArrayList<PatchRangeElement> pranges = new ArrayList<PatchRangeElement>();
private boolean newfile = false;
@@ -56,10 +58,10 @@ public class PatchFile {
public PatchFile(IPath filePath) {
fpath = filePath;
}
+
+ public void addLineRange(int from, int to, boolean localChange) {
- public void addLineRange(int from, int to) {
-
- pranges.add(new PatchRangeElement(from, to, ""));
+ pranges.add(new PatchRangeElement(from, to, localChange));
}
public PatchRangeElement[] getRanges() {
@@ -73,15 +75,18 @@ public class PatchFile {
}
- public void appendTxtToLastRange(String txt) {
-
- (pranges.get(pranges.size()-1)).appendTxt(txt);
- }
-
public IPath getPath() {
return fpath;
}
+ public IStorage getStorage() {
+ return storage;
+ }
+
+ public void setStorage(IStorage storage) {
+ this.storage = storage;
+ }
+
public void setResource(IResource resource) {
this.resource = resource;
}
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/PatchRangeElement.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/PatchRangeElement.java
index 491cc7dd8b..04d211e565 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/PatchRangeElement.java
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/PatchRangeElement.java
@@ -20,23 +20,23 @@ public class PatchRangeElement {
public int ffromLine;
public int ftoLine;
- public String fpatch;
+ public boolean flocalChange;
- public PatchRangeElement(int from, int to, String txt) {
+ public PatchRangeElement(int from, int to, boolean localChange) {
ffromLine =from;
ftoLine= to;
- fpatch = txt;
+ flocalChange = localChange;
}
- public void appendTxt(String txt) {
- fpatch += txt + "\n";
+ public boolean isLocalChange() {
+ return flocalChange;
}
@Override
public boolean equals(Object o) {
if (o instanceof PatchRangeElement) {
PatchRangeElement b = (PatchRangeElement)o;
- return b.ffromLine == ffromLine && b.ftoLine == ftoLine && b.fpatch.equals(fpatch);
+ return b.ffromLine == ffromLine && b.ftoLine == ftoLine && b.flocalChange == flocalChange;
}
else
return this == o;
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/PrepareChangeLogAction.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/PrepareChangeLogAction.java
index 7fb30dcc50..008091cc18 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/PrepareChangeLogAction.java
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/PrepareChangeLogAction.java
@@ -13,6 +13,7 @@ package org.eclipse.linuxtools.changelog.core.actions;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Vector;
@@ -27,6 +28,7 @@ import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -40,6 +42,7 @@ import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.linuxtools.changelog.core.ChangeLogWriter;
import org.eclipse.linuxtools.changelog.core.ChangelogPlugin;
+import org.eclipse.linuxtools.changelog.core.IFormatterChangeLogContrib;
import org.eclipse.linuxtools.changelog.core.IParserChangeLogContrib;
import org.eclipse.linuxtools.changelog.core.LineComparator;
import org.eclipse.linuxtools.changelog.core.Messages;
@@ -56,11 +59,15 @@ import org.eclipse.ui.IActionDelegate;
import org.eclipse.ui.IEditorDescriptor;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.editors.text.FileDocumentProvider;
+import org.eclipse.ui.editors.text.StorageDocumentProvider;
import org.eclipse.ui.part.FileEditorInput;
+
/**
* Action handler for prepare changelog.
*
@@ -84,6 +91,14 @@ public class PrepareChangeLogAction extends ChangeLogAction {
}
}
+ private class MyStorageDocumentProvider extends StorageDocumentProvider {
+
+ @Override
+ public IDocument createDocument(Object element) throws CoreException {
+ return super.createDocument(element);
+ }
+ }
+
public PrepareChangeLogAction(String name) {
super(name);
}
@@ -214,8 +229,10 @@ public class PrepareChangeLogAction extends ChangeLogAction {
String osEncoding = file.getCharset();
IFileRevision ancestorState = localDiff.getBeforeState();
IStorage ancestorStorage;
- if (ancestorState != null)
+ if (ancestorState != null) {
ancestorStorage = ancestorState.getStorage(monitor);
+ p.setStorage(ancestorStorage);
+ }
else
ancestorStorage = null;
@@ -227,8 +244,15 @@ public class PrepareChangeLogAction extends ChangeLogAction {
LineComparator right = new LineComparator(file.getContents(), osEncoding);
for (RangeDifference tmp: RangeDifferencer.findDifferences(left, right)) {
if (tmp.kind() == RangeDifference.CHANGE) {
+ // Right side of diff are all changes found in local file.
int rightLength = tmp.rightLength() > 0 ? tmp.rightLength() : tmp.rightLength() + 1;
- p.addLineRange(tmp.rightStart() + 1, tmp.rightStart() + rightLength);
+ // We also want to store left side of the diff which are changes to the ancestor as it may contain
+ // functions/methods that have been removed.
+ int leftLength = tmp.leftLength() > 0 ? tmp.leftLength() : tmp.leftLength() + 1;
+ // Only store left side changes if the storage exists and we add one to the start line number
+ if (p.getStorage() != null)
+ p.addLineRange(tmp.leftStart(), tmp.leftStart() + leftLength, false);
+ p.addLineRange(tmp.rightStart(), tmp.rightStart() + rightLength, true);
}
}
} catch (UnsupportedEncodingException e) {
@@ -398,34 +422,52 @@ public class PrepareChangeLogAction extends ChangeLogAction {
return;
}
- // get formatter
- clw.setFormatter(extensionManager.getFormatterContributor(
- entryFileName, pref_Formatter));
-
+ // Check if formatter is internal or inline..if inline, use the
+ // current active editor part, otherwise, we must find the external
+ // ChangeLog file.
IEditorPart changelog = null;
-
- if (pf.isRemovedFile())
- changelog = getChangelogForRemovePath(entryPath);
- else
- changelog = getChangelog(entryFileName);
-
- // FIXME: this doesn't seem very useful or probable
- if (changelog == null)
- changelog = askChangeLogLocation(entryFileName);
-
- if (changelog == null) {
- ChangelogPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, ChangelogPlugin.PLUGIN_ID, IStatus.ERROR, // $NON-NLS-1$
- Messages.getString("ChangeLog.ErrNoChangeLog"), null)); // $NON-NLS-1$
- return;
+
+ // Before accessing the getFormatterConfigElement, the getFormatContibutor
+ // method must be called to initialize.
+ extensionManager.getFormatterContributor(clw.getEntryFilePath(),
+ pref_Formatter);
+ IConfigurationElement formatterConfigElement = extensionManager
+ .getFormatterConfigElement();
+
+ if (formatterConfigElement.getAttribute("inFile").toLowerCase().equals( //$NON-NLS-1$
+ "true")) { //$NON-NLS-1$
+ try {
+ changelog = openEditor((IFile)pf.getResource());
+ clw.setFormatter(extensionManager.getFormatterContributor(
+ clw.getEntryFilePath(), pref_Formatter));
+ } catch (Exception e) {
+ // do nothing changelog will be null
+ }
+ } else {
+ // external changelog
+ // get formatter
+ clw.setFormatter(extensionManager.getFormatterContributor(
+ entryFileName, pref_Formatter));
+
+ if (pf.isRemovedFile())
+ changelog = getChangelogForRemovePath(entryPath);
+ else
+ changelog = getChangelog(entryFileName);
+
+ // If there isn't a ChangeLog, we will not create one here.
+ // This prevents the situation whereby a project has an inline
+ // ChangeLog formatter and some other files have been modified
+ // as well (e.g. an rpm project). In that case, we don't want
+ // to create a separate ChangeLog for the end-user.
+ if (changelog == null)
+ return;
}
-
// select changelog
clw.setChangelog(changelog);
-
+
// write to changelog
-
- clw.setDateLine(clw.getFormatter().formatDateLine(pref_AuthorName,
+ IFormatterChangeLogContrib formatter = clw.getFormatter();
+ clw.setDateLine(formatter.formatDateLine(pref_AuthorName,
pref_AuthorEmail));
clw.setChangelogLocation(getDocumentLocation(clw.getChangelog(), true));
@@ -492,44 +534,50 @@ public class PrepareChangeLogAction extends ChangeLogAction {
.getFileForLocation(
getWorkspaceRoot().getLocation().append(
patchFileInfo.getPath())));
+
+ SourceEditorInput sei = new SourceEditorInput(patchFileInfo.getStorage());
MyDocumentProvider mdp = new MyDocumentProvider();
+ MyStorageDocumentProvider msdp = new MyStorageDocumentProvider();
try {
- // get document for target file
+ // get document for target file (one for local file, one for repository storage)
IDocument doc = mdp.createDocument(fei);
+ IDocument olddoc = msdp.createDocument(sei);
HashMap<String, String> functionNamesMap = new HashMap<String, String>();
+ ArrayList<String> nameList = new ArrayList<String>();
// for all the ranges
for (PatchRangeElement tpre: patchFileInfo.getRanges()) {
- // for all the lines in a range
- for (int j = tpre.ffromLine; j <= tpre.ftoLine; j++) {
-
- if ((j <= 0) || (j >= doc.getNumberOfLines()))
- continue; // ignore out of bound lines
-
- // add func that determines type of file.
- // right now it assumes it's java file.
- String functionGuess = parseCurrentFunctionAtOffset(
- editorName, fei, doc.getLineOffset(j));
-
- // putting it in hashmap will eliminate duplicate
- // guesses.
- functionNamesMap.put(functionGuess, functionGuess);
-
- }
- }
-
- // dump all unique func. guesses
- fnames = new String[functionNamesMap.size()];
-
- int i = 0;
- for (String fnm: functionNamesMap.values()){
- fnames[i++] = fnm;
+ for (int j = tpre.ffromLine; j <= tpre.ftoLine; j++) {
+
+ if ((j < 0) || (j > doc.getNumberOfLines() - 1))
+ continue; // ignore out of bound lines
+
+ String functionGuess = "";
+ // add func that determines type of file.
+ // right now it assumes it's java file.
+ if (tpre.isLocalChange())
+ functionGuess = parseCurrentFunctionAtOffset(
+ editorName, fei, doc.getLineOffset(j));
+ else
+ functionGuess = parseCurrentFunctionAtOffset(
+ editorName, sei, olddoc.getLineOffset(j));
+
+ // putting it in hashmap will eliminate duplicate
+ // guesses. We use a list to keep track of ordering which
+ // is helpful when trying to document a large set of changes.
+ if (functionNamesMap.get(functionGuess) == null)
+ nameList.add(functionGuess);
+ functionNamesMap.put(functionGuess, functionGuess);
+ }
}
+ // dump all unique func. guesses in the order found
+ fnames = new String[nameList.size()];
+ fnames = nameList.toArray(fnames);
} catch (CoreException e) {
ChangelogPlugin.getDefault().getLog().log(
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/SourceEditorInput.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/SourceEditorInput.java
new file mode 100644
index 0000000000..f80c86a35c
--- /dev/null
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/SourceEditorInput.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Wind River Systems 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.changelog.core.actions;
+
+import org.eclipse.core.resources.IStorage;
+
+/**
+ * SourceEditorInput
+ */
+public class SourceEditorInput extends StorageEditorInput {
+
+ /**
+ * @param storage that represents a source file
+ */
+ public SourceEditorInput(IStorage storage) {
+ super(storage);
+ }
+
+ /*
+ * @see org.eclipse.ui.IEditorInput#exists()
+ */
+ public boolean exists() {
+ return false;
+ }
+
+}
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/StorageEditorInput.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/StorageEditorInput.java
new file mode 100644
index 0000000000..d36a5b53c7
--- /dev/null
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/actions/StorageEditorInput.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Wind River Systems 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.changelog.core.actions;
+
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IPersistableElement;
+import org.eclipse.ui.IStorageEditorInput;
+
+
+/**
+ * Abstract implementation of <code>IStorageEditorInput</code>.
+ */
+abstract public class StorageEditorInput implements IStorageEditorInput {
+
+ /**
+ * Storage associated with this editor input
+ */
+ private IStorage fStorage;
+
+ /**
+ * Constructs an editor input on the given storage
+ */
+ public StorageEditorInput(IStorage storage) {
+ fStorage = storage;
+ }
+
+ /**
+ * @see IStorageEditorInput#getStorage()
+ */
+ public IStorage getStorage() {
+ return fStorage;
+ }
+
+ /**
+ * Set new storage. For subclasses only.
+ * @param storage
+ */
+ protected void setStorage(IStorage storage) {
+ assert storage != null;
+ fStorage = storage;
+ }
+
+ /**
+ * @see IStorageEditorInput#getImageDescriptor()
+ */
+ public ImageDescriptor getImageDescriptor() {
+ return null;
+ }
+
+ /**
+ * @see IStorageEditorInput#getName()
+ */
+ public String getName() {
+ return getStorage().getName();
+ }
+
+ /**
+ * @see IStorageEditorInput#getPersistable()
+ */
+ public IPersistableElement getPersistable() {
+ return null;
+ }
+
+ /**
+ * @see IStorageEditorInput#getToolTipText()
+ */
+ public String getToolTipText() {
+ return getStorage().getFullPath().toOSString();
+ }
+
+ /**
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object object) {
+ if (object == this) {
+ return true;
+ }
+ try {
+ return object instanceof IStorageEditorInput
+ && getStorage().equals(((IStorageEditorInput)object).getStorage());
+ } catch (CoreException e) {
+ }
+ return false;
+ }
+
+ /**
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ return getStorage().hashCode();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+ */
+ @SuppressWarnings("unchecked")
+ public Object getAdapter(Class adapter) {
+ return null;
+ }
+
+}
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/editors/GNUFileEntryDamagerRepairer.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/editors/GNUFileEntryDamagerRepairer.java
index 55a9240a0a..0cc3c4690d 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/editors/GNUFileEntryDamagerRepairer.java
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/editors/GNUFileEntryDamagerRepairer.java
@@ -32,6 +32,7 @@ public class GNUFileEntryDamagerRepairer extends DefaultDamagerRepairer {
/*
* @see IPresentationDamager#getDamageRegion(ITypedRegion, DocumentEvent, boolean)
*/
+ @Override
public IRegion getDamageRegion(ITypedRegion partition, DocumentEvent e, boolean documentPartitioningChanged) {
// In the case of a partition with multiline rules, we will punt to
// reparse the entire partition because we don't know if the line being
@@ -46,10 +47,6 @@ public class GNUFileEntryDamagerRepairer extends DefaultDamagerRepairer {
*/
@Override
public void createPresentation(TextPresentation presentation, ITypedRegion region) {
-
- int offset = region.getOffset();
- int length = region.getLength();
-
super.createPresentation(presentation, region);
}
}
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/editors/GNUPartitionScanner.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/editors/GNUPartitionScanner.java
index c6ed17772b..83c7d249cf 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/editors/GNUPartitionScanner.java
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/editors/GNUPartitionScanner.java
@@ -48,6 +48,7 @@ public class GNUPartitionScanner extends RuleBasedPartitionScanner {
setPredicateRules(result);
}
+ @Override
public IToken nextToken() {
return super.nextToken();
}
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/editors/MultilineRuleDamagerRepairer.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/editors/MultilineRuleDamagerRepairer.java
index 2328eeadde..238544d16f 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/editors/MultilineRuleDamagerRepairer.java
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/changelog/core/editors/MultilineRuleDamagerRepairer.java
@@ -32,6 +32,7 @@ public class MultilineRuleDamagerRepairer extends DefaultDamagerRepairer {
/*
* @see IPresentationDamager#getDamageRegion(ITypedRegion, DocumentEvent, boolean)
*/
+ @Override
public IRegion getDamageRegion(ITypedRegion partition, DocumentEvent e, boolean documentPartitioningChanged) {
// In the case of a partition with multiline rules, we will punt to
// reparse the entire partition because we don't know if the line being
diff --git a/changelog/org.eclipse.linuxtools.changelog.cparser/ChangeLog b/changelog/org.eclipse.linuxtools.changelog.cparser/ChangeLog
index fda1916208..c5b4e16eb3 100644
--- a/changelog/org.eclipse.linuxtools.changelog.cparser/ChangeLog
+++ b/changelog/org.eclipse.linuxtools.changelog.cparser/ChangeLog
@@ -1,3 +1,26 @@
+2010-06-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #315263
+ * src/org/eclipse/linuxtools/changelog/parsers/NullCodeReaderFactory.java: Removed.
+ * src/org/eclipse/linuxtools/changelog/parsers/CParser.java (parseCurrentFunction): Fixed
+ to not use deprecated method for getting AST.
+
+2010-03-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #304185
+ * META-INF/MANIFEST.MF: Add import of org.eclipse.core.resources.
+ * src/org/eclipse/linuxtools/changelog/parsers/CParser.java: Add deprecated annotation as
+ the CodeReader will be deprecated in Eclipse 3.6.
+ * src/org/eclipse/linuxtools/changelog/parsers/NullCodeReaderFactory.java: Ditto.
+
+2010-02-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ Resolves #299974
+ * src/org/eclipse/linuxtools/changelog/parsers/NullCodeReaderFactory.java: New file.
+ * src/org/eclipse/linuxtools/changelog/parsers/CParser.java (parseCurrentFunction): Add
+ support for parsing storage which happens with changes to ancestor file i.e. function
+ removals.
+
2009-08-06 Jeff Johnston <jjohnstn@redhat.com>
Resolves #285866
diff --git a/changelog/org.eclipse.linuxtools.changelog.cparser/META-INF/MANIFEST.MF b/changelog/org.eclipse.linuxtools.changelog.cparser/META-INF/MANIFEST.MF
index 3cb3ddb3ee..eb1d01c135 100644
--- a/changelog/org.eclipse.linuxtools.changelog.cparser/META-INF/MANIFEST.MF
+++ b/changelog/org.eclipse.linuxtools.changelog.cparser/META-INF/MANIFEST.MF
@@ -8,3 +8,4 @@ Require-Bundle: org.eclipse.cdt.core;resolution:=optional,
org.eclipse.cdt.ui;resolution:=optional
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Fragment-Host: org.eclipse.linuxtools.changelog.core;bundle-version="2.6.3"
+Import-Package: org.eclipse.core.resources
diff --git a/changelog/org.eclipse.linuxtools.changelog.cparser/about.html b/changelog/org.eclipse.linuxtools.changelog.cparser/about.html
new file mode 100644
index 0000000000..23506a4bae
--- /dev/null
+++ b/changelog/org.eclipse.linuxtools.changelog.cparser/about.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>About</title>
+</head><body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). 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, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html> \ No newline at end of file
diff --git a/changelog/org.eclipse.linuxtools.changelog.cparser/build.properties b/changelog/org.eclipse.linuxtools.changelog.cparser/build.properties
index ab59e59132..a17f44c086 100644
--- a/changelog/org.eclipse.linuxtools.changelog.cparser/build.properties
+++ b/changelog/org.eclipse.linuxtools.changelog.cparser/build.properties
@@ -1,4 +1,5 @@
source.. = src/
bin.includes = META-INF/,\
.,\
+ about.html,\
fragment.xml
diff --git a/changelog/org.eclipse.linuxtools.changelog.cparser/src/org/eclipse/linuxtools/changelog/parsers/CParser.java b/changelog/org.eclipse.linuxtools.changelog.cparser/src/org/eclipse/linuxtools/changelog/parsers/CParser.java
index 4cc0386451..709bb6ad1e 100644
--- a/changelog/org.eclipse.linuxtools.changelog.cparser/src/org/eclipse/linuxtools/changelog/parsers/CParser.java
+++ b/changelog/org.eclipse.linuxtools.changelog.cparser/src/org/eclipse/linuxtools/changelog/parsers/CParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006 Phil Muldoon <pkmuldoon@picobot.org>.
+ * Copyright (c) 2006, 2010 Phil Muldoon <pkmuldoon@picobot.org>.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -10,29 +10,44 @@
*******************************************************************************/
package org.eclipse.linuxtools.changelog.parsers;
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTNodeSelector;
+import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
+import org.eclipse.cdt.core.dom.ast.gnu.cpp.GPPLanguage;
import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ILanguage;
import org.eclipse.cdt.core.model.IWorkingCopy;
+import org.eclipse.cdt.core.parser.FileContent;
+import org.eclipse.cdt.core.parser.IScannerInfo;
+import org.eclipse.cdt.core.parser.IncludeFileContentProvider;
+import org.eclipse.cdt.core.parser.ParserUtil;
+import org.eclipse.cdt.core.parser.ScannerInfo;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.ui.IWorkingCopyManager;
+import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.linuxtools.changelog.core.IParserChangeLogContrib;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
-
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IStorageEditorInput;
import org.eclipse.ui.texteditor.AbstractTextEditor;
/**
* @author pmuldoon (Phil Muldoon)
*/
-
public class CParser implements IParserChangeLogContrib {
public CParser() {
super();
}
-
/**
* @see IParserChangeLogContrib#parseCurrentFunction(IEditorInput, int)
*/
@@ -41,74 +56,137 @@ public class CParser implements IParserChangeLogContrib {
String currentElementName;
- // Get the working copy and connect to input.
- IWorkingCopyManager manager = CUIPlugin.getDefault()
- .getWorkingCopyManager();
- manager.connect(input);
-
- // Retrieve the C/C++ Element in question.
- IWorkingCopy workingCopy = manager.getWorkingCopy(input);
- ICElement method = workingCopy.getElementAtOffset(offset);
+ if (input instanceof IFileEditorInput) {
+ // Get the working copy and connect to input.
+ IWorkingCopyManager manager = CUIPlugin.getDefault()
+ .getWorkingCopyManager();
+ manager.connect(input);
- manager.disconnect(input);
+ // Retrieve the C/C++ Element in question.
+ IWorkingCopy workingCopy = manager.getWorkingCopy(input);
+ ICElement method = workingCopy.getElementAtOffset(offset);
- // no element selected
- if (method == null)
- return "";
-
- // Get the current element name, to test it.
- currentElementName = method.getElementName();
-
- // Element doesn't have a name. Can go no further.
- if (currentElementName == null) {
- // element doesn't have a name
- return "";
- }
+ manager.disconnect(input);
- // Get the Element Type to test.
- int elementType = method.getElementType();
+ // no element selected
+ if (method == null)
+ return "";
- switch (elementType) {
- case ICElement.C_FIELD:
- case ICElement.C_METHOD:
- case ICElement.C_FUNCTION:
- break;
- case ICElement.C_MODEL:
- return "";
-
- // So it's not a method, field, function, or model. Where are we?
- default:
- ICElement tmpMethodType;
- if (((tmpMethodType = method.getAncestor(ICElement.C_FUNCTION)) == null)
- && ((tmpMethodType = method.getAncestor(ICElement.C_METHOD)) == null)
- && ((tmpMethodType = method.getAncestor(ICElement.C_CLASS)) == null)) {
- return "";
- } else {
- // In a class, but not in a method. Return class name instead.
- method = tmpMethodType;
+ // Get the current element name, to test it.
currentElementName = method.getElementName();
- }
- }
-
- // Build all ancestor classes.
- // Append all ancestor class names to string
- ICElement tmpParent = method.getParent();
-
- while (tmpParent != null) {
- ICElement tmpParentClass = tmpParent.getAncestor(ICElement.C_CLASS);
- if (tmpParentClass != null) {
- String tmpParentClassName = tmpParentClass.getElementName();
- if (tmpParentClassName == null)
+ // Element doesn't have a name. Can go no further.
+ if (currentElementName == null) {
+ // element doesn't have a name
+ return "";
+ }
+
+ // Get the Element Type to test.
+ int elementType = method.getElementType();
+
+ switch (elementType) {
+ case ICElement.C_FIELD:
+ case ICElement.C_METHOD:
+ case ICElement.C_FUNCTION:
+ break;
+ case ICElement.C_MODEL:
+ return "";
+
+ // So it's not a method, field, function, or model. Where are we?
+ default:
+ ICElement tmpMethodType;
+ if (((tmpMethodType = method.getAncestor(ICElement.C_FUNCTION)) == null)
+ && ((tmpMethodType = method.getAncestor(ICElement.C_METHOD)) == null)
+ && ((tmpMethodType = method.getAncestor(ICElement.C_CLASS)) == null)) {
+ return "";
+ } else {
+ // In a class, but not in a method. Return class name instead.
+ method = tmpMethodType;
+ currentElementName = method.getElementName();
+ }
+
+ }
+
+ // Build all ancestor classes.
+ // Append all ancestor class names to string
+ ICElement tmpParent = method.getParent();
+
+ while (tmpParent != null) {
+ ICElement tmpParentClass = tmpParent.getAncestor(ICElement.C_CLASS);
+ if (tmpParentClass != null) {
+ String tmpParentClassName = tmpParentClass.getElementName();
+ if (tmpParentClassName == null)
+ return currentElementName;
+ currentElementName = tmpParentClassName + "."
+ + currentElementName;
+ } else
return currentElementName;
- currentElementName = tmpParentClassName + "."
- + currentElementName;
- } else
- return currentElementName;
- tmpParent = tmpParentClass.getParent();
+ tmpParent = tmpParentClass.getParent();
+ }
+ return currentElementName;
}
- return currentElementName;
+ else if (input instanceof IStorageEditorInput) {
+ // Get the working copy and connect to input.
+ // don't follow inclusions
+ currentElementName = "";
+ IStorageEditorInput sei = (IStorageEditorInput)input;
+ // don't follow inclusions
+ IncludeFileContentProvider contentProvider = IncludeFileContentProvider.getEmptyFilesProvider();
+
+ // empty scanner info
+ IScannerInfo scanInfo= new ScannerInfo();
+ IStorage ancestorStorage = sei.getStorage();
+ if (ancestorStorage == null)
+ return "";
+ InputStream stream = ancestorStorage.getContents();
+ byte buffer[] = new byte[100];
+ String data = new String("");
+ int read = 0;
+ try {
+ do {
+ read = stream.read(buffer);
+ if (read > 0) {
+ String tmp = new String(buffer, 0, read);
+ data = data.concat(tmp);
+ }
+ } while (read == 100);
+ stream.close();
+ } catch (IOException e) {
+ // do nothing
+ }
+
+ FileContent content = FileContent.create("<text>", data.toCharArray()); //$NON-NLS-1$
+
+ // determine the language
+ boolean isSource[]= {false};
+ ILanguage language= GPPLanguage.getDefault();
+
+ try {
+ IASTTranslationUnit ast;
+ int options= isSource[0] ? ILanguage.OPTION_IS_SOURCE_UNIT : 0;
+ ast= language.getASTTranslationUnit(content, scanInfo, contentProvider, null, options, ParserUtil.getParserLogService());
+ IASTNodeSelector n = ast.getNodeSelector(null);
+ IASTNode node = n.findFirstContainedNode(offset, 100);
+ while (node != null && !(node instanceof IASTTranslationUnit)) {
+ if (node instanceof IASTFunctionDefinition) {
+ IASTFunctionDefinition fd = (IASTFunctionDefinition)node;
+ IASTFunctionDeclarator d = fd.getDeclarator();
+ currentElementName = new String(d.getName().getSimpleID());
+ break;
+ }
+ node = node.getParent();
+ }
+// System.out.println(currentElementName);
+ } catch (CoreException exc) {
+ currentElementName = "";
+ CUIPlugin.log(exc);
+ }
+
+ return currentElementName;
+ }
+
+ return "";
}
/**
diff --git a/changelog/org.eclipse.linuxtools.changelog.doc/about.html b/changelog/org.eclipse.linuxtools.changelog.doc/about.html
index 0c6525d9a8..c258ef55d8 100644
--- a/changelog/org.eclipse.linuxtools.changelog.doc/about.html
+++ b/changelog/org.eclipse.linuxtools.changelog.doc/about.html
@@ -1,33 +1,28 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<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>
+<p>June 5, 2006</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>The Eclipse 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>
-<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>
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
</body>
</html> \ No newline at end of file
diff --git a/changelog/org.eclipse.linuxtools.changelog.doc/plugin.properties b/changelog/org.eclipse.linuxtools.changelog.doc/plugin.properties
index 0d52247d09..3c4511a3f6 100644
--- a/changelog/org.eclipse.linuxtools.changelog.doc/plugin.properties
+++ b/changelog/org.eclipse.linuxtools.changelog.doc/plugin.properties
@@ -1,2 +1,2 @@
pluginName=ChangeLog Plugin
-providerName=Eclipse
+providerName=Eclipse Linux Tools
diff --git a/changelog/org.eclipse.linuxtools.changelog.javaparser/ChangeLog b/changelog/org.eclipse.linuxtools.changelog.javaparser/ChangeLog
index 8c4c9a984e..a98fc76e68 100644
--- a/changelog/org.eclipse.linuxtools.changelog.javaparser/ChangeLog
+++ b/changelog/org.eclipse.linuxtools.changelog.javaparser/ChangeLog
@@ -1,3 +1,8 @@
+2010-02-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ * src/org/eclipse/linuxtools/changelog/parsers/java/JavaParser.java (parseCurrentFunction): Add
+ check for null WorkingCopy to avoid errors if type of IEditorInput is not supported.
+
2009-08-06 Jeff Johnston <jjohnstn@redhat.com>
Resolves #285866
diff --git a/changelog/org.eclipse.linuxtools.changelog.javaparser/about.html b/changelog/org.eclipse.linuxtools.changelog.javaparser/about.html
new file mode 100644
index 0000000000..23506a4bae
--- /dev/null
+++ b/changelog/org.eclipse.linuxtools.changelog.javaparser/about.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>About</title>
+</head><body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). 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, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html> \ No newline at end of file
diff --git a/changelog/org.eclipse.linuxtools.changelog.javaparser/build.properties b/changelog/org.eclipse.linuxtools.changelog.javaparser/build.properties
index e3023e14e9..65e56c7444 100644
--- a/changelog/org.eclipse.linuxtools.changelog.javaparser/build.properties
+++ b/changelog/org.eclipse.linuxtools.changelog.javaparser/build.properties
@@ -2,4 +2,5 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
+ about.html,\
fragment.xml
diff --git a/changelog/org.eclipse.linuxtools.changelog.javaparser/src/org/eclipse/linuxtools/changelog/parsers/java/JavaParser.java b/changelog/org.eclipse.linuxtools.changelog.javaparser/src/org/eclipse/linuxtools/changelog/parsers/java/JavaParser.java
index e11744ea9f..bb08b33424 100644
--- a/changelog/org.eclipse.linuxtools.changelog.javaparser/src/org/eclipse/linuxtools/changelog/parsers/java/JavaParser.java
+++ b/changelog/org.eclipse.linuxtools.changelog.javaparser/src/org/eclipse/linuxtools/changelog/parsers/java/JavaParser.java
@@ -46,6 +46,10 @@ public class JavaParser implements IParserChangeLogContrib {
// Retrieve the Java Element in question.
ICompilationUnit workingCopy = manager.getWorkingCopy(input);
+
+ if (workingCopy == null)
+ return "";
+
IJavaElement method = workingCopy.getElementAt(offset);
manager.disconnect(input);
diff --git a/changelog/plugin.properties b/changelog/plugin.properties
deleted file mode 100644
index b02c9a2472..0000000000
--- a/changelog/plugin.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-
-pluginName=ChangeLog Plugin
-providerName=Red Hat, Inc.
-compareParser=Compare Editor Parser
-cParser=C Editor Parser
-javaParser=Java Editor Parser
-pyParser=Python Parser
-gnuEditorConfig=GNU Editor
-gnuFormatter=GNU Style
-clActionSet=ChangeLog Action Set
-clEntry=&ChangeLog Entry
-insertCLEntry=Insert ChangeLog entry
-insertCLEntryDesc=Insert a ChangeLog entry
-prefTitle=ChangeLog
diff --git a/changelog/plugin.xml b/changelog/plugin.xml
deleted file mode 100644
index 131470a88c..0000000000
--- a/changelog/plugin.xml
+++ /dev/null
@@ -1,201 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.linuxtools.changelog.core"
- name="%pluginName"
- version="2.3.4"
- provider-name="%providerName"
- class="org.eclipse.linuxtools.changelog.core.ChangelogPlugin">
-
- <runtime>
- <library name="changelog.jar">
- <export name="*"/>
- </library>
- </runtime>
-
- <requires>
- <import plugin="org.eclipse.jdt.ui" />
- <import plugin="org.eclipse.jdt.core" />
- <import plugin="org.eclipse.cdt.ui" optional="true" />
- <import plugin="org.eclipse.cdt.core" optional="true" />
- <import plugin="org.eclipse.team.ui" />
- <import plugin="org.eclipse.compare" />
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.ui.workbench.texteditor"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.ui.editors"/>
- <import plugin="org.eclipse.team.cvs.ui"/>
- <import plugin="org.eclipse.team.cvs.core" version="3.2.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.team.core"/>
- <import plugin="org.eclipse.ui.navigator"/>
- </requires>
-
- <extension-point id="parserContribution"
- name="Changelog Language Parser Contribution"
- schema="schema/parserContribution.exsd"/>
- <extension-point id="formatterContribution" name="Changelog Format Contribution" schema="schema/formatterContribution.exsd"/>
- <extension-point id="editorContribution" name="ChangeLog Editor Contribution" schema="schema/editorContribution.exsd"/>
- <extension-point id="locationContribution" name="ChangeLog location contribution" schema="schema/locationContribution.exsd"/>
-
- <extension
- point="org.eclipse.ui.commands">
-
- <category
- name="Changelog"
- description="Changelog key bindings"
- id="com.redhat.changelog">
- </category>
-
- <command
- categoryId="com.redhat.changelog"
- description="%insertCLEntryDesc"
- id="com.redhat.eclipse.changelog.core.actions.KeyActionCommand"
- name="%insertCLEntry">
- </command>
- <command
- categoryId="com.redhat.changelog"
- description="Prepares Changelog"
- id="com.redhat.eclipse.changelog.core.preparechangelog"
- name="Prepare Changelog"/>
- <command
- categoryId="com.redhat.changelog"
- description="Copies latest changelog entry to clipboard"
- id="com.redhat.eclipse.changelog.core.prepareCommit"
- name="Prepare Commit"/>
- <command
- categoryId="com.redhat.changelog"
- description="Formats ChangeLog"
- id="com.redhat.eclipse.changelog.core.formatChangeLog"
- name="Format ChangeLog"/>
- </extension>
-
- <!-- Actions -->
- <extension point="org.eclipse.ui.actionSets">
- <actionSet label="%clActionSet" visible="true" id="com.redhat.eclipse.changelog.actionSet">
- <action
- definitionId="com.redhat.eclipse.changelog.core.actions.KeyActionCommand"
- label="%clEntry"
- class="org.eclipse.linuxtools.changelog.core.actions.InsertChangeLogKeyHandler"
- tooltip="%clEntry"
- menubarPath="edit/"
- id="com.redhat.eclipse.changelog.core.actions.KeyAction">
- </action>
- </actionSet>
- </extension>
-
- <extension point = "org.eclipse.ui.preferencePages">
- <page
- id="com.redhat.eclipse.changelog.core.Page1"
- class="org.eclipse.linuxtools.changelog.core.ChangeLogPreferencesPage"
- name="%prefTitle">
- </page>
- </extension>
-
- <extension point="com.redhat.eclipse.changelog.core.parserContribution">
- <parser
- name="%javaParser"
- class="org.eclipse.changelog.core.parsers.JavaParser"
- editor="CompilationUnitEditor">
- </parser>
- <parser
- name="%cParser"
- class="org.eclipse.changelog.core.parsers.CParser"
- editor="CEditor">
- </parser>
- <parser
- name="%compareParser"
- class="org.eclipse.changelog.core.parsers.CompareParser"
- editor="CompareEditor">
- </parser>
- </extension>
-
- <extension
- point="com.redhat.eclipse.changelog.core.formatterContribution">
- <formatter
- inFile="false"
- class="org.eclipse.changelog.core.formatters.GNUFormat"
- id="com.redhat.eclipse.changelog.GNUFormat"
- name="%gnuFormatter">
- <fileName name="ChangeLog" />
- </formatter>
- </extension>
- <extension
- point="org.eclipse.ui.editors">
- <editor
- class="org.eclipse.linuxtools.changelog.core.editors.ChangeLogEditor"
- default="true"
- filenames="ChangeLog"
- icon="icons/file_obj.gif"
- id="com.redhat.eclipse.changelog.core.editor6"
- name="ChangeLog Editor"/>
- </extension>
- <extension
- point="com.redhat.eclipse.changelog.core.editorContribution">
- <editor
- class="org.eclipse.changelog.core.editors.GNUEditorConfiguration"
- id="com.redhat.eclipse.changelog.core.gnueditor"
- name="GNU Editor"/>
- </extension>
- <extension
- point="org.eclipse.ui.navigator.viewer">
- <viewerActionBinding viewerId="org.eclipse.team.cvs.ui.workspaceSynchronization">
- <includes>
- <actionExtension pattern="com.redhat.eclipse.changelog.core.ui.ChangeLogActioniProvider"/>
- </includes>
- </viewerActionBinding>
- </extension>
- <extension
- point="org.eclipse.ui.navigator.navigatorContent">
- <actionProvider
- class="org.eclipse.linuxtools.changelog.core.ui.ChangeLogActionProvider"
- id="com.redhat.eclipse.changelog.core.ui.ChangeLogActioniProvider">
- <enablement>
- <adapt type="org.eclipse.core.resources.mapping.ResourceMapping"/>
- </enablement>
- </actionProvider>
- </extension>
- <extension
- point="org.eclipse.ui.bindings">
- <key
- commandId="com.redhat.eclipse.changelog.core.actions.KeyActionCommand"
- contextId="org.eclipse.ui.textEditorScope"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Ctrl+Alt+C"/>
- <scheme
- id="com.redhat.changelog.keyscheme.default"
- name="default"/>
- <key
- commandId="com.redhat.eclipse.changelog.core.preparechangelog"
- contextId="org.eclipse.ui.contexts.window"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Ctrl+Alt+P"/>
- <key
- commandId="com.redhat.eclipse.changelog.core.prepareCommit"
- contextId="org.eclipse.ui.textEditorScope"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Ctrl+Alt+V"/>
- <key
- commandId="com.redhat.eclipse.changelog.core.formatChangeLog"
- contextId="org.eclipse.ui.textEditorScope"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="ESC Ctrl+F"/>
- </extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.linuxtools.changelog.core.actions.PrepareChangelogKeyHandler"
- commandId="com.redhat.eclipse.changelog.core.preparechangelog"/>
- <handler
- class="org.eclipse.linuxtools.changelog.core.actions.InsertChangeLogKeyHandler"
- commandId="com.redhat.eclipse.changelog.core.actions.KeyActionCommand"/>
- <handler
- class="org.eclipse.linuxtools.changelog.core.actions.PrepareCommitHandler"
- commandId="com.redhat.eclipse.changelog.core.prepareCommit"/>
- <handler
- class="org.eclipse.linuxtools.changelog.core.actions.FormatChangeLogAction"
- commandId="com.redhat.eclipse.changelog.core.formatChangeLog"/>
- </extension>
-</plugin>
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/ChangeLogExtensionManager.java b/changelog/src/org/eclipse/linuxtools/changelog/core/ChangeLogExtensionManager.java
deleted file mode 100644
index f5d739c6d5..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/ChangeLogExtensionManager.java
+++ /dev/null
@@ -1,262 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kyu Lee <klee@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import java.util.regex.PatternSyntaxException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-
-
-/**
- * This class will manage extension related operations.
- *
- * @author klee
- *
- */
-public class ChangeLogExtensionManager {
-
-
- private static final ChangeLogExtensionManager exm = new ChangeLogExtensionManager();
-
-
- // These are used as a simple cache so we don't have to iterate over
- // all extensions to formatContribution every time the action is invoked.
- protected IConfigurationElement cachedPrefFormatter = null;
-
- protected IConfigurationElement[] cachedInFileFormateters = null;
-
- protected IExtensionPoint parserExtensions = null;
-
- protected IExtensionPoint formatterExtensions = null;
-
- protected IParserChangeLogContrib parserContributor = null;
-
- protected IFormatterChangeLogContrib formatterContributor = null;
-
- protected IConfigurationElement formatterConfigElementToUse = null;
-
- private ChangeLogExtensionManager() {
- getParserContributions();
- getFormatterContributions();
- }
-
- public static ChangeLogExtensionManager getExtensionManager() {
- return exm;
- }
-
- protected void getFormatterContributions() {
- formatterExtensions = Platform
- .getExtensionRegistry()
- .getExtensionPoint(
- "org.eclipse.linuxtools.changelog.core", "formatterContribution"); //$NON-NLS-1$
- }
-
- protected void getParserContributions() {
-
- parserExtensions = Platform.getExtensionRegistry().getExtensionPoint(
- "org.eclipse.linuxtools.changelog.core", "parserContribution"); //$NON-NLS-1$
-
- }
-
- public IParserChangeLogContrib getParserContributor(String editorName) {
-
- if (parserExtensions != null) {
- IConfigurationElement[] elements = parserExtensions
- .getConfigurationElements();
- for (int i = 0; i < elements.length; i++) {
- if (elements[i].getName().equals("parser")
- && (elements[i].getAttribute("editor")
- .equals(editorName))) {
- //$NON-NLS-1$
- try {
- IConfigurationElement bob = elements[i];
- parserContributor = (IParserChangeLogContrib) bob
- .createExecutableExtension("class");
- return parserContributor;
- } catch (CoreException e) {
- ChangelogPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, "Changelog",
- IStatus.ERROR, e.getMessage(), e));
- }
-
- }
- }
- }
-
-
-
- return null;
- }
-
-
-
-
- public IConfigurationElement getFormatterConfigElement() {
- return formatterConfigElementToUse;
- }
-
- /**
- * Fetches formatterName formatter from extension, but if there exists a inline
- * formatter for entryFileName, then it uses that inline formatter.
- */
- public IFormatterChangeLogContrib getFormatterContributor(String entryFilePath, String formatterName) {
-
-
- // extract just file name;
- String fileName;
-
- int lastDir = entryFilePath.lastIndexOf('/');
- if ((lastDir >= 0) && (lastDir +1 <= entryFilePath.length()))
- fileName = entryFilePath.substring(lastDir + 1, entryFilePath.length());
- else
- fileName = entryFilePath;
-
-
- // IFile file = null;
-
- if (formatterExtensions != null) {
- IConfigurationElement[] elements = formatterExtensions
- .getConfigurationElements();
-
- // cache the in-file formatters on the first run
- if (cachedInFileFormateters == null) {
- List inFileFormatters = new LinkedList();
- for (int i = 0; i < elements.length; i++) {
- IConfigurationElement formatterConfigElement = elements[i];
- if (formatterConfigElement.getName().equals("formatter")
- && formatterConfigElement.getAttribute("inFile")
- .toLowerCase().equals("true")) {
- inFileFormatters.add(elements[i]);
- }
- }
- cachedInFileFormateters = (IConfigurationElement[]) inFileFormatters
- .toArray(new IConfigurationElement[] {});
- }
-
- // check if there is an in-file changelog formatter for the
- // currently
- // edited file
- for (int i = 0; i < cachedInFileFormateters.length; i++) {
- IConfigurationElement formatterConfigElement = cachedInFileFormateters[i];
-
- IConfigurationElement[] patternElementTmp = formatterConfigElement
- .getChildren();
-
- // error check
- if (patternElementTmp == null)
- continue;
- IConfigurationElement patternElement = patternElementTmp[0];
-
- if (patternElement.getAttribute("pattern") == null) {
- ChangelogPlugin
- .getDefault()
- .getLog()
- .log(
- new Status(
- IStatus.ERROR,
- "Changelog",
- IStatus.ERROR,
- "Got non-pattern child with inFile set to True",
- new Exception(
- "Got non-pattern child with inFile set to True")));
- } else {
- String filePattern = patternElement.getAttribute("pattern");
-
- try {
- Pattern pattern = Pattern.compile(filePattern);
- Matcher fileMatcher = pattern.matcher(fileName);
-
- // if the filename of the current editor matches the
- // file
- // pattern then we're done
- if (fileMatcher.matches()) {
- formatterConfigElementToUse = formatterConfigElement;
- break;
- }
- } catch (PatternSyntaxException e) {
- ChangelogPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, "Changelog",
- IStatus.ERROR, e.getMessage(), e));
- }
- }
-
- }
-
- // if we haven't found an in-file formatter we try to get the user's
- // prefered formatter
- if (formatterConfigElementToUse == null) {
-
- // we cache the user's preferred formatter on the first run, and
- // whenever it changes
- if (cachedPrefFormatter == null
- || !cachedPrefFormatter.getAttribute("name").equals(
- formatterName)) {
-
- for (int i = 0; i < elements.length; i++) {
- IConfigurationElement formatterConfigElement = elements[i];
- if (formatterConfigElement.getName()
- .equals("formatter") && formatterConfigElement.getAttribute("inFile").toLowerCase().equals("false")) { //$NON-NLS-1$
- if (formatterConfigElement.getAttribute("name")
- .equals(formatterName))
- cachedPrefFormatter = formatterConfigElement;
- break;
-
- }
- }
- }
-
- formatterConfigElementToUse = cachedPrefFormatter;
-
- if (formatterConfigElementToUse == null) {
- ChangelogPlugin
- .getDefault()
- .getLog()
- .log(
- new Status(
- IStatus.ERROR,
- "Changelog",
- IStatus.ERROR,
- "Could not retrieve user's preferred formatter, aborting action.",
- new Exception(
- "Could not retrieve user's preferred formatter, aborting action.")));
-
- return null;
- }
-
- }
- }
-
-
-
- try {
- return (IFormatterChangeLogContrib) formatterConfigElementToUse
- .createExecutableExtension("class");
-
- } catch (CoreException e) {
- ChangelogPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, "Changelog", IStatus.ERROR, e
- .getMessage(), e));
- e.printStackTrace();
- }
-
-
- return null;
- }
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/ChangeLogPreferencesPage.java b/changelog/src/org/eclipse/linuxtools/changelog/core/ChangeLogPreferencesPage.java
deleted file mode 100644
index 17248448c6..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/ChangeLogPreferencesPage.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Phil Muldoon <pkmuldoon@picobot.org>.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pmuldoon@redhat.com> - initial API and implementation
- * Kyu Lee <klee@redhat.com> - editor support
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core;
-
-import java.net.UnknownHostException;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-/**
- * @author pmuldoon (Phil Muldoon)
- */
-
-/**
- * This class implements a sample preference page that is added to the
- * preference dialog based on the registration.
- */
-public class ChangeLogPreferencesPage extends PreferencePage implements
- IWorkbenchPreferencePage, SelectionListener, ModifyListener {
-
- private Text emailField;
-
- private Text nameField;
-
- private List formatterList;
-
- private List editorList;
-
- private Composite createComposite(Composite parent, int numColumns) {
- Composite composite = new Composite(parent, SWT.NULL);
-
- // GridLayout
- GridLayout layout = new GridLayout();
- layout.numColumns = numColumns;
- composite.setLayout(layout);
-
- // GridData
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- composite.setLayoutData(data);
- return composite;
- }
-
- private Label createLabel(Composite parent, String text) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- data.horizontalAlignment = GridData.FILL;
- label.setLayoutData(data);
- return label;
- }
-
- private Text createTextField(Composite parent) {
- Text text = new Text(parent, SWT.SINGLE | SWT.BORDER);
- text.addModifyListener(this);
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.verticalAlignment = GridData.CENTER;
- data.grabExcessVerticalSpace = false;
- text.setLayoutData(data);
- return text;
- }
-
- private List createListBox(Composite parent, int sizeHint) {
- List list = new List(parent, SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL);
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.verticalAlignment = GridData.CENTER;
- data.grabExcessVerticalSpace = false;
- data.heightHint = list.getItemHeight() * sizeHint;
- list.setLayoutData(data);
-
- return list;
- }
-
- protected IPreferenceStore doGetPreferenceStore() {
- return ChangelogPlugin.getDefault().getPreferenceStore();
- }
-
- public void init(IWorkbench workbench) {
- initializeDefaultPreferences(getPreferenceStore());
- }
-
- protected static String getUserRealName() {
- return System.getProperty("gnu.gcj.user.realname", //$NON-NLS-1$
- getUserName());
- }
-
- protected static String getUserName() {
- return System.getProperty("user.name"); //$NON-NLS-1$
- }
-
- protected static String getHostName() {
- try {
- return java.net.InetAddress.getLocalHost().getHostName();
- } catch (UnknownHostException e) {
- // instead of throwing exception, return default host name
- // RH bug#194406
- return "localhost.localdomain"; //$NON-NLS-1$
- }
- }
-
- protected void initializeDefaultPreferences(IPreferenceStore store) {
- // store.setDefault("IChangeLogConstants.AUTHOR_NAME", getUserName());
- // //$NON-NLS-1$ //$NON-NLS-2$
- // store
- // .setDefault(
- // "IChangeLogConstants.AUTHOR_EMAIL", getUserName() + "@" +
- // getHostName()); //$NON-NLS-1$ //$NON-NLS-2$
- //
- store.setDefault("IChangeLogConstants.AUTHOR_NAME", getUserRealName()); //$NON-NLS-1$ //$NON-NLS-2$
- store
- .setDefault(
- "IChangeLogConstants.AUTHOR_EMAIL", getUserName() + "@" + getHostName()); //$NON-NLS-1$ //$NON-NLS-2$
-
- store.setDefault("IChangeLogConstants.DEFAULT_FORMATTER", "GNU Style"); //$NON-NLS-1$ //$NON-NLS-2$
- store.setDefault("IChangeLogConstants.DEFAULT_EDITOR", "GNU Editor"); //$NON-NLS-1$ //$NON-NLS-2$
-
- }
-
- private void initializeDefaults() {
- IPreferenceStore store = getPreferenceStore();
- emailField.setText(store
- .getDefaultString("IChangeLogConstants.AUTHOR_EMAIL")); //$NON-NLS-1$
- nameField.setText(store
- .getDefaultString("IChangeLogConstants.AUTHOR_NAME")); //$NON-NLS-1$
- setDefaultFormatter(store);
- setDefaultEditor(store);
- storeValues();
- }
-
- private void setDefaultFormatter(IPreferenceStore store) {
-
- String defaultFormatter = store
- .getDefaultString("IChangeLogConstants.DEFAULT_FORMATTER"); //$NON-NLS-1$
- for (int i = 0; i < formatterList.getItemCount(); i++) {
- if (formatterList.getItem(i).equals(defaultFormatter)) {
- formatterList.setSelection(i);
- return;
- }
- }
- }
-
- private void setDefaultEditor(IPreferenceStore store) {
-
- String defaultEditor = store
- .getDefaultString("IChangeLogConstants.DEFAULT_EDITOR"); //$NON-NLS-1$
- for (int i = 0; i < editorList.getItemCount(); i++) {
- if (editorList.getItem(i).equals(defaultEditor)) {
- editorList.setSelection(i);
- return;
- }
- }
- }
-
- private void populateFormatList(IPreferenceStore store) {
- IExtensionPoint parserExtensions = Platform
- .getExtensionRegistry()
- .getExtensionPoint(
- "org.eclipse.linuxtools.changelog.core", "formatterContribution"); //$NON-NLS-1$ //$NON-NLS-2$
- if (parserExtensions != null) {
- IConfigurationElement[] elements = parserExtensions
- .getConfigurationElements();
- for (int i = 0; i < elements.length; i++) {
- if (elements[i].getName().equals("formatter")) //$NON-NLS-1$
- {
-
- String fname = elements[i].getAttribute("name"); //$NON-NLS-1$\
- // only add formatters for external files, not in-file formatters.
- if (elements[i].getAttribute("inFile").toLowerCase().equals("false"))
- formatterList.add(fname);
-
- if (fname
- .equals(store
- .getString("IChangeLogConstants.DEFAULT_FORMATTER"))) //$NON-NLS-1$
- formatterList
- .setSelection(formatterList.getItemCount() - 1);
- }
- }
-
- }
- }
-
- private void populateEditorList(IPreferenceStore store) {
- IExtensionPoint editorExtensions = Platform
- .getExtensionRegistry()
- .getExtensionPoint(
- "org.eclipse.linuxtools.changelog.core", "editorContribution"); //$NON-NLS-1$ //$NON-NLS-2$
- if (editorExtensions != null) {
- IConfigurationElement[] elements = editorExtensions
- .getConfigurationElements();
- for (int i = 0; i < elements.length; i++) {
- if (elements[i].getName().equals("editor")) //$NON-NLS-1$
- {
-
- String fname = elements[i].getAttribute("name"); //$NON-NLS-1$
- editorList.add(fname);
- if (fname.equals(store
- .getString("IChangeLogConstants.DEFAULT_EDITOR"))) //$NON-NLS-1$
- editorList.setSelection(editorList.getItemCount() - 1);
- }
- }
-
- }
- }
-
- private void initializeValues() {
- IPreferenceStore store = getPreferenceStore();
-
- emailField.setText(store.getString("IChangeLogConstants.AUTHOR_EMAIL")); //$NON-NLS-1$
- nameField.setText(store.getString("IChangeLogConstants.AUTHOR_NAME")); //$NON-NLS-1$
- populateFormatList(store);
- populateEditorList(store);
- }
-
- private void storeValues() {
- IPreferenceStore store = getPreferenceStore();
-
- store.setValue("IChangeLogConstants.AUTHOR_NAME", nameField.getText()); //$NON-NLS-1$
- store
- .setValue(
- "IChangeLogConstants.AUTHOR_EMAIL", emailField.getText()); //$NON-NLS-1$
- String[] selection = formatterList.getSelection();
- store.setValue("IChangeLogConstants.DEFAULT_FORMATTER", selection[0]); //$NON-NLS-1$
- String[] selection2 = editorList.getSelection();
- store.setValue("IChangeLogConstants.DEFAULT_EDITOR", selection2[0]); //$NON-NLS-1$
-
- }
-
- public void modifyText(ModifyEvent event) {
- // Do nothing on a modification in this example
- }
-
- /*
- * (non-Javadoc) Method declared on PreferencePage
- */
- protected void performDefaults() {
- super.performDefaults();
- initializeDefaults();
-
- }
-
- /*
- * (non-Javadoc) Method declared on PreferencePage
- */
- public boolean performOk() {
- storeValues();
- ChangelogPlugin.getDefault().savePluginPreferences();
- return true;
- }
-
- protected Control createContents(Composite parent) {
- // composite_textField << parent
- Composite composite_textField = createComposite(parent, 2);
- createLabel(composite_textField, Messages
- .getString("ChangeLogPreferencesPage.AuthorName")); //$NON-NLS-1$
- nameField = createTextField(composite_textField);
-
- // composite_textField << parent
-
- createLabel(composite_textField, Messages
- .getString("ChangeLogPreferencesPage.AuthorEmail")); //$NON-NLS-1$
- emailField = createTextField(composite_textField);
-
- createLabel(composite_textField, Messages
- .getString("ChangeLogPreferencesPage.Formatters")); //$NON-NLS-1$
- formatterList = createListBox(composite_textField, 3);
-
- createLabel(composite_textField, Messages
- .getString("ChangeLogPreferencesPage.Editors")); //$NON-NLS-1$
- editorList = createListBox(composite_textField, 3);
-
- initializeValues();
-
- return new Composite(parent, SWT.NULL);
- }
-
- public void widgetDefaultSelected(SelectionEvent event) {
- // Handle a default selection. Do nothing in this example
- }
-
- /**
- * (non-Javadoc) Method declared on SelectionListener
- */
- public void widgetSelected(SelectionEvent event) {
- // Do nothing on selection in this example;
- }
-} \ No newline at end of file
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/ChangeLogWriter.java b/changelog/src/org/eclipse/linuxtools/changelog/core/ChangeLogWriter.java
deleted file mode 100644
index e934708ece..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/ChangeLogWriter.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kyu Lee <klee@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.ui.IEditorPart;
-
-/**
- * Writes changelog using extension point IFormatterChangeLogContrib.
- *
- * @author klee
- *
- */
-public class ChangeLogWriter {
-
- private String entryFilePath = null;
-
- private String guessedFName = null;
-
- private IFormatterChangeLogContrib formatter = null;
-
- private IEditorPart changelog = null;
-
- private String dateLine = null;
-
- private String changelogLocation = null;
-
- public IEditorPart getChangelog() {
- return changelog;
- }
-
- public void setChangelog(IEditorPart changelog) {
- this.changelog = changelog;
- }
-
- public String getChangelogLocation() {
- return changelogLocation;
- }
-
- public void setChangelogLocation(String changelogLocation) {
- this.changelogLocation = changelogLocation;
- }
-
- public String getDateLine() {
- return dateLine;
- }
-
- public void setDateLine(String dateLine) {
- this.dateLine = dateLine;
- }
-
- public String getEntryFilePath() {
- return entryFilePath;
- }
-
- public void setEntryFilePath(String entryFilePath) {
- this.entryFilePath = entryFilePath;
- }
-
- public IFormatterChangeLogContrib getFormatter() {
- return formatter;
- }
-
- public void setFormatter(IFormatterChangeLogContrib formatter) {
- this.formatter = formatter;
- }
-
- public String getGuessedFName() {
- return guessedFName;
- }
-
- public void setGuessedFName(String guessedFName) {
- this.guessedFName = guessedFName;
- }
-
- public void writeChangeLog() {
-
- // System.out.println("Debug Output :");
- // System.out.println(entryFilePath);
- // System.out.println(guessedFName);
- // System.out.println(formatter);
- // System.out.println(changelog);
- // System.out.println(dateLine);
- // System.out.println(changelogLocation);
- // System.out.println("\n");
-
- if (entryFilePath == null || guessedFName == null || formatter == null
- || changelog == null || dateLine == null
- || changelogLocation == null) {
- ChangelogPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, "Changelog", IStatus.ERROR,
- "Some element not set to write a Changelog", null));
-
- return;
- }
-
- formatter.mergeChangelog(dateLine, guessedFName, changelog,
- changelogLocation, entryFilePath);
-
- }
-
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/ChangelogPlugin.java b/changelog/src/org/eclipse/linuxtools/changelog/core/ChangelogPlugin.java
deleted file mode 100644
index d1a4d3edcd..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/ChangelogPlugin.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Phil Muldoon <pkmuldoon@picobot.org>.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pmuldoon@redhat.com> - initial API and implementation
- * Kyu Lee <klee@redhat.com> - editor support
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.resources.IWorkspace;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * @author pmuldoon (Phil Muldoon)
- */
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class ChangelogPlugin extends AbstractUIPlugin {
- // The shared instance.
- private static ChangelogPlugin plugin;
-
- // Resource bundle.
- private ResourceBundle resourceBundle;
-
- /**
- * The constructor.
- */
- public ChangelogPlugin() {
- // super();
- plugin = this;
- try {
- resourceBundle = ResourceBundle
- .getBundle("org.eclipse.linuxtools.changelog.core.ChangelogPluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
-
- }
-
- /**
- * Returns the shared instance.
- */
- public static ChangelogPlugin getDefault() {
- return plugin;
- }
-
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- }
-
- /**
- * Returns the workspace instance.
- */
- public static IWorkspace getWorkspace() {
- return ChangelogPlugin.getWorkspace();
- }
-
- /**
- * Returns the string from the plugin's resource bundle, or 'key' if not
- * found.
- */
- public static String getResourceString(String key) {
- ResourceBundle bundle = ChangelogPlugin.getDefault()
- .getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- return resourceBundle;
- }
-
- protected void initializeDefaultPreferences(IPreferenceStore store) {
- store.setDefault("IChangeLogConstants.DATE_FORMAT", "true");
- store.setDefault("IChangeLogConstants.APPEND_RESOURCE_PATH", "false");
-
- store.setDefault("IChangeLogConstants.AUTHOR_NAME",
- ChangeLogPreferencesPage.getUserRealName());
- store.setDefault("IChangeLogConstants.AUTHOR_EMAIL",
- ChangeLogPreferencesPage.getUserName() + "@"
- + ChangeLogPreferencesPage.getHostName());
- store.setDefault("IChangeLogConstants.DEFAULT_FORMATTER", "GNU Style");
- store.setDefault("IChangeLogConstants.DEFAULT_EDITOR", "GNU Editor");
-
- }
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/IEditorChangeLogContrib.java b/changelog/src/org/eclipse/linuxtools/changelog/core/IEditorChangeLogContrib.java
deleted file mode 100644
index f65a405642..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/IEditorChangeLogContrib.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kyu Lee <klee@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core;
-
-import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
-import org.eclipse.jface.text.hyperlink.IHyperlinkPresenter;
-import org.eclipse.jface.text.presentation.IPresentationReconciler;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.ui.editors.text.TextEditor;
-
-/**
- * @author klee (Kyu Lee)
- */
-public interface IEditorChangeLogContrib {
-
- /**
- * Set TextEditor that this configuration is going to be used.
- *
- * @param editor
- */
- public void setTextEditor(TextEditor editor);
-
- /**
- * Set default content type. GNU Changelog only has one type.
- *
- * @return default content type.
- */
- public String[] getConfiguredContentTypes(ISourceViewer sourceViewer);
-
- /**
- * Detects hyperlinks in GNU formatted changelogs.
- *
- * @return link detector for GNU format.
- */
- public IHyperlinkDetector[] getHyperlinkDetectors(ISourceViewer sourceViewer);
-
- /**
- * Hyperlink presenter (decorator).
- *
- * @return default presenter.
- */
- public IHyperlinkPresenter getHyperlinkPresenter(ISourceViewer sourceViewer);
-
- /**
- * Highlights GNU format changelog syntaxes.
- *
- * @return reconciler for GNU format changelog.
- */
- public IPresentationReconciler getPresentationReconciler(
- ISourceViewer sourceViewer);
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/IFormatterChangeLogContrib.java b/changelog/src/org/eclipse/linuxtools/changelog/core/IFormatterChangeLogContrib.java
deleted file mode 100644
index de76f25c61..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/IFormatterChangeLogContrib.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Phil Muldoon <pkmuldoon@picobot.org>.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pmuldoon@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core;
-
-import org.eclipse.ui.IEditorPart;
-
-/**
- * @author pmuldoon (Phil Muldoon)
- */
-public interface IFormatterChangeLogContrib {
-
- public String formatDateLine(String authorName, String authorEmail);
- public String mergeChangelog(String dateLine, String functionGuess,
- IEditorPart changelog, String changeLogLocation, String fileLocation);
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/IParserChangeLogContrib.java b/changelog/src/org/eclipse/linuxtools/changelog/core/IParserChangeLogContrib.java
deleted file mode 100644
index b88570003c..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/IParserChangeLogContrib.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Phil Muldoon <pkmuldoon@picobot.org>.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pmuldoon@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-
-/**
- * @author pmuldoon (Phil Muldoon)
- */
-public interface IParserChangeLogContrib {
-
- /**
- * Used to determine function name from a currently open editor, where the
- * cursor is at. Used by KeyAction.
- *
- * @param editor
- * @return
- * @throws CoreException
- */
- public String parseCurrentFunction(IEditorPart editor) throws CoreException;
-
- /**
- * Used to determine function name from and editor input, with offset
- * supplied manualy. Used by prepare changelog.
- *
- * @param input
- * @param offset
- * @return
- * @throws CoreException
- */
- public String parseCurrentFunction(IEditorInput input, int offset)
- throws CoreException;
-
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/Messages.java b/changelog/src/org/eclipse/linuxtools/changelog/core/Messages.java
deleted file mode 100644
index ca0d7e9857..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/Messages.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Phil Muldoon <pmuldoon@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * @author pmuldoon
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class Messages {
-
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.changelog.core.strings"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE =
- ResourceBundle.getBundle(BUNDLE_NAME);
-
- /**
- *
- */
- private Messages() {
-
- // TODO Auto-generated constructor stub
- }
- /**
- * @param key
- * @return
- */
- public static String getString(String key) {
- // TODO Auto-generated method stub
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogAction.java b/changelog/src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogAction.java
deleted file mode 100644
index 87670cc760..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/actions/ChangeLogAction.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kyu Lee <klee@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core.actions;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.core.resources.IFile;
-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.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.linuxtools.changelog.core.ChangeLogExtensionManager;
-import org.eclipse.linuxtools.changelog.core.ChangelogPlugin;
-import org.eclipse.linuxtools.changelog.core.Messages;
-import org.eclipse.team.ui.synchronize.SyncInfoCompareInput;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.eclipse.ui.dialogs.ContainerSelectionDialog;
-
-
-public abstract class ChangeLogAction extends Action {
-
- protected ChangeLogExtensionManager extensionManager = null;
-
- // Preference variables
- protected String pref_AuthorName;
-
- protected String pref_AuthorEmail;
-
- protected String pref_ChangeLogName = "ChangeLog";
-
- protected String pref_Formatter;
-
- // set selection here
- // selection can be either IEditorPart / IProject / IStructuredSelection
- // IEditorPart and IProject will be adapted to IStructuredSelection.
-
- public ChangeLogAction() {
-
- extensionManager = ChangeLogExtensionManager.getExtensionManager();
- }
-
- public ChangeLogAction(String name) {
- super(name);
- extensionManager = ChangeLogExtensionManager.getExtensionManager();
- }
-
- protected void reportErr(String msg, Exception e) {
- ChangelogPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, "Changelog", IStatus.ERROR, msg, e));
- }
-
- protected IWorkbench getWorkbench() {
- return ChangelogPlugin.getDefault().getWorkbench();
- }
-
- protected IWorkspaceRoot getWorkspaceRoot() {
- return ResourcesPlugin.getWorkspace().getRoot();
- }
-
- protected IEditorPart openEditor(IFile diskresource) {
- IWorkbench ws = getWorkbench();
-
- try {
- return org.eclipse.ui.ide.IDE.openEditor(ws
- .getActiveWorkbenchWindow().getActivePage(), diskresource,
- true);
- } catch (PartInitException e) {
- e.printStackTrace();
-
- return null;
- }
- }
-
- protected String returnQualifedEditor(Class ClassName) {
- return ClassName.toString().substring(
- ClassName.getPackage().toString().length() - 1,
- ClassName.toString().length());
- }
-
- protected IFile createChangeLog(IPath changelog) {
- IWorkspaceRoot myWorkspaceRoot = getWorkspaceRoot();
- IWorkbench ws = getWorkbench();
-
- final IFile changelog_File = myWorkspaceRoot.getFile(changelog);
- final InputStream initialContents = new ByteArrayInputStream(
- new byte[0]);
-
- WorkspaceModifyOperation operation = new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor monitor) throws CoreException {
- try {
- monitor.beginTask("Adding ChangeLog", 2000); //$NON-NLS-1$
- changelog_File.create(initialContents, false, monitor);
-
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
-
- } finally {
- monitor.done();
- }
- }
- };
-
- try {
- new ProgressMonitorDialog(ws.getActiveWorkbenchWindow().getShell())
- .run(true, true, operation);
- } catch (InterruptedException e) {
- reportErr("Interruped while creating changelog", e);
- return null;
- } catch (InvocationTargetException e) {
- reportErr("Couldn't create changelog process", e);
- return null;
- }
-
- try {
- myWorkspaceRoot.refreshLocal(2, null);
- } catch (CoreException e) {
- reportErr("Couldn't refresh local resources", e);
- return null;
- }
-
- return changelog_File;
- }
-
- protected IEditorPart askChangeLogLocation(String editorLoc) {
- IWorkbench ws = getWorkbench();
- IWorkspaceRoot myWorkspaceRoot = getWorkspaceRoot();
-
- IResource given_resource = myWorkspaceRoot.findMember(editorLoc);
-
- ContainerSelectionDialog dialog = new ContainerSelectionDialog(ws
- .getActiveWorkbenchWindow().getShell(), given_resource
- .getParent(), false, Messages
- .getString("AddAction.str_ChangeLog_Location")); //$NON-NLS-1$
- dialog.showClosedProjects(false);
-
- dialog.open();
-
- Object[] result = dialog.getResult();
- if (result == null)
- return null;
- final IPath result_path = new Path(result[0]
- + System.getProperty("file.separator") + pref_ChangeLogName); //$NON-NLS-1$ //$NON-NLS-2$
- IFile newChangeLog = createChangeLog(result_path);
-
- return openEditor(newChangeLog);
-
- }
-
- protected IEditorPart getChangelog(String currentEditorloc) {
- // Scenario 1: The Changelog is in in the current project file
- IWorkspaceRoot myWorkspaceRoot = getWorkspaceRoot();
- IResource given_resource = myWorkspaceRoot.findMember(currentEditorloc);
-
- if (given_resource != null) {
- IResource parent_dec = given_resource;
-
- while (parent_dec != null) {
- String parent_node = parent_dec.getFullPath()
- .removeLastSegments(1).toOSString();
- parent_node = parent_node
- + System.getProperty("file.separator") + pref_ChangeLogName; //$NON-NLS-1$
-
- IResource change_log_res = myWorkspaceRoot
- .findMember(parent_node);
-
- if (change_log_res != null) {
- IProject proj_loc = given_resource.getProject();
- IPath modified_changelog_path = change_log_res
- .getFullPath().removeFirstSegments(1);
- IFile change_log_file = proj_loc
- .getFile(modified_changelog_path);
-
- return openEditor(change_log_file);
- }
-
- parent_dec = (IResource) parent_dec.getParent();
-
- if (parent_dec == null) {
- break;
- }
- }
- }
-
- return null;
- }
-
- protected IFile getDocumentIFile(IEditorPart currentEditor) {
- IEditorInput cc = currentEditor.getEditorInput();
-
- if (cc instanceof IFileEditorInput)
- return ((IFileEditorInput) cc).getFile();
- return null;
- }
-
- protected String getDocumentLocation(IEditorPart currentEditor,
- boolean appendRoot) {
-
- IEditorInput cc;
- String WorkspaceRoot;
- try {
- IWorkspaceRoot myWorkspaceRoot = getWorkspaceRoot();
- WorkspaceRoot = myWorkspaceRoot.getLocation().toOSString();
- cc = currentEditor.getEditorInput();
- } catch(Exception e) {
- return "";
- }
-
- if (cc == null)
- return "";
-
- if ((cc instanceof SyncInfoCompareInput)
- || (cc instanceof CompareEditorInput)) {
-
- CompareEditorInput test = (CompareEditorInput) cc;
- if (test.getCompareResult() == null)
- return "";
- if (appendRoot)
- return WorkspaceRoot + test.getCompareResult().toString();
- else
- return test.getCompareResult().toString();
-
- }
-
- IFile loc = getDocumentIFile(currentEditor);
- if (appendRoot) {
- return WorkspaceRoot + loc.getFullPath().toOSString();
- } else {
- return loc.getFullPath().toOSString();
- }
- }
-
- protected void loadPreferences() {
- IPreferenceStore store = ChangelogPlugin.getDefault()
- .getPreferenceStore();
-
- pref_AuthorName = store.getString("IChangeLogConstants.AUTHOR_NAME"); //$NON-NLS-1$
- pref_AuthorEmail = store.getString("IChangeLogConstants.AUTHOR_EMAIL"); //$NON-NLS-1$
-
- pref_Formatter = store
- .getString("IChangeLogConstants.DEFAULT_FORMATTER");
- }
-
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/actions/FormatChangeLogAction.java b/changelog/src/org/eclipse/linuxtools/changelog/core/actions/FormatChangeLogAction.java
deleted file mode 100644
index a26a58c7af..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/actions/FormatChangeLogAction.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kyu Lee <klee@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core.actions;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.core.commands.IHandlerListener;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.linuxtools.changelog.core.ChangelogPlugin;
-import org.eclipse.linuxtools.changelog.core.editors.ChangeLogEditor;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.editors.text.TextEditor;
-import org.eclipse.ui.texteditor.AbstractTextEditor;
-
-
-public class FormatChangeLogAction extends Action implements IHandler {
-
-
- ChangeLogEditor editor = null;
-
- public FormatChangeLogAction(ChangeLogEditor te) {
- super("Format ChangeLog");
- editor = te;
- }
-
- public FormatChangeLogAction() {
- super("Format ChangeLog");
- //editor = te;
- try {
- editor = (ChangeLogEditor)getWorkbench().getActiveWorkbenchWindow()
- .getActivePage().getActiveEditor();
- } catch (Exception e) {
- // no editor is active now so do nothing
- return;
- }
- }
- protected IWorkbench getWorkbench() {
- return ChangelogPlugin.getDefault().getWorkbench();
- }
- public void run() {
-
- if (editor == null)
- return;
-
- SourceViewer srcViewer = (SourceViewer)editor.getMySourceViewer();
- if (srcViewer != null) {
- srcViewer.doOperation(ISourceViewer.FORMAT);
-
- }
-
- }
-
- public void addHandlerListener(IHandlerListener handlerListener) {
- // TODO Auto-generated method stub
-
- }
-
- public void dispose() {
- // TODO Auto-generated method stub
-
- }
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
- // TODO Auto-generated method stub
- run();
-
- return null;
- }
-
- public void removeHandlerListener(IHandlerListener handlerListener) {
- // TODO Auto-generated method stub
-
- }
-
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/actions/InsertChangeLogKeyHandler.java b/changelog/src/org/eclipse/linuxtools/changelog/core/actions/InsertChangeLogKeyHandler.java
deleted file mode 100644
index 375fa10b95..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/actions/InsertChangeLogKeyHandler.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Phil Muldoon <pkmuldoon@picobot.org>.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pmuldoon@redhat.com> - initial API and implementation
- * Kyu Lee <klee@redhat.com> - new execute method
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core.actions;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.core.commands.IHandlerListener;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.linuxtools.changelog.core.ChangeLogWriter;
-import org.eclipse.linuxtools.changelog.core.IParserChangeLogContrib;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-
-
-/**
- * @author pmuldoon (Phil Muldoon)
- */
-public class InsertChangeLogKeyHandler extends ChangeLogAction implements
- IHandler, IWorkbenchWindowActionDelegate {
-
- private IEditorPart currentEditor;
-
- public InsertChangeLogKeyHandler() {
-
- super();
-
- }
-
- String getEditorName() {
- if (currentEditor != null)
- return returnQualifedEditor(currentEditor.getClass());
- else
- return "";
-
- }
-
- String getEntryFilePath() {
- if (currentEditor != null)
- return getDocumentLocation(currentEditor, false);
- else
- return "";
- }
-
- IEditorPart getChangelog() {
-
- IConfigurationElement formatterConfigElement = extensionManager
- .getFormatterConfigElement();
- if (formatterConfigElement.getAttribute("inFile").toLowerCase().equals(
- "true")) {
- return currentEditor;
- // this formatter wants to use an external changelog file
- } else {
- IEditorPart changelog = null;
-
- IConfigurationElement nameElement = formatterConfigElement
- .getChildren()[0];
- if (nameElement.getAttribute("name") == null) {
- reportErr("Got non-name child with inFile set to False", null);
- return null;
- } else {
- pref_ChangeLogName = nameElement.getAttribute("name");
- changelog = getChangelog(getDocumentLocation(currentEditor,
- false));
-
- if (changelog == null) {
- changelog = askChangeLogLocation(getDocumentLocation(
- currentEditor, false));
- }
-
- return changelog;
- }
- }
-
- }
-
- String parseFunctionName(IParserChangeLogContrib parser) {
-
- try {
- return parser.parseCurrentFunction(currentEditor);
- } catch (CoreException e) {
- reportErr("Couldn't parse function name with "
- + parser.getClass().toString(), null);
- return "";
- }
-
- }
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
- try {
- currentEditor = getWorkbench().getActiveWorkbenchWindow()
- .getActivePage().getActiveEditor();
- } catch (Exception e) {
- // no editor is active now so do nothing
- return null;
- }
-
- // make sure an editor is selected.
- if (currentEditor == null) {
- return null;
- }
-
- ChangeLogWriter clw = new ChangeLogWriter();
-
- // load settings from extensions + user pref.
- loadPreferences();
-
- // get file path from target file
- clw.setEntryFilePath(getEntryFilePath());
-
- // err check. do nothing if no file is being open/edited
- if (clw.getEntryFilePath() == "") {
- return null;
- }
-
- String editorName = getEditorName();
-
- // get a parser for this file
- IParserChangeLogContrib parser = extensionManager
- .getParserContributor(editorName);
-
- // if no parser for this type of document, then don't guess function
- // name
- // and set it as "".
- if (parser == null) {
- clw.setGuessedFName("");
- } else {
- // guess function name
- clw.setGuessedFName(parseFunctionName(parser));
- }
-
- // get formatter
-
- clw.setFormatter(extensionManager.getFormatterContributor(clw
- .getEntryFilePath(), pref_Formatter));
-
- // select changelog
- clw.setChangelog(getChangelog());
-
- // write to changelog
-
- clw.setDateLine(clw.getFormatter().formatDateLine(pref_AuthorName,
- pref_AuthorEmail));
-
- clw.setChangelogLocation(getDocumentLocation(clw.getChangelog(), true));
-
- clw.writeChangeLog();
-
- return null;
- }
-
- public void addHandlerListener(IHandlerListener handlerListener) {
-
- }
-
- public boolean isEnabled() {
-
- return true;
- }
-
- public boolean isHandled() {
-
- return true;
- }
-
- public void removeHandlerListener(IHandlerListener handlerListener) {
-
- }
-
- public void dispose() {
-
- }
-
- public void init(IWorkbenchWindow window) {
-
- }
-
- public void run(IAction action) {
-
- try {
- execute(null);
- } catch (ExecutionException e) {
-
- reportErr("Executing insert changelog failed", e);
- }
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
-
- }
-
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/actions/PatchFile.java b/changelog/src/org/eclipse/linuxtools/changelog/core/actions/PatchFile.java
deleted file mode 100644
index 2cd1ae39d8..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/actions/PatchFile.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kyu Lee <klee@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core.actions;
-
-
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-
-/**
- *
- * @author klee
- *
- */
-public class PatchFile {
-
- private IPath fpath;
- private ArrayList pranges = new ArrayList();
-
-
- public PatchFile(String filePath) {
- fpath = new Path(filePath);
- }
-
- public void addLineRange(int from, int to) {
-
- pranges.add(new PatchRangeElement(from, to, ""));
-
-
- }
-
- public PatchRangeElement[] getRanges() {
-
-
- Object[] tmpEle = pranges.toArray();
- PatchRangeElement[] ret = new PatchRangeElement[tmpEle.length];
-
- for (int i = 0; i < tmpEle.length; i++) {
- ret[i] = (PatchRangeElement) tmpEle[i];
- }
-
-
- return ret;
- }
-
-
- public void appendTxtToLastRange(String txt) {
-
-
- ((PatchRangeElement)pranges.get(pranges.size()-1)).appendTxt(txt);
- }
-
- public IPath getPath() {
- return fpath;
- }
-
- public int countRanges() {
- return pranges.size();
- }
-
- public boolean equals(Object o) {
-
- if (!(o instanceof PatchFile))
- return false;
-
- PatchFile that = (PatchFile) o;
- // check fpath + count
- if (!this.fpath.removeTrailingSeparator().toString().equals(that.getPath().removeTrailingSeparator().toString()) ||
- this.countRanges() != that.countRanges())
- return false;
-
- // check range elements
- PatchRangeElement[] thatsrange = that.getRanges();
-
- for(int i=0; i<this.countRanges();i++)
- if (!thatsrange[i].equals(pranges.get(i)))
- return false;
- return true;
- }
-
-} \ No newline at end of file
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/actions/PatchRangeElement.java b/changelog/src/org/eclipse/linuxtools/changelog/core/actions/PatchRangeElement.java
deleted file mode 100644
index 9fb40a7563..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/actions/PatchRangeElement.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kyu Lee <klee@redhat.com> - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.changelog.core.actions;
-
-/**
- *
- * @author klee
- *
- */
-public class PatchRangeElement {
-
- public int ffromLine;
- public int ftoLine;
- public String fpatch;
-
- public PatchRangeElement(int from, int to, String txt) {
- ffromLine =from;
- ftoLine= to;
- fpatch = txt;
- }
-
-
- public void appendTxt(String txt) {
- fpatch += txt + "\n";
- }
-
-
- public boolean equals(Object o) {
- if (o instanceof PatchRangeElement) {
- PatchRangeElement b = (PatchRangeElement)o;
- return b.ffromLine == ffromLine && b.ftoLine == ftoLine && b.fpatch.equals(fpatch);
- }
- else
- return (Object) this == o;
- }
-} \ No newline at end of file
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/actions/PrepareChangeLogAction.java b/changelog/src/org/eclipse/linuxtools/changelog/core/actions/PrepareChangeLogAction.java
deleted file mode 100644
index 6e51bb7ca9..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/actions/PrepareChangeLogAction.java
+++ /dev/null
@@ -1,563 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kyu Lee <klee@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.StringTokenizer;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.internal.resources.mapping.SimpleResourceMapping;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.linuxtools.changelog.core.ChangeLogWriter;
-import org.eclipse.linuxtools.changelog.core.ChangelogPlugin;
-import org.eclipse.linuxtools.changelog.core.IParserChangeLogContrib;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.client.Diff;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.ui.IActionDelegate;
-import org.eclipse.ui.IContributorResourceAdapter;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.editors.text.FileDocumentProvider;
-import org.eclipse.ui.ide.IContributorResourceAdapter2;
-import org.eclipse.ui.part.FileEditorInput;
-
-
-/**
- * Action handler for prepare changelog.
- *
- * @author klee
- *
- */
-public class PrepareChangeLogAction extends ChangeLogAction {
-
- /**
- * Provides IDocument given editor input
- *
- * @author klee
- *
- */
- private class MyDocumentProvider extends FileDocumentProvider {
-
- public IDocument createDocument(Object element) throws CoreException {
-
- return super.createDocument(element);
-
- }
- }
-
- public PrepareChangeLogAction(String name) {
- super(name);
- }
-
- private IStructuredSelection selected;
-
- public PrepareChangeLogAction() {
-
- super();
-
- }
-
- protected void setSelection(IStructuredSelection selection) {
- this.selected = selection;
- }
-
- private String parseCurrentFunctionAtOffset(String editorName,
- IEditorInput input, int offset) {
-
- IParserChangeLogContrib parser = extensionManager
- .getParserContributor(editorName);
-
- try {
- return parser.parseCurrentFunction(input, offset);
- } catch (CoreException e) {
- ChangelogPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, "Changelog", IStatus.ERROR, e
- .getMessage(), e));
- }
- return "";
- }
-
- // if (parserExtensions != null) {
- // IConfigurationElement[] elements = parserExtensions
- // .getConfigurationElements();
- // for (int i = 0; i < elements.length; i++) {
- // if (elements[i].getName().equals("parser") &&
- // (elements[i].getAttribute("editor").equals(editorName))) { //$NON-NLS-1$
- // try {
- // IConfigurationElement bob = elements[i];
- // parserContributor = (IParserChangeLogContrib) bob
- // .createExecutableExtension("class");
- // return parserContributor.parseCurrentFunction(input,
- // offset);
- // } catch (CoreException e) {
- // ChangelogPlugin.getDefault().getLog().log(
- // new Status(IStatus.ERROR, "Changelog",
- // IStatus.ERROR, e.getMessage(), e));
- // }
- //
- // }
- // }
- // }
- // return "";
- // }
-
- /**
- * @see IActionDelegate#run(IAction)
- */
- protected void doRun() {
-
- IRunnableWithProgress code = new IRunnableWithProgress() {
-
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- monitor.beginTask("Preparing ChangeLog", 1000);
- preapreChangeLog(monitor);
- monitor.done();
- }
- };
-
- ProgressMonitorDialog pd = new ProgressMonitorDialog(getWorkbench()
- .getActiveWorkbenchWindow().getShell());
-
- try {
- pd.run(false /* fork */, false /* cancelable */, code);
- } catch (InvocationTargetException e) {
- ChangelogPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, "Changelog", IStatus.ERROR, e
- .getMessage(), e));
- return;
- } catch (InterruptedException e) {
- ChangelogPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, "Changelog", IStatus.ERROR, e
- .getMessage(), e));
- }
- }
-
- private ResourceMapping getResourceMapping(Object o) {
- if (o instanceof ResourceMapping) {
- return (ResourceMapping) o;
- }
- if (o instanceof IAdaptable) {
- IAdaptable adaptable = (IAdaptable) o;
- Object adapted = adaptable.getAdapter(ResourceMapping.class);
- if (adapted instanceof ResourceMapping) {
- return (ResourceMapping) adapted;
- }
- adapted = adaptable.getAdapter(IContributorResourceAdapter.class);
- if (adapted instanceof IContributorResourceAdapter2) {
- IContributorResourceAdapter2 cra = (IContributorResourceAdapter2) adapted;
- return cra.getAdaptedResourceMapping(adaptable);
- }
- } else {
- Object adapted = Platform.getAdapterManager().getAdapter(o,
- ResourceMapping.class);
- if (adapted instanceof ResourceMapping) {
- return (ResourceMapping) adapted;
- }
- }
- return null;
- }
-
- private ResourceMapping[] getResourceMappings(Object[] objects) {
- List result = new ArrayList();
- for (int i = 0; i < objects.length; i++) {
- Object object = objects[i];
- ResourceMapping mapping = getResourceMapping(object);
- if (mapping != null)
- result.add(mapping);
- }
- return (ResourceMapping[]) result.toArray(new ResourceMapping[result
- .size()]);
- }
-
- private void preapreChangeLog(IProgressMonitor monitor) {
-
- // getParserContributions();
- String diffResult = null;
- String projectPath = null;
-
- Object element = selected.getFirstElement();
-
- ResourceMapping[] mappings = getResourceMappings(selected.toArray());
-
- IResource resource;
- if (element instanceof SimpleResourceMapping)
- resource = (IResource) ((SimpleResourceMapping) element)
- .getModelObject();
- else
- resource = (IResource) element;
-
- projectPath = resource.getProject().getFullPath().toOSString();
-
- try {
-
- StringDiffOperation sdo = new StringDiffOperation(getWorkbench()
- .getActiveWorkbenchWindow().getPartService()
- .getActivePart(), mappings,
- new LocalOption[] { Diff.INCLUDE_NEWFILES }, false, true,
- ResourcesPlugin.getWorkspace().getRoot().getFullPath());
-
- sdo.execute(monitor);
-
- diffResult = sdo.getResult();
- } catch (CVSException e) {
-
- e.printStackTrace();
- return;
- } catch (InterruptedException e) {
-
- e.printStackTrace();
- return;
- }
-
- if (diffResult == null) {
- ChangelogPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, "Changelog", IStatus.ERROR,
- "Could not get diff", new Exception(
- "No diff result from CVS")));
- return;
- }
- if (projectPath == null) {
- ChangelogPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, "Changelog", IStatus.ERROR,
- "Could not get project path", new Exception(
- "Couldn't get project path")));
- return;
- }
-
- if (diffResult.equals(StringDiffOperation.EMPTY_DIFF)) {
- MessageDialog.openInformation(getWorkbench()
- .getActiveWorkbenchWindow().getShell(),
- "Prepare ChangeLog - ChangeLog", "No changes found.");
- return;
- }
- // parse the patch and get only info we need
- // filename, which line has changed.(range)
-
- monitor.subTask("Parsing diff result");
- PatchFile[] patchFileInfoList = parseStandardPatch(diffResult,
- projectPath, monitor);
- monitor.worked(250);
- // now, find out modified functions/classes.
- // try to use the the extension point. so it can be extended easily
-
- if (patchFileInfoList == null) {
- // nothing to parse
- return;
- }
-
- // for all files in patch file info list, get function guesses of each
- // file.
- monitor.subTask("Writing ChangeLog");
- int unitwork = 250 / patchFileInfoList.length;
- for (int pfIndex = 0; pfIndex < patchFileInfoList.length; pfIndex++) {
- // for each file
-
- PatchFile pf = patchFileInfoList[pfIndex];
-
- // System.out.println(pf.getPath().toOSString());
- String[] funcGuessList = guessFunctionNames(pf);
-
- outputMultipleEntryChangeLog(pf.getPath().toOSString(),
- funcGuessList);
-
- /*
- * // print info for debug
- * System.out.println(pf.getPath().toOSString()); for (int i = 0; i <
- * funcGuessList.length; i++) {
- * System.out.println(funcGuessList[i]); }
- * System.out.println("---------------------");
- */
- monitor.worked(unitwork);
- }
- }
-
- protected IEditorPart changelog;
-
- public void outputMultipleEntryChangeLog(String entryFileName,
- String[] functionGuess) {
-
- ChangeLogWriter clw = new ChangeLogWriter();
-
- // load settings from extensions + user pref.
- loadPreferences();
-
- // get file path from target file
- clw.setEntryFilePath(entryFileName);
-
- // err check. do nothing if no file is being open/edited
- if (clw.getEntryFilePath() == "") {
- return;
- }
-
- // get formatter
- clw.setFormatter(extensionManager.getFormatterContributor(
- entryFileName, pref_Formatter));
-
- IEditorPart changelog = null;
-
- changelog = getChangelog(entryFileName);
-
- if (changelog == null)
- changelog = askChangeLogLocation(entryFileName);
-
- if (changelog == null) {
- System.out.println("oops, coudln't get changelog");
- return;
- }
-
- // select changelog
- clw.setChangelog(changelog);
-
- // write to changelog
-
- clw.setDateLine(clw.getFormatter().formatDateLine(pref_AuthorName,
- pref_AuthorEmail));
-
- clw.setChangelogLocation(getDocumentLocation(clw.getChangelog(), true));
-
- // print multiple changelog entries with different
- // function guess names.
- for (int i = 0; i < functionGuess.length; i++) {
-
- clw.setGuessedFName(functionGuess[i]);
- clw.writeChangeLog();
- }
-
- }
-
- /**
- * Parses patch generated by CVS diff into <code>PatchFile</code> array.
- *
- * @param diffResult
- * patch file
- * @param projectPathh
- * local parent path for the patch
- * @return array of PatchFile info
- */
- protected PatchFile[] parseStandardPatch(String diffResult,
- String projectPath, IProgressMonitor monitor) {
- StringTokenizer st = new StringTokenizer(diffResult, "\n");
- ArrayList fileList = new ArrayList();
-
- // regex pattern for matching line info in standard patch.
- Pattern lineInfoPattern = Pattern
- .compile("(\\d+|\\d+,\\d+)[adc](\\d+|\\d+,\\d+)");
-
- boolean inRange = false;
- if (st.countTokens() == 0)
- return null;
- int unitwork = 250 / st.countTokens();
- while (st.hasMoreTokens()) {
- String ln = st.nextToken();
- // this line contains file path relative to resource
- // and starts new file entry
- if (ln.indexOf("Index: ") == 0) {
- String fullPath = projectPath + "/" + ln.substring(7);
-
- // ignore all ChangeLogs
- if (fullPath.substring(
- fullPath.length() - "ChangeLog".length(),
- fullPath.length()).equals("ChangeLog")) {
- continue;
- }
-
- // System.out.println(fullPath + "- full path");
- fileList.add(new PatchFile(fullPath));
- inRange = false;
- continue;
- }
-
- if (fileList.size() > 0) {
-
- PatchFile tpe = (PatchFile) fileList.get(fileList.size() - 1);
- if (tpe != null) {
-
- Matcher linem = lineInfoPattern.matcher(ln);
-
- if (linem.matches()) {
- inRange = true;
- int from = 1;
- int length = 0;
-
- int modifierIndex;
-
- if ((modifierIndex = ln.indexOf("a")) < 0)
- if ((modifierIndex = ln.indexOf("d")) < 0)
- modifierIndex = ln.indexOf("c");
-
- // String firstHalf = ln.substring(0, modifierIndex);
- String secondHalf = ln.substring(modifierIndex + 1);
-
- int commaIndex;
- switch (ln.charAt(modifierIndex)) {
-
- case 'a':
- case 'c':
-
- if ((commaIndex = secondHalf.indexOf(",")) >= 0) {
- from = Integer.parseInt(secondHalf.substring(0,
- commaIndex));
- length = Integer.parseInt(secondHalf
- .substring(commaIndex + 1))
- - Integer.parseInt(secondHalf
- .substring(0, commaIndex));
- } else {
- from = Integer.parseInt(secondHalf);
- }
-
- break;
-
- case 'd':
- from = Integer.parseInt(secondHalf);
- from++;
- break;
- }
-
- tpe.addLineRange(from, from + length);
- continue;
- }
-
- // add actual patch just in case if we need it later.
- if (inRange)
- tpe.appendTxtToLastRange(ln);
-
- }
- }
- monitor.worked(unitwork);
- }
-
- PatchFile[] parseResult = new PatchFile[fileList.size()];
- for (int i = 0; i < fileList.size(); i++)
- parseResult[i] = (PatchFile) fileList.get(i);
-
- return (parseResult.length == 0) ? null : parseResult;
- }
-
- /**
- * Guesses the function effected/modified by the patch from local file(newer
- * file).
- *
- * @param patchFileInfo
- * patch file
- * @return array of unique function names
- */
- private String[] guessFunctionNames(PatchFile patchFileInfo) {
-
- // NOTE //
- // some of the codes below only works with java files.
-
- String[] fnames = new String[0];
- String editorName = "";
-
- try {
- IEditorDescriptor ed = org.eclipse.ui.ide.IDE
- .getEditorDescriptor(patchFileInfo.getPath().toOSString());
- editorName = ed.getId().substring(ed.getId().lastIndexOf(".") + 1);
- } catch (PartInitException e1) {
- ChangelogPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, "Changelog", IStatus.ERROR, e1
- .getMessage(), e1));
- return new String[0];
- }
-
- // check if the file type is supported
-
- // get editor input for target file
- FileEditorInput fei = new FileEditorInput(getWorkspaceRoot()
- .getFileForLocation(
- getWorkspaceRoot().getLocation().append(
- patchFileInfo.getPath())));
-
- MyDocumentProvider mdp = new MyDocumentProvider();
-
- try {
- // get document for target file
- IDocument doc = mdp.createDocument(fei);
-
- PatchRangeElement[] tpre = patchFileInfo.getRanges();
- HashMap functionNamesMap = new HashMap();
-
- // for all the ranges
-
- for (int i = 0; i < patchFileInfo.countRanges(); i++) {
-
- // for all the lines in a range
-
- for (int j = tpre[i].ffromLine; j <= tpre[i].ftoLine; j++) {
-
- if ((j <= 0) || (j >= doc.getNumberOfLines()))
- continue; // ignore out of bound lines
-
- // add func that determines type of file.
- // right now it assumes it's java file.
- String functionGuess = parseCurrentFunctionAtOffset(
- editorName, fei, doc.getLineOffset(j));
-
- // putting it in hashmap will eliminate duplicate
- // guesses.
- functionNamesMap.put(functionGuess, functionGuess);
-
- }
-
- }
-
- // dump all unique func. guesses
- Iterator fnmIterator = functionNamesMap.values().iterator();
-
- fnames = new String[functionNamesMap.size()];
-
- int i = 0;
- while (fnmIterator.hasNext())
- fnames[i++] = (String) fnmIterator.next();
-
- } catch (JavaModelException e) {
- ChangelogPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, "Changelog", IStatus.ERROR, e
- .getMessage(), e));
- } catch (CoreException e) {
- ChangelogPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, "Changelog", IStatus.ERROR, e
- .getMessage(), e));
- } catch (BadLocationException e) {
- ChangelogPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, "Changelog", IStatus.ERROR, e
- .getMessage(), e));
- }
-
- return fnames;
- }
-
-} \ No newline at end of file
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/actions/PrepareChangelogKeyHandler.java b/changelog/src/org/eclipse/linuxtools/changelog/core/actions/PrepareChangelogKeyHandler.java
deleted file mode 100644
index c6fb27b319..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/actions/PrepareChangelogKeyHandler.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kyu Lee <klee@redhat.com> - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.changelog.core.actions;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.core.commands.IHandlerListener;
-import org.eclipse.core.internal.resources.mapping.SimpleResourceMapping;
-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.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.linuxtools.changelog.core.ChangelogPlugin;
-import org.eclipse.linuxtools.changelog.core.editors.ChangeLogEditor;
-import org.eclipse.ui.IContributorResourceAdapter;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.dialogs.ResourceSelectionDialog;
-import org.eclipse.ui.ide.IContributorResourceAdapter2;
-
-/**
- *
- * @author klee
- *
- */
-public class PrepareChangelogKeyHandler implements IHandler {
- private ResourceMapping getResourceMapping(Object o) {
- if (o instanceof ResourceMapping) {
- return (ResourceMapping) o;
- }
- if (o instanceof IAdaptable) {
- IAdaptable adaptable = (IAdaptable) o;
- Object adapted = adaptable.getAdapter(ResourceMapping.class);
- if (adapted instanceof ResourceMapping) {
- return (ResourceMapping) adapted;
- }
- adapted = adaptable.getAdapter(IContributorResourceAdapter.class);
- if (adapted instanceof IContributorResourceAdapter2) {
- IContributorResourceAdapter2 cra = (IContributorResourceAdapter2) adapted;
- return cra.getAdaptedResourceMapping(adaptable);
- }
- } else {
- Object adapted = Platform.getAdapterManager().getAdapter(o,
- ResourceMapping.class);
- if (adapted instanceof ResourceMapping) {
- return (ResourceMapping) adapted;
- }
- }
- return null;
- }
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
- IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
- Object[] currentProject;
-
-
- // try getting currently selected project
- try {
- IEditorPart editor = getWorkbench().getActiveWorkbenchWindow()
- .getActivePage().getActiveEditor();
- currentProject = (Object[]) (getResourceMapping(editor
- .getEditorInput()).getProjects());
-
- } catch (Exception e) {
- // if fail, no default selection
- currentProject = new Object[] {};
- }
-
- ResourceSelectionDialog rsd = new ResourceSelectionDialog(
- ChangelogPlugin.getDefault().getWorkbench()
- .getActiveWorkbenchWindow().getShell(), workspaceRoot,
- "Choose resources to be included in preparing changelog.");
-
- rsd.setInitialSelections(currentProject);
-
- rsd.open();
-
- Object[] result = rsd.getResult();
-
- if (result == null)
- return null; // user didn't select anything or pressed cancel
-
- final ResourceMapping[] rm = new ResourceMapping[result.length];
-
- for (int i = 0; i < rm.length; i++) {
- rm[i] = new SimpleResourceMapping((IResource) result[i]);
- }
-
- try {
-
- Action exampleAction;
- exampleAction = new PrepareChangeLogAction() {
- public void run() {
- setSelection(new StructuredSelection(rm));
-
- doRun();
- }
- };
-
- exampleAction.run();
-
- } catch (Exception e) {
- ChangelogPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, "Changelog", IStatus.ERROR,
- e.getMessage(), e));
- }
-
-
-
- return null;
- }
-
- protected IWorkbench getWorkbench() {
- return ChangelogPlugin.getDefault().getWorkbench();
- }
-
- public void addHandlerListener(IHandlerListener handlerListener) {
-
- }
-
- public void dispose() {
-
- }
-
- public boolean isEnabled() {
-
- return true;
- }
-
- public boolean isHandled() {
-
- return true;
- }
-
- public void removeHandlerListener(IHandlerListener handlerListener) {
-
- }
-
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/actions/PrepareCommitAction.java b/changelog/src/org/eclipse/linuxtools/changelog/core/actions/PrepareCommitAction.java
deleted file mode 100644
index ea95038462..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/actions/PrepareCommitAction.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kyu Lee <klee@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.linuxtools.changelog.core.ChangelogPlugin;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.client.Diff;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.ui.IContributorResourceAdapter;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.ide.IContributorResourceAdapter2;
-
-
-/**
- *
- * @author klee
- *
- */
-public class PrepareCommitAction extends ChangeLogAction {
-
-
- protected void doRun() {
-
-
- IRunnableWithProgress code = new IRunnableWithProgress() {
-
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- // monitor.beginTask("Loading Clipboard", 1000);
- loadClipboard(monitor);
- //monitor.done();
- }
- };
-
- ProgressMonitorDialog pd = new ProgressMonitorDialog(getWorkbench()
- .getActiveWorkbenchWindow().getShell());
-
- try {
- pd.run(false /* fork */, false /* cancelable */, code);
- } catch (InvocationTargetException e) {
- ChangelogPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, "Changelog", IStatus.ERROR, e
- .getMessage(), e));
- return;
- } catch (InterruptedException e) {
- ChangelogPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, "Changelog", IStatus.ERROR, e
- .getMessage(), e));
- return;
- }
-
- // loadClipboard();
-
- }
-
-
- private ResourceMapping getResourceMapping(Object o) {
- if (o instanceof ResourceMapping) {
- return (ResourceMapping) o;
- }
- if (o instanceof IAdaptable) {
- IAdaptable adaptable = (IAdaptable) o;
- Object adapted = adaptable.getAdapter(ResourceMapping.class);
- if (adapted instanceof ResourceMapping) {
- return (ResourceMapping) adapted;
- }
- adapted = adaptable.getAdapter(IContributorResourceAdapter.class);
- if (adapted instanceof IContributorResourceAdapter2) {
- IContributorResourceAdapter2 cra = (IContributorResourceAdapter2) adapted;
- return cra.getAdaptedResourceMapping(adaptable);
- }
- } else {
- Object adapted = Platform.getAdapterManager().getAdapter(o,
- ResourceMapping.class);
- if (adapted instanceof ResourceMapping) {
- return (ResourceMapping) adapted;
- }
- }
-
-
- return null;
- }
-
- private void loadClipboard(IProgressMonitor monitor) {
-
- IEditorPart currentEditor;
-
- try {
- currentEditor = getWorkbench().getActiveWorkbenchWindow()
- .getActivePage().getActiveEditor();
- } catch (Exception e) {
- // no editor is active now so do nothing
-
- return;
- }
-
- if (currentEditor == null)
- return;
-
-
-
- // System.out.println(currentEditor.getTitle());
- String diffResult;
-
-
- try {
-
- StringDiffOperation sdo = new StringDiffOperation(getWorkbench()
- .getActiveWorkbenchWindow().getPartService()
- .getActivePart(), new ResourceMapping[] {getResourceMapping(currentEditor.getEditorInput())},
- new LocalOption[] { Diff.INCLUDE_NEWFILES }, false, true,
- ResourcesPlugin.getWorkspace().getRoot().getFullPath());
- //NullProgressMonitor np = new NullProgressMonitor();
- sdo.execute(monitor);
-
- diffResult = sdo.getResult();
- } catch (CVSException e) {
-
- e.printStackTrace();
- return;
- } catch (InterruptedException e) {
-
- e.printStackTrace();
- return;
- }
-
-
- populateClipboardBuffer(extractNewLines(diffResult));
-
-
-
- }
-
- private String extractNewLines(String input) {
-
- // System.out.println(input);
- String output = "";
- StringTokenizer st = new StringTokenizer(input, "\n");
- while(st.hasMoreTokens()) {
- String cr;
- if ((cr = st.nextToken()).startsWith("> "))
- output+=cr.substring(2,cr.length()) + "\n";
- }
- // System.out.println("\n\n" + output);
- return output;
- }
-
-
- private void populateClipboardBuffer(String input) {
-
- TextTransfer plainTextTransfer = TextTransfer.getInstance();
- Clipboard clipboard = new Clipboard(getWorkbench().getDisplay());
- clipboard.setContents(
- new String[]{input},
- new Transfer[]{plainTextTransfer});
- clipboard.dispose();
- }
-
-
-
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/actions/PrepareCommitHandler.java b/changelog/src/org/eclipse/linuxtools/changelog/core/actions/PrepareCommitHandler.java
deleted file mode 100644
index 3f4e02cacd..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/actions/PrepareCommitHandler.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kyu Lee <klee@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.core.commands.IHandlerListener;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.linuxtools.changelog.core.ChangelogPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.client.Diff;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.ui.IContributorResourceAdapter;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.ide.IContributorResourceAdapter2;
-
-/**
- *
- * @author klee
- *
- */
-public class PrepareCommitHandler implements IHandler {
-
-
-
-
-
-
-
- public void addHandlerListener(IHandlerListener handlerListener) {
- // TODO Auto-generated method stub
-
- }
-
- public void dispose() {
- // TODO Auto-generated method stub
-
- }
-
-
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
- Action exampleAction;
- exampleAction = new PrepareCommitAction() {
- public void run() {
- //setSelection(new StructuredSelection(rm));
-
- doRun();
- }
- };
-
- exampleAction.run();
-
-
- return null;
- }
-
- public boolean isEnabled() {
- // TODO Auto-generated method stub
- return true;
- }
-
- public boolean isHandled() {
- // TODO Auto-generated method stub
- return true;
- }
-
- public void removeHandlerListener(IHandlerListener handlerListener) {
- // TODO Auto-generated method stub
-
- }
-
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/actions/StringDiffOperation.java b/changelog/src/org/eclipse/linuxtools/changelog/core/actions/StringDiffOperation.java
deleted file mode 100644
index 38b00df198..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/actions/StringDiffOperation.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kyu Lee <klee@redhat.com> - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.changelog.core.actions;
-
-import java.io.ByteArrayOutputStream;
-import java.io.PrintStream;
-
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.ui.operations.DiffOperation;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- *
- * @author klee
- *
- */
-public class StringDiffOperation extends DiffOperation {
-
-
- public static final String EMPTY_DIFF = "empty_diff";
-
- final ByteArrayOutputStream os = new ByteArrayOutputStream();
-
- private String diffResult = "";
- private boolean diffDone = false;
-
- public StringDiffOperation(IWorkbenchPart part, ResourceMapping[] mappings, LocalOption[] options, boolean isMultiPatch, boolean includeFullPathInformation, IPath patchRoot) {
- super(part, mappings, options, isMultiPatch, includeFullPathInformation,
- patchRoot);
-
- }
-
-
- public void execute(IProgressMonitor monitor) throws CVSException, InterruptedException {
- super.execute(monitor);
-
- if (os.size() == 0 ||
- (!patchHasContents && !patchHasNewFiles)) {
- reportEmptyDiff();
- } else {
-
-
- diffResult = os.toString();
- }
-
- diffDone = true;
-
- }
-
-
- public String getResult() {
- return diffDone ? diffResult : null;
- }
-
-
-
- protected PrintStream openStream() throws CVSException {
- return new PrintStream(os);
- }
-
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/editors/ChangeLogDocumentProvider.java b/changelog/src/org/eclipse/linuxtools/changelog/core/editors/ChangeLogDocumentProvider.java
deleted file mode 100644
index c74c026239..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/editors/ChangeLogDocumentProvider.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kyu Lee <klee@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core.editors;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.ui.editors.text.FileDocumentProvider;
-
-/**
- * @author klee (Kyu Lee)
- */
-public class ChangeLogDocumentProvider extends FileDocumentProvider {
-
- protected IDocument createDocument(Object element) throws CoreException {
-
- return super.createDocument(element);
-
- }
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/editors/ChangeLogEditor.java b/changelog/src/org/eclipse/linuxtools/changelog/core/editors/ChangeLogEditor.java
deleted file mode 100644
index 7e9418fe19..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/editors/ChangeLogEditor.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kyu Lee <klee@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core.editors;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.linuxtools.changelog.core.ChangelogPlugin;
-import org.eclipse.linuxtools.changelog.core.IEditorChangeLogContrib;
-import org.eclipse.linuxtools.changelog.core.actions.FormatChangeLogAction;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.editors.text.TextEditor;
-import org.eclipse.ui.texteditor.ITextEditorActionConstants;
-
-
-/**
- * ChangeLog editor that supports GNU format.
- *
- * @author klee (Kyu Lee)
- */
-public class ChangeLogEditor extends TextEditor {
-
- FormatChangeLogAction fcla;
-
- public ChangeLogEditor() {
- super();
-
- fcla = new FormatChangeLogAction(this);
-
- SourceViewerConfiguration config = getConfig();
-
- if (config != null) {
-
- setSourceViewerConfiguration(config);
- } else
- ChangelogPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, "Changelog", IStatus.ERROR,
- "Couldn't get editor configuration", new Exception(
- "Couldn't get editor configuration")));
-
- setDocumentProvider(new ChangeLogDocumentProvider());
-
- }
-
- /**
- * Gets appropriate style editor from user pref.
- *
- * @return configuration for the Chagelog editor
- */
-
- public SourceViewerConfiguration getConfig() {
-
- IExtensionPoint editorExtensions = null;
- IEditorChangeLogContrib editorContrib = null;
-
- // get editor which is stored in preference.
- IPreferenceStore store = ChangelogPlugin.getDefault()
- .getPreferenceStore();
- String pref_Editor = store
- .getString("IChangeLogConstants.DEFAULT_EDITOR");
-
- editorExtensions = Platform.getExtensionRegistry().getExtensionPoint(
- "org.eclipse.linuxtools.changelog.core", "editorContribution"); //$NON-NLS-1$
-
- if (editorExtensions != null) {
- IConfigurationElement[] elements = editorExtensions
- .getConfigurationElements();
- for (int i = 0; i < elements.length; i++) {
- if (elements[i].getName().equals("editor") && (elements[i].getAttribute("name").equals(pref_Editor))) { //$NON-NLS-1$
-
- try {
- IConfigurationElement bob = elements[i];
- editorContrib = (IEditorChangeLogContrib) bob
- .createExecutableExtension("class");
-
- editorContrib.setTextEditor(this);
- return (SourceViewerConfiguration) editorContrib;
- } catch (CoreException e) {
- ChangelogPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, "Changelog",
- IStatus.ERROR, e.getMessage(), e));
- }
-
- }
- }
- }
-
- return null;
- }
-
- public void dispose() {
- super.dispose();
-
- }
-
-
- public ISourceViewer getMySourceViewer() {
- return this.getSourceViewer();
- }
-
- /**
- * Specifies context menu.
- */
- protected void editorContextMenuAboutToShow(IMenuManager menu) {
-
- super.editorContextMenuAboutToShow(menu);
- addAction(menu, ITextEditorActionConstants.GROUP_EDIT,
- ITextEditorActionConstants.SHIFT_RIGHT);
- addAction(menu, ITextEditorActionConstants.GROUP_EDIT,
- ITextEditorActionConstants.SHIFT_LEFT);
- menu.appendToGroup(ITextEditorActionConstants.GROUP_EDIT, fcla);
-
- }
-
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/editors/ChangeLogFormattingStrategy.java b/changelog/src/org/eclipse/linuxtools/changelog/core/editors/ChangeLogFormattingStrategy.java
deleted file mode 100644
index 645deeddbf..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/editors/ChangeLogFormattingStrategy.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kyu Lee <klee@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core.editors;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.StringTokenizer;
-
-import org.eclipse.jface.text.formatter.IFormattingStrategy;
-
-public class ChangeLogFormattingStrategy implements IFormattingStrategy {
-
- private final String NEW_LINE_CHAR = "\n";
-
- private final String WHITE_SPACE_CHAR = " ";
-
- private final String TAB_SPACE_CHAR = "\t";
-
- public String format(String content, boolean isLineStart,
- String indentation, int[] positions) {
-
- ArrayList formattedWords = new ArrayList();
- int currentLineLength = indentation.length();
- boolean newLineBegin = true;
-
- String firstLine = "";
-
- // if first line is not from the start, ignore it
- if (!isLineStart) {
- int eol;
- if ((eol = content.indexOf('\n')) == content.length() - 1) {
- return content;
- } else {
- firstLine = content.substring(0, eol + 1);
- content = content.substring(eol + 1);
- }
- }
-
- StringTokenizer candidateWords = new StringTokenizer(content,
- NEW_LINE_CHAR + WHITE_SPACE_CHAR + TAB_SPACE_CHAR, true);
-
- boolean seenFirstWord = false;
-
- boolean addedFirstNL = false;
- while (candidateWords.hasMoreTokens()) {
-
- String cword = candidateWords.nextToken();
-
- if (!seenFirstWord) {
-
- if ((cword.indexOf(NEW_LINE_CHAR) < 0
- && cword.indexOf(WHITE_SPACE_CHAR) < 0 && cword
- .indexOf(TAB_SPACE_CHAR) < 0)) {
- seenFirstWord = true;
- } else {
- if (!addedFirstNL && cword.indexOf(NEW_LINE_CHAR) >= 0) {
- firstLine += "\n";
- addedFirstNL = true;
- }
- continue;
- }
-
- } else {
-
- if (cword.indexOf(NEW_LINE_CHAR) >= 0
- || cword.indexOf(WHITE_SPACE_CHAR) >= 0
- || cword.indexOf(TAB_SPACE_CHAR) >= 0) {
- continue;
- }
- }
-
- // if the word is date, start new line and include
- // names, email, then an empty line.
- if (isDate(cword)) {
-
- // see if we are in middle of line and
- // if so, start new line, else continue.
- if (!newLineBegin)
- formattedWords.add(NEW_LINE_CHAR);
-
- if (formattedWords.size() > 0)
- formattedWords.add(NEW_LINE_CHAR);
-
- // insert date
- formattedWords.add(cword + WHITE_SPACE_CHAR);
-
- // insert name
- cword = candidateWords.nextToken();
- while (!isEmail(cword)) {
-
- if (!cword.equals(WHITE_SPACE_CHAR) && !cword.equals(TAB_SPACE_CHAR) && !cword.equals(NEW_LINE_CHAR)) {
- formattedWords.add(WHITE_SPACE_CHAR + cword);
- }
-
-
- cword = candidateWords.nextToken();
- }
-
- // insert email
- formattedWords.add(WHITE_SPACE_CHAR + WHITE_SPACE_CHAR + cword + NEW_LINE_CHAR);
-
- // inserted header, so insert a empty line
- formattedWords.add(NEW_LINE_CHAR);
- newLineBegin = true;
- currentLineLength = indentation.length();
- continue;
- }
-
- // means beginning of file name, so whole filename should be
- // in one line.
- if (isStar(cword)) {
- // see if we are in middle of line and
- // if so, start new line, else continue.
- if (!newLineBegin) {
- formattedWords.add(NEW_LINE_CHAR);
- currentLineLength = indentation.length();
- }
-
- formattedWords.add(TAB_SPACE_CHAR + cword);
- currentLineLength += cword.length() + 1;
-
- // this should be path name
- cword = candidateWords.nextToken();
- cword = candidateWords.nextToken();
-
- formattedWords.add(WHITE_SPACE_CHAR + cword);
- currentLineLength += cword.length() + 1;
- newLineBegin = false;
- continue;
- }
-
- if (cword.startsWith("(")) {
-
- if (formattedWords.size() > 0)
- formattedWords.add(NEW_LINE_CHAR + TAB_SPACE_CHAR);
- else
- formattedWords.add(TAB_SPACE_CHAR);
-
- currentLineLength = 1;
- // add until closing bracket
-
- boolean skipMultiWhiteSpace = false;
-
- while (!cword.endsWith("):")) {
-
- if (cword.equals(WHITE_SPACE_CHAR) && !skipMultiWhiteSpace) {
- formattedWords.add(cword);
- currentLineLength += cword.length();
- skipMultiWhiteSpace = true;
- }
-
- if (!cword.equals(WHITE_SPACE_CHAR)
- && !cword.equals(NEW_LINE_CHAR)
- && !cword.equals(TAB_SPACE_CHAR)) {
- formattedWords.add(cword);
- currentLineLength += cword.length();
- skipMultiWhiteSpace = false;
- }
-
- cword = candidateWords.nextToken();
- }
- formattedWords.add(cword);
- currentLineLength += cword.length();
- newLineBegin = false;
-
- continue;
- }
-
- if (currentLineLength + cword.length() > 80) {
- formattedWords.add(NEW_LINE_CHAR + TAB_SPACE_CHAR + cword);
- currentLineLength = indentation.length() + cword.length();
- newLineBegin = false;
- } else {
- if (newLineBegin) {
- formattedWords.add(TAB_SPACE_CHAR);
- newLineBegin = false;
- } else {
- formattedWords.add(WHITE_SPACE_CHAR);
- }
- formattedWords.add(cword);
- currentLineLength += cword.length() + 1;
-
- }
- }
-
- String finalContent = "";
-
- Iterator formattedWordIterator = formattedWords.iterator();
-
- while (formattedWordIterator.hasNext()) {
- finalContent += (String) formattedWordIterator.next();
- }
-
- return firstLine + finalContent;
- }
-
- private boolean isDate(String inputStr) {
-
- // Set up patterns for looking for the next date in the changelog
- SimpleDateFormat isoDate = new SimpleDateFormat("yyyy-MM-dd");
-
- // Try to find next Date bounded changelog entry by parsing date
- // patterns
- // First start with an ISO date
- try {
- Date ad = isoDate.parse(inputStr);
- if (ad != null)
- return true;
- } catch (ParseException e) {
- // We don't really care on exception; it just means it could not
- // parse a date on that line
- }
- return false;
- }
-
- private boolean isEmail(String inputStr) {
- return inputStr.startsWith("<") && inputStr.endsWith(">");
- }
-
- private boolean isStar(String inputStr) {
- return inputStr.equals("*");
- }
-
- public void formatterStarts(String initialIndentation) {
-
- }
-
- public void formatterStops() {
-
- }
-
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/editors/ColorManager.java b/changelog/src/org/eclipse/linuxtools/changelog/core/editors/ColorManager.java
deleted file mode 100644
index 647b0de54e..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/editors/ColorManager.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kyu Lee <klee@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core.editors;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Manages color schemes. Actual color value is stored in
- * IChangeLogColorConstants.
- *
- * @author klee (Kyu Lee)
- *
- */
-public class ColorManager {
-
- protected Map fColorTable = new HashMap(10);
-
- public void dispose() {
- Iterator e = fColorTable.values().iterator();
- while (e.hasNext())
- ((Color) e.next()).dispose();
- }
-
- public Color getColor(RGB rgb) {
- Color color = (Color) fColorTable.get(rgb);
- if (color == null) {
- color = new Color(Display.getCurrent(), rgb);
- fColorTable.put(rgb, color);
- }
- return color;
- }
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/editors/FileHyperlink.java b/changelog/src/org/eclipse/linuxtools/changelog/core/editors/FileHyperlink.java
deleted file mode 100644
index 0777645a68..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/editors/FileHyperlink.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kyu Lee <klee@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core.editors;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.linuxtools.changelog.core.ChangelogPlugin;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PartInitException;
-
-/**
- * Hyperlink that opens up editor for a file.
- *
- * @author klee (Kyu Lee)
- *
- */
-public class FileHyperlink implements IHyperlink {
-
- private IFile fileLoc;
-
- private IRegion region;
-
- public FileHyperlink(IRegion regionIn, IFile fileIn) {
- fileLoc = fileIn;
- region = regionIn;
- }
-
- public IRegion getHyperlinkRegion() {
- return region;
- }
-
- public String getTypeLabel() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getHyperlinkText() {
- // TODO Auto-generated method stub
- return null;
- }
-
- /**
- * Opens the hyperlink in new editor window.
- */
- public void open() {
- IWorkbench ws = getWorkbench();
-
- try {
-
- org.eclipse.ui.ide.IDE.openEditor(ws.getActiveWorkbenchWindow()
- .getActivePage(), fileLoc, true);
- } catch (PartInitException e) {
- e.printStackTrace();
-
- }
-
- }
-
- private IWorkbench getWorkbench() {
- return ChangelogPlugin.getDefault().getWorkbench();
- }
-
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/editors/GNUEditorConfiguration.java b/changelog/src/org/eclipse/linuxtools/changelog/core/editors/GNUEditorConfiguration.java
deleted file mode 100644
index aad946ec97..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/editors/GNUEditorConfiguration.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kyu Lee <klee@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core.editors;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.formatter.ContentFormatter;
-import org.eclipse.jface.text.formatter.IContentFormatter;
-import org.eclipse.jface.text.hyperlink.DefaultHyperlinkPresenter;
-import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
-import org.eclipse.jface.text.hyperlink.IHyperlinkPresenter;
-import org.eclipse.jface.text.presentation.IPresentationReconciler;
-import org.eclipse.jface.text.presentation.PresentationReconciler;
-import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.linuxtools.changelog.core.IEditorChangeLogContrib;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.ui.editors.text.TextEditor;
-
-
-/**
- * GNU format ChangeLog editor configuration.
- *
- * @author klee (Kyu Lee)
- */
-public class GNUEditorConfiguration extends SourceViewerConfiguration implements
- IEditorChangeLogContrib {
-
- private GNUElementScanner scanner;
-
- private ColorManager colorManager;
-
- private GNUHyperlinkDetector linkDetector;
-
- private final RGB DEFAULT_HYPERLINK_COLOR = new RGB(127, 0, 0);
-
- private TextEditor parentEditor;
-
- /**
- * Prepares configuration.
- */
- public GNUEditorConfiguration() {
- this.colorManager = new ColorManager();
-
- }
-
- /**
- * Sets TextEditor that this configuration is going to be applied.
- */
- public void setTextEditor(TextEditor editor) {
- parentEditor = editor;
- }
-
- /**
- * Set default content type. GNU Changelog only has one type.
- *
- * @return default content type.
- */
- public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
- return new String[] { IDocument.DEFAULT_CONTENT_TYPE };
- }
-
- protected GNUElementScanner getChangeLogFileScanner() {
- if (scanner == null) {
- scanner = new GNUElementScanner(colorManager);
- scanner.setDefaultReturnToken(new Token(new TextAttribute(
- colorManager.getColor(IChangeLogColorConstants.TEXT))));
- }
- return scanner;
- }
-
- /**
- * Detects hyperlinks in GNU formatted changelogs.
- *
- * @return link detector for GNU format.
- */
- public IHyperlinkDetector[] getHyperlinkDetectors(ISourceViewer sourceViewer) {
- if (sourceViewer == null)
- return null;
-
- if (linkDetector == null) {
- linkDetector = new GNUHyperlinkDetector(sourceViewer, parentEditor);
-
- }
-
- return new IHyperlinkDetector[] { linkDetector };
- }
-
- /**
- * Hyperlink presenter (decorator).
- *
- * @return default presenter.
- */
- public IHyperlinkPresenter getHyperlinkPresenter(ISourceViewer sourceViewer) {
- return new DefaultHyperlinkPresenter(DEFAULT_HYPERLINK_COLOR);
- }
-
-
- /**
- * Set content formatter. For ChangeLog, it just wraps lines.
- */
- public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) {
-
- ContentFormatter cf = new ContentFormatter();
-
- // no partitions
- cf.enablePartitionAwareFormatting(false);
-
- ChangeLogFormattingStrategy cfs = new ChangeLogFormattingStrategy();
-
- cf.setFormattingStrategy(cfs, IDocument.DEFAULT_CONTENT_TYPE);
-
-
- return cf;
- }
-
-
- /**
- * Highlights GNU format changelog syntaxes.
- *
- * @return reconciler for GNU format changelog.
- */
- public IPresentationReconciler getPresentationReconciler(
- ISourceViewer sourceViewer) {
- PresentationReconciler reconciler = new PresentationReconciler();
-
- DefaultDamagerRepairer dr = new DefaultDamagerRepairer(
- getChangeLogFileScanner());
- reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
- reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
-
- return reconciler;
- }
-
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/editors/GNUElementScanner.java b/changelog/src/org/eclipse/linuxtools/changelog/core/editors/GNUElementScanner.java
deleted file mode 100644
index d5abc52184..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/editors/GNUElementScanner.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kyu Lee <klee@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core.editors;
-
-import org.eclipse.jface.text.*;
-import org.eclipse.jface.text.rules.*;
-
-/**
- * Recognizes GNU format changelog. Can be configured to return different types
- * of tokens.
- *
- * @author klee (Kyu Lee)
- */
-public class GNUElementScanner extends RuleBasedScanner {
-
- public static final String FILE_NAME = "_file_name";
-
- public static final String TEXT = "_text_content";
-
- public static final String EMAIL = "_author_email";
-
- public static final String DATE = "_entry_date";
-
- public static final String AUTHOR = "_author_name";
-
- public static final String FUNC_NAME = "_function_name";
-
- /**
- * Build a scanner for syntax highlighting.
- *
- * @param manager
- * color scheme to use
- */
- public GNUElementScanner(ColorManager manager) {
- IToken file = new Token(new TextAttribute(manager
- .getColor(IChangeLogColorConstants.FILE_NAME)));
-
- IToken func = new Token(new TextAttribute(manager
- .getColor(IChangeLogColorConstants.FUNC_NAME)));
-
- IToken email = new Token(new TextAttribute(manager
- .getColor(IChangeLogColorConstants.EMAIL)));
-
- IRule[] rules = new IRule[4];
-
- // Add rule for file path
- rules[0] = new SingleLineRule("* ", " ", file, '\0', true);
- rules[1] = new SingleLineRule("* ", ":", file);
-
- // function
- rules[2] = new SingleLineRule("(", "):", func);
- // email
- rules[3] = new SingleLineRule("<", ">\n", email);
- setRules(rules);
- }
-
- /**
- * Build a scanner for hyperlink.
- *
- */
- public GNUElementScanner() {
- IToken file = new Token(new String(FILE_NAME));
-
- IToken func = new Token(new String(FUNC_NAME));
-
- IToken email = new Token(new String(EMAIL));
-
- IRule[] rules = new IRule[4];
-
- // Add rule for file path
- rules[0] = new SingleLineRule("* ", " ", file, '\0', true);
- rules[1] = new SingleLineRule("* ", ":", file);
-
- // function
- rules[2] = new SingleLineRule("(", "):", func);
- // email
- rules[3] = new SingleLineRule("<", ">", email);
-
- setRules(rules);
- }
-
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/editors/GNUHyperlinkDetector.java b/changelog/src/org/eclipse/linuxtools/changelog/core/editors/GNUHyperlinkDetector.java
deleted file mode 100644
index 7148691510..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/editors/GNUHyperlinkDetector.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kyu Lee <klee@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core.editors;
-
-import org.eclipse.team.ui.synchronize.SyncInfoCompareInput;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.editors.text.TextEditor;
-import org.eclipse.compare.CompareEditorInput;
-
-import org.eclipse.core.internal.resources.Workspace;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.jface.text.Assert;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.rules.Token;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-
-/**
- *
- * @author klee (Kyu Lee)
- */
-public class GNUHyperlinkDetector implements IHyperlinkDetector {
-
-
-
- private IPath documentLocation;
-
- /**
- * Creates a new URL hyperlink detector for GNU Format changelogs.
- *
- * NOTE: It assumes that the path this ChangeLog is in, is root
- * directory of path names in this ChangeLog.
- *
- * ex) ChangeLog is in /some/project and in ChangeLog, path names are like
- * abc/file.java ghi/file2.java
- *
- * then absolute path of file.java and file2.java are
- * /some/project/abc/file.java and /some/project/ghi/file2.java
- *
- * @param textViewer
- * the text viewer in which to detect the hyperlink
- */
- public GNUHyperlinkDetector(ITextViewer textViewer, TextEditor editor) {
- Assert.isNotNull(textViewer);
-
- documentLocation = getDocumentLocation(editor);
-
- }
-
- /**
- * Detector using RuleBasedScanner.
- */
- public IHyperlink[] detectHyperlinks(ITextViewer textViewer,
- IRegion region, boolean canShowMultipleHyperlinks) {
-
- IDocument thisDoc = textViewer.getDocument();
-
- GNUElementScanner scanner = new GNUElementScanner();
-
- scanner.setDefaultReturnToken(new Token("default"));
-
- IRegion lineInfo = null;
-
- try {
- lineInfo = thisDoc.getLineInformationOfOffset(region.getOffset());
- } catch (org.eclipse.jface.text.BadLocationException e1) {
- e1.printStackTrace();
- return null;
- }
-
- if (lineInfo == null)
- return null;
-
- scanner.setRange(thisDoc, lineInfo.getOffset(), lineInfo.getLength());
-
- Token tmpToken = (Token) scanner.nextToken();
-
- String tokenStr = (String) tmpToken.getData();
-
- if (tokenStr == null) {
- return null;
- }
-
- // try to find non-default token if fail, return null.
- while (tokenStr.equals("default")) {
- tmpToken = (Token) scanner.nextToken();
- tokenStr = (String) tmpToken.getData();
- if (tokenStr == null)
- return null;
-
- }
-
- Region tokenRegion = new Region(scanner.getTokenOffset(), scanner
- .getTokenLength());
-
- String line = "";
- try {
- line = thisDoc
- .get(tokenRegion.getOffset(), tokenRegion.getLength());
- } catch (org.eclipse.jface.text.BadLocationException e1) {
- e1.printStackTrace();
- return null;
- }
-
- // process file link
- if (tokenStr.equals(GNUElementScanner.FILE_NAME)) {
-
- Region pathRegion = null;
-
- // cut "* "
- line = line.substring(2);
- int trailingWhiteSpace;
- if (((trailingWhiteSpace = line.indexOf(":")) > 0)
- || ((trailingWhiteSpace = line.indexOf(" ")) > 0)) {
-
- line = line.substring(0, trailingWhiteSpace);
- pathRegion = new Region(tokenRegion.getOffset() + 2,
- trailingWhiteSpace);
- } else {
- pathRegion = new Region(tokenRegion.getOffset() + 2, line
- .length());
- }
-
-
- if (documentLocation == null)
- return null;
-
- IPath filePath = documentLocation.append(line);
-
- return new IHyperlink[] { new FileHyperlink(pathRegion,
- ((Workspace) ResourcesPlugin.getWorkspace())
- .getFileSystemManager().fileForLocation(filePath)) };
-
- }
-
- return null;
- }
-
- private IWorkspaceRoot getWorkspaceRoot() {
- return ResourcesPlugin.getWorkspace().getRoot();
- }
-
- /**
- * Get current directory that ChangeLog is in.
- *
- * @param currentEditor
- * @return path that this ChangeLog is in
- */
- private IPath getDocumentLocation(IEditorPart currentEditor) {
- IWorkspaceRoot myWorkspaceRoot = getWorkspaceRoot();
- String WorkspaceRoot = myWorkspaceRoot.getLocation().toOSString();
- IEditorInput cc = currentEditor.getEditorInput();
-
- if (cc instanceof IFileEditorInput) {
- IFileEditorInput test = (IFileEditorInput) cc;
- IFile loc = test.getFile();
-
- IPath docLoc = new Path(WorkspaceRoot
- + loc.getFullPath().toOSString());
- docLoc = docLoc.removeLastSegments(1);
- return docLoc;
-
- }
-
- if ((cc instanceof SyncInfoCompareInput)
- || (cc instanceof CompareEditorInput)) {
-
- CompareEditorInput test = (CompareEditorInput) cc;
- if (test.getCompareResult() == null)
- return null;
-
- IPath docLoc = new Path(WorkspaceRoot
- + test.getCompareResult().toString());
- docLoc = docLoc.removeLastSegments(1);
- return docLoc;
-
- }
-
- return null;
- }
-
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/editors/IChangeLogColorConstants.java b/changelog/src/org/eclipse/linuxtools/changelog/core/editors/IChangeLogColorConstants.java
deleted file mode 100644
index 2feb84e1b3..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/editors/IChangeLogColorConstants.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kyu Lee <klee@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core.editors;
-
-import org.eclipse.swt.graphics.RGB;
-
-/**
- * Color scheme to use for syntax highlighting.
- *
- * @author klee (Kyu Lee)
- *
- */
-public interface IChangeLogColorConstants {
- RGB FILE_NAME = new RGB(128, 0, 0);
-
- RGB FUNC_NAME = new RGB(0, 128, 0);
-
- RGB TEXT = new RGB(0, 0, 0);
-
- RGB EMAIL = new RGB(0, 0, 128);
-
- RGB DATE = new RGB(64, 64, 0);
-
- RGB AUTHOR = new RGB(0, 64, 64);
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/formatters/GNUFormat.java b/changelog/src/org/eclipse/linuxtools/changelog/core/formatters/GNUFormat.java
deleted file mode 100644
index 1655104553..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/formatters/GNUFormat.java
+++ /dev/null
@@ -1,336 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Phil Muldoon <pkmuldoon@picobot.org>.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pmuldoon@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core.formatters;
-
-import java.io.File;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.FindReplaceDocumentAdapter;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.linuxtools.changelog.core.ChangelogPlugin;
-import org.eclipse.linuxtools.changelog.core.IFormatterChangeLogContrib;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.texteditor.AbstractTextEditor;
-import org.eclipse.ui.texteditor.IDocumentProvider;
-import org.eclipse.ui.texteditor.ITextEditor;
-
-
-/**
- * @author pmuldoon (Phil Muldoon)
- */
-public class GNUFormat implements IFormatterChangeLogContrib {
-
- final String line_sep = System.getProperty("line.separator"); //$NON-NLS-1$
-
- final String TAB = "\t";
-
-
- public String formatDateLine(String authorName, String authorEmail) {
- String detail = returnDate() + " " + //$NON-NLS-1$
- authorName + " " + "<" + authorEmail + ">" + line_sep + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- line_sep;
- return detail;
- }
-
-
- public String mergeChangelog(String dateLine, String functionGuess,
- IEditorPart changelog, String changeLogLocation, String fileLocation) {
-
- String fileDetail = formatFileDetail(changeLogLocation, fileLocation);
- IDocument changelog_doc = getDocument(changelog);
- String function = formatFunction(functionGuess);
- boolean multipleEntrySuccess = false;
- String functionSpacer=" ";
- if (function.equals(": "))
- functionSpacer="";
- if (changelog_doc.getLength() > 0) {
-
- int offset_start = findChangeLogEntry(changelog_doc, dateLine);
- int offset_end = dateLine.length();
- boolean foundFunction = false;
-
- if (offset_start != -1) {
- int nextChangeEntry = findChangeLogPattern(changelog_doc,
- offset_start + dateLine.length());
- int functLogEntry = offset_start + dateLine.length();
-
- while (functLogEntry < nextChangeEntry) {
- int line_length = 0;
- String entry = "";
- try {
- line_length = changelog_doc
- .getLineOfOffset(functLogEntry);
- entry = changelog_doc.get(functLogEntry, changelog_doc
- .getLineLength(line_length));
- } catch (BadLocationException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- if (entry.lastIndexOf(fileDetail) > 0) {
- foundFunction = true;
- int nextFunctLoc = functLogEntry + fileDetail.length()
- + 2;
- String nextFunc = "";
- try {
- nextFunc = changelog_doc.get(nextFunctLoc,
- nextChangeEntry - nextFunctLoc);
- } catch (BadLocationException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
- int foundFunc = nextFunc.indexOf("* ");
- if (foundFunc > 0) {
- foundFunc--;
- try {
- while (changelog_doc.get(
- nextFunctLoc + foundFunc, 1).equals(
- "\t")
- || changelog_doc.get(
- nextFunctLoc + foundFunc, 1)
- .equals("\n"))
- foundFunc--;
- } catch (BadLocationException e2) {
- // TODO Auto-generated catch block
- e2.printStackTrace();
- }
- functLogEntry = nextFunctLoc + foundFunc + 1;
- break;
- }
-
- }
- try {
- functLogEntry += changelog_doc
- .getLineLength(line_length);
- } catch (BadLocationException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
- }
- if (functLogEntry >= nextChangeEntry) {
- functLogEntry = nextChangeEntry - 1;
- try {
- while (changelog_doc.get(functLogEntry, 1).equals("\n"))
- functLogEntry--;
- } catch (BadLocationException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- functLogEntry++;
- }
-
- if (offset_start != -1) {
- if (foundFunction) {
- try {
- if (!function.equals(": "))
- changelog_doc.replace(functLogEntry, 0, "\n" + TAB
- + function+" ");
- else
- changelog_doc.replace(functLogEntry, 0, "\n" + TAB
- );
- } catch (BadLocationException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- ITextEditor edit = (ITextEditor) changelog;
- if (!function.equals(": "))
- edit.selectAndReveal(functLogEntry + function.length()
- + 3, 0);
- else
- edit.selectAndReveal(functLogEntry + function.length()
- , 0);
- multipleEntrySuccess = true;
- } else {
- try {
- changelog_doc.replace(offset_end, 0, TAB
- + "* " + fileDetail + functionSpacer+function+functionSpacer + "\n"); //$NON-NLS-1$
- } catch (BadLocationException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- ITextEditor edit = (ITextEditor) changelog;
- edit.selectAndReveal(offset_end + fileDetail.length()
- + function.length() +functionSpacer.length()*2 + 3, 0);
- multipleEntrySuccess = true;
- }
-
- }
- }
- }
-
- if (!multipleEntrySuccess) {
- try {
- if (changelog_doc.getLength() > 0)
- changelog_doc.replace(0, 0, "\n\n"); //$NON-NLS-1$
- changelog_doc.replace(0, 0, dateLine + TAB + "* " + fileDetail
- + functionSpacer+function+functionSpacer);
-
- ITextEditor edit = (ITextEditor) changelog;
- edit.selectAndReveal(dateLine.length() + fileDetail.length()
- + function.length() + functionSpacer.length()*2 + 3, 0);
- } catch (BadLocationException e) {
- e.printStackTrace();
-
- }
-
- }
-
- return "";
-
- }
-
- private IWorkspaceRoot getWorkspaceRoot() {
- return ResourcesPlugin.getWorkspace().getRoot();
- }
-
- private String formatFileDetail(String changeLogLocation,
- String editorFileLocation) {
- // Format Path. Is a full path specified, or just file name?
- IWorkspaceRoot myWorkspaceRoot = getWorkspaceRoot();
- String WorkspaceRoot = myWorkspaceRoot.getLocation().toOSString();
- String changeLogLocNoRoot = "";
- String editorFileLocNoRoot = "";
- if (changeLogLocation.lastIndexOf(WorkspaceRoot) >= 0) {
- changeLogLocNoRoot = changeLogLocation.substring(changeLogLocation
- .lastIndexOf(WorkspaceRoot)
- + WorkspaceRoot.length(), changeLogLocation.length());
- } else
- changeLogLocNoRoot = changeLogLocation;
-
- if (editorFileLocation.lastIndexOf(WorkspaceRoot) >= 0) {
- editorFileLocNoRoot = editorFileLocation.substring(
- editorFileLocation.lastIndexOf(WorkspaceRoot),
- editorFileLocation.lastIndexOf(WorkspaceRoot)
- + WorkspaceRoot.length());
- } else
- editorFileLocNoRoot = editorFileLocation;
-
- File changelogLocation = new File(changeLogLocNoRoot);
- File fileLocation = new File(editorFileLocNoRoot);
- File reversePath = fileLocation.getParentFile();
- String reversePathb = "";
-
- while (reversePath.getParentFile() != null) {
- if (reversePath.compareTo(changelogLocation.getParentFile()) == 0)
- break;
- reversePath = reversePath.getParentFile();
- }
- if (reversePath != null)
- reversePathb = fileLocation.toString().substring(
- reversePath.toString().length() + 1,
- fileLocation.toString().length());
- return reversePathb;
- }
-
- private int findChangeLogPattern(IDocument changelog_doc, int startOffset) {
- // find the "pattern" of a changelog entry. Not a specific one,
- // but one that "looks" like an entry
- int nextEntry = startOffset;
- int line_length = 0;
- String entry = "";
- while (nextEntry < changelog_doc.getLength()) {
- try {
- // Get the line of interest in the changelog document
- line_length = changelog_doc.getLineOfOffset(nextEntry);
- entry = changelog_doc.get(nextEntry, changelog_doc
- .getLineLength(line_length));
- // Attempt to find date pattern on line
- if (matchDatePattern(entry)) {
- //nextDate -= entry.length()+1;
- break;
- }
- // If no date matches, move to the next line
- nextEntry += changelog_doc.getLineLength(line_length);
- } catch (BadLocationException e) {
- ChangelogPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, "Changelog", IStatus.ERROR, e
- .getMessage(), e
-
- ));
- }
-
- }
- return nextEntry;
- }
-
- private boolean matchDatePattern(String text) {
-
- // Set up patterns for looking for the next date in the changelog
- SimpleDateFormat isoDate = new SimpleDateFormat("yyyy-MM-dd");
-
- // Try to find next Date bounded changelog entry by parsing date patterns
- // First start with an ISO date
- try {
- Date ad = isoDate.parse(text);
- if (ad != null)
- return true;
- } catch (ParseException e) {
- // We don't really care on exception; it just means it could not parse a date on that line
- }
-
- return false;
- }
-
- private int findChangeLogEntry(IDocument changelog_doc, String entry) {
- FindReplaceDocumentAdapter findDocumentAptd = new FindReplaceDocumentAdapter(
- changelog_doc);
- IRegion region = null;
- try {
- region = findDocumentAptd.find(0, entry, true, false, false, true);
- } catch (BadLocationException e) {
- ChangelogPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, "Changelog", IStatus.ERROR, e
- .getMessage(), e
-
- ));
- return -1;
- }
- if (region != null) {
- // If the user's entry is not at the beginning of the file,
- // make a new entry.
- return region.getOffset() > 0 ? -1 : 0;
- }
- else
- return -1;
- }
-
- private String formatFunction(String function) {
-
- // If Function Guess is true, and Function Guess has found something
- if (function.length() > 0)
- return "(" + function + "):";
- else
- return ": "; //$NON-NLS-1$
-
- }
-
- public IDocument getDocument(IEditorPart currentEditor) {
- AbstractTextEditor castEditor = (AbstractTextEditor) currentEditor;
- IDocumentProvider provider = castEditor.getDocumentProvider();
-
- return provider.getDocument(castEditor.getEditorInput());
- }
-
- private String returnDate() {
- SimpleDateFormat date_Format;
- date_Format = new SimpleDateFormat("yyyy-MM-dd"); //$NON-NLS-1$
- return date_Format.format(new Date());
- }
-
-} \ No newline at end of file
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/parsers/CParser.java b/changelog/src/org/eclipse/linuxtools/changelog/core/parsers/CParser.java
deleted file mode 100644
index 6298b140a0..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/parsers/CParser.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Phil Muldoon <pkmuldoon@picobot.org>.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pmuldoon@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core.parsers;
-
-import org.eclipse.cdt.core.model.ICElement;
-import org.eclipse.cdt.core.model.IWorkingCopy;
-import org.eclipse.cdt.internal.ui.editor.CEditor;
-import org.eclipse.cdt.ui.CUIPlugin;
-import org.eclipse.cdt.ui.IWorkingCopyManager;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.linuxtools.changelog.core.IParserChangeLogContrib;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-
-
-/**
- * @author pmuldoon (Phil Muldoon)
- */
-
-public class CParser implements IParserChangeLogContrib {
-
- public CParser() {
- super();
- }
-
- /**
- * @see IParserChangeLogContrib#parseCurrentFunction(IEditorPart)
- */
- public String parseCurrentFunction(IEditorPart editor) throws CoreException {
-
- if (!(editor instanceof CEditor)) {
- return "";
- }
-
- CEditor c_editor = (CEditor) editor;
-
- ITextSelection selection = (ITextSelection) c_editor
- .getSelectionProvider().getSelection();
-
- IEditorInput input = c_editor.getEditorInput();
-
- return parseCurrentFunction(input, selection.getOffset());
- }
-
- /**
- * @see IParserChangeLogContrib#parseCurrentFunction(IEditorInput, int)
- */
- public String parseCurrentFunction(IEditorInput input, int offset)
- throws CoreException {
- IWorkingCopyManager manager = CUIPlugin.getDefault()
- .getWorkingCopyManager();
- manager.connect(input);
-
- IWorkingCopy workingCopy = manager.getWorkingCopy(input);
- ICElement method = workingCopy.getElementAtOffset(offset);
-
- manager.disconnect(input);
-
- // no element selected
- if (method == null)
- return "";
-
- String currentElementName = "";
-
- if ((currentElementName = method.getElementName()) == null) {
- // element doesn't have a name
- return "";
- }
-
- int elementType = method.getElementType();
-
- switch (elementType) {
- case ICElement.C_FIELD:
- case ICElement.C_METHOD:
- case ICElement.C_FUNCTION:
- break;
- case ICElement.C_MODEL:
- return "";
-
- default:
- ICElement tmpMethodType;
- if (((tmpMethodType = method.getAncestor(ICElement.C_FUNCTION)) == null)
- && ((tmpMethodType = method.getAncestor(ICElement.C_METHOD)) == null)
- && ((tmpMethodType = method.getAncestor(ICElement.C_CLASS)) == null)) {
- return "";
- } else {
- // cursor is inside a class, but not method
- method = tmpMethodType;
- currentElementName = method.getElementName();
- }
-
- }
-
- // now append all ancestor class names to string
-
- ICElement tmpParent = method.getParent();
-
- while (tmpParent != null) {
- ICElement tmpParentClass = tmpParent.getAncestor(ICElement.C_CLASS);
- if (tmpParentClass != null) {
- String tmpParentClassName = tmpParentClass.getElementName();
- if (tmpParentClassName == null)
- return currentElementName;
- currentElementName = tmpParentClassName + "."
- + currentElementName;
- } else
- return currentElementName;
- tmpParent = tmpParentClass.getParent();
-
- }
- return currentElementName;
- }
-
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/parsers/CompareParser.java b/changelog/src/org/eclipse/linuxtools/changelog/core/parsers/CompareParser.java
deleted file mode 100644
index 924beefd50..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/parsers/CompareParser.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Phil Muldoon <pkmuldoon@picobot.org>.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pmuldoon@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core.parsers;
-
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.compare.internal.CompareEditor;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.linuxtools.changelog.core.IParserChangeLogContrib;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-
-
-/**
- * @author pmuldoon (Phil Muldoon)
- */
-public class CompareParser implements IParserChangeLogContrib {
-
- /**
- * @see IParserChangeLogContrib#parseCurrentFunction(IEditorPart)
- */
- public String parseCurrentFunction(IEditorPart editor) throws CoreException {
- if (editor instanceof CompareEditor) {
-// CompareEditor compare_editor = (CompareEditor) editor;
-// IEditorInput input = compare_editor.getEditorInput();
-// CompareEditorInput test = (CompareEditorInput) input;
- //System.out.println(test.getCompareResult());
-
- return "";
- } else
- return "";
- }
-
- /**
- * @see IParserChangeLogContrib#parseCurrentFunction(IEditorInput, int)
- */
- public String parseCurrentFunction(IEditorInput editor, int offset)
- throws CoreException {
- // TODO Auto-generated method stub
- return "";
- }
-
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/parsers/PythonParser.java b/changelog/src/org/eclipse/linuxtools/changelog/core/parsers/PythonParser.java
deleted file mode 100644
index 38e1b42b8e..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/parsers/PythonParser.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Phil Muldoon <pkmuldoon@picobot.org>.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pmuldoon@redhat.com> - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.changelog.core.parsers;
-
-//TODO: Disabled this python for now to remove runtime pydev dependency
-// until implementing a way to optionally require pydev.
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.linuxtools.changelog.core.IParserChangeLogContrib;
-//import org.eclipse.jface.text.IDocument;
-//import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-
-/**
- * @author pmuldoon (Phil Muldoon)
- */
-
-public class PythonParser implements IParserChangeLogContrib {
-
- /**
- * @see IParserChangeLogContrib#parseCurrentFunction(IEditorPart)
- */
- public String parseCurrentFunction(IEditorPart editor) throws CoreException {
-
-/* if (editor instanceof PyEdit) {
- PyEdit python_editor = (PyEdit) editor;
- IDocument doc = python_editor.getDocumentProvider().getDocument(
- python_editor.getEditorInput());
- ITextSelection selection = (ITextSelection) python_editor
- .getSelectionProvider().getSelection();
-
- Location loc = Location
- .offsetToLocation(doc, selection.getOffset());
- AbstractNode node = ModelUtils.getElement(python_editor
- .getPythonModel(), loc, AbstractNode.PROP_ANY);
-
- if (node != null) {
- AbstractNode node_parent = node.getScope().getStartNode();
- if (node_parent != null) {
- if (!python_editor.getTitle().equals(node_parent.getName()))
- return node_parent.getName();
-
- }
- }
-
- return "";
-
- }*/
- return "";
- }
-
- /**
- * @see IParserChangeLogContrib#parseCurrentFunction(IEditorInput, int)
- */
- public String parseCurrentFunction(IEditorInput editor, int offset)
- throws CoreException {
- // TODO Auto-generated method stub
- return "";
- }
-}
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/strings.properties b/changelog/src/org/eclipse/linuxtools/changelog/core/strings.properties
deleted file mode 100644
index e56688d6c9..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/strings.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-AddAction.str_ChangeLog_Location=Select a location for the ChangeLog
-
-ChangeLogPreferencesPage.Formatters=Formatters:
-ChangeLogPreferencesPage.AuthorName=Author Name:
-ChangeLogPreferencesPage.AuthorEmail=Author Email:
-ChangeLogPreferencesPage.Editors=Editors: \ No newline at end of file
diff --git a/changelog/src/org/eclipse/linuxtools/changelog/core/ui/ChangeLogActionProvider.java b/changelog/src/org/eclipse/linuxtools/changelog/core/ui/ChangeLogActionProvider.java
deleted file mode 100644
index 80e7683f55..0000000000
--- a/changelog/src/org/eclipse/linuxtools/changelog/core/ui/ChangeLogActionProvider.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kyu Lee <klee@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.changelog.core.ui;
-
-import org.eclipse.core.resources.mapping.ModelProvider;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.linuxtools.changelog.core.actions.PrepareChangeLogAction;
-import org.eclipse.team.core.mapping.ISynchronizationContext;
-import org.eclipse.team.ui.mapping.ISynchronizationCompareAdapter;
-import org.eclipse.team.ui.mapping.ITeamContentProviderManager;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.navigator.CommonActionProvider;
-import org.eclipse.ui.navigator.ICommonActionConstants;
-import org.eclipse.ui.navigator.ICommonActionExtensionSite;
-import org.eclipse.ui.navigator.IExtensionStateModel;
-
-
-/**
- *
- * @author klee
- *
- */
-public class ChangeLogActionProvider extends CommonActionProvider {
- private Action exampleAction;
-
- public ChangeLogActionProvider() {
- // TODO Auto-generated constructor stub
- // super();
- }
-
- /**
- * Return the configuration from the synchronize page that contains the
- * common viewer.
- *
- * @return the configuration from the synchronize page that contains the
- * common viewer
- */
- protected final ISynchronizePageConfiguration getSynchronizePageConfiguration() {
- return (ISynchronizePageConfiguration) getExtensionStateModel()
- .getProperty(
- ITeamContentProviderManager.P_SYNCHRONIZATION_PAGE_CONFIGURATION);
- }
-
- /**
- * Return the extension state model for the content provider associated with
- * action provider.
- *
- * @return the extension state model for the content provider associated
- * with action provider
- */
- protected final IExtensionStateModel getExtensionStateModel() {
- return getActionSite().getExtensionStateModel();
- }
-
- /**
- * Return the synchronization context to which the actions of this provider
- * apply.
- *
- * @return the synchronization context to which the actions of this provider
- * apply
- */
- protected final ISynchronizationContext getSynchronizationContext() {
- return (ISynchronizationContext) getExtensionStateModel().getProperty(
- ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT);
- }
-
- public void init(ICommonActionExtensionSite aSite) {
- super.init(aSite);
- /*
- * exampleAction = new Action("Prepare ChangeLog") { public void run() {
- * StringBuffer buffer = new StringBuffer(); boolean addComma = false;
- * IStructuredSelection selection =
- * (IStructuredSelection)getContext().getSelection(); ResourceMapping[]
- * mappings = getResourceMappings(selection.toArray()); for (int i = 0;
- * i < mappings.length; i++) { ResourceMapping mapping = mappings[i];
- * ISynchronizationCompareAdapter adapter = getCompareAdpater(mapping);
- * if (adapter != null) {
- *
- * String name = adapter.getPathString(mapping); if (addComma) {
- * buffer.append(", "); } buffer.append(name); addComma = true; } }
- * MessageDialog.openInformation(getActionSite().getViewSite().getShell(),
- * "Example Action", "You have executed a third party action on the
- * selected elements: " + buffer.toString()); } };
- */
-
- exampleAction = new PrepareChangeLogAction("Prepare Changelog") {
- public void run() {
- setSelection((IStructuredSelection) getContext().getSelection());
- doRun();
- }
-
- };
-
- }
-
- protected ISynchronizationCompareAdapter getCompareAdpater(
- ResourceMapping mapping) {
- if (mapping != null) {
- ModelProvider provider = mapping.getModelProvider();
- if (provider != null) {
- Object o = provider
- .getAdapter(ISynchronizationCompareAdapter.class);
- if (o instanceof ISynchronizationCompareAdapter) {
- return (ISynchronizationCompareAdapter) o;
- }
- }
- }
- return null;
- }
-
- public void fillContextMenu(IMenuManager menu) {
- super.fillContextMenu(menu);
- menu.add(exampleAction);
- }
-
- public void fillActionBars(IActionBars actionBars) {
-
- actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN,
- exampleAction);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/.classpath b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/.classpath
index 751c8f2e50..751c8f2e50 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/.classpath
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/.classpath
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/.project b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/.project
new file mode 100644
index 0000000000..0e6347dcc2
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.dataviewers.annotatedsourceeditor</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/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/.settings/org.eclipse.jdt.core.prefs b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..5466d964b5
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,3 @@
+#Tue Jun 03 09:41:19 CEST 2008
+eclipse.preferences.version=1
+instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/.settings/org.eclipse.jdt.ui.prefs b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000000..fbc03a966e
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,3 @@
+#Tue Jun 03 09:41:19 CEST 2008
+eclipse.preferences.version=1
+internal.default.compliance=default
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/META-INF/MANIFEST.MF b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..b32e17f897
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/META-INF/MANIFEST.MF
@@ -0,0 +1,24 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.linuxtools.dataviewers.annotatedsourceeditor;singleton:=true
+Bundle-Version: 4.1.0.qualifier
+Bundle-Activator: org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.STAnnotatedSourceEditorActivator
+Bundle-Vendor: %bundleProvider
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.filesystem,
+ org.eclipse.ui.ide,
+ org.eclipse.jface.text,
+ org.eclipse.ui.editors,
+ org.eclipse.cdt.ui,
+ org.eclipse.ui.workbench.texteditor,
+ org.eclipse.core.resources,
+ org.eclipse.cdt.core
+Export-Package: org.eclipse.linuxtools.dataviewers.annotatedsourceeditor,
+ org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.actions,
+ org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.hyperlink,
+ org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.preferencespages
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/about.html b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/about.html
new file mode 100644
index 0000000000..c258ef55d8
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse 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>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/build.properties b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/build.properties
new file mode 100644
index 0000000000..d9e236776e
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = .,\
+ META-INF/,\
+ icons/,\
+ plugin.xml,\
+ about.html,\
+ plugin.properties
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/icons/c_file_obj.gif b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/icons/c_file_obj.gif
new file mode 100644
index 0000000000..8fd6adbd9f
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/icons/c_file_obj.gif
Binary files differ
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/plugin.properties b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/plugin.properties
new file mode 100644
index 0000000000..ad2f7d2b46
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/plugin.properties
@@ -0,0 +1,12 @@
+#******************************************************************************
+# Copyright (c) 2009 STMicroelectronics.
+# All rights reserved. This program and the accompanying materials
+# are made available under the 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:
+# STMicroelectronics - initial API and implementation
+#*******************************************************************************
+bundleProvider = Eclipse Linux Tools
+bundleName = Annotated Source Editor Plug-in (Incubation) \ No newline at end of file
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/plugin.xml b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/plugin.xml
new file mode 100644
index 0000000000..9cf43ea2a4
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/plugin.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.workbench.texteditor.rulerColumns">
+ <column
+ class="org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.STContributedRulerColumn"
+ enabled="false"
+ global="false"
+ id="org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.column"
+ includeInMenu="false"
+ name="ST Column">
+ <placement
+ gravity="0.8"></placement>
+ <targetEditor
+ id="org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.editor">
+ </targetEditor>
+ </column>
+ </extension>
+ <extension
+ point="org.eclipse.ui.editors.markerAnnotationSpecification">
+ <specification
+ annotationType="org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.coloredLines"
+ colorPreferenceKey="coloredLinesResultIndicationColor"
+ colorPreferenceValue="250,0,0"
+ highlightPreferenceKey="coloredLinesHighlighting"
+ includeOnPreferencePage="false"
+ label="Colored Lines"
+ overviewRulerPreferenceKey="coloredLinesIndicationInOverviewRuler"
+ overviewRulerPreferenceValue="true"
+ presentationLayer="1"
+ textPreferenceKey="coloredLinedResultIndication"
+ verticalRulerPreferenceKey="coloredLinesIndicationInVerticalRuler">
+ </specification>
+ </extension>
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.STAnnotatedCSourceEditor"
+ icon="icons/c_file_obj.gif"
+ id="org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.editor"
+ name="ST Annotated Source Editor">
+ </editor>
+ <editor
+ id="org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.editor2"
+ name="name">
+ </editor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ description="%ActionDefinition.STColumnToggle.description"
+ id=" org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.STColumnToggle"
+ name="Show Annotation Columns">
+ </command>
+ </extension>
+
+</plugin>
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/AbstractSTAnnotatedSourceEditorInput.java b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/AbstractSTAnnotatedSourceEditorInput.java
new file mode 100644
index 0000000000..1a4a0f503e
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/AbstractSTAnnotatedSourceEditorInput.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.annotatedsourceeditor;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.ui.ide.FileStoreEditorInput;
+
+public abstract class AbstractSTAnnotatedSourceEditorInput extends FileStoreEditorInput{
+ private ArrayList<ISTAnnotationColumn> columns;
+
+ public AbstractSTAnnotatedSourceEditorInput(IFileStore fileStore) {
+ super(fileStore);
+ }
+
+ /** gets how many STColumn exist
+ *
+ * @return
+ */
+ public int getColumnCount(){
+ if (columns == null){
+ columns = getColumns();
+ }
+ return columns!=null ? columns.size() : 0;
+ }
+
+ /** gets the title of a ST Column
+ *
+ * @param column
+ * @return
+ */
+ public String getTitle(ISTAnnotationColumn column){
+ if (columns == null){
+ columns = getColumns();
+ }
+ return column!=null ? column.getTitle() : null;
+ }
+
+ /** gets the background column of a editor line
+ *
+ * @param line
+ * @return
+ */
+ public abstract Color getColor(int line);
+
+ public String getAnnotation(int line, ISTAnnotationColumn column){
+ if (columns == null){
+ columns = getColumns();
+ }
+ return column!=null ? column.getAnnotation(line) : null;
+ }
+
+ public String getLongDescription(int line, ISTAnnotationColumn column){
+ if (columns == null){
+ columns = getColumns();
+ }
+ return column!=null ? column.getLongDescription(line) : null;
+ }
+
+ public String getTooltip(int line, ISTAnnotationColumn column){
+ if (columns == null){
+ columns = getColumns();
+ }
+ return column!=null ? column.getTooltip(line) : null;
+ }
+
+ /** gets the ISTAnnotationColumn objects list
+ *
+ * @return
+ */
+ public abstract ArrayList<ISTAnnotationColumn> getColumns();
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/ISTAnnotationColumn.java b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/ISTAnnotationColumn.java
new file mode 100644
index 0000000000..0d7291eb1f
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/ISTAnnotationColumn.java
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.annotatedsourceeditor;
+
+public interface ISTAnnotationColumn {
+ String getTitle();
+ String getAnnotation(int line);
+ String getTooltip(int line);
+ String getLongDescription(int line);
+ String getHeaderTooltip();
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/ISTTextEditorActionConstants.java b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/ISTTextEditorActionConstants.java
new file mode 100644
index 0000000000..9e24ca9a11
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/ISTTextEditorActionConstants.java
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.annotatedsourceeditor;
+
+import org.eclipse.ui.texteditor.ITextEditorActionConstants;
+
+public interface ISTTextEditorActionConstants extends
+ ITextEditorActionConstants {
+
+ String ST_TOGGLE= "ST.Toggle"; //$NON-NLS-1$
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/ISTTextEditorActionDefinitionIds.java b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/ISTTextEditorActionDefinitionIds.java
new file mode 100644
index 0000000000..88915bb724
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/ISTTextEditorActionDefinitionIds.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.annotatedsourceeditor;
+
+import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
+
+public interface ISTTextEditorActionDefinitionIds extends
+ ITextEditorActionDefinitionIds {
+
+ String ST_TOGGLE= "org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.STColumnToggle"; //$NON-NLS-1$
+
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STAnnotatedCSourceEditor.java b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STAnnotatedCSourceEditor.java
new file mode 100644
index 0000000000..3b77d6cea7
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STAnnotatedCSourceEditor.java
@@ -0,0 +1,449 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.annotatedsourceeditor;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.cdt.internal.ui.editor.CEditor;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.AnnotationModel;
+import org.eclipse.jface.text.source.CompositeRuler;
+import org.eclipse.jface.text.source.IChangeRulerColumn;
+import org.eclipse.jface.text.source.IOverviewRuler;
+import org.eclipse.jface.text.source.ISharedTextColors;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.IVerticalRuler;
+import org.eclipse.jface.text.source.IVerticalRulerColumn;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.jface.window.DefaultToolTip;
+import org.eclipse.jface.window.ToolTip;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.LineBackgroundEvent;
+import org.eclipse.swt.custom.LineBackgroundListener;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.custom.StyledTextContent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.internal.editors.text.EditorsPlugin;
+import org.eclipse.ui.internal.texteditor.AnnotationColumn;
+import org.eclipse.ui.internal.texteditor.LineNumberColumn;
+import org.eclipse.ui.texteditor.AbstractDecoratedTextEditor;
+import org.eclipse.ui.texteditor.AnnotationPreference;
+import org.eclipse.ui.texteditor.ITextEditorActionConstants;
+import org.eclipse.ui.texteditor.MarkerAnnotationPreferences;
+import org.eclipse.ui.texteditor.ResourceAction;
+import org.eclipse.ui.texteditor.rulers.IColumnSupport;
+import org.eclipse.ui.texteditor.rulers.IContributedRulerColumn;
+import org.eclipse.ui.texteditor.rulers.RulerColumnDescriptor;
+import org.eclipse.ui.texteditor.rulers.RulerColumnRegistry;
+
+
+public class STAnnotatedCSourceEditor extends CEditor implements LineBackgroundListener {
+ private final static String ST_RULER= "STRuler";
+
+ protected STContributedRulerColumn fAbstractSTRulerColumn;
+
+ private IColumnSupport fColumnSupport;
+
+ private LineNumberColumn fLineColumn;
+
+ private STContributedRulerColumn fColumn;
+
+ private StyledText fCachedTextWidget;
+
+ private AbstractSTAnnotatedSourceEditorInput fInput;
+
+ private ArrayList<ISTAnnotationColumn> fListColumns;
+
+ private STChangeRulerColumn fSTChangeRulerColumn;
+
+ @Override
+ public void createPartControl(Composite parent){
+ if (fInput == null){
+ super.createPartControl(parent);
+ return;
+ }
+
+ GridLayout layout= new GridLayout();
+ layout.numColumns=fInput.getColumnCount()+1;
+ layout.horizontalSpacing=0;
+ parent.setLayout(layout);
+ GridData gd =new GridData();
+ gd.grabExcessHorizontalSpace =false;
+ gd.grabExcessVerticalSpace =true;
+
+ parent.setLayoutData(gd );
+
+ Composite fParentSv= new Composite(parent, SWT.NONE);
+ gd = new GridData(GridData.FILL_BOTH);
+ gd.horizontalSpan =fInput.getColumnCount()+1;
+ gd.horizontalIndent=gd.verticalIndent=0;
+ fParentSv.setLayoutData(gd);
+ FillLayout fillLayout= new FillLayout(SWT.HORIZONTAL|SWT.VERTICAL);
+ fillLayout.marginWidth=fillLayout.marginHeight=0;
+ fParentSv.setLayout(fillLayout);
+
+ super.createPartControl(fParentSv);
+
+ STColumnSupport columnSupport= (STColumnSupport)getAdapter(IColumnSupport.class);
+ RulerColumnRegistry registry = RulerColumnRegistry.getDefault();
+
+ for(int i=1;i<=fInput.getColumnCount();i++){
+ RulerColumnDescriptor abstractSTColumnDescriptor= registry.getColumnDescriptor(STContributedRulerColumn.ID);
+ columnSupport.addSTColumn((CompositeRuler)getVerticalRuler(), abstractSTColumnDescriptor,fListColumns.get(i-1));
+
+ }
+
+ CompositeRuler vr = (CompositeRuler)super.getVerticalRuler();
+ int count = 0;
+ Font font = parent.getFont();
+ FontData fd = font.getFontData()[0];
+ fd.setStyle(SWT.BOLD);
+ for(Iterator<?> iter = vr.getDecoratorIterator();iter.hasNext();){
+ IVerticalRulerColumn column = (IVerticalRulerColumn)iter.next();
+ if (column instanceof STContributedRulerColumn){
+ STContributedRulerColumn fSTColumn = (STContributedRulerColumn)column;
+ Label label = new Label(parent, SWT.BORDER);
+ gd = new GridData();
+ count++;
+ if (count==1) gd.horizontalIndent=VERTICAL_RULER_WIDTH+5;
+ else gd.horizontalIndent=0;
+ gd.widthHint = fSTColumn.getWidth();
+ label.setFont(new Font(label.getDisplay(), fd));
+ label.setLayoutData(gd);
+ label.moveAbove(fParentSv);
+ label.setText(fSTColumn.getAnnotationColumn(0).getTitle());
+ fSTColumn.setLabelColumn(label);
+
+ if (fSTColumn.isShowingSTRuler()){
+ ToolTipSupport.enableFor(fSTColumn);
+ }
+ }
+ }
+
+ Label label = new Label(parent, SWT.BORDER);
+ gd = new GridData();
+ gd.horizontalAlignment = SWT.FILL;
+ gd.grabExcessHorizontalSpace = true;
+ label.setFont(new Font(label.getDisplay(), fd));
+ label.setLayoutData(gd);
+ label.moveAbove(fParentSv);
+ label.setText(getTitle());
+
+ showLinesColored();
+
+ if (getViewer() != null){
+ ISourceViewer sv = getViewer();
+
+ if (sv.getTextWidget() != null){
+
+ fCachedTextWidget = sv.getTextWidget();
+ fCachedTextWidget.addLineBackgroundListener(this);
+ }
+ }
+ }
+
+ @Override
+ protected void rulerContextMenuAboutToShow(IMenuManager menu) {
+ super.rulerContextMenuAboutToShow(menu);
+
+ CompositeRuler vr = (CompositeRuler)super.getVerticalRuler();
+
+ for(Iterator<?> iter = vr.getDecoratorIterator();iter.hasNext();){
+ IVerticalRulerColumn column = (IVerticalRulerColumn)iter.next();
+ if (column instanceof STContributedRulerColumn){
+ STContributedRulerColumn fSTColumn = (STContributedRulerColumn)column;
+ IAction stprofcolAction = getAction(ISTTextEditorActionConstants.ST_TOGGLE);
+ stprofcolAction.setChecked(fSTColumn != null && fSTColumn.isShowingSTRuler());
+ }
+ else if (column instanceof LineNumberColumn){
+ LineNumberColumn fLineColumn = (LineNumberColumn)column;
+ IAction lineNumberAction= getAction(ITextEditorActionConstants.LINENUMBERS_TOGGLE);
+ lineNumberAction.setChecked(fLineColumn != null && fLineColumn.isShowingLineNumbers());
+ }
+ }
+
+ if (fInput != null){
+ IAction stAction= getAction(ISTTextEditorActionConstants.ST_TOGGLE);
+ menu.appendToGroup(ITextEditorActionConstants.GROUP_RULERS, stAction);
+ }
+
+
+
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public Object getAdapter(Class required) {
+ if (IColumnSupport.class.equals(required)) {
+ if (fColumnSupport == null)
+ fColumnSupport= createSTColumnSupport();
+ return fColumnSupport;
+ }
+
+ return super.getAdapter(required);
+ }
+
+ protected IColumnSupport createSTColumnSupport() {
+ return new STColumnSupport(this,RulerColumnRegistry.getDefault());
+ }
+
+ protected class STColumnSupport extends AbstractDecoratedTextEditor.ColumnSupport{
+ private final STAnnotatedCSourceEditor fEditor;
+ private final RulerColumnRegistry fRegistry;
+ private final ArrayList<ISTAnnotationColumn> fColumns;
+
+ public STColumnSupport(STAnnotatedCSourceEditor editor, RulerColumnRegistry registry) {
+ super(editor, registry);
+ fEditor = editor;
+ fRegistry = registry;
+ fColumns= new ArrayList<ISTAnnotationColumn>();
+ }
+
+ private int computeIndex(CompositeRuler ruler, RulerColumnDescriptor descriptor) {
+ int index= 0;
+ List<?> all= fRegistry.getColumnDescriptors();
+ int newPos= all.indexOf(descriptor);
+ for (Iterator<?> it= ruler.getDecoratorIterator(); it.hasNext();) {
+ IVerticalRulerColumn column= (IVerticalRulerColumn) it.next();
+ if (column instanceof IContributedRulerColumn) {
+ RulerColumnDescriptor rcd= ((IContributedRulerColumn)column).getDescriptor();
+ if (rcd != null && all.indexOf(rcd) > newPos)
+ break;
+ } else if ("org.eclipse.jface.text.source.projection.ProjectionRulerColumn".equals(column.getClass().getName())) { //$NON-NLS-1$
+ // projection column is always the rightmost column
+ break;
+ }
+ index++;
+ }
+ return index;
+ }
+
+ public void addSTColumn(final CompositeRuler ruler, final RulerColumnDescriptor descriptor,final ISTAnnotationColumn annotationColumn) {
+
+ final int idx= computeIndex(ruler, descriptor);
+
+ SafeRunnable runnable= new SafeRunnable() {
+ public void run() throws Exception {
+ IContributedRulerColumn column= descriptor.createColumn(fEditor);
+ fColumns.add(annotationColumn);
+ initializeColumn(column);
+ ruler.addDecorator(idx, column);
+ }
+ };
+ SafeRunner.run(runnable);
+ }
+
+ protected void initializeColumn(IContributedRulerColumn column) {
+ super.initializeColumn(column);
+ RulerColumnDescriptor descriptor= column.getDescriptor();
+ IVerticalRuler ruler= getVerticalRuler();
+ if (ruler instanceof CompositeRuler) {
+ if (AnnotationColumn.ID.equals(descriptor.getId())) {
+ ((AnnotationColumn)column).setDelegate(createAnnotationRulerColumn((CompositeRuler) ruler));
+ } else if (LineNumberColumn.ID.equals(descriptor.getId())) {
+ fLineColumn= ((LineNumberColumn) column);
+ fLineColumn.setForwarder(new LineNumberColumn.ICompatibilityForwarder() {
+ public IVerticalRulerColumn createLineNumberRulerColumn() {
+ return fEditor.createLineNumberRulerColumn();
+ }
+ public boolean isQuickDiffEnabled() {
+ return fEditor.isPrefQuickDiffAlwaysOn();
+ }
+ public boolean isLineNumberRulerVisible() {
+ return fEditor.isLineNumberRulerVisible();
+ }
+ });
+ }
+ if (STContributedRulerColumn.ID.equals(descriptor.getId())){
+ fColumn = ((STContributedRulerColumn) column);
+ //this is a workaround...
+ fColumn.setForwarder(new STContributedRulerColumn.ICompatibilityForwarder() {
+ public IVerticalRulerColumn createSTRulerColumn() {
+ if (fColumns != null && fColumns.size() > 0){
+ IVerticalRulerColumn fDelegate = fEditor.createSTRulerColumn(fColumns.get(fColumns.size()-1));
+ return fDelegate;
+ }
+ return null;
+ }
+ public boolean isQuickDiffEnabled() {
+ return fEditor.isPrefQuickDiffAlwaysOn();
+ }
+ public boolean isSTRulerVisible() {
+ return fEditor.isSTRulerVisible();
+ }
+ });
+ }
+ }
+ }
+ }
+
+ protected IVerticalRulerColumn createSTRulerColumn(ISTAnnotationColumn annotationColumn) {
+ fSTChangeRulerColumn= new STChangeRulerColumn(getSharedColors(),annotationColumn);
+ ((IChangeRulerColumn) fSTChangeRulerColumn).setHover(createChangeHover());
+ initializeLineNumberRulerColumn(fLineNumberRulerColumn);
+
+ return fSTChangeRulerColumn;
+ }
+
+ public void lineGetBackground(LineBackgroundEvent event) {
+ if (fInput != null){
+ StyledTextContent c = (StyledTextContent)event.data;
+ int line = c.getLineAtOffset(event.lineOffset);
+ event.lineBackground = fInput.getColor(line);
+ }
+ }
+
+ @Override
+ protected void doSetInput(IEditorInput input) throws CoreException {
+ super.doSetInput(input);
+
+ if (input!=null && input instanceof AbstractSTAnnotatedSourceEditorInput){
+ fInput = (AbstractSTAnnotatedSourceEditorInput)input;
+ fListColumns = fInput.getColumns();
+ }
+ }
+
+ @Override
+ protected void createActions() {
+ super.createActions();
+
+ ResourceAction action;
+
+ action= new ResourceAction(STTextEditorMessages.getBundleForConstructedKeys(), "Editor.ToggleSTColumnAction.", IAction.AS_CHECK_BOX) { //$NON-NLS-1$
+ @Override
+ public void run() {
+ toggleSTRuler();
+ }
+ };
+
+ if (fInput != null){
+ action.setActionDefinitionId(ISTTextEditorActionDefinitionIds.ST_TOGGLE);
+ setAction(ISTTextEditorActionConstants.ST_TOGGLE, action);
+ }
+ }
+
+ private void toggleSTRuler() {
+ // globally
+ IPreferenceStore store= EditorsUI.getPreferenceStore();
+ store.setValue(ST_RULER, !isSTRulerVisible());
+ }
+
+ protected boolean isSTRulerVisible() {
+ IPreferenceStore store= getPreferenceStore();
+ return store != null ? store.getBoolean(ST_RULER) : true;
+ }
+
+ private static class ToolTipSupport extends DefaultToolTip{
+ private STContributedRulerColumn control;
+ class ToolTipArea{
+ int line;
+ ISTAnnotationColumn ac;
+
+ ToolTipArea(int line,ISTAnnotationColumn ac){
+ this.line = line;
+ this.ac = ac;
+ }
+
+ public String getToolTip(){
+ return ac.getTooltip(line);
+ }
+
+ }
+
+ protected ToolTipSupport(STContributedRulerColumn control, int style,boolean manualActivation) {
+ super(control.getControl(), style, manualActivation);
+ this.control = control;
+ }
+
+ protected Object getToolTipArea(Event event) {
+
+ int line = control.toDocumentLineNumber(event.y);
+
+ return new ToolTipArea(line,control.getAnnotationColumn(line));
+ }
+
+ protected Composite createToolTipContentArea(Event event,
+ Composite parent) {
+ Composite comp = new Composite(parent, SWT.NONE);
+ comp.setLayout(new FillLayout());
+ Label b = new Label(comp,SWT.NONE);
+ ToolTipArea area = (ToolTipArea)getToolTipArea(event);
+ if (area != null && area.getToolTip().trim().length()>0){
+ b.setText(area.getToolTip());
+ }
+ return comp;
+ }
+
+ public static void enableFor(STContributedRulerColumn control) {
+ new ToolTipSupport(control, ToolTip.NO_RECREATE, false);
+ }
+ }
+
+ protected IOverviewRuler createOverviewRuler(ISharedTextColors sharedColors) {
+ IOverviewRuler ruler= new STOverviewRuler(getAnnotationAccess(), VERTICAL_RULER_WIDTH, sharedColors);
+ MarkerAnnotationPreferences fAnnotationPreferences = EditorsPlugin.getDefault().getMarkerAnnotationPreferences();
+ Iterator<?> e= fAnnotationPreferences.getAnnotationPreferences().iterator();
+ while (e.hasNext()) {
+ AnnotationPreference preference= (AnnotationPreference) e.next();
+ if (preference.contributesToHeader())
+ ruler.addHeaderAnnotationType(preference.getAnnotationType());
+ }
+ return ruler;
+
+ }
+
+ private void showLinesColored(){
+ STOverviewRuler or = (STOverviewRuler)getOverviewRuler();
+ AnnotationModel am = (AnnotationModel)or.getModel();
+ IDocument doc = getSourceViewer().getDocument();
+ int lines = doc.getNumberOfLines();
+
+ for(int i=0;i<lines;i++){
+ try {
+ Color color = fInput.getColor(i);
+ int r = color.getRed();
+ int g = color.getGreen();
+ int b = color.getBlue();
+ if (r !=255 || g != 255 || b!= 255){
+ int offset = doc.getLineOffset(i);
+ String type = STAnnotatedSourceEditorActivator.getUniqueIdentifier() + STAnnotatedSourceEditorActivator.getAnnotationType();
+ Annotation annotation = new Annotation(type,true,"");
+ or.setAnnotationColor(annotation, color);
+ am.addAnnotation(annotation,new Position(offset));
+ }
+ } catch (BadLocationException e) {
+ Status s =new Status(Status.ERROR,STAnnotatedSourceEditorActivator.PLUGIN_ID,Status.ERROR,e.getMessage(),e);
+ STAnnotatedSourceEditorActivator.getDefault().getLog().log(s);
+ }
+ }
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STAnnotatedSourceEditorActivator.java b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STAnnotatedSourceEditorActivator.java
new file mode 100644
index 0000000000..90cedbfa8c
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STAnnotatedSourceEditorActivator.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+
+**********************************************************************
+*********/
+package org.eclipse.linuxtools.dataviewers.annotatedsourceeditor;
+
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class STAnnotatedSourceEditorActivator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.dataviewers.annotatedsourceeditor";
+
+ private static final String ANNOTATION_TYPE = ".coloredLines";
+
+ // The shared instance
+ private static STAnnotatedSourceEditorActivator plugin;
+
+ /**
+ * The constructor
+ */
+ public STAnnotatedSourceEditorActivator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ EditorsUI.getPreferenceStore().setValue("STRuler",true);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static STAnnotatedSourceEditorActivator getDefault() {
+ return plugin;
+ }
+
+ public static String getAnnotationType()
+ {
+ return ANNOTATION_TYPE;
+ }
+
+ public static String getUniqueIdentifier()
+ {
+ return PLUGIN_ID;
+ }
+
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STChangeRulerColumn.java b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STChangeRulerColumn.java
new file mode 100644
index 0000000000..fa2e0571a3
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STChangeRulerColumn.java
@@ -0,0 +1,390 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.annotatedsourceeditor;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.internal.text.revisions.RevisionPainter;
+import org.eclipse.jface.internal.text.source.DiffPainter;
+import org.eclipse.jface.text.revisions.IRevisionListener;
+import org.eclipse.jface.text.revisions.IRevisionRulerColumn;
+import org.eclipse.jface.text.revisions.IRevisionRulerColumnExtension;
+import org.eclipse.jface.text.revisions.RevisionInformation;
+import org.eclipse.jface.text.source.CompositeRuler;
+import org.eclipse.jface.text.source.IAnnotationHover;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.IChangeRulerColumn;
+import org.eclipse.jface.text.source.ILineRange;
+import org.eclipse.jface.text.source.ISharedTextColors;
+import org.eclipse.jface.text.source.IVerticalRulerInfo;
+import org.eclipse.jface.text.source.IVerticalRulerInfoExtension;
+import org.eclipse.jface.text.source.IVerticalRulerListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * A vertical ruler column displaying line numbers and serving as a UI for quick diff.
+ * Clients usually instantiate and configure object of this class.
+ *
+ * @since 3.0
+ */
+public final class STChangeRulerColumn extends STRulerColumn implements IVerticalRulerInfo, IVerticalRulerInfoExtension, IChangeRulerColumn, IRevisionRulerColumn, IRevisionRulerColumnExtension {
+ /** The ruler's annotation model. */
+ private IAnnotationModel fAnnotationModel;
+ /** <code>true</code> if changes should be displayed using character indications instead of background colors. */
+ private boolean fCharacterDisplay;
+ /**
+ * The revision painter strategy.
+ *
+ * @since 3.2
+ */
+ private final RevisionPainter fRevisionPainter;
+ /**
+ * The diff information painter strategy.
+ *
+ * @since 3.2
+ */
+ private final DiffPainter fDiffPainter;
+ /**
+ * Whether to show number or to behave like a change ruler column.
+ * @since 3.3
+ */
+ private boolean fShowSTRuler= true;
+
+ /**
+ * Creates a new instance.
+ *
+ * @param sharedColors the shared colors provider to use
+ */
+ public STChangeRulerColumn(ISharedTextColors sharedColors,ISTAnnotationColumn ac) {
+ super(ac);
+ Assert.isNotNull(sharedColors);
+ fRevisionPainter= new RevisionPainter(this, sharedColors);
+ fDiffPainter= new DiffPainter(this, sharedColors);
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.LineNumberRulerColumn#createControl(org.eclipse.jface.text.source.CompositeRuler, org.eclipse.swt.widgets.Composite)
+ */
+ public Control createControl(CompositeRuler parentRuler, Composite parentControl) {
+ Control control= super.createControl(parentRuler, parentControl);
+ fRevisionPainter.setParentRuler(parentRuler);
+ fDiffPainter.setParentRuler(parentRuler);
+ return control;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IVerticalRulerInfo#getLineOfLastMouseButtonActivity()
+ */
+ public int getLineOfLastMouseButtonActivity() {
+ return getParentRuler().getLineOfLastMouseButtonActivity();
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IVerticalRulerInfo#toDocumentLineNumber(int)
+ */
+ public int toDocumentLineNumber(int y_coordinate) {
+ return getParentRuler().toDocumentLineNumber(y_coordinate);
+ }
+
+ /*
+ * @see IVerticalRulerColumn#setModel(IAnnotationModel)
+ */
+ public void setModel(IAnnotationModel model) {
+ setAnnotationModel(model);
+ fRevisionPainter.setModel(model);
+ fDiffPainter.setModel(model);
+ updateNumberOfDigits();
+ computeIndentations();
+ layout(true);
+ postRedraw();
+ }
+
+ private void setAnnotationModel(IAnnotationModel model) {
+ if (fAnnotationModel != model)
+ fAnnotationModel= model;
+ }
+
+
+ /**
+ * Sets the display mode of the ruler. If character mode is set to <code>true</code>, diff
+ * information will be displayed textually on the line number ruler.
+ *
+ * @param characterMode <code>true</code> if diff information is to be displayed textually.
+ */
+ public void setDisplayMode(boolean characterMode) {
+ if (characterMode != fCharacterDisplay) {
+ fCharacterDisplay= characterMode;
+ updateNumberOfDigits();
+ computeIndentations();
+ layout(true);
+ }
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IVerticalRulerInfoExtension#getModel()
+ */
+ public IAnnotationModel getModel() {
+ return fAnnotationModel;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.LineNumberRulerColumn#createDisplayString(int)
+ */
+ protected String createDisplayString(int line) {
+ StringBuffer buffer= new StringBuffer();
+ if (fShowSTRuler)
+ buffer.append(super.createDisplayString(line));
+ if (fCharacterDisplay && getModel() != null)
+ buffer.append(fDiffPainter.getDisplayCharacter(line));
+ return buffer.toString();
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.LineNumberRulerColumn#computeNumberOfDigits()
+ */
+ protected int computeNumberOfDigits() {
+ int digits;
+ if (fCharacterDisplay && getModel() != null) {
+ if (fShowSTRuler)
+ digits= super.computeNumberOfDigits() + 1;
+ else
+ digits= 1;
+ } else {
+ if (fShowSTRuler)
+ digits= super.computeNumberOfDigits();
+ else
+ digits= 0;
+ }
+ if (fRevisionPainter.hasInformation())
+ digits+= fRevisionPainter.getRequiredWidth();
+ return digits;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IVerticalRulerInfoExtension#addVerticalRulerListener(org.eclipse.jface.text.source.IVerticalRulerListener)
+ */
+ public void addVerticalRulerListener(IVerticalRulerListener listener) {
+ throw new UnsupportedOperationException();
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IVerticalRulerInfoExtension#removeVerticalRulerListener(org.eclipse.jface.text.source.IVerticalRulerListener)
+ */
+ public void removeVerticalRulerListener(IVerticalRulerListener listener) {
+ throw new UnsupportedOperationException();
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.LineNumberRulerColumn#doPaint(org.eclipse.swt.graphics.GC)
+ */
+ void doPaint(GC gc, ILineRange visibleLines) {
+ Color foreground= gc.getForeground();
+ if (visibleLines != null) {
+ if (fRevisionPainter.hasInformation())
+ fRevisionPainter.paint(gc, visibleLines);
+ else if (fDiffPainter.hasInformation()) // don't paint quick diff colors if revisions are painted
+ fDiffPainter.paint(gc, visibleLines);
+ }
+ gc.setForeground(foreground);
+ if (fShowSTRuler || fCharacterDisplay)
+ super.doPaint(gc, visibleLines);
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IVerticalRulerInfoExtension#getHover()
+ */
+ public IAnnotationHover getHover() {
+ int activeLine= getParentRuler().getLineOfLastMouseButtonActivity();
+ if (fRevisionPainter.hasHover(activeLine))
+ return fRevisionPainter.getHover();
+ if (fDiffPainter.hasHover(activeLine))
+ return fDiffPainter.getHover();
+ return null;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IChangeRulerColumn#setHover(org.eclipse.jface.text.source.IAnnotationHover)
+ */
+ public void setHover(IAnnotationHover hover) {
+ fRevisionPainter.setHover(hover);
+ fDiffPainter.setHover(hover);
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IChangeRulerColumn#setBackground(org.eclipse.swt.graphics.Color)
+ */
+ public void setBackground(Color background) {
+ super.setBackground(background);
+ fRevisionPainter.setBackground(background);
+ fDiffPainter.setBackground(background);
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IChangeRulerColumn#setAddedColor(org.eclipse.swt.graphics.Color)
+ */
+ public void setAddedColor(Color addedColor) {
+ fDiffPainter.setAddedColor(addedColor);
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IChangeRulerColumn#setChangedColor(org.eclipse.swt.graphics.Color)
+ */
+ public void setChangedColor(Color changedColor) {
+ fDiffPainter.setChangedColor(changedColor);
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IChangeRulerColumn#setDeletedColor(org.eclipse.swt.graphics.Color)
+ */
+ public void setDeletedColor(Color deletedColor) {
+ fDiffPainter.setDeletedColor(deletedColor);
+ }
+
+ /*
+ * @see org.eclipse.jface.text.revisions.IRevisionRulerColumn#setRevisionInformation(org.eclipse.jface.text.revisions.RevisionInformation)
+ */
+ public void setRevisionInformation(RevisionInformation info) {
+ fRevisionPainter.setRevisionInformation(info);
+ updateNumberOfDigits();
+ computeIndentations();
+ layout(true);
+ postRedraw();
+ }
+
+ /*
+ * @see org.eclipse.jface.text.revisions.IRevisionRulerColumnExtension#getRevisionSelectionProvider()
+ * @since 3.2
+ */
+ public ISelectionProvider getRevisionSelectionProvider() {
+ return fRevisionPainter.getRevisionSelectionProvider();
+ }
+
+ /*
+ * @see org.eclipse.jface.text.revisions.IRevisionRulerColumnExtension#setRenderingMode(org.eclipse.jface.text.revisions.IRevisionRulerColumnExtension.RenderingMode)
+ * @since 3.3
+ */
+ public void setRevisionRenderingMode(RenderingMode renderingMode) {
+ fRevisionPainter.setRenderingMode(renderingMode);
+ }
+
+ /**
+ * Sets the line number display mode.
+ *
+ * @param showNumbers <code>true</code> to show numbers, <code>false</code> to only show
+ * diff / revision info.
+ * @since 3.3
+ */
+ public void showLineNumbers(boolean showNumbers) {
+ if (fShowSTRuler != showNumbers) {
+ fShowSTRuler= showNumbers;
+ updateNumberOfDigits();
+ computeIndentations();
+ layout(true);
+ }
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.LineNumberRulerColumn#getWidth()
+ * @since 3.3
+ */
+ public int getWidth() {
+ int width= super.getWidth();
+ return width > 0 ? width : 8; // minimal width to display quick diff / revisions if no textual info is shown
+ }
+
+ /**
+ * Returns <code>true</code> if the ruler is showing line numbers, <code>false</code>
+ * otherwise
+ *
+ * @return <code>true</code> if line numbers are shown, <code>false</code> otherwise
+ * @since 3.3
+ */
+ public boolean isShowingSTRuler() {
+ return fShowSTRuler;
+ }
+
+ /**
+ * Returns <code>true</code> if the ruler is showing revision information, <code>false</code>
+ * otherwise
+ *
+ * @return <code>true</code> if revision information is shown, <code>false</code> otherwise
+ * @since 3.3
+ */
+ public boolean isShowingRevisionInformation() {
+ return fRevisionPainter.hasInformation();
+ }
+
+ /**
+ * Returns <code>true</code> if the ruler is showing change information, <code>false</code>
+ * otherwise
+ *
+ * @return <code>true</code> if change information is shown, <code>false</code> otherwise
+ * @since 3.3
+ */
+ public boolean isShowingChangeInformation() {
+ return fDiffPainter.hasInformation();
+ }
+
+ /*
+ * @see org.eclipse.jface.text.revisions.IRevisionRulerColumnExtension#showRevisionAuthor(boolean)
+ * @since 3.3
+ */
+ public void showRevisionAuthor(boolean show) {
+ fRevisionPainter.showRevisionAuthor(show);
+ updateNumberOfDigits();
+ computeIndentations();
+ layout(true);
+ postRedraw();
+ }
+
+ /*
+ * @see org.eclipse.jface.text.revisions.IRevisionRulerColumnExtension#showRevisionId(boolean)
+ * @since 3.3
+ */
+ public void showRevisionId(boolean show) {
+ fRevisionPainter.showRevisionId(show);
+ updateNumberOfDigits();
+ computeIndentations();
+ layout(true);
+ postRedraw();
+ }
+
+ /*
+ * @see org.eclipse.jface.text.revisions.IRevisionRulerColumnExtension#addRevisionListener(org.eclipse.jface.text.revisions.IRevisionListener)
+ * @since 3.3
+ */
+ public void addRevisionListener(IRevisionListener listener) {
+ fRevisionPainter.addRevisionListener(listener);
+ }
+
+ /*
+ * @see org.eclipse.jface.text.revisions.IRevisionRulerColumnExtension#removeRevisionListener(org.eclipse.jface.text.revisions.IRevisionListener)
+ * @since 3.3
+ */
+ public void removeRevisionListener(IRevisionListener listener) {
+ fRevisionPainter.removeRevisionListener(listener);
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.LineNumberRulerColumn#handleDispose()
+ * @since 3.3
+ */
+ protected void handleDispose() {
+ fRevisionPainter.setParentRuler(null);
+ fRevisionPainter.setModel(null);
+ fDiffPainter.setParentRuler(null);
+ fDiffPainter.setModel(null);
+ super.handleDispose();
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STConstructedTextEditorMessages.properties b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STConstructedTextEditorMessages.properties
new file mode 100644
index 0000000000..0c9d76cd67
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STConstructedTextEditorMessages.properties
@@ -0,0 +1,4 @@
+Editor.ToggleSTColumnAction.label=Show Annotation &Columns
+Editor.ToggleSTColumnAction.description=Show Annotation Columns
+Editor.STColumnAction.tooltip=Display the Annotation Column Ruler
+Editor.STColumnAction.image=
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STContributedRulerColumn.java b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STContributedRulerColumn.java
new file mode 100644
index 0000000000..0836fd7613
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STContributedRulerColumn.java
@@ -0,0 +1,798 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.annotatedsourceeditor;
+
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.revisions.IRevisionRulerColumn;
+import org.eclipse.jface.text.revisions.IRevisionRulerColumnExtension;
+import org.eclipse.jface.text.revisions.RevisionInformation;
+import org.eclipse.jface.text.revisions.IRevisionRulerColumnExtension.RenderingMode;
+import org.eclipse.jface.text.source.AnnotationModel;
+import org.eclipse.jface.text.source.CompositeRuler;
+import org.eclipse.jface.text.source.IAnnotationHover;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.IAnnotationModelExtension;
+import org.eclipse.jface.text.source.IChangeRulerColumn;
+import org.eclipse.jface.text.source.ILineDifferExtension;
+import org.eclipse.jface.text.source.ILineDifferExtension2;
+import org.eclipse.jface.text.source.ISharedTextColors;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.IVerticalRulerColumn;
+import org.eclipse.jface.text.source.IVerticalRulerInfo;
+import org.eclipse.jface.text.source.IVerticalRulerInfoExtension;
+import org.eclipse.jface.text.source.IVerticalRulerListener;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.window.Window;
+import org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.preferencespages.STAnnotatedSourceEditorPreferencePage;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.internal.editors.text.EditorsPlugin;
+import org.eclipse.ui.internal.texteditor.PropertyEventDispatcher;
+import org.eclipse.ui.texteditor.AbstractDecoratedTextEditor;
+import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
+import org.eclipse.ui.texteditor.AbstractTextEditor;
+import org.eclipse.ui.texteditor.AnnotationPreference;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.texteditor.ITextEditorExtension;
+import org.eclipse.ui.texteditor.ITextEditorExtension2;
+import org.eclipse.ui.texteditor.MarkerAnnotationPreferences;
+import org.eclipse.ui.texteditor.quickdiff.QuickDiff;
+import org.eclipse.ui.texteditor.rulers.AbstractContributedRulerColumn;
+
+
+public class STContributedRulerColumn extends AbstractContributedRulerColumn implements IVerticalRulerInfo, IVerticalRulerInfoExtension {
+ /**
+ * Forwarder for preference checks and ruler creation. Needed to maintain the forwarded APIs in
+ * {@link AbstractDecoratedTextEditor}.
+ */
+ public static interface ICompatibilityForwarder {
+ IVerticalRulerColumn createSTRulerColumn();
+ boolean isQuickDiffEnabled();
+ boolean isSTRulerVisible();
+ }
+
+ public static final String ID= "org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.column"; //$NON-NLS-1$
+
+ private static final String FG_COLOR_KEY= AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR;
+ private static final String BG_COLOR_KEY= AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND;
+ private static final String USE_DEFAULT_BG_KEY= AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT;
+ private final static String ST_KEY= STAnnotatedSourceEditorPreferencePage.EDITOR_ST_RULER;
+ private final static String REVISION_ASK_BEFORE_QUICKDIFF_SWITCH_KEY= AbstractDecoratedTextEditorPreferenceConstants.REVISION_ASK_BEFORE_QUICKDIFF_SWITCH;
+
+ private IVerticalRulerColumn fDelegate;
+ /**
+ * The annotation preferences.
+ */
+ private final MarkerAnnotationPreferences fAnnotationPreferences= EditorsPlugin.getDefault().getMarkerAnnotationPreferences();
+
+ /**
+ * Preference dispatcher that registers a single listener so we don't have to manage every
+ * single preference listener.
+ */
+ private PropertyEventDispatcher fDispatcher;
+ private ISourceViewer fViewer;
+ private ICompatibilityForwarder fForwarder;
+
+
+ private Label labelColumn;
+
+ /*
+ * @see org.eclipse.jface.text.source.IVerticalRulerColumn#createControl(org.eclipse.jface.text.source.CompositeRuler, org.eclipse.swt.widgets.Composite)
+ */
+ public Control createControl(CompositeRuler parentRuler, Composite parentControl) {
+ Assert.isTrue(fDelegate != null);
+ ITextViewer viewer= parentRuler.getTextViewer();
+ Assert.isLegal(viewer instanceof ISourceViewer);
+ fViewer= (ISourceViewer) viewer;
+ initialize();
+ Control control= fDelegate.createControl(parentRuler, parentControl);
+ return control;
+ }
+
+ public void setLabelColumn(Label label){
+ labelColumn = label;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IVerticalRulerColumn#getControl()
+ */
+ public Control getControl() {
+ return fDelegate.getControl();
+ }
+
+ public ISTAnnotationColumn getAnnotationColumn(int line){
+ if (fDelegate instanceof STChangeRulerColumn){
+ return ((STChangeRulerColumn)fDelegate).getSTAnnotationColumn();
+ }
+ return null;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IVerticalRulerColumn#getWidth()
+ */
+ public int getWidth() {
+ return fDelegate.getWidth();
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IVerticalRulerColumn#redraw()
+ */
+ public void redraw() {
+ fDelegate.redraw();
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IVerticalRulerColumn#setFont(org.eclipse.swt.graphics.Font)
+ */
+ public void setFont(Font font) {
+ fDelegate.setFont(font);
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IVerticalRulerColumn#setModel(org.eclipse.jface.text.source.IAnnotationModel)
+ */
+ public void setModel(IAnnotationModel model) {
+ if (getQuickDiffPreference())
+ fDelegate.setModel(model);
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IVerticalRulerInfo#getLineOfLastMouseButtonActivity()
+ */
+ public int getLineOfLastMouseButtonActivity() {
+ if (fDelegate instanceof IVerticalRulerInfo)
+ ((IVerticalRulerInfo) fDelegate).getLineOfLastMouseButtonActivity();
+ return -1;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IVerticalRulerInfo#toDocumentLineNumber(int)
+ */
+ public int toDocumentLineNumber(int y_coordinate) {
+ if (fDelegate instanceof IVerticalRulerInfo)
+ return ((IVerticalRulerInfo) fDelegate).toDocumentLineNumber(y_coordinate);
+ return -1;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IVerticalRulerInfoExtension#addVerticalRulerListener(org.eclipse.jface.text.source.IVerticalRulerListener)
+ */
+ public void addVerticalRulerListener(IVerticalRulerListener listener) {
+ if (fDelegate instanceof IVerticalRulerInfoExtension)
+ ((IVerticalRulerInfoExtension) fDelegate).addVerticalRulerListener(listener);
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IVerticalRulerInfoExtension#getHover()
+ */
+ public IAnnotationHover getHover() {
+ if (fDelegate instanceof IVerticalRulerInfoExtension)
+ return ((IVerticalRulerInfoExtension) fDelegate).getHover();
+ return null;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IVerticalRulerInfoExtension#getModel()
+ */
+ public IAnnotationModel getModel() {
+ if (fDelegate instanceof IVerticalRulerInfoExtension)
+ return ((IVerticalRulerInfoExtension) fDelegate).getModel();
+ return null;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IVerticalRulerInfoExtension#removeVerticalRulerListener(org.eclipse.jface.text.source.IVerticalRulerListener)
+ */
+ public void removeVerticalRulerListener(IVerticalRulerListener listener) {
+ if (fDelegate instanceof IVerticalRulerInfoExtension)
+ ((IVerticalRulerInfoExtension) fDelegate).removeVerticalRulerListener(listener);
+ }
+
+ /*
+ * @see org.eclipse.ui.texteditor.rulers.AbstractContributedRulerColumn#columnRemoved()
+ */
+ public void columnRemoved() {
+ if (fDispatcher != null) {
+ fDispatcher.dispose();
+ fDispatcher= null;
+ }
+ }
+
+ private IPreferenceStore getPreferenceStore() {
+ return EditorsUI.getPreferenceStore();
+ }
+
+ private ISharedTextColors getSharedColors() {
+ return EditorsUI.getSharedTextColors();
+ }
+
+ /**
+ * Initializes the given line number ruler column from the preference store.
+ */
+ private void initialize() {
+ final IPreferenceStore store= getPreferenceStore();
+ if (store == null)
+ return;
+
+ // initial set up
+ updateForegroundColor(store, fDelegate);
+ updateBackgroundColor(store, fDelegate);
+
+ updateLineNumbersVisibility(fDelegate);
+ updateQuickDiffVisibility(fDelegate);
+ updateCharacterMode(store, fDelegate);
+ updateRevisionRenderingMode(store, fDelegate);
+ updateRevisionAuthorVisibility(store, fDelegate);
+ updateRevisionIdVisibility(store, fDelegate);
+
+ Map<Object, AnnotationPreference> annotationPrefs= getAnnotationPreferenceMap();
+ final AnnotationPreference changedPref= annotationPrefs.get("org.eclipse.ui.workbench.texteditor.quickdiffChange"); //$NON-NLS-1$
+ final AnnotationPreference addedPref= annotationPrefs.get("org.eclipse.ui.workbench.texteditor.quickdiffAddition"); //$NON-NLS-1$
+ final AnnotationPreference deletedPref= annotationPrefs.get("org.eclipse.ui.workbench.texteditor.quickdiffDeletion"); //$NON-NLS-1$
+ updateChangedColor(changedPref, store, fDelegate);
+ updateAddedColor(addedPref, store, fDelegate);
+ updateDeletedColor(deletedPref, store, fDelegate);
+
+ if (fDelegate != null)
+ fDelegate.redraw();
+
+ // listen to changes
+ fDispatcher= new PropertyEventDispatcher(store);
+
+ fDispatcher.addPropertyChangeListener(FG_COLOR_KEY, new IPropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent event) {
+ updateForegroundColor(store, fDelegate);
+ fDelegate.redraw();
+ }
+ });
+ IPropertyChangeListener backgroundHandler= new IPropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent event) {
+ updateBackgroundColor(store, fDelegate);
+ fDelegate.redraw();
+ }
+ };
+ fDispatcher.addPropertyChangeListener(BG_COLOR_KEY, backgroundHandler);
+ fDispatcher.addPropertyChangeListener(USE_DEFAULT_BG_KEY, backgroundHandler);
+
+ fDispatcher.addPropertyChangeListener(ST_KEY, new IPropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent event) {
+ // only handle quick diff on/off information, but not ruler visibility (handled by AbstractDecoratedTextEditor)
+
+ updateLineNumbersVisibility(fDelegate);
+ }
+ });
+
+ fDispatcher.addPropertyChangeListener(AbstractDecoratedTextEditorPreferenceConstants.QUICK_DIFF_CHARACTER_MODE, new IPropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent event) {
+ updateCharacterMode(store, fDelegate);
+ }
+ });
+
+ fDispatcher.addPropertyChangeListener(AbstractDecoratedTextEditorPreferenceConstants.REVISION_RULER_RENDERING_MODE, new IPropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent event) {
+ updateRevisionRenderingMode(store, fDelegate);
+ }
+ });
+
+ fDispatcher.addPropertyChangeListener(AbstractDecoratedTextEditorPreferenceConstants.REVISION_RULER_SHOW_AUTHOR, new IPropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent event) {
+ updateRevisionAuthorVisibility(store, fDelegate);
+ }
+ });
+
+ fDispatcher.addPropertyChangeListener(AbstractDecoratedTextEditorPreferenceConstants.REVISION_RULER_SHOW_REVISION, new IPropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent event) {
+ updateRevisionIdVisibility(store, fDelegate);
+ }
+ });
+
+ fDispatcher.addPropertyChangeListener(AbstractDecoratedTextEditorPreferenceConstants.QUICK_DIFF_ALWAYS_ON, new IPropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent event) {
+ updateQuickDiffVisibility(fDelegate);
+ }
+ });
+
+ if (changedPref != null) {
+ fDispatcher.addPropertyChangeListener(changedPref.getColorPreferenceKey(), new IPropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent event) {
+ updateChangedColor(changedPref, store, fDelegate);
+ fDelegate.redraw();
+ }
+ });
+ }
+ if (addedPref != null) {
+ fDispatcher.addPropertyChangeListener(addedPref.getColorPreferenceKey(), new IPropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent event) {
+ updateAddedColor(addedPref, store, fDelegate);
+ fDelegate.redraw();
+ }
+ });
+ }
+ if (deletedPref != null) {
+ fDispatcher.addPropertyChangeListener(deletedPref.getColorPreferenceKey(), new IPropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent event) {
+ updateDeletedColor(deletedPref, store, fDelegate);
+ fDelegate.redraw();
+ }
+ });
+ }
+ }
+
+ private Map<Object, AnnotationPreference> getAnnotationPreferenceMap() {
+ Map<Object, AnnotationPreference> annotationPrefs= new HashMap<Object, AnnotationPreference>();
+ Iterator<?> iter= fAnnotationPreferences.getAnnotationPreferences().iterator();
+ while (iter.hasNext()) {
+ AnnotationPreference pref= (AnnotationPreference) iter.next();
+ Object type= pref.getAnnotationType();
+ annotationPrefs.put(type, pref);
+ }
+ return annotationPrefs;
+ }
+
+ private void updateForegroundColor(IPreferenceStore store, IVerticalRulerColumn column) {
+ RGB rgb= getColorFromStore(store, FG_COLOR_KEY);
+ if (rgb == null)
+ rgb= new RGB(0, 0, 0);
+ ISharedTextColors sharedColors= getSharedColors();
+ if (column instanceof STRulerColumn)
+ ((STRulerColumn) column).setForeground(sharedColors.getColor(rgb));
+ }
+
+ private void updateBackgroundColor(IPreferenceStore store, IVerticalRulerColumn column) {
+ // background color: same as editor, or system default
+ RGB rgb;
+ if (store.getBoolean(USE_DEFAULT_BG_KEY))
+ rgb= null;
+ else
+ rgb= getColorFromStore(store, BG_COLOR_KEY);
+ ISharedTextColors sharedColors= getSharedColors();
+ if (column instanceof STRulerColumn)
+ ((STRulerColumn) column).setBackground(sharedColors.getColor(rgb));
+ }
+
+ private void updateChangedColor(AnnotationPreference pref, IPreferenceStore store, IVerticalRulerColumn column) {
+ if (pref != null && column instanceof IChangeRulerColumn) {
+ RGB rgb= getColorFromAnnotationPreference(store, pref);
+ ((IChangeRulerColumn) column).setChangedColor(getSharedColors().getColor(rgb));
+ }
+ }
+
+ private void updateAddedColor(AnnotationPreference pref, IPreferenceStore store, IVerticalRulerColumn column) {
+ if (pref != null && column instanceof IChangeRulerColumn) {
+ RGB rgb= getColorFromAnnotationPreference(store, pref);
+ ((IChangeRulerColumn) column).setAddedColor(getSharedColors().getColor(rgb));
+ }
+ }
+
+ private void updateDeletedColor(AnnotationPreference pref, IPreferenceStore store, IVerticalRulerColumn column) {
+ if (pref != null && column instanceof IChangeRulerColumn) {
+ RGB rgb= getColorFromAnnotationPreference(store, pref);
+ ((IChangeRulerColumn) column).setDeletedColor(getSharedColors().getColor(rgb));
+ }
+ }
+
+ private void updateCharacterMode(IPreferenceStore store, IVerticalRulerColumn column) {
+ if (column instanceof STChangeRulerColumn) {
+ STChangeRulerColumn lncrc= (STChangeRulerColumn) column;
+ lncrc.setDisplayMode(store.getBoolean(AbstractDecoratedTextEditorPreferenceConstants.QUICK_DIFF_CHARACTER_MODE));
+ }
+ }
+
+ private void updateLineNumbersVisibility(IVerticalRulerColumn column) {
+ if (column instanceof STChangeRulerColumn){
+ if (labelColumn != null){
+ labelColumn.setVisible(getLineNumberPreference());
+ Label labelName = (Label)labelColumn.getParent().getChildren()[labelColumn.getParent().getChildren().length-2];
+ labelName.setVisible(labelColumn.isVisible());
+
+ }
+ ((STChangeRulerColumn) column).showLineNumbers(getLineNumberPreference());
+ }
+ }
+
+ private void updateRevisionRenderingMode(IPreferenceStore store, IVerticalRulerColumn column) {
+ if (column instanceof IRevisionRulerColumnExtension) {
+ String option= store.getString(AbstractDecoratedTextEditorPreferenceConstants.REVISION_RULER_RENDERING_MODE);
+ RenderingMode[] modes= { IRevisionRulerColumnExtension.AUTHOR, IRevisionRulerColumnExtension.AGE, IRevisionRulerColumnExtension.AUTHOR_SHADED_BY_AGE };
+ for (int i= 0; i < modes.length; i++) {
+ if (modes[i].name().equals(option)) {
+ ((IRevisionRulerColumnExtension) column).setRevisionRenderingMode(modes[i]);
+ return;
+ }
+ }
+ }
+ }
+
+ private void updateRevisionAuthorVisibility(IPreferenceStore store, IVerticalRulerColumn column) {
+ if (column instanceof IRevisionRulerColumnExtension) {
+ boolean show= store.getBoolean(AbstractDecoratedTextEditorPreferenceConstants.REVISION_RULER_SHOW_AUTHOR);
+ ((IRevisionRulerColumnExtension) column).showRevisionAuthor(show);
+ }
+ }
+
+ private void updateRevisionIdVisibility(IPreferenceStore store, IVerticalRulerColumn column) {
+ if (column instanceof IRevisionRulerColumnExtension) {
+ boolean show= store.getBoolean(AbstractDecoratedTextEditorPreferenceConstants.REVISION_RULER_SHOW_REVISION);
+ ((IRevisionRulerColumnExtension) column).showRevisionId(show);
+ }
+ }
+
+ private void updateQuickDiffVisibility(IVerticalRulerColumn column) {
+ boolean show= getQuickDiffPreference();
+ if (show == isShowingChangeInformation())
+ return;
+
+ if (show)
+ installChangeRulerModel(column);
+ else
+ uninstallChangeRulerModel(column);
+ }
+
+ /**
+ * Returns whether the line number ruler column should be
+ * visible according to the preference store settings. Subclasses may override this
+ * method to provide a custom preference setting.
+ *
+ * @return <code>true</code> if the line numbers should be visible
+ */
+ private boolean getLineNumberPreference() {
+ if (fForwarder != null)
+ return fForwarder.isSTRulerVisible();
+ IPreferenceStore store= getPreferenceStore();
+ return store != null ? store.getBoolean(ST_KEY) : false;
+ }
+
+ /**
+ * Returns whether quick diff info should be visible upon opening an editor
+ * according to the preference store settings.
+ *
+ * @return <code>true</code> if the line numbers should be visible
+ */
+ private boolean getQuickDiffPreference() {
+ if (fForwarder != null)
+ return fForwarder.isQuickDiffEnabled();
+ IPreferenceStore store= getPreferenceStore();
+ boolean setting= store != null ? store.getBoolean(AbstractDecoratedTextEditorPreferenceConstants.QUICK_DIFF_ALWAYS_ON) : false;
+ if (!setting)
+ return false;
+
+ boolean modifiable;
+ ITextEditor editor= getEditor();
+ if (editor instanceof ITextEditorExtension2) {
+ ITextEditorExtension2 ext= (ITextEditorExtension2) editor;
+ modifiable= ext.isEditorInputModifiable();
+ } else if (editor instanceof ITextEditorExtension) {
+ ITextEditorExtension ext= (ITextEditorExtension) editor;
+ modifiable= ext.isEditorInputReadOnly();
+ } else if (editor != null) {
+ modifiable= editor.isEditable();
+ } else {
+ modifiable= true;
+ }
+ return modifiable;
+ }
+
+ /**
+ * Extracts the color preference for the given preference from the given store.
+ * If the given store indicates that the default value is to be used, or
+ * the value stored in the preferences store is <code>null</code>,
+ * the value is taken from the <code>AnnotationPreference</code>'s default
+ * color value.
+ * <p>
+ * The return value is
+ * </p>
+ *
+ * @param store the preference store
+ * @param pref the annotation preference
+ * @return the RGB color preference, not <code>null</code>
+ */
+ private static RGB getColorFromAnnotationPreference(IPreferenceStore store, AnnotationPreference pref) {
+ String key= pref.getColorPreferenceKey();
+ RGB rgb= null;
+ if (store.contains(key)) {
+ if (store.isDefault(key))
+ rgb= pref.getColorPreferenceValue();
+ else
+ rgb= PreferenceConverter.getColor(store, key);
+ }
+ if (rgb == null)
+ rgb= pref.getColorPreferenceValue();
+ return rgb;
+ }
+
+ private static RGB getColorFromStore(IPreferenceStore store, String key) {
+ RGB rgb= null;
+ if (store.contains(key)) {
+ if (store.isDefault(key))
+ rgb= PreferenceConverter.getDefaultColor(store, key);
+ else
+ rgb= PreferenceConverter.getColor(store, key);
+ }
+ return rgb;
+ }
+
+ /**
+ * Ensures that quick diff information is displayed and the quick diff provider is the one with
+ * the specified id. If a different quick diff provider is in use, the user may be asked whether
+ * he wants to switch.
+ *
+ * @param diffProviderId the quick diff provider id to use
+ * @return <code>true</code> if quick diff could be enabled for the given id,
+ * <code>false</code> otherwise
+ */
+ private boolean ensureQuickDiffProvider(String diffProviderId) {
+ if (!isShowingChangeInformation())
+ installChangeRulerModel(fDelegate); // FIXME pass provider id
+
+ IAnnotationModel annotationModel= fViewer.getAnnotationModel();
+ IAnnotationModel oldDiffer= getDiffer();
+ if (oldDiffer == null && annotationModel != null)
+ return false; // quick diff is enabled, but no differ? not working for whatever reason
+
+ if (annotationModel == null)
+ annotationModel= new AnnotationModel();
+ if (!(annotationModel instanceof IAnnotationModelExtension))
+ return false;
+
+ QuickDiff util= new QuickDiff();
+ Object oldDifferId= util.getConfiguredQuickDiffProvider(oldDiffer);
+ if (oldDifferId.equals(diffProviderId)) {
+ if (oldDiffer instanceof ILineDifferExtension)
+ ((ILineDifferExtension) oldDiffer).resume();
+ return true;
+ }
+
+ // Check whether the desired provider is available at all
+ IAnnotationModel newDiffer= util.createQuickDiffAnnotationModel(getEditor(), diffProviderId);
+ if (util.getConfiguredQuickDiffProvider(newDiffer).equals(oldDifferId)) {
+ if (oldDiffer instanceof ILineDifferExtension)
+ ((ILineDifferExtension) oldDiffer).resume();
+ return true;
+ }
+
+ // quick diff is showing with the wrong provider - ask the user whether he wants to switch
+ IPreferenceStore store= EditorsUI.getPreferenceStore();
+ if (oldDiffer != null && !store.getString(REVISION_ASK_BEFORE_QUICKDIFF_SWITCH_KEY).equals(MessageDialogWithToggle.ALWAYS)) {
+ MessageDialogWithToggle toggleDialog= MessageDialogWithToggle.openOkCancelConfirm(
+ fViewer.getTextWidget().getShell(),
+ STRulerMessages.AbstractDecoratedTextEditor_revision_quickdiff_switch_title,
+ STRulerMessages.AbstractDecoratedTextEditor_revision_quickdiff_switch_message,
+ STRulerMessages.AbstractDecoratedTextEditor_revision_quickdiff_switch_rememberquestion,
+ true,
+ store,
+ REVISION_ASK_BEFORE_QUICKDIFF_SWITCH_KEY);
+ if (toggleDialog.getReturnCode() != Window.OK)
+ return false;
+ }
+
+ IAnnotationModelExtension modelExtension=(IAnnotationModelExtension) annotationModel;
+ modelExtension.removeAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID);
+
+
+ modelExtension.addAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID, newDiffer);
+
+ if (fDelegate instanceof IChangeRulerColumn)
+ ((IChangeRulerColumn) fDelegate).setModel(annotationModel); // picks up the new model attachment
+
+ return true;
+ }
+
+ /**
+ * Installs the differ annotation model with the current quick diff display.
+ *
+ * @param column the column to install the model on
+ */
+ private void installChangeRulerModel(IVerticalRulerColumn column) {
+ if (column instanceof IChangeRulerColumn) {
+ IAnnotationModel model= getAnnotationModelWithDiffer();
+ ((IChangeRulerColumn) column).setModel(model);
+ if (model != null) {
+ ISourceViewer viewer= fViewer;
+ if (viewer != null && viewer.getAnnotationModel() == null)
+ viewer.showAnnotations(true);
+ }
+ }
+ }
+
+ /**
+ * Uninstalls the differ annotation model from the current quick diff display.
+ *
+ * @param column the column to remove the model from
+ */
+ private void uninstallChangeRulerModel(IVerticalRulerColumn column) {
+ if (column instanceof IChangeRulerColumn)
+ ((IChangeRulerColumn) column).setModel(null);
+ IAnnotationModel model= getDiffer();
+ if (model instanceof ILineDifferExtension)
+ ((ILineDifferExtension) model).suspend();
+
+ ISourceViewer viewer= fViewer;
+ if (viewer != null && viewer.getAnnotationModel() == null)
+ viewer.showAnnotations(false);
+ }
+
+ /**
+ * Returns the annotation model that contains the quick diff annotation model.
+ * <p>
+ * Extracts the line differ from the displayed document's annotation model. If none can be found,
+ * a new differ is created and attached to the annotation model.</p>
+ *
+ * @return the annotation model that contains the line differ, or <code>null</code> if none could be found or created
+ * @see IChangeRulerColumn#QUICK_DIFF_MODEL_ID
+ */
+ private IAnnotationModel getAnnotationModelWithDiffer() {
+ ISourceViewer viewer= fViewer;
+ if (viewer == null)
+ return null;
+
+ IAnnotationModel m= viewer.getAnnotationModel();
+ IAnnotationModelExtension model= null;
+ if (m instanceof IAnnotationModelExtension)
+ model= (IAnnotationModelExtension) m;
+
+ IAnnotationModel differ= getDiffer();
+ // create diff model if it doesn't
+ if (differ == null) {
+ IPreferenceStore store= getPreferenceStore();
+ if (store != null) {
+ String defaultId= store.getString(AbstractDecoratedTextEditorPreferenceConstants.QUICK_DIFF_DEFAULT_PROVIDER);
+ differ= new QuickDiff().createQuickDiffAnnotationModel(getEditor(), defaultId);
+ if (differ != null) {
+ if (model == null)
+ model= new AnnotationModel();
+ model.addAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID, differ);
+ }
+ }
+ } else if (differ instanceof ILineDifferExtension2) {
+ if (((ILineDifferExtension2) differ).isSuspended())
+ ((ILineDifferExtension) differ).resume();
+ } else if (differ instanceof ILineDifferExtension) {
+ ((ILineDifferExtension) differ).resume();
+ }
+
+ return (IAnnotationModel)model;
+ }
+
+ /**
+ * Extracts the line differ from the displayed document's annotation model. If none can be found,
+ * <code>null</code> is returned.
+ *
+ * @return the line differ, or <code>null</code> if none could be found
+ */
+ private IAnnotationModel getDiffer() {
+ // get annotation model extension
+ ISourceViewer viewer= fViewer;
+ if (viewer == null)
+ return null;
+
+ IAnnotationModel m= viewer.getAnnotationModel();
+ if (m == null && fDelegate instanceof IChangeRulerColumn)
+ m= ((IChangeRulerColumn)fDelegate).getModel();
+
+ if (!(m instanceof IAnnotationModelExtension))
+ return null;
+
+ IAnnotationModelExtension model= (IAnnotationModelExtension)m;
+
+ // get diff model if it exists already
+ return model.getAnnotationModel(IChangeRulerColumn.QUICK_DIFF_MODEL_ID);
+ }
+
+ /**
+ * Sets the forwarder. Used by {@link AbstractDecoratedTextEditor} to maintain the contract of
+ * its {@link AbstractDecoratedTextEditor#createLineNumberRulerColumn} method.
+ *
+ * @param forwarder the forwarder
+ */
+ public void setForwarder(ICompatibilityForwarder forwarder) {
+ fForwarder= forwarder;
+ fDelegate= forwarder.createSTRulerColumn();
+ }
+
+ /**
+ * Initializes the given line number ruler column from the preference store.
+ *
+ * @param rulerColumn the ruler column to be initialized
+ */
+ public void initializeSTRulerColumn(STRulerColumn rulerColumn) {
+ IPreferenceStore store= getPreferenceStore();
+ if (store != null) {
+ updateForegroundColor(store, rulerColumn);
+ updateBackgroundColor(store, rulerColumn);
+ updateLineNumbersVisibility(rulerColumn);
+ rulerColumn.redraw();
+ }
+ }
+
+ /**
+ * Returns <code>true</code> if the ruler is showing line numbers, <code>false</code> if it
+ * is only showing change information.
+ *
+ * @return <code>true</code> if line numbers are shown, <code>false</code> otherwise
+ */
+ public boolean isShowingSTRuler() {
+ boolean b = fDelegate instanceof STRulerColumn && ((STChangeRulerColumn) fDelegate).isShowingSTRuler();
+ return b;
+ }
+
+ /**
+ * Returns <code>true</code> if the ruler is showing change information, <code>false</code>
+ * if it is only showing line numbers.
+ *
+ * @return <code>true</code> if change information is shown, <code>false</code> otherwise
+ */
+ public boolean isShowingChangeInformation() {
+ return fDelegate instanceof STChangeRulerColumn && ((STChangeRulerColumn) fDelegate).isShowingChangeInformation();
+ }
+
+ /**
+ * Shows revision information on the receiver.
+ *
+ * @param info the revision information to show
+ * @param quickDiffProviderId the id of the corresponding quick diff provider
+ */
+ public void showRevisionInformation(RevisionInformation info, String quickDiffProviderId) {
+ if (!ensureQuickDiffProvider(quickDiffProviderId))
+ return;
+
+ if (fDelegate instanceof IRevisionRulerColumn)
+ ((IRevisionRulerColumn) fDelegate).setRevisionInformation(info);
+ }
+
+ /**
+ * Hides revision information.
+ */
+ public void hideRevisionInformation() {
+ if (fDelegate instanceof IRevisionRulerColumn)
+ ((IRevisionRulerColumn) fDelegate).setRevisionInformation(null);
+ }
+
+ /**
+ * Returns <code>true</code> if the ruler is showing revision information, <code>false</code>
+ * if it is only showing line numbers.
+ *
+ * @return <code>true</code> if revision information is shown, <code>false</code> otherwise
+ */
+ public boolean isShowingRevisionInformation() {
+ if (fDelegate instanceof STChangeRulerColumn)
+ return ((STChangeRulerColumn) fDelegate).isShowingRevisionInformation();
+ return false;
+ }
+
+ /**
+ * Returns the selection provider of the revision column, <code>null</code> if none is
+ * available.
+ *
+ * @return the revision selection provider
+ */
+ public ISelectionProvider getRevisionSelectionProvider() {
+ if (fDelegate instanceof IRevisionRulerColumnExtension)
+ return ((IRevisionRulerColumnExtension) fDelegate).getRevisionSelectionProvider();
+ return null;
+ }
+
+
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STJFaceTextMessages.java b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STJFaceTextMessages.java
new file mode 100644
index 0000000000..410b5cf68f
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STJFaceTextMessages.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+02: * Copyright (c) 2000, 2005 IBM Corporation and others.
+03: * All rights reserved. This program and the accompanying materials
+04: * are made available under the terms of the Eclipse Public License v1.0
+05: * which accompanies this distribution, and is available at
+06: * http://www.eclipse.org/legal/epl-v10.html
+07: *
+08: * Contributors:
+09: * IBM Corporation - initial API and implementation
+10: *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.annotatedsourceeditor;
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * Accessor for the <code>JFaceTextMessages.properties</code> file in
+ * package <code>org.eclipse.jface.text</code>.
+ * @since 2.0
+ */
+class STJFaceTextMessages {
+
+ /** The resource bundle name. */
+ private static final String RESOURCE_BUNDLE= "org.eclipse.jface.text.JFaceTextMessages";//$NON-NLS-1$
+
+ /** The resource bundle. */
+ private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
+
+ /**
+ * Prohibits the creation of accessor objects.
+ */
+ private STJFaceTextMessages() {
+ }
+
+ /**
+ * Returns the string found in the resource bundle under the given key or a place holder string.
+ *
+ * @param key the look up key
+ * @return the value found under the given key
+ */
+ public static String getString(String key) {
+ try {
+ return fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * Gets a string from the resource bundle and formats it with the argument
+ *
+ * @param key the string used to get the bundle value, must not be null
+ * @param args arguments used when formatting the string
+ * @return the formatted string
+ * @since 3.0
+ */
+ public static String getFormattedString(String key, Object[] args) {
+ String format= null;
+ try {
+ format= fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+ }
+ return MessageFormat.format(format, args);
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STOverviewRuler.java b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STOverviewRuler.java
new file mode 100644
index 0000000000..cf7f084902
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STOverviewRuler.java
@@ -0,0 +1,1309 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.annotatedsourceeditor;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.custom.ViewForm;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseMoveListener;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Cursor;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+
+import org.eclipse.jface.text.JFaceTextUtil;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextListener;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.ITextViewerExtension5;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.TextEvent;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationAccess;
+import org.eclipse.jface.text.source.IAnnotationAccessExtension;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.IAnnotationModelListener;
+import org.eclipse.jface.text.source.IOverviewRuler;
+import org.eclipse.jface.text.source.ISharedTextColors;
+import org.eclipse.jface.text.source.projection.AnnotationBag;
+
+public class STOverviewRuler implements IOverviewRuler {
+
+ /**
+ * Internal listener class.
+ */
+ class InternalListener implements ITextListener, IAnnotationModelListener {
+
+ /*
+ * @see ITextListener#textChanged
+ */
+ public void textChanged(TextEvent e) {
+ if (fTextViewer != null && e.getDocumentEvent() == null && e.getViewerRedrawState()) {
+ // handle only changes of visible document
+ redraw();
+ }
+ }
+
+ /*
+ * @see IAnnotationModelListener#modelChanged(IAnnotationModel)
+ */
+ public void modelChanged(IAnnotationModel model) {
+ update();
+ }
+ }
+
+ /**
+ * Enumerates the annotations of a specified type and characteristics
+ * of the associated annotation model.
+ */
+ class FilterIterator implements Iterator<Annotation> {
+
+ final static int TEMPORARY= 1 << 1;
+ final static int PERSISTENT= 1 << 2;
+ final static int IGNORE_BAGS= 1 << 3;
+
+ private Iterator<?> fIterator;
+ private Object fType;
+ private Annotation fNext;
+ private int fStyle;
+
+ /**
+ * Creates a new filter iterator with the given specification.
+ *
+ * @param annotationType the annotation type
+ * @param style the style
+ */
+ public FilterIterator(Object annotationType, int style) {
+ fType= annotationType;
+ fStyle= style;
+ if (fModel != null) {
+ fIterator= fModel.getAnnotationIterator();
+ skip();
+ }
+ }
+
+ /**
+ * Creates a new filter iterator with the given specification.
+ *
+ * @param annotationType the annotation type
+ * @param style the style
+ * @param iterator the iterator
+ */
+ public FilterIterator(Object annotationType, int style, Iterator<?> iterator) {
+ fType= annotationType;
+ fStyle= style;
+ fIterator= iterator;
+ skip();
+ }
+
+ private void skip() {
+
+ boolean temp= (fStyle & TEMPORARY) != 0;
+ boolean pers= (fStyle & PERSISTENT) != 0;
+ boolean ignr= (fStyle & IGNORE_BAGS) != 0;
+
+ while (fIterator.hasNext()) {
+ Annotation next= (Annotation) fIterator.next();
+
+ if (next.isMarkedDeleted())
+ continue;
+
+ if (ignr && (next instanceof AnnotationBag))
+ continue;
+
+ fNext= next;
+ Object annotationType= next.getType();
+ if (fType == null || isSubtype(annotationType)) {
+ if (temp && pers) return;
+ if (pers && next.isPersistent()) return;
+ if (temp && !next.isPersistent()) return;
+ }
+ }
+ fNext= null;
+ }
+
+ private boolean isSubtype(Object annotationType) {
+ if (fAnnotationAccess instanceof IAnnotationAccessExtension) {
+ IAnnotationAccessExtension extension= (IAnnotationAccessExtension) fAnnotationAccess;
+ return extension.isSubtype(annotationType, fType);
+ }
+ return fType.equals(annotationType);
+ }
+
+ /*
+ * @see Iterator#hasNext()
+ */
+ public boolean hasNext() {
+ return fNext != null;
+ }
+ /*
+ * @see Iterator#next()
+ */
+ public Annotation next() {
+ try {
+ return fNext;
+ } finally {
+ if (fIterator != null)
+ skip();
+ }
+ }
+ /*
+ * @see Iterator#remove()
+ */
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
+ }
+
+ /**
+ * The painter of the overview ruler's header.
+ */
+ class HeaderPainter implements PaintListener {
+
+ private Color fIndicatorColor;
+ private Color fSeparatorColor;
+
+ /**
+ * Creates a new header painter.
+ */
+ public HeaderPainter() {
+ fSeparatorColor= fSharedTextColors.getColor(ViewForm.borderInsideRGB);
+ }
+
+ /**
+ * Sets the header color.
+ *
+ * @param color the header color
+ */
+ public void setColor(Color color) {
+ fIndicatorColor= color;
+ }
+
+ private void drawBevelRect(GC gc, int x, int y, int w, int h, Color topLeft, Color bottomRight) {
+ gc.setForeground(topLeft == null ? fSeparatorColor : topLeft);
+ gc.drawLine(x, y, x + w -1, y);
+ gc.drawLine(x, y, x, y + h -1);
+
+ gc.setForeground(bottomRight == null ? fSeparatorColor : bottomRight);
+ gc.drawLine(x + w, y, x + w, y + h);
+ gc.drawLine(x, y + h, x + w, y + h);
+ }
+
+ public void paintControl(PaintEvent e) {
+
+ Point s= fHeader.getSize();
+
+ if (fIndicatorColor != null) {
+ e.gc.setBackground(fIndicatorColor);
+ Rectangle r= new Rectangle(INSET, (s.y - (2*ANNOTATION_HEIGHT)) / 2, s.x - (2*INSET), 2*ANNOTATION_HEIGHT);
+ e.gc.fillRectangle(r);
+ Display d= fHeader.getDisplay();
+ if (d != null)
+// drawBevelRect(e.gc, r.x, r.y, r.width -1, r.height -1, d.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW), d.getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));
+ drawBevelRect(e.gc, r.x, r.y, r.width -1, r.height -1, null, null);
+ }
+
+ e.gc.setForeground(fSeparatorColor);
+ e.gc.setLineWidth(1);
+ e.gc.drawLine(0, s.y -1, s.x -1, s.y -1);
+ }
+ }
+
+ private static final int INSET= 2;
+ private static final int ANNOTATION_HEIGHT= 1;
+ private static boolean ANNOTATION_HEIGHT_SCALABLE= true;
+
+
+ /** The model of the overview ruler */
+ private IAnnotationModel fModel;
+ /** The view to which this ruler is connected */
+ private ITextViewer fTextViewer;
+ /** The ruler's canvas */
+ private Canvas fCanvas;
+ /** The ruler's header */
+ private Canvas fHeader;
+ /** The buffer for double buffering */
+ private Image fBuffer;
+ /** The internal listener */
+ private InternalListener fInternalListener= new InternalListener();
+ /** The width of this vertical ruler */
+ private int fWidth;
+ /** The hit detection cursor */
+ private Cursor fHitDetectionCursor;
+ /** The last cursor */
+ private Cursor fLastCursor;
+ /** The line of the last mouse button activity */
+ private int fLastMouseButtonActivityLine= -1;
+ /** The actual annotation height */
+ private int fAnnotationHeight= -1;
+ /** The annotation access */
+ private IAnnotationAccess fAnnotationAccess;
+ /** The header painter */
+ private HeaderPainter fHeaderPainter;
+ /**
+ * The list of annotation types to be shown in this ruler.
+ * @since 3.0
+ */
+ private Set<Object> fConfiguredAnnotationTypes= new HashSet<Object>();
+ /**
+ * The list of annotation types to be shown in the header of this ruler.
+ * @since 3.0
+ */
+ private Set<Object> fConfiguredHeaderAnnotationTypes= new HashSet<Object>();
+ /** The mapping between annotation types and colors */
+ private Map<Object, Color> fAnnotationTypes2Colors= new HashMap<Object, Color>();
+
+ /** The mapping between annotation and colors */
+ private Map<Annotation, Color> fAnnotationColors = new HashMap<Annotation, Color>();
+
+ /** The color manager */
+ private ISharedTextColors fSharedTextColors;
+ /**
+ * All available annotation types sorted by layer.
+ *
+ * @since 3.0
+ */
+ private List<Object> fAnnotationsSortedByLayer= new ArrayList<Object>();
+ /**
+ * All available layers sorted by layer.
+ * This list may contain duplicates.
+ * @since 3.0
+ */
+ private List<Integer> fLayersSortedByLayer= new ArrayList<Integer>();
+ /**
+ * Map of allowed annotation types.
+ * An allowed annotation type maps to <code>true</code>, a disallowed
+ * to <code>false</code>.
+ * @since 3.0
+ */
+ private Map fAllowedAnnotationTypes= new HashMap();
+ /**
+ * Map of allowed header annotation types.
+ * An allowed annotation type maps to <code>true</code>, a disallowed
+ * to <code>false</code>.
+ * @since 3.0
+ */
+ private Map fAllowedHeaderAnnotationTypes= new HashMap();
+ /**
+ * The cached annotations.
+ * @since 3.0
+ */
+ private List<Annotation> fCachedAnnotations= new ArrayList<Annotation>();
+
+
+ /**
+ * Constructs a overview ruler of the given width using the given annotation access and the given
+ * color manager.
+ *
+ * @param annotationAccess the annotation access
+ * @param width the width of the vertical ruler
+ * @param sharedColors the color manager
+ */
+ public STOverviewRuler(IAnnotationAccess annotationAccess, int width, ISharedTextColors sharedColors) {
+ fAnnotationAccess= annotationAccess;
+ fWidth= width;
+ fSharedTextColors= sharedColors;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IVerticalRulerInfo#getControl()
+ */
+ public Control getControl() {
+ return fCanvas;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IVerticalRulerInfo#getWidth()
+ */
+ public int getWidth() {
+ return fWidth;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IVerticalRuler#setModel(org.eclipse.jface.text.source.IAnnotationModel)
+ */
+ public void setModel(IAnnotationModel model) {
+ if (model != fModel || model != null) {
+
+ if (fModel != null)
+ fModel.removeAnnotationModelListener(fInternalListener);
+
+ fModel= model;
+
+ if (fModel != null)
+ fModel.addAnnotationModelListener(fInternalListener);
+
+ update();
+ }
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IVerticalRuler#createControl(org.eclipse.swt.widgets.Composite, org.eclipse.jface.text.ITextViewer)
+ */
+ public Control createControl(Composite parent, ITextViewer textViewer) {
+
+ fTextViewer= textViewer;
+
+ fHitDetectionCursor= new Cursor(parent.getDisplay(), SWT.CURSOR_HAND);
+
+ fHeader= new Canvas(parent, SWT.NONE);
+
+ fCanvas= new Canvas(parent, SWT.NO_BACKGROUND);
+
+ fCanvas.addPaintListener(new PaintListener() {
+ public void paintControl(PaintEvent event) {
+ if (fTextViewer != null)
+ doubleBufferPaint(event.gc);
+ }
+ });
+
+ fCanvas.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent event) {
+ handleDispose();
+ fTextViewer= null;
+ }
+ });
+
+ fCanvas.addMouseListener(new MouseAdapter() {
+ public void mouseDown(MouseEvent event) {
+ handleMouseDown(event);
+ }
+ });
+
+ fCanvas.addMouseMoveListener(new MouseMoveListener() {
+ public void mouseMove(MouseEvent event) {
+ handleMouseMove(event);
+ }
+ });
+
+ if (fTextViewer != null)
+ fTextViewer.addTextListener(fInternalListener);
+
+ return fCanvas;
+ }
+
+ /**
+ * Disposes the ruler's resources.
+ */
+ private void handleDispose() {
+
+ if (fTextViewer != null) {
+ fTextViewer.removeTextListener(fInternalListener);
+ fTextViewer= null;
+ }
+
+ if (fModel != null)
+ fModel.removeAnnotationModelListener(fInternalListener);
+
+ if (fBuffer != null) {
+ fBuffer.dispose();
+ fBuffer= null;
+ }
+
+ if (fHitDetectionCursor != null) {
+ fHitDetectionCursor.dispose();
+ fHitDetectionCursor= null;
+ }
+
+ fConfiguredAnnotationTypes.clear();
+ fAllowedAnnotationTypes.clear();
+ fConfiguredHeaderAnnotationTypes.clear();
+ fAllowedHeaderAnnotationTypes.clear();
+ fAnnotationTypes2Colors.clear();
+ fAnnotationsSortedByLayer.clear();
+ fLayersSortedByLayer.clear();
+ }
+
+ /**
+ * Double buffer drawing.
+ *
+ * @param dest the GC to draw into
+ */
+ private void doubleBufferPaint(GC dest) {
+
+ Point size= fCanvas.getSize();
+
+ if (size.x <= 0 || size.y <= 0)
+ return;
+
+ if (fBuffer != null) {
+ Rectangle r= fBuffer.getBounds();
+ if (r.width != size.x || r.height != size.y) {
+ fBuffer.dispose();
+ fBuffer= null;
+ }
+ }
+ if (fBuffer == null)
+ fBuffer= new Image(fCanvas.getDisplay(), size.x, size.y);
+
+ GC gc= new GC(fBuffer);
+ try {
+ gc.setBackground(fCanvas.getBackground());
+ gc.fillRectangle(0, 0, size.x, size.y);
+
+ if (fTextViewer instanceof ITextViewerExtension5)
+ doPaint1(gc);
+ else
+ doPaint(gc);
+
+ } finally {
+ gc.dispose();
+ }
+
+ dest.drawImage(fBuffer, 0, 0);
+ }
+
+ /**
+ * Draws this overview ruler.
+ *
+ * @param gc the GC to draw into
+ */
+ private void doPaint(GC gc) {
+ Rectangle r= new Rectangle(0, 0, 0, 0);
+ int yy, hh= ANNOTATION_HEIGHT;
+
+ IDocument document= fTextViewer.getDocument();
+ IRegion visible= fTextViewer.getVisibleRegion();
+
+ StyledText textWidget= fTextViewer.getTextWidget();
+ int maxLines= textWidget.getLineCount();
+
+ Point size= fCanvas.getSize();
+ int writable= JFaceTextUtil.computeLineHeight(textWidget, 0, maxLines, maxLines);
+
+ if (size.y > writable)
+ size.y= Math.max(writable - fHeader.getSize().y, 0);
+
+ for (Iterator<Object> iterator= fAnnotationsSortedByLayer.iterator(); iterator.hasNext();) {
+ Object annotationType= iterator.next();
+
+ if (skip(annotationType))
+ continue;
+
+ int[] style= new int[] { FilterIterator.PERSISTENT, FilterIterator.TEMPORARY };
+ for (int t=0; t < style.length; t++) {
+ Color fill = null;
+ Color stroke = null;
+ FilterIterator e = new FilterIterator(annotationType, style[t]);
+ if (annotationType.toString().compareTo(getAnnotationTypeColoredLines()) != 0){
+ fill= getFillColor(annotationType, style[t] == FilterIterator.TEMPORARY);
+ stroke= getStrokeColor(annotationType, style[t] == FilterIterator.TEMPORARY);
+ }
+
+ for (int i= 0; e.hasNext(); i++) {
+
+ Annotation a= e.next();
+ Position p= fModel.getPosition(a);
+
+ if (p == null || !p.overlapsWith(visible.getOffset(), visible.getLength()))
+ continue;
+
+
+ if (a.getType().compareTo(getAnnotationTypeColoredLines()) == 0){
+ fill= getFPFillColor(a, true);
+ stroke= getFPStrokeColor(a, false);
+ }
+
+ int annotationOffset= Math.max(p.getOffset(), visible.getOffset());
+ int annotationEnd= Math.min(p.getOffset() + p.getLength(), visible.getOffset() + visible.getLength());
+ int annotationLength= annotationEnd - annotationOffset;
+
+ try {
+ if (ANNOTATION_HEIGHT_SCALABLE) {
+ int numbersOfLines= document.getNumberOfLines(annotationOffset, annotationLength);
+ // don't count empty trailing lines
+ IRegion lastLine= document.getLineInformationOfOffset(annotationOffset + annotationLength);
+ if (lastLine.getOffset() == annotationOffset + annotationLength) {
+ numbersOfLines -= 2;
+ hh= (numbersOfLines * size.y) / maxLines + ANNOTATION_HEIGHT;
+ if (hh < ANNOTATION_HEIGHT)
+ hh= ANNOTATION_HEIGHT;
+ } else
+ hh= ANNOTATION_HEIGHT;
+ }
+ fAnnotationHeight= hh;
+
+ int startLine= textWidget.getLineAtOffset(annotationOffset - visible.getOffset());
+ yy= Math.min((startLine * size.y) / maxLines, size.y - hh);
+
+ if (fill != null) {
+ gc.setBackground(fill);
+ gc.fillRectangle(INSET, yy, size.x-(2*INSET), hh);
+ }
+
+ if (stroke != null) {
+ gc.setForeground(stroke);
+ r.x= INSET;
+ r.y= yy;
+ r.width= size.x - (2 * INSET);
+ r.height= hh;
+ gc.setLineWidth(1);
+ gc.drawRectangle(r);
+ }
+ } catch (BadLocationException x) {
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Draws this overview ruler. Uses <code>ITextViewerExtension5</code> for
+ * its implementation. Will replace <code>doPaint(GC)</code>.
+ *
+ * @param gc the GC to draw into
+ */
+ private void doPaint1(GC gc) {
+ Rectangle r= new Rectangle(0, 0, 0, 0);
+ int yy, hh= ANNOTATION_HEIGHT;
+
+ ITextViewerExtension5 extension= (ITextViewerExtension5) fTextViewer;
+ IDocument document= fTextViewer.getDocument();
+ StyledText textWidget= fTextViewer.getTextWidget();
+
+ int maxLines= textWidget.getLineCount();
+ Point size= fCanvas.getSize();
+ int writable= JFaceTextUtil.computeLineHeight(textWidget, 0, maxLines, maxLines);
+ if (size.y > writable)
+ size.y= Math.max(writable - fHeader.getSize().y, 0);
+
+ fCachedAnnotations.clear();
+ if (fModel != null) {
+ Iterator<?> iter= fModel.getAnnotationIterator();
+ while (iter.hasNext()) {
+ Annotation annotation= (Annotation) iter.next();
+
+ if (annotation.isMarkedDeleted())
+ continue;
+
+ if (skip(annotation.getType()))
+ continue;
+
+ fCachedAnnotations.add(annotation);
+ }
+ }
+
+ for (Iterator<Object> iterator= fAnnotationsSortedByLayer.iterator(); iterator.hasNext();) {
+ Object annotationType= iterator.next();
+
+ if (skip(annotationType))
+ continue;
+
+ int[] style= new int[] { FilterIterator.PERSISTENT, FilterIterator.TEMPORARY };
+ for (int t=0; t < style.length; t++) {
+
+ FilterIterator e= new FilterIterator(annotationType, style[t], fCachedAnnotations.iterator());
+ Color fill = null;
+ Color stroke = null;
+ if (annotationType.toString().compareTo(getAnnotationTypeColoredLines()) != 0){
+ fill= getFillColor(annotationType, style[t] == FilterIterator.TEMPORARY);
+ stroke= getStrokeColor(annotationType, style[t] == FilterIterator.TEMPORARY);
+ }
+
+ for (int i= 0; e.hasNext(); i++) {
+
+ Annotation a= e.next();
+
+
+ Position p= fModel.getPosition(a);
+
+ if (p == null)
+ continue;
+
+ IRegion widgetRegion= extension.modelRange2WidgetRange(new Region(p.getOffset(), p.getLength()));
+ if (widgetRegion == null)
+ continue;
+
+ if (a.getType().compareTo(getAnnotationTypeColoredLines()) == 0){
+ fill= getFPFillColor(a, true);
+ stroke= getFPStrokeColor(a, false);
+ }
+
+ try {
+ if (ANNOTATION_HEIGHT_SCALABLE) {
+ int numbersOfLines= document.getNumberOfLines(p.getOffset(), p.getLength());
+ // don't count empty trailing lines
+ IRegion lastLine= document.getLineInformationOfOffset(p.getOffset() + p.getLength());
+ if (lastLine.getOffset() == p.getOffset() + p.getLength()) {
+ numbersOfLines -= 2;
+ hh= (numbersOfLines * size.y) / maxLines + ANNOTATION_HEIGHT;
+ if (hh < ANNOTATION_HEIGHT)
+ hh= ANNOTATION_HEIGHT;
+ } else
+ hh= ANNOTATION_HEIGHT;
+ }
+ fAnnotationHeight= hh;
+
+ int startLine= textWidget.getLineAtOffset(widgetRegion.getOffset());
+ yy= Math.min((startLine * size.y) / maxLines, size.y - hh);
+
+ if (fill != null) {
+ gc.setBackground(fill);
+ gc.fillRectangle(INSET, yy, size.x-(2*INSET), hh);
+ }
+
+ if (stroke != null) {
+ gc.setForeground(stroke);
+ r.x= INSET;
+ r.y= yy;
+ r.width= size.x - (2 * INSET);
+ r.height= hh;
+ gc.setLineWidth(1);
+ gc.drawRectangle(r);
+ }
+ } catch (BadLocationException x) {
+ }
+ }
+ }
+ }
+ fCachedAnnotations.clear();
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IVerticalRuler#update()
+ */
+ public void update() {
+ if (fCanvas != null && !fCanvas.isDisposed()) {
+ Display d= fCanvas.getDisplay();
+ if (d != null) {
+ d.asyncExec(new Runnable() {
+ public void run() {
+ redraw();
+ updateHeader();
+ }
+ });
+ }
+ }
+ }
+
+ /**
+ * Redraws the overview ruler.
+ */
+ private void redraw() {
+
+ if (fTextViewer == null || fModel == null)
+ return;
+
+ if (fCanvas != null && !fCanvas.isDisposed()) {
+ GC gc= new GC(fCanvas);
+ doubleBufferPaint(gc);
+ gc.dispose();
+ }
+ }
+
+ /**
+ * Translates a given y-coordinate of this ruler into the corresponding
+ * document lines. The number of lines depends on the concrete scaling
+ * given as the ration between the height of this ruler and the length
+ * of the document.
+ *
+ * @param y_coordinate the y-coordinate
+ * @return the corresponding document lines
+ */
+ private int[] toLineNumbers(int y_coordinate) {
+
+ StyledText textWidget= fTextViewer.getTextWidget();
+ int maxLines= textWidget.getContent().getLineCount();
+
+ int rulerLength= fCanvas.getSize().y;
+ int writable= JFaceTextUtil.computeLineHeight(textWidget, 0, maxLines, maxLines);
+
+ if (rulerLength > writable)
+ rulerLength= Math.max(writable - fHeader.getSize().y, 0);
+
+ if (y_coordinate >= writable || y_coordinate >= rulerLength)
+ return new int[] {-1, -1};
+
+ int[] lines= new int[2];
+
+ int pixel0= Math.max(y_coordinate - 1, 0);
+ int pixel1= Math.min(rulerLength, y_coordinate + 1);
+ rulerLength= Math.max(rulerLength, 1);
+
+ lines[0]= (pixel0 * maxLines) / rulerLength;
+ lines[1]= (pixel1 * maxLines) / rulerLength;
+
+ if (fTextViewer instanceof ITextViewerExtension5) {
+ ITextViewerExtension5 extension= (ITextViewerExtension5) fTextViewer;
+ lines[0]= extension.widgetLine2ModelLine(lines[0]);
+ lines[1]= extension.widgetLine2ModelLine(lines[1]);
+ } else {
+ try {
+ IRegion visible= fTextViewer.getVisibleRegion();
+ int lineNumber= fTextViewer.getDocument().getLineOfOffset(visible.getOffset());
+ lines[0] += lineNumber;
+ lines[1] += lineNumber;
+ } catch (BadLocationException x) {
+ }
+ }
+
+ return lines;
+ }
+
+ /**
+ * Returns the position of the first annotation found in the given line range.
+ *
+ * @param lineNumbers the line range
+ * @param ignoreSelectedAnnotation whether to ignore the current selection
+ * @return the position of the first found annotation
+ */
+ private Position getAnnotationPosition(int[] lineNumbers, boolean ignoreSelectedAnnotation) {
+ if (lineNumbers[0] == -1)
+ return null;
+
+ Position found= null;
+
+ try {
+ IDocument d= fTextViewer.getDocument();
+ IRegion line= d.getLineInformation(lineNumbers[0]);
+
+ Point currentSelection= fTextViewer.getSelectedRange();
+
+ int start= line.getOffset();
+
+ line= d.getLineInformation(lineNumbers[lineNumbers.length - 1]);
+ int end= line.getOffset() + line.getLength();
+
+ for (int i= fAnnotationsSortedByLayer.size() -1; i >= 0; i--) {
+
+ Object annotationType= fAnnotationsSortedByLayer.get(i);
+
+ FilterIterator e= new FilterIterator(annotationType, FilterIterator.PERSISTENT | FilterIterator.TEMPORARY);
+ while (e.hasNext() && found == null) {
+ Annotation a= e.next();
+ if (a.isMarkedDeleted())
+ continue;
+
+ if (skip(a.getType()))
+ continue;
+
+ Position p= fModel.getPosition(a);
+ if (p == null)
+ continue;
+
+ int posOffset= p.getOffset();
+ int posEnd= posOffset + p.getLength();
+ IRegion region= d.getLineInformationOfOffset(posEnd);
+ // trailing empty lines don't count
+ if (posEnd > posOffset && region.getOffset() == posEnd) {
+ posEnd--;
+ region= d.getLineInformationOfOffset(posEnd);
+ }
+
+ if (posOffset <= end && posEnd >= start) {
+ if (ignoreSelectedAnnotation || currentSelection.x != posOffset || currentSelection.y != p.getLength())
+ found= p;
+ }
+ }
+ }
+ } catch (BadLocationException x) {
+ }
+
+ return found;
+ }
+
+ /**
+ * Returns the line which corresponds best to one of
+ * the underlying annotations at the given y-coordinate.
+ *
+ * @param lineNumbers the line numbers
+ * @return the best matching line or <code>-1</code> if no such line can be found
+ */
+ private int findBestMatchingLineNumber(int[] lineNumbers) {
+ if (lineNumbers == null || lineNumbers.length < 1)
+ return -1;
+
+ try {
+ Position pos= getAnnotationPosition(lineNumbers, true);
+ if (pos == null)
+ return -1;
+ return fTextViewer.getDocument().getLineOfOffset(pos.getOffset());
+ } catch (BadLocationException ex) {
+ return -1;
+ }
+ }
+
+ /**
+ * Handles mouse clicks.
+ *
+ * @param event the mouse button down event
+ */
+ private void handleMouseDown(MouseEvent event) {
+ if (fTextViewer != null) {
+ int[] lines= toLineNumbers(event.y);
+ Position p= getAnnotationPosition(lines, false);
+ if (p != null) {
+ fTextViewer.revealRange(p.getOffset(), p.getLength());
+ fTextViewer.setSelectedRange(p.getOffset(), p.getLength());
+ }
+ fTextViewer.getTextWidget().setFocus();
+ }
+ fLastMouseButtonActivityLine= toDocumentLineNumber(event.y);
+ }
+
+ /**
+ * Handles mouse moves.
+ *
+ * @param event the mouse move event
+ */
+ private void handleMouseMove(MouseEvent event) {
+ if (fTextViewer != null) {
+ int[] lines= toLineNumbers(event.y);
+ Position p= getAnnotationPosition(lines, true);
+ Cursor cursor= (p != null ? fHitDetectionCursor : null);
+ if (cursor != fLastCursor) {
+ fCanvas.setCursor(cursor);
+ fLastCursor= cursor;
+ }
+ }
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IOverviewRuler#addAnnotationType(java.lang.Object)
+ */
+ public void addAnnotationType(Object annotationType) {
+ fConfiguredAnnotationTypes.add(annotationType);
+ fAllowedAnnotationTypes.clear();
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IOverviewRuler#removeAnnotationType(java.lang.Object)
+ */
+ public void removeAnnotationType(Object annotationType) {
+ fConfiguredAnnotationTypes.remove(annotationType);
+ fAllowedAnnotationTypes.clear();
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IOverviewRuler#setAnnotationTypeLayer(java.lang.Object, int)
+ */
+ public void setAnnotationTypeLayer(Object annotationType, int layer) {
+ int j= fAnnotationsSortedByLayer.indexOf(annotationType);
+ if (j != -1) {
+ fAnnotationsSortedByLayer.remove(j);
+ fLayersSortedByLayer.remove(j);
+ }
+
+ if (layer >= 0) {
+ int i= 0;
+ int size= fLayersSortedByLayer.size();
+ while (i < size && layer >= fLayersSortedByLayer.get(i))
+ i++;
+ fLayersSortedByLayer.add(i, layer);
+ fAnnotationsSortedByLayer.add(i, annotationType);
+ }
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IOverviewRuler#setAnnotationTypeColor(java.lang.Object, org.eclipse.swt.graphics.Color)
+ */
+
+ public void setAnnotationColor(Annotation annotation,Color color){
+ if (color != null)
+ fAnnotationColors.put(annotation, color);
+ else
+ fAnnotationColors.remove(annotation);
+ }
+
+
+ public void setAnnotationTypeColor(Object annotationType, Color color) {
+ if (color != null)
+ fAnnotationTypes2Colors.put(annotationType, color);
+ else
+ fAnnotationTypes2Colors.remove(annotationType);
+ }
+
+ /**
+ * Returns whether the given annotation type should be skipped by the drawing routine.
+ *
+ * @param annotationType the annotation type
+ * @return <code>true</code> if annotation of the given type should be skipped
+ */
+ private boolean skip(Object annotationType) {
+ return !contains(annotationType, fAllowedAnnotationTypes, fConfiguredAnnotationTypes);
+ }
+
+ /**
+ * Returns whether the given annotation type should be skipped by the drawing routine of the header.
+ *
+ * @param annotationType the annotation type
+ * @return <code>true</code> if annotation of the given type should be skipped
+ * @since 3.0
+ */
+ private boolean skipInHeader(Object annotationType) {
+ return !contains(annotationType, fAllowedHeaderAnnotationTypes, fConfiguredHeaderAnnotationTypes);
+ }
+
+ /**
+ * Returns whether the given annotation type is mapped to <code>true</code>
+ * in the given <code>allowed</code> map or covered by the <code>configured</code>
+ * set.
+ *
+ * @param annotationType the annotation type
+ * @param allowed the map with allowed annotation types mapped to booleans
+ * @param configured the set with configured annotation types
+ * @return <code>true</code> if annotation is contained, <code>false</code>
+ * otherwise
+ * @since 3.0
+ */
+ private boolean contains(Object annotationType, Map allowed, Set configured) {
+ Boolean cached= (Boolean) allowed.get(annotationType);
+ if (cached != null)
+ return cached.booleanValue();
+
+ boolean covered= isCovered(annotationType, configured);
+ allowed.put(annotationType, covered ? Boolean.TRUE : Boolean.FALSE);
+ return covered;
+ }
+
+ /**
+ * Computes whether the annotations of the given type are covered by the given <code>configured</code>
+ * set. This is the case if either the type of the annotation or any of its
+ * super types is contained in the <code>configured</code> set.
+ *
+ * @param annotationType the annotation type
+ * @param configured the set with configured annotation types
+ * @return <code>true</code> if annotation is covered, <code>false</code>
+ * otherwise
+ * @since 3.0
+ */
+ private boolean isCovered(Object annotationType, Set configured) {
+ if (fAnnotationAccess instanceof IAnnotationAccessExtension) {
+ IAnnotationAccessExtension extension= (IAnnotationAccessExtension) fAnnotationAccess;
+ Iterator<?> e= configured.iterator();
+ while (e.hasNext()) {
+ if (extension.isSubtype(annotationType,e.next()))
+ return true;
+ }
+ return false;
+ }
+ return configured.contains(annotationType);
+ }
+
+ /**
+ * Returns a specification of a color that lies between the given
+ * foreground and background color using the given scale factor.
+ *
+ * @param fg the foreground color
+ * @param bg the background color
+ * @param scale the scale factor
+ * @return the interpolated color
+ */
+ private static RGB interpolate(RGB fg, RGB bg, double scale) {
+ return new RGB(
+ (int) ((1.0-scale) * fg.red + scale * bg.red),
+ (int) ((1.0-scale) * fg.green + scale * bg.green),
+ (int) ((1.0-scale) * fg.blue + scale * bg.blue)
+ );
+ }
+
+ /**
+ * Returns the grey value in which the given color would be drawn in grey-scale.
+ *
+ * @param rgb the color
+ * @return the grey-scale value
+ */
+ private static double greyLevel(RGB rgb) {
+ if (rgb.red == rgb.green && rgb.green == rgb.blue)
+ return rgb.red;
+ return (0.299 * rgb.red + 0.587 * rgb.green + 0.114 * rgb.blue + 0.5);
+ }
+
+ /**
+ * Returns whether the given color is dark or light depending on the colors grey-scale level.
+ *
+ * @param rgb the color
+ * @return <code>true</code> if the color is dark, <code>false</code> if it is light
+ */
+ private static boolean isDark(RGB rgb) {
+ return greyLevel(rgb) > 128;
+ }
+
+ /**
+ * Returns a color based on the color configured for the given annotation type and the given scale factor.
+ *
+ * @param annotationType the annotation type
+ * @param scale the scale factor
+ * @return the computed color
+ */
+ private Color getColor(Object annotationType, double scale) {
+ Color base= findColor(annotationType);
+ return getInterpolatedColor(base,scale);
+ }
+
+
+ private Color getFPColor(Object annotation, double scale){
+ Color base= (Color) fAnnotationColors.get(annotation);
+ return getInterpolatedColor(base,scale);
+ }
+
+ private Color getInterpolatedColor(Color base,double scale){
+ if (base == null)
+ return null;
+
+ RGB baseRGB= base.getRGB();
+ RGB background= fCanvas.getBackground().getRGB();
+
+ boolean darkBase= isDark(baseRGB);
+ boolean darkBackground= isDark(background);
+ if (darkBase && darkBackground)
+ background= new RGB(255, 255, 255);
+ else if (!darkBase && !darkBackground)
+ background= new RGB(0, 0, 0);
+
+ return fSharedTextColors.getColor(interpolate(baseRGB, background, scale));
+
+ }
+
+
+ /**
+ * Returns the color for the given annotation type
+ *
+ * @param annotationType the annotation type
+ * @return the color
+ * @since 3.0
+ */
+ private Color findColor(Object annotationType) {
+ Color color= (Color) fAnnotationTypes2Colors.get(annotationType);
+ if (color != null)
+ return color;
+
+ if (fAnnotationAccess instanceof IAnnotationAccessExtension) {
+ IAnnotationAccessExtension extension= (IAnnotationAccessExtension) fAnnotationAccess;
+ Object[] superTypes= extension.getSupertypes(annotationType);
+ if (superTypes != null) {
+ for (int i= 0; i < superTypes.length; i++) {
+ color= (Color) fAnnotationTypes2Colors.get(superTypes[i]);
+ if (color != null)
+ return color;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Returns the stroke color for the given annotation type and characteristics.
+ *
+ * @param annotationType the annotation type
+ * @param temporary <code>true</code> if for temporary annotations
+ * @return the stroke color
+ */
+ private Color getStrokeColor(Object annotationType, boolean temporary) {
+ return getColor(annotationType, temporary ? 0.5 : 0.2);
+ }
+
+
+ private Color getFPStrokeColor(Object annotation, boolean temporary) {
+ return getFPColor(annotation, temporary ? 0.5 : 0.2);
+ }
+
+ /**
+ * Returns the fill color for the given annotation type and characteristics.
+ *
+ * @param annotationType the annotation type
+ * @param temporary <code>true</code> if for temporary annotations
+ * @return the fill color
+ */
+ private Color getFillColor(Object annotationType, boolean temporary) {
+ return getColor(annotationType, temporary ? 0.9 : 0.6);
+ }
+
+ private Color getFPFillColor(Object annotation, boolean temporary){
+ return getFPColor(annotation, temporary ? 0.9 : 0.6);
+ }
+
+ /*
+ * @see IVerticalRulerInfo#getLineOfLastMouseButtonActivity()
+ */
+ public int getLineOfLastMouseButtonActivity() {
+ return fLastMouseButtonActivityLine;
+ }
+
+ /*
+ * @see IVerticalRulerInfo#toDocumentLineNumber(int)
+ */
+ public int toDocumentLineNumber(int y_coordinate) {
+
+ if (fTextViewer == null || y_coordinate == -1)
+ return -1;
+
+ int[] lineNumbers= toLineNumbers(y_coordinate);
+ int bestLine= findBestMatchingLineNumber(lineNumbers);
+ if (bestLine == -1 && lineNumbers.length > 0)
+ return lineNumbers[0];
+ return bestLine;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IVerticalRuler#getModel()
+ */
+ public IAnnotationModel getModel() {
+ return fModel;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IOverviewRuler#getAnnotationHeight()
+ */
+ public int getAnnotationHeight() {
+ return fAnnotationHeight;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IOverviewRuler#hasAnnotation(int)
+ */
+ public boolean hasAnnotation(int y) {
+ return findBestMatchingLineNumber(toLineNumbers(y)) != -1;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IOverviewRuler#getHeaderControl()
+ */
+ public Control getHeaderControl() {
+ return fHeader;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IOverviewRuler#addHeaderAnnotationType(java.lang.Object)
+ */
+ public void addHeaderAnnotationType(Object annotationType) {
+ fConfiguredHeaderAnnotationTypes.add(annotationType);
+ fAllowedHeaderAnnotationTypes.clear();
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IOverviewRuler#removeHeaderAnnotationType(java.lang.Object)
+ */
+ public void removeHeaderAnnotationType(Object annotationType) {
+ fConfiguredHeaderAnnotationTypes.remove(annotationType);
+ fAllowedHeaderAnnotationTypes.clear();
+ }
+
+ /**
+ * Updates the header of this ruler.
+ */
+ private void updateHeader() {
+
+ if (fHeader == null || fHeader.isDisposed())
+ return;
+
+ Object colorType= null;
+ outer: for (int i= fAnnotationsSortedByLayer.size() -1; i >= 0; i--) {
+
+ Object annotationType= fAnnotationsSortedByLayer.get(i);
+
+ if (skipInHeader(annotationType) || skip(annotationType))
+ continue;
+
+ for (FilterIterator e= new FilterIterator(annotationType, FilterIterator.PERSISTENT | FilterIterator.TEMPORARY | FilterIterator.IGNORE_BAGS); e.hasNext();) {
+ if (e.next() != null) {
+ colorType= annotationType;
+ break outer;
+ }
+ }
+ }
+
+ Color color= null;
+ if (colorType != null)
+ color= findColor(colorType);
+
+ if (color == null) {
+ if (fHeaderPainter != null)
+ fHeaderPainter.setColor(null);
+ } else {
+ if (fHeaderPainter == null) {
+ fHeaderPainter= new HeaderPainter();
+ fHeader.addPaintListener(fHeaderPainter);
+ }
+ fHeaderPainter.setColor(color);
+ }
+
+ fHeader.redraw();
+ updateHeaderToolTipText();
+ }
+
+ /**
+ * Updates the tool tip text of the header of this ruler.
+ *
+ * @since 3.0
+ */
+ private void updateHeaderToolTipText() {
+
+ if (fHeader == null || fHeader.isDisposed())
+ return;
+
+ fHeader.setToolTipText(null);
+
+ if (!(fAnnotationAccess instanceof IAnnotationAccessExtension))
+ return;
+
+ String overview= ""; //$NON-NLS-1$
+
+ for (int i= fAnnotationsSortedByLayer.size() -1; i >= 0; i--) {
+
+ Object annotationType= fAnnotationsSortedByLayer.get(i);
+
+ if (skipInHeader(annotationType) || skip(annotationType))
+ continue;
+
+ int count= 0;
+ String annotationTypeLabel= null;
+
+ for (FilterIterator e= new FilterIterator(annotationType, FilterIterator.PERSISTENT | FilterIterator.TEMPORARY | FilterIterator.IGNORE_BAGS); e.hasNext();) {
+ Annotation annotation= e.next();
+ if (annotation != null) {
+ if (annotationTypeLabel == null)
+ annotationTypeLabel= ((IAnnotationAccessExtension)fAnnotationAccess).getTypeLabel(annotation);
+ count++;
+ }
+ }
+
+ if (annotationTypeLabel != null) {
+ if (overview.length() > 0)
+ overview += "\n"; //$NON-NLS-1$
+ overview += STJFaceTextMessages.getFormattedString("OverviewRulerHeader.toolTipTextEntry", new Object[] {annotationTypeLabel, new Integer(count)}); //$NON-NLS-1$
+ }
+ }
+ if (overview.length() > 0)
+ fHeader.setToolTipText(overview);
+ }
+
+ private String getAnnotationTypeColoredLines(){
+ return (STAnnotatedSourceEditorActivator.getUniqueIdentifier() + STAnnotatedSourceEditorActivator.getAnnotationType());
+ }
+}
+
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STRulerColumn.java b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STRulerColumn.java
new file mode 100644
index 0000000000..8af7be3557
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STRulerColumn.java
@@ -0,0 +1,876 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.annotatedsourceeditor;
+
+import java.util.Arrays;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextListener;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.ITextViewerExtension;
+import org.eclipse.jface.text.IViewportListener;
+import org.eclipse.jface.text.JFaceTextUtil;
+import org.eclipse.jface.text.TextEvent;
+import org.eclipse.jface.text.source.CompositeRuler;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.ILineRange;
+import org.eclipse.jface.text.source.IVerticalRulerColumn;
+import org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.hyperlink.ISTAnnotationHyperlink;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.MouseMoveListener;
+import org.eclipse.swt.events.MouseTrackListener;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Cursor;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontMetrics;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.graphics.TextLayout;
+import org.eclipse.swt.graphics.TextStyle;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+
+
+public class STRulerColumn implements IVerticalRulerColumn{
+ /**
+ * Internal listener class.
+ */
+ class InternalListener implements IViewportListener, ITextListener {
+
+ /**
+ * @since 3.1
+ */
+ private boolean fCachedRedrawState= true;
+
+ /*
+ * @see IViewportListener#viewportChanged(int)
+ */
+ public void viewportChanged(int verticalPosition) {
+ if (fCachedRedrawState && verticalPosition != fScrollPos)
+ redraw();
+ }
+
+ /*
+ * @see ITextListener#textChanged(TextEvent)
+ */
+ public void textChanged(TextEvent event) {
+
+ fCachedRedrawState= event.getViewerRedrawState();
+ if (!fCachedRedrawState)
+ return;
+
+ if (updateNumberOfDigits()) {
+ computeIndentations();
+ layout(event.getViewerRedrawState());
+ return;
+ }
+
+ boolean viewerCompletelyShown= isViewerCompletelyShown();
+ if (viewerCompletelyShown || fSensitiveToTextChanges || event.getDocumentEvent() == null)
+ postRedraw();
+ fSensitiveToTextChanges= viewerCompletelyShown;
+ }
+ }
+
+ /**
+ * Handles all the mouse interaction in this line number ruler column.
+ */
+ class MouseHandler implements MouseListener, MouseMoveListener {
+
+ /** The cached view port size */
+ private int fCachedViewportSize;
+ /** The area of the line at which line selection started */
+ private IRegion fStartLine;
+ /** The number of the line at which line selection started */
+ private int fStartLineNumber;
+ /** The auto scroll direction */
+ private int fAutoScrollDirection;
+ /* @since 3.2 */
+ private boolean fIsListeningForMove= false;
+
+ /*
+ * @see org.eclipse.swt.events.MouseListener#mouseUp(org.eclipse.swt.events.MouseEvent)
+ */
+ public void mouseUp(MouseEvent event) {
+ // see bug 45700
+ if (event.button == 1) {
+ stopSelecting();
+ stopAutoScroll();
+ }
+ }
+
+ /*
+ * @see org.eclipse.swt.events.MouseListener#mouseDown(org.eclipse.swt.events.MouseEvent)
+ */
+ public void mouseDown(MouseEvent event) {
+ fParentRuler.setLocationOfLastMouseButtonActivity(event.x, event.y);
+
+ int newLine= fParentRuler.toDocumentLineNumber(event.y) + 1;
+ if (annotationColumn instanceof ISTAnnotationHyperlink){
+ ISTAnnotationHyperlink ahp = (ISTAnnotationHyperlink)annotationColumn;
+ if (ahp.isAnnotationHyperlink(newLine) && annotationColumn.getAnnotation(newLine).trim() != ""){
+ ahp.handleHyperlink(newLine);
+ }
+
+ }
+ else{
+ // see bug 45700
+ if (event.button == 1) {
+ startSelecting();
+ }
+ }
+ }
+
+ /*
+ * @see org.eclipse.swt.events.MouseListener#mouseDoubleClick(org.eclipse.swt.events.MouseEvent)
+ */
+ public void mouseDoubleClick(MouseEvent event) {
+ fParentRuler.setLocationOfLastMouseButtonActivity(event.x, event.y);
+ stopSelecting();
+ stopAutoScroll();
+ }
+
+ /*
+ * @see org.eclipse.swt.events.MouseMoveListener#mouseMove(org.eclipse.swt.events.MouseEvent)
+ */
+ public void mouseMove(MouseEvent event) {
+ int newLine= fParentRuler.toDocumentLineNumber(event.y) + 1;
+ if (annotationColumn instanceof ISTAnnotationHyperlink){
+ if (((ISTAnnotationHyperlink)annotationColumn).isAnnotationHyperlink(newLine) && annotationColumn.getAnnotation(newLine).trim() != ""){
+ Cursor cursor = new Cursor(event.display,SWT.CURSOR_HAND);
+ fCanvas.setCursor(cursor);
+ }
+ else{
+ Cursor cursor = new Cursor(event.display,SWT.CURSOR_ARROW);
+ fCanvas.setCursor(cursor);
+ }
+ }
+ if (fIsListeningForMove && !autoScroll(event)) {
+ expandSelection(newLine);
+ }
+ fParentRuler.setLocationOfLastMouseButtonActivity(event.x, event.y);
+ }
+
+ /**
+ * Called when line drag selection started. Adds mouse move and track
+ * listeners to this column's control.
+ */
+ private void startSelecting() {
+ try {
+
+ // select line
+ IDocument document= fCachedTextViewer.getDocument();
+ fStartLineNumber= fParentRuler.getLineOfLastMouseButtonActivity();
+ fStartLine= document.getLineInformation(fStartLineNumber);
+ fCachedTextViewer.setSelectedRange(fStartLine.getOffset(), fStartLine.getLength());
+
+ // prepare for drag selection
+ fIsListeningForMove= true;
+
+ } catch (BadLocationException x) {
+ }
+ }
+
+ /**
+ * Called when line drag selection stopped. Removes all previously
+ * installed listeners from this column's control.
+ */
+ private void stopSelecting() {
+ // drag selection stopped
+ fIsListeningForMove= false;
+ }
+
+ /**
+ * Expands the line selection from the remembered start line to the
+ * given line.
+ *
+ * @param lineNumber the line to which to expand the selection
+ */
+ private void expandSelection(int lineNumber) {
+ try {
+
+ IDocument document= fCachedTextViewer.getDocument();
+ IRegion lineInfo= document.getLineInformation(lineNumber);
+
+ int start= Math.min(fStartLine.getOffset(), lineInfo.getOffset());
+ int end= Math.max(fStartLine.getOffset() + fStartLine.getLength(), lineInfo.getOffset() + lineInfo.getLength());
+
+ if (lineNumber < fStartLineNumber)
+ fCachedTextViewer.setSelectedRange(end, start - end);
+ else
+ fCachedTextViewer.setSelectedRange(start, end - start);
+
+ } catch (BadLocationException x) {
+ }
+ }
+
+ /**
+ * Called when auto scrolling stopped. Clears the auto scroll direction.
+ */
+ private void stopAutoScroll() {
+ fAutoScrollDirection= SWT.NULL;
+ }
+
+ /**
+ * Called on drag selection.
+ *
+ * @param event the mouse event caught by the mouse move listener
+ * @return <code>true</code> if scrolling happened, <code>false</code> otherwise
+ */
+ private boolean autoScroll(MouseEvent event) {
+ Rectangle area= fCanvas.getClientArea();
+
+ if (event.y > area.height) {
+ autoScroll(SWT.DOWN);
+ return true;
+ }
+
+ if (event.y < 0) {
+ autoScroll(SWT.UP);
+ return true;
+ }
+
+ stopAutoScroll();
+ return false;
+ }
+
+ /**
+ * Scrolls the viewer into the given direction.
+ *
+ * @param direction the scroll direction
+ */
+ private void autoScroll(int direction) {
+
+ if (fAutoScrollDirection == direction)
+ return;
+
+ final int TIMER_INTERVAL= 5;
+ final Display display = fCanvas.getDisplay();
+ Runnable timer= null;
+ switch (direction) {
+ case SWT.UP:
+ timer= new Runnable() {
+ public void run() {
+ if (fAutoScrollDirection == SWT.UP) {
+ int top= getInclusiveTopIndex();
+ if (top > 0) {
+ fCachedTextViewer.setTopIndex(top -1);
+ expandSelection(top -1);
+ display.timerExec(TIMER_INTERVAL, this);
+ }
+ }
+ }
+ };
+ break;
+ case SWT.DOWN:
+ timer = new Runnable() {
+ public void run() {
+ if (fAutoScrollDirection == SWT.DOWN) {
+ int top= getInclusiveTopIndex();
+ fCachedTextViewer.setTopIndex(top +1);
+ expandSelection(top +1 + fCachedViewportSize);
+ display.timerExec(TIMER_INTERVAL, this);
+ }
+ }
+ };
+ break;
+ }
+
+ if (timer != null) {
+ fAutoScrollDirection= direction;
+ display.timerExec(TIMER_INTERVAL, timer);
+ }
+ }
+
+ /**
+ * Returns the viewer's first visible line, even if only partially visible.
+ *
+ * @return the viewer's first visible line
+ */
+ private int getInclusiveTopIndex() {
+ if (fCachedTextWidget != null && !fCachedTextWidget.isDisposed()) {
+ return JFaceTextUtil.getPartialTopIndex(fCachedTextViewer);
+ }
+ return -1;
+ }
+ }
+
+ /** This column's parent ruler */
+ private CompositeRuler fParentRuler;
+ /** Cached text viewer */
+ private ITextViewer fCachedTextViewer;
+ /** Cached text widget */
+ private StyledText fCachedTextWidget;
+ /** The columns canvas */
+ private Canvas fCanvas;
+ /** Cache for the actual scroll position in pixels */
+ private int fScrollPos;
+ /** The drawable for double buffering */
+ private Image fBuffer;
+ /** The internal listener */
+ private InternalListener fInternalListener= new InternalListener();
+ /** The font of this column */
+ private Font fFont;
+ /** The indentation cache */
+ private int[] fIndentation;
+ /** Indicates whether this column reacts on text change events */
+ private boolean fSensitiveToTextChanges= false;
+ /** The foreground color */
+ private Color fForeground;
+ /** The background color */
+ private Color fBackground;
+ /** Cached number of displayed digits */
+ private int fCachedNumberOfDigits= -1;
+ /** Flag indicating whether a relayout is required */
+ private boolean fRelayoutRequired= false;
+ /**
+ * Redraw runnable lock
+ * @since 3.0
+ */
+ private Object fRunnableLock= new Object();
+ /**
+ * Redraw runnable state
+ * @since 3.0
+ */
+ private boolean fIsRunnablePosted= false;
+ /**
+ * Redraw runnable
+ * @since 3.0
+ */
+ private Runnable fRunnable= new Runnable() {
+ public void run() {
+ synchronized (fRunnableLock) {
+ fIsRunnablePosted= false;
+ }
+ redraw();
+ }
+ };
+ /* @since 3.2 */
+ private MouseHandler fMouseHandler;
+
+ private ISTAnnotationColumn annotationColumn;
+
+ /**
+ * Constructs a new vertical ruler column.
+ */
+ public STRulerColumn(ISTAnnotationColumn ac) {
+ annotationColumn = ac;
+ }
+
+ public ISTAnnotationColumn getSTAnnotationColumn(){
+ return annotationColumn;
+ }
+
+ public STRulerColumn() {
+ }
+
+ /**
+ * Sets the foreground color of this column.
+ *
+ * @param foreground the foreground color
+ */
+ public void setForeground(Color foreground) {
+ fForeground= foreground;
+ }
+
+ /**
+ * Returns the foreground color being used to print the line numbers.
+ *
+ * @return the configured foreground color
+ * @since 3.0
+ */
+ protected Color getForeground() {
+ return fForeground;
+ }
+
+ /**
+ * Sets the background color of this column.
+ *
+ * @param background the background color
+ */
+ public void setBackground(Color background) {
+ fBackground= background;
+ if (fCanvas != null && !fCanvas.isDisposed())
+ fCanvas.setBackground(getBackground(fCanvas.getDisplay()));
+ }
+
+ /**
+ * Returns the System background color for list widgets.
+ *
+ * @param display the display
+ * @return the System background color for list widgets
+ */
+ protected Color getBackground(Display display) {
+ if (fBackground == null)
+ return display.getSystemColor(SWT.COLOR_LIST_BACKGROUND);
+ return fBackground;
+ }
+
+ /*
+ * @see IVerticalRulerColumn#getControl()
+ */
+ public Control getControl() {
+ return fCanvas;
+ }
+
+ /*
+ * @see IVerticalRuleColumnr#getWidth
+ */
+ public int getWidth() {
+ return fIndentation[0];
+ }
+
+ /**
+ * Computes the number of digits to be displayed. Returns
+ * <code>true</code> if the number of digits changed compared
+ * to the previous call of this method. If the method is called
+ * for the first time, the return value is also <code>true</code>.
+ *
+ * @return whether the number of digits has been changed
+ * @since 3.0
+ */
+ protected boolean updateNumberOfDigits() {
+ if (fCachedTextViewer == null)
+ return false;
+
+ int digits= computeNumberOfDigits();
+
+ if (fCachedNumberOfDigits != digits) {
+ fCachedNumberOfDigits= digits;
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Does the real computation of the number of digits. Subclasses may override this method if
+ * they need extra space on the line number ruler.
+ *
+ * @return the number of digits to be displayed on the line number ruler.
+ */
+ protected int computeNumberOfDigits() {
+ IDocument document= fCachedTextViewer.getDocument();
+ int lines= document == null ? 0 : document.getNumberOfLines();
+ int digits = 0;
+ if (annotationColumn.getTitle() != null && annotationColumn.getTitle().length() >0){
+ digits= annotationColumn.getTitle().length() + 3;
+ }
+ else
+ digits = 3;
+
+ while (lines > Math.pow(10, digits) -1) {
+ ++digits;
+ }
+ return (digits);
+ }
+
+ /**
+ * Layouts the enclosing viewer to adapt the layout to changes of the
+ * size of the individual components.
+ *
+ * @param redraw <code>true</code> if this column can be redrawn
+ */
+ protected void layout(boolean redraw) {
+ if (!redraw) {
+ fRelayoutRequired= true;
+ return;
+ }
+
+ fRelayoutRequired= false;
+ if (fCachedTextViewer instanceof ITextViewerExtension) {
+ ITextViewerExtension extension= (ITextViewerExtension) fCachedTextViewer;
+ Control control= extension.getControl();
+ if (control instanceof Composite && !control.isDisposed()) {
+ Composite composite= (Composite) control;
+ composite.layout(true);
+ }
+ }
+ }
+
+ /**
+ * Computes the indentations for the given font and stores them in
+ * <code>fIndentation</code>.
+ */
+ protected void computeIndentations() {
+ if (fCanvas == null || fCanvas.isDisposed())
+ return;
+
+ GC gc= new GC(fCanvas);
+ try {
+
+ gc.setFont(fCanvas.getFont());
+
+ fIndentation= new int[fCachedNumberOfDigits + 3];
+
+ char[] nines= new char[fCachedNumberOfDigits + 2];
+ Arrays.fill(nines, '9');
+ String nineString= new String(nines);
+ Point p= gc.stringExtent(nineString);
+ fIndentation[0]= p.x;
+
+ for (int i= 1; i <= fCachedNumberOfDigits; i++) {
+ p= gc.stringExtent(nineString.substring(0, i));
+ fIndentation[i]= fIndentation[0] - p.x;
+ }
+
+ } finally {
+ gc.dispose();
+ }
+ }
+
+ /*
+ * @see IVerticalRulerColumn#createControl(CompositeRuler, Composite)
+ */
+ public Control createControl(CompositeRuler parentRuler, Composite parentControl) {
+
+ fParentRuler= parentRuler;
+ fCachedTextViewer= parentRuler.getTextViewer();
+ fCachedTextWidget= fCachedTextViewer.getTextWidget();
+
+ fCanvas= new Canvas(parentControl, SWT.BORDER);
+ fCanvas.setBackground(getBackground(fCanvas.getDisplay()));
+ fCanvas.setForeground(fForeground);
+
+ fCanvas.addPaintListener(new PaintListener() {
+ public void paintControl(PaintEvent event) {
+ if (fCachedTextViewer != null)
+ doubleBufferPaint(event.gc);
+ }
+ });
+
+ fCanvas.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent e) {
+ handleDispose();
+ fCachedTextViewer= null;
+ fCachedTextWidget= null;
+ }
+ });
+
+ fMouseHandler= new MouseHandler();
+ fCanvas.addMouseListener(fMouseHandler);
+ fCanvas.addMouseMoveListener(fMouseHandler);
+
+ if (fCachedTextViewer != null) {
+
+ fCachedTextViewer.addViewportListener(fInternalListener);
+ fCachedTextViewer.addTextListener(fInternalListener);
+
+ if (fFont == null) {
+ if (fCachedTextWidget != null && !fCachedTextWidget.isDisposed())
+ fFont= fCachedTextWidget.getFont();
+ }
+ }
+
+ if (fFont != null)
+ fCanvas.setFont(fFont);
+
+ updateNumberOfDigits();
+ computeIndentations();
+ return fCanvas;
+ }
+
+ /**
+ * Disposes the column's resources.
+ */
+ protected void handleDispose() {
+
+ if (fCachedTextViewer != null) {
+ fCachedTextViewer.removeViewportListener(fInternalListener);
+ fCachedTextViewer.removeTextListener(fInternalListener);
+ }
+
+ if (fBuffer != null) {
+ fBuffer.dispose();
+ fBuffer= null;
+ }
+ }
+
+ /**
+ * Double buffer drawing.
+ *
+ * @param dest the GC to draw into
+ */
+ private void doubleBufferPaint(GC dest) {
+
+ Point size= fCanvas.getSize();
+
+ if (size.x <= 0 || size.y <= 0)
+ return;
+
+ if (fBuffer != null) {
+ Rectangle r= fBuffer.getBounds();
+ if (r.width != size.x || r.height != size.y) {
+ fBuffer.dispose();
+ fBuffer= null;
+ }
+ }
+ if (fBuffer == null)
+ fBuffer= new Image(fCanvas.getDisplay(), size.x, size.y);
+
+ GC gc= new GC(fBuffer);
+ gc.setFont(fCanvas.getFont());
+ if (fForeground != null)
+ gc.setForeground(fForeground);
+
+ try {
+ gc.setBackground(getBackground(fCanvas.getDisplay()));
+ gc.fillRectangle(0, 0, size.x, size.y);
+
+ ILineRange visibleLines= JFaceTextUtil.getVisibleModelLines(fCachedTextViewer);
+ if (visibleLines == null)
+ return;
+ fScrollPos= fCachedTextWidget.getTopPixel();
+ doPaint(gc, visibleLines);
+ fCachedTextWidget.addMouseTrackListener(new MouseTrackListener(){
+
+ @Override
+ public void mouseEnter(MouseEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mouseExit(MouseEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mouseHover(MouseEvent e) {
+
+
+ }
+
+ });
+
+ } finally {
+ gc.dispose();
+ }
+
+ dest.drawImage(fBuffer, 0, 0);
+ }
+
+ /**
+ * Returns <code>true</code> if the viewport displays the entire viewer contents, i.e. the
+ * viewer is not vertically scrollable.
+ *
+ * @return <code>true</code> if the viewport displays the entire contents, <code>false</code> otherwise
+ * @since 3.2
+ */
+ protected final boolean isViewerCompletelyShown() {
+ return JFaceTextUtil.isShowingEntireContents(fCachedTextWidget);
+ }
+
+ /**
+ * Draws the ruler column.
+ *
+ * @param gc the GC to draw into
+ * @param visibleLines the visible model lines
+ * @since 3.2
+ */
+ void doPaint(GC gc, ILineRange visibleLines) {
+ Display display= fCachedTextWidget.getDisplay();
+
+ // draw diff info
+ int y= -JFaceTextUtil.getHiddenTopLinePixels(fCachedTextWidget);
+
+ int lastLine= end(visibleLines);
+ for (int line= visibleLines.getStartLine(); line < lastLine; line++) {
+ int widgetLine= JFaceTextUtil.modelLineToWidgetLine(fCachedTextViewer, line);
+ if (widgetLine == -1)
+ continue;
+
+ int lineHeight= fCachedTextWidget.getLineHeight(fCachedTextWidget.getOffsetAtLine(widgetLine));
+ paintLine(line, y, lineHeight, gc, display);
+ y += lineHeight;
+ }
+ }
+
+ /* @since 3.2 */
+ private static int end(ILineRange range) {
+ return range.getStartLine() + range.getNumberOfLines();
+ }
+
+ /**
+ * Computes the string to be printed for <code>line</code>. The default implementation returns
+ * <code>Integer.toString(line + 1)</code>.
+ *
+ * @param line the line number for which the line number string is generated
+ * @return the string to be printed on the line number bar for <code>line</code>
+ * @since 3.0
+ */
+ protected String createDisplayString(int line) {
+ return Integer.toString(line);
+ }
+
+ /**
+ * Returns the difference between the baseline of the widget and the
+ * baseline as specified by the font for <code>gc</code>. When drawing
+ * line numbers, the returned bias should be added to obtain text lined up
+ * on the correct base line of the text widget.
+ *
+ * @param gc the <code>GC</code> to get the font metrics from
+ * @param widgetLine the widget line
+ * @return the baseline bias to use when drawing text that is lined up with
+ * <code>fCachedTextWidget</code>
+ * @since 3.2
+ */
+ private int getBaselineBias(GC gc, int widgetLine) {
+ /*
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=62951
+ * widget line height may be more than the font height used for the
+ * line numbers, since font styles (bold, italics...) can have larger
+ * font metrics than the simple font used for the numbers.
+ */
+ int offset= fCachedTextWidget.getOffsetAtLine(widgetLine);
+ int widgetBaseline= fCachedTextWidget.getBaseline(offset);
+
+ FontMetrics fm = gc.getFontMetrics();
+ int fontBaseline = fm.getAscent() + fm.getLeading();
+ int baselineBias= widgetBaseline - fontBaseline;
+ return Math.max(0, baselineBias);
+ }
+
+ /**
+ * Paints the line. After this method is called the line numbers are painted on top
+ * of the result of this method.
+ *
+ * @param line the line of the document which the ruler is painted for
+ * @param y the y-coordinate of the box being painted for <code>line</code>, relative to <code>gc</code>
+ * @param lineheight the height of one line (and therefore of the box being painted)
+ * @param gc the drawing context the client may choose to draw on.
+ * @param display the display the drawing occurs on
+ * @since 3.0
+ */
+ protected void paintLine(int line, int y, int lineheight, GC gc, Display display) {
+ int widgetLine= JFaceTextUtil.modelLineToWidgetLine(fParentRuler.getTextViewer(), line);
+ String s = "";
+ int indentation= fCachedNumberOfDigits;
+
+ if (annotationColumn instanceof ISTAnnotationHyperlink){
+ ISTAnnotationHyperlink ah = (ISTAnnotationHyperlink)annotationColumn;
+ if (ah.isAnnotationHyperlink(widgetLine)){
+ paintHyperLink(line, y, indentation, lineheight, gc, display);
+
+ }
+ }
+ else{
+ s = annotationColumn.getAnnotation(widgetLine);
+
+ if (widgetLine + 1 == 1){
+ for(int i=0;i<annotationColumn.getTitle().length();i++)
+ s = s + " ";
+ }
+
+ int baselineBias= getBaselineBias(gc, widgetLine);
+ gc.drawString(s, indentation, y + baselineBias, true);
+ }
+ }
+
+ /**
+ * Triggers a redraw in the display thread.
+ *
+ * @since 3.0
+ */
+ protected final void postRedraw() {
+ if (fCanvas != null && !fCanvas.isDisposed()) {
+ Display d= fCanvas.getDisplay();
+ if (d != null) {
+ synchronized (fRunnableLock) {
+ if (fIsRunnablePosted)
+ return;
+ fIsRunnablePosted= true;
+ }
+ d.asyncExec(fRunnable);
+ }
+ }
+ }
+
+ /*
+ * @see IVerticalRulerColumn#redraw()
+ */
+ public void redraw() {
+
+ if (fRelayoutRequired) {
+ layout(true);
+ return;
+ }
+
+ if (fCachedTextViewer != null && fCanvas != null && !fCanvas.isDisposed()) {
+ GC gc= new GC(fCanvas);
+ doubleBufferPaint(gc);
+ gc.dispose();
+ }
+ }
+
+ /*
+ * @see IVerticalRulerColumn#setModel(IAnnotationModel)
+ */
+ public void setModel(IAnnotationModel model) {
+ }
+
+ /*
+ * @see IVerticalRulerColumn#setFont(Font)
+ */
+ public void setFont(Font font) {
+ fFont= font;
+ if (fCanvas != null && !fCanvas.isDisposed()) {
+ fCanvas.setFont(fFont);
+ updateNumberOfDigits();
+ computeIndentations();
+ }
+ }
+
+ /**
+ * Returns the parent (composite) ruler of this ruler column.
+ *
+ * @return the parent ruler
+ * @since 3.0
+ */
+ protected CompositeRuler getParentRuler() {
+ return fParentRuler;
+ }
+
+ protected void paintHyperLink(int line, int y, int x,int lineheight, GC gc, Display display) {
+ String str = annotationColumn.getAnnotation(line);
+ final TextStyle styledString = new TextStyle(gc.getFont(),null,null);
+ styledString.foreground = display.getSystemColor(SWT.COLOR_BLUE);
+ styledString.underline = true;
+ TextLayout tl = new TextLayout(display);
+ tl.setText(str);
+
+ tl.setStyle(styledString, 0, str.length());
+ y = y + lineheight/2 - gc.stringExtent(str).y/2;
+ tl.draw(gc, x, y);
+ if (line + 1 == 1){
+ int baselineBias= getBaselineBias(gc, line);
+ String s = "";
+ for(int i=0;i<annotationColumn.getTitle().length();i++)
+ s = s + " ";
+ gc.drawString(s, x + tl.getWidth() + 8, y + baselineBias, true);
+ }
+ }
+
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STRulerMessages.java b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STRulerMessages.java
new file mode 100644
index 0000000000..8c94eb7db3
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STRulerMessages.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.annotatedsourceeditor;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Helper class to get NLSed messages.
+ */
+final class STRulerMessages extends NLS {
+
+ private static final String BUNDLE_NAME= STRulerMessages.class.getName();
+
+ private STRulerMessages() {
+ // Do not instantiate
+ }
+
+ public static String AbstractDecoratedTextEditor_revision_quickdiff_switch_title;
+ public static String AbstractDecoratedTextEditor_revision_quickdiff_switch_message;
+ public static String AbstractDecoratedTextEditor_revision_quickdiff_switch_rememberquestion;
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, STRulerMessages.class);
+ }
+
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STTextEditorMessages.java b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STTextEditorMessages.java
new file mode 100644
index 0000000000..0cf40972aa
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/STTextEditorMessages.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.annotatedsourceeditor;
+
+import java.util.ResourceBundle;
+
+import org.eclipse.osgi.util.NLS;
+
+public class STTextEditorMessages extends NLS {
+ private static final String BUNDLE_FOR_CONSTRUCTED_KEYS= "org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.STConstructedTextEditorMessages"; //$NON-NLS-1$
+ private static ResourceBundle fgBundleForConstructedKeys= ResourceBundle.getBundle(BUNDLE_FOR_CONSTRUCTED_KEYS);
+
+ /**
+ * Returns the message bundle which contains constructed keys.
+ *
+ * @since 3.1
+ * @return the message bundle
+ */
+ public static ResourceBundle getBundleForConstructedKeys() {
+ return fgBundleForConstructedKeys;
+ }
+
+ private static final String BUNDLE_NAME= STTextEditorMessages.class.getName();
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, STTextEditorMessages.class);
+ }
+
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/actions/AbstractOpenSourceFileAction.java b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/actions/AbstractOpenSourceFileAction.java
new file mode 100644
index 0000000000..d6d923cb14
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/actions/AbstractOpenSourceFileAction.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.actions;
+
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.action.Action;
+import org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.AbstractSTAnnotatedSourceEditorInput;
+import org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.STAnnotatedSourceEditorActivator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+
+public abstract class AbstractOpenSourceFileAction extends Action{
+ public static final String EDITOR_ID = "org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.editor";
+ private long ts;
+
+ public AbstractOpenSourceFileAction(String filepath,long ts){
+ super.setText("Open =>" + filepath);
+ this.ts = ts;
+ }
+
+ @Override
+ public void run() {
+
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+
+ IFileStore fileStore = getFileStore();
+
+ if (fileStore != null && !fileStore.fetchInfo().isDirectory() && fileStore.fetchInfo().exists()) {
+ long timeStamp = fileStore.fetchInfo().getLastModified();
+
+ if (timeStamp>ts) {
+ MessageBox msg = new MessageBox(window.getShell(),SWT.ICON_WARNING | SWT.APPLICATION_MODAL | SWT.YES| SWT.NO);
+ msg.setText(fileStore.toString());
+ msg.setMessage("The file "
+ + fileStore
+ + " is newer than the analysis result, \n"
+ + " if you continue opening it the visualization could result inconsistent. \n Do you want to continue?");
+ }
+
+ try {
+ IWorkbenchPage page = window.getActivePage();
+ if (page != null) {
+ IFileStore fs = EFS.getStore(fileStore.toURI());
+ IEditorInput input = getInput(fs);
+ page.openEditor(input, EDITOR_ID, false);
+ }
+ } catch (Exception e) {
+ Status s = new Status(
+ IStatus.ERROR,
+ STAnnotatedSourceEditorActivator.getUniqueIdentifier(),
+ IStatus.ERROR,
+ "Error when opening annotated source view",
+ e);
+ STAnnotatedSourceEditorActivator.getDefault().getLog().log(s);
+ }
+ }
+ else{
+ if (!fileStore.fetchInfo().exists()) {
+ showMessage("The selected file does not exist: " + fileStore,window.getShell());
+ }
+ }
+
+ }
+
+ private void showMessage(String message,Shell shell) {
+ MessageBox msgBox = new MessageBox(shell,SWT.ICON_ERROR);
+ msgBox.setText("Error");
+ msgBox.setMessage(message);
+ msgBox.open();
+ }
+
+ public abstract AbstractSTAnnotatedSourceEditorInput getInput(IFileStore fs);
+
+ public abstract IFileStore getFileStore();
+}
+
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/actions/OpenFileFullPathAction.java b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/actions/OpenFileFullPathAction.java
new file mode 100644
index 0000000000..85cb88f124
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/actions/OpenFileFullPathAction.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.actions;
+
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.AbstractSTAnnotatedSourceEditorInput;
+
+
+public abstract class OpenFileFullPathAction extends AbstractOpenSourceFileAction {
+ private String filepath;
+ public OpenFileFullPathAction(String filepath, long ts) {
+ super(filepath, ts);
+ this.filepath = filepath;
+ }
+
+ public abstract AbstractSTAnnotatedSourceEditorInput getInput(IFileStore fs);
+
+ public IFileStore getFileStore(){
+ return EFS.getLocalFileSystem().getStore(new Path(filepath));
+ }
+
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/actions/OpenWksRelFilePathAction.java b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/actions/OpenWksRelFilePathAction.java
new file mode 100644
index 0000000000..a6dce5ce81
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/actions/OpenWksRelFilePathAction.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.actions;
+
+import java.io.File;
+
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.AbstractSTAnnotatedSourceEditorInput;
+import org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.STAnnotatedSourceEditorActivator;
+
+
+
+public abstract class OpenWksRelFilePathAction extends AbstractOpenSourceFileAction {
+ private String filepath;
+
+ public OpenWksRelFilePathAction(String filepath, long ts) {
+ super(filepath, ts);
+
+ this.filepath = filepath;
+ }
+
+ @Override
+ public abstract AbstractSTAnnotatedSourceEditorInput getInput(IFileStore fs);
+
+ public IFileStore getFileStore(){
+ File file = new File(filepath);
+ IFile f = null;
+ if (!file.isAbsolute())
+ {
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ if (workspace != null) {
+ IWorkspaceRoot wrkRoot = workspace.getRoot();
+ f = wrkRoot.getFile(new Path(filepath));
+ IPath p = f.getLocation();
+ if (p != null) file = p.toFile();
+ }
+ try {
+ IFileStore fs = EFS.getStore(file.toURI());
+ return fs;
+ } catch (CoreException e) {
+ STAnnotatedSourceEditorActivator.getDefault().getLog().log(e.getStatus());
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/hyperlink/ISTAnnotationHyperlink.java b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/hyperlink/ISTAnnotationHyperlink.java
new file mode 100644
index 0000000000..95dad66f03
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/hyperlink/ISTAnnotationHyperlink.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.hyperlink;
+
+public interface ISTAnnotationHyperlink {
+ boolean isAnnotationHyperlink(int line);
+ void handleHyperlink(int line);
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/preferencespages/STAnnotatedSourceEditorPreferencePage.java b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/preferencespages/STAnnotatedSourceEditorPreferencePage.java
new file mode 100644
index 0000000000..23fd2d9f43
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.annotatedsourceeditor/src/org/eclipse/linuxtools/dataviewers/annotatedsourceeditor/preferencespages/STAnnotatedSourceEditorPreferencePage.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.preferencespages;
+
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+public class STAnnotatedSourceEditorPreferencePage extends PreferencePage
+ implements IWorkbenchPreferencePage {
+
+ /**
+ * A named preference that controls if the line number ruler is shown in the UI
+ * (value <code>"lineNumberRuler"</code>).
+ * <p>
+ * The preference value is of type <code>Boolean</code>.
+ * </p>
+ */
+ public final static String EDITOR_ST_RULER= "STRuler"; //$NON-NLS-1$
+
+ public STAnnotatedSourceEditorPreferencePage() {
+ // TODO Auto-generated constructor stub
+ }
+
+ public STAnnotatedSourceEditorPreferencePage(String title) {
+ super(title);
+ // TODO Auto-generated constructor stub
+ }
+
+ public STAnnotatedSourceEditorPreferencePage(String title,
+ ImageDescriptor image) {
+ super(title, image);
+ // TODO Auto-generated constructor stub
+ }
+
+ @Override
+ protected Control createContents(Composite parent) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void init(IWorkbench workbench) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/.classpath b/gcov/org.eclipse.linuxtools.dataviewers.charts/.classpath
new file mode 100755
index 0000000000..8a8f1668cd
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/.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/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/.project b/gcov/org.eclipse.linuxtools.dataviewers.charts/.project
new file mode 100755
index 0000000000..70e988c53a
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.dataviewers.charts</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/gcov/org.eclipse.linuxtools.dataviewers.charts/META-INF/MANIFEST.MF b/gcov/org.eclipse.linuxtools.dataviewers.charts/META-INF/MANIFEST.MF
new file mode 100755
index 0000000000..ea57dcd378
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/META-INF/MANIFEST.MF
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.linuxtools.dataviewers.charts;singleton:=true
+Bundle-Version: 4.1.0.qualifier
+Bundle-Activator: org.eclipse.linuxtools.dataviewers.charts.Activator
+Bundle-Vendor: %bundleProvider
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.linuxtools.dataviewers;bundle-version="4.0.0",
+ org.eclipse.birt.core;bundle-version="2.5.1",
+ org.eclipse.birt.chart.ui;bundle-version="2.5.1",
+ org.eclipse.birt.data;bundle-version="2.5.1",
+ org.eclipse.birt.data.aggregation;bundle-version="2.5.1",
+ org.eclipse.core.resources;bundle-version="3.4.2"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.linuxtools.dataviewers.charts,
+ org.eclipse.linuxtools.dataviewers.charts.actions,
+ org.eclipse.linuxtools.dataviewers.charts.dataengine,
+ org.eclipse.linuxtools.dataviewers.charts.dialogs,
+ org.eclipse.linuxtools.dataviewers.charts.provider,
+ org.eclipse.linuxtools.dataviewers.charts.view,
+ org.eclipse.linuxtools.dataviewers.charts.viewer
+Import-Package: com.ibm.icu.util;version="4.0.1"
+Bundle-Localization: plugin
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/about.html b/gcov/org.eclipse.linuxtools.dataviewers.charts/about.html
new file mode 100644
index 0000000000..23506a4bae
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/about.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>About</title>
+</head><body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). 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, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html> \ No newline at end of file
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/build.properties b/gcov/org.eclipse.linuxtools.dataviewers.charts/build.properties
new file mode 100755
index 0000000000..8ef30b817a
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = .,\
+ META-INF/,\
+ icons/,\
+ plugin.xml,\
+ about.html,\
+ plugin.properties
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/icons/Thumbs.db b/gcov/org.eclipse.linuxtools.dataviewers.charts/icons/Thumbs.db
new file mode 100755
index 0000000000..1f91a7ae08
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/icons/Thumbs.db
Binary files differ
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/icons/chart_icon.png b/gcov/org.eclipse.linuxtools.dataviewers.charts/icons/chart_icon.png
new file mode 100755
index 0000000000..67d1a81fdc
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/icons/chart_icon.png
Binary files differ
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/icons/dexport.gif b/gcov/org.eclipse.linuxtools.dataviewers.charts/icons/dexport.gif
new file mode 100644
index 0000000000..3f89cd90e6
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/icons/dexport.gif
Binary files differ
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/icons/dimport.gif b/gcov/org.eclipse.linuxtools.dataviewers.charts/icons/dimport.gif
new file mode 100644
index 0000000000..cd4474182f
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/icons/dimport.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/export_wiz.gif b/gcov/org.eclipse.linuxtools.dataviewers.charts/icons/eexport.gif
index 5a0837d1e4..5a0837d1e4 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/export_wiz.gif
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/icons/eexport.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/import_wiz.gif b/gcov/org.eclipse.linuxtools.dataviewers.charts/icons/eimport.gif
index d38085ad9c..d38085ad9c 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/import_wiz.gif
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/icons/eimport.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/saveas_edit.gif b/gcov/org.eclipse.linuxtools.dataviewers.charts/icons/save_chart.gif
index 466bfb1128..466bfb1128 100644..100755
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/saveas_edit.gif
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/icons/save_chart.gif
Binary files differ
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/plugin.properties b/gcov/org.eclipse.linuxtools.dataviewers.charts/plugin.properties
new file mode 100644
index 0000000000..c1c5fab678
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/plugin.properties
@@ -0,0 +1,14 @@
+#******************************************************************************
+# Copyright (c) 2009 STMicroelectronics.
+# All rights reserved. This program and the accompanying materials
+# are made available under the 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:
+# STMicroelectronics - initial API and implementation
+#*******************************************************************************
+bundleProvider = Eclipse Linux Tools
+bundleName = Data Viewers Birt Charts Plug-in (Incubation)
+chartview.name = Chart View
+chartcategory.name = Charts \ No newline at end of file
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/plugin.xml b/gcov/org.eclipse.linuxtools.dataviewers.charts/plugin.xml
new file mode 100755
index 0000000000..fd38dfb46c
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/plugin.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.views">
+ <view
+ allowMultiple="true"
+ category="org.eclipse.linuxtools.dataviewers.charts"
+ class="org.eclipse.linuxtools.dataviewers.charts.view.ChartView"
+ icon="icons/chart_icon.png"
+ id="org.eclipse.linuxtools.dataviewers.charts.view"
+ name="%chartview.name"
+ restorable="true">
+ </view>
+ <category
+ id="org.eclipse.linuxtools.dataviewers.charts"
+ name="%chartcategory.name">
+ </category>
+ </extension>
+
+</plugin>
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/Activator.java b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/Activator.java
new file mode 100755
index 0000000000..0162326acb
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/Activator.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.charts;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+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 plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.dataviewers.charts";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ 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 an image from the path
+ *
+ * @param path the path
+ * @return the image
+ */
+ public static Image getImage(String path) {
+ Image image = plugin.getImageRegistry().get(path);
+ if (image == null) {
+ image = getImageDescriptor(path).createImage();
+ plugin.getImageRegistry().put(path, image);
+ }
+ return image;
+ }
+
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/ChartConstants.java b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/ChartConstants.java
new file mode 100755
index 0000000000..431ecf0298
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/ChartConstants.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.charts;
+
+
+/**
+ * A class that handles the constants used by the charts.
+ *
+ * <br/>
+ * <br/>
+ * It contains:
+ * <ul>
+ * <li>labels used by the chart dialog.</li>
+ * <li>keys and default values used by the dialog settings.</li>
+ * <li>predefined colors used by the charts.</li>
+ * </ul>
+ *
+ */
+public class ChartConstants {
+
+ /** The section name of the viewer's dialog settings where the chart dialog save its state */
+ public static final String TAG_SECTION_BIRTCHARTS_STATE = "birtcharts_section";
+ /** The key used by the column buttons to save their state. For example the button i will use the key <code>TAG_COLUMN_BUTTON_+i</code> */
+ public static final String TAG_COLUMN_BUTTON_ = "COLUMN_BUTTON_";
+ /** The key used by the bar graph button to save its state */
+ public static final String TAG_BAR_GRAPH_BUTTON = "BAR_GRAPH_BUTTON";
+ /** The key used by the vertical bars button to save its state */
+ public static final String TAG_VERTICAL_BARS_BUTTON = "VERTICAL_BARS_BUTTON";
+
+ /** The default value of the column buttons */
+ public static final boolean DEFAULT_COLUMN_BUTTON = true;
+ /** The default value of the bar graph button */
+ public static final boolean DEFAULT_BAR_GRAPH_BUTTON = true;
+ /** The default value of the vertical bars button */
+ public static final boolean DEFAULT_VERTICAL_BARS_BUTTON = false;
+
+ /** The section name of the "save chart as image" action dialog settings */
+ public static final String TAG_SECTION_BIRTCHARTS_SAVEACTION_STATE = "birtcharts_saveasimg_section";
+ /** The key used by the file dialog to save its file name */
+ public static final String TAG_IMG_FILE_NAME = "IMG_FILE_NAME";
+ /** The key used by the file dialog to save its filter path */
+ public static final String TAG_IMG_FILTER_PATH = "IMG_FILTER_PATH";
+
+ /** The default value of the file dialog file name */
+ public static final String DEFAULT_IMG_FILE_NAME = ".";
+ /** The default value of the file dialog filter path */
+ public static final String DEFAULT_IMG_FILTER_PATH = ".";
+
+ /** Image extension for jpg format */
+ public static final String EXT_JPG = ".jpg";
+ /** Image extension for jpeg format */
+ public static final String EXT_JPEG = ".jpeg";
+ /** Image extension for png format */
+ public static final String EXT_PNG = ".png";
+ /** Image extension for gif format */
+ public static final String EXT_GIF = ".gif";
+ /** Image extension for svg format */
+ public static final String EXT_SVG = ".svg";
+ /** The file extensions provided by the "save chart as image" file dialog */
+ public static final String[] saveAsImageExt =
+ {
+ "*"+EXT_JPG,
+ "*"+EXT_JPEG,
+ "*"+EXT_PNG,
+ "*"+EXT_GIF,
+ "*.*"
+ };
+ /** The names associated to the files extensions provided by the "save chart as image" file dialog */
+ public static String[] saveAsImageExtNames =
+ {
+ "JPEG (*.jpg)",
+ "JPEG (*.jpeg)",
+ "PNG (*.png)",
+ "GIF (*.gif)",
+ "All Files (*.*)"
+ };
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/UIHelper.java b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/UIHelper.java
new file mode 100644
index 0000000000..1cfc2e345d
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/UIHelper.java
@@ -0,0 +1,143 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Actuate Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Actuate Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.dataviewers.charts;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * This class has been created to hold methods that provide specific
+ * functionality or services.
+ */
+public final class UIHelper
+{
+
+ /**
+ * This method returns an URL for a resource given its plugin relative path.
+ * It is intended to be used to abstract out the usage of the UI as a plugin
+ * or standalone component when it comes to accessing resources.
+ *
+ * @param sPluginRelativePath
+ * The path to the resource relative to the plugin location.
+ * @return URL representing the location of the resource.
+ */
+ public static URL getURL( String sPluginRelativePath )
+ {
+ URL url = null;
+ if ( Platform.getExtensionRegistry( ) != null )
+ {
+ try
+ {
+ url = new URL( Activator.getDefault( )
+ .getBundle( )
+ .getEntry( "/" ), sPluginRelativePath ); //$NON-NLS-1$
+ }
+ catch ( MalformedURLException e )
+ {
+ e.printStackTrace( );
+ }
+ }
+ else
+ {
+ try
+ {
+ url = new URL( "file:///" + new File( sPluginRelativePath ).getAbsolutePath( ) ); //$NON-NLS-1$
+ }
+ catch ( MalformedURLException e )
+ {
+ e.printStackTrace( );
+ }
+ }
+
+ return url;
+ }
+
+ private static Image createImage( String sPluginRelativePath )
+ {
+ Image img = null;
+ try
+ {
+ try
+ {
+ img = new Image( Display.getCurrent( ),
+ getURL( sPluginRelativePath ).openStream( ) );
+ }
+ catch ( MalformedURLException e1 )
+ {
+ img = new Image( Display.getCurrent( ),
+ new FileInputStream( getURL( sPluginRelativePath ).toString( ) ) );
+ }
+ }
+ catch ( IOException e )
+ {
+ e.printStackTrace( );
+ }
+
+ // If still can't load, return a dummy image.
+ if ( img == null )
+ {
+ img = new Image( Display.getCurrent( ), 1, 1 );
+ }
+ return img;
+ }
+
+ /**
+ * This is a convenience method to get an imgIcon from a URL.
+ *
+ * @param sPluginRelativePath
+ * The URL for the imgIcon.
+ * @return The imgIcon represented by the given URL.
+ * @see #setImageCached( boolean )
+ */
+ public static Image getImage( String sPluginRelativePath )
+ {
+ ImageRegistry registry = JFaceResources.getImageRegistry( );
+ Image image = registry.get( sPluginRelativePath );
+ if ( image == null )
+ {
+ image = createImage( sPluginRelativePath );
+ registry.put( sPluginRelativePath, image );
+ }
+ return image;
+ }
+
+ /**
+ * This is a convenience method to get an imgIcon from a URL.
+ *
+ * @param sPluginRelativePath
+ * The URL for the imgIcon.
+ * @return The imgIcon represented by the given URL.
+ * @see #setImageCached( boolean )
+ */
+ public static ImageDescriptor getImageDescriptor( String sPluginRelativePath )
+ {
+ ImageRegistry registry = JFaceResources.getImageRegistry( );
+ ImageDescriptor image = registry.getDescriptor( sPluginRelativePath );
+ if ( image == null )
+ {
+ registry.put( sPluginRelativePath,
+ createImage( sPluginRelativePath ) );
+ image = registry.getDescriptor( sPluginRelativePath );
+ }
+ return image;
+ }
+} \ No newline at end of file
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/actions/ChartAction.java b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/actions/ChartAction.java
new file mode 100755
index 0000000000..43cf4317a5
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/actions/ChartAction.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.charts.actions;
+
+import org.eclipse.birt.chart.model.Chart;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractSTViewer;
+import org.eclipse.linuxtools.dataviewers.charts.Activator;
+import org.eclipse.linuxtools.dataviewers.charts.dialogs.ChartDialog;
+import org.eclipse.linuxtools.dataviewers.charts.view.ChartView;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * An action that open a chart dialog from an <code>AbstractSTViewer</code>.
+ *
+ * @see AbstractSTViewer
+ */
+public class ChartAction extends Action {
+
+ /** The dialog */
+ private ChartDialog dialog;
+
+ /**
+ * The constructor.
+ *
+ * @param shell the shell used by the dialog
+ * @param viewer the viewer inputed to the disalog
+ */
+ public ChartAction(Shell shell, AbstractSTViewer viewer) {
+ super("Create chart...", Activator.getImageDescriptor("icons/chart_icon.png"));
+ dialog = createDialog(shell, viewer);
+ setEnabled(!viewer.getViewer().getSelection().isEmpty());
+ viewer.getViewer().addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ setEnabled(!event.getSelection().isEmpty());
+ }
+ });
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ @Override
+ public void run() {
+ dialog.open();
+ Chart chart = dialog.getValue();
+ if (chart != null) {
+ ChartView.createChartView(chart);
+
+ }
+ }
+
+ protected ChartDialog createDialog(Shell shell,AbstractSTViewer viewer){
+ return new ChartDialog(shell,viewer);
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/actions/ChartActionRenderer.java b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/actions/ChartActionRenderer.java
new file mode 100644
index 0000000000..cd47aab57d
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/actions/ChartActionRenderer.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.charts.actions;
+
+import org.eclipse.birt.chart.render.ActionRendererAdapter;
+import org.eclipse.birt.chart.computation.DataPointHints;
+import org.eclipse.birt.chart.event.StructureSource;
+import org.eclipse.birt.chart.event.StructureType;
+import org.eclipse.birt.chart.model.attribute.ActionType;
+import org.eclipse.birt.chart.model.attribute.TooltipValue;
+import org.eclipse.birt.chart.model.attribute.impl.JavaNumberFormatSpecifierImpl;
+import org.eclipse.birt.chart.model.data.Action;
+
+import com.ibm.icu.util.ULocale;
+
+
+/**
+ * Simple implementation for IActionRenderer
+ */
+public class ChartActionRenderer extends ActionRendererAdapter {
+
+
+ public void processAction( Action action, StructureSource source )
+ {
+ if ( ActionType.SHOW_TOOLTIP_LITERAL.equals( action.getType( ) ) )
+ {
+ TooltipValue tv = (TooltipValue) action.getValue( );
+ if ( StructureType.SERIES_DATA_POINT.equals( source.getType( ) ) )
+ {
+ final DataPointHints dph = (DataPointHints) source.getSource( );
+ String MyToolTip = "Value is " +
+ JavaNumberFormatSpecifierImpl.create("0.00").format(
+ ((Double)dph.getOrthogonalValue()).doubleValue(),ULocale.getDefault());
+ tv.setText( MyToolTip );
+ }
+ }
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/actions/OpenChartAction.java b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/actions/OpenChartAction.java
new file mode 100644
index 0000000000..539ef4c880
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/actions/OpenChartAction.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.charts.actions;
+
+import java.io.File;
+import java.io.FileInputStream;
+
+import org.eclipse.birt.chart.model.Chart;
+import org.eclipse.birt.chart.model.Serializer;
+import org.eclipse.birt.chart.model.impl.SerializerImpl;
+import org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBase;
+import org.eclipse.jface.action.Action;
+import org.eclipse.linuxtools.dataviewers.charts.UIHelper;
+import org.eclipse.linuxtools.dataviewers.charts.view.ChartView;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Shell;
+
+
+
+public class OpenChartAction extends Action {
+ private Chart chart = null;
+ private FileDialog dialog;
+ private ChartView chartView;
+
+ public OpenChartAction(Shell shell,ChartView cView){
+ setImageDescriptor( UIHelper.getImageDescriptor( "icons/eimport.gif" ) );
+ setDisabledImageDescriptor( UIHelper.getImageDescriptor( "icons/dimport.gif" ) );
+ setToolTipText( "Open XML Source" );
+ setEnabled(true);
+ this.chartView = cView;
+ this.dialog = new FileDialog(shell, SWT.OPEN);
+ dialog.setText("Select a chart file ");
+ dialog.setFilterExtensions(new String[]{"*.chart"});
+ }
+
+ public void run() {
+ String path = dialog.open();
+
+ if (path == null) {
+ // cancel pressed
+ return;
+ }
+
+ Serializer serializer = null;
+ final File chartFile = new File( path );
+
+ // Reads the chart model
+ try
+ {
+ serializer = SerializerImpl.instance( );
+ if ( chartFile.exists( ) )
+ {
+ chart = serializer.read( new FileInputStream( chartFile ) );
+ chartView.getChartViewer().setBuffer(null);
+ chartView.setChart(chart);
+ }
+ }
+ catch ( Exception e )
+ {
+ WizardBase.displayException( e );
+ }
+ }
+
+ public Chart getChart(){
+ return chart;
+ }
+
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/actions/SaveChartAction.java b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/actions/SaveChartAction.java
new file mode 100755
index 0000000000..74de88b7f3
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/actions/SaveChartAction.java
@@ -0,0 +1,286 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.charts.actions;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.birt.chart.device.IDeviceRenderer;
+import org.eclipse.birt.chart.exception.ChartException;
+import org.eclipse.birt.chart.factory.GeneratedChartState;
+import org.eclipse.birt.chart.factory.Generator;
+import org.eclipse.birt.chart.factory.RunTimeContext;
+import org.eclipse.birt.chart.model.Chart;
+import org.eclipse.birt.chart.model.attribute.Bounds;
+import org.eclipse.birt.chart.model.attribute.impl.BoundsImpl;
+import org.eclipse.birt.chart.util.PluginSettings;
+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;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.linuxtools.dataviewers.charts.Activator;
+import org.eclipse.linuxtools.dataviewers.charts.ChartConstants;
+import org.eclipse.linuxtools.dataviewers.charts.view.ChartView;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Shell;
+
+import com.ibm.icu.util.ULocale;
+
+/**
+ * An action to save a chart as an image (jpeg, gif, png)
+ * @author Marzia Maugeri <marzia.maugeri@st.com>
+ */
+public class SaveChartAction extends Action {
+
+ private FileDialog dialog;
+ private Shell shell;
+ private Chart cm;
+ private IDeviceRenderer idr;
+ private Bounds bo;
+ private ChartView chartView;
+
+ /**
+ * Constructor
+ *
+ * @param shell the shell used by the dialogs
+ */
+ public SaveChartAction(Shell shell,ChartView cview) {
+ super("Save chart as...", Activator.getImageDescriptor("icons/save_chart.gif"));
+ this.chartView = cview;
+ this.setEnabled(false);
+ this.shell = shell;
+ this.dialog = new FileDialog(shell, SWT.SAVE);
+ dialog.setFileName(ChartConstants.DEFAULT_IMG_FILE_NAME);
+ dialog.setFilterPath(ChartConstants.DEFAULT_IMG_FILTER_PATH);
+ dialog.setFilterExtensions(ChartConstants.saveAsImageExt);
+ dialog.setFilterNames(ChartConstants.saveAsImageExtNames);
+ dialog.setText("Select an image file (extension will be set to \".jpeg\" if not recognized).");
+
+ // restore state if there is one saved
+ restoreState();
+ }
+
+ /**
+ * Sets the image plugins on the chart and enables the action if chart is not null.
+ *
+ * @param chart
+ */
+ public void setChart(Chart chart) {
+ try {
+ if (chart != null) {
+ setEnabled(true);
+ } else {
+ setEnabled(false);
+ }
+ cm = chart;
+ } catch (Throwable _)
+ {
+ Status s = new Status(
+ Status.ERROR,
+ Activator.PLUGIN_ID,
+ Status.ERROR,
+ "Error when creating \"save as image\" action...",
+ _);
+ Activator.getDefault().getLog().log(s);
+ }
+ }
+
+ public void setBounds(Bounds bo){
+ this.bo = bo;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ public void run() {
+ String path = dialog.open();
+ if (path == null) {
+ // cancel pressed
+ return;
+ }
+
+ String ext = "";
+
+
+ int dotIdx = path.lastIndexOf(".");
+ if (dotIdx > 0) ext = path.substring(dotIdx);
+
+ try {
+ if (ext.equals(ChartConstants.EXT_GIF)) {
+ idr = PluginSettings.instance().getDevice("dv.GIF");
+ }
+ else if (ext.equals(ChartConstants.EXT_JPEG)) {
+ idr = PluginSettings.instance().getDevice("dv.JPEG");
+ }
+ else if (ext.equals(ChartConstants.EXT_JPG)) {
+ idr = PluginSettings.instance().getDevice("dv.JPG");
+ }
+ else if (ext.equals(ChartConstants.EXT_PNG)) {
+ idr = PluginSettings.instance().getDevice("dv.PNG");
+ }
+ else {
+ path += ChartConstants.EXT_JPEG;
+ idr = PluginSettings.instance().getDevice("dv.JPG");
+ }
+
+ } catch (ChartException e) {
+ Status s = new Status(
+ Status.ERROR,
+ Activator.PLUGIN_ID,
+ Status.ERROR,
+ e.getMessage(),
+ e);
+ Activator.getDefault().getLog().log(s);
+ }
+
+ final File file = new File(path);
+ if (file.exists()) {
+ boolean overwrite =
+ MessageDialog.openQuestion(shell, "Confirm overwrite", "File already exists. Overwrite?");
+ if (overwrite) {
+ file.delete();
+ } else {
+ return;
+ }
+ }
+
+ Job saveAsImage = new Job("Save chart as "+file.getName()) {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ monitor.beginTask("Saving chart as "+file.getName()+"...", IProgressMonitor.UNKNOWN);
+ file.createNewFile();
+ generateImageFile(file);
+ return Status.OK_STATUS;
+ } catch (IOException e) {
+ return new Status(
+ IStatus.ERROR,
+ Activator.PLUGIN_ID,
+ "Error saving chart to \""
+ + file.getAbsolutePath()
+ + "\":"
+ + e.getMessage(),
+ e);
+ }
+ }
+ };
+ saveAsImage.setUser(true);
+ saveAsImage.schedule();
+
+ // save the state of the dialog
+ saveState();
+ }
+
+ /**
+ * Restores the state of this action (file dialog)
+ */
+ public void restoreState() {
+ try {
+ IDialogSettings settings =
+ Activator.getDefault().getDialogSettings().getSection(ChartConstants.TAG_SECTION_BIRTCHARTS_SAVEACTION_STATE);
+ if (settings == null) {
+ settings = Activator.getDefault().getDialogSettings().addNewSection(ChartConstants.TAG_SECTION_BIRTCHARTS_SAVEACTION_STATE);
+ return;
+ }
+
+ dialog.setFileName(settings.get(ChartConstants.TAG_IMG_FILE_NAME));
+ dialog.setFilterPath(settings.get(ChartConstants.TAG_IMG_FILTER_PATH));
+ }
+ catch (Exception e) {
+ Status s = new Status(
+ Status.ERROR,
+ Activator.PLUGIN_ID,
+ Status.ERROR,
+ e.getMessage(),
+ e);
+ Activator.getDefault().getLog().log(s);
+ }
+ }
+
+ /**
+ * Saves the state of this action (file dialog)
+ */
+ public void saveState() {
+ try {
+ IDialogSettings settings =
+ Activator.getDefault().getDialogSettings().getSection(ChartConstants.TAG_SECTION_BIRTCHARTS_SAVEACTION_STATE);
+ if (settings == null) {
+ settings = Activator.getDefault().getDialogSettings().addNewSection(ChartConstants.TAG_SECTION_BIRTCHARTS_SAVEACTION_STATE);
+ }
+
+ settings.put(ChartConstants.TAG_IMG_FILE_NAME, dialog.getFileName());
+ settings.put(ChartConstants.TAG_IMG_FILTER_PATH, dialog.getFilterPath());
+ }
+ catch (Exception e) {
+ Status s = new Status(
+ Status.ERROR,
+ Activator.PLUGIN_ID,
+ Status.ERROR,
+ e.getMessage(),
+ e);
+ Activator.getDefault().getLog().log(s);
+ }
+ }
+
+ protected void generateImageFile(File file){
+ RunTimeContext rtc = new RunTimeContext( );
+ rtc.setULocale( ULocale.getDefault( ) );
+
+ final Generator gr = Generator.instance( );
+ GeneratedChartState gcs = null;
+
+ Bounds boFile = null;
+ bo = chartView.getChartViewer().getBounds();
+ //Set the chart size
+ if (bo != null){
+ boFile = BoundsImpl.create(bo.getLeft(), bo.getTop(), bo.getWidth(), bo.getHeight());
+ }
+ else{
+ boFile = BoundsImpl.create(0, 0, 800, 600);
+ }
+
+
+ try {
+ gcs = gr.build( idr.getDisplayServer( ), cm, boFile, null, rtc, null );
+ } catch (ChartException e) {
+ Status s = new Status(
+ Status.ERROR,
+ Activator.PLUGIN_ID,
+ Status.ERROR,
+ e.getMessage(),
+ e);
+ Activator.getDefault().getLog().log(s);
+ }
+
+ //Specify the file to write to.
+ idr.setProperty( IDeviceRenderer.FILE_IDENTIFIER, file.getAbsolutePath() );
+
+ //generate the chart
+ try {
+ gr.render( idr, gcs );
+ } catch (ChartException e) {
+ Status s = new Status(
+ Status.ERROR,
+ Activator.PLUGIN_ID,
+ Status.ERROR,
+ e.getMessage(),
+ e);
+ Activator.getDefault().getLog().log(s);
+ }
+ }
+
+
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/actions/SaveXMLAction.java b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/actions/SaveXMLAction.java
new file mode 100644
index 0000000000..a3c7ca0a29
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/actions/SaveXMLAction.java
@@ -0,0 +1,132 @@
+/***********************************************************************
+ * Copyright (c) 2004, 2005 Actuate Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Actuate Corporation - initial API and implementation
+ ***********************************************************************/
+
+package org.eclipse.linuxtools.dataviewers.charts.actions;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+import org.eclipse.birt.chart.model.Chart;
+import org.eclipse.birt.chart.model.Serializer;
+import org.eclipse.birt.chart.model.impl.SerializerImpl;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.action.Action;
+import org.eclipse.linuxtools.dataviewers.charts.Activator;
+import org.eclipse.linuxtools.dataviewers.charts.UIHelper;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.MessageBox;
+
+public class SaveXMLAction extends Action
+{
+
+ private Composite cmp;
+ private Chart cm;
+
+ public SaveXMLAction( Composite parent )
+ {
+ super( );
+ cmp = parent;
+ setImageDescriptor( UIHelper.getImageDescriptor( "icons/eexport.gif" ) );
+ setDisabledImageDescriptor( UIHelper.getImageDescriptor( "icons/dexport.gif" ) );
+ setToolTipText( "Save XML Source" );
+ setDescription( "Save XML Source to the designated directory" );
+ }
+
+ /**
+ * When the action is invoked, pop up a File Dialog to designate the
+ * directory.
+ */
+ public void run( )
+ {
+ if ( cm != null )
+ {
+ final FileDialog saveDialog = new FileDialog( cmp.getShell( ),
+ SWT.SAVE );
+ saveDialog.setFilterExtensions( new String[]{
+ "*.chart"} ); //$NON-NLS-1$
+ try
+ {
+ saveDialog.open( );
+ String name = saveDialog.getFileName( );
+ if ( name != null && name != "" ) //$NON-NLS-1$
+ {
+ Serializer serializer = null;
+ final File file = new File( saveDialog.getFilterPath( ),
+ name );
+ if ( file.exists( ) )
+ {
+ MessageBox box = new MessageBox( cmp.getShell( ),
+ SWT.ICON_WARNING | SWT.YES | SWT.NO );
+ box.setText( "Save XML Source"); //$NON-NLS-1$
+ box.setMessage( "The XML source already exists in the directory. \nDo you want to replace it?" );
+ if ( box.open( ) != SWT.YES )
+ {
+ return;
+ }
+ }
+
+ serializer = SerializerImpl.instance( );
+ try
+ {
+ serializer.write( cm, new FileOutputStream( file ) );
+ IFile c = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(file.getAbsolutePath()));
+ if (c != null){
+ try {
+ c.refreshLocal(1, new NullProgressMonitor());
+ } catch (CoreException e) {
+ IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e);
+ Activator.getDefault().getLog().log(status);
+ }
+ }
+
+ }
+ catch ( IOException ioe )
+ {
+ ioe.printStackTrace( );
+ }
+ }
+ }
+ catch ( Throwable e )
+ {
+ e.printStackTrace( );
+ }
+ }
+ }
+
+ public void setChart(Chart chart) {
+ try {
+ if (chart != null) {
+ setEnabled(true);
+ } else {
+ setEnabled(false);
+ }
+ cm = chart;
+ } catch (Throwable _)
+ {
+ Status s = new Status(
+ Status.ERROR,
+ Activator.PLUGIN_ID,
+ Status.ERROR,
+ "Error when creating \"save as image\" action...",
+ _);
+ Activator.getDefault().getLog().log(s);
+ }
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/dataengine/BindDataEngine.java b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/dataengine/BindDataEngine.java
new file mode 100644
index 0000000000..a6d2d3a59f
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/dataengine/BindDataEngine.java
@@ -0,0 +1,364 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Actuate Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Actuate Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.charts.dataengine;
+
+import org.eclipse.birt.chart.exception.ChartException;
+import org.eclipse.birt.chart.factory.Generator;
+import org.eclipse.birt.chart.factory.IDataRowExpressionEvaluator;
+import org.eclipse.birt.chart.factory.RunTimeContext;
+import org.eclipse.birt.chart.model.Chart;
+import org.eclipse.birt.chart.model.ChartWithAxes;
+import org.eclipse.birt.chart.model.attribute.AxisType;
+import org.eclipse.birt.chart.model.attribute.IntersectionType;
+import org.eclipse.birt.chart.model.attribute.LegendItemType;
+import org.eclipse.birt.chart.model.attribute.Position;
+import org.eclipse.birt.chart.model.attribute.TickStyle;
+import org.eclipse.birt.chart.model.attribute.impl.ColorDefinitionImpl;
+import org.eclipse.birt.chart.model.component.Axis;
+import org.eclipse.birt.chart.model.component.Series;
+import org.eclipse.birt.chart.model.component.impl.SeriesImpl;
+import org.eclipse.birt.chart.model.data.SeriesDefinition;
+import org.eclipse.birt.chart.model.data.impl.QueryImpl;
+import org.eclipse.birt.chart.model.data.impl.SeriesDefinitionImpl;
+import org.eclipse.birt.chart.model.impl.ChartWithAxesImpl;
+import org.eclipse.birt.chart.model.layout.Legend;
+import org.eclipse.birt.chart.model.layout.Plot;
+import org.eclipse.birt.chart.model.type.BarSeries;
+import org.eclipse.birt.chart.model.type.impl.BarSeriesImpl;
+import org.eclipse.birt.core.archive.IDocArchiveReader;
+import org.eclipse.birt.core.archive.IDocArchiveWriter;
+import org.eclipse.birt.core.data.Constants;
+import org.eclipse.birt.core.data.ExpressionUtil;
+import org.eclipse.birt.core.exception.BirtException;
+import org.eclipse.birt.data.aggregation.api.IBuildInAggregation;
+import org.eclipse.birt.data.engine.api.DataEngine;
+import org.eclipse.birt.data.engine.api.DataEngineContext;
+import org.eclipse.birt.data.engine.api.IGroupDefinition;
+import org.eclipse.birt.data.engine.api.IPreparedQuery;
+import org.eclipse.birt.data.engine.api.IQueryResults;
+import org.eclipse.birt.data.engine.api.querydefn.Binding;
+import org.eclipse.birt.data.engine.api.querydefn.GroupDefinition;
+import org.eclipse.birt.data.engine.api.querydefn.OdaDataSetDesign;
+import org.eclipse.birt.data.engine.api.querydefn.OdaDataSourceDesign;
+import org.eclipse.birt.data.engine.api.querydefn.QueryDefinition;
+import org.eclipse.birt.data.engine.api.querydefn.ScriptExpression;
+import org.eclipse.birt.data.engine.core.DataException;
+import org.eclipse.linuxtools.dataviewers.charts.Activator;
+
+import com.ibm.icu.util.ULocale;
+
+/**
+ * The example demonstrates how chart works with ODA/DtE(BIRT data engine) to
+ * get grouped/aggregated data set, the ODA/DtE is responsible to execute data
+ * query and grouping/aggregation, it returns a grouped data set to chart and
+ * chart retrieve data without grouping/aggregation by chart-self.
+ * <p>
+ * In the example, it only uses flat file as data source, actually it supports
+ * any JDBC data source, referring to {@link org.eclipse.birt.data.engine} to
+ * get detail information.
+ *
+ * @since 2.3
+ */
+public class BindDataEngine
+{
+ private String[] columnsName = null;
+ private FlatFileDataSource ffds = null;
+
+ /**
+ * Create runtime chart model and bind data.
+ *
+ * @return
+ * @throws ChartException
+ */
+ public final Chart createWorkingWithBIRTDataEngine(FlatFileDataSource ffds)
+ throws ChartException
+ {
+ this.ffds = ffds;
+ columnsName = ffds.getCOLUMNNAME();
+ String[] expressions = new String[columnsName.length];
+ expressions[0] = ExpressionUtil.createRowExpression( columnsName[0] );
+ expressions[1] = ExpressionUtil.createRowExpression( columnsName[1] );
+
+ ChartWithAxes cwaBar = createChartModel( expressions );
+
+ cwaBar = bindData( cwaBar, expressions );
+
+ return cwaBar;
+ }
+
+ /**
+ * Create chart model.
+ *
+ * @param expressions
+ * expressions are used to set category series and value series.
+ * @return
+ */
+ private static ChartWithAxes createChartModel( String[] expressions )
+ {
+ ChartWithAxes cwaBar = ChartWithAxesImpl.create( );
+ cwaBar.setType( "Bar Chart" );
+ cwaBar.setSubType( "Side-by-side" );
+ // Plot
+ cwaBar.getBlock( ).setBackground( ColorDefinitionImpl.WHITE( ) );
+ cwaBar.getBlock( ).getOutline( ).setVisible( true );
+ Plot p = cwaBar.getPlot( );
+ p.getClientArea( ).setBackground( ColorDefinitionImpl.create( 255,
+ 255,
+ 225 ) );
+
+ // Title
+ cwaBar.getTitle( )
+ .getLabel( )
+ .getCaption( )
+ .setValue( "Working with BIRT Data Engine" );
+
+ // Legend
+ Legend lg = cwaBar.getLegend( );
+ lg.setItemType( LegendItemType.CATEGORIES_LITERAL );
+
+ // X-Axis
+ Axis xAxisPrimary = cwaBar.getPrimaryBaseAxes( )[0];
+
+ xAxisPrimary.setType( AxisType.TEXT_LITERAL );
+ xAxisPrimary.getMajorGrid( ).setTickStyle( TickStyle.BELOW_LITERAL );
+ xAxisPrimary.getOrigin( ).setType( IntersectionType.MIN_LITERAL );
+
+ // Y-Axis
+ Axis yAxisPrimary = cwaBar.getPrimaryOrthogonalAxis( xAxisPrimary );
+ yAxisPrimary.getMajorGrid( ).setTickStyle( TickStyle.LEFT_LITERAL );
+ yAxisPrimary.setType( AxisType.LINEAR_LITERAL );
+ yAxisPrimary.getLabel( ).getCaption( ).getFont( ).setRotation( 90 );
+ yAxisPrimary.getTitle( ).setVisible( true );
+ yAxisPrimary.getTitle( ).getCaption( ).setValue( "Customer Amount" ); //$NON-NLS-1$
+ yAxisPrimary.getTitle( )
+ .getCaption( )
+ .setColor( ColorDefinitionImpl.GREEN( ) );
+
+ // X-Series
+ Series seCategory = SeriesImpl.create( );
+ // seCategory.setDataSet( categoryValues );
+
+ // Set category expression.
+ seCategory.getDataDefinition( )
+ .add( QueryImpl.create( expressions[0] ) );
+
+ SeriesDefinition sdX = SeriesDefinitionImpl.create( );
+ sdX.getSeriesPalette( ).shift( 0 );
+
+ xAxisPrimary.getSeriesDefinitions( ).add( sdX );
+ sdX.getSeries( ).add( seCategory );
+
+ // Y-Series
+ BarSeries bs1 = (BarSeries) BarSeriesImpl.create( );
+ bs1.getDataDefinition( ).add( QueryImpl.create( expressions[1] ) );
+ bs1.getLabel( ).setVisible( true );
+ bs1.setLabelPosition( Position.INSIDE_LITERAL );
+
+ SeriesDefinition sdY = SeriesDefinitionImpl.create( );
+ yAxisPrimary.getSeriesDefinitions( ).add( sdY );
+ sdY.getSeries( ).add( bs1 );
+ return cwaBar;
+ }
+
+ /**
+ * Binds data into chart model.
+ *
+ * @param cwaBar
+ * @return
+ * @throws ChartException
+ */
+ private ChartWithAxes bindData( ChartWithAxes cwaBar,
+ String[] expressions ) throws ChartException
+ {
+
+ RunTimeContext context = new RunTimeContext( );
+ context.setULocale( ULocale.getDefault( ) );
+
+ IDataRowExpressionEvaluator evaluator;
+ try
+ {
+ // Create row expression evaluator for chart doing data binding.
+ evaluator = prepareRowExpressionEvaluator( cwaBar, expressions );
+
+ // Binding data.
+ Generator.instance( ).bindData( evaluator, cwaBar, context );
+ }
+ catch ( BirtException e )
+ {
+ throw new ChartException( Activator.PLUGIN_ID,
+ ChartException.DATA_BINDING,
+ e );
+ }
+ return cwaBar;
+ }
+
+ /**
+ * Uses BIRT data engine to do query and wraps data with
+ * <code>IDataRowExpressionEvaluator</code> for chart doing data binding.
+ *
+ * @return
+ * @throws BirtException
+ */
+ private IDataRowExpressionEvaluator prepareRowExpressionEvaluator(
+ ChartWithAxes chart, String[] expressions ) throws BirtException
+ {
+
+ // Initialize data source and data set.
+ OdaDataSourceDesign odaDataSource = newDataSource( );
+ OdaDataSetDesign odaDataSet = newDataSet( odaDataSource );
+
+ // Create query definition.
+ QueryDefinition query = createQueryDefinition( odaDataSet, expressions );
+
+ // Create data engine and execute query.
+ DataEngine dataEngine = newDataEngine( );
+ dataEngine.defineDataSource( odaDataSource );
+ dataEngine.defineDataSet( odaDataSet );
+ IPreparedQuery preparedQuery = dataEngine.prepare( query );
+
+ IQueryResults queryResults = preparedQuery.execute( null );
+
+ // Create row expression evaluator.
+ return new GroupedRowExpressionsEvaluator( queryResults.getResultIterator( ),
+ true );
+ }
+
+ /**
+ * Create query definition.
+ *
+ * @param odaDataSet
+ * @param expressions
+ * @return
+ * @throws ChartException
+ */
+ private QueryDefinition createQueryDefinition(
+ OdaDataSetDesign odaDataSet, String[] expressions )
+ throws ChartException
+ {
+
+ QueryDefinition queryDefn = new QueryDefinition( );
+ queryDefn.setDataSetName( odaDataSet.getName( ) );
+
+ try
+ {
+ initDefaultBindings( queryDefn );
+
+ // Add group definitions and aggregation binding.
+ String groupName = "Group_Country"; //$NON-NLS-1$
+ GroupDefinition gd = new GroupDefinition( groupName );
+ gd.setKeyExpression( expressions[0] );
+ gd.setInterval( IGroupDefinition.NO_INTERVAL );
+ gd.setIntervalRange( 0 );
+
+ // Add expression bindings.
+ for ( int i = 0; i < expressions.length; i++ )
+ {
+ String expr = (String) expressions[i];
+ Binding colBinding = new Binding( expr );
+ colBinding.setExpression( new ScriptExpression( expr ) );
+ if ( i == 1 )
+ {
+ colBinding.setExpression( null );
+ colBinding.setAggrFunction( IBuildInAggregation.TOTAL_COUNT_FUNC );
+ colBinding.addAggregateOn( groupName );
+ colBinding.addArgument( new ScriptExpression( expressions[i] ) );
+ }
+
+ queryDefn.addBinding( colBinding );
+ }
+
+ queryDefn.addGroup( gd );
+ }
+ catch ( DataException e )
+ {
+ throw new ChartException( Activator.PLUGIN_ID,
+ ChartException.DATA_BINDING,
+ e );
+ }
+
+ return queryDefn;
+ }
+
+ /**
+ * Initialize default column bindings for original columns.
+ *
+ * @param queryDefn
+ * @throws DataException
+ */
+ private void initDefaultBindings( QueryDefinition queryDefn )
+ throws DataException
+ {
+
+ for(int i=0;i<columnsName.length;i++){
+ Binding colBinding = new Binding( columnsName[i] );
+ colBinding.setExpression( new ScriptExpression( ExpressionUtil.createDataSetRowExpression( columnsName[i]) ) );
+ queryDefn.addBinding( colBinding );
+ }
+ }
+
+ /**
+ * Create a new data engine.
+ *
+ * @return
+ * @throws BirtException
+ */
+ private static DataEngine newDataEngine( ) throws BirtException
+ {
+ DataEngineContext context = DataEngineContext.newInstance( DataEngineContext.DIRECT_PRESENTATION,null,(IDocArchiveReader) null,(IDocArchiveWriter) null);
+
+ // context.setTmpdir( this.getTempDir( ) );
+ DataEngine myDataEngine = DataEngine.newDataEngine( context );
+ return myDataEngine;
+ }
+
+ /**
+ * Create a new data set.
+ *
+ * @param dataSourceDesign
+ * @return
+ */
+ private OdaDataSetDesign newDataSet(
+ OdaDataSourceDesign dataSourceDesign )
+ {
+ OdaDataSetDesign dataSet = new OdaDataSetDesign( "Data Set1" ); //$NON-NLS-1$
+
+ dataSet.setDataSource( dataSourceDesign.getName( ) );
+ dataSet.setExtensionID( FlatFileDataSource.DATA_SET_TYPE );
+ dataSet.setQueryText( ffds.getQuery() );
+ return dataSet;
+ }
+
+ /**
+ * Create a new data source.
+ *
+ * @return
+ * @throws BirtException
+ */
+ private OdaDataSourceDesign newDataSource( ) throws BirtException
+ {
+ OdaDataSourceDesign dataSource = new OdaDataSourceDesign( "Data Source1" ); //$NON-NLS-1$
+ dataSource.setExtensionID( FlatFileDataSource.DATA_SOURCE_TYPE );
+ dataSource.addPrivateProperty( "HOME", ffds.HOME ); //$NON-NLS-1$
+ dataSource.addPrivateProperty( "CHARSET", FlatFileDataSource.CHARSET ); //$NON-NLS-1$
+ dataSource.addPrivateProperty( "DELIMTYPE", //$NON-NLS-1$
+ FlatFileDataSource.DELIMTYPE );
+ dataSource.addPrivateProperty( "INCLTYPELINE", //$NON-NLS-1$
+ FlatFileDataSource.INCLTYPELINE );
+ dataSource.addPrivateProperty( Constants.ODA_PROP_CONFIGURATION_ID,
+ dataSource.getExtensionID( )
+ + Constants.ODA_PROP_CONFIG_KEY_SEPARATOR
+ + dataSource.getName( ) );
+
+ return dataSource;
+ }
+
+
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/dataengine/FlatFileDataSource.java b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/dataengine/FlatFileDataSource.java
new file mode 100644
index 0000000000..c48cb3d6d9
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/dataengine/FlatFileDataSource.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.charts.dataengine;
+
+/**
+ * Resource of flat file data.
+ */
+public class FlatFileDataSource {
+ static final String DATA_SOURCE_TYPE = "org.eclipse.datatools.connectivity.oda.flatfile";
+ static final String DATA_SET_TYPE = "org.eclipse.datatools.connectivity.oda.flatfile.dataSet";
+ static final String CHARSET = "UTF-8";
+ static final String DELIMTYPE = "TAB";
+ static final String INCLTYPELINE = "NO";
+ protected String HOME = null;
+
+ protected String dataFile = "";
+ protected String query = "";
+ protected String[] columnsName = null;
+
+ public FlatFileDataSource(){
+ }
+
+ public FlatFileDataSource(String HOME,String dataFile,String query,String[] columns){
+ this.HOME = HOME;
+ this.dataFile = dataFile;
+ this.query = query;
+ this.columnsName = columns;
+ }
+
+ protected void setHOME_VARIABLE(String home){
+ HOME = home;
+ }
+
+ protected String getHOME(){
+ return HOME;
+ }
+
+ protected void setDataFile(String fileName){
+ dataFile = fileName;
+ }
+
+ protected String getDataFile(){
+ return dataFile;
+ }
+
+ protected void setQuery(String query){
+ this.query = query;
+ }
+
+ protected String getQuery(){
+ return query;
+ }
+
+ protected String[] getCOLUMNNAME(){
+ return columnsName;
+ }
+
+ protected void setCOLUMNName(String[] cn){
+ columnsName = cn;
+ }
+
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/dataengine/FlatFileDataSourceFactory.java b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/dataengine/FlatFileDataSourceFactory.java
new file mode 100644
index 0000000000..5f5d4a8b0a
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/dataengine/FlatFileDataSourceFactory.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.charts.dataengine;
+
+public class FlatFileDataSourceFactory {
+ public FlatFileDataSourceFactory(){
+ }
+
+ public String createHomeVariable(){
+ return null;
+ }
+
+ public String createFileName(){
+ return null;
+
+ }
+
+ public String createQuery(){
+ return null;
+
+ }
+
+ public String[] createColumns(){
+ return null;
+ }
+
+ public FlatFileDataSource createFlatFileDataSource(){
+ return new FlatFileDataSource(createHomeVariable(),createFileName(),createQuery(),createColumns());
+ }
+
+
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/dataengine/GroupedRowExpressionsEvaluator.java b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/dataengine/GroupedRowExpressionsEvaluator.java
new file mode 100644
index 0000000000..b56d135bbc
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/dataengine/GroupedRowExpressionsEvaluator.java
@@ -0,0 +1,280 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Actuate Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Actuate Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.dataviewers.charts.dataengine;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.birt.chart.exception.ChartException;
+import org.eclipse.birt.chart.factory.AbstractGroupedDataRowExpressionEvaluator;
+import org.eclipse.birt.chart.log.ILogger;
+import org.eclipse.birt.chart.log.Logger;
+import org.eclipse.birt.core.exception.BirtException;
+import org.eclipse.birt.data.engine.api.IGroupDefinition;
+import org.eclipse.birt.data.engine.api.IResultIterator;
+
+/**
+ * The class implements an evaluator to retrieve grouped row data.
+ * @since 2.3
+ */
+public class GroupedRowExpressionsEvaluator extends
+ AbstractGroupedDataRowExpressionEvaluator
+{
+
+ private static ILogger sLogger = Logger.getLogger( "org.eclipse.birt.chart.examples/trace" ); //$NON-NLS-1$
+
+ private IResultIterator fResultIterator;
+
+ private boolean fIsGrouped = false;
+
+ private int fGroupCount;
+
+ private List[] faGroupBreaks;
+
+ private int fCountOfAvaiableRows = 0;
+
+ private boolean fHasAggregation = false;
+
+ /**
+ * Constructor.
+ *
+ * @param resultSet
+ * @param hasAggregation
+ * @param cm
+ * @throws ChartException
+ */
+ public GroupedRowExpressionsEvaluator( IResultIterator resultIterator,
+ boolean hasAggregation ) throws ChartException
+ {
+ fHasAggregation = hasAggregation;
+
+ fResultIterator = resultIterator;
+ List<IGroupDefinition> groupDefinitions = fResultIterator.getQueryResults( )
+ .getPreparedQuery( )
+ .getReportQueryDefn( )
+ .getGroups( );
+ if ( groupDefinitions != null && groupDefinitions.size( ) > 0 )
+ {
+ fIsGrouped = true;
+ fGroupCount = groupDefinitions.size( );
+
+ faGroupBreaks = new List[groupDefinitions.size( )];
+ for ( int i = 0; i < faGroupBreaks.length; i++ )
+ {
+ faGroupBreaks[i] = new ArrayList( );
+ }
+ }
+ }
+
+ /**
+ * Get list of group breaks, the group level is base on 0th index, 0 index
+ * means outermost group.
+ *
+ * @param groupLevel
+ * @return
+ */
+ private List getGroupBreaksList( int groupLevel )
+ {
+ if ( faGroupBreaks == null
+ || groupLevel < 0
+ || groupLevel > ( faGroupBreaks.length - 1 ) )
+ {
+ return new ArrayList( );
+ }
+
+ return faGroupBreaks[groupLevel];
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.birt.chart.factory.IGroupedDataResultSet#getGroupBreaks(int)
+ */
+ public int[] getGroupBreaks( int groupLevel )
+ {
+ Object[] breaksArray = getGroupBreaksList( groupLevel ).toArray( );
+ int[] breaks = new int[breaksArray.length];
+ for ( int i = 0; i < breaksArray.length; i++ )
+ {
+ breaks[i] = ( (Integer) breaksArray[i] ).intValue( );
+ }
+ return breaks;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.birt.chart.factory.IDataRowExpressionEvaluator#close()
+ */
+ public void close( )
+ {
+ try
+ {
+ fResultIterator.close( );
+ }
+ catch ( BirtException e )
+ {
+ sLogger.log( e );
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.birt.chart.factory.IDataRowExpressionEvaluator#evaluate(java.lang.String)
+ */
+ public Object evaluate( String expression )
+ {
+ try
+ {
+ // Here, the expression should be binding name.
+ return fResultIterator.getValue( expression );
+ }
+ catch ( BirtException e )
+ {
+ sLogger.log( e );
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.birt.chart.factory.IDataRowExpressionEvaluator#evaluateGlobal(java.lang.String)
+ */
+ public Object evaluateGlobal( String expression )
+ {
+ return evaluate( expression );
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.birt.chart.factory.IDataRowExpressionEvaluator#first()
+ */
+ public boolean first( )
+ {
+ try
+ {
+ fCountOfAvaiableRows = 0;
+
+ if ( !fIsGrouped )
+ {
+ if ( fResultIterator.next( ) )
+ {
+ return true;
+ }
+ }
+ else
+ {
+ if ( findFirst( ) )
+ {
+ return true;
+ }
+ }
+ }
+ catch ( BirtException e )
+ {
+ sLogger.log( e );
+ }
+ return false;
+ }
+
+ /**
+ * Find the first row position.
+ *
+ * @return
+ * @throws BirtException
+ */
+ private boolean findFirst( ) throws BirtException
+ {
+ if ( !fResultIterator.next( ) )
+ {
+ return false;
+ }
+
+ int groupLevel = fResultIterator.getStartingGroupLevel( );
+ if ( groupLevel == 0 ) // It means the start of current row data.
+ {
+ return true;
+ }
+ else
+ {
+ return findFirst( );
+ }
+ }
+
+ /**
+ * Find next available row position. If it has grouped-enabled, should
+ * ignore non-grouped/non-aggregation row.
+ *
+ * @return
+ * @throws BirtException
+ */
+ private boolean findNext( ) throws BirtException
+ {
+ while ( fResultIterator.next( ) )
+ {
+ int startIndex = fResultIterator.getStartingGroupLevel( );
+ if ( startIndex > 0 && startIndex <= fGroupCount )
+ {
+ fCountOfAvaiableRows++;
+ // Add break point to current grouping.
+ getGroupBreaksList( startIndex - 1 ).add( new Integer( fCountOfAvaiableRows ) );
+ // Also the sub-groupings of current grouping should be
+ // added the break point.
+ for ( int i = startIndex; i < fGroupCount; i++ )
+ {
+ getGroupBreaksList( i ).add( new Integer( fCountOfAvaiableRows ) );
+ }
+
+ return true;
+ }
+
+ if ( !fHasAggregation )
+ {
+ fCountOfAvaiableRows++;
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.birt.chart.factory.IDataRowExpressionEvaluator#next()
+ */
+ public boolean next( )
+ {
+ try
+ {
+ if ( !fIsGrouped )
+ {
+ if ( fResultIterator.next( ) )
+ {
+ fCountOfAvaiableRows++;
+ return true;
+ }
+ }
+ else
+ {
+ return findNext( );
+ }
+ }
+ catch ( BirtException e )
+ {
+ sLogger.log( e );
+ }
+ return false;
+ }
+} \ No newline at end of file
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/dialogs/ChartDialog.java b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/dialogs/ChartDialog.java
new file mode 100755
index 0000000000..76be33ee42
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/dialogs/ChartDialog.java
@@ -0,0 +1,427 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.charts.dialogs;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.birt.chart.model.Chart;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractSTViewer;
+import org.eclipse.linuxtools.dataviewers.abstractviewers.ISTDataViewersField;
+import org.eclipse.linuxtools.dataviewers.charts.Activator;
+import org.eclipse.linuxtools.dataviewers.charts.ChartConstants;
+import org.eclipse.linuxtools.dataviewers.charts.provider.ChartFactory;
+import org.eclipse.linuxtools.dataviewers.charts.provider.IChartField;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * The dialog used to customize the chart before cerating it.
+ */
+public class ChartDialog extends Dialog {
+
+ private final AbstractSTViewer stViewer;
+ private Chart chart;
+
+ private Text errorMessageText;
+ private Button verticalBarsButton;
+ private Button pieChartButton;
+ private Button barGraphButton;
+ private Button okButton;
+ private List<Button> columnButtons;
+
+ /**
+ * The constructor
+ *
+ * @param shell
+ * @param stViewer
+ */
+ public ChartDialog(Shell shell, AbstractSTViewer stViewer)
+ {
+ super(shell);
+ this.stViewer = stViewer;
+ }
+
+ /**
+ * Restores the state of this dialog
+ */
+ public void restoreState() {
+ try {
+ IDialogSettings settings =
+ stViewer.getViewerSettings().getSection(ChartConstants.TAG_SECTION_BIRTCHARTS_STATE);
+ if (settings == null) {
+ settings = stViewer.getViewerSettings().addNewSection(ChartConstants.TAG_SECTION_BIRTCHARTS_STATE);
+ return;
+ }
+
+ for (int i=0; i<columnButtons.size(); i++) {
+ boolean selected = Boolean.parseBoolean(settings.get(ChartConstants.TAG_COLUMN_BUTTON_+i));
+ columnButtons.get(i).setSelection(selected);
+ }
+
+ boolean barGraph = Boolean.parseBoolean(settings.get(ChartConstants.TAG_BAR_GRAPH_BUTTON));
+ barGraphButton.setSelection(barGraph);
+ pieChartButton.setSelection(!barGraph);
+
+ boolean vBars = Boolean.parseBoolean(settings.get(ChartConstants.TAG_VERTICAL_BARS_BUTTON));
+ verticalBarsButton.setSelection(vBars);
+ verticalBarsButton.setEnabled(barGraph);
+ }
+ catch (Exception e) {}
+ }
+
+ /**
+ * Saves the state of this dialog
+ */
+ public void saveState() {
+ try {
+ IDialogSettings settings =
+ stViewer.getViewerSettings().getSection(ChartConstants.TAG_SECTION_BIRTCHARTS_STATE);
+ if (settings == null) {
+ settings = stViewer.getViewerSettings().addNewSection(ChartConstants.TAG_SECTION_BIRTCHARTS_STATE);
+ }
+
+ for (int i=0; i<columnButtons.size(); i++) {
+ boolean selected = columnButtons.get(i).getSelection();
+ settings.put(ChartConstants.TAG_COLUMN_BUTTON_+i, selected);
+ }
+
+ boolean barGraph = barGraphButton.getSelection();
+ settings.put(ChartConstants.TAG_BAR_GRAPH_BUTTON, barGraph);
+
+ boolean vBars = verticalBarsButton.getSelection();
+ settings.put(ChartConstants.TAG_VERTICAL_BARS_BUTTON, vBars);
+ }
+ catch (Exception e) {}
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+ */
+ @Override
+ protected void configureShell(Shell newShell) {
+ super.configureShell(newShell);
+ newShell.setText("Create chart from selection...");
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int)
+ */
+ @Override
+ protected void buttonPressed(int buttonId) {
+ if (buttonId == IDialogConstants.OK_ID) {
+ chart = produceChart();
+ saveState();
+ } else {
+ chart = null;
+ }
+ super.buttonPressed(buttonId);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
+ // create OK and Cancel buttons by default
+ okButton = createButton(parent, IDialogConstants.OK_ID,
+ IDialogConstants.OK_LABEL, true);
+ createButton(parent, IDialogConstants.CANCEL_ID,
+ IDialogConstants.CANCEL_LABEL, false);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#createContents(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createContents(Composite parent) {
+ Control c = super.createContents(parent);
+ this.validateInput();
+ return c;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ Composite composite = (Composite)super.createDialogArea(parent);
+
+ Composite titleComp = new Composite(composite, SWT.NONE);
+ titleComp.setLayout(new RowLayout(SWT.HORIZONTAL));
+
+ Label icon = new Label(titleComp, SWT.NONE);
+ icon.setImage(Activator.getImage("icons/chart_icon.png"));
+
+ Label label = new Label(titleComp, SWT.WRAP);
+ label.setText("Chart builder");
+ GridData data = new GridData(GridData.GRAB_HORIZONTAL
+ | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL
+ | GridData.VERTICAL_ALIGN_CENTER);
+ data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
+ titleComp.setLayoutData(data);
+
+ Group chartTypeGroup = new Group(composite, SWT.NONE);
+ data = new GridData(GridData.GRAB_HORIZONTAL
+ | GridData.HORIZONTAL_ALIGN_FILL);
+ chartTypeGroup.setLayoutData(data);
+ chartTypeGroup.setLayout(new GridLayout(2, false));
+ chartTypeGroup.setText("Select your chart type");
+
+ ValidateSelectionListener listener = new ValidateSelectionListener();
+
+ barGraphButton = new Button(chartTypeGroup, SWT.RADIO);
+ barGraphButton.setText("Bar graph");
+ barGraphButton.addSelectionListener(listener);
+ barGraphButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ verticalBarsButton.setEnabled(barGraphButton.getSelection());
+ }
+ });
+ data = new GridData();
+ barGraphButton.setLayoutData(data);
+
+ verticalBarsButton = new Button(chartTypeGroup, SWT.CHECK);
+ verticalBarsButton.setText("Vertical bars");
+ data = new GridData();
+ verticalBarsButton.setLayoutData(data);
+
+ pieChartButton = new Button(chartTypeGroup, SWT.RADIO);
+ pieChartButton.setText("Pie chart");
+ pieChartButton.addSelectionListener(listener);
+ data = new GridData();
+ data.horizontalSpan = 2;
+ pieChartButton.setLayoutData(data);
+
+ Group chartColumnGroup = new Group(composite, SWT.NONE);
+ chartColumnGroup.setLayout(new GridLayout(1,true));
+ data = new GridData(GridData.GRAB_HORIZONTAL
+ | GridData.HORIZONTAL_ALIGN_FILL);
+ chartColumnGroup.setLayoutData(data);
+ chartColumnGroup.setText("Select the columns(s) to show");
+
+ addColumnButtons(chartColumnGroup, listener);
+
+ errorMessageText = new Text(composite, SWT.READ_ONLY);
+ errorMessageText.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
+ | GridData.HORIZONTAL_ALIGN_FILL));
+ errorMessageText.setBackground(errorMessageText.getDisplay()
+ .getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
+
+ applyDialogFont(composite);
+
+ setWidgetsValues();
+
+ return composite;
+ }
+
+ /**
+ * Sets the widgets values
+ */
+ private void setWidgetsValues() {
+ // set default values
+ barGraphButton.setSelection(ChartConstants.DEFAULT_BAR_GRAPH_BUTTON);
+ verticalBarsButton.setEnabled(barGraphButton.getSelection());
+ verticalBarsButton.setSelection(ChartConstants.DEFAULT_VERTICAL_BARS_BUTTON);
+ for (Button button : columnButtons) {
+ button.setSelection(ChartConstants.DEFAULT_COLUMN_BUTTON);
+ }
+
+ // restore state if there is one saved
+ restoreState();
+ }
+
+ /**
+ * Adds one check button for each column implementing the IChartField interface.
+ *
+ * @see IChartField
+ * @param comp
+ * @param listener
+ */
+ private void addColumnButtons(Composite comp, SelectionListener listener)
+ {
+ columnButtons = new LinkedList<Button>();
+ for (ISTDataViewersField field : stViewer.getAllFields())
+ {
+ if (field instanceof IChartField) {
+ IChartField cField = (IChartField)field;
+ Button b = new Button(comp,SWT.CHECK);
+ b.setText(cField.getColumnHeaderText());
+ b.setData(cField);
+ b.addSelectionListener(listener);
+ GridData dt = new GridData();
+ b.setLayoutData(dt);
+ columnButtons.add(b);
+ }
+ }
+
+ Label sep = new Label(comp, SWT.SEPARATOR|SWT.HORIZONTAL);
+ GridData data = new GridData(GridData.GRAB_HORIZONTAL
+ | GridData.HORIZONTAL_ALIGN_FILL);
+ sep.setLayoutData(data);
+ Composite buttonComposite = new Composite(comp,SWT.NONE);
+ data = new GridData();
+ buttonComposite.setLayoutData(data);
+ FillLayout l = new FillLayout();
+ l.spacing = 5;
+ buttonComposite.setLayout(l);
+
+ final Button b1 = new Button(buttonComposite, SWT.PUSH);
+ b1.setText("Select all");
+ final Button b2 = new Button(buttonComposite, SWT.PUSH);
+ b2.setText("Deselect all");
+ SelectionListener sl = new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e)
+ {
+ widgetSelected(e);
+ }
+
+ public void widgetSelected(SelectionEvent e)
+ {
+ boolean b = (e.getSource() == b1);
+ for (Button button : columnButtons) {
+ button.setSelection(b);
+ }
+ validateInput();
+ }
+ };
+ b1.addSelectionListener(sl);
+ b2.addSelectionListener(sl);
+ }
+
+ /**
+ * Returns the Chart built by this dialog
+ *
+ * @return the chart
+ */
+ public Chart getValue() {
+ return chart;
+ }
+
+ /**
+ * Validates the input.
+ * <p>
+ * The default implementation of this framework method delegates the request
+ * to the supplied input validator object; if it finds the input invalid,
+ * the error message is displayed in the dialog's message line. This hook
+ * method is called whenever the text changes in the input field.
+ * </p>
+ */
+ protected void validateInput() {
+ String errorMessage = null;
+
+ int selectedNum = 0;
+ for (Button button : columnButtons) {
+ if (button.getSelection()) selectedNum++;
+ }
+
+ if (selectedNum == 0)
+ {
+ errorMessage = "No column selected";
+ }
+ /*else if (pieChartButton.getSelection() && selectedNum != 1)
+ {
+ errorMessage = "PieChart: Please select only one column";
+ }*/
+
+ // Bug 16256: important not to treat "" (blank error) the same as null
+ // (no error)
+ setErrorMessage(errorMessage);
+ }
+
+ /**
+ * Sets or clears the error message.
+ * If not <code>null</code>, the OK button is disabled.
+ *
+ * @param errorMessage
+ * the error message, or <code>null</code> to clear
+ * @since 3.0
+ */
+ public void setErrorMessage(String errorMessage) {
+ errorMessageText.setText(errorMessage == null ? "" : errorMessage); //$NON-NLS-1$
+ okButton.setEnabled(errorMessage == null);
+ errorMessageText.getParent().update();
+ }
+
+ /**
+ * Build the chart from configuration
+ *
+ * @return a new chart
+ */
+ private Chart produceChart()
+ {
+ IStructuredSelection selection = (IStructuredSelection)stViewer.getViewer().getSelection();
+ if (selection == StructuredSelection.EMPTY) return null;
+ Object[] objects = selection.toArray();
+
+ ISTDataViewersField labelField = getLabelField(stViewer);
+
+
+ List<IChartField> selectedFields = new ArrayList<IChartField>();
+ for (Button button : columnButtons) {
+ if (button.getSelection()) {
+ selectedFields.add((IChartField)button.getData());
+ }
+ }
+ boolean barChartType = barGraphButton.getSelection();
+ boolean horizontalBars = !verticalBarsButton.getSelection();
+
+ if (barChartType) {
+ return ChartFactory.produceBarChart(objects, labelField, selectedFields, getBarChartTitle(),horizontalBars);
+ }
+ else {
+ return ChartFactory.producePieChart(objects, labelField, selectedFields);
+ }
+ }
+
+ private class ValidateSelectionListener extends SelectionAdapter
+ {
+ public void widgetSelected(SelectionEvent e) {
+ validateInput();
+ }
+ };
+
+ /**
+ * @param viewer
+ * @return the field used to provide the labels to the series
+ */
+ protected ISTDataViewersField getLabelField(AbstractSTViewer viewer) {
+ return viewer.getAllFields()[0];
+ }
+
+ protected String getBarChartTitle(){
+ return "Bar Chart";
+ }
+} \ No newline at end of file
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/provider/ChartFactory.java b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/provider/ChartFactory.java
new file mode 100755
index 0000000000..89b03100b0
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/provider/ChartFactory.java
@@ -0,0 +1,251 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.charts.provider;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.birt.chart.model.Chart;
+import org.eclipse.birt.chart.model.ChartWithAxes;
+import org.eclipse.birt.chart.model.ChartWithoutAxes;
+import org.eclipse.birt.chart.model.attribute.ActionType;
+import org.eclipse.birt.chart.model.attribute.AxisType;
+import org.eclipse.birt.chart.model.attribute.ChartDimension;
+import org.eclipse.birt.chart.model.attribute.IntersectionType;
+import org.eclipse.birt.chart.model.attribute.Position;
+import org.eclipse.birt.chart.model.attribute.TickStyle;
+import org.eclipse.birt.chart.model.attribute.TriggerCondition;
+import org.eclipse.birt.chart.model.attribute.impl.ColorDefinitionImpl;
+import org.eclipse.birt.chart.model.attribute.impl.GradientImpl;
+import org.eclipse.birt.chart.model.attribute.impl.TooltipValueImpl;
+import org.eclipse.birt.chart.model.component.Axis;
+import org.eclipse.birt.chart.model.component.Series;
+import org.eclipse.birt.chart.model.component.impl.SeriesImpl;
+import org.eclipse.birt.chart.model.data.NumberDataSet;
+import org.eclipse.birt.chart.model.data.SeriesDefinition;
+import org.eclipse.birt.chart.model.data.TextDataSet;
+import org.eclipse.birt.chart.model.data.Trigger;
+import org.eclipse.birt.chart.model.data.impl.ActionImpl;
+import org.eclipse.birt.chart.model.data.impl.NumberDataSetImpl;
+import org.eclipse.birt.chart.model.data.impl.SeriesDefinitionImpl;
+import org.eclipse.birt.chart.model.data.impl.TextDataSetImpl;
+import org.eclipse.birt.chart.model.data.impl.TriggerImpl;
+import org.eclipse.birt.chart.model.impl.ChartWithAxesImpl;
+import org.eclipse.birt.chart.model.impl.ChartWithoutAxesImpl;
+import org.eclipse.birt.chart.model.layout.Legend;
+import org.eclipse.birt.chart.model.layout.Plot;
+import org.eclipse.birt.chart.model.type.BarSeries;
+import org.eclipse.birt.chart.model.type.PieSeries;
+import org.eclipse.birt.chart.model.type.impl.BarSeriesImpl;
+import org.eclipse.birt.chart.model.type.impl.PieSeriesImpl;
+import org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractSTViewer;
+import org.eclipse.linuxtools.dataviewers.abstractviewers.ISTDataViewersField;
+
+/**
+ * A utility class that handles the charts creation (pie chart & bar chart)
+ *
+ * @author Marzia Maugeri <marzia.maugeri@st.com>
+ *
+ */
+public class ChartFactory {
+
+ /**
+ * Produces a 3D pie chart from the input objects.
+ *
+ * @param objects the input data
+ * @param nameField the field used to get the labels of the objects (colored parts in the pie).
+ * @param valField the field providing the values for the pie parts.
+ * @return a new 3D pie chart
+ */
+ public static final Chart producePieChart(Object[] objects, ISTDataViewersField nameField, List<IChartField> valFields)
+ {
+ ChartWithoutAxes cwoaPie = ChartWithoutAxesImpl.create( );
+ cwoaPie.setSeriesThickness( 20 );
+ cwoaPie.setGridColumnCount( valFields.size());
+ cwoaPie.getBlock( ).setBackground( ColorDefinitionImpl.WHITE( ) );
+
+ //2D dimensional with DEPTH (birt DOESN'T SUPPORT 3D for Pie Chart)
+ cwoaPie.setDimension(ChartDimension.TWO_DIMENSIONAL_WITH_DEPTH_LITERAL);
+
+ // Plot
+ Plot p = cwoaPie.getPlot( );
+ p.getClientArea( ).setBackground( null );
+ p.getClientArea( ).getOutline( ).setVisible( true );
+ p.getOutline( ).setVisible( true );
+
+ // Legend
+ Legend lg = cwoaPie.getLegend( );
+ lg.getText( ).getFont( ).setSize( 16 );
+ lg.setBackground( null );
+ lg.getOutline( ).setVisible( true );
+
+ // Title
+ cwoaPie.getTitle( ).getLabel( ).getCaption( ).setValue( nameField.getColumnHeaderText());
+ cwoaPie.getTitle( ).getOutline( ).setVisible( true );
+
+ //Base Data Set
+ List<String> textLabels = new ArrayList<String>();
+ for (Object obj : objects) {
+ String label = nameField.getValue(obj);
+ textLabels.add(label);
+ }
+ TextDataSet categoryValues = TextDataSetImpl.create(textLabels );
+
+ // Base Series
+ Series seCategory = SeriesImpl.create( );
+ seCategory.setDataSet( categoryValues );
+
+ SeriesDefinition sdBase = SeriesDefinitionImpl.create( );
+ cwoaPie.getSeriesDefinitions( ).add( sdBase );
+ sdBase.getSeriesPalette( ).shift( -1 );
+ sdBase.getSeries( ).add( seCategory );
+
+ SeriesDefinition sdValue = SeriesDefinitionImpl.create( );
+ sdBase.getSeriesDefinitions( ).add( sdValue );
+
+
+ for (IChartField field : valFields) {
+ List<Double> doubleValues = new ArrayList<Double>();
+ for (Object obj : objects) {
+ doubleValues.add(field.getNumber(obj).doubleValue());
+ }
+
+ NumberDataSet Values = NumberDataSetImpl.create(doubleValues);
+
+ // Pie Series
+ PieSeries sePie = (PieSeries) PieSeriesImpl.create( );
+ sePie.setSeriesIdentifier( field.getColumnHeaderText());
+ sePie.setExplosion(3);
+ sePie.setDataSet( Values );
+
+ //Mouse over the Serie to Show Tooltips
+ setTriggering(sePie);
+
+ sdValue.getSeries( ).add( sePie);
+ }
+
+
+ return cwoaPie;
+ }
+
+ /**
+ * Produces a 2D bar chart from the input objects.
+ *
+ * @param objects the input data
+ * @param nameField the field used to get the labels of the objects (the labels of the series groups).
+ * @param valFields the fields providing the values for the different bars in a series group.
+ * @param horizontal if true the bars are displayed horizontally, else vertically.
+ * @return a new 2D bar chart
+ */
+
+ public static final Chart produceBarChart( Object[] objects, final ISTDataViewersField nameField, List<IChartField> valFields, String title,boolean horizontal)
+ {
+ ChartWithAxes cwaBar = ChartWithAxesImpl.create( );
+
+ // Plot
+ cwaBar.getBlock( ).setBackground( ColorDefinitionImpl.WHITE( ) );
+ Plot p = cwaBar.getPlot( );
+ p.getClientArea( )
+ .setBackground( GradientImpl.create( ColorDefinitionImpl.create( 225,
+ 225,
+ 255 ),
+ ColorDefinitionImpl.create( 255, 255, 225 ),
+ -35,
+ false ) );
+ p.getOutline( ).setVisible( true );
+
+ // Title
+ cwaBar.getTitle( ).getLabel( ).getCaption( ).setValue(title);
+ cwaBar.getTitle( ).getOutline( ).setVisible( true );
+
+ //Orientation
+ if (horizontal) cwaBar.setTransposed(true);
+
+ // Legend
+ Legend lg = cwaBar.getLegend( );
+ lg.getText( ).getFont( ).setSize( 16 );
+
+ // X-Axis
+ Axis xAxisPrimary = cwaBar.getPrimaryBaseAxes( )[0];
+ xAxisPrimary.getTitle( ).setVisible( true );
+ xAxisPrimary.setTitlePosition( Position.BELOW_LITERAL );
+ xAxisPrimary.setType( AxisType.TEXT_LITERAL );
+ xAxisPrimary.getMajorGrid( ).setTickStyle( TickStyle.BELOW_LITERAL );
+ xAxisPrimary.getOrigin( ).setType( IntersectionType.VALUE_LITERAL );
+ xAxisPrimary.setLabelPosition( Position.BELOW_LITERAL );
+ xAxisPrimary.getTitle().getCaption( ).setValue(nameField.getColumnHeaderText());
+
+ // Y-Axis
+ Axis yAxisPrimary = cwaBar.getPrimaryOrthogonalAxis( xAxisPrimary );
+ yAxisPrimary.getMajorGrid( ).setTickStyle( TickStyle.LEFT_LITERAL );
+
+
+ double max = -1D;
+ List<String> textLabels = new ArrayList<String>();
+ for (Object obj : objects) {
+ String label = nameField.getValue(obj);
+ textLabels.add(label);
+ }
+ TextDataSet categoryValues = TextDataSetImpl.create(textLabels );
+ SeriesDefinition sdY = SeriesDefinitionImpl.create( );
+ sdY.getSeriesPalette( ).shift( -1 );
+
+ yAxisPrimary.getSeriesDefinitions( ).add( sdY );
+
+ // Data Set
+ for (IChartField field : valFields) {
+ List<Double> doubleValues = new ArrayList<Double>();
+ for (Object obj : objects) {
+
+ Number num = field.getNumber(obj);
+ double longVal = num.doubleValue();
+ max = longVal > max ? longVal : max;
+ doubleValues.add(longVal);
+ }
+
+ NumberDataSet orthoValues = NumberDataSetImpl.create(doubleValues);
+ // Y-Series
+ BarSeries bs = (BarSeries) BarSeriesImpl.create( );
+ bs.setSeriesIdentifier( field.getColumnHeaderText() );
+ bs.setDataSet( orthoValues );
+ bs.setRiserOutline( null );
+
+ //Mouse over the Serie to Show Tooltips
+ setTriggering(bs);
+
+ sdY.getSeries( ).add( bs );
+ }
+
+ // X-Series
+ Series seCategory = SeriesImpl.create( );
+ seCategory.setDataSet( categoryValues );
+ SeriesDefinition sdX = SeriesDefinitionImpl.create( );
+ xAxisPrimary.getSeriesDefinitions( ).add( sdX );
+ sdX.getSeries( ).add( seCategory );
+
+ return cwaBar;
+ }
+
+ /**
+ * @param viewer
+ * @return the field used to provide the labels to the series
+ */
+ public ISTDataViewersField getLabelField(AbstractSTViewer viewer) {
+ return viewer.getAllFields()[0];
+ }
+
+ public static void setTriggering(Series series){
+ //Mouse over the Serie to Show Tooltips
+ Trigger tr = TriggerImpl.create(TriggerCondition.ONMOUSEOVER_LITERAL,
+ ActionImpl.create(ActionType.SHOW_TOOLTIP_LITERAL, TooltipValueImpl.create(200, null)));
+ series.getTriggers().add(tr);
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/provider/ChartUpdateNotifier.java b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/provider/ChartUpdateNotifier.java
new file mode 100644
index 0000000000..c3504df881
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/provider/ChartUpdateNotifier.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.charts.provider;
+
+import org.eclipse.birt.chart.device.EmptyUpdateNotifier;
+import org.eclipse.birt.chart.device.ICallBackNotifier;
+import org.eclipse.birt.chart.model.Chart;
+import org.eclipse.birt.chart.model.attribute.CallBackValue;
+import org.eclipse.swt.widgets.Canvas;
+
+/**
+ * @author Marzia Maugeri <marzia.maugeri@st.com>
+ */
+
+public class ChartUpdateNotifier extends EmptyUpdateNotifier implements ICallBackNotifier{
+ private Canvas preview = null;
+
+ public ChartUpdateNotifier(Canvas preview,Chart designModel, Chart runtimeModel) {
+ super(designModel, runtimeModel);
+ this.preview = preview;
+ }
+
+ public Object peerInstance( )
+ {
+ return preview;
+ }
+
+ @Override
+ public void callback(Object event, Object source, CallBackValue value) {
+
+ }
+
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/provider/IChartField.java b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/provider/IChartField.java
new file mode 100755
index 0000000000..967c58bcfc
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/provider/IChartField.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.charts.provider;
+
+import org.eclipse.linuxtools.dataviewers.abstractviewers.ISTDataViewersField;
+
+/**
+ * The interface used by the charts to get a <code>Number</code> data from a field.
+ *
+ * @author Marzia Maugeri <marzia.maugeri@st.com>
+ *
+ */
+public interface IChartField extends ISTDataViewersField {
+
+ /**
+ * Returns the number to display in the chart for this object.
+ *
+ * @param obj
+ * @return the corresponding number value
+ */
+ public Number getNumber(Object obj);
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/view/ChartView.java b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/view/ChartView.java
new file mode 100755
index 0000000000..a13ce8f8a8
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/view/ChartView.java
@@ -0,0 +1,204 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.charts.view;
+
+
+import org.eclipse.birt.chart.model.Chart;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.linuxtools.dataviewers.charts.Activator;
+import org.eclipse.linuxtools.dataviewers.charts.actions.SaveChartAction;
+import org.eclipse.linuxtools.dataviewers.charts.actions.SaveXMLAction;
+import org.eclipse.linuxtools.dataviewers.charts.viewer.ChartViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.ViewPart;
+
+
+/**
+ * The chart view.
+ *
+ * <br/>This view is multiple and all the created chart will be displayed in an instance of this view.
+ * Each one will have a primary id equals to ChartView.VIEW_ID and an integer (increased by 1 at each new view) for the secondary id.
+ *
+ * @author Marzia Maugeri <marzia.maugeri@st.com>
+ *
+ */
+public class ChartView extends ViewPart {
+
+ /** The primary id of this view */
+ public static final String VIEW_ID = "org.eclipse.linuxtools.dataviewers.charts.view";
+
+ /** The current secondary id for these views */
+ private static Integer SEC_ID = 0;
+
+ private Canvas paintCanvas;
+
+ private ChartViewer chartViewer;
+
+ private SaveChartAction saveChartAction;
+
+ private SaveXMLAction saveXMLAction;
+
+
+
+ /**
+ * Create and open a new chart view
+ * <br/>
+ * <br/><u><b>Note</b></u>: this method uses the UI thread to open the view and then it sets the input chart.
+ * The UI thread execution is synchronized on internal Integer SEC_ID which is the secondary id of the chart view.
+ * Each new chart view has a secondary id equal to SEC_ID++.
+ *
+ * @param chart
+ */
+ public static void createChartView(final Chart chart) {
+ PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+ public void run() {
+ try {
+ synchronized(SEC_ID) {
+ ChartView view = (ChartView)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(VIEW_ID, ""+(SEC_ID++), IWorkbenchPage.VIEW_ACTIVATE);
+ view.setChart(chart);
+
+ }
+ } catch (PartInitException e) {
+ Status s = new Status(
+ Status.ERROR,
+ Activator.PLUGIN_ID,
+ Status.ERROR,
+ e.getMessage(),
+ e);
+ Activator.getDefault().getLog().log(s);
+ }
+ }
+ });
+
+
+ }
+
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ public void createPartControl(Composite parent) {
+ try {
+ paintCanvas = new Canvas( parent, SWT.BORDER );
+ paintCanvas.setLayoutData( new GridData( GridData.FILL_BOTH ) );
+ paintCanvas.setBackground( Display.getDefault( )
+ .getSystemColor( SWT.COLOR_WHITE ) );
+ chartViewer = new ChartViewer( );
+ paintCanvas.addPaintListener( chartViewer );
+ paintCanvas.addControlListener( chartViewer );
+ chartViewer.setViewer( paintCanvas );
+
+
+ createActions(parent);
+ IActionBars actionBars = getViewSite().getActionBars();
+ initToolBar(actionBars.getToolBarManager());
+
+ } catch (Throwable _)
+ {
+ Status s = new Status(
+ Status.ERROR,
+ Activator.PLUGIN_ID,
+ Status.ERROR,
+ "Error when creating AWT Frame...",
+ _);
+ Activator.getDefault().getLog().log(s);
+ }
+ }
+
+ protected void createActions(Composite parent) {
+ saveChartAction = new SaveChartAction(getViewSite().getShell(),this);
+ saveXMLAction = new SaveXMLAction(parent);
+ //openChartAction = new OpenChartAction(getViewSite().getShell(),this);
+ }
+
+ protected void initToolBar(IToolBarManager manager) {
+ manager.add(saveChartAction);
+ manager.add(saveXMLAction);
+ //manager.add(openChartAction);
+ manager.update(true);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+ */
+ @Override
+ public void setFocus() {
+ if (paintCanvas != null) {
+ paintCanvas.setFocus();
+ } else {
+ Status s = new Status(
+ Status.ERROR,
+ Activator.PLUGIN_ID,
+ "Error setting the focus to the chart view: main composite is not set!");
+ Activator.getDefault().getLog().log(s);
+ }
+ }
+
+ /**
+ * Close this view
+ * <br/>
+ * <br/><u><b>Note</b></u>: it uses the UI thread to get the workbench window. Then it closes the view.
+ */
+ public void closeView() {
+ PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+ public void run() {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().hideView(ChartView.this);
+ }
+ });
+ }
+
+ /**
+ * Set the chart in this view
+ *
+ * @param chart
+ */
+ public void setChart(Chart chart) {
+ if (chart != null) {
+ chartViewer.renderModel(chart);
+ saveChartAction.setChart(chart);
+ saveChartAction.setBounds(chartViewer.getBounds());
+ saveXMLAction.setChart(chart);
+
+ } else {
+ saveChartAction.setEnabled(false);
+ Status s = new Status(
+ Status.ERROR,
+ Activator.PLUGIN_ID,
+ "Error adding the chart to the chart view: SWT is not set!");
+ Activator.getDefault().getLog().log(s);
+ }
+ }
+
+ public ChartViewer getChartViewer(){
+ return chartViewer;
+ }
+
+ public void setChartViewer(ChartViewer cv){
+ chartViewer = cv;
+ }
+
+ public void dispose( )
+ {
+ super.dispose( );
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/viewer/ChartViewer.java b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/viewer/ChartViewer.java
new file mode 100755
index 0000000000..447644c9cc
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/dataviewers/charts/viewer/ChartViewer.java
@@ -0,0 +1,252 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Marzia Maugeri <marzia.maugeri@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.dataviewers.charts.viewer;
+
+import org.eclipse.birt.chart.device.IDeviceRenderer;
+import org.eclipse.birt.chart.exception.ChartException;
+import org.eclipse.birt.chart.factory.GeneratedChartState;
+import org.eclipse.birt.chart.factory.Generator;
+import org.eclipse.birt.chart.model.Chart;
+import org.eclipse.birt.chart.model.attribute.Bounds;
+import org.eclipse.birt.chart.model.attribute.impl.BoundsImpl;
+import org.eclipse.birt.chart.util.PluginSettings;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.linuxtools.dataviewers.charts.Activator;
+import org.eclipse.linuxtools.dataviewers.charts.actions.ChartActionRenderer;
+import org.eclipse.linuxtools.dataviewers.charts.provider.ChartUpdateNotifier;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.ControlListener;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Display;
+
+
+/**
+ *
+ * @author Marzia Maugeri <marzia.maugeri@st.com>
+ *
+ */
+public class ChartViewer implements PaintListener, ControlListener
+{
+
+ private transient Canvas preview = null;
+
+ private Chart cm = null;
+
+ private transient boolean bIsPainting = false;
+
+ private transient Image buffer;
+
+ private static int X_OFFSET = 3;
+
+ private static int Y_OFFSET = 3;
+
+ private GeneratedChartState gcs = null;
+
+ private IDeviceRenderer deviceRenderer = null;
+
+ private Bounds bo;
+
+ public ChartViewer( )
+ {
+ try {
+ deviceRenderer = PluginSettings.instance( ).getDevice( "dv.SWT" );
+ } catch (ChartException e) {
+ Status s = new Status(
+ Status.ERROR,
+ Activator.PLUGIN_ID,
+ Status.ERROR,
+ e.getMessage(),
+ e);
+ Activator.getDefault().getLog().log(s);
+ }
+
+ }
+ /**
+ * @param cm
+ * Chart Model
+ */
+ public void renderModel( Chart cm )
+ {
+ this.cm = cm;
+
+ if ( preview != null && !preview.isDisposed( ) )
+ {
+ updateBuffer( );
+ preview.redraw( );
+ }
+ }
+
+ public Bounds getBounds()
+ {
+ return bo;
+ }
+
+ public Chart getChart(){
+ return cm;
+ }
+
+ /**
+ * Generate and render the chart model,the chart image is stored in a
+ * buffer. The buffer will be updated only when the chart model is changed.
+ */
+ private void updateBuffer( )
+ {
+ if ( bIsPainting )
+ {
+ return;
+ }
+ Throwable paintError = null;
+
+ Rectangle re = preview.getClientArea( );
+ final Rectangle adjustedRe = new Rectangle( 0, 0, re.width, re.height );
+
+ if ( adjustedRe.width - 2 * X_OFFSET <= 0
+ || adjustedRe.height - 2 * Y_OFFSET <= 0 )
+ {
+ if ( buffer != null && !buffer.isDisposed( ) )
+ {
+ buffer.dispose( );
+ buffer = null;
+ }
+ return;
+ }
+
+ if ( cm == null )
+ {
+ buffer = null;
+ }
+ else
+ {
+ bIsPainting = true;
+ Image oldBuffer = null;
+ if ( buffer == null )
+ {
+ buffer = new Image( Display.getDefault( ), adjustedRe );
+ }
+ else
+ {
+ Rectangle ore = buffer.getBounds( );
+
+ oldBuffer = buffer;
+
+ if ( !adjustedRe.equals( ore ) )
+ {
+ buffer = new Image( Display.getDefault( ), adjustedRe );
+ }
+ }
+
+ GC gc = new GC( buffer );
+
+ // fill default background as white.
+ gc.setForeground( Display.getDefault( )
+ .getSystemColor( SWT.COLOR_WHITE ) );
+ gc.fillRectangle( buffer.getBounds( ) );
+
+ bo = BoundsImpl.create( X_OFFSET,
+ Y_OFFSET,
+ adjustedRe.width - 2 * X_OFFSET,
+ adjustedRe.height - 2 * Y_OFFSET );
+
+
+ try
+ {
+ deviceRenderer.setProperty( IDeviceRenderer.GRAPHICS_CONTEXT,gc );
+
+ bo.scale( 72d / deviceRenderer.getDisplayServer( )
+ .getDpiResolution( ) ); // CONVERT TO POINTS
+
+ // GENERATE AND RENDER THE CHART
+ final Generator gr = Generator.instance( );
+
+ gcs = gr.build(deviceRenderer.getDisplayServer( ), cm, bo, null, null, null);
+ gcs.getRunTimeContext().setActionRenderer( new ChartActionRenderer());
+ deviceRenderer.setProperty(IDeviceRenderer.UPDATE_NOTIFIER,
+ new ChartUpdateNotifier(preview,cm, gcs.getChartModel()));
+ gr.render(deviceRenderer, gcs);
+ }
+ catch ( Exception ex )
+ {
+ paintError = ex;
+ }
+
+ if ( paintError != null )
+ {
+ buffer = oldBuffer;
+ }
+ if ( oldBuffer != null && oldBuffer != buffer )
+ {
+ oldBuffer.dispose( );
+ }
+ bIsPainting = false;
+ }
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.swt.events.PaintListener#paintControl(org.eclipse.swt.events.PaintEvent)
+ */
+ public void paintControl( PaintEvent pe )
+ {
+ GC gc = pe.gc;
+ if ( buffer != null )
+ {
+ gc.drawImage( buffer, 0, 0 );
+ }
+ }
+
+ /**
+ * Set the preview canvas.
+ *
+ * @param paintCanvas
+ */
+ public void setViewer( Canvas paintCanvas )
+ {
+ this.preview = paintCanvas;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.events.ControlListener#controlMoved(org.eclipse.swt.events.ControlEvent)
+ */
+ public void controlMoved( ControlEvent e )
+ {
+ if ( preview != null && !preview.isDisposed( ) )
+ {
+ updateBuffer( );
+ preview.redraw( );
+ }
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.events.ControlListener#controlResized(org.eclipse.swt.events.ControlEvent)
+ */
+ public void controlResized( ControlEvent e )
+ {
+ if ( preview != null && !preview.isDisposed( ) )
+ {
+ updateBuffer( );
+ preview.redraw( );
+ }
+ }
+
+ public void setBuffer(Image buffer){
+ this.buffer = buffer;
+ }
+
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov-feature/.project b/gcov/org.eclipse.linuxtools.gcov-feature/.project
new file mode 100755
index 0000000000..922960597b
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov-feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.gcov-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/gcov/org.eclipse.linuxtools.gcov-feature/build.properties b/gcov/org.eclipse.linuxtools.gcov-feature/build.properties
new file mode 100755
index 0000000000..804860c5ac
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov-feature/build.properties
@@ -0,0 +1,8 @@
+bin.includes = feature.xml,\
+ feature.properties,\
+ epl-v10.html,\
+ license.html
+src.includes = feature.xml,\
+ feature.properties,\
+ epl-v10.html,\
+ license.html
diff --git a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/docs/epl-v10.html b/gcov/org.eclipse.linuxtools.gcov-feature/epl-v10.html
index 9321f4082e..9321f4082e 100644..100755
--- a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/docs/epl-v10.html
+++ b/gcov/org.eclipse.linuxtools.gcov-feature/epl-v10.html
diff --git a/gcov/org.eclipse.linuxtools.gcov-feature/feature.properties b/gcov/org.eclipse.linuxtools.gcov-feature/feature.properties
new file mode 100755
index 0000000000..be4bda4917
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov-feature/feature.properties
@@ -0,0 +1,138 @@
+#*******************************************************************************
+# 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, Inc. - initial API and implementation
+#********************************************************************************
+featureName=GCov Integration (Incubation)
+description=Functionality to integrate GCov with the workbench.
+featureProvider=Eclipse Linux Tools
+copyright=Copyright 2009, 2010 Red Hat, Inc.
+licenseURL=license.html
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\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\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this 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 Foundation source code\n\
+repository ("Repository") in software 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\
+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\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update 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" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your 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\
+ - 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\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+ 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+ the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+ extending or updating the functionality of an Eclipse-based product.\n\
+ 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+ Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+ 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+ govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+ Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+ with the Specification. Such Installable Software Agreement must inform the user of the\n\
+ terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+ the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+ indication of agreement by the user, the provisioning Technology will complete installation\n\
+ of the Installable Software.\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, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
diff --git a/gcov/org.eclipse.linuxtools.gcov-feature/feature.xml b/gcov/org.eclipse.linuxtools.gcov-feature/feature.xml
new file mode 100755
index 0000000000..72a9463a80
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov-feature/feature.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.linuxtools.gcov"
+ label="%featureName"
+ version="0.4.1.qualifier"
+ provider-name="%featureProvider">
+
+ <description>
+ %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>
+
+ <plugin
+ id="org.eclipse.linuxtools.gcov"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.binutils"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.dataviewers"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.dataviewers.charts"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.dataviewers.annotatedsourceeditor"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/gcov/org.eclipse.linuxtools.gcov-feature/license.html b/gcov/org.eclipse.linuxtools.gcov-feature/license.html
new file mode 100644
index 0000000000..c184ca36a9
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov-feature/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 14, 2010</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 Foundation source code
+ repository (&quot;Repository&quot;) in software 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 Provisioning Technology (as defined below), 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>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>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ (&quot;Specification&quot;).</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
+ on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<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>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/.classpath b/gcov/org.eclipse.linuxtools.gcov.test/.classpath
new file mode 100644
index 0000000000..1ca8caa222
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/.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/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry excluding="**/.svn/**" kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/.project b/gcov/org.eclipse.linuxtools.gcov.test/.project
new file mode 100644
index 0000000000..ea8b6fd7b9
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.gcov.test</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/gcov/org.eclipse.linuxtools.gcov.test/.settings/org.eclipse.jdt.core.prefs b/gcov/org.eclipse.linuxtools.gcov.test/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..4ec955916f
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Fri Jan 16 09:19:58 CET 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/META-INF/MANIFEST.MF b/gcov/org.eclipse.linuxtools.gcov.test/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..7340221115
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/META-INF/MANIFEST.MF
@@ -0,0 +1,9 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.linuxtools.gcov.test
+Bundle-Version: 4.1.1.qualifier
+Bundle-Vendor: %bundleProvider
+Fragment-Host: org.eclipse.linuxtools.gcov
+Require-Bundle: org.junit
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/about.html b/gcov/org.eclipse.linuxtools.gcov.test/about.html
new file mode 100644
index 0000000000..0c6525d9a8
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/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/gcov/org.eclipse.linuxtools.gcov.test/build.properties b/gcov/org.eclipse.linuxtools.gcov.test/build.properties
new file mode 100644
index 0000000000..e70eafab1d
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ test.xml,\
+ plugin.properties,\
+ test_c/,\
+ test_cpp/,\
+ about.html
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/plugin.properties b/gcov/org.eclipse.linuxtools.gcov.test/plugin.properties
new file mode 100644
index 0000000000..cec757f7d2
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/plugin.properties
@@ -0,0 +1,12 @@
+#******************************************************************************
+# Copyright (c) 2009 STMicroelectronics.
+# All rights reserved. This program and the accompanying materials
+# are made available under the 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:
+# Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+#*******************************************************************************
+bundleProvider = Eclipse Linux Tools
+bundleName = Gcov Test Plug-in (Incubation) \ No newline at end of file
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/gcov/test/AllGcovTests.java b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/gcov/test/AllGcovTests.java
new file mode 100755
index 0000000000..b44f96ab5a
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/gcov/test/AllGcovTests.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllGcovTests {
+
+ public static Test suite() {
+ TestSuite ats = new TestSuite("Tests for org.eclipse.linuxtools.gcov.test");
+ //$JUnit-BEGIN$
+ ats.addTest(GcovGCDARetrieverTest.suite());
+ ats.addTest(GcovParserTest.suite());
+// Comment out until we fix bug #299995
+// ats.addTest(GcovViewTest.suite());
+ //$JUnit-END$
+ return ats;
+ }
+
+} \ No newline at end of file
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/gcov/test/GcovGCDARetrieverTest.java b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/gcov/test/GcovGCDARetrieverTest.java
new file mode 100755
index 0000000000..92f2ee1252
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/gcov/test/GcovGCDARetrieverTest.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.test;
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.List;
+
+import junit.framework.Assert;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.linuxtools.gcov.Activator;
+import org.eclipse.linuxtools.gcov.parser.CovManager;
+
+public class GcovGCDARetrieverTest extends TestCase {
+
+ public GcovGCDARetrieverTest() {
+ }
+
+ public static Test suite() {
+ TestSuite ats = new TestSuite("Gcov:GCDA_Retriever");
+ File[] testDirs = STJunitUtils.getTestDirs(Activator.PLUGIN_ID + ".test", "test.*");
+ for (File testDir : testDirs) {
+ final String[] covFiles = GcovTestUtils.getGCDANames(testDir);
+ final File binaryFile = GcovTestUtils.getBinary(testDir);
+ ats.addTest(
+ new TestCase(testDir.getName() + ":GCDA_Retriever") {
+ public void runTest() throws Throwable {
+ testGcdaRetriever(binaryFile, covFiles);
+ }
+ }
+ );
+ }
+ return ats;
+ }
+
+
+ public static void testGcdaRetriever(
+ File binaryFile, String[] covFilesPaths)
+ throws Exception {
+ CovManager covManager = new CovManager(binaryFile.getAbsolutePath());
+ List<String> list = covManager.getGCDALocations();
+ String[] generatedCovFilesPath = new String[list.size()];
+ int index = 0;
+ for (String string : list) {
+ int i = string.lastIndexOf('/');
+ string = string.substring(i+1);
+ i = string.lastIndexOf('\\');
+ string = string.substring(i+1);
+ generatedCovFilesPath[index] = string;
+ index++;
+ }
+ Arrays.sort(generatedCovFilesPath);
+ boolean b = Arrays.equals(generatedCovFilesPath, covFilesPaths);
+ Assert.assertEquals("May be normal if binary not complied with gcov options", true, b);
+ }
+
+} \ No newline at end of file
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/gcov/test/GcovParserTest.java b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/gcov/test/GcovParserTest.java
new file mode 100755
index 0000000000..1c0b5c6096
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/gcov/test/GcovParserTest.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.test;
+
+import java.io.File;
+import java.io.PrintStream;
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.linuxtools.gcov.Activator;
+import org.eclipse.linuxtools.gcov.parser.CovManager;
+
+public class GcovParserTest extends TestCase {
+
+ public GcovParserTest() {
+ }
+
+
+ public static Test suite() {
+ TestSuite ats = new TestSuite("Gcov:Parser");
+ File[] testDirs = STJunitUtils.getTestDirs(Activator.PLUGIN_ID + ".test", "test.*");
+ for (File testDir : testDirs) {
+ final List<String> covPaths = GcovTestUtils.getGCDAPath(testDir);
+ final File binaryFile = GcovTestUtils.getBinary(testDir);
+ final File parserRefFile = new File(testDir, "testProcessCovFiles.ref");
+ final File parserDumpFile = new File(testDir, "testProcessCovFiles.dump");
+ ats.addTest(
+ new TestCase(testDir.getName() + ":Parser") {
+ public void runTest() throws Throwable {
+ testGcovParsing(binaryFile, covPaths, parserRefFile, parserDumpFile);
+ }
+ }
+ );
+ }
+ return ats;
+ }
+
+ public static void testGcovParsing(
+ File binaryFile, List<String> covFilesPaths,
+ File parserRefFile, File parserDumpFile)
+ throws Exception {
+ CovManager covManager = new CovManager(binaryFile.getAbsolutePath());
+ covManager.processCovFiles(covFilesPaths);
+ covManager.dumpProcessCovFilesResult(new PrintStream(parserDumpFile));
+ STJunitUtils.compareIgnoreEOL(parserDumpFile.getAbsolutePath(), parserRefFile.getAbsolutePath(), true);
+ }
+
+} \ No newline at end of file
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/gcov/test/GcovTestUtils.java b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/gcov/test/GcovTestUtils.java
new file mode 100755
index 0000000000..bd128bd383
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/gcov/test/GcovTestUtils.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.test;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FilenameFilter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import junit.framework.Assert;
+
+public class GcovTestUtils {
+ public static final String GCOV_FILE_SUFFIX = ".gcda";
+ public static final String GCOV_BINARY_FILE_SUFFIX = ".out";
+ public static final String GCOV_DIRECTORY_SUFFIX = "_gcov_input";
+
+ public static String[] getGCDANames(File directory) {
+ String[] covFiles = directory.list(new FilenameFilter() {
+ public boolean accept(File dir, String name) {
+ return name.endsWith(GCOV_FILE_SUFFIX);
+ }
+ });
+ Arrays.sort(covFiles);
+ return covFiles;
+ }
+
+ public static File[] getGCDA(File directory) {
+ File[] covFiles = directory.listFiles(new FileFilter() {
+ public boolean accept(File arg0) {
+ return ( arg0.isDirectory() == false && arg0.getName().endsWith(GCOV_FILE_SUFFIX));
+ }
+ });
+ Arrays.sort(covFiles);
+ return covFiles;
+ }
+
+ public static List<String> getGCDAPath(File directory) {
+ File[] covFiles = getGCDA(directory);
+ final List<String> covPaths = new ArrayList<String>(covFiles.length);
+ for (File file : covFiles) {
+ covPaths.add(file.getAbsolutePath());
+ }
+ return covPaths;
+ }
+
+ public static File getBinary(File directory) {
+ File[] binaries = directory.listFiles(new FileFilter() {
+ public boolean accept(File arg1) {
+ return ( !arg1.isDirectory() && arg1.getName().endsWith(GCOV_BINARY_FILE_SUFFIX));
+ }
+ });
+ Assert.assertEquals(1, binaries.length);
+ return binaries[0];
+ }
+
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/gcov/test/GcovViewTest.java b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/gcov/test/GcovViewTest.java
new file mode 100755
index 0000000000..a49fcd1023
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/gcov/test/GcovViewTest.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.test;
+
+import java.io.File;
+import java.util.List;
+import java.util.Locale;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.linuxtools.gcov.Activator;
+import org.eclipse.linuxtools.gcov.action.SwitchContentProviderAction;
+import org.eclipse.linuxtools.gcov.parser.CovManager;
+import org.eclipse.linuxtools.gcov.view.CovFileContentProvider;
+import org.eclipse.linuxtools.gcov.view.CovFolderContentProvider;
+import org.eclipse.linuxtools.gcov.view.CovFunctionContentProvider;
+import org.eclipse.linuxtools.gcov.view.CovView;
+
+public class GcovViewTest extends TestCase {
+
+ public GcovViewTest() {
+ }
+
+ public static Test suite() {
+ TestSuite emptyTestSuite = new TestSuite();
+ return emptyTestSuite;
+// Comment out until we fix bug #299995
+// TestSuite ats = new TestSuite("GCov:View");
+// File[] testDirs = STJunitUtils.getTestDirs(Activator.PLUGIN_ID + ".test", "test.*");
+//
+// for (File testDir : testDirs) {
+// final List<String> covFilesPaths = GcovTestUtils.getGCDAPath(testDir);
+// final File binary = GcovTestUtils.getBinary(testDir);
+// final File folderRefFile = new File(testDir, "testViewFolder.ref");
+// final File folderDumpFile = new File(testDir, "testViewFolder.dump");
+// final File fileRefFile = new File(testDir, "testView.ref");
+// final File fileDumpFile = new File(testDir, "testView.dump");
+// final File functionRefFile = new File(testDir, "testViewFunction.ref");
+// final File functionDumpFile = new File(testDir, "testViewFunction.dump");
+// ats.addTest(
+// new TestCase(testDir.getName() + ":CSV-DIRECTORY") {
+// public void runTest() throws Throwable {
+// testView(
+// covFilesPaths, binary,
+// CovFolderContentProvider.sharedInstance,
+// folderRefFile, folderDumpFile
+// );
+// }
+// }
+// );
+// ats.addTest(
+// new TestCase(testDir.getName() + ":CSV-FILE") {
+// public void runTest() throws Throwable {
+// testView(
+// covFilesPaths, binary,
+// CovFileContentProvider.sharedInstance,
+// fileRefFile, fileDumpFile
+// );
+// }
+// }
+// );
+// ats.addTest(
+// new TestCase(testDir.getName() + ":CSV-FUNCTION") {
+// public void runTest() throws Throwable {
+// testView(
+// covFilesPaths, binary,
+// CovFunctionContentProvider.sharedInstance,
+// functionRefFile, functionDumpFile
+// );
+// }
+// }
+// );
+// }
+// return ats;
+ }
+
+
+ public static void testView(
+ List<String> covFilesPaths, File binaryFile,
+ ITreeContentProvider provider,
+ File refFile, File dumpFile) throws Exception {
+ Locale.setDefault( Locale.US );
+ CovManager cvrgeMnger = new CovManager(binaryFile.getAbsolutePath());
+ cvrgeMnger.processCovFiles(covFilesPaths);
+ // generate model for view
+ cvrgeMnger.fillGcovView();
+ //load an Eclipse view
+ CovView cvrgeView = CovView.displayCovResults(cvrgeMnger);
+
+ SwitchContentProviderAction action = new SwitchContentProviderAction(
+ "test", "icons/directory_obj.gif",
+ cvrgeView.getSTViewer().getViewer(),
+ provider
+ );
+ action.run();
+ STJunitUtils.testCSVExport(cvrgeView, dumpFile.getAbsolutePath(), refFile.getAbsolutePath());
+
+ }
+
+} \ No newline at end of file
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/gcov/test/STJunitUtils.java b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/gcov/test/STJunitUtils.java
new file mode 100755
index 0000000000..39cdeeea99
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/src/org/eclipse/linuxtools/gcov/test/STJunitUtils.java
@@ -0,0 +1,267 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.test;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.LineNumberReader;
+import java.net.URL;
+
+import junit.framework.Assert;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.linuxtools.dataviewers.abstractview.AbstractSTDataView;
+import org.eclipse.linuxtools.dataviewers.abstractviewers.STDataViewersCSVExporter;
+import org.osgi.framework.Bundle;
+
+
+/**
+ * This class only contains some tools to facilitate tests
+ * (compare)
+ * @author Xavier Raynaud <xavier.raynaud@st.com>
+ */
+public class STJunitUtils {
+
+
+ /**
+ * Test CSV export of the given view
+ * @param view
+ * @param dumpFullFileName
+ * @param refFullFileName
+ */
+ public static void testCSVExport(AbstractSTDataView view, String dumpFullFileName, String refFullFileName) {
+ STDataViewersCSVExporter exporter = new STDataViewersCSVExporter(view.getSTViewer());
+ exporter.exportTo(dumpFullFileName, new NullProgressMonitor());
+ // compare with ref
+ compareCSVIgnoreEOL(dumpFullFileName, refFullFileName, true);
+ }
+
+ /**
+ * Utility method to compare files
+ * @param dumpFile
+ * @param refFile
+ */
+ public static boolean compare(String dumpFile, String refFile, boolean deleteDumpFileIfOk) {
+ String message = "Comparing ref file ("+refFile+ ")and dump file (" +
+ dumpFile+")";
+ boolean equals = false;
+ System.out.println(message);
+ try {
+ InputStream is1 = new FileInputStream(dumpFile);
+ InputStream is2 = new FileInputStream(refFile);
+ equals = compare(is1, is2);
+ if (!equals) {
+ System.out.println(message + "... FAILED");
+ junit.framework.Assert.assertEquals(message + ": not correspond ", true, false);
+ }
+ else {
+ System.out.println(message + "... successful");
+ }
+ // delete dump only for successful tests
+ if (equals && deleteDumpFileIfOk)
+ new File(dumpFile).delete();
+ }catch (FileNotFoundException _) {
+ message += "... FAILED: One of these files may not exist";
+ System.out.println(message);
+ junit.framework.Assert.assertNull(message, _);
+ }
+ catch (Exception _) {
+ message += ": exception raised ... FAILED";
+ System.out.println(message);
+ junit.framework.Assert.assertNull(message, _);
+ }
+ return equals;
+ }
+
+ /**
+ * Utility method to compare files
+ * @param dumpFile
+ * @param refFile
+ * @return
+ */
+ public static boolean compareIgnoreEOL(String dumpFile, String refFile, boolean deleteDumpFileIfOk) {
+ String message = "Comparing ref file ("+refFile+ ")and dump file (" +
+ dumpFile+")";
+ boolean equals = false;
+ try {
+ LineNumberReader is1 = new LineNumberReader(new FileReader(dumpFile));
+ LineNumberReader is2 = new LineNumberReader(new FileReader(refFile));
+ do {
+ String line1 = is1.readLine();
+ String line2 = is2.readLine();
+ if (line1 == null) {
+ if (line2 == null) {
+ equals = true;
+ }
+ break;
+ } else if (line2 == null || !line1.equals(line2)) {
+ break;
+ }
+ } while (true);
+
+ if (!equals) {
+ junit.framework.Assert.assertEquals(message + ": not correspond ", true, false);
+ }
+
+ is1.close();
+ is2.close();
+ // delete dump only for successful tests
+ if (equals && deleteDumpFileIfOk) {
+ new File(dumpFile).delete();
+ }
+ }catch (FileNotFoundException _) {
+ message += "... FAILED: One of these files may not exist";
+ junit.framework.Assert.assertNull(message, _);
+ }
+ catch (Exception _) {
+ message += ": exception raised ... FAILED";
+ junit.framework.Assert.assertNull(message, _);
+ }
+ return equals;
+ }
+
+ /**
+ * Utility method to compare exported CSV files
+ * @param dumpFile
+ * @param refFile
+ * @return
+ */
+ public static boolean compareCSVIgnoreEOL(String dumpFile, String refFile, boolean deleteDumpFileIfOk) {
+ String message = "Comparing ref file ("+refFile+ ")and dump file (" +
+ dumpFile+")";
+ boolean equals = false;
+ String str = "[in-charge]"; // this string can be dumped according to binutils version installed on local machine
+
+ try {
+ LineNumberReader is1 = new LineNumberReader(new FileReader(dumpFile));
+ LineNumberReader is2 = new LineNumberReader(new FileReader(refFile));
+ do {
+ String line1 = is1.readLine();
+ String line2 = is2.readLine();
+ int length = str.length();
+ if (line1 == null) {
+ if (line2 == null) {
+ equals = true;
+ }
+ break;
+ } else if (line1.contains(str)){
+ int idx = line1.indexOf("[in-charge]");
+ char c = line1.charAt(idx -1);
+ if (c == ' ' ){
+ idx--;
+ length++;
+ }
+ line1 = line1.substring(0, idx) + line1.substring(idx+length, line1.length());
+ if (!line1.equals(line2))
+ break;
+ } else if (line2 == null || !line1.equals(line2)) {
+ break;
+ }
+ } while (true);
+
+ if (!equals) {
+ junit.framework.Assert.assertEquals(message + ": not correspond ", true, false);
+ }
+
+ is1.close();
+ is2.close();
+ // delete dump only for successful tests
+ if (equals && deleteDumpFileIfOk) {
+ new File(dumpFile).delete();
+ }
+ }catch (FileNotFoundException _) {
+ message += "... FAILED: One of these files may not exist";
+ junit.framework.Assert.assertNull(message, _);
+ }
+ catch (Exception _) {
+ message += ": exception raised ... FAILED";
+ junit.framework.Assert.assertNull(message, _);
+ }
+ return equals;
+ }
+
+ /**
+ * Utility method to compare Input streams
+ * @param ISdump
+ * @param ISref
+ * @return
+ * @throws IOException
+ */
+ public static boolean compare(InputStream ISdump, InputStream ISref) throws IOException {
+ try {
+ boolean equals = false;
+ do {
+ int char1 = ISdump.read();
+ int char2 = ISref.read();
+ if (char1 != char2)
+ break;
+ if (char1 == -1) {
+ equals = true;
+ break;
+ }
+ } while (true);
+ return equals;
+ } finally {
+ ISdump.close();
+ ISref.close();
+ }
+ }
+
+ /**
+ * Gets the absolute path of a resource in the given plugin
+ * @param pluginId
+ * @param relativeName
+ * @return an absolute path to a file
+ */
+ public static String getAbsolutePath(String pluginId, String relativeName) {
+ Bundle b = Platform.getBundle(pluginId);
+ URL url = FileLocator.find(b, new Path(relativeName), null);
+ try {
+ url = FileLocator.toFileURL(url);
+ } catch (IOException e) {
+ Assert.assertNotNull("Problem locating " + relativeName + " in" + pluginId,e);
+ }
+ String filename = url.getFile();
+ return filename;
+ }
+
+ /**
+ * Utility method
+ * @param pluginDirectory: the plugin where to look for directories
+ * @param regexp: the regexp used for matching directories
+ * @return the list of directories that belong to the pluginDirectory and
+ * ends with the given extensionSuffix
+ */
+ public static File[] getTestDirs(String pluginDirectory, final String regexp) {
+ // load directories containing tests
+ String filename = getAbsolutePath(pluginDirectory, ".");
+ File dir = new File(filename);
+ File[] testDirs = dir.listFiles(
+ new FileFilter() {
+ public boolean accept(File arg0) {
+ return (arg0.isDirectory() && arg0.getName().matches(regexp));
+ }
+ }
+ );
+
+ // test if there is any directory samples
+ Assert.assertNotNull("No project files to test",testDirs);
+ return testDirs;
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test.xml b/gcov/org.eclipse.linuxtools.gcov.test/test.xml
new file mode 100755
index 0000000000..0d6d7f896e
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+
+<project name="testsuite" default="run" basedir=".">
+ <property name="classname" value="org.eclipse.linuxtools.gcov.test.AllGcovTests" />
+ <property name="plugin-name" value="org.eclipse.linuxtools.gcov.test" />
+
+ <!-- The property ${eclipse-home} should be passed into this script -->
+ <!-- Set a meaningful default value for when it is not. -->
+ <property name="eclipse-home" value="${basedir}/../../" />
+
+ <property name="library-file" value="${eclipse-home}/dropins/${subProjectName2}/plugins/org.eclipse.test/library.xml" />
+
+ <!-- This target holds all initialization code that needs to be done for -->
+ <!-- all tests that are to be run. Initialization for individual tests -->
+ <!-- should be done within the body of the suite target. -->
+ <target name="init">
+ <tstamp />
+ <delete>
+ <fileset dir="${eclipse-home}" includes="org*.xml" />
+ </delete>
+ </target>
+
+ <!-- This target defines the tests that need to be run. -->
+ <target name="gcov_suite">
+ <property name="gcov-folder" value="${eclipse-home}/gcov_folder" />
+ <delete dir="${gcov-folder}" quiet="true" />
+ <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="data-dir" value="${gcov-folder}" />
+ <property name="plugin-name" value="${plugin-name}" />
+ <property name="classname" value="${classname}" />
+ </ant>
+ </target>
+
+ <!-- This target holds code to cleanup the testing environment after -->
+ <!-- all of the tests have been run. You can use this target to -->
+ <!-- delete temporary files that have been created. -->
+ <target name="cleanup">
+ <mkdir dir="${results}/consolelogs" />
+ <copy failonerror="false" file="${eclipse-home}/results/${classname}.txt" tofile="${results}/consolelogs/${classname}_${platform}.metadata.log.txt" />
+ </target>
+
+ <!-- This target runs the test suite. Any actions that need to happen -->
+ <!-- after all the tests have been run should go here. -->
+ <target name="run" depends="init,gcov_suite,cleanup">
+ <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="includes" value="org*.xml" />
+ <property name="output-file" value="${plugin-name}.xml" />
+ </ant>
+ </target>
+
+ <target name="all" depends="run" description="Dummy target to run all tests">
+ </target>
+
+</project>
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_c/Makefile b/gcov/org.eclipse.linuxtools.gcov.test/test_c/Makefile
new file mode 100644
index 0000000000..9771c05d92
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_c/Makefile
@@ -0,0 +1,8 @@
+build a.out:
+ gcc -fprofile-arcs -ftest-coverage *.c
+
+all: a.out
+ ./$< 1 2 3 4 5 6
+
+clean:
+ rm -f *.o a.out *.gcno *.gcda
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_c/a.out b/gcov/org.eclipse.linuxtools.gcov.test/test_c/a.out
new file mode 100755
index 0000000000..baebd86bc4
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_c/a.out
Binary files differ
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_c/fact.c b/gcov/org.eclipse.linuxtools.gcov.test/test_c/fact.c
new file mode 100644
index 0000000000..f37737a19b
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_c/fact.c
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+long mult(long val1, long val2);
+
+long fact(long val)
+{
+ int k = 100;
+ for (; k-->0;);
+ if (val == 1) return 1;
+ return mult(val,fact(val-1));
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_c/fact.gcda b/gcov/org.eclipse.linuxtools.gcov.test/test_c/fact.gcda
new file mode 100644
index 0000000000..0515b5e761
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_c/fact.gcda
Binary files differ
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_c/fact.gcno b/gcov/org.eclipse.linuxtools.gcov.test/test_c/fact.gcno
new file mode 100644
index 0000000000..d9242a8f6a
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_c/fact.gcno
Binary files differ
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_c/main.c b/gcov/org.eclipse.linuxtools.gcov.test/test_c/main.c
new file mode 100644
index 0000000000..6065d93cd4
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_c/main.c
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+
+long fact(long val);
+
+int main(int argc, char** argv)
+{
+ int i = 1;
+ for (; i<argc; i++)
+ {
+ unsigned long val = strtol(argv[i],NULL,10);
+ unsigned long res = fact(val);
+ int k = 1000;
+ for (; k-->0;);
+ printf("%li! = %li\n", val, res);
+ }
+ return 0;
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_c/main.gcda b/gcov/org.eclipse.linuxtools.gcov.test/test_c/main.gcda
new file mode 100644
index 0000000000..bcbaaacca0
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_c/main.gcda
Binary files differ
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_c/main.gcno b/gcov/org.eclipse.linuxtools.gcov.test/test_c/main.gcno
new file mode 100644
index 0000000000..3581c9812a
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_c/main.gcno
Binary files differ
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_c/mult.c b/gcov/org.eclipse.linuxtools.gcov.test/test_c/mult.c
new file mode 100644
index 0000000000..62abaa9230
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_c/mult.c
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+long mult(long val1, long val2)
+{
+ int k = 50;
+ long res = 0;
+ for (; k-->0;);
+ while(val2-->0)
+ {
+ res += val1;
+ }
+ return res;
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_c/mult.gcda b/gcov/org.eclipse.linuxtools.gcov.test/test_c/mult.gcda
new file mode 100644
index 0000000000..12b1038d72
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_c/mult.gcda
Binary files differ
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_c/mult.gcno b/gcov/org.eclipse.linuxtools.gcov.test/test_c/mult.gcno
new file mode 100644
index 0000000000..d7b49a8ab0
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_c/mult.gcno
Binary files differ
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_c/testProcessCovFiles.ref b/gcov/org.eclipse.linuxtools.gcov.test/test_c/testProcessCovFiles.ref
new file mode 100644
index 0000000000..bdb5e5113e
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_c/testProcessCovFiles.ref
@@ -0,0 +1,30 @@
+Parse gcda and gcno files done, resolve graph algorithm executed, now display results
+- PRINT FUNCTIONS ARRAY :
+-- FUNCTION 0
+ name = fact
+ instrumentd lines = 5
+ executed lines = 5
+-- FUNCTION 1
+ name = main
+ instrumentd lines = 9
+ executed lines = 9
+-- FUNCTION 2
+ name = mult
+ instrumentd lines = 7
+ executed lines = 7
+- PRINT SRCS ARRAY :
+-- FILE 0
+ name = fact.c
+ total lines = 19
+ instrumentd lines = 5
+ executed lines = 5
+-- FILE 1
+ name = main.c
+ total lines = 28
+ instrumentd lines = 9
+ executed lines = 9
+-- FILE 2
+ name = mult.c
+ total lines = 21
+ instrumentd lines = 7
+ executed lines = 7
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_c/testView.ref b/gcov/org.eclipse.linuxtools.gcov.test/test_c/testView.ref
new file mode 100644
index 0000000000..2dc8ff6d24
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_c/testView.ref
@@ -0,0 +1,8 @@
+Hierarchy;Name;Total Lines;Instrumented Lines;Executed Lines;Coverage %
++-;Summary;68;21;21;100.0
+ +-;fact.c;19;5;5;100.0
+ | +-;fact;;5;5;100.0
+ +-;main.c;28;9;9;100.0
+ | +-;main;;9;9;100.0
+ +-;mult.c;21;7;7;100.0
+ +-;mult;;7;7;100.0
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_c/testViewFolder.ref b/gcov/org.eclipse.linuxtools.gcov.test/test_c/testViewFolder.ref
new file mode 100644
index 0000000000..2f8156b321
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_c/testViewFolder.ref
@@ -0,0 +1,9 @@
+Hierarchy;Name;Total Lines;Instrumented Lines;Executed Lines;Coverage %
++-;Summary;68;21;21;100.0
+ +-;?;68;21;21;100.0
+ +-;fact.c;19;5;5;100.0
+ | +-;fact;;5;5;100.0
+ +-;main.c;28;9;9;100.0
+ | +-;main;;9;9;100.0
+ +-;mult.c;21;7;7;100.0
+ +-;mult;;7;7;100.0
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_c/testViewFunction.ref b/gcov/org.eclipse.linuxtools.gcov.test/test_c/testViewFunction.ref
new file mode 100644
index 0000000000..c24b61658c
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_c/testViewFunction.ref
@@ -0,0 +1,5 @@
+Hierarchy;Name;Total Lines;Instrumented Lines;Executed Lines;Coverage %
++-;Summary;68;21;21;100.0
+ +-;fact;;5;5;100.0
+ +-;main;;9;9;100.0
+ +-;mult;;7;7;100.0
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/Makefile b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/Makefile
new file mode 100644
index 0000000000..e3c2b86045
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/Makefile
@@ -0,0 +1,8 @@
+build a.out:
+ g++ -fprofile-arcs -ftest-coverage *.cpp
+
+all: a.out
+ ./$< 1 2 3 4 5 6
+
+clean:
+ rm -f *.o a.out *.gcno *.gcda
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/a.out b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/a.out
new file mode 100755
index 0000000000..794f7f9e8d
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/a.out
Binary files differ
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/fact.cpp b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/fact.cpp
new file mode 100644
index 0000000000..cb1e7c803c
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/fact.cpp
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+#include "fact.hpp"
+#include "mult.hpp"
+
+namespace F
+{
+
+fact::fact() {};
+
+fact::~fact() {};
+
+long fact::f(long val)
+{
+ for (int k = 100; k-->0;);
+ if (val == 1) return 1;
+ M::mult m;
+ return m.multiply(val,f(val-1));
+}
+}
+
+
+
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/fact.gcda b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/fact.gcda
new file mode 100644
index 0000000000..042f39be7e
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/fact.gcda
Binary files differ
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/fact.gcno b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/fact.gcno
new file mode 100644
index 0000000000..be33eb2319
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/fact.gcno
Binary files differ
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/fact.hpp b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/fact.hpp
new file mode 100644
index 0000000000..32a9296041
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/fact.hpp
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+
+namespace F
+{
+
+ class fact
+ {
+ public:
+ fact();
+ ~fact();
+ long f(long val);
+ };
+
+}
+
+
+
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/main.cpp b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/main.cpp
new file mode 100644
index 0000000000..d3c4e21788
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/main.cpp
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+#include <iostream>
+#include <stdlib.h>
+#include "fact.hpp"
+
+
+int main(int argc, char** argv)
+{
+ int i = 1;
+ for (; i<argc; i++)
+ {
+ for (int k = 1000; k-->0;);
+ unsigned long val = strtol(argv[i],NULL,10);
+ F::fact f;
+ unsigned long res = f.f(val);
+ std::cout << val
+ << "! = "
+ << res
+ << std::endl;
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/main.gcda b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/main.gcda
new file mode 100644
index 0000000000..073c23e09d
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/main.gcda
Binary files differ
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/main.gcno b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/main.gcno
new file mode 100644
index 0000000000..4f642e74ec
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/main.gcno
Binary files differ
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/mult.cpp b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/mult.cpp
new file mode 100644
index 0000000000..bd55274fa2
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/mult.cpp
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+#include "mult.hpp"
+
+namespace M
+{
+mult::mult() {};
+
+mult::~mult() {};
+
+long mult::multiply(long val1, long val2)
+{
+ for (int k = 50; k-->0;);
+ long res = 0;
+ while(val2-->0)
+ {
+ res += val1;
+ }
+ return res;
+};
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/mult.gcda b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/mult.gcda
new file mode 100644
index 0000000000..e2821df67c
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/mult.gcda
Binary files differ
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/mult.gcno b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/mult.gcno
new file mode 100644
index 0000000000..b5f1fcd994
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/mult.gcno
Binary files differ
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/mult.hpp b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/mult.hpp
new file mode 100644
index 0000000000..3d3f147356
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/mult.hpp
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+namespace M
+{
+ class mult
+ {
+ public:
+ mult();
+
+ ~mult();
+
+ long multiply(long val1, long val2);
+ };
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/testProcessCovFiles.ref b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/testProcessCovFiles.ref
new file mode 100644
index 0000000000..10a2316b09
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/testProcessCovFiles.ref
@@ -0,0 +1,148 @@
+Parse gcda and gcno files done, resolve graph algorithm executed, now display results
+- PRINT FUNCTIONS ARRAY :
+-- FUNCTION 0
+ name = _ZN1F4factC2Ev
+ instrumentd lines = 1
+ executed lines = 0
+-- FUNCTION 1
+ name = _ZN1F4factC1Ev
+ instrumentd lines = 0
+ executed lines = 1
+-- FUNCTION 2
+ name = _ZN1F4factD2Ev
+ instrumentd lines = 1
+ executed lines = 0
+-- FUNCTION 3
+ name = _ZN1F4factD1Ev
+ instrumentd lines = 0
+ executed lines = 1
+-- FUNCTION 4
+ name = _ZN1F4fact1fEl
+ instrumentd lines = 5
+ executed lines = 5
+-- FUNCTION 5
+ name = _ZStorSt12_Ios_IostateS_
+ instrumentd lines = 2
+ executed lines = 0
+-- FUNCTION 6
+ name = _ZNSolsEPFRSoS_E
+ instrumentd lines = 2
+ executed lines = 0
+-- FUNCTION 7
+ name = _ZNKSt9basic_iosIcSt11char_traitsIcEE7rdstateEv
+ instrumentd lines = 2
+ executed lines = 0
+-- FUNCTION 8
+ name = _Z41__static_initialization_and_destruction_0ii
+ instrumentd lines = 2
+ executed lines = 2
+-- FUNCTION 9
+ name = _GLOBAL__I_main
+ instrumentd lines = 0
+ executed lines = 0
+-- FUNCTION 10
+ name = _ZNSt9basic_iosIcSt11char_traitsIcEE8setstateESt12_Ios_Iostate
+ instrumentd lines = 2
+ executed lines = 0
+-- FUNCTION 11
+ name = _ZNSt11char_traitsIcE6lengthEPKc
+ instrumentd lines = 2
+ executed lines = 0
+-- FUNCTION 12
+ name = _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
+ instrumentd lines = 5
+ executed lines = 0
+-- FUNCTION 13
+ name = _ZNSolsEm
+ instrumentd lines = 2
+ executed lines = 0
+-- FUNCTION 14
+ name = main
+ instrumentd lines = 8
+ executed lines = 8
+-- FUNCTION 15
+ name = _ZSt13__check_facetISt5ctypeIcEERKT_PS3_
+ instrumentd lines = 4
+ executed lines = 0
+-- FUNCTION 16
+ name = _ZNKSt5ctypeIcE5widenEc
+ instrumentd lines = 5
+ executed lines = 0
+-- FUNCTION 17
+ name = _ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
+ instrumentd lines = 2
+ executed lines = 0
+-- FUNCTION 18
+ name = _ZSt5flushIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
+ instrumentd lines = 2
+ executed lines = 0
+-- FUNCTION 19
+ name = _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
+ instrumentd lines = 2
+ executed lines = 0
+-- FUNCTION 20
+ name = _ZN1M4multC2Ev
+ instrumentd lines = 1
+ executed lines = 0
+-- FUNCTION 21
+ name = _ZN1M4multC1Ev
+ instrumentd lines = 0
+ executed lines = 1
+-- FUNCTION 22
+ name = _ZN1M4multD2Ev
+ instrumentd lines = 1
+ executed lines = 0
+-- FUNCTION 23
+ name = _ZN1M4multD1Ev
+ instrumentd lines = 0
+ executed lines = 1
+-- FUNCTION 24
+ name = _ZN1M4mult8multiplyEll
+ instrumentd lines = 6
+ executed lines = 6
+- PRINT SRCS ARRAY :
+-- FILE 0
+ name = fact.cpp
+ total lines = 27
+ instrumentd lines = 7
+ executed lines = 7
+-- FILE 1
+ name = /sw/gnu_compil/gnu/Linux-RH-WS-3/.package/gcc-4.4.1/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/../../../../include/c++/4.4.1/bits/ios_base.h
+ total lines = 168
+ instrumentd lines = 2
+ executed lines = 0
+-- FILE 2
+ name = /sw/gnu_compil/gnu/Linux-RH-WS-3/.package/gcc-4.4.1/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/../../../../include/c++/4.4.1/ostream
+ total lines = 561
+ instrumentd lines = 13
+ executed lines = 0
+-- FILE 3
+ name = /sw/gnu_compil/gnu/Linux-RH-WS-3/.package/gcc-4.4.1/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/../../../../include/c++/4.4.1/bits/basic_ios.h
+ total lines = 441
+ instrumentd lines = 10
+ executed lines = 0
+-- FILE 4
+ name = main.cpp
+ total lines = 31
+ instrumentd lines = 9
+ executed lines = 9
+-- FILE 5
+ name = /sw/gnu_compil/gnu/Linux-RH-WS-3/.package/gcc-4.4.1/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/../../../../include/c++/4.4.1/iostream
+ total lines = 73
+ instrumentd lines = 1
+ executed lines = 1
+-- FILE 6
+ name = /sw/gnu_compil/gnu/Linux-RH-WS-3/.package/gcc-4.4.1/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/../../../../include/c++/4.4.1/bits/char_traits.h
+ total lines = 264
+ instrumentd lines = 2
+ executed lines = 0
+-- FILE 7
+ name = /sw/gnu_compil/gnu/Linux-RH-WS-3/.package/gcc-4.4.1/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/../../../../include/c++/4.4.1/bits/locale_facets.h
+ total lines = 871
+ instrumentd lines = 5
+ executed lines = 0
+-- FILE 8
+ name = mult.cpp
+ total lines = 28
+ instrumentd lines = 8
+ executed lines = 8
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/testView.ref b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/testView.ref
new file mode 100644
index 0000000000..af0eefbb03
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/testView.ref
@@ -0,0 +1,36 @@
+Hierarchy;Name;Total Lines;Instrumented Lines;Executed Lines;Coverage %
++-;Summary;2464;57;25;43.86
+ +-;basic_ios.h;441;10;0;0.0
+ | +-;std::basic_ios<char, std::char_traits<char> >::rdstate() const;;2;0;0.0
+ | +-;std::basic_ios<char, std::char_traits<char> >::setstate(std::_Ios_Iostate);;2;0;0.0
+ | +-;std::basic_ios<char, std::char_traits<char> >::widen(char) const;;2;0;0.0
+ | +-;std::ctype<char> const& std::__check_facet<std::ctype<char> >(std::ctype<char> const*);;4;0;0.0
+ +-;char_traits.h;264;2;0;0.0
+ | +-;std::char_traits<char>::length(char const*);;2;0;0.0
+ +-;fact.cpp;27;7;7;100.0
+ | +-;F::fact::f(long);;5;5;100.0
+ | +-;F::fact::fact();;0;1;0.0
+ | +-;F::fact::fact();;1;0;0.0
+ | +-;F::fact::~fact();;0;1;0.0
+ | +-;F::fact::~fact();;1;0;0.0
+ +-;ios_base.h;168;2;0;0.0
+ | +-;std::operator|(std::_Ios_Iostate, std::_Ios_Iostate);;2;0;0.0
+ +-;iostream;73;1;1;100.0
+ +-;locale_facets.h;871;5;0;0.0
+ | +-;std::ctype<char>::widen(char) const;;5;0;0.0
+ +-;main.cpp;31;9;9;100.0
+ | +-;__static_initialization_and_destruction_0(int, int);;2;2;100.0
+ | +-;global constructors keyed to main;;0;0;0.0
+ | +-;main;;8;8;100.0
+ +-;mult.cpp;28;8;8;100.0
+ | +-;M::mult::mult();;0;1;0.0
+ | +-;M::mult::mult();;1;0;0.0
+ | +-;M::mult::multiply(long, long);;6;6;100.0
+ | +-;M::mult::~mult();;0;1;0.0
+ | +-;M::mult::~mult();;1;0;0.0
+ +-;ostream;561;13;0;0.0
+ +-;std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&);;2;0;0.0
+ +-;std::basic_ostream<char, std::char_traits<char> >& std::flush<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&);;2;0;0.0
+ +-;std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*);;5;0;0.0
+ +-;std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&));;2;0;0.0
+ +-;std::basic_ostream<char, std::char_traits<char> >::operator<<(unsigned long);;2;0;0.0
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/testViewFolder.ref b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/testViewFolder.ref
new file mode 100644
index 0000000000..ef35963330
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/testViewFolder.ref
@@ -0,0 +1,39 @@
+Hierarchy;Name;Total Lines;Instrumented Lines;Executed Lines;Coverage %
++-;Summary;2464;57;25;43.86
+ +-;4.4.1;634;14;1;7.14
+ | +-;iostream;73;1;1;100.0
+ | +-;ostream;561;13;0;0.0
+ | +-;std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&);;2;0;0.0
+ | +-;std::basic_ostream<char, std::char_traits<char> >& std::flush<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&);;2;0;0.0
+ | +-;std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*);;5;0;0.0
+ | +-;std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&));;2;0;0.0
+ | +-;std::basic_ostream<char, std::char_traits<char> >::operator<<(unsigned long);;2;0;0.0
+ +-;?;86;24;24;100.0
+ | +-;fact.cpp;27;7;7;100.0
+ | | +-;F::fact::f(long);;5;5;100.0
+ | | +-;F::fact::fact();;0;1;0.0
+ | | +-;F::fact::fact();;1;0;0.0
+ | | +-;F::fact::~fact();;0;1;0.0
+ | | +-;F::fact::~fact();;1;0;0.0
+ | +-;main.cpp;31;9;9;100.0
+ | | +-;__static_initialization_and_destruction_0(int, int);;2;2;100.0
+ | | +-;global constructors keyed to main;;0;0;0.0
+ | | +-;main;;8;8;100.0
+ | +-;mult.cpp;28;8;8;100.0
+ | +-;M::mult::mult();;0;1;0.0
+ | +-;M::mult::mult();;1;0;0.0
+ | +-;M::mult::multiply(long, long);;6;6;100.0
+ | +-;M::mult::~mult();;0;1;0.0
+ | +-;M::mult::~mult();;1;0;0.0
+ +-;bits;1744;19;0;0.0
+ +-;basic_ios.h;441;10;0;0.0
+ | +-;std::basic_ios<char, std::char_traits<char> >::rdstate() const;;2;0;0.0
+ | +-;std::basic_ios<char, std::char_traits<char> >::setstate(std::_Ios_Iostate);;2;0;0.0
+ | +-;std::basic_ios<char, std::char_traits<char> >::widen(char) const;;2;0;0.0
+ | +-;std::ctype<char> const& std::__check_facet<std::ctype<char> >(std::ctype<char> const*);;4;0;0.0
+ +-;char_traits.h;264;2;0;0.0
+ | +-;std::char_traits<char>::length(char const*);;2;0;0.0
+ +-;ios_base.h;168;2;0;0.0
+ | +-;std::operator|(std::_Ios_Iostate, std::_Ios_Iostate);;2;0;0.0
+ +-;locale_facets.h;871;5;0;0.0
+ +-;std::ctype<char>::widen(char) const;;5;0;0.0
diff --git a/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/testViewFunction.ref b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/testViewFunction.ref
new file mode 100644
index 0000000000..e8a0cbb4f8
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov.test/test_cpp/testViewFunction.ref
@@ -0,0 +1,27 @@
+Hierarchy;Name;Total Lines;Instrumented Lines;Executed Lines;Coverage %
++-;Summary;2464;57;25;43.86
+ +-;F::fact::f(long);;5;5;100.0
+ +-;F::fact::fact();;0;1;0.0
+ +-;F::fact::fact();;1;0;0.0
+ +-;F::fact::~fact();;0;1;0.0
+ +-;F::fact::~fact();;1;0;0.0
+ +-;M::mult::mult();;0;1;0.0
+ +-;M::mult::mult();;1;0;0.0
+ +-;M::mult::multiply(long, long);;6;6;100.0
+ +-;M::mult::~mult();;0;1;0.0
+ +-;M::mult::~mult();;1;0;0.0
+ +-;__static_initialization_and_destruction_0(int, int);;2;2;100.0
+ +-;global constructors keyed to main;;0;0;0.0
+ +-;main;;8;8;100.0
+ +-;std::basic_ios<char, std::char_traits<char> >::rdstate() const;;2;0;0.0
+ +-;std::basic_ios<char, std::char_traits<char> >::setstate(std::_Ios_Iostate);;2;0;0.0
+ +-;std::basic_ios<char, std::char_traits<char> >::widen(char) const;;2;0;0.0
+ +-;std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&);;2;0;0.0
+ +-;std::basic_ostream<char, std::char_traits<char> >& std::flush<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&);;2;0;0.0
+ +-;std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*);;5;0;0.0
+ +-;std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&));;2;0;0.0
+ +-;std::basic_ostream<char, std::char_traits<char> >::operator<<(unsigned long);;2;0;0.0
+ +-;std::char_traits<char>::length(char const*);;2;0;0.0
+ +-;std::ctype<char> const& std::__check_facet<std::ctype<char> >(std::ctype<char> const*);;4;0;0.0
+ +-;std::ctype<char>::widen(char) const;;5;0;0.0
+ +-;std::operator|(std::_Ios_Iostate, std::_Ios_Iostate);;2;0;0.0
diff --git a/gcov/org.eclipse.linuxtools.gcov/.classpath b/gcov/org.eclipse.linuxtools.gcov/.classpath
new file mode 100644
index 0000000000..a87b062760
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/.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/JavaSE-1.6"/>
+ <classpathentry exported="true" kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry excluding="**/.svn/**" kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/gcov/org.eclipse.linuxtools.gcov/.project b/gcov/org.eclipse.linuxtools.gcov/.project
new file mode 100644
index 0000000000..7c48214893
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.gcov</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/gcov/org.eclipse.linuxtools.gcov/.settings/org.eclipse.jdt.core.prefs b/gcov/org.eclipse.linuxtools.gcov/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..3d3c172187
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Thu Jan 15 16:04:09 CET 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/gcov/org.eclipse.linuxtools.gcov/META-INF/MANIFEST.MF b/gcov/org.eclipse.linuxtools.gcov/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..e5efc5e0c0
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/META-INF/MANIFEST.MF
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.linuxtools.gcov;singleton:=true
+Bundle-Version: 4.1.1.qualifier
+Bundle-Activator: org.eclipse.linuxtools.gcov.Activator
+Bundle-Vendor: %bundleProvider
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.linuxtools.dataviewers,
+ org.eclipse.core.filesystem,
+ org.eclipse.core.variables,
+ org.eclipse.ui.ide,
+ org.eclipse.ui.editors,
+ org.eclipse.linuxtools.binutils,
+ org.eclipse.cdt.core,
+ org.eclipse.cdt.ui,
+ org.eclipse.jface.text,
+ org.eclipse.debug.ui,
+ org.eclipse.linuxtools.dataviewers.charts,
+ org.eclipse.linuxtools.dataviewers.annotatedsourceeditor
+Export-Package: org.eclipse.linuxtools.gcov.utils,
+ org.eclipse.linuxtools.gcov.view
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-Localization: plugin
diff --git a/gcov/org.eclipse.linuxtools.gcov/about.html b/gcov/org.eclipse.linuxtools.gcov/about.html
new file mode 100644
index 0000000000..c258ef55d8
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse 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>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/gcov/org.eclipse.linuxtools.gcov/build.properties b/gcov/org.eclipse.linuxtools.gcov/build.properties
new file mode 100644
index 0000000000..a4d0a62e79
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = .,\
+ META-INF/,\
+ icons/,\
+ plugin.xml,\
+ about.html,\
+ plugin.properties \ No newline at end of file
diff --git a/gcov/org.eclipse.linuxtools.gcov/icons/c_file_obj.gif b/gcov/org.eclipse.linuxtools.gcov/icons/c_file_obj.gif
new file mode 100644
index 0000000000..915b7f479b
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/icons/c_file_obj.gif
Binary files differ
diff --git a/gcov/org.eclipse.linuxtools.gcov/icons/directory_obj.gif b/gcov/org.eclipse.linuxtools.gcov/icons/directory_obj.gif
new file mode 100644
index 0000000000..7937f33e02
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/icons/directory_obj.gif
Binary files differ
diff --git a/gcov/org.eclipse.linuxtools.gcov/icons/function_obj.gif b/gcov/org.eclipse.linuxtools.gcov/icons/function_obj.gif
new file mode 100644
index 0000000000..08aef8f7cd
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/icons/function_obj.gif
Binary files differ
diff --git a/gcov/org.eclipse.linuxtools.gcov/icons/src_file_obj.gif b/gcov/org.eclipse.linuxtools.gcov/icons/src_file_obj.gif
new file mode 100644
index 0000000000..8fd6adbd9f
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/icons/src_file_obj.gif
Binary files differ
diff --git a/gcov/org.eclipse.linuxtools.gcov/icons/toggle.gif b/gcov/org.eclipse.linuxtools.gcov/icons/toggle.gif
new file mode 100644
index 0000000000..62a7d865e5
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/icons/toggle.gif
Binary files differ
diff --git a/gcov/org.eclipse.linuxtools.gcov/plugin.properties b/gcov/org.eclipse.linuxtools.gcov/plugin.properties
new file mode 100644
index 0000000000..f29e54aba7
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/plugin.properties
@@ -0,0 +1,16 @@
+#******************************************************************************
+# Copyright (c) 2009 STMicroelectronics.
+# All rights reserved. This program and the accompanying materials
+# are made available under the 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:
+# Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+#*******************************************************************************
+bundleProvider = Eclipse Linux Tools
+bundleName = Gcov Plug-in (Incubation)
+gcovEditor = Gcov Editor
+gcov = gcov
+gcovDescription = Gcov view displays the profiling information contained in gcda/gcno files
+gcovCategory = gcov \ No newline at end of file
diff --git a/gcov/org.eclipse.linuxtools.gcov/plugin.xml b/gcov/org.eclipse.linuxtools.gcov/plugin.xml
new file mode 100644
index 0000000000..35247d61b6
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/plugin.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.views">
+ <category
+ id="org.eclipse.linuxtools.gcov"
+ name="%gcovCategory">
+ </category>
+ <view
+ allowMultiple="true"
+ category="org.eclipse.linuxtools.gcov"
+ class="org.eclipse.linuxtools.gcov.view.CovView"
+ icon="icons/toggle.gif"
+ id="org.eclipse.linuxtools.gcov.view"
+ name="%gcov"
+ restorable="false">
+ </view>
+ </extension>
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.eclipse.linuxtools.gcov.view.annotatedsource.STAnnotatedSourceNotFoundEditor"
+ icon="icons/src_file_obj.gif"
+ id="org.eclipse.linuxtools.gcov.view.annotatedsource.STAnnotatedSourceNotFoundEditor"
+ name="Source Not Found">
+ </editor>
+ <editor
+ extensions="gcda, gcno"
+ icon="icons/toggle.gif"
+ id="org.eclipse.linuxtools.gcov.editor"
+ launcher="org.eclipse.linuxtools.gcov.action.OpenGCAction"
+ name="%gcovEditor">
+ </editor>
+ </extension>
+
+
+</plugin>
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/Activator.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/Activator.java
new file mode 100644
index 0000000000..e595b1dd0d
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/Activator.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+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 plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.gcov";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ 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);
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/action/OpenGCAction.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/action/OpenGCAction.java
new file mode 100644
index 0000000000..bfc86b41ae
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/action/OpenGCAction.java
@@ -0,0 +1,166 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.action;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.IBinary;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.linuxtools.gcov.Activator;
+import org.eclipse.linuxtools.gcov.dialog.OpenGCDialog;
+import org.eclipse.linuxtools.gcov.view.CovView;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorLauncher;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ * Action performed when user clicks on a gcda/gcno file
+ *
+ * @author Xavier Raynaud <xavier.raynaud@st.com>
+ */
+public class OpenGCAction implements IEditorLauncher {
+
+ public void open(IPath file) {
+ Shell shell = PlatformUI.getWorkbench().getDisplay().getActiveShell();
+ String extension = file.getFileExtension();
+ File gcno;
+ File gcda;
+ if ("gcno".equals(extension)) {
+ IPath file2 = file.removeFileExtension().addFileExtension("gcda");
+ gcno = file.toFile();
+ gcda = file2.toFile();
+ } else if ("gcda".equals(extension)) {
+ IPath file2 = file.removeFileExtension().addFileExtension("gcno");
+ gcda = file.toFile();
+ gcno = file2.toFile();
+
+ } else {
+ // should never occurs
+ return;
+ }
+
+ if (gcda == null || !gcda.isFile()) {
+ String msg = "File " + gcda + " does not exist.";
+ msg += "\nPlease run your application at least once.";
+ MessageDialog.openError(shell, "gcov Error", msg);
+ return;
+ }
+ if (gcno == null || !gcno.isFile()) {
+ String msg = "File " + gcno + " does not exist.";
+ msg += "\nPlease recompile your application.";
+ MessageDialog.openError(shell, "gcov Error", msg);
+ return;
+ }
+
+
+ String s = getDefaultBinary(file);
+ OpenGCDialog d = new OpenGCDialog(shell, s, file);
+ if (d.open() != OpenGCDialog.OK) {
+ return;
+ }
+ String binaryPath = d.getBinaryFile();
+ if (d.isCompleteCoverageResultWanted()) {
+ CovView.displayCovResults(binaryPath);
+ } else {
+ CovView.displayCovDetailedResult(binaryPath, gcda.getAbsolutePath());
+ }
+ }
+
+ private String getDefaultBinary(IPath file) {
+ File gmonFile = file.toFile();
+ File parent = gmonFile.getParentFile();
+ File info = new File(parent,"AnalysisInfo.txt");
+ IProject project = null;
+ IFile ifile = null;
+ try {
+ String line;
+ String tab[];
+ if (info.exists()) {
+ BufferedReader br = new BufferedReader(new FileReader(info.toString()));
+
+ while ((line = br.readLine())!= null){
+ tab = line.split("=");
+ String name="", value="";
+ if (tab.length > 1){
+ name=tab[0];
+ value=tab[1].trim();
+ if (name.equals("Project Name ")){
+ project = ResourcesPlugin.getWorkspace().getRoot().getProject(value);
+ }
+ else if (name.equals("Program Name ")){
+ if(project != null){
+ ifile = project.getFile(value);
+ br.close();
+ if (ifile.exists()) {
+ return ifile.getLocation().toString();
+ }
+ }
+ }
+ }
+ }
+ }else{
+ IFile c = ResourcesPlugin.getWorkspace().getRoot()
+ .getFileForLocation(file);
+ if (c != null) {
+ project = c.getProject();
+ if (project != null && project.exists()) {
+ ICProject cproject = CoreModel.getDefault().create(project);
+ if (cproject != null) {
+ try {
+ IBinary[] b = cproject.getBinaryContainer()
+ .getBinaries();
+ if (b != null && b.length > 0 && b[0] != null) {
+ IResource r = b[0].getResource();
+ return r.getLocation().toOSString();
+ }
+ } catch (CModelException _) {
+ }
+ }
+ }
+ }
+ }
+ } catch (FileNotFoundException e) {
+ Status status = new Status(
+ Status.WARNING,
+ Activator.PLUGIN_ID,
+ IStatus.WARNING,
+ e.getMessage(),
+ e
+ );
+ Activator.getDefault().getLog().log(status);
+ } catch (IOException e) {
+ Status status = new Status(
+ Status.ERROR,
+ Activator.PLUGIN_ID,
+ IStatus.ERROR,
+ e.getMessage(),
+ e
+ );
+ Activator.getDefault().getLog().log(status);
+ }
+ return "";
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/action/SwitchContentProviderAction.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/action/SwitchContentProviderAction.java
new file mode 100644
index 0000000000..b1ac0f24f0
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/action/SwitchContentProviderAction.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.action;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.ColumnViewer;
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.linuxtools.gcov.Activator;
+
+
+ /**
+ * This action changes the content provider
+ */
+
+ public class SwitchContentProviderAction extends Action {
+
+ private final ColumnViewer viewer;
+ private final IContentProvider provider;
+
+ public SwitchContentProviderAction(String name, String iconPath, ColumnViewer viewer, IContentProvider provider) {
+ super(name, AS_RADIO_BUTTON);
+ this.setImageDescriptor(Activator.getImageDescriptor(iconPath));
+ this.setToolTipText(name);
+ this.viewer = viewer;
+ this.provider = provider;
+ }
+
+ @Override
+ public void run() {
+ viewer.getControl().setRedraw(false);
+ viewer.setContentProvider(provider);
+ ((TreeViewer)viewer).expandToLevel(2);
+ viewer.getControl().setRedraw(true);
+ }
+ } \ No newline at end of file
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/dialog/OpenGCDialog.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/dialog/OpenGCDialog.java
new file mode 100644
index 0000000000..1d8b3ceb95
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/dialog/OpenGCDialog.java
@@ -0,0 +1,303 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.dialog;
+
+import java.io.File;
+
+import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.variables.IStringVariableManager;
+import org.eclipse.core.variables.VariablesPlugin;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.linuxtools.binutils.utils.STSymbolManager;
+import org.eclipse.linuxtools.gcov.Activator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
+import org.eclipse.ui.dialogs.ISelectionStatusValidator;
+import org.eclipse.ui.model.WorkbenchContentProvider;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+import org.eclipse.ui.views.navigator.ResourceComparator;
+
+
+/**
+ * This dialog box is opened when user clicks on a gcno/gcda file.
+ * it allows the user to choose the binary file who produced the gcno/gcda file.
+ * @author Xavier Raynaud <xavier.raynaud@st.com>
+ *
+ */
+public class OpenGCDialog extends Dialog {
+
+ /* Inputs */
+ private Text binText;
+ private String binValue;
+
+ private Button openThisFileOnlyButton;
+ private Button openCoverageSummaryButton;
+ private boolean openCoverageSummary = true;
+
+ /* buttons */
+ private Button binBrowseWorkspaceButton;
+ private Button binBrowseFileSystemButton;
+
+ /* error label */
+ private Label errorLabel;
+
+ /* validation boolean */
+ private boolean binaryValid;
+
+ /* internal listener */
+ private final BinaryModifyListener binModifyListener = new BinaryModifyListener();
+
+ private final String defaultValue;
+ private final IPath gcFile;
+
+ /**
+ * Constructor
+ * @param parentShell
+ * @param binPath the path to a binary file.
+ */
+ public OpenGCDialog(Shell parentShell, String binPath, IPath gcFile) {
+ super(parentShell);
+ this.gcFile = gcFile;
+ setShellStyle(getShellStyle() | SWT.RESIZE);
+ this.defaultValue = binPath;
+ }
+
+ /**
+ * Gets the Binary file selected by the user
+ * @return a path to a binary file
+ */
+ public String getBinaryFile() {
+ return binValue;
+ }
+
+ /**
+ * Gets whether the user wants a complete coverage result, or a result specific file to the given gcFile.
+ */
+ public boolean isCompleteCoverageResultWanted() {
+ return openCoverageSummary;
+ }
+
+
+ protected Control createContents(Composite parent) {
+ Control composite = super.createContents(parent);
+ validateBinary();
+ return composite;
+ }
+
+ protected Control createDialogArea(Composite parent) {
+ this.getShell().setText("Gcov - Open coverage results...");
+ Composite composite = (Composite) super.createDialogArea(parent);
+
+ /* first line */
+ Group c = new Group(composite, SWT.NONE);
+ c.setText("Binary File");
+ c.setToolTipText("Please enter here the binary file who produced this gcov trace.");
+ GridLayout layout = new GridLayout(2,false);
+ c.setLayout(layout);
+ GridData data = new GridData(GridData.FILL_BOTH);
+ c.setLayoutData(data);
+
+ Label binLabel = new Label(c,SWT.NONE);
+ binLabel.setText("Please enter here the binary file who produced gcov trace");
+ data = new GridData();
+ data.horizontalSpan = 2;
+ binLabel.setLayoutData(data);
+
+ binText = new Text(c,SWT.BORDER);
+ binText.setText(this.defaultValue);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
+ binText.setLayoutData(data);
+ binText.addModifyListener(binModifyListener);
+
+ Composite cbBin = new Composite(c,SWT.NONE);
+ data = new GridData(GridData.HORIZONTAL_ALIGN_END);
+ cbBin.setLayoutData(data);
+ cbBin.setLayout(new GridLayout(2, true));
+ binBrowseWorkspaceButton = new Button(cbBin, SWT.PUSH);
+ binBrowseWorkspaceButton.setText("&Workspace...");
+ binBrowseWorkspaceButton.addSelectionListener(
+ new SelectionAdapter()
+ {
+ public void widgetSelected(SelectionEvent sev)
+ {
+ handleBrowseWorkspace("Open Binary file...", binText);
+ }
+ }
+ );
+ binBrowseFileSystemButton = new Button(cbBin, SWT.PUSH);
+ binBrowseFileSystemButton.setText("&File System...");
+ binBrowseFileSystemButton.addSelectionListener(
+ new SelectionAdapter()
+ {
+ public void widgetSelected(SelectionEvent sev)
+ {
+ handleBrowse("Open Binary file...", binText);
+ }
+ }
+ );
+
+ Group covMode = new Group(composite, SWT.NONE);
+ covMode.setText("Coverage result");
+ covMode.setToolTipText("Please choose the result scope.");
+ GridData covModeData = new GridData(GridData.FILL_BOTH);
+ covMode.setLayoutData(covModeData);
+ covMode.setLayout(new GridLayout());
+ openThisFileOnlyButton = new Button(covMode, SWT.RADIO);
+ openThisFileOnlyButton.setLayoutData(new GridData());
+ openCoverageSummaryButton = new Button(covMode, SWT.RADIO);
+ openCoverageSummaryButton.setLayoutData(new GridData());
+ String cFile = gcFile.removeFileExtension().lastSegment() + ".c";
+
+ openThisFileOnlyButton.setText("Show coverage details for \"" + cFile + "\" only.");
+ openCoverageSummaryButton.setText("Show coverage for the whole selected binary file");
+
+ openCoverageSummaryButton.setSelection(true);
+
+ SelectionAdapter sa = new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent sev)
+ {
+ openCoverageSummary = openCoverageSummaryButton.getSelection();
+ }
+ };
+ openCoverageSummaryButton.addSelectionListener(sa);
+ openThisFileOnlyButton.addSelectionListener(sa);
+
+
+ /* 2sd line */
+ errorLabel = new Label(composite,SWT.NONE);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 3;
+ errorLabel.setLayoutData(data);
+ errorLabel.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_RED));
+
+ c.layout();
+
+ return composite;
+ }
+
+ private void validateBinary() {
+ binValue = binText.getText();
+ IStringVariableManager mgr = VariablesPlugin.getDefault().getStringVariableManager();
+ try {
+ binValue = mgr.performStringSubstitution(binValue, false);
+ } catch (CoreException _) {
+ // do nothing: never occurs
+ }
+
+ File f = new File(binValue);
+ if (f.exists()) {
+ IBinaryObject binary = STSymbolManager.sharedInstance.getBinaryObject(new Path(binValue));
+ if (binary == null) {
+ MessageDialog.openError(
+ PlatformUI.getWorkbench().getDisplay().getActiveShell(),
+ "Invalid binary file",
+ binText.getText() + " is not a valid binary file.");
+ return;
+ }
+ binaryValid = true;
+ getButton(IDialogConstants.OK_ID).setEnabled(binaryValid);
+ errorLabel.setText("");
+ } else {
+ binaryValid = false;
+ getButton(IDialogConstants.OK_ID).setEnabled(false);
+ if (!binValue.equals("")) {
+ errorLabel.setText("\"" + binText.getText() + "\" doesn't exist");
+ } else {
+ errorLabel.setText("Please enter a binary file");
+ }
+ return;
+ }
+ }
+
+ private class BinaryModifyListener implements ModifyListener
+ {
+ public void modifyText(ModifyEvent e) {
+ validateBinary();
+ }
+
+ }
+
+ protected void handleBrowseWorkspace(String msg, Text text) {
+ ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
+ dialog.setTitle(msg);
+ dialog.setMessage(msg);
+ dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
+ dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
+ dialog.setAllowMultiple(false);
+ IContainer c = ResourcesPlugin.getWorkspace().getRoot().getContainerForLocation(this.gcFile);
+ if (c != null) dialog.setInitialSelection(c.getProject());
+ dialog.setValidator(new ISelectionStatusValidator() {
+ public IStatus validate(Object[] selection)
+ {
+ if (selection.length != 1) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0, "", null); //$NON-NLS-1$
+ }
+ if (!(selection[0] instanceof IFile)) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0, "", null); //$NON-NLS-1$
+ }
+ return new Status(IStatus.OK, Activator.PLUGIN_ID, 0, "", null); //$NON-NLS-1$
+ }
+ });
+ if (dialog.open() == IDialogConstants.OK_ID) {
+ IResource resource = (IResource) dialog.getFirstResult();
+ text.setText("${resource_loc:" + resource.getFullPath() + "}");
+ }
+ }
+
+
+ protected void handleBrowse(String msg, Text text)
+ {
+ FileDialog dialog = new FileDialog(this.getShell(),SWT.OPEN);
+ dialog.setText(msg);
+ String t = text.getText();
+ IStringVariableManager mgr = VariablesPlugin.getDefault().getStringVariableManager();
+ try {
+ t = mgr.performStringSubstitution(t, false);
+ } catch (CoreException _) {
+ // do nothing: never occurs
+ }
+ File f = new File(t);
+ t = f.getParent();
+ if (t == null || t.length() == 0) {
+ t = this.gcFile.removeLastSegments(1).toOSString();
+ }
+ dialog.setFilterPath(t);
+ String s = dialog.open();
+ if (s != null) text.setText(s);
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/model/AbstractTreeElement.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/model/AbstractTreeElement.java
new file mode 100644
index 0000000000..0fcce342d6
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/model/AbstractTreeElement.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.model;
+
+import java.util.LinkedList;
+
+public abstract class AbstractTreeElement implements TreeElement{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -4911602250295116203L;
+ private final TreeElement parent;
+ private final LinkedList<TreeElement> children = new LinkedList<TreeElement>();
+ private final String name;
+ private final int totalLines;
+ private final int executedLines;
+ private final int instrumentedLines;
+
+ public AbstractTreeElement(TreeElement parent, String name, int totalLines,
+ int executedLines, int instrumentedLines) {
+ this.parent = parent;
+ this.name = name;
+ this.totalLines = totalLines;
+ this.executedLines = executedLines;
+ this.instrumentedLines = instrumentedLines;
+ }
+
+ public TreeElement getParent() {
+ return parent;
+ }
+
+ public boolean hasChildren() {
+ return (children.size()>0);
+ }
+
+ public LinkedList<? extends TreeElement> getChildren() {
+ return children;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public TreeElement getRoot() {
+ if (parent == null) return this;
+ return parent.getRoot();
+ }
+
+ public int getExecutedLines() {
+ return executedLines;
+ }
+
+ public int getInstrumentedLines() {
+ return instrumentedLines;
+ }
+
+ public float getCoveragePercentage() {
+ if (instrumentedLines !=0 )
+ return (100.f*executedLines)/(instrumentedLines);
+ else return 0;
+ }
+
+ public void addChild(TreeElement child){
+ children.add(child);
+ }
+
+ public int getTotalLines() {
+ return totalLines;
+ }
+} \ No newline at end of file
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/model/CovFileTreeElement.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/model/CovFileTreeElement.java
new file mode 100644
index 0000000000..5bfa929760
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/model/CovFileTreeElement.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.model;
+
+
+public class CovFileTreeElement extends AbstractTreeElement {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -5017234616535899796L;
+
+ public CovFileTreeElement(TreeElement parent,
+ String name, int totalLines, int executedLines, int instrumentedLines) {
+ super(parent, name, totalLines, executedLines, instrumentedLines);
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/model/CovFolderTreeElement.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/model/CovFolderTreeElement.java
new file mode 100644
index 0000000000..8bfafdf70b
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/model/CovFolderTreeElement.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.model;
+
+public class CovFolderTreeElement extends AbstractTreeElement {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 583359546284716138L;
+
+ public CovFolderTreeElement(TreeElement parent,
+ String name, int totalLines, int executedLines, int instrumentedLines) {
+ super(parent, name, totalLines, executedLines, instrumentedLines);
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/model/CovFunctionTreeElement.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/model/CovFunctionTreeElement.java
new file mode 100644
index 0000000000..3f5e32eeae
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/model/CovFunctionTreeElement.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.model;
+
+import java.util.LinkedList;
+
+
+public class CovFunctionTreeElement extends AbstractTreeElement {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -2025221943523670378L;
+ private final String sourceFilePath;
+ private final long firstLnNmbr;
+
+ public CovFunctionTreeElement(TreeElement parent, String name, String sourceFilePath,
+ long firstLnNmbr, int executedLines, int instrumentedLines) {
+ super(parent, name, 0, executedLines, instrumentedLines);
+ this.sourceFilePath = sourceFilePath;
+ this.firstLnNmbr = firstLnNmbr;
+ }
+
+
+ /* no children for functions*/
+
+ public boolean hasChildren() {
+ return false;
+ }
+
+ public LinkedList<? extends TreeElement> getChildren() {
+ return null;
+ }
+
+ public void addChild(TreeElement child){
+ }
+
+
+ /* specific methods for functions*/
+
+ public String getSourceFilePath() {
+ return sourceFilePath;
+ }
+
+ public long getFirstLnNmbr() {
+ return firstLnNmbr;
+ }
+
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/model/CovRootTreeElement.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/model/CovRootTreeElement.java
new file mode 100644
index 0000000000..57d879e80d
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/model/CovRootTreeElement.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.model;
+
+import java.io.Serializable;
+
+public class CovRootTreeElement extends AbstractTreeElement implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 877070271548608926L;
+
+ public CovRootTreeElement(String name, int totalLines, int executedLines,
+ int instrumentedLines) {
+ super(null, name, totalLines, executedLines, instrumentedLines);
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/model/TreeElement.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/model/TreeElement.java
new file mode 100644
index 0000000000..d489010c0f
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/model/TreeElement.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.model;
+
+import java.io.Serializable;
+import java.util.LinkedList;
+
+public interface TreeElement extends Serializable{
+ TreeElement getParent();
+ LinkedList<? extends TreeElement> getChildren();
+ boolean hasChildren();
+ TreeElement getRoot();
+
+ String getName();
+ int getExecutedLines();
+ int getInstrumentedLines();
+ int getTotalLines();
+ float getCoveragePercentage();
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/Arc.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/Arc.java
new file mode 100644
index 0000000000..848462be4b
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/Arc.java
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.parser;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class Arc implements Serializable{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 4104429137191407662L;
+
+ private static final int VCOV_ARC_ON_TREE = (1 << 0);
+ private static final int VCOV_ARC_FAKE = (1 << 1);
+ private static final int VCOV_ARC_FALLTHROUGH = (1 << 2);
+
+ private final Block srcBlock;
+ private final Block dstnatnBlock;
+ private final long flag;
+ private final boolean fake;
+ private final boolean onTree;
+ private final boolean fallthrough;
+
+ private long count = 0;
+ private boolean countValid = false;
+ private boolean isCallNonReturn = false; // Arc is for a function that abnormally returns
+ private boolean isNonLoclaReturn = false; // Arc is for catch/setjump
+ private boolean isUnconditionnal = false; // Is an unconditional branch.
+
+ /**
+ * Constructor
+ */
+ public Arc(int srcBlockIndice, int dstnatnBlockIndice, long flag, List<Block> otherArcParams) {
+ this.flag = flag;
+ this.dstnatnBlock = otherArcParams.get(dstnatnBlockIndice);
+ this.srcBlock = otherArcParams.get(srcBlockIndice);
+ this.count = 0;
+ this.countValid = false;
+ if ((flag & VCOV_ARC_ON_TREE) != 0) {
+ onTree = true;
+ fake = false;
+ fallthrough = false;
+ } else if ((flag & VCOV_ARC_FAKE) != 0) {
+ onTree = false;
+ fake = true;
+ fallthrough = true;
+ } else if ((flag & VCOV_ARC_FALLTHROUGH) != 0) {
+ onTree = false;
+ fake = false;
+ fallthrough = true;
+ } else {
+ onTree = false;
+ fake = false;
+ fallthrough = false;
+ }
+ }
+
+ public Block getDstnatnBlock() {
+ return dstnatnBlock;
+ }
+
+ public long getFlag() {
+ return flag;
+ }
+
+ public boolean isFake() {
+ return fake;
+ }
+
+ public boolean isOnTree() {
+ return onTree;
+ }
+
+ public boolean isFallthrough() {
+ return fallthrough;
+ }
+
+ public boolean isUnconditionnal() {
+ return isUnconditionnal;
+ }
+
+ public boolean isNonLoclaReturn() {
+ return isNonLoclaReturn;
+ }
+
+ public boolean isCallNonReturn() {
+ return isCallNonReturn;
+ }
+
+ public void setCallNonReturn(boolean isCallNonReturn) {
+ this.isCallNonReturn = isCallNonReturn;
+ }
+
+ public void setNonLoclaReturn(boolean isNonLoclaReturn) {
+ this.isNonLoclaReturn = isNonLoclaReturn;
+ }
+
+ public void setUnconditionnal(boolean isUnconditionnal) {
+ this.isUnconditionnal = isUnconditionnal;
+ }
+
+ public Block getSrcBlock() {
+ return srcBlock;
+ }
+
+ public void setCount(long count) {
+ this.count = count;
+ }
+
+ public void setCountValid(boolean countValid) {
+ this.countValid = countValid;
+ }
+
+ public long getCount() {
+ return count;
+ }
+
+ public boolean isCountValid() {
+ return countValid;
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/Block.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/Block.java
new file mode 100644
index 0000000000..495ebfe65f
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/Block.java
@@ -0,0 +1,177 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.parser;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+
+public class Block implements Serializable{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -7665287885679756014L;
+ private final ArrayList<Arc> entryArcs = new ArrayList<Arc>();
+ private final ArrayList<Arc> exitArcs = new ArrayList<Arc>();
+ private final long flag;
+ private long numSuccs = 0;
+ private long numPreds = 0;
+ private long count = 0;
+ private boolean isCallSite = false;// Does the call
+ private boolean isCallReturn = false; // Is the return
+ private boolean isNonLocalReturn = false;
+ private boolean validChain = false;
+ private boolean invalidChain = false;
+ private boolean countValid = false;
+ private final BlkLine blkline = new BlkLine();
+
+ /**
+ * Constructor
+ */
+ public Block(long flag) {
+ this.flag = flag;
+ }
+
+
+ /* getters & setters */
+ public long getFlag() {
+ return flag;
+ }
+
+ public ArrayList<Arc> getEntryArcs() {
+ return entryArcs;
+ }
+
+ public ArrayList<Arc> getExitArcs() {
+ return exitArcs;
+ }
+
+ public boolean isCallSite() {
+ return isCallSite;
+ }
+
+ public boolean isCallReturn() {
+ return isCallReturn;
+ }
+
+ public boolean isNonLocalReturn() {
+ return isNonLocalReturn;
+ }
+
+ public void addEntryArcs(Arc arcEntry) {
+ this.entryArcs.add(arcEntry);
+ }
+
+ public void addExitArcs(Arc arcExit) {
+ this.exitArcs.add(arcExit);
+ }
+
+ public void setCallSite(boolean isCallSite) {
+ this.isCallSite = isCallSite;
+ }
+
+ public void setCallReturn(boolean isCallReturn) {
+ this.isCallReturn = isCallReturn;
+ }
+
+ public void setNonLocalReturn(boolean isNonLocalReturn) {
+ this.isNonLocalReturn = isNonLocalReturn;
+ }
+
+ public void decNumSuccs() {
+ this.numSuccs--;
+ }
+
+ public void decNumPreds() {
+ this.numPreds--;
+ }
+
+ public void incNumPreds() {
+ this.numPreds++;
+ }
+
+ public void incNumSuccs() {
+ this.numSuccs++;
+ }
+
+ public boolean isValidChain() {
+ return validChain;
+ }
+
+ public void setValidChain(boolean validChain) {
+ this.validChain = validChain;
+ }
+
+ public boolean isInvalidChain() {
+ return invalidChain;
+ }
+
+ public void setInvalidChain(boolean invalidChain) {
+ this.invalidChain = invalidChain;
+ }
+
+ public long getCount() {
+ return count;
+ }
+
+ public void setCount(long count) {
+ this.count = count;
+ }
+
+ public void setCountValid(boolean countValid) {
+ this.countValid = countValid;
+ }
+
+ public boolean isCountValid() {
+ return countValid;
+ }
+
+ public long getNumSuccs() {
+ return numSuccs;
+ }
+
+ public long getNumPreds() {
+ return numPreds;
+ }
+
+ public void setNumSuccs(long numSuccs) {
+ this.numSuccs = numSuccs;
+ }
+
+ public void setNumPreds(long numPreds) {
+ this.numPreds = numPreds;
+ }
+
+ public long[] getEncoding() {
+ return blkline.encoding;
+ }
+
+ public void setEncoding(long[] lineNos) {
+ this.blkline.encoding = lineNos;
+ }
+
+ public int getLineNum() {
+ return blkline.num;
+ }
+
+ public void setNumLine(int numline) {
+ this.blkline.num = numline;
+ }
+
+ class BlkLine implements Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 2757557929188979686L;
+ public long[] encoding;
+ public int num;
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/CovManager.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/CovManager.java
new file mode 100644
index 0000000000..b1c3fa0434
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/CovManager.java
@@ -0,0 +1,359 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.parser;
+
+import java.io.BufferedInputStream;
+import java.io.DataInput;
+import java.io.DataInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.LineNumberReader;
+import java.io.PrintStream;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.linuxtools.binutils.utils.STSymbolManager;
+import org.eclipse.linuxtools.gcov.Activator;
+import org.eclipse.linuxtools.gcov.model.CovFileTreeElement;
+import org.eclipse.linuxtools.gcov.model.CovFolderTreeElement;
+import org.eclipse.linuxtools.gcov.model.CovFunctionTreeElement;
+import org.eclipse.linuxtools.gcov.model.CovRootTreeElement;
+
+
+/**
+ * @author Xavier Raynaud <xavier.raynaud@st.com>
+ *
+ */
+public class CovManager implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 5582066617970911413L;
+ // input
+ private final String binaryPath;
+ // results
+ private final ArrayList<Folder> allFolders = new ArrayList<Folder>();
+ private final ArrayList<SourceFile> allSrcs = new ArrayList<SourceFile>();
+ private final ArrayList<GcnoFunction> allFnctns = new ArrayList<GcnoFunction>();
+ private final HashMap<String, SourceFile> sourceMap = new HashMap<String, SourceFile>();
+ private long nbrPgmRuns = 0;
+ // for view
+ private CovRootTreeElement rootNode;
+
+ /**
+ * Constructor
+ * @param binaryPath
+ */
+ public CovManager(String binaryPath) {
+ this.binaryPath = binaryPath;
+ }
+
+
+ /**
+ * parse coverage files, execute resolve graph algorithm, process counts for functions,
+ * lines and folders.
+ * @param List of coverage files paths
+ * @throws CoreException, IOException, InterruptedException
+ */
+
+ public void processCovFiles(List<String> covFilesPaths) throws CoreException, IOException, InterruptedException {
+ GcdaRecordsParser daRcrd = null;
+ DataInput traceFile;
+ for (String gcdaPath: covFilesPaths) {
+ String gcnoPath = gcdaPath.replace(".gcda", ".gcno");
+ // parse GCNO file
+ traceFile = OpenTraceFileStream(gcnoPath);
+ GcnoRecordsParser noRcrd = new GcnoRecordsParser(sourceMap, allSrcs);
+ noRcrd.parseData(traceFile);
+
+ // add new functions parsed to AllSrcs array
+ for (GcnoFunction f: noRcrd.getFnctns()) {
+ allFnctns.add(f);
+ }
+
+ //close the input stream
+ if(traceFile.getClass() == DataInputStream.class)
+ ((DataInputStream)traceFile).close();
+
+ // parse GCDA file
+ traceFile = OpenTraceFileStream(gcdaPath);
+ if (noRcrd.getFnctns().isEmpty()){
+ String message = gcnoPath + " doesn't contain any function:\n";
+ Status status = new Status(Status.ERROR, Activator.PLUGIN_ID, message);
+ throw new CoreException(status);
+ }
+ daRcrd = new GcdaRecordsParser(noRcrd.getFnctns());
+ daRcrd.parseGcdaRecord(traceFile);
+
+ //close the input stream
+ if(traceFile.getClass() == DataInputStream.class)
+ ((DataInputStream)traceFile).close();
+ }
+
+ // to fill the view title
+ if (daRcrd != null)
+ nbrPgmRuns = daRcrd.getObjSmryNbrPgmRuns();
+ /* process counts from data parsed */
+
+ // solve graph for each function
+ for (GcnoFunction gf : allFnctns) {
+ gf.solveGraphFnctn();
+ }
+
+ // allocate lines
+ for (SourceFile sourceFile: allSrcs) {
+ sourceFile.createLines();
+ }
+
+ // add line counts
+ for (GcnoFunction gf : allFnctns) {
+ gf.addLineCounts(allSrcs);
+ }
+
+ // accumulate lines
+ for (SourceFile sf: allSrcs) {
+ sf.accumulateLineCounts();
+ }
+
+ /* compute counts by folder*/
+
+ // make the folders list
+ for (SourceFile sf : allSrcs) {
+ File srcFile = new File (sf.getName());
+ String folderName = srcFile.getParent();
+ if (folderName == null) folderName = "?";
+ Folder folder = null;
+ for (Folder f: allFolders) {
+ if (f.getPath().equals(folderName))
+ folder = f;
+ }
+ if (folder == null){
+ folder = new Folder(folderName);
+ allFolders.add(folder);
+ }
+ folder.addSrcFiles(sf);
+ }
+
+ // assign sourcesList for each folder
+ for (Folder f : allFolders) {
+ f.accumulateSourcesCounts();
+ }
+ }
+
+
+ /**
+ * fill the model by count results
+ * @throws CoreException, IOException, InterruptedException
+ */
+
+ public void fillGcovView() {
+ // process counts for summary level
+ int summaryTotal = 0, summaryInstrumented = 0, summaryExecuted = 0;
+ for (Folder f : allFolders) {
+ summaryTotal+=f.getNumLines();
+ summaryInstrumented+=f.getLinesInstrumented();
+ summaryExecuted+=f.getLinesExecuted();
+ }
+
+ // fill rootNode model: the entry of the contentProvider
+ rootNode = new CovRootTreeElement("Summary", summaryTotal,summaryExecuted,
+ summaryInstrumented);
+ IBinaryObject binaryObject = STSymbolManager.sharedInstance.getBinaryObject(new Path(binaryPath));
+
+ for (Folder fldr : allFolders) {
+ String folderLocation = fldr.getPath();
+ CovFolderTreeElement fldrTreeElem = new CovFolderTreeElement(
+ rootNode, folderLocation, fldr.getNumLines(), fldr.getLinesExecuted(),
+ fldr.getLinesInstrumented());
+ rootNode.addChild(fldrTreeElem);
+
+ for (SourceFile src : fldr.getSrcFiles()) {
+ CovFileTreeElement srcTreeElem = new CovFileTreeElement(
+ fldrTreeElem, src.getName(), src.getNumLines(), src
+ .getLinesExecuted(), src.getLinesInstrumented());
+ fldrTreeElem.addChild(srcTreeElem);
+
+ for (GcnoFunction fnctn : src.getFnctns()) {
+ String name = fnctn.getName();
+ name = STSymbolManager.sharedInstance.demangle(binaryObject, name);
+ srcTreeElem.addChild(new CovFunctionTreeElement(
+ srcTreeElem, name, fnctn.getSrcFile(), fnctn
+ .getFirstLineNmbr(), fnctn.getCvrge()
+ .getLinesExecuted(), fnctn.getCvrge()
+ .getLinesInstrumented()));
+ }
+ }
+ }
+ }
+
+ // transform String path to stream
+ private DataInput OpenTraceFileStream(String filePath) throws FileNotFoundException{
+
+ FileInputStream fis = new FileInputStream(filePath);
+ InputStream inputStream = new BufferedInputStream(fis);
+
+ return new DataInputStream(inputStream);
+ }
+
+
+ public ArrayList<SourceFile> getAllSrcs() {
+ return allSrcs;
+ }
+
+ public ArrayList<GcnoFunction> getAllFnctns() {
+ return allFnctns;
+ }
+
+ public CovRootTreeElement getRootNode() {
+ return rootNode;
+ }
+
+ public String getBinaryPath() {
+ return binaryPath;
+ }
+
+ public SourceFile getSourceFile(String sourcePath){
+ return sourceMap.get(sourcePath);
+ }
+
+ public long getNbrPgmRuns() {
+ return nbrPgmRuns;
+ }
+
+ /**
+ * Retrieve a list containing gcda paths from a binary file
+ * @return
+ * @throws CoreException
+ * @throws IOException
+ * @throws InterruptedException
+ */
+ public List<String> getGCDALocations() throws CoreException, IOException, InterruptedException
+ {
+ IBinaryObject binaryObject = STSymbolManager.sharedInstance.getBinaryObject(new Path(binaryPath));
+ String binaryPath = binaryObject.getPath().toOSString();
+ List<String> l = new LinkedList<String>();
+ String cpu = binaryObject.getCPU();
+ Process p;
+ if ("sh".equals(cpu)) {
+ String stringsTool = "sh4strings";
+ p = getStringsProcess(stringsTool, binaryPath);
+ if ( p == null) p = getStringsProcess("sh4-linux-strings", binaryPath);
+ } else if ("stxp70".equals(cpu)) {
+ String stringsTool = "stxp70v3-strings";
+ p = getStringsProcess(stringsTool, binaryPath);
+ } else if ("st200".equals(cpu)){
+ String stringsTool = cpu + "strings";
+ p = getStringsProcess(stringsTool, binaryPath);
+ } else {
+ String stringsTool = "strings";
+ p = getStringsProcess(stringsTool, binaryPath);
+ }
+ if (p == null) {
+ Status status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR,
+ "An error occured during analysis: unable to retrieve gcov data", new IOException());
+ Activator.getDefault().getLog().log(status);
+ return l;
+ }
+ ThreadConsumer t = new ThreadConsumer(p, l);
+ t.start();
+ p.waitFor();
+ t.join();
+ return l;
+ }
+
+
+ private Process getStringsProcess(String stringsTool, String binaryPath) {
+ try {
+ Process p = Runtime.getRuntime().exec(new String[] {stringsTool, binaryPath });
+ return p;
+ } catch (Exception _) {
+ return null;
+ }
+ }
+
+
+
+ private final class ThreadConsumer extends Thread
+ {
+ private final Process p;
+ private final List<String> list;
+ ThreadConsumer(Process p, List<String> files)
+ {
+ super();
+ this.p = p;
+ this.list = files;
+ }
+
+ public void run()
+ {
+ try {
+ populateGCDAFiles(p.getInputStream());
+ } catch (Exception _) {
+ }
+ }
+
+ private void populateGCDAFiles(InputStream s) throws IOException
+ {
+ InputStreamReader isr = new InputStreamReader(s);
+ LineNumberReader lnr = new LineNumberReader(isr);
+ String line = null;
+ while ((line =lnr.readLine()) != null) {
+ if (line.endsWith(".gcda"))
+ {
+ IPath p = new Path(line);
+ String filename = p.toString();
+ if (!list.contains(filename)) list.add(filename);
+ }
+ }
+ }
+ }
+
+ public void dumpProcessCovFilesResult(PrintStream ps) throws FileNotFoundException {
+ ps.println("Parse gcda and gcno files done, resolve graph algorithm executed, now display results");
+ ps.println("- PRINT FUNCTIONS ARRAY : ");
+ for (int i = 0; i < allFnctns.size(); i++) {
+ ps.println("-- FUNCTION " +i);
+ ps.println(" name = " + allFnctns.get(i).getName());
+ ps.println(" instrumentd lines = " + allFnctns.get(i).getCvrge().getLinesInstrumented());
+ ps.println(" executed lines = "+ allFnctns.get(i).getCvrge().getLinesExecuted());
+ }
+ ps.println("- PRINT SRCS ARRAY : ");
+ for (int i = 0; i < allSrcs.size(); i++) {
+ ps.println("-- FILE " + i);
+ ps.println(" name = " + allSrcs.get(i).getName());
+ ps.println(" total lines = " + allSrcs.get(i).getNumLines());
+ ps.println(" instrumentd lines = "+ allSrcs.get(i).getLinesInstrumented());
+ ps.println(" executed lines = "+ allSrcs.get(i).getLinesExecuted());
+ }
+ }
+
+
+ /**
+ * @return the sourceMap
+ */
+ public HashMap<String, SourceFile> getSourceMap() {
+ return sourceMap;
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/CoverageInfo.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/CoverageInfo.java
new file mode 100644
index 0000000000..15956356dc
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/CoverageInfo.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.parser;
+
+import java.io.Serializable;
+
+public class CoverageInfo implements Serializable{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -6067335353999481231L;
+
+ private int linesInstrumented = 0;
+ private int linesExecuted = 0;
+
+ /**
+ * Constructor
+ */
+ public CoverageInfo() {
+
+ }
+
+
+ /*getters & setters */
+
+ public int getLinesInstrumented() {
+ return linesInstrumented;
+ }
+
+ public int getLinesExecuted() {
+ return linesExecuted;
+ }
+
+ public void incLinesInstrumented(){
+ this.linesInstrumented++;
+ }
+
+ public void incLinesExecuted(){
+ this.linesExecuted++;
+ }
+
+
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/Folder.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/Folder.java
new file mode 100644
index 0000000000..482ae810fa
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/Folder.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.parser;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+
+public class Folder implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 5155033391199109661L;
+ private final String path;
+ private final ArrayList<SourceFile> srcFiles = new ArrayList<SourceFile>();
+ private int numLines = 0;
+ private int linesInstrumented = 0;
+ private int linesExecuted = 0;
+
+ /**
+ * Constructor
+ */
+ public Folder(String path) {
+ this.path = path;
+ }
+
+
+ public void accumulateSourcesCounts(){
+ for (int i = 0; i < srcFiles.size(); i++) {
+ numLines += (srcFiles.get(i)).getNumLines();
+ linesInstrumented += (srcFiles.get(i)).getLinesInstrumented();
+ linesExecuted += (srcFiles.get(i)).getLinesExecuted();
+ }
+ }
+
+ public String getPath() {
+ return path;
+ }
+
+ public ArrayList<SourceFile> getSrcFiles() {
+ return srcFiles;
+ }
+
+ public void addSrcFiles(SourceFile srcFile) {
+ this.srcFiles.add(srcFile);
+ }
+
+ public int getNumLines() {
+ return numLines;
+ }
+ public int getLinesExecuted() {
+ return linesExecuted;
+ }
+ public int getLinesInstrumented() {
+ return linesInstrumented;
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/GcdaRecordsParser.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/GcdaRecordsParser.java
new file mode 100644
index 0000000000..a82d724386
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/GcdaRecordsParser.java
@@ -0,0 +1,272 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.parser;
+
+import java.io.DataInput;
+import java.io.DataInputStream;
+import java.io.EOFException;
+import java.io.IOException;
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.linuxtools.gcov.Activator;
+import org.eclipse.linuxtools.gcov.utils.BEDataInputStream;
+import org.eclipse.linuxtools.gcov.utils.LEDataInputStream;
+import org.eclipse.linuxtools.gcov.utils.MasksGenerator;
+
+
+
+public class GcdaRecordsParser {
+
+
+ private static final int GCOV_DATA_MAGIC = 0x67636461; // en ASCII: 67=g 63=c 64=d 61=a
+ private static final int GCOV_TAG_FUNCTION = 0x01000000;
+ private static final int GCOV_COUNTER_ARCS = 0x01a10000;
+ private static final int GCOV_TAG_OBJECT_SYMMARY = 0xa1000000;
+ private static final int GCOV_TAG_PROGRAM_SUMMARY = 0xa3000000;
+
+ private final ArrayList<GcnoFunction> fnctns;
+ private long objSmryNbrPgmRuns = 0;
+ private long pgmSmryChksm = 0;
+ private long objSmryChksm = 0;
+ private long objSmryArcCnts = 0;
+ private long objSmrytotalCnts = 0;
+ private long objSmryRunMax = 0;
+ private long objSmrySumMax = 0;
+
+
+ public GcdaRecordsParser(ArrayList<GcnoFunction> fnctns) {
+ this.fnctns = fnctns;
+ }
+
+ public void parseGcdaRecord(DataInput stream) throws IOException, CoreException {
+ // header data
+ int magic = 0;
+
+ // data & flags to process tests
+ GcnoFunction currentFnctn = null;
+
+ //read magic
+ magic = stream.readInt();
+ //read version
+ //version = stream.readInt();
+ stream.readInt();
+ //read stamp
+ //stamp = stream.readInt();
+ stream.readInt();
+
+ if (magic == GCOV_DATA_MAGIC){
+ stream = new BEDataInputStream((DataInputStream) stream);
+ }else{
+ magic = (magic >> 16) | (magic << 16);
+ magic = ((magic & 0xff00ff) << 8) | ((magic >> 8) & 0xff00ff);
+ if (magic == GCOV_DATA_MAGIC){
+ stream = new LEDataInputStream((DataInputStream) stream);
+ }else{
+ String message = magic + " :desn't correspond to a correct data file header\n";
+ Status status = new Status(Status.ERROR, Activator.PLUGIN_ID, message);
+ throw new CoreException(status);
+ }
+ }
+
+ while (true) {
+ try {
+ // parse header
+ int tag = stream.readInt();
+ long length = (stream.readInt() & MasksGenerator.UNSIGNED_INT_MASK);
+ // parse gcda data
+ switch ((int) tag) {
+ case GCOV_TAG_FUNCTION: {
+ long fnctnId = stream.readInt() & MasksGenerator.UNSIGNED_INT_MASK;
+ if (!fnctns.isEmpty()) {
+ boolean fnctnFound = false;
+ for (GcnoFunction f: fnctns) {
+ if (f.getIdent() == fnctnId) {
+ fnctnFound = true;
+ currentFnctn = f;
+ long fnctnChksm = stream.readInt()& MasksGenerator.UNSIGNED_INT_MASK;
+ if (f.getCheksum() != fnctnChksm){
+ String message = "Checksums don't correspond for " +
+ currentFnctn.getName() + " (Id: " + fnctnId + ")\n";
+ Status status = new Status(Status.ERROR, Activator.PLUGIN_ID, message);
+ throw new CoreException(status);
+ }
+ break;
+ }
+ }
+
+ if (fnctnFound == false){
+ currentFnctn = null;
+ String message = "Function with Id: " + fnctnId +
+ " not found in function list\n";
+ Status status = new Status(Status.ERROR, Activator.PLUGIN_ID, message);
+ throw new CoreException(status);
+ }
+
+ }
+ break;
+ }
+
+ case GCOV_COUNTER_ARCS: {
+ if (currentFnctn == null){
+ String message = "Missing function or duplicate counter tag\n";
+ Status status = new Status(Status.ERROR, Activator.PLUGIN_ID, message);
+ throw new CoreException(status);
+ }
+
+ if (length != 2 * (currentFnctn.getNumCounts())){
+ String message = "GCDA content is inconsistent\n";
+ Status status = new Status(Status.ERROR, Activator.PLUGIN_ID, message);
+ throw new CoreException(status);
+ }
+
+ ArrayList<Block> fnctnBlcks = currentFnctn.getFunctionBlocks();
+ if (fnctnBlcks.isEmpty()){
+ String message = "Function block list is empty\n";
+ Status status = new Status(Status.ERROR, Activator.PLUGIN_ID, message);
+ throw new CoreException(status);
+ }
+
+ for (int i = 0; i < fnctnBlcks.size(); i++) {
+ Block b = fnctnBlcks.get(i);
+ int nonFakeExit = 0;
+
+ ArrayList<Arc> arcsExit = b.getExitArcs();
+ for (Arc extArc: arcsExit) {
+ if (extArc.isFake() == false)
+ nonFakeExit++;
+ if (extArc.isOnTree() == false) {
+ long arcsCnts = stream.readLong();
+ extArc.setCount(arcsCnts);
+ extArc.setCountValid(true);
+ b.decNumSuccs();
+ extArc.getDstnatnBlock().decNumPreds();
+ }
+ }
+
+ // If there is only one non-fake exit, it is an
+ // unconditional branch.
+ if (nonFakeExit == 1) {
+ for (Arc extArc: arcsExit) {
+ if (extArc.isFake() == false) {
+ extArc.setUnconditionnal(true);
+
+ // If this block is instrumenting a call, it might be
+ // an artificial block. It is not artificial if it has
+ // a non-fallthrough exit, or the destination of this
+ // arc has more than one entry. Mark the destination
+ // block as a return site, if none of those conditions hold.
+
+ if (b.isCallSite() == true
+ && extArc.isFallthrough() == true
+ && extArc.getDstnatnBlock()
+ .getEntryArcs().get(0)
+ .equals(extArc)
+ && extArc.getDstnatnBlock()
+ .getEntryArcs().size() == 1)
+ extArc.getDstnatnBlock()
+ .setCallReturn(true);
+ }
+ }
+ }
+ }
+
+ // counters arcs process data reset
+ currentFnctn = null;
+ break;
+ }
+
+ case GCOV_TAG_OBJECT_SYMMARY: {
+ objSmryChksm = (stream.readInt() & MasksGenerator.UNSIGNED_INT_MASK);
+ objSmryArcCnts = (stream.readInt() & MasksGenerator.UNSIGNED_INT_MASK);
+ objSmryNbrPgmRuns = (stream.readInt() & MasksGenerator.UNSIGNED_INT_MASK);
+ objSmrytotalCnts = stream.readLong();
+ objSmryRunMax = stream.readLong();
+ objSmrySumMax = stream.readLong();
+ break;
+ }
+
+ // program summary tag
+ case GCOV_TAG_PROGRAM_SUMMARY: {
+ //long[] pgmSmryskips = new long[(int) length];
+ pgmSmryChksm = (stream.readInt() & MasksGenerator.UNSIGNED_INT_MASK);
+ for (int i = 0; i < length - 1; i++) {
+ //pgmSmryskips[i] = (stream.readInt() & MasksGenerator.UNSIGNED_INT_MASK);
+ stream.readInt();
+ }
+ break;
+ }
+
+ default: {
+ //System.out.println("wrong gcda tag");
+ break;
+ }
+ }
+ }
+ catch (EOFException _) {
+ break;
+ }
+ }
+ }
+
+ /**
+ * @return the objSmryNbrPgmRuns
+ */
+ public long getObjSmryNbrPgmRuns() {
+ return objSmryNbrPgmRuns;
+ }
+
+ /**
+ * @return the objSmryChksm
+ */
+ public long getObjSmryChksm() {
+ return objSmryChksm;
+ }
+
+ /**
+ * @return the objSmryArcCnts
+ */
+ public long getObjSmryArcCnts() {
+ return objSmryArcCnts;
+ }
+
+ /**
+ * @return the objSmrytotalCnts
+ */
+ public long getObjSmrytotalCnts() {
+ return objSmrytotalCnts;
+ }
+
+ /**
+ * @return the objSmryRunMax
+ */
+ public long getObjSmryRunMax() {
+ return objSmryRunMax;
+ }
+
+ /**
+ * @return the objSmrySumMax
+ */
+ public long getObjSmrySumMax() {
+ return objSmrySumMax;
+ }
+
+ /**
+ * @return the pgmSmryChksm
+ */
+ public long getPgmSmryChksm() {
+ return pgmSmryChksm;
+ }
+
+
+
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/GcnoFunction.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/GcnoFunction.java
new file mode 100644
index 0000000000..2549883e85
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/GcnoFunction.java
@@ -0,0 +1,255 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.parser;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+
+public class GcnoFunction implements Serializable, Comparable<GcnoFunction> {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -4159055012321132651L;
+
+ private final long ident;
+ private final long cheksum;
+ private final long firstLineNmbr;
+ private final String name;
+ private final String srcFile;
+ private ArrayList<Block> functionBlocks = new ArrayList<Block>();
+ private int numCounts = 0, blocksExecuted = 0, numBlocks = 0;;
+ private final CoverageInfo cvrge = new CoverageInfo();
+
+ public GcnoFunction(long fnctnIdent, long fnctnChksm, String fnctnName, String fnctnSrcFle, long fnctnFrstLnNmbr) {
+ this.ident = fnctnIdent;
+ this.cheksum = fnctnChksm;
+ this.name = fnctnName;
+ this.srcFile = fnctnSrcFle;
+ this.firstLineNmbr = fnctnFrstLnNmbr;
+ }
+
+ @Override
+ public int compareTo(GcnoFunction o) {
+ if (getFirstLineNmbr()>o.getFirstLineNmbr()) return 1;
+ else if (getFirstLineNmbr()<o.getFirstLineNmbr()) return -1;
+ return 0;
+ }
+
+
+ public void addLineCounts(ArrayList<SourceFile> srcs) {
+ for (int i = 0; i != numBlocks; i++) {
+ Block blk = functionBlocks.get(i);
+ SourceFile fileSrc = null;
+ if ((blk.getCount() != 0) && (i != 0) && (i + 1 != numBlocks))
+ blocksExecuted++;
+
+ long[] enc = blk.getEncoding();
+ for (int j = 0, k = 0; j != blk.getLineNum(); j++, k++) {
+ if (enc[k] == 0) {
+ int srcn = (int) enc[++k];
+ for (SourceFile sf : srcs) {
+ if (sf.getIndex() == srcn) {
+ fileSrc = sf;
+ break;
+ }
+ }
+ j++;
+ } else if ((fileSrc != null) && enc[k] < fileSrc.getLines().size()) {
+ Line line = fileSrc.getLines().get((int) enc[k]);
+ if (line.isExists() == false)
+ cvrge.incLinesInstrumented();
+ if ((line.getCount() == 0) && (blk.getCount() != 0))
+ cvrge.incLinesExecuted();
+ line.setExists(true);
+ line.setCount(line.getCount()+ blk.getCount());
+ }
+ }
+ }
+ }
+
+ public void solveGraphFnctn() {
+ ArrayList<Block> fnctnBlcks = this.functionBlocks;
+ ArrayList<Block> validBlocks = new ArrayList<Block>();
+ ArrayList<Block> invalidBlocks = new ArrayList<Block>();
+
+
+ // Function should contain at least one block
+ if (fnctnBlcks.size() >= 2){
+ if (fnctnBlcks.get(0).getNumPreds() == 0)
+ fnctnBlcks.get(0).setNumPreds(50000);
+ if (fnctnBlcks.get(fnctnBlcks.size() - 1).getNumSuccs() == 0)
+ fnctnBlcks.get(fnctnBlcks.size() - 1).setNumSuccs(50000);
+ }
+
+
+ for (int i = 0; i < fnctnBlcks.size(); i++) {
+ Block b = fnctnBlcks.get(i);
+ b.setInvalidChain(true);
+ invalidBlocks.add(b);
+ }
+
+ while (validBlocks.isEmpty() == false
+ || invalidBlocks.isEmpty() == false) {
+
+ if (invalidBlocks.isEmpty() == false) {
+ for (int i = invalidBlocks.size() - 1; i >= 0; i--) {
+ Block invb = invalidBlocks.get(i);
+ long total = 0;
+ invalidBlocks.remove(i);
+ invb.setInvalidChain(false);
+
+ if (invb.getNumSuccs() == 0) {
+ ArrayList<Arc> extArcs = invb.getExitArcs();
+ for (Arc arc : extArcs)
+ total += arc.getCount();
+ } else if (invb.getNumPreds() == 0) {
+ ArrayList<Arc> entrArcs = invb.getEntryArcs();
+ for (Arc arc : entrArcs)
+ total += arc.getCount();
+ } else
+ continue;
+
+ invb.setCount(total);
+ invb.setCountValid(true);
+ invb.setValidChain(true);
+ validBlocks.add(invb);
+ }
+ }/*else
+ System.out.println("NO, invalid blocks = 0");
+ */
+ while (validBlocks.isEmpty() == false) {
+ int last = validBlocks.size() - 1;
+ Block vb = validBlocks.get(last);
+ Arc invarc = null;
+ int total = 0;
+ validBlocks.remove(last);
+
+ vb.setValidChain(false);
+
+ if (vb.getNumSuccs() == 1) {
+ Block blcksdst;
+ total = (int) vb.getCount();
+
+ for (Arc extAr : vb.getExitArcs()) {
+ total -= extAr.getCount();
+ if (extAr.isCountValid() == false)
+ invarc = extAr;
+ }
+ blcksdst = invarc.getDstnatnBlock();
+ invarc.setCountValid(true);
+ invarc.setCount(total);
+ vb.decNumSuccs();
+ blcksdst.decNumPreds();
+
+ if (blcksdst.isCountValid() == true) {
+ if (blcksdst.getNumPreds() == 1
+ && blcksdst.isValidChain() == false) {
+ blcksdst.setValidChain(true);
+ validBlocks.add(blcksdst);
+ }
+ } else {
+ if (blcksdst.getNumPreds() == 0
+ && blcksdst.isInvalidChain() == false) {
+ blcksdst.setInvalidChain(true);
+ invalidBlocks.add(blcksdst);
+ }
+ }
+ }
+
+ if (vb.getNumPreds() == 1) {
+ Block blcksrc;
+ total = (int) vb.getCount();
+ invarc = null;
+
+ for (Arc entrAr: vb.getEntryArcs()) {
+ total -= entrAr.getCount();
+ if (entrAr.isCountValid() == false)
+ invarc = entrAr;
+ }
+
+ blcksrc = invarc.getSrcBlock();
+ invarc.setCountValid(true);
+ invarc.setCount(total);
+ vb.decNumPreds();
+ blcksrc.decNumSuccs();
+
+ if (blcksrc.isCountValid() == true) {
+ if (blcksrc.getNumSuccs() == 1
+ && blcksrc.isInvalidChain() == false) {
+ blcksrc.setValidChain(true);
+ validBlocks.add(blcksrc);
+ }
+ } else if (blcksrc.getNumSuccs() == 0
+ && blcksrc.isInvalidChain() == false) {
+ blcksrc.setInvalidChain(true);
+ invalidBlocks.add(blcksrc);
+ }
+ }
+ }
+ }
+ }
+
+ /* getters & setters */
+
+ public long getIdent() {
+ return ident;
+ }
+
+ public long getCheksum() {
+ return cheksum;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getSrcFile() {
+ return srcFile;
+ }
+
+ public long getFirstLineNmbr() {
+ return firstLineNmbr;
+ }
+
+ public ArrayList<Block> getFunctionBlocks() {
+ return functionBlocks;
+ }
+
+ public Block getFunctionBlock(int i) {
+ return functionBlocks.get(i);
+ }
+
+ public void setFunctionBlocks(ArrayList<Block> functionBlocks) {
+ this.functionBlocks = functionBlocks;
+ }
+
+ public void incNumCounts() {
+ this.numCounts++;
+ }
+
+ public int getNumCounts() {
+ return numCounts;
+ }
+
+ public int getNumBlocks() {
+ return numBlocks;
+ }
+
+ public void setNumBlocks(int numBlocks) {
+ this.numBlocks = numBlocks;
+ }
+
+ public CoverageInfo getCvrge() {
+ return cvrge;
+ }
+
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/GcnoRecordsParser.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/GcnoRecordsParser.java
new file mode 100644
index 0000000000..c21e16f016
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/GcnoRecordsParser.java
@@ -0,0 +1,241 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.parser;
+
+import java.io.DataInput;
+import java.io.DataInputStream;
+import java.io.EOFException;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.linuxtools.gcov.Activator;
+import org.eclipse.linuxtools.gcov.utils.BEDataInputStream;
+import org.eclipse.linuxtools.gcov.utils.GcovStringReader;
+import org.eclipse.linuxtools.gcov.utils.LEDataInputStream;
+import org.eclipse.linuxtools.gcov.utils.MasksGenerator;
+
+
+public class GcnoRecordsParser {
+
+ private static final int GCOV_NOTE_MAGIC = 0x67636e6f; // en ASCII: 67=g 63=c 6e=n 6f=o
+ private static final int GCOV_TAG_FUNCTION = 0x01000000;
+ private static final int GCOV_TAG_BLOCKS = 0x01410000;
+ private static final int GCOV_TAG_ARCS = 0x01430000;
+ private static final int GCOV_TAG_LINES = 0x01450000;
+
+ private GcnoFunction fnctn = null;
+ private final ArrayList<GcnoFunction> fnctns = new ArrayList<GcnoFunction>();
+ private final ArrayList<SourceFile> currentAllSrcs;
+ private final HashMap<String, SourceFile> sourceMap;
+
+ public GcnoRecordsParser(HashMap<String, SourceFile> sourceMap, ArrayList<SourceFile> AllSrcs){
+ this.sourceMap = sourceMap;
+ this.currentAllSrcs = AllSrcs;
+ }
+
+ private SourceFile findOrAdd (String fileName, ArrayList<SourceFile> srcs)
+ {
+ SourceFile newsrc = sourceMap.get(fileName);
+ if (newsrc == null) {
+ newsrc = new SourceFile(fileName, srcs.size()+1);
+ srcs.add(newsrc);
+ sourceMap.put(fileName, newsrc);
+ }
+ return newsrc; //return the new added element
+ }
+
+
+ public void parseData(DataInput stream) throws IOException, CoreException{
+ // header data
+ int magic = 0;
+ // blocks data
+ ArrayList<Block> blocks = null;
+ // source file data
+ SourceFile source = null;
+ // flag
+ boolean parseFirstFnctn = false;
+
+ magic = stream.readInt();
+ //version = stream.readInt();
+ stream.readInt();
+ //stamp = stream.readInt();
+ stream.readInt();
+
+ if (magic == GCOV_NOTE_MAGIC){
+ stream = new BEDataInputStream((DataInputStream) stream);
+ }else{
+ magic = (magic >> 16) | (magic << 16);
+ magic = ((magic & 0xff00ff) << 8) | ((magic >> 8) & 0xff00ff);
+ if (magic == GCOV_NOTE_MAGIC){
+ stream = new LEDataInputStream((DataInputStream) stream);
+ }else{
+ String message = magic + " :desn't correspond to a correct note file header\n";
+ Status status = new Status(Status.ERROR, Activator.PLUGIN_ID, message);
+ throw new CoreException(status);
+ }
+ }
+
+ /*------------------------------------------------------------------------------
+ System.out.println("Gcno LE, Magic "+magic+" version "+version+" stamp "+stamp);
+ */
+
+ while (true){
+ try{
+ int tag;
+ // parse header
+ while (true){
+ tag=stream.readInt();
+ if (tag == GCOV_TAG_FUNCTION || tag == GCOV_TAG_BLOCKS ||
+ tag == GCOV_TAG_ARCS || tag == GCOV_TAG_LINES)
+ break;
+ }
+ int length=stream.readInt();
+
+ // parse gcno data
+ if ((int)tag == GCOV_TAG_FUNCTION){
+ // before parse new function, add current function to functions list
+ if (parseFirstFnctn == true) fnctns.add(fnctn);
+
+ long fnctnIdent = (stream.readInt()&MasksGenerator.UNSIGNED_INT_MASK);
+ long fnctnChksm = (stream.readInt()&MasksGenerator.UNSIGNED_INT_MASK);
+ String fnctnName = GcovStringReader.readString(stream);
+ String fnctnSrcFle = GcovStringReader.readString(stream);
+ long fnctnFrstLnNmbr= (stream.readInt()&MasksGenerator.UNSIGNED_INT_MASK);
+
+ fnctn = new GcnoFunction(fnctnIdent, fnctnChksm, fnctnName, fnctnSrcFle, fnctnFrstLnNmbr);
+ SourceFile srcFle2 = findOrAdd (fnctn.getSrcFile(),currentAllSrcs);
+ if (fnctn.getFirstLineNmbr() >= srcFle2.getNumLines()){
+ srcFle2.setNumLines((int)fnctn.getFirstLineNmbr()+1);
+ }
+ srcFle2.addFnctn(fnctn);
+ parseFirstFnctn = true;
+ continue;
+ }
+
+ else if ((int)tag == GCOV_TAG_BLOCKS){
+ blocks = new ArrayList<Block>();
+ for (int i = 0; i < length; i++) {
+ long BlckFlag = stream.readInt()& MasksGenerator.UNSIGNED_INT_MASK;
+ Block blck = new Block(BlckFlag);
+ blocks.add(blck);
+ }
+ fnctn.setNumBlocks(length);
+ continue;
+ }
+ else if (tag == GCOV_TAG_ARCS){
+ int srcBlockIndice = stream.readInt();
+ int nmbrArcs = (length-1)/2;
+ ArrayList<Arc> arcs = new ArrayList<Arc>(nmbrArcs);
+
+ for (int i = 0; i < nmbrArcs; i++) {
+ int dstnatnBlockIndice = stream.readInt();
+ long flag = (stream.readInt()&MasksGenerator.UNSIGNED_INT_MASK);
+ Arc arc = new Arc(srcBlockIndice, dstnatnBlockIndice, flag, blocks);
+ arcs.add(arc);
+ }
+
+ // each arc, register it as exit of the src block
+ Block srcBlk = blocks.get(srcBlockIndice);
+ for (Arc a : arcs) {
+ srcBlk.addExitArcs(a);
+ srcBlk.incNumSuccs();
+ }
+
+ // each arc, register it as entry of its dstntn block
+ for (Arc a : arcs) {
+ Block dstntnBlk = a.getDstnatnBlock();
+ dstntnBlk.addEntryArcs(a);
+ dstntnBlk.incNumPreds();
+ }
+
+ for (Arc a : arcs) {
+ if (a.isFake() == true) {
+ if (a.getSrcBlock() != null ) {
+ // Exceptional exit from this function, the
+ // source block must be a call.
+ srcBlk = blocks.get((int)srcBlockIndice);
+ srcBlk.setCallSite(true);
+ a.setCallNonReturn(true);
+ } else {
+ a.setNonLoclaReturn(true);
+ Block dstntnBlk = a.getDstnatnBlock();
+ dstntnBlk.setNonLocalReturn(true);
+ }
+ }
+
+ if (a.isOnTree() == false)
+ fnctn.incNumCounts();
+ //nbrCounts++;
+ }
+
+ fnctn.setFunctionBlocks(blocks);
+ continue;
+ }
+
+
+ else if (tag == GCOV_TAG_LINES) {
+ int numBlock = stream.readInt();
+ long[] lineNos = new long[length-1];
+ int ix = 0;
+ do {
+ long lineNumber = stream.readInt()&MasksGenerator.UNSIGNED_INT_MASK;
+ if (lineNumber != 0){
+ if (ix == 0){
+ lineNos[ix++] = 0;
+ lineNos[ix++] = source.getIndex();
+ }
+ lineNos[ix++]=lineNumber;
+ if (lineNumber >= source.getNumLines()){
+ source.setNumLines((int)lineNumber+1);
+ }
+ } else {
+ String fileName = GcovStringReader.readString(stream);
+ if (fileName == "NULL string")
+ break;
+
+ source = findOrAdd (fileName, currentAllSrcs);
+ lineNos[ix++]=0;
+ lineNos[ix++]=source.getIndex();
+ }
+ } while (true);
+
+ fnctn.getFunctionBlocks().get(((int)numBlock))
+ .setEncoding(lineNos);
+
+ fnctn.getFunctionBlocks().get(((int)numBlock))
+ .setNumLine(ix);
+
+ continue;
+ }
+ }
+ catch (EOFException e) {
+
+ fnctn.setFunctionBlocks(blocks);
+ fnctns.add(fnctn);
+
+ break;
+
+ }
+ }//while
+ }
+
+ /* Getters */
+ public ArrayList<GcnoFunction> getFnctns() {
+ return fnctns;
+ }
+
+ public ArrayList<SourceFile> getcurrentAllSrcs() {
+ return currentAllSrcs;
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/Line.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/Line.java
new file mode 100644
index 0000000000..e2b0c4a121
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/Line.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.parser;
+
+import java.io.Serializable;
+
+
+public class Line implements Serializable{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 8804878976767948267L;
+ private boolean exists = false;
+ private long count = 0;
+
+ /**
+ * Constructor
+ */
+ public Line() {
+ }
+
+
+ /*Getters & setters*/
+
+ public boolean isExists() {
+ return exists;
+ }
+
+ public void setExists(boolean exists) {
+ this.exists = exists;
+ }
+
+ public void setCount(long count) {
+ this.count = count;
+ }
+
+ public long getCount() {
+ return count;
+ }
+
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/SourceFile.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/SourceFile.java
new file mode 100644
index 0000000000..3ba9d68173
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/parser/SourceFile.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.parser;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+public class SourceFile implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -9182882194956475711L;
+ private final String name;
+ private final int index;
+ private final ArrayList<Line> lines = new ArrayList<Line>();
+ private final TreeSet<GcnoFunction> fnctns = new TreeSet<GcnoFunction>();
+ private int numLines = 1;
+ private final CoverageInfo cvrge = new CoverageInfo();
+ private long maxCount = -1;
+
+ /**
+ * Constructor
+ */
+ public SourceFile(String name, int index) {
+ this.name = name;
+ this.index = index;
+ }
+
+
+ public void accumulateLineCounts() {
+ for (Line line : lines) {
+ if (line.isExists()) {
+ cvrge.incLinesInstrumented();
+ if (line.getCount() != 0)
+ cvrge.incLinesExecuted();
+ }
+ }
+ }
+
+ public long getmaxLineCount() {
+ if (maxCount < 0) {
+ for (Line line : lines) {
+ if (line.getCount() > maxCount)
+ maxCount = line.getCount();
+ }
+ }
+ return maxCount;
+ }
+
+ /* getters & setters */
+
+
+
+ public int getLinesExecuted() {
+ return cvrge.getLinesExecuted();
+ }
+
+ public int getLinesInstrumented() {
+ return cvrge.getLinesInstrumented();
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public ArrayList<Line> getLines() {
+ return lines;
+ }
+
+ public SortedSet<GcnoFunction> getFnctns() {
+ return fnctns;
+ }
+
+ public void addFnctn(GcnoFunction fnctn) {
+ this.fnctns.add(fnctn);
+ }
+
+ public int getNumLines() {
+ return numLines;
+ }
+
+ public void setNumLines(int numLines) {
+ this.numLines = numLines;
+ }
+
+ public int getIndex() {
+ return index;
+ }
+
+ public void createLines() {
+ int n = getNumLines();
+ lines.ensureCapacity(n);
+ for (int j = 0; j<n ; j++) {
+ lines.add(new Line());
+ }
+ }
+
+
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/utils/BEDataInputStream.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/utils/BEDataInputStream.java
new file mode 100644
index 0000000000..9765c94582
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/utils/BEDataInputStream.java
@@ -0,0 +1,191 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.utils;
+
+import java.io.DataInput;
+import java.io.DataInputStream;
+import java.io.IOException;
+/**
+ *
+ */
+public class BEDataInputStream implements DataInput {
+
+ private final DataInputStream in;
+ private final byte[] buffer = new byte[8];
+
+ /**
+ * Constructor
+ * @param in
+ */
+ public BEDataInputStream(DataInputStream in) {
+ this.in = in;
+ }
+
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readShort()
+ */
+ public final short readShort() throws IOException
+ {
+ return in.readShort();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readUnsignedShort()
+ */
+ public final int readUnsignedShort() throws IOException
+ {
+ return in.readUnsignedShort();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readChar()
+ */
+ public final char readChar() throws IOException
+ {
+ return in.readChar();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readInt()
+ */
+ public final int readInt() throws IOException
+ {
+ return in.readInt();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readLong()
+ */
+ public final long readLong() throws IOException
+ {
+ in.readFully(buffer, 0, 8);
+ return (((long)buffer[7] << 32) +
+ ((long)(buffer[6] & 255) << 40) +
+ ((long)(buffer[5] & 255) << 48) +
+ ((long)(buffer[4] & 255) << 56) +
+ ((long)(buffer[3] & 255) << 0) +
+ ((buffer[2] & 255) << 8) +
+ ((buffer[1] & 255) << 16) +
+ ((buffer[0] & 255) << 24));
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readFloat()
+ */
+ public final float readFloat() throws IOException
+ {
+ return Float.intBitsToFloat(readInt());
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readDouble()
+ */
+ public final double readDouble() throws IOException
+ {
+ return Double.longBitsToDouble(readLong());
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readBoolean()
+ */
+ public boolean readBoolean() throws IOException {
+ return in.readBoolean();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readByte()
+ */
+ public byte readByte() throws IOException {
+ return in.readByte();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readFully(byte[])
+ */
+ public void readFully(byte[] b) throws IOException {
+ in.readFully(b);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readFully(byte[], int, int)
+ */
+ public void readFully(byte[] b, int off, int len) throws IOException {
+ in.readFully(b,off,len);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readLine()
+ */
+ @Deprecated
+ public String readLine() throws IOException {
+ return in.readLine();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readUTF()
+ */
+ public String readUTF() throws IOException {
+ return in.readUTF();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readUnsignedByte()
+ */
+ public int readUnsignedByte() throws IOException {
+ return in.readUnsignedByte();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#skipBytes(int)
+ */
+ public int skipBytes(int n) throws IOException {
+ return in.skipBytes(n);
+ }
+
+ /**
+ * Close this stream.
+ */
+ public void close() throws IOException {
+ in.close();
+ }
+
+ public final long readUnsignedInt() throws IOException
+ {
+ in.readFully(buffer, 0, 4);
+ return
+ ((
+ (buffer[0]) << 24 |
+ (buffer[1]&0xff) << 16 |
+ (buffer[2]&0xff) << 8 |
+ (buffer[3]&0xff)
+ )
+ & MasksGenerator.UNSIGNED_INT_MASK );
+ }
+
+
+
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/utils/GcovStringReader.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/utils/GcovStringReader.java
new file mode 100644
index 0000000000..e6b13a6aaa
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/utils/GcovStringReader.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.utils;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+public class GcovStringReader {
+
+
+ public static String readString(DataInput stream) throws IOException {
+ String res = "NULL string";
+ long length = stream.readInt()&MasksGenerator.UNSIGNED_INT_MASK;
+ if (length != 0) {
+ int ln = ((int) length) << 2;
+ byte[] name = new byte[ln];
+ stream.readFully(name);
+ StringBuffer sb = new StringBuffer();
+ for(int j=0; j < ln; j++){
+ if(name[j]!=0){
+ char c = (char) name[j];
+ sb.append(c);
+ }
+ }
+ res = sb.toString();
+ }
+ return res;
+ }
+
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/utils/LEDataInputStream.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/utils/LEDataInputStream.java
new file mode 100644
index 0000000000..51648e5620
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/utils/LEDataInputStream.java
@@ -0,0 +1,208 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.utils;
+
+import java.io.DataInput;
+import java.io.DataInputStream;
+import java.io.IOException;
+/**
+ * Little-endian implementation of DataInputStream
+ * @author Xavier Raynaud <xavier.raynaud@st.com>
+ *
+ */
+public class LEDataInputStream implements DataInput {
+
+ private final DataInputStream in;
+ private final byte[] buffer = new byte[8];
+
+ /**
+ * Constructor
+ * @param in
+ */
+ public LEDataInputStream(DataInputStream in) {
+ this.in = in;
+ }
+
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readShort()
+ */
+ public final short readShort() throws IOException
+ {
+ in.readFully(buffer, 0, 2);
+ return (short)(
+ (buffer[1]&0xff) << 8 |
+ (buffer[0]&0xff));
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readUnsignedShort()
+ */
+ public final int readUnsignedShort() throws IOException
+ {
+ in.readFully(buffer, 0, 2);
+ return (
+ (buffer[1]&0xff) << 8 |
+ (buffer[0]&0xff));
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readChar()
+ */
+ public final char readChar() throws IOException
+ {
+ in.readFully(buffer, 0, 2);
+ return (char) (
+ (buffer[1]&0xff) << 8 |
+ (buffer[0]&0xff));
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readInt()
+ */
+ public final int readInt() throws IOException
+ {
+ in.readFully(buffer, 0, 4);
+ return
+ (buffer[3]) << 24 |
+ (buffer[2]&0xff) << 16 |
+ (buffer[1]&0xff) << 8 |
+ (buffer[0]&0xff);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readLong()
+ */
+ public final long readLong() throws IOException
+ {
+ in.readFully(buffer, 0, 8);
+ return
+ (long)(buffer[7]) << 56 | /* long cast needed or shift done modulo 32 */
+ (long)(buffer[6]&0xff) << 48 |
+ (long)(buffer[5]&0xff) << 40 |
+ (long)(buffer[4]&0xff) << 32 |
+ (long)(buffer[3]&0xff) << 24 |
+ (long)(buffer[2]&0xff) << 16 |
+ (long)(buffer[1]&0xff) << 8 |
+ (long)(buffer[0]&0xff);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readFloat()
+ */
+ public final float readFloat() throws IOException
+ {
+ return Float.intBitsToFloat(readInt());
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readDouble()
+ */
+ public final double readDouble() throws IOException
+ {
+ return Double.longBitsToDouble(readLong());
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readBoolean()
+ */
+ public boolean readBoolean() throws IOException {
+ return in.readBoolean();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readByte()
+ */
+ public byte readByte() throws IOException {
+ return in.readByte();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readFully(byte[])
+ */
+ public void readFully(byte[] b) throws IOException {
+ in.readFully(b);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readFully(byte[], int, int)
+ */
+ public void readFully(byte[] b, int off, int len) throws IOException {
+ in.readFully(b,off,len);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readLine()
+ */
+ @Deprecated
+ public String readLine() throws IOException {
+ return in.readLine();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readUTF()
+ */
+ public String readUTF() throws IOException {
+ return in.readUTF();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#readUnsignedByte()
+ */
+ public int readUnsignedByte() throws IOException {
+ return in.readUnsignedByte();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.io.DataInput#skipBytes(int)
+ */
+ public int skipBytes(int n) throws IOException {
+ return in.skipBytes(n);
+ }
+
+ /**
+ * Close this stream.
+ */
+ public void close() throws IOException {
+ in.close();
+ }
+
+ public final long readUnsignedInt() throws IOException
+ {
+ in.readFully(buffer, 0, 4);
+ return
+ ((
+ (buffer[3]) << 24 |
+ (buffer[2]&0xff) << 16 |
+ (buffer[1]&0xff) << 8 |
+ (buffer[0]&0xff)
+ )
+ & MasksGenerator.UNSIGNED_INT_MASK );
+ }
+
+
+
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/utils/MasksGenerator.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/utils/MasksGenerator.java
new file mode 100644
index 0000000000..4b8adf51c9
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/utils/MasksGenerator.java
@@ -0,0 +1,15 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.utils;
+
+public class MasksGenerator {
+ public static final long UNSIGNED_INT_MASK = 0xffffffffL;
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/utils/STGcovProgramChecker.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/utils/STGcovProgramChecker.java
new file mode 100644
index 0000000000..c47cf07d92
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/utils/STGcovProgramChecker.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.utils;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.WeakHashMap;
+
+import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.linuxtools.binutils.utils.STNMFactory;
+import org.eclipse.linuxtools.binutils.utils.STNMSymbolsHandler;
+import org.eclipse.linuxtools.binutils.utils.STSymbolManager;
+
+public class STGcovProgramChecker implements STNMSymbolsHandler {
+
+ private boolean gcovFound = false;
+ private long timestamp;
+ private final static WeakHashMap<File, STGcovProgramChecker> map = new WeakHashMap<File, STGcovProgramChecker>();
+
+ /** Private Constructor */
+ private STGcovProgramChecker(long timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ private static STGcovProgramChecker getProgramChecker(IBinaryObject object) throws IOException {
+ File program = object.getPath().toFile();
+ STGcovProgramChecker pg = map.get(program);
+ if (pg == null) {
+ pg = new STGcovProgramChecker(program.lastModified());
+ STNMFactory.getNM(object.getCPU(), object.getPath().toOSString(), pg);
+ map.put(program, pg);
+ } else {
+ long fileTime = program.lastModified();
+ if (fileTime > pg.timestamp) {
+ pg.timestamp = fileTime;
+ pg.gcovFound = false;
+ STNMFactory.getNM(object.getCPU(), object.getPath().toOSString(), pg);
+ }
+ }
+ return pg;
+ }
+
+ public static boolean isGCovCompatible(String s) throws IOException {
+ IBinaryObject object = STSymbolManager.sharedInstance.getBinaryObject(new Path(s));
+ if (object == null) return false;
+ return isGCovCompatible(object);
+ }
+
+ public static boolean isGCovCompatible(IBinaryObject object) throws IOException {
+ STGcovProgramChecker pg = getProgramChecker(object);
+ return pg.gcovFound;
+ }
+
+ @Override
+ public void foundBssSymbol(String symbol, String address) {
+ }
+
+ @Override
+ public void foundDataSymbol(String symbol, String address) {
+ }
+
+ @Override
+ public void foundTextSymbol(String symbol, String address) {
+ if ("gcov_read_words".equals(symbol) || "_gcov_read_words".equals(symbol))
+ {
+ gcovFound = true;
+ }
+ }
+
+ @Override
+ public void foundUndefSymbol(String symbol) {
+ }
+
+
+
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/CovFileContentProvider.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/CovFileContentProvider.java
new file mode 100644
index 0000000000..1f011bccff
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/CovFileContentProvider.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.view;
+
+import java.util.LinkedList;
+
+import org.eclipse.linuxtools.gcov.model.CovFolderTreeElement;
+import org.eclipse.linuxtools.gcov.model.CovRootTreeElement;
+import org.eclipse.linuxtools.gcov.model.TreeElement;
+
+
+
+public class CovFileContentProvider extends CovFolderContentProvider {
+
+ public static final CovFileContentProvider sharedInstance = new CovFileContentProvider();
+
+ /**
+ * Constructor
+ */
+ protected CovFileContentProvider() {
+ }
+
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement instanceof CovRootTreeElement) {
+ CovRootTreeElement root = (CovRootTreeElement) parentElement;
+ LinkedList<? extends TreeElement> ret = getElementChildrenList(root);
+ return ret.toArray();
+ }
+ return super.getChildren(parentElement);
+ }
+
+ protected LinkedList<? extends TreeElement> getElementChildrenList(CovRootTreeElement root) {
+ LinkedList<TreeElement> ret = new LinkedList<TreeElement>();
+ LinkedList<? extends TreeElement> list = root.getChildren();
+ for (TreeElement folderlist : list) {
+ LinkedList<? extends TreeElement> partialList = folderlist.getChildren();
+ ret.addAll(partialList);
+ }
+ return ret;
+ }
+
+ @Override
+ public Object getParent(Object element) {
+ Object o = super.getParent(element);
+ if (o instanceof CovFolderTreeElement) {
+ o = super.getParent(o);
+ }
+ return o;
+ }
+
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/CovFolderContentProvider.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/CovFolderContentProvider.java
new file mode 100644
index 0000000000..f3fbfc13c7
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/CovFolderContentProvider.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.view;
+
+
+import java.util.LinkedList;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.linuxtools.gcov.model.TreeElement;
+import org.eclipse.linuxtools.gcov.parser.CovManager;
+
+
+public class CovFolderContentProvider implements ITreeContentProvider {
+
+ /** Shared instance: this class is implemented as a Singleton */
+ public static final CovFolderContentProvider sharedInstance = new CovFolderContentProvider();
+
+
+ protected CovFolderContentProvider(){
+ }
+
+ public Object[] getChildren(Object parentElement) {
+ TreeElement elem = (TreeElement) parentElement;
+ LinkedList<? extends TreeElement> list = elem.getChildren();
+ if (list != null)
+ return list.toArray();
+ else return null;
+ }
+
+ public Object getParent(Object element) {
+ TreeElement elem = (TreeElement) element;
+ return elem.getParent();
+ }
+
+ public boolean hasChildren(Object element) {
+ TreeElement elem = (TreeElement) element;
+ return elem.hasChildren();
+ }
+
+ public Object[] getElements(Object inputElement) {
+ if (inputElement == null) return new Object[0];
+ CovManager cvrgMnger = (CovManager)inputElement;
+ return new Object[] {
+ cvrgMnger.getRootNode()
+ };
+ }
+
+ public void dispose() {
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/CovFunctionContentProvider.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/CovFunctionContentProvider.java
new file mode 100644
index 0000000000..8093b2a453
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/CovFunctionContentProvider.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.view;
+
+import java.util.LinkedList;
+
+import org.eclipse.linuxtools.gcov.model.CovFileTreeElement;
+import org.eclipse.linuxtools.gcov.model.CovRootTreeElement;
+import org.eclipse.linuxtools.gcov.model.TreeElement;
+
+
+
+
+public class CovFunctionContentProvider extends CovFileContentProvider {
+
+ public static final CovFunctionContentProvider sharedInstance = new CovFunctionContentProvider();
+
+ /**
+ * Constructor
+ */
+ protected CovFunctionContentProvider() {
+ }
+
+ protected LinkedList<? extends TreeElement> getElementChildrenList(CovRootTreeElement root) {
+ LinkedList<? extends TreeElement> list = super.getElementChildrenList(root);
+ LinkedList<TreeElement> ret = new LinkedList<TreeElement>();
+ for (TreeElement histTreeElem : list) {
+ LinkedList<? extends TreeElement> partialList = histTreeElem.getChildren();
+ ret.addAll(partialList);
+ }
+ return ret;
+ }
+
+
+ @Override
+ public Object getParent(Object element) {
+ Object o = super.getParent(element);
+ if (o instanceof CovFileTreeElement) {
+ o = super.getParent(o);
+ }
+ return o;
+ }
+
+} \ No newline at end of file
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/CovView.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/CovView.java
new file mode 100644
index 0000000000..2e407fba73
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/CovView.java
@@ -0,0 +1,261 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.view;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.linuxtools.dataviewers.abstractview.AbstractSTDataView;
+import org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractSTViewer;
+import org.eclipse.linuxtools.dataviewers.abstractviewers.STDataViewersImages;
+import org.eclipse.linuxtools.dataviewers.actions.STExportToCSVAction;
+import org.eclipse.linuxtools.dataviewers.charts.actions.ChartAction;
+import org.eclipse.linuxtools.gcov.Activator;
+import org.eclipse.linuxtools.gcov.action.SwitchContentProviderAction;
+import org.eclipse.linuxtools.gcov.parser.CovManager;
+import org.eclipse.linuxtools.gcov.parser.SourceFile;
+import org.eclipse.linuxtools.gcov.view.annotatedsource.OpenSourceFileAction;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ * @author Xavier Raynaud <xavier.raynaud@st.com>
+ *
+ */
+public class CovView extends AbstractSTDataView {
+
+ private String defaultCSVPath = "gcov.csv";
+
+ private Label label;
+
+ private Action folderAction;
+ private Action fileAction;
+ private Action functionAction;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.abstractview.AbstractSTDataView#createAbstractSTViewer
+ * (org.eclipse.swt.widgets.Composite)
+ */
+ protected AbstractSTViewer createAbstractSTViewer(Composite parent) {
+ return new CovViewer(parent);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.abstractview.AbstractSTDataViewer#contributeToToolbar(org.eclipse.jface.action.IToolBarManager)
+ */
+ @Override
+ protected void contributeToToolbar(IToolBarManager manager) {
+ super.contributeToToolbar(manager);
+ manager.add(new Separator());
+ manager.add(new Separator());
+ manager.add(folderAction);
+ manager.add(fileAction);
+ manager.add(functionAction);
+ manager.add(new Separator());
+ manager.add(new ChartAction(getViewSite().getShell(), getSTViewer()));
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.abstractview.AbstractSTDataViewer#createActions()
+ */
+ @Override
+ protected void createActions() {
+ STDataViewersImages.getImageDescriptor(""); // workaround a bug
+ super.createActions();
+ folderAction = new SwitchContentProviderAction(
+ "Sort coverage per folder",
+ "icons/directory_obj.gif",
+ getSTViewer().getViewer(),
+ CovFolderContentProvider.sharedInstance);
+
+ fileAction = new SwitchContentProviderAction(
+ "Sort coverage per file",
+ "icons/c_file_obj.gif",
+ getSTViewer().getViewer(),
+ CovFileContentProvider.sharedInstance);
+ fileAction.setChecked(true);
+
+ functionAction = new SwitchContentProviderAction(
+ "Sort coverage per function",
+ "icons/function_obj.gif",
+ getSTViewer().getViewer(),
+ CovFunctionContentProvider.sharedInstance);
+ }
+
+ /**
+ * This is a callback that will allow us
+ * to create the viewer and initialize it.
+ */
+ public void createPartControl(Composite parent) {
+ STDataViewersImages.getImageDescriptor(""); // workaround a bug
+ super.createPartControl(parent);
+ GridLayout l = (GridLayout) parent.getLayout();
+ l.horizontalSpacing = 0;
+ l.verticalSpacing = 0;
+ l.marginHeight = 0;
+ l.marginWidth = 0;
+ }
+
+ protected void createTitle(Composite parent) {
+ label = new Label(parent, SWT.WRAP);
+ GridData data = new GridData(SWT.FILL, SWT.BEGINNING, true, false, 1, 1);
+ label.setLayoutData(data);
+ }
+
+ public static void setCovViewTitle(CovView view, String title,
+ String binaryPath) {
+ view.label.setText(" \n program runs = " + title
+ + " \n program file : " + binaryPath + "\n ");
+ view.label.getParent().layout(true);
+ }
+
+
+ public static void displayCovDetailedResult(String binaryPath, String gcdaFile) {
+ try {
+ // parse and process coverage data
+ CovManager cvrgeMnger = new CovManager(binaryPath);
+ List<String> gcdaPaths = new LinkedList<String>();
+ gcdaPaths.add(gcdaFile);
+ cvrgeMnger.processCovFiles(gcdaPaths);
+ // generate model for view
+ cvrgeMnger.fillGcovView();
+
+ for (SourceFile sf : cvrgeMnger.getSourceMap().values()) {
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ IFile binary = root.getFileForLocation(new Path(binaryPath));
+ IProject project = null;
+ if (binary != null) project = binary.getProject();
+ OpenSourceFileAction.sharedInstance.openAnnotatedSourceFile(project,
+ binary, sf, 0);
+ }
+ } catch (Exception _) {
+ final String message = "An error has occured when parsing "
+ + "the coverage data files :\n" + _.getMessage();
+ Status status = new Status(Status.ERROR, Activator.PLUGIN_ID,
+ IStatus.ERROR, message, _);
+
+ Activator.getDefault().getLog().log(status);
+ PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ Shell s = PlatformUI.getWorkbench().getDisplay().getActiveShell();
+ MessageDialog.openError(s, "Gcov Parsing Error", message);
+ }
+ });
+ return;
+ }
+ }
+
+ public static CovView displayCovResults(String binaryPath) {
+ try {
+ // parse and process coverage data
+ CovManager cvrgeMnger = new CovManager(binaryPath);
+ List<String> gcdaPaths = cvrgeMnger.getGCDALocations();
+ cvrgeMnger.processCovFiles(gcdaPaths);
+ // generate model for view
+ cvrgeMnger.fillGcovView();
+ //load an Eclipse view
+ CovView cvrgeView = displayCovResults(cvrgeMnger);
+ return cvrgeView;
+ } catch (Exception _) {
+ final String message = "An error has occured when parsing "
+ + "the coverage data files :\n" + _.getMessage();
+ Status status = new Status(Status.ERROR, Activator.PLUGIN_ID,
+ IStatus.ERROR, message, _);
+
+ Activator.getDefault().getLog().log(status);
+ PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ Shell s = PlatformUI.getWorkbench().getDisplay().getActiveShell();
+ MessageDialog.openError(s, "Gcov Parsing Error", message);
+ }
+ });
+ }
+ return null;
+ }
+
+ /**
+ * Used by Test engine and OpenSerAction
+ * @param cvrgeMnger
+ */
+ public static CovView displayCovResults(CovManager cvrgeMnger) throws PartInitException {
+ //load an Eclipse view
+ IWorkbenchWindow window = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow();
+ IWorkbenchPage page = window.getActivePage();
+ CovView cvrgeView = (CovView) page.showView("org.eclipse.linuxtools.gcov.view");
+
+ //view title
+ CovView.setCovViewTitle(cvrgeView, Integer
+ .toString((int) cvrgeMnger.getNbrPgmRuns()), cvrgeMnger
+ .getBinaryPath());
+
+ // load the controller
+ cvrgeView.setInput(cvrgeMnger);
+ CovViewer stviewer = (CovViewer) cvrgeView.getSTViewer();
+ stviewer.getViewer().expandToLevel(2);
+ return cvrgeView;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.abstractview.AbstractSTDataView#createExportToCSVAction()
+ */
+ @Override
+ protected IAction createExportToCSVAction() {
+ IAction action = new STExportToCSVAction(this.getSTViewer()) {
+ public void run() {
+ Object o = getSTViewer().getInput();
+ if (o instanceof CovManager) {
+ getExporter().setFilePath(getDefaultCSVPath());
+ }
+ super.run();
+ }
+
+ };
+ return action;
+ }
+
+ /**
+ * @return the defaultCSVPath
+ */
+ public String getDefaultCSVPath() {
+ return defaultCSVPath;
+ }
+
+ /**
+ * @param defaultCSVPath the defaultCSVPath to set
+ */
+ public void setDefaultCSVPath(String defaultCSVPath) {
+ this.defaultCSVPath = defaultCSVPath;
+ }
+
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/CovViewer.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/CovViewer.java
new file mode 100644
index 0000000000..5ec9694df1
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/CovViewer.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.view;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.OpenEvent;
+import org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractSTTreeViewer;
+import org.eclipse.linuxtools.dataviewers.abstractviewers.ISTDataViewersField;
+import org.eclipse.linuxtools.gcov.model.CovFileTreeElement;
+import org.eclipse.linuxtools.gcov.model.CovFunctionTreeElement;
+import org.eclipse.linuxtools.gcov.model.TreeElement;
+import org.eclipse.linuxtools.gcov.parser.CovManager;
+import org.eclipse.linuxtools.gcov.parser.SourceFile;
+import org.eclipse.linuxtools.gcov.view.annotatedsource.OpenSourceFileAction;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+
+
+
+public class CovViewer extends AbstractSTTreeViewer {
+
+ private ISTDataViewersField[] fields;
+
+ /**
+ * Constructor
+ * @param parent
+ */
+ public CovViewer(Composite parent) {
+ super(parent, SWT.BORDER | SWT.H_SCROLL| SWT.V_SCROLL | SWT.MULTI |
+ SWT.FULL_SELECTION);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractSTViewer#createContentProvider()
+ */
+ @Override
+ protected IContentProvider createContentProvider() {
+ return CovFileContentProvider.sharedInstance;
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractSTViewer#getAllFields()
+ */
+ @Override
+ public ISTDataViewersField[] getAllFields() {
+ if (fields == null) {
+ fields = new ISTDataViewersField[] {
+ new FieldName(),
+ new FieldTotalLines(),
+ new FieldInstrumentedLines(),
+ new FieldExecutedLines(),
+ new FieldCoveragePercentage() };
+ }
+ return fields;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractSTViewer#getDialogSettings()
+ */
+ public IDialogSettings getDialogSettings() {
+ return org.eclipse.linuxtools.gcov.Activator.getDefault().getDialogSettings();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractSTViewer#handleOpenEvent(org.eclipse.jface.viewers.OpenEvent)
+ */
+ protected void handleOpenEvent(OpenEvent event) {
+
+ IStructuredSelection selection = (IStructuredSelection) event
+ .getSelection();
+ TreeElement element = (TreeElement) selection.getFirstElement();
+
+ if (element != null) {
+ if (element.getParent() != null) {
+ String sourceLoc = "";
+ long lineNumber = 0;
+
+ if (element.getClass() == CovFileTreeElement.class)
+ sourceLoc = element.getName();
+
+ else if (element.getClass() == CovFunctionTreeElement.class) {
+ sourceLoc = ((CovFunctionTreeElement) element).getSourceFilePath();
+ lineNumber =((CovFunctionTreeElement)element).getFirstLnNmbr();
+ }
+ CovManager cvm = (CovManager) this.getInput();
+ SourceFile sourceFile = cvm.getSourceFile(sourceLoc);
+ if (sourceFile != null) {
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ String binaryLoc = cvm.getBinaryPath();
+ IPath binaryPath = new Path(binaryLoc);
+ IFile binary = root.getFileForLocation(binaryPath);
+ IProject project = null;
+ if (binary != null) project = binary.getProject();
+
+ OpenSourceFileAction.sharedInstance.openAnnotatedSourceFile(project,
+ binary, sourceFile, (int)lineNumber);
+ }
+ }
+ }
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/FieldCoveragePercentage.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/FieldCoveragePercentage.java
new file mode 100644
index 0000000000..aef5074886
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/FieldCoveragePercentage.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.view;
+
+import java.text.DecimalFormat;
+import java.text.NumberFormat;
+
+import org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractPercentageDrawerField;
+import org.eclipse.linuxtools.dataviewers.charts.provider.IChartField;
+import org.eclipse.linuxtools.gcov.model.CovRootTreeElement;
+import org.eclipse.linuxtools.gcov.model.TreeElement;
+
+
+
+public class FieldCoveragePercentage extends AbstractPercentageDrawerField implements IChartField {
+
+ public final static NumberFormat nf = new DecimalFormat("##0.0#");
+
+
+ public String getColumnHeaderText() {
+ return "Coverage %";
+ }
+
+ @Override
+ public String getValue(Object obj) {
+ float f = getPercentage(obj);
+ if (f < 0)
+ f = 0.0f;
+ return nf.format(f);
+ }
+
+
+ /**
+ * Gets the percentage value to display
+ * @param obj
+ * @return the percentage value to display, as a float
+ */
+ public float getPercentage(Object obj) {
+ TreeElement e = (TreeElement) obj;
+ return e.getCoveragePercentage();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractPercentageDrawerField#getNumberFormat()
+ */
+ @Override
+ public NumberFormat getNumberFormat() {
+ return nf;
+ }
+
+ @Override
+ public boolean isSettedNumberFormat() {
+ return true;
+ }
+
+ public String getToolTipText(Object element) {
+ TreeElement e = (TreeElement) element;
+ String s =" Coverage % = "+Integer.toString((int)e.getCoveragePercentage());
+ return s ;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.abstractviewers.ISTDataViewersField#compare(java.lang.Object, java.lang.Object)
+ */
+ public int compare(Object obj1, Object obj2) {
+ TreeElement e1 = (TreeElement) obj1;
+ TreeElement e2 = (TreeElement) obj2;
+ float f1 = e1.getCoveragePercentage();
+ float f2 = e2.getCoveragePercentage();
+ return Float.compare(f1, f2);
+ }
+
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.charts.provider.IChartField#getNumber(java.lang.Object)
+ */
+ public Number getNumber(Object obj) {
+ TreeElement e = (TreeElement) obj;
+ float f = getPercentage(obj);
+ if (e.getClass() == CovRootTreeElement.class)
+ return 0;
+ else {
+ if (f < 0)
+ f = 0.0f;
+ return f;
+ }
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/FieldExecutedLines.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/FieldExecutedLines.java
new file mode 100644
index 0000000000..718a117b26
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/FieldExecutedLines.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.view;
+
+import org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractSTDataViewersField;
+import org.eclipse.linuxtools.dataviewers.charts.provider.IChartField;
+import org.eclipse.linuxtools.gcov.model.TreeElement;
+
+
+public class FieldExecutedLines extends AbstractSTDataViewersField implements IChartField{
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.abstractviewers.ISTDataViewersField#getColumnHeaderText()
+ */
+ public String getColumnHeaderText() {
+ return "Executed Lines";
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.abstractviewers.ISTDataViewersField#getValue(java.lang.Object)
+ */
+ public String getValue(Object obj) {
+ TreeElement e = (TreeElement) obj;
+ return Integer.toString(e.getExecutedLines());
+ }
+
+ @Override
+ public String getToolTipText(Object element) {
+ TreeElement e = (TreeElement) element;
+ String s = "Executed lines number = "
+ + Integer.toString(e.getExecutedLines());
+ return s;
+ }
+
+ public int compare(Object obj1, Object obj2) {
+ TreeElement e1 = (TreeElement) obj1;
+ TreeElement e2 = (TreeElement) obj2;
+ String s1 = Integer.toString(e1.getExecutedLines());
+ String s2 = Integer.toString(e2.getExecutedLines());
+ if (s1 == null) {
+ if (s2 == null)
+ return 0;
+ return -1;
+ }
+ if (s2 == null)
+ return 1;
+ return s1.compareTo(s2);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.charts.provider.IChartField#getNumber(java.lang.Object)
+ */
+ public Number getNumber(Object obj) {
+ TreeElement e = (TreeElement) obj;
+ return e.getExecutedLines();
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/FieldInstrumentedLines.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/FieldInstrumentedLines.java
new file mode 100644
index 0000000000..3d478ddd99
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/FieldInstrumentedLines.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.view;
+
+import org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractSTDataViewersField;
+import org.eclipse.linuxtools.dataviewers.charts.provider.IChartField;
+import org.eclipse.linuxtools.gcov.model.TreeElement;
+
+
+
+public class FieldInstrumentedLines extends AbstractSTDataViewersField implements IChartField{
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.abstractviewers.ISTDataViewersField#getColumnHeaderText()
+ */
+ public String getColumnHeaderText() {
+ return "Instrumented Lines";
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.abstractviewers.ISTDataViewersField#getValue(java.lang.Object)
+ */
+ public String getValue(Object obj) {
+ TreeElement e = (TreeElement) obj;
+ return Integer.toString(e.getInstrumentedLines());
+ }
+
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractSTDataViewersField#getToolTipText(java.lang.Object)
+ */
+ @Override
+ public String getToolTipText(Object element) {
+ TreeElement e = (TreeElement) element;
+ String s = "Instrumented lines number = "+Integer.toString(e.getInstrumentedLines());
+ return s;
+ }
+
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.abstractviewers.ISTDataViewersField#compare(java.lang.Object, java.lang.Object)
+ */
+ public int compare(Object obj1, Object obj2) {
+ TreeElement e1 = (TreeElement) obj1;
+ TreeElement e2 = (TreeElement) obj2;
+ String s1 = Integer.toString(e1.getInstrumentedLines());
+ String s2 = Integer.toString(e2.getInstrumentedLines());
+ if (s1 == null) {
+ if (s2 == null) return 0;
+ return -1;
+ }
+ if (s2 == null) return 1;
+ return s1.compareTo(s2);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.charts.provider.IChartField#getNumber(java.lang.Object)
+ */
+ public Number getNumber(Object obj) {
+ TreeElement e = (TreeElement) obj;
+ return e.getInstrumentedLines();
+ }
+
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/FieldName.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/FieldName.java
new file mode 100644
index 0000000000..7193628892
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/FieldName.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.view;
+
+import org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractSTDataViewersField;
+import org.eclipse.linuxtools.gcov.model.TreeElement;
+
+
+public class FieldName extends AbstractSTDataViewersField {
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.abstractviewers.ISTDataViewersField#getColumnHeaderText()
+ */
+ @Override
+ public String getColumnHeaderText() {
+ return "Name";
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.abstractviewers.ISTDataViewersField#getValue(java.lang.Object)
+ */
+ @Override
+ public String getValue(Object obj) {
+ TreeElement e = (TreeElement) obj;
+ String nm = e.getName();
+ nm = nm.substring(nm.lastIndexOf('/')+1);
+ nm = nm.substring(nm.lastIndexOf('\\')+1);
+ return nm;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractSTDataViewersField#getToolTipText(java.lang.Object)
+ */
+ @Override
+ public String getToolTipText(Object element) {
+ TreeElement elem = (TreeElement) element;
+ String s = elem.getName();
+ return s;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.abstractviewers.ISTDataViewersField#compare(java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public int compare(Object obj1, Object obj2) {
+ String s1 = getValue(obj1);
+ String s2 = getValue(obj2);
+ if (s1 == null) {
+ if (s2 == null)
+ return 0;
+ return -1;
+ }
+ if (s2 == null)
+ return 1;
+ return s1.compareTo(s2);
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/FieldTotalLines.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/FieldTotalLines.java
new file mode 100644
index 0000000000..993679ba12
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/FieldTotalLines.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.view;
+
+
+import org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractSTDataViewersField;
+import org.eclipse.linuxtools.gcov.model.CovFileTreeElement;
+import org.eclipse.linuxtools.gcov.model.CovFunctionTreeElement;
+import org.eclipse.linuxtools.gcov.model.TreeElement;
+
+
+
+public class FieldTotalLines extends AbstractSTDataViewersField {
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.abstractviewers.ISTDataViewersField#getColumnHeaderText()
+ */
+ @Override
+ public String getColumnHeaderText() {
+ return "Total Lines";
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.abstractviewers.ISTDataViewersField#getValue(java.lang.Object)
+ */
+ @Override
+ public String getValue(Object obj) {
+ TreeElement e = (TreeElement) obj;
+ if (e.getClass() != CovFunctionTreeElement.class)
+ return Integer.toString(e.getTotalLines());
+ else
+ return "";
+ }
+
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractSTDataViewersField#getToolTipText(java.lang.Object)
+ */
+ @Override
+ public String getToolTipText(Object element) {
+ TreeElement e = (TreeElement) element;
+ if (e.getClass() != CovFunctionTreeElement.class)
+ return "Total lines number = "+Integer.toString(e.getTotalLines());
+ else
+ return "";
+ }
+
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.linuxtools.dataviewers.abstractviewers.ISTDataViewersField#compare(java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public int compare(Object obj1, Object obj2) {
+ TreeElement e1 = (TreeElement) obj1;
+ TreeElement e2 = (TreeElement) obj2;
+
+ if (e1.getClass() == CovFileTreeElement.class) {
+ String s1 = Integer.toString(((CovFileTreeElement)e1).getTotalLines());
+ String s2 = Integer.toString(((CovFileTreeElement)e2).getTotalLines());
+ if (s1 == null) {
+ if (s2 == null)
+ return 0;
+ return -1;
+ }
+ if (s2 == null)
+ return 1;
+ return s1.compareTo(s2);
+ }
+ else return 0;
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/annotatedsource/CoverageAnnotationColumn.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/annotatedsource/CoverageAnnotationColumn.java
new file mode 100644
index 0000000000..8e098b58ac
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/annotatedsource/CoverageAnnotationColumn.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.view.annotatedsource;
+
+
+import java.util.ArrayList;
+
+import org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.ISTAnnotationColumn;
+import org.eclipse.linuxtools.gcov.parser.Line;
+import org.eclipse.linuxtools.gcov.parser.SourceFile;
+
+
+public class CoverageAnnotationColumn implements ISTAnnotationColumn {
+
+
+ private final ArrayList<Line> lines;
+
+ public CoverageAnnotationColumn(SourceFile sourceFile) {
+ lines = sourceFile.getLines();
+ }
+
+ @Override
+ public String getAnnotation(int index) {
+ try {
+ Line l = lines.get(index+1);
+ if (!l.isExists()) {
+ return "";
+ } else {
+ return Long.toString(l.getCount());
+ }
+ } catch (IndexOutOfBoundsException _) {
+ return "";
+ }
+ }
+
+ @Override
+ public String getLongDescription(int line) {
+ return null;
+ }
+
+ @Override
+ public String getTitle() {
+ return "Coverage";
+ }
+
+
+ @Override
+ public String getHeaderTooltip() {
+ return "Coverage";
+ }
+
+ @Override
+ public String getTooltip(int index) {
+ try {
+ Line l = lines.get(index+1);
+ if (!l.isExists()) {
+ return "non executable line";
+ } else {
+ long count = l.getCount();
+ if (count == 0) return "line never executed";
+ if (count == 1) return "line executed 1 time";
+ return "line executed "
+ + Long.toString(count)
+ + " times";
+ }
+ } catch (IndexOutOfBoundsException _) {
+ return "non executable line";
+ }
+ }
+
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/annotatedsource/OpenSourceFileAction.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/annotatedsource/OpenSourceFileAction.java
new file mode 100644
index 0000000000..4852144a0d
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/annotatedsource/OpenSourceFileAction.java
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.view.annotatedsource;
+
+import java.net.URI;
+
+import org.eclipse.cdt.ui.CUIPlugin;
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.linuxtools.binutils.link2source.STLink2SourceSupport;
+import org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.AbstractSTAnnotatedSourceEditorInput;
+import org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.actions.AbstractOpenSourceFileAction;
+import org.eclipse.linuxtools.gcov.Activator;
+import org.eclipse.linuxtools.gcov.parser.SourceFile;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IURIEditorInput;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+
+public class OpenSourceFileAction {
+
+ /**
+ * Shared instance of this class
+ */
+ public static final OpenSourceFileAction sharedInstance = new OpenSourceFileAction();
+
+ private OpenSourceFileAction() {
+ }
+
+
+ // FIXME: move this method in binutils plugin.
+ private IFileStore getFileStore(IProject project, IPath path) {
+ IEditorInput input = STLink2SourceSupport.sharedInstance.getEditorInput(path, project);
+ if (input instanceof IURIEditorInput) {
+ IURIEditorInput editorInput = (IURIEditorInput) input;
+ URI uri = editorInput.getURI();
+ try {
+ IFileStore fs = EFS.getStore(uri);
+ return fs;
+ } catch (CoreException _) {
+ return null;
+ }
+ }
+ return null;
+ }
+
+
+ private AbstractSTAnnotatedSourceEditorInput getInput(SourceFile sourceFile,
+ IFileStore fs) {
+ AbstractSTAnnotatedSourceEditorInput input = new STAnnotatedSourceEditorInput(
+ fs, sourceFile);
+ IWorkbenchPage p = CUIPlugin.getActivePage();
+ IEditorPart editorPart = p.findEditor(input);
+ if (editorPart != null)
+ p.closeEditor(editorPart, false);
+ return input;
+ }
+
+ public void openAnnotatedSourceFile(IProject project, IFile binary, SourceFile sourceFile, int lineNumber) {
+ if (sourceFile == null) return;
+ String pathName = sourceFile.getName();
+ if (pathName == null) return;
+ IPath path = new Path(pathName);
+ openAnnotatedSourceFile(project, binary, sourceFile, path, lineNumber);
+ }
+
+ public void openAnnotatedSourceFile(IProject project, IFile binary, SourceFile sourceFile, IPath realLocation, int lineNumber) {
+ IWorkbenchPage page = CUIPlugin.getActivePage();
+ if (page != null) {
+ IFileStore fs = getFileStore(project, realLocation);
+ if (fs == null && !realLocation.isAbsolute() && binary != null) {
+ IPath p = binary.getProjectRelativePath().removeLastSegments(1);
+ fs = getFileStore(project, p.append(realLocation));
+ }
+ if (fs == null) {
+ try {
+ page.openEditor(new STAnnotatedSourceNotFoundEditorInput(project,sourceFile,
+ realLocation, lineNumber),
+ STAnnotatedSourceNotFoundEditor.ID, true);
+ } catch (PartInitException e) {
+ Status s = new Status(IStatus.ERROR, Activator.PLUGIN_ID,
+ IStatus.ERROR, "Error when opening annotated source view",
+ e);
+ Activator.getDefault().getLog().log(s);
+ }
+ } else {
+ IEditorInput input = getInput(sourceFile, fs);
+ try {
+ IEditorPart editor = page.openEditor(input,
+ AbstractOpenSourceFileAction.EDITOR_ID, true);
+ if (lineNumber > 0 && editor instanceof ITextEditor) {
+ IDocumentProvider provider = ((ITextEditor) editor).getDocumentProvider();
+ IDocument document = provider.getDocument(editor.getEditorInput());
+ try {
+ int start = document.getLineOffset(lineNumber - 1);
+ ((ITextEditor) editor).selectAndReveal(start, 0);
+ } catch (BadLocationException _) {
+ // ignore
+ }
+ IWorkbenchPage p = editor.getSite().getPage();
+ p.activate(editor);
+ }
+ } catch (PartInitException e) {
+ Status s = new Status(IStatus.ERROR, Activator.PLUGIN_ID,
+ IStatus.ERROR, "Error when opening annotated source view",
+ e);
+ Activator.getDefault().getLog().log(s);
+ }
+ }
+ }
+ }
+
+
+
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/annotatedsource/STAnnotatedSourceEditorInput.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/annotatedsource/STAnnotatedSourceEditorInput.java
new file mode 100644
index 0000000000..a74bc69ef8
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/annotatedsource/STAnnotatedSourceEditorInput.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.view.annotatedsource;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.AbstractSTAnnotatedSourceEditorInput;
+import org.eclipse.linuxtools.dataviewers.annotatedsourceeditor.ISTAnnotationColumn;
+import org.eclipse.linuxtools.gcov.parser.Line;
+import org.eclipse.linuxtools.gcov.parser.SourceFile;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+
+
+
+public class STAnnotatedSourceEditorInput extends
+AbstractSTAnnotatedSourceEditorInput {
+
+ private final SourceFile sourceFile;
+ private final int lineCount;
+ private final ArrayList<ISTAnnotationColumn> columns = new ArrayList<ISTAnnotationColumn>();
+
+ public static final Color GREEN = new Color(PlatformUI.getWorkbench().getDisplay(), 0 ,128, 0);
+
+ // FIXME: dispose colors ?
+ private static final Color[] greenColors = new Color[129];
+
+
+ public STAnnotatedSourceEditorInput(IFileStore fileStore, SourceFile sourceFile){
+ super(fileStore);
+ this.sourceFile = sourceFile;
+ lineCount = sourceFile.getLines().size();
+ this.columns.add(new CoverageAnnotationColumn(sourceFile));
+ }
+
+ @Override
+ public Color getColor(int ln) {
+ final int index = ln + 1;
+ Display display = PlatformUI.getWorkbench().getDisplay();
+ if (index < lineCount){
+ ArrayList<Line> lines = sourceFile.getLines();
+ Line line = lines.get(index);
+ if (line.isExists()) {
+ long count = line.getCount();
+ if (count == 0) return display.getSystemColor(SWT.COLOR_RED);;
+ if (count == sourceFile.getmaxLineCount()) return GREEN;
+ int colorIndex = 128 - (int) ((128*count)/sourceFile.getmaxLineCount());
+ if (greenColors[colorIndex] == null) {
+ greenColors[colorIndex] = new Color(display, colorIndex,127+colorIndex,colorIndex);
+ }
+ return greenColors[colorIndex];
+ }
+ }
+ return display.getSystemColor(SWT.COLOR_WHITE);
+ }
+
+ @Override
+ public ArrayList<ISTAnnotationColumn> getColumns() {
+ return columns;
+ }
+
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/annotatedsource/STAnnotatedSourceNotFoundEditor.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/annotatedsource/STAnnotatedSourceNotFoundEditor.java
new file mode 100644
index 0000000000..b73a617390
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/annotatedsource/STAnnotatedSourceNotFoundEditor.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.gcov.view.annotatedsource;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.linuxtools.binutils.link2source.STCSourceNotFoundEditor;
+import org.eclipse.linuxtools.gcov.parser.SourceFile;
+import org.eclipse.ui.IEditorInput;
+
+
+/**
+ * @author Xavier Raynaud <xavier.raynaud@st.com>
+ *
+ */
+public class STAnnotatedSourceNotFoundEditor extends
+ STCSourceNotFoundEditor {
+
+ public static final String ID = "org.eclipse.linuxtools.gcov.view.annotatedsource.STAnnotatedSourceNotFoundEditor";
+
+ public STAnnotatedSourceNotFoundEditor() {
+
+ }
+
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.linuxtools.binutils.link2source.STCSourceNotFoundEditor#openSourceFileAtLocation(org.eclipse.core.resources.IProject, org.eclipse.core.runtime.IPath, int)
+ */
+ protected void openSourceFileAtLocation(IProject project, IPath sourceLoc,
+ int lineNumber) {
+ IEditorInput input = this.getEditorInput();
+ if (input instanceof STAnnotatedSourceNotFoundEditorInput) {
+ STAnnotatedSourceNotFoundEditorInput editorInput = (STAnnotatedSourceNotFoundEditorInput) input;
+ SourceFile sf = editorInput.getSourceFile();
+ OpenSourceFileAction.sharedInstance.openAnnotatedSourceFile(project, null, sf, sourceLoc, lineNumber);
+ } else {
+ super.openSourceFileAtLocation(project, sourceLoc, lineNumber);
+ }
+ }
+}
diff --git a/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/annotatedsource/STAnnotatedSourceNotFoundEditorInput.java b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/annotatedsource/STAnnotatedSourceNotFoundEditorInput.java
new file mode 100644
index 0000000000..fb34914975
--- /dev/null
+++ b/gcov/org.eclipse.linuxtools.gcov/src/org/eclipse/linuxtools/gcov/view/annotatedsource/STAnnotatedSourceNotFoundEditorInput.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2009 STMicroelectronics.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the 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:
+ * Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.gcov.view.annotatedsource;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.linuxtools.binutils.link2source.STCSourceNotFoundEditorInput;
+import org.eclipse.linuxtools.gcov.parser.SourceFile;
+
+
+public class STAnnotatedSourceNotFoundEditorInput extends STCSourceNotFoundEditorInput {
+
+ private final SourceFile sourceFile;
+
+ public STAnnotatedSourceNotFoundEditorInput(IProject project,
+ SourceFile sourceFile,
+ IPath sourcePath, int lineNumber) {
+ super(project, sourcePath, lineNumber);
+ this.sourceFile = sourceFile;
+ }
+
+ /**
+ * @return the sourceFile
+ */
+ public SourceFile getSourceFile() {
+ return sourceFile;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result
+ + ((sourceFile == null) ? 0 : sourceFile.hashCode());
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (!super.equals(obj))
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ final STAnnotatedSourceNotFoundEditorInput other = (STAnnotatedSourceNotFoundEditorInput) obj;
+ if (sourceFile == null) {
+ if (other.sourceFile != null)
+ return false;
+ } else if (!sourceFile.equals(other.sourceFile))
+ return false;
+ return true;
+ }
+
+}
diff --git a/gprof/org.eclipse.linuxtools.binutils/about.html b/gprof/org.eclipse.linuxtools.binutils/about.html
index 0c6525d9a8..23506a4bae 100644
--- a/gprof/org.eclipse.linuxtools.binutils/about.html
+++ b/gprof/org.eclipse.linuxtools.binutils/about.html
@@ -1,33 +1,26 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
+</head><body lang="EN-US">
<h2>About This Content</h2>
-<p>24th October, 2008</p>
+<p>June 5, 2006</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>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). 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, "Program" will mean the Content.</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>
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-</body>
-</html> \ No newline at end of file
+</body></html> \ No newline at end of file
diff --git a/gprof/org.eclipse.linuxtools.binutils/plugin.properties b/gprof/org.eclipse.linuxtools.binutils/plugin.properties
index 0752dc68c4..8115a91417 100644
--- a/gprof/org.eclipse.linuxtools.binutils/plugin.properties
+++ b/gprof/org.eclipse.linuxtools.binutils/plugin.properties
@@ -8,6 +8,6 @@
# Contributors:
# Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
#*******************************************************************************
-bundleProvider = Eclipse
+bundleProvider = Eclipse Linux Tools
bundleName = Binutils Plug-in (Incubation)
sourceNotFoundEditorName = Source Not Found \ No newline at end of file
diff --git a/gprof/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/link2source/STCSourceNotFoundEditor.java b/gprof/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/link2source/STCSourceNotFoundEditor.java
index 0f849c2759..89770a4cd9 100644
--- a/gprof/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/link2source/STCSourceNotFoundEditor.java
+++ b/gprof/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/link2source/STCSourceNotFoundEditor.java
@@ -17,7 +17,6 @@ import java.util.Iterator;
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
import org.eclipse.cdt.debug.core.sourcelookup.MappingSourceContainer;
-import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceLookupDirector;
import org.eclipse.cdt.debug.internal.core.sourcelookup.MapEntrySourceContainer;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
@@ -189,7 +188,7 @@ public class STCSourceNotFoundEditor extends CommonSourceNotFoundEditor {
}
private void addSourceMappingToCommon(IPath missingPath, IPath newSourcePath) throws CoreException {
- CSourceLookupDirector director = CDebugCorePlugin.getDefault().getCommonSourceLookupDirector();
+ AbstractSourceLookupDirector director = CDebugCorePlugin.getDefault().getCommonSourceLookupDirector();
addSourceMappingToDirector(missingPath, newSourcePath, director);
CDebugCorePlugin.getDefault().savePluginPreferences();
}
diff --git a/gprof/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/link2source/STCSourceNotFoundEditorInput.java b/gprof/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/link2source/STCSourceNotFoundEditorInput.java
index b5a650e4bf..38e76b887e 100644
--- a/gprof/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/link2source/STCSourceNotFoundEditorInput.java
+++ b/gprof/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/link2source/STCSourceNotFoundEditorInput.java
@@ -87,6 +87,7 @@ public class STCSourceNotFoundEditorInput implements IEditorInput {
* (non-Javadoc)
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
*/
+ @SuppressWarnings("unchecked")
public Object getAdapter(Class adapter) {
return null;
}
diff --git a/gprof/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/link2source/STLink2SourceSupport.java b/gprof/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/link2source/STLink2SourceSupport.java
index 078c67056e..d11e957d73 100644
--- a/gprof/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/link2source/STLink2SourceSupport.java
+++ b/gprof/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/link2source/STLink2SourceSupport.java
@@ -25,7 +25,6 @@ import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.core.model.IOutputEntry;
import org.eclipse.cdt.core.model.ISourceRoot;
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
-import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceLookupDirector;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.utils.Addr64;
import org.eclipse.core.filesystem.EFS;
@@ -39,6 +38,7 @@ import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector;
import org.eclipse.debug.core.sourcelookup.ISourceContainer;
import org.eclipse.debug.core.sourcelookup.containers.LocalFileStorage;
import org.eclipse.jface.text.BadLocationException;
@@ -457,7 +457,7 @@ public class STLink2SourceSupport {
private IEditorInput findFileInCommonSourceLookup(IPath path)
{
try {
- CSourceLookupDirector director = CDebugCorePlugin.getDefault().getCommonSourceLookupDirector();
+ AbstractSourceLookupDirector director = CDebugCorePlugin.getDefault().getCommonSourceLookupDirector();
ISourceContainer[] c = director.getSourceContainers();
for (ISourceContainer sourceContainer : c) {
Object[] o = sourceContainer.findSourceElements(path.toOSString());
diff --git a/gprof/org.eclipse.linuxtools.dataviewers/about.html b/gprof/org.eclipse.linuxtools.dataviewers/about.html
index 0c6525d9a8..c258ef55d8 100644
--- a/gprof/org.eclipse.linuxtools.dataviewers/about.html
+++ b/gprof/org.eclipse.linuxtools.dataviewers/about.html
@@ -1,33 +1,28 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<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>
+<p>June 5, 2006</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>The Eclipse 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>
-<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>
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
</body>
</html> \ No newline at end of file
diff --git a/gprof/org.eclipse.linuxtools.dataviewers/plugin.properties b/gprof/org.eclipse.linuxtools.dataviewers/plugin.properties
index 42bda80a91..b296a4af84 100644
--- a/gprof/org.eclipse.linuxtools.dataviewers/plugin.properties
+++ b/gprof/org.eclipse.linuxtools.dataviewers/plugin.properties
@@ -8,5 +8,5 @@
# Contributors:
# STMicroelectronics - initial API and implementation
#*******************************************************************************
-bundleProvider = Eclipse
+bundleProvider = Eclipse Linux Tools
bundleName = Data Viewers Plug-in (Incubation) \ No newline at end of file
diff --git a/gprof/org.eclipse.linuxtools.dataviewers/src/org/eclipse/linuxtools/dataviewers/actions/STCopyAction.java b/gprof/org.eclipse.linuxtools.dataviewers/src/org/eclipse/linuxtools/dataviewers/actions/STCopyAction.java
index 7a83596be5..c9c33ba154 100644
--- a/gprof/org.eclipse.linuxtools.dataviewers/src/org/eclipse/linuxtools/dataviewers/actions/STCopyAction.java
+++ b/gprof/org.eclipse.linuxtools.dataviewers/src/org/eclipse/linuxtools/dataviewers/actions/STCopyAction.java
@@ -42,7 +42,7 @@ public class STCopyAction extends Action {
Clipboard cb = new Clipboard(Display.getDefault());
ISTDataViewersField[] fields = stViewer.getAllFields();
IStructuredSelection selections = (IStructuredSelection)stViewer.getViewer().getSelection();
- Iterator iterator = selections.iterator();
+ Iterator<?> iterator = selections.iterator();
StringBuilder sb = new StringBuilder();
for(int i=0;iterator.hasNext();i++){
diff --git a/gprof/org.eclipse.linuxtools.dataviewers/src/org/eclipse/linuxtools/dataviewers/findreplace/STFindReplaceDialog.java b/gprof/org.eclipse.linuxtools.dataviewers/src/org/eclipse/linuxtools/dataviewers/findreplace/STFindReplaceDialog.java
index b9eadfc243..2c2ba94747 100644
--- a/gprof/org.eclipse.linuxtools.dataviewers/src/org/eclipse/linuxtools/dataviewers/findreplace/STFindReplaceDialog.java
+++ b/gprof/org.eclipse.linuxtools.dataviewers/src/org/eclipse/linuxtools/dataviewers/findreplace/STFindReplaceDialog.java
@@ -16,8 +16,18 @@ import java.util.List;
import java.util.Set;
import java.util.regex.PatternSyntaxException;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.fieldassist.ComboContentAdapter;
+import org.eclipse.jface.fieldassist.FieldDecoration;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
+import org.eclipse.jface.resource.JFaceColors;
+import org.eclipse.jface.text.TextUtilities;
+import org.eclipse.jface.viewers.ViewerCell;
+import org.eclipse.jface.viewers.ViewerRow;
+import org.eclipse.linuxtools.dataviewers.STDataViewersActivator;
+import org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractSTViewer;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
@@ -36,30 +46,13 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.fieldassist.ComboContentAdapter;
-import org.eclipse.jface.fieldassist.FieldDecoration;
-import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
-import org.eclipse.jface.resource.JFaceColors;
-
-import org.eclipse.jface.text.TextUtilities;
-import org.eclipse.jface.viewers.ViewerCell;
-import org.eclipse.jface.viewers.ViewerRow;
-import org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractSTViewer;
-
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.fieldassist.ContentAssistCommandAdapter;
-import org.eclipse.ui.internal.texteditor.NLSUtility;
-import org.eclipse.ui.internal.texteditor.SWTUtil;
-import org.eclipse.ui.internal.texteditor.TextEditorPlugin;
import org.eclipse.ui.texteditor.IAbstractTextEditorHelpContextIds;
import org.eclipse.ui.texteditor.IEditorStatusLine;
-import org.eclipse.ui.texteditor.IFindReplaceTargetExtension2;
import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
@@ -153,8 +146,8 @@ class STFindReplaceDialog extends Dialog {
*/
boolean fIsRegExInit;
- private List fFindHistory;
- private List fReplaceHistory;
+ private List<String> fFindHistory;
+ private List<String> fReplaceHistory;
private boolean fIsTargetEditable;
private ISTFindReplaceTarget fTarget;
@@ -216,8 +209,8 @@ class STFindReplaceDialog extends Dialog {
fTarget= null;
fDialogPositionInit= null;
- fFindHistory= new ArrayList(HISTORY_SIZE - 1);
- fReplaceHistory= new ArrayList(HISTORY_SIZE - 1);
+ fFindHistory= new ArrayList<String>(HISTORY_SIZE - 1);
+ fReplaceHistory= new ArrayList<String>(HISTORY_SIZE - 1);
fWrapInit= false;
fCaseInit= false;
@@ -894,7 +887,7 @@ class STFindReplaceDialog extends Dialog {
* Returns the dialog's history.
* @return the dialog's history
*/
- private List getFindHistory() {
+ private List<String> getFindHistory() {
return fFindHistory;
}
@@ -915,7 +908,7 @@ class STFindReplaceDialog extends Dialog {
* Returns the dialog's replace history.
* @return the dialog's replace history
*/
- private List getReplaceHistory() {
+ private List<String> getReplaceHistory() {
return fReplaceHistory;
}
@@ -1228,101 +1221,6 @@ class STFindReplaceDialog extends Dialog {
}
/**
- * Replaces all occurrences of the user's findString with
- * the replace string. Indicate to the user the number of replacements
- * that occur.
- */
- private void performReplaceAll() {
-
- int replaceCount= 0;
- final String replaceString= getReplaceString();
- final String findString= getFindString();
-
- if (findString != null && findString.length() > 0) {
-
- class ReplaceAllRunnable implements Runnable {
- public int numberOfOccurrences;
- public void run() {
- numberOfOccurrences= replaceAll(findString, replaceString == null ? "" : replaceString, isForwardSearch(), isCaseSensitiveSearch(), isWrapSearch(), isWholeWordSearch(), isRegExSearchAvailableAndChecked()); //$NON-NLS-1$
- }
- }
-
- try {
- ReplaceAllRunnable runnable= new ReplaceAllRunnable();
- BusyIndicator.showWhile(fActiveShell.getDisplay(), runnable);
- replaceCount= runnable.numberOfOccurrences;
-
- if (replaceCount != 0) {
- if (replaceCount == 1) { // not plural
- statusMessage(EditorMessages.FindReplace_Status_replacement_label);
- } else {
- String msg= EditorMessages.FindReplace_Status_replacements_label;
- msg= NLSUtility.format(msg, String.valueOf(replaceCount));
- statusMessage(msg);
- }
- } else {
- statusMessage(EditorMessages.FindReplace_Status_noMatch_label);
- }
- } catch (PatternSyntaxException ex) {
- statusError(ex.getLocalizedMessage());
- } catch (IllegalStateException ex) {
- // we don't keep state in this dialog
- }
- }
- writeSelection();
- updateButtonState();
- }
-
- /**
- * Validates the state of the find/replace target.
- * @return <code>true</code> if target can be changed, <code>false</code> otherwise
- * @since 2.1
- */
- private boolean validateTargetState() {
-
- if (fTarget instanceof IFindReplaceTargetExtension2) {
- IFindReplaceTargetExtension2 extension= (IFindReplaceTargetExtension2) fTarget;
- if (!extension.validateTargetState()) {
- statusError(EditorMessages.FindReplaceDialog_read_only);
- updateButtonState();
- return false;
- }
- }
- return isEditable();
- }
-
- /**
- * Replaces the current selection of the target with the user's
- * replace string.
- *
- * @return <code>true</code> if the operation was successful
- */
- private boolean performReplaceSelection() {
-
- if (!validateTargetState())
- return false;
-
- String replaceString= getReplaceString();
- if (replaceString == null)
- replaceString= ""; //$NON-NLS-1$
-
- boolean replaced;
- try {
- replaceSelection(replaceString, isRegExSearchAvailableAndChecked());
- replaced= true;
- writeSelection();
- } catch (PatternSyntaxException ex) {
- statusError(ex.getLocalizedMessage());
- replaced= false;
- } catch (IllegalStateException ex) {
- replaced= false;
- }
-
- updateButtonState();
- return replaced;
- }
-
- /**
* Locates the user's findString in the text of the target.
*/
private void performSearch() {
@@ -1367,28 +1265,9 @@ class STFindReplaceDialog extends Dialog {
updateButtonState(!somethingFound);
}
- /**
- * Replaces all occurrences of the user's findString with
- * the replace string. Returns the number of replacements
- * that occur.
- *
- * @param findString the string to search for
- * @param replaceString the replacement string
- * @param forwardSearch the search direction
- * @param caseSensitive should the search be case sensitive
- * @param wrapSearch should search wrap to start/end if end/start is reached
- * @param wholeWord does the search string represent a complete word
- * @param regExSearch if <code>true</code> findString represents a regular expression
- * @return the number of occurrences
- *
- * @since 3.0
- */
- private int replaceAll(String findString, String replaceString, boolean forwardSearch, boolean caseSensitive, boolean wrapSearch, boolean wholeWord, boolean regExSearch) {
- return 0;
- }
// ------- UI creation ---------------------------------------
-
+
/**
* Attaches the given layout specification to the <code>component</code>.
*
@@ -1401,8 +1280,8 @@ class STFindReplaceDialog extends Dialog {
private void setGridData(Control component, int horizontalAlignment, boolean grabExcessHorizontalSpace, int verticalAlignment, boolean grabExcessVerticalSpace) {
GridData gd;
if (component instanceof Button && (((Button)component).getStyle() & SWT.PUSH) != 0) {
- SWTUtil.setButtonDimensionHint((Button)component);
gd= (GridData)component.getLayoutData();
+ gd.horizontalAlignment = GridData.FILL;
} else {
gd= new GridData();
component.setLayoutData(gd);
@@ -1443,12 +1322,6 @@ class STFindReplaceDialog extends Dialog {
*/
private void updateButtonState(boolean disableReplace) {
if (okToUse(getShell()) && okToUse(fFindNextButton)) {
-
- boolean selection= false;
- if (fTarget != null) {
- String selectedText= fTarget.getSelectionText(index);
- selection= (selectedText != null && selectedText.length() > 0);
- }
boolean enable= fTarget != null && (fActiveShell == fParentShell || fActiveShell == getShell());
String str= getFindString();
boolean findString= str != null && str.length() > 0;
@@ -1486,7 +1359,7 @@ class STFindReplaceDialog extends Dialog {
* @param combo combo to be updated
* @param content to be put into the combo
*/
- private void updateCombo(Combo combo, List content) {
+ private void updateCombo(Combo combo, List<String> content) {
combo.removeAll();
for (int i= 0; i < content.size(); i++) {
combo.add(content.get(i).toString());
@@ -1495,16 +1368,6 @@ class STFindReplaceDialog extends Dialog {
// ------- open / reopen ---------------------------------------
- /**
- * Called after executed find/replace action to update the history.
- */
- private void updateFindAndReplaceHistory() {
- updateFindHistory();
- if (okToUse(fReplaceField)) {
- updateHistory(fReplaceField, fReplaceHistory);
- }
-
- }
/**
* Called after executed find action to update the history.
@@ -1522,7 +1385,7 @@ class STFindReplaceDialog extends Dialog {
* @param combo to be updated
* @param history to be put into the combo
*/
- private void updateHistory(Combo combo, List history) {
+ private void updateHistory(Combo combo, List<String> history) {
String findString= combo.getText();
int index= history.indexOf(findString);
if (index != 0) {
@@ -1627,7 +1490,7 @@ class STFindReplaceDialog extends Dialog {
* @return the dialog settings to be used
*/
private IDialogSettings getDialogSettings() {
- IDialogSettings settings= TextEditorPlugin.getDefault().getDialogSettings();
+ IDialogSettings settings= STDataViewersActivator.getDefault().getDialogSettings();
fDialogSettings= settings.getSection(getClass().getName());
if (fDialogSettings == null)
fDialogSettings= settings.addNewSection(getClass().getName());
@@ -1640,7 +1503,7 @@ class STFindReplaceDialog extends Dialog {
*/
protected IDialogSettings getDialogBoundsSettings() {
String sectionName= getClass().getName() + "_dialogBounds"; //$NON-NLS-1$
- IDialogSettings settings= TextEditorPlugin.getDefault().getDialogSettings();
+ IDialogSettings settings= STDataViewersActivator.getDefault().getDialogSettings();
IDialogSettings section= settings.getSection(sectionName);
if (section == null)
section= settings.addNewSection(sectionName);
@@ -1670,7 +1533,7 @@ class STFindReplaceDialog extends Dialog {
String[] findHistory= s.getArray("findhistory"); //$NON-NLS-1$
if (findHistory != null) {
- List history= getFindHistory();
+ List<String> history= getFindHistory();
history.clear();
for (int i= 0; i < findHistory.length; i++)
history.add(findHistory[i]);
@@ -1678,7 +1541,7 @@ class STFindReplaceDialog extends Dialog {
String[] replaceHistory= s.getArray("replacehistory"); //$NON-NLS-1$
if (replaceHistory != null) {
- List history= getReplaceHistory();
+ List<String> history= getReplaceHistory();
history.clear();
for (int i= 0; i < replaceHistory.length; i++)
history.add(replaceHistory[i]);
@@ -1697,7 +1560,7 @@ class STFindReplaceDialog extends Dialog {
s.put("incremental", fIncrementalInit); //$NON-NLS-1$
s.put("isRegEx", fIsRegExInit); //$NON-NLS-1$
- List history= getFindHistory();
+ List<String> history= getFindHistory();
String findString= getFindString();
if (findString.length() > 0)
history.add(0, findString);
@@ -1718,11 +1581,11 @@ class STFindReplaceDialog extends Dialog {
* @param sectionName the section name
* @since 3.2
*/
- private void writeHistory(List history, IDialogSettings settings, String sectionName) {
+ private void writeHistory(List<String> history, IDialogSettings settings, String sectionName) {
int itemCount= history.size();
- Set distinctItems= new HashSet(itemCount);
+ Set<String> distinctItems= new HashSet<String>(itemCount);
for (int i= 0; i < itemCount; i++) {
- String item= (String)history.get(i);
+ String item= history.get(i);
if (distinctItems.contains(item)) {
history.remove(i--);
itemCount--;
diff --git a/gprof/org.eclipse.linuxtools.dataviewers/src/org/eclipse/linuxtools/dataviewers/findreplace/STTreeViewerRow.java b/gprof/org.eclipse.linuxtools.dataviewers/src/org/eclipse/linuxtools/dataviewers/findreplace/STTreeViewerRow.java
index a4528f1db2..123db042af 100644
--- a/gprof/org.eclipse.linuxtools.dataviewers/src/org/eclipse/linuxtools/dataviewers/findreplace/STTreeViewerRow.java
+++ b/gprof/org.eclipse.linuxtools.dataviewers/src/org/eclipse/linuxtools/dataviewers/findreplace/STTreeViewerRow.java
@@ -290,7 +290,7 @@ public class STTreeViewerRow extends ViewerRow {
public TreePath getTreePath() {
TreeItem tItem = item;
- LinkedList segments = new LinkedList();
+ LinkedList<Object> segments = new LinkedList<Object>();
while (tItem != null) {
Object segment = tItem.getData();
Assert.isNotNull(segment);
diff --git a/gprof/org.eclipse.linuxtools.gprof-feature/ChangeLog b/gprof/org.eclipse.linuxtools.gprof-feature/ChangeLog
index 0c0e1fde36..8d3a7a4493 100644
--- a/gprof/org.eclipse.linuxtools.gprof-feature/ChangeLog
+++ b/gprof/org.eclipse.linuxtools.gprof-feature/ChangeLog
@@ -1,3 +1,18 @@
+2010-05-18 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Fix provider name.
+
+2010-04-26 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Match consistent license text (bug #306627). Update
+ copyright year.
+ * license.html: New file. HTML version of SUA (bug #306627).
+ * build.properties: Include license.html.
+
+2010-04-12 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Match consistent license text (bug #306627).
+
2009-07-31 Andrew Overholt <overholt@redhat.com>
Bug #282028
diff --git a/gprof/org.eclipse.linuxtools.gprof-feature/build.properties b/gprof/org.eclipse.linuxtools.gprof-feature/build.properties
index fb599f3dec..5f2a8b25aa 100644
--- a/gprof/org.eclipse.linuxtools.gprof-feature/build.properties
+++ b/gprof/org.eclipse.linuxtools.gprof-feature/build.properties
@@ -1,8 +1,9 @@
bin.includes = feature.xml,\
feature.properties,\
- ChangeLog,\
- epl-v10.html
+ epl-v10.html,\
+ license.html
src.includes = epl-v10.html,\
feature.properties,\
feature.xml,\
- ChangeLog
+ ChangeLog,\
+ license.html
diff --git a/gprof/org.eclipse.linuxtools.gprof-feature/feature.properties b/gprof/org.eclipse.linuxtools.gprof-feature/feature.properties
index ca8704074f..3e910f55d1 100644
--- a/gprof/org.eclipse.linuxtools.gprof-feature/feature.properties
+++ b/gprof/org.eclipse.linuxtools.gprof-feature/feature.properties
@@ -10,12 +10,12 @@
#********************************************************************************
featureName=GProf Integration (Incubation)
description=Functionality to integrate GProf with the workbench.
-provider=Eclipse
-copyright=Copyright 2009 Red Hat, Inc.
-licenseURL=epl-v10.html
+provider=Eclipse Linux Tools
+copyright=Copyright 2009, 2010 Red Hat, Inc.
+licenseURL=license.html
license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
\n\
Usage Of Content\n\
\n\
@@ -23,42 +23,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
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\
+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\
+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\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this 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\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software 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\
+ - 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\
The terms and conditions governing Plug-ins and Fragments should be\n\
contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -67,46 +63,76 @@ 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\
+ - 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\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update 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\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\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\
+ - 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\
+ - 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\
+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\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+ 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+ the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+ extending or updating the functionality of an Eclipse-based product.\n\
+ 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+ Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+ 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+ govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+ Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+ with the Specification. Such Installable Software Agreement must inform the user of the\n\
+ terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+ the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+ indication of agreement by the user, the provisioning Technology will complete installation\n\
+ of the Installable Software.\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\
+regulations and policies concerning the import, possession, or use, and\n\
+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 \ No newline at end of file
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
diff --git a/gprof/org.eclipse.linuxtools.gprof-feature/feature.xml b/gprof/org.eclipse.linuxtools.gprof-feature/feature.xml
index 8520c7d5bc..5c48baa075 100644
--- a/gprof/org.eclipse.linuxtools.gprof-feature/feature.xml
+++ b/gprof/org.eclipse.linuxtools.gprof-feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.linuxtools.gprof"
label="%featureName"
- version="0.3.0.qualifier"
+ version="0.5.0.qualifier"
provider-name="%featureProvider">
<description>
@@ -42,4 +42,11 @@
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.eclipse.linuxtools.dataviewers.charts"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
diff --git a/gprof/org.eclipse.linuxtools.gprof-feature/license.html b/gprof/org.eclipse.linuxtools.gprof-feature/license.html
new file mode 100644
index 0000000000..c184ca36a9
--- /dev/null
+++ b/gprof/org.eclipse.linuxtools.gprof-feature/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 14, 2010</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 Foundation source code
+ repository (&quot;Repository&quot;) in software 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 Provisioning Technology (as defined below), 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>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>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ (&quot;Specification&quot;).</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
+ on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<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>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/bigtest_gprof_input/testParse.ref b/gprof/org.eclipse.linuxtools.gprof.test/bigtest_gprof_input/testParse.ref
new file mode 100755
index 0000000000..4d85dbb6a5
--- /dev/null
+++ b/gprof/org.eclipse.linuxtools.gprof.test/bigtest_gprof_input/testParse.ref
@@ -0,0 +1,4019 @@
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 0
+
+Histogram Header :
+
+ Base pc address of sample buffer = 0x8048398
+ Max pc address of sampled buffer = 0x8077570
+ Number of histogram samples = 48246
+ Profiling clock rate = 100
+ Physical dimension abreviation : 's' for "seconds" 'm' for "milliseconds" = s
+
+ == HISTOGRAM RECORDS ==
+ =========================
+
+Histogram Header :
+
+ Base pc address of sample buffer = 0x8048398
+ Max pc address of sampled buffer = 0x8077570
+ Number of histogram samples = 48246
+ Profiling clock rate = 100
+ Physical dimension abreviation : 's' for "seconds" 'm' for "milliseconds" = s
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/build.properties b/gprof/org.eclipse.linuxtools.gprof.test/build.properties
index aa1a008269..e1f454cb7f 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/build.properties
+++ b/gprof/org.eclipse.linuxtools.gprof.test/build.properties
@@ -2,4 +2,9 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
+ test.xml,\
+ foox_gprof_input/,\
+ foocpp_gprof_input/,\
+ partially-pg-build_gprof_input/,\
+ bigtest_gprof_input/,\
plugin.properties
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/a.out b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/a.out
index 3b2b1b793d..ff5a5157e3 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/a.out
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/a.out
Binary files differ
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/gmon.out b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/gmon.out
index e609d95a49..3f9fdb70b6 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/gmon.out
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/gmon.out
Binary files differ
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/src/foox.cpp b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/src/foox.cpp
index b2f9263bfb..faa27af107 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/src/foox.cpp
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/src/foox.cpp
@@ -1,6 +1,6 @@
#include <math.h>
-#define TIMEBASE 1
+#define TIMEBASE 100
#define TEMPO(TJ,TI, IN, OUT) { \
volatile double d1 = 0;\
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testCallgraphTimeView.ref b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testCallgraphTimeView.ref
index 549c72b1dd..9d23f28828 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testCallgraphTimeView.ref
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testCallgraphTimeView.ref
@@ -1,42 +1,42 @@
Hierarchy;Name (location);Time;Calls;Time/Call;%Time
-+-;Summary;0ns;;;0.0
- +-;A::foocpp::foocpp[in-charge]();0ns;2;0ns;0.0
++-;Summary;30.0ms;;;100.0
+ +-;A::foocpp::foocpp();0ns;2;0ns;0.0
| +-;parents;0ns;2;0ns;0.0
- | +-;B::foocpp::foocpp[in-charge]() (foox.cpp:82);0ns;1;0ns;0.0
+ | +-;B::foocpp::foocpp() (foox.cpp:82);0ns;1;0ns;0.0
| +-;main (foox.cpp:110);0ns;1;0ns;0.0
- +-;A::foocpp::func_a(int);0ns;2;0ns;0.0
+ +-;A::foocpp::func_a(int);10.0ms;2;5.0ms;33.333332
| +-;children;0ns;2;0ns;0.0
| | +-;A::foocpp::func_f(int) (foox.cpp:47);0ns;2;0ns;0.0
- | +-;parents;0ns;2;0ns;0.0
- | +-;B::foocpp::func_b(int) (foox.cpp:95);0ns;1;0ns;0.0
+ | +-;parents;20.0ms;2;10.0ms;66.666664
+ | +-;B::foocpp::func_b(int) (foox.cpp:95);20.0ms;1;20.0ms;66.666664
| +-;main (foox.cpp:112);0ns;1;0ns;0.0
+-;A::foocpp::func_f(int);0ns;2;0ns;0.0
+ | +-;parents;10.0ms;2;5.0ms;33.333332
+ | +-;A::foocpp::func_a(int) (foox.cpp:59);10.0ms;2;5.0ms;33.333332
+ +-;A::foocpp::~foocpp();0ns;2;0ns;0.0
| +-;parents;0ns;2;0ns;0.0
- | +-;A::foocpp::func_a(int) (foox.cpp:59);0ns;2;0ns;0.0
- +-;A::foocpp::~foocpp [in-charge]();0ns;2;0ns;0.0
- | +-;parents;0ns;2;0ns;0.0
- | +-;B::foocpp::~foocpp [in-charge]() (foox.cpp:87);0ns;1;0ns;0.0
+ | +-;B::foocpp::~foocpp() (foox.cpp:87);0ns;1;0ns;0.0
| +-;main (foox.cpp:118);0ns;1;0ns;0.0
- +-;B::foocpp::foocpp[in-charge]();0ns;1;0ns;0.0
+ +-;B::foocpp::foocpp();0ns;1;0ns;0.0
| +-;children;0ns;1;0ns;0.0
- | | +-;A::foocpp::foocpp[in-charge]() (foox.cpp:42);0ns;1;0ns;0.0
+ | | +-;A::foocpp::foocpp() (foox.cpp:42);0ns;1;0ns;0.0
| +-;parents;0ns;1;0ns;0.0
| +-;main (foox.cpp:109);0ns;1;0ns;0.0
- +-;B::foocpp::func_b(int);0ns;1;0ns;0.0
- | +-;children;0ns;1;0ns;0.0
- | | +-;A::foocpp::func_a(int) (foox.cpp:54);0ns;1;0ns;0.0
+ +-;B::foocpp::func_b(int);20.0ms;1;20.0ms;66.666664
+ | +-;children;10.0ms;1;10.0ms;33.333332
+ | | +-;A::foocpp::func_a(int) (foox.cpp:54);10.0ms;1;10.0ms;33.333332
| +-;parents;0ns;1;0ns;0.0
| +-;main (foox.cpp:115);0ns;1;0ns;0.0
- +-;B::foocpp::~foocpp [in-charge]();0ns;1;0ns;0.0
+ +-;B::foocpp::~foocpp();0ns;1;0ns;0.0
| +-;children;0ns;1;0ns;0.0
- | | +-;A::foocpp::~foocpp [in-charge]() (foox.cpp:44);0ns;1;0ns;0.0
+ | | +-;A::foocpp::~foocpp() (foox.cpp:44);0ns;1;0ns;0.0
| +-;parents;0ns;1;0ns;0.0
| +-;main (foox.cpp:119);0ns;1;0ns;0.0
+-;main;0ns;0;;0.0
- +-;children;0ns;6;0ns;0.0
- +-;A::foocpp::foocpp[in-charge]() (foox.cpp:42);0ns;1;0ns;0.0
- +-;A::foocpp::func_a(int) (foox.cpp:54);0ns;1;0ns;0.0
- +-;A::foocpp::~foocpp [in-charge]() (foox.cpp:44);0ns;1;0ns;0.0
- +-;B::foocpp::foocpp[in-charge]() (foox.cpp:81);0ns;1;0ns;0.0
- +-;B::foocpp::func_b(int) (foox.cpp:91);0ns;1;0ns;0.0
- +-;B::foocpp::~foocpp [in-charge]() (foox.cpp:86);0ns;1;0ns;0.0
+ +-;children;30.0ms;6;5.0ms;100.0
+ +-;A::foocpp::foocpp() (foox.cpp:42);0ns;1;0ns;0.0
+ +-;A::foocpp::func_a(int) (foox.cpp:54);10.0ms;1;10.0ms;33.333332
+ +-;A::foocpp::~foocpp() (foox.cpp:44);0ns;1;0ns;0.0
+ +-;B::foocpp::foocpp() (foox.cpp:81);0ns;1;0ns;0.0
+ +-;B::foocpp::func_b(int) (foox.cpp:91);20.0ms;1;20.0ms;66.666664
+ +-;B::foocpp::~foocpp() (foox.cpp:86);0ns;1;0ns;0.0
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testCallgraphTimeView.ref.binutils-2.16 b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testCallgraphTimeView.ref.binutils-2.16
new file mode 100644
index 0000000000..cab682788c
--- /dev/null
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testCallgraphTimeView.ref.binutils-2.16
@@ -0,0 +1,42 @@
+Hierarchy;Name (location);Time;Calls;Time/Call;%Time
++-;Summary;30.0ms;;;100.0
+ +-;A::foocpp::foocpp();0ns;2;0ns;0.0
+ | +-;parents;0ns;2;0ns;0.0
+ | +-;B::foocpp::foocpp() (foox.cpp:82);0ns;1;0ns;0.0
+ | +-;main (foox.cpp:110);0ns;1;0ns;0.0
+ +-;A::foocpp::func_a(int);10.0ms;2;5.0ms;33.333332
+ | +-;children;0ns;2;0ns;0.0
+ | | +-;A::foocpp::func_f(int) (foox.cpp:47);0ns;2;0ns;0.0
+ | +-;parents;20.0ms;2;10.0ms;66.666664
+ | +-;B::foocpp::func_b(int) (foox.cpp:95);20.0ms;1;20.0ms;66.666664
+ | +-;main (foox.cpp:112);0ns;1;0ns;0.0
+ +-;A::foocpp::func_f(int);0ns;2;0ns;0.0
+ | +-;parents;10.0ms;2;5.0ms;33.333332
+ | +-;A::foocpp::func_a(int) (foox.cpp:59);10.0ms;2;5.0ms;33.333332
+ +-;A::foocpp::~foocpp();0ns;2;0ns;0.0
+ | +-;parents;0ns;2;0ns;0.0
+ | +-;B::foocpp::~foocpp() (foox.cpp:87);0ns;1;0ns;0.0
+ | +-;main (foox.cpp:118);0ns;1;0ns;0.0
+ +-;B::foocpp::foocpp();0ns;1;0ns;0.0
+ | +-;children;0ns;1;0ns;0.0
+ | | +-;A::foocpp::foocpp() (foox.cpp:42);0ns;1;0ns;0.0
+ | +-;parents;0ns;1;0ns;0.0
+ | +-;main (foox.cpp:109);0ns;1;0ns;0.0
+ +-;B::foocpp::func_b(int);20.0ms;1;20.0ms;66.666664
+ | +-;children;10.0ms;1;10.0ms;33.333332
+ | | +-;A::foocpp::func_a(int) (foox.cpp:99);10.0ms;1;10.0ms;33.333332
+ | +-;parents;0ns;1;0ns;0.0
+ | +-;main (foox.cpp:115);0ns;1;0ns;0.0
+ +-;B::foocpp::~foocpp();0ns;1;0ns;0.0
+ | +-;children;0ns;1;0ns;0.0
+ | | +-;A::foocpp::~foocpp() (foox.cpp:44);0ns;1;0ns;0.0
+ | +-;parents;0ns;1;0ns;0.0
+ | +-;main (foox.cpp:119);0ns;1;0ns;0.0
+ +-;main;0ns;0;;0.0
+ +-;children;30.0ms;6;5.0ms;100.0
+ +-;A::foocpp::foocpp() (foox.cpp:42);0ns;1;0ns;0.0
+ +-;A::foocpp::func_a(int) (foox.cpp:99);10.0ms;1;10.0ms;33.333332
+ +-;A::foocpp::~foocpp() (foox.cpp:44);0ns;1;0ns;0.0
+ +-;B::foocpp::foocpp() (foox.cpp:42);0ns;1;0ns;0.0
+ +-;B::foocpp::func_b(int) (foox.cpp:44);20.0ms;1;20.0ms;66.666664
+ +-;B::foocpp::~foocpp() (foox.cpp:86);0ns;1;0ns;0.0
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testCallgraphView.ref b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testCallgraphView.ref
index 98e450cf7f..0a9da1243b 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testCallgraphView.ref
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testCallgraphView.ref
@@ -1,42 +1,42 @@
Hierarchy;Name (location);Samples;Calls;Time/Call;%Time
-+-;Summary;0;;;0.0
- +-;A::foocpp::foocpp[in-charge]();0;2;0ns;0.0
++-;Summary;3;;;100.0
+ +-;A::foocpp::foocpp();0;2;0ns;0.0
| +-;parents;0;2;0ns;0.0
- | +-;B::foocpp::foocpp[in-charge]() (foox.cpp:82);0;1;0ns;0.0
+ | +-;B::foocpp::foocpp() (foox.cpp:82);0;1;0ns;0.0
| +-;main (foox.cpp:110);0;1;0ns;0.0
- +-;A::foocpp::func_a(int);0;2;0ns;0.0
+ +-;A::foocpp::func_a(int);1;2;5.0ms;33.333332
| +-;children;0;2;0ns;0.0
| | +-;A::foocpp::func_f(int) (foox.cpp:47);0;2;0ns;0.0
- | +-;parents;0;2;0ns;0.0
- | +-;B::foocpp::func_b(int) (foox.cpp:95);0;1;0ns;0.0
+ | +-;parents;2;2;10.0ms;66.666664
+ | +-;B::foocpp::func_b(int) (foox.cpp:95);2;1;20.0ms;66.666664
| +-;main (foox.cpp:112);0;1;0ns;0.0
+-;A::foocpp::func_f(int);0;2;0ns;0.0
+ | +-;parents;1;2;5.0ms;33.333332
+ | +-;A::foocpp::func_a(int) (foox.cpp:59);1;2;5.0ms;33.333332
+ +-;A::foocpp::~foocpp();0;2;0ns;0.0
| +-;parents;0;2;0ns;0.0
- | +-;A::foocpp::func_a(int) (foox.cpp:59);0;2;0ns;0.0
- +-;A::foocpp::~foocpp [in-charge]();0;2;0ns;0.0
- | +-;parents;0;2;0ns;0.0
- | +-;B::foocpp::~foocpp [in-charge]() (foox.cpp:87);0;1;0ns;0.0
+ | +-;B::foocpp::~foocpp() (foox.cpp:87);0;1;0ns;0.0
| +-;main (foox.cpp:118);0;1;0ns;0.0
- +-;B::foocpp::foocpp[in-charge]();0;1;0ns;0.0
+ +-;B::foocpp::foocpp();0;1;0ns;0.0
| +-;children;0;1;0ns;0.0
- | | +-;A::foocpp::foocpp[in-charge]() (foox.cpp:42);0;1;0ns;0.0
+ | | +-;A::foocpp::foocpp() (foox.cpp:42);0;1;0ns;0.0
| +-;parents;0;1;0ns;0.0
| +-;main (foox.cpp:109);0;1;0ns;0.0
- +-;B::foocpp::func_b(int);0;1;0ns;0.0
- | +-;children;0;1;0ns;0.0
- | | +-;A::foocpp::func_a(int) (foox.cpp:54);0;1;0ns;0.0
+ +-;B::foocpp::func_b(int);2;1;20.0ms;66.666664
+ | +-;children;1;1;10.0ms;33.333332
+ | | +-;A::foocpp::func_a(int) (foox.cpp:54);1;1;10.0ms;33.333332
| +-;parents;0;1;0ns;0.0
| +-;main (foox.cpp:115);0;1;0ns;0.0
- +-;B::foocpp::~foocpp [in-charge]();0;1;0ns;0.0
+ +-;B::foocpp::~foocpp();0;1;0ns;0.0
| +-;children;0;1;0ns;0.0
- | | +-;A::foocpp::~foocpp [in-charge]() (foox.cpp:44);0;1;0ns;0.0
+ | | +-;A::foocpp::~foocpp() (foox.cpp:44);0;1;0ns;0.0
| +-;parents;0;1;0ns;0.0
| +-;main (foox.cpp:119);0;1;0ns;0.0
+-;main;0;0;;0.0
- +-;children;0;6;0ns;0.0
- +-;A::foocpp::foocpp[in-charge]() (foox.cpp:42);0;1;0ns;0.0
- +-;A::foocpp::func_a(int) (foox.cpp:54);0;1;0ns;0.0
- +-;A::foocpp::~foocpp [in-charge]() (foox.cpp:44);0;1;0ns;0.0
- +-;B::foocpp::foocpp[in-charge]() (foox.cpp:81);0;1;0ns;0.0
- +-;B::foocpp::func_b(int) (foox.cpp:91);0;1;0ns;0.0
- +-;B::foocpp::~foocpp [in-charge]() (foox.cpp:86);0;1;0ns;0.0
+ +-;children;3;6;5.0ms;100.0
+ +-;A::foocpp::foocpp() (foox.cpp:42);0;1;0ns;0.0
+ +-;A::foocpp::func_a(int) (foox.cpp:54);1;1;10.0ms;33.333332
+ +-;A::foocpp::~foocpp() (foox.cpp:44);0;1;0ns;0.0
+ +-;B::foocpp::foocpp() (foox.cpp:81);0;1;0ns;0.0
+ +-;B::foocpp::func_b(int) (foox.cpp:91);2;1;20.0ms;66.666664
+ +-;B::foocpp::~foocpp() (foox.cpp:86);0;1;0ns;0.0
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testCallgraphView.ref.binutils-2.16 b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testCallgraphView.ref.binutils-2.16
new file mode 100644
index 0000000000..9071bb7fa0
--- /dev/null
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testCallgraphView.ref.binutils-2.16
@@ -0,0 +1,42 @@
+Hierarchy;Name (location);Samples;Calls;Time/Call;%Time
++-;Summary;3;;;100.0
+ +-;A::foocpp::foocpp();0;2;0ns;0.0
+ | +-;parents;0;2;0ns;0.0
+ | +-;B::foocpp::foocpp() (foox.cpp:82);0;1;0ns;0.0
+ | +-;main (foox.cpp:110);0;1;0ns;0.0
+ +-;A::foocpp::func_a(int);1;2;5.0ms;33.333332
+ | +-;children;0;2;0ns;0.0
+ | | +-;A::foocpp::func_f(int) (foox.cpp:47);0;2;0ns;0.0
+ | +-;parents;2;2;10.0ms;66.666664
+ | +-;B::foocpp::func_b(int) (foox.cpp:95);2;1;20.0ms;66.666664
+ | +-;main (foox.cpp:112);0;1;0ns;0.0
+ +-;A::foocpp::func_f(int);0;2;0ns;0.0
+ | +-;parents;1;2;5.0ms;33.333332
+ | +-;A::foocpp::func_a(int) (foox.cpp:59);1;2;5.0ms;33.333332
+ +-;A::foocpp::~foocpp();0;2;0ns;0.0
+ | +-;parents;0;2;0ns;0.0
+ | +-;B::foocpp::~foocpp() (foox.cpp:87);0;1;0ns;0.0
+ | +-;main (foox.cpp:118);0;1;0ns;0.0
+ +-;B::foocpp::foocpp();0;1;0ns;0.0
+ | +-;children;0;1;0ns;0.0
+ | | +-;A::foocpp::foocpp() (foox.cpp:42);0;1;0ns;0.0
+ | +-;parents;0;1;0ns;0.0
+ | +-;main (foox.cpp:109);0;1;0ns;0.0
+ +-;B::foocpp::func_b(int);2;1;20.0ms;66.666664
+ | +-;children;1;1;10.0ms;33.333332
+ | | +-;A::foocpp::func_a(int) (foox.cpp:99);1;1;10.0ms;33.333332
+ | +-;parents;0;1;0ns;0.0
+ | +-;main (foox.cpp:115);0;1;0ns;0.0
+ +-;B::foocpp::~foocpp();0;1;0ns;0.0
+ | +-;children;0;1;0ns;0.0
+ | | +-;A::foocpp::~foocpp() (foox.cpp:44);0;1;0ns;0.0
+ | +-;parents;0;1;0ns;0.0
+ | +-;main (foox.cpp:119);0;1;0ns;0.0
+ +-;main;0;0;;0.0
+ +-;children;3;6;5.0ms;100.0
+ +-;A::foocpp::foocpp() (foox.cpp:42);0;1;0ns;0.0
+ +-;A::foocpp::func_a(int) (foox.cpp:99);1;1;10.0ms;33.333332
+ +-;A::foocpp::~foocpp() (foox.cpp:44);0;1;0ns;0.0
+ +-;B::foocpp::foocpp() (foox.cpp:42);0;1;0ns;0.0
+ +-;B::foocpp::func_b(int) (foox.cpp:44);2;1;20.0ms;66.666664
+ +-;B::foocpp::~foocpp() (foox.cpp:86);0;1;0ns;0.0
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testFlatSampleView.ref b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testFlatSampleView.ref
index fbcbf2dadb..4e5ecab4fe 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testFlatSampleView.ref
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testFlatSampleView.ref
@@ -1,2 +1,8 @@
Hierarchy;Name (location);Samples;Calls;Time/Call;%Time
-+-;Summary;0;;;0.0
++-;Summary;3;;;100.0
+ +-;A::foocpp::func_a(int) (foox.cpp:60);1;;;33.333332
+ | +-;0x8048b84;1;;;33.333332
+ +-;B::foocpp::func_b(int) (foox.cpp:93);1;;;33.333332
+ | +-;0x8048978;1;;;33.333332
+ +-;B::foocpp::func_b(int) (foox.cpp:97);1;;;33.333332
+ +-;0x8048a28;1;;;33.333332
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testFlatTimeView.ref b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testFlatTimeView.ref
index 5a2c2d2b95..201a2adaa4 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testFlatTimeView.ref
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testFlatTimeView.ref
@@ -1,2 +1,8 @@
Hierarchy;Name (location);Time;Calls;Time/Call;%Time
-+-;Summary;0ns;;;0.0
++-;Summary;30.0ms;;;100.0
+ +-;A::foocpp::func_a(int) (foox.cpp:60);10.0ms;;;33.333332
+ | +-;0x8048b84;10.0ms;;;33.333332
+ +-;B::foocpp::func_b(int) (foox.cpp:93);10.0ms;;;33.333332
+ | +-;0x8048978;10.0ms;;;33.333332
+ +-;B::foocpp::func_b(int) (foox.cpp:97);10.0ms;;;33.333332
+ +-;0x8048a28;10.0ms;;;33.333332
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testFunctionSampleView.ref b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testFunctionSampleView.ref
index 3a1e605f03..51d511c10c 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testFunctionSampleView.ref
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testFunctionSampleView.ref
@@ -1,10 +1,16 @@
Hierarchy;Name (location);Samples;Calls;Time/Call;%Time
-+-;Summary;0;;;0.0
- +-;A::foocpp::foocpp[in-charge]();0;2;0ns;0.0
- +-;A::foocpp::func_a(int);0;2;0ns;0.0
++-;Summary;3;;;100.0
+ +-;A::foocpp::foocpp();0;2;0ns;0.0
+ +-;A::foocpp::func_a(int);1;2;5.0ms;33.333332
+ | +-;A::foocpp::func_a(int) (foox.cpp:60);1;;;33.333332
+ | +-;0x8048b84;1;;;33.333332
+-;A::foocpp::func_f(int);0;2;0ns;0.0
- +-;A::foocpp::~foocpp [in-charge]();0;2;0ns;0.0
- +-;B::foocpp::foocpp[in-charge]();0;1;0ns;0.0
- +-;B::foocpp::func_b(int);0;1;0ns;0.0
- +-;B::foocpp::~foocpp [in-charge]();0;1;0ns;0.0
+ +-;A::foocpp::~foocpp();0;2;0ns;0.0
+ +-;B::foocpp::foocpp();0;1;0ns;0.0
+ +-;B::foocpp::func_b(int);2;1;20.0ms;66.666664
+ | +-;B::foocpp::func_b(int) (foox.cpp:93);1;;;33.333332
+ | | +-;0x8048978;1;;;33.333332
+ | +-;B::foocpp::func_b(int) (foox.cpp:97);1;;;33.333332
+ | +-;0x8048a28;1;;;33.333332
+ +-;B::foocpp::~foocpp();0;1;0ns;0.0
+-;main;0;0;;0.0
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testFunctionTimeView.ref b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testFunctionTimeView.ref
index 12b785fa54..b30dc415e7 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testFunctionTimeView.ref
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testFunctionTimeView.ref
@@ -1,10 +1,16 @@
Hierarchy;Name (location);Time;Calls;Time/Call;%Time
-+-;Summary;0ns;;;0.0
- +-;A::foocpp::foocpp[in-charge]();0ns;2;0ns;0.0
- +-;A::foocpp::func_a(int);0ns;2;0ns;0.0
++-;Summary;30.0ms;;;100.0
+ +-;A::foocpp::foocpp();0ns;2;0ns;0.0
+ +-;A::foocpp::func_a(int);10.0ms;2;5.0ms;33.333332
+ | +-;A::foocpp::func_a(int) (foox.cpp:60);10.0ms;;;33.333332
+ | +-;0x8048b84;10.0ms;;;33.333332
+-;A::foocpp::func_f(int);0ns;2;0ns;0.0
- +-;A::foocpp::~foocpp [in-charge]();0ns;2;0ns;0.0
- +-;B::foocpp::foocpp[in-charge]();0ns;1;0ns;0.0
- +-;B::foocpp::func_b(int);0ns;1;0ns;0.0
- +-;B::foocpp::~foocpp [in-charge]();0ns;1;0ns;0.0
+ +-;A::foocpp::~foocpp();0ns;2;0ns;0.0
+ +-;B::foocpp::foocpp();0ns;1;0ns;0.0
+ +-;B::foocpp::func_b(int);20.0ms;1;20.0ms;66.666664
+ | +-;B::foocpp::func_b(int) (foox.cpp:93);10.0ms;;;33.333332
+ | | +-;0x8048978;10.0ms;;;33.333332
+ | +-;B::foocpp::func_b(int) (foox.cpp:97);10.0ms;;;33.333332
+ | +-;0x8048a28;10.0ms;;;33.333332
+ +-;B::foocpp::~foocpp();0ns;1;0ns;0.0
+-;main;0ns;0;;0.0
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testParse.ref b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testParse.ref
new file mode 100755
index 0000000000..dfe78acfd8
--- /dev/null
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testParse.ref
@@ -0,0 +1,67 @@
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 0
+
+Histogram Header :
+
+ Base pc address of sample buffer = 0x804852c
+ Max pc address of sampled buffer = 0x8048e6c
+ Number of histogram samples = 592
+ Profiling clock rate = 100
+ Physical dimension abreviation : 's' for "seconds" 'm' for "milliseconds" = s
+
+ == HISTOGRAM RECORDS ==
+ =========================
+
+Histogram Header :
+
+ Base pc address of sample buffer = 0x804852c
+ Max pc address of sampled buffer = 0x8048e6c
+ Number of histogram samples = 592
+ Profiling clock rate = 100
+ Physical dimension abreviation : 's' for "seconds" 'm' for "milliseconds" = s
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testSampleView.ref b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testSampleView.ref
index f430b089d3..3d1309e4be 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testSampleView.ref
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testSampleView.ref
@@ -1,11 +1,17 @@
Hierarchy;Name (location);Samples;Calls;Time/Call;%Time
-+-;Summary;0;;;0.0
- +-;foox.cpp;0;;;0.0
- +-;A::foocpp::foocpp[in-charge]();0;2;0ns;0.0
- +-;A::foocpp::func_a(int);0;2;0ns;0.0
++-;Summary;3;;;100.0
+ +-;foox.cpp;3;;;100.0
+ +-;A::foocpp::foocpp();0;2;0ns;0.0
+ +-;A::foocpp::func_a(int);1;2;5.0ms;33.333332
+ | +-;A::foocpp::func_a(int) (foox.cpp:60);1;;;33.333332
+ | +-;0x8048b84;1;;;33.333332
+-;A::foocpp::func_f(int);0;2;0ns;0.0
- +-;A::foocpp::~foocpp [in-charge]();0;2;0ns;0.0
- +-;B::foocpp::foocpp[in-charge]();0;1;0ns;0.0
- +-;B::foocpp::func_b(int);0;1;0ns;0.0
- +-;B::foocpp::~foocpp [in-charge]();0;1;0ns;0.0
+ +-;A::foocpp::~foocpp();0;2;0ns;0.0
+ +-;B::foocpp::foocpp();0;1;0ns;0.0
+ +-;B::foocpp::func_b(int);2;1;20.0ms;66.666664
+ | +-;B::foocpp::func_b(int) (foox.cpp:93);1;;;33.333332
+ | | +-;0x8048978;1;;;33.333332
+ | +-;B::foocpp::func_b(int) (foox.cpp:97);1;;;33.333332
+ | +-;0x8048a28;1;;;33.333332
+ +-;B::foocpp::~foocpp();0;1;0ns;0.0
+-;main;0;0;;0.0
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testTimeView.ref b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testTimeView.ref
index ec1388308d..0c8578b3ea 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testTimeView.ref
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foocpp_gprof_input/testTimeView.ref
@@ -1,11 +1,17 @@
Hierarchy;Name (location);Time;Calls;Time/Call;%Time
-+-;Summary;0ns;;;0.0
- +-;foox.cpp;0ns;;;0.0
- +-;A::foocpp::foocpp[in-charge]();0ns;2;0ns;0.0
- +-;A::foocpp::func_a(int);0ns;2;0ns;0.0
++-;Summary;30.0ms;;;100.0
+ +-;foox.cpp;30.0ms;;;100.0
+ +-;A::foocpp::foocpp();0ns;2;0ns;0.0
+ +-;A::foocpp::func_a(int);10.0ms;2;5.0ms;33.333332
+ | +-;A::foocpp::func_a(int) (foox.cpp:60);10.0ms;;;33.333332
+ | +-;0x8048b84;10.0ms;;;33.333332
+-;A::foocpp::func_f(int);0ns;2;0ns;0.0
- +-;A::foocpp::~foocpp [in-charge]();0ns;2;0ns;0.0
- +-;B::foocpp::foocpp[in-charge]();0ns;1;0ns;0.0
- +-;B::foocpp::func_b(int);0ns;1;0ns;0.0
- +-;B::foocpp::~foocpp [in-charge]();0ns;1;0ns;0.0
+ +-;A::foocpp::~foocpp();0ns;2;0ns;0.0
+ +-;B::foocpp::foocpp();0ns;1;0ns;0.0
+ +-;B::foocpp::func_b(int);20.0ms;1;20.0ms;66.666664
+ | +-;B::foocpp::func_b(int) (foox.cpp:93);10.0ms;;;33.333332
+ | | +-;0x8048978;10.0ms;;;33.333332
+ | +-;B::foocpp::func_b(int) (foox.cpp:97);10.0ms;;;33.333332
+ | +-;0x8048a28;10.0ms;;;33.333332
+ +-;B::foocpp::~foocpp();0ns;1;0ns;0.0
+-;main;0ns;0;;0.0
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/a.out b/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/a.out
index ba5cf0728e..216b3f936a 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/a.out
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/a.out
Binary files differ
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/gmon.out b/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/gmon.out
index 8672eb9e2f..e1071405b1 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/gmon.out
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/gmon.out
Binary files differ
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/src/foox.c b/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/src/foox.c
index eb4229177d..6f51dd8ae5 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/src/foox.c
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/src/foox.c
@@ -5,7 +5,7 @@ int func_b(int pb);
int func_a(int pa);
int dead_func(int pf);
-#define TIMEBASE 1
+#define TIMEBASE 300
#define TEMPO(TJ,TI, IN, OUT) { \
volatile double d1 = 0;\
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testCallgraphTimeView.ref b/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testCallgraphTimeView.ref
index a35b57d371..8d8c46afcd 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testCallgraphTimeView.ref
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testCallgraphTimeView.ref
@@ -1,20 +1,20 @@
Hierarchy;Name (location);Time;Calls;Time/Call;%Time
-+-;Summary;0ns;;;0.0
- +-;func_a;0ns;2;0ns;0.0
- | +-;children;0ns;2;0ns;0.0
- | | +-;func_f (foox.c:29);0ns;2;0ns;0.0
- | +-;parents;0ns;2;0ns;0.0
- | +-;func_b (foox.c:53);0ns;1;0ns;0.0
++-;Summary;90.0ms;;;100.0
+ +-;func_a;50.0ms;2;25.0ms;55.555557
+ | +-;children;20.0ms;2;10.0ms;22.222221
+ | | +-;func_f (foox.c:29);20.0ms;2;10.0ms;22.222221
+ | +-;parents;20.0ms;2;10.0ms;22.222221
+ | +-;func_b (foox.c:53);20.0ms;1;20.0ms;22.222221
| +-;main (foox.c:62);0ns;1;0ns;0.0
- +-;func_b;0ns;1;0ns;0.0
- | +-;children;0ns;1;0ns;0.0
- | | +-;func_a (foox.c:36);0ns;1;0ns;0.0
+ +-;func_b;20.0ms;1;20.0ms;22.222221
+ | +-;children;50.0ms;1;50.0ms;55.555557
+ | | +-;func_a (foox.c:36);50.0ms;1;50.0ms;55.555557
| +-;parents;0ns;1;0ns;0.0
| +-;main (foox.c:64);0ns;1;0ns;0.0
- +-;func_f;0ns;2;0ns;0.0
- | +-;parents;0ns;2;0ns;0.0
- | +-;func_a (foox.c:41);0ns;2;0ns;0.0
+ +-;func_f;20.0ms;2;10.0ms;22.222221
+ | +-;parents;50.0ms;2;25.0ms;55.555557
+ | +-;func_a (foox.c:41);50.0ms;2;25.0ms;55.555557
+-;main;0ns;0;;0.0
- +-;children;0ns;2;0ns;0.0
- +-;func_a (foox.c:36);0ns;1;0ns;0.0
- +-;func_b (foox.c:50);0ns;1;0ns;0.0
+ +-;children;70.0ms;2;35.0ms;77.77778
+ +-;func_a (foox.c:36);50.0ms;1;50.0ms;55.555557
+ +-;func_b (foox.c:50);20.0ms;1;20.0ms;22.222221
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testCallgraphView.ref b/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testCallgraphView.ref
index cb1d570310..7fa76f0395 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testCallgraphView.ref
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testCallgraphView.ref
@@ -1,20 +1,20 @@
Hierarchy;Name (location);Samples;Calls;Time/Call;%Time
-+-;Summary;0;;;0.0
- +-;func_a;0;2;0ns;0.0
- | +-;children;0;2;0ns;0.0
- | | +-;func_f (foox.c:29);0;2;0ns;0.0
- | +-;parents;0;2;0ns;0.0
- | +-;func_b (foox.c:53);0;1;0ns;0.0
++-;Summary;9;;;100.0
+ +-;func_a;5;2;25.0ms;55.555557
+ | +-;children;2;2;10.0ms;22.222221
+ | | +-;func_f (foox.c:29);2;2;10.0ms;22.222221
+ | +-;parents;2;2;10.0ms;22.222221
+ | +-;func_b (foox.c:53);2;1;20.0ms;22.222221
| +-;main (foox.c:62);0;1;0ns;0.0
- +-;func_b;0;1;0ns;0.0
- | +-;children;0;1;0ns;0.0
- | | +-;func_a (foox.c:36);0;1;0ns;0.0
+ +-;func_b;2;1;20.0ms;22.222221
+ | +-;children;5;1;50.0ms;55.555557
+ | | +-;func_a (foox.c:36);5;1;50.0ms;55.555557
| +-;parents;0;1;0ns;0.0
| +-;main (foox.c:64);0;1;0ns;0.0
- +-;func_f;0;2;0ns;0.0
- | +-;parents;0;2;0ns;0.0
- | +-;func_a (foox.c:41);0;2;0ns;0.0
+ +-;func_f;2;2;10.0ms;22.222221
+ | +-;parents;5;2;25.0ms;55.555557
+ | +-;func_a (foox.c:41);5;2;25.0ms;55.555557
+-;main;0;0;;0.0
- +-;children;0;2;0ns;0.0
- +-;func_a (foox.c:36);0;1;0ns;0.0
- +-;func_b (foox.c:50);0;1;0ns;0.0
+ +-;children;7;2;35.0ms;77.77778
+ +-;func_a (foox.c:36);5;1;50.0ms;55.555557
+ +-;func_b (foox.c:50);2;1;20.0ms;22.222221
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testFlatSampleView.ref b/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testFlatSampleView.ref
index fbcbf2dadb..64cc9d3b64 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testFlatSampleView.ref
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testFlatSampleView.ref
@@ -1,2 +1,17 @@
Hierarchy;Name (location);Samples;Calls;Time/Call;%Time
-+-;Summary;0;;;0.0
++-;Summary;9;;;100.0
+ +-;func_a (foox.c:38);2;;;22.222221
+ | +-;0x804861c;1;;;11.111111
+ | +-;0x8048624;1;;;11.111111
+ +-;func_a (foox.c:42);1;;;11.111111
+ | +-;0x80486d0;1;;;11.111111
+ +-;func_a (foox.c:45);2;;;22.222221
+ | +-;0x8048788;1;;;11.111111
+ | +-;0x8048798;1;;;11.111111
+ +-;func_b (foox.c:52);1;;;11.111111
+ | +-;0x8048820;1;;;11.111111
+ +-;func_b (foox.c:54);1;;;11.111111
+ | +-;0x80488dc;1;;;11.111111
+ +-;func_f (foox.c:31);2;;;22.222221
+ +-;0x804856c;1;;;11.111111
+ +-;0x804857c;1;;;11.111111
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testFlatTimeView.ref b/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testFlatTimeView.ref
index 5a2c2d2b95..5655a5c4eb 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testFlatTimeView.ref
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testFlatTimeView.ref
@@ -1,2 +1,17 @@
Hierarchy;Name (location);Time;Calls;Time/Call;%Time
-+-;Summary;0ns;;;0.0
++-;Summary;90.0ms;;;100.0
+ +-;func_a (foox.c:38);20.0ms;;;22.222221
+ | +-;0x804861c;10.0ms;;;11.111111
+ | +-;0x8048624;10.0ms;;;11.111111
+ +-;func_a (foox.c:42);10.0ms;;;11.111111
+ | +-;0x80486d0;10.0ms;;;11.111111
+ +-;func_a (foox.c:45);20.0ms;;;22.222221
+ | +-;0x8048788;10.0ms;;;11.111111
+ | +-;0x8048798;10.0ms;;;11.111111
+ +-;func_b (foox.c:52);10.0ms;;;11.111111
+ | +-;0x8048820;10.0ms;;;11.111111
+ +-;func_b (foox.c:54);10.0ms;;;11.111111
+ | +-;0x80488dc;10.0ms;;;11.111111
+ +-;func_f (foox.c:31);20.0ms;;;22.222221
+ +-;0x804856c;10.0ms;;;11.111111
+ +-;0x804857c;10.0ms;;;11.111111
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testFunctionSampleView.ref b/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testFunctionSampleView.ref
index b846bc4cd5..fd9e91710b 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testFunctionSampleView.ref
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testFunctionSampleView.ref
@@ -1,6 +1,21 @@
Hierarchy;Name (location);Samples;Calls;Time/Call;%Time
-+-;Summary;0;;;0.0
- +-;func_a;0;2;0ns;0.0
- +-;func_b;0;1;0ns;0.0
- +-;func_f;0;2;0ns;0.0
++-;Summary;9;;;100.0
+ +-;func_a;5;2;25.0ms;55.555557
+ | +-;func_a (foox.c:38);2;;;22.222221
+ | | +-;0x804861c;1;;;11.111111
+ | | +-;0x8048624;1;;;11.111111
+ | +-;func_a (foox.c:42);1;;;11.111111
+ | | +-;0x80486d0;1;;;11.111111
+ | +-;func_a (foox.c:45);2;;;22.222221
+ | +-;0x8048788;1;;;11.111111
+ | +-;0x8048798;1;;;11.111111
+ +-;func_b;2;1;20.0ms;22.222221
+ | +-;func_b (foox.c:52);1;;;11.111111
+ | | +-;0x8048820;1;;;11.111111
+ | +-;func_b (foox.c:54);1;;;11.111111
+ | +-;0x80488dc;1;;;11.111111
+ +-;func_f;2;2;10.0ms;22.222221
+ | +-;func_f (foox.c:31);2;;;22.222221
+ | +-;0x804856c;1;;;11.111111
+ | +-;0x804857c;1;;;11.111111
+-;main;0;0;;0.0
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testFunctionTimeView.ref b/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testFunctionTimeView.ref
index d62b4b4d96..2cbb2952b2 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testFunctionTimeView.ref
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testFunctionTimeView.ref
@@ -1,6 +1,21 @@
Hierarchy;Name (location);Time;Calls;Time/Call;%Time
-+-;Summary;0ns;;;0.0
- +-;func_a;0ns;2;0ns;0.0
- +-;func_b;0ns;1;0ns;0.0
- +-;func_f;0ns;2;0ns;0.0
++-;Summary;90.0ms;;;100.0
+ +-;func_a;50.0ms;2;25.0ms;55.555557
+ | +-;func_a (foox.c:38);20.0ms;;;22.222221
+ | | +-;0x804861c;10.0ms;;;11.111111
+ | | +-;0x8048624;10.0ms;;;11.111111
+ | +-;func_a (foox.c:42);10.0ms;;;11.111111
+ | | +-;0x80486d0;10.0ms;;;11.111111
+ | +-;func_a (foox.c:45);20.0ms;;;22.222221
+ | +-;0x8048788;10.0ms;;;11.111111
+ | +-;0x8048798;10.0ms;;;11.111111
+ +-;func_b;20.0ms;1;20.0ms;22.222221
+ | +-;func_b (foox.c:52);10.0ms;;;11.111111
+ | | +-;0x8048820;10.0ms;;;11.111111
+ | +-;func_b (foox.c:54);10.0ms;;;11.111111
+ | +-;0x80488dc;10.0ms;;;11.111111
+ +-;func_f;20.0ms;2;10.0ms;22.222221
+ | +-;func_f (foox.c:31);20.0ms;;;22.222221
+ | +-;0x804856c;10.0ms;;;11.111111
+ | +-;0x804857c;10.0ms;;;11.111111
+-;main;0ns;0;;0.0
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testParse.ref b/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testParse.ref
new file mode 100755
index 0000000000..80ff59cfec
--- /dev/null
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testParse.ref
@@ -0,0 +1,43 @@
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 0
+
+Histogram Header :
+
+ Base pc address of sample buffer = 0x804838c
+ Max pc address of sampled buffer = 0x8048c28
+ Number of histogram samples = 552
+ Profiling clock rate = 100
+ Physical dimension abreviation : 's' for "seconds" 'm' for "milliseconds" = s
+
+ == HISTOGRAM RECORDS ==
+ =========================
+
+Histogram Header :
+
+ Base pc address of sample buffer = 0x804838c
+ Max pc address of sampled buffer = 0x8048c28
+ Number of histogram samples = 552
+ Profiling clock rate = 100
+ Physical dimension abreviation : 's' for "seconds" 'm' for "milliseconds" = s
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 1
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testSampleView.ref b/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testSampleView.ref
index 0db178c041..72dd675ede 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testSampleView.ref
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testSampleView.ref
@@ -1,7 +1,22 @@
Hierarchy;Name (location);Samples;Calls;Time/Call;%Time
-+-;Summary;0;;;0.0
- +-;foox.c;0;;;0.0
- +-;func_a;0;2;0ns;0.0
- +-;func_b;0;1;0ns;0.0
- +-;func_f;0;2;0ns;0.0
++-;Summary;9;;;100.0
+ +-;foox.c;9;;;100.0
+ +-;func_a;5;2;25.0ms;55.555557
+ | +-;func_a (foox.c:38);2;;;22.222221
+ | | +-;0x804861c;1;;;11.111111
+ | | +-;0x8048624;1;;;11.111111
+ | +-;func_a (foox.c:42);1;;;11.111111
+ | | +-;0x80486d0;1;;;11.111111
+ | +-;func_a (foox.c:45);2;;;22.222221
+ | +-;0x8048788;1;;;11.111111
+ | +-;0x8048798;1;;;11.111111
+ +-;func_b;2;1;20.0ms;22.222221
+ | +-;func_b (foox.c:52);1;;;11.111111
+ | | +-;0x8048820;1;;;11.111111
+ | +-;func_b (foox.c:54);1;;;11.111111
+ | +-;0x80488dc;1;;;11.111111
+ +-;func_f;2;2;10.0ms;22.222221
+ | +-;func_f (foox.c:31);2;;;22.222221
+ | +-;0x804856c;1;;;11.111111
+ | +-;0x804857c;1;;;11.111111
+-;main;0;0;;0.0
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testTimeView.ref b/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testTimeView.ref
index ff055e49a5..e4fbd69338 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testTimeView.ref
+++ b/gprof/org.eclipse.linuxtools.gprof.test/foox_gprof_input/testTimeView.ref
@@ -1,7 +1,22 @@
Hierarchy;Name (location);Time;Calls;Time/Call;%Time
-+-;Summary;0ns;;;0.0
- +-;foox.c;0ns;;;0.0
- +-;func_a;0ns;2;0ns;0.0
- +-;func_b;0ns;1;0ns;0.0
- +-;func_f;0ns;2;0ns;0.0
++-;Summary;90.0ms;;;100.0
+ +-;foox.c;90.0ms;;;100.0
+ +-;func_a;50.0ms;2;25.0ms;55.555557
+ | +-;func_a (foox.c:38);20.0ms;;;22.222221
+ | | +-;0x804861c;10.0ms;;;11.111111
+ | | +-;0x8048624;10.0ms;;;11.111111
+ | +-;func_a (foox.c:42);10.0ms;;;11.111111
+ | | +-;0x80486d0;10.0ms;;;11.111111
+ | +-;func_a (foox.c:45);20.0ms;;;22.222221
+ | +-;0x8048788;10.0ms;;;11.111111
+ | +-;0x8048798;10.0ms;;;11.111111
+ +-;func_b;20.0ms;1;20.0ms;22.222221
+ | +-;func_b (foox.c:52);10.0ms;;;11.111111
+ | | +-;0x8048820;10.0ms;;;11.111111
+ | +-;func_b (foox.c:54);10.0ms;;;11.111111
+ | +-;0x80488dc;10.0ms;;;11.111111
+ +-;func_f;20.0ms;2;10.0ms;22.222221
+ | +-;func_f (foox.c:31);20.0ms;;;22.222221
+ | +-;0x804856c;10.0ms;;;11.111111
+ | +-;0x804857c;10.0ms;;;11.111111
+-;main;0ns;0;;0.0
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/partially-pg-build_gprof_input/testParse.ref b/gprof/org.eclipse.linuxtools.gprof.test/partially-pg-build_gprof_input/testParse.ref
new file mode 100755
index 0000000000..fc8a9b27fc
--- /dev/null
+++ b/gprof/org.eclipse.linuxtools.gprof.test/partially-pg-build_gprof_input/testParse.ref
@@ -0,0 +1,23 @@
+-- gmon Results --
+cookie gmon
+gmon_version 1
+tag 0
+
+Histogram Header :
+
+ Base pc address of sample buffer = 0x80483c8
+ Max pc address of sampled buffer = 0x80486c0
+ Number of histogram samples = 190
+ Profiling clock rate = 100
+ Physical dimension abreviation : 's' for "seconds" 'm' for "milliseconds" = s
+
+ == HISTOGRAM RECORDS ==
+ =========================
+
+Histogram Header :
+
+ Base pc address of sample buffer = 0x80483c8
+ Max pc address of sampled buffer = 0x80486c0
+ Number of histogram samples = 190
+ Profiling clock rate = 100
+ Physical dimension abreviation : 's' for "seconds" 'm' for "milliseconds" = s
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/plugin.properties b/gprof/org.eclipse.linuxtools.gprof.test/plugin.properties
index 638c272608..7da3aba13a 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/plugin.properties
+++ b/gprof/org.eclipse.linuxtools.gprof.test/plugin.properties
@@ -9,4 +9,4 @@
# Red Hat, Inc. - initial API and implementation
#*******************************************************************************
bundleName=Gprof JUnit Test Fragment (Incubation)
-bundleProvider=Eclipse \ No newline at end of file
+bundleProvider=Eclipse Linux Tools \ No newline at end of file
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/src/org/eclipse/linuxtools/gprof/test/GprofAggregatorTest.java b/gprof/org.eclipse.linuxtools.gprof.test/src/org/eclipse/linuxtools/gprof/test/GprofAggregatorTest.java
index 19ec1be733..b6fb8f98ce 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/src/org/eclipse/linuxtools/gprof/test/GprofAggregatorTest.java
+++ b/gprof/org.eclipse.linuxtools.gprof.test/src/org/eclipse/linuxtools/gprof/test/GprofAggregatorTest.java
@@ -61,9 +61,13 @@ public class GprofAggregatorTest extends TestCase {
s.add(gmon.toString());
String gprof2use="gprof";
+ File f = Aggregator.aggregate(gprof2use, binary, s, directory);
+
+ Process p = Runtime.getRuntime().exec(new String[] {gprof2use, binary, f.getAbsolutePath()});
+ Process p2 = Runtime.getRuntime().exec(new String[] {gprof2use, binary, directory + File.separator + "gmon.sum.ref"});
-
- File f = Aggregator.aggregate(gprof2use, binary, s, directory);
- STJunitUtils.compare(f.getAbsolutePath(), directory + File.separator + "gmon.sum.ref", true);
+ STJunitUtils.compare(p.getInputStream(), p2.getInputStream());
+ p.waitFor();
+ p2.waitFor();
}
}
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/src/org/eclipse/linuxtools/gprof/test/GprofParserTest.java b/gprof/org.eclipse.linuxtools.gprof.test/src/org/eclipse/linuxtools/gprof/test/GprofParserTest.java
index 19b752eff8..a5bf10a2eb 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/src/org/eclipse/linuxtools/gprof/test/GprofParserTest.java
+++ b/gprof/org.eclipse.linuxtools.gprof.test/src/org/eclipse/linuxtools/gprof/test/GprofParserTest.java
@@ -41,7 +41,7 @@ public class GprofParserTest extends TestCase{
ats.addTest(
new TestCase(testDir.getName() + ":Parser") {
public void runTest() throws Throwable {
- testProcessGmonFile(logFile, binaryFile, parserRefFile, parserRefFile);
+ testProcessGmonFile(logFile, binaryFile, parserRefFile, parserDumpFile);
}
}
);
@@ -51,7 +51,7 @@ public class GprofParserTest extends TestCase{
public static void testProcessGmonFile(File gmonFile, File binaryFile, File parserRefFile, File parserDumpFile) throws Exception {
IBinaryObject binary = STSymbolManager.sharedInstance.getBinaryObject(binaryFile.getAbsolutePath());
- final GmonDecoder gmondecoder = new GmonDecoder(binary, new PrintStream(parserRefFile));
+ final GmonDecoder gmondecoder = new GmonDecoder(binary, new PrintStream(parserDumpFile));
gmondecoder.setShouldDump(true);
gmondecoder.read(gmonFile.getAbsolutePath());
STJunitUtils.compareIgnoreEOL(parserDumpFile.getAbsolutePath(), parserRefFile.getAbsolutePath(), true);
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/src/org/eclipse/linuxtools/gprof/test/GprofTest.java b/gprof/org.eclipse.linuxtools.gprof.test/src/org/eclipse/linuxtools/gprof/test/GprofTest.java
index a56c563e6c..ea54907983 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/src/org/eclipse/linuxtools/gprof/test/GprofTest.java
+++ b/gprof/org.eclipse.linuxtools.gprof.test/src/org/eclipse/linuxtools/gprof/test/GprofTest.java
@@ -14,6 +14,9 @@ package org.eclipse.linuxtools.gprof.test;
import java.io.File;
import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.LineNumberReader;
import junit.framework.Test;
import junit.framework.TestCase;
@@ -49,15 +52,45 @@ public class GprofTest extends TestCase {
public static Test suite() {
TestSuite ats = new TestSuite("GProf:View CSV Export");
-
- File[] testDirs = STJunitUtils.getTestDirs("org.eclipse.linuxtools.gprof.test", ".*" + GMON_DIRECTORY_SUFFIX);
+ boolean addr2line2_16 = false;
+ try {
+ Process p = Runtime.getRuntime().exec("addr2line --version");
+ InputStream is = p.getInputStream();
+ LineNumberReader reader = new LineNumberReader(new InputStreamReader(is));
+ String line;
+ while ((line = reader.readLine()) != null) {
+ if (line.contains("addr2line 2.16.")) {
+ addr2line2_16 = true;
+ break;
+ }
+ }
+ } catch (Exception _) {
+ }
+
+ File[] testDirs = STJunitUtils.getTestDirs("org.eclipse.linuxtools.gprof.test",
+ ".*" + GMON_DIRECTORY_SUFFIX);
for (File testDir : testDirs) {
final File gmonFile = new File(testDir, GMON_OUTPUT_FILE);
final File binaryFile = new File(testDir, GMON_BINARY_FILE);
- final File view_cg_RefFile = new File(testDir, "testCallgraphView.ref");
- final File view_cg_DumpFile = new File(testDir, "testCallgraphView.dump");
- final File view_cg2_RefFile = new File(testDir, "testCallgraphTimeView.ref");
+
+ File view_cg_RefFile_default = new File(testDir, "testCallgraphView.ref");
+ File view_cg_RefFile_alternate = new File(testDir, "testCallgraphView.ref.binutils-2.16");
+ File view_cg2_RefFile_default = new File(testDir, "testCallgraphTimeView.ref");
+ File view_cg2_RefFile_alternate = new File(testDir, "testCallgraphTimeView.ref.binutils-2.16");
+ final File view_cg_RefFile;
+ final File view_cg2_RefFile;
+ if (addr2line2_16 && view_cg_RefFile_alternate.exists()) {
+ view_cg_RefFile = view_cg_RefFile_alternate;
+ } else {
+ view_cg_RefFile = view_cg_RefFile_default;
+ }
+ if (addr2line2_16 && view_cg2_RefFile_alternate.exists()) {
+ view_cg2_RefFile = view_cg2_RefFile_alternate;
+ } else {
+ view_cg2_RefFile = view_cg2_RefFile_default;
+ }
final File view_cg2_DumpFile = new File(testDir, "testCallgraphTimeView.dump");
+ final File view_cg_DumpFile = new File(testDir, "testCallgraphView.dump");
final File view_samplesFile_RefFile = new File(testDir, "testSampleView.ref");
final File view_samplesFile_DumpFile = new File(testDir, "testSampleView.dump");
@@ -73,68 +106,82 @@ public class GprofTest extends TestCase {
final File view_samplesFlatT_RefFile = new File(testDir, "testFlatTimeView.ref");
final File view_samplesFlatT_DumpFile = new File(testDir, "testFlatTimeView.dump");
- IBinaryObject binary = STSymbolManager.sharedInstance.getBinaryObject(new Path(binaryFile.getAbsolutePath()));
+ IBinaryObject binary = STSymbolManager.sharedInstance.getBinaryObject(
+ new Path(binaryFile.getAbsolutePath()));
final GmonDecoder gd = new GmonDecoder(binary);
try {
gd.read(gmonFile.getAbsolutePath());
} catch (IOException e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
ats.addTest(
new TestCase(testDir.getName() + ":CSV-CALLGRAPH") {
public void runTest() throws Throwable {
- testView(gmonFile, gd, view_cg_RefFile, view_cg_DumpFile, CallGraphContentProvider.sharedInstance, false);
+ testView(gmonFile, gd, view_cg_RefFile, view_cg_DumpFile,
+ CallGraphContentProvider.sharedInstance, false);
}
}
);
ats.addTest(
new TestCase(testDir.getName() + ":CSV-CALLGRAPH-TIMED") {
public void runTest() throws Throwable {
- testView(gmonFile, gd, view_cg2_RefFile, view_cg2_DumpFile, CallGraphContentProvider.sharedInstance, true);
+ testView(gmonFile, gd, view_cg2_RefFile, view_cg2_DumpFile,
+ CallGraphContentProvider.sharedInstance, true);
}
}
);
ats.addTest(
new TestCase(testDir.getName() + ":CSV-FILE") {
public void runTest() throws Throwable {
- testView(gmonFile, gd, view_samplesFile_RefFile, view_samplesFile_DumpFile, FileHistogramContentProvider.sharedInstance, false);
+ testView(gmonFile, gd, view_samplesFile_RefFile,
+ view_samplesFile_DumpFile,
+ FileHistogramContentProvider.sharedInstance, false);
}
}
);
ats.addTest(
new TestCase(testDir.getName() + ":CSV-FILE-TIMED") {
public void runTest() throws Throwable {
- testView(gmonFile, gd, view_samplesFileT_RefFile, view_samplesFileT_DumpFile, FileHistogramContentProvider.sharedInstance, true);
+ testView(gmonFile, gd, view_samplesFileT_RefFile,
+ view_samplesFileT_DumpFile,
+ FileHistogramContentProvider.sharedInstance, true);
}
}
);
ats.addTest(
new TestCase(testDir.getName() + ":CSV-FUNCTION") {
public void runTest() throws Throwable {
- testView(gmonFile, gd, view_samplesFunction_RefFile, view_samplesFunction_DumpFile, FunctionHistogramContentProvider.sharedInstance, false);
+ testView(gmonFile, gd, view_samplesFunction_RefFile,
+ view_samplesFunction_DumpFile,
+ FunctionHistogramContentProvider.sharedInstance, false);
}
}
);
ats.addTest(
new TestCase(testDir.getName() + ":CSV-FUNCTION-TIMED") {
public void runTest() throws Throwable {
- testView(gmonFile, gd, view_samplesFunctionT_RefFile, view_samplesFunctionT_DumpFile, FunctionHistogramContentProvider.sharedInstance, true);
+ testView(gmonFile, gd, view_samplesFunctionT_RefFile,
+ view_samplesFunctionT_DumpFile,
+ FunctionHistogramContentProvider.sharedInstance, true);
}
}
);
ats.addTest(
new TestCase(testDir.getName() + ":CSV-FLAT") {
public void runTest() throws Throwable {
- testView(gmonFile, gd, view_samplesFlat_RefFile, view_samplesFlat_DumpFile, FlatHistogramContentProvider.sharedInstance, false);
+ testView(gmonFile, gd, view_samplesFlat_RefFile,
+ view_samplesFlat_DumpFile,
+ FlatHistogramContentProvider.sharedInstance, false);
}
}
);
ats.addTest(
new TestCase(testDir.getName() + ":CSV-FLAT-TIMED") {
public void runTest() throws Throwable {
- testView(gmonFile, gd, view_samplesFlatT_RefFile, view_samplesFlatT_DumpFile, FlatHistogramContentProvider.sharedInstance, true);
+ testView(gmonFile, gd, view_samplesFlatT_RefFile,
+ view_samplesFlatT_DumpFile,
+ FlatHistogramContentProvider.sharedInstance, true);
}
}
);
@@ -163,7 +210,9 @@ public class GprofTest extends TestCase {
File refFile, File dumpFile,
ITreeContentProvider contentProvider, boolean timeMode) throws Exception {
GmonView view = GmonView.displayGprofView(gd, gmonFile.getAbsolutePath(), null);
- SwitchContentProviderAction action = new SwitchContentProviderAction("testAction", "icons/ch_callees.png" /*to avoid error*/, view.getSTViewer().getViewer(), contentProvider);
+ SwitchContentProviderAction action = new SwitchContentProviderAction("testAction",
+ "icons/ch_callees.png" /*to avoid error*/, view.getSTViewer().getViewer(),
+ contentProvider);
action.run();
changeMode(view, timeMode);
STJunitUtils.testCSVExport(view, dumpFile.getAbsolutePath(), refFile.getAbsolutePath());
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/src/org/eclipse/linuxtools/gprof/test/STJunitUtils.java b/gprof/org.eclipse.linuxtools.gprof.test/src/org/eclipse/linuxtools/gprof/test/STJunitUtils.java
index 09d1d392ff..e81ad0c3c1 100644
--- a/gprof/org.eclipse.linuxtools.gprof.test/src/org/eclipse/linuxtools/gprof/test/STJunitUtils.java
+++ b/gprof/org.eclipse.linuxtools.gprof.test/src/org/eclipse/linuxtools/gprof/test/STJunitUtils.java
@@ -45,11 +45,11 @@ public class STJunitUtils {
* @param dumpFullFileName
* @param refFullFileName
*/
- public static void testCSVExport(AbstractSTDataView view, String dumpFullFileName, String refFullFileName) {
+ public static boolean testCSVExport(AbstractSTDataView view, String dumpFullFileName, String refFullFileName) {
STDataViewersCSVExporter exporter = new STDataViewersCSVExporter(view.getSTViewer());
exporter.exportTo(dumpFullFileName, new NullProgressMonitor());
// compare with ref
- compareIgnoreEOL(dumpFullFileName, refFullFileName, true);
+ return compareCSVIgnoreEOL(dumpFullFileName, refFullFileName, true);
}
/**
@@ -73,7 +73,7 @@ public class STJunitUtils {
else {
System.out.println(message + "... successful");
}
- // delete dump only for sucessful tests
+ // delete dump only for successful tests
if (equals && deleteDumpFileIfOk)
new File(dumpFile).delete();
}catch (FileNotFoundException _) {
@@ -98,13 +98,13 @@ public class STJunitUtils {
public static boolean compareIgnoreEOL(String dumpFile, String refFile, boolean deleteDumpFileIfOk) {
String message = "Comparing ref file ("+refFile+ ")and dump file (" +
dumpFile+")";
- boolean equals = false;
+ boolean equals = false;
try {
LineNumberReader is1 = new LineNumberReader(new FileReader(dumpFile));
LineNumberReader is2 = new LineNumberReader(new FileReader(refFile));
do {
String line1 = is1.readLine();
- String line2 = is2.readLine();
+ String line2 = is2.readLine();
if (line1 == null) {
if (line2 == null) {
equals = true;
@@ -112,16 +112,85 @@ public class STJunitUtils {
break;
} else if (line2 == null || !line1.equals(line2)) {
break;
- }
+ }
} while (true);
-
+
if (!equals) {
junit.framework.Assert.assertEquals(message + ": not correspond ", true, false);
}
+
+ is1.close();
+ is2.close();
+ // delete dump only for successful tests
+ if (equals && deleteDumpFileIfOk) {
+ new File(dumpFile).delete();
+ }
+ }catch (FileNotFoundException _) {
+ message += "... FAILED: One of these files may not exist";
+ junit.framework.Assert.assertNull(message, _);
+ }
+ catch (Exception _) {
+ message += ": exception raised ... FAILED";
+ junit.framework.Assert.assertNull(message, _);
+ }
+ return equals;
+ }
+
+ /**
+ * Utility method to compare exported CSV files
+ * @param dumpFile
+ * @param refFile
+ * @return
+ */
+ public static boolean compareCSVIgnoreEOL(String dumpFile, String refFile, boolean deleteDumpFileIfOk) {
+ String message = "Comparing ref file ("+refFile+ ")and dump file (" +
+ dumpFile+")";
+ boolean equals = false;
+ String str = "[in-charge]"; // this string can be dumped according to binutils version installed on local machine
+
+ try {
+ LineNumberReader is1 = new LineNumberReader(new FileReader(dumpFile));
+ LineNumberReader is2 = new LineNumberReader(new FileReader(refFile));
+ do {
+ String line1 = is1.readLine();
+ String line2 = is2.readLine();
+ int length = str.length();
+ if (line1 == null) {
+ if (line2 == null) {
+ equals = true;
+ }
+ break;
+ } else if (line1.contains(str)){
+ int idx = line1.indexOf("[in-charge]");
+ char c = line1.charAt(idx -1);
+ if (c == ' ' ){
+ idx--;
+ length++;
+ }
+ line1 = line1.substring(0, idx) + line1.substring(idx+length, line1.length());
+ if (!line1.equals(line2))
+ break;
+ } else if (line2 == null || !line1.equals(line2)) {
+ break;
+ }
+ } while (true);
is1.close();
is2.close();
- // delete dump only for sucessful tests
+ if (!equals) {
+ StringBuffer msg = new StringBuffer(message + ": not correspond ");
+ msg.append("\n========= begin dump file =========\n");
+ FileReader fr = new FileReader(dumpFile);
+ int c;
+ while ((c = fr.read()) != -1) {
+ msg.append((char) c);
+ }
+ fr.close();
+ msg.append("\n========= end dump file =========\n");
+ junit.framework.Assert.assertEquals(msg.toString(), true, false);
+ }
+
+ // delete dump only for successful tests
if (equals && deleteDumpFileIfOk) {
new File(dumpFile).delete();
}
diff --git a/gprof/org.eclipse.linuxtools.gprof.test/test.xml b/gprof/org.eclipse.linuxtools.gprof.test/test.xml
new file mode 100755
index 0000000000..d8000bdc1a
--- /dev/null
+++ b/gprof/org.eclipse.linuxtools.gprof.test/test.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+
+<project name="testsuite" default="run" basedir=".">
+ <property name="classname" value="org.eclipse.linuxtools.gprof.test.AllGprofTests" />
+ <property name="plugin-name" value="org.eclipse.linuxtools.gprof.test" />
+
+ <!-- The property ${eclipse-home} should be passed into this script -->
+ <!-- Set a meaningful default value for when it is not. -->
+ <property name="eclipse-home" value="${basedir}/../../" />
+
+ <property name="library-file" value="${eclipse-home}/dropins/${subProjectName2}/plugins/org.eclipse.test/library.xml" />
+
+ <!-- This target holds all initialization code that needs to be done for -->
+ <!-- all tests that are to be run. Initialization for individual tests -->
+ <!-- should be done within the body of the suite target. -->
+ <target name="init">
+ <tstamp />
+ <delete>
+ <fileset dir="${eclipse-home}" includes="org*.xml" />
+ </delete>
+ </target>
+
+ <!-- This target defines the tests that need to be run. -->
+ <target name="gprof_suite">
+ <property name="gprof-folder" value="${eclipse-home}/gprof_folder" />
+ <delete dir="${gprof-folder}" quiet="true" />
+ <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="data-dir" value="${gprof-folder}" />
+ <property name="plugin-name" value="${plugin-name}" />
+ <property name="classname" value="${classname}" />
+ </ant>
+ </target>
+
+ <!-- This target holds code to cleanup the testing environment after -->
+ <!-- all of the tests have been run. You can use this target to -->
+ <!-- delete temporary files that have been created. -->
+ <target name="cleanup">
+ <mkdir dir="${results}/consolelogs" />
+ <copy failonerror="false" file="${eclipse-home}/results/${classname}.txt" tofile="${results}/consolelogs/${classname}_${platform}.metadata.log.txt" />
+ </target>
+
+ <!-- This target runs the test suite. Any actions that need to happen -->
+ <!-- after all the tests have been run should go here. -->
+ <target name="run" depends="init,gprof_suite,cleanup">
+ <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="includes" value="org*.xml" />
+ <property name="output-file" value="${plugin-name}.xml" />
+ </ant>
+ </target>
+
+ <target name="all" depends="run" description="Dummy target to run all tests">
+ </target>
+
+</project>
diff --git a/gprof/org.eclipse.linuxtools.gprof/META-INF/MANIFEST.MF b/gprof/org.eclipse.linuxtools.gprof/META-INF/MANIFEST.MF
index 667db627f9..0f36ee92f4 100644
--- a/gprof/org.eclipse.linuxtools.gprof/META-INF/MANIFEST.MF
+++ b/gprof/org.eclipse.linuxtools.gprof/META-INF/MANIFEST.MF
@@ -13,7 +13,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.cdt.core,
org.eclipse.linuxtools.dataviewers,
org.eclipse.linuxtools.binutils,
- org.eclipse.cdt.launch
+ org.eclipse.cdt.launch,
+ org.eclipse.linuxtools.dataviewers.charts
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.linuxtools.gprof,
org.eclipse.linuxtools.gprof.utils,
diff --git a/gprof/org.eclipse.linuxtools.gprof/about.html b/gprof/org.eclipse.linuxtools.gprof/about.html
index 0c6525d9a8..c258ef55d8 100644
--- a/gprof/org.eclipse.linuxtools.gprof/about.html
+++ b/gprof/org.eclipse.linuxtools.gprof/about.html
@@ -1,33 +1,28 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<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>
+<p>June 5, 2006</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>The Eclipse 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>
-<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>
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
</body>
</html> \ No newline at end of file
diff --git a/gprof/org.eclipse.linuxtools.gprof/plugin.properties b/gprof/org.eclipse.linuxtools.gprof/plugin.properties
index f0294b2a9c..68d1b960b5 100644
--- a/gprof/org.eclipse.linuxtools.gprof/plugin.properties
+++ b/gprof/org.eclipse.linuxtools.gprof/plugin.properties
@@ -8,7 +8,7 @@
# Contributors:
# Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
#*******************************************************************************
-bundleProvider = Eclipse
+bundleProvider = Eclipse Linux Tools
bundleName = Gprof Plug-in (Incubation)
gprofEditor = Gprof Editor
gprof = gprof
diff --git a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/parser/CallGraphDecoder.java b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/parser/CallGraphDecoder.java
index 80c97e6fc3..3f84fb5075 100644
--- a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/parser/CallGraphDecoder.java
+++ b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/parser/CallGraphDecoder.java
@@ -31,7 +31,7 @@ import org.eclipse.linuxtools.gprof.view.histogram.HistRoot;
*/
public class CallGraphDecoder {
- private final GmonDecoder decoder;
+ protected final GmonDecoder decoder;
private final Map<ISymbol, CallGraphNode> nodes = new HashMap<ISymbol, CallGraphNode>();
@@ -54,6 +54,8 @@ public class CallGraphDecoder {
int _self_pc = stream.readInt();
long from_pc = _from_pc & 0xFFFFFFFFL;
long self_pc = _self_pc & 0xFFFFFFFFL;
+ //long from_pc = stream.readLong();
+ //long self_pc = stream.readLong();
int count = stream.readInt();
IBinaryObject program = decoder.getProgram();
IAddressFactory addressFactory = program.getAddressFactory();
@@ -67,7 +69,7 @@ public class CallGraphDecoder {
addCallArc(parentSymbol, parentAddress, childSymbol, count);
}
- private void addCallArc(ISymbol parent, IAddress parentAddress, ISymbol child, int count)
+ public void addCallArc(ISymbol parent, IAddress parentAddress, ISymbol child, int count)
{
CallGraphNode parentNode = nodes.get(parent);
CallGraphNode childNode = nodes.get(child);
diff --git a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/parser/CallGraphDecoder_64.java b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/parser/CallGraphDecoder_64.java
new file mode 100644
index 0000000000..a3c77b0e6e
--- /dev/null
+++ b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/parser/CallGraphDecoder_64.java
@@ -0,0 +1,42 @@
+package org.eclipse.linuxtools.gprof.parser;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+import org.eclipse.cdt.core.IAddress;
+import org.eclipse.cdt.core.IAddressFactory;
+import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
+import org.eclipse.cdt.core.IBinaryParser.ISymbol;
+
+public class CallGraphDecoder_64 extends CallGraphDecoder{
+
+
+
+ public CallGraphDecoder_64(GmonDecoder decoder) {
+ super(decoder);
+
+ }
+
+ @Override
+ public void decodeCallGraphRecord(DataInput stream) throws IOException {
+ /*int _from_pc = stream.readInt();
+ int _self_pc = stream.readInt();
+ long from_pc = _from_pc & 0xFFFFFFFFL;
+ long self_pc = _self_pc & 0xFFFFFFFFL;*/
+ long from_pc = stream.readLong();
+ long self_pc = stream.readLong();
+ int count = stream.readInt();
+ IBinaryObject program = decoder.getProgram();
+ IAddressFactory addressFactory = program.getAddressFactory();
+ IAddress parentAddress = addressFactory.createAddress(Long.toString(from_pc));
+ ISymbol parentSymbol = program.getSymbol(parentAddress);
+ IAddress childAddress = addressFactory.createAddress(Long.toString(self_pc));
+ ISymbol childSymbol = program.getSymbol(childAddress);
+ if (childSymbol == null || parentSymbol == null) {
+ return;
+ }
+ addCallArc(parentSymbol, parentAddress, childSymbol, count);
+ }
+
+
+}
diff --git a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/parser/GmonDecoder.java b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/parser/GmonDecoder.java
index 1fcb8ef1e7..c5b65012e9 100644
--- a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/parser/GmonDecoder.java
+++ b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/parser/GmonDecoder.java
@@ -30,7 +30,6 @@ import org.eclipse.linuxtools.gprof.utils.LEDataInputStream;
import org.eclipse.linuxtools.gprof.view.histogram.HistRoot;
-
/**
* Parser of gmon file
*/
@@ -49,8 +48,8 @@ public class GmonDecoder {
private byte[] spare;
private final IBinaryObject program;
- private final HistogramDecoder histo;
- private final CallGraphDecoder callGraph;
+ private HistogramDecoder histo;
+ private CallGraphDecoder callGraph;
private final PrintStream ps;
private final HistRoot rootNode = new HistRoot(this);
private String file;
@@ -65,6 +64,7 @@ public class GmonDecoder {
/**
* Constructor
* @param program
+ * @throws IOException
*/
public GmonDecoder(IBinaryObject program) {
this(program, null);
@@ -74,12 +74,20 @@ public class GmonDecoder {
/**
* Constructor
* @param program
+ * @throws IOException
*/
public GmonDecoder(IBinaryObject program, PrintStream ps) {
this.program = program;
- histo = new HistogramDecoder(this);
- callGraph = new CallGraphDecoder(this);
this.ps = ps;
+ program.getBinaryParser().getFormat();
+ if ("x86_64".equals(program.getCPU())){
+ histo = new HistogramDecoder_64(this);
+ callGraph = new CallGraphDecoder_64(this);
+ }
+ else {
+ histo = new HistogramDecoder(this);
+ callGraph = new CallGraphDecoder(this);
+ }
}
diff --git a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/parser/HistogramDecoder.java b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/parser/HistogramDecoder.java
index 91f36bbfc3..0c766956c4 100644
--- a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/parser/HistogramDecoder.java
+++ b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/parser/HistogramDecoder.java
@@ -26,30 +26,29 @@ import org.eclipse.linuxtools.gprof.view.histogram.HistRoot;
public class HistogramDecoder {
/** the decoder */
- private final GmonDecoder decoder;
+ protected final GmonDecoder decoder;
// histogram header
/** Base pc address of sampled buffer */
- private long lowpc;
+ protected long lowpc;
/** Max pc address of sampled buffer */
- private long highpc;
+ protected long highpc;
/** Profiling clock rate */
- private int prof_rate;
+ protected int prof_rate;
/** physical dimension - usually "seconds" */
- private String dimen;
+ protected String dimen;
/** usually 's' for seconds, 'm' for milliseconds... */
- private char dimen_abbrev;
+ protected char dimen_abbrev;
/** used when aggregate several gmon files */
- private boolean initialized = false;
+ protected boolean initialized = false;
/** Histogram samples (shorts in the file!). */
- private int[] hist_sample;
+ protected int[] hist_sample;
/** Total time for all routines. */
- private double total_time;
- private double scale;
+ protected double total_time;
- private long bucketSize;
+ protected long bucketSize;
/**
@@ -79,7 +78,7 @@ public class HistogramDecoder {
* @param stream
* @throws IOException
*/
- public void decodeAll(DataInput stream) throws IOException {
+ protected void decodeAll(DataInput stream) throws IOException {
decodeHeader(stream);
decodeHistRecord(stream);
AssignSamplesSymbol();
@@ -96,6 +95,8 @@ public class HistogramDecoder {
long lowpc = (_lowpc & 0xFFFFFFFFL);
int _highpc = stream.readInt();
long highpc = (_highpc & 0xFFFFFFFFL);
+ //long lowpc = stream.readLong();
+ //long highpc = stream.readLong();
int hist_num_bins = stream.readInt();
int prof_rate = stream.readInt();
byte[] bytes = new byte[15];
@@ -113,9 +114,8 @@ public class HistogramDecoder {
hist_sample = new int[hist_num_bins]; // Impl note: JVM sets all integers to 0
dimen = new String(bytes);
dimen_abbrev = (char) b;
- scale = (highpc - lowpc)/(double)hist_num_bins;
- bucketSize = (highpc - lowpc)/(hist_num_bins - 1);
- if (bucketSize > scale) scale = bucketSize;
+ long temp = highpc - lowpc;
+ bucketSize = Math.round(temp/(double)hist_num_bins);
}
/**
@@ -185,16 +185,13 @@ public class HistogramDecoder {
printHistHeader(ps);
/*ps.println(" \nHistogram Samples : ");
- ISymbol[] symbols = this.program.getSymbols();
- for (int i = 0 ; i< symbols.length; i++) {
- if (buckets[i] != null) {
- System.out.println(symbols[i].getName());
- for (Bucket b : buckets[i]) {
- System.out.println(" " + b.start_addr + " :: " + b.time);
- }
- }
- }*/
-
+ ISymbol[] symbols = this.decoder.getProgram().getSymbols();
+ for (ISymbol iSymbol : symbols) {
+ ps.println(iSymbol.getName() + "\t" + iSymbol.getAddress());
+ }
+ for (int i = 0; i<hist_sample.length; i++) {
+ ps.println("histSample[" + i + "]\t" + hist_sample[i]);
+ }*/
}
/**
@@ -212,8 +209,8 @@ public class HistogramDecoder {
int ccnt = hist_sample[i];
if (ccnt != 0)
{
- long pcl = lowpc + (long) (scale*i);
- long pch = lowpc + (long) (scale * (i+1));
+ long pcl = lowpc + (bucketSize*i);
+ long pch = pcl+bucketSize;
total_time += ccnt;
long svalue0;
long svalue1 = symblist[j-1].getAddress().getValue().longValue();
@@ -234,7 +231,7 @@ public class HistogramDecoder {
long overlap = end_addr - start_addr;
if(overlap > 0)
{
- int time = (int) ((overlap * ccnt) / scale);
+ int time = (int) ((overlap * ccnt) / bucketSize);
Bucket bck = new Bucket(start_addr, end_addr, time);
addBucket(bck,symblist[j]);
}
diff --git a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/parser/HistogramDecoder_64.java b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/parser/HistogramDecoder_64.java
new file mode 100644
index 0000000000..70d78194b0
--- /dev/null
+++ b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/parser/HistogramDecoder_64.java
@@ -0,0 +1,44 @@
+package org.eclipse.linuxtools.gprof.parser;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+public class HistogramDecoder_64 extends HistogramDecoder {
+
+
+ public HistogramDecoder_64(GmonDecoder decoder) {
+ super(decoder);
+ // TODO Auto-generated constructor stub
+ }
+
+ @Override
+ public void decodeHeader(DataInput stream) throws IOException {
+ //int _lowpc = stream.readInt();
+ //long lowpc = (_lowpc & 0xFFFFFFFFL);
+ //int _highpc = stream.readInt();
+ //long highpc = (_highpc & 0xFFFFFFFFL);
+ long lowpc = stream.readLong();
+ long highpc = stream.readLong();
+ int hist_num_bins = stream.readInt();
+ int prof_rate = stream.readInt();
+ byte[] bytes = new byte[15];
+ stream.readFully(bytes);
+ byte b = stream.readByte();
+
+ if (!isCompatible(lowpc, highpc, prof_rate, hist_num_bins))
+ {
+ // TODO exception to normalize
+ throw new RuntimeException("Histogram header's incompatibility among gmon files");
+ }
+ this.lowpc = lowpc;
+ this.highpc = highpc;
+ this.prof_rate = prof_rate;
+ hist_sample = new int[hist_num_bins]; // Impl note: JVM sets all integers to 0
+ dimen = new String(bytes);
+ dimen_abbrev = (char) b;
+ long temp = highpc - lowpc;
+ bucketSize = Math.round(temp/(double)hist_num_bins);
+ }
+
+
+}
diff --git a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/view/GmonView.java b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/view/GmonView.java
index da29147709..295ce64e0a 100644
--- a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/view/GmonView.java
+++ b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/view/GmonView.java
@@ -24,6 +24,7 @@ import org.eclipse.linuxtools.binutils.utils.STSymbolManager;
import org.eclipse.linuxtools.dataviewers.abstractview.AbstractSTDataView;
import org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractSTViewer;
import org.eclipse.linuxtools.dataviewers.actions.STExportToCSVAction;
+import org.eclipse.linuxtools.dataviewers.charts.actions.ChartAction;
import org.eclipse.linuxtools.gprof.Activator;
import org.eclipse.linuxtools.gprof.action.SwitchContentProviderAction;
import org.eclipse.linuxtools.gprof.action.SwitchSampleTimeAction;
@@ -94,6 +95,7 @@ public class GmonView extends AbstractSTDataView {
manager.add(new Separator());
manager.add(switchSampleTime);
manager.add(new Separator());
+ manager.add(new ChartAction(getViewSite().getShell(), getSTViewer()));
}
diff --git a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/view/fields/CallsProfField.java b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/view/fields/CallsProfField.java
index 0b9ffea0cc..31602a7163 100644
--- a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/view/fields/CallsProfField.java
+++ b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/view/fields/CallsProfField.java
@@ -11,6 +11,7 @@
package org.eclipse.linuxtools.gprof.view.fields;
import org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractSTDataViewersField;
+import org.eclipse.linuxtools.dataviewers.charts.provider.IChartField;
import org.eclipse.linuxtools.gprof.view.GmonView;
import org.eclipse.linuxtools.gprof.view.histogram.CGArc;
import org.eclipse.linuxtools.gprof.view.histogram.CGCategory;
@@ -25,7 +26,7 @@ import org.eclipse.swt.graphics.Color;
*
* @author Xavier Raynaud <xavier.raynaud@st.com>
*/
-public class CallsProfField extends AbstractSTDataViewersField {
+public class CallsProfField extends AbstractSTDataViewersField implements IChartField{
/*
* (non-Javadoc)
diff --git a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/view/fields/RatioProfField.java b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/view/fields/RatioProfField.java
index 14b944a692..45fc066429 100644
--- a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/view/fields/RatioProfField.java
+++ b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/view/fields/RatioProfField.java
@@ -15,6 +15,7 @@ import java.text.DecimalFormat;
import java.text.NumberFormat;
import org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractPercentageDrawerField;
+import org.eclipse.linuxtools.dataviewers.charts.provider.IChartField;
import org.eclipse.linuxtools.gprof.view.histogram.TreeElement;
@@ -23,7 +24,7 @@ import org.eclipse.linuxtools.gprof.view.histogram.TreeElement;
*
* @author Mohamed Korbosli
*/
-public class RatioProfField extends AbstractPercentageDrawerField {
+public class RatioProfField extends AbstractPercentageDrawerField implements IChartField{
/** Format to use to display percentages */
public final static NumberFormat nf = new DecimalFormat("##0.0#");
diff --git a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/view/fields/SampleProfField.java b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/view/fields/SampleProfField.java
index 42377e48e5..54ac658ecb 100644
--- a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/view/fields/SampleProfField.java
+++ b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/gprof/view/fields/SampleProfField.java
@@ -12,6 +12,7 @@ package org.eclipse.linuxtools.gprof.view.fields;
import org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractSTDataViewersField;
import org.eclipse.linuxtools.dataviewers.abstractviewers.AbstractSTTreeViewer;
+import org.eclipse.linuxtools.dataviewers.charts.provider.IChartField;
import org.eclipse.linuxtools.gprof.parser.GmonDecoder;
import org.eclipse.linuxtools.gprof.parser.HistogramDecoder;
import org.eclipse.linuxtools.gprof.view.GmonView;
@@ -28,7 +29,7 @@ import org.eclipse.swt.graphics.Color;
*
* @author Xavier Raynaud <xavier.raynaud@st.com>
*/
-public class SampleProfField extends AbstractSTDataViewersField {
+public class SampleProfField extends AbstractSTDataViewersField implements IChartField{
private boolean samples = true;
protected final AbstractSTTreeViewer viewer;
diff --git a/libhover/.project b/libhover/.project
deleted file mode 100644
index 5207979d38..0000000000
--- a/libhover/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.cdt.libhover</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/libhover/.settings/org.eclipse.jdt.core.prefs b/libhover/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bbc86d093a..0000000000
--- a/libhover/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Sep 19 14:24:23 EDT 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/libhover/ChangeLog b/libhover/ChangeLog
deleted file mode 100644
index e1f19814ce..0000000000
--- a/libhover/ChangeLog
+++ /dev/null
@@ -1,15 +0,0 @@
-2008-09-19 Jeff Johnston <jjohnstn@redhat.com>
-
- * src/org/eclipse/linuxtools/cdt/libhover/LibHover.java: Initial implementation moved
- org.eclipse.cdt.linuxtools.autotools.
- * src/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.java: Ditto.
- * src/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.properties: Ditto.
- * src/org/eclipse/linuxtools/cdt/libhover/LibHoverPlugin.java: New file.
- * META-INF/MANIFEST.MF: Ditto.
- * schema/org.eclipse.linuxtools.cdt.libhover.library.exsd: Ditto.
- * about.html, build.properties, plugin.xml, plugin.properties: Ditto.
- * src/org/eclipse/linuxtools/cdt/libhover/preferences/LibHoverPreferencesPage.java: Ditto.
- * src/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceConstants.java: Ditto.
- * src/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceInitializer.java: Ditto.
- * src/org/eclipse/linuxtools/cdt/libhover/properties/LibHoverPropertyPage.java: Ditto.
- \ No newline at end of file
diff --git a/libhover/META-INF/MANIFEST.MF b/libhover/META-INF/MANIFEST.MF
deleted file mode 100644
index 7c84b450b0..0000000000
--- a/libhover/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: C/C++ Libhover Plug-in
-Bundle-SymbolicName: org.eclipse.linuxtools.cdt.libhover; singleton:=true
-Bundle-Version: 1.0.0
-Bundle-Activator: org.eclipse.linuxtools.cdt.libhover.LibhoverPlugin
-Bundle-Vendor: Red Hat Inc.
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.help;bundle-version="3.3.100",
- org.eclipse.cdt.ui;bundle-version="5.0.0",
- org.eclipse.core.filesystem;bundle-version="1.2.0"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-ActivationPolicy: lazy
diff --git a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$FunctionSummary$FunctionPrototypeSummary.class b/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$FunctionSummary$FunctionPrototypeSummary.class
deleted file mode 100644
index 2f8a8a3e9d..0000000000
--- a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$FunctionSummary$FunctionPrototypeSummary.class
+++ /dev/null
Binary files differ
diff --git a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$FunctionSummary$RequiredInclude.class b/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$FunctionSummary$RequiredInclude.class
deleted file mode 100644
index d2e266e2ba..0000000000
--- a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$FunctionSummary$RequiredInclude.class
+++ /dev/null
Binary files differ
diff --git a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$FunctionSummary.class b/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$FunctionSummary.class
deleted file mode 100644
index 2302923247..0000000000
--- a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$FunctionSummary.class
+++ /dev/null
Binary files differ
diff --git a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$HelpBook.class b/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$HelpBook.class
deleted file mode 100644
index 88351c647d..0000000000
--- a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$HelpBook.class
+++ /dev/null
Binary files differ
diff --git a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$HelpResource.class b/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$HelpResource.class
deleted file mode 100644
index d48c07abc6..0000000000
--- a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$HelpResource.class
+++ /dev/null
Binary files differ
diff --git a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$HelpResourceDescriptor.class b/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$HelpResourceDescriptor.class
deleted file mode 100644
index 5e18868855..0000000000
--- a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$HelpResourceDescriptor.class
+++ /dev/null
Binary files differ
diff --git a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$LibHoverLibrary.class b/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$LibHoverLibrary.class
deleted file mode 100644
index 1679d1de56..0000000000
--- a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover$LibHoverLibrary.class
+++ /dev/null
Binary files differ
diff --git a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover.class b/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover.class
deleted file mode 100644
index 946f2991a7..0000000000
--- a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHover.class
+++ /dev/null
Binary files differ
diff --git a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.class b/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.class
deleted file mode 100644
index e424052a3f..0000000000
--- a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.class
+++ /dev/null
Binary files differ
diff --git a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.properties b/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.properties
deleted file mode 100644
index 6dcdd552bd..0000000000
--- a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-#################################################################################
-# Copyright (c) 2007 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
-#################################################################################
-LibcHelpResource.label=C Library Help
-LibcHelpBook.title=C Library Functions \ No newline at end of file
diff --git a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibhoverPlugin.class b/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibhoverPlugin.class
deleted file mode 100644
index a60f517bdf..0000000000
--- a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/LibhoverPlugin.class
+++ /dev/null
Binary files differ
diff --git a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/preferences/LibHoverPreferencePage.class b/libhover/bin/org/eclipse/linuxtools/cdt/libhover/preferences/LibHoverPreferencePage.class
deleted file mode 100644
index 6ab1ae1555..0000000000
--- a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/preferences/LibHoverPreferencePage.class
+++ /dev/null
Binary files differ
diff --git a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceConstants.class b/libhover/bin/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceConstants.class
deleted file mode 100644
index 051ffccc96..0000000000
--- a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceConstants.class
+++ /dev/null
Binary files differ
diff --git a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceInitializer.class b/libhover/bin/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceInitializer.class
deleted file mode 100644
index 49cfb7c740..0000000000
--- a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceInitializer.class
+++ /dev/null
Binary files differ
diff --git a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/properties/LibHoverPropertyPage.class b/libhover/bin/org/eclipse/linuxtools/cdt/libhover/properties/LibHoverPropertyPage.class
deleted file mode 100644
index e64290e140..0000000000
--- a/libhover/bin/org/eclipse/linuxtools/cdt/libhover/properties/LibHoverPropertyPage.class
+++ /dev/null
Binary files differ
diff --git a/libhover/build.properties b/libhover/build.properties
deleted file mode 100644
index 2b0d95b6b0..0000000000
--- a/libhover/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .
diff --git a/libhover/org.eclipse.cdt.libhover.feature/.project b/libhover/org.eclipse.cdt.libhover.feature/.project
deleted file mode 100644
index 4150d2047b..0000000000
--- a/libhover/org.eclipse.cdt.libhover.feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.cdt.libhover.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/libhover/org.eclipse.cdt.libhover.feature/ChangeLog b/libhover/org.eclipse.cdt.libhover.feature/ChangeLog
deleted file mode 100644
index 9f9a1c8447..0000000000
--- a/libhover/org.eclipse.cdt.libhover.feature/ChangeLog
+++ /dev/null
@@ -1,26 +0,0 @@
-2009-01-06 Jeff Johnston <jjohnstn@redhat.com>
-
- * feature.xml: Add .qualifier to version id.
-
-2009-01-06 Andrew Overholt <overholt@redhat.com>
-
- * feature.xml: 1.0.0 -> 0.1.0. Add update site information.
- * build.properties: Add feature.properties and epl-v10.html.
-
-2008-10-31 Andrew Overholt <overholt@redhat.com>
-
- * feature.xml: Use feature.properties. Add "(Incubation)".
- * feature.properties: Initial checkin.
- * epl-v10.html: Likewise.
-
-2008-10-16 Jeff Johnston <jjohnstn@redhat.com>
-
- * feature.xml: Add org.eclipse.linuxtools.cdt.libhover.library_docs plugin.
- Also change org.eclipse.linuxtools.cdt.libhover.glibc reference to be plugin
- instead of fragment.
-
-2008-10-14 Jeff Johnston <jjohnstn@redhat.com>
-
- * feature.xml: Initial check-in.
- * about.html: Ditto.
- * build.properties: Ditto.
diff --git a/libhover/org.eclipse.cdt.libhover.feature/build.properties b/libhover/org.eclipse.cdt.libhover.feature/build.properties
deleted file mode 100644
index 65a4460540..0000000000
--- a/libhover/org.eclipse.cdt.libhover.feature/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-bin.includes = feature.xml,\
- about.html,\
- feature.properties,\
- epl-v10.html
diff --git a/libhover/org.eclipse.cdt.libhover.feature/feature.properties b/libhover/org.eclipse.cdt.libhover.feature/feature.properties
deleted file mode 100644
index 467f43cfd2..0000000000
--- a/libhover/org.eclipse.cdt.libhover.feature/feature.properties
+++ /dev/null
@@ -1,112 +0,0 @@
-#################################################################################
-# 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
-#################################################################################
-featureName=Libhover Feature (Incubation)
-description=Plugins for C/C++ library hover help.
-provider=Eclipse.org
-copyright=Copyright 2008 Red Hat, Inc.
-licenseURL=epl-v10.html
-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? 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 \ No newline at end of file
diff --git a/libhover/org.eclipse.cdt.libhover.feature/feature.xml b/libhover/org.eclipse.cdt.libhover.feature/feature.xml
deleted file mode 100644
index 577645b09f..0000000000
--- a/libhover/org.eclipse.cdt.libhover.feature/feature.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.linuxtools.cdt.libhover.feature"
- label="%featureName"
- version="0.1.0.qualifier"
- provider-name="%provider">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="epl-v10.php">
- %license
- </license>
-
- <url>
- <update label="Linux Tools Update Site" url="http://download.eclipse.org/technology/linuxtools/update"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.ui" version="3.4.0" match="compatible"/>
- <import plugin="org.eclipse.core.runtime" version="3.4.0" match="compatible"/>
- <import plugin="org.eclipse.core.resources" version="3.4.0" match="compatible"/>
- <import plugin="org.eclipse.help" version="3.3.100" match="greaterOrEqual"/>
- <import plugin="org.eclipse.cdt.ui" version="5.0.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.core.filesystem" version="1.2.0" match="greaterOrEqual"/>
- </requires>
-
- <plugin
- id="org.eclipse.linuxtools.cdt.libhover"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.linuxtools.cdt.libhover.library_docs"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.linuxtools.cdt.libhover.glibc"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
-</feature>
diff --git a/libhover/org.eclipse.cdt.libhover/.project b/libhover/org.eclipse.cdt.libhover/.project
deleted file mode 100644
index 5207979d38..0000000000
--- a/libhover/org.eclipse.cdt.libhover/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.cdt.libhover</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/libhover/org.eclipse.cdt.libhover/.settings/org.eclipse.jdt.core.prefs b/libhover/org.eclipse.cdt.libhover/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bbc86d093a..0000000000
--- a/libhover/org.eclipse.cdt.libhover/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Sep 19 14:24:23 EDT 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/libhover/org.eclipse.cdt.libhover/ChangeLog b/libhover/org.eclipse.cdt.libhover/ChangeLog
deleted file mode 100644
index d1a90ad635..0000000000
--- a/libhover/org.eclipse.cdt.libhover/ChangeLog
+++ /dev/null
@@ -1,54 +0,0 @@
-2008-10-31 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Use bundleName and provider from plugin.properties. Add
- "(Incubation)".
- * plugin.properties: Initial import.
-
-2008-10-24 Jeff Johnston <jjohnstn@redhat.com>
-
- * plugin.xml: Remove libhover property and preferences pages which are not needed since
- C/C++ Documentation properties page does the job.
- * src/org/eclipse/linuxtools/cdt/libhover/LibHover.java:
- (getMatchingFunctions): Pass document to getFunctionSummaryFromNode.
- (constructTypes): Add groupsynopsis.
- (getFunctionInfo): Pass document to getFunctionSummaryFromNode.
- (getFunctionSummaryFromNode): Add groupsynopsis support.
-
-2008-10-22 Jeff Johnston <jjohnstn@redhat.com>
-
- * plugin.properties: New file.
- * src/org/eclipse/linuxtools/cdt/libhover/preferences/CheckboxFieldEditor.java: New file.
- * build.properties: Add plugin.properties to list of binary files.
- * META-INF/MANIFEST.MF: Add Bundle-Localization statement.
- * plugin.xml: Use translatable names for preference and property pages.
- * schema/org.eclipse.linuxtools.cdt.libhover.library.exsd: Make id and name required.
- * src/org/eclipse/linuxtools/cdt/libhover/LibHover.java:
- * src/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.java: Fix bundle name.
- * src/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.properties: New messages.
- * src/org/eclipse/linuxtools/cdt/libhover/LibhoverPlugin.java (getID): New method.
- * src/org/eclipse/linuxtools/cdt/libhover/preferences/LibHoverPreferencePage.java (createFieldEditors):
- Rewrite to use new CheckboxFieldEditor.
- * src/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceConstants.java: Add P_LIBHOVER.
- * src/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceInitializer.java (initializeDefaultPreferences):
- Set up an unused default string.
- * src/org/eclipse/linuxtools/cdt/libhover/properties/LibHoverPropertyPage.java: Rewritten to use the
- CheckboxFieldEditor widgets on a property page.
-
-2008-10-15 Jeff Johnston <jjohnstn@redhat.com>
-
- * build.properties: Specify javacSource and javacTarget to be 1.5.
-
-2008-09-19 Jeff Johnston <jjohnstn@redhat.com>
-
- * src/org/eclipse/linuxtools/cdt/libhover/LibHover.java: Initial implementation moved
- org.eclipse.cdt.linuxtools.autotools.
- * src/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.java: Ditto.
- * src/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.properties: Ditto.
- * src/org/eclipse/linuxtools/cdt/libhover/LibHoverPlugin.java: New file.
- * META-INF/MANIFEST.MF: Ditto.
- * schema/org.eclipse.linuxtools.cdt.libhover.library.exsd: Ditto.
- * about.html, build.properties, plugin.xml, plugin.properties: Ditto.
- * src/org/eclipse/linuxtools/cdt/libhover/preferences/LibHoverPreferencesPage.java: Ditto.
- * src/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceConstants.java: Ditto.
- * src/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceInitializer.java: Ditto.
- * src/org/eclipse/linuxtools/cdt/libhover/properties/LibHoverPropertyPage.java: Ditto.
diff --git a/libhover/org.eclipse.cdt.libhover/META-INF/MANIFEST.MF b/libhover/org.eclipse.cdt.libhover/META-INF/MANIFEST.MF
deleted file mode 100644
index 01c7ffeeed..0000000000
--- a/libhover/org.eclipse.cdt.libhover/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,16 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %bundleName
-Bundle-SymbolicName: org.eclipse.linuxtools.cdt.libhover; singleton:=true
-Bundle-Version: 1.0.0
-Bundle-Activator: org.eclipse.linuxtools.cdt.libhover.LibhoverPlugin
-Bundle-Vendor: %provider
-Bundle-Localization: plugin
-Bundle-ActivationPolicy: lazy
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.help;bundle-version="3.3.100",
- org.eclipse.cdt.ui;bundle-version="5.0.0",
- org.eclipse.core.filesystem;bundle-version="1.2.0"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/libhover/org.eclipse.cdt.libhover/build.properties b/libhover/org.eclipse.cdt.libhover/build.properties
deleted file mode 100644
index 50e2a58ba8..0000000000
--- a/libhover/org.eclipse.cdt.libhover/build.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- plugin.properties
-
-javacSource=1.5
-javacTarget=1.5
diff --git a/libhover/org.eclipse.cdt.libhover/plugin.properties b/libhover/org.eclipse.cdt.libhover/plugin.properties
deleted file mode 100644
index 788b77e31c..0000000000
--- a/libhover/org.eclipse.cdt.libhover/plugin.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-#################################################################################
-# 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
-#################################################################################
-LibhoverPreference.name=Library Hover
-LibhoverProperty.name=Library Hover
-bundleName=C/C++ Libhover Plug-in (Incubation)
-provider=Eclipse.org \ No newline at end of file
diff --git a/libhover/org.eclipse.cdt.libhover/plugin.xml b/libhover/org.eclipse.cdt.libhover/plugin.xml
deleted file mode 100644
index 3772b44646..0000000000
--- a/libhover/org.eclipse.cdt.libhover/plugin.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension-point id="org.eclipse.linuxtools.cdt.libhover.library" name="C/C++ Library Hover Specifier" schema="schema/org.eclipse.linuxtools.cdt.libhover.library.exsd"/>
-
- <extension
- point="org.eclipse.cdt.ui.CHelpProvider">
- <provider
- class="org.eclipse.linuxtools.cdt.libhover.LibHover"
- id="org.eclipse.linuxtools.cdt.libhover.provider"/>
- </extension>
-</plugin>
diff --git a/libhover/org.eclipse.cdt.libhover/schema/org.eclipse.linuxtools.cdt.libhover.library.exsd b/libhover/org.eclipse.cdt.libhover/schema/org.eclipse.linuxtools.cdt.libhover.library.exsd
deleted file mode 100644
index 0c9bc59845..0000000000
--- a/libhover/org.eclipse.cdt.libhover/schema/org.eclipse.linuxtools.cdt.libhover.library.exsd
+++ /dev/null
@@ -1,216 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="library" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="library" id="org.eclipse.linuxtools.cdt.libhover.library" name="C/C++ Library Hover Specifier"/>
- </appinfo>
- <documentation>
- This extension allows specification of a library hover file to use when editing C or C++ files under the CDT.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="library" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- Unique simple id for this extension (e.g. library).
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- Name of this library to hover. This name will be shown in the preference and property dialogs.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="library">
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- Name of the library that the hover info is providing
- </documentation>
- </annotation>
- </attribute>
- <attribute name="location" type="string" use="required">
- <annotation>
- <documentation>
- Location of the xml file containing the hover info: either an absolute file name or a URL
- </documentation>
- </annotation>
- </attribute>
- <attribute name="docs" type="string">
- <annotation>
- <documentation>
- URL of help documentation or empty.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="type" use="required">
- <annotation>
- <documentation>
- Type of library that help is for. One of C, C++, or ASM
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- <simpleType>
- <restriction base="string">
- <enumeration value="C">
- </enumeration>
- <enumeration value="C++">
- </enumeration>
- <enumeration value="ASM">
- </enumeration>
- </restriction>
- </simpleType>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- 1.0.0
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- &lt;extension
- point=&quot;org.eclipse.linuxtools.cdt.libhover.library&quot;&gt;
- &lt;library
- name=&quot;GTK&quot;
- location=&quot;http://mywebsite/libhover/xml/gtk.xml&quot;
- docs=&quot;http;//gtk.org/docs/gtk.html&quot;/&gt;
- &lt;/extension&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiinfo"/>
- </appinfo>
- <documentation>
- XML files referenced must adhere to the following xml structure:
-&lt;pre&gt;
-
-&lt;!DOCTYPE descriptions [
-
- &lt;!ELEMENT descriptions (construct)*&gt;
-
- &lt;!ELEMENT construct (structure|function)*&gt;
- &lt;!ATTLIST construct
- id ID #REQUIRED
- type CDATA #REQUIRED
- &gt;
-
- &lt;!ELEMENT structure (synopsis?, elements?)?&gt;
-
- &lt;!ELEMENT elements (element*)&gt;
-
- &lt;!ELEMENT element (synopsis*)&gt;
- &lt;!ATTLIST element
- content CDATA #REQUIRED
- &gt;
-
- &lt;!ELEMENT synopsis (#PCDATA)*&gt;
-
- &lt;!ELEMENT function (prototype,headers?,synopsis)&gt;
- &lt;!ATTLIST function
- returntype CDATA #REQUIRED
- &gt;
-
- &lt;!ELEMENT prototype (parameter+)?&gt;
-
- &lt;!ELEMENT parameter (#PCDATA)*&gt;
- &lt;!ATTLIST parameter
- content CDATA #REQUIRED
- &gt;
-
- &lt;!ELEMENT headers (header+)?&gt;
-
- &lt;!ELEMENT header (#PCDATA)*&gt;
- &lt;!ATTLIST header
- filename CDATA #REQUIRED
- &gt;
-
-]&gt;
-&lt;/pre&gt;
-Note that function names need to be prefixed by &quot;function-&quot;. For example:
-&lt;pre&gt;
-&lt;descriptions&gt;
- &lt;construct id=&quot;function-atexit&quot; type=&quot;function&quot;&gt;
- &lt;function returntype=&quot;int&quot;&gt;
- &lt;prototype&gt;
- &lt;parameter content=&quot;void (*function) (void)&quot;/&gt;
- &lt;/prototype&gt;
- &lt;headers&gt;
- &lt;header filename = &quot;stdlib.h&quot;/&gt;
- &lt;/headers&gt;
- &lt;synopsis&gt;
- The &amp;lt;CODE&amp;gt;atexit&amp;lt;/CODE&amp;gt; function registers the function &amp;lt;VAR&amp;gt;function&amp;lt;/VAR&amp;gt; to be
- called at normal program termination. The &amp;lt;VAR&amp;gt;function&amp;lt;/VAR&amp;gt; is called with
- no arguments.
- &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; The return value from &amp;lt;CODE&amp;gt;atexit&amp;lt;/CODE&amp;gt; is zero on success and nonzero if
- the function cannot be registered.
- &lt;/synopsis&gt;
- &lt;/function&gt;
- &lt;/construct&gt;
-&lt;/descriptions&gt;
-&lt;/pre&gt;
-
-Also note that the synopsis is output as html. To specify html tags, one needs to use &amp;amp;lt; and &amp;amp;gt; as delimeters in place of &quot;&amp;lt&quot; and &quot;&amp;gt&quot;. In the previous example, VAR tags are used for variable references, CODE tags for the function name, and br tags for forcing paragraph breaks. All of these make the hover look more interesting when displayed.
- </documentation>
- </annotation>
-
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- /*******************************************************************************
- * Copyright (c) 2008 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat Inc. - initial API and implementation
- *******************************************************************************/
- </documentation>
- </annotation>
-
-</schema>
diff --git a/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHover.java b/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHover.java
deleted file mode 100644
index a1ba5d7b01..0000000000
--- a/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHover.java
+++ /dev/null
@@ -1,499 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006, 2007, 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
- *******************************************************************************/
-/*
- * Initially created on Jul 8, 2004
- */
-
-/**
- * @author Chris Moller, Red Hat, Inc.
- * @author Jeff Johnston, Red Hat, Inc. (rewrite to use ICHelpProvider)
- * Modified to be org.eclipse.linuxtools.cdt.libhover package.
- */
-
-package org.eclipse.linuxtools.cdt.libhover;
-
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.eclipse.cdt.ui.CUIPlugin;
-import org.eclipse.cdt.ui.ICHelpBook;
-import org.eclipse.cdt.ui.ICHelpProvider;
-import org.eclipse.cdt.ui.ICHelpResourceDescriptor;
-import org.eclipse.cdt.ui.IFunctionSummary;
-import org.eclipse.cdt.ui.IRequiredInclude;
-import org.eclipse.cdt.ui.text.ICHelpInvocationContext;
-import org.eclipse.core.filesystem.URIUtil;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.RegistryFactory;
-import org.eclipse.help.IHelpResource;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-
-public class LibHover implements ICHelpProvider {
-
- public static String LIBHOVER_DOC_EXTENSION = LibhoverPlugin.PLUGIN_ID + ".library"; //$NON-NLS-1$
-
- // see comment in initialize()
- // private static String defaultSearchPath = null;
-
- private static HashMap<ICHelpBook, LibHoverLibrary> libraries = new HashMap<ICHelpBook, LibHoverLibrary>();
-
- static final String constructTypes[] ={
- "dtype", // $NON-NLS-1$
- "enum", // $NON-NLS-1$
- "function", // $NON-NLS-1$
- "groupsynopsis", // $NON-NLS-1$
- "struct", // $NON-NLS-1$
- "type", // $NON-NLS-1$
- "union" // $NON-NLS-1$
- };
-
- static final int dtypeIndex = 0;
- static final int enumIndex = 1;
- static final int functionIndex = 2;
- static final int groupsynopsisIndex = 3;
- static final int structIndex = 4;
- static final int typeIndex = 5;
- static final int unionIndex = 6;
-
- private class LibHoverLibrary {
- private String name;
- private String location;
- private String docs;
- private Document document;
- public LibHoverLibrary(String name, String location, String docs, Document document) {
- this.name = name;
- this.location = location;
- this.document = document;
- this.docs = docs;
- }
- public String getName() {
- return name;
- }
- public String getLocation() {
- return location;
- }
- public String getDocs() {
- return docs;
- }
- public Document getDocument() {
- return document;
- }
- }
-
- private class HelpBook implements ICHelpBook {
- private String title;
- private int type;
-
- public HelpBook (String title, String typeName) {
- this.title = title;
- if (typeName.equals("C"))
- type = HELP_TYPE_C;
- else if (typeName.equals("C++"))
- type = HELP_TYPE_CPP;
- else
- type = HELP_TYPE_ASM;
- }
- public String getTitle () {
- return title;
- }
-
- public int getCHelpType () {
- return type;
- }
- }
-
- private ArrayList<ICHelpBook> helpBooks = new ArrayList<ICHelpBook>();
-
- public void getLibHoverDocs() {
- libraries.clear();
- helpBooks.clear();
- IExtensionRegistry x = RegistryFactory.getRegistry();
- IConfigurationElement[] ces = x.getConfigurationElementsFor(LIBHOVER_DOC_EXTENSION);
- for (int i = 0; i < ces.length; ++i) {
- IConfigurationElement ce = ces[i];
- if (ce.getName().equals("library")) { //$NON-NLS-1$
- Document doc = null;
- try {
- // see comment in initialize()
- try {
- // Use the FileLocator class to open the magic hover doc file
- // in the plugin's jar.
- // Either open the html file or file system file depending
- // on what has been specified.
- String location = ce.getAttribute("location"); //$NON-NLS-1$
- String name = ce.getAttribute("name"); //$NON-NLS-1$
- String helpdocs = ce.getAttribute("docs"); //$NON-NLS-1$
- String type = ce.getAttribute("type"); //$NON-NLS-1$
- URI acDoc = new URI(location);
- IPath p = URIUtil.toPath(acDoc);
- InputStream docStream = null;
- if (p == null) {
- URL url = acDoc.toURL();
- docStream = url.openStream();
- } else {
- docStream = new FileInputStream(p.toFile());
- }
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- factory.setValidating(false);
- try {
- DocumentBuilder builder = factory.newDocumentBuilder();
- doc = builder.parse(docStream);
- }
- catch (SAXParseException saxException) {
- doc = null;
- }
- catch (SAXException saxEx) {
- doc = null;
- }
- catch (ParserConfigurationException pce) {
- doc = null;
- }
- catch (IOException ioe) {
- doc = null;
- }
- // If we found the document, add it to our library list.
- if (doc != null) {
- HelpBook h = new HelpBook(name, type);
- helpBooks.add(h);
- libraries.put(h, new LibHoverLibrary(name, location, helpdocs, doc));
- }
- } catch (MalformedURLException e) {
- CUIPlugin.log(e);
- } catch (FileNotFoundException e) {
- CUIPlugin.log(e);
- } catch (URISyntaxException e) {
- CUIPlugin.log(e);
- }
- }
- catch (IOException ioe) {
- }
- }
- }
- }
-
- public void initialize() {
- getLibHoverDocs();
- }
-
- public ICHelpBook[] getCHelpBooks () {
- ICHelpBook[] chelpbooks = new ICHelpBook[helpBooks.size()];
- return helpBooks.toArray(chelpbooks);
- }
-
- private class FunctionSummary implements IFunctionSummary, Comparable<FunctionSummary> {
-
- private String Name;
- private String ReturnType;
- private String Prototype;
- private String Summary;
-
-// private String Synopsis;
- private class RequiredInclude implements IRequiredInclude {
- private String include;
-
- public RequiredInclude (String file) {
- include = file;
- }
-
- public String getIncludeName() {
- return include;
- }
-
- public boolean isStandard() {
- return true;
- }
- }
-
- public int compareTo (FunctionSummary x) {
- FunctionSummary y = (FunctionSummary)x;
- return getName().compareTo(y.getName());
- }
-
-// private RequiredInclude Includes[];
- private ArrayList<RequiredInclude> Includes = new ArrayList<RequiredInclude>();
-
- private void setIncludeName (String iname) {
- RequiredInclude nri = new RequiredInclude(iname);
- Includes.add(nri);
- }
-
- public class FunctionPrototypeSummary implements IFunctionPrototypeSummary {
- public String getName() { return Name; }
- public String getReturnType() { return ReturnType; }
- public String getArguments() { return Prototype; }
- public String getPrototypeString(boolean namefirst) {
- if (true == namefirst) {
- return Name + " (" + Prototype + ") " + ReturnType; // $NON-NLS-1$ // $NON-NLS-2$
- }
- else {
- return ReturnType + " " + Name + " (" + Prototype + ")"; // $NON-NLS-1$ // $NON-NLS-2$ // $NON-NLS-3$
- }
- }
- }
-
- public String getName() { return Name; }
- public String getNamespace() { return null; }
- public String getDescription() { return Summary; }
- public IFunctionPrototypeSummary getPrototype() { return new FunctionPrototypeSummary(); }
-
- public IRequiredInclude[] getIncludes() {
- IRequiredInclude[] includes = new IRequiredInclude[Includes.size()];
- for (int i = 0; i < Includes.size(); ++i) {
- includes[i] = (IRequiredInclude)Includes.get(i);
- }
- return includes;
- }
-
- }
-
- protected FunctionSummary getFunctionSummaryFromNode(String name, Node function_node, Document document) {
- FunctionSummary f = new FunctionSummary();
- f.Name = name;
- NamedNodeMap function_node_map = function_node.getAttributes();
- Node function_node_returntype_node = function_node_map.item(0);
- String function_node_rt_name = function_node_returntype_node.getNodeName();
-
- if (function_node_rt_name.equals("returntype")) { // $NON-NLS-1$
-
- // return type
-
- String function_node_rt_value = function_node_returntype_node.getNodeValue();
- f.ReturnType = function_node_rt_value;
- } // returntype
-
- NodeList function_node_kids = function_node.getChildNodes();
- for (int fnk = 0; fnk < function_node_kids.getLength(); fnk++) {
- Node function_node_kid = function_node_kids.item(fnk);
- String function_node_kid_name = function_node_kid.getNodeName();
- if (function_node_kid_name.equals("prototype")) { // $NON-NLS-1$
-
- // prototype
-
- String prototype = null;
-
- NodeList function_node_parms = function_node_kid.getChildNodes();
- for (int fnp = 0; fnp < function_node_parms.getLength(); fnp++) {
- Node function_node_parm = function_node_parms.item(fnp);
- String function_node_parm_name = function_node_parm.getNodeName();
- if (function_node_parm_name.equals("parameter")) { // $NON-NLS-1$
- NamedNodeMap function_node_parm_map = function_node_parm.getAttributes();
- Node function_node_parm_node = function_node_parm_map.item(0);
- String parameter = function_node_parm_node.getNodeValue();
- prototype = (null == prototype)
- ? parameter
- : prototype + ", " + parameter;
- }
- }
- f.Prototype = prototype;
- } // prototype
-
- else if (function_node_kid_name.equals("headers")) { // $NON-NLS-1$
-
- // headers
-
- NodeList function_node_headers = function_node_kid.getChildNodes();
- for (int fnh = 0; fnh < function_node_headers.getLength(); fnh++) {
- Node function_node_header = function_node_headers.item(fnh);
- String function_node_header_name = function_node_header.getNodeName();
- if (function_node_header_name.equals("header")) { // $NON-NLS-1$
- NamedNodeMap function_node_header_map = function_node_header.getAttributes();
- Node function_node_header_node = function_node_header_map.item(0);
- f.setIncludeName(function_node_header_node.getNodeValue());
- }
- }
- } // headers
-
-
- else if (function_node_kid_name.equals("groupsynopsis")) { // $NON-NLS-1$
-
- // group synopsis
-
- NamedNodeMap attr = function_node_kid.getAttributes();
- Node idnode = attr.getNamedItem("id"); // $NON-NLS-1$
- String id = idnode.getNodeValue();
- if (id != null) {
- Element elem2 = document.getElementById(id);
- if (null != elem2) {
- NodeList synopsisNode = elem2.getElementsByTagName("synopsis"); // $NON-NLS-1$
- if (null != synopsisNode && synopsisNode.getLength() > 0) {
- Node synopsis = synopsisNode.item(0);
- Node textNode = synopsis.getLastChild();
- f.Summary = textNode.getNodeValue();
- }
- }
- }
- }
-
- else if (function_node_kid_name.equals("synopsis")) { // $NON-NLS-1$
-
- // synopsis
-
- Node textNode = function_node_kid.getLastChild();
- f.Summary = textNode.getNodeValue();
- }
- }
- return f;
- }
-
-
- public IFunctionSummary getFunctionInfo(ICHelpInvocationContext context, ICHelpBook[] helpBooks, String name) {
- FunctionSummary f;
-
- f = null;
-
- // Loop through all the documents we have and report first match.
- for (int i = 0; i < helpBooks.length; ++i) {
- LibHoverLibrary l = libraries.get(helpBooks[i]);
- Document document = l != null ? l.getDocument() : null;
- if ((null != document) && (null != name)) {
- String sss;
-
- for (int ci = 0; ci < constructTypes.length; ci++) {
- sss = constructTypes[ci] + "-" + name; // $NON-NLS-1$
- Element elem = document.getElementById(sss);
- if (null != elem) {
- switch(ci) {
- case dtypeIndex:
- break;
- case enumIndex:
- break;
- case functionIndex:
- NodeList functionNode = elem.getElementsByTagName("function"); // $NON-NLS-1$
- if (null != functionNode) {
- for (int fni = 0; fni < functionNode.getLength(); fni++) {
- Node function_node = functionNode.item(fni);
- String function_node_name = function_node.getNodeName();
- if (function_node_name.equals("function")) { // $NON-NLS-1$
- f = getFunctionSummaryFromNode(name, function_node, document);
- return f;
- } // function node
- } // fni loop
- } // null != functionNode
- break;
- case structIndex:
- break;
- case typeIndex:
- break;
- case unionIndex:
- break;
- }
- }
- }
- }
- }
- return null;
- }
-
-
- public IFunctionSummary[] getMatchingFunctions(ICHelpInvocationContext context, ICHelpBook[] helpBooks, String prefix) {
- ArrayList<IFunctionSummary> fList = new ArrayList<IFunctionSummary>();
-
- for (int di = 0; di < helpBooks.length; ++di) {
- LibHoverLibrary l = libraries.get(helpBooks[di]);
- Document document = l != null ? l.getDocument() : null;
- if ((null != document) && (null != prefix)) {
- NodeList elems = document.getElementsByTagName("construct"); // $NON-NLS-1$
- for (int i = 0; i < elems.getLength(); ++i) {
- Element elem = (Element)elems.item(i);
- NamedNodeMap attrs = elem.getAttributes();
- Node id_node = attrs.item(0);
- String elemName = id_node.getNodeValue();
- if (elemName != null && elemName.startsWith("function-")) { // $NON-NLS-1$
- String funcName = elemName.substring(9);
- if (funcName != null && funcName.startsWith(prefix)) {
- NodeList functionNodes = elem.getElementsByTagName("function"); // $NON-NLS-1$
- for (int j = 0; j < functionNodes.getLength(); ++j) {
- Node function_node = functionNodes.item(j);
- FunctionSummary f = getFunctionSummaryFromNode(funcName, function_node, document);
- fList.add(f);
- }
- }
- }
- }
- }
- }
- IFunctionSummary[] summaries = new IFunctionSummary[fList.size()];
- for (int k = 0; k < summaries.length; k++) {
- summaries[k] = (IFunctionSummary)fList.get(k);
- }
- Arrays.sort(summaries);
- return summaries;
- }
-
- private class HelpResource implements IHelpResource {
- private String href;
- private String label;
- public HelpResource(String href, String label) {
- this.href = href;
- this.label = label;
- }
- public String getHref() {
- return href;
- }
- public String getLabel() {
- return label;
- }
- }
-
- private class HelpResourceDescriptor implements ICHelpResourceDescriptor {
- private ICHelpBook helpbook;
-
- public HelpResourceDescriptor(ICHelpBook helpbook) {
- this.helpbook = helpbook;
- }
-
- public ICHelpBook getCHelpBook() {
- return helpbook;
- }
-
- public IHelpResource[] getHelpResources() {
- LibHoverLibrary l = libraries.get(helpbook);
- if (l != null) {
- IHelpResource[] hr = new IHelpResource[1];
- hr[0] = new HelpResource(l.getLocation(), l.getName());
- return hr;
- }
- return null;
- }
- }
-
- public ICHelpResourceDescriptor[] getHelpResources(ICHelpInvocationContext context, ICHelpBook[] helpBooks, String name) {
- for (int i = 0; i < helpBooks.length; ++i) {
- IFunctionSummary fs = getFunctionInfo(context, new ICHelpBook[]{helpBooks[i]}, name);
- if (fs != null) {
- return new HelpResourceDescriptor[]{new HelpResourceDescriptor(helpBooks[i])};
- }
- }
- return null;
- }
-}
diff --git a/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.java b/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.java
deleted file mode 100644
index 7cd543d083..0000000000
--- a/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2006, 2007 QNX Software Systems 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:
- * QNX Software Systems - Initial API and implementation
- * Red Hat Inc. - Modification to use with LibHover
- *******************************************************************************/
-
-package org.eclipse.linuxtools.cdt.libhover;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * MakefilePreferencesMessages
- */
-public class LibHoverMessages {
-
- /**
- *
- */
- private LibHoverMessages() {
- }
-
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.cdt.libhover.LibHoverMessages"; //$NON-NLS-1$
-
- public static String getString(String key) {
- try {
- return ResourceBundle.getBundle(BUNDLE_NAME).getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- } catch (NullPointerException e) {
- return '#' + key + '#';
- }
- }
-
-}
diff --git a/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.properties b/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.properties
deleted file mode 100644
index c187c96126..0000000000
--- a/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-#################################################################################
-# Copyright (c) 2007 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
-#################################################################################
-LibcHelpResource.label=C Library Help
-LibcHelpBook.title=C Library Functions
-FileListControl.moveup=Move Up
-FileListControl.movedown=Move Down
-LibhoverPreferences.title=C/C++ Library Hover Enablement
-Libhover.projectSpecific.msg=Use project specific settings \ No newline at end of file
diff --git a/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/LibhoverPlugin.java b/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/LibhoverPlugin.java
deleted file mode 100644
index 54354dd48a..0000000000
--- a/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/LibhoverPlugin.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package org.eclipse.linuxtools.cdt.libhover;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class LibhoverPlugin extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.linuxtools.cdt.libhover";
-
- // The shared instance
- private static LibhoverPlugin plugin;
-
- /**
- * The constructor
- */
- public LibhoverPlugin() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static LibhoverPlugin getDefault() {
- return plugin;
- }
-
- /*
- * Returns the id of the plugin
- */
- public static String getID() {
- return PLUGIN_ID;
- }
-
- /**
- * 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);
- }
-}
diff --git a/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/CheckboxFieldEditor.java b/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/CheckboxFieldEditor.java
deleted file mode 100644
index 8e299e080d..0000000000
--- a/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/CheckboxFieldEditor.java
+++ /dev/null
@@ -1,393 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.linuxtools.cdt.libhover.preferences;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-
-import org.eclipse.cdt.ui.newui.UIMessages;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.preference.FieldEditor;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.linuxtools.cdt.libhover.LibHoverMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Table;
-
-public class CheckboxFieldEditor extends FieldEditor {
-
- private String extensionID;
- private String preferenceName;
- private HashMap<String, String> mapItems = new HashMap<String, String>();
- private Table table;
- private CheckboxTableViewer tv;
- private Button[] buttons;
- private Composite usercomp; // space where user can create widgets
- private Composite buttoncomp; // space for buttons on the right
-
-
- public static final String EMPTY_STR = ""; //$NON-NLS-1$
- public static final String MOVEUP_STR = LibHoverMessages.getString("FileListControl.moveup"); //$NON-NLS-1$
- public static final String MOVEDOWN_STR = LibHoverMessages.getString("FileListControl.movedown"); //$NON-NLS-1$
-
- public CheckboxFieldEditor(String extensionID, String preferenceName, String label, Composite parent) {
- this.extensionID = extensionID;
- this.preferenceName = preferenceName;
- init(preferenceName, label);
- createControl(parent);
- }
-
-
- @Override
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditor#adjustForNumColumns(int)
- */
- protected void adjustForNumColumns(int numColumns) {
- if (numColumns > 1) {
- Control control = getLabelControl();
- int left = numColumns;
- if (control != null) {
- ((GridData)control.getLayoutData()).horizontalSpan = numColumns;
- }
- ((GridData)table.getLayoutData()).horizontalSpan = numColumns - 1;
- ((GridData)buttoncomp.getLayoutData()).horizontalSpan = 1;
- } else {
- Control control = getLabelControl();
- if (control != null) {
- ((GridData)control.getLayoutData()).horizontalSpan = 1;
- }
- ((GridData)usercomp.getLayoutData()).horizontalSpan = 1;
- ((GridData)buttoncomp.getLayoutData()).horizontalSpan = 1;
- }
- }
-
-
- @Override
- // TODO Auto-generated method stub
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditor#doFillIntoGrid(org.eclipse.swt.widgets.Composite, int)
- */
- protected void doFillIntoGrid(Composite parent, int numColumns) {
- int checkC = 1;
- if (numColumns > 1) {
- checkC = numColumns - 1;
- }
- Control control = getLabelControl(parent);
- GridData gd = new GridData();
- gd.horizontalSpan = numColumns;
- control.setLayoutData(gd);
- control = getCheckboxControl(parent);
- gd = new GridData();
- gd.horizontalSpan = checkC;
- gd.horizontalAlignment = GridData.FILL;
- gd.verticalAlignment = GridData.FILL;
- gd.grabExcessHorizontalSpace = true;
- gd.grabExcessVerticalSpace = true;
- control.setLayoutData(gd);
- control.setFont(parent.getFont());
- control = getButtonControl(parent);
- gd = new GridData();
- gd.horizontalSpan = 1;
- gd.horizontalAlignment = GridData.FILL;
- control.setLayoutData(gd);
- control.setFont(parent.getFont());
- }
-
- private void getExtensions() {
- mapItems.clear();
- IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(
- extensionID);
- if (point != null) {
- IExtension[] exts = point.getExtensions();
- for (IExtension ext : exts) {
- if (ext.getConfigurationElements().length > 0) {
- mapItems.put(ext.getUniqueIdentifier(), ext.getLabel());
- }
- }
- }
- }
-
- @Override
- protected void doLoad() {
- // Combine user preference string with existing libhover extensions.
- getExtensions();
- HashMap<String,String> copyMap = (HashMap<String,String>)mapItems.clone();
- ArrayList<TableData> data = new ArrayList<TableData>();
- ArrayList<TableData> checkedData = new ArrayList<TableData>();
- // See what the user has set in preferences and make sure that
- // any libhover referred to is a valid current extension.
- // Drop any preference for a non-existent extension.
- String pref = getPreferenceStore().getString(preferenceName);
- String[] tokens = pref.split(":");
- if (tokens.length > 1) {
- for (int i = 0; i < tokens.length; i+=2) {
- String id = tokens[i];
- Boolean checked = Boolean.valueOf(tokens[i+1]);
- String value = copyMap.get(id);
- if (value != null) {
- TableData d = new TableData(id, value);
- data.add(d);
- if (checked)
- checkedData.add(d);
- copyMap.remove(id);
- }
- }
- }
- // Add remaining libhover extensions to end of list as checked by default
- String[] leftovers = new String[copyMap.size()];
- leftovers = copyMap.keySet().toArray(leftovers);
- for (int i = 0; i < leftovers.length; ++i) {
- TableData d = new TableData(leftovers[i], copyMap.get(leftovers[i]));
- data.add(d);
- checkedData.add(d);
- }
- tv.setInput(data.toArray());
- tv.setCheckedElements(checkedData.toArray());
- updateButtons();
- }
-
- @Override
- protected void doLoadDefault() {
- // Default is to find all current extensions and turn them on by default.
- getExtensions();
- HashMap<String,String> copyMap = (HashMap<String,String>)mapItems.clone();
- ArrayList<TableData> data = new ArrayList<TableData>();
- ArrayList<TableData> checkedData = new ArrayList<TableData>();
- String[] ids = new String[copyMap.size()];
- ids = copyMap.keySet().toArray(ids);
- for (int i = 0; i < ids.length; ++i) {
- TableData d = new TableData(ids[i], copyMap.get(ids[i]));
- data.add(d);
- checkedData.add(d);
- }
- tv.setInput(data.toArray());
- tv.setCheckedElements(checkedData.toArray());
- updateButtons();
- }
-
- @Override
- protected void doStore() {
- save();
- }
-
- @Override
- public int getNumberOfControls() {
- return 3;
- }
-
- public Control getButtonControl(Composite parent) {
- if (buttoncomp == null) {
- buttoncomp = new Composite(parent, SWT.NONE);
- GridData d = new GridData(GridData.END);
- d.widthHint = 1;
- buttoncomp.setLayoutData(d);
- buttoncomp.setFont(parent.getFont());
- initButtons(buttoncomp, new String[] {
- MOVEUP_STR, MOVEDOWN_STR, null,
- UIMessages.getString("ErrorParsTab.0"), //$NON-NLS-1$
- UIMessages.getString("ErrorParsTab.1") //$NON-NLS-1$
- });
- }
- return buttoncomp;
- }
-
- public Control getCheckboxControl(Composite parent) {
- if (table == null) {
-// parent.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- table = new Table(parent, SWT.BORDER | SWT.CHECK | SWT.SINGLE);
- table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- table.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- updateButtons();
- }});
- tv = new CheckboxTableViewer(table);
- tv.setContentProvider(new IStructuredContentProvider() {
- public Object[] getElements(Object inputElement) {
- return (Object[])inputElement;
- }
- public void dispose() {}
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
- });
-
- tv.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent e) {
- }
- });
-
- }
- return table;
- }
- /**
- * Ability to create standard button on any composite.
- * @param c
- * @param names
- */
- protected void initButtons(Composite c, String[] names) {
- initButtons(c, names, 80);
- }
- protected void initButtons(Composite c, String[] names, int width) {
- if (names == null || names.length == 0) return;
- c.setLayoutData(new GridData(GridData.FILL_VERTICAL));
- c.setLayout(new GridLayout(1, false));
- buttons = new Button[names.length];
- for (int i=0; i<names.length; i++) {
- buttons[i] = new Button(c, SWT.PUSH);
- buttons[i].setFont(c.getFont());
- GridData gdb = new GridData(GridData.VERTICAL_ALIGN_CENTER);
- gdb.grabExcessHorizontalSpace = false;
- gdb.horizontalAlignment = SWT.FILL;
- gdb.minimumWidth = width;
-
- if (names[i] != null)
- buttons[i].setText(names[i]);
- else { // no button, but placeholder !
- buttons[i].setVisible(false);
- buttons[i].setEnabled(false);
- gdb.heightHint = 10;
- }
-
- buttons[i].setLayoutData(gdb);
- buttons[i].addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent event) {
- buttonPressed(event);
- }});
- }
- }
-
- /**
- *
- * @param e - event to be handled
- */
- private void buttonPressed(SelectionEvent e) {
- for (int i=0; i<buttons.length; i++) {
- if (buttons[i].equals(e.widget)) {
- buttonPressed(i);
- return;
- }
- }
- }
-
- public void buttonPressed (int n) {
- switch (n) {
- case 0: // up
- moveItem(true);
- break;
- case 1: // down
- moveItem(false);
- break;
- case 2: // do nothing - it's not a button
- break;
-
- case 3: // check all
- tv.setAllChecked(true);
- break;
- case 4: // uncheck all
- tv.setAllChecked(false);
- break;
- default:
- break;
- }
- }
-
- // Move item up / down
- private void moveItem(boolean up) {
- int n = table.getSelectionIndex();
- if (n < 0 ||
- (up && n == 0) ||
- (!up && n+1 == table.getItemCount()))
- return;
- TableData d = (TableData)tv.getElementAt(n);
- boolean checked = tv.getChecked(d);
- tv.remove(d);
- n = up ? n - 1 : n + 1;
- tv.insert(d, n);
- tv.setChecked(d, checked);
- table.setSelection(n);
- }
- /**
- * Changes state of existing button.
- * Does nothing if index is invalid
- *
- * @param i - button index
- * @param state - required state
- */
- protected void buttonSetEnabled(int i, boolean state) {
- if (buttons == null || buttons.length <= i ) return;
- buttons[i].setEnabled(state);
- }
-
- public void updateButtons() {
- int cnt = table.getItemCount();
- int pos = table.getSelectionIndex();
- buttonSetEnabled(0, pos > 0);
- buttonSetEnabled(1, pos != -1 && pos < (cnt - 1));
- buttonSetEnabled(3, cnt > 0);
- buttonSetEnabled(4, cnt > 0);
- }
-
- class TableData {
- String key;
- String value;
- public TableData (String _key, String _value) {
- key = _key;
- value = _value;
- }
- @Override
- public String toString() { return value; }
- }
-
- private void save() {
- boolean inRange = true;
- int i = 0;
- String outString = new String();
- String del = "";
- while (inRange) {
- TableData t;
- Object obj = tv.getElementAt(i);
- if (obj == null)
- inRange = false;
- else {
- ++i;
- t = (TableData)obj;
- outString += del + t.key + ":" + tv.getChecked(obj);
- del = ":";
- }
- }
- if (outString.length() > 1)
- getPreferenceStore().setValue(preferenceName, outString);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.preference.FieldEditor#setEnabled(boolean,
- * org.eclipse.swt.widgets.Composite)
- */
- public void setEnabled(boolean enabled, Composite parent) {
- super.setEnabled(enabled, parent);
- getCheckboxControl(parent).setEnabled(enabled);
- getButtonControl(parent).setEnabled(enabled);
- }
-}
diff --git a/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/LibHoverPreferencePage.java b/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/LibHoverPreferencePage.java
deleted file mode 100644
index 42f51e3f2c..0000000000
--- a/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/LibHoverPreferencePage.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.linuxtools.cdt.libhover.preferences;
-
-import org.eclipse.jface.preference.*;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.linuxtools.cdt.libhover.LibHover;
-import org.eclipse.linuxtools.cdt.libhover.LibHoverMessages;
-import org.eclipse.linuxtools.cdt.libhover.LibhoverPlugin;
-
-/**
- * This class represents a preference page that
- * is contributed to the Preferences dialog. By
- * subclassing <samp>FieldEditorPreferencePage</samp>, we
- * can use the field support built into JFace that allows
- * us to create a page that is small and knows how to
- * save, restore and apply itself.
- * <p>
- * This page is used to modify preferences only. They
- * are stored in the preference store that belongs to
- * the main plug-in class. That way, preferences can
- * be accessed directly via the preference store.
- */
-
-public class LibHoverPreferencePage
- extends FieldEditorPreferencePage
- implements IWorkbenchPreferencePage {
-
- public LibHoverPreferencePage() {
- super(GRID);
- setPreferenceStore(LibhoverPlugin.getDefault().getPreferenceStore());
- }
-
- /**
- * Creates the field editors. Field editors are abstractions of
- * the common GUI blocks needed to manipulate various types
- * of preferences. Each field editor knows how to save and
- * restore itself.
- */
- public void createFieldEditors() {
- addField(new CheckboxFieldEditor(LibHover.LIBHOVER_DOC_EXTENSION,
- PreferenceConstants.P_LIBHOVER,
- LibHoverMessages.getString("LibhoverPreferences.title"),
- getFieldEditorParent()));
-// addField(new DirectoryFieldEditor(PreferenceConstants.P_PATH,
-// "&Directory preference:", getFieldEditorParent()));
-// addField(
-// new BooleanFieldEditor(
-// PreferenceConstants.P_BOOLEAN,
-// "&An example of a boolean preference",
-// getFieldEditorParent()));
-//
-// addField(new RadioGroupFieldEditor(
-// PreferenceConstants.P_CHOICE,
-// "An example of a multiple-choice preference",
-// 1,
-// new String[][] { { "&Choice 1", "choice1" }, {
-// "C&hoice 2", "choice2" }
-// }, getFieldEditorParent()));
-// addField(
-// new StringFieldEditor(PreferenceConstants.P_STRING, "A &text preference:", getFieldEditorParent()));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- */
- public void init(IWorkbench workbench) {
- }
-
-} \ No newline at end of file
diff --git a/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceConstants.java b/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceConstants.java
deleted file mode 100644
index f8fa69ccb4..0000000000
--- a/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceConstants.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.linuxtools.cdt.libhover.preferences;
-
-/**
- * Constant definitions for plug-in preferences
- */
-public class PreferenceConstants {
-
- public static String P_LIBHOVER = "libhoverPreference"; //$NON-NLS-1$
-
-}
diff --git a/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceInitializer.java b/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceInitializer.java
deleted file mode 100644
index e311591a78..0000000000
--- a/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceInitializer.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.linuxtools.cdt.libhover.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-
-import org.eclipse.linuxtools.cdt.libhover.LibhoverPlugin;
-
-/**
- * Class used to initialize default preference values.
- */
-public class PreferenceInitializer extends AbstractPreferenceInitializer {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- public void initializeDefaultPreferences() {
- IPreferenceStore store = LibhoverPlugin.getDefault().getPreferenceStore();
- store.setDefault(PreferenceConstants.P_LIBHOVER, "");
-// store.setDefault(PreferenceConstants.P_BOOLEAN, true);
-// store.setDefault(PreferenceConstants.P_CHOICE, "choice2");
-// store.setDefault(PreferenceConstants.P_STRING,
-// "Default value");
- }
-
-}
diff --git a/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/properties/LibHoverPropertyPage.java b/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/properties/LibHoverPropertyPage.java
deleted file mode 100644
index 2f77b06daa..0000000000
--- a/libhover/org.eclipse.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/properties/LibHoverPropertyPage.java
+++ /dev/null
@@ -1,464 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.linuxtools.cdt.libhover.properties;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-
-import org.eclipse.cdt.ui.newui.UIMessages;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.linuxtools.cdt.libhover.LibHover;
-import org.eclipse.linuxtools.cdt.libhover.LibHoverMessages;
-import org.eclipse.linuxtools.cdt.libhover.LibhoverPlugin;
-import org.eclipse.linuxtools.cdt.libhover.preferences.PreferenceConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-public class LibHoverPropertyPage extends PropertyPage {
-
- private static final String PROJECT_SPECIFIC_MSG = "Libhover.projectSpecific.msg"; //$NON-NLS-1$
- private static final String LIBHOVER_PROPERTY = "LIBHOVER"; //$NON-NLS-1$
-
- private QualifiedName libhoverProperty = new QualifiedName(LibhoverPlugin.getID(), LIBHOVER_PROPERTY);
-
- private Button projectSpecific;
-
- private HashMap<String, String> mapItems = new HashMap<String, String>();
-
- private Table table;
- private CheckboxTableViewer tv;
- private Button[] buttons;
- private Composite buttoncomp; // space for buttons on the right
-
- public static final String EMPTY_STR = ""; //$NON-NLS-1$
- public static final String MOVEUP_STR = LibHoverMessages.getString("FileListControl.moveup"); //$NON-NLS-1$
- public static final String MOVEDOWN_STR = LibHoverMessages.getString("FileListControl.movedown"); //$NON-NLS-1$
-
- /**
- * Constructor for LibhoverPropertyPage.
- */
- public LibHoverPropertyPage() {
- super();
- setPreferenceStore(LibhoverPlugin.getDefault().getPreferenceStore());
- }
-
- private IProject getProject() {
- IResource r = (IResource)getElement().getAdapter(IResource.class);
- return r.getProject();
- }
-
- private String getPropertyString() {
- String p;
- try {
- p = getProject().getPersistentProperty(libhoverProperty);
- } catch (CoreException c) {
- p = null;
- }
- return p;
- }
-
- private void addFirstSection(Composite parent) {
- Composite composite = createDefaultComposite(parent);
-
- projectSpecific = new Button(composite, SWT.CHECK);
- projectSpecific.setText(LibHoverMessages.getString(PROJECT_SPECIFIC_MSG));
- String p = getPropertyString();
- projectSpecific.setSelection(p != null);
- projectSpecific.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent event) {
- projectSpecificPressed(event);
- }});
- }
-
- private void projectSpecificPressed(SelectionEvent event) {
- if (projectSpecific.getSelection()) {
- buttoncomp.setEnabled(true);
- table.setEnabled(true);
- updateCheckboxData(true);
- } else {
- buttoncomp.setEnabled(false);
- table.setEnabled(false);
- updateCheckboxData(false);
- }
- }
-
- private void addSeparator(Composite parent) {
- Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
- GridData gridData = new GridData();
- gridData.horizontalAlignment = GridData.FILL;
- gridData.grabExcessHorizontalSpace = true;
- separator.setLayoutData(gridData);
- }
-
- private void addLabel(Composite parent) {
- Label label = new Label(parent, SWT.HORIZONTAL);
- label.setText(LibHoverMessages.getString("LibhoverPreferences.title")); //$NON-NLS-1$
- GridData gridData = new GridData();
- gridData.horizontalAlignment = GridData.FILL;
- gridData.grabExcessHorizontalSpace = true;
- label.setLayoutData(gridData);
- }
-
- private Control getCheckboxControl(Composite parent) {
- if (table == null) {
-// parent.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- table = new Table(parent, SWT.BORDER | SWT.CHECK | SWT.SINGLE);
- GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
- gridData.horizontalSpan = 2;
- table.setLayoutData(gridData);
- table.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- updateButtons();
- }});
- tv = new CheckboxTableViewer(table);
- tv.setContentProvider(new IStructuredContentProvider() {
- public Object[] getElements(Object inputElement) {
- return (Object[])inputElement;
- }
- public void dispose() {}
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
- });
-
- tv.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent e) {
- }
- });
-
- }
- return table;
- }
-
- private Control getButtonControl(Composite parent) {
- if (buttoncomp == null) {
- buttoncomp = new Composite(parent, SWT.NONE);
- GridData d = new GridData(GridData.END);
- d.widthHint = 1;
- d.horizontalSpan = 1;
- buttoncomp.setLayoutData(d);
- buttoncomp.setFont(parent.getFont());
- initButtons(buttoncomp, new String[] {
- MOVEUP_STR, MOVEDOWN_STR, null,
- UIMessages.getString("ErrorParsTab.0"), //$NON-NLS-1$
- UIMessages.getString("ErrorParsTab.1") //$NON-NLS-1$
- });
- }
- return buttoncomp;
- }
-
- private void addSecondSection(Composite parent) {
- Composite composite = createDefaultComposite(parent);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- composite.setLayout(layout);
- GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
- composite.setLayoutData(data);
-
- getCheckboxControl(composite);
- getButtonControl(composite);
- }
-
- /**
- * @see PreferencePage#createContents(Composite)
- */
- protected Control createContents(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- composite.setLayout(layout);
- GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
- composite.setLayoutData(data);
-
- addFirstSection(composite);
- addSeparator(composite);
- addLabel(composite);
- addSecondSection(composite);
- String p = getPropertyString();
- updateCheckboxData(p != null);
- buttoncomp.setEnabled(p != null);
- table.setEnabled(p != null);
-
- return composite;
- }
-
- private Composite createDefaultComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
-
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- composite.setLayoutData(data);
-
- return composite;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
- */
- protected void performDefaults() {
- updateCheckboxData(projectSpecific.getSelection());
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#performOk()
- */
- public boolean performOk() {
- try {
- save();
- } catch (CoreException e) {
- return false;
- }
- return true;
- }
-
- /**
- * Ability to create standard button on any composite.
- * @param c
- * @param names
- */
- private void initButtons(Composite c, String[] names) {
- initButtons(c, names, 80);
- }
-
- private void initButtons(Composite c, String[] names, int width) {
- if (names == null || names.length == 0) return;
- c.setLayoutData(new GridData(GridData.FILL_VERTICAL));
- c.setLayout(new GridLayout(1, false));
- buttons = new Button[names.length];
- for (int i=0; i<names.length; i++) {
- buttons[i] = new Button(c, SWT.PUSH);
- buttons[i].setFont(c.getFont());
- GridData gdb = new GridData(GridData.VERTICAL_ALIGN_CENTER);
- gdb.grabExcessHorizontalSpace = false;
- gdb.horizontalAlignment = SWT.FILL;
- gdb.minimumWidth = width;
-
- if (names[i] != null)
- buttons[i].setText(names[i]);
- else { // no button, but placeholder !
- buttons[i].setVisible(false);
- buttons[i].setEnabled(false);
- gdb.heightHint = 10;
- }
-
- buttons[i].setLayoutData(gdb);
- buttons[i].addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent event) {
- buttonPressed(event);
- }});
- }
- }
-
- /**
- *
- * @param e - event to be handled
- */
- private void buttonPressed(SelectionEvent e) {
- for (int i=0; i<buttons.length; i++) {
- if (buttons[i].equals(e.widget)) {
- buttonPressed(i);
- return;
- }
- }
- }
-
- private void buttonPressed (int n) {
- switch (n) {
- case 0: // up
- moveItem(true);
- break;
- case 1: // down
- moveItem(false);
- break;
- case 2: // do nothing - it's not a button
- break;
-
- case 3: // check all
- tv.setAllChecked(true);
- break;
- case 4: // uncheck all
- tv.setAllChecked(false);
- break;
- default:
- break;
- }
- }
-
- // Move item up / down
- private void moveItem(boolean up) {
- int n = table.getSelectionIndex();
- if (n < 0 ||
- (up && n == 0) ||
- (!up && n+1 == table.getItemCount()))
- return;
- TableData d = (TableData)tv.getElementAt(n);
- boolean checked = tv.getChecked(d);
- tv.remove(d);
- n = up ? n - 1 : n + 1;
- tv.insert(d, n);
- tv.setChecked(d, checked);
- table.setSelection(n);
- }
- /**
- * Changes state of existing button.
- * Does nothing if index is invalid
- *
- * @param i - button index
- * @param state - required state
- */
- private void buttonSetEnabled(int i, boolean state) {
- if (buttons == null || buttons.length <= i ) return;
- buttons[i].setEnabled(state);
- }
-
- private void updateButtons() {
- int cnt = table.getItemCount();
- int pos = table.getSelectionIndex();
- buttonSetEnabled(0, pos > 0);
- buttonSetEnabled(1, pos != -1 && pos < (cnt - 1));
- buttonSetEnabled(3, cnt > 0);
- buttonSetEnabled(4, cnt > 0);
- }
-
- private class TableData {
- String key;
- String value;
- public TableData (String _key, String _value) {
- key = _key;
- value = _value;
- }
- @Override
- public String toString() { return value; }
- }
-
- private void getExtensions() {
- mapItems.clear();
- IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(
- LibHover.LIBHOVER_DOC_EXTENSION);
- if (point != null) {
- IExtension[] exts = point.getExtensions();
- for (IExtension ext : exts) {
- if (ext.getConfigurationElements().length > 0) {
- mapItems.put(ext.getUniqueIdentifier(), ext.getLabel());
- }
- }
- }
- }
-
- private void updateCheckboxData(boolean useProject) {
- // Combine user preference string with existing libhover extensions.
- getExtensions();
- HashMap<String,String> copyMap = (HashMap<String,String>)mapItems.clone();
- ArrayList<TableData> data = new ArrayList<TableData>();
- ArrayList<TableData> checkedData = new ArrayList<TableData>();
- // See what the user has set in preferences/properties and make sure that
- // any libhover referred to is a valid current extension.
- // Drop any preference for a non-existent extension.
- String prop = null;
- String pref = null;
- // User wants to use project settings. If they already exist, honor them.
- if (useProject)
- prop = getPropertyString();
- // If no property settings exist or the user has not asked for project
- // specific settings, then use the preferences as default.
- if (prop == null)
- pref = getPreferenceStore().getString(PreferenceConstants.P_LIBHOVER);
- else // otherwise use the property settings
- pref = prop;
- // The property string has the same format as the preference string which is
- // id1:boolean1:id2:boolean2:id3:boolean3 (where booleanx is checked or not)
- String[] tokens = pref.split(":");
- if (tokens.length > 1) {
- for (int i = 0; i < tokens.length; i+=2) {
- String id = tokens[i];
- Boolean checked = Boolean.valueOf(tokens[i+1]);
- String value = copyMap.get(id);
- if (value != null) {
- TableData d = new TableData(id, value);
- data.add(d);
- if (checked)
- checkedData.add(d);
- copyMap.remove(id);
- }
- }
- }
- // Add any remaining libhover extensions to end of list. If there is an
- // existing property string, we treat them as unchecked. If we are
- // defaulting to the preferences, then we treat them as checked.
- String[] leftovers = new String[copyMap.size()];
- leftovers = copyMap.keySet().toArray(leftovers);
- for (int i = 0; i < leftovers.length; ++i) {
- TableData d = new TableData(leftovers[i], copyMap.get(leftovers[i]));
- data.add(d);
- if (!useProject || prop == null)
- checkedData.add(d);
- }
- tv.setInput(data.toArray());
- tv.setCheckedElements(checkedData.toArray());
- updateButtons();
- }
-
- private void save() throws CoreException {
- // if we are not using project-specific property, then we
- // set it to be null
- if (!projectSpecific.getSelection())
- getProject().setPersistentProperty(libhoverProperty, null);
-
- // Otherwise form a string which has all of the libhovers in order
- // with their boolean checked value. Use ":" to separate all entries
- boolean inRange = true;
- int i = 0;
- String outString = new String();
- String del = "";
- while (inRange) {
- TableData t;
- Object obj = tv.getElementAt(i);
- if (obj == null)
- inRange = false;
- else {
- ++i;
- t = (TableData)obj;
- outString += del + t.key + ":" + tv.getChecked(obj);
- del = ":";
- }
- }
- // Save formatted string to project.
- if (outString.length() > 1)
- getProject().setPersistentProperty(libhoverProperty, outString);
- }
-} \ No newline at end of file
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover-feature/.project b/libhover/org.eclipse.linuxtools.cdt.libhover-feature/.project
deleted file mode 100644
index 4150d2047b..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.cdt.libhover.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/libhover/org.eclipse.linuxtools.cdt.libhover-feature/epl-v10.html b/libhover/org.eclipse.linuxtools.cdt.libhover-feature/epl-v10.html
deleted file mode 100644
index 9320c9f37c..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover-feature/epl-v10.html
+++ /dev/null
@@ -1,320 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
-<meta name="ProgId" content="Word.Document">
-<meta name="Generator" content="Microsoft Word 9">
-<meta name="Originator" content="Microsoft Word 9">
-<link rel="File-List" href="http://www.eclipse.org/legal/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head><body style="" lang="EN-US">
-
-<div class="Section1">
-
-<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style="font-size: 10pt;">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.</span> </p>
-
-<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
-
-<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear="left">
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
-changes to the Program, and</span></p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
-additions to the Program;</span></p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">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. </span></p>
-
-<p><span style="font-size: 10pt;">"Contributor" means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style="font-size: 10pt;">"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. </span></p>
-
-<p><span style="font-size: 10pt;">"Program" means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style="font-size: 10pt;">"Recipient" means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>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.</span></p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>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. </span></p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">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.</span></p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">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. </span></p>
-
-<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
-
-<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
-its license agreement:</span></p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">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; </span></p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">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.<span style="color: blue;"> </span></span></p>
-
-<p><span style="font-size: 10pt;">When the Program is made available in source
-code form:</span> </p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
-it must be made available under this Agreement; and </span></p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style="font-size: 10pt;">Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style="font-size: 10pt;">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. </span></p>
-
-<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style="font-size: 10pt;">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.</span> </p>
-
-<p><span style="font-size: 10pt;">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.</span> </p>
-
-<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
-
-<p><span style="font-size: 10pt;">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. </span></p>
-
-<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style="font-size: 10pt;">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.</span> </p>
-
-<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
-
-<p><span style="font-size: 10pt;">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.</span> </p>
-
-<p><span style="font-size: 10pt;">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. </span></p>
-
-<p><span style="font-size: 10pt;">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. </span></p>
-
-<p><span style="font-size: 10pt;">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.</span> </p>
-
-<p><span style="font-size: 10pt;">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.</span> </p>
-
-<p class="MsoNormal"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]--><o:p></o:p></p>
-
-</div>
-
-</body></html> \ No newline at end of file
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.glibc/.project b/libhover/org.eclipse.linuxtools.cdt.libhover.glibc/.project
deleted file mode 100644
index b2adfe68b5..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.glibc/.project
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.cdt.libhover.glibc</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <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>
- </natures>
-</projectDescription>
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.glibc/toc.xml b/libhover/org.eclipse.linuxtools.cdt.libhover.glibc/toc.xml
deleted file mode 100644
index 8ef4df17d7..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.glibc/toc.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-
-<toc label="glibc library" link_to="../org.eclipse.linuxtools.cdt.libhover.library_docs/toc.xml#moreclibdocs">
- <topic href="http://www.gnu.org/software/libc/manual/html_node/index.html" label="glibc">
- </topic>
-</toc>
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.library-docs/.project b/libhover/org.eclipse.linuxtools.cdt.libhover.library-docs/.project
deleted file mode 100644
index c02f456009..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.library-docs/.project
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.cdt.libhover.library-docs</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <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>
- </natures>
-</projectDescription>
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.library-docs/plugin.xml b/libhover/org.eclipse.linuxtools.cdt.libhover.library-docs/plugin.xml
deleted file mode 100644
index 08f7cebc17..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.library-docs/plugin.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
- <extension
- point="org.eclipse.help.toc">
- <toc
- file="toc.xml"
- primary="true"/>
- </extension>
-
-</plugin>
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.library-docs/toc.xml b/libhover/org.eclipse.linuxtools.cdt.libhover.library-docs/toc.xml
deleted file mode 100644
index de69a8aa73..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.library-docs/toc.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-
-<toc label="C/C++ Library Documentation">
- <anchor id="moreclibdocs"/>
-</toc>
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.libstdcxx/.project b/libhover/org.eclipse.linuxtools.cdt.libhover.libstdcxx/.project
deleted file mode 100644
index 134e131c9e..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.libstdcxx/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.cdt.libhover.libstdcxx</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.libstdcxx/.settings/org.eclipse.jdt.core.prefs b/libhover/org.eclipse.linuxtools.cdt.libhover.libstdcxx/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 15fdc96a8c..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.libstdcxx/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Jan 30 16:39:40 EST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.libstdcxx/META-INF/MANIFEST.MF b/libhover/org.eclipse.linuxtools.cdt.libhover.libstdcxx/META-INF/MANIFEST.MF
deleted file mode 100644
index 111bb39736..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.libstdcxx/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,12 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %bundleName
-Bundle-SymbolicName: org.eclipse.linuxtools.cdt.libhover.libstdcxx;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Vendor: %provider
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.linuxtools.cdt.libhover.library_docs;bundle-version="1.0.0",
- org.eclipse.linuxtools.cdt.libhover;bundle-version="1.0.1",
- org.eclipse.core.filesystem;bundle-version="1.2.0",
- org.eclipse.core.runtime;bundle-version="3.4.0"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.libstdcxx/plugin.xml b/libhover/org.eclipse.linuxtools.cdt.libhover.libstdcxx/plugin.xml
deleted file mode 100644
index f81634e197..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.libstdcxx/plugin.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension
- id="library"
- name="Libstdc++ Library"
- point="org.eclipse.linuxtools.cdt.libhover.library">
- <library
- docs="http://gcc.gnu.org/onlinedocs/libstdc++/manual/spine.html"
- location="http://www.sourceware.org/eclipse/libhover/libstdc++-v3.libhover"
- name="libstdc++ library"
- type="C++">
- </library>
- </extension>
- <extension
- point="org.eclipse.help.toc">
- <toc
- file="toc.xml"
- primary="false">
- </toc>
- </extension>
-
-</plugin>
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.libstdcxx/toc.xml b/libhover/org.eclipse.linuxtools.cdt.libhover.libstdcxx/toc.xml
deleted file mode 100644
index e034d33e3e..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.libstdcxx/toc.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-
-<toc label="libstdc++ library" link_to="../org.eclipse.linuxtools.cdt.libhover.library_docs/toc.xml#moreclibdocs">
- <topic href="http://gcc.gnu.org/onlinedocs/libstdc++/manual/spine.html" label="libstdc++">
- </topic>
-</toc>
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.newlib-feature/.project b/libhover/org.eclipse.linuxtools.cdt.libhover.newlib-feature/.project
deleted file mode 100644
index 9773d04c6b..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.newlib-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.cdt.libhover.newlib-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/libhover/org.eclipse.linuxtools.cdt.libhover.newlib-feature/epl-v10.html b/libhover/org.eclipse.linuxtools.cdt.libhover.newlib-feature/epl-v10.html
deleted file mode 100644
index 9320c9f37c..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.newlib-feature/epl-v10.html
+++ /dev/null
@@ -1,320 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
-<meta name="ProgId" content="Word.Document">
-<meta name="Generator" content="Microsoft Word 9">
-<meta name="Originator" content="Microsoft Word 9">
-<link rel="File-List" href="http://www.eclipse.org/legal/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head><body style="" lang="EN-US">
-
-<div class="Section1">
-
-<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style="font-size: 10pt;">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.</span> </p>
-
-<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
-
-<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear="left">
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
-changes to the Program, and</span></p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
-additions to the Program;</span></p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">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. </span></p>
-
-<p><span style="font-size: 10pt;">"Contributor" means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style="font-size: 10pt;">"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. </span></p>
-
-<p><span style="font-size: 10pt;">"Program" means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style="font-size: 10pt;">"Recipient" means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>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.</span></p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>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. </span></p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">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.</span></p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">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. </span></p>
-
-<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
-
-<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
-its license agreement:</span></p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">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; </span></p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">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.<span style="color: blue;"> </span></span></p>
-
-<p><span style="font-size: 10pt;">When the Program is made available in source
-code form:</span> </p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
-it must be made available under this Agreement; and </span></p>
-
-<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style="font-size: 10pt;">Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style="font-size: 10pt;">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. </span></p>
-
-<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style="font-size: 10pt;">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.</span> </p>
-
-<p><span style="font-size: 10pt;">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.</span> </p>
-
-<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
-
-<p><span style="font-size: 10pt;">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. </span></p>
-
-<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style="font-size: 10pt;">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.</span> </p>
-
-<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
-
-<p><span style="font-size: 10pt;">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.</span> </p>
-
-<p><span style="font-size: 10pt;">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. </span></p>
-
-<p><span style="font-size: 10pt;">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. </span></p>
-
-<p><span style="font-size: 10pt;">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.</span> </p>
-
-<p><span style="font-size: 10pt;">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.</span> </p>
-
-<p class="MsoNormal"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]--><o:p></o:p></p>
-
-</div>
-
-</body></html> \ No newline at end of file
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.newlib/.project b/libhover/org.eclipse.linuxtools.cdt.libhover.newlib/.project
deleted file mode 100644
index f3a0af0ef5..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.newlib/.project
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.cdt.libhover.newlib</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <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>
- </natures>
-</projectDescription>
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.newlib/META-INF/MANIFEST.MF b/libhover/org.eclipse.linuxtools.cdt.libhover.newlib/META-INF/MANIFEST.MF
deleted file mode 100644
index 69e8682fef..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.newlib/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,9 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %bundleName
-Bundle-SymbolicName: org.eclipse.linuxtools.cdt.libhover.newlib;singleton:=true
-Bundle-Version: 1.0.2.qualifier
-Bundle-Vendor: %provider
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.linuxtools.cdt.libhover.library_docs;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.newlib/build.properties b/libhover/org.eclipse.linuxtools.cdt.libhover.newlib/build.properties
deleted file mode 100644
index 2220fabe27..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.newlib/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-bin.includes = META-INF/,\
- plugin.xml,\
- toc.xml,\
- plugin.properties
-src.includes = about.html
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.newlib/plugin.xml b/libhover/org.eclipse.linuxtools.cdt.libhover.newlib/plugin.xml
deleted file mode 100644
index 3571976491..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.newlib/plugin.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension
- id="library"
- name="Newlib C Library"
- point="org.eclipse.linuxtools.cdt.libhover.library">
- <library
- docs="http://www.sourceware.org/newlib/libc.html"
- location="http://www.sourceware.org/eclipse/libhover/newlib-1.16.0.libhover"
- name="newlib library"
- type="C">
- </library>
- </extension>
- <extension
- point="org.eclipse.help.toc">
- <toc
- file="toc.xml"
- primary="false">
- </toc>
- </extension>
-
-</plugin>
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.newlib/toc.xml b/libhover/org.eclipse.linuxtools.cdt.libhover.newlib/toc.xml
deleted file mode 100644
index c73c418dab..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.newlib/toc.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-
-<toc label="newlib library" link_to="../org.eclipse.linuxtools.cdt.libhover.library_docs/toc.xml#moreclibdocs">
- <topic href="http://www.sourceware.org/newlib/libc.html" label="newlib libc">
- </topic>
- <topic href="http://www.sourceware.org/newlib/libm.html" label="newlib libm">
- </topic>
-</toc>
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover/.project b/libhover/org.eclipse.linuxtools.cdt.libhover/.project
deleted file mode 100644
index 5207979d38..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.cdt.libhover</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/libhover/org.eclipse.linuxtools.cdt.libhover/.settings/org.eclipse.jdt.core.prefs b/libhover/org.eclipse.linuxtools.cdt.libhover/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bbc86d093a..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Sep 19 14:24:23 EDT 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover/schema/org.eclipse.linuxtools.cdt.libhover.library.exsd b/libhover/org.eclipse.linuxtools.cdt.libhover/schema/org.eclipse.linuxtools.cdt.libhover.library.exsd
deleted file mode 100644
index 749ba37b99..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover/schema/org.eclipse.linuxtools.cdt.libhover.library.exsd
+++ /dev/null
@@ -1,216 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="library" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="library" id="org.eclipse.linuxtools.cdt.libhover.library" name="C/C++ Library Hover Specifier"/>
- </appinfo>
- <documentation>
- This extension allows specification of a library hover file to use when editing C or C++ files under the CDT.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="library" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- Unique simple id for this extension (e.g. library).
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- Name of this library to hover. This name will be shown in the preference and property dialogs.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="library">
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- Name of the library that the hover info is providing
- </documentation>
- </annotation>
- </attribute>
- <attribute name="location" type="string" use="required">
- <annotation>
- <documentation>
- Location of the binary file containing the serialized LibHoverInfo for the documentation: either an absolute file name or a URL
- </documentation>
- </annotation>
- </attribute>
- <attribute name="docs" type="string">
- <annotation>
- <documentation>
- URL of help documentation or empty.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="type" use="required">
- <annotation>
- <documentation>
- Type of library that help is for. One of C, C++, or ASM
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- <simpleType>
- <restriction base="string">
- <enumeration value="C">
- </enumeration>
- <enumeration value="C++">
- </enumeration>
- <enumeration value="ASM">
- </enumeration>
- </restriction>
- </simpleType>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- 1.0.0
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- &lt;extension
- point=&quot;org.eclipse.linuxtools.cdt.libhover.library&quot;&gt;
- &lt;library
- name=&quot;GTK&quot;
- location=&quot;http://mywebsite/libhover/xml/gtk.xml&quot;
- docs=&quot;http;//gtk.org/docs/gtk.html&quot;/&gt;
- &lt;/extension&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiinfo"/>
- </appinfo>
- <documentation>
- XML files referenced must adhere to the following xml structure:
-&lt;pre&gt;
-
-&lt;!DOCTYPE descriptions [
-
- &lt;!ELEMENT descriptions (construct)*&gt;
-
- &lt;!ELEMENT construct (structure|function)*&gt;
- &lt;!ATTLIST construct
- id ID #REQUIRED
- type CDATA #REQUIRED
- &gt;
-
- &lt;!ELEMENT structure (synopsis?, elements?)?&gt;
-
- &lt;!ELEMENT elements (element*)&gt;
-
- &lt;!ELEMENT element (synopsis*)&gt;
- &lt;!ATTLIST element
- content CDATA #REQUIRED
- &gt;
-
- &lt;!ELEMENT synopsis (#PCDATA)*&gt;
-
- &lt;!ELEMENT function (prototype,headers?,synopsis)&gt;
- &lt;!ATTLIST function
- returntype CDATA #REQUIRED
- &gt;
-
- &lt;!ELEMENT prototype (parameter+)?&gt;
-
- &lt;!ELEMENT parameter (#PCDATA)*&gt;
- &lt;!ATTLIST parameter
- content CDATA #REQUIRED
- &gt;
-
- &lt;!ELEMENT headers (header+)?&gt;
-
- &lt;!ELEMENT header (#PCDATA)*&gt;
- &lt;!ATTLIST header
- filename CDATA #REQUIRED
- &gt;
-
-]&gt;
-&lt;/pre&gt;
-Note that function names need to be prefixed by &quot;function-&quot;. For example:
-&lt;pre&gt;
-&lt;descriptions&gt;
- &lt;construct id=&quot;function-atexit&quot; type=&quot;function&quot;&gt;
- &lt;function returntype=&quot;int&quot;&gt;
- &lt;prototype&gt;
- &lt;parameter content=&quot;void (*function) (void)&quot;/&gt;
- &lt;/prototype&gt;
- &lt;headers&gt;
- &lt;header filename = &quot;stdlib.h&quot;/&gt;
- &lt;/headers&gt;
- &lt;synopsis&gt;
- The &amp;lt;CODE&amp;gt;atexit&amp;lt;/CODE&amp;gt; function registers the function &amp;lt;VAR&amp;gt;function&amp;lt;/VAR&amp;gt; to be
- called at normal program termination. The &amp;lt;VAR&amp;gt;function&amp;lt;/VAR&amp;gt; is called with
- no arguments.
- &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; The return value from &amp;lt;CODE&amp;gt;atexit&amp;lt;/CODE&amp;gt; is zero on success and nonzero if
- the function cannot be registered.
- &lt;/synopsis&gt;
- &lt;/function&gt;
- &lt;/construct&gt;
-&lt;/descriptions&gt;
-&lt;/pre&gt;
-
-Also note that the synopsis is output as html. To specify html tags, one needs to use &amp;amp;lt; and &amp;amp;gt; as delimeters in place of &quot;&amp;lt&quot; and &quot;&amp;gt&quot;. In the previous example, VAR tags are used for variable references, CODE tags for the function name, and br tags for forcing paragraph breaks. All of these make the hover look more interesting when displayed.
- </documentation>
- </annotation>
-
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- /*******************************************************************************
- * Copyright (c) 2008 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat Inc. - initial API and implementation
- *******************************************************************************/
- </documentation>
- </annotation>
-
-</schema>
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/ClassInfo.java b/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/ClassInfo.java
deleted file mode 100644
index fe826df00d..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/ClassInfo.java
+++ /dev/null
@@ -1,123 +0,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 Incorporated - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.cdt.libhover;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-
-public class ClassInfo implements Serializable {
- private static final long serialVersionUID = 1L;
- private String templateParms[] = new String[0];
- private boolean templateParmsFilled = false;
- private String className;
- private String id;
- private String include;
- private ArrayList<ClassInfo> baseClasses = new ArrayList<ClassInfo>();
- private HashMap<String, MemberInfo> members = new HashMap<String, MemberInfo>();
- private transient Document document;
- public transient Node classNode;
- private ArrayList<ClassInfo> children = null;
- public ClassInfo(String className, String id, Node classNode) {
- this.className = className;
- this.id = id;
- this.classNode = classNode;
- }
- public String getClassName() {
- return className;
- }
- public Node getClassNode() {
- if (classNode == null)
- classNode = document.getElementById(id);
- return classNode;
- }
- public void setDocument (Document d) {
- document = d;
- }
- public void setClassName(String newName) {
- className = newName;
- }
- public void addTemplate(ClassInfo child) {
- if (children == null)
- children = new ArrayList<ClassInfo>();
- children.add(child);
- }
- public boolean areTemplateParmsFilled() {
- return templateParmsFilled;
- }
-
- public String[] getTemplateParms() {
- return templateParms;
- }
-
- public void setTemplateParms(String[] templateParms) {
- templateParmsFilled = true;
- this.templateParms = templateParms;
- }
-
- public String getInclude() {
- return include;
- }
-
- public void setInclude(String include) {
- this.include = include;
- }
-
- public ArrayList<ClassInfo> getChildren() {
- return children;
- }
-
- public MemberInfo getMember(String name) {
- return members.get(name);
- }
-
- public void addMember(MemberInfo info) {
- String name = info.getName();
- MemberInfo member = members.get(name);
- if (member != null)
- member.addChild(info);
- else
- members.put(name, info);
- }
-
- public MemberInfo[] getMembers(String nameStart) {
- ArrayList<MemberInfo> matchList = new ArrayList<MemberInfo>();
- Collection<MemberInfo> values = members.values();
- for (Iterator<MemberInfo> i = values.iterator(); i.hasNext();) {
- MemberInfo k = i.next();
- if (k.getName().startsWith(nameStart)) {
- matchList.add(k);
- ArrayList<MemberInfo> children = k.getChildren();
- if (children != null) {
- for (Iterator<MemberInfo> j = children.iterator(); j.hasNext();) {
- MemberInfo child = (MemberInfo)i.next();
- matchList.add(child);
- }
- }
- }
- }
- MemberInfo[] matches = new MemberInfo[matchList.size()];
- return matchList.toArray(matches);
- }
-
- public ArrayList<ClassInfo> getBaseClasses() {
- return baseClasses;
- }
-
- public void addBaseClass(ClassInfo info) {
- baseClasses.add(info);
- }
-}
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/FunctionInfo.java b/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/FunctionInfo.java
deleted file mode 100644
index b9fef1bd7d..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/FunctionInfo.java
+++ /dev/null
@@ -1,134 +0,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 Incorporated - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.cdt.libhover;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-
-public class FunctionInfo implements Serializable {
- private static final long serialVersionUID = 1L;
- private String name;
- private String prototype;
- private String desc;
- private String returnType;
- private ArrayList<String> headers = new ArrayList<String>();
- private ArrayList<FunctionInfo> children = null;
-
- /**
- * Constructor for function.
- *
- * @param name
- */
- public FunctionInfo(String name) {
- this.name = name;
- }
-
- /**
- * Get function name.
- *
- * @return function name
- */
- public String getName() {
- return name;
- }
-
- /**
- * Get prototype for function.
- *
- * @return prototype string or null
- */
- public String getPrototype() {
- return prototype;
- }
-
- /**
- * Set prototype string.
- *
- * @param prototype
- */
- public void setPrototype(String prototype) {
- this.prototype = prototype;
- }
-
- /**
- * Get description for function.
- *
- * @return description string or null
- */
- public String getDescription() {
- return desc;
- }
-
- /**
- * Set description string for function.
- *
- * @param desc
- */
- public void setDescription(String desc) {
- this.desc = desc;
- }
-
- /**
- * Get return type for function.
- *
- * @return return type as string or null
- */
- public String getReturnType() {
- return returnType;
- }
-
- /**
- * Set return type for function.
- *
- * @param returnType
- */
- public void setReturnType(String returnType) {
- this.returnType = returnType;
- }
-
- /**
- * Get the headers that need including for this function.
- *
- * @return list of header strings
- */
- public ArrayList<String> getHeaders() {
- return headers;
- }
-
- /**
- * Add a header to the list of headers needed for this function.
- *
- * @param header the name of the header file to add
- */
- public void addHeader(String header) {
- headers.add(header);
- }
-
- /**
- * Add a function with the same name as a child of this function (C++-only).
- *
- * @param info a function with same name as this function.
- */
- public void addChild(FunctionInfo info) {
- if (children == null)
- children = new ArrayList<FunctionInfo>();
- children.add(info);
- }
-
- /**
- * Get the children functions with same name as this function.
- *
- * @return an ArrayList of functions with same name or null.
- */
- public ArrayList<FunctionInfo> getChildren() {
- return children;
- }
-}
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/HelpBook.java b/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/HelpBook.java
deleted file mode 100644
index efdb2dbc42..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/HelpBook.java
+++ /dev/null
@@ -1,37 +0,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 Incorporated - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.cdt.libhover;
-
-import org.eclipse.cdt.ui.ICHelpBook;
-
-public class HelpBook implements ICHelpBook {
-
- private String title;
- private int type;
-
- public HelpBook (String title, String typeName) {
- this.title = title;
- if (typeName.equals("C")) // $NON-NLS-1$
- type = HELP_TYPE_C;
- else if (typeName.equals("C++")) // $NON-NLS-1$
- type = HELP_TYPE_CPP;
- else
- type = HELP_TYPE_ASM;
- }
- public String getTitle () {
- return title;
- }
-
- public int getCHelpType () {
- return type;
- }
-
-}
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHoverInfo.java b/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHoverInfo.java
deleted file mode 100644
index 09536d302a..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHoverInfo.java
+++ /dev/null
@@ -1,24 +0,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 Incorporated - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.cdt.libhover;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.TreeMap;
-
-public class LibHoverInfo implements Serializable {
-
- private static final long serialVersionUID = 1L;
- public HashMap<String, ClassInfo> classes = new HashMap<String, ClassInfo>();
- public HashMap<String, TypedefInfo> typedefs = new HashMap<String, TypedefInfo>();
- public TreeMap<String, FunctionInfo> functions = new TreeMap<String, FunctionInfo>();
-
-}
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/TypedefInfo.java b/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/TypedefInfo.java
deleted file mode 100644
index d861558e94..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/TypedefInfo.java
+++ /dev/null
@@ -1,118 +0,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 Incorporated - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.cdt.libhover;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-
-public class TypedefInfo implements Serializable {
- private static final long serialVersionUID = 1L;
- private String[] templates = new String[0];
- private String typedefName;
- private String transformedType;
- private ArrayList<TypedefInfo> children = null;
- public TypedefInfo(String typedefName, String transformedType) {
- this.typedefName = typedefName;
- this.transformedType = transformedType;
- }
- public String getTypedefName() {
- return typedefName;
- }
- public void setTypedefName(String name) {
- typedefName = name;
- }
-
- private String[] getTemplateArgs(String str) {
- ArrayList<String> list = new ArrayList<String>();
- int index = 0;
- int lastIndex = 0;
- int templateCounter = 0;
- while (index < str.length()) {
- char ch = str.charAt(index);
- if (ch == '<') {
- if (templateCounter == 0)
- lastIndex = index + 1;
- templateCounter++;
- } else if (ch == '>') {
- templateCounter--;
- } else if (ch == ',' && templateCounter == 1) {
- // FIXME: do we have to strip out all blanks here?
- list.add(str.substring(lastIndex, index).trim());
- lastIndex = index + 1;
- }
- ++index;
- }
- String[] args = new String[list.size()];
- return list.toArray(args);
- }
-
- public String getTransformedType(String className) {
- int index = className.indexOf('<');
- if (index > 0) {
- TypedefInfo e = this;
- // Search the children list in case the given class name
- // matches a specific template case.
- ArrayList<TypedefInfo> children = getChildren();
- for (int x = 0; x < children.size(); ++x) {
- TypedefInfo child = children.get(x);
- if (className.matches(child.getTypedefName())) {
- e = child;
- break;
- }
- }
- String[] templates = e.getTemplates();
- String transformedName = e.transformedType;
- // Check if there are any template arguments to replace. If not,
- // we can just return the transformed type we have.
- if (templates.length <= 0)
- return transformedName;
- String[] args = getTemplateArgs(className);
- String[] templateArgs = getTemplateArgs(e.getTypedefName());
- int j = 0;
- // For every argument that doesn't match up, it must be a template
- // parameter so we'll replace the template parameter name with the
- // supplied parameter. We have to query the template parameter list
- // for the names to replace because for partial specific templates
- // those names will have been replaced with regex sequences designed to
- // help us identify when the specific template has matched. For example,
- // <char, _Tp> will be stored as <char,[a-zA-Z0-9_]*> and if we have
- // <char,char> we will replace _Tp with char in the transformed type.
- for (int i = 0; i < args.length; ++i) {
- if (!args[i].equals(templateArgs[i])) {
- transformedName.replaceAll(templates[j], args[i]);
- ++j;
- }
- }
- return transformedName;
- } else {
- // There is no template specified.
- return transformedType;
- }
- }
-
- public void addTypedef(TypedefInfo typedef) {
- if (children == null)
- children = new ArrayList<TypedefInfo>();
- children.add(typedef);
- }
- public ArrayList<TypedefInfo> getChildren() {
- return children;
- }
- public void copyTemplates(String[] newTemplates) {
- templates = new String[newTemplates.length];
- for (int i = 0; i < templates.length; ++i)
- templates[i] = newTemplates[i];
- }
- public String[] getTemplates() {
- return templates;
- }
-}
-
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/utils/BuildFunctionInfos.java b/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/utils/BuildFunctionInfos.java
deleted file mode 100644
index e0daac3512..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/cdt/libhover/utils/BuildFunctionInfos.java
+++ /dev/null
@@ -1,213 +0,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 Incorporated - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.cdt.libhover.utils;
-
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectOutputStream;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.eclipse.core.filesystem.URIUtil;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.linuxtools.cdt.libhover.LibHoverInfo;
-import org.eclipse.linuxtools.cdt.libhover.FunctionInfo;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-
-public class BuildFunctionInfos {
-
- private Document document;
- private LibHoverInfo hoverInfo = new LibHoverInfo();
-
- public BuildFunctionInfos(Document document) {
- this.document = document;
- }
-
- public Document getDocument() {
- return document;
- }
-
- protected FunctionInfo getFunctionInfoFromNode(String name, Node function_node, Document document) {
- FunctionInfo f = new FunctionInfo(name);
- NamedNodeMap function_node_map = function_node.getAttributes();
- Node function_node_returntype_node = function_node_map.item(0);
- String function_node_rt_name = function_node_returntype_node.getNodeName();
-
- if (function_node_rt_name.equals("returntype")) { // $NON-NLS-1$
-
- // return type
-
- String function_node_rt_value = function_node_returntype_node.getNodeValue();
- f.setReturnType(function_node_rt_value);
- } // returntype
-
- NodeList function_node_kids = function_node.getChildNodes();
- for (int fnk = 0; fnk < function_node_kids.getLength(); fnk++) {
- Node function_node_kid = function_node_kids.item(fnk);
- String function_node_kid_name = function_node_kid.getNodeName();
- if (function_node_kid_name.equals("prototype")) { // $NON-NLS-1$
-
- // prototype
-
- String prototype = null;
-
- NodeList function_node_parms = function_node_kid.getChildNodes();
- for (int fnp = 0; fnp < function_node_parms.getLength(); fnp++) {
- Node function_node_parm = function_node_parms.item(fnp);
- String function_node_parm_name = function_node_parm.getNodeName();
- if (function_node_parm_name.equals("parameter")) { // $NON-NLS-1$
- NamedNodeMap function_node_parm_map = function_node_parm.getAttributes();
- Node function_node_parm_node = function_node_parm_map.item(0);
- String parameter = function_node_parm_node.getNodeValue();
- prototype = (null == prototype)
- ? parameter
- : prototype + ", " + parameter;
- }
- }
- f.setPrototype(prototype);
- } // prototype
-
- else if (function_node_kid_name.equals("headers")) { // $NON-NLS-1$
-
- // headers
-
- NodeList function_node_headers = function_node_kid.getChildNodes();
- for (int fnh = 0; fnh < function_node_headers.getLength(); fnh++) {
- Node function_node_header = function_node_headers.item(fnh);
- String function_node_header_name = function_node_header.getNodeName();
- if (function_node_header_name.equals("header")) { // $NON-NLS-1$
- NamedNodeMap function_node_header_map = function_node_header.getAttributes();
- Node function_node_header_node = function_node_header_map.item(0);
- f.addHeader(function_node_header_node.getNodeValue());
- }
- }
- } // headers
-
-
- else if (function_node_kid_name.equals("groupsynopsis")) { // $NON-NLS-1$
-
- // group synopsis
-
- NamedNodeMap attr = function_node_kid.getAttributes();
- Node idnode = attr.getNamedItem("id"); // $NON-NLS-1$
- String id = idnode.getNodeValue();
- if (id != null) {
- Element elem2 = document.getElementById(id);
- if (null != elem2) {
- NodeList synopsisNode = elem2.getElementsByTagName("synopsis"); // $NON-NLS-1$
- if (null != synopsisNode && synopsisNode.getLength() > 0) {
- Node synopsis = synopsisNode.item(0);
- Node textNode = synopsis.getLastChild();
- f.setDescription(textNode.getNodeValue());
- }
- }
- }
- }
-
- else if (function_node_kid_name.equals("synopsis")) { // $NON-NLS-1$
-
- // synopsis
-
- Node textNode = function_node_kid.getLastChild();
- f.setDescription(textNode.getNodeValue());
- }
- }
- return f;
- }
-
- public void buildCPPInfo(String fileName) {
- Document document = getDocument();
- NodeList nl = document.getElementsByTagName("construct"); // $NON-NLS-1$
- for (int i = 0; i < nl.getLength(); ++i) {
- Node n = nl.item(i);
- NamedNodeMap m = n.getAttributes();
- Node id = m.getNamedItem("id"); // $NON-NLS-1$
- if (id != null && id.getNodeValue().startsWith("function-")) { // $NON-NLS-1$
- String name = id.getNodeValue().substring(9);
- NodeList nl2 = n.getChildNodes();
- for (int j = 0; j < nl2.getLength(); ++j) {
- Node n2 = nl2.item(j);
- if (n2.getNodeName().equals("function")) { // $NON-NLS-1$
- FunctionInfo f = getFunctionInfoFromNode(name, n2, document);
- hoverInfo.functions.put(name, f);
- }
- }
- }
- }
- try {
- // Now, output the LibHoverInfo for caching later
- FileOutputStream f = new FileOutputStream(fileName);
- ObjectOutputStream out = new ObjectOutputStream(f);
- out.writeObject(hoverInfo);
- out.close();
- } catch(Exception e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @param args[0] - URL or file name of xml document to parse
- * args[1] - file name to place resultant serialized LibHoverInfo
- */
- public static void main(String[] args) {
- URI acDoc;
- try {
- acDoc = new URI(args[0]);
- IPath p = URIUtil.toPath(acDoc);
- InputStream docStream = null;
- if (p == null) {
- URL url = acDoc.toURL();
- docStream = url.openStream();
- } else {
- docStream = new FileInputStream(p.toFile());
- }
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- factory.setValidating(false);
- DocumentBuilder builder = factory.newDocumentBuilder();
- Document doc = builder.parse(docStream);
- if (doc != null) {
- BuildFunctionInfos d = new BuildFunctionInfos(doc);
- d.buildCPPInfo(args[1]);
- }
- System.out.println("Built " + args[1] + " from " + args[0]);
- } catch (URISyntaxException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (FileNotFoundException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (ParserConfigurationException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (SAXException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- }
-
-}
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHoverMessages.java b/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHoverMessages.java
deleted file mode 100644
index 8a4724727b..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHoverMessages.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2006, 2007 QNX Software Systems 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:
- * QNX Software Systems - Initial API and implementation
- * Red Hat Inc. - Modification to use with LibHover
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.cdt.libhover;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * MakefilePreferencesMessages
- */
-public class LibHoverMessages {
-
- /**
- *
- */
- private LibHoverMessages() {
- }
-
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.cdt.libhover.LibHoverMessages"; //$NON-NLS-1$
-
- public static String getString(String key) {
- try {
- return ResourceBundle.getBundle(BUNDLE_NAME).getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- } catch (NullPointerException e) {
- return '#' + key + '#';
- }
- }
-
-}
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHoverMessages.properties b/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHoverMessages.properties
deleted file mode 100644
index c187c96126..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHoverMessages.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-#################################################################################
-# Copyright (c) 2007 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
-#################################################################################
-LibcHelpResource.label=C Library Help
-LibcHelpBook.title=C Library Functions
-FileListControl.moveup=Move Up
-FileListControl.movedown=Move Down
-LibhoverPreferences.title=C/C++ Library Hover Enablement
-Libhover.projectSpecific.msg=Use project specific settings \ No newline at end of file
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/preferences/CheckboxFieldEditor.java b/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/preferences/CheckboxFieldEditor.java
deleted file mode 100644
index 546b4f5f90..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/preferences/CheckboxFieldEditor.java
+++ /dev/null
@@ -1,394 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.linuxtools.internal.cdt.libhover.preferences;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-
-import org.eclipse.cdt.ui.newui.UIMessages;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.preference.FieldEditor;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.linuxtools.internal.cdt.libhover.LibHoverMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Table;
-
-public class CheckboxFieldEditor extends FieldEditor {
-
- private String extensionID;
- private String preferenceName;
- private HashMap<String, String> mapItems = new HashMap<String, String>();
- private Table table;
- private CheckboxTableViewer tv;
- private Button[] buttons;
- private Composite usercomp; // space where user can create widgets
- private Composite buttoncomp; // space for buttons on the right
-
-
- public static final String EMPTY_STR = ""; //$NON-NLS-1$
- public static final String MOVEUP_STR = LibHoverMessages.getString("FileListControl.moveup"); //$NON-NLS-1$
- public static final String MOVEDOWN_STR = LibHoverMessages.getString("FileListControl.movedown"); //$NON-NLS-1$
-
- public CheckboxFieldEditor(String extensionID, String preferenceName, String label, Composite parent) {
- this.extensionID = extensionID;
- this.preferenceName = preferenceName;
- init(preferenceName, label);
- createControl(parent);
- }
-
-
- @Override
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditor#adjustForNumColumns(int)
- */
- protected void adjustForNumColumns(int numColumns) {
- if (numColumns > 1) {
- Control control = getLabelControl();
- if (control != null) {
- ((GridData)control.getLayoutData()).horizontalSpan = numColumns;
- }
- ((GridData)table.getLayoutData()).horizontalSpan = numColumns - 1;
- ((GridData)buttoncomp.getLayoutData()).horizontalSpan = 1;
- } else {
- Control control = getLabelControl();
- if (control != null) {
- ((GridData)control.getLayoutData()).horizontalSpan = 1;
- }
- ((GridData)usercomp.getLayoutData()).horizontalSpan = 1;
- ((GridData)buttoncomp.getLayoutData()).horizontalSpan = 1;
- }
- }
-
-
- @Override
- // TODO Auto-generated method stub
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditor#doFillIntoGrid(org.eclipse.swt.widgets.Composite, int)
- */
- protected void doFillIntoGrid(Composite parent, int numColumns) {
- int checkC = 1;
- if (numColumns > 1) {
- checkC = numColumns - 1;
- }
- Control control = getLabelControl(parent);
- GridData gd = new GridData();
- gd.horizontalSpan = numColumns;
- control.setLayoutData(gd);
- control = getCheckboxControl(parent);
- gd = new GridData();
- gd.horizontalSpan = checkC;
- gd.horizontalAlignment = GridData.FILL;
- gd.verticalAlignment = GridData.FILL;
- gd.grabExcessHorizontalSpace = true;
- gd.grabExcessVerticalSpace = true;
- control.setLayoutData(gd);
- control.setFont(parent.getFont());
- control = getButtonControl(parent);
- gd = new GridData();
- gd.horizontalSpan = 1;
- gd.horizontalAlignment = GridData.FILL;
- control.setLayoutData(gd);
- control.setFont(parent.getFont());
- }
-
- private void getExtensions() {
- mapItems.clear();
- IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(
- extensionID);
- if (point != null) {
- IExtension[] exts = point.getExtensions();
- for (IExtension ext : exts) {
- if (ext.getConfigurationElements().length > 0) {
- mapItems.put(ext.getUniqueIdentifier(), ext.getLabel());
- }
- }
- }
- }
-
- @SuppressWarnings("unchecked")
- @Override
- protected void doLoad() {
- // Combine user preference string with existing libhover extensions.
- getExtensions();
- HashMap<String,String> copyMap = (HashMap<String,String>)mapItems.clone();
- ArrayList<TableData> data = new ArrayList<TableData>();
- ArrayList<TableData> checkedData = new ArrayList<TableData>();
- // See what the user has set in preferences and make sure that
- // any libhover referred to is a valid current extension.
- // Drop any preference for a non-existent extension.
- String pref = getPreferenceStore().getString(preferenceName);
- String[] tokens = pref.split(":");
- if (tokens.length > 1) {
- for (int i = 0; i < tokens.length; i+=2) {
- String id = tokens[i];
- Boolean checked = Boolean.valueOf(tokens[i+1]);
- String value = copyMap.get(id);
- if (value != null) {
- TableData d = new TableData(id, value);
- data.add(d);
- if (checked)
- checkedData.add(d);
- copyMap.remove(id);
- }
- }
- }
- // Add remaining libhover extensions to end of list as checked by default
- String[] leftovers = new String[copyMap.size()];
- leftovers = copyMap.keySet().toArray(leftovers);
- for (int i = 0; i < leftovers.length; ++i) {
- TableData d = new TableData(leftovers[i], copyMap.get(leftovers[i]));
- data.add(d);
- checkedData.add(d);
- }
- tv.setInput(data.toArray());
- tv.setCheckedElements(checkedData.toArray());
- updateButtons();
- }
-
- @SuppressWarnings("unchecked")
- @Override
- protected void doLoadDefault() {
- // Default is to find all current extensions and turn them on by default.
- getExtensions();
- HashMap<String,String> copyMap = (HashMap<String,String>)mapItems.clone();
- ArrayList<TableData> data = new ArrayList<TableData>();
- ArrayList<TableData> checkedData = new ArrayList<TableData>();
- String[] ids = new String[copyMap.size()];
- ids = copyMap.keySet().toArray(ids);
- for (int i = 0; i < ids.length; ++i) {
- TableData d = new TableData(ids[i], copyMap.get(ids[i]));
- data.add(d);
- checkedData.add(d);
- }
- tv.setInput(data.toArray());
- tv.setCheckedElements(checkedData.toArray());
- updateButtons();
- }
-
- @Override
- protected void doStore() {
- save();
- }
-
- @Override
- public int getNumberOfControls() {
- return 3;
- }
-
- public Control getButtonControl(Composite parent) {
- if (buttoncomp == null) {
- buttoncomp = new Composite(parent, SWT.NONE);
- GridData d = new GridData(GridData.END);
- d.widthHint = 1;
- buttoncomp.setLayoutData(d);
- buttoncomp.setFont(parent.getFont());
- initButtons(buttoncomp, new String[] {
- MOVEUP_STR, MOVEDOWN_STR, null,
- UIMessages.getString("ErrorParsTab.0"), //$NON-NLS-1$
- UIMessages.getString("ErrorParsTab.1") //$NON-NLS-1$
- });
- }
- return buttoncomp;
- }
-
- public Control getCheckboxControl(Composite parent) {
- if (table == null) {
-// parent.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- table = new Table(parent, SWT.BORDER | SWT.CHECK | SWT.SINGLE);
- table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- table.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- updateButtons();
- }});
- tv = new CheckboxTableViewer(table);
- tv.setContentProvider(new IStructuredContentProvider() {
- public Object[] getElements(Object inputElement) {
- return (Object[])inputElement;
- }
- public void dispose() {}
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
- });
-
- tv.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent e) {
- }
- });
-
- }
- return table;
- }
- /**
- * Ability to create standard button on any composite.
- * @param c
- * @param names
- */
- protected void initButtons(Composite c, String[] names) {
- initButtons(c, names, 80);
- }
- protected void initButtons(Composite c, String[] names, int width) {
- if (names == null || names.length == 0) return;
- c.setLayoutData(new GridData(GridData.FILL_VERTICAL));
- c.setLayout(new GridLayout(1, false));
- buttons = new Button[names.length];
- for (int i=0; i<names.length; i++) {
- buttons[i] = new Button(c, SWT.PUSH);
- buttons[i].setFont(c.getFont());
- GridData gdb = new GridData(GridData.VERTICAL_ALIGN_CENTER);
- gdb.grabExcessHorizontalSpace = false;
- gdb.horizontalAlignment = SWT.FILL;
- gdb.minimumWidth = width;
-
- if (names[i] != null)
- buttons[i].setText(names[i]);
- else { // no button, but placeholder !
- buttons[i].setVisible(false);
- buttons[i].setEnabled(false);
- gdb.heightHint = 10;
- }
-
- buttons[i].setLayoutData(gdb);
- buttons[i].addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent event) {
- buttonPressed(event);
- }});
- }
- }
-
- /**
- *
- * @param e - event to be handled
- */
- private void buttonPressed(SelectionEvent e) {
- for (int i=0; i<buttons.length; i++) {
- if (buttons[i].equals(e.widget)) {
- buttonPressed(i);
- return;
- }
- }
- }
-
- public void buttonPressed (int n) {
- switch (n) {
- case 0: // up
- moveItem(true);
- break;
- case 1: // down
- moveItem(false);
- break;
- case 2: // do nothing - it's not a button
- break;
-
- case 3: // check all
- tv.setAllChecked(true);
- break;
- case 4: // uncheck all
- tv.setAllChecked(false);
- break;
- default:
- break;
- }
- }
-
- // Move item up / down
- private void moveItem(boolean up) {
- int n = table.getSelectionIndex();
- if (n < 0 ||
- (up && n == 0) ||
- (!up && n+1 == table.getItemCount()))
- return;
- TableData d = (TableData)tv.getElementAt(n);
- boolean checked = tv.getChecked(d);
- tv.remove(d);
- n = up ? n - 1 : n + 1;
- tv.insert(d, n);
- tv.setChecked(d, checked);
- table.setSelection(n);
- }
- /**
- * Changes state of existing button.
- * Does nothing if index is invalid
- *
- * @param i - button index
- * @param state - required state
- */
- protected void buttonSetEnabled(int i, boolean state) {
- if (buttons == null || buttons.length <= i ) return;
- buttons[i].setEnabled(state);
- }
-
- public void updateButtons() {
- int cnt = table.getItemCount();
- int pos = table.getSelectionIndex();
- buttonSetEnabled(0, pos > 0);
- buttonSetEnabled(1, pos != -1 && pos < (cnt - 1));
- buttonSetEnabled(3, cnt > 0);
- buttonSetEnabled(4, cnt > 0);
- }
-
- class TableData {
- String key;
- String value;
- public TableData (String _key, String _value) {
- key = _key;
- value = _value;
- }
- @Override
- public String toString() { return value; }
- }
-
- private void save() {
- boolean inRange = true;
- int i = 0;
- String outString = new String();
- String del = "";
- while (inRange) {
- TableData t;
- Object obj = tv.getElementAt(i);
- if (obj == null)
- inRange = false;
- else {
- ++i;
- t = (TableData)obj;
- outString += del + t.key + ":" + tv.getChecked(obj);
- del = ":";
- }
- }
- if (outString.length() > 1)
- getPreferenceStore().setValue(preferenceName, outString);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.preference.FieldEditor#setEnabled(boolean,
- * org.eclipse.swt.widgets.Composite)
- */
- public void setEnabled(boolean enabled, Composite parent) {
- super.setEnabled(enabled, parent);
- getCheckboxControl(parent).setEnabled(enabled);
- getButtonControl(parent).setEnabled(enabled);
- }
-}
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/preferences/LibHoverPreferencePage.java b/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/preferences/LibHoverPreferencePage.java
deleted file mode 100644
index c86aff4faf..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/preferences/LibHoverPreferencePage.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.linuxtools.internal.cdt.libhover.preferences;
-
-import org.eclipse.jface.preference.*;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.linuxtools.cdt.libhover.LibhoverPlugin;
-import org.eclipse.linuxtools.internal.cdt.libhover.LibHover;
-import org.eclipse.linuxtools.internal.cdt.libhover.LibHoverMessages;
-
-/**
- * This class represents a preference page that
- * is contributed to the Preferences dialog. By
- * subclassing <samp>FieldEditorPreferencePage</samp>, we
- * can use the field support built into JFace that allows
- * us to create a page that is small and knows how to
- * save, restore and apply itself.
- * <p>
- * This page is used to modify preferences only. They
- * are stored in the preference store that belongs to
- * the main plug-in class. That way, preferences can
- * be accessed directly via the preference store.
- */
-
-public class LibHoverPreferencePage
- extends FieldEditorPreferencePage
- implements IWorkbenchPreferencePage {
-
- public LibHoverPreferencePage() {
- super(GRID);
- setPreferenceStore(LibhoverPlugin.getDefault().getPreferenceStore());
- }
-
- /**
- * Creates the field editors. Field editors are abstractions of
- * the common GUI blocks needed to manipulate various types
- * of preferences. Each field editor knows how to save and
- * restore itself.
- */
- public void createFieldEditors() {
- addField(new CheckboxFieldEditor(LibHover.LIBHOVER_DOC_EXTENSION,
- PreferenceConstants.P_LIBHOVER,
- LibHoverMessages.getString("LibhoverPreferences.title"),
- getFieldEditorParent()));
-// addField(new DirectoryFieldEditor(PreferenceConstants.P_PATH,
-// "&Directory preference:", getFieldEditorParent()));
-// addField(
-// new BooleanFieldEditor(
-// PreferenceConstants.P_BOOLEAN,
-// "&An example of a boolean preference",
-// getFieldEditorParent()));
-//
-// addField(new RadioGroupFieldEditor(
-// PreferenceConstants.P_CHOICE,
-// "An example of a multiple-choice preference",
-// 1,
-// new String[][] { { "&Choice 1", "choice1" }, {
-// "C&hoice 2", "choice2" }
-// }, getFieldEditorParent()));
-// addField(
-// new StringFieldEditor(PreferenceConstants.P_STRING, "A &text preference:", getFieldEditorParent()));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- */
- public void init(IWorkbench workbench) {
- }
-
-} \ No newline at end of file
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/preferences/PreferenceConstants.java b/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/preferences/PreferenceConstants.java
deleted file mode 100644
index 709d6ca657..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/preferences/PreferenceConstants.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.linuxtools.internal.cdt.libhover.preferences;
-
-/**
- * Constant definitions for plug-in preferences
- */
-public class PreferenceConstants {
-
- public static String P_LIBHOVER = "libhoverPreference"; //$NON-NLS-1$
-
-}
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/preferences/PreferenceInitializer.java b/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/preferences/PreferenceInitializer.java
deleted file mode 100644
index 4fd11a6c40..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/preferences/PreferenceInitializer.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.linuxtools.internal.cdt.libhover.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-
-import org.eclipse.linuxtools.cdt.libhover.LibhoverPlugin;
-
-/**
- * Class used to initialize default preference values.
- */
-public class PreferenceInitializer extends AbstractPreferenceInitializer {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- public void initializeDefaultPreferences() {
- IPreferenceStore store = LibhoverPlugin.getDefault().getPreferenceStore();
- store.setDefault(PreferenceConstants.P_LIBHOVER, "");
-// store.setDefault(PreferenceConstants.P_BOOLEAN, true);
-// store.setDefault(PreferenceConstants.P_CHOICE, "choice2");
-// store.setDefault(PreferenceConstants.P_STRING,
-// "Default value");
- }
-
-}
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/properties/LibHoverPropertyPage.java b/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/properties/LibHoverPropertyPage.java
deleted file mode 100644
index aca9cf05d4..0000000000
--- a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/properties/LibHoverPropertyPage.java
+++ /dev/null
@@ -1,465 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.linuxtools.internal.cdt.libhover.properties;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-
-import org.eclipse.cdt.ui.newui.UIMessages;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.linuxtools.cdt.libhover.LibhoverPlugin;
-import org.eclipse.linuxtools.internal.cdt.libhover.LibHover;
-import org.eclipse.linuxtools.internal.cdt.libhover.LibHoverMessages;
-import org.eclipse.linuxtools.internal.cdt.libhover.preferences.PreferenceConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-public class LibHoverPropertyPage extends PropertyPage {
-
- private static final String PROJECT_SPECIFIC_MSG = "Libhover.projectSpecific.msg"; //$NON-NLS-1$
- private static final String LIBHOVER_PROPERTY = "LIBHOVER"; //$NON-NLS-1$
-
- private QualifiedName libhoverProperty = new QualifiedName(LibhoverPlugin.getID(), LIBHOVER_PROPERTY);
-
- private Button projectSpecific;
-
- private HashMap<String, String> mapItems = new HashMap<String, String>();
-
- private Table table;
- private CheckboxTableViewer tv;
- private Button[] buttons;
- private Composite buttoncomp; // space for buttons on the right
-
- public static final String EMPTY_STR = ""; //$NON-NLS-1$
- public static final String MOVEUP_STR = LibHoverMessages.getString("FileListControl.moveup"); //$NON-NLS-1$
- public static final String MOVEDOWN_STR = LibHoverMessages.getString("FileListControl.movedown"); //$NON-NLS-1$
-
- /**
- * Constructor for LibhoverPropertyPage.
- */
- public LibHoverPropertyPage() {
- super();
- setPreferenceStore(LibhoverPlugin.getDefault().getPreferenceStore());
- }
-
- private IProject getProject() {
- IResource r = (IResource)getElement().getAdapter(IResource.class);
- return r.getProject();
- }
-
- private String getPropertyString() {
- String p;
- try {
- p = getProject().getPersistentProperty(libhoverProperty);
- } catch (CoreException c) {
- p = null;
- }
- return p;
- }
-
- private void addFirstSection(Composite parent) {
- Composite composite = createDefaultComposite(parent);
-
- projectSpecific = new Button(composite, SWT.CHECK);
- projectSpecific.setText(LibHoverMessages.getString(PROJECT_SPECIFIC_MSG));
- String p = getPropertyString();
- projectSpecific.setSelection(p != null);
- projectSpecific.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent event) {
- projectSpecificPressed(event);
- }});
- }
-
- private void projectSpecificPressed(SelectionEvent event) {
- if (projectSpecific.getSelection()) {
- buttoncomp.setEnabled(true);
- table.setEnabled(true);
- updateCheckboxData(true);
- } else {
- buttoncomp.setEnabled(false);
- table.setEnabled(false);
- updateCheckboxData(false);
- }
- }
-
- private void addSeparator(Composite parent) {
- Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
- GridData gridData = new GridData();
- gridData.horizontalAlignment = GridData.FILL;
- gridData.grabExcessHorizontalSpace = true;
- separator.setLayoutData(gridData);
- }
-
- private void addLabel(Composite parent) {
- Label label = new Label(parent, SWT.HORIZONTAL);
- label.setText(LibHoverMessages.getString("LibhoverPreferences.title")); //$NON-NLS-1$
- GridData gridData = new GridData();
- gridData.horizontalAlignment = GridData.FILL;
- gridData.grabExcessHorizontalSpace = true;
- label.setLayoutData(gridData);
- }
-
- private Control getCheckboxControl(Composite parent) {
- if (table == null) {
-// parent.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- table = new Table(parent, SWT.BORDER | SWT.CHECK | SWT.SINGLE);
- GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
- gridData.horizontalSpan = 2;
- table.setLayoutData(gridData);
- table.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- updateButtons();
- }});
- tv = new CheckboxTableViewer(table);
- tv.setContentProvider(new IStructuredContentProvider() {
- public Object[] getElements(Object inputElement) {
- return (Object[])inputElement;
- }
- public void dispose() {}
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
- });
-
- tv.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent e) {
- }
- });
-
- }
- return table;
- }
-
- private Control getButtonControl(Composite parent) {
- if (buttoncomp == null) {
- buttoncomp = new Composite(parent, SWT.NONE);
- GridData d = new GridData(GridData.END);
- d.widthHint = 1;
- d.horizontalSpan = 1;
- buttoncomp.setLayoutData(d);
- buttoncomp.setFont(parent.getFont());
- initButtons(buttoncomp, new String[] {
- MOVEUP_STR, MOVEDOWN_STR, null,
- UIMessages.getString("ErrorParsTab.0"), //$NON-NLS-1$
- UIMessages.getString("ErrorParsTab.1") //$NON-NLS-1$
- });
- }
- return buttoncomp;
- }
-
- private void addSecondSection(Composite parent) {
- Composite composite = createDefaultComposite(parent);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- composite.setLayout(layout);
- GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
- composite.setLayoutData(data);
-
- getCheckboxControl(composite);
- getButtonControl(composite);
- }
-
- /**
- * @see PreferencePage#createContents(Composite)
- */
- protected Control createContents(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- composite.setLayout(layout);
- GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
- composite.setLayoutData(data);
-
- addFirstSection(composite);
- addSeparator(composite);
- addLabel(composite);
- addSecondSection(composite);
- String p = getPropertyString();
- updateCheckboxData(p != null);
- buttoncomp.setEnabled(p != null);
- table.setEnabled(p != null);
-
- return composite;
- }
-
- private Composite createDefaultComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
-
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- composite.setLayoutData(data);
-
- return composite;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
- */
- protected void performDefaults() {
- updateCheckboxData(projectSpecific.getSelection());
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#performOk()
- */
- public boolean performOk() {
- try {
- save();
- } catch (CoreException e) {
- return false;
- }
- return true;
- }
-
- /**
- * Ability to create standard button on any composite.
- * @param c
- * @param names
- */
- private void initButtons(Composite c, String[] names) {
- initButtons(c, names, 80);
- }
-
- private void initButtons(Composite c, String[] names, int width) {
- if (names == null || names.length == 0) return;
- c.setLayoutData(new GridData(GridData.FILL_VERTICAL));
- c.setLayout(new GridLayout(1, false));
- buttons = new Button[names.length];
- for (int i=0; i<names.length; i++) {
- buttons[i] = new Button(c, SWT.PUSH);
- buttons[i].setFont(c.getFont());
- GridData gdb = new GridData(GridData.VERTICAL_ALIGN_CENTER);
- gdb.grabExcessHorizontalSpace = false;
- gdb.horizontalAlignment = SWT.FILL;
- gdb.minimumWidth = width;
-
- if (names[i] != null)
- buttons[i].setText(names[i]);
- else { // no button, but placeholder !
- buttons[i].setVisible(false);
- buttons[i].setEnabled(false);
- gdb.heightHint = 10;
- }
-
- buttons[i].setLayoutData(gdb);
- buttons[i].addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent event) {
- buttonPressed(event);
- }});
- }
- }
-
- /**
- *
- * @param e - event to be handled
- */
- private void buttonPressed(SelectionEvent e) {
- for (int i=0; i<buttons.length; i++) {
- if (buttons[i].equals(e.widget)) {
- buttonPressed(i);
- return;
- }
- }
- }
-
- private void buttonPressed (int n) {
- switch (n) {
- case 0: // up
- moveItem(true);
- break;
- case 1: // down
- moveItem(false);
- break;
- case 2: // do nothing - it's not a button
- break;
-
- case 3: // check all
- tv.setAllChecked(true);
- break;
- case 4: // uncheck all
- tv.setAllChecked(false);
- break;
- default:
- break;
- }
- }
-
- // Move item up / down
- private void moveItem(boolean up) {
- int n = table.getSelectionIndex();
- if (n < 0 ||
- (up && n == 0) ||
- (!up && n+1 == table.getItemCount()))
- return;
- TableData d = (TableData)tv.getElementAt(n);
- boolean checked = tv.getChecked(d);
- tv.remove(d);
- n = up ? n - 1 : n + 1;
- tv.insert(d, n);
- tv.setChecked(d, checked);
- table.setSelection(n);
- }
- /**
- * Changes state of existing button.
- * Does nothing if index is invalid
- *
- * @param i - button index
- * @param state - required state
- */
- private void buttonSetEnabled(int i, boolean state) {
- if (buttons == null || buttons.length <= i ) return;
- buttons[i].setEnabled(state);
- }
-
- private void updateButtons() {
- int cnt = table.getItemCount();
- int pos = table.getSelectionIndex();
- buttonSetEnabled(0, pos > 0);
- buttonSetEnabled(1, pos != -1 && pos < (cnt - 1));
- buttonSetEnabled(3, cnt > 0);
- buttonSetEnabled(4, cnt > 0);
- }
-
- private class TableData {
- String key;
- String value;
- public TableData (String _key, String _value) {
- key = _key;
- value = _value;
- }
- @Override
- public String toString() { return value; }
- }
-
- private void getExtensions() {
- mapItems.clear();
- IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(
- LibHover.LIBHOVER_DOC_EXTENSION);
- if (point != null) {
- IExtension[] exts = point.getExtensions();
- for (IExtension ext : exts) {
- if (ext.getConfigurationElements().length > 0) {
- mapItems.put(ext.getUniqueIdentifier(), ext.getLabel());
- }
- }
- }
- }
-
- @SuppressWarnings("unchecked")
- private void updateCheckboxData(boolean useProject) {
- // Combine user preference string with existing libhover extensions.
- getExtensions();
- HashMap<String,String> copyMap = (HashMap<String,String>)mapItems.clone();
- ArrayList<TableData> data = new ArrayList<TableData>();
- ArrayList<TableData> checkedData = new ArrayList<TableData>();
- // See what the user has set in preferences/properties and make sure that
- // any libhover referred to is a valid current extension.
- // Drop any preference for a non-existent extension.
- String prop = null;
- String pref = null;
- // User wants to use project settings. If they already exist, honor them.
- if (useProject)
- prop = getPropertyString();
- // If no property settings exist or the user has not asked for project
- // specific settings, then use the preferences as default.
- if (prop == null)
- pref = getPreferenceStore().getString(PreferenceConstants.P_LIBHOVER);
- else // otherwise use the property settings
- pref = prop;
- // The property string has the same format as the preference string which is
- // id1:boolean1:id2:boolean2:id3:boolean3 (where booleanx is checked or not)
- String[] tokens = pref.split(":");
- if (tokens.length > 1) {
- for (int i = 0; i < tokens.length; i+=2) {
- String id = tokens[i];
- Boolean checked = Boolean.valueOf(tokens[i+1]);
- String value = copyMap.get(id);
- if (value != null) {
- TableData d = new TableData(id, value);
- data.add(d);
- if (checked)
- checkedData.add(d);
- copyMap.remove(id);
- }
- }
- }
- // Add any remaining libhover extensions to end of list. If there is an
- // existing property string, we treat them as unchecked. If we are
- // defaulting to the preferences, then we treat them as checked.
- String[] leftovers = new String[copyMap.size()];
- leftovers = copyMap.keySet().toArray(leftovers);
- for (int i = 0; i < leftovers.length; ++i) {
- TableData d = new TableData(leftovers[i], copyMap.get(leftovers[i]));
- data.add(d);
- if (!useProject || prop == null)
- checkedData.add(d);
- }
- tv.setInput(data.toArray());
- tv.setCheckedElements(checkedData.toArray());
- updateButtons();
- }
-
- private void save() throws CoreException {
- // if we are not using project-specific property, then we
- // set it to be null
- if (!projectSpecific.getSelection())
- getProject().setPersistentProperty(libhoverProperty, null);
-
- // Otherwise form a string which has all of the libhovers in order
- // with their boolean checked value. Use ":" to separate all entries
- boolean inRange = true;
- int i = 0;
- String outString = new String();
- String del = "";
- while (inRange) {
- TableData t;
- Object obj = tv.getElementAt(i);
- if (obj == null)
- inRange = false;
- else {
- ++i;
- t = (TableData)obj;
- outString += del + t.key + ":" + tv.getChecked(obj);
- del = ":";
- }
- }
- // Save formatted string to project.
- if (outString.length() > 1)
- getProject().setPersistentProperty(libhoverProperty, outString);
- }
-} \ No newline at end of file
diff --git a/libhover/plugin.xml b/libhover/plugin.xml
deleted file mode 100644
index 319fec5f13..0000000000
--- a/libhover/plugin.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension-point id="org.eclipse.linuxtools.cdt.libhover.library" name="C/C++ Library Hover Specifier" schema="schema/org.eclipse.linuxtools.cdt.libhover.library.exsd"/>
-
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="C/C++ Library Hover Preferences"
- class="org.eclipse.linuxtools.cdt.libhover.preferences.LibHoverPreferencePage"
- id="org.eclipse.linuxtools.cdt.libhover.preferences.LibhoverPreferencePage">
- </page>
- </extension>
- <extension
- point="org.eclipse.core.runtime.preferences">
- <initializer
- class="org.eclipse.linuxtools.cdt.libhover.preferences.PreferenceInitializer">
- </initializer>
- </extension>
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- objectClass="org.eclipse.core.resources.IProject"
- name="C/C++ Library Hover"
- nameFilter="*.*"
- class="org.eclipse.linuxtools.cdt.libhover.properties.LibHoverPropertyPage"
- id="org.eclipse.linuxtools.cdt.libhover.properties.samplePropertyPage">
- </page>
- </extension>
- <extension
- point="org.eclipse.cdt.ui.CHelpProvider">
- <provider
- class="org.eclipse.linuxtools.cdt.libhover.LibHover"
- id="org.eclipse.linuxtools.cdt.libhover.provider"/>
- </extension>
-</plugin>
diff --git a/libhover/schema/org.eclipse.linuxtools.cdt.libhover.library.exsd b/libhover/schema/org.eclipse.linuxtools.cdt.libhover.library.exsd
deleted file mode 100644
index 6fe8171e48..0000000000
--- a/libhover/schema/org.eclipse.linuxtools.cdt.libhover.library.exsd
+++ /dev/null
@@ -1,216 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="library" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="library" id="org.eclipse.linuxtools.cdt.libhover.library" name="C/C++ Library Hover Specifier"/>
- </appinfo>
- <documentation>
- This extension allows specification of a library hover file to use when editing C or C++ files under the CDT.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="library" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="library">
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- Name of the library that the hover info is providing
- </documentation>
- </annotation>
- </attribute>
- <attribute name="location" type="string" use="required">
- <annotation>
- <documentation>
- Location of the xml file containing the hover info: either an absolute file name or a URL
- </documentation>
- </annotation>
- </attribute>
- <attribute name="docs" type="string">
- <annotation>
- <documentation>
- URL of help documentation or empty.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="type" use="required">
- <annotation>
- <documentation>
- Type of library that help is for. One of C, C++, or ASM
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- <simpleType>
- <restriction base="string">
- <enumeration value="C">
- </enumeration>
- <enumeration value="C++">
- </enumeration>
- <enumeration value="ASM">
- </enumeration>
- </restriction>
- </simpleType>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- 1.0.0
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- &lt;extension
- point=&quot;org.eclipse.linuxtools.cdt.libhover.library&quot;&gt;
- &lt;library
- name=&quot;GTK&quot;
- location=&quot;http://mywebsite/libhover/xml/gtk.xml&quot;
- docs=&quot;http;//gtk.org/docs/gtk.html&quot;/&gt;
- &lt;/extension&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiinfo"/>
- </appinfo>
- <documentation>
- XML files referenced must adhere to the following xml structure:
-&lt;pre&gt;
-
-&lt;!DOCTYPE descriptions [
-
- &lt;!ELEMENT descriptions (construct)*&gt;
-
- &lt;!ELEMENT construct (structure|function)*&gt;
- &lt;!ATTLIST construct
- id ID #REQUIRED
- type CDATA #REQUIRED
- &gt;
-
- &lt;!ELEMENT structure (synopsis?, elements?)?&gt;
-
- &lt;!ELEMENT elements (element*)&gt;
-
- &lt;!ELEMENT element (synopsis*)&gt;
- &lt;!ATTLIST element
- content CDATA #REQUIRED
- &gt;
-
- &lt;!ELEMENT synopsis (#PCDATA)*&gt;
-
- &lt;!ELEMENT function (prototype,headers?,synopsis)&gt;
- &lt;!ATTLIST function
- returntype CDATA #REQUIRED
- &gt;
-
- &lt;!ELEMENT prototype (parameter+)?&gt;
-
- &lt;!ELEMENT parameter (#PCDATA)*&gt;
- &lt;!ATTLIST parameter
- content CDATA #REQUIRED
- &gt;
-
- &lt;!ELEMENT headers (header+)?&gt;
-
- &lt;!ELEMENT header (#PCDATA)*&gt;
- &lt;!ATTLIST header
- filename CDATA #REQUIRED
- &gt;
-
-]&gt;
-&lt;/pre&gt;
-Note that function names need to be prefixed by &quot;function-&quot;. For example:
-&lt;pre&gt;
-&lt;descriptions&gt;
- &lt;construct id=&quot;function-atexit&quot; type=&quot;function&quot;&gt;
- &lt;function returntype=&quot;int&quot;&gt;
- &lt;prototype&gt;
- &lt;parameter content=&quot;void (*function) (void)&quot;/&gt;
- &lt;/prototype&gt;
- &lt;headers&gt;
- &lt;header filename = &quot;stdlib.h&quot;/&gt;
- &lt;/headers&gt;
- &lt;synopsis&gt;
- The &amp;lt;CODE&amp;gt;atexit&amp;lt;/CODE&amp;gt; function registers the function &amp;lt;VAR&amp;gt;function&amp;lt;/VAR&amp;gt; to be
- called at normal program termination. The &amp;lt;VAR&amp;gt;function&amp;lt;/VAR&amp;gt; is called with
- no arguments.
- &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; The return value from &amp;lt;CODE&amp;gt;atexit&amp;lt;/CODE&amp;gt; is zero on success and nonzero if
- the function cannot be registered.
- &lt;/synopsis&gt;
- &lt;/function&gt;
- &lt;/construct&gt;
-&lt;/descriptions&gt;
-&lt;/pre&gt;
-
-Also note that the synopsis is output as html. To specify html tags, one needs to use &amp;amp;lt; and &amp;amp;gt; as delimeters in place of &quot;&amp;lt&quot; and &quot;&amp;gt&quot;. In the previous example, VAR tags are used for variable references, CODE tags for the function name, and br tags for forcing paragraph breaks. All of these make the hover look more interesting when displayed.
- </documentation>
- </annotation>
-
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- /*******************************************************************************
- * Copyright (c) 2008 Red Hat Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat Inc. - initial API and implementation
- *******************************************************************************/
- </documentation>
- </annotation>
-
-</schema>
diff --git a/libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHover.java b/libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHover.java
deleted file mode 100644
index feabcb7512..0000000000
--- a/libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHover.java
+++ /dev/null
@@ -1,475 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006, 2007, 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
- *******************************************************************************//*
-/*
- * Initially created on Jul 8, 2004
- */
-
-/**
- * @author Chris Moller, Red Hat, Inc.
- * @author Jeff Johnston, Red Hat, Inc. (rewrite to use ICHelpProvider)
- * Modified to be org.eclipse.linuxtools.cdt.libhover package.
- */
-
-package org.eclipse.linuxtools.cdt.libhover;
-
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.eclipse.cdt.ui.CUIPlugin;
-import org.eclipse.cdt.ui.ICHelpBook;
-import org.eclipse.cdt.ui.ICHelpProvider;
-import org.eclipse.cdt.ui.ICHelpResourceDescriptor;
-import org.eclipse.cdt.ui.IFunctionSummary;
-import org.eclipse.cdt.ui.IRequiredInclude;
-import org.eclipse.cdt.ui.text.ICHelpInvocationContext;
-import org.eclipse.core.filesystem.URIUtil;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.RegistryFactory;
-import org.eclipse.help.IHelpResource;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-
-public class LibHover implements ICHelpProvider {
-
- public static String LIBHOVER_DOC_EXTENSION = LibhoverPlugin.PLUGIN_ID + ".library"; //$NON-NLS-1$
-
- // see comment in initialize()
- // private static String defaultSearchPath = null;
-
- private static HashMap<ICHelpBook, LibHoverLibrary> libraries = new HashMap<ICHelpBook, LibHoverLibrary>();
-
- static final String constructTypes[] ={
- "dtype", // $NON-NLS-1$
- "enum", // $NON-NLS-1$
- "function", // $NON-NLS-1$
- "struct", // $NON-NLS-1$
- "type", // $NON-NLS-1$
- "union" // $NON-NLS-1$
- };
-
- static final int dtypeIndex = 0;
- static final int enumIndex = 1;
- static final int functionIndex = 2;
- static final int structIndex = 3;
- static final int typeIndex = 4;
- static final int unionIndex = 5;
-
- private class LibHoverLibrary {
- private String name;
- private String location;
- private String docs;
- private Document document;
- public LibHoverLibrary(String name, String location, String docs, Document document) {
- this.name = name;
- this.location = location;
- this.document = document;
- this.docs = docs;
- }
- public String getName() {
- return name;
- }
- public String getLocation() {
- return location;
- }
- public String getDocs() {
- return docs;
- }
- public Document getDocument() {
- return document;
- }
- }
-
- private class HelpBook implements ICHelpBook {
- private String title;
- private int type;
-
- public HelpBook (String title, String typeName) {
- this.title = title;
- if (typeName.equals("C"))
- type = HELP_TYPE_C;
- else if (typeName.equals("C++"))
- type = HELP_TYPE_CPP;
- else
- type = HELP_TYPE_ASM;
- }
- public String getTitle () {
- return title;
- }
-
- public int getCHelpType () {
- return type;
- }
- }
-
- private ArrayList<ICHelpBook> helpBooks = new ArrayList<ICHelpBook>();
-
- public void getLibHoverDocs() {
- libraries.clear();
- helpBooks.clear();
- IExtensionRegistry x = RegistryFactory.getRegistry();
- IConfigurationElement[] ces = x.getConfigurationElementsFor(LIBHOVER_DOC_EXTENSION);
- for (int i = 0; i < ces.length; ++i) {
- IConfigurationElement ce = ces[i];
- if (ce.getName().equals("library")) { //$NON-NLS-1$
- Document doc = null;
- try {
- // see comment in initialize()
- try {
- // Use the FileLocator class to open the magic hover doc file
- // in the plugin's jar.
- // Either open the html file or file system file depending
- // on what has been specified.
- String location = ce.getAttribute("location"); //$NON-NLS-1$
- String name = ce.getAttribute("name"); //$NON-NLS-1$
- String helpdocs = ce.getAttribute("docs"); //$NON-NLS-1$
- String type = ce.getAttribute("type"); //$NON-NLS-1$
- URI acDoc = new URI(location);
- IPath p = URIUtil.toPath(acDoc);
- InputStream docStream = null;
- if (p == null) {
- URL url = acDoc.toURL();
- docStream = url.openStream();
- } else {
- docStream = new FileInputStream(p.toFile());
- }
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- factory.setValidating(false);
- try {
- DocumentBuilder builder = factory.newDocumentBuilder();
- doc = builder.parse(docStream);
- }
- catch (SAXParseException saxException) {
- doc = null;
- }
- catch (SAXException saxEx) {
- doc = null;
- }
- catch (ParserConfigurationException pce) {
- doc = null;
- }
- catch (IOException ioe) {
- doc = null;
- }
- // If we found the document, add it to our library list.
- if (doc != null) {
- HelpBook h = new HelpBook(name, type);
- helpBooks.add(h);
- libraries.put(h, new LibHoverLibrary(name, location, helpdocs, doc));
- }
- } catch (MalformedURLException e) {
- CUIPlugin.log(e);
- } catch (FileNotFoundException e) {
- CUIPlugin.log(e);
- } catch (URISyntaxException e) {
- CUIPlugin.log(e);
- }
- }
- catch (IOException ioe) {
- }
- }
- }
- }
-
- public void initialize() {
- getLibHoverDocs();
- }
-
- public ICHelpBook[] getCHelpBooks () {
- ICHelpBook[] chelpbooks = new ICHelpBook[helpBooks.size()];
- return helpBooks.toArray(chelpbooks);
- }
-
- private class FunctionSummary implements IFunctionSummary, Comparable<FunctionSummary> {
-
- private String Name;
- private String ReturnType;
- private String Prototype;
- private String Summary;
-// private String Synopsis;
- private class RequiredInclude implements IRequiredInclude {
- private String include;
-
- public RequiredInclude (String file) {
- include = file;
- }
-
- public String getIncludeName() {
- return include;
- }
-
- public boolean isStandard() {
- return true;
- }
- }
-
- public int compareTo (FunctionSummary x) {
- FunctionSummary y = (FunctionSummary)x;
- return getName().compareTo(y.getName());
- }
-
-// private RequiredInclude Includes[];
- private ArrayList<RequiredInclude> Includes = new ArrayList<RequiredInclude>();
-
- private void setIncludeName (String iname) {
- RequiredInclude nri = new RequiredInclude(iname);
- Includes.add(nri);
- }
-
- public class FunctionPrototypeSummary implements IFunctionPrototypeSummary {
- public String getName() { return Name; }
- public String getReturnType() { return ReturnType; }
- public String getArguments() { return Prototype; }
- public String getPrototypeString(boolean namefirst) {
- if (true == namefirst) {
- return Name + " (" + Prototype + ") " + ReturnType; // $NON-NLS-1$ // $NON-NLS-2$
- }
- else {
- return ReturnType + " " + Name + " (" + Prototype + ")"; // $NON-NLS-1$ // $NON-NLS-2$ // $NON-NLS-3$
- }
- }
- }
-
- public String getName() { return Name; }
- public String getNamespace() { return null; }
- public String getDescription() { return Summary; }
- public IFunctionPrototypeSummary getPrototype() { return new FunctionPrototypeSummary(); }
-
- public IRequiredInclude[] getIncludes() {
- IRequiredInclude[] includes = new IRequiredInclude[Includes.size()];
- for (int i = 0; i < Includes.size(); ++i) {
- includes[i] = (IRequiredInclude)Includes.get(i);
- }
- return includes;
- }
-
- }
-
- protected FunctionSummary getFunctionSummaryFromNode(String name, Node function_node) {
- FunctionSummary f = new FunctionSummary();
- f.Name = name;
- NamedNodeMap function_node_map = function_node.getAttributes();
- Node function_node_returntype_node = function_node_map.item(0);
- String function_node_rt_name = function_node_returntype_node.getNodeName();
-
- if (function_node_rt_name.equals("returntype")) { // $NON-NLS-1$
-
- // return type
-
- String function_node_rt_value = function_node_returntype_node.getNodeValue();
- f.ReturnType = function_node_rt_value;
- } // returntype
-
- NodeList function_node_kids = function_node.getChildNodes();
- for (int fnk = 0; fnk < function_node_kids.getLength(); fnk++) {
- Node function_node_kid = function_node_kids.item(fnk);
- String function_node_kid_name = function_node_kid.getNodeName();
- if (function_node_kid_name.equals("prototype")) { // $NON-NLS-1$
-
- // prototype
-
- String prototype = null;
-
- NodeList function_node_parms = function_node_kid.getChildNodes();
- for (int fnp = 0; fnp < function_node_parms.getLength(); fnp++) {
- Node function_node_parm = function_node_parms.item(fnp);
- String function_node_parm_name = function_node_parm.getNodeName();
- if (function_node_parm_name.equals("parameter")) { // $NON-NLS-1$
- NamedNodeMap function_node_parm_map = function_node_parm.getAttributes();
- Node function_node_parm_node = function_node_parm_map.item(0);
- String parameter = function_node_parm_node.getNodeValue();
- prototype = (null == prototype)
- ? parameter
- : prototype + ", " + parameter;
- }
- }
- f.Prototype = prototype;
- } // prototype
-
- else if (function_node_kid_name.equals("headers")) { // $NON-NLS-1$
-
- // headers
-
- NodeList function_node_headers = function_node_kid.getChildNodes();
- for (int fnh = 0; fnh < function_node_headers.getLength(); fnh++) {
- Node function_node_header = function_node_headers.item(fnh);
- String function_node_header_name = function_node_header.getNodeName();
- if (function_node_header_name.equals("header")) { // $NON-NLS-1$
- NamedNodeMap function_node_header_map = function_node_header.getAttributes();
- Node function_node_header_node = function_node_header_map.item(0);
- f.setIncludeName(function_node_header_node.getNodeValue());
- }
- }
- } // headers
-
-
- else if (function_node_kid_name.equals("synopsis")) { // $NON-NLS-1$
-
- // synopsis
-
- Node textNode = function_node_kid.getLastChild();
- f.Summary = textNode.getNodeValue();
- }
- }
- return f;
- }
-
- public IFunctionSummary getFunctionInfo(ICHelpInvocationContext context, ICHelpBook[] helpBooks, String name) {
- FunctionSummary f;
-
- f = null;
-
- // Loop through all the documents we have and report first match.
- for (int i = 0; i < helpBooks.length; ++i) {
- LibHoverLibrary l = libraries.get(helpBooks[i]);
- Document document = l != null ? l.getDocument() : null;
- if ((null != document) && (null != name)) {
- String sss;
-
- for (int ci = 0; ci < constructTypes.length; ci++) {
- sss = constructTypes[ci] + "-" + name; // $NON-NLS-1$
- Element elem = document.getElementById(sss);
- if (null != elem) {
- switch(ci) {
- case dtypeIndex:
- break;
- case enumIndex:
- break;
- case functionIndex:
- NodeList functionNode = elem.getElementsByTagName("function"); // $NON-NLS-1$
- if (null != functionNode) {
- for (int fni = 0; fni < functionNode.getLength(); fni++) {
- Node function_node = functionNode.item(fni);
- String function_node_name = function_node.getNodeName();
- if (function_node_name.equals("function")) { // $NON-NLS-1$
- f = getFunctionSummaryFromNode(name, function_node);
- return f;
- } // function node
- } // fni loop
- } // null != functionNode
- break;
- case structIndex:
- break;
- case typeIndex:
- break;
- case unionIndex:
- break;
- }
- }
- }
- }
- }
- return null;
- }
-
-
- public IFunctionSummary[] getMatchingFunctions(ICHelpInvocationContext context, ICHelpBook[] helpBooks, String prefix) {
- ArrayList<IFunctionSummary> fList = new ArrayList<IFunctionSummary>();
-
- for (int di = 0; di < helpBooks.length; ++di) {
- LibHoverLibrary l = libraries.get(helpBooks[di]);
- Document document = l != null ? l.getDocument() : null;
- if ((null != document) && (null != prefix)) {
- NodeList elems = document.getElementsByTagName("construct"); // $NON-NLS-1$
- for (int i = 0; i < elems.getLength(); ++i) {
- Element elem = (Element)elems.item(i);
- NamedNodeMap attrs = elem.getAttributes();
- Node id_node = attrs.item(0);
- String elemName = id_node.getNodeValue();
- if (elemName != null && elemName.startsWith("function-")) { // $NON-NLS-1$
- String funcName = elemName.substring(9);
- if (funcName != null && funcName.startsWith(prefix)) {
- NodeList functionNodes = elem.getElementsByTagName("function"); // $NON-NLS-1$
- for (int j = 0; j < functionNodes.getLength(); ++j) {
- Node function_node = functionNodes.item(j);
- FunctionSummary f = getFunctionSummaryFromNode(funcName, function_node);
- fList.add(f);
- }
- }
- }
- }
- }
- }
- IFunctionSummary[] summaries = new IFunctionSummary[fList.size()];
- for (int k = 0; k < summaries.length; k++) {
- summaries[k] = (IFunctionSummary)fList.get(k);
- }
- Arrays.sort(summaries);
- return summaries;
- }
-
- private class HelpResource implements IHelpResource {
- private String href;
- private String label;
- public HelpResource(String href, String label) {
- this.href = href;
- this.label = label;
- }
- public String getHref() {
- return href;
- }
- public String getLabel() {
- return label;
- }
- }
-
- private class HelpResourceDescriptor implements ICHelpResourceDescriptor {
- private ICHelpBook helpbook;
-
- public HelpResourceDescriptor(ICHelpBook helpbook) {
- this.helpbook = helpbook;
- }
-
- public ICHelpBook getCHelpBook() {
- return helpbook;
- }
-
- public IHelpResource[] getHelpResources() {
- LibHoverLibrary l = libraries.get(helpbook);
- if (l != null) {
- IHelpResource[] hr = new IHelpResource[1];
- hr[0] = new HelpResource(l.getLocation(), l.getName());
- return hr;
- }
- return null;
- }
- }
-
- public ICHelpResourceDescriptor[] getHelpResources(ICHelpInvocationContext context, ICHelpBook[] helpBooks, String name) {
- for (int i = 0; i < helpBooks.length; ++i) {
- IFunctionSummary fs = getFunctionInfo(context, new ICHelpBook[]{helpBooks[i]}, name);
- if (fs != null) {
- return new HelpResourceDescriptor[]{new HelpResourceDescriptor(helpBooks[i])};
- }
- }
- return null;
- }
-}
diff --git a/libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.java b/libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.java
deleted file mode 100644
index 7392758462..0000000000
--- a/libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 2006, 2007 QNX Software Systems 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:
- * QNX Software Systems - Initial API and implementation
- * Red Hat Inc. - Modification to use with LibHover
- *******************************************************************************/
-
-package org.eclipse.linuxtools.cdt.libhover;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * MakefilePreferencesMessages
- */
-public class LibHoverMessages {
-
- /**
- *
- */
- private LibHoverMessages() {
- }
-
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.cdt.autotools.ui.LibHoverMessages"; //$NON-NLS-1$
-
- public static String getString(String key) {
- try {
- return ResourceBundle.getBundle(BUNDLE_NAME).getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- } catch (NullPointerException e) {
- return '#' + key + '#';
- }
- }
-
-}
diff --git a/libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.properties b/libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.properties
deleted file mode 100644
index 6dcdd552bd..0000000000
--- a/libhover/src/org/eclipse/linuxtools/cdt/libhover/LibHoverMessages.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-#################################################################################
-# Copyright (c) 2007 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
-#################################################################################
-LibcHelpResource.label=C Library Help
-LibcHelpBook.title=C Library Functions \ No newline at end of file
diff --git a/libhover/src/org/eclipse/linuxtools/cdt/libhover/LibhoverPlugin.java b/libhover/src/org/eclipse/linuxtools/cdt/libhover/LibhoverPlugin.java
deleted file mode 100644
index e1d685b447..0000000000
--- a/libhover/src/org/eclipse/linuxtools/cdt/libhover/LibhoverPlugin.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.eclipse.linuxtools.cdt.libhover;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class LibhoverPlugin extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.linuxtools.cdt.libhover";
-
- // The shared instance
- private static LibhoverPlugin plugin;
-
- /**
- * The constructor
- */
- public LibhoverPlugin() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static LibhoverPlugin 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);
- }
-}
diff --git a/libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/LibHoverPreferencePage.java b/libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/LibHoverPreferencePage.java
deleted file mode 100644
index 0b36d30f17..0000000000
--- a/libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/LibHoverPreferencePage.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package org.eclipse.linuxtools.cdt.libhover.preferences;
-
-import org.eclipse.jface.preference.*;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.linuxtools.cdt.libhover.LibhoverPlugin;
-
-/**
- * This class represents a preference page that
- * is contributed to the Preferences dialog. By
- * subclassing <samp>FieldEditorPreferencePage</samp>, we
- * can use the field support built into JFace that allows
- * us to create a page that is small and knows how to
- * save, restore and apply itself.
- * <p>
- * This page is used to modify preferences only. They
- * are stored in the preference store that belongs to
- * the main plug-in class. That way, preferences can
- * be accessed directly via the preference store.
- */
-
-public class LibHoverPreferencePage
- extends FieldEditorPreferencePage
- implements IWorkbenchPreferencePage {
-
- public LibHoverPreferencePage() {
- super(GRID);
- setPreferenceStore(LibhoverPlugin.getDefault().getPreferenceStore());
- setDescription("A demonstration of a preference page implementation");
- }
-
- /**
- * Creates the field editors. Field editors are abstractions of
- * the common GUI blocks needed to manipulate various types
- * of preferences. Each field editor knows how to save and
- * restore itself.
- */
- public void createFieldEditors() {
- addField(new DirectoryFieldEditor(PreferenceConstants.P_PATH,
- "&Directory preference:", getFieldEditorParent()));
- addField(
- new BooleanFieldEditor(
- PreferenceConstants.P_BOOLEAN,
- "&An example of a boolean preference",
- getFieldEditorParent()));
-
- addField(new RadioGroupFieldEditor(
- PreferenceConstants.P_CHOICE,
- "An example of a multiple-choice preference",
- 1,
- new String[][] { { "&Choice 1", "choice1" }, {
- "C&hoice 2", "choice2" }
- }, getFieldEditorParent()));
- addField(
- new StringFieldEditor(PreferenceConstants.P_STRING, "A &text preference:", getFieldEditorParent()));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- */
- public void init(IWorkbench workbench) {
- }
-
-} \ No newline at end of file
diff --git a/libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceConstants.java b/libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceConstants.java
deleted file mode 100644
index 8fe7c0169a..0000000000
--- a/libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceConstants.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.eclipse.linuxtools.cdt.libhover.preferences;
-
-/**
- * Constant definitions for plug-in preferences
- */
-public class PreferenceConstants {
-
- public static final String P_PATH = "pathPreference";
-
- public static final String P_BOOLEAN = "booleanPreference";
-
- public static final String P_CHOICE = "choicePreference";
-
- public static final String P_STRING = "stringPreference";
-
-}
diff --git a/libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceInitializer.java b/libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceInitializer.java
deleted file mode 100644
index f5bc892647..0000000000
--- a/libhover/src/org/eclipse/linuxtools/cdt/libhover/preferences/PreferenceInitializer.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.eclipse.linuxtools.cdt.libhover.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-
-import org.eclipse.linuxtools.cdt.libhover.LibhoverPlugin;
-
-/**
- * Class used to initialize default preference values.
- */
-public class PreferenceInitializer extends AbstractPreferenceInitializer {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- public void initializeDefaultPreferences() {
- IPreferenceStore store = LibhoverPlugin.getDefault().getPreferenceStore();
- store.setDefault(PreferenceConstants.P_BOOLEAN, true);
- store.setDefault(PreferenceConstants.P_CHOICE, "choice2");
- store.setDefault(PreferenceConstants.P_STRING,
- "Default value");
- }
-
-}
diff --git a/libhover/src/org/eclipse/linuxtools/cdt/libhover/properties/LibHoverPropertyPage.java b/libhover/src/org/eclipse/linuxtools/cdt/libhover/properties/LibHoverPropertyPage.java
deleted file mode 100644
index ccd1b4dab5..0000000000
--- a/libhover/src/org/eclipse/linuxtools/cdt/libhover/properties/LibHoverPropertyPage.java
+++ /dev/null
@@ -1,125 +0,0 @@
-package org.eclipse.linuxtools.cdt.libhover.properties;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-public class LibHoverPropertyPage extends PropertyPage {
-
- private static final String PATH_TITLE = "Path:";
- private static final String OWNER_TITLE = "&Owner:";
- private static final String OWNER_PROPERTY = "OWNER";
- private static final String DEFAULT_OWNER = "John Doe";
-
- private static final int TEXT_FIELD_WIDTH = 50;
-
- private Text ownerText;
-
- /**
- * Constructor for SamplePropertyPage.
- */
- public LibHoverPropertyPage() {
- super();
- }
-
- private void addFirstSection(Composite parent) {
- Composite composite = createDefaultComposite(parent);
-
- //Label for path field
- Label pathLabel = new Label(composite, SWT.NONE);
- pathLabel.setText(PATH_TITLE);
-
- // Path text field
- Text pathValueText = new Text(composite, SWT.WRAP | SWT.READ_ONLY);
- pathValueText.setText(((IResource) getElement()).getFullPath().toString());
- }
-
- private void addSeparator(Composite parent) {
- Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
- GridData gridData = new GridData();
- gridData.horizontalAlignment = GridData.FILL;
- gridData.grabExcessHorizontalSpace = true;
- separator.setLayoutData(gridData);
- }
-
- private void addSecondSection(Composite parent) {
- Composite composite = createDefaultComposite(parent);
-
- // Label for owner field
- Label ownerLabel = new Label(composite, SWT.NONE);
- ownerLabel.setText(OWNER_TITLE);
-
- // Owner text field
- ownerText = new Text(composite, SWT.SINGLE | SWT.BORDER);
- GridData gd = new GridData();
- gd.widthHint = convertWidthInCharsToPixels(TEXT_FIELD_WIDTH);
- ownerText.setLayoutData(gd);
-
- // Populate owner text field
- try {
- String owner =
- ((IResource) getElement()).getPersistentProperty(
- new QualifiedName("", OWNER_PROPERTY));
- ownerText.setText((owner != null) ? owner : DEFAULT_OWNER);
- } catch (CoreException e) {
- ownerText.setText(DEFAULT_OWNER);
- }
- }
-
- /**
- * @see PreferencePage#createContents(Composite)
- */
- protected Control createContents(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- composite.setLayout(layout);
- GridData data = new GridData(GridData.FILL);
- data.grabExcessHorizontalSpace = true;
- composite.setLayoutData(data);
-
- addFirstSection(composite);
- addSeparator(composite);
- addSecondSection(composite);
- return composite;
- }
-
- private Composite createDefaultComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
-
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- composite.setLayoutData(data);
-
- return composite;
- }
-
- protected void performDefaults() {
- // Populate the owner text field with the default value
- ownerText.setText(DEFAULT_OWNER);
- }
-
- public boolean performOk() {
- // store the value in the owner text field
- try {
- ((IResource) getElement()).setPersistentProperty(
- new QualifiedName("", OWNER_PROPERTY),
- ownerText.getText());
- } catch (CoreException e) {
- return false;
- }
- return true;
- }
-
-} \ No newline at end of file
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..9dc4492e4b
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm-feature/.project
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.rpm-feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <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..dcd3c2ec8d
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm-feature/ChangeLog
@@ -0,0 +1,51 @@
+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/libhover/org.eclipse.linuxtools.cdt.libhover.newlib-feature/about.html b/rpm/org.eclipse.linuxtools.rpm-feature/about.html
index 44e229003e..44e229003e 100644
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.newlib-feature/about.html
+++ b/rpm/org.eclipse.linuxtools.rpm-feature/about.html
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..ad0aa8b246
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm-feature/build.properties
@@ -0,0 +1,19 @@
+###############################################################################
+# (c) 2004 Red Hat, Inc.
+#
+# This program is open source software licensed under the
+# Eclipse Public License ver. 1
+#
+###############################################################################
+
+bin.includes = feature.xml,\
+ feature.properties,\
+ about.html
+
+src.includes = .classpath,\
+ .project,\
+ ChangeLog,\
+ build.properties,\
+ feature.properties,\
+ feature.xml,\
+ about.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..daa07f124f
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm-feature/feature.properties
@@ -0,0 +1,16 @@
+###############################################################################
+# (c) 2004 Red Hat, Inc.
+#
+# This program is open source software licensed under the
+# Eclipse Public License ver. 1
+#
+###############################################################################
+
+# 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 Tool
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..d1eadfeb80
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm-feature/feature.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.linuxtools.rpm"
+ label="%featureName"
+ version="3.0.0"
+ provider-name="Eclipse.org">
+ <install-handler/>
+
+ <description url="[Enter Feature URL here.]">
+ [Enter Feature Description here.]
+ </description>
+
+ <copyright url="[Enter Copyright URL here.]">
+ [Enter Copyright Description here.]
+ </copyright>
+
+ <license url="[Enter License URL here.]">
+ [Enter License Description here.]
+ </license>
+
+ <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="3.0.0"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.rpm.doc"
+ download-size="0"
+ install-size="0"
+ version="3.0.0"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.rpm.ui"
+ download-size="0"
+ install-size="0"
+ version="3.0.0"/>
+
+</feature>
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..ce73933404
--- /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="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <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/ChangeLog b/rpm/org.eclipse.linuxtools.rpm.core.tests/ChangeLog
new file mode 100644
index 0000000000..3bfdbc4bb2
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/ChangeLog
@@ -0,0 +1,65 @@
+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..69275160a2
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: RPM Tests Plug-in (Incubation)
+Bundle-SymbolicName: org.eclipse.linuxtools.rpm.core.tests;singleton:=true
+Bundle-Version: 3.0.0
+Bundle-Activator: org.eclipse.linuxtools.rpm.core.tests.RPMCoreTestsPlugin
+Bundle-Vendor: Eclipse.org
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-Classpath: tests.jar
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.linuxtools.rpm.core,
+ org.eclipse.core.resources,
+ org.junit
+Export-Package:
+ org.eclipse.linuxtools.rpm.core.internal.tests;x-internal:=true,
+ org.eclipse.linuxtools.rpm.core.tests
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..8601860766
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/build.properties
@@ -0,0 +1,14 @@
+source.tests.jar = src/
+output.tests.jar = bin/
+bin.includes = plugin.xml,\
+ tests.jar,\
+ resources/,\
+ META-INF/
+src.includes = .classpath,\
+ .project,\
+ ChangeLog,\
+ build.properties,\
+ plugin.xml,\
+ resources/,\
+ src/,\
+ META-INF/
diff --git a/rpm/org.eclipse.linuxtools.rpm.core.tests/plugin.xml b/rpm/org.eclipse.linuxtools.rpm.core.tests/plugin.xml
new file mode 100644
index 0000000000..4d8a631673
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/plugin.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+</plugin>
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/internal/tests/RPMCoreInternalTestSuite.java b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/internal/tests/RPMCoreInternalTestSuite.java
new file mode 100644
index 0000000000..6a21d28da6
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/internal/tests/RPMCoreInternalTestSuite.java
@@ -0,0 +1,23 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+package org.eclipse.linuxtools.rpm.core.internal.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class RPMCoreInternalTestSuite extends TestSuite {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite(
+ "Test for org.eclipse.linuxtools.rpm.core.internal.tests");
+ //$JUnit-BEGIN$
+ suite.addTest(RPMProjectTest.suite());
+ suite.addTest(SpecFileParserTest.suite());
+ //$JUnit-END$
+ return suite;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/internal/tests/RPMProjectTest.java b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/internal/tests/RPMProjectTest.java
new file mode 100644
index 0000000000..4c75083b81
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/internal/tests/RPMProjectTest.java
@@ -0,0 +1,301 @@
+/*
+ * (c) 2007 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+package org.eclipse.linuxtools.rpm.core.internal.tests;
+
+import java.io.File;
+import java.io.StringBufferInputStream;
+import java.net.URL;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+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.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.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.linuxtools.rpm.core.IRPMConstants;
+import org.eclipse.linuxtools.rpm.core.IRPMProject;
+import org.eclipse.linuxtools.rpm.core.ISpecFile;
+import org.eclipse.linuxtools.rpm.core.RPMCorePlugin;
+import org.eclipse.linuxtools.rpm.core.RPMExportDelta;
+import org.eclipse.linuxtools.rpm.core.RPMProjectFactory;
+import org.eclipse.linuxtools.rpm.core.RPMProjectNature;
+import org.eclipse.linuxtools.rpm.core.tests.RPMCoreTestsPlugin;
+
+public class RPMProjectTest extends TestCase {
+
+ IWorkspace workspace;
+ IWorkspaceRoot root;
+ NullProgressMonitor monitor;
+ String pluginRoot;
+
+ final String file_sep = System.getProperty("file.separator"); //$NON-NLS-1$
+ private final String line_sep = System.getProperty("line.separator"); //$NON-NLS-1$
+
+ /*
+ * @see TestCase#setUp()
+ */
+ 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 static TestSuite suite() {
+ return new TestSuite(RPMProjectTest.class);
+ }
+
+ public void testImportHelloWorld() throws Exception {
+ // Create a project for the test
+ IProject testProject = root.getProject("testHelloWorld");
+ testProject.create(monitor);
+ testProject.open(monitor);
+ if(testProject == null) {
+ fail("Unable to create test project");
+ }
+
+ // Instantiate an RPMProject
+ IRPMProject rpmProject = RPMProjectFactory.getRPMProject(testProject);
+
+ // Find the test SRPM and install it
+ URL url = RPMCoreTestsPlugin.getDefault().find(new Path("resources" + file_sep + "srpms" + file_sep + //$NON-NLS-1$ //$NON-NLS-2$
+ "helloworld-2-2.src.rpm"));
+ if (url == null) {
+ fail("Unable to find resource" + file_sep + "srpms" + file_sep +
+ "helloworld-2-2.src.rpm");
+ }
+ File foo = new File(Platform.asLocalURL(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
+ ISpecFile specFile = rpmProject.getSpecFile();
+ assertTrue(specFile != null);
+ assertNotNull(rpmProject.getProject().getPersistentProperty(new QualifiedName(RPMCorePlugin.ID,
+ IRPMConstants.SPEC_FILE_PROPERTY)));
+
+ // Make sure the sources got copied from BUILD to the project root
+ IResource[] sources = rpmProject.getConfiguration().getBuildFolder().members();
+ // If there is one folder, assume it contains all the sources
+ if(sources.length == 1 && sources[0].getType() == IResource.FOLDER) {
+ IFolder foo1 = rpmProject.getProject().getFolder(sources[0].getProjectRelativePath());
+ sources = foo1.members();
+ }
+ for(int i=0; i < sources.length; i++) {
+ if(sources[i].getType() == IResource.FILE) {
+ assertTrue(testProject.getFile(sources[i].getName()).exists());
+ }
+ else if(sources[i].getType() == IResource.FOLDER) {
+ assertTrue(testProject.getFolder(sources[i].getName()).exists());
+ }
+ }
+
+ // Make sure the checksum was stored
+ assertNotNull(rpmProject.getProject().getPersistentProperty(new QualifiedName(RPMCorePlugin.ID,
+ IRPMConstants.CHECKSUM_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);
+ if(testProject == null) {
+ fail("Unable to create test project");
+ }
+
+ // Instantiate an RPMProject
+ IRPMProject rpmProject = RPMProjectFactory.getRPMProject(testProject);
+
+ // Find the test SRPM, install, and build-prep it
+ URL url = RPMCoreTestsPlugin.getDefault().find(new Path("resources" + file_sep + "srpms" + file_sep + //$NON-NLS-1$ //$NON-NLS-2$
+ "helloworld-2-2.src.rpm"));
+ if (url == null) {
+ fail("Unable to find resource" + file_sep + "srpms" + file_sep +
+ "helloworld-2-2.src.rpm");
+ }
+ File foo = new File(Platform.asLocalURL(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 testIsChangedHelloWorld() throws Exception {
+ // Create a project for the test
+ IProject testProject = root.getProject("testIsChangedHelloWorld");
+ testProject.create(monitor);
+ testProject.open(monitor);
+ if(testProject == null) {
+ fail("Unable to create test project");
+ }
+
+ // Instantiate an RPMProject
+ IRPMProject rpmProject = RPMProjectFactory.getRPMProject(testProject);
+
+ // Find the test SRPM and install it
+ URL url = RPMCoreTestsPlugin.getDefault().find(new Path("resources" + file_sep + "srpms" + file_sep + //$NON-NLS-1$ //$NON-NLS-2$
+ "helloworld-2-2.src.rpm"));
+ if (url == null) {
+ fail("Unable to find resource" + file_sep + "srpms" + file_sep +
+ "helloworld-2-2.src.rpm");
+ }
+ File foo = new File(Platform.asLocalURL(url).getPath());
+ rpmProject.importSourceRPM(foo);
+ assertFalse(rpmProject.isChanged());
+
+ testProject.delete(true, false, null);
+ }
+
+ public void testIsChangedHelloWorld1() throws Exception {
+ // Create a project for the test
+ IProject testProject = root.getProject("testIsChangedHelloWorld1");
+ testProject.create(monitor);
+ testProject.open(monitor);
+ if(testProject == null) {
+ fail("Unable to create test project");
+ }
+
+ // Instantiate an RPMProject
+ IRPMProject rpmProject = RPMProjectFactory.getRPMProject(testProject);
+
+ // Find the test SRPM and install it
+ URL url = RPMCoreTestsPlugin.getDefault().find(new Path("resources" + file_sep + "srpms" + file_sep + //$NON-NLS-1$ //$NON-NLS-2$
+ "helloworld-2-2.src.rpm"));
+ if (url == null) {
+ fail("Unable to find resource" + file_sep + "srpms" + file_sep +
+ "helloworld-2-2.src.rpm");
+ }
+ File foo = new File(Platform.asLocalURL(url).getPath());
+ rpmProject.importSourceRPM(foo);
+ IFile sourceFile = rpmProject.getProject().getFile("helloworld.cpp");
+ StringBufferInputStream foo1 = new StringBufferInputStream("/* */");
+ sourceFile.appendContents(foo1, false, false, null);
+ assertTrue(rpmProject.isChanged());
+
+ testProject.delete(true, false, null);
+ }
+
+ public void testBuildSourceRPMHelloWorld() throws Exception {
+ // Create a project for the test
+ IProject testProject = root.getProject("testBuildSourceRPMHelloWorld1");
+ testProject.create(monitor);
+ testProject.open(monitor);
+ if(testProject == null) {
+ fail("Unable to create test project");
+ }
+
+ // Instantiate an RPMProject
+ IRPMProject rpmProject = RPMProjectFactory.getRPMProject(testProject);
+
+ // Find the test SRPM and install it
+ URL url = RPMCoreTestsPlugin.getDefault().find(new Path("resources" + file_sep + "srpms" + file_sep + //$NON-NLS-1$ //$NON-NLS-2$
+ "helloworld-2-2.src.rpm"));
+ if (url == null) {
+ fail("Unable to find resource" + file_sep + "srpms" + file_sep +
+ "helloworld-2-2.src.rpm");
+ }
+ File foo = new File(Platform.asLocalURL(url).getPath());
+ rpmProject.importSourceRPM(foo);
+ RPMExportDelta export = new RPMExportDelta();
+ export.setSpecFile(rpmProject.getSpecFile().getFile());
+ export.setVersion("2");
+ export.setRelease("3");
+ rpmProject.buildSourceRPM(export);
+
+ IFile foo2 = rpmProject.getConfiguration().getSrpmsFolder().getFile("helloworld-2-3.src.rpm");
+ assertTrue(foo2.exists());
+
+ testProject.delete(true, false, null);
+ }
+
+ public void testBuildSourceRPMHelloWorld1() throws Exception {
+ // Create a project for the test
+ IProject testProject = root.getProject("testBuildSourceRPMHelloWorld");
+ testProject.create(monitor);
+ testProject.open(monitor);
+ if(testProject == null) {
+ fail("Unable to create test project");
+ }
+
+ // Instantiate an RPMProject
+ IRPMProject rpmProject = RPMProjectFactory.getRPMProject(testProject);
+
+ // Find the test SRPM and install it
+ URL url = RPMCoreTestsPlugin.getDefault().find(new Path("resources" + file_sep + "srpms" + file_sep + //$NON-NLS-1$ //$NON-NLS-2$
+ "helloworld-2-2.src.rpm"));
+ if (url == null) {
+ fail("Unable to find resource" + file_sep + "srpms" + file_sep +
+ "helloworld-2-2.src.rpm");
+ }
+ File foo = new File(Platform.asLocalURL(url).getPath());
+ rpmProject.importSourceRPM(foo);
+ IFile sourceFile = rpmProject.getProject().getFile("helloworld.cpp");
+ StringBufferInputStream foo1 = new StringBufferInputStream("/* */");
+ sourceFile.appendContents(foo1, false, false, null);
+ RPMExportDelta export = new RPMExportDelta();
+ export.setSpecFile(rpmProject.getSpecFile().getFile());
+ export.setVersion("2");
+ export.setRelease("4");
+ export.setPatchName("myPatchFFFFF.patch");
+ Date today = new Date();
+ SimpleDateFormat df = new SimpleDateFormat("E MMM dd yyyy"); //$NON-NLS-1$
+ export.setChangelogEntry("* " + df.format(today) + " Foo Bot <bot@foo.bar> 2-4" + line_sep +
+ "- Made test change" + line_sep);
+ rpmProject.buildSourceRPM(export);
+
+ // Make sure patch was created
+ assertTrue(rpmProject.getConfiguration().getSourcesFolder().getFile(export.getPatchName()).exists());
+
+ IFile foo2 = rpmProject.getConfiguration().getSrpmsFolder().getFile("helloworld-2-4.src.rpm");
+ assertTrue(foo2.exists());
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/internal/tests/SpecFileParserTest.java b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/internal/tests/SpecFileParserTest.java
new file mode 100644
index 0000000000..b84c0616bb
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/internal/tests/SpecFileParserTest.java
@@ -0,0 +1,100 @@
+/*
+ * (c) 2007 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+package org.eclipse.linuxtools.rpm.core.internal.tests;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.net.URL;
+
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.resources.IFile;
+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.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.linuxtools.rpm.core.internal.SpecFileParser;
+import org.eclipse.linuxtools.rpm.core.tests.RPMCoreTestsPlugin;
+
+public class SpecFileParserTest extends TestCase {
+
+ IWorkspace workspace;
+ IWorkspaceRoot root;
+ NullProgressMonitor monitor;
+ String pluginRoot;
+ final String file_sep = System.getProperty("file.separator"); //$NON-NLS-1$
+
+ public static TestSuite suite() {
+ return new TestSuite(SpecFileParserTest.class);
+ }
+
+ /*
+ * @see TestCase#setUp()
+ */
+ 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 testParseHelloWorld() throws Exception {
+ // Create a project for the test
+ IProject testProject = root.getProject("testHelloWorldSpec");
+ testProject.create(monitor);
+ testProject.open(monitor);
+ if(testProject == null) {
+ fail("Unable to create test project");
+ }
+
+ // Find the spec
+ URL url = RPMCoreTestsPlugin.getDefault().find(new Path("resources" + file_sep + "specs" + file_sep + //$NON-NLS-1$ //$NON-NLS-2$
+ "helloworld.spec"));
+ if (url == null) {
+ fail("Unable to find resource" + file_sep + "srpms" + file_sep +
+ "helloworld.spec");
+ }
+ File foo = new File(Platform.asLocalURL(url).getPath());
+
+ // Copy the spec into workspace
+ IFile specFile = testProject.getFile("helloworld.spec");
+ specFile.create(new FileInputStream(foo), false, null);
+ assertTrue(specFile.exists());
+
+ // Try parsing it
+ SpecFileParser parser = new SpecFileParser(specFile);
+ parser.parse();
+
+ // Make sure we parsed the spec correctly
+ String name = parser.getName();
+ assertTrue(name.equals("helloworld"));
+ String version = parser.getVersion();
+ assertTrue(version.equals("2"));
+ String release = parser.getRelease();
+ assertTrue(release.equals("2"));
+ assertTrue(parser.getConfigureArgs() == null);
+
+ // Clean up
+ testProject.delete(true, false, monitor);
+ }
+
+}
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..6358be9ad6
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/AllTests.java
@@ -0,0 +1,25 @@
+/*
+ * (c) 2004, 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+package org.eclipse.linuxtools.rpm.core.tests;
+
+
+import org.eclipse.linuxtools.rpm.core.internal.tests.RPMCoreInternalTestSuite;
+
+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.addTest(RPMCoreInternalTestSuite.suite());
+ suite.addTest(RPMCoreTestSuite.suite());
+ //$JUnit-END$
+ return suite;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMCoreTestSuite.java b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMCoreTestSuite.java
new file mode 100644
index 0000000000..895b90a4f4
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMCoreTestSuite.java
@@ -0,0 +1,23 @@
+/*
+ * (c) 2004, 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+package org.eclipse.linuxtools.rpm.core.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class RPMCoreTestSuite extends TestSuite {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite(
+ "Test for org.eclipse.linuxtools.rpm.core.tests");
+ //$JUnit-BEGIN$
+ suite.addTestSuite(RPMProjectNatureTest.class);
+ suite.addTestSuite(RPMProjectFactoryTest.class);
+ //$JUnit-END$
+ return suite;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMCoreTestsPlugin.java b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMCoreTestsPlugin.java
new file mode 100644
index 0000000000..45e9c7d54a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMCoreTestsPlugin.java
@@ -0,0 +1,76 @@
+/*
+ * (c) 2004, 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+package org.eclipse.linuxtools.rpm.core.tests;
+
+import org.eclipse.ui.plugin.*;
+import org.osgi.framework.BundleContext;
+import java.util.*;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class RPMCoreTestsPlugin extends AbstractUIPlugin {
+ //The shared instance.
+ private static RPMCoreTestsPlugin plugin;
+ //Resource bundle.
+ private ResourceBundle resourceBundle;
+
+ /**
+ * The constructor.
+ */
+ public RPMCoreTestsPlugin() {
+ super();
+ plugin = this;
+ try {
+ resourceBundle = ResourceBundle.getBundle("org.eclipse.linuxtools.rpm.core.tests.TestsPluginResources");
+ } catch (MissingResourceException x) {
+ resourceBundle = null;
+ }
+ }
+
+ /**
+ * This method is called upon plug-in activation
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /**
+ * This method is called when the plug-in is stopped
+ */
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance.
+ */
+ public static RPMCoreTestsPlugin getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Returns the string from the plugin's resource bundle,
+ * or 'key' if not found.
+ */
+ public static String getResourceString(String key) {
+ ResourceBundle bundle = RPMCoreTestsPlugin.getDefault().getResourceBundle();
+ try {
+ return (bundle != null) ? bundle.getString(key) : key;
+ } catch (MissingResourceException e) {
+ return key;
+ }
+ }
+
+ /**
+ * Returns the plugin's resource bundle,
+ */
+ public ResourceBundle getResourceBundle() {
+ return resourceBundle;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectFactoryTest.java b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectFactoryTest.java
new file mode 100644
index 0000000000..8ff147f334
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectFactoryTest.java
@@ -0,0 +1,62 @@
+/*
+ * (c) 2007 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+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.IRPMProject;
+import org.eclipse.linuxtools.rpm.core.RPMProjectFactory;
+
+public class RPMProjectFactoryTest extends TestCase {
+
+ IWorkspace workspace;
+ IWorkspaceRoot root;
+ NullProgressMonitor monitor;
+ String pluginRoot;
+ final String file_sep = System.getProperty("file.separator"); //$NON-NLS-1$
+
+ /*
+ * @see TestCase#setUp()
+ */
+ 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 testGetNewProject() throws Exception {
+ // Create a project for the test
+ IProject testProject = root.getProject("testHelloWorld");
+ testProject.create(monitor);
+ testProject.open(monitor);
+ if(testProject == null) {
+ fail("Unable to create test project");
+ }
+
+ IRPMProject rpmProject = RPMProjectFactory.getRPMProject(testProject);
+ assertNotNull(rpmProject);
+ testProject.delete(true, false, monitor);
+ }
+}
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..c3bd064409
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/RPMProjectNatureTest.java
@@ -0,0 +1,59 @@
+/*
+ * (c) 2007 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+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()
+ */
+ 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);
+ if(testProject == null) {
+ fail("Unable to create test project");
+ }
+ 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/.classpath b/rpm/org.eclipse.linuxtools.rpm.core/.classpath
new file mode 100644
index 0000000000..ce73933404
--- /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.4"/>
+ <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/.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..a46bb53d1d
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/ChangeLog
@@ -0,0 +1,435 @@
+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..abe42eba14
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: RPM Core Plug-in (Incubation)
+Bundle-SymbolicName: org.eclipse.linuxtools.rpm.core;singleton:=true
+Bundle-Version: 3.0.0
+Bundle-Activator: org.eclipse.linuxtools.rpm.core.RPMCorePlugin
+Bundle-Localization: plugin
+Bundle-Vendor: Eclipse.org
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-Classpath: RPMCore.jar
+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.internal;x-internal:=true,
+ org.eclipse.linuxtools.rpm.core.utils,
+ org.eclipse.linuxtools.rpm.core.utils.internal;x-internal:=true
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.newlib/about.html b/rpm/org.eclipse.linuxtools.rpm.core/about.html
index 44e229003e..44e229003e 100644
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.newlib/about.html
+++ b/rpm/org.eclipse.linuxtools.rpm.core/about.html
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..2cd00e1a00
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/build.properties
@@ -0,0 +1,23 @@
+###############################################################################
+# (c) 2004 Red Hat, Inc.
+#
+# This program is open source software licensed under the
+# Eclipse Public License ver. 1
+#
+###############################################################################
+
+source.RPMCore.jar = src/
+bin.includes = plugin.xml,\
+ *.jar,\
+ RPMCore.jar,\
+ about.html,\
+ META-INF/
+src.includes = .classpath,\
+ .project,\
+ .template,\
+ ChangeLog,\
+ about.html,\
+ build.properties,\
+ plugin.xml,\
+ src/,\
+ META-INF/
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..a76cafac0e
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/plugin.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+ <extension
+ id="rpmnature"
+ name="RPM Project Nature"
+ point="org.eclipse.core.resources.natures">
+ <runtime>
+ <run class="org.eclipse.linuxtools.rpm.core.RPMProjectNature"></run>
+ </runtime>
+ </extension>
+
+</plugin>
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IPatch.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IPatch.java
new file mode 100644
index 0000000000..6a18234f02
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IPatch.java
@@ -0,0 +1,57 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+package org.eclipse.linuxtools.rpm.core;
+
+import org.eclipse.core.resources.IFile;
+
+/**
+ * Represents a patch to a source RPM.
+ */
+public interface IPatch {
+
+ /**
+ * Returns the spec file ChangeLog entry associated with this patch.
+ * @return the ChangeLog entry, or <code>null</code> if not set
+ */
+ public String getChangelogEntry();
+
+ /**
+ * Sets the spec file ChangeLog entry associated with this patch.
+ * @param changelogEntry the ChangeLog entry
+ */
+ public void setChangelogEntry(String changelogEntry);
+
+ /**
+ * Returns the workspace patch file that contains the source code diffs
+ * associated with this patch.
+ * @return the patch file, or <code>null</code> if not set
+ */
+ public IFile getFile();
+
+ /**
+ * Sets the workspace patch file that contains the source code diffs
+ * associated with this patch.
+ * @param file the patch file
+ */
+ public void setFile(IFile file);
+
+ /**
+ * Returns the name of the patch file.
+ * @return the patch file name, or <code>null</code> if not set.
+ */
+ public String getPatchName();
+
+ /**
+ * Sets the name of the patch file. Note that if the workspace patch file has
+ * already been set using <code>setFile</code>, this method will not modify the
+ * name of the patch file on disk.
+ * @param patchName the name of the patch file
+ */
+ public void setPatchName(String patchName);
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IRPMConfiguration.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IRPMConfiguration.java
new file mode 100644
index 0000000000..162b1106c1
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IRPMConfiguration.java
@@ -0,0 +1,50 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+package org.eclipse.linuxtools.rpm.core;
+
+import org.eclipse.core.resources.IFolder;
+
+/**
+ * Represents an RPM configuration associated with an RPM project.
+ * An RPM configuration contains information about RPM folder locations
+ * and other RPM macro definitions.
+ *
+ */
+public interface IRPMConfiguration {
+
+ /**
+ * Returns the workspace folder containing RPM build artifacts.
+ * @return the build folder
+ */
+ public IFolder getBuildFolder();
+
+ /**
+ * Returns the workspace folder containing binary RPMs.
+ * @return the RPMs folder
+ */
+ public IFolder getRpmsFolder();
+
+ /**
+ * Returns the workspace folder containing RPM sources artifacts.
+ * @return the sources folder
+ */
+ public IFolder getSourcesFolder();
+
+ /**
+ * Returns the workspace folder containing RPM spec files.
+ * @return the spec files folder
+ */
+ public IFolder getSpecsFolder();
+
+ /**
+ * Returns the workspace folder containing source RPMs.
+ * @return the source RPMs folder
+ */
+ public IFolder getSrpmsFolder();
+
+}
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..89fca76a32
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IRPMConstants.java
@@ -0,0 +1,114 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+package org.eclipse.linuxtools.rpm.core;
+
+import org.eclipse.linuxtools.rpm.core.internal.Messages;
+
+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 author's name.
+ */
+ public static final String AUTHOR_NAME = "AUTHOR_NAME"; //$NON-NLS-1$
+
+ /**
+ * Contains the name of the preference store key for storing and retrieving
+ * the author's email address.
+ */
+ public static final String AUTHOR_EMAIL = "AUTHOR_EMAIL"; //$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/IRPMProject.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IRPMProject.java
new file mode 100644
index 0000000000..987d9432c8
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/IRPMProject.java
@@ -0,0 +1,157 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+package org.eclipse.linuxtools.rpm.core;
+
+import java.io.File;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * Represents an RPM project.
+ *
+ */
+public interface IRPMProject {
+
+ /**
+ * Prepares the sources for the RPM project according to the directives
+ * in the project's spec file. This method deposits prepared sources
+ * in the project's BUILD directory. This method is the equivalent of
+ * executing <code>rpmbuild -bp /path/to/specfile.spec</code> on the
+ * command line.
+ * @throws CoreException if:
+ * <ul>
+ * <li>The project's BUILD directory cannot be refreshed</li>
+ * <li><code>rpmbuild</code> execution fails</li>
+ * <li>The project is not an RPM project (a source RPM has not been imported)</li>
+ * </ul>
+ */
+ public void buildPrep() throws CoreException;
+
+ /**
+ * Builds both a source RPM and a binary RPM according to the directives
+ * in the project's spec file. This method deposits the binary and source
+ * RPMs into the project's RPMS and SRPMS directories, respectively.
+ * This method will modify the project model and project spec file according
+ * to the given export deltas. This method will also refresh the project
+ * sources with the new project model when the export operation is complete.
+ * @param export the deltas associated with the export operation
+ * @throws CoreException if:
+ * <ul>
+ * <li>Updating the RPM project model fails</li>
+ * <li><code>rpmbuild</code> execution fails</li>
+ * <li>Refreshing project sources fails</li>
+ * <li>The project is not an RPM project (a source RPM has not been imported)</li>
+ * </ul>
+ */
+ public void buildAll(RPMExportDelta export) throws CoreException;
+
+ /**
+ * Builds a binary RPM according to the directives in the project's spec file.
+ * This method deposits the binary RPM(s) into the project's RPMS directory.
+ * This method will modify the project model and project spec file according
+ * to the given export deltas. This method will also refresh the project
+ * sources with the new project model when the export operation is complete.
+ * @param export the deltas associated with the export operation
+ * @throws CoreException if:
+ * <ul>
+ * <li>Updating the RPM project model fails</li>
+ * <li><code>rpmbuild</code> execution failse</li>
+ * <li>Refreshing project sources fails</li>
+ * <li>The project is not an RPM project (a source RPM has not been imported)</li>
+ * </ul>
+ */
+ public void buildBinaryRPM(RPMExportDelta export) throws CoreException;
+
+ /**
+ * Builds a source RPM according to the directives in the project's spec file.
+ * This method deposits the source RPM into the project's RPMS directory.
+ * This method will modify the project model and project spec file according
+ * to the given export deltas. This method will also refresh the project
+ * sources with the new project model when the export operation is complete.
+ * @param export the deltas associated with the export operation
+ * @throws CoreException if:
+ * <ul>
+ * <li>Updating the RPM project model fails</li>
+ * <li><code>rpmbuild</code> execution failse</li>
+ * <li>Refreshing project sources fails</li>
+ * <li>The project is not an RPM project (a source RPM has not been imported)</li>
+ * </ul>
+ */
+ public void buildSourceRPM(RPMExportDelta export) throws CoreException;
+
+ /**
+ * Imports an external source RPM into the project and installs project
+ * sources. This method also adds an RPM nature to the project.
+ * @param externalFile the external source RPM
+ * @throws CoreException if:
+ * <ul>
+ * <li>The external source RPM cannot be accessed</li>
+ * <li>Source installation fails</li>
+ * <li>Spec file parsing error occurs</li>
+ * <li>Calculating project checksum fails</li>
+ * </ul>
+ */
+ public void importSourceRPM(File externalFile) throws CoreException;
+
+ /**
+ * Returns whether the project has been modified since it has been imported.
+ * @return true if the project has been modified, false if it has not
+ * @throws CoreException if:
+ * <ul>
+ * <li>Calculating project checksum fails</li>
+ * </ul>
+ */
+ public boolean isChanged() throws CoreException;
+
+ /**
+ * Returns the project handle associated with the RPM project.
+ * @return the project handle
+ */
+ public IProject getProject();
+
+ /**
+ * Returns the RPM configuration associated with the RPM project.
+ * @return the RPM configuration
+ */
+ public IRPMConfiguration getConfiguration();
+
+ /**
+ * Returns the source RPM associated with the RPM project.
+ * @return the source RPM, or <code>null</code> if no source RPM
+ * has been imported
+ */
+ public ISourceRPM getSourceRPM();
+
+ /**
+ * Sets the source RPM associated with the RPM project.
+ * @param sourceRPM the source RPM
+ * @throws CoreException if:
+ * <ul>
+ * <li>Setting the project property associated with the source RPM fails</li>
+ * </ul>
+ */
+ public void setSourceRPM(ISourceRPM sourceRPM) throws CoreException;
+
+ /**
+ * Returns the spec file associated with the RPM project.
+ * @return the spec file, or <code>null</code> if no source RPM
+ * has been imported
+ */
+ public ISpecFile getSpecFile();
+
+ /**
+ * Sets the spec file associated with the RPM project.
+ * @param specFile the spec file
+ * @throws CoreException if:
+ * <ul>
+ * <li>Setting the project property associated with the spec file fails</li>
+ * </ul>
+ */
+ public void setSpecFile(ISpecFile specFile) throws CoreException;
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/ISourceRPM.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/ISourceRPM.java
new file mode 100644
index 0000000000..8534abd6f5
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/ISourceRPM.java
@@ -0,0 +1,43 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+package org.eclipse.linuxtools.rpm.core;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+
+/**
+ * Represents a source RPM in an RPM project.
+ *
+ */
+public interface ISourceRPM {
+
+ /**
+ * Returns the workspace file associated with the source RPM.
+ * @return the source RPM file
+ */
+ public IFile getFile();
+
+ /**
+ * Returns the folder contained within the RPM BUILD directory
+ * that contains the project sources. Typically, this is the
+ * directory that is installed in the BUILD directory after unpacking
+ * the project sources during source preparation.
+ * @return the source RPM sources folder, or <code>null</code> if
+ * none exists
+ */
+ public IFolder getSourcesFolder();
+
+ /**
+ * Sets the folder contained within the RPM BUILD directory that
+ * contains the project sources. Typically, this is the directory
+ * that is installed in the BUILD directory after unpacking the
+ * project sources during source preparation.
+ * @param folder the source RPM sources folder
+ */
+ public void setSourcesFolder(IFolder folder);
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/ISpecFile.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/ISpecFile.java
new file mode 100644
index 0000000000..eed56a1b51
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/ISpecFile.java
@@ -0,0 +1,92 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+package org.eclipse.linuxtools.rpm.core;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * Represents a spec file in an RPM project.
+ *
+ */
+public interface ISpecFile {
+
+ /**
+ * Adds a patch to the spec file. Changes to the spec file are not
+ * reflected on-disk until the write method is called.
+ * @param patch the patch to add
+ */
+ public void addPatch(IPatch patch);
+
+ /**
+ * Returns the workspace file handle for the spec file.
+ * @return the spec file handle
+ */
+ public IFile getFile();
+
+ /**
+ * Returns the spec file's configure arguments. For projects that
+ * contain a <code>configure</code> script, the spec file typically
+ * contains a <code>%configure</code> directive followed by a list
+ * of arguments. Not all spec files contain this directive.
+ * @return the configure arguments, or <code>null</code> if none present
+ */
+ public String getConfigureArgs();
+
+ /**
+ * Returns the name of the RPM project according to the spec file's
+ * directives.
+ * @return the RPM project name
+ */
+ public String getName();
+
+ /**
+ * Sets the name of the RPM project. Changes to the spec file are
+ * not reflected on-disk until the write method is called.
+ * @param name the RPM project name
+ */
+ public void setName(String name);
+
+ /**
+ * Returns the version of the RPM project according to the spec file's
+ * directives.
+ * @return the RPM project version
+ */
+ public String getVersion();
+
+ /**
+ * Sets the version of the RPM project. Changes to the spec file
+ * are not reflected on-disk until the write method is called.
+ * @param version the RPM project version
+ */
+ public void setVersion(String version);
+
+ /**
+ * Returns the release of the RPM project according to the spec
+ * file's directives.
+ * @return the RPM project release
+ */
+ public String getRelease();
+
+ /**
+ * Sets the release of the RPM proejct. Changes to the spec file
+ * are not reflected on-disk until the write method is called.
+ * @param release the RPM project release
+ */
+ public void setRelease(String release);
+
+ /**
+ * Writes the current spec file model to disk.
+ * @throws CoreException if:
+ * <ul>
+ * <li>Parsing the spec file fails</li>
+ * <li>Writing to the spec file fails</li>
+ * </ul>
+ */
+ public void write() throws CoreException;
+
+}
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..0ec50c20f7
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMCorePlugin.java
@@ -0,0 +1,176 @@
+/*
+ * (c) 2004, 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+package org.eclipse.linuxtools.rpm.core;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.UnknownHostException;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.linuxtools.rpm.core.internal.Messages;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class RPMCorePlugin extends AbstractUIPlugin {
+ //The shared instance.
+ private static RPMCorePlugin plugin;
+ //Resource bundle.
+ private ResourceBundle resourceBundle;
+ //Shell script shared by all external operations
+ private File shellScriptFile;
+ //Log file shared by all external operations
+ private File externalLogFile;
+
+ public static final String ID = "org.eclipse.linuxtools.rpm.core";
+
+
+ /**
+ * The constructor.
+ */
+ public RPMCorePlugin() {
+ //super();
+ plugin = this;
+ try {
+ resourceBundle= ResourceBundle.getBundle("org.eclipse.linuxtools.rpm.core.RPMPluginResources"); //$NON-NLS-1$
+ } catch (MissingResourceException x) {
+ resourceBundle = null;
+ }
+ }
+
+ /**
+ * Returns the shared instance.
+ */
+ public static RPMCorePlugin getDefault() {
+ return plugin;
+ }
+
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /**
+ * This method is called when the plug-in is stopped
+ */
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ }
+
+ /**
+ * Returns the workspace instance.
+ */
+ public static IWorkspace getWorkspace() {
+ return RPMCorePlugin.getWorkspace();
+ }
+
+ /**
+ * Returns the string from the plugin's resource bundle,
+ * or 'key' if not found.
+ */
+ public static String getResourceString(String key) {
+ ResourceBundle bundle= RPMCorePlugin.getDefault().getResourceBundle();
+ try {
+ return bundle.getString(key);
+ } catch (MissingResourceException e) {
+ return key;
+ }
+ }
+
+ /**
+ * Returns the plugin's resource bundle,
+ */
+ public ResourceBundle getResourceBundle() {
+ return resourceBundle;
+ }
+
+ protected void initializeDefaultPreferences(IPreferenceStore store)
+ {
+ String user_name = System.getProperty("user.name");
+ 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.AUTHOR_NAME, user_name);
+ store.setDefault(IRPMConstants.AUTHOR_EMAIL, user_name + "@" + getHostName()); //$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$
+ }
+
+
+ //Note this method is not thread-safe
+ public File getShellScriptFile() throws CoreException {
+ if(shellScriptFile == null) {
+ try {
+ shellScriptFile = File.createTempFile(RPMCorePlugin.ID, ".sh"); //$NON-NLS-1$
+ } catch(IOException e) {
+ String throw_message = Messages.getString("RPMCore.Error_creating__1") + //$NON-NLS-1$
+ shellScriptFile.getAbsolutePath();
+ IStatus error = new Status(IStatus.ERROR, IRPMConstants.ERROR, 1,
+ throw_message, null);
+ throw new CoreException(error);
+ }
+ }
+ return shellScriptFile;
+ }
+
+ //Note this method is not thread-safe
+ public File getExternalLogFile() throws CoreException {
+ if(externalLogFile == null) {
+ try {
+ externalLogFile = File.createTempFile(RPMCorePlugin.ID, ".log"); //$NON-NLS-1$
+ } catch(IOException e) {
+ String throw_message = Messages.getString("RPMCore.Error_creating__1") + //$NON-NLS-1$
+ externalLogFile.getAbsolutePath();
+ IStatus error = new Status(IStatus.ERROR, IRPMConstants.ERROR, 1,
+ throw_message, null);
+ throw new CoreException(error);
+ }
+ }
+ return externalLogFile;
+ }
+
+ /**
+ * Method getHostName gets the name of the host to use as part of the
+ * e-mail address for the changelog entry in the spec file.
+ * @return String containing the name of the host, "" if error
+ */
+ public static String getHostName()
+ {
+ String hostname;
+ try {
+ hostname = java.net.InetAddress.getLocalHost().getHostName();
+ } catch (UnknownHostException e) {
+ return "";
+ }
+ // Trim off superflous stuff from the hostname
+ int firstdot = hostname.indexOf("."); //$NON-NLS-1$
+ int lastdot = hostname.lastIndexOf("."); //$NON-NLS-1$
+ // If the two are equal, no need to trim name
+ if (firstdot == lastdot) {
+ return hostname;
+ }
+ String hosttemp = ""; //$NON-NLS-1$
+ String hosttemp2 = hostname;
+ while (firstdot != lastdot) {
+ hosttemp = hosttemp2.substring(lastdot) + hosttemp;
+ hosttemp2 = hostname.substring(0,lastdot);
+ lastdot = hosttemp2.lastIndexOf("."); //$NON-NLS-1$
+ }
+ return hosttemp.substring(1);
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMExportDelta.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMExportDelta.java
new file mode 100644
index 0000000000..d828b4a450
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMExportDelta.java
@@ -0,0 +1,107 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+package org.eclipse.linuxtools.rpm.core;
+
+import org.eclipse.core.resources.IFile;
+
+/**
+ * Represents a set of changes (delta) to be made to the RPM project
+ * model during export.
+ *
+ */
+public class RPMExportDelta {
+
+ private IFile specFile;
+ private String version;
+ private String release;
+ private String patchName;
+ private String changelogEntry;
+
+ /**
+ * Returns the ChangeLog entry associated with the export delta.
+ * @return the ChangeLog entry, or <code>null</code> if none set
+ */
+ public String getChangelogEntry() {
+ return changelogEntry;
+ }
+
+ /**
+ * Sets the ChangeLog entry associated with the export delta.
+ * @param changelogEntry the ChangeLog entry
+ */
+ public void setChangelogEntry(String changelogEntry) {
+ this.changelogEntry = changelogEntry;
+ }
+
+ /**
+ * Returns the name of the patch file associated with the export delta.
+ * @return the patch file name, or <code>null</code> if none set
+ */
+ public String getPatchName() {
+ return patchName;
+ }
+
+ /**
+ * Sets the name of the patch file associated with the export delta.
+ * @param patchName the patch file name
+ */
+ public void setPatchName(String patchName) {
+ this.patchName = patchName;
+ }
+
+ /**
+ * Returns the release associated with the export delta.
+ * @return the release
+ */
+ public String getRelease() {
+ return release;
+ }
+
+ /**
+ * Sets the release associated with the export delta.
+ * @param release the release
+ */
+ public void setRelease(String release) {
+ this.release = release;
+ }
+
+ /**
+ * Returns the workspace file handle for the spec file associated
+ * with this export delta.
+ * @return the spec file handle
+ */
+ public IFile getSpecFile() {
+ return specFile;
+ }
+
+ /**
+ * Sets the workspace file handle for the spec file associated
+ * with this export delta.
+ * @param specFile the spec file handle
+ */
+ public void setSpecFile(IFile specFile) {
+ this.specFile = specFile;
+ }
+
+ /**
+ * Returns the the version associated with the export delta.
+ * @return the version
+ */
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ * Sets the version associated with the export delta.
+ * @param version the version
+ */
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProjectFactory.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProjectFactory.java
new file mode 100644
index 0000000000..45df847c88
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProjectFactory.java
@@ -0,0 +1,83 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+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.IStatus;
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.linuxtools.rpm.core.internal.Messages;
+import org.eclipse.linuxtools.rpm.core.internal.RPMProject;
+import org.eclipse.linuxtools.rpm.core.internal.SourceRPM;
+import org.eclipse.linuxtools.rpm.core.internal.SpecFile;
+
+/**
+ * Factory class for obtaining an instance of an RPM project.
+ *
+ */
+public class RPMProjectFactory {
+
+ private RPMProjectFactory() {
+ }
+
+ /**
+ * Returns an instance of an RPM project given a workspace project.
+ * If the given project has an RPM nature (a source RPM was previously
+ * imported), the RPM project model will be reconstructed. Otherwise,
+ * the given project will be initialized with the default properties of a
+ * new RPM project. Note that an RPM project is not given an RPM nature
+ * until an import operation has been completed.
+ * @param project the workspace project to use in constructing an RPM project
+ * @return an RPM project
+ * @throws CoreException if:
+ * <ul>
+ * <li>Initializing the RPM project configuration fails</li>
+ * <li>Reconstructing the existing RPM project model fails</li>
+ * </ul>
+ */
+ public static IRPMProject getRPMProject(IProject project) throws CoreException {
+ IRPMProject rpmProject = new RPMProject(project);
+
+ if(project.hasNature(RPMProjectNature.RPM_NATURE_ID)) {
+ // Construct the project's source RPM object
+ String sourceRPMName =
+ project.getPersistentProperty(new QualifiedName(RPMCorePlugin.ID, IRPMConstants.SRPM_PROPERTY));
+ if(sourceRPMName != null) {
+ IFolder srpmsFolder = rpmProject.getConfiguration().getSrpmsFolder();
+ ISourceRPM sourceRPM = new SourceRPM(srpmsFolder.getFile(sourceRPMName));
+ rpmProject.setSourceRPM(sourceRPM);
+ }
+ else {
+ String throw_message = Messages.getString("RPMCore.RPMProjectFactory.0"); //$NON-NLS-1$
+ IStatus error = new Status(IStatus.ERROR, IRPMConstants.ERROR, 1,
+ throw_message, null);
+ throw new CoreException(error);
+ }
+
+ // Construct the project's spec file object
+ String specFileName =
+ project.getPersistentProperty(new QualifiedName(RPMCorePlugin.ID, IRPMConstants.SPEC_FILE_PROPERTY));
+ if(specFileName != null) {
+ ISpecFile specFile =
+ new SpecFile(rpmProject.getConfiguration().getSpecsFolder().getFile(specFileName));
+ rpmProject.setSpecFile(specFile);
+ }
+ else {
+ String throw_message = Messages.getString("RPMCore.RPMProjectFactory.1"); //$NON-NLS-1$
+ IStatus error = new Status(IStatus.ERROR, IRPMConstants.ERROR, 1,
+ throw_message, null);
+ throw new CoreException(error);
+ }
+ }
+
+ return rpmProject;
+ }
+
+}
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..dd5162dfba
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/RPMProjectNature.java
@@ -0,0 +1,121 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+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 newNatures = new ArrayList(Arrays.asList(prevNatures));
+ newNatures.remove(natureId);
+ description.setNatureIds((String[]) 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/internal/Messages.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/Messages.java
new file mode 100644
index 0000000000..eb4c8880ca
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/Messages.java
@@ -0,0 +1,28 @@
+/*
+ * (c) 2004, 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+package org.eclipse.linuxtools.rpm.core.internal;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.rpm.core.internal.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/internal/Patch.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/Patch.java
new file mode 100644
index 0000000000..22ba1ad006
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/Patch.java
@@ -0,0 +1,38 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+package org.eclipse.linuxtools.rpm.core.internal;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.linuxtools.rpm.core.IPatch;
+
+public class Patch implements IPatch {
+
+ private String changelogEntry;
+ private String patchName;
+ private IFile file;
+
+ public String getChangelogEntry() {
+ return changelogEntry;
+ }
+ public void setChangelogEntry(String changelogEntry) {
+ this.changelogEntry = changelogEntry;
+ }
+ public IFile getFile() {
+ return file;
+ }
+ public void setFile(IFile file) {
+ this.file = file;
+ }
+ public String getPatchName() {
+ return patchName;
+ }
+ public void setPatchName(String patchName) {
+ this.patchName = patchName;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/RPMConfiguration.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/RPMConfiguration.java
new file mode 100644
index 0000000000..484c464f14
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/RPMConfiguration.java
@@ -0,0 +1,143 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+package org.eclipse.linuxtools.rpm.core.internal;
+
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.linuxtools.rpm.core.IRPMConfiguration;
+import org.eclipse.linuxtools.rpm.core.IRPMConstants;
+import org.eclipse.linuxtools.rpm.core.RPMCorePlugin;
+
+public class RPMConfiguration implements IRPMConfiguration {
+
+ 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);
+ 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);
+ 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);
+ 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);
+ 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);
+ 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/internal/RPMProject.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/RPMProject.java
new file mode 100644
index 0000000000..c5d5d15d76
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/RPMProject.java
@@ -0,0 +1,419 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+package org.eclipse.linuxtools.rpm.core.internal;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.Vector;
+
+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.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.linuxtools.rpm.core.IPatch;
+import org.eclipse.linuxtools.rpm.core.IRPMConfiguration;
+import org.eclipse.linuxtools.rpm.core.IRPMConstants;
+import org.eclipse.linuxtools.rpm.core.IRPMProject;
+import org.eclipse.linuxtools.rpm.core.ISourceRPM;
+import org.eclipse.linuxtools.rpm.core.ISpecFile;
+import org.eclipse.linuxtools.rpm.core.RPMCorePlugin;
+import org.eclipse.linuxtools.rpm.core.RPMExportDelta;
+import org.eclipse.linuxtools.rpm.core.RPMProjectNature;
+import org.eclipse.linuxtools.rpm.core.utils.Diff;
+import org.eclipse.linuxtools.rpm.core.utils.RPM;
+import org.eclipse.linuxtools.rpm.core.utils.RPMBuild;
+
+public class RPMProject implements IRPMProject {
+
+ private IProject project;
+ private ISourceRPM sourceRPM;
+ private ISpecFile specFile;
+ private IRPMConfiguration rpmConfig;
+
+ public RPMProject(IProject project) throws CoreException {
+ this.project = project;
+ rpmConfig = new RPMConfiguration(this.project);
+ }
+
+ public IProject getProject() {
+ return project;
+ }
+
+ public ISourceRPM getSourceRPM() {
+ return sourceRPM;
+ }
+
+ public void setSourceRPM(ISourceRPM sourceRPM) throws CoreException {
+ this.sourceRPM = sourceRPM;
+ getProject().setPersistentProperty(new QualifiedName(RPMCorePlugin.ID,
+ IRPMConstants.SRPM_PROPERTY), sourceRPM.getFile().getName());
+ }
+
+ public IRPMConfiguration getConfiguration() {
+ return rpmConfig;
+ }
+
+ public ISpecFile getSpecFile() {
+ return specFile;
+ }
+
+ public void setSpecFile(ISpecFile specFile) throws CoreException {
+ this.specFile = specFile;
+ getProject().setPersistentProperty(new QualifiedName(RPMCorePlugin.ID,
+ IRPMConstants.SPEC_FILE_PROPERTY), specFile.getFile().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 = {};
+ 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(new SpecFile(getConfiguration().getSpecsFolder().getFile(installedSpecs[0].getName())));
+
+ // Prepare the sources
+ buildPrep();
+ getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
+
+ // Copy sources from build root
+ copySources();
+
+ // Set the project nature
+ RPMProjectNature.addRPMNature(getProject(), null);
+
+ // Generate and store project checksum
+ long checksum = generateProjectChecksum(getProject().getLocation().toOSString(), 0);
+ getProject().setPersistentProperty(new QualifiedName(RPMCorePlugin.ID,
+ IRPMConstants.CHECKSUM_PROPERTY), new Long(checksum).toString());
+ }
+
+ public void buildAll(RPMExportDelta exportOp) throws CoreException {
+ prepareExport(exportOp);
+ RPMBuild rpmbuild = new RPMBuild(getConfiguration());
+ rpmbuild.buildAll(getSpecFile().getFile());
+
+ getConfiguration().getBuildFolder().refreshLocal(IResource.DEPTH_INFINITE, null);
+ getConfiguration().getRpmsFolder().refreshLocal(IResource.DEPTH_INFINITE, null);
+ getConfiguration().getSrpmsFolder().refreshLocal(IResource.DEPTH_INFINITE, null);
+ buildPrep();
+ copySources();
+ }
+
+ public void buildBinaryRPM(RPMExportDelta exportOp) throws CoreException {
+ prepareExport(exportOp);
+ RPMBuild rpmbuild = new RPMBuild(getConfiguration());
+ rpmbuild.buildBinary(getSpecFile().getFile());
+
+ getConfiguration().getBuildFolder().refreshLocal(IResource.DEPTH_INFINITE, null);
+ getConfiguration().getRpmsFolder().refreshLocal(IResource.DEPTH_INFINITE, null);
+ }
+
+ public void buildSourceRPM(RPMExportDelta exportOp) throws CoreException {
+ prepareExport(exportOp);
+ RPMBuild rpmbuild = new RPMBuild(getConfiguration());
+ rpmbuild.buildSource(getSpecFile().getFile());
+
+ getConfiguration().getBuildFolder().refreshLocal(IResource.DEPTH_INFINITE, null);
+ getConfiguration().getSrpmsFolder().refreshLocal(IResource.DEPTH_INFINITE, null);
+ buildPrep();
+ copySources();
+ }
+
+ public void buildPrep() throws CoreException {
+ RPMBuild rpmbuild = new RPMBuild(getConfiguration());
+ rpmbuild.buildPrep(getSpecFile().getFile());
+ getConfiguration().getBuildFolder().refreshLocal(IResource.DEPTH_INFINITE, null);
+ IResource[] sources = getConfiguration().getBuildFolder().members();
+ // If there is one folder, assume it contains all the sources
+ if(sources.length == 1 && sources[0].getType() == IResource.FOLDER) {
+ IFolder foo = getProject().getFolder(sources[0].getProjectRelativePath());
+ getSourceRPM().setSourcesFolder(foo);
+ }
+ }
+
+ public boolean isChanged() throws CoreException {
+ getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
+ String originalSumStr = getProject().getPersistentProperty(new QualifiedName(RPMCorePlugin.ID,
+ IRPMConstants.CHECKSUM_PROPERTY));
+ long currSum = generateProjectChecksum(getProject().getLocation().toOSString(), 0);
+ return (new Long(originalSumStr).longValue()) != currSum;
+ }
+
+ /**
+ * Copies sources from the project's BUILD directory to the project root.
+ * @throws CoreException if copying fails
+ */
+ private void copySources() throws CoreException {
+ //Copy all sources to the project root
+ IResource[] sources = null;
+ if(getSourceRPM().getSourcesFolder() != null) {
+ sources = getSourceRPM().getSourcesFolder().members();
+ } else {
+ getConfiguration().getBuildFolder().members();
+ }
+ for(int i=0; i < sources.length; i++) {
+ IPath path = getProject().getFullPath().addTrailingSeparator();
+ path = path.append(sources[i].getName());
+ if(sources[i].getType() == IResource.FILE) {
+ IFile oldFile = getProject().getParent().getFile(path);
+ IFile newFile =
+ getProject().getFile(sources[i].getProjectRelativePath());
+ if(oldFile.exists()) {
+ oldFile.setContents(newFile.getContents(), false, true, null);
+ } else {
+ sources[i].copy(path, false, null);
+ }
+ } else if(sources[i].getType() == IResource.FOLDER) {
+ IFolder oldDir = getProject().getParent().getFolder(path);
+ if(oldDir.exists()) {
+ oldDir.delete(false, true, null);
+ }
+ sources[i].copy(path, false, null);
+ }
+ }
+ getProject().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(RPMExportDelta exportOp) 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);
+ }
+
+ // We need to reset the spec file (which may be user-defined)
+ if(exportOp.getSpecFile() != null &&
+ !getSpecFile().getFile().getProjectRelativePath().equals(exportOp.getSpecFile().getProjectRelativePath())) {
+ setSpecFile(new SpecFile(exportOp.getSpecFile()));
+ }
+ else {
+ setSpecFile(new SpecFile(getSpecFile().getFile()));
+ }
+
+ boolean patchNeeded = isChanged();
+ if (exportOp.getVersion().equals(getSpecFile().getVersion()) &&
+ exportOp.getRelease().equals(getSpecFile().getRelease()) && !patchNeeded) {
+ return;
+ }
+
+ getSpecFile().setVersion(exportOp.getVersion());
+ getSpecFile().setRelease(exportOp.getRelease());
+ if(patchNeeded) {
+ //Do a buildPrep again to make sure the BUILD folder is pristine
+ buildPrep();
+ getSpecFile().addPatch(generatePatch(exportOp));
+ //Generate and store new project checksum
+ long checksum = generateProjectChecksum(getProject().getLocation().toOSString(), 0);
+ getProject().setPersistentProperty(new QualifiedName(RPMCorePlugin.ID,
+ IRPMConstants.CHECKSUM_PROPERTY), new Long(checksum).toString());
+ }
+ // write changes to spec file on disk
+ getSpecFile().write();
+
+ getConfiguration().getSourcesFolder().refreshLocal(IResource.DEPTH_INFINITE, null);
+ getConfiguration().getSpecsFolder().refreshLocal(IResource.DEPTH_INFINITE, null);
+ }
+
+ /**
+ * Generates a patch given a project's export delta.
+ * @param exportOp the export delta
+ * @return the patch
+ * @throws CoreException if:
+ * <ul>
+ * <li>The supplied patch name already exists</li>
+ * <li>Patch generation fails</li>
+ * </ul>
+ */
+ private IPatch generatePatch(RPMExportDelta exportOp) throws CoreException {
+ // Make sure patch name is unique
+ String patch_name = exportOp.getPatchName();
+ IFile patchFile = getConfiguration().getSourcesFolder().getFile(patch_name);
+ if(patchFile.exists()) {
+ String throw_message = Messages.getString(
+ "RPMCore.The_patch_name__109") + patch_name + //$NON-NLS-1$
+ Messages.getString("RPMCore._is_not_unique._110") + //$NON-NLS-1$
+ Messages.getString(
+ "RPMCore._nPlease_modify_the___Patch_tag___field_and_try_again._111"); //$NON-NLS-1$
+ IStatus error = new Status(IStatus.ERROR, IRPMConstants.ERROR, 1, throw_message,
+ null);
+ throw new CoreException(error);
+ }
+
+ String diff_old_dir = null;
+ if(getSourceRPM().getSourcesFolder() != null) {
+ diff_old_dir = getSourceRPM().getSourcesFolder().getLocation().toOSString();
+ }
+ else {
+ diff_old_dir = getConfiguration().getBuildFolder().getLocation().toOSString();
+ }
+ String diff_new_dir = getProject().getName();
+
+ // Figure out what resources to exclude from the diff
+ String[] excludes = findExcludedFiles();
+
+ // Do the diff
+ Diff diff = new Diff(getProject().getParent().getLocation().toOSString(),
+ diff_old_dir, diff_new_dir, excludes, patchFile.getLocation().toOSString());
+ diff.exec();
+
+ // Construct a new patch
+ IPatch patch = new Patch();
+ patch.setChangelogEntry(exportOp.getChangelogEntry());
+ patch.setFile(patchFile);
+ patch.setPatchName(patch_name);
+ return patch;
+ }
+
+ /**
+ * Finds a list of files to exclude from patch generation. By default,
+ * all resources that are marked as derived are excluded from patch
+ * generation.
+ * @return an array of project-relative paths of excluded files
+ * @throws CoreException if the operation fails
+ */
+ private String[] findExcludedFiles() throws CoreException {
+ Vector excludes = new Vector();
+ IResource[] resources = getProject().members();
+ for(int i=0; i < resources.length; i++) {
+ find(resources[i], excludes);
+ }
+
+ String[] excludesArr = new String[excludes.size()];
+ for(int i=0; i < excludes.size(); i++) {
+ excludesArr[i] = (String) excludes.get(i);
+ }
+ return excludesArr;
+ }
+
+ private void find(IResource resource, Vector excludes) throws CoreException {
+ if(resource.isDerived()) {
+ excludes.add(resource.getName());
+ }
+ else if(resource.getType() == IResource.FOLDER) {
+ IFolder folder = getProject().getFolder(resource.getProjectRelativePath());
+ IResource[] members = folder.members();
+ for(int i=0; i < members.length; i++) {
+ find(members[i], excludes);
+ }
+ }
+ }
+
+ /**
+ * Generates the checksum for a given project path.
+ * @param project_path the absolute path of the project
+ * @param proj_checksum input 0
+ * @return
+ * @throws CoreException if the operation fails
+ */
+ private long generateProjectChecksum(String project_path, long proj_checksum)
+ throws CoreException {
+ File dir = new File(project_path);
+
+ if (dir.isDirectory()) {
+ String[] children = dir.list();
+
+ for (int i = 0; i < children.length; i++) {
+
+ File temp = new File(project_path + IRPMConstants.FILE_SEP + children[i]);
+
+ if (temp.isDirectory()) {
+ IFolder folder = getProject().getFolder(new Path(children[i]));
+ if(!folder.isDerived()) {
+ proj_checksum = generateProjectChecksum(project_path
+ + IRPMConstants.FILE_SEP + children[i], proj_checksum);
+ }
+ } else {
+ IFile file = getProject().getFile(new Path(children[i]));
+ if(!file.isDerived() || file.getProjectRelativePath().equals(getSpecFile().getFile().getProjectRelativePath())) {
+ proj_checksum += generateFileCheckSum(temp);
+ }
+ if (children[i].equals("Makefile") & !getProject().getFile("configure").exists()) { //$NON-NLS-1$ //$NON-//$NON-NLS-2$
+ proj_checksum += generateFileCheckSum(temp);
+ }
+ }
+ }
+ }
+
+ return proj_checksum;
+ }
+
+ private long generateFileCheckSum(File input) throws CoreException {
+ String input_line;
+ long chksum = 0;
+ try {
+ BufferedReader br = new BufferedReader(new FileReader(input.toString()));
+ while ((input_line = br.readLine()) != null) {
+ for (int i=0; i<input_line.length(); i++)
+ chksum += input_line.charAt(i);
+ }
+ br.close();
+ } catch(FileNotFoundException e) {
+ String throw_message = Messages.getString("RPMCore.0") + //$NON-NLS-1$
+ input.getName();
+ IStatus error = new Status(IStatus.ERROR, IRPMConstants.ERROR, 1,
+ throw_message, null);
+ throw new CoreException(error);
+ } catch(IOException e) {
+ String throw_message = Messages.getString("RPMCore.0") + //$NON-NLS-1$
+ input.getName();
+ IStatus error = new Status(IStatus.ERROR, IRPMConstants.ERROR, 1,
+ throw_message, null);
+ throw new CoreException(error);
+ }
+ return chksum;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/SourceRPM.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/SourceRPM.java
new file mode 100644
index 0000000000..f52532d392
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/SourceRPM.java
@@ -0,0 +1,33 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+package org.eclipse.linuxtools.rpm.core.internal;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.linuxtools.rpm.core.ISourceRPM;
+
+public class SourceRPM implements ISourceRPM {
+
+ 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/internal/SpecFile.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/SpecFile.java
new file mode 100644
index 0000000000..e0a89922c7
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/SpecFile.java
@@ -0,0 +1,207 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+package org.eclipse.linuxtools.rpm.core.internal;
+
+import java.io.BufferedReader;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.linuxtools.rpm.core.IPatch;
+import org.eclipse.linuxtools.rpm.core.IRPMConstants;
+import org.eclipse.linuxtools.rpm.core.ISpecFile;
+
+public class SpecFile implements ISpecFile {
+
+ private String name;
+ private String version;
+ private String release;
+ private IPatch patch;
+ private IFile specFile;
+
+ private int lastSourceLine;
+ private int lastPatchLine;
+ private int setupLine;
+ private int lastPatchMacroLine;
+ private int numPatches;
+
+ private String configureArgs;
+
+ public SpecFile(IFile specFile) throws CoreException {
+ this.specFile = specFile;
+ SpecFileParser parser = new SpecFileParser(this.specFile);
+ parser.parse();
+ name = parser.getName();
+ version = parser.getVersion();
+ release = parser.getRelease();
+ configureArgs = parser.getConfigureArgs();
+ lastSourceLine = parser.getLastSourceLine();
+ lastPatchLine = parser.getLastPatchLine();
+ setupLine = parser.getSetupLine();
+ lastPatchMacroLine = parser.getLastPatchMacroLine();
+ numPatches = parser.getNumPatches();
+ }
+
+ public void addPatch(IPatch patch) {
+ this.patch = patch;
+ }
+
+ public void write() throws CoreException {
+ String patch_name = null;
+ String patchLine = null;
+ String patchMacroLine = null;
+ if(patch != null) {
+ patch_name = patch.getPatchName();
+
+ // Figure out the format of the lines to add
+ patchLine = "Patch" + numPatches + ": " + patch_name + IRPMConstants.LINE_SEP; //$NON-NLS-1$ //$NON-NLS-2$
+ patchMacroLine = "%patch" + numPatches + " -p1" + IRPMConstants.LINE_SEP; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ if(lastPatchLine == 0) {
+ if(lastSourceLine == 0) {
+ lastPatchLine = setupLine;
+ }
+ else {
+ lastPatchLine = lastSourceLine;
+ }
+ }
+ if(lastPatchMacroLine == 0) {
+ lastPatchMacroLine = setupLine;
+ }
+
+ // Now read the spec file line by line and write it to the final
+ // spec file adding in the lines to perform the patching.
+ IFile newSpecFile =
+ getFile().getParent().getFile(new Path(getFile().getName() + ".new")); //$NON-NLS-1$
+ String path_to_newspecfile = newSpecFile.getLocation().toOSString();
+
+ FileReader fr = null;
+ try {
+ fr = new FileReader(getFile().getLocation().toOSString());
+ } catch(FileNotFoundException e) {
+ String throw_message = Messages.getString("RPMCore.Failed_to_find_a_spec_file_at") + //$NON-NLS-1$
+ getFile().getLocation().toOSString();
+ IStatus error = new Status(IStatus.ERROR, IRPMConstants.ERROR, 1,
+ throw_message, null);
+ throw new CoreException(error);
+ }
+ BufferedReader br = new BufferedReader(fr);
+ FileWriter fw;
+
+ try {
+ fw = new FileWriter(path_to_newspecfile);
+ } catch (IOException e) {
+ String throw_message = Messages.getString(
+ "RPMCore.Failed_to_open_the_output_spec_file_at__123") + //$NON-NLS-1$
+ path_to_newspecfile;
+ IStatus error = new Status(IStatus.ERROR, IRPMConstants.ERROR, 1, throw_message,
+ null);
+ throw new CoreException(error);
+ }
+
+ int line_ctr = 0;
+ String input_line;
+ boolean found_changelog = false;
+
+ // Setup the lines that set the version and release numbers
+ String new_version_line = "Version: " + getVersion(); //$NON-NLS-1$
+ String new_release_line = "Release: " + getRelease(); //$NON-NLS-1$
+
+ try {
+ while ((input_line = br.readLine()) != null) {
+ if (input_line.length() > 8) {
+ if (input_line.startsWith("Version")) { //$NON-NLS-1$
+ input_line = new_version_line;
+ } else if (input_line.startsWith("Release")) { //$NON-NLS-1$
+ input_line = new_release_line;
+ }
+ }
+
+ fw.write(input_line + IRPMConstants.LINE_SEP);
+
+ // See if this was the "%changelog" line just written, if it was, write out the new entry
+ if (input_line.length() == 10 && patch != null) { //$NON-NLS-1$
+ if (input_line.startsWith("%changelog")) { //$NON-NLS-1$
+ fw.write(patch.getChangelogEntry());
+ found_changelog = true;
+ }
+ }
+
+ line_ctr++;
+
+ // Check to see if this is one of the lines I should add something after
+ if(patch != null) { //$NON-NLS-1$
+ if(line_ctr == lastPatchLine) {
+ fw.write(patchLine);
+ }
+ else if(line_ctr == lastPatchMacroLine) {
+ fw.write(patchMacroLine);
+ }
+ }
+ }
+
+ // if there was not a "%changelog" section, make one
+ if (!found_changelog && patch != null) { //$NON-NLS-1$
+ fw.write("%changelog" + IRPMConstants.LINE_SEP + patch.getChangelogEntry()); //$NON-NLS-1$
+ }
+
+ fw.close();
+ } catch (IOException e) {
+ String throw_message = Messages.getString(
+ "RPMCore.Error_trying_to_modify__132") + //$NON-NLS-1$
+ getFile().getLocation().toOSString();
+ IStatus error = new Status(IStatus.ERROR, IRPMConstants.ERROR, 1, throw_message,
+ null);
+ throw new CoreException(error);
+ }
+
+ newSpecFile.refreshLocal(IResource.DEPTH_INFINITE, null);
+ getFile().delete(false, true, null);
+ newSpecFile.move(getFile().getFullPath(), false, false, null);
+ getFile().refreshLocal(IResource.DEPTH_INFINITE, null);
+ }
+
+ public IFile getFile() {
+ return specFile;
+ }
+
+ public String getConfigureArgs() {
+ return configureArgs;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getRelease() {
+ return release;
+ }
+
+ public void setRelease(String release) {
+ this.release = release;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/SpecFileParser.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/SpecFileParser.java
new file mode 100644
index 0000000000..fddcfbc5df
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/SpecFileParser.java
@@ -0,0 +1,657 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+package org.eclipse.linuxtools.rpm.core.internal;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.StreamTokenizer;
+import java.util.ArrayList;
+
+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.linuxtools.rpm.core.IRPMConstants;
+
+/**
+ * A spec file parser.
+ *
+ */
+public class SpecFileParser {
+
+ private int lastSourceLine = 0;
+ private int lastPatchLine = 0;
+ private int setupLine = 0;
+ private int lastPatchMacroLine = 0;
+ private int numPatches = 0;
+
+ private IFile specFile;
+ private String configureArgs;
+ private String name;
+ private String version;
+ private String release;
+
+ /**
+ * Constructs a new parser.
+ * @param specFile a handle to the workspace spec file
+ */
+ public SpecFileParser(IFile specFile) {
+ this.specFile = specFile;
+ }
+
+ /**
+ * Parses the spec file.
+ * @throws CoreException if parsing fails
+ */
+ public void parse() throws CoreException {
+ /* The following logic determines where in the spec file the "Patchx:" and
+ * %patchx -p1" lines will need to be added to accomodate the patch we
+ * are fixing to generate. If this is the first patch to ever be added to this
+ * source RPM then the "Patchx: statement will have to be added after the
+ * last "Sourcex:" statement and the "%patch -p1" statement will need to be
+ * added after the "%setup" statement. If this is not the first patch for this
+ * source rpm, the "Patchx:" statement will be added after the last "Patchx:"
+ * statement and the "%patchx -p1" will be added after the last "%patch -p1"
+ * statement. So, we keep track of where the line numbers for all of these
+ * eventualities are so when we mod the file we will know where to insert
+ * the necessary new lines.
+ */
+ ArrayList patchlist = new ArrayList();
+ boolean found_source_line = false;
+ boolean found_patch = false;
+ boolean found_define = false;
+ boolean found_define_name = false;
+ boolean found_version = false;
+ boolean found_release = false;
+ int define_ctr = 0;
+ int define_line_ctr = 0;
+ int lines = 1;
+
+ try {
+ FileReader sp_file = new FileReader(specFile.getLocation().toOSString());
+ StreamTokenizer st = new StreamTokenizer(sp_file);
+
+ // Make sure numbers, colons and percent signs are considered valid
+ st.wordChars('a','z');
+ st.wordChars('A','Z');
+ st.wordChars(':', ':');
+ st.wordChars('0', '9');
+ st.wordChars('%', '%');
+ st.wordChars('{', '}');
+ st.wordChars('-', '-');
+ st.wordChars('/', '/');
+ st.wordChars('=','=');
+ st.wordChars('.','.');
+ st.wordChars('_','_');
+ st.eolIsSignificant(true);
+
+ String new_word;
+ boolean check_ifs = false;
+ int if_ctr = 0;
+ int token = st.nextToken();
+ while (token != StreamTokenizer.TT_EOF) {
+ token = st.nextToken();
+
+ switch (token) {
+ case StreamTokenizer.TT_EOL:
+ lines++;
+ break;
+ case StreamTokenizer.TT_WORD:
+ new_word = st.sval;
+
+/* The following commented out logic addresses bugzilla 110452 where the version and
+ * release numbers for spec files are stored in "%define" variables at the top of the file. It
+ * has been decided to put this change on hold until it can be determined how pervasive
+ * the use of this practice is. The code is incomplete for the time being and may be deleted
+ * entirely in future releases.
+ */
+/* if (found_version) {
+ found_version = false;
+ if (new_word.startsWith("%{")) { //$NON-NLS-1$
+ version_param = true;
+ define_info.add(0,new_word.substring(2,new_word.length()-1));
+ }
+ break;
+ }
+
+ if (found_release) {
+ found_release = false;
+ if (new_word.startsWith("%{")) { //$NON-NLS-1$
+// release_param = true;
+ define_info.add(1,new_word.substring(2,new_word.length()-1));
+ }
+ break;
+ } */
+
+ // See if we have found the Version: line
+ if (new_word.equals("Version:")) { //$NON-NLS-1$
+ found_version = true;
+ break;
+ }
+
+ // See if we have found the Release: line
+ if (new_word.equals("Release:")) { //$NON-NLS-1$
+ found_release = true;
+ break;
+ }
+
+ // Record where the last line of the form "Sourcex:" is
+ if (new_word.startsWith("Source") & //$NON-NLS-1$
+ new_word.endsWith(":")) { //$NON-NLS-1$
+ lastSourceLine = lines;
+ found_source_line = true;
+ break;
+ }
+
+ /* Record where the last line of the form "Patchx:" is and count how many there were.
+ * Also, record the statement so when we generate our new "Patchx:" statement
+ * we don't duplicate a "Patch" statement. This has to be done because a lot of
+ * spec files have "Patchx:" statements that are non-sequential
+ */
+ if (new_word.startsWith("Patch") & //$NON-NLS-1$
+ new_word.endsWith(":")) { //$NON-NLS-1$
+ lastPatchLine = lines;
+ numPatches++;
+ patchlist.add(new_word);
+
+ break;
+ }
+
+ // Record where the "%setup line is
+ if (new_word.equals("%setup")) { //$NON-NLS-1$
+
+ // set the "check for if" constructs switch
+ check_ifs = true;
+ setupLine = lines;
+
+ break;
+ }
+
+ if (new_word.equals("%build")) { //$NON-NLS-1$
+ check_ifs = false;
+
+ break;
+ }
+
+ // Record where the last (if any) "%patchx" line is
+ if (new_word.startsWith("%patch")) { //$NON-NLS-1$
+ lastPatchMacroLine = lines;
+ found_patch = true;
+
+ break;
+ }
+
+ // See if we have found a %define statement, if so save it as some
+ // source RPMs use %define statements to "define" version/release #'s
+/* See the comment several lines above regarding bugzilla 110452 as it also pertains to this code */
+/* if (new_word.equals("%define")) { //$NON-NLS-1$
+ found_define = true;
+ define_line_ptr[define_line_ctr] = lines;
+ define_line_ctr++;
+
+ break;
+ } */
+
+ if (found_define) {
+ found_define = false;
+// define_info.add(define_ctr,new_word);
+ define_ctr++;
+ found_define_name = true;
+ break;
+ }
+
+ if (found_define_name) {
+ found_define_name = false;
+// define_info.add(define_ctr,new_word);
+ define_ctr++;
+ break;
+ }
+
+ // Set the found %if/%ifarch/%ifnarch/%ifos/%ifnos switch
+ if (check_ifs) {
+ if (new_word.startsWith("%if")) { //$NON-NLS-1$
+ if_ctr++;
+
+ break;
+ }
+
+ // Reset the found %if/%ifarch switch
+ if (new_word.equals("%endif")) { //$NON-NLS-1$
+
+ if ((if_ctr > 0) & found_patch) {
+ if_ctr--;
+ lastPatchMacroLine = lines;
+ found_patch = false;
+
+ break;
+ }
+ }
+
+ break;
+ }
+
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ sp_file.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ String throw_message = Messages.getString(
+ "RPMCore.Error_parsing_the_spec_file_in_the_project_--_157") + //$NON-NLS-1$
+ specFile.getLocation().toOSString();
+ IStatus error = new Status(IStatus.ERROR, IRPMConstants.ERROR, 1, throw_message,
+ null);
+ throw new CoreException(error);
+ }
+
+ if (numPatches > 1) {
+ int patch_num = getUniquePatchId(patchlist, numPatches);
+ numPatches = patch_num;
+ }
+ setConfigureArgs(parseConfigureArgs());
+ parseNameVerRel();
+ }
+
+ /**
+ * Method parseConfigureArgs.
+ * This method takes a spec file path and parses it to see if there are any options
+ * that need to be passed to the "configure" script when conmfiguring an RPM.
+ * @param path_to_specfile - contains a string with a path to the spec file to be
+ * searched to see if the "configure" command has any options to be applied
+ * @return a string containing the options to pass to configure if any were found
+ */
+ private String parseConfigureArgs() throws CoreException {
+ String path_to_specfile = specFile.getLocation().toOSString();
+
+ boolean found_config = false;
+ int lines = 0;
+ int config_line = 0;
+ String config_opts = ""; //$NON-NLS-1$
+
+ try {
+ FileReader sp_file = new FileReader(path_to_specfile);
+ StreamTokenizer st = new StreamTokenizer(sp_file);
+// st.resetSyntax();
+
+ // Make sure numbers, colons and percent signs are considered valid
+ st.wordChars('a','z');
+ st.wordChars('A','Z');
+ st.wordChars(':', ':');
+ st.wordChars('0', '9');
+ st.wordChars('%', '%');
+ st.wordChars('{', '}');
+ st.wordChars('-', '-');
+ st.wordChars('/','/');
+ st.wordChars('=','=');
+ st.wordChars('.','.');
+ st.wordChars('_','_');
+ st.eolIsSignificant(true);
+
+ String new_word;
+ int if_ctr = 0;
+ int token = st.nextToken();
+ while (token != StreamTokenizer.TT_EOF) {
+ token = st.nextToken();
+
+ switch (token) {
+ case StreamTokenizer.TT_EOL:
+ lines++;
+ break;
+ case StreamTokenizer.TT_WORD:
+ new_word = st.sval;
+ // System.out.println("---- " + new_word + line_sep + " line no = " + st.lineno());
+
+ // If '%configure' was found, gather the options if there were any
+ if (found_config & config_line == lines) {
+ config_opts = config_opts + " --" + new_word; //$NON-NLS-1$
+ break;
+ }
+ if (found_config & !(config_line == lines)) {
+ found_config = false;
+ break;
+ }
+
+ // See if there is a %configure section
+ if (new_word.equals("%configure")) { //$NON-NLS-1$
+ found_config = true;
+ config_line = lines;
+
+ break;
+ }
+ }
+ }
+
+ sp_file.close();
+ } catch (IOException e) {
+ String throw_message = Messages.getString(
+ "RPMCore.Error_parsing_the_spec_file_in_the_project_--_157") + //$NON-NLS-1$
+ path_to_specfile;
+ IStatus error = new Status(IStatus.ERROR, IRPMConstants.ERROR, 1, throw_message,
+ null);
+ throw new CoreException(error);
+ }
+
+ if(!found_config) {
+ return null;
+ }
+ return config_opts;
+ }
+
+ /**
+ * Method parseNameVerRel interrogates a spec file for the name, version and release
+ * of the RPM
+ * @param path_to_specfile contains a string pointing to the specfile to interrogate
+ * @return if successful, throw Exception if not
+ */
+
+ private void parseNameVerRel() throws CoreException {
+ String path_to_specfile = specFile.getLocation().toOSString();
+ ArrayList rpm_info = new ArrayList();
+ ArrayList define_info = new ArrayList();
+
+ // initialize version/release numbers to 0 in case none are found in the spec file
+ rpm_info.add(0, "0"); //$NON-NLS-1$
+ rpm_info.add(1, "0"); //$NON-NLS-1$
+ rpm_info.add(2, " "); //$NON-NLS-1$
+
+ boolean found_version = false;
+ boolean found_release = false;
+ boolean found_name = false;
+ boolean found_ver_token = false;
+ boolean found_rel_token = false;
+ boolean found_name_token = false;
+ boolean found_define = false;
+ boolean found_define_name = false;
+ int define_ctr = 0;
+
+ File f = new File(path_to_specfile);
+
+ if (!f.exists()) {
+ String throw_message = "" + //$NON-NLS-1$
+ path_to_specfile;
+ IStatus error = new Status(IStatus.ERROR, Messages.getString("RPMCore.Error_1"), 1, //$NON-NLS-1$
+ throw_message, null);
+ throw new CoreException(error);
+ }
+
+ try {
+ FileReader sp_file = new FileReader(path_to_specfile);
+ StreamTokenizer st = new StreamTokenizer(sp_file);
+
+ // Make sure numbers, colons and periods are considered valid characters
+ st.resetSyntax();
+ st.wordChars(':', ':');
+ st.wordChars('0', '9');
+ st.wordChars('.', '.');
+ st.wordChars('A', 'z');
+ st.wordChars('%','%');
+ st.wordChars('{','{');
+ st.wordChars('}','}');
+
+ int token = 0;
+ String new_word;
+outer:
+ while (token != StreamTokenizer.TT_EOF) {
+ token = st.nextToken();
+
+ switch (token) {
+ case StreamTokenizer.TT_WORD:
+ new_word = st.sval;
+
+ if (found_define) {
+ found_define = false;
+ define_info.add(define_ctr,new_word);
+ define_ctr++;
+ found_define_name = true;
+ break;
+ }
+
+ if (found_define_name) {
+ found_define_name = false;
+ define_info.add(define_ctr,new_word);
+ define_ctr++;
+ break;
+ }
+
+ if (found_version & !found_ver_token) {
+ found_ver_token = true;
+ if (new_word.startsWith("%")) { //$NON-NLS-1$
+ try {
+ rpm_info.set(0,parseDefine(new_word, define_info));
+ } catch (Exception e) {
+ String throw_message = Messages.getString("RPMCore.Error_using_parseDefine_to_get_the_version_no._41") + //$NON-NLS-1$
+ Messages.getString("RPMCore._from_the_spec_file_at___42") + path_to_specfile; //$NON-NLS-1$
+ IStatus error = new Status(IStatus.ERROR, Messages.getString("RPMCore.Error_1"), 1, //$NON-NLS-1$
+ throw_message, null);
+ throw new CoreException(error);
+ }
+ } else {
+ rpm_info.set(0, new_word);
+ }
+
+ // System.out.println("Found version = " + new_word);
+ if (found_name_token & found_ver_token &
+ found_rel_token) {
+ break outer;
+ }
+
+ break;
+ }
+
+ if (found_release & !found_rel_token) {
+ found_rel_token = true;
+ if (new_word.startsWith("%")) { //$NON-NLS-1$
+ try {
+ rpm_info.set(1,parseDefine(new_word, define_info));
+ } catch (Exception e) {
+ String throw_message = Messages.getString("RPMCore.Error_using_parseDefine_to_get_the_release_no._44") + //$NON-NLS-1$
+ Messages.getString("RPMCore._from_the_spec_file_at___45") + path_to_specfile; //$NON-NLS-1$
+ IStatus error = new Status(IStatus.ERROR, Messages.getString("RPMCore.Error_1"), 1, //$NON-NLS-1$
+ throw_message, null);
+ throw new CoreException(error);
+ }
+ break;
+ } else {
+ rpm_info.set(1, new_word);
+ }
+
+ // System.out.println("Found release = " + new_word);
+ if (found_name_token & found_ver_token &
+ found_rel_token) {
+ break outer;
+ }
+
+ break;
+ }
+
+ if (found_name & !found_name_token) {
+ found_name_token = true;
+ rpm_info.set(2, new_word);
+
+ // System.out.println("Found name = " + new_word);
+ if (found_name_token & found_ver_token &
+ found_rel_token) {
+ break outer;
+ }
+
+ break;
+ }
+
+ // See if this is a "Version:" tag
+ if (new_word.equals("Version:")) { //$NON-NLS-1$
+ found_version = true;
+ break;
+ }
+
+ // See if this is a "Release:" tag
+ if (new_word.equals("Release:")) { //$NON-NLS-1$
+ found_release = true;
+ break;
+ }
+
+ // See if this is a "Name:" tag
+ if (new_word.equals("Name:")) { //$NON-NLS-1$
+ found_name = true;
+ break;
+ }
+
+ // See if this a "%define" statement
+ // the version and release can sometimes be in a define stmt
+ if (new_word.equals("%define")) { //$NON-NLS-1$
+ found_define = true;
+ break;
+ }
+
+ default:
+ break;
+ }
+ }
+ } catch (IOException e) {
+ String throw_message = Messages.getString(
+ "RPMCore.Error_parsing_the_spec_file_at") + //$NON-NLS-1$
+ path_to_specfile;
+ IStatus error = new Status(IStatus.ERROR, Messages.getString("RPMCore.Error_1"), 1, //$NON-NLS-1$
+ throw_message, null);
+ throw new CoreException(error);
+ }
+
+ /* Ugly: In rpm_info ArrayList:
+ * [0] = Version
+ * [1] = Release
+ * [2] = Name
+ */
+ setVersion((String) rpm_info.get(0));
+ setRelease((String) rpm_info.get(1));
+ setName((String) rpm_info.get(2));
+ }
+
+ /**
+ * Method parseDefine accepts a token from the parser and
+ * searches the ArrayList passed to it for the value of the
+ * token name. This is crude at this point since this does not
+ * happen very often.
+ * @param token is a string containing the name found after the
+ * "Version:" or "Release:" fields of a spec file and the
+ * begining character is a "%"
+ * @param token_value ia an ArrayList containing the names and
+ * values found in the "%define" statements usually found
+ * at the top of the spec file
+ * @return a string with the correct version or release number
+ * else throw a CoreException
+ */
+ private String parseDefine(String token, ArrayList token_value)
+ throws CoreException {
+ // See if there in anything in the ArrayList
+ if (token_value.isEmpty()) {
+ String throw_message = Messages.getString("RPMCore.No___%defines___were_found_in_the_spec_file_38"); //$NON-NLS-1$
+ IStatus error = new Status(IStatus.ERROR, Messages.getString("RPMCore.Error_1"), 1, //$NON-NLS-1$
+ throw_message, null);
+ throw new CoreException(error);
+ }
+ // A token usually looks this: %{name}
+ String token_name = token.substring(2,token.length()-1);
+ int i = token_value.indexOf(token_name);
+ return (String) token_value.get(i+1);
+ }
+
+ private int getUniquePatchId(ArrayList patchlist, int patch_ctr) {
+ int patch_array_size = patchlist.size();
+ String num_string;
+ int patch_num;
+ String last_patch = (String) patchlist.get(patch_array_size - 1);
+ int indx = 5;
+
+ while (last_patch.charAt(indx) != ':') {
+ indx++;
+ }
+
+ // Allow for the fact that there could only be one patch statement of the
+ // form "Patch:", that is, there is no number
+ if (indx == 5) {
+ return 0;
+ }
+
+ String num = last_patch.substring(5, indx);
+
+ try {
+ patch_num = Integer.parseInt(num, 10);
+ } catch (NumberFormatException e) {
+ return -1;
+ }
+
+ return patch_num + 1;
+ }
+ public String getConfigureArgs() {
+ return configureArgs;
+ }
+ public String getName() {
+ return name;
+ }
+ public String getRelease() {
+ return release;
+ }
+ public String getVersion() {
+ return version;
+ }
+ private void setConfigureArgs(String configureArgs) {
+ this.configureArgs = configureArgs;
+ }
+ private void setName(String name) {
+ this.name = name;
+ }
+ private void setRelease(String release) {
+ this.release = release;
+ }
+ private void setVersion(String version) {
+ this.version = version;
+ }
+
+ public int getLastPatchLine() {
+ return lastPatchLine;
+ }
+
+ private void setLastPatchLine(int lastPatchLine) {
+ this.lastPatchLine = lastPatchLine;
+ }
+
+ public int getLastPatchMacroLine() {
+ return lastPatchMacroLine;
+ }
+
+ private void setLastPatchMacroLine(int lastPatchMacroLine) {
+ this.lastPatchMacroLine = lastPatchMacroLine;
+ }
+
+ public int getLastSourceLine() {
+ return lastSourceLine;
+ }
+
+ private void setLastSourceLine(int lastSourceLine) {
+ this.lastSourceLine = lastSourceLine;
+ }
+
+ public int getNumPatches() {
+ return numPatches;
+ }
+
+ private void setNumPatches(int numPatches) {
+ this.numPatches = numPatches;
+ }
+
+ public int getSetupLine() {
+ return setupLine;
+ }
+
+ private void setSetupLine(int setupLine) {
+ this.setupLine = setupLine;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/rpm_strings.properties b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/rpm_strings.properties
new file mode 100644
index 0000000000..71df5627f0
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/internal/rpm_strings.properties
@@ -0,0 +1,220 @@
+###############################################################################
+# (c) 2004 Red Hat, Inc.
+#
+# This program is open source software licensed under the
+# Eclipse Public License ver. 1
+#
+###############################################################################
+
+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/Diff.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/Diff.java
new file mode 100644
index 0000000000..709e91e5de
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/Diff.java
@@ -0,0 +1,56 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+package org.eclipse.linuxtools.rpm.core.utils;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Preferences;
+import org.eclipse.linuxtools.rpm.core.IRPMConstants;
+import org.eclipse.linuxtools.rpm.core.RPMCorePlugin;
+import org.eclipse.linuxtools.rpm.core.utils.internal.ShellScript;
+
+/**
+ * A utility class for executing a diff.
+ *
+ */
+public class Diff {
+
+ private String diffCmd;
+
+ /**
+ * Constructs a new object to run diff.
+ * @param baseDir the absolute path of the directory to run the diff in
+ * @param oldPath the path containing old resources to use in the diff
+ * @param newPath the path containing new resources to use in the diff
+ * @param excludes an array of paths to resources to exclude from the diff
+ * @param outputFile the path of the file to redirect the diff output to
+ */
+ public Diff(String baseDir, String oldPath, String newPath, String[] excludes,
+ String outputFile) {
+ Preferences prefs = RPMCorePlugin.getDefault().getPluginPreferences();
+ String pathToDiff = prefs.getString(IRPMConstants.DIFF_CMD);
+
+ diffCmd = "cd " + baseDir + " && "; //$NON-NLS-1$ //$NON-NLS-2$
+ diffCmd += pathToDiff + " -uNr "; //$NON-NLS-1$
+ diffCmd += "--ignore-matching-lines=POT-Creation-Date --exclude=autom4te.cache "; //$NON-NLS-1$
+ for(int i=0; i < excludes.length; i++) {
+ diffCmd += "--exclude=" + excludes[i] + " "; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ diffCmd += oldPath + " " + newPath + " "; //$NON-NLS-1$ //$NON-NLS-2$
+ diffCmd += "> " + outputFile;
+ }
+
+ /**
+ * Executes the diff operation.
+ * @throws CoreException if the operation fails
+ */
+ public void exec() throws CoreException {
+ ShellScript script = new ShellScript(diffCmd, 1);
+ script.execNoLog();
+ }
+
+}
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..72fdd57dc7
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/RPM.java
@@ -0,0 +1,58 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+package org.eclipse.linuxtools.rpm.core.utils;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.linuxtools.rpm.core.IRPMConfiguration;
+import org.eclipse.linuxtools.rpm.core.IRPMConstants;
+import org.eclipse.linuxtools.rpm.core.RPMCorePlugin;
+import org.eclipse.linuxtools.rpm.core.utils.internal.ShellScript;
+
+/**
+ * A utility class for executing RPM commands.
+ *
+ */
+public class RPM {
+
+ private String macroDefines;
+ private String rpmCmd;
+ private IRPMConfiguration config;
+
+ /**
+ * Constructs a new RPM object.
+ * @param config the RPM configuration to use
+ */
+ public RPM(IRPMConfiguration config) {
+ this.config = config;
+ rpmCmd = RPMCorePlugin.getDefault().getPluginPreferences().getString(IRPMConstants.RPM_CMD) +
+ " -v "; //$NON-NLS-1$
+ macroDefines = " --define '_sourcedir " + //$NON-NLS-1$
+ config.getSourcesFolder().getLocation().toOSString() + "' "; //$NON-NLS-1$
+ macroDefines += "--define '_srcrpmdir " + //$NON-NLS-1$
+ config.getSrpmsFolder().getLocation().toOSString() + "' "; //$NON-NLS-1$
+ macroDefines += "--define '_builddir " + //$NON-NLS-1$
+ config.getBuildFolder().getLocation().toOSString() + "' "; //$NON-NLS-1$
+ macroDefines += "--define '_rpmdir " + //$NON-NLS-1$
+ config.getRpmsFolder().getLocation().toOSString() + "' "; //$NON-NLS-1$
+ macroDefines += "--define '_specdir " + //$NON-NLS-1$
+ config.getSpecsFolder().getLocation().toOSString() + "' "; //$NON-NLS-1$
+ }
+
+ /**
+ * Installs a given source RPM
+ * @param sourceRPM
+ * @throws CoreException
+ */
+ public void install(IFile sourceRPM) throws CoreException {
+ String command = rpmCmd;
+ command += macroDefines;
+ command += " -i " + sourceRPM.getLocation().toOSString(); //$NON-NLS-1$
+ ShellScript script = new ShellScript(command, 0);
+ script.exec();
+ }
+}
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..a7213b46bf
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/RPMBuild.java
@@ -0,0 +1,113 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+package org.eclipse.linuxtools.rpm.core.utils;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.linuxtools.rpm.core.IRPMConfiguration;
+import org.eclipse.linuxtools.rpm.core.IRPMConstants;
+import org.eclipse.linuxtools.rpm.core.RPMCorePlugin;
+import org.eclipse.linuxtools.rpm.core.utils.internal.ShellScript;
+
+/**
+ * A utility class for executing rpmbuild commands.
+ *
+ */
+public class RPMBuild {
+
+ private IRPMConfiguration config;
+
+ private String macroDefines;
+
+ private String rpmBuildCmd;
+
+ /**
+ * Constructs a new object.
+ * @param config the RPM configuration to use
+ */
+ public RPMBuild(IRPMConfiguration config) {
+ this.config = config;
+ rpmBuildCmd =
+ RPMCorePlugin.getDefault().getPluginPreferences().getString(IRPMConstants.RPMBUILD_CMD) +
+ " -v "; //$NON-NLS-1$
+ macroDefines = " --define '_sourcedir " +
+ config.getSourcesFolder().getLocation().toOSString() + "' "; //$NON-NLS-1$
+ macroDefines += "--define '_srcrpmdir " + //$NON-NLS-1$
+ config.getSrpmsFolder().getLocation().toOSString() + "' "; //$NON-NLS-1$
+ macroDefines += "--define '_builddir " + //$NON-NLS-1$
+ config.getBuildFolder().getLocation().toOSString() + "' "; //$NON-NLS-1$
+ macroDefines += "--define '_rpmdir " + //$NON-NLS-1$
+ config.getRpmsFolder().getLocation().toOSString() + "' "; //$NON-NLS-1$
+ macroDefines += "--define '_specdir " + //$NON-NLS-1$
+ config.getSpecsFolder().getLocation().toOSString() + "' "; //$NON-NLS-1$
+ }
+
+ /**
+ * Prepares the sources for a given spec file.
+ * @param specFile the spec file
+ * @throws CoreException if the operation fails
+ */
+ public void buildPrep(IFile specFile) throws CoreException {
+ String command = rpmBuildCmd;
+ command += macroDefines;
+ command += " -bp " + specFile.getLocation().toOSString(); //$NON-NLS-1$
+ ShellScript script = new ShellScript(command, 0);
+ script.exec();
+ }
+
+ /**
+ * Builds a binary RPM for a given spec file.
+ * @param specFile the spec file
+ * @throws CoreException if the operation fails
+ */
+ public void buildBinary(IFile specFile) throws CoreException {
+ String command = rpmBuildCmd;
+ command += macroDefines;
+ command += " -bb " + specFile.getLocation().toOSString(); //$NON-NLS-1$
+ ShellScript script = new ShellScript(command, 0);
+ script.exec();
+ }
+
+ /**
+ * Rebuilds a binary RPM from a given source RPM.
+ * @param sourceRPM the source RPM
+ * @throws CoreException if the operation fails
+ */
+ public void rebuild(IFile sourceRPM) throws CoreException {
+ String command = rpmBuildCmd;
+ command += macroDefines;
+ command += " --rebuild " + sourceRPM.getLocation().toOSString(); //$NON-NLS-1$
+ ShellScript script = new ShellScript(command, 0);
+ script.exec();
+ }
+
+ /**
+ * Builds both a binary and source RPM for a given spec file.
+ * @param specFile the spec file
+ * @throws CoreException if the operation fails
+ */
+ public void buildAll(IFile specFile) throws CoreException {
+ String command = rpmBuildCmd;
+ command += macroDefines;
+ command += " -ba " + specFile.getLocation().toOSString(); //$NON-NLS-1$
+ ShellScript script = new ShellScript(command, 0);
+ script.exec();
+ }
+
+ /**
+ * Builds a source RPM for a given spec file.
+ * @param specFile the spec file
+ * @throws CoreException if the operation fails
+ */
+ public void buildSource(IFile specFile) throws CoreException {
+ String command = rpmBuildCmd;
+ command += macroDefines;
+ command += " -bs " + specFile.getLocation().toOSString(); //$NON-NLS-1$
+ ShellScript script = new ShellScript(command, 0);
+ script.exec();
+ }
+}
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..3b62232800
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/RPMQuery.java
@@ -0,0 +1,84 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+package org.eclipse.linuxtools.rpm.core.utils;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Preferences;
+import org.eclipse.linuxtools.rpm.core.IRPMConstants;
+import org.eclipse.linuxtools.rpm.core.RPMCorePlugin;
+import org.eclipse.linuxtools.rpm.core.utils.internal.ShellScript;
+
+/**
+ * Utility class for executing queries on existing binary and
+ * source RPMs
+ *
+ */
+public class RPMQuery {
+
+ private RPMQuery() {
+ }
+
+ public static String getHeaderInfo(IFile rpmFile) throws CoreException {
+ return query("-qi -qp", rpmFile); //$NON-NLS-1$
+ }
+
+ public static String getChangelog(IFile rpmFile) throws CoreException {
+ return query("--changelog -qp", rpmFile); //$NON-NLS-1$
+ }
+
+ public static String getArch(IFile rpmFile) throws CoreException {
+ return query("--qf %{ARCH} -qp", rpmFile); //$NON-NLS-1$
+ }
+
+ public static String getPlatform(IFile rpmFile) throws CoreException {
+ return query("--qf %{PLATFORM} -qp", rpmFile); //$NON-NLS-1$
+ }
+
+ public static String getOS(IFile rpmFile) throws CoreException {
+ return query("--qf %{OS} -qp", rpmFile); //$NON-NLS-1$
+ }
+
+ public static String getBuildHost(IFile rpmFile) throws CoreException {
+ return query("--qf %{BUILDHOST} -qp", rpmFile); //$NON-NLS-1$
+ }
+
+ public static String getBuildTime(IFile rpmFile) throws CoreException {
+ return query("--qf %{BUILDTIME:date} -qp", rpmFile); //$NON-NLS-1$
+ }
+
+ public static String getPreInstallScript(IFile rpmFile) throws CoreException {
+ return query("--qf %{PREIN} -qp", rpmFile); //$NON-NLS-1$
+ }
+
+ public static String getPostInstallScript(IFile rpmFile) throws CoreException {
+ return query("--qf %{POSTIN} -qp", rpmFile); //$NON-NLS-1$
+ }
+
+ public static String getPreUninstallScript(IFile rpmFile) throws CoreException {
+ return query("--qf %{PREUN} -qp", rpmFile); //$NON-NLS-1$
+ }
+
+ public static String getPostUninstallScript(IFile rpmFile) throws CoreException {
+ return query("--qf %{POSTUN} -qp", rpmFile); //$NON-NLS-1$
+ }
+
+ public static String getProvides(IFile rpmFile) throws CoreException {
+ return query("-ql -qp", rpmFile); //$NON-NLS-1$
+ }
+
+ private static String query(String args, IFile rpmFile) throws CoreException {
+ Preferences prefs = RPMCorePlugin.getDefault().getPluginPreferences();
+ String rpmCmd = prefs.getString(IRPMConstants.RPM_CMD);
+ String command = rpmCmd + " " + args + " " + //$NON-NLS-1$ //$NON-NLS-2$
+ rpmFile.getLocation().toOSString();
+ ShellScript script = new ShellScript(command, 0);
+ return script.execNoLog();
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/internal/Command.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/internal/Command.java
new file mode 100644
index 0000000000..100f2c0006
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/internal/Command.java
@@ -0,0 +1,74 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+package org.eclipse.linuxtools.rpm.core.utils.internal;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.linuxtools.rpm.core.IRPMConstants;
+import org.eclipse.linuxtools.rpm.core.internal.Messages;
+
+/**
+ * A utility class for executing commands using @link java.lang.Runtime.exec.
+ *
+ */
+public class Command {
+
+ /**
+ * Method exec.
+ * This method executes a Linux command passed to it from other methods. It executes
+ * the command, reads the output from the command and passes back a status. This method
+ * is used when several output lines is expected from a command. If one line or less is
+ * expected and the developer wants the output of the command, use the getInfo method.
+ * @param command - a string containing a Linux command
+ * @param successCode - what the successful status value from the command should be (normally 0)
+ * @return standard output from execution
+ * @throws CoreException if error occurs
+ */
+ /****************************************************************************/
+ public static String exec(String command, int successCode) throws CoreException {
+ Runtime r = Runtime.getRuntime();
+ Process p = null;
+ int returnCode;
+ String line = ""; //$NON-NLS-1$
+ String line2 = ""; //$NON-NLS-1$
+ // prepare buffers for process output and error streams
+ StringBuffer err = new StringBuffer();
+ StringBuffer out = new StringBuffer();
+
+ try {
+ p = r.exec((String) command);
+ // create thread for reading inputStream (process' stdout)
+ StreamReaderThread outThread = new StreamReaderThread(p
+ .getInputStream(), out);
+ // create thread for reading errorStream (process' stderr)
+ StreamReaderThread errThread = new StreamReaderThread(p
+ .getErrorStream(), err);
+ // start both threads
+ outThread.start();
+ errThread.start();
+
+ //wait for process to end
+ returnCode = p.waitFor();
+ //finish reading whatever's left in the buffers
+ outThread.join();
+ errThread.join();
+
+ if(returnCode != successCode) {
+ throw new Exception();
+ }
+ } catch (Exception e) {
+ String throw_message = Messages
+ .getString("RPMCore.Error_executing__97") + command + //$NON-NLS-1$
+ Messages.getString("LinuxShellCmds.7") + err.toString(); //$NON-NLS-1$
+ IStatus error = new Status(IStatus.ERROR, IRPMConstants.ERROR, 1, throw_message,
+ null);
+ throw new CoreException(error);
+ }
+ return out.toString();
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/internal/ShellScript.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/internal/ShellScript.java
new file mode 100644
index 0000000000..d3f894bd9d
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/internal/ShellScript.java
@@ -0,0 +1,81 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+package org.eclipse.linuxtools.rpm.core.utils.internal;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.linuxtools.rpm.core.IRPMConstants;
+import org.eclipse.linuxtools.rpm.core.RPMCorePlugin;
+import org.eclipse.linuxtools.rpm.core.internal.Messages;
+
+/**
+ * A utility class for constructing and executing shell scripts on the system.
+ *
+ */
+public class ShellScript {
+
+ private File script;
+ private String scriptContents;
+ private int successCode;
+
+ /**
+ * Constructs a new shell script object.
+ * @param command the command to execute
+ * @param successCode the return code that indicated command execution was successful
+ */
+ public ShellScript(String command, int successCode) {
+ scriptContents = "#!/bin/sh" + IRPMConstants.LINE_SEP + command; //$NON-NLS-1$
+ this.successCode = successCode;
+ }
+
+ /**
+ * Executes the shell script without logging standard output.
+ * @return standard output from execution
+ * @throws CoreException if the operation fails
+ */
+ public String execNoLog() throws CoreException {
+ byte[] buf = scriptContents.getBytes();
+ File file = null;
+ try {
+ file = RPMCorePlugin.getDefault().getShellScriptFile();
+ BufferedOutputStream os =
+ new BufferedOutputStream(new FileOutputStream(file));
+ for(int i = 0; i < buf.length; i++) {
+ os.write(buf[i]);
+ }
+ os.close();
+ } catch(IOException e) {
+ String throw_message = Messages.getString("RPMCore.Error_trying_to_write_to__8") + //$NON-NLS-1$
+ file.getAbsolutePath();
+ IStatus error = new Status(IStatus.ERROR, IRPMConstants.ERROR, 1,
+ throw_message, null);
+ throw new CoreException(error);
+ }
+ script = file;
+ Command.exec("chmod +x " + script.getAbsolutePath(), 0); //$NON-NLS-1$
+ return Command.exec("sh " + script.getAbsolutePath(), successCode); //$NON-NLS-1$
+ }
+
+ /**
+ * Executes the shell script and logs standard output to the log file.
+ * @return standard output from execution
+ * @throws CoreException if the operation fails
+ */
+ public String exec() throws CoreException {
+ scriptContents += " >> " +
+ RPMCorePlugin.getDefault().getExternalLogFile().getAbsolutePath(); //$NON-NLS-1$
+ return execNoLog();
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/internal/StreamReaderThread.java b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/internal/StreamReaderThread.java
new file mode 100644
index 0000000000..147e749756
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.core/src/org/eclipse/linuxtools/rpm/core/utils/internal/StreamReaderThread.java
@@ -0,0 +1,38 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+package org.eclipse.linuxtools.rpm.core.utils.internal;
+
+import java.io.InputStreamReader;
+import java.io.InputStream;
+
+/**
+ * Thread for reading input and output streams
+ */
+public class StreamReaderThread extends Thread
+{
+ StringBuffer mOut;
+ InputStreamReader mIn;
+
+ public StreamReaderThread(InputStream in, StringBuffer out)
+ {
+ mOut=out;
+ mIn=new InputStreamReader(in);
+ }
+
+ public void run()
+ {
+ int ch;
+ try {
+ while(-1 != (ch=mIn.read()))
+ mOut.append((char)ch);
+ }
+ catch (Exception e)
+ {
+ mOut.append("\nRead error:"+e.getMessage());
+ }
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/.project b/rpm/org.eclipse.linuxtools.rpm.doc/.project
new file mode 100644
index 0000000000..49c63b0f6a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.rpm.doc</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/ChangeLog b/rpm/org.eclipse.linuxtools.rpm.doc/ChangeLog
new file mode 100644
index 0000000000..d77d0752d3
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/ChangeLog
@@ -0,0 +1,87 @@
+2007-05-04 Andrew Overholt <overholt@redhat.com>
+
+ Bug #185598
+ * plugin.xml: Add "Incubation" to Bundle-Name.
+
+2007-01-29 Andrew Overholt <overholt@redhat.com>
+
+ * build.xml: Re-namespace from cdt to linuxtools.
+ * plugin.properties: Likewise.
+ * plugin.xml: Likewise.
+ * raw/rpmguide/RPM_Plugin.htm: Likewise.
+
+2005-05-27 Jeremy Handcock <handcock@redhat.com>
+
+ * plugin.xml: Bump version to 3.0.
+
+2005-01-25 Rick Moseley <rmoseley@redhat.com>
+ * bz#84229
+
+2005-01-25 Rick Moseley <rmoseley@redhat.com>
+
+ * RPM_Plugin.htm: bz#83661
+ * 05_eclipse_rpm_srpm_import.png: bz#83661
+
+2004-11-11 Rick Moseley <rmoseley@redhat.com>
+
+ * RPM_Plugin.htm: some massaging by the docs guy
+
+2004-11-11 Rick Moseley <rmoseley@redhat.com>
+
+ * plugin.xml: change version to 1.2
+
+2004-11-09 Rick Moseley <rmoseley@redhat.com>
+
+ * RPM_Plugin.htm: updated with new screenshot for Prefs Page, added verbage
+ describing new fields, point users to eclipse.org to post bugs/feature
+ requests
+ * Change name in docs from "Developers Guide" to "Users Guide"
+
+2004-07-20 Ben Konrath <bkonrath@redhat.com>
+
+ * add new screenshots and documentation
+ * remove old screenshots and documentation
+
+2004-07-15 Rick Moseley <rmoseley@redhat.com>
+
+ * build.xml: changed version to 1.1
+ * plugin.xml: changed verison to 1.1
+
+2004-07-14 Rick Moseley <rmoseley@redhat.com>
+
+ * build.properties: added custom=true
+
+
+2004-04-05 Jeremy Handcock <handcock@redhat.com>
+
+ * raw/RPMPlugin/RPMVersion3U1.htm: File bugs in Red Hat Bugzilla, not
+ eclipse.org.
+
+2003-9-10 Phil Muldoon <pmuldoon@redhat.com>
+
+ * raw/hglegal2002.htm: Added
+
+ build.xml: Rewrote gather.bin.parts to not use excludes
+
+ plugin.xml: Changed version to match build.xml. Removed
+ context help extensions
+
+ build.properties: Changed incorrect comments
+
+ plugin.properties: Changed provider and title
+
+2003-9-10 Phil Muldoon <pmuldoon@redhat.com>
+
+ * Removed doc.zip
+
+2003-08-27 Phil Muldoon <pmuldoon@redhat.com>
+
+ * build.xml(zip.plugin): Removed parent dir in doc.zip
+
+2003-08-27 Phil Muldoon <pmuldoon@redhat.com>
+
+ * Added build.xml
+
+2003-08-27 Phil Muldoon <pmuldoon@@redhat.com>
+
+ * Imported Red Hat RPM Documentation files
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/about.html b/rpm/org.eclipse.linuxtools.rpm.doc/about.html
new file mode 100644
index 0000000000..44e229003e
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.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>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.doc/build.properties b/rpm/org.eclipse.linuxtools.rpm.doc/build.properties
new file mode 100644
index 0000000000..18b918536f
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/build.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# (c) 2004 Red Hat, Inc.
+#
+# This program is open source software licensed under the
+# Eclipse Public License ver. 1
+#
+###############################################################################
+
+bin.includes = plugin.properties,\
+ *.xml,\
+ doc.zip
+custom=true \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/build.xml b/rpm/org.eclipse.linuxtools.rpm.doc/build.xml
new file mode 100644
index 0000000000..2ed12885f6
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/build.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="org.eclipse.linuxtools.rpm.doc" default="zip.plugin" basedir=".">
+
+ <target name="init">
+ <property name="plugin" value="org.eclipse.linuxtools.rpm.doc"/>
+ <property name="version.suffix" value="_1.1"/>
+ <property name="full.name" value="${plugin}${version.suffix}"/>
+ <property name="temp.folder" value="${basedir}/temp.folder"/>
+ <property name="plugin.destination" value="${basedir}"/>
+ <property name="build.result.folder" value="${basedir}"/>
+ </target>
+
+ <target name="build.update.jar" depends="init">
+ <delete dir="${temp.folder}"/>
+ <mkdir dir="${temp.folder}"/>
+ <antcall target="build.jars"/>
+ <antcall target="gather.bin.parts">
+ <param name="destination.temp.folder" value="${temp.folder}/"/>
+ </antcall>
+ <zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false"/>
+ <delete dir="${temp.folder}"/>
+ </target>
+
+
+ <target name="gather.bin.parts" depends="init" if="destination.temp.folder">
+ <mkdir dir="${destination.temp.folder}/${full.name}"/>
+ <zip zipfile="${destination.temp.folder}/${full.name}/doc.zip"
+ basedir="${basedir}/raw"
+ />
+ <copy todir="${destination.temp.folder}/${full.name}">
+ <fileset dir="${basedir}" includes="*.properties,*.xml,*.zip" excludes="build.properties,build.xml"/>
+ </copy>
+ </target>
+
+ <target name="build.jars" depends="init">
+ <antcall target="gather.bin.parts" />
+ </target>
+
+ <target name="gather.sources" depends="init" if="destination.temp.folder">
+ </target>
+
+ <target name="build.sources" depends="init">
+ </target>
+
+ <target name="gather.logs" depends="init" if="destination.temp.folder">
+ </target>
+
+ <target name="clean" depends="init">
+ <delete file="${plugin.destination}/${full.name}.jar"/>
+ <delete file="${plugin.destination}/${full.name}.zip"/>
+ <delete dir="${temp.folder}"/>
+ </target>
+
+ <target name="refresh" depends="init" if="eclipse.running">
+ <eclipse.refreshLocal resource="${plugin}" depth="infinite"/>
+ </target>
+
+ <target name="zip.plugin" depends="init">
+ <delete dir="${temp.folder}"/>
+ <mkdir dir="${temp.folder}"/>
+ <antcall target="build.jars"/>
+ <antcall target="build.sources"/>
+ <antcall target="gather.bin.parts">
+ <param name="destination.temp.folder" value="${temp.folder}/"/>
+ </antcall>
+ <antcall target="gather.sources">
+ <param name="destination.temp.folder" value="${temp.folder}/"/>
+ </antcall>
+ <delete>
+ <fileset dir="${temp.folder}" includes="**/*.bin.log"/>
+ </delete>
+ <zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true"/>
+ <delete dir="${temp.folder}"/>
+ </target>
+
+</project>
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/plugin.properties b/rpm/org.eclipse.linuxtools.rpm.doc/plugin.properties
new file mode 100644
index 0000000000..186bd6eb8f
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/plugin.properties
@@ -0,0 +1,10 @@
+###############################################################################
+# (c) 2007 Red Hat, Inc.
+#
+# This program is open source software licensed under the
+# Eclipse Public License ver. 1
+#
+###############################################################################
+
+pluginName=RPM Plugin User's Guide
+providerName=Eclipse.org
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/plugin.xml b/rpm/org.eclipse.linuxtools.rpm.doc/plugin.xml
new file mode 100644
index 0000000000..3eea5d1761
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/plugin.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin
+ id="org.eclipse.linuxtools.rpm.doc"
+ name="RPM Plug-in Documentation (Incubation)"
+ version="3.0.0"
+ provider-name="Eclipse.org">
+
+ <runtime>
+ </runtime>
+
+<!-- This part should be in a documentation plugin -->
+<!-- Configure the help contribution for this plugin -->
+ <extension
+ point="org.eclipse.help.toc">
+ <toc
+ file="toc.xml"
+ primary="true">
+ </toc>
+ </extension>
+</plugin>
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/raw/book.css b/rpm/org.eclipse.linuxtools.rpm.doc/raw/book.css
new file mode 100644
index 0000000000..f1fc59b7db
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/raw/book.css
@@ -0,0 +1,206 @@
+.userinput, kbd {
+ font-family: monospace;
+ font-weight: bold;
+}
+
+.guimenu {
+ color: #000000;
+ font-family: helvetica, arial, sans-serif;
+ background-color: #DCDCDC;
+ padding: 1px 3px;
+ font-size: x-small;
+ text-decoration: none;
+ line-height:175%;
+ }
+
+.selectblue {
+ color: #ffffff;
+ font-family: helvetica, arial, sans-serif;
+ background-color: #5E7AB7;
+ padding: 1px 3px;
+ font-size: x-small;
+ text-decoration: none;
+ line-height:175%;
+ }
+
+.guitab {
+ color: #000000;
+ font-family: helvetica, arial, sans-serif;
+ background-color: #DCDCDC;
+ padding: 1px 3px;
+ font-size: x-small;
+ border-top: outset 2px;
+ border-right: outset 2px;
+ border-left: outset 2px;
+ text-decoration: none;
+ line-height:175%;
+ }
+
+CAPTION {
+ font-weight: bold;
+}
+BODY, TD {
+ font-family: sans-serif;
+ font-size: x-small;
+ background-color: white;
+}
+
+h1 {
+ font-size: large;
+}
+
+h2 {
+ font-size: medium;
+}
+
+h3 {
+ font-size: small;
+}
+
+h4 {
+ font-size: x-small;
+ font-style: italic;
+}
+
+table {
+ font-size: x-small;
+}
+
+th {
+ font-weight: bold;
+}
+
+kbd {
+ font-family: monospace;
+ font-weight: bold;
+}
+
+var {
+ font-style: italic;
+}
+
+ol {
+ margin-bottom: 1em;
+}
+
+span.control {
+ font-weight: bold;
+}
+
+span.name {
+ font-style: italics;
+}
+
+span.code {
+ font-family: monospace;
+}
+
+UL {
+ border-width:0;
+ margin-left:20px;
+}
+
+#root {
+ margin-top:5px;
+ margin-left:5px;
+}
+
+UL.expanded {
+ display:block;
+}
+
+UL.collapsed {
+ display: none;
+}
+
+p.copyright {
+ font-family: sans-serif, Helvetica, Verdana;
+ font-size: xx-small;
+ color: #3450ac;
+}
+
+a.copyright {
+ color: #3450ac;
+ text-decoration: none;
+}
+
+.prevnext {
+ background: #C9D3E9;
+ text-decoration: none;
+ color: Black;
+ font-weight: bold;
+}
+.arrow {
+ color: White;
+ background-color: #6587C2;
+ font-weight: bold;
+ text-decoration: none;
+}
+.notetitle {
+ font-weight: bold;
+ margin-top: 4px;
+}
+.note {
+ margin-left: 40px;
+ margin-right: 60px;
+ border-bottom: thin solid;
+ border-top: thin solid;
+ border-color: #889988;
+ padding:2px;
+}
+
+p.listnote {
+ margin-right: 60px;
+ border-bottom: thin solid;
+ border-top: thin solid;
+ border-color: #889988;
+ padding:2px;
+}
+
+.command, .filename, .envar {
+ font-family: "Courier New", Courier, monospace;
+}
+.guilabel, .guibutton, .control {
+ font-weight: bold;
+}
+.warning {
+ color: #ff0000;
+ text-decoration: none;
+ font-weight: bold;
+ padding:1;
+}
+p.title {
+ font-style: italic ;
+ margin-top: 0px ;
+ margin-left: 20px;
+ margin-bottom: 20px
+}
+pre, tt, code {
+ font-family: "Courier New", Courier, monospace;
+ font-size: 10pt;
+}
+.important {
+ font-weight: bold;
+ color:#ff0000;
+ text-decoration:underline;
+}
+.guibutton {
+ color: #000000;
+ font-family: helvetica, arial, sans-serif;
+ background-color: #DCDCDC;
+ padding: 1px 3px;
+ font-size: x-small;
+ border: outset 2px;
+ text-decoration: none;
+ line-height:175%;
+}
+.whkeycap {
+ color: #333333;
+ font-family: helvetica, arial, sans-serif;
+ font-size: 10pt;
+ background-color: #e4e0d0;
+ padding: 0px 6px 2px 1px;
+ border: outset 2px;
+ text-decoration: none;
+ line-height:175%;
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/raw/hglegal2004.htm b/rpm/org.eclipse.linuxtools.rpm.doc/raw/hglegal2004.htm
new file mode 100644
index 0000000000..ca50e462b3
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/raw/hglegal2004.htm
@@ -0,0 +1,20 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+<style type="text/css">
+@import url(notnetscape4.css);
+</style>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<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>
+&copy; Copyright Red Hat 2002, 2004
+<br>This documentation is licensed pursuant to the Eclipse Public License v. 1.0.
+</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.doc/raw/images/01_eclipse_rpm_prefs_page1.png b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/01_eclipse_rpm_prefs_page1.png
new file mode 100644
index 0000000000..c7b43ff84c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/01_eclipse_rpm_prefs_page1.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/02_eclipse_rpm_Cproject_create.png b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/02_eclipse_rpm_Cproject_create.png
new file mode 100644
index 0000000000..73b60f62af
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/02_eclipse_rpm_Cproject_create.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/03_eclipse_rpm_Cproject_create.png b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/03_eclipse_rpm_Cproject_create.png
new file mode 100644
index 0000000000..6445f2f22c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/03_eclipse_rpm_Cproject_create.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/04_eclipse_rpm_srpm_import.png b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/04_eclipse_rpm_srpm_import.png
new file mode 100644
index 0000000000..cd34402c87
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/04_eclipse_rpm_srpm_import.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/05_eclipse_rpm_srpm_import.png b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/05_eclipse_rpm_srpm_import.png
new file mode 100644
index 0000000000..66a0a7a9f4
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/05_eclipse_rpm_srpm_import.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/06_eclipse_rpm_srpm_import.png b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/06_eclipse_rpm_srpm_import.png
new file mode 100644
index 0000000000..9dd7836ea0
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/06_eclipse_rpm_srpm_import.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/07_eclipse_rpm_srpm_import.png b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/07_eclipse_rpm_srpm_import.png
new file mode 100644
index 0000000000..f2d46ebd58
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/07_eclipse_rpm_srpm_import.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/07_eclipse_rpm_srpm_import_2.png b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/07_eclipse_rpm_srpm_import_2.png
new file mode 100644
index 0000000000..ff918753c7
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/07_eclipse_rpm_srpm_import_2.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/08_eclipse_rpm_cproject_view.png b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/08_eclipse_rpm_cproject_view.png
new file mode 100644
index 0000000000..f22c4bd87a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/08_eclipse_rpm_cproject_view.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/09_eclipse_rpm_export.png b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/09_eclipse_rpm_export.png
new file mode 100644
index 0000000000..cc378ad55c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/09_eclipse_rpm_export.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/10_eclipse_rpm_export.png b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/10_eclipse_rpm_export.png
new file mode 100644
index 0000000000..9fb280fbd1
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/10_eclipse_rpm_export.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/11_eclipse_rpm_export.png b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/11_eclipse_rpm_export.png
new file mode 100644
index 0000000000..458420dc00
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/11_eclipse_rpm_export.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/12_eclipse_rpm_export.png b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/12_eclipse_rpm_export.png
new file mode 100644
index 0000000000..4b3746b359
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/12_eclipse_rpm_export.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/13_eclipse_rpm_export.png b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/13_eclipse_rpm_export.png
new file mode 100644
index 0000000000..1590bca0b1
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/13_eclipse_rpm_export.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/14_eclipse_rpm_export.png b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/14_eclipse_rpm_export.png
new file mode 100644
index 0000000000..13dc55ce4a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/14_eclipse_rpm_export.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/15_eclipse_rpm_logviewer.png b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/15_eclipse_rpm_logviewer.png
new file mode 100644
index 0000000000..a7c41d1c4d
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/15_eclipse_rpm_logviewer.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/16_eclipse_rpm_logviewer.png b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/16_eclipse_rpm_logviewer.png
new file mode 100644
index 0000000000..828c5da026
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/raw/images/16_eclipse_rpm_logviewer.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/raw/notnetscape4.css b/rpm/org.eclipse.linuxtools.rpm.doc/raw/notnetscape4.css
new file mode 100644
index 0000000000..0d384026fd
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/raw/notnetscape4.css
@@ -0,0 +1,14 @@
+LI {
+ font-family: Verdana, Helvetica, sans-serif;
+ font-size: 10pt;
+ margin-top: 10px;
+ margin-bottom: 10px;
+}
+
+DT {
+ font-style: normal;
+ font-weight: bold;
+ font-size: 10pt;
+ margin-top: 10px;
+ margin-bottom: 5px;
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/raw/rpmguide/RPM_Plugin.htm b/rpm/org.eclipse.linuxtools.rpm.doc/raw/rpmguide/RPM_Plugin.htm
new file mode 100644
index 0000000000..6cba29fc09
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/raw/rpmguide/RPM_Plugin.htm
@@ -0,0 +1,317 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <title>RPM Plugin for Eclipse</title>
+ <link rel="stylesheet" href="../book.css" type="text/css">
+ <meta http-equiv="Content-Language" content="en-us">
+ <meta http-equiv="Content-Type"
+ content="text/html; charset=windows-1252">
+</head>
+<body>
+<h1>RPM Plugin for Eclipse</h1>
+<!-- Version 1.? Introduction The RPM Plugin for Eclipse enables
+ you to manage
+ Linux <b>RPM</b> software packages. You can easily import
+ source RPMs and
+ re-export them as source and/or binary RPMs. -->
+<p>If you are unfamiliar with the RPM package format, creating the
+files necessary to generate a properly formatted, installable <span
+ class="filename">.rpm</span> file can be a complex process. The RPM
+Plugin for Eclipse provides you with an automated method of creating
+RPM packages from simple C/C++ projects.
+You can also import previously-created source RPMs, modify them, and
+re-export them in both binary and source format with minimal effort.
+The resulting packages will be ready to install on any Linux system.</p>
+<p class="note"><span class="notetitle">Note: </span>
+If there are features regarding RPM you would like to see implemented
+or want to report a bug or recommend a feature be added, go to <a
+ href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Linux%20Distros&component=RPM" target="_blank">https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Linux%20Distros&component=RPM</a>.
+Then, either enter a feature request or bug report under the <span
+ class="guilabel">LinuxTools &gt; RPM</span> section in bugzilla.
+</p>
+<h2>RPM Plugin Preference Page Setup</h2>
+<p>Before using the RPM plugin, you should set default values in the
+RPM plugin's preference page. To get to the <b>RPM plugin Preferences</b>
+page, click <b>Window &gt; Preferences &gt; RPM Plugin</b>.
+The screen below is displayed:</p>
+<p><img alt="" src="../images/01_eclipse_rpm_prefs_page1.png"></p>
+<p>There are several fields you can change. The first two fields are
+values the RPM plugin will use to populate the changelog section of the
+<span class="filename">spec</span> files. The first line of a <span
+ class="filename">spec</span> file changelog entry typically looks like
+this:</p>
+<pre>* Thu May 27, 2004 John Smith &lt;jsmith@mydomain.com&gt;<br></pre>
+<p>When a change is made to a project and the RPM plugin is used to
+export it as a source RPM, the <b>Author Name</b> and <b>Author E-mail</b>
+fields are used as the default values to place in the changelog line
+section of the spec file. A screen is presented that enables you to
+change the directory where the RPM plugin will create a temporary work
+area using your userid. In the above example, if the default <code>/var/tmp</code>
+is used, the RPM plugin will create a work area under <code>/var/tmp/jsmith</code>
+during an RPM import/export operation. All directories under <code>/var/tmp/jsmith</code>
+will be deleted after the import/export is complete.
+If the import/export aborts for any reason, the work area will remain
+intact so that you can debug any problems, in which case the work area
+will be deleted when the next
+import/export is attempted.
+</p>
+<p>For the time being, the RPM plugin actually shells out and executes
+commands to perform the necessary functions to import/export RPMs.
+(In the future, Java bindings for RPM will be explored.)
+In the "Shell Commands" section, you are given the opportunity to
+change the actual shell commands that the RPM plugin uses.
+These commands default to the standard
+locations for most Linux installations, but you can change them to
+point to the proper locations of these commands on your system.
+</p>
+<h2>Import of SRPM (Source RPM)</h2>
+<p>One of the features of the RPM Manipulation plugin is the ability to
+import C/C++ source that is in packaged in <b>srpm</b> format into an
+Eclipse C/C++ project. A selection has been added to the screen that is
+displayed when the Eclipse <b>File &gt; Import</b> pulldown item is
+selected. This allows you to quickly and easily import source RPMs into
+the Eclipse development environment.</p>
+<h3>Invoking the Eclipse SRPM Import Feature for C/C++ Projects</h3>
+<p>Invoking the SRPM Import feature of Eclipse is a very simple matter.
+At the top of the Eclipse click on <b>File</b> which causes a pulldown
+menu to appear. From this menu click on <b>Import</b>. This causes the
+screen below to appear:</p>
+<p><img src="../images/04_eclipse_rpm_srpm_import.png"></p>
+<p>From this screen select <b>Source RPM</b> and then <b>Next</b> to
+activate the next screen shown here:</p>
+<p><img alt="" src="../images/05_eclipse_rpm_srpm_import.png"
+ style="width: 525px; height: 564px;"><br>
+</p>
+<p>There are three functions that this screen must perform in order to
+successfully import a source RPM into Eclipse. The first thing you must
+do is select a source RPM to be imported using the <b>Browse</b>
+button. When this button is depressed the following window is presented.</p>
+<p><img src="../images/06_eclipse_rpm_srpm_import.png"></p>
+<p>This screen is used to <b>browse</b> around a system to the desired
+source RPM. As can be seen from the right side of the screen, all
+source RPMs have the extension <tt>.src.rpm</tt>.
+Once the desired source RPM is found, either double-click on it or
+single-click and then click <b>OK</b>. The source RPMs name should now
+appear in the <b>SRPM Name</b> window.</p>
+<p>Next, either select the already-existing C/C++ project where this
+source RPM will be imported or click on the "Check out as a project
+using the New Project Wizard" button. If you select the latter, the
+C/C++ project wizard pops up and guides you through the process of
+creating a new C/C++ project.&nbsp; Once the wizard is done, the import
+process begins automatically.&nbsp; If there is a project already
+created you want to import into, the <b>Select a project</b> window
+contains a list of the available Eclipse C/C++ projects. Scroll to the
+desired project and select it so it is highlighted and click on
+"Finish".<br>
+</p>
+<p>Now, the <b>Build Options</b> window probably already has the
+options selected that you typically want when a source RPM is to be
+imported. That is, most of the time you will want all of the patches
+applied and will want <b>configure</b> run so the project is ready to
+run make after it is imported. If either one or the other option is not
+desired, unselect either one or both by clicking on the appropriate
+boxes to the left of the screen.</p>
+<p>Once all of the fields have been set to the desired state, to
+complete the source RPM import function simply click <b>Finish</b>.
+This activates a sequence that, again, could possibly take
+quite a while depending on the size of the RPM. If <b>Run AutoConf</b>
+has been selected, it could take a while for the <b>configure</b>
+script to run.</p>
+<p><img src="../images/07_eclipse_rpm_srpm_import_2.png"
+ alt="SRPM Import progress bar screenshot here"
+ style="width: 525px; height: 550px;"><br>
+</p>
+<p>A progress-bar indicates what step the import process is executing,
+but not necessarily how long has been taken or is remaining. Once this
+step is successfully completed, the window disappears and the project
+can be viewed in the Eclipse <b>C/C++ project</b> view as shown in the
+figure below.</p>
+<p><img src="../images/08_eclipse_rpm_cproject_view.png"></p>
+<p>Now you can use all of the resources of Eclipse on this imported
+C/C++ project just as any other project. Notice that the source RPM
+that was selected for import has been copied into the project. The
+source RPM will be required if you make changes to the project and
+wants to export it as a patched source RPM. The original source RPM
+will be installed and compared against the current source in the
+Eclipse project to create a patch.</p>
+<p class="note"><span class="important">Important: </span>
+Not all source RPMs will be able to be imported as the formats various
+maintainers varies widely. An effort has been made to accommodate as
+many of the formats as possible. If you find a source RPM that cannot
+be imported, please file a bug report with the Eclipse project. There
+is no guarantee that we can fix the problem, but if the source RPM is
+in a reasonable format every effort will be made to get the RPM Plugin
+to handle it. Sometimes it may make more sense if the source RPM is
+modified to be more in line with most of the other source RPM formats.</p>
+<h3>RPM Plugin-created files</h3>
+<p>To facilitate the later exporting of this project as a binary or
+source RPM, the RPM plugin creates two files that hold vital
+information: <tt>.srpminfo</tt> and <tt><i>eclipse_packagename</i></tt>.
+</p>
+<p>Generally you should not modify these files�particularly the <b>.srpminfo</b>
+file. This file contains five lines, one which contains the name of the
+source RPM from which this project was imported.</p>
+<p>Part of the import process is to copy the source RPM (which ends
+with <tt>.src.rpm</tt>) into the project to ensure there is a copy
+should you try to export this project as a source RPM. If this project
+is to be re-exported as a source RPM, the RPM plugin will need to
+re-install the original source RPM from which this project was created
+in order to generate a proper patch to be included in the new source
+RPM. This also implies that the original source RPM should not be
+deleted or renamed until a new source RPM is created. <tt>.srpminfo</tt>
+is modified by the RPM plugin when a source RPM is exported to point to
+the new source RPM path, usually within the Eclipse project itself. It
+is deleted before the source RPM is created, so it is not included with
+the source code.</p>
+<p>The <tt>eclipse_packagename.spec</tt> file is a copy of the spec
+file from the <code>SPECS</code> directory from when the source RPM
+was installed in the <code>/var/tmp/userid/...</code> temporary work
+area. This spec file is modified by the RPM plugin appropriately when
+either the binary or source RPM export operation is run. If you edit
+this file, you do so at your own risk. It is <b><i>permanently</i></b>
+modified by the RPM plugin <b><i>only</i></b> when a source RPM is
+exported. Additional <tt>Patchx:/%patch</tt> statements are inserted
+in the appropriate places and the version and/or release numbers are
+updated if they are changed. Like the <tt>.srpminfo</tt> file, this
+file is deleted by the RPM plugin before the source RPM is created so
+the <tt>diff</tt> will not see it and include it in any patch that is
+created.
+</p>
+<h3>RPM Plugin Export Feature Binary and Source</h3>
+<p>The ability to export Eclipse C/C++ projects to binary and source
+RPMs can be divided into two categories with sub-categories beneath
+those:
+</p>
+<ul>
+ <li>Projects created from imported source RPMs
+ <ul>
+ <li>The RPM plugin modifies the previous spec file appropriately</li>
+ <li>You provide a spec file</li>
+ <li>The RPM generates a simple spec file (recommended only for
+simple projects).</li>
+ </ul>
+ </li>
+ <li>Projects that have never been RPMs
+ <ul>
+ <li>The RPM plugin generates a simple spec file</li>
+ <li>You provide a spec file.</li>
+ </ul>
+ </li>
+</ul>
+<p>If you choose to export only a binary RPM, the RPM plugin will
+create a temporary spec file and patches to apply, but these will be
+discarded after the creation of the binary RPM. That is, the <span
+ class="filename"><i>eclipse_packagename</i>.spec</span> does not get
+permanently modified. If a source RPM is created, the above-mentioned <span
+ class="filename">spec</span> file is permanently modified and the <tt>.srpminfo</tt>
+file is changed to now point to the new source RPM as its base.</p>
+<h3>Invoking the Eclipse RPM Manipulation Methods</h3>
+<p>Initiating the export of a simple C/C++ project to an RPM package is
+very simple. Simply click <b>File &gt; Export</b> and a screen like
+the one below appears:</p>
+<p><img src="../images/09_eclipse_rpm_export.png"></p>
+<p>This screen lists the selections to which an Eclipse project can be
+exported. Notice one of the selections is <b>Source/Binary RPM</b>.
+Make sure this is selected and click <b>Next</b>. That will bring you
+to the next screen shown below:</p>
+<p><img src="../images/10_eclipse_rpm_export.png"></p>
+<p>This screen enables you to select a project to be turned into an RPM
+format. Select a project to be exported in the <b>Select a project</b>
+window. Notice as different projects are selected the values in the <b>SPEC
+file</b>, <b>Version</b>, and <b>Release</b> fields change. If a
+project is selected that has never been exported, those fields will be
+blank. If a project is selected that has been imported/exported as an
+RPM, those fields will contain info derived from the source RPM it was
+imported from or from the last source RPM that was exported from this
+project.</p>
+<p>If you want to provide a spec file other than the one associated
+with the RPM, use the <b>Browse</b> button to select the desired spec
+file and that is the one that will be used to create the RPMs. If the
+default <span class="filename">spec</span> file is used, it will be
+modified by the RPM plugin with
+the new version and/or release numbers entered by you and that will
+become the new default <span class="filename">spec</span> file.</p>
+<p>Sometimes the last box on the screen has information in it and
+sometimes it does not. When a project is selected that has never been
+exported before or has not been modified since it was last exported, no
+information is shown, the <b>Next</b> button is grayed out, and the <b>Finish</b>
+button is enabled:</p>
+<p><img src="../images/11_eclipse_rpm_export.png"></p>
+<p>On the screen above, you can change any of the three fields
+associated with the project: <b>SPEC file</b>, <b>Version</b> or <b>Release</b>.
+If no changes are made to the version and/or release fields and the <b>Finish</b>
+button is clicked, the values in the fields will be used. This means,
+depending on whether Binary RPM and/or Source RPM is selected, that the
+previously-created source/binary RPMs with those version release
+numbers will be overwritten inside the project.</p>
+<p>If the <b>Patch Needed</b> information sign appears, then you can
+modify any of the three fields and will be forced to click on the <b>Next</b>
+button to enter information associated with creating a patch:</p>
+<p><img src="../images/12_eclipse_rpm_export.png"></p>
+<p>On this screen, you must enter data into the <b>Patch Tag</b> and <b>Changelog
+Comment:</b> fields. It is recommended that even though default
+information is supplied in the <b>Changelog Date Stamp:</b> field, you
+should enter the correct data for the name and e-mail address portion
+of the field. </p>
+<p class="note"><span class="important">Warning: </span>
+The format for the RPM changelog fields is very sensitive and should
+not be changed.
+Any changes may cause the RPM creation to fail when the <b>rpmbuild</b>
+command is invoked.</p>
+<p>Once the <b>Patch Tag</b> and <b>Changelog Comment:</b> fields
+have data entered into them, the <b>Finish</b> button will be enabled.
+Clicking on the <b>Finish</b> button will begin the RPM creation
+sequence, which goes something like this:</p>
+<ol>
+ <li>Install the original source RPM pointed to by <tt>.srpminfo</tt></li>
+ <li>Run the <b>configure</b> and the <b>make</b> commands</li>
+ <li>Copy that RPM directory over to a duplicate directory with a <tt>.new</tt>
+appended in preparation for generating a patch</li>
+ <li>Copy the source from the appropriate Eclipse project to the
+duplicate directory</li>
+ <li>Run <b>make clean/distclean/maintainer-clean</b> command to
+remove all extraneous files on both directories</li>
+ <li>Use the <b>diff -uNr</b> command to generate a patch of the
+differences between the directories</li>
+ <li>If the version number changed, untar the master source and rename
+the tarball to match the new version number</li>
+ <li>Modify the spec file to add the <b>Patch:/%patch</b> statements
+and modify the version and/or release numbers</li>
+ <li>Use the <b>rpmbuild -b?</b> command to generate the requested
+RPMs</li>
+</ol>
+<p>The following screen is shown with a progress bar indicating where
+the RPM creation process currently is.</p>
+<p><img src="../images/13_eclipse_rpm_export.png"></p>
+<p>If the RPM creation process was successful, the <b>Export an SRPM</b>
+screen will disappear and the requested RPMs will show up in the
+Eclipse project that was exported. If the RPM creation process was
+unsuccessful, an error screen like the one below appears:</p>
+<p><img src="../images/14_eclipse_rpm_export.png"></p>
+<p>Click <b>Details&gt;</b> to get more information about the error.
+For every export (and import for that matter), a log file is created in
+the designated RPM work area directory with a name formatted like: <tt><i>packagename-version-release-MMDD_HHMM.</i>rpmbuild.log</tt>.
+The contents of this log should help you determine what caused the
+error as it contains output from the processes that ran during the RPM
+creation process.</p>
+<p>You can view this logfile through the Eclipse <b>Console</b> view
+by activating the RPM plugin log viewer. Click <b>Window &gt; Show
+View &gt; Other &gt; RPM Plugin Log Viewer</b>. The <b>RPM Plugin Log
+Viewer</b> selection is shown below:</p>
+<p><img src="../images/15_eclipse_rpm_logviewer.png"></p>
+<p>Once this is done, a tab in the Eclipse console window should appear
+labeled <b>RPM Plugin Log Viewer</b>. The display should appear as in
+the example below:</p>
+<p><img src="../images/16_eclipse_rpm_logviewer.png"></p>
+<p>The <b>RPM log</b> view shows the last log generated by the RPM
+plugin. The name of the logfile that the viewer displays is kept in a
+file in the RPM work area designated by the preference page. So, if <code>/var/tmp</code>
+is the designated work area, the file would be named <code>/var/tmp/.logfilename_userid</code>,
+where userid is your login id. Each time an import/export is performed,
+the filename is changed, and the log viewer picks it up and displays
+it.
+</p>
+<p class="copyright"><a href="../hglegal2004.htm" class="copyright">&nbsp;�
+Copyright Red Hat 2004. All Rights Reserved.</a></p>
+</body>
+</html>
diff --git a/rpm/org.eclipse.linuxtools.rpm.doc/toc.xml b/rpm/org.eclipse.linuxtools.rpm.doc/toc.xml
new file mode 100644
index 0000000000..d531ab01dd
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.doc/toc.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+<!-- Defines topics that will be inserted under the RPM Plugin menu-->
+
+<toc id="RPM" label="RPM Plugin User's Guide">
+ <topic label="RPM Plugin" href="rpmguide/RPM_Plugin.htm" />
+</toc>
diff --git a/rpm/org.eclipse.linuxtools.rpm.releng/ChangeLog b/rpm/org.eclipse.linuxtools.rpm.releng/ChangeLog
new file mode 100644
index 0000000000..c9369202f8
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.releng/ChangeLog
@@ -0,0 +1,50 @@
+2007-01-29 Andrew Overholt <overholt@redhat.com>
+
+ * : Re-namespace from cdt to linuxtools.
+
+2005-05-25 Jeremy Handcock <handcock@redhat.com>
+
+ Eclipse.org Bugzilla #82196:
+ * maps/rpm.map: Remove rpm.propertypage plug-in.
+
+2005-01-14 Jeremy Handcock <handcock@redhat.com>
+
+ Bugzilla #82889:
+ * build.properties: Change build configuration to platform-independent.
+ * customTargets.xml: Change assemble target to platform-independent.
+
+2004-11-11 Rick Moseley <rmoseley@redhat.com>
+
+ * rpm.map: added propertypage
+ * build.xml: removed "target name" stuff, not required for
+ new building process
+
+2004-07-15 Phil Muldoon <pmuldoon@redhat.com>
+
+ * customTargets.xml: Fixed assemble target
+
+2004-07-15 Rick Moseley <rmoseley@redhat.com>
+
+ * customTargets.xml: changed name of archive tarball
+ * build.xml: changed version from 1.0.0 to 1.1
+
+2004-07-15 Rick Moseley <rmoseley@redhat.com>
+
+ * customTargets.xml: Separate AllElements target
+ so that we can skip fetching elements if they've
+ already been fetched (via a hacky property
+ definition that can be passed on the command line).
+ Useful for SRPM building.
+
+2004-07-14 Rick Moseley <rmoseley@redhat.com>
+
+ * customTargets.xml : fixed typo
+
+
+2004-07-14 Rick Moseley <rmoseley@redhat.com>
+
+ * Initial check-in. Added
+ maps/changelog.map
+ build.properties
+ customTargets.xml
+ Changelog
diff --git a/rpm/org.eclipse.linuxtools.rpm.releng/build.properties b/rpm/org.eclipse.linuxtools.rpm.releng/build.properties
new file mode 100644
index 0000000000..eb50e20616
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.releng/build.properties
@@ -0,0 +1,80 @@
+#####################
+# Parameters describing how and where to execute the build.
+# Typical users need only update the following properties:
+# baseLocation - where things you are building against are installed
+# bootclasspath - The base jars to compile against (typicaly rt.jar)
+# configs - the list of {os, ws, arch} configurations to build.
+#
+# Of course any of the settings here can be overridden by spec'ing
+# them on the command line (e.g., -DbaseLocation=d:/eclipse
+
+############# CVS CONTROL ################
+# The CVS tag to use when fetching the map files from the repository
+mapVersionTag=HEAD
+
+# The CVS tag to use when fetching elements to build. By default the
+# builder will use whatever is in the maps. Use this value to override
+# for example, when doing a nightly build out of HEAD
+# fetchTag=HEAD
+
+
+############## BUILD / GENERATION CONTROL ################
+# The directory into which the build elements will be fetched and where
+# the build will take place. buildDirectory and install should be the same
+# value.
+buildDirectory=build
+
+# Type of build. Used in naming the build output. Typically this value is
+# one of I, N, M, S, ...
+buildType=I
+
+# ID of the build. Used in naming the build output.
+buildId=TestBuild
+
+# Label for the build. Used in naming the build output
+buildLabel=${buildType}.${buildId}
+
+# Timestamp for the build. Used in naming the build output
+timestamp=007
+
+# Base location for anything the build needs to compile against. For example,
+# when building GEF, the baseLocation should be the location of a previously
+# installed Eclipse against which the GEF code will be compiled.
+baseLocation=
+
+#Os/Ws/Arch/nl of the eclipse specified by baseLocation
+#baseos
+#basews
+#basearch
+#basenl
+
+# The location underwhich all of the build output will be collected. This will be
+# the root path in the resultant zip file.
+collPlace=eclipse
+
+# The directory in which to execute zip of the ${collPlace} directory
+collBase=.
+
+# The list of {os, ws, arch} configurations to build. This
+# value is a '&' separated list of ',' separate triples. For example,
+# configs=win32,win32,x86 & linux,motif,x86
+# By default the value is *,*,*
+configs=\
+ *,*,*
+
+#Arguments to send to the zip executable
+zipargs=
+
+############# JAVA COMPILER OPTIONS ##############
+# The location of the Java jars to compile against. Typically the rt.jar for your JDK/JRE
+#bootclasspath=d:/ibm1.3.1/jre/lib/rt.jar
+
+javacDebugInfo=on
+javacVerbose=true
+javacFailOnError=false
+
+# The version of the source code
+#javaSource=1.3
+
+# The version of the byte code targeted
+#javacTarget=1.1
diff --git a/rpm/org.eclipse.linuxtools.rpm.releng/build.xml b/rpm/org.eclipse.linuxtools.rpm.releng/build.xml
new file mode 100644
index 0000000000..67912975ba
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.releng/build.xml
@@ -0,0 +1,46 @@
+<project default="zips">
+
+ <target name="build" depends="zips"/>
+ <target name="nightly" depends="build"/>
+
+ <target name="init">
+ <touch file="${user.home}/.cvspass" />
+ <tstamp/>
+ <property name="timestamp" value="${DSTAMP}${TSTAMP}" />
+ <property name="buildDirectory" value="${basedir}/results" />
+ <property name="baseLocation" value="${buildDirectory}/eclipse"/>
+ <property name="pde.build.scripts" value="/usr/share/eclipse/plugins/org.eclipse.pde.build_3.0.0/scripts"/>
+ <property name="eclipseZip" value="eclipse-SDK.zip"/>
+ <property name="collectingFolder" value="eclipse"/>
+ <property name="archivePrefix" value="eclipse"/>
+ <property name="buildType" value="I" />
+ <property name="buildId" value="${buildType}${timestamp}"/>
+ <property name="zipsdir" value="${buildDirectory}/${buildType}.${buildId}"/>
+ <property name="sitedir" value="${buildDirectory}/build.site"/>
+ <property name="siteversion" value="1.1"/>
+ <property name="milestonedir" value="${buildDirectory}/${milestone}"/>
+ <property name="buildingOSGi" value="true"/>
+ <property name="messagefile" value="message.in"/>
+ </target>
+
+ <target name="zips" depends="init,unzip">
+ <ant antfile="build.xml" dir="${pde.build.scripts}">
+ <property name="builder" value="${basedir}" />
+ </ant>
+ </target>
+ <target name="unzip" depends="init" unless="dontUnzip">
+ </target>
+
+ <target name="fetch" depends="init">
+ <ant antfile="build.xml" dir="${pde.build.scripts}"
+ target="preBuild">
+ <property name="builder" value="${basedir}" />
+ </ant>
+ <ant antfile="build.xml" dir="${pde.build.scripts}"
+ target="fetch">
+ <property name="builder" value="${basedir}" />
+ </ant>
+ </target>
+
+
+</project>
diff --git a/rpm/org.eclipse.linuxtools.rpm.releng/customTargets.xml b/rpm/org.eclipse.linuxtools.rpm.releng/customTargets.xml
new file mode 100644
index 0000000000..795788d97f
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.releng/customTargets.xml
@@ -0,0 +1,165 @@
+<project name="Build specific targets and properties" default="noDefault" >
+
+<property name="basews" value="gtk" />
+<property name="baseos" value="linux" />
+<property name="basearch" value="x86" />
+<property name="basenl" value="en_US" />
+
+<!-- ===================================================================== -->
+<!-- Run a given ${target} on all elements being built -->
+<!-- Add on <ant> task for each top level element being built. -->
+<!-- ===================================================================== -->
+<target name="allElements">
+ <antcall target="${target}ForAllElements"/>
+</target>
+
+<target name="fetchElementForAllElements" unless="dontFetchAnything">
+ <antcall target="genericAllElements"/>
+</target>
+
+<target name="generateScriptForAllElements">
+ <antcall target="genericAllElements"/>
+</target>
+
+<target name="processElementForAllElements">
+ <antcall target="genericAllElements"/>
+</target>
+
+<target name="assembleElementForAllElements">
+ <antcall target="genericAllElements"/>
+</target>
+
+<target name="cleanElementForAllElements">
+ <antcall target="genericAllElements"/>
+</target>
+
+<target name="genericAllElements">
+ <ant antfile="${genericTargets}" target="${target}" >
+ <property name="type" value="feature" />
+ <property name="id" value="org.eclipse.linuxtools.rpm" />
+ </ant>
+</target>
+
+<!-- ===================================================================== -->
+<!-- Targets to assemble the built elements for particular configurations -->
+<!-- These generally call the generated assemble scripts (named in -->
+<!-- ${assembleScriptName}) but may also add pre and post processing -->
+<!-- Add one target for each root element and each configuration -->
+<!-- ===================================================================== -->
+
+<target name="assemble.org.eclipse.linuxtools.rpm">
+ <property name="archiveName" value="eclipse-rpm.zip" />
+ <ant antfile="${assembleScriptName}"/>
+</target>
+
+
+<!-- ===================================================================== -->
+<!-- Check out map files from correct repository -->
+<!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
+<!-- ===================================================================== -->
+
+<target name="getMapFiles">
+ <copy todir="${buildDirectory}/maps">
+ <fileset dir="${builder}/maps"/>
+ </copy>
+</target>
+
+<!-- ===================================================================== -->
+<!-- Steps to do before setup -->
+<!-- ===================================================================== -->
+<target name="preSetup">
+</target>
+
+<!-- ===================================================================== -->
+<!-- Steps to do after setup but before starting the build proper -->
+<!-- ===================================================================== -->
+<target name="postSetup">
+</target>
+
+<!-- ===================================================================== -->
+<!-- Steps to do before fetching the build elements -->
+<!-- ===================================================================== -->
+<target name="preFetch">
+</target>
+
+<!-- ===================================================================== -->
+<!-- Steps to do after fetching the build elements -->
+<!-- ===================================================================== -->
+<target name="postFetch">
+ <condition property="patchesAvailable">
+ <available file="${builder}/patch.xml"/>
+ </condition>
+ <antcall target="applyPatches"/>
+</target>
+
+<target name="applyPatches" if="patchesAvailable">
+ <ant antfile="${builder}/patch.xml"/>
+</target>
+
+<!-- ===================================================================== -->
+<!-- Steps to do before generating the build scripts. -->
+<!-- ===================================================================== -->
+<target name="preGenerate">
+</target>
+
+<!-- ===================================================================== -->
+<!-- Steps to do after generating the build scripts. -->
+<!-- ===================================================================== -->
+<target name="postGenerate">
+</target>
+
+
+<!-- ===================================================================== -->
+<!-- Steps to do before running the build.xmls for the elements being built. -->
+<!-- ===================================================================== -->
+<target name="preProcess">
+ <replace dir="${buildDirectory}/plugins" value="${timestamp}" token="@build@">
+ <include name="**/about.mappings" />
+ </replace>
+</target>
+
+<!-- ===================================================================== -->
+<!-- Steps to do after running the build.xmls for the elements being built. -->
+<!-- ===================================================================== -->
+<target name="postProcess">
+</target>
+
+
+<!-- ===================================================================== -->
+<!-- Steps to do before running assemble. -->
+<!-- ===================================================================== -->
+<target name="preAssemble">
+</target>
+
+<!-- ===================================================================== -->
+<!-- Steps to do after running assemble. -->
+<!-- ===================================================================== -->
+<target name="postAssemble">
+</target>
+
+<!-- ===================================================================== -->
+<!-- Steps to do after the build is done. -->
+<!-- ===================================================================== -->
+<target name="postBuild">
+</target>
+
+<!-- ===================================================================== -->
+<!-- Steps to do to test the build results -->
+<!-- ===================================================================== -->
+<target name="test">
+</target>
+
+<!-- ===================================================================== -->
+<!-- Steps to do to publish the build results -->
+<!-- ===================================================================== -->
+<target name="publish">
+</target>
+
+<!-- ===================================================================== -->
+<!-- Default target -->
+<!-- ===================================================================== -->
+<target name="noDefault">
+ <echo message="You must specify a target when invoking this file" />
+</target>
+
+</project>
diff --git a/rpm/org.eclipse.linuxtools.rpm.releng/maps/rpm.map b/rpm/org.eclipse.linuxtools.rpm.releng/maps/rpm.map
new file mode 100644
index 0000000000..975e27e015
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.releng/maps/rpm.map
@@ -0,0 +1,4 @@
+plugin@org.eclipse.cdt.rpm.core=HEAD,:pserver:anonymous@dev.eclipse.org:/home/tools/,,org.eclipse.cdt-contrib/org.eclipse.cdt.rpm/org.eclipse.cdt.rpm.core
+plugin@org.eclipse.cdt.rpm.ui=HEAD,:pserver:anonymous@dev.eclipse.org:/home/tools/,,org.eclipse.cdt-contrib/org.eclipse.cdt.rpm/org.eclipse.cdt.rpm.ui
+plugin@org.eclipse.cdt.rpm.doc=HEAD,:pserver:anonymous@dev.eclipse.org:/home/tools/,,org.eclipse.cdt-contrib/org.eclipse.cdt.rpm/org.eclipse.cdt.rpm.doc
+feature@org.eclipse.cdt.rpm=HEAD,:pserver:anonymous@dev.eclipse.org:/home/tools/,,org.eclipse.cdt-contrib/org.eclipse.cdt.rpm/org.eclipse.cdt.rpm-feature
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..c0be60d333
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/ChangeLog
@@ -0,0 +1,423 @@
+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.
+ (setReferedContent): 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..f595db86d4
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/META-INF/MANIFEST.MF
@@ -0,0 +1,25 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.linuxtools.rpm.rpmlint;singleton:=true
+Bundle-Version: 0.4.2.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"
+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/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/build.properties b/rpm/org.eclipse.linuxtools.rpm.rpmlint/build.properties
index 7b17480348..7b17480348 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/build.properties
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/build.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..04cdf03271
--- /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.org \ 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..d855b9b72b
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/plugin.xml
@@ -0,0 +1,97 @@
+<?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.popupMenus">
+ <objectContribution
+ adaptable="true"
+ objectClass="org.eclipse.core.resources.IProject"
+ nameFilter="*"
+ id="org.eclipse.linuxtools.rpm.rpmlint.contribution1">
+ <action
+ label="Add/Remove Rpmlint Warnings"
+ class="org.eclipse.linuxtools.rpm.rpmlint.actions.ToggleRpmlintNatureAction"
+ menubarPath="additions"
+ enablesFor="+"
+ id="org.eclipse.linuxtools.rpm.rpmlint.addRemoveNatureAction">
+ </action>
+ </objectContribution>
+ <objectContribution
+ adaptable="true"
+ objectClass="org.eclipse.core.resources.IFile"
+ nameFilter="*.rpm"
+ id="org.eclipse.linuxtools.rpm.rpmlint.contribution2">
+ <action
+ label="Run Rpmlint "
+ class="org.eclipse.linuxtools.rpm.rpmlint.actions.RunRpmlintAction"
+ menubarPath="additions"
+ enablesFor="+"
+ id="org.eclipse.linuxtools.rpm.rpmlint.runRpmlintAction">
+ </action>
+ </objectContribution>
+ <objectContribution
+ adaptable="true"
+ objectClass="org.eclipse.core.resources.IFile"
+ nameFilter="*.spec"
+ id="org.eclipse.linuxtools.rpm.rpmlint.contribution3">
+ <action
+ label="Run Rpmlint "
+ class="org.eclipse.linuxtools.rpm.rpmlint.actions.RunRpmlintAction"
+ menubarPath="additions"
+ enablesFor="+"
+ id="org.eclipse.linuxtools.rpm.rpmlint.runRpmlintAction">
+ </action>
+ </objectContribution>
+ </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="rpmlintReferedContent"/>
+ </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..391e0e1c80
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/Activator.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * 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 plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.rpm.rpmlint"; //$NON-NLS-1$
+ public static final String SPECFILE_EXTENSION = "spec"; //$NON-NLS-1$
+ public static final String RPMFILE_EXTENSION = "rpm"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @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..648cf160ad
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/actions/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.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;
+ 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..e0149b4ead
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/actions/RunRpmlintAction.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * 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.resources.IFile;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.linuxtools.rpm.rpmlint.Activator;
+import org.eclipse.linuxtools.rpm.rpmlint.RpmlintLog;
+import org.eclipse.linuxtools.rpm.ui.editor.Utils;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+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;
+
+public class RunRpmlintAction implements IObjectActionDelegate {
+ private ISelection selection;
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ // TODO Auto-generated method stub
+ }
+
+ public void run(IAction action) {
+ 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 {
+ 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);
+
+ } catch (IOException e) {
+ // FIXME: rpmlint is not installed in the default place
+ // -> ask user to open the prefs page.
+ RpmlintLog.logError(e);
+ }
+ }
+ }
+ }
+
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ this.selection = selection;
+ }
+
+ 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..8a2eeb9603
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/actions/ToggleRpmlintNatureAction.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * 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.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.linuxtools.rpm.rpmlint.builder.RpmlintNature;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+
+public class ToggleRpmlintNatureAction implements IObjectActionDelegate {
+
+ private ISelection selection;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run(IAction action) {
+ 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);
+ }
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
+ * org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ this.selection = selection;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction,
+ * org.eclipse.ui.IWorkbenchPart)
+ */
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ //Do nothing
+ }
+
+ /**
+ * 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..a5508f5884
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/actions/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
+###############################################################################
+RunRpmlintAction_0=Rpmlint console
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..c79b1e23af
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/builder/RpmlintBuilder.java
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * 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;
+
+public class RpmlintBuilder extends IncrementalProjectBuilder {
+
+ public static final int MAX_WORKS = 100;
+
+ public static final String BUILDER_ID = Activator.PLUGIN_ID + ".rpmlintBuilder"; //$NON-NLS-1$
+
+ 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;
+ }
+
+ public 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..40dbbdc710
--- /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.getReferedContent());
+ 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.getReferedContent());
+ }
+ }
+ } 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.getReferedContent());
+ }
+ }
+ 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..c5fdc586fc
--- /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 referedContent;
+
+ private String referedSection;
+
+ 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 getReferedContent() {
+ return referedContent;
+ }
+
+ public void setReferedContent(String referedContent) {
+ for (int i = 0; i < sections.length; i++) {
+ if (referedContent.startsWith(sections[i])) {
+ this.referedContent = referedContent.trim();
+ if (this.referedContent.equals("")) //$NON-NLS-1$
+ this.referedContent = sections[i];
+ this.referedSection = sections[i];
+ i = sections.length;
+ } else {
+ this.referedContent = referedContent;
+ this.referedSection = ""; //$NON-NLS-1$
+ }
+ }
+ }
+
+ public String getReferedSection() {
+ return referedSection;
+ }
+
+ 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.referedContent);
+ 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..8e07b9889f
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/rpm/rpmlint/parser/RpmlintParser.java
@@ -0,0 +1,304 @@
+/*******************************************************************************
+ * 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.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;
+import org.eclipse.linuxtools.rpm.ui.editor.Utils;
+
+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 rpmlintReferedContent) {
+ 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_REFERED_CONTENT, rpmlintReferedContent);
+
+ } catch (CoreException e) {
+ RpmlintLog.logError(e);
+ }
+ }
+
+ public void addMarker(IFile file, String message, int severity,
+ String rpmlintID, String rpmlintReferedContent) {
+ 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_REFERED_CONTENT,
+ rpmlintReferedContent);
+
+ } 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 firtItemLine = true;
+ String[] lineItems;
+ String description = EMPTY_STRING;
+ try {
+ while ((line = reader.readLine()) != null) {
+ if (firtItemLine) {
+ firtItemLine=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]);
+ // get content
+ if (lineItems.length > 1)
+ item.setReferedContent(lineItems[1]);
+ else
+ item.setReferedContent(EMPTY_STRING);
+ } else {
+ description += line + '\n';
+ }
+
+ if (line.equals(EMPTY_STRING)) {
+ item.setMessage(description.substring(0, description.length() - 2));
+ int useOfTabsAndSpaces = getMixedUseOfTabsAndSpaces(item.getReferedContent());
+ if (useOfTabsAndSpaces != -1)
+ item.setLineNbr(useOfTabsAndSpaces);
+ rpmlintItems.add(item);
+ item = new RpmlintItem();
+ firtItemLine=true;
+ description = EMPTY_STRING;
+ }
+
+ }
+ // Close the input stream
+ in.close();
+ } catch (IOException e) {
+ RpmlintLog.logError(e);
+ }
+ return rpmlintItems;
+ }
+
+ /**
+ * 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 referedContent){
+ int lineNbr = -1;
+ if (referedContent.indexOf("(spaces: line") > -1) { //$NON-NLS-1$
+ String tabsAndSpacesPref = Activator
+ .getDefault()
+ .getPreferenceStore()
+ .getString(PreferenceConstants.P_RPMLINT_TABS_AND_SPACES);
+ String[] spacesAndTabs = referedContent.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..d2dfdf7afa
--- /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_REFERED_CONTENT = "rpmlintReferedContent"; //$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..4ec630f5f7
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/ChangeLog
@@ -0,0 +1,36 @@
+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/systemtap/org.eclipse.linuxtools.systemtap-feature/epl-v10.html b/rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/epl-v10.html
index 9321f4082e..9321f4082e 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap-feature/epl-v10.html
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor-feature/epl-v10.html
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..22e81616d9
--- /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 Feature (Incubation)
+
+# "description" property - description of the feature
+description=RPM Specfile Plug-in is a...
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse.org
+
+# "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..861130c221
--- /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.2.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/.project b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/.project
new file mode 100644
index 0000000000..3adeb0ac06
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/.project
@@ -0,0 +1,22 @@
+<?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.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</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..52c5d065c6
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/ChangeLog
@@ -0,0 +1,50 @@
+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..51deb88614
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/META-INF/MANIFEST.MF
@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Doc Plug-in
+Bundle-SymbolicName: org.eclipse.linuxtools.rpm.ui.editor.doc; singleton:=true
+Bundle-Version: 0.0.1.qualifier
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..3c05d0728c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/build.properties
@@ -0,0 +1,4 @@
+bin.includes = plugin.xml,\
+ META-INF/,\
+ html/,\
+ *.xml
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/generic.html b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/generic.html
new file mode 100644
index 0000000000..4754ae3abe
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/generic.html
@@ -0,0 +1,55 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Creating and editing a <i><b>spec</b></i> file</title>
+</head>
+
+<body>
+<h1>Start editing</h1>
+<p>Starting editing should be as simple as double click on any of
+the spec files in your projects or going through the File/Open File
+procedure and select your spec file.</p>
+<p><b>Note:</b> It is strongly recommended that you always have your
+spec file in a project inside Eclipse workspace to take the most of the
+editor. Rpmlint integration, some auto-completion and hyperlink are not
+available when you are editing external (for the workspace) file.</p>
+At this stage you should see something nice looking like this:
+<center><img src="images/generic.png"></center>
+<h1>Create new spec file</h1>
+<p>Part of the plugin is a wizard for creating new specfile. It can
+be invoked from the menu File/New/Other which should bring the following
+dialog where you can select "New specfile based on a template".</p>
+<center><img src="images/wizard.png"></center>
+<p>Dialog providing options and interface for filling the data in
+the spec file should appear at this stage.</p>
+<center><img src="images/new_from_template.png"></center>
+<p>Description of the fields:
+<ul>
+ <li><b>Project:</b> This is simply the place where generated spec
+ file will be stored and this should be a project in this workspace. For
+ convenience it is auto-filled with the active project when you started
+ the wizard.</li>
+ <li><b>Select a template:</b> Template functionality is based on
+ the templates provided by <a
+ href="https://fedorahosted.org/rpmdevtools/">rpmdevtools</a>. Check
+ its home page or just try the provided templates to see whether they
+ suits you. The names are clear enough to not need further explanations
+ - perl, ruby, python, etc.</li>
+ <li><b>Version:</b> The version of the software the spec file is
+ for.</li>
+ <li><b>Summary:</b> One line description of the packaged software.</li>
+ <li><b>Group:</b> Drop down menu for selecting the RPM Group this
+ package belongs to. The values in this drop down are filled from the
+ GROUPS file which is part of the RPM documentation package. This file
+ usually resist in a place like /usr/share/doc/rpm-*/GROUPS.</li>
+ <li><b>License:</b> The license of the packaged software.</li>
+ <li><b>URL:</b> The URL pointing to the home page of the packaged
+ software.</li>
+ <li><b>Source0:</b> The name of the source archive the package is
+ builded from.</li>
+</ul>
+</p>
+</body>
+</html> \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/Unti.xcf b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/Unti.xcf
new file mode 100644
index 0000000000..729cc9dede
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/Unti.xcf
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/enable_rpmlint.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/enable_rpmlint.png
new file mode 100644
index 0000000000..db7f40df66
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/enable_rpmlint.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/generic.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/generic.png
new file mode 100644
index 0000000000..dc490cff54
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/generic.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/macros_long.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/macros_long.png
new file mode 100644
index 0000000000..a8721478ea
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/macros_long.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/macros_short.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/macros_short.png
new file mode 100644
index 0000000000..7f8e582fe3
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/macros_short.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/new_from_template.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/new_from_template.png
new file mode 100644
index 0000000000..d38f936a5b
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/new_from_template.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/problems_rpmlint.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/problems_rpmlint.png
new file mode 100644
index 0000000000..18eb49b9b5
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/problems_rpmlint.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/rpmlint_fix_after.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/rpmlint_fix_after.png
new file mode 100644
index 0000000000..02e438e5f7
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/rpmlint_fix_after.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/rpmlint_fix_before.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/rpmlint_fix_before.png
new file mode 100644
index 0000000000..f47bd381f5
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/rpmlint_fix_before.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/rpmlint_quickfix.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/rpmlint_quickfix.png
new file mode 100644
index 0000000000..fd0b3e5d98
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/rpmlint_quickfix.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_changelog.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_changelog.png
new file mode 100644
index 0000000000..d24e91a15c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_changelog.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_macros.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_macros.png
new file mode 100644
index 0000000000..768944b18c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_macros.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_rpmlint.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_rpmlint.png
new file mode 100644
index 0000000000..568ff7f3b5
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_rpmlint.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_rpms_details.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_rpms_details.png
new file mode 100644
index 0000000000..9c8297b102
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_rpms_details.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_rpms_generic.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_rpms_generic.png
new file mode 100644
index 0000000000..1b084707d0
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_rpms_generic.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_tasks.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_tasks.png
new file mode 100644
index 0000000000..38eb3299ce
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_tasks.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_templates.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_templates.png
new file mode 100644
index 0000000000..b336be5ce9
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/settings_templates.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/warnings_rpmlint.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/warnings_rpmlint.png
new file mode 100644
index 0000000000..5e83b8c6b2
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/warnings_rpmlint.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/wizard.png b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/wizard.png
new file mode 100644
index 0000000000..2beefd502c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/images/wizard.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/macro_settings.html b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/macro_settings.html
new file mode 100644
index 0000000000..808eb554ea
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/macro_settings.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Setting up macros location</title>
+</head>
+
+<body>
+<h1>Setting up macros</h1>
+<p>Properly setting up macros locations is a crucial part for the
+editor to work properly. Having all the macros path configures enables
+the editor to properly highlight, autocomplete and showing hover for all
+the available macros.</p>
+<center><img src="images/settings_macros.png" /></center>
+<h2>Macros location</h2>
+<p>The path used for looking for macros can be formed by either
+single files or a directory. When a directory is added to the path all
+files in it are read and macros from them added to the list of available
+macros.
+<h2>Macros preview</h2>
+<p>This setting controls how to present macros value in hovers in
+case they contain another macros in their value. To distinguish the
+options look at the following hovers:</p>
+<center><img src="images/macros_short.png" /><img
+ src="images/macros_long.png" /></center>
+</body>
+</html> \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/package_settings.html b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/package_settings.html
new file mode 100644
index 0000000000..70f1bf570c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/package_settings.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Setting up rpm tools, proposals and details</title>
+</head>
+
+<body>
+<h1>Generic setup</h1>
+<p>Using distribution specific tools enhances auto-completion for
+packages with not only installed rpm files but also with the packages
+available in the online repositories. Support is there for YUM and URPMI
+tools. Users of other tools should contact us to find a way for adding
+support for them. If none of the distribution tools is selected packages
+auto completion will contains only the installed packages.</p>
+<center><img src="images/settings_rpms_generic.png" /></center>
+<p>Additional settings are the frequency of refreshing packages list
+and the file to store the package list.</p>
+<h1>Package details</h1>
+<p>These are just visualization tweaking options like the number of
+packages to show details for and what RPM tags should the hover
+contains.</p>
+<center><img src="images/settings_rpms_details.png" /></center>
+</body>
+</html> \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/rpmlint.html b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/rpmlint.html
new file mode 100644
index 0000000000..7b316dee40
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/rpmlint.html
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Enabling and using rpmlint integration</title>
+</head>
+
+<body>
+<h1>Enable rpmlint warnings</h1>
+<p>Enabling rpmlint warnings is as easy as right clicking on the
+project containing the spec file to be checked by rpmlint and select
+"Add/Remove rpmlint warnings" from the context menu.</p>
+<center><img src="images/enable_rpmlint.png" /></center>
+<p>To disable rpmlint warnings just execute the same steps again.</p>
+<h1>Benefits from rpmlint integrations</h1>
+<h2>Warnings for common mistakes</h2>
+<p>After rpmlint warnings are enabled new Rpmlint project builder is
+added to the project builders and the reported warnings/errors are
+showed as markers in the editor view.</p>
+<center><img src="images/warnings_rpmlint.png" /></center>
+<p>For better integration with the Eclipse platform these warnings
+are also added to the Problems view.</p>
+<center><img src="images/problems_rpmlint.png" /></center>
+<h2>Fix the warnings</h2>
+<p>Part of the rpmlint integration is the ability to provide quick
+fixes for some of the reported warnings. While not providing quick fixes
+for all the fixes available in rpmlint, the number of fixes is
+constantly improving. If you want to see a quick fix for the most
+disturbing for you warning please report it <a
+ href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Linux%20Distros">here</a>
+against the RPM component.</p>
+<p>To execute some quick fix right click on the warning/error in the
+Problems view and select "Quick fix" or just use the shortcut Ctrl+1
+with a selected warning. In the dialog that appears</p>
+<center><img src="images/rpmlint_quickfix.png" /></center>
+<p>select the provided fix and click Finish. The changes will auto
+appear in the specfile editor. For comparison look at the following
+screenshots - Before and After.</p>
+<center><img src="images/rpmlint_fix_before.png" /><img
+ src="images/rpmlint_fix_after.png" /></center>
+</body>
+</html> \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/settings.html b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/settings.html
new file mode 100644
index 0000000000..b2fd6f96b9
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/settings.html
@@ -0,0 +1,54 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Generic settings</title>
+</head>
+
+<body>
+<h1>Spec file editor settings</h1>
+<p>Spec file editor should be completely working without any
+tweaking of the settings but doing it you should be able to save even
+more time.</p>
+<h2>Changelog settings</h2>
+<center><img src="images/settings_changelog.png" /></center>
+<p>Simple properties allowing customizing the generated ChangeLog
+entries (Ctrl+Alt+C).<br>
+<br>
+<b>Note:</b> Be sure to set the Author name and Author email in
+ChangeLog plugin preferences so they get properly generated.</p>
+<h2>Rpmlint settings</h2>
+<center><img src="images/settings_rpmlint.png" /></center>
+<p>This page is really useful when you have rpmlint installed in
+place different from the default (/usr/bin). The ability to set custom
+rpmlint is especially useful during development of quick-fixes or
+rpmlint itself.<br>
+Another option on this page is whether warnings should be shown for
+space usage or for tabs usage, when they are used in a mixed mode in the
+spec file.</p>
+<h2>Tasks settings</h2>
+<center><img src="images/settings_tasks.png" /></center>
+<p>This page provides the ability to select the task tags to be used
+when searching for tasks. Task tags are looked only in comments. When a
+task tag is found it is added to the Tasks view and a marker in the
+editor is created. Task tags used by default are TODO and FIXME. Users
+have the power to define their own Task tags by just pressing the New
+button and entering the new tag (e.g. REMOVE).</p>
+<h2>Templates settings</h2>
+<center><img src="images/settings_templates.png" /></center>
+<p>A list of predefined/generic templates to speed up creation
+various fragments of the specfile in the editor.<br>
+Provided features match the templates functionality provided by Java
+editor. The user can manipulate the list by:
+<ul>
+ <li>Adding new template</li>
+ <li>Editing existing template</li>
+ <li>Deleting existing template</li>
+ <li>Import a list of templates</li>
+ <li>Export the list of templates for future usage on another
+ machine or for providing default templates for your team</li>
+</ul>
+</p>
+</body>
+</html> \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/support.html b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/support.html
new file mode 100644
index 0000000000..3b7fee2fc6
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/support.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Specfile editor support and development</title>
+</head>
+
+<body>
+<h1>Support</h1>
+<p><b>Issues while using the editor</b> - Please report any issue
+you have with this editor in <a
+ href="
+ https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Linux%20Distros">Eclipse.org
+bugzilla.</a></p>
+<p><b>Request for enhancements (RFE)</b> - Either report them in <a
+ href=" https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Linux%20Distros">Bugzilla</a>
+or contact us at <a href="mailto:linux-distros-dev@eclipse.org">linux-distros-dev@eclipse.org</a>
+or at irc:#eclipse-linux@irc.freenode.org. We would love to talk with
+you and provide you all the help needed so the missing functionality is
+provided (hopefully with your help).</p>
+<p><b>Additional information </b> - For aditional information like
+plans, current activities and etc. please visit our site:<a
+ href="http://www.eclipse.org/linuxtools/projectPages/specfile/">http://www.eclipse.org/linuxtools/projectPages/specfile/</a>.</p>
+<h3>We hope you will get a great experience and efficiency boost while using this editor.</h3>
+</body>
+</html> \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/toc.html b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/toc.html
new file mode 100644
index 0000000000..e462828930
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/html/toc.html
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Table of Contents</title>
+</head>
+
+<body>
+<h1>Basic introduction</h1>
+<p>This editor provides a great number of features to make your
+*.spec files editing better. One of the most valued parts is the <a
+ href="http://rpmlint.zarb.org">rpmlint</a> which assist in finding the
+most common mistakes made in RPM spec files and also a quick way to fix
+some of this warnings. It also tries to provide all the nice features
+you have seen in JDT. Just to name a few:
+<ul>
+ <li>Outline view and quick outline in the editor</li>
+ <li>Various auto-completions</li>
+ <li>Highlighting</li>
+ <li>Hyperlinks - both inside the file and to external resouces</li>
+ <li>Folding and etc.</li>
+</ul>
+</p>
+<br>
+<h1>Table of Contents</h1>
+<ul>
+ <li><a href="generic.html">Creating new spec file</a></li>
+ <li><a href="rpmlint.html">Rpmlint warnings and quick fixes</a></li>
+ <li><a href="generic.html">Customizing editor</a>
+ <ul>
+ <li><a href="macro_settings.html">RPM macros completion</a></li>
+ <li><a href="package_settings.html">Package completion</a></li>
+ </ul>
+ </li>
+ <li><a href="support.html">Support and development</a></li>
+</ul>
+</body>
+</html> \ 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..ec66f0b74a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/plugin.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.eclipse.help.toc">
+ <toc file="toc.xml" primary="true" />
+ </extension>
+</plugin>
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..4e916a8236
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.doc/toc.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+
+<toc label="Specfile Editor">
+ <topic label="User's guide" href="html/toc.html" >
+ <topic label="Creating new spec file" href="html/generic.html" />
+ <topic label="Rpmlint warnings and quick fixes" href="html/rpmlint.html" />
+ <topic label="Customizing editor" href="html/settings.html">
+ <topic label="RPM macros completion" href="html/macro_settings.html" />
+ <topic label="Package completion" href="html/package_settings.html" />
+ </topic>
+ </topic>
+ <topic label="Support and development" href="html/support.html" />
+</toc>
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..f113b68d1c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/ChangeLog
@@ -0,0 +1,489 @@
+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..a20bdfaf17
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.linuxtools.rpm.ui.editor.tests
+Bundle-Version: 1.0.0
+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"
+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..190680030b
--- /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.org \ 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..a22439485c
--- /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.ui.editor.RpmMacroProposalsList;
+import org.eclipse.linuxtools.rpm.ui.editor.Utils;
+
+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..fdeed1b258
--- /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.ui.editor.Activator;
+import org.eclipse.linuxtools.rpm.ui.editor.RpmPackageProposalsList;
+import org.eclipse.linuxtools.rpm.ui.editor.Utils;
+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..f989d8a444
--- /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.ui.editor.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..4e429e8cd6
--- /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,24 @@
+/*******************************************************************************
+ * 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);
+ suite.addTestSuite(SpecfileEditorShowOutlineActionDelegateTest.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/actions/SpecfileEditorShowOutlineActionDelegateTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/actions/SpecfileEditorShowOutlineActionDelegateTest.java
new file mode 100644
index 0000000000..c4f0fec8f1
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/actions/SpecfileEditorShowOutlineActionDelegateTest.java
@@ -0,0 +1,37 @@
+package org.eclipse.linuxtools.rpm.ui.editor.tests.actions;
+
+import junit.framework.TestCase;
+
+import org.eclipse.linuxtools.rpm.ui.editor.actions.SpecfileEditorShowOutlineActionDelegate;
+//TODO make it a real test
+public class SpecfileEditorShowOutlineActionDelegateTest extends TestCase {
+
+ private SpecfileEditorShowOutlineActionDelegate delegate;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ delegate = new SpecfileEditorShowOutlineActionDelegate();
+ }
+
+ public void testSetActiveEditor() {
+ delegate.setActiveEditor(null, null);
+ }
+
+ public void testRun() {
+ delegate.run(null);
+ }
+
+ public void testSelectionChanged() {
+ delegate.selectionChanged(null, null);
+ }
+
+ public void testDispose() {
+ delegate.dispose();
+ }
+
+ public void testInit() {
+ delegate.init(null);
+ }
+
+}
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..d4c9ec923b
--- /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(1, 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.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.SpecfileElementHyperlink;
+import org.eclipse.linuxtools.rpm.ui.editor.hyperlink.SpecfileElementHyperlinkDetector;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileDefine;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileSource;
+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 SpecfileElementHyperlinkDetectorTest extends FileTestCase {
+ private SpecfileEditor editor;
+ private SpecfileElementHyperlinkDetector elementDetector;
+
+ public void testDetectHyperlinks() throws PartInitException {
+ String testText = "%define smth other\nSource0: test.zip\nPatch0: first.patch\n"
+ + "%build\n %{SOURCE0}\n%patch0\n%{smth}\n";
+ newFile(testText);
+ elementDetector = new SpecfileElementHyperlinkDetector(specfile);
+
+ IEditorPart openEditor = IDE
+ .openEditor(Activator.getDefault().getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage(), testFile,
+ "org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor");
+
+ editor = (SpecfileEditor) openEditor;
+ editor.doRevertToSaved();
+ // test source element
+ IRegion region = new Region(74, 0);
+ IHyperlink[] returned = elementDetector.detectHyperlinks(editor
+ .getSpecfileSourceViewer(), region, false);
+ SpecfileElementHyperlink element = (SpecfileElementHyperlink) returned[0];
+ assertTrue(element.getSource() instanceof SpecfileSource);
+ SpecfileSource source = (SpecfileSource) element.getSource();
+ assertEquals(source.getSourceType(), SpecfileSource.SourceType.SOURCE);
+ assertEquals(source.getFileName(), "test.zip");
+
+ // test patch element
+ region = new Region(83, 0);
+ returned = elementDetector.detectHyperlinks(editor
+ .getSpecfileSourceViewer(), region, false);
+ element = (SpecfileElementHyperlink) returned[0];
+ assertTrue(element.getSource() instanceof SpecfileSource);
+ source = (SpecfileSource) element.getSource();
+ assertEquals(source.getSourceType(), SpecfileSource.SourceType.PATCH);
+ assertEquals(source.getFileName(), "first.patch");
+
+ // test define
+ region = new Region(89, 0);
+ returned = elementDetector.detectHyperlinks(editor
+ .getSpecfileSourceViewer(), region, false);
+ element = (SpecfileElementHyperlink) returned[0];
+ assertTrue(element.getSource() instanceof SpecfileDefine);
+ SpecfileDefine define = (SpecfileDefine) element.getSource();
+ assertEquals(define.getName(), "smth");
+ assertEquals(define.getStringValue(), "other");
+ }
+
+ public void testDetectHyperlinksNoRegionAndTextViewer() {
+ elementDetector = new SpecfileElementHyperlinkDetector(specfile);
+ IHyperlink[] returned = elementDetector.detectHyperlinks(null, null, false);
+ assertNull(returned);
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/URLHyperlinkWithMacroDetectorTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/URLHyperlinkWithMacroDetectorTest.java
new file mode 100644
index 0000000000..58c422633c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/hyperlink/URLHyperlinkWithMacroDetectorTest.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2006 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
+ *******************************************************************************/
+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.jface.text.hyperlink.URLHyperlink;
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+import org.eclipse.linuxtools.rpm.ui.editor.hyperlink.URLHyperlinkWithMacroDetector;
+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 URLHyperlinkWithMacroDetectorTest extends FileTestCase {
+
+ private SpecfileEditor editor;
+ private URLHyperlinkWithMacroDetector macroDetector;
+
+ public void testDetectHyperlinks() throws PartInitException {
+ String testText = "Name: eclipse\nURL: http://www.%{name}.org/";
+ newFile(testText);
+ macroDetector = new URLHyperlinkWithMacroDetector(specfile);
+ IRegion region = new Region(20, 0);
+ IEditorPart openEditor = IDE
+ .openEditor(Activator.getDefault().getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage(), testFile,
+ "org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor");
+
+ editor = (SpecfileEditor) openEditor;
+ editor.doRevertToSaved();
+ IHyperlink[] returned = macroDetector.detectHyperlinks(editor
+ .getSpecfileSourceViewer(), region, false);
+ URLHyperlink url = (URLHyperlink) returned[0];
+ assertEquals("http://www.eclipse.org/", url.getURLString());
+ }
+} \ 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/parser/ParserAllTests.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/ParserAllTests.java
new file mode 100644
index 0000000000..a6b737c449
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/ParserAllTests.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * 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.parser;
+
+import junit.framework.TestSuite;
+
+public class ParserAllTests extends TestSuite {
+ public static TestSuite suite() {
+ TestSuite suite = new TestSuite(
+ "Test for org.eclipse.linuxtools.rpm.ui.editor.tests.parser");
+ suite.addTestSuite(SourceComparatorTest.class);
+ suite.addTestSuite(SpecfileDefineTest.class);
+ suite.addTestSuite(SpecfileTest.class);
+ return suite;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SourceComparatorTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SourceComparatorTest.java
new file mode 100644
index 0000000000..9667717b3e
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SourceComparatorTest.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * 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.parser;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileSource;
+import org.eclipse.linuxtools.rpm.ui.editor.tests.FileTestCase;
+
+public class SourceComparatorTest extends FileTestCase {
+
+ public void testPatchComparator() {
+ String specText = "Patch3: somefilesomewhere.patch" + "\n"
+ + "Patch2: someotherfile.patch";
+
+ newFile(specText);
+ Collection<SpecfileSource> patches = specfile.getPatches();
+ int i = 1;
+ for (SpecfileSource patch : patches) {
+ i++;
+ if (i == 2)
+ assertEquals(2, patch.getNumber());
+ else if (i == 3)
+ assertEquals(3, patch.getNumber());
+ else
+ fail();
+ }
+ }
+
+ public void testPatchComparator2() {
+ String specText = "Patch3: somefilesomewhere.patch" + "\n"
+ + "Patch2: someotherfile.patch";
+
+ newFile(specText);
+ List<SpecfileSource> patches = specfile.getPatches();
+ assertEquals(2, patches.get(0).getNumber());
+ assertEquals(3, patches.get(1).getNumber());
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SpecfileDefineTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SpecfileDefineTest.java
new file mode 100644
index 0000000000..f6737d2672
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SpecfileDefineTest.java
@@ -0,0 +1,162 @@
+/*******************************************************************************
+ * 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.parser;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileDefine;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileElement;
+import org.eclipse.linuxtools.rpm.ui.editor.tests.FileTestCase;
+
+public class SpecfileDefineTest extends FileTestCase {
+
+ private String testSpec =
+ // Characters 0 through 17
+ "%define blah bleh" + "\n" +
+ // Characters 18 through 36
+ "%define blah2 bleh" + "\n" +
+ // Characters 37 through 52
+ "%define blah3 1" + "\n" +
+ // Characters 53 through 69
+ "%define blah4 1" + "\n" +
+ // Characters 70 through 83
+ "%define blah5" + "\n" +
+ // Characters 84 through 95
+ "%define 1 2" + "\n" +
+ // Characters 96 through 109
+ "%define -n -p" + "\n" +
+ // Characters 110 through 144
+ "%define __find_requires %{SOURCE3}";
+
+ @Override
+ protected void setUp() throws CoreException {
+ super.setUp();
+ newFile(testSpec);
+ specfile = parser.parse(testDocument);
+ }
+
+ public void testResolve() {
+ SpecfileDefine define1 = new SpecfileDefine("name", "testspec",
+ specfile);
+ specfile.addDefine(define1);
+ assertEquals("testspec", ((SpecfileElement) define1).resolve("%{name}"));
+ }
+
+ public void testDefine() {
+ SpecfileDefine blahDefine = specfile.getDefine("blah");
+ assertEquals(SpecfileDefine.class, blahDefine.getClass());
+ assertEquals("blah", blahDefine.getName());
+ assertEquals("bleh", blahDefine.getStringValue());
+ }
+
+ public void testDefine2() {
+ SpecfileDefine blahDefine = specfile.getDefine("blah2");
+ assertEquals(SpecfileDefine.class, blahDefine.getClass());
+ assertEquals("blah2", blahDefine.getName());
+ assertEquals("bleh", blahDefine.getStringValue());
+ }
+
+ public void testDefine3() {
+ SpecfileDefine blahDefine = specfile.getDefine("blah3");
+ assertEquals(SpecfileDefine.class, blahDefine.getClass());
+ assertEquals("blah3", blahDefine.getName());
+ assertEquals(1, blahDefine.getIntValue());
+ }
+
+ public void testDefine4() {
+ SpecfileDefine blahDefine = specfile.getDefine("blah4");
+ assertEquals(SpecfileDefine.class, blahDefine.getClass());
+ assertEquals("blah4", blahDefine.getName());
+ assertEquals(1, blahDefine.getIntValue());
+ }
+
+ public void testNullDefinition() {
+ boolean fail = true;
+ for (IMarker marker : getFailureMarkers()) {
+ if ((marker.getAttribute(IMarker.CHAR_START, 0) == 70)
+ && (marker.getAttribute(IMarker.CHAR_END, 0) == 83)) {
+ assertEquals(IMarker.SEVERITY_WARNING, marker.getAttribute(
+ IMarker.SEVERITY, -1));
+ assertEquals("No value name after define.", marker
+ .getAttribute(IMarker.MESSAGE, ""));
+ fail = false;
+ }
+ }
+ if (fail)
+ fail();
+ }
+
+ public void testNonLetterDefinitionName() {
+ boolean fail = true;
+ for (IMarker marker : getFailureMarkers()) {
+ if ((marker.getAttribute(IMarker.CHAR_START, 0) == 84)
+ && (marker.getAttribute(IMarker.CHAR_END, 0) == 95)) {
+ assertEquals(IMarker.SEVERITY_ERROR, marker.getAttribute(
+ IMarker.SEVERITY, -1));
+ assertEquals(
+ "Definition lvalue must begin with a letter or an underscore.",
+ marker.getAttribute(IMarker.MESSAGE, ""));
+ fail = false;
+ }
+ }
+ if (fail)
+ fail();
+ // try {
+ // IMarker marker= testProject.getFailureMarkers()[1];
+ // System.out.println("non-letter definition");
+ // System.out.println(marker.getAttribute(IMarker.SEVERITY, -1));
+ // System.out.println(marker.getAttribute(IMarker.MESSAGE, ""));
+ // System.out.println(marker.getAttribute(IMarker.CHAR_START, 0));
+ // System.out.println(marker.getAttribute(IMarker.CHAR_END, 0));
+ // assertEquals(IMarker.SEVERITY_ERROR,
+ // marker.getAttribute(IMarker.SEVERITY, -1));
+ // assertEquals("Definition lvalue must begin with a letter or an underscore.",
+ // marker.getAttribute(IMarker.MESSAGE, ""));
+ // } catch (CoreException e) {
+ // fail();
+ // }
+ }
+
+ public void testNonLetterDefinitionName2() {
+ boolean fail = true;
+ for (IMarker marker : getFailureMarkers()) {
+ if ((marker.getAttribute(IMarker.CHAR_START, 0) == 96)
+ && (marker.getAttribute(IMarker.CHAR_END, 0) == 109)) {
+ assertEquals(IMarker.SEVERITY_ERROR, marker.getAttribute(
+ IMarker.SEVERITY, -1));
+ assertEquals(
+ "Definition lvalue must begin with a letter or an underscore.",
+ marker.getAttribute(IMarker.MESSAGE, ""));
+ fail = false;
+ }
+ }
+ if (fail)
+ fail();
+ // try {
+ // IMarker marker= testProject.getFailureMarkers()[2];
+ // assertEquals(IMarker.SEVERITY_ERROR,
+ // marker.getAttribute(IMarker.SEVERITY, -1));
+ // assertEquals("Definition lvalue must begin with a letter or an underscore.",
+ // marker.getAttribute(IMarker.MESSAGE, ""));
+ // } catch (CoreException e) {
+ // fail();
+ // }
+ }
+
+ public void testUnderscoreDefine() {
+ SpecfileDefine blahDefine = specfile.getDefine("__find_requires");
+ assertEquals(SpecfileDefine.class, blahDefine.getClass());
+ assertEquals("__find_requires", blahDefine.getName());
+ assertEquals("%{SOURCE3}", blahDefine.getStringValue());
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SpecfileTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SpecfileTest.java
new file mode 100644
index 0000000000..41ae5a2404
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/parser/SpecfileTest.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.parser;
+
+import java.util.List;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileSource;
+import org.eclipse.linuxtools.rpm.ui.editor.tests.FileTestCase;
+
+public class SpecfileTest extends FileTestCase {
+
+ public void testGetLine() {
+ String specText = "Patch3: somefilesomewhere.patch" + "\n" + "%patch3";
+ try {
+ newFile(specText);
+ assertEquals("%patch3", specfile.getLine(1));
+ } catch (BadLocationException e) {
+ fail(e.getMessage());
+ }
+ }
+
+ public void testChangeLine() {
+ String specText = "Patch3: somefilesomewhere.patch" + "\n" + "%patch3";
+
+ try {
+ newFile(specText);
+ assertEquals("%patch3", specfile.getLine(1));
+ specfile.changeLine(1, "%patch4");
+ assertEquals("%patch4", specfile.getLine(1));
+ } catch (BadLocationException e) {
+ fail(e.getMessage());
+ }
+ }
+
+ public void testChangeLine2() {
+ String specText = "Patch3: somefilesomewhere.patch" + "\n" + "%patch3";
+
+ try {
+ newFile(specText);
+ assertEquals("Patch3: somefilesomewhere.patch", specfile.getLine(0));
+ specfile.changeLine(0, "Patch4: somefilesomewhere.patch");
+ assertEquals("Patch4: somefilesomewhere.patch", specfile.getLine(0));
+ } catch (BadLocationException e) {
+ fail(e.getMessage());
+ }
+ }
+
+ public void testChangeLine3() {
+ String specText = "Patch3: somefilesomewhere.patch" + "\n" + "%patch3";
+
+ try {
+ newFile(specText);
+ assertEquals("Patch3: somefilesomewhere.patch", specfile.getLine(0));
+ specfile.changeLine(0, "andrew");
+ assertEquals("andrew", specfile.getLine(0));
+ } catch (BadLocationException e) {
+ fail(e.getMessage());
+ }
+ }
+
+ public void testOrganizePatches() {
+ String specText = "Patch3: somefilesomewhere.patch" + "\n" + "%patch3";
+
+ try {
+ newFile(specText);
+ assertEquals("Patch3: somefilesomewhere.patch", specfile.getLine(0));
+ assertEquals("%patch3", specfile.getLine(1));
+ assertEquals(0, specfile.getPatch(3).getLineNumber());
+ SpecfileSource patch = specfile.getPatch(3);
+ List<Integer> linesUsed = patch.getLinesUsed();
+ assertEquals(1, linesUsed.size());
+ Integer lineUsedNumber = linesUsed.get(0);
+ assertEquals(1, lineUsedNumber.intValue());
+ specfile.organizePatches();
+ assertEquals("Patch0: somefilesomewhere.patch", specfile.getLine(0));
+ assertEquals("%patch0", specfile.getLine(1));
+ assertEquals(0, specfile.getPatch(0).getLineNumber());
+ patch = specfile.getPatch(3);
+ assertNull(patch);
+ patch = specfile.getPatch(0);
+ assertEquals(0, patch.getNumber());
+ linesUsed = patch.getLinesUsed();
+ assertEquals(1, linesUsed.size());
+ lineUsedNumber = linesUsed.get(0);
+ assertEquals(1, lineUsedNumber.intValue());
+ } catch (BadLocationException e) {
+ fail(e.getMessage());
+ }
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/ScannersAllTests.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/ScannersAllTests.java
new file mode 100644
index 0000000000..0029711521
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/ScannersAllTests.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * 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.scanners;
+
+import junit.framework.TestSuite;
+
+public class ScannersAllTests extends TestSuite {
+ public static TestSuite suite() {
+ TestSuite suite = new TestSuite(
+ "Test for org.eclipse.linuxtools.rpm.ui.editor.tests.scanners");
+ suite.addTestSuite(SpecfileChangelogScannerTest.class);
+ suite.addTestSuite(SpecfilePackagesScannerTest.class);
+ suite.addTestSuite(SpecfileScannerTest.class);
+ return suite;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/SpecfileChangelogScannerTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/SpecfileChangelogScannerTest.java
new file mode 100644
index 0000000000..5fb3f0400a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/SpecfileChangelogScannerTest.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * 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.scanners;
+
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.RuleBasedScanner;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.linuxtools.rpm.ui.editor.ColorManager;
+import org.eclipse.linuxtools.rpm.ui.editor.ISpecfileColorConstants;
+import org.eclipse.linuxtools.rpm.ui.editor.scanners.SpecfileChangelogScanner;
+import org.eclipse.linuxtools.rpm.ui.editor.tests.AScannerTest;
+
+public class SpecfileChangelogScannerTest extends AScannerTest {
+
+ private IToken token;
+
+ private TextAttribute ta;
+
+ private SpecfileChangelogScanner scanner;
+
+ public SpecfileChangelogScannerTest() {
+ scanner = new SpecfileChangelogScanner(new ColorManager());
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.linuxtools.rpm.ui.editor.tests.AScannerTest#getContents()
+ */
+ @Override
+ protected String getContents() {
+ return "%changelog <toto@test.com> - 1.1-4";
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.linuxtools.rpm.ui.editor.tests.AScannerTest#getScanner()
+ */
+ @Override
+ protected RuleBasedScanner getScanner() {
+ return scanner;
+ }
+
+ public void testSection() {
+ token = getNextToken();
+ assertTrue(token instanceof Token);
+ assertEquals(10, rulesBasedScanner.getTokenLength());
+ assertEquals(0, rulesBasedScanner.getTokenOffset());
+ ta = (TextAttribute) token.getData();
+ assertEquals(ta.getForeground().getRGB(),
+ ISpecfileColorConstants.SECTIONS);
+ }
+
+ public void testMail() {
+ token = getToken(3);
+ assertTrue(token instanceof Token);
+ assertEquals(15, rulesBasedScanner.getTokenLength());
+ assertEquals(11, rulesBasedScanner.getTokenOffset());
+ ta = (TextAttribute) token.getData();
+ assertEquals(ta.getForeground().getRGB(),
+ ISpecfileColorConstants.AUTHOR_MAIL);
+ }
+
+ public void testVerRel() {
+ token = getToken(4);
+ assertTrue(token instanceof Token);
+ assertEquals(8, rulesBasedScanner.getTokenLength());
+ assertEquals(26, rulesBasedScanner.getTokenOffset());
+ ta = (TextAttribute) token.getData();
+ assertEquals(ta.getForeground().getRGB(),
+ ISpecfileColorConstants.VER_REL);
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/SpecfilePackagesScannerTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/SpecfilePackagesScannerTest.java
new file mode 100644
index 0000000000..0223b313b1
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/SpecfilePackagesScannerTest.java
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * 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.scanners;
+
+import java.io.BufferedWriter;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.RuleBasedScanner;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.linuxtools.rpm.ui.editor.ColorManager;
+import org.eclipse.linuxtools.rpm.ui.editor.ISpecfileColorConstants;
+import org.eclipse.linuxtools.rpm.ui.editor.preferences.PreferenceConstants;
+import org.eclipse.linuxtools.rpm.ui.editor.scanners.SpecfilePackagesScanner;
+import org.eclipse.linuxtools.rpm.ui.editor.tests.AScannerTest;
+
+public class SpecfilePackagesScannerTest extends AScannerTest {
+
+ private IToken token;
+
+ private TextAttribute ta;
+
+ private SpecfilePackagesScanner scanner;
+
+ public SpecfilePackagesScannerTest() {
+ scanner = new SpecfilePackagesScanner(new ColorManager());
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.linuxtools.rpm.ui.editor.tests.AScannerTest#setUp()
+ */
+ @Override
+ protected void setUp() throws CoreException {
+ Activator.getDefault().getPreferenceStore().setValue(
+ PreferenceConstants.P_RPM_LIST_FILEPATH, "/tmp/pkglist");
+ try {
+ BufferedWriter out = new BufferedWriter(new FileWriter(
+ "/tmp/pkglist"));
+ out.write("setup\ntest_underscore\n");
+ out.close();
+ } catch (IOException e) {
+ fail(e.getMessage());
+ }
+ super.setUp();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.linuxtools.rpm.ui.editor.tests.AScannerTest#getContents()
+ */
+ @Override
+ protected String getContents() {
+ return "Requires: test_underscore\n%{name}\n# Requires:\n";
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.linuxtools.rpm.ui.editor.tests.AScannerTest#getScanner()
+ */
+ @Override
+ protected RuleBasedScanner getScanner() {
+ return scanner;
+ }
+
+ public void testPackageTag() {
+ token = getNextToken();
+ assertTrue(token instanceof Token);
+ assertEquals(9, rulesBasedScanner.getTokenLength());
+ assertEquals(0, rulesBasedScanner.getTokenOffset());
+ ta = (TextAttribute) token.getData();
+ assertEquals(ta.getForeground().getRGB(), ISpecfileColorConstants.TAGS);
+ }
+
+ /**
+ * Test package and BTW we test a package with a undercore. see bug:
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=182302 printscreen:
+ * https://bugs.eclipse.org/bugs/attachment.cgi?id=63725
+ */
+ // FIXME: Don't see why packages or not correctly scanned here,
+ // I will re-examine this with a fresh head ;-)
+ // public void testPackage() {
+ // try {
+ // token0 = getToken(3);
+ // assertTrue(token0 instanceof Token);
+ // assertEquals(15, rulesBasedScanner.getTokenLength());
+ // assertEquals(10, rulesBasedScanner.getTokenOffset());
+ // token = (Token) token0;
+ // ta = (TextAttribute) token.getData();
+ // assertEquals(((Color) ta.getForeground()).getRGB(),
+ // ISpecfileColorConstants.PACKAGES);
+ // } catch (Exception e) {
+ // fail();
+ // }
+ // }
+ // FIXME: Don't see why macro or not correctly scanned here,
+ // I will re-examine this with a fresh head ;-)
+ // public void testMacro() {
+ // try {
+ // token0 = getToken(5);
+ // assertTrue(token0 instanceof Token);
+ // assertEquals(7, rulesBasedScanner.getTokenLength());
+ // assertEquals(26, rulesBasedScanner.getTokenOffset());
+ // token = (Token) token0;
+ // ta = (TextAttribute) token.getData();
+ // assertEquals(((Color) ta.getForeground()).getRGB(),
+ // ISpecfileColorConstants.MACROS);
+ // } catch (Exception e) {
+ // fail();
+ // }
+ // }
+ /**
+ * Check that comments are not handle with the package scanner. See bug:
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=182302 printscreen:
+ * https://bugs.eclipse.org/bugs/attachment.cgi?id=63721
+ */
+ public void testComment() {
+ token = getToken(6);
+ assertTrue(token instanceof Token);
+ assertEquals(1, rulesBasedScanner.getTokenLength());
+ ta = (TextAttribute) token.getData();
+ assertNull(ta);
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/SpecfileScannerTest.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/SpecfileScannerTest.java
new file mode 100644
index 0000000000..c5d29bcebc
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/src/org/eclipse/linuxtools/rpm/ui/editor/tests/scanners/SpecfileScannerTest.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * 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.scanners;
+
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.RuleBasedScanner;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.linuxtools.rpm.ui.editor.ColorManager;
+import org.eclipse.linuxtools.rpm.ui.editor.ISpecfileColorConstants;
+import org.eclipse.linuxtools.rpm.ui.editor.scanners.SpecfileScanner;
+import org.eclipse.linuxtools.rpm.ui.editor.tests.AScannerTest;
+
+public class SpecfileScannerTest extends AScannerTest {
+
+ private IToken token;
+
+ private TextAttribute ta;
+
+ private SpecfileScanner scanner;
+
+ public SpecfileScannerTest() {
+ scanner = new SpecfileScanner(new ColorManager());
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.linuxtools.rpm.ui.editor.tests.AScannerTest#getContents()
+ */
+ @Override
+ protected String getContents() {
+ return "# This is a comment\nName: test\n%prep\n%{name}\n%define\n%if\nName=test";
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.linuxtools.rpm.ui.editor.tests.AScannerTest#getScanner()
+ */
+ @Override
+ protected RuleBasedScanner getScanner() {
+ return scanner;
+ }
+
+ public void testComment() {
+ token = getNextToken();
+ assertTrue(token instanceof Token);
+ assertEquals(20, rulesBasedScanner.getTokenLength());
+ assertEquals(0, rulesBasedScanner.getTokenOffset());
+ ta = (TextAttribute) token.getData();
+ assertEquals(ISpecfileColorConstants.COMMENT, ta.getForeground().getRGB());
+ }
+
+ public void testTag() {
+ token = getToken(2);
+ assertTrue(token instanceof Token);
+ assertEquals(5, rulesBasedScanner.getTokenLength());
+ assertEquals(20, rulesBasedScanner.getTokenOffset());
+ ta = (TextAttribute) token.getData();
+ assertEquals(ISpecfileColorConstants.TAGS, ta.getForeground().getRGB());
+ }
+
+ public void testSection() {
+ token = getToken(9);
+ assertTrue(token instanceof Token);
+ assertEquals(5, rulesBasedScanner.getTokenLength());
+ assertEquals(31, rulesBasedScanner.getTokenOffset());
+ ta = (TextAttribute) token.getData();
+ assertEquals(ISpecfileColorConstants.SECTIONS, ta.getForeground().getRGB());
+ }
+
+ public void testMacro() {
+ token = getToken(11);
+ assertTrue(token instanceof Token);
+ assertEquals(7, rulesBasedScanner.getTokenLength());
+ assertEquals(37, rulesBasedScanner.getTokenOffset());
+ ta = (TextAttribute) token.getData();
+ assertEquals(ISpecfileColorConstants.MACROS, ta.getForeground().getRGB());
+ }
+
+ public void testDefinedMacro() {
+ token = getToken(13);
+ assertTrue(token instanceof Token);
+ assertEquals(7, rulesBasedScanner.getTokenLength());
+ assertEquals(45, rulesBasedScanner.getTokenOffset());
+ ta = (TextAttribute) token.getData();
+ assertEquals(ISpecfileColorConstants.MACROS, ta.getForeground().getRGB());
+ }
+
+ public void testKeyword() {
+ token = getToken(15);
+ assertTrue(token instanceof Token);
+ assertEquals(3, rulesBasedScanner.getTokenLength());
+ assertEquals(53, rulesBasedScanner.getTokenOffset());
+ ta = (TextAttribute) token.getData();
+ assertEquals(ISpecfileColorConstants.KEYWORDS, ta.getForeground().getRGB());
+ }
+
+ /**
+ * Check that defines are correctly scanned. See bug:
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=182302 printscreen:
+ * https://bugs.eclipse.org/bugs/attachment.cgi?id=63722
+ */
+ public void testDefineCorreclyScanned() {
+ token = getToken(17);
+ assertTrue(token instanceof Token);
+ assertEquals(1, rulesBasedScanner.getTokenLength());
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/test.xml b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/test.xml
new file mode 100644
index 0000000000..6d4dc7af6f
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor.tests/test.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+
+<project name="testsuite" default="junits" basedir=".">
+ <property name="classname" value="org.eclipse.linuxtools.rpm.ui.editor.tests.AllTests" />
+
+ <!-- The property ${eclipse-home} should be passed into this script -->
+ <!-- Set a meaningful default value for when it is not. -->
+ <property name="eclipse-home" value="${basedir}/../.." />
+
+ <!-- sets the properties eclipse-home, and library-file -->
+ <property name="plugin-name" value="org.eclipse.linuxtools.rpm.ui.editor.tests" />
+ <property name="library-file" value="${eclipse-home}/dropins/${subProjectName2}/plugins/org.eclipse.test/library.xml" />
+
+ <!-- This target holds all initialization code that needs to be done for -->
+ <!-- all tests that are to be run. Initialization for individual tests -->
+ <!-- should be done within the body of the suite target. -->
+ <target name="init">
+ <tstamp />
+ <delete>
+ <fileset dir="${eclipse-home}" includes="org*.xml" />
+ </delete>
+ </target>
+
+ <!-- This target defines the tests that need to be run. -->
+ <target name="suite">
+ <property name="specfile-folder" value="${eclipse-home}/specfile_folder" />
+ <delete dir="${specfile-folder}" quiet="true" />
+ <echo message="About to run ${classname} with library-file=${library-file}"/>
+ <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="data-dir" value="${specfile-folder}" />
+ <property name="plugin-name" value="${plugin-name}" />
+ <property name="classname" value="${classname}" />
+ </ant>
+ </target>
+
+ <!-- This target holds code to cleanup the testing environment after -->
+ <!-- after all of the tests have been run. You can use this target to -->
+ <!-- delete temporary files that have been created. -->
+ <target name="cleanup">
+ <mkdir dir="${results}/consolelogs" />
+ <copy failonerror="false" file="${eclipse-home}/results/${classname}.txt" tofile="${results}/consolelogs/${classname}_${platform}.metadata.log.txt" />
+ </target>
+
+ <!-- This target runs the test suite. Any actions that need to happen -->
+ <!-- after all the tests have been run should go here. -->
+ <target name="junits" depends="init,suite,cleanup">
+ <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="includes" value="org*.xml" />
+ <property name="output-file" value="${plugin-name}.xml" />
+ </ant>
+ </target>
+
+ <target name="all" depends="junits" description="Dummy target to run all JUnit tests">
+ </target>
+
+ <target name="run" depends="junits" description="Dummy target to run all JUnit tests">
+ </target>
+
+</project>
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover/.classpath b/rpm/org.eclipse.linuxtools.rpm.ui.editor/.classpath
index 64c5e31b7a..64c5e31b7a 100644
--- a/libhover/org.eclipse.linuxtools.cdt.libhover/.classpath
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/.classpath
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/.cvsignore b/rpm/org.eclipse.linuxtools.rpm.ui.editor/.cvsignore
new file mode 100644
index 0000000000..ba077a4031
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/.cvsignore
@@ -0,0 +1 @@
+bin
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/.project b/rpm/org.eclipse.linuxtools.rpm.ui.editor/.project
new file mode 100644
index 0000000000..556cc126d9
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.rpm.ui.editor</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/.settings/org.eclipse.jdt.core.prefs b/rpm/org.eclipse.linuxtools.rpm.ui.editor/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..d1a6bf5ff3
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,83 @@
+#Wed Feb 25 14:36:15 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=ignore
+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=ignore
+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=ignore
+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=ignore
+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=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.ui.editor/.settings/org.moreunit.prefs b/rpm/org.eclipse.linuxtools.rpm.ui.editor/.settings/org.moreunit.prefs
new file mode 100644
index 0000000000..caa1cc891f
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/.settings/org.moreunit.prefs
@@ -0,0 +1,6 @@
+#Wed Mar 04 00:36:11 CET 2009
+eclipse.preferences.version=1
+org.moreunit.package_prefix=tests
+org.moreunit.prefixes=
+org.moreunit.unitsourcefolder=org.eclipse.linuxtools.rpm.ui.editor\:src\:org.eclipse.linuxtools.rpm.ui.editor.tests\:src
+org.moreunit.useprojectsettings=true
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/ChangeLog b/rpm/org.eclipse.linuxtools.rpm.ui.editor/ChangeLog
new file mode 100644
index 0000000000..a7d9169531
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/ChangeLog
@@ -0,0 +1,2176 @@
+2009-04-03 Alexander Kurtakov <akurtako@redhat.com>
+
+ * plugin.xml: Disable form editor for linuxtools 0.2 release.
+
+2009-03-28 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/compare/SpecStructureCreator.java (parseSpecfile): User correct section borders.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java (parseSimpleDefinition): Format.
+ (complexSections): Likewise.
+ (complexDefinitions): Likewise.
+ (parseMacro): Set section boundaries.
+ (generateTaskMarker): Format.
+ (parseDefine): Likewise.
+ (parseComplexDefinition): Likewise.
+ (parsePatch): Likewise.
+ (errorHandler): Likewise.
+ (simpleDefinitions): Likewise.
+ (directValuesDefinitions): Likewise.
+ (parseSection): Set section boundaries.
+ (parseDirectDefinition): Format.
+ (parseLine): Likewise.
+ (simpleSections): Likewise.
+ (parse): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileSection.java (getPackageName): Format.
+ (SpecfileSection): Likewise.
+ (setSectionEndLine): Store end line.
+ (getSectionEndLine): Likewise.
+
+2009-03-17 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java (parse): Fix NPE, generateTaskMarker only when taskHandler is present.
+
+2009-03-07 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogAction.java (run): Remove empty lines.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorOrganizePatchesActionDelegate.java: Remove notneeded constructor.
+
+2009-03-04 Alexander Kurtakov <akurtako@redhat.com>
+
+ * .settings/org.moreunit.prefs: Fix template.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogFormatter.java (formatTodaysDate): Make format a constant.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/Specfile.java (getVersion): Return default value.
+ (getRelease): Likewise.
+
+2009-02-27 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/rules/TagRule.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SourcesFileHyperlink.java: Log error.
+
+2009-02-25 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SpecfileElementHyperlink.java (open): Log error.
+ (getSource): New method.
+
+2009-02-25 Alexander Kurtakov <akurtako@redhat.com>
+
+ * .settings/org.eclipse.jdt.core.prefs: Enable warning for not used parameters.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogAction.java (createChangelogEntry): Drop unused parameter.
+ (run): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SpecfileElementHyperlinkDetector.java (prepareHyperlink): Likewise.
+ (detectHyperlinks): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java (parseMacro): Likewise.
+ (parseLine): Likewise.
+ (parseComplexDefinition): Likewise.
+ (parsePatch): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java (computeSourcesProposals): Likewise.
+ (computePatchesProposals): Likewise.
+ (computeCompletionProposals): Likewise.
+ (computeRpmGroupProposals): Likewise.
+ (computeRpmPackageProposals): Likewise.
+ (computeRpmMacroProposals): Likewise.
+
+ 2009-02-25 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/Specfile.java (Specfile): Removed, not needed.
+ (addDefine): Likewise.
+ (setSources): Likewise.
+ (getDefines): Renamed from getDefinesAsList.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroOccurrencesUpdater.java (getMacros): Adapt to Specfile API changes.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java (getDefines): Likewise.
+
+2009-02-22 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/compare/Messages.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/compare/messages.properties: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/compare/SpecMergeViewer.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/compare/SpecMergeViewerCreator.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/compare/SpecStructureCreator.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/compare/SpecStructureMergeViewerCreator.java: New file.
+ * META-INF/MANIFEST.MF: Add dependenci to org.eclipse.compare.
+ * plugin.xml: Add compare extensions.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/forms/MainPackagePage.java (createFormContent): Add final qualifier.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfilePartitionScanner.java: Add SPEC_FILE_PARTITIONING constant.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileConfiguration.java (getDoubleClickStrategy): Add javadoc.
+ (getConfiguredContentTypes): Likewise.
+
+2009-02-19 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/MacroProposalsPreferencePage.java: Fix copyright.
+
+2009-02-19 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/MacroProposalsPreferencePage.java (MacroListEditor.selectionChanged): Fix compilation with Eclipse 3.5 M5.
+
+2009-02-18 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/forms/MainPackagePage.java (replaceTagValue): Try to save changes.
+ (createFormContent): Likewise.
+ (MainPackagePage): Likewise.
+ (.modifyText): Likewise.
+
+2009-02-18 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java (parseMacro): Add suppport for %global.
+ (parseDefine): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileScanner.java (DEFINED_MACROS): Likewise.
+
+2009-02-16 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/Utils.java (pluginSanityCheck): Add check for rpmdev-setuptree existence.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePartitioner.java: Remove unneeded method.
+
+2009-02-12 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java: Fix completion for groups.
+
+2009-02-10 Alexander Kurtakov <akurtako@redhat.com>
+ Fix for specfile defines without line number and simplification.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/forms/MainPackagePage.java (createFormContent): Put modify listener.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/Specfile.java (getVersion): Simplify tags handling by auto creating defines for them.
+ (getEpoch): Likewise.
+ (addDefine): Likewise.
+ (getRelease): Likewise.
+ (getName): Likewise.
+ (getLicense): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileDefine.java (SpecfileDefine): Create define from tag.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java (parse): Simplify tags handling.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileTag.java (SpecfileTag): Add empty constructor.
+
+2009-02-09 Alexander Kurtakov <akurtako@redhat.com>
+ Initial version of a form based editor.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/forms/MainPackagePage.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/forms/SpecfileFormEditor.java: New file.
+ * META-INF/MANIFEST.MF: Add dependency on ui.forms.
+ * plugin.xml: Add form based editor.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/Specfile.java (organizePatches): Replace get[Sources|Patches]AsList with simple get[Sources|Patches]
+ (getSources): Likewise.
+ (getPatches): Likewise.
+ (setEpoch): Use constants for RPM tags.
+ (setVersion): Likewise.
+ (setName): Likewise.
+ (setRelease): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java (parse): Set summary.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java (getSources): Replace get[Sources|Patches]AsList with simple get[Sources|Patches]
+ (getPatches): Likewise.
+
+2009-02-06 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileContentProvider.java (getChildren): Remove methods that return array.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/Specfile.java (getSections): Likewise.
+ (getComplexSections): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java (getContextType): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileFoldingStructureProvider.java (createFoldingStructure): Likewise.
+
+2009-02-06 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroProposalsList.java (getMacroEval): Use utils for command invocation.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageBuildProposalsJob.java (retrievePackageList): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageProposalsList.java (getRpmInfo): Likewise
+ * src/org/eclipse/linuxtools/rpm/ui/editor/Utils.java (runCommandToInputStream): Make it vararg.
+ (runCommandToString): Likewise.
+ (pluginSanityCheck): Execute directly.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizardPage.java (runRpmdevNewSpec): Use utils for command invocation.
+
+2009-02-02 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/ISpecfileSpecialSymbols.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/rules/CommentRule.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/rules/MacroRule.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorToggleCommentActionDelegate.java (linesContentCommentChar): Use constant.
+ (run): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SpecfileElementHyperlinkDetector.java (getDefineName): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java (generateTaskMarker): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfilePackagesScanner.java (SpecfilePackagesScanner): Use specialized rules.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfilePartitionScanner.java (SpecfilePartitionScanner): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileScanner.java (SpecfileScanner): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java (getSources): Use constants.
+ (computeRpmMacroProposals): Use constants.
+
+2009-02-02 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizardPage.java (SpecfileNewWizardPage): Fix javadoc.
+ * .classpath: Make classpath entry refer to J2SE-1.5.
+
+2009-01-28 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogAction.java (createChangelogEntry): Fix NON-NLS after externalizing.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/RpmProposalsPreferencePage.java (buildTimeListRateFieldEditor): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/TaskTagsPreferencePage.java (TasksListEditor.getNewInputObject): LIkewise.
+
+2009-01-28 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/Messages.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/messages.properties: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/Messages.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/messages.properties: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/Messages.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/messages.properties: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/outline/Messages.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/outline/messages.properties: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/Messages.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/messages.properties: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/Messages.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/messages.properties: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/wizards/Messages.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/wizards/messages.properties: New file.
+ * build.properties: Externalize strings, add copyright year.
+ * plugin.properties: Likewise.
+ * plugin.xml: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogAction.java (createChangelogEntry): Likewise.
+ (run): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogFormatter.java (mergeChangelog): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogParser.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorOrganizePatchesActionDelegate.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorToggleCommentActionDelegate.java (run): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/Activator.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/ColorManager.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/derived/AnnotationHover.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/derived/HTML2TextReader.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/derived/HTMLTextPresenter.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/derived/LineBreakingReader.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/derived/SingleCharReader.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/derived/SubstitutionTextReader.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/detectors/IStrictWordDetector.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/detectors/KeywordWordDetector.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/detectors/MacroWordDetector.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/detectors/PatchNumberDetector.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/detectors/SuffixNumberDetector.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/detectors/TagWordDetector.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SourcesFileHyperlink.java (getHyperlinkText): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SourcesFileHyperlinkDetector.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SpecfileElementHyperlinkDetector.java (getDefineName): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/ISpecfileColorConstants.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileErrorHandler.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileMarkerHandler.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileTaskHandler.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/NonRuleBasedDamagerRepairer.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileContentOutlinePage.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileContentProvider.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileLabelProvider.java (getText): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SourceComparator.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/Specfile.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileDefine.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileElement.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileMacro.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePackage.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePackageContainer.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParseException.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java (parseSimpleDefinition): Likewise.
+ (parseDefine): Likewise.
+ (parseComplexDefinition): Likewise.
+ (parsePatch): Likewise.
+ (parseSection): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePatchMacro.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePreamble.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileSection.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileSource.java (changeDeclaration): Likewise.
+ (changeReferences): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileTag.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/MacroProposalsPreferencePage.java (MacroListEditor.createButtons): Likewise.
+ (createFieldEditors): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/MainPreferencePage.java (changelogEntryFormatFieldEditor): Likewise.
+ (createContents): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/RpmInformationsPreferencePage.java (createFieldEditors): Likewise.
+ (maxProposalsIntegerFieldEditor): Likewise.
+ (RpmInformationsPreferencePage): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/RpmProposalsPreferencePage.java (rpmtoolsRadioGroupFieldEditor): Likewise.
+ (createFieldEditors): Likewise.
+ (buildTimeListRateFieldEditor): Likewise.
+ (createContents): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/TaskTagsPreferencePage.java (TasksListEditor.getNewInputObject): Likewise.
+ (createFieldEditors): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroProposalsList.java (buildMacroList): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageBuildProposalsJob.java (retrievePackageList): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageProposalsList.java (getProposals): Likewise.
+ (getRpmInfo): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmTags.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/rules/AuthorEmailRule.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/rules/SectionRule.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/rules/StringWithEndingRule.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/rules/TagRule.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/rules/VersionReleaseRule.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileChangelogScanner.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfilePartitionScanner.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileScanner.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileConfiguration.java (getContentAssistant): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileDoubleClickStrategy.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileEditor.java (createActions): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileEditorMessages.properties: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileHover.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileLog.java (logError): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePartitioner.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileReconcilingStrategy.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizard.java (performFinish): Likewise.
+ (doFinish): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizardPage.java (dialogChanged): Likewise.
+ (populateTemplateCombo): Likewise.
+ (SpecfileNewWizardPage): Likewise.
+ (handleBrowse): Likewise.
+ (createControl): Likewise.
+ * templates/templates.xml: Likewise.
+
+2009-01-22 Alexander Kurtakov <akurtako@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/Activator.java (getRpmPackageList): Add missing NON-NLS.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizard.java (throwCoreException): Use the constant for plugin id.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizardPage.java (throwCoreException): Likewise.
+
+2009-01-21 Alexander Kurtakov <akurtako@redhat.com>
+
+ * .settings/org.eclipse.jdt.core.prefs: Enable warnings for non externalized strings.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogAction.java (createChangelogEntry): Add missing NON-NLS.
+ (run): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogFormatter.java (mergeChangelog): Likewise.
+ (formatDateLine): Likewise.
+ (formatTodaysDate): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogParser.java (parseCurrentFunction): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorToggleCommentActionDelegate.java (linesContentCommentChar): Likewise.
+ (run): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/Activator.java (getContextTypeRegistry): Likewise.
+ (getTemplateStore): Likewise.
+ (.accept): Likewise.
+ (getRpmGroups): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/derived/HTML2TextReader.java (html2Text): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/MailHyperlinkDetector.java (detectHyperlinks): Likewise.
+ (getBody): Likewise.
+ (getSubject): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SourcesFileHyperlink.java (open): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SourcesFileHyperlinkDetector.java (detectHyperlinks): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SpecfileElementHyperlinkDetector.java (detectHyperlinks): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileErrorHandler.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileTaskHandler.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileContentProvider.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileLabelProvider.java (getText): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/Specfile.java (setEpoch): Likewise.
+ (setVersion): Likewise.
+ (setName): Likewise.
+ (setRelease): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileElement.java (resolve): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePackage.java (SpecfilePackage): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java (parseSimpleDefinition): Likewise.
+ (parseMacro): Likewise.
+ (parseDirectDefinition): Likewise.
+ (generateTaskMarker): Likewise.
+ (parseDefine): Likewise.
+ (parseLine): Likewise.
+ (parseComplexDefinition): Likewise.
+ (parsePatch): Likewise.
+ (parse): Likewise.
+ (parseSection): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePatchMacro.java (toString): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileSection.java (toString): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileSource.java (changeDeclaration): Likewise.
+ (toString): Likewise.
+ (SpecfileSource): Likewise.
+ (changeReferences): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileTag.java (toString): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/MacroProposalsPreferencePage.java (MacroListEditor.createList): Likewise.
+ (MacroListEditor.parseString): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/MainPreferencePage.java (.widgetSelected): Likewise.
+ (createLocalesCombo): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/PreferenceConstants.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/RpmProposalsPreferencePage.java (rpmtoolsRadioGroupFieldEditor): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/TaskTagsPreferencePage.java (TasksListEditor.parseString): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroOccurrencesUpdater.java (update): Likewise.
+ (isMacro): Likewise.
+ (getWordAtSelection): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroProposalsList.java (getValue): Likewise.
+ (getProposals): Likewise.
+ (addMacroToMap): Likewise.
+ (buildMacroList): Likewise.
+ (getMacroEval): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageBuildProposalsJob.java (retrievePackageList): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageProposalsList.java (getRpmInfo): Likewise.
+ (getformattedRpmInformations): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmSections.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmTags.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/rules/TagRule.java (TagRule): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileChangelogScanner.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfilePackagesScanner.java (SpecfilePackagesScanner): Likewise.
+ (PACKAGES_TAGS): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfilePartitionScanner.java (SpecfilePartitionScanner): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileScanner.java (keywords): Likewise.
+ (SpecfileScanner): Likewise.
+ (DEFINED_MACROS): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java (getSources): Likewise.
+ (computeTemplateProposals): Likewise.
+ (getDefines): Likewise.
+ (getPatches): Likewise.
+ (getPrefix): Likewise.
+ (computeRpmMacroProposals): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileEditor.java (SpecfileEditor): Likewise.
+ (getResourceBundle): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileHover.java (getSourceOrPatchValue): Likewise.
+ (getMacroValueFromMacroList): Likewise.
+ (getHoverInfo): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePartitioner.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/Utils.java (inputStreamToString): Likewise.
+ (pluginSanityCheck): Likewise.
+ (resolveDefines): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizard.java (throwCoreException): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizardPage.java (setTemplateTagValue): Likewise.
+ (dialogChanged): Likewise.
+ (populateTemplateCombo): Likewise.
+ (getContent): Likewise.
+ (throwCoreException): Likewise.
+ (.modifyText): Likewise.
+ (runRpmdevNewSpec): Likewise.
+ (getFileName): Likewise.
+
+2009-01-15 Alexander Kurtakov <akurtako@redhat.com>
+
+ * .settings/org.eclipse.jdt.core.prefs: Enable validity javadoc warnings.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/Activator.java
+ (getImage): Fix javadoc.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SourcesFileHyperlink.java
+ (SourcesFileHyperlink): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/Specfile.java
+ (setEpoch): Likewise.
+ (setVersion): Likewise.
+ (setName): Likewise.
+ (setRelease): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/MacroProposalsPreferencePage.java
+ (MacroListEditor.getButtonBoxControl): Likewise.
+ (MacroListEditor.getListControl): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroOccurrencesUpdater.java
+ (update): Likewise.
+ (RpmMacroOccurrencesUpdater): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroProposalsList.java
+ (getValue): Likewise.
+ (getProposals): Likewise.
+ (findKey): Likewise.
+ (getMacroEval): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileLog.java
+ (logInfo): Likewise.
+ (logError): Likewise.
+ (log): Likewise.
+ (createStatus): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/Utils.java
+ (resolveDefines): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizardPage.java
+ (SpecfileNewWizardPage): Likewise.
+
+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-14 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileDocumentProvider.java
+ (getDocument): Create new partitioner and connect it only if we are going to set it to the document.
+ Should fix #260868.
+
+2009-01-12 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * .settings/org.moreunit.prefs: New file. Set tests projects as the tests provider for moreunit users.
+ * META-INF/MANIFEST.MF: Add qualifier to version.
+
+2009-01-09 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogFormatter.java
+ (mergeChangelog): Fix 260446.
+
+2009-01-06 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * META-INF/MANIFEST.MF: Bump release to 0.4.1.
+
+2008-12-11 Alexander Kurtakov <akurtakov@gmail.com>
+ Fix #255760.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/Activator.java
+ (rpmGroups): New member to store rpm groups.
+ (getRpmGroups): Fetch rpm groups from the system file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfilePartitionScanner.java
+ (SpecfilePartitionScanner): Initialize spec_group token.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java
+ (computeCompletionProposals): Add special handling for rpm groups proposals.
+ (computeRpmGroupProposals): Compute rpm group proposals.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileConfiguration.java
+ (getContentAssistant): Add support for rpm group partition.
+ (getPresentationReconciler): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizardPage.java
+ (populateGroupCombo): Use Activator's method for fetching groups.
+ (createControl): Remove unneeded exception.
+
+2008-12-04 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmTags.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java: Use constants from RpmTags.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/RpmInformationsPreferencePage.java
+ (createFieldEditors): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmSections.java: Make it interface.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileScanner.java
+ (TAGS): Use constants from RpmTags.
+ (SpecfileScanner): Likewise.
+
+2008-12-02 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * plugin.xml: Add extension to the document provider.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfilePartitionScanner.java
+ (SpecfilePartitionScanner): Use section constants.
+
+2008-11-30 Alexander Kurtakov <akurtakov@gmail.com>
+ Use foreach to make code more readable.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogAction.java
+ (run): Use foreach to make code more readable.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogFormatter.java
+ (mergeChangelog): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/outline/ContainsFilter.java
+ (hasUnfilteredChild): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java
+ (parseMacro): Likewise.
+ (parseLine): Likewise.
+ (parseSection): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroProposalsList.java
+ (buildMacroList): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileChangelogScanner.java
+ (SpecfileChangelogScanner): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfilePackagesScanner.java
+ (SpecfilePackagesScanner): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfilePartitionScanner.java
+ (SpecfilePartitionScanner): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileScanner.java
+ (SpecfileScanner): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java
+ (computeTemplateProposals): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePartitioner.java
+ (printPartitions): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizardPage.java
+ (populateTemplateCombo): Likewise.
+
+2008-11-29 Alexander Kurtakov <akurtakov@gmail.com>
+ Cleanup derived classed to not show so many warnings.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/derived/AnnotationHover.java
+ (getAnnotations): Generify.
+ (computeCoverage): Likewise.
+ (select): Likewise.
+ (getHoverRegion): Likewise.
+ (getHoverInfo): Likewise.
+ (formatMultipleMessages): Likewise.
+ (computeHoverMessage):
+ * src/org/eclipse/linuxtools/rpm/ui/editor/derived/HTML2TextReader.java
+ (computeSubstitution): Add @Override.
+ (entity2Text): Remove unneeded cast.
+ (static initializer): Generify.
+ (read): Add @Override.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/derived/HTMLTextPresenter.java
+ (adaptTextPresentation): Generify.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/derived/SingleCharReader.java
+ (read): Add @Override.
+ (ready): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/derived/SubstitutionTextReader.java
+ (reset): Likewise.
+ (read): Likewise.
+ (ready): Likewise.
+ (close): Likewise.
+
+2008-11-29 Alexander Kurtakov <akurtakov@gmail.com>
+ Removed unused classes.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/detectors/SpecfileWhitespaceDetector.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileTagScanner.java: Removed.
+
+2008-11-29 Alexander Kurtakov <akurtakov@gmail.com>
+ Move SpecfileTagScanner to scanners package and remove wrong todos.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileTagScanner.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileTagScanner.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/detectors/KeywordWordDetector.java
+ (isWordStart): Removed wrong auto generated todo.
+ (isWordPart): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/detectors/TagWordDetector.java
+ (isWordStart): Likewise.
+ (isWordPart): Likewise.
+
+2008-11-29 Alexander Kurtakov <akurtakov@gmail.com>
+ Move SpecfileScanner and SpecfileCompletionProcessor to correct packages.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileCompletionProcessor.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileScanner.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileScanner.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroProposalsList.java: Adopt imports.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileConfiguration.java: Adopt imports.
+
+2008-11-28 Alexander Kurtakov <akurtakov@gmail.com>
+ Extract detectors, rules and scanners packages.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/AuthorEmailRule.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/IStrictWordDetector.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/KeywordWordDetector.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/MacroWordDetector.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/PackageWordDetector.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/PatchNumberDetector.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SectionRule.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileChangelogScanner.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePackagesScanner.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePartitionScanner.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileWhitespaceDetector.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/StringWithEndingRule.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SuffixNumberDetector.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/TagRule.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/TagWordDetector.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/VersionReleaseRule.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/detectors/IStrictWordDetector.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/detectors/KeywordWordDetector.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/detectors/MacroWordDetector.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/detectors/PackageWordDetector.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/detectors/PatchNumberDetector.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/detectors/SpecfileWhitespaceDetector.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/detectors/SuffixNumberDetector.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/detectors/TagWordDetector.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/rules/AuthorEmailRule.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/rules/SectionRule.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/rules/StringWithEndingRule.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/rules/TagRule.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/rules/VersionReleaseRule.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileChangelogScanner.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileCompletionProcessor.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfilePackagesScanner.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfilePartitionScanner.java: New file.
+ * META-INF/MANIFEST.MF: Export scanners package.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogAction.java: Adapt imports to the moved classes.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogFormatter.java: Likewise
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileConfiguration.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileDocumentProvider.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileScanner.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileEditor.java (getInputDocument): Make it public to allow tests compilation.
+
+2008-11-27 Alexander Kurtakov <akurtakov@gmail.com>
+ Use Java 5 apis.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogAction.java
+ (run): Use StringBuilder.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogFormatter.java
+ (mergeChangelog): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorToggleCommentActionDelegate.java
+ (run): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/AuthorEmailRule.java
+ (unreadBuffer): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/Specfile.java
+ (getComplexSectionsElements): Removed - not needed.
+ (getSectionsElements): Likewise.
+ (getSections): Returns SpecfileElement[].
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/MacroProposalsPreferencePage.java
+ (MacroListEditor.createList): Use StringBuilder.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroProposalsList.java
+ (getMacroEval): Use ProcessBuilder instead of Runtime.exec.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageBuildProposalsJob.java
+ (retrievePackageList): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageProposalsList.java
+ (getRpmInfo): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SectionRule.java
+ (unreadBuffer): Use StringBuilder.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java
+ (getContextType): Fix for Specfile method renaming.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileFoldingStructureProvider.java
+ (addFoldingRegions): Remove not thrown Exception.
+ (updateFoldingRegions): Likewise.
+ (createFoldingStructure): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePartitioner.java
+ (printPartitions): Use StringBuilder.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/StringWithEndingRule.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/VersionReleaseRule.java
+ (VersionReleaseRule): Likewise.
+ (unreadBuffer): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizardPage.java
+ (runRpmdevNewSpec): Use ProcessBuilder.
+
+2008-11-27 Alexander Kurtakov <akurtakov@gmail.com>
+ Simplify API and cleanup.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileErrorHandler.java
+ (handleError): Remove unneeded return.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileMarkerHandler.java
+ (getCharOffset): Remove unneeded Integer.valueOf.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileTaskHandler.java
+ (handleTask): Remove unneeded return.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/Specfile.java
+ (getComplexSections): Removed.
+ (getDefinesAsArray): Likewise.
+ (getPatchesAsArray): Likewise.
+ (getSourcesAsArray): Likewise.
+ (getDefinesAsList): Really return List.
+ (getPatchesAsList): Likewise.
+ (organizePatches): Remove commented debug code.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroOccurrencesUpdater.java
+ (getMacros): Generify.
+ (isMacro): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java
+ (computeSourcesProposals): Use List insteda of array.
+ (computeTemplateProposals): Likewise.
+ (computePatchesProposals): Likewise.
+ (computeCompletionProposals): Likewise.
+ (computeRpmPackageProposals): Likewise.
+ (computeRpmMacroProposals): Likewise.
+
+2008-11-26 Alexander Kurtakov <akurtakov@gmail.com>
+ Move marker handlers to a separate package and extract base class.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileErrorHandler.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileTaskHandler.java: Removed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileErrorHandler.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileMarkerHandler.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileTaskHandler.java: New file.
+ * META-INF/MANIFEST.MF: Export org.eclipse.linuxtools.rpm.ui.editor.markers package.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java
+ (parse): Clean task markers when parsing.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/TaskTagsPreferencePage.java
+ (createContents): Removed method that just calls super.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileEditor.java: Fix imports.
+
+2008-11-25 Alexander Kurtakov <akurtakov@gmail.com>
+ Fix #255412.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/TaskTagsPreferencePage.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileTaskHandler.java: New file.
+ * plugin.xml: Add preference page and marker for tasks.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java
+ (SpecfileParser): Store a IPreferenceStore in a member.
+ (setTaskHandler): Set the SpecfileTaskHandler.
+ (generateTaskMarker): Generate task marker when needed.
+ (parse): Invoke generateTaskMarker to check for task markers.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/PreferenceConstants.java
+ (DP_TASK_TAGS): Initial value.
+ (P_TASK_TAGS): Task tags key.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/PreferenceInitializer.java
+ (initializeDefaultPreferences): Initialize task tags.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileEditor.java
+ (validateAndMark): Set the task tags handler.
+
+2008-11-19 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * .settings/org.eclipse.jdt.core.prefs: Enable more warnings.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java: Commented unneeded var.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizardPage.java
+ (handleBrowse): Use constant from the defining class.
+
+2008-11-11 Alexander Kurtakov <akurtakov@gmail.com>
+ Fix #254925.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SpecfileElementHyperlinkDetector.java:
+ (detectHyperlinks): Fix detection.
+ (prepareHyperlink): New method with the index in the line where the hyperlink starts.
+
+2008-11-01 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * build.properties: Add plugin.properties to bin.includes.
+
+2008-10-31 Alexander Kurtakov <akurtakov@gmail.com>
+ Fix for #230022.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileScanner.java
+ (DEFINED_MACROS): Make it public.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileHover.java
+ (findWord): Fix the word finding so %doc and %defattr works.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroProposalsList.java
+ (buildMacroList): Add the buildin macros to the proposals list.
+
+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.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileConfiguration.java:
+ (getInformationControlCreator): Use the new DefaultInformationControl constructor.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileHover.java:
+ (getHoverControlCreator): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileQuickOutlineDialog.java:
+ (SpecfileQuickOutlineDialog): Use the new PopupDialog constructor.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePatchMacro.java:
+ (SpecfilePatchMacro): Comment unused member.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/SpecTemplatePreferencePage.java:
+ Drop redundant interface implements.
+
+2008-10-18 Alexander Kurtakov <akurtakov@gmail.com>
+ Add hyperlink for Source and Patch definitions.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileConfiguration.java:
+ (getHyperlinkDetectors): Register new detector.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SourcesFileHyperlink.java:
+ New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SourcesFileHyperlinkDetector.java:
+ Likewise.
+
+2008-07-03 Alexander Kurtakov <akurtakov@gmail.com>
+ Show %patch autocomplete only in %prep section.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java:
+ (computeCompletionProposals): Activate patchesProposals only in SPEC_PREP section.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileConfiguration.java:
+ (getContentAssistant): Add content assist processor for SPEC_PREP.
+ (getPresentationReconciler): Register SPEC_PREP.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePartitionScanner.java:
+ (SpecfilePartitionScanner): Add SPEC_PREP section.
+
+2008-07-03 Alexander Kurtakov <akurtakov@gmail.com>
+ Enums for SpecfileSource.sourceType and SpecfileTag.tagType.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parsing/SpecfileParser.java:
+ (parse): Use SourceType instead of int.
+ (parseComplexDefinition): Likewise.
+ (parseLine): Likewise.
+ (parseSimpleDefinition): Use TagType instead of int.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parsing/SpecfileSource.java:
+ (SourceType): New enum for the sourceType.
+ (getSourceType): Use SourceType instead of int.
+ (setSourceType): Likewise.
+ (toString): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parsing/SpecfileTag.java:
+ (TagType): New enum for the tagType.
+ (SpecfileTag): Use TagType instead of int.
+ (getStringValue): Likewise.
+ (getTagType): Likewise.
+ (setTagType): Likewise.
+ (toString): Likewise.
+
+2008-07-03 Alexander Kurtakov <akurtakov@gmail.com>
+ Simplify parsing.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parsing/Specfile.java:
+ (addDefine(String, int)): New method.
+ (addDefine(String, String)): Likewise.
+ (getComplexSectionElements): Use Collection.toArray instead of cycling elements.
+ (getPatch): No need to convert int to Integer it is autoboxed.
+ (getSectionElements): Use Collection.toArray instead of cycling elements.
+ (getSource): No need to convert int to Integer it is autoboxed.
+ (printArray): Removed unused method.
+ (setEpoch): Add/update define on setting epoch.
+ (setName): Likewise.
+ (setRelease): Likewise.
+ (setVersion): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parsing/SpecfileParser.java:
+ (parse): No need to set defines by hand due to the autosetting in Specfile.
+ (parseSection): Format.
+
+2008-07-02 Alexander Kurtakov <akurtakov@gmail.com>
+ More cleanups.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/ColorManager.java:
+ Use foreach instead of iterator.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/NonRuleBasedDamagerRepairer.java:
+ Remove usage of deprecated Assert.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroOccurencesUpdater.java:
+ Use foreach instead of iterator.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroProposalsList.java:
+ (getProposals): Likewise.
+ (toString): Add @Override.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageBuildProposalsJob.java:
+ (run): Likewise.
+ (shouldSchedule): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageProposalsList.java:
+ (getProposals): Use foreach instead of iterator.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileChangelogScanner.java:
+ (nextToken): Add @Override.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java:
+ (computePatchesProposals): Use foreach instead of iterator.
+ (computeRpmMacroProposals): Likewise.
+ (computeRpmPackageProposals): Likewise.
+ (computeSourceProposals): Likewise.
+ (getDefines): Likewise.
+ (getPatches): Likewise.
+ (getSources): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileConfiguration.java:
+ Add @Override where needed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileEditor.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileErrorHandler.java:
+ Use Integer.valueOf instead of new Integer.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileFoldingStructureProvider.java:
+ (computeAdditions): Use foreach instead of iterator.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePartitioner.java:
+ (computePartitioning): Removed, it simply calls super method.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/TagRule.java:
+ (sequenceDetected): Add @Override.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogAction.java:
+ (createChangelogEntry): No need for new String(String).
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogFormatter.java:
+ (formatDateLine): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/Specfile.java:
+ Use Integer.valueOf instead of new Integer.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileSource.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/RpmProposalsPreferencePage.java:
+ (rpmtoolsRadioGroupFieldEditor): Use foreach instead of iterator.
+
+2008-06-29 Alexander Kurtakov <akurtakov@gmail.com>
+ Various cleanups.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/Activator.java:
+ (start): Add missing @Override.
+ (stop): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileFoldingStructureProvider.java:
+ Remove unneeded import.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePackagesScanner.java:
+ (SpecfilePackagesScanner): Use foreach instead of iterator.
+ (nextToken): Add missing @Override.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePartitioner.java:
+ (computePartitioning): Likewise.
+ (connect): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParseException:
+ Add serialVersionUID.
+
+2008-06-29 Alexander Kurtakov <akurtakov@gmail.com>
+ Make missing @Override and @Deprecate warnings.
+ * .settings/org.eclipse.jdt.core.prefs: Missing @Override and @Deprecate should
+ be warnings.
+
+2008-06-29 Alexander Kurtakov <akurtakov@gmail.com>
+ Do not show simple sections in the subpackages + cleanup.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePackage.java:
+ (toString): Add @Override.
+ (getSections): Removed unneeded foreach.
+ (getPackage): Add @Override.
+ (getPackageName): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java:
+ (simpleSections): Add %clean.
+ (complexSections): Remove %clean.
+ (parseSections): Do not add simple sections to the subpackages.
+
+2008-06-29 Alexander Kurtakov <akurtakov@gmail.com>
+ Add missing @Override.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/MailHyperlink.java:
+ (open): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/URLHyperlinkWithMacroDetector.java:
+ (detectHyperlinks): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileContentOutlinePage.java:
+ (createControl): Likewise.
+ (selectionChanged): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/MacroProposalPreferencePage.java:
+ (MacroListEditor): Likewise.
+ (createFieldEditors): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/MainPreferencePage.java:
+ (createContents): Likewise.
+ (createFieldEditors): Likewise.
+ (createLocalesCombo): Likewise.
+ (performDefaults): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/PreferenceInitializer.java:
+ (initializeDefaultPreferences): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/RpmInformationsPreferencePage.java:
+ (createFieldEditors): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/RpmProposalsPreferencePage.java:
+ (createContents): Likewise.
+ (createFieldEditors): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/SpecTemplatePreferencePage.java:
+ (isShowFormatterSetting): Likewise.
+ (performOK): Likewise.
+
+2008-06-29 Alphonse Van Assche <alcapcom@gmail.com>
+
+ * META-INF/MANIFEST.MF: bump to 0.4.0
+
+2008-06-27 Alexander Kurtakov <akurtakov@gmail.com>
+ Add quick outline.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorShowOutlineActionDelegate.java:
+ New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/outlin/ContainsFilter.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/outlin/SpecfileQuickOutlineDialog.java:
+ Likewise.
+ * plugin.xml: Add the quick outline action.
+
+2008-05-14 Alphonse Van Assche <alcapcom@gmail.com>
+
+ Add folding on all complex sections.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/Specfile.java
+ (getComplexSectionsAsList): New method.
+ (addComplexSection): Likewise.
+ (getComplexSections):Likewise.
+ (getComplexSectionsElements): Likewise.
+ (getSectionsAsList): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java
+ (parseSection): Add complex sections.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileFoldingStructureProvider.java
+ (addFoldingRegions): Likewise.
+ (createFoldingStructure): Likewise.
+ (ElementByLineNbrComparator): New inner class.
+
+2008-05-13 Alexander Kurtakov <akurtakov@gmail.com>
+
+ Exctract rpm sections to a separate class.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmSections.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePartitionScanner.java:
+ Use sections from RpmSections.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileScanner.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java: Likewise.
+
+2008-05-12 Alphonse Van Assche <alcapcom@gmail.com>
+
+ Add support to detect mail hyperlink. To make a try, just select a
+ part of text in the specfile and <ctrl> + click on a mail address.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/MailHyperlink.java: New
+ file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/MailHyperlinkDetector.java:
+ New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/URLHyperlinkWithMacroDetector.java:
+ New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/URLHyperlinkWithMacroDetector.java:
+ Moved.
+ * .classpath: add StandardVMType/J2SE-1.5.
+ * META-INF/MANIFEST.MF: export hyperlink package.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileConfiguration.java
+ (getPresentationReconciler):
+ (getHyperlinkDetectors): Add mail detector.
+ (getHyperlinkDetectorTargets): Add java doc.
+ (getTextHover): likewise.
+ (getDoubleClickStrategy): likewise.
+ (getConfiguredContentTypes): likewise.
+
+2008-05-10 Alexander Kurtakov <akurtakov@gmail.com>
+
+ Add support for %pretrans and %posttrans sections
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePartitionScanner.java:
+ Add definitions.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileScanner.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/editor/SpecfileParser.java:
+ (parseSection): Prevent NPE when the section is not defined and add definitions
+ for %pretrans and %posttrans.
+
+2008-05-02 Andrew Overholt <overholt@redhat.com>
+
+ Bug #230024
+ * META-INF/MANIFEST.MF: Bump BREE to J2SE-1.5
+
+2008-04-29 Alexander Kurtakov <akurtakov@gmail.com>
+ Generify.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/ColorManager.java
+ (dispose): Generify.
+ (getColor): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroOccurencesUpdater.java
+ (removeOldAnnotations): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageProposalsList.java
+ (getProposals): Likewise.
+ (getValue): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileChangelogScanner.java
+ (SpecfileChangelogScanner): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileFoldingStructureProvider.java
+ (addFoldingRegions): Likewise.
+ (computeAdditions): Likewise.
+ (computeDifferences): Likewise.
+ (createFoldingStructure): Likewise.
+ (updateFoldingRegions): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePackagesScanner.java
+ (SpecfilePackagesScanner): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePartitionScanner.java
+ (SpecfilePartitionScanner): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileScanner.java
+ (SpecfileScanner): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/MacroProposalsPreferencePage.java
+ (MacroListEditor.parseList): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/RpmProposalsPreferencePage.java
+ (rpmtoolsRadioGroupFieldEditor): Likewise.
+
+2008-04-27 Alphonse Van Assche <alcapcom@gmail.com>
+
+ IFileStore don't give possibility to mark resources or to get a IFile, so some
+ functionality cannot be provided on file outside a workspace - The Java editor
+ seem to do the same thing.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SpecfileElementHyperlinkDetector.java
+ (prepareHyperlink): Prepare links only for specfile inside the workspace.
+ (detectHyperlinks): Only provides this functionality for existing patches and
+ sources.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileElement.java
+ (resolve): Don't throw unexpected exceptions.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroProposalsList.java
+ (getValue): Generify.
+ (getProposals): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java
+ (computeSourcesProposals): Likewise.
+ (getSources): Likewise.
+ (ProposalComparator): Likewise.
+ (computeTemplateProposals): Likewise.
+ (ProposalComparator.compare): Likewise.
+ (getDefines): Likewise.
+ (computePatchesProposals): Likewise.
+ (getPatches): Likewise.
+ (computeCompletionProposals):Likewise. (computeRpmPackageProposals): Likewise.
+ (computeRpmMacroProposals): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileDocumentProvider.java
+ (getDocument): Now we extends TextFileDocumentProvider - Fix File->Open File
+ bug.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileEditor.java
+ (getInputFile): Return null if the IEditorInput instance is not of type IFileEditorInput.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileErrorHandler.java
+ (handleError): Handle errors only on specfile inside a workspace.
+ (removeExistingMarkers): Likewise.
+ * META-INF/MANIFEST.MF: Bump to 0.3.0
+
+2008-04-10 Alexander Kurtakov <akurtakov@gmail.com>
+
+ Bug #226546
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileComparator.java: Generify.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/Specfile.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePackage.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePackageContainer.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileSource.java: Likewise.
+
+2008-04-10 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java:
+ Add directValuesDefinitions used for License, fixes LicenseTagTest.
+
+2008-04-06 Alexander Kurtakov <akurtakov@gmail.com>
+
+ Make %{SOURCE} and %patch hyperlinks to ease navigation.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileConfiguration.java:
+ Extend TextSourceViewerConfiguration, register SpecfileElementHyperlinkDetector.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SpecfileElementHyperlink.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SpecfileElementHyperlinkDetector.java:
+ New file.
+
+2008-04-01 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 now and auto changes from eclipse.
+
+2008-03-21 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * plugin.xml: Define org.eclipse.linuxtools.rpm.ui.specEditorScope context
+ and register key sequence="Ctrl+Shift+O" in it ,fix conflict with Java editor
+ which disables "Organize imports" key binding.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileEditor.java:
+ Set own key binding scope "org.eclipse.linuxtools.rpm.ui.specEditorScope" .
+
+2008-03-17 Alexander Kurtakov <akurtakov@gmail.com>
+
+ Bug #217316
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/MacroProposalsPreferencePage.java:
+ Add interface for adding directories to Macro completion list
+
+2008-01-23 Alphonse Van Assche <alcapcom@gmail.com>
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageBuildProposalsJob.java
+ Backup package list only if the file existing + strings cleanups.
+
+2008-01-18 Alexander Kurtakov <akurtakov@gmail.com>
+
+ Bug #215788, 215771
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroProposalsList.java:
+ Handle directories with macros files.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java:
+ Remove License from simple tags.
+
+
+2008-01-04 Alexander Kurtakov <akurtakov@gmail.com>
+
+ Bug #214217
+ * src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileCompletionProcessor.java:
+ Enable auto-complete for the defined sources in the spec.
+
+2008-01-03 Andrew Overholt <overholt@redhat.com>
+
+ Bug #206964
+ * src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizardPage.java:
+ Remove 1.5 API call.
+
+2007-12-15 Alphonse Van Assche <alcapcom@gmail.com>
+
+ * META-INF/MANIFEST.MF: Bump to 0.2.1
+
+2007-12-15 Alphonse Van Assche <alcapcom@gmail.com>
+
+ Bug #212781 + some cleanups
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/MainPreferencePage.java:
+ Add Changelog format preferences.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/PreferenceInitializer.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/PreferenceConstants.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java
+ (parse): Remove existing markers only when SpecfileErrorHandler is instantiated.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogFormatter.java
+ (formatDateLine): Changelog entry format based on prefs.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/Utils.java
+ (resolveDefines): Copy from URLHyperlinkWithMacroDetector.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/URLHyperlinkWithMacroDetector.java:
+ Move resolveDefines() to Utils.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageBuildProposalsJob.java
+ (propertyListener): Run the job only when P_CURRENT_RPMTOOLS preference change.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/RpmProposalsPreferencePage.java:
+ Remove unused import.
+
+2007-11-28 Alphonse Van Assche <alcapcom@gmail.com>
+
+ Add support for URPM tool and cancel support to RpmPackageBuildProposalsJob.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/RpmProposalsPreferencePage.java
+ (rpmtoolsRadioGroupFieldEditor): Add urpm support.
+ (buildTimeListRateFieldEditor): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/PreferenceConstants.java
+ (DP_RPMTOOLS_URPM): New const.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageProposalsList.java: Using
+ HashSet list to advoid duplicate package.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageBuildProposalsJob.java
+ (update): Cancel support.
+ (retrievePackageList): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/Utils.java
+ (copyFile): New method.
+ (fileExist): New method.
+ (pluginSanityCheck): Add package list preferences sanity checks.
+
+2007-11-21 Andrew Overholt <overholt@redhat.com>
+
+ Bug #207207
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java
+ (parseSimpleDefinition): Allow macros in simple definitions
+ (Alexander Kurtakov).2007-10-14 Alphonse Van Assche <alcapcom@gmail.com>Bug #206160* src/org/eclipse/linuxtools/rpm/ui/editor/Activator.java(start):
+ Add sanity checks, at this time we only check if ~/.rpmmacros file exist and in
+ the case at this file don't exist we run rpmdev-setuptree to create it.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/Utils.java: New File.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/PreferenceConstants.java
+ (RPMMACRO_FILE): New Constant. Bug
+ https://bugzilla.redhat.com/show_bug.cgi?id=327101
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java
+ (computePatchesProposals): Remove accidentally added code.
+
+2007-09-25 Alphonse Van Assche <alcapcom@gmail.com>
+
+ Add key bindings for Toggle Comment and Organize Patches actions.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorToggleCommentActionDelegate.java:
+ Implement IWorkbenchWindowActionDelegate interface.
+ (selectionChanged): Set/update the editor member when the selection change.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorOrganizePatchesActionDelegate.java
+ Implement IWorkbenchWindowActionDelegate interface.
+ (selectionChanged): Set/Update the editor member when the selection change.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/Activator.java
+ (getActiveEditor): New method.
+ * plugin.xml: Add extension points for these key bindings.
+
+2007-09-24 Alphonse Van Assche <alcapcom@gmail.com>
+
+ Bug #204146
+ * src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileContentOutlinePage.java
+ (selectionChanged): Set the length parameter of editor#setHighlightRange method
+ to 1.
+
+2007-09-24 Alphonse Van Assche <alcapcom@gmail.com>
+
+ Bug #204150
+ (Clean fix) * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java (computePatchesProposals):
+ New method.
+ (getDefines): Rename method.
+ (getPatches): New method.
+ (computeCompletionProposals): Add patches proposals.
+
+2007-09-24 Alphonse Van Assche <alcapcom@gmail.com>
+
+ Bug #204150
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java
+ (getDefinesName): Add completion for patches.
+
+2007-09-24 Alphonse Van Assche <alcapcom@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizardPage.java:
+ Throw CoreException if /usr/share/doc or /etc/rpmdevtools dir are not found.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/Activator.java: Using SpecfileLog.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileSource.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePackageContainer.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogFormatter.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogAction.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/URLHyperlinkWithMacroDetector.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePartitioner.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileFoldingStructureProvider.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileErrorHandler.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileEditor.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageProposalsList.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroProposalsList.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroOccurrencesUpdater.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizard.java:
+ Likewise.
+
+2007-05-04 Andrew Overholt <overholt@redhat.com>
+
+ Bug #199172
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogFormatter.java:
+ Add method required by ChangeLog HEAD.
+
+2007-07-18 Alphonse Van Assche <alcapcom@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizardPage.java:
+ (dialogChanged): Fix a little mistake with String#indexOf
+
+2007-07-17 Alphonse Van Assche <alcapcom@gmail.com>
+
+ Build RPM proposal list in a background task job, the list can be update when
+ the plugin is loader, once a week or once a month.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageBuildProposalsJob.java: New
+ Class that initialize and update the packages proposal list.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/Activator.java: Add property change
+ listener and call RpmPackageBuildProposalsJob#update in the start method.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageProposalsList.java:
+ Updating to use the new job to update package proposal list strategy.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/RpmProposalsPreferencePage.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/PreferenceInitializer.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/PreferenceConstants.java:
+ Likewise.
+
+2007-07-17 Alphonse Van Assche <alcapcom@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java: Add
+ defines in proposals. Don't show templates in package context and retrieve
+ proposals only when it's needed. Cleanup javadoc and remove some unneeded methods
+ args.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java:
+ (getDefinesName): New method.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/URLHyperlinkWithMacroDetector.java:
+ Cleanup.
+
+2007-07-16 Alphonse Van Assche <alcapcom@gmail.com>
+
+ Implement toggle comment like in JDT.
+ * plugin.xml: Add comment toggle action. Add our document provider.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorToggleCommentActionDelegate.java:
+ New action.
+
+2007-07-14 Alphonse Van Assche <alcapcom@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizardPage.java:
+ Replace String#contains by String#indexOf for JRE 1.4 compatibility.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileConfiguration.java: Moving
+ Annotation Hover to derived package.
+ * Too many files to list: Add contributor line.
+
+2007-07-13 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePackagesScanner.java: Fix
+ copyright.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/PackageWordDetector.java: Likewise.
+
+2007-07-05 Andrew Overholt <overholt@redhat.com>
+
+ * Too many files to list: Add standard copyright and license header.
+
+2007-06-25 Alphonse Van Assche <alcapcom@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizardPage.java:
+ (dialogChanged): Forgot to add '>' char as un-acceptable character for the Name
+ tag.
+
+2007-06-25 Alphonse Van Assche <alcapcom@gmail.com>
+
+ Add a wizard for new specfile based on a template provided by the rpmdevtools
+ package.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizard.java: New
+ File.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizardPage.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileLog.java: Likewise, The
+ logger of convenience for the Specfile Plug-In.
+ * plugin.xml: Add extensions points for the wizard.
+
+2007-06-22 Alphonse Van Assche <alcapcom@gmail.com>
+
+ * META-INF/MANIFEST.MF: Add new dependencie "com.ibm.icu" for LineBreakingReader
+ derived class.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileErrorHandler.java:
+ (setDocument): New method. It is used by the rpmlint Plug-In.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileErrorHandler.java:
+ (setFile): Likewise.
+ (parse): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileHover.java: Using the derived
+ HTMLTextPresenter class. That make the plugin compatible with both 3.2 and 3.3
+ Eclipse versions.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileConfiguration.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/derived/HTML2TextReader.java: New New
+ derived class.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/derived/SubstitutionTextReader.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/derived/SingleCharReader.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/derived/LineBreakingReader.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/derived/HTMLTextPresenter.java:
+ Likewise.
+
+2007-06-20 Alphonse Van Assche <alcapcom@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileEditor.java
+ (dispose): Set specfile field to null, useful for test cases.
+ (getSpecfileSourceViewer): New method used by HyperlinkWithMacroTests.
+
+2007-06-20 Alphonse Van Assche <alcapcom@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroOccurrencesUpdater.java
+ (isDefineChar): Add '?' char as define limiter.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/PackageWordDetector.java
+ (isWordPart): Add '+' char.
+ * icons/occurence_obj.gif New file.
+
+2007-06-05 Alphonse Van Assche <alcapcom@gmail.com>
+
+ Bug #182633
+ * src/org/eclipse/linuxtools/rpm/ui/editor/Activator.java
+ (getImage): New method.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileLabelProvider.java
+ (PREAMBLE_ICON): New global var for icon.
+ (SECTION_ICON): Likewise.
+ (PACKAGES_ICON): Likewise.
+ (PACKAGE_ICON): Likewise.
+ (getImage): Take the above icons in account.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java
+ (TEMPLATE_ICON): New global var for icon.
+ (computeTemplateProposals): Using Activator.getImage() method.
+ (computeRpmMacroProposals): Likewise.
+ (computeRpmPackageProposals): Likewise.
+
+2007-06-05 Alphonse Van Assche <alcapcom@gmail.com>
+
+ Bug: #184955
+ * plugin.xml: add org.eclipse.ui.editors.markerAnnotationSpecification extension
+ point.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileHover.java
+ (getHoverInfo): using new methods.
+ (getSourceOrPatchValue): New method used by RpmMacroOccuencesUpdater.
+ (getMacroValueFromMacroList): New method used by RpmMacroOccuencesUpdater.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileConfiguration.java
+ (getAnnotationHover): overload of getAnnotationHover() method from
+ SourceViewerConfiguration.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/Specfile.java
+ (getDefinesAsList): New method.
+ (getDefinesAsArray): New method.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroOccurrencesUpdater.java: New
+ file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/AnnotationHover.java: New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileEditor.java
+ (setSpecfile): update macro occurences.
+
+2007-06-04 Alphonse Van Assche <alcapcom@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java
+ (parsePatch): Parse %patch macro and Patch: directive without trailing number.
+ (parseComplexDefinition): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileSource.java
+ (changeReferences): Likewise.
+ (changeDeclaration): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileScanner.java
+ (SpecfileScanner): Scan %patch macro without trailing number.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/URLHyperlinkWithMacroDetector.java
+ (detectHyperlinks): Check if IHyperlink[] is not null before try to get the
+ lenght of it.
+
+2007-06-04 Alphonse Van Assche <alcapcom@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogFormatter.java
+ Fix ChangeLog entry action.
+ (formatDateLine): Add escape char in pattern %{?dist} tag.
+
+2007-05-04 Andrew Overholt <overholt@redhat.com>
+
+ Bug #185598
+ * META-INF/MANIFEST.MF: Add "Incubation" to Bundle-Name.
+
+2007-04-14 Alphonse Van Assche <alcapcom@gmail.com>
+
+ Bug #182302
+ * src/org/eclipse/linuxtools/rpm/ui/editor/PackageWordDetector.java
+ (isWordPart): Detect packages contain '_' char.
+ (isWordStart): Add support for packages begining with ' ' | ',' | '\t' | ':'
+ char.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java
+ (parseLine): Fix tags parsing.
+ (parseSimpleDefinition): Don't show warning about acronym error.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileScanner.java
+ (sections): Add %clean and %check section.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePackagesScanner.java
+ (PACKAGES_TAGS): Add Requires(hint)
+ (SpecfilePackagesScanner): Detect packages that begin with ' ' | ',' | '\t' |
+ ':' char. Add comment support.
+
+2007-04-10 Alphonse Van Assche <alcapcom@gmail.com>
+
+ Bug #181747
+ * src/org/eclipse/linuxtools/rpm/ui/editor/URLHyperlinkWithMacroDetector.java:
+ New class to resolve macro in URL.
+ (detectHyperlinks): New method.
+ (URLHyperlinkWithMacroDetector): Likewise.
+ (resolveDefinesInURL): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileConfiguration.java:
+ (getHyperlinkDetectors): Use URLHyperlinkWithMacroDetector.
+
+2007-04-10 Alphonse Van Assche <alcapcom@gmail.com>
+
+ Bug #181110
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileReconcilingStrategy.java:
+ Update the editor without saving the file.
+ (updateFolding): Don't create a specfile instance.
+ (reconcile): Use the same method to reconcile.
+ (SpecfileReconcilingStrategy): Remove unneeded code.
+ (updateEditor): Update the specfile instance of the editor.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java
+ (parseSimpleDefinition): Cleanup.
+ (parseComplexDefinition): Remove all existing error handler markers before
+ parsing the file.
+ (parse): Remove workarounds which are no longer needed.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java
+ (getContextType): Fix array out of bounds bug with incomplete specfiles.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileFoldingStructureProvider.java
+ (updateFoldingRegions): Use the Specfile instance in the editor one.
+
+2007-04-08 Alphonse Van Assche <alcapcom@gmail.com>
+
+ Bug #181245
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileScanner.java: Remove unneeded
+ RPM tags, these tags are now taken into account by SpecfilePartitionScanner.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePackagesScanner.java: New
+ file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePartitionScanner.java: Add
+ __spec_packages partition type. Use SpecfilePackagesScanner.PACKAGES_TAGS.
+ (SpecfilePartitionScanner): Add new scan rules for the__spec_packages partition.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileHover.java: Add hover support
+ for RPM packages.
+ (findPackages): New method.
+ (getHoverRegion): Add support for findPackages() method.
+ (getHoverInfo): Get RPM package hover information. Rename macroName to
+ currentSelection to reflect the current code.
+ (getHoverControlCreator): Use HTMLTextPresenter as information control
+ presenter.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileConfiguration.java: Add
+ support for the RPM packages content type.
+ (getSpecfilePackagesScanner): New method.
+ (getPresentationReconciler): Reconcile packages.
+ (getContentAssistant): Set content assistant for packages content type.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java: Add
+ completion support for the __spec_packages partition type.
+ (computeRpmPackageProposals): Show only proposals on lines begining with
+ Requires, BuildRequires, etc.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageProposalsList.java: Add a
+ method used by SpecfilePartionScanner.getHoverInfo() to retrieve package.
+ information.
+ (getValue): New method.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/PackageWordDetector.java: New file.
+ Add packages word detection.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/ISpecfileColorConstants.java: Add
+ color constant for packages.
+
+2007-04-06 Alphonse Van Assche <alcapcom@gmail.com>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroProposalsList.java
+ (getValue): Escape "?" character in regex. Bug #181395.
+
+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>
+
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroProposalsList.java
+ (getProposals): Escape "{" character in regex.
+
+2007-04-04 Andrew Overholt <overholt@redhat.com>
+
+ This large functionality addition was done by Alphonse Van Assche. The
+ discussion surrounding it is available at
+ https://bugs.eclipse.org/bugs/show_bug.cgi?id=177220.
+ * .classpath: Add J2SE-1.4 preferred EE.
+ * build.properties: Add icons and templates to binary build.
+ * icons/changelog.gif: Remove apparently unused icon.
+ * META-INF/MANIFEST.MF: Change changelog requirement to new namespace. Add
+ * plugin.xml: Update class namespace for editor extension. Update changelog
+ extension point locations. Add templates and preferences extensions. preferences
+ to package export list.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/Activator.java: Add template,
+ contextType, and macro and package completion variables.
+ (getTemplateStore): New method.
+ (getRpmMacroList): Likewise.
+ (getRpmPackageList): Likewise.
+ (getContextTypeRegistry): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroProposalsList.java: Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageProposalsList.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileConfiguration.java
+ (getReconciler): Change delay to 500 ms.
+ (getContentAssistant): New method.
+ (getInformationControlCreator): New method.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileEditor.java
+ (getAdapter): Add projectionSupport.
+ (getResourceBundle): New method.
+ (createActions): Likewise.
+ (createPartControl): Likewise.
+ (createSourceViewer): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileEditorMessages.properties:
+ New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileFoldingStructureProvider.java:
+ New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileHover.java
+ (getHoverInfo): Add non-%source and non-%patch macro proposals.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileReconcilingStrategy.java
+ (SpecfileReconcilingStrategy): Add parser and foldingStructureProvider.
+ (setDocument): Implement.
+ (reconcile): Call reconcile().
+ (initialReconcile): New method. Call reconcile().
+ (reconcile): New method. Parse and update editor and folding.
+ (setProgressMonitor): New method.
+ (parseSpecfile): Likewise.
+ (updateEditor): Likewise.
+ (updateFolding): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogParser.java:
+ Update changelog import package name.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogFormatter.java
+ (formatTodaysDate): Add locale-based formatting. Will probably want to re-visit
+ this soon.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/Specfile.java
+ (getSectionsElements): New method. Used for determining when to offer completion
+ proposals.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java
+ (parseComplexDefinition): Add temporary workaround for null errorHandler.
+ (parseSimpleDefinition): Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/MainPreferencePage.java:
+ New file.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/MacroProposalsPreferencePage.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/PreferenceConstants.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/PreferenceInitializer.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/RpmInformationsPreferencePage.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/RpmProposalsPreferencePage.java:
+ Likewise.
+ * src/org/eclipse/linuxtools/rpm/ui/editor/preferences/SpecTemplatePreferencePage.java:
+ Likewise.
+ * templates/templates.xml: Likewise. Templates for completion.
+
+2007-03-28 Andrew Overholt <overholt@redhat.com>
+
+ Re-namespace to org.eclipse.linuxtools.rpm.ui.editor.
+
+2007-03-15 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/SpecfileReconcilingStrategy.java: New file.
+ * src/org/eclipse/cdt/rpm/editor/outline/SpecfileContentOutlinePage.java
+ (update): Run in an async thread.
+ (.run): New method.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileConfiguration.java
+ (getReconciler): New method.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileEditor.java
+ (validateAndMark): Call getParser.
+ (getParser): New method.
+ (getAdapter): Call getOutlinePage.
+ (getOutlinePage): New method.
+ (setSpecfile): New method.
+
+2007-01-06 Igor Foox <ifoox@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileParser.java
+ (parseSection): Special case the top level package so that it appears in the
+ outline.
+
+2007-01-06 Igor Foox <ifoox@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileSection.java: Rename thePackage
+ field to parentPackage.
+ (getPackage): Rename thePackage field to parentPackage.
+ (toString): Ditto.
+ (SpecfileSection): Ditto.
+ (setPackage): Ditto.
+ (getPackageName): New method.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfilePackage.java: Resubclass based
+ on SpecfileSection instead of SpecfileElement and add a new field packageName.
+ (getPackage): New method.
+ (setPackageName): New method.
+ (getPackageName): New method.
+ (toString): Remove redundant code, change use of getName to getPackageName().
+ (SpecfilePackage): Initialize new fields, pass "package" to super constructor.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfilePackageContainer.java
+ (getPackage): Use getPackageName() instead of getName().
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileParser.java
+ (parseSection): Special case ParserPackages from other types of ParserSections.
+
+2007-01-04 Igor Foox <ifoox@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfilePreamble.java: New file.
+ * src/org/eclipse/cdt/rpm/editor/outline/SpecfileContentProvider.java
+ (getChildren): Add the preamble and sections to the children returned for a
+ Specfile.
+ * src/org/eclipse/cdt/rpm/editor/outline/SpecfileLabelProvider.java
+ (getText): Add "Preamble" as the returned text for SpecfilePreamble.
+ * src/org/eclipse/cdt/rpm/editor/parser/Specfile.java
+ (Specfile): Change preamble to a SpecfilePreamble from a SpecfileElement,
+ intialize it in the constructor.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileParser.java
+ (parseSection): Add simple, but not complex, sections to the specfile with
+ addSection(). Add complex section to a SpecfilePackage hierarchialy, and add the
+ package to the specfile.
+ (parse): Remove if block that dealt with SpecfileSections.
+ (simpleSections): Add javadoc.
+ (complexSections): Add javadoc.
+
+2007-01-03 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfilePackageContainer.java: New file.
+ Container for packages for use in the model and outline.
+ * src/org/eclipse/cdt/rpm/editor/outline/SpecfileContentProvider.java
+ (SpecfileContentProvider): Set specfile in the constructor.
+ (getElements): Use getChildren.
+ (getChildren): Re-work outline to have Packages sub-category. Will further
+ refine later.
+ (hasChildren): Add knowledge of SpecfilePackage and SpecfilePackageContainer.
+ * src/org/eclipse/cdt/rpm/editor/outline/SpecfileLabelProvider.java
+ (getText): Add SpecfilePackage and SpecfilePackageContainer.
+ * src/org/eclipse/cdt/rpm/editor/parser/Specfile.java
+ (getPackage): New method.
+ (getPreamble): Likewise.
+ (addPackage): Likewise.
+ (Specfile): Likewise.
+ (getPackages): Likewise.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileParser.java
+ (parseSection): Deal with -f, add package data to sections.
+ (parse): Add packages to model.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfilePackage.java
+ (SpecfilePackage): Add sections.
+ (getSections): New method.
+ (hasChildren): Likewise.
+ (addSection): Likewise.
+ (getLineEndPosition): Override to return the actual %package line.
+ (getLineStartPosition): Likewise.
+
+2006-12-19 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileSource.java
+ (getFileName): Resolve macros.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileConfiguration.java
+ (getPresentationReconciler): Cleanups.
+ (getTextHover): Likewise.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileHover.java
+ (findWord): Deal with macros without braces
+ (ex. %patch).(getHoverInfo): Fix typo.
+
+2006-12-18 Igor Foox <ifoox@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/SpecfilePartitionScanner.java: Remove the
+ SPEC_DEFAULT partition type, as IDocument.EFAULT_CONTENT_TYPE fulfills this role.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileConfiguration.java
+ (getConfiguredContentTypes): Fix to return
+ SpecfilePartitionScanner.SPEC_PARTITION_TYPES instead of just the default
+ partition type.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileHover.java
+ (getHoverInfo): Change hover text to "<macro name>: <macro value". Add hover for
+ patch and source declarations.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileParser.java
+ (parse): Special case Epoch handling, now added to list of defines.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileSource.java: Change call to
+ super constructor with String.
+
+2006-12-04 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/SpecfileHover.java: New file. Hover support.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileConfiguration.java
+ (SpecfileConfiguration): Add editor to constructor.
+ (getTextHover): New method.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileEditor.java
+ (SpecfileEditor): Add this object to configuration constructor call.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileParser.java
+ (parse): Add version and release defines.
+
+2006-11-07 Andrew Overholt <overholt@redhat.com>
+
+ Add license.
+ * src/org/eclipse/cdt/rpm/editor/parser/Specfile.java: Add license.
+ (setLicense): New method.
+ (getLicense): Likewise.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileParser.java
+ (parseSimpleDefinition): Add license.
+ (parse): Likewise.
+ (parseDefine): Likewise.
+ (parseLine): Likewise.
+
+2006-10-04 Andrew Overholt <overholt@redhat.com>
+
+ * plugin.xml: Update ChangeLog parser extension to not use fully-qualified
+ editor name.
+
+2006-10-03 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/outline/SpecfileContentProvider.java
+ (inputChanged): Don't parse; use SpecfileEditor's parsed Specfile instead.
+ (SpecfileContentProvider): Take as input the ITextEditor rather than just the
+ IDocumentProvider. Remove unused field variables.
+ * src/org/eclipse/cdt/rpm/editor/outline/SpecfileContentOutlinePage.java
+ (createControl): Use updated SpecfileContentProvider constructor.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileEditor.java
+ (editorSaved): Parse the document
+ (validateAndMark) before updating the outline.* src/org/eclipse/cdt/rpm/editor/actions/SpecfileChangelogFormatter.java: Remove unused field variable.(getParsedSpecfile):
+ Don't parse; use SpecfileEditor's parsed Specfile instead.
+ * src/org/eclipse/cdt/rpm/editor/actions/SpecfileChangelogAction.java
+ (createChangelogEntry): Don't parse; use SpecfileEditor's parsed Specfile
+ instead.
+ (run): Pass Specfile and not editor to createChangelogEntry; Fix typos.
+ * src/org/eclipse/cdt/rpm/editor/actions/SpecfileEditorOrganizePatchesActionDelegate.java
+ (setActiveEditor): Remove debugging output.
+ (run): Likewise.
+
+2006-10-03 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/actions/SpecfileEditorOrganizePatchesActionDelegate.java:
+ New file.
+ (setActiveEditor): New method.
+ (run): Likewise.
+ (selectionChanged): Likewise.
+ * src/org/eclipse/cdt/rpm/editor/parser/Specfile.java:
+ (printArray): New method.
+ (getDocument): Likewise.
+ (toString): Likewise.
+ (getSourcesAsArray): Likewise.
+ (setDocument): Likewise.
+ (setSources): Likewise.
+ (changeLine): Likewise.
+ (organizePatches): Likewise.
+ (getLine): Likewise.
+ (getLineLength): Likewise.
+ (getPatchesAsArray): Likewise.
+ (setPatches): Likewise.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileSource.java
+ (toString): Add declaration line.
+ (getLineNumber): New method.
+ (changeDeclaration): Likewise.
+ (setLineNumber): Likewise.
+ (changeReferences): Likewise.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileParser.java
+ (parse): Fix line numbers. Record patch declaration line numbers.
+ * plugin.xml: Add action for "Organize Patches" in editor context menu.
+ * src/org/eclipse/cdt/rpm/editor/SpecfilePartitioner.java
+ (connect): Don't print out the partitions.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileEditor.java
+ (validateAndMark): Keep parsed specfile.
+ (getSpecfile): New method.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileErrorHandler.java
+ (getCharOffset): Fix line number calculations.
+
+2006-09-19 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/parser/SourceComparator.java: New file.
+ * src/org/eclipse/cdt/rpm/editor/parser/Specfile.java
+ (printSources): New method.
+ (printPatches): Likewise.
+ (getSourcesAsList): Likewise.
+ (getSourcesAsArray): Likewise.
+ (getSources): Likewise.
+ (getPatchesAsList): Likewise.
+ (getPatches): Likewise.
+ (getPatchesAsArray): Likewise.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileSource.java
+ (toString): Add lines used.
+ (getLinesUsed): New method.
+ (removeLineUsed): Likewise.
+ (addLineUsed): Likewise.
+ (SpecfileSource): Initialize linesUsed.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileParser.java
+ (parse): Add line numbers where patches and sources are used.
+
+2006-09-19 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileParser.java
+ (parseComplexDefinition): Make lines that being with "Source" or "Patch" but do
+ not have colons just warnings as we cannot tell the difference between these and
+ Source or Patch directives with missing trailing colons.
+
+2006-09-07 Igor Foox <ifoox@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/actions/SpecfileChangelogFormatter.java: Fix
+ the case where there is no changelog section in the file as well as some minor
+ formatting fixes.
+
+2006-09-07 Igor Foox <ifoox@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/actions/SpecfileChangelogFormatter.java: New
+ file.
+ * src/org/eclipse/cdt/rpm/editor/actions/SpecfileChangelogParser.java: New,
+ empty, file.
+ * src/org/eclipse/cdt/rpm/editor/parser/Specfile.java: Initialize epoch to -1.
+ * META-INF/MANIFEST.MF: Add exporting of the new
+ org.eclipse.linuxtools.rpm.ui.editor.actions package. Add dependency on
+ com.redhat.eclipse.changelog.core.
+ * plugin.xml: Remove extension of the org.eclipse.ui.actionSets extension point,
+ add extension of the com.redhat.eclipse.changelog.core.parserContribution and
+ com.redhat.eclipse.changelog.core.formatterContribution extension points.
+ * src/org/eclipse/cdt/rpm/editor/actions/SpecfileChangelogAction.java
+ (createChangelogEntry): Use email and author name from changelog plugin,
+ although in a very hacky way. Add option epoch to the version, add macro
+ resolution in version, epoch and release.
+
+2006-09-05 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileElement.java
+ (resolve): Use reluctant regex to allow for multiple definitions to be resolved.
+ * src/org/eclipse/cdt/rpm/editor/actions/SpecfileChangelogAction.java
+ (createChangelogEntry): Resolve strings so we don't end up with variable
+ definitions in the nvr string.
+
+2006-09-04 Igor Foox <ifoox@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/actions/SpecfileChangelogAction.java: New file,
+ implementing the changelog entry action.
+ * icons/changelog.gif: New file.
+ * plugin.xml: Add extension point for actionSet.
+
+2006-09-04 Igor Foox <ifoox@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileParser.java
+ (parseSection): Add continue statement if no package name is found after -n.
+
+2006-09-03 Igor Foox <ifoox@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/outline/SpecfileContentProvider.java: Remove
+ unnecessary imports.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileDocumentProvider.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/SpecfilePartitionScanner.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileChangelogScanner.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileParser.java
+ (parseSimpleDefinition): Change use of illegal String.contains(String) to
+ String.indexOf(String) > 0.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileTag.java
+ (toString): Likewise.
+
+2006-09-01 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileParser.java
+ (parseDefine): Remove colon from error messages.
+ (parse): Don't output to console.
+ (parseSimpleDefinition): Return after first error. Remove colon from error
+ messages.
+
+2006-08-31 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/parser/Specfile.java
+ (getSource): New method.
+ (getPatch): Likewise.
+ (addPatch): Likewise.
+ (addSource): Likewise.
+ (Specfile): Likewise. Add patches and sources maps.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileParser.java
+ (packageLevelDefinitions): Likewise.
+ (parseMacro): Likewise.
+ (parseSection): Likewise.
+ (complexDefinitions): Likewise.
+ (parsePatch): Likewise.
+ (parseLine): Likewise.
+ (simpleDefinitions): Likewise.
+ (parseDefine): Likewise.
+ (parse): Likewise.
+ (parseSimpleDefinition): Likewise.
+ (parseComplexDefinition): Likewise. Split up parser into multiple methods.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileTag.java
+ (toString): Use resolve method.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileParseException.java
+ (SpecfileParseException): Add severity.
+ (getSeverity): New method.
+ (setSeverity): Likewise.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileErrorHandler.java
+ (handleError): Use severity. Add severity.
+
+2006-08-31 Andrew Overholt <overholt@redhat.com>
+
+ * META-INF/MANIFEST.MF: Add package exports to facilitate moving tests to new
+ plugin.
+
+2006-08-29 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/parser/tests: Move tests to new plugin
+ org.eclipse.linuxtools.rpm.ui.editor.tests.
+ * .classpath: Remove JUnit from classpath.
+
+2006-08-28 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileParser.java
+ (parseLine): Handle errors directly and do not throw exceptions.
+ (parse): Pass lineNumber to parseLine for error handling.
+
+2006-08-28 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/outline/SpecfileContentProvider.java
+ (getParent): Set null root.
+ (inputChanged): Add error handling.
+ (getElements): Set null root.
+ * src/org/eclipse/cdt/rpm/editor/outline/SpecfileContentOutlinePage.java
+ (update): Check for null input.
+ * src/org/eclipse/cdt/rpm/editor/outline/SpecfileLabelProvider.java
+ (getText): Never return null.
+ * src/org/eclipse/cdt/rpm/editor/parser/Specfile.java: Set default name value.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileParser.java
+ (parseLine): First cut of error handling.
+ (parse): Likewise.
+ (setErrorHandler): Likewise. Likewise.
+ * META-INF/MANIFEST.MF: Add dependencies for error handling.
+ * plugin.xml: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileEditor.java
+ (doSetInput): First cut of error handling.
+ (validateAndMark): Likewise.
+ (getInputDocument): Likewise.
+ (getInputFile): Likewise.
+ (editorSaved): Likewise. Likewise.
+ * src/org/eclipse/cdt/rpm/editor/AuthorEmailRule.java
+ (evaluate): Add necessary cast.
+ * src/org/eclipse/cdt/rpm/editor/VersionReleaseRule.java
+ (evaluate): Likewise.
+
+2006-08-21 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/parser/Specfile.java
+ (setVersion): New method.
+ (getVersion): Likewise.
+ (setRelease): Likewise.
+ (getDefine): Likewise.
+ (addDefine): Likewise.
+ (getRelease): Likewise.
+ (Specfile): Add version, release, and defines.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileSection.java
+ (SpecfileSection): Add specfile to constructor.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileParser.java
+ (parseLine): Add specfile argument.
+ (parse): Likewise.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfilePackage.java
+ (SpecfilePackage): Likewise.
+ * src/org/eclipse/cdt/rpm/editor/parser/tests/HeaderRecognitionTest.java
+ (testGetComplexSectionName2): Likewise.
+ (testGetComplexSectionName4): Likewise.
+ (testGetComplexSectionName5): Likewise.
+ (testGetSimpleSectionName): Likewise.
+ (testGetComplexSectionName6): Likewise.
+ (testGetComplexSectionName3): Likewise.
+ (testGetComplexSectionName7): Likewise.
+ (testGetComplexSectionName1): Likewise. Likewise.
+ * src/org/eclipse/cdt/rpm/editor/parser/tests/EpochTagTest.java
+ (testNonIntegerEpoch): Likewise.
+ (testMultipleEpochsTag): Likewise.
+ (testMultipleEpochsTag2): Likewise.
+ (testEpochTag2): Likewise.
+ (testNonIntegerEpoch2): Likewise.
+ (testNullEpochTag2): Likewise.
+ (testNullEpochTag): Likewise.
+ (testEpochTag): Likewise. Likewise.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileTag.java
+ (SpecfileTag): Likewise.
+ (setTagType): New method.
+ (getTagType): Likewise.
+ (getStringValue): Likewise.
+ (toString): Use tag type to determine return value.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileElement.java
+ (getSpecfile): New method.
+ (resolve): Likewise. Resolve variable definitions.
+ (setSpecfile): Likewise.
+ (getName): Use resolve.
+ * src/org/eclipse/cdt/rpm/editor/parser/tests/NameTagTest.java
+ (testNameTag2): Add specfile argument.
+ (testMultipleNamesTag2): Likewise.
+ (testNameTag): Likewise.
+ (testMultipleNamesTag): Likewise.
+ (testNullNameTag2): Likewise.
+ (testNullNameTag): Likewise.
+ (testResolvedSetName):
+ (testResolvedNameTag): Add specfile field.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileDefine.java: New file.
+ * src/org/eclipse/cdt/rpm/editor/parser/tests/DefineTests.java: New file.
+ * src/org/eclipse/cdt/rpm/editor/parser/tests/ReleaseTagTests.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/parser/tests/VersionTagTests.java: Likewise.
+
+2006-08-20 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/parser/Specfile.java
+ (setEpoch): New method.
+ (getEpoch): Likewise. Add epoch field variable.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileParser.java
+ (parseLine): Handle epochs.
+ (parse): Likewise. Clean up imports and remove unused args variable.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileTag.java
+ (setIntValue): New method. Handle tags that have integer values.
+ (getIntValue): Likewise.
+ (toString): Modify to handle integer and string tags.
+ (SpecfileTag): Modify constructors for integer and string values.
+ (setStringValue): Refactor setValue.
+ (getStringValue): Likewise. Add tagType field variable.
+ * src/org/eclipse/cdt/rpm/editor/parser/tests/NameTagTest.java
+ (testNameTag2): Modify to use SpecfileTag.getStringValue;
+ (testNameTag): Likewise.
+ * src/org/eclipse/cdt/rpm/editor/parser/tests/EpochTagTest.java: New file. Tests
+ for epoch tag handling.
+
+2006-08-18 Andrew Overholt <overholt@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/parser/tests/NameTagTest.java: Add new file.
+ * src/org/eclipse/cdt/rpm/editor/parser/tests/HeaderRecognitionTest.java: Ditto.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileTag.java: Ditto.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileSection.java: Ditto.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileParser.java : Ditto.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfilePackage.java: Ditto.
+ * src/org/eclipse/cdt/rpm/editor/parser/SpecfileElement.java: Ditto.
+ * src/org/eclipse/cdt/rpm/editor/parser/Specfile.java: Ditto.
+ * src/org/eclipse/cdt/rpm/editor/outline/SpecfileLabelProvider.java: Ditto.
+ * src/org/eclipse/cdt/rpm/editor/outline/SpecfileContentProvider.java: Ditto.
+ * src/org/eclipse/cdt/rpm/editor/outline/SpecfileContentOutlinePage.java: Ditto.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileEditor.java
+ (getAdapter): Add method.
+ * .classpath: Add dependency on JUnit.
+ * META-INF/MANIFEST.MF: Add dependency on org.eclipse.ui.views.
+
+2006-08-12 Igor Foox <ifoox@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/VersionReleaseRule.java: Fixed bug with the
+ handling of trailing space following the version-release.
+ * src/org/eclipse/cdt/rpm/editor/AuthorEmailRule.java: Added rudimentary
+ checking for valid email addresses, and fixed a few hanging bugs when removing
+ the '<', '@', '.', or '>' characters from the email address.
+
+2006-08-12 Igor Foox <ifoox@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/SpecfileScanner.java: Minor doc fixes.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileConfiguration.java: Added a reference
+ to a SpecfileChangelogScanner. Added a damager/repairer pair for the %files and
+ %changelog sections.
+ * src/org/eclipse/cdt/rpm/editor/ISpecfileColorConstants.java: Removed leftover
+ constants from XML editor example, added constants for changelog colouring.
+ * src/org/eclipse/cdt/rpm/editor/AuthorEmailRule.java: New file.
+ * src/org/eclipse/cdt/rpm/editor/VersionReleaseRule.java: New file.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileChangelogScanner.java: New file.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileTagScanner.java: Commented the whole
+ file, as I think it's unused.
+
+2006-08-12 Igor Foox <ifoox@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/editor/SpecfilePartitionScanner.java: Fixed
+ partitioning with a simple initial partitioning scheme.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileDocumentProvider.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileConfiguration.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/SectionRule.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/SpecfilePartitioner.java: New file, adds
+ debugging output to partitioning.
+
+2006-08-02 Andrew Overholt <overholt@redhat.com>
+
+ * .settings/org.eclipse.jdt.core.prefs: Initial commit.
+ * src/org/eclipse/cdt/rpm/editor/TagWordDetector.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileConfiguration.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/ColorManager.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/NonRuleBasedDamagerRepairer.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/SectionRule.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/SpecfilePartitionScanner.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/StringWithEndingRule.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileWhitespaceDetector.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileDoubleClickStrategy.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileTagScanner.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/TagRule.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/IStrictWordDetector.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/Activator.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/MacroWordDetector.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileDocumentProvider.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileScanner.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/PatchNumberDetector.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/SpecfileEditor.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/SuffixNumberDetector.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/ISpecfileColorConstants.java: Likewise.
+ * src/org/eclipse/cdt/rpm/editor/KeywordWordDetector.java: Likewise.
+ * build.properties: Likewise.
+ * .project: Likewise.
+ * ChangeLog: Likewise.
+ * plugin.xml: Likewise.
+ * icons/rpm.gif: Likewise.
+ * META-INF/MANIFEST.MF: Likewise.
+ * .classpath: Likewise.
+ * .cvsignore: Likewise. \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/META-INF/MANIFEST.MF b/rpm/org.eclipse.linuxtools.rpm.ui.editor/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..f78932b57c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/META-INF/MANIFEST.MF
@@ -0,0 +1,30 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.linuxtools.rpm.ui.editor; singleton:=true
+Bundle-Version: 0.4.2.qualifier
+Bundle-Activator: org.eclipse.linuxtools.rpm.ui.editor.Activator
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.jface.text,
+ org.eclipse.ui.editors,
+ org.eclipse.ui.workbench.texteditor,
+ org.eclipse.ui.views,
+ org.eclipse.core.resources,
+ org.eclipse.ui.ide,
+ org.eclipse.linuxtools.changelog.core,
+ com.ibm.icu,
+ org.eclipse.ui.forms;bundle-version="3.3.101",
+ org.eclipse.compare;bundle-version="3.4.0"
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.linuxtools.rpm.ui.editor,
+ org.eclipse.linuxtools.rpm.ui.editor.actions,
+ org.eclipse.linuxtools.rpm.ui.editor.hyperlink,
+ org.eclipse.linuxtools.rpm.ui.editor.markers,
+ org.eclipse.linuxtools.rpm.ui.editor.outline,
+ org.eclipse.linuxtools.rpm.ui.editor.parser,
+ org.eclipse.linuxtools.rpm.ui.editor.preferences,
+ org.eclipse.linuxtools.rpm.ui.editor.scanners
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Vendor: %provider
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/build.properties b/rpm/org.eclipse.linuxtools.rpm.ui.editor/build.properties
new file mode 100644
index 0000000000..df193343ed
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/build.properties
@@ -0,0 +1,18 @@
+###############################################################################
+# 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/,\
+ .,\
+ icons/,\
+ templates/,\
+ plugin.properties
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/macro_obj.gif b/rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/macro_obj.gif
new file mode 100644
index 0000000000..9ac596da3a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/macro_obj.gif
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/occurrence_obj.gif b/rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/occurrence_obj.gif
new file mode 100644
index 0000000000..7b1efa5498
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/occurrence_obj.gif
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/package_obj.gif b/rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/package_obj.gif
new file mode 100644
index 0000000000..f4a1ea1507
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/package_obj.gif
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/packages_obj.gif b/rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/packages_obj.gif
new file mode 100644
index 0000000000..1f4ec30c44
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/packages_obj.gif
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/preamble_obj.gif b/rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/preamble_obj.gif
new file mode 100644
index 0000000000..ea94702caf
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/preamble_obj.gif
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/rpm.gif b/rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/rpm.gif
new file mode 100644
index 0000000000..8e820890be
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/rpm.gif
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/section_obj.gif b/rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/section_obj.gif
new file mode 100644
index 0000000000..9e44ce52a9
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/section_obj.gif
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/template_obj.gif b/rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/template_obj.gif
new file mode 100644
index 0000000000..fdde5fbb95
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/icons/template_obj.gif
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/plugin.properties b/rpm/org.eclipse.linuxtools.rpm.ui.editor/plugin.properties
new file mode 100644
index 0000000000..b9171239b3
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# 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 Incorporated - initial API and implementation
+#################################################################################
+bundleName=RPM Specfile Plug-in (Incubation)
+provider=Eclipse.org \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/plugin.xml b/rpm/org.eclipse.linuxtools.rpm.ui.editor/plugin.xml
new file mode 100644
index 0000000000..70bfcaebe9
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/plugin.xml
@@ -0,0 +1,292 @@
+<?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.ui.contexts">
+ <context
+ name="Specfile Editor Context"
+ id="org.eclipse.linuxtools.rpm.ui.specEditorScope"
+ parentId="org.eclipse.ui.textEditorScope">
+ </context>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ name="Specfile Editor"
+ extensions="spec"
+ icon="icons/rpm.gif"
+ contributorClass="org.eclipse.ui.texteditor.BasicTextEditorActionContributor"
+ class="org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor"
+ id="org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor">
+ </editor>
+ </extension>
+
+ <extension
+ id="specfileerror"
+ point="org.eclipse.core.resources.markers"
+ name="Specfile Error Marker">
+ <super type="org.eclipse.core.resources.problemmarker"/>
+ <super type="org.eclipse.core.resources.textmarker"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ id="specfiletask"
+ point="org.eclipse.core.resources.markers"
+ name="Specfile Task Marker">
+ <super type="org.eclipse.core.resources.taskmarker"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.editors.documentProviders">
+ <provider
+ extensions=".spec"
+ class="org.eclipse.linuxtools.rpm.ui.editor.SpecfileDocumentProvider"
+ id="org.eclipse.linuxtools.rpm.ui.editor.specfileDocumentProvider">
+ </provider>
+ </extension>
+ <extension
+ point="org.eclipse.linuxtools.changelog.core.parserContribution">
+ <parser
+ class="org.eclipse.linuxtools.rpm.ui.editor.actions.SpecfileChangelogParser"
+ editor="SpecfileEditor"
+ name="SpecfileChangelogParser"/>
+ </extension>
+ <extension
+ point="org.eclipse.linuxtools.changelog.core.formatterContribution">
+ <formatter
+ class="org.eclipse.linuxtools.rpm.ui.editor.actions.SpecfileChangelogFormatter"
+ id="org.eclipse.linuxtools.rpm.ui.editor.actions.specfilechangelogformatter"
+ inFile="true"
+ name="SpecfileChangelogFormatter">
+ <filePattern pattern=".*\.spec"/>
+ </formatter>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.editors.templates">
+ <contextType
+ class="org.eclipse.jface.text.templates.TemplateContextType"
+ name="preSection"
+ id="org.eclipse.linuxtools.rpm.ui.editor.preSection"/>
+ <contextType
+ class="org.eclipse.jface.text.templates.TemplateContextType"
+ name="buildSection"
+ id="org.eclipse.linuxtools.rpm.ui.editor.buildSection"/>
+ <contextType
+ class="org.eclipse.jface.text.templates.TemplateContextType"
+ name="preambleSection"
+ id="org.eclipse.linuxtools.rpm.ui.editor.preambleSection"/>
+ <include file="templates/templates.xml"/>
+ <contextType
+ class="org.eclipse.jface.text.templates.TemplateContextType"
+ id="org.eclipse.linuxtools.rpm.ui.editor.installSection"
+ name="fileSection"/>
+ <contextType
+ class="org.eclipse.jface.text.templates.TemplateContextType"
+ id="org.eclipse.linuxtools.rpm.ui.editor.changelogSection"
+ name="changelogSection"/>
+ <include file="templates/templates.xml"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ class="org.eclipse.linuxtools.rpm.ui.editor.preferences.MainPreferencePage"
+ id="org.eclipse.linuxtools.rpm.ui.editor.mainpage"
+ name="Specfile Editor"/>
+ <page
+ category="org.eclipse.linuxtools.rpm.ui.editor.mainpage"
+ class="org.eclipse.linuxtools.rpm.ui.editor.preferences.RpmProposalsPreferencePage"
+ id="org.eclipse.linuxtools.rpm.ui.editor.preferences.RpmProposalsPreferencePage"
+ name="RPM Completions"/>
+ <page
+ category="org.eclipse.linuxtools.rpm.ui.editor.mainpage"
+ class="org.eclipse.linuxtools.rpm.ui.editor.preferences.MacroProposalsPreferencePage"
+ id="org.eclipse.linuxtools.rpm.ui.editor.preferences.MacroProposalsPreferencePage"
+ name="Macro Completion"/>
+ <page
+ category="org.eclipse.linuxtools.rpm.ui.editor.mainpage"
+ class="org.eclipse.linuxtools.rpm.ui.editor.preferences.SpecTemplatePreferencePage"
+ id="org.eclipse.linuxtools.rpm.ui.editor.preferences.SpecTemplatePreferencePage"
+ name="Templates"/>
+ <page
+ category="org.eclipse.linuxtools.rpm.ui.editor.preferences.RpmProposalsPreferencePage"
+ class="org.eclipse.linuxtools.rpm.ui.editor.preferences.RpmInformationsPreferencePage"
+ id="org.eclipse.linuxtools.rpm.ui.editor.preferences.RpmInformationsPreferencePage"
+ name="Package Information"/>
+ <page
+ category="org.eclipse.linuxtools.rpm.ui.editor.mainpage"
+ class="org.eclipse.linuxtools.rpm.ui.editor.preferences.TaskTagsPreferencePage"
+ id="org.eclipse.linuxtools.rpm.ui.editor.preferences.TaskTagsPreferencePage"
+ name="Task Tags"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer class="org.eclipse.linuxtools.rpm.ui.editor.preferences.PreferenceInitializer"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.editors.markerAnnotationSpecification">
+ <specification
+ annotationType="org.eclipse.linuxtools.rpm.ui.editor.highlightannotation"
+ verticalRulerPreferenceKey="highlight.rulers.vertical"
+ textPreferenceKey="highlight.text"
+ colorPreferenceKey="highlight.color"
+ highlightPreferenceKey="highlight.background"
+ textPreferenceValue="false"
+ textStylePreferenceValue="UNDERLINE"
+ overviewRulerPreferenceKey="highlight.rulers.overview"
+ presentationLayer="4"
+ highlightPreferenceValue="true"
+ label="Macro"
+ icon="icons/occurrence_obj.gif"
+ colorPreferenceValue="253,255,155"
+ verticalRulerPreferenceValue="true"
+ overviewRulerPreferenceValue="true"
+ textStylePreferenceKey="highlight.text.style">
+ </specification>
+ </extension>
+ <extension
+ point="org.eclipse.ui.newWizards">
+ <category
+ id="org.eclipse.linuxtools.rpm.ui.editor"
+ name="RPM Wizards">
+ </category>
+ <wizard
+ category="org.eclipse.linuxtools.rpm.ui.editor"
+ class="org.eclipse.linuxtools.rpm.ui.editor.wizards.SpecfileNewWizard"
+ icon="icons/rpm.gif"
+ id="org.eclipse.linuxtools.rpm.ui.editor.wizards.SpecfileNewWizard"
+ name="New specfile based on a template">
+ </wizard>
+ </extension>
+ <!-- Commands -->
+ <extension
+ point="org.eclipse.ui.commands">
+ <category
+ name="Editor Commands"
+ description="Specfile Editor Commands"
+ id="rpmEditor.category"/>
+ <command
+ categoryId="rpmEditor.category"
+ name="Toggle Comment"
+ id="rpmEditor.toggleComment.command"/>
+ <command
+ categoryId="rpmEditor.category"
+ name="Organize patches"
+ id="rpmEditor.organizePatches.command"/>
+ <command
+ categoryId="rpmEditor.category"
+ id="rpmEditor.showOutline.command"
+ name="Show outline"/>
+ </extension>
+ <!-- Key bindings -->
+ <extension
+ point="org.eclipse.ui.bindings">
+ <key
+ sequence="Ctrl+Shift+C"
+ commandId="rpmEditor.toggleComment.command"
+ contextId="org.eclipse.ui.textEditorScope"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
+ <key
+ sequence="Ctrl+Shift+O"
+ commandId="rpmEditor.organizePatches.command"
+ contextId="org.eclipse.linuxtools.rpm.ui.specEditorScope"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
+ <key
+ sequence="Ctrl+O"
+ commandId="rpmEditor.showOutline.command"
+ contextId="org.eclipse.linuxtools.rpm.ui.specEditorScope"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
+ </extension>
+ <!-- Action set for command bindings -->
+ <extension
+ point="org.eclipse.ui.actionSets">
+
+ <actionSet
+ label="Editor Commands"
+ description="Specfile Editor Commands"
+ visible="true"
+ id="rpmEditor.actionSet">
+
+ <action
+ label="Toggle Comments"
+ class="org.eclipse.linuxtools.rpm.ui.editor.actions.SpecfileEditorToggleCommentActionDelegate"
+ definitionId="rpmEditor.toggleComment.command"
+ id="rpmEditor.toggleComment.command"/>
+ <action
+ label="Organize patches"
+ class="org.eclipse.linuxtools.rpm.ui.editor.actions.SpecfileEditorOrganizePatchesActionDelegate"
+ definitionId="rpmEditor.organizePatches.command"
+ id="rpmEditor.organizePatches.command"/>
+ <action
+ label="Show outline"
+ class="org.eclipse.linuxtools.rpm.ui.editor.actions.SpecfileEditorShowOutlineActionDelegate"
+ definitionId="rpmEditor.showOutline.command"
+ id="rpmEditor.showOutline.command"/>
+ </actionSet>
+ </extension>
+ <!-- Editor menu actions -->
+ <extension
+ id="org.eclipse.linuxtools.rpm.ui.editor.popupMenu"
+ point="org.eclipse.ui.popupMenus">
+ <viewerContribution
+ id="org.eclipse.linuxtools.rpm.ui.editor.viewerContribution"
+ targetID="#TextEditorContext">
+ <action
+ class="org.eclipse.linuxtools.rpm.ui.editor.actions.SpecfileEditorOrganizePatchesActionDelegate"
+ id="org.eclipse.linuxtools.rpm.ui.editor.organizePatchesAction"
+ label="Organize patches"
+ menubarPath="additions"
+ tooltip="Organize patches numerically"
+ definitionId="rpmEditor.organizePatches.command">
+ </action>
+ <action
+ class="org.eclipse.linuxtools.rpm.ui.editor.actions.SpecfileEditorToggleCommentActionDelegate"
+ id="org.eclipse.linuxtools.rpm.ui.editor.toggleCommentAction"
+ label="Toggle Comments"
+ menubarPath="additions"
+ tooltip="Add or Remove Comments"
+ definitionId="rpmEditor.toggleComment.command">
+ </action>
+ <action
+ class="org.eclipse.linuxtools.rpm.ui.editor.actions.SpecfileEditorShowOutlineActionDelegate"
+ id="org.eclipse.linuxtools.rpm.ui.editor.showOutlineAction"
+ label="Show Outline"
+ menubarPath="additions"
+ tooltip="Show Outline"
+ definitionId="rpmEditor.showOutline.command">
+ </action>
+ </viewerContribution>
+ </extension>
+ <!-- Compare support-->
+ <extension point="org.eclipse.compare.contentMergeViewers">
+ <viewer
+ id="org.eclipse.linuxtools.rpm.ui.editor.SpecMergeViewer"
+ extensions="spec"
+ class="org.eclipse.linuxtools.rpm.ui.editor.compare.SpecMergeViewerCreator">
+ </viewer>
+ </extension>
+ <extension point="org.eclipse.compare.structureMergeViewers">
+ <viewer
+ id="org.eclipse.linuxtools.rpm.ui.editor.SpecStructureMergeViewer"
+ extensions="spec"
+ class="org.eclipse.linuxtools.rpm.ui.editor.compare.SpecStructureMergeViewerCreator">
+ </viewer>
+ </extension>
+ <extension point ="org.eclipse.compare.structureCreators">
+ <structureCreator id="org.eclipse.linuxtools.rpm.ui.editor.SpecStructureCreator"
+ class="org.eclipse.linuxtools.rpm.ui.editor.compare.SpecStructureCreator" extensions="spec"/>
+ </extension>
+</plugin>
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/Activator.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/Activator.java
new file mode 100644
index 0000000000..1eae01345e
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/Activator.java
@@ -0,0 +1,216 @@
+/*******************************************************************************
+ * 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
+ * Alphonse Van Assche
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui.editor;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.io.LineNumberReader;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.jface.text.templates.ContextTypeRegistry;
+import org.eclipse.jface.text.templates.persistence.TemplateStore;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry;
+import org.eclipse.ui.editors.text.templates.ContributionTemplateStore;
+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 plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.rpm.ui.editor"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ private ContributionTemplateStore fTemplateStore;
+ private ContributionContextTypeRegistry fContextTypeRegistry;
+
+ // RPM macros list
+ private RpmMacroProposalsList macrosList ;
+
+ // RPM Groups
+ private List<String> rpmGroups = new ArrayList<String>() ;;
+
+ // RPM package list
+ public static RpmPackageProposalsList packagesList ;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ RpmPackageBuildProposalsJob.setPropertyChangeListener(true);
+ RpmPackageBuildProposalsJob.update();
+ // Do some sanity checks.
+ Utils.pluginSanityCheck();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ RpmPackageBuildProposalsJob.setPropertyChangeListener(false);
+ 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);
+ }
+
+ public TemplateStore getTemplateStore() {
+ if (fTemplateStore == null) {
+ fTemplateStore= new ContributionTemplateStore(getContextTypeRegistry(), getPreferenceStore(), "templates"); //$NON-NLS-1$
+ try {
+ fTemplateStore.load();
+ } catch (IOException e) {
+ SpecfileLog.logError(e);
+ }
+ }
+
+ return fTemplateStore;
+ }
+
+ public RpmMacroProposalsList getRpmMacroList() {
+ macrosList = new RpmMacroProposalsList();
+ return macrosList;
+ }
+
+
+ public RpmPackageProposalsList getRpmPackageList() {
+ if (packagesList == null){
+ packagesList = new RpmPackageProposalsList();
+ } else if (packagesList.getProposals("").size() == 0) { //$NON-NLS-1$
+ packagesList = new RpmPackageProposalsList();
+ }
+ return packagesList;
+ }
+
+ public List<String> getRpmGroups() {
+ if (rpmGroups.isEmpty()) {
+ // FIXME: Can we assume that all distros place
+ // documentations files in the below path?
+ String docDir = "/usr/share/doc/"; //$NON-NLS-1$
+ File dir = new File(docDir);
+ if (dir.exists()) {
+ File files[] = dir.listFiles(new FilenameFilter() {
+ public boolean accept(File dir, String name) {
+ return name.startsWith("rpm-"); //$NON-NLS-1$
+ }
+ });
+ try {
+ // We can not be sure that there is only one directory here
+ // starting with rpm-
+ // (e.g. rpm-apidocs is the wrong directory.)
+ for (File file : files) {
+ File groupsFile = new File(file, "GROUPS"); //$NON-NLS-1$
+ if (groupsFile.exists()) {
+
+ LineNumberReader reader = new LineNumberReader(
+ new FileReader(groupsFile));
+ String line;
+ while ((line = reader.readLine()) != null) {
+ rpmGroups.add(line);
+ }
+ break;
+ }
+ }
+ } catch (IOException e) {
+ SpecfileLog.logError(e);
+ }
+ }
+ }
+ return rpmGroups;
+ }
+
+ public ContextTypeRegistry getContextTypeRegistry() {
+ if (fContextTypeRegistry == null) {
+ fContextTypeRegistry = new ContributionContextTypeRegistry();
+ fContextTypeRegistry.addContextType("org.eclipse.linuxtools.rpm.ui.editor.preambleSection"); //$NON-NLS-1$
+ fContextTypeRegistry.addContextType("org.eclipse.linuxtools.rpm.ui.editor.preSection"); //$NON-NLS-1$
+ fContextTypeRegistry.addContextType("org.eclipse.linuxtools.rpm.ui.editor.buildSection"); //$NON-NLS-1$
+ fContextTypeRegistry.addContextType("org.eclipse.linuxtools.rpm.ui.editor.installSection"); //$NON-NLS-1$
+ fContextTypeRegistry.addContextType("org.eclipse.linuxtools.rpm.ui.editor.changelogSection"); //$NON-NLS-1$
+ }
+ return fContextTypeRegistry;
+ }
+
+ /**
+ * Get a <code>Image</code> object for the given relative path.
+ *
+ * @param imageRelativePath The relative path to the image.
+ * @return
+ * a <code>Image</code>
+ */
+ public Image getImage(String imageRelativePath) {
+ ImageRegistry registry = getImageRegistry();
+ Image image = registry.get(imageRelativePath);
+ if (image == null) {
+ ImageDescriptor desc = getImageDescriptor(imageRelativePath);
+ registry.put(imageRelativePath, desc);
+ image = registry.get(imageRelativePath);
+ }
+ return image;
+ }
+
+ public static IEditorPart getActiveEditor() {
+ IWorkbenchWindow window = getDefault().getWorkbench().getActiveWorkbenchWindow();
+ if (window != null) {
+ IWorkbenchPage page = window.getActivePage();
+ if (page != null) {
+ return page.getActiveEditor();
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/ColorManager.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/ColorManager.java
new file mode 100644
index 0000000000..3e5095065c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/ColorManager.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * 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;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Display;
+
+public class ColorManager {
+
+ protected Map<RGB, Color> fColorTable = new HashMap<RGB, Color>(10);
+
+ public void dispose() {
+ for (Map.Entry<RGB, Color> entry:fColorTable.entrySet()){
+ entry.getValue().dispose();
+ }
+ }
+ public Color getColor(RGB rgb) {
+ Color color = fColorTable.get(rgb);
+ if (color == null) {
+ color = new Color(Display.getCurrent(), rgb);
+ fColorTable.put(rgb, color);
+ }
+ return color;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/ISpecfileColorConstants.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/ISpecfileColorConstants.java
new file mode 100644
index 0000000000..beaaf2c5cb
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/ISpecfileColorConstants.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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;
+
+import org.eclipse.swt.graphics.RGB;
+
+public interface ISpecfileColorConstants {
+ // general constants
+ RGB DEFAULT = new RGB(0, 0, 0);
+ RGB SECTIONS = new RGB(128, 0, 0);
+ RGB MACROS = new RGB(0, 0, 128);
+ RGB KEYWORDS = new RGB(127, 0, 85);
+ RGB DEFINES = new RGB(0, 128, 0);
+ RGB TAGS = new RGB(255, 101, 52);
+ RGB COMMENT = new RGB(63, 95, 191);
+ RGB PACKAGES = new RGB(0, 0, 128);
+
+ // changelog section specific constants
+ RGB AUTHOR_MAIL = new RGB(10, 20, 175);
+ RGB VER_REL = new RGB(255, 101, 52);
+
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/ISpecfileSpecialSymbols.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/ISpecfileSpecialSymbols.java
new file mode 100644
index 0000000000..8d6a1e6ae5
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/ISpecfileSpecialSymbols.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;
+
+/**
+ * Constants for all the special symbols in spec file.
+ *
+ */
+public interface ISpecfileSpecialSymbols {
+ /**
+ * Identifier for macro start - long one.
+ */
+ String MACRO_START_LONG = "%{"; //$NON-NLS-1$
+ /**
+ * Identifier for macro end - long one.
+ */
+ String MACRO_END_LONG = "}"; //$NON-NLS-1$
+
+ /**
+ * Identifier for macro start - short one.
+ */
+ String MACRO_START_SHORT = "%"; //$NON-NLS-1$
+ /**
+ * Identifier for comment start. Comment is from this symbol till the line
+ * end.
+ */
+ String COMMENT_START = "#"; //$NON-NLS-1$
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/Messages.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/Messages.java
new file mode 100644
index 0000000000..3deb5eee85
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/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.ui.editor;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.rpm.ui.editor.messages"; //$NON-NLS-1$
+ public static String RpmMacroProposalsList_0;
+ public static String RpmPackageBuildProposalsJob_0;
+ public static String RpmPackageBuildProposalsJob_1;
+ public static String RpmPackageBuildProposalsJob_2;
+ public static String RpmPackageBuildProposalsJob_3;
+ public static String RpmPackageProposalsList_0;
+ public static String RpmPackageProposalsList_1;
+ public static String RpmPackageProposalsList_2;
+ public static String RpmPackageProposalsList_3;
+ public static String SpecfileConfiguration_0;
+ public static String SpecfileEditor_0;
+ public static String SpecfileEditor_1;
+ public static String SpecfileEditor_2;
+ public static String SpecfileLog_0;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/NonRuleBasedDamagerRepairer.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/NonRuleBasedDamagerRepairer.java
index 2940a6a906..fae9e80ed6 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/NonRuleBasedDamagerRepairer.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/NonRuleBasedDamagerRepairer.java
@@ -1,20 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
+ * 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ * Red Hat - initial API and implementation
*******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.editor;
-
-import org.eclipse.swt.custom.StyleRange;
+package org.eclipse.linuxtools.rpm.ui.editor;
import org.eclipse.core.runtime.Assert;
-
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.DocumentEvent;
import org.eclipse.jface.text.IDocument;
@@ -25,6 +21,7 @@ import org.eclipse.jface.text.TextAttribute;
import org.eclipse.jface.text.TextPresentation;
import org.eclipse.jface.text.presentation.IPresentationDamager;
import org.eclipse.jface.text.presentation.IPresentationRepairer;
+import org.eclipse.swt.custom.StyleRange;
public class NonRuleBasedDamagerRepairer
implements IPresentationDamager, IPresentationRepairer {
@@ -36,7 +33,6 @@ public class NonRuleBasedDamagerRepairer
/**
* Constructor for NonRuleBasedDamagerRepairer.
- * @param defaultTextAttribute
*/
public NonRuleBasedDamagerRepairer(TextAttribute defaultTextAttribute) {
Assert.isNotNull(defaultTextAttribute);
@@ -60,6 +56,7 @@ public class NonRuleBasedDamagerRepairer
* @exception BadLocationException if offset is invalid in the current document
*/
protected int endOfLineOf(int offset) throws BadLocationException {
+
IRegion info = fDocument.getLineInformationOfOffset(offset);
if (offset <= info.getOffset() + info.getLength())
return info.getOffset() + info.getLength();
@@ -76,13 +73,20 @@ public class NonRuleBasedDamagerRepairer
/**
* @see IPresentationDamager#getDamageRegion(ITypedRegion, DocumentEvent, boolean)
*/
- public IRegion getDamageRegion(ITypedRegion partition, DocumentEvent event, boolean documentPartitioningChanged) {
+ public IRegion getDamageRegion(
+ ITypedRegion partition,
+ DocumentEvent event,
+ boolean documentPartitioningChanged) {
if (!documentPartitioningChanged) {
try {
- IRegion info = fDocument.getLineInformationOfOffset(event.getOffset());
+
+ IRegion info =
+ fDocument.getLineInformationOfOffset(event.getOffset());
int start = Math.max(partition.getOffset(), info.getOffset());
- int end = event.getOffset() + (event.getText() == null
+ int end =
+ event.getOffset()
+ + (event.getText() == null
? event.getLength()
: event.getText().length());
@@ -93,23 +97,25 @@ public class NonRuleBasedDamagerRepairer
} else
end = endOfLineOf(end);
- end = Math.min(partition.getOffset() + partition.getLength(), end);
-
-
+ end =
+ Math.min(
+ partition.getOffset() + partition.getLength(),
+ end);
return new Region(start, end - start);
+
} catch (BadLocationException x) {
-
}
}
-
return partition;
}
/**
* @see IPresentationRepairer#createPresentation(TextPresentation, ITypedRegion)
*/
- public void createPresentation(TextPresentation presentation, ITypedRegion region) {
+ public void createPresentation(
+ TextPresentation presentation,
+ ITypedRegion region) {
addRange(
presentation,
region.getOffset(),
@@ -125,7 +131,11 @@ public class NonRuleBasedDamagerRepairer
* @param length the length of the range to be styled
* @param attr the attribute describing the style of the range to be styled
*/
- protected void addRange(TextPresentation presentation, int offset, int length, TextAttribute attr) {
+ protected void addRange(
+ TextPresentation presentation,
+ int offset,
+ int length,
+ TextAttribute attr) {
if (attr != null)
presentation.addStyleRange(
new StyleRange(
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroOccurrencesUpdater.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroOccurrencesUpdater.java
new file mode 100644
index 0000000000..2d039c1f96
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroOccurrencesUpdater.java
@@ -0,0 +1,239 @@
+/*******************************************************************************
+ * 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;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.viewers.IPostSelectionProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileDefine;
+
+class RpmMacroOccurrencesUpdater implements ISelectionChangedListener {
+
+ private static final String ANNOTATION_TYPE = Activator.PLUGIN_ID + ".highlightannotation"; //$NON-NLS-1$
+
+ private final SpecfileEditor fEditor;
+
+ private final List<Annotation> fOldAnnotations = new LinkedList<Annotation>();
+
+ /**
+ * Creates a new instance on editor <code>specfileEditor</code>.
+ *
+ * @param specfileEditor The editor to mark occurrences on.
+ */
+ public RpmMacroOccurrencesUpdater(SpecfileEditor specfileEditor) {
+ ((IPostSelectionProvider) specfileEditor.getSelectionProvider())
+ .addPostSelectionChangedListener(this);
+ fEditor = specfileEditor;
+ }
+
+ /*
+ * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
+ */
+ public void selectionChanged(SelectionChangedEvent event) {
+ update((ISourceViewer) event.getSource());
+ }
+
+ /**
+ * Updates the drawn annotations.
+ *
+ * @param viewer The viewer to get the document and annotation model from
+ */
+ public void update(ISourceViewer viewer) {
+ try {
+ IDocument document = viewer.getDocument();
+ IAnnotationModel model = viewer.getAnnotationModel();
+ if (document == null || model == null) {
+ return;
+ }
+ removeOldAnnotations(model);
+ String currentSelectedWord = getWordAtSelection(fEditor.getSelectionProvider()
+ .getSelection(), document);
+ if (isMacro(currentSelectedWord)) {
+ Specfile spec = fEditor.getSpecfile();
+ SpecfileDefine define = spec.getDefine(currentSelectedWord);
+ String word = currentSelectedWord + ": "; //$NON-NLS-1$
+ if (define != null) {
+ word += define.getStringValue();
+ } else {
+ // If there's no such define we try to see if it corresponds to
+ // a Source or Patch declaration
+ String retrivedValue = SpecfileHover.getSourceOrPatchValue(spec, currentSelectedWord.toLowerCase());
+ if (retrivedValue != null)
+ word += retrivedValue;
+ else {
+ // If it does not correspond to a Patch or Source macro, try to find it
+ // in the macro proposals list.
+ retrivedValue = SpecfileHover.getMacroValueFromMacroList(currentSelectedWord);
+ if (retrivedValue != null)
+ word += retrivedValue;
+ }
+ }
+ createNewAnnotations(currentSelectedWord, word, document, model);
+ }
+ } catch (BadLocationException e) {
+ SpecfileLog.logError(e);
+ }
+ }
+
+ /**
+ * Removes the previous set of annotations from the annotation model.
+ *
+ * @param model
+ * the annotation model
+ */
+ private void removeOldAnnotations(IAnnotationModel model) {
+ for (Annotation annotation: fOldAnnotations) {
+ model.removeAnnotation(annotation);
+ }
+ fOldAnnotations.clear();
+ }
+
+ /**
+ * Checks if <code>word</code> is an macro.
+ *
+ * @param word
+ * the word to check
+ *
+ * @return <code>true</code> if <code>word</code> is an macro,
+ * <code>false</code> otherwise
+ */
+ private boolean isMacro(String word) {
+ List<SpecfileDefine> defines = getMacros();
+ if (word.length() > 0) {
+ for (SpecfileDefine define: defines) {
+ if (containsWord(define, word)) {
+ return true;
+ }
+ }
+ if (Activator.getDefault().getRpmMacroList().getProposals(
+ "%" + word).size() > 0) //$NON-NLS-1$
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Retrieves the macros from the editor's specfile.
+ *
+ * @return the macros from the editor's specfile
+ */
+ private List<SpecfileDefine> getMacros() {
+ Specfile specfile = fEditor.getSpecfile();
+ if (specfile != null) {
+ List<SpecfileDefine> macros = specfile.getDefines();
+ if (macros != null)
+ return macros;
+ }
+ return new ArrayList<SpecfileDefine>();
+ }
+
+ /**
+ * Returns <code>true</code> if <code>macro</code> equals the word
+ * <code>current</code>.
+ *
+ * @param macro
+ * the <code>macro</code> to check
+ * @param current
+ * the word to look for
+ *
+ * @return <code>true</code> if <code>macro</code> contains the word
+ * <code>current</code>,<code>false</code> if not
+ */
+ private boolean containsWord(SpecfileDefine macro, String current) {
+ return macro.getName().toLowerCase().equals(current);
+ }
+
+ /**
+ * Returns the word at the current selection / caret position.
+ *
+ * @param selection
+ * the selection
+ * @param document
+ * the document
+ * @return the currently selected text, or the word at the caret if the
+ * selection has length 0
+ * @throws BadLocationException
+ * if accessing the document fails
+ */
+ private String getWordAtSelection(ISelection selection, IDocument document)
+ throws BadLocationException {
+ String word;
+ if (selection instanceof ITextSelection) {
+ ITextSelection ts = (ITextSelection) selection;
+ int offset = ts.getOffset();
+ int end = offset + ts.getLength();
+
+ // non-empty selections
+ if (end != offset) {
+ word = ts.getText();
+ } else {
+ while (offset > 0 && isDefineChar(document.getChar(offset - 1)))
+ offset--;
+ while (end < document.getLength()
+ && isDefineChar(document.getChar(end)))
+ end++;
+
+ word = document.get(offset, end - offset);
+ }
+ } else {
+ word = ""; //$NON-NLS-1$
+ }
+ return word.toLowerCase();
+ }
+
+ private boolean isDefineChar(char c) {
+ return c != '{' && c != '}' && c != '?' && !Character.isWhitespace(c);
+ }
+
+ /**
+ * Adds an annotation for every occurrence of <code>macro</code> in the
+ * document. Also stores the created annotations in
+ * <code>fOldAnnotations</code>.
+ *
+ * @param macro
+ * the word to look for
+ * @param document
+ * the document
+ * @param model
+ * the annotation model
+ */
+ private void createNewAnnotations(String macro, String hoverContent, IDocument document,
+ IAnnotationModel model) {
+ String content = document.get().toLowerCase();
+ int idx = content.indexOf(macro.toLowerCase());
+ while (idx != -1) {
+ Annotation annotation = new Annotation(ANNOTATION_TYPE, false,
+ hoverContent);
+ Position position = new Position(idx, macro.length());
+ model.addAnnotation(annotation, position);
+ fOldAnnotations.add(annotation);
+ idx = content.indexOf(macro, idx + 1);
+ }
+ }
+
+ public void dispose() {
+ ((IPostSelectionProvider) fEditor.getSelectionProvider())
+ .removePostSelectionChangedListener(this);
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroProposalsList.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroProposalsList.java
new file mode 100644
index 0000000000..7a63eeca21
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmMacroProposalsList.java
@@ -0,0 +1,227 @@
+/*******************************************************************************
+ * 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;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.eclipse.linuxtools.rpm.ui.editor.preferences.PreferenceConstants;
+import org.eclipse.linuxtools.rpm.ui.editor.scanners.SpecfileScanner;
+
+/**
+ * This class is used to retrieve and manage the RPM macro
+ * proposals list.
+ *
+ */
+public class RpmMacroProposalsList {
+
+ private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+
+ private Map<String, String> macroMap = new HashMap<String, String>();
+
+ private String toStringStr;
+
+ /**
+ * Default contructor
+ */
+ public RpmMacroProposalsList() {
+ buildMacroList();
+ }
+
+ /**
+ * Build the macro list.
+ */
+ public void buildMacroList() {
+ for (String definedMacro: SpecfileScanner.DEFINED_MACROS){
+ macroMap.put(definedMacro, Messages.RpmMacroProposalsList_0);
+ //TODO find way to provide info about buildin macros.
+ }
+ String macroProposalsPaths = Activator.getDefault()
+ .getPreferenceStore().getString(
+ PreferenceConstants.P_MACRO_PROPOSALS_FILESPATH);
+ String[] paths = macroProposalsPaths.split(";"); //$NON-NLS-1$
+ // paths must be reversed because the last value added
+ // into a Map overwrites the first.
+ paths = reverseStringArray(paths);
+ for (String path : paths) {
+ if (!path.equals(EMPTY_STRING)) {
+ File pathFile = new File(path);
+ if (pathFile.exists()) {
+ if (pathFile.isDirectory()) {
+ File[] macrosFiles = pathFile.listFiles();
+ for (File macrosFile : macrosFiles) {
+ addMacroToMap(macrosFile.getAbsolutePath());
+ }
+ } else {
+ addMacroToMap(path);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Add macro definition to the map
+ *
+ * @param filename
+ * macro file definition.
+ */
+ private void addMacroToMap(String filename) {
+ String line = EMPTY_STRING;
+ try {
+ BufferedReader reader = new BufferedReader(new InputStreamReader(
+ new FileInputStream(filename)));
+ line = reader.readLine();
+ String key = EMPTY_STRING, value = EMPTY_STRING;
+ while (line != null) {
+ if (line.startsWith("%")) { //$NON-NLS-1$
+ String[] item = line.split("\t+| ", 2); //$NON-NLS-1$
+ try {
+ // Get values on more than one line
+ if (line.trim().endsWith("\\")) { //$NON-NLS-1$
+ value = "\n"; //$NON-NLS-1$
+ boolean isKeyLine = true;
+ while (line.trim().endsWith("\\")) { //$NON-NLS-1$
+ if (isKeyLine) {
+ isKeyLine = false;
+ key = item[0];
+ if (item.length > 1)
+ value += item[1].replaceAll("\\", "\n\n"); //$NON-NLS-1$//$NON-NLS-2$
+ } else {
+ value += line.substring(0,
+ line.length() - 1).trim()
+ + "\n\t"; //$NON-NLS-1$
+ }
+ line = reader.readLine();
+ }
+ } else {
+ key = item[0];
+ value = item[1];
+ }
+ key = key.trim();
+ value = value.trim();
+ macroMap.put(key, value);
+ toStringStr += key + ": " + value + "\n"; //$NON-NLS-1$ //$NON-NLS-2$
+ } catch (Exception e) {
+ line = reader.readLine();
+ continue;
+ }
+ value = EMPTY_STRING;
+ key = EMPTY_STRING;
+ }
+ line = reader.readLine();
+ }
+ } catch (IOException e) {
+ SpecfileLog.logError(e);
+ }
+ }
+
+ /**
+ * Reverse a <code>String</code> array.
+ *
+ * @param stringArrayToReverse
+ * the string array to reverse.
+ * @return the reversed <code>String</code> array.
+ */
+ private String[] reverseStringArray(String[] stringArrayToReverse) {
+ int left = 0;
+ int right = stringArrayToReverse.length - 1;
+ while (left < right) {
+ String tmp = stringArrayToReverse[left];
+ stringArrayToReverse[left] = stringArrayToReverse[right];
+ stringArrayToReverse[right] = tmp;
+ left++;
+ right--;
+ }
+ return stringArrayToReverse;
+ }
+
+ /**
+ * Get proposals for a given prefix
+ *
+ * @param prefix The prefix to search.
+ * @return a <code>Map</code> of proposals.
+ */
+ public Map<String, String> getProposals(String prefix) {
+ Map<String, String> proposalsMap = new HashMap<String, String>(macroMap.size());
+ int i = 0;
+ for (Map.Entry<String, String> entry: macroMap.entrySet()) {
+ // Get proposals for macro begin with { char too.
+ if (entry.getKey().startsWith(prefix.replaceFirst("\\{", EMPTY_STRING))) { //$NON-NLS-1$
+ proposalsMap.put(entry.getKey(), entry.getValue());
+ }
+ i++;
+ }
+ // Sort proposals
+ Map<String, String> sortedMap = new TreeMap<String, String>(proposalsMap);
+ return sortedMap;
+ }
+
+ /**
+ * Get the value for a given macro.
+ *
+ * @param key Key to retrieve value.
+ * @return a string representation of the value
+ */
+ public String getValue(String key) {
+ String value = macroMap.get("%" + key); //$NON-NLS-1$
+ // get proposals for macro contain ? too.
+ if (value == null) {
+ value = macroMap.get(("%" + key).replaceFirst("\\?", EMPTY_STRING)); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ return value;
+ }
+
+ /**
+ * Find a key in the macroMap
+ *
+ * @param keyToFind The key to find.
+ * @return return the value
+ */
+ public boolean findKey(String keyToFind) {
+ return macroMap.containsKey(keyToFind);
+ }
+
+ /**
+ * Return the ouput of the <code>rpm --eval</code> command for a given
+ * macro.
+ *
+ * @param macroName The macro name to eval.
+ * @return the resolved macro content.
+ */
+ public static String getMacroEval(String macroName) {
+ String eval = EMPTY_STRING;
+ try {
+ eval = Utils.runCommandToString( "rpm", "--eval", macroName); //$NON-NLS-1$//$NON-NLS-2$
+ } catch (IOException e) {
+ SpecfileLog.logError(e);
+ }
+ return eval.trim();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return toStringStr;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageBuildProposalsJob.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageBuildProposalsJob.java
new file mode 100644
index 0000000000..b5aae592bc
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageBuildProposalsJob.java
@@ -0,0 +1,204 @@
+/*******************************************************************************
+ * 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;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.Date;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Preferences;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.linuxtools.rpm.ui.editor.preferences.PreferenceConstants;
+
+/**
+ * Job to initialize and update the RPM packages proposal list.
+ *
+ * FIXME: The job seems to be run twice on 3.3 (in the job progress view) but
+ * when break point are strategically placed, the job seems to run only once,
+ * these symptoms appear only when the job is trigged from Activator#start
+ * method.
+ *
+ */
+public class RpmPackageBuildProposalsJob extends Job {
+
+ private RpmPackageBuildProposalsJob(String name) {
+ super(name);
+ }
+
+ private static final String JOB_NAME = Messages.RpmPackageBuildProposalsJob_0;
+
+ private static RpmPackageBuildProposalsJob job = null;
+
+ private static final Preferences preferences = Activator.getDefault()
+ .getPluginPreferences();
+
+ protected static final Preferences.IPropertyChangeListener propertyListener = new Preferences.IPropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent event) {
+ if (event.getProperty() == PreferenceConstants.P_CURRENT_RPMTOOLS)
+ update();
+ }
+ };
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ return retrievePackageList(monitor);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.jobs.Job#shouldSchedule()
+ */
+ @Override
+ public boolean shouldSchedule() {
+ return equals(job);
+ }
+
+ /**
+ * Run the Job if it's needed according with the configuration set in the
+ * preference page.
+ */
+ protected static void update() {
+ boolean runJob = false;
+ // Today's date
+ Date today = new Date();
+ if (preferences
+ .getBoolean(PreferenceConstants.P_RPM_LIST_BACKGROUND_BUILD)) {
+ int period = preferences
+ .getInt(PreferenceConstants.P_RPM_LIST_BUILD_PERIOD);
+ // each time that the plugin is loaded.
+ if (period == 1) {
+ runJob = true;
+ } else {
+ long lastBuildTime = preferences
+ .getLong(PreferenceConstants.P_RPM_LIST_LAST_BUILD);
+ if (lastBuildTime == 0) {
+ runJob = true;
+ } else {
+ long interval = (today.getTime() - lastBuildTime)
+ / (1000 * 60 * 60 * 24);
+ // run the job once a week
+ if (period == 2 && interval >= 7)
+ runJob = true;
+ // run the job once a month
+ else if (period == 3 && interval >= 30)
+ runJob = true;
+ }
+ }
+ if (runJob) {
+ if (job == null) {
+ job = new RpmPackageBuildProposalsJob(JOB_NAME);
+ job.schedule();
+ preferences.setValue(
+ PreferenceConstants.P_RPM_LIST_LAST_BUILD, today
+ .getTime());
+ } else {
+ job.cancel();
+ job.schedule();
+ preferences.setValue(
+ PreferenceConstants.P_RPM_LIST_LAST_BUILD, today
+ .getTime());
+ }
+ }
+ } else {
+ if (job != null) {
+ job.cancel();
+ job = null;
+ }
+ }
+ }
+
+ /**
+ * Retrieve the package list
+ *
+ * @param monitor
+ * to update
+ * @return a <code>IStatus</code>
+ */
+ private IStatus retrievePackageList(IProgressMonitor monitor) {
+ String rpmListCmd = Activator.getDefault().getPreferenceStore()
+ .getString(PreferenceConstants.P_CURRENT_RPMTOOLS);
+ String rpmListFilepath = Activator.getDefault().getPreferenceStore()
+ .getString(PreferenceConstants.P_RPM_LIST_FILEPATH);
+ File bkupFile = new File(rpmListFilepath + ".bkup"); //$NON-NLS-1$
+ try {
+ monitor.beginTask(Messages.RpmPackageBuildProposalsJob_1,
+ IProgressMonitor.UNKNOWN);
+ InputStream in = Utils.runCommandToInputStream("/bin/sh", "-c", rpmListCmd); //$NON-NLS-1$ //$NON-NLS-2$
+ // backup pkg list file
+ File rpmListFile = new File(rpmListFilepath);
+ if (rpmListFile.exists())
+ Utils.copyFile(new File(rpmListFilepath), bkupFile);
+
+ BufferedWriter out = new BufferedWriter(new FileWriter(
+ rpmListFile, false));
+ BufferedReader reader = new BufferedReader(
+ new InputStreamReader(in));
+ monitor.subTask(Messages.RpmPackageBuildProposalsJob_2 + rpmListCmd
+ + Messages.RpmPackageBuildProposalsJob_3);
+ String line;
+ while ((line = reader.readLine()) != null) {
+ monitor.subTask(line);
+ out.write(line + "\n"); //$NON-NLS-1$
+ if (monitor.isCanceled()) {
+ in.close();
+ out.close();
+ // restore backup
+ if (rpmListFile.exists() && bkupFile.exists()) {
+ Utils.copyFile(bkupFile, rpmListFile);
+ bkupFile.delete();
+ }
+ Activator.packagesList = new RpmPackageProposalsList();
+ return Status.CANCEL_STATUS;
+ }
+ }
+ in.close();
+ out.close();
+ bkupFile.delete();
+ } catch (IOException e) {
+ SpecfileLog.logError(e);
+ return null;
+ } finally {
+ monitor.done();
+ }
+ // Update package list
+ Activator.packagesList = new RpmPackageProposalsList();
+ return Status.OK_STATUS;
+ }
+
+ /**
+ * Enable and disable the property change listener.
+ *
+ * @param activated
+ */
+ protected static void setPropertyChangeListener(boolean activated) {
+ if (activated) {
+ preferences.addPropertyChangeListener(propertyListener);
+ } else {
+ preferences.removePropertyChangeListener(propertyListener);
+ }
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageProposalsList.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageProposalsList.java
new file mode 100644
index 0000000000..63f7aab886
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmPackageProposalsList.java
@@ -0,0 +1,166 @@
+/*******************************************************************************
+ * 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;
+
+import java.io.BufferedReader;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+import java.nio.charset.CharacterCodingException;
+import java.nio.charset.Charset;
+import java.nio.charset.CharsetDecoder;
+import java.nio.charset.CharsetEncoder;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.linuxtools.rpm.ui.editor.preferences.PreferenceConstants;
+
+/**
+ * This class is used to retrieve and manage the RPM package proposals.
+ *
+ */
+public class RpmPackageProposalsList {
+ private HashSet<String> list = new HashSet<String>();
+
+ public RpmPackageProposalsList() {
+ setPackagesList();
+ }
+
+ private void setPackagesList() {
+ String rpmpkgsFile = Activator.getDefault().getPreferenceStore()
+ .getString(PreferenceConstants.P_RPM_LIST_FILEPATH);
+ try {
+ BufferedReader reader = new BufferedReader(new InputStreamReader(
+ new FileInputStream(rpmpkgsFile)));
+ String line = reader.readLine();
+ while (line != null) {
+ list.add(line.trim());
+ line = reader.readLine();
+ }
+ } catch (IOException e) {
+ RpmPackageBuildProposalsJob.update();
+ SpecfileLog.logError(e);
+ }
+ }
+
+ public List<String[]> getProposals(String prefix) {
+ int rpmpkgsMaxProposals = Activator.getDefault().getPreferenceStore()
+ .getInt(PreferenceConstants.P_RPM_LIST_MAX_PROPOSALS);
+ List<String[]> proposalsList = new ArrayList<String[]>(list.size());
+ int i = 0;
+ for (String listValue:list){
+ String item[] = new String[2];
+ item[0] = listValue;
+ String message = Messages.RpmPackageProposalsList_0
+ + rpmpkgsMaxProposals
+ + Messages.RpmPackageProposalsList_1;
+ item[1] = message;
+ if (item[0].startsWith(prefix)) {
+ proposalsList.add(item);
+ }
+ i++;
+ }
+ /*
+ * Show RPM informations only if the proposal list is less than the
+ * limit set in the RPM proposals preference page.
+ */
+ ;
+ if (proposalsList.size() < rpmpkgsMaxProposals) {
+ List<String[]> proposalsListWithInfo = new ArrayList<String[]>(proposalsList.size());
+ for (String[] proposals: proposalsList){
+ proposals[1] = getRpmInfo(proposals[0]);
+ proposalsListWithInfo.add(proposals);
+ }
+ return proposalsListWithInfo;
+ } else {
+ return proposalsList;
+ }
+ }
+
+ public String getValue(String key) {
+ for (String item :list){
+ if (item.equals(key.trim())) {
+ return getRpmInfo(item);
+ }
+ }
+ return null;
+
+ }
+
+ public String getRpmInfo(String pkgName) {
+ String ret = ""; //$NON-NLS-1$
+ try {
+ ret = Utils.runCommandToString("rpm", "-q", pkgName, "--qf", //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+ getformattedRpmInformations());
+ } catch (IOException e) {
+ SpecfileLog.logError(e);
+ return Messages.RpmPackageProposalsList_2
+ + Messages.RpmPackageProposalsList_3;
+ }
+ // Create encoder and decoder
+ CharsetDecoder decoder = Charset.forName(System.getProperty("file.encoding")).newDecoder(); //$NON-NLS-1$
+ /*
+ * TODO: Jcharset may be used to detect the inputstream encoding if it's required?
+ * http://jchardet.sourceforge.net
+ */
+ CharsetEncoder encoder = Charset.forName("ISO-8859-1").newEncoder(); //$NON-NLS-1$
+ try {
+ ByteBuffer bbuf = encoder.encode(CharBuffer.wrap(ret));
+ CharBuffer cbuf = decoder.decode(bbuf);
+ ret = cbuf.toString();
+ } catch (CharacterCodingException e) {
+ // If an error occurs when re-encoding the output, the original
+ // output is returned.
+ }
+ return ret;
+ }
+
+ private String getformattedRpmInformations() {
+ String formatedInfoString = ""; //$NON-NLS-1$
+ IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+ if (store.getBoolean(PreferenceConstants.P_RPMINFO_NAME))
+ formatedInfoString += "<b>Name: </b>%{NAME}<br>"; //$NON-NLS-1$
+ if (store.getBoolean(PreferenceConstants.P_RPMINFO_VERSION))
+ formatedInfoString += "<b>Version: </b>%{VERSION}<br>"; //$NON-NLS-1$
+ if (store.getBoolean(PreferenceConstants.P_RPMINFO_RELEASE))
+ formatedInfoString += "<b>Release: </b>%{Release}<br>"; //$NON-NLS-1$
+ if (store.getBoolean(PreferenceConstants.P_RPMINFO_SUMMARY))
+ formatedInfoString += "<b>Summary: </b>%{SUMMARY}<br>"; //$NON-NLS-1$
+ if (store.getBoolean(PreferenceConstants.P_RPMINFO_LICENSE))
+ formatedInfoString += "<b>License: </b>%{LICENSE}<br>"; //$NON-NLS-1$
+ if (store.getBoolean(PreferenceConstants.P_RPMINFO_GROUP))
+ formatedInfoString += "<b>Group: </b>%{GROUP}<br>"; //$NON-NLS-1$
+ if (store.getBoolean(PreferenceConstants.P_RPMINFO_URL))
+ formatedInfoString += "<b>URL: </b>%{URL}<br>"; //$NON-NLS-1$
+ if (store.getBoolean(PreferenceConstants.P_RPMINFO_INSTALLTIME))
+ formatedInfoString += "<b>Installation Date: </b>%{INSTALLTIME:date}<br>"; //$NON-NLS-1$
+ if (store.getBoolean(PreferenceConstants.P_RPMINFO_DESCRIPTION))
+ formatedInfoString += "<b>Description: </b>%{DESCRIPTION}<br>"; //$NON-NLS-1$
+ if (store.getBoolean(PreferenceConstants.P_RPMINFO_PACKAGER))
+ formatedInfoString += "<b>Packager: </b>%{PACKAGER}<br>"; //$NON-NLS-1$
+ if (store.getBoolean(PreferenceConstants.P_RPMINFO_VENDOR))
+ formatedInfoString += "<b>Vendor: </b>%{VENDOR}<br>"; //$NON-NLS-1$
+ if (store.getBoolean(PreferenceConstants.P_RPMINFO_SIZE))
+ formatedInfoString += "<b>Size: </b>%{SIZE} bytes<br>"; //$NON-NLS-1$
+ if (store.getBoolean(PreferenceConstants.P_RPMINFO_BUILDTIME))
+ formatedInfoString += "<b>Build Date: </b>%{BUILDTIME:date}<br>"; //$NON-NLS-1$
+ if (store.getBoolean(PreferenceConstants.P_RPMINFO_SOURCERPM))
+ formatedInfoString += "<b>SRPM: </b>%{SOURCERPM}<br>"; //$NON-NLS-1$
+ return formatedInfoString;
+
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmSections.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmSections.java
new file mode 100644
index 0000000000..b6e72a02a0
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmSections.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * 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.ui.editor;
+
+/**
+ * Definitions of all the rpm sections.
+ */
+public interface RpmSections {
+
+ String PREP_SECTION = "%prep"; //$NON-NLS-1$
+ String BUILD_SECTION = "%build"; //$NON-NLS-1$
+ String INSTALL_SECTION = "%install"; //$NON-NLS-1$
+ String PRETRANS_SECTION = "%pretrans"; //$NON-NLS-1$
+ String PRE_SECTION = "%pre"; //$NON-NLS-1$
+ String PREUN_SECTION = "%preun"; //$NON-NLS-1$
+ String POST_SECTION = "%post"; //$NON-NLS-1$
+ String POSTUN_SECTION = "%postun"; //$NON-NLS-1$
+ String POSTTRANS_SECTION = "%posttrans"; //$NON-NLS-1$
+ String CLEAN_SECTION = "%clean"; //$NON-NLS-1$
+ String FILES_SECTION = "%files"; //$NON-NLS-1$
+ String CHECK_SECTION = "%check"; //$NON-NLS-1$
+ String CHANGELOG_SECTION = "%changelog"; //$NON-NLS-1$
+ String PACKAGE_SECTION = "%package"; //$NON-NLS-1$
+ String DESCRIPTION_SECTION = "%description"; //$NON-NLS-1$
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmTags.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmTags.java
new file mode 100644
index 0000000000..50e4f094cd
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/RpmTags.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * 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;
+
+
+/**
+ * Definitions of all rpm tags.
+ *
+ */
+public interface RpmTags {
+ String SUMMARY = "Summary"; //$NON-NLS-1$
+ String NAME = "Name"; //$NON-NLS-1$
+ String VERSION = "Version"; //$NON-NLS-1$
+ String PACKAGER = "Packager"; //$NON-NLS-1$
+ String ICON = "Icon"; //$NON-NLS-1$
+ String URL = "URL"; //$NON-NLS-1$
+ String PREFIX = "Prefix"; //$NON-NLS-1$
+ String GROUP = "Group"; //$NON-NLS-1$
+ String LICENSE = "License"; //$NON-NLS-1$
+ String RELEASE = "Release"; //$NON-NLS-1$
+ String BUILD_ROOT = "BuildRoot"; //$NON-NLS-1$
+ String DISTRIBUTION = "Distribution"; //$NON-NLS-1$
+ String VENDOR = "Vendor"; //$NON-NLS-1$
+ String PROVIDES = "Provides"; //$NON-NLS-1$
+ String EXCLUSIVE_ARCH = "ExclusiveArch"; //$NON-NLS-1$
+ String EXCLUDE_ARCH = "ExcludeArch"; //$NON-NLS-1$
+ String EXCLUDE_OS = "ExclusiveOS"; //$NON-NLS-1$
+ String BUILD_ARCH = "BuildArch"; //$NON-NLS-1$
+ String BUILD_ARCHITECTURES = "BuildArchitectures"; //$NON-NLS-1$
+ String AUTO_REQUIRES = "AutoRequires"; //$NON-NLS-1$
+ String AUTO_REQ = "AutoReq"; //$NON-NLS-1$
+ String AUTO_REQ_PROV = "AutoReqProv"; //$NON-NLS-1$
+ String AUTO_PROV = "AutoProv"; //$NON-NLS-1$
+ String EPOCH = "Epoch"; //$NON-NLS-1$
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java
new file mode 100644
index 0000000000..d1e9259334
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileCompletionProcessor.java
@@ -0,0 +1,586 @@
+/*******************************************************************************
+ * 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;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.contentassist.CompletionProposal;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jface.text.contentassist.IContextInformationValidator;
+import org.eclipse.jface.text.templates.DocumentTemplateContext;
+import org.eclipse.jface.text.templates.Template;
+import org.eclipse.jface.text.templates.TemplateContext;
+import org.eclipse.jface.text.templates.TemplateContextType;
+import org.eclipse.jface.text.templates.TemplateException;
+import org.eclipse.jface.text.templates.TemplateProposal;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileDefine;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileSection;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileSource;
+import org.eclipse.linuxtools.rpm.ui.editor.scanners.SpecfilePartitionScanner;
+
+/**
+ * Content assist processor
+ *
+ * @author Alphonse Van Assche
+ *
+ */
+public class SpecfileCompletionProcessor implements IContentAssistProcessor {
+
+ private static final String SOURCE = "SOURCE"; //$NON-NLS-1$
+
+ private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+
+ /**
+ * <code>Comparator</code> implementation used to sort template proposals
+ * @author Van Assche Alphonse
+ */
+ private static final class ProposalComparator implements Comparator<TemplateProposal> {
+ public int compare(TemplateProposal t1, TemplateProposal t2) {
+ return (t2.getRelevance() - t1.getRelevance());
+ }
+ }
+
+ private static final String TEMPLATE_ICON = "icons/template_obj.gif"; //$NON-NLS-1$
+
+ private static final String MACRO_ICON = "icons/macro_obj.gif"; //$NON-NLS-1$
+
+ private static final String PATCH_ICON = "icons/macro_obj.gif"; //$NON-NLS-1$
+
+ private static final String PACKAGE_ICON = "icons/rpm.gif"; //$NON-NLS-1$
+
+ private static final String PREAMBLE_SECTION_TEMPLATE = "org.eclipse.linuxtools.rpm.ui.editor.preambleSection"; //$NON-NLS-1$
+
+ private static final String PRE_SECTION_TEMPLATE = "org.eclipse.linuxtools.rpm.ui.editor.preSection"; //$NON-NLS-1$
+
+ private static final String BUILD_SECTION_TEMPLATE = "org.eclipse.linuxtools.rpm.ui.editor.buildSection"; //$NON-NLS-1$
+
+ private static final String INSTALL_SECTION_TEMPLATE = "org.eclipse.linuxtools.rpm.ui.editor.installSection"; //$NON-NLS-1$
+
+ private static final String CHANGELOG_SECTION_TEMPLATE = "org.eclipse.linuxtools.rpm.ui.editor.changelogSection"; //$NON-NLS-1$
+
+ private final SpecfileEditor editor;
+
+ private static final Comparator<TemplateProposal> proposalComparator = new ProposalComparator();
+
+ /**
+ * Default constructor
+ */
+ public SpecfileCompletionProcessor(SpecfileEditor editor) {
+ this.editor = editor;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int)
+ */
+ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer,
+ int offset) {
+ List<ICompletionProposal> result = new ArrayList<ICompletionProposal>();
+ Specfile specfile = editor.getSpecfile();
+ if (specfile == null)
+ return null;
+ ITextSelection selection = (ITextSelection) viewer
+ .getSelectionProvider().getSelection();
+ // adjust offset to start of normalized selection
+ if (selection.getOffset() != offset)
+ offset = selection.getOffset();
+ String prefix = getPrefix(viewer, offset);
+ Region region = new Region(offset - prefix.length(), prefix.length()
+ + selection.getLength());
+ // RPM macro's are useful in the whole specfile.
+ List<ICompletionProposal> rpmMacroProposals = computeRpmMacroProposals(
+ region, specfile, prefix);
+ // Sources completion
+ List<ICompletionProposal> sourcesProposals = computeSourcesProposals(
+ region, specfile, prefix);
+ result.addAll(sourcesProposals);
+ // Get the current content type
+ String currentContentType = editor.getInputDocument().getDocumentPartitioner().getContentType(region.getOffset());
+ if (currentContentType.equals(SpecfilePartitionScanner.SPEC_PREP)){
+ List<ICompletionProposal> patchesProposals = computePatchesProposals(
+ region, specfile, prefix);
+ result.addAll(patchesProposals);
+ }
+
+ if (currentContentType.equals(SpecfilePartitionScanner.SPEC_PACKAGES)) {
+ // don't show template in the RPM packages content type.
+ // (when the line begin with Requires, BuildRequires etc...)
+ List<ICompletionProposal> rpmPackageProposals = computeRpmPackageProposals(
+ region, prefix);
+ result.addAll(rpmPackageProposals);
+ result.addAll(rpmMacroProposals);
+ } else {
+ // don't show RPM packages proposals in all others content type.
+ List<? extends ICompletionProposal> templateProposals = computeTemplateProposals(
+ viewer, region, specfile, prefix);
+ result.addAll(templateProposals);
+ result.addAll(rpmMacroProposals);
+ }
+ if (currentContentType.equals(SpecfilePartitionScanner.SPEC_GROUP)){
+ IDocument document = viewer.getDocument();
+ try {
+ int lineNumber = document.getLineOfOffset(region.getOffset());
+ int lineOffset = document.getLineOffset(lineNumber);
+ if (region.getOffset() - lineOffset > 5){
+ result.clear();
+ String groupPrefix = getGroupPrefix(viewer, offset);
+ result.addAll(computeRpmGroupProposals(region, groupPrefix));
+ }
+ } catch (BadLocationException e) {
+ SpecfileLog.logError(e);
+ }
+ }
+ return result
+ .toArray(new ICompletionProposal[result.size()]);
+ }
+
+ /**
+ * Compute the templates proposals, these proposals are contextual on sections.
+ * Return an array of template proposals for the given viewer, region, specfile, prefix.
+ *
+ * @param viewer
+ * the viewer for which the context is created
+ * @param region
+ * the region into <code>document</code> for which the context
+ * is created
+ * @param specfile
+ * the specfile element
+ * @param prefix
+ * the prefix string
+ * @return
+ * a ICompletionProposal[]
+ */
+ private List<? extends ICompletionProposal> computeTemplateProposals(ITextViewer viewer,
+ IRegion region, Specfile specfile, String prefix) {
+ TemplateContext context = createContext(viewer, region, specfile);
+ List<TemplateProposal> matches = new ArrayList<TemplateProposal>();
+ if (context == null) {
+ return matches;
+ }
+ ITextSelection selection = (ITextSelection) viewer
+ .getSelectionProvider().getSelection();
+ context.setVariable("selection", selection.getText()); //$NON-NLS-1$
+ String id = context.getContextType().getId();
+ Template[] templates = Activator.getDefault().getTemplateStore()
+ .getTemplates(id);
+ for (Template template : templates) {
+ try {
+ context.getContextType().validate(template.getPattern());
+ } catch (TemplateException e) {
+ continue;
+ }
+ int relevance = getRelevance(template, prefix);
+ if (relevance > 0) {
+ matches.add(new TemplateProposal(template, context, region,
+ Activator.getDefault().getImage(TEMPLATE_ICON), relevance));
+ }
+ }
+ Collections.sort(matches, proposalComparator);
+ return matches;
+ }
+
+ /**
+ * Compute RPM macro proposals, these proposals are usable in the whole document.
+ * Return an array of RPM macro proposals for the given viewer, region, prefix.
+ *
+ * @param viewer
+ * the viewer for which the context is created
+ * @param region
+ * the region into <code>document</code> for which the context
+ * is created
+ * @param prefix
+ * the prefix string to find
+ * @return
+ * a ICompletionProposal[]
+ */
+ private List<ICompletionProposal> computeRpmMacroProposals(IRegion region,
+ Specfile specfile, String prefix) {
+ Map<String, String> rpmMacroProposalsMap = Activator.getDefault().getRpmMacroList().getProposals(prefix);
+
+ // grab defines and put them into the proposals map
+ rpmMacroProposalsMap.putAll(getDefines(specfile, prefix));
+
+ ArrayList<ICompletionProposal> proposals = new ArrayList<ICompletionProposal>();
+ if (rpmMacroProposalsMap != null) {
+ for (Map.Entry<String, String> entry : rpmMacroProposalsMap
+ .entrySet()) {
+ proposals.add(new CompletionProposal(
+ ISpecfileSpecialSymbols.MACRO_START_LONG
+ + entry.getKey().substring(1)
+ + ISpecfileSpecialSymbols.MACRO_END_LONG,
+ region.getOffset(), region.getLength(), entry.getKey()
+ .length() + 2, Activator.getDefault().getImage(
+ MACRO_ICON), entry.getKey(), null, entry
+ .getValue()));
+ }
+ }
+ return proposals;
+ }
+
+ /**
+ * Compute patches proposals, these proposals are usable in the whole document.
+ * Return an array of patches proposals for the given viewer, region, prefix.
+ *
+ * @param viewer
+ * the viewer for which the context is created
+ * @param region
+ * the region into <code>document</code> for which the context
+ * is created
+ * @param prefix
+ * the prefix string to find
+ * @return
+ * a ICompletionProposal[]
+ */
+ private List<ICompletionProposal> computePatchesProposals(IRegion region,
+ Specfile specfile, String prefix) {
+ // grab patches and put them into the proposals map
+ Map<String, String> patchesProposalsMap = getPatches(specfile, prefix);
+ ArrayList<ICompletionProposal> proposals = new ArrayList<ICompletionProposal>();
+ if (patchesProposalsMap != null) {
+ for (Map.Entry<String, String> entry : patchesProposalsMap
+ .entrySet()) {
+ proposals.add(new CompletionProposal(entry.getKey(), region
+ .getOffset(), region.getLength(), entry.getKey()
+ .length(), Activator.getDefault().getImage(PATCH_ICON),
+ entry.getKey(), null, entry.getValue()));
+ }
+ }
+ return proposals;
+ }
+
+ /**
+ * Compute sources proposals, these proposals are usable in the whole document.
+ * Return an array of sources proposals for the given viewer, region, prefix.
+ *
+ * @param viewer
+ * the viewer for which the context is created
+ * @param region
+ * the region into <code>document</code> for which the context
+ * is created
+ * @param prefix
+ * the prefix string to find
+ * @return
+ * a ICompletionProposal[]
+ */
+ private List<ICompletionProposal> computeSourcesProposals(IRegion region,
+ Specfile specfile, String prefix) {
+ // grab patches and put them into the proposals map
+ Map<String, String> sourcesProposalsMap = getSources(specfile, prefix);
+ ArrayList<ICompletionProposal> proposals = new ArrayList<ICompletionProposal>();
+ if (sourcesProposalsMap != null) {
+ for (Map.Entry<String, String> entry : sourcesProposalsMap
+ .entrySet()) {
+ proposals.add(new CompletionProposal(entry.getKey(), region
+ .getOffset(), region.getLength(), entry.getKey()
+ .length(), Activator.getDefault().getImage(PATCH_ICON),
+ entry.getKey(), null, entry.getValue()));
+ }
+ }
+ return proposals;
+ }
+
+ /**
+ * Compute RPM package proposals, these proposals are usable only in the preambule section.
+ * Return an array of RPM macro proposals for the given viewer, region, specfile, prefix.
+ *
+ * @param viewer
+ * the viewer for which the context is created
+ * @param region
+ * the region into <code>document</code> for which the context
+ * is created
+ * @param prefix
+ * the prefix string
+ * @return
+ * a ICompletionProposal[]
+ */
+ private List<ICompletionProposal> computeRpmPackageProposals(IRegion region,
+ String prefix) {
+ List<String[]> rpmPkgProposalsList = Activator.getDefault().getRpmPackageList().getProposals(prefix);
+ ArrayList<ICompletionProposal> proposals = new ArrayList<ICompletionProposal>();
+ if (rpmPkgProposalsList != null) {
+ for (String[] item : rpmPkgProposalsList) {
+ proposals.add(new CompletionProposal(item[0], region
+ .getOffset(), region.getLength(), item[0].length(),
+ Activator.getDefault().getImage(PACKAGE_ICON), item[0],
+ null, item[1]));
+ }
+ }
+ return proposals;
+ }
+
+ private List<ICompletionProposal> computeRpmGroupProposals(IRegion region,
+ String prefix) {
+ List<String> rpmGroupProposalsList = Activator.getDefault()
+ .getRpmGroups();
+ ArrayList<ICompletionProposal> proposals = new ArrayList<ICompletionProposal>();
+ for (String item : rpmGroupProposalsList) {
+ if (item.startsWith(prefix)) {
+ proposals.add(new CompletionProposal(item, region.getOffset(),
+ region.getLength(), item.length(), Activator
+ .getDefault().getImage(PACKAGE_ICON), item,
+ null, item));
+ }
+ }
+ return proposals;
+ }
+
+ /**
+ * Create a template context for the givens Specfile, offset.
+ *
+ * @param specfile
+ * the sepcfile element
+ * @param offset
+ * the offset of the <code>documment</code>
+ * @return a TemplateContextType
+ */
+ private TemplateContextType getContextType(Specfile specfile, int offset) {
+ List<SpecfileSection> elements = specfile.getSections();
+ if (elements.size() == 0 || offset < elements.get(0).getLineEndPosition()) {
+ return Activator.getDefault().getContextTypeRegistry()
+ .getContextType(PREAMBLE_SECTION_TEMPLATE);
+ } else if (elements.size() == 1 || offset < elements.get(1).getLineEndPosition()) {
+ return Activator.getDefault().getContextTypeRegistry()
+ .getContextType(PRE_SECTION_TEMPLATE);
+ } else if (elements.size() == 2 || offset < elements.get(2).getLineEndPosition()) {
+ return Activator.getDefault().getContextTypeRegistry()
+ .getContextType(BUILD_SECTION_TEMPLATE);
+ } else if (elements.size() == 3 || offset < elements.get(3).getLineEndPosition()) {
+ return Activator.getDefault().getContextTypeRegistry()
+ .getContextType(INSTALL_SECTION_TEMPLATE);
+ } else {
+ return Activator.getDefault().getContextTypeRegistry()
+ .getContextType(CHANGELOG_SECTION_TEMPLATE);
+ }
+
+ }
+
+ /**
+ * Create a template context for the given Specfile and offset.
+ *
+ * @param viewer
+ * the viewer for which the context is created
+ * @param region
+ * the region into <code>document</code> for which the context
+ * is created
+ * @param specfile
+ * the specfile element
+ * @return a TemplateContextType
+ */
+ private TemplateContext createContext(ITextViewer viewer, IRegion region,
+ Specfile specfile) {
+ TemplateContextType contextType = getContextType(specfile, region
+ .getOffset());
+ if (contextType != null) {
+ IDocument document = viewer.getDocument();
+ return new DocumentTemplateContext(contextType, document, region
+ .getOffset(), region.getLength());
+ }
+ return null;
+ }
+
+ /**
+ * Get relevance on templates for the given template and prefix.
+ * @param template
+ * the <code>Template</code> to get relevance
+ * @param prefix
+ * the prefix <code>String</code> to check.
+ * @return
+ * a relevant code (90 if <code>true</code> and 0 if not)
+ */
+ private int getRelevance(Template template, String prefix) {
+ if (template.getName().startsWith(prefix))
+ return 90;
+ return 0;
+ }
+
+ /**
+ * Get the prefix for a given viewer, offset.
+ *
+ * @param viewer
+ * the viewer for which the context is created
+ * @param offset
+ * the offset into <code>document</code> for which the prefix
+ * is research
+ * @return the prefix
+ */
+ private String getPrefix(ITextViewer viewer, int offset) {
+ int i = offset;
+ IDocument document = viewer.getDocument();
+ if (i > document.getLength())
+ return EMPTY_STRING;
+
+ try {
+ while (i > 0) {
+ char ch = document.getChar(i - 1);
+ if (!Character.isLetterOrDigit(ch) && (ch != '%') && (ch != '_') && (ch != '-') && (ch != '{'))
+ break;
+ i--;
+ }
+ return document.get(i, offset - i);
+ } catch (BadLocationException e) {
+ return EMPTY_STRING;
+ }
+ }
+
+ /**
+ * Get the prefix for a given viewer, offset.
+ *
+ * @param viewer
+ * the viewer for which the context is created
+ * @param offset
+ * the offset into <code>document</code> for which the prefix
+ * is research
+ * @return the prefix
+ */
+ private String getGroupPrefix(ITextViewer viewer, int offset) {
+ int i = offset;
+ IDocument document = viewer.getDocument();
+ if (i > document.getLength())
+ return EMPTY_STRING;
+
+ try {
+ while (i > 0) {
+ char ch = document.getChar(i - 1);
+ if (!Character.isLetterOrDigit(ch) && (ch != '/'))
+ break;
+ i--;
+ }
+ return document.get(i, offset - i);
+ } catch (BadLocationException e) {
+ return EMPTY_STRING;
+ }
+ }
+
+ /**
+ * Get defines as a String key->value pair for a given specfile
+ * and prefix.
+ *
+ * @param specfile
+ * to get defines from.
+ * @param prefix
+ * used to find defines.
+ * @return a <code>HashMap</code> of defines.
+ *
+ */
+ private Map<String, String> getDefines(Specfile specfile, String prefix) {
+ Collection<SpecfileDefine> defines = specfile.getDefines();
+ Map<String, String> ret = new HashMap<String, String>();
+ String defineName;
+ for (SpecfileDefine define: defines) {
+ defineName = "%" + define.getName(); //$NON-NLS-1$
+ if (defineName.startsWith(prefix.replaceFirst("\\{", EMPTY_STRING))) //$NON-NLS-1$
+ ret.put(defineName, define.getStringValue());
+ }
+ return ret;
+ }
+
+ /**
+ * Get patches as a String key->value pair for a given specfile
+ * and prefix.
+ *
+ * @param specfile
+ * to get defines from.
+ * @param prefix
+ * used to find defines.
+ * @return a <code>HashMap</code> of defines.
+ *
+ */
+ private Map<String, String> getPatches(Specfile specfile, String prefix) {
+ Collection<SpecfileSource> patches = specfile.getPatches();
+ Map<String, String> ret = new HashMap<String, String>();
+ String patchName;
+ for (SpecfileSource patch: patches) {
+ patchName = "%patch" + patch.getNumber(); //$NON-NLS-1$
+ if (patchName.startsWith(prefix))
+ ret.put(patchName.toLowerCase(), SpecfileHover
+ .getSourceOrPatchValue(specfile, "patch" //$NON-NLS-1$
+ + patch.getNumber()));
+ }
+ return ret;
+ }
+
+ /**
+ * Get sources as a String key->value pair for a given specfile
+ * and prefix.
+ *
+ * @param specfile
+ * to get defines from.
+ * @param prefix
+ * used to find defines.
+ * @return a <code>HashMap</code> of defines.
+ *
+ */
+ private Map<String, String> getSources(Specfile specfile, String prefix) {
+ Collection<SpecfileSource> sources = specfile.getSources();
+ Map<String, String> ret = new HashMap<String, String>();
+ String sourceName;
+ for (SpecfileSource source : sources) {
+ sourceName = ISpecfileSpecialSymbols.MACRO_START_LONG + SOURCE
+ + source.getNumber()
+ + ISpecfileSpecialSymbols.MACRO_END_LONG;
+ if (sourceName.startsWith(prefix))
+ ret.put(sourceName, SpecfileHover.getSourceOrPatchValue(
+ specfile, SOURCE + source.getNumber()));
+ }
+ return ret;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeContextInformation(org.eclipse.jface.text.ITextViewer, int)
+ */
+ public IContextInformation[] computeContextInformation(ITextViewer viewer,
+ int offset) {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
+ */
+ public char[] getCompletionProposalAutoActivationCharacters() {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationAutoActivationCharacters()
+ */
+ public char[] getContextInformationAutoActivationCharacters() {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getErrorMessage()
+ */
+ public String getErrorMessage() {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationValidator()
+ */
+ public IContextInformationValidator getContextInformationValidator() {
+ return null;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileConfiguration.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileConfiguration.java
new file mode 100644
index 0000000000..18d4534637
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileConfiguration.java
@@ -0,0 +1,252 @@
+/*******************************************************************************
+ * 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;
+
+import java.util.Map;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.text.DefaultInformationControl;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IInformationControl;
+import org.eclipse.jface.text.IInformationControlCreator;
+import org.eclipse.jface.text.ITextDoubleClickStrategy;
+import org.eclipse.jface.text.ITextHover;
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.text.contentassist.ContentAssistant;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.contentassist.IContentAssistant;
+import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
+import org.eclipse.jface.text.presentation.IPresentationReconciler;
+import org.eclipse.jface.text.presentation.PresentationReconciler;
+import org.eclipse.jface.text.reconciler.IReconciler;
+import org.eclipse.jface.text.reconciler.MonoReconciler;
+import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.jface.text.source.IAnnotationHover;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.linuxtools.rpm.ui.editor.derived.AnnotationHover;
+import org.eclipse.linuxtools.rpm.ui.editor.derived.HTMLTextPresenter;
+import org.eclipse.linuxtools.rpm.ui.editor.hyperlink.MailHyperlinkDetector;
+import org.eclipse.linuxtools.rpm.ui.editor.hyperlink.SourcesFileHyperlinkDetector;
+import org.eclipse.linuxtools.rpm.ui.editor.hyperlink.SpecfileElementHyperlinkDetector;
+import org.eclipse.linuxtools.rpm.ui.editor.hyperlink.URLHyperlinkWithMacroDetector;
+import org.eclipse.linuxtools.rpm.ui.editor.scanners.SpecfileChangelogScanner;
+import org.eclipse.linuxtools.rpm.ui.editor.scanners.SpecfilePackagesScanner;
+import org.eclipse.linuxtools.rpm.ui.editor.scanners.SpecfilePartitionScanner;
+import org.eclipse.linuxtools.rpm.ui.editor.scanners.SpecfileScanner;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.editors.text.TextSourceViewerConfiguration;
+
+public class SpecfileConfiguration extends TextSourceViewerConfiguration {
+ private SpecfileDoubleClickStrategy doubleClickStrategy;
+ private SpecfileScanner scanner;
+ private SpecfileChangelogScanner changelogScanner;
+ private SpecfilePackagesScanner packagesScanner;
+ private ColorManager colorManager;
+ private SpecfileHover specfileHover;
+ private SpecfileEditor editor;
+ private IAnnotationHover annotationHover;
+
+ public SpecfileConfiguration(ColorManager colorManager, SpecfileEditor editor) {
+ this.colorManager = colorManager;
+ this.editor = editor;
+ }
+
+ /**
+ * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getConfiguredContentTypes(org.eclipse.jface.text.source.ISourceViewer)
+ */
+ @Override
+ public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
+ return SpecfilePartitionScanner.SPEC_PARTITION_TYPES;
+ }
+
+ /**
+ * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getDoubleClickStrategy(org.eclipse.jface.text.source.ISourceViewer, java.lang.String)
+ */
+ @Override
+ public ITextDoubleClickStrategy getDoubleClickStrategy(
+ ISourceViewer sourceViewer,
+ String contentType) {
+ if (doubleClickStrategy == null)
+ doubleClickStrategy = new SpecfileDoubleClickStrategy();
+ return doubleClickStrategy;
+ }
+
+ protected SpecfileScanner getSpecfileScanner() {
+ if (scanner == null) {
+ scanner = new SpecfileScanner(colorManager);
+ scanner.setDefaultReturnToken(
+ new Token(
+ new TextAttribute(
+ colorManager.getColor(ISpecfileColorConstants.DEFAULT))));
+ }
+ return scanner;
+ }
+
+ protected SpecfileChangelogScanner getSpecfileChangelogScanner() {
+ if (changelogScanner == null) {
+ changelogScanner = new SpecfileChangelogScanner(colorManager);
+ changelogScanner.setDefaultReturnToken(
+ new Token(
+ new TextAttribute(
+ colorManager.getColor(ISpecfileColorConstants.DEFAULT))));
+ }
+ return changelogScanner;
+ }
+
+ protected SpecfilePackagesScanner getSpecfilePackagesScanner() {
+ if (packagesScanner == null) {
+ packagesScanner = new SpecfilePackagesScanner(colorManager);
+ packagesScanner.setDefaultReturnToken(
+ new Token(
+ new TextAttribute(
+ colorManager.getColor(ISpecfileColorConstants.DEFAULT))));
+ }
+ return packagesScanner;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.editors.text.TextSourceViewerConfiguration#getTextHover(org.eclipse.jface.text.source.ISourceViewer, java.lang.String)
+ */
+ @Override
+ public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType) {
+ if (specfileHover == null)
+ specfileHover = new SpecfileHover(this.editor);
+ return specfileHover;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getPresentationReconciler(org.eclipse.jface.text.source.ISourceViewer)
+ */
+ @Override
+ public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
+ PresentationReconciler reconciler = new PresentationReconciler();
+
+ DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getSpecfileScanner());
+ reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
+ reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
+//
+// dr = new DefaultDamagerRepairer(getSpecfileScanner());
+// reconciler.setDamager(dr, SpecfilePartitionScanner.SPEC_DEFAULT);
+// reconciler.setRepairer(dr, SpecfilePartitionScanner.SPEC_DEFAULT);
+
+ dr = new DefaultDamagerRepairer(getSpecfilePackagesScanner());
+ reconciler.setDamager(dr, SpecfilePartitionScanner.SPEC_PACKAGES);
+ reconciler.setRepairer(dr, SpecfilePartitionScanner.SPEC_PACKAGES);
+
+ dr = new DefaultDamagerRepairer(getSpecfileScanner());
+ reconciler.setDamager(dr, SpecfilePartitionScanner.SPEC_PREP);
+ reconciler.setRepairer(dr, SpecfilePartitionScanner.SPEC_PREP);
+
+ dr = new DefaultDamagerRepairer(getSpecfileScanner());
+ reconciler.setDamager(dr, SpecfilePartitionScanner.SPEC_SCRIPT);
+ reconciler.setRepairer(dr, SpecfilePartitionScanner.SPEC_SCRIPT);
+
+ dr = new DefaultDamagerRepairer(getSpecfileScanner());
+ reconciler.setDamager(dr, SpecfilePartitionScanner.SPEC_FILES);
+ reconciler.setRepairer(dr, SpecfilePartitionScanner.SPEC_FILES);
+
+ dr = new DefaultDamagerRepairer(getSpecfileScanner());
+ reconciler.setDamager(dr, SpecfilePartitionScanner.SPEC_GROUP);
+ reconciler.setRepairer(dr, SpecfilePartitionScanner.SPEC_GROUP);
+
+ dr = new DefaultDamagerRepairer(getSpecfileChangelogScanner());
+ reconciler.setDamager(dr, SpecfilePartitionScanner.SPEC_CHANGELOG);
+ reconciler.setRepairer(dr, SpecfilePartitionScanner.SPEC_CHANGELOG);
+
+ return reconciler;
+ }
+
+ /*
+ * @see SourceViewerConfiguration#getReconciler(ISourceViewer)
+ */
+ @Override
+ public IReconciler getReconciler(ISourceViewer sourceViewer) {
+ if (editor != null && editor.isEditable()) {
+ SpecfileReconcilingStrategy strategy= new SpecfileReconcilingStrategy(editor);
+ MonoReconciler reconciler= new MonoReconciler(strategy, false);
+ reconciler.setProgressMonitor(new NullProgressMonitor());
+ reconciler.setDelay(500);
+ return reconciler;
+ }
+ return null;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getContentAssistant(org.eclipse.jface.text.source.ISourceViewer)
+ */
+ @Override
+ public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
+ ContentAssistant assistant= new ContentAssistant();
+ IContentAssistProcessor processor= new SpecfileCompletionProcessor(editor);
+ // add content assistance to all the supported contentType
+ assistant.setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);
+ assistant.setContentAssistProcessor(processor, SpecfilePartitionScanner.SPEC_PREP);
+ assistant.setContentAssistProcessor(processor, SpecfilePartitionScanner.SPEC_SCRIPT);
+ assistant.setContentAssistProcessor(processor,SpecfilePartitionScanner.SPEC_FILES);
+ assistant.setContentAssistProcessor(processor,SpecfilePartitionScanner.SPEC_CHANGELOG);
+ assistant.setContentAssistProcessor(processor,SpecfilePartitionScanner.SPEC_PACKAGES);
+ assistant.setContentAssistProcessor(processor,
+ SpecfilePartitionScanner.SPEC_GROUP);
+ // configure content assistance
+ assistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE);
+ IInformationControlCreator controlCreator= getInformationControlCreator();
+ assistant.setInformationControlCreator(controlCreator);
+ assistant.enableAutoInsert(true);
+ assistant.setStatusLineVisible(true);
+ assistant.setStatusMessage(Messages.SpecfileConfiguration_0);
+ return assistant;
+ }
+
+ private IInformationControlCreator getInformationControlCreator() {
+ return new IInformationControlCreator() {
+ public IInformationControl createInformationControl(Shell parent) {
+ return new DefaultInformationControl(parent, new HTMLTextPresenter(false));
+ }
+ };
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getHyperlinkDetectors(org.eclipse.jface.text.source.ISourceViewer)
+ */
+ @Override
+ public IHyperlinkDetector[] getHyperlinkDetectors(ISourceViewer sourceViewer) {
+ if (sourceViewer == null)
+ return null;
+ return new IHyperlinkDetector[] {
+ new URLHyperlinkWithMacroDetector(editor.getSpecfile()),
+ new SpecfileElementHyperlinkDetector(editor.getSpecfile()), new MailHyperlinkDetector(editor), new SourcesFileHyperlinkDetector(editor)};
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getAnnotationHover(org.eclipse.jface.text.source.ISourceViewer)
+ */
+ @Override
+ public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer) {
+ if (annotationHover == null)
+ annotationHover = new AnnotationHover();
+ return annotationHover;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.editors.text.TextSourceViewerConfiguration#getHyperlinkDetectorTargets(org.eclipse.jface.text.source.ISourceViewer)
+ */
+ @Override
+ protected Map getHyperlinkDetectorTargets(ISourceViewer sourceViewer) {
+ Map<String, Object> targets= super.getHyperlinkDetectorTargets(sourceViewer);
+ targets.put("org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor", editor); //$NON-NLS-1$
+ return targets;
+ }
+
+} \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileDocumentProvider.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileDocumentProvider.java
new file mode 100644
index 0000000000..ebc9ca68f0
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileDocumentProvider.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * 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;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.linuxtools.rpm.ui.editor.scanners.SpecfilePartitionScanner;
+import org.eclipse.ui.editors.text.TextFileDocumentProvider;
+
+public class SpecfileDocumentProvider extends TextFileDocumentProvider {
+
+ private IDocument document;
+
+ @Override
+ public IDocument getDocument(Object element) {
+ document = super.getDocument(element);
+ if (document != null) {
+ if (document.getDocumentPartitioner() == null){
+ SpecfilePartitioner partitioner = new SpecfilePartitioner(
+ new SpecfilePartitionScanner(),
+ SpecfilePartitionScanner.SPEC_PARTITION_TYPES);
+ partitioner.connect(document, false);
+ document.setDocumentPartitioner(partitioner);
+ }
+ }
+ return document;
+ }
+} \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileDoubleClickStrategy.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileDoubleClickStrategy.java
new file mode 100644
index 0000000000..d997d79d9d
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileDoubleClickStrategy.java
@@ -0,0 +1,123 @@
+/*******************************************************************************
+ * 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;
+
+import org.eclipse.jface.text.*;
+
+public class SpecfileDoubleClickStrategy implements ITextDoubleClickStrategy {
+ protected ITextViewer fText;
+
+ public void doubleClicked(ITextViewer part) {
+ int pos = part.getSelectedRange().x;
+
+ if (pos < 0)
+ return;
+
+ fText = part;
+
+ if (!selectComment(pos)) {
+ selectWord(pos);
+ }
+ }
+ protected boolean selectComment(int caretPos) {
+ IDocument doc = fText.getDocument();
+ int startPos, endPos;
+
+ try {
+ int pos = caretPos;
+ char c = ' ';
+
+ while (pos >= 0) {
+ c = doc.getChar(pos);
+ if (c == '\\') {
+ pos -= 2;
+ continue;
+ }
+ if (c == Character.LINE_SEPARATOR || c == '\"')
+ break;
+ --pos;
+ }
+
+ if (c != '\"')
+ return false;
+
+ startPos = pos;
+
+ pos = caretPos;
+ int length = doc.getLength();
+ c = ' ';
+
+ while (pos < length) {
+ c = doc.getChar(pos);
+ if (c == Character.LINE_SEPARATOR || c == '\"')
+ break;
+ ++pos;
+ }
+ if (c != '\"')
+ return false;
+
+ endPos = pos;
+
+ int offset = startPos + 1;
+ int len = endPos - offset;
+ fText.setSelectedRange(offset, len);
+ return true;
+ } catch (BadLocationException x) {
+ }
+
+ return false;
+ }
+ protected boolean selectWord(int caretPos) {
+
+ IDocument doc = fText.getDocument();
+ int startPos, endPos;
+
+ try {
+
+ int pos = caretPos;
+ char c;
+
+ while (pos >= 0) {
+ c = doc.getChar(pos);
+ if (!Character.isJavaIdentifierPart(c))
+ break;
+ --pos;
+ }
+
+ startPos = pos;
+
+ pos = caretPos;
+ int length = doc.getLength();
+
+ while (pos < length) {
+ c = doc.getChar(pos);
+ if (!Character.isJavaIdentifierPart(c))
+ break;
+ ++pos;
+ }
+
+ endPos = pos;
+ selectRange(startPos, endPos);
+ return true;
+
+ } catch (BadLocationException x) {
+ }
+
+ return false;
+ }
+
+ private void selectRange(int startPos, int stopPos) {
+ int offset = startPos + 1;
+ int length = stopPos - offset;
+ fText.setSelectedRange(offset, length);
+ }
+} \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileEditor.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileEditor.java
new file mode 100644
index 0000000000..ae7c5e3c82
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileEditor.java
@@ -0,0 +1,248 @@
+/*******************************************************************************
+ * 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
+ * Alphonse Van Assche
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui.editor;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.IVerticalRuler;
+import org.eclipse.jface.text.source.SourceViewer;
+import org.eclipse.jface.text.source.projection.ProjectionSupport;
+import org.eclipse.jface.text.source.projection.ProjectionViewer;
+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.outline.SpecfileContentOutlinePage;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileParser;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.editors.text.TextEditor;
+import org.eclipse.ui.texteditor.ContentAssistAction;
+import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
+
+public class SpecfileEditor extends TextEditor {
+
+ private ColorManager colorManager;
+ private SpecfileContentOutlinePage outlinePage;
+ private IEditorInput input;
+ private Specfile specfile;
+ private ProjectionSupport projectionSupport;
+ private SpecfileParser parser;
+ private RpmMacroOccurrencesUpdater fOccurrencesUpdater;
+
+ public SpecfileEditor() {
+ super();
+ colorManager = new ColorManager();
+ parser = getParser();
+ setSourceViewerConfiguration(new SpecfileConfiguration(colorManager, this));
+ setDocumentProvider(new SpecfileDocumentProvider());
+ setKeyBindingScopes(new String[]{"org.eclipse.linuxtools.rpm.ui.specEditorScope"}); //$NON-NLS-1$
+ }
+ @Override
+ public void dispose() {
+ colorManager.dispose();
+ // Set specfile field to null here is useful for test cases because whether
+ // the specfile in null SpecfileReconcilingStrategy#reconcile don't
+ // update anything and thus it don't give false stacktraces.
+ specfile = null;
+ super.dispose();
+ }
+
+ @Override
+ protected void doSetInput(IEditorInput newInput) throws CoreException
+ {
+ super.doSetInput(newInput);
+ this.input = newInput;
+
+ if (outlinePage != null)
+ outlinePage.setInput(input);
+
+ validateAndMark();
+ }
+
+ @Override
+ protected void editorSaved()
+ {
+ super.editorSaved();
+
+ //we validate and mark document here
+ validateAndMark();
+
+ if (outlinePage != null)
+ outlinePage.update();
+ }
+
+ protected void validateAndMark()
+ {
+ try
+ {
+ IDocument document = getInputDocument();
+ SpecfileErrorHandler specfileErrorHandler = new SpecfileErrorHandler(getInputFile(), document);
+ specfileErrorHandler.removeExistingMarkers();
+ SpecfileTaskHandler specfileTaskHandler = new SpecfileTaskHandler(getInputFile(), document);
+ specfileTaskHandler.removeExistingMarkers();
+ this.parser.setErrorHandler(specfileErrorHandler);
+ this.parser.setTaskHandler(specfileTaskHandler);
+ specfile = parser.parse(document);
+ }
+ catch (Exception e)
+ {
+ SpecfileLog.logError(e);
+ }
+ }
+
+
+ /**
+ * Get a {@link IFile}, this implementation return <code>null</code>
+ * if the <code>IEditorInput</code> instance is not of type {@link IFileEditorInput}.
+ *
+ * @return a <code>IFile</code> or <code>null</code>.
+ */
+ protected IFile getInputFile()
+ {
+ if (input instanceof IFileEditorInput) {
+ IFileEditorInput ife = (IFileEditorInput) input;
+ IFile file = ife.getFile();
+ return file;
+ }
+ return null;
+ }
+
+ public IDocument getInputDocument()
+ {
+ IDocument document = getDocumentProvider().getDocument(input);
+ return document;
+ }
+
+ @Override
+ public Object getAdapter(Class required) {
+ if (IContentOutlinePage.class.equals(required)) {
+ return getOutlinePage();
+ }
+ if (projectionSupport != null) {
+ Object adapter= projectionSupport.getAdapter(getSourceViewer(), required);
+ if (adapter != null)
+ return adapter;
+ }
+ return super.getAdapter(required);
+ }
+
+ public SpecfileContentOutlinePage getOutlinePage() {
+ if (outlinePage == null) {
+ outlinePage= new SpecfileContentOutlinePage(this);
+ if (getEditorInput() != null)
+ outlinePage.setInput(getEditorInput());
+ }
+ return outlinePage;
+ }
+
+ public Specfile getSpecfile() {
+ return specfile;
+ }
+
+
+ /*
+ * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#createSourceViewer(org.eclipse.swt.widgets.Composite, org.eclipse.jface.text.source.IVerticalRuler, int)
+ */
+ @Override
+ protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
+ fAnnotationAccess = createAnnotationAccess();
+ fOverviewRuler = createOverviewRuler(getSharedColors());
+ ISourceViewer viewer= new ProjectionViewer(parent, ruler, fOverviewRuler, true, styles);
+ getSourceViewerDecorationSupport(viewer);
+ return viewer;
+ }
+
+ /*
+ * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#createPartControl(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ public void createPartControl(Composite parent) {
+ super.createPartControl(parent);
+ ProjectionViewer projectionViewer = (ProjectionViewer) getSourceViewer();
+ projectionSupport = new ProjectionSupport(projectionViewer, getAnnotationAccess(), getSharedColors());
+ projectionSupport.install();
+ projectionViewer.doOperation(ProjectionViewer.TOGGLE);
+ fOccurrencesUpdater = new RpmMacroOccurrencesUpdater(this);
+ }
+
+ /*
+ * @see org.eclipse.ui.texteditor.AbstractTextEditor#createActions()
+ */
+ @Override
+ protected void createActions() {
+ super.createActions();
+
+ IAction action= new ContentAssistAction(
+ getResourceBundle(),
+ Messages.SpecfileEditor_0,
+ this);
+ action.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
+ setAction(Messages.SpecfileEditor_1, action);
+ markAsStateDependentAction(Messages.SpecfileEditor_2, true);
+ }
+
+
+ // ContentAssistAction take a ResourceBundle but Resource bundles are not yet implemented on
+ // a plugin level, so we have add this method here as a quick fix.
+ public ResourceBundle getResourceBundle() {
+ ResourceBundle resourceBundle;
+ try {
+ resourceBundle= ResourceBundle.getBundle("org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditorMessages"); //$NON-NLS-1$
+ } catch (MissingResourceException x) {
+ resourceBundle= null;
+ }
+ return resourceBundle;
+ }
+
+ protected void setSpecfile(Specfile specfile) {
+ this.specfile = specfile;
+ if (fOccurrencesUpdater != null) {
+ Shell shell= getSite().getShell();
+ if (!(shell == null || shell.isDisposed())) {
+ shell.getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ fOccurrencesUpdater.update(getSourceViewer());
+ }
+ });
+ }
+ }
+
+ }
+
+ public SpecfileParser getParser() {
+ if (parser == null) {
+ parser = new SpecfileParser();
+ }
+ return parser;
+ }
+
+ /**
+ * Get the spefile source viewer, this method is useful for test cases.
+ *
+ * @return
+ * the specfile source viewer
+ */
+ public SourceViewer getSpecfileSourceViewer() {
+ return (SourceViewer) getSourceViewer();
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileEditorMessages.properties b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileEditorMessages.properties
new file mode 100644
index 0000000000..3804f13e39
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileEditorMessages.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
+###############################################################################
+ContentAssistProposal.label=Content Assist
+ContentAssistProposal.tooltip=Content Assist
+ContentAssistProposal.description=Content Assist
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileFoldingStructureProvider.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileFoldingStructureProvider.java
new file mode 100644
index 0000000000..27de81913e
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileFoldingStructureProvider.java
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * 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;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.projection.ProjectionAnnotation;
+import org.eclipse.jface.text.source.projection.ProjectionAnnotationModel;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileElement;
+
+public class SpecfileFoldingStructureProvider {
+
+
+ private class ElementByLineNbrComparator implements Comparator<SpecfileElement> {
+ public int compare(SpecfileElement element1, SpecfileElement element2) {
+ Integer lineNbr1 = element1.getLineNumber();
+ Integer lineNbr2 = element2.getLineNumber();
+ return lineNbr1.compareTo(lineNbr2);
+ }
+ }
+
+ private static final Annotation[] EMPTY = new Annotation[] {};
+ private SpecfileEditor sEditor;
+ private IDocument sDocument;
+ private IProgressMonitor sProgressMonitor;
+
+ public SpecfileFoldingStructureProvider(SpecfileEditor editor) {
+ sEditor = editor;
+ }
+
+ public void setProgressMonitor(IProgressMonitor progressMonitor) {
+ sProgressMonitor = progressMonitor;
+ }
+
+ public void setDocument(IDocument document) {
+ sDocument = document;
+ }
+
+ public void updateFoldingRegions() {
+ ProjectionAnnotationModel model = (ProjectionAnnotationModel) sEditor
+ .getAdapter(ProjectionAnnotationModel.class);
+ if (model != null)
+ updateFoldingRegions(model);
+ }
+
+ void updateFoldingRegions(ProjectionAnnotationModel model) {
+ Set<Position> structure = createFoldingStructure(sEditor.getSpecfile());
+ Annotation[] deletions = computeDifferences(model, structure);
+ Map<Annotation,Position> additions = computeAdditions(structure);
+ if ((deletions.length != 0 || additions.size() != 0)
+ && (sProgressMonitor == null || !sProgressMonitor.isCanceled()))
+ model.modifyAnnotations(deletions, additions, EMPTY);
+ }
+
+ private Map<Annotation,Position> computeAdditions(Set<Position> currentRegions) {
+ Map<Annotation,Position> additionsMap = new HashMap<Annotation,Position>();
+ for (Position position: currentRegions)
+ additionsMap.put(new ProjectionAnnotation(), position);
+ return additionsMap;
+ }
+
+ private Annotation[] computeDifferences(ProjectionAnnotationModel model,
+ Set<Position> current) {
+ List<Annotation> deletions = new ArrayList<Annotation>();
+ for (Iterator<Annotation> iter = model.getAnnotationIterator(); iter.hasNext();) {
+ Annotation annotation = iter.next();
+ if (annotation instanceof ProjectionAnnotation) {
+ Position position = model.getPosition(annotation);
+ if (current.contains(position))
+ current.remove(position);
+ else
+ deletions.add(annotation);
+ }
+ }
+ return deletions.toArray(new Annotation[deletions.size()]);
+ }
+
+ private Set<Position> createFoldingStructure(Specfile specfile) {
+ Set<Position> set = new HashSet<Position>();
+
+ List<SpecfileElement> elements = new ArrayList<SpecfileElement>();
+ elements.addAll(specfile.getSections());
+ elements.addAll(specfile.getComplexSections());
+ Collections.sort(elements, new ElementByLineNbrComparator());
+ addFoldingRegions(set, elements.toArray());
+ return set;
+ }
+
+ private void addFoldingRegions(Set<Position> regions, Object[] elements) {
+ Position position;
+ // add folding on the preamble section
+ try {
+ SpecfileElement element = (SpecfileElement) elements[0];
+ position = new Position(0, element.getLineStartPosition() - 1);
+ regions.add(position);
+ } catch (Exception exception){
+ //pass
+ }
+
+ for (int i = 0; i < elements.length; i++) {
+ SpecfileElement startElement = (SpecfileElement) elements[i];
+ int offsetPos = startElement.getLineStartPosition();
+ int lenghtPos;
+ if (i < elements.length -1) {
+ SpecfileElement endElement = (SpecfileElement) elements[i+1];
+ lenghtPos = endElement.getLineStartPosition() - startElement.getLineStartPosition() - 1;
+ } else {
+ lenghtPos = sDocument.getLength() - startElement.getLineStartPosition();
+ }
+ position = new Position(offsetPos, lenghtPos);
+ regions.add(position);
+ }
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileHover.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileHover.java
new file mode 100644
index 0000000000..8a58a23a37
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileHover.java
@@ -0,0 +1,277 @@
+/*******************************************************************************
+ * 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
+ * Alphonse Van Assche
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui.editor;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.DefaultInformationControl;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IInformationControl;
+import org.eclipse.jface.text.IInformationControlCreator;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextHover;
+import org.eclipse.jface.text.ITextHoverExtension;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Region;
+import org.eclipse.linuxtools.rpm.ui.editor.derived.HTMLTextPresenter;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileDefine;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileSource;
+import org.eclipse.linuxtools.rpm.ui.editor.preferences.PreferenceConstants;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Shell;
+
+public class SpecfileHover implements ITextHover, ITextHoverExtension {
+
+ private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+ private SpecfileEditor editor;
+
+ public SpecfileHover(SpecfileEditor editor) {
+ this.editor = editor;
+ }
+
+ public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
+ if (hoverRegion == null || hoverRegion.getLength() == 0)
+ return null;
+
+ Specfile spec = editor.getSpecfile();
+
+
+ String currentSelection;
+ try {
+ currentSelection = textViewer.getDocument().get(hoverRegion.getOffset() + 1, hoverRegion.getLength() - 1);
+ } catch (BadLocationException e) {
+ return null;
+ }
+
+
+ // First we try to get a define based on the given name
+ SpecfileDefine define = spec.getDefine(currentSelection);
+
+ String value = currentSelection + ": "; //$NON-NLS-1$
+
+ if (define != null) {
+ value += define.getStringValue();
+ return value;
+ }
+
+ String macroLower = currentSelection.toLowerCase();
+
+ // If there's no such define we try to see if it corresponds to
+ // a Source or Patch declaration
+ String retrivedValue = getSourceOrPatchValue(spec, macroLower);
+ if (retrivedValue != null)
+ return value += retrivedValue;
+ else {
+ // If it does not correspond to a Patch or Source macro, try to find it
+ // in the macro proposals list.
+ retrivedValue = getMacroValueFromMacroList(currentSelection);
+ if (retrivedValue != null)
+ return value += retrivedValue;
+ else {
+ // If it does not correspond to a macro in the list, try to find it
+ // in the RPM list.
+ retrivedValue = Activator.getDefault().getRpmPackageList().getValue(currentSelection.replaceFirst(":",EMPTY_STRING)); //$NON-NLS-1$
+ if (retrivedValue != null)
+ return retrivedValue;
+ }
+ }
+ // We return null in other cases, so we don't show hover information
+ // for unrecognized macros and RPM packages.
+ return null;
+ }
+
+ public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
+
+ if (textViewer != null) {
+ /*
+ * If the hover offset falls within the selection range return the
+ * region for the whole selection.
+ */
+ Point selectedRange = textViewer.getSelectedRange();
+ if (selectedRange.x >= 0 && selectedRange.y > 0
+ && offset >= selectedRange.x
+ && offset <= selectedRange.x + selectedRange.y)
+ return new Region(selectedRange.x, selectedRange.y);
+ else {
+ IRegion ret = findWord(textViewer.getDocument(), offset);
+ if (ret.equals(new Region(offset, 0))) {
+ ret = findPackages(textViewer.getDocument(), offset);
+ }
+ return ret;
+ }
+ }
+ return null;
+ }
+
+ public IInformationControlCreator getHoverControlCreator() {
+ return new IInformationControlCreator() {
+ public IInformationControl createInformationControl(Shell parent) {
+ return new DefaultInformationControl(parent, new HTMLTextPresenter(true));
+ }
+ };
+ }
+
+
+ public static IRegion findWord(IDocument document, int offset) {
+ int start = -1;
+ int end = -1;
+ boolean beginsWithBrace = false;
+
+ try {
+ int pos = offset;
+ char c;
+
+ while (pos >= 0) {
+ c = document.getChar(pos);
+ if (c == '%') {
+ if (document.getChar(pos + 1) == '{')
+ beginsWithBrace = true;
+ break;
+ }
+ else if (c == '\n' || c == '}'){
+ // if we hit the beginning of the line, it's not a macro
+ return new Region(offset, 0);
+ }
+ --pos;
+ }
+
+ if (!beginsWithBrace)
+ --pos;
+
+ start = pos;
+
+ pos = offset;
+ int length = document.getLength();
+
+ while (pos < length) {
+ c = document.getChar(pos);
+ if (beginsWithBrace && (c == '}')) {
+ break;
+ }
+ else if (c == '\n' || c == '%' || c == '('){ // '(' is needed for the %deffatt( case
+ break;
+// Do not return empty region here. We have a work.
+// return new Region(offset, 0);
+ } else if (!beginsWithBrace && c == ' ') {
+ break;
+ }
+ ++pos;
+ }
+
+ end = pos;
+
+ } catch (BadLocationException x) {
+ }
+
+ if (start > -1 && end > -1) {
+ if (start == offset)
+ return new Region(start, end - start);
+ else
+ return new Region(start + 1, end - start - 1);
+ }
+
+ return null;
+ }
+
+ public static IRegion findPackages(IDocument document, int offset) {
+ int start = -1;
+ int end = -1;
+ boolean beginsWithSpace = false;
+ try {
+ int pos = offset;
+ char c;
+ while (pos >= 0) {
+ c = document.getChar(pos);
+ if (c == ' ' || c =='\t' || c==':') {
+ if (Character.isLetter(document.getChar(pos + 1))) {
+ beginsWithSpace = true;
+ break;
+ } else if (c == '\n'){
+ return new Region(offset, 0);
+ }
+ }
+ --pos;
+ }
+ --pos;
+ start = pos;
+ pos = offset;
+ int length = document.getLength();
+ while (pos < length) {
+ c = document.getChar(pos);
+ if (beginsWithSpace && (!Character.isLetter(c) && !Character.isDigit(c) && c != '-')) {
+ break;
+ }
+ else if (c == '\n'){
+ return new Region(offset, 0);
+ }
+ ++pos;
+ }
+ end = pos;
+
+ } catch (BadLocationException x) {
+ }
+
+ if (start > -1 && end > -1) {
+ return new Region(start, end - start);
+ }
+ return null;
+ }
+
+ public static String getSourceOrPatchValue(Specfile spec, String patchOrSourceName) {
+ String value = null;
+ Pattern p = Pattern.compile("(source|patch)(\\d*)"); //$NON-NLS-1$
+ Matcher m = p.matcher(patchOrSourceName);
+
+ if (m.matches()) {
+ String digits = m.group(2);
+
+ SpecfileSource source = null;
+ int number = -1;
+
+ if (digits != null && digits.equals(EMPTY_STRING)) {
+ number = 0;
+ } else if (digits != null && !digits.equals(EMPTY_STRING)) {
+ number = Integer.parseInt(digits);
+ }
+
+ if (number != -1) {
+ if (m.group(1).equals("source")) //$NON-NLS-1$
+ source = spec.getSource(number);
+ else if (m.group(1).equals("patch")) //$NON-NLS-1$
+ source = spec.getPatch(number);
+
+ if (source != null) {
+ value = source.getFileName();
+ }
+ }
+ }
+ return value;
+ }
+
+ public static String getMacroValueFromMacroList(String macroName) {
+ String value = null;
+ if (Activator.getDefault().getRpmMacroList().findKey("%" + macroName)) { //$NON-NLS-1$
+ String currentConfig = Activator.getDefault().getPreferenceStore().getString(PreferenceConstants.P_MACRO_HOVER_CONTENT);
+ // Show content of the macro according with the configuration set
+ // in the macro preference page.
+ if (currentConfig.equals(PreferenceConstants.P_MACRO_HOVER_CONTENT_VIEWDESCRIPTION))
+ value = Activator.getDefault().getRpmMacroList().getValue(macroName);
+ else
+ value = RpmMacroProposalsList.getMacroEval("%" + macroName); //$NON-NLS-1$
+ }
+ return value;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileLog.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileLog.java
new file mode 100644
index 0000000000..f8b21a4b87
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileLog.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * 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;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+
+/**
+ * The logger of convenience for the Specfile Plug-In.
+ */
+public class SpecfileLog {
+
+ /**
+ * Log the specified information.
+ *
+ * @param message A human-readable message, localized to the
+ * current locale.
+ */
+ public static void logInfo(String message) {
+ log(IStatus.INFO, IStatus.OK, message, null);
+ }
+
+ /**
+ * Log the specified error.
+ *
+ * @param exception A low-level exception.
+ */
+ public static void logError(Throwable exception) {
+ logError(Messages.SpecfileLog_0, exception);
+ }
+
+ /**
+ * Log the specified error.
+ *
+ * @param 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.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePartitioner.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePartitioner.java
new file mode 100644
index 0000000000..90097f862e
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfilePartitioner.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * 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;
+
+import org.eclipse.jface.text.rules.FastPartitioner;
+import org.eclipse.jface.text.rules.IPartitionTokenScanner;
+
+public class SpecfilePartitioner extends FastPartitioner {
+
+ public SpecfilePartitioner(IPartitionTokenScanner scanner, String[] legalContentTypes) {
+ super(scanner, legalContentTypes);
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileReconcilingStrategy.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileReconcilingStrategy.java
new file mode 100644
index 0000000000..4fabfbd823
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/SpecfileReconcilingStrategy.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * 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
+ * Alphonse Van Assche
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui.editor;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.reconciler.DirtyRegion;
+import org.eclipse.jface.text.reconciler.IReconcilingStrategy;
+import org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension;
+import org.eclipse.linuxtools.rpm.ui.editor.outline.SpecfileContentOutlinePage;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+
+public class SpecfileReconcilingStrategy implements IReconcilingStrategy, IReconcilingStrategyExtension {
+
+ private IDocument sDocument;
+ private IProgressMonitor sProgressMonitor;
+ private SpecfileFoldingStructureProvider sFoldingStructureProvider;
+
+ SpecfileContentOutlinePage outline;
+ int lastRegionOffset;
+ SpecfileEditor editor;
+ IDocumentProvider documentProvider;
+
+ public SpecfileReconcilingStrategy(SpecfileEditor editor) {
+ outline= editor.getOutlinePage();
+ lastRegionOffset = Integer.MAX_VALUE;
+ this.editor = editor;
+ documentProvider = editor.getDocumentProvider();
+ sFoldingStructureProvider= new SpecfileFoldingStructureProvider(editor);
+ }
+
+
+ public void setDocument(IDocument document) {
+ sDocument= document;
+ sFoldingStructureProvider.setDocument(sDocument);
+ }
+
+ public void setProgressMonitor(IProgressMonitor monitor) {
+ sProgressMonitor= monitor;
+ sFoldingStructureProvider.setProgressMonitor(sProgressMonitor);
+ }
+
+ public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
+ reconcile();
+ }
+
+ public void initialReconcile() {
+ reconcile();
+ }
+
+ private void reconcile() {
+ Specfile specfile = editor.getSpecfile();
+ if (specfile != null) {
+ editor.setSpecfile(editor.getParser().parse(documentProvider
+ .getDocument(editor.getEditorInput())));
+ outline.update();
+ updateFolding();
+ updateEditor();
+ }
+ }
+
+ public void reconcile(IRegion partition) {
+ reconcile();
+ }
+
+ private void updateEditor() {
+ Shell shell= editor.getSite().getShell();
+ if (!(shell == null || shell.isDisposed())) {
+ shell.getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ editor.setSpecfile(editor.getParser().parse(documentProvider
+ .getDocument(editor.getEditorInput())));
+ }
+ });
+ }
+ return;
+ }
+
+ private void updateFolding() {
+ sFoldingStructureProvider.updateFoldingRegions();
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/UiUtils.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/UiUtils.java
new file mode 100644
index 0000000000..901bd8063c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/UiUtils.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * 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;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.linuxtools.rpm.core.utils.Utils;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileDefine;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfilePackage;
+import org.eclipse.linuxtools.rpm.ui.editor.preferences.PreferenceConstants;
+
+/*
+ * TODO Refract existing code to use the bellow methods so that we can easily
+ * switch the way that we do some common operation.
+ *
+ */
+
+public class UiUtils {
+
+ public static void pluginSanityCheck() throws IOException {
+ boolean exists = (new File(PreferenceConstants.RPMMACRO_FILE)).exists();
+ // Check if ~/.rpmmacros exist, if the file don't exist we create
+ // it with the appropriate command.
+ if (!exists && Utils.fileExist("/usr/bin/rpmdev-setuptree")) { //$NON-NLS-1$
+ org.eclipse.linuxtools.rpm.core.utils.Utils.runCommandToInputStream("rpmdev-setuptree"); //$NON-NLS-1$
+ }
+
+ // Check RPM tool preference.
+ String currentRpmTool = Activator.getDefault().getPreferenceStore().getString(PreferenceConstants.P_CURRENT_RPMTOOLS);
+ if (!Utils.fileExist("/usr/bin/yum")) { //$NON-NLS-1$
+ if (currentRpmTool.equals(PreferenceConstants.DP_RPMTOOLS_YUM))
+ Activator.getDefault().getPreferenceStore().setValue(PreferenceConstants.P_CURRENT_RPMTOOLS, PreferenceConstants.DP_RPMTOOLS_RPM);
+ } else if (!Utils.fileExist("/usr/bin/urpmq")) { //$NON-NLS-1$
+ if (currentRpmTool.equals(PreferenceConstants.DP_RPMTOOLS_URPM))
+ Activator.getDefault().getPreferenceStore().setValue(PreferenceConstants.P_CURRENT_RPMTOOLS, PreferenceConstants.DP_RPMTOOLS_RPM);
+ }
+ }
+
+
+
+ /**
+ * Resolve defines for a give string, if a define is not found or if
+ * there is some other error, the original string is returned.
+ *
+ * @param stringToResolve The string to resolve.
+ * @return resolved string
+ */
+ public static String resolveDefines(Specfile specfile, String stringToResolve) {
+ String originalString = stringToResolve;
+ SpecfileDefine define;
+ try {
+ Pattern variablePattern = Pattern.compile("%\\{(\\S+?)\\}"); //$NON-NLS-1$
+ Matcher variableMatcher = variablePattern.matcher(stringToResolve);
+ while (variableMatcher.find()) {
+ define = specfile.getDefine(variableMatcher.group(1));
+ if (define != null)
+ stringToResolve = stringToResolve.replaceAll(variableMatcher.group(1), define.getStringValue());
+ else
+ return originalString;
+ }
+ if (!stringToResolve.equals(originalString))
+ stringToResolve = stringToResolve.replaceAll("\\%\\{|\\}", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ return stringToResolve;
+ } catch (Exception e) {
+ return originalString;
+ }
+ }
+
+ public static String getPackageDefineId(SpecfileDefine define, SpecfilePackage rpmPackage){
+ return getPackageDefineId(define.getName(),rpmPackage);
+ }
+
+ public static String getPackageDefineId(String defineName, SpecfilePackage rpmPackage){
+ return defineName.toLowerCase() + ":" + rpmPackage.getPackageName(); //$NON-NLS-1$
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/Utils.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/Utils.java
new file mode 100644
index 0000000000..7b3159d2ae
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/Utils.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * 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;
+
+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.nio.channels.FileChannel;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileDefine;
+import org.eclipse.linuxtools.rpm.ui.editor.preferences.PreferenceConstants;
+
+/*
+ * TODO Refract existing code to use the bellow methods so that we can easily
+ * switch the way that we do some common operation.
+ *
+ */
+
+public class Utils {
+
+ public static void pluginSanityCheck() throws IOException {
+ boolean exists = (new File(PreferenceConstants.RPMMACRO_FILE)).exists();
+ // Check if ~/.rpmmacros exist, if the file don't exist we create
+ // it with the appropriate command.
+ if (!exists && fileExist("/usr/bin/rpmdev-setuptree")) { //$NON-NLS-1$
+ runCommandToInputStream("rpmdev-setuptree"); //$NON-NLS-1$
+ }
+
+ // Check RPM tool preference.
+ String currentRpmTool = Activator.getDefault().getPreferenceStore().getString(PreferenceConstants.P_CURRENT_RPMTOOLS);
+ if (!fileExist("/usr/bin/yum")) { //$NON-NLS-1$
+ if (currentRpmTool.equals(PreferenceConstants.DP_RPMTOOLS_YUM))
+ Activator.getDefault().getPreferenceStore().setValue(PreferenceConstants.P_CURRENT_RPMTOOLS, PreferenceConstants.DP_RPMTOOLS_RPM);
+ } else if (!fileExist("/usr/bin/urpmq")) { //$NON-NLS-1$
+ if (currentRpmTool.equals(PreferenceConstants.DP_RPMTOOLS_URPM))
+ Activator.getDefault().getPreferenceStore().setValue(PreferenceConstants.P_CURRENT_RPMTOOLS, PreferenceConstants.DP_RPMTOOLS_RPM);
+ }
+ }
+
+ public static boolean fileExist(String cmdPath) {
+ return new File(cmdPath).exists();
+ }
+
+ public static BufferedInputStream runCommandToInputStream(String... command) throws IOException {
+ BufferedInputStream in = null;
+ Process child = new ProcessBuilder(command).start();
+ in = new BufferedInputStream(child.getInputStream());
+ return in;
+ }
+
+ public static String runCommandToString(String... command) throws IOException {
+ BufferedInputStream in = runCommandToInputStream(command);
+ return inputStreamToString(in);
+ }
+
+ public static String inputStreamToString(InputStream stream) throws IOException {
+ String retStr = ""; //$NON-NLS-1$
+ int c;
+ while ((c = stream.read()) != -1) {
+ retStr += ((char) c);
+ }
+ stream.close();
+ return retStr;
+ }
+
+ 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();
+ }
+ }
+
+
+ /**
+ * Resolve defines for a give URL string, if a define is not found or if
+ * there is some other error, the original string is returned.
+ *
+ * @param string To resolve
+ * @return resolved URL String
+ */
+ public static String resolveDefines(Specfile specfile, String string) {
+ String originalUrlString= string;
+ SpecfileDefine define;
+ try {
+ Pattern variablePattern= Pattern.compile("%\\{(\\S+?)\\}"); //$NON-NLS-1$
+ Matcher variableMatcher= variablePattern.matcher(string);
+ while (variableMatcher.find()) {
+ define= specfile.getDefine(variableMatcher.group(1));
+ string= string.replaceAll(variableMatcher.group(1), define.getStringValue());
+ }
+ if (!string.equals(originalUrlString))
+ string= string.replaceAll("\\%\\{|\\}", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ return string;
+ } catch (Exception e) {
+ return originalUrlString;
+ }
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/Messages.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/Messages.java
new file mode 100644
index 0000000000..c6cd9557ca
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/Messages.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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.actions;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.rpm.ui.editor.actions.messages"; //$NON-NLS-1$
+ public static String SpecfileChangelogAction_0;
+ public static String SpecfileChangelogAction_1;
+ public static String SpecfileChangelogAction_2;
+ public static String SpecfileChangelogAction_3;
+ public static String SpecfileChangelogAction_4;
+ public static String SpecfileChangelogAction_5;
+ public static String SpecfileChangelogFormatter_0;
+ public static String SpecfileChangelogFormatter_1;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogAction.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogAction.java
new file mode 100644
index 0000000000..f2138c7b9c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogAction.java
@@ -0,0 +1,199 @@
+/*******************************************************************************
+ * 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.actions;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+
+import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.BadPositionCategoryException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileLog;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileElement;
+import org.eclipse.linuxtools.rpm.ui.editor.scanners.SpecfilePartitionScanner;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.preferences.ScopedPreferenceStore;
+
+/**
+ * Our sample action implements workbench action delegate. The action proxy will
+ * be created by the workbench and shown in the UI. When the user tries to use
+ * the action, this delegate will be created and execution will be delegated to
+ * it.
+ *
+ * @see IWorkbenchWindowActionDelegate
+ */
+public class SpecfileChangelogAction implements IWorkbenchWindowActionDelegate {
+ private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+ private static final String NEW_LINE = "\n"; //$NON-NLS-1$
+ private IWorkbenchWindow window;
+
+ /**
+ * The action has been activated. The argument of the method represents the
+ * 'real' action sitting in the workbench UI.
+ *
+ * @see IWorkbenchWindowActionDelegate#run
+ */
+ public void run(IAction action) {
+ IEditorPart editor = window.getActivePage().getActiveEditor();
+ if (editor instanceof SpecfileEditor) {
+ SpecfileEditor specEditor = (SpecfileEditor) editor;
+ IDocument doc = specEditor.getDocumentProvider().getDocument(
+ specEditor.getEditorInput());
+ String[] positionCategories = doc.getPositionCategories();
+ String contentTypesPositionCategory = null;
+
+ // there is some random number suffix to the category positions,
+ // we need to find the one we want
+ for (String positionCategory: positionCategories) {
+ if (positionCategory.startsWith("__content_types_category")) { //$NON-NLS-1$
+ contentTypesPositionCategory = positionCategory;
+ }
+ }
+
+ if (contentTypesPositionCategory != null) {
+ try {
+ Position[] sectionPositions = doc
+ .getPositions(contentTypesPositionCategory);
+ ITypedRegion changelogPartition = null;
+ for (Position position: sectionPositions) {
+ int offset = position.getOffset();
+
+ ITypedRegion partition = doc.getPartition(offset);
+ if (partition.getType().equals(
+ SpecfilePartitionScanner.SPEC_CHANGELOG))
+ changelogPartition = partition;
+
+ }
+
+ // there was no changelog partition - add it.
+ if (changelogPartition == null) {
+ System.err
+ .println(Messages.SpecfileChangelogAction_0);
+ }
+
+ // now add the entry stub
+ System.err.println(Messages.SpecfileChangelogAction_1
+ + changelogPartition.getOffset() + Messages.SpecfileChangelogAction_2
+ + changelogPartition.getLength());
+ String changelogText = doc.get(changelogPartition
+ .getOffset(), changelogPartition.getLength());
+ String[] changelogLines = changelogText.split(NEW_LINE);
+ StringBuilder buf = new StringBuilder();
+ buf.append(changelogLines[0]).append(NEW_LINE);
+ buf.append(createChangelogEntry(specEditor.getSpecfile())).append(NEW_LINE);
+ buf.append(" - \n"); //$NON-NLS-1$
+ int newCursorOffset = changelogPartition.getOffset() + buf.length() -1;
+
+ for (String changelogLine: changelogLines) {
+ buf.append(changelogLine).append(NEW_LINE);
+ }
+
+ doc.replace(changelogPartition.getOffset(),
+ changelogPartition.getLength(), buf.toString());
+ specEditor.selectAndReveal(newCursorOffset, 0);
+ specEditor.setFocus();
+ } catch (BadPositionCategoryException e) {
+ SpecfileLog.logError(e);
+ } catch (BadLocationException e) {
+ SpecfileLog.logError(e);
+ }
+ } else {
+ // log error, we didn't find content type category positions,
+ // WTF?
+ }
+ } else {
+ // TODO: Log error.
+ System.err.println(Messages.SpecfileChangelogAction_3 + editor.getClass().toString()
+ + Messages.SpecfileChangelogAction_4);
+ }
+ }
+
+ /**
+ * Selection in the workbench has been changed. We can change the state of
+ * the 'real' action here if we want, but this can only happen after the
+ * delegate has been created.
+ *
+ * @see IWorkbenchWindowActionDelegate#selectionChanged
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ }
+
+ /**
+ * We can use this method to dispose of any system resources we previously
+ * allocated.
+ *
+ * @see IWorkbenchWindowActionDelegate#dispose
+ */
+ public void dispose() {
+ }
+
+ /**
+ * We will cache window object in order to be able to provide parent shell
+ * for the message dialog.
+ *
+ * @see IWorkbenchWindowActionDelegate#init
+ */
+ public void init(IWorkbenchWindow window) {
+ this.window = window;
+ }
+
+ protected String createChangelogEntry(Specfile specfile) {
+ if (specfile == null)
+ return EMPTY_STRING;
+ // FIXME: this is hack-tastic
+// ChangelogPlugin changelogPlugin = new ChangelogPlugin();
+ IPreferenceStore store = new ScopedPreferenceStore(new InstanceScope(),
+ "com.redhat.eclipse.changelog.core"); //$NON-NLS-1$
+// IPreferenceStore store = changelogPlugin.getPreferenceStore();
+
+ String name = store.getString("IChangeLogConstants.AUTHOR_NAME"); //$NON-NLS-1$
+ String email = store.getString("IChangeLogConstants.AUTHOR_EMAIL"); //$NON-NLS-1$
+
+ Calendar cal = new GregorianCalendar();
+ cal.setTime(new Date());
+ System.err.println(cal.get(Calendar.DAY_OF_WEEK));
+ String date = (new SimpleDateFormat(Messages.SpecfileChangelogAction_5)).format(new Date());
+
+ SpecfileElement resolveElement = new SpecfileElement();
+ resolveElement.setSpecfile(specfile);
+ String epoch = specfile.getEpoch() == -1 ? EMPTY_STRING: (specfile.getEpoch() + ":"); //$NON-NLS-1$
+ String version = specfile.getVersion() == null ? EMPTY_STRING: resolveElement.resolve(specfile.getVersion());
+ String release = specfile.getRelease() == null ? EMPTY_STRING: resolveElement.resolve(specfile.getRelease());
+
+
+ StringBuilder changelogEntry = new StringBuilder();
+ changelogEntry.append("* "); //$NON-NLS-1$
+ changelogEntry.append(date);
+ changelogEntry.append(" "); //$NON-NLS-1$
+ changelogEntry.append(name);
+ changelogEntry.append(" <"); //$NON-NLS-1$
+ changelogEntry.append(email);
+ changelogEntry.append("> "); //$NON-NLS-1$
+ changelogEntry.append(epoch);
+ changelogEntry.append(version);
+ changelogEntry.append("-"); //$NON-NLS-1$
+ changelogEntry.append(release);
+ return changelogEntry.toString();
+ }
+} \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogFormatter.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogFormatter.java
new file mode 100644
index 0000000000..8e18bd11ce
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogFormatter.java
@@ -0,0 +1,206 @@
+/*******************************************************************************
+ * 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.actions;
+
+import java.text.MessageFormat;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.Locale;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.BadPositionCategoryException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.Position;
+import org.eclipse.linuxtools.changelog.core.ChangelogPlugin;
+import org.eclipse.linuxtools.changelog.core.IFormatterChangeLogContrib;
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileLog;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileElement;
+import org.eclipse.linuxtools.rpm.ui.editor.preferences.PreferenceConstants;
+import org.eclipse.linuxtools.rpm.ui.editor.scanners.SpecfilePartitionScanner;
+import org.eclipse.ui.IEditorPart;
+
+public class SpecfileChangelogFormatter implements IFormatterChangeLogContrib {
+
+ public static final SimpleDateFormat SIMPLE_DATE_FORMAT = new SimpleDateFormat("EEE MMM d yyyy"); //$NON-NLS-1$
+ private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+ private IEditorPart changelog;
+
+ public String formatDateLine(String authorName, String authorEmail) {
+ String dateLine;
+ Specfile specfile = getParsedSpecfile();
+ SpecfileElement resolveElement = new SpecfileElement();
+ resolveElement.setSpecfile(specfile);
+ String epoch = specfile.getEpoch() == -1 ? EMPTY_STRING
+ : (specfile.getEpoch() + ":"); //$NON-NLS-1$
+ String version = specfile.getVersion() == null ? EMPTY_STRING : resolveElement
+ .resolve(specfile.getVersion());
+ String release = specfile.getRelease() == null ? EMPTY_STRING : resolveElement
+ .resolve(specfile.getRelease());
+
+ // remove the dist macro if it exist in the release string.
+ release = release.replaceAll("\\%\\{\\?dist\\}", EMPTY_STRING); //$NON-NLS-1$
+
+ // default format
+ dateLine = MessageFormat.format("* {0} {1} <{2}> {3}{4}-{5}", formatTodaysDate(), authorName, //$NON-NLS-1$
+ authorEmail, epoch, version, release);
+
+ String format = Activator.getDefault().getPreferenceStore().getString(PreferenceConstants.P_CHANGELOG_ENTRY_FORMAT);
+ if (format.equals(PreferenceConstants.P_CHANGELOG_ENTRY_FORMAT_VERSIONED))
+ return dateLine;
+
+ else if (format.equals(PreferenceConstants.P_CHANGELOG_ENTRY_FORMAT_VERSIONED_WITH_SEPARATOR))
+ dateLine = MessageFormat.format("* {0} {1} <{2}> - {3}{4}-{5}", formatTodaysDate(), //$NON-NLS-1$
+ authorName, authorEmail, epoch, version, release);
+
+ else if (format.equals(PreferenceConstants.P_CHANGELOG_ENTRY_FORMAT_UNVERSIONED))
+ dateLine = MessageFormat
+ .format("* {0} {1} <{2}>", formatTodaysDate(), authorName, authorEmail); //$NON-NLS-1$
+
+ return dateLine;
+
+ }
+
+ public String mergeChangelog(String dateLine, String functionGuess,
+ IEditorPart changelog, String changeLogLocation, String fileLocation) {
+ return mergeChangelog(dateLine, functionGuess, EMPTY_STRING, changelog, changeLogLocation, fileLocation);
+ }
+
+ protected Specfile getParsedSpecfile() {
+ if (changelog == null)
+ changelog = ChangelogPlugin.getDefault().getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage()
+ .getActiveEditor();
+ if (changelog instanceof SpecfileEditor) {
+ SpecfileEditor specEditor = (SpecfileEditor) changelog;
+ return specEditor.getSpecfile();
+ }
+ return null;
+ }
+
+ private String formatTodaysDate() {
+ Calendar cal = new GregorianCalendar();
+ cal.setTime(new Date());
+ // Get default locale
+ Locale defaultLocale = Locale.getDefault();
+ Locale.setDefault(new Locale(Activator.getDefault().getPreferenceStore().getString(PreferenceConstants.P_CHANGELOG_LOCAL)));
+ String date = SIMPLE_DATE_FORMAT.format(new Date());
+ Locale.setDefault(defaultLocale);
+ return date;
+ }
+
+ public String mergeChangelog(String dateLine, String functionGuess,
+ String defaultContent, IEditorPart changelog,
+ String changeLogLocation, String fileLocation) {
+ if (changelog instanceof SpecfileEditor) {
+ SpecfileEditor specEditor = (SpecfileEditor) changelog;
+ IDocument doc = specEditor.getDocumentProvider().getDocument(
+ specEditor.getEditorInput());
+ String[] positionCategories = doc.getPositionCategories();
+ String contentTypesPositionCategory = null;
+
+ // there is some random number suffix to the category positions,
+ // we need to find the one we want
+ for (String positionCategory: positionCategories) {
+ if (positionCategory.startsWith("__content_types_category")) //$NON-NLS-1$
+ contentTypesPositionCategory = positionCategory;
+ }
+
+ if (contentTypesPositionCategory != null) {
+ try {
+ Position[] sectionPositions = doc
+ .getPositions(contentTypesPositionCategory);
+ ITypedRegion changelogPartition = null;
+ for (Position position: sectionPositions) {
+ int offset = position.getOffset();
+
+ ITypedRegion partition = doc.getPartition(offset);
+ if (partition.getType().equals(
+ SpecfilePartitionScanner.SPEC_CHANGELOG))
+ changelogPartition = partition;
+
+ }
+ // Temporary buffer for changelog text
+ StringBuilder buf = new StringBuilder();
+ String changelogText = EMPTY_STRING;
+ String[] changelogLines = new String[] {};
+ int offset = doc.getLength();
+ int length = 0;
+
+ // there was no changelog partition add it.
+ if (changelogPartition == null) {
+
+ // make sure there are at least 2 newlines before
+ // the changelog section
+ String endString = doc.get(doc.getLength() - 2, 2);
+ if (endString.charAt(0) != '\n')
+ buf.append('\n');
+ if (endString.charAt(1) != '\n')
+ buf.append('\n');
+
+ buf.append("%changelog\n"); //$NON-NLS-1$
+
+ // or get the old text and add the header
+ } else {
+ offset = changelogPartition.getOffset();
+ length = changelogPartition.getLength();
+ changelogText = doc.get(offset, length);
+
+ // get old changelog text
+ changelogLines = changelogText.split("\n"); //$NON-NLS-1$
+ // add the %changelog header
+ buf.append(changelogLines[0]).append('\n');
+ }
+
+ // now add the entry stub
+ buf.append(dateLine);
+ buf.append('\n');
+ buf.append("- \n"); //$NON-NLS-1$
+
+ // set the cursor at the end of the entry,
+ // count back 2 '\n's
+ int newCursorOffset = offset + buf.length() - 1;
+ for (int i = 1; i < changelogLines.length; i++) {
+ buf.append('\n').append(changelogLines[i]);
+ }
+
+ // always terminate the file with a new line
+ if (changelogLines.length > 0)
+ buf.append('\n');
+
+ doc.replace(offset, length, buf.toString());
+
+ specEditor.selectAndReveal(newCursorOffset, 0);
+ specEditor.setFocus();
+ } catch (BadPositionCategoryException e) {
+ SpecfileLog.logError(e);
+ } catch (BadLocationException e) {
+ SpecfileLog.logError(e);
+ }
+ } else {
+ // log error, we didn't find content type category positions,
+ // WTF?
+ }
+ } else {
+ // TODO: LOg error.
+ System.err.println(Messages.SpecfileChangelogFormatter_0 + changelog.getClass().toString()
+ + Messages.SpecfileChangelogFormatter_1);
+ }
+ return EMPTY_STRING;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogParser.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogParser.java
new file mode 100644
index 0000000000..cd12c642df
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileChangelogParser.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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.actions;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.linuxtools.changelog.core.IParserChangeLogContrib;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+
+public class SpecfileChangelogParser implements IParserChangeLogContrib {
+
+ public SpecfileChangelogParser() {
+ }
+
+ public String parseCurrentFunction(IEditorPart editor) throws CoreException {
+ return ""; //$NON-NLS-1$
+ }
+
+ public String parseCurrentFunction(IEditorInput input, int offset) throws CoreException {
+ return ""; //$NON-NLS-1$
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorOrganizePatchesActionDelegate.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorOrganizePatchesActionDelegate.java
new file mode 100644
index 0000000000..924dab7c02
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorOrganizePatchesActionDelegate.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * 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.actions;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile;
+import org.eclipse.ui.IEditorActionDelegate;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+
+public class SpecfileEditorOrganizePatchesActionDelegate implements
+ IEditorActionDelegate, IWorkbenchWindowActionDelegate {
+
+ SpecfileEditor editor;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run(IAction action) {
+ Specfile specfile = editor.getSpecfile();
+ if (specfile != null) {
+ specfile.organizePatches();
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
+ * org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ if (Activator.getActiveEditor() instanceof SpecfileEditor)
+ editor = (SpecfileEditor) Activator.getActiveEditor();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
+ */
+ public void init(IWorkbenchWindow window) {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IEditorActionDelegate#setActiveEditor(org.eclipse.jface.action.IAction,
+ * org.eclipse.ui.IEditorPart)
+ */
+ public void setActiveEditor(IAction action, IEditorPart targetEditor) {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
+ */
+ public void dispose() {
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorShowOutlineActionDelegate.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorShowOutlineActionDelegate.java
new file mode 100644
index 0000000000..7347639563
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorShowOutlineActionDelegate.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * 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.ui.editor.actions;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+import org.eclipse.linuxtools.rpm.ui.editor.outline.SpecfileQuickOutlineDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.ui.IEditorActionDelegate;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+
+public class SpecfileEditorShowOutlineActionDelegate implements
+ IEditorActionDelegate, IWorkbenchWindowActionDelegate {
+
+ SpecfileEditor editor;
+
+ public void setActiveEditor(IAction action, IEditorPart targetEditor) {
+ if (targetEditor instanceof SpecfileEditor) {
+ editor = (SpecfileEditor) targetEditor;
+ } else if (Activator.getActiveEditor() instanceof SpecfileEditor) {
+ editor = (SpecfileEditor) Activator.getActiveEditor();
+ }
+ }
+
+ public void run(IAction action) {
+ if (Activator.getActiveEditor() instanceof SpecfileEditor){
+ editor = (SpecfileEditor) Activator.getActiveEditor();
+ }
+ SpecfileQuickOutlineDialog quickOutlinePopupDialog = new SpecfileQuickOutlineDialog(
+ editor.getSite().getShell(), SWT.NONE, editor);
+ quickOutlinePopupDialog.setSize(400, 200);
+ quickOutlinePopupDialog.setVisible(true);
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ if (Activator.getActiveEditor() instanceof SpecfileEditor)
+ editor = (SpecfileEditor) Activator.getActiveEditor();
+ }
+
+ public void dispose() {
+ }
+
+ public void init(IWorkbenchWindow window) {
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorToggleCommentActionDelegate.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorToggleCommentActionDelegate.java
new file mode 100644
index 0000000000..9f582edc23
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/SpecfileEditorToggleCommentActionDelegate.java
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * 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.actions;
+
+import java.io.IOException;
+import java.io.LineNumberReader;
+import java.io.StringReader;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.linuxtools.rpm.ui.editor.ISpecfileSpecialSymbols;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileLog;
+import org.eclipse.ui.IEditorActionDelegate;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+
+public class SpecfileEditorToggleCommentActionDelegate implements
+ IEditorActionDelegate, IWorkbenchWindowActionDelegate {
+
+ SpecfileEditor editor;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
+ * org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ if (Activator.getActiveEditor() instanceof SpecfileEditor)
+ editor = (SpecfileEditor) Activator.getActiveEditor();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run(IAction action) {
+ IDocument document = editor.getSpecfileSourceViewer().getDocument();
+ ISelection currentSelection = editor.getSpecfileSourceViewer()
+ .getSelection();
+ if (currentSelection instanceof ITextSelection) {
+ ITextSelection selection = (ITextSelection) currentSelection;
+ String selectedContent = ""; //$NON-NLS-1$
+ try {
+ int begin = document.getLineOffset(selection.getStartLine());
+ StringBuilder sb = new StringBuilder(document.get().substring(0,
+ begin));
+ String content = document.get().substring(begin,
+ selection.getOffset() + selection.getLength());
+ if (linesContentCommentChar(content)) {
+ if (selection.getStartLine() == selection.getEndLine()) {
+ selectedContent = ISpecfileSpecialSymbols.COMMENT_START + content;
+ } else
+ selectedContent = ISpecfileSpecialSymbols.COMMENT_START + content.replaceAll("\n", "\n#"); //$NON-NLS-1$ //$NON-NLS-2$
+ } else {
+ selectedContent = content.replaceFirst(ISpecfileSpecialSymbols.COMMENT_START, "").replaceAll( //$NON-NLS-1$
+ "\n#", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ sb.append(selectedContent);
+ sb.append(document.get().substring(
+ selection.getOffset() + selection.getLength(),
+ document.get().length()));
+ document.set(sb.toString());
+ editor.setHighlightRange(selection.getOffset(), selection
+ .getLength(), true);
+ } catch (BadLocationException e) {
+ SpecfileLog.logError(e);
+ }
+ }
+ }
+
+ /**
+ * Check if all lines are commented
+ *
+ * @param content
+ * to check
+ * @return true if all lines begin with '#' char
+ */
+ private boolean linesContentCommentChar(String content) {
+ LineNumberReader reader = new LineNumberReader(
+ new StringReader(content));
+ String line;
+ boolean ret = false;
+ try {
+ while ((line = reader.readLine()) != null) {
+ if (line.startsWith(ISpecfileSpecialSymbols.COMMENT_START))
+ ret = false;
+ else
+ return true;
+ }
+ } catch (IOException e) {
+ SpecfileLog.logError(e);
+ return false;
+ }
+ return ret;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
+ */
+ public void dispose() {
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
+ */
+ public void init(IWorkbenchWindow window) {
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IEditorActionDelegate#setActiveEditor(org.eclipse.jface.action.IAction,
+ * org.eclipse.ui.IEditorPart)
+ */
+ public void setActiveEditor(IAction action, IEditorPart targetEditor) {
+
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/messages.properties b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/messages.properties
new file mode 100644
index 0000000000..77b79d34af
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/actions/messages.properties
@@ -0,0 +1,18 @@
+###############################################################################
+# 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
+###############################################################################
+SpecfileChangelogAction_0=Did not get changelog partition. Please make me one\!
+SpecfileChangelogAction_1=Got specfile partition:
+SpecfileChangelogAction_2=,
+SpecfileChangelogAction_3=Got
+SpecfileChangelogAction_4=\ editor
+SpecfileChangelogAction_5=EEE MMM d yyyy
+SpecfileChangelogFormatter_0=Got
+SpecfileChangelogFormatter_1=\ editor
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/compare/Messages.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/compare/Messages.java
new file mode 100644
index 0000000000..8e24da3372
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/compare/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.ui.editor.compare;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.rpm.ui.editor.compare.messages"; //$NON-NLS-1$
+ public static String SpecMergeViewer_0;
+ public static String SpecStructureCreator_0;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/compare/SpecMergeViewer.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/compare/SpecMergeViewer.java
new file mode 100644
index 0000000000..acf7b8f929
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/compare/SpecMergeViewer.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * 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.compare;
+
+import org.eclipse.compare.CompareConfiguration;
+import org.eclipse.compare.contentmergeviewer.TextMergeViewer;
+import org.eclipse.jface.text.IDocumentPartitioner;
+import org.eclipse.jface.text.TextViewer;
+import org.eclipse.jface.text.source.SourceViewer;
+import org.eclipse.linuxtools.rpm.ui.editor.ColorManager;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileConfiguration;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfilePartitioner;
+import org.eclipse.linuxtools.rpm.ui.editor.scanners.SpecfilePartitionScanner;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * Merge viewer for the files.
+ *
+ */
+public class SpecMergeViewer extends TextMergeViewer {
+ private ColorManager colorManager;
+
+ /**
+ * Creates a new SpecMergeViewer.
+ *
+ * @param parent The parent control.
+ * @param configuration The compare configuration.
+ *
+ * @see TextMergeViewer#TextMergeViewer(Composite, CompareConfiguration)
+ */
+ public SpecMergeViewer(Composite parent, CompareConfiguration configuration) {
+ super(parent, configuration);
+ }
+
+ @Override
+ public String getTitle() {
+ return Messages.SpecMergeViewer_0;
+ }
+
+ @Override
+ protected IDocumentPartitioner getDocumentPartitioner() {
+ return new SpecfilePartitioner(new SpecfilePartitionScanner(),
+ SpecfilePartitionScanner.SPEC_PARTITION_TYPES);
+ }
+
+ @Override
+ protected void configureTextViewer(TextViewer textViewer) {
+ if (textViewer instanceof SourceViewer) {
+ this.colorManager = new ColorManager();
+ SpecfileEditor editor = new SpecfileEditor();
+ ((SourceViewer) textViewer).configure(new SpecfileConfiguration(
+ colorManager, editor));
+ }
+ }
+
+ /**
+ * Dispose the color manager and invoke the super method.
+ *
+ * @see org.eclipse.compare.contentmergeviewer.TextMergeViewer#handleDispose(org.eclipse.swt.events.DisposeEvent)
+ */
+ @Override
+ protected void handleDispose(DisposeEvent event) {
+ if (colorManager != null)
+ colorManager.dispose();
+ super.handleDispose(event);
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/compare/SpecMergeViewerCreator.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/compare/SpecMergeViewerCreator.java
new file mode 100644
index 0000000000..1606ca1815
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/compare/SpecMergeViewerCreator.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * 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.compare;
+
+import org.eclipse.compare.CompareConfiguration;
+import org.eclipse.compare.IViewerCreator;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * Viewer creator which creates a SpecMergeViewer.
+ *
+ */
+public class SpecMergeViewerCreator implements IViewerCreator {
+
+ /**
+ * @see org.eclipse.compare.IViewerCreator#createViewer(org.eclipse.swt.widgets
+ * .Composite, org.eclipse.compare.CompareConfiguration)
+ */
+ public Viewer createViewer(Composite parent, CompareConfiguration config) {
+ return new SpecMergeViewer(parent, config);
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/compare/SpecStructureCreator.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/compare/SpecStructureCreator.java
new file mode 100644
index 0000000000..ed6aeadbe7
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/compare/SpecStructureCreator.java
@@ -0,0 +1,233 @@
+/*******************************************************************************
+ * 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.compare;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+import org.eclipse.compare.CompareUI;
+import org.eclipse.compare.IEditableContent;
+import org.eclipse.compare.IEncodedStreamContentAccessor;
+import org.eclipse.compare.ISharedDocumentAdapter;
+import org.eclipse.compare.IStreamContentAccessor;
+import org.eclipse.compare.ITypedElement;
+import org.eclipse.compare.structuremergeviewer.DocumentRangeNode;
+import org.eclipse.compare.structuremergeviewer.IStructureComparator;
+import org.eclipse.compare.structuremergeviewer.StructureCreator;
+import org.eclipse.compare.structuremergeviewer.StructureRootNode;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentPartitioner;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileLog;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfilePartitioner;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfilePackage;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileParser;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileSection;
+import org.eclipse.linuxtools.rpm.ui.editor.scanners.SpecfilePartitionScanner;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * Structure creator making which structure is based on the following tree.
+ *
+ * <pre>
+ * ROOT_NODE
+ * SECTIONS...N
+ * SUB_PACKAGE...N
+ * SUB_PACKAGE_SECTIONS...N
+ * </pre>
+ */
+public class SpecStructureCreator extends StructureCreator {
+
+ static class SpecNode extends DocumentRangeNode implements ITypedElement {
+
+ public SpecNode(DocumentRangeNode parent, int type, String id,
+ IDocument doc, int start, int length) {
+ super(parent, type, id, doc, start, length);
+ if (parent != null) {
+ parent.addChild(SpecNode.this);
+ }
+ }
+
+ public String getName() {
+ return this.getId();
+ }
+
+ public String getType() {
+ return "spec"; //$NON-NLS-1$
+ }
+
+ public Image getImage() {
+ return CompareUI.getImage(getType());
+ }
+ }
+
+ public String getName() {
+ return Messages.SpecStructureCreator_0;
+ }
+
+ @Override
+ public IStructureComparator locate(Object path, Object input) {
+ return null;
+ }
+
+ public String getContents(Object node, boolean ignoreWhitespace) {
+ if (node instanceof IStreamContentAccessor) {
+ IStreamContentAccessor sca = (IStreamContentAccessor) node;
+ try {
+ return readString(sca);
+ } catch (CoreException ex) {
+ }
+ }
+ return null;
+ }
+
+ private void parseSpecfile(DocumentRangeNode root, IDocument doc,
+ IProgressMonitor monitor) {
+ try {
+ SpecfileParser parser = new SpecfileParser();
+ Specfile specfile = parser.parse(doc);
+ String id = specfile.getName();
+ SpecNode parent = new SpecNode(root, 0, id, doc, 0, doc.getLength());
+ monitor = beginWork(monitor);
+ for (SpecfileSection sec : specfile.getSections()) {
+ try {
+ addNode(parent, doc, sec.getName(), doc.getLineOffset(sec
+ .getLineNumber()), doc.getLineOffset(sec
+ .getSectionEndLine())
+ - doc.getLineOffset(sec.getLineNumber()));
+ } catch (BadLocationException e) {
+ SpecfileLog.logError(e);
+ }
+ }
+ for (SpecfilePackage sPackage : specfile.getPackages()
+ .getPackages()) {
+ try {
+ SpecNode pNode = addNode(parent, doc, sPackage
+ .getPackageName(), doc.getLineOffset(sPackage
+ .getLineNumber()), doc.getLineOffset(sPackage
+ .getSectionEndLine())
+ - doc.getLineOffset(sPackage.getLineNumber()));
+ for (SpecfileSection section : sPackage.getSections()) {
+ addNode(pNode, doc, section.getName(), doc
+ .getLineOffset(section.getLineNumber()), doc
+ .getLineOffset(section.getSectionEndLine())
+ - doc.getLineOffset(section.getLineNumber()));
+ }
+ } catch (BadLocationException e) {
+ SpecfileLog.logError(e);
+ }
+ }
+ } finally {
+ monitor.done();
+ }
+ }
+
+ private IProgressMonitor beginWork(IProgressMonitor monitor) {
+ if (monitor == null)
+ return new NullProgressMonitor();
+ return new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN);
+ }
+
+ private SpecNode addNode(DocumentRangeNode root, IDocument doc,
+ String name, int start, int end) {
+ return new SpecNode(root, 1, name, doc, start, end);
+ }
+
+ private static String readString(InputStream is, String encoding) {
+ if (is == null)
+ return null;
+ BufferedReader reader = null;
+ try {
+ StringBuffer buffer = new StringBuffer();
+ char[] part = new char[2048];
+ int read = 0;
+ reader = new BufferedReader(new InputStreamReader(is, encoding));
+
+ while ((read = reader.read(part)) != -1)
+ buffer.append(part, 0, read);
+
+ return buffer.toString();
+
+ } catch (IOException ex) {
+ // NeedWork
+ } finally {
+ if (reader != null) {
+ try {
+ reader.close();
+ } catch (IOException ex) {
+ // silently ignored
+ }
+ }
+ }
+ return null;
+ }
+
+ public static String readString(IStreamContentAccessor sa)
+ throws CoreException {
+ InputStream is = sa.getContents();
+ if (is != null) {
+ String encoding = null;
+ if (sa instanceof IEncodedStreamContentAccessor) {
+ try {
+ encoding = ((IEncodedStreamContentAccessor) sa)
+ .getCharset();
+ } catch (Exception e) {
+ }
+ }
+ if (encoding == null)
+ encoding = ResourcesPlugin.getEncoding();
+ return readString(is, encoding);
+ }
+ return null;
+ }
+
+ @Override
+ protected IDocumentPartitioner getDocumentPartitioner() {
+ return new SpecfilePartitioner(new SpecfilePartitionScanner(),
+ SpecfilePartitionScanner.SPEC_PARTITION_TYPES);
+ }
+
+ @Override
+ protected String getDocumentPartitioning() {
+ return SpecfilePartitionScanner.SPEC_FILE_PARTITIONING;
+ }
+
+ @Override
+ protected IStructureComparator createStructureComparator(Object input,
+ IDocument document, ISharedDocumentAdapter adapter,
+ IProgressMonitor monitor) throws CoreException {
+
+ final boolean isEditable;
+ if (input instanceof IEditableContent)
+ isEditable = ((IEditableContent) input).isEditable();
+ else
+ isEditable = false;
+
+ DocumentRangeNode rootNode = new StructureRootNode(document, input,
+ this, adapter) {
+ @Override
+ public boolean isEditable() {
+ return isEditable;
+ }
+ };
+ parseSpecfile(rootNode, document, monitor);
+ return rootNode;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/compare/SpecStructureMergeViewerCreator.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/compare/SpecStructureMergeViewerCreator.java
new file mode 100644
index 0000000000..f99ed5632c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/compare/SpecStructureMergeViewerCreator.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.compare;
+
+import org.eclipse.compare.CompareConfiguration;
+import org.eclipse.compare.IViewerCreator;
+import org.eclipse.compare.structuremergeviewer.StructureDiffViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * ViewerCreator which creates a StructureDiffViewer with a
+ * SpecStructureCreator.
+ *
+ */
+public class SpecStructureMergeViewerCreator implements IViewerCreator {
+
+ /**
+ * @see org.eclipse.compare.IViewerCreator#createViewer(org.eclipse.swt.widgets.Composite,
+ * org.eclipse.compare.CompareConfiguration)
+ */
+ public Viewer createViewer(Composite parent, CompareConfiguration config) {
+ StructureDiffViewer diffViewer = new StructureDiffViewer(parent, config);
+ diffViewer.setStructureCreator(new SpecStructureCreator());
+ return diffViewer;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/compare/messages.properties b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/compare/messages.properties
new file mode 100644
index 0000000000..f849c3d830
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/compare/messages.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
+###############################################################################
+SpecMergeViewer_0=Spec Compare
+SpecStructureCreator_0=Spec file compare
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/derived/AnnotationHover.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/derived/AnnotationHover.java
new file mode 100644
index 0000000000..a211bd15d6
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/derived/AnnotationHover.java
@@ -0,0 +1,490 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.editor.derived;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextHover;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationHover;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.projection.AnnotationBag;
+
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.texteditor.AnnotationPreference;
+
+/**
+ * An extensible implementation of both <code>IAnnotationHover</code> and
+ * <code>ITextHover</code> that displays the messages of {@link Annotation}s
+ * that are displayed on any ruler or inline in a text viewer.
+ */
+public class AnnotationHover implements IAnnotationHover, ITextHover {
+ /** An empty <code>null</code> object. */
+ private static final IRegion NO_REGION= new Region(-1, -1);
+ /**
+ * A tuple of an {@link Annotation} and its associated {@link Position}.
+ */
+ protected final static class Tuple {
+
+ /** The annotation, never <code>null</code>. */
+ public final Annotation annotation;
+ /** The position, never <code>null</code>. */
+ public final Position position;
+
+ /**
+ * Creates a new tuple
+ * @param annotation the annotation
+ * @param position the position
+ */
+ Tuple(Annotation annotation, Position position) {
+ Assert.isNotNull(annotation);
+ Assert.isNotNull(position);
+ this.annotation= annotation;
+ this.position= position;
+ }
+ }
+
+ /** The preference store used to get the visibility preferences. */
+ private final IPreferenceStore fPreferences= EditorsUI.getPreferenceStore();
+
+ /**
+ * Creates a new hover.
+ */
+ public AnnotationHover() {
+ }
+
+ /**
+ * Returns the annotations whose positions intersect with the given region.
+ *
+ * @param model the annotation model or <code>null</code>
+ * @param region the document region of interest
+ * @return the list of tuples whose annotations intersect with
+ * <code>region</code>
+ */
+ private List<Tuple> getAnnotations(IAnnotationModel model, final IRegion region) {
+ if (model == null || region == NO_REGION)
+ return Collections.EMPTY_LIST;
+
+ List<Tuple> annotations= new ArrayList<Tuple>();
+ Iterator<Annotation> iterator= model.getAnnotationIterator();
+
+ while (iterator.hasNext()) {
+ Annotation annotation= iterator.next();
+ Position position= model.getPosition(annotation);
+
+ if (position == null)
+ continue;
+
+ Tuple tuple= new Tuple(annotation, position);
+ if (internalFilter(tuple, region))
+ continue;
+
+ if (annotation instanceof AnnotationBag) {
+ AnnotationBag bag= (AnnotationBag) annotation;
+ Iterator<Annotation> e= bag.iterator();
+ while (e.hasNext()) {
+ annotation= e.next();
+ position= model.getPosition(annotation);
+ if (position != null)
+ annotations.add(new Tuple(annotation, position));
+ }
+ continue;
+ }
+
+ annotations.add(tuple);
+ }
+
+ return annotations;
+ }
+
+ /**
+ * Returns <code>true</code> if the annotation should be filtered,
+ * <code>false</code> if not. Returns <code>true</code> if the position
+ * does not overlap with the hover region, the annotation is not visible, or
+ * <code>filter</code> returns true.
+ *
+ * @param tuple a tuple of <code>&lt;Annotation, Position&gt;</code>
+ * @param region the document region of interest
+ * @return <code>true</code> if the annotation is filtered out,
+ * <code>false</code> if it passes
+ */
+ private boolean internalFilter(Tuple tuple, IRegion region) {
+ return !isRegionMatch(region, tuple.position) || !isVisible(tuple.annotation) || filter(tuple, region);
+ }
+
+ /**
+ * Returns <code>true</code> if <code>annotation</code> is visible for
+ * this hover, <code>false</code> if it is not.
+ * <p>
+ * Subclasses may extend or replace. The default implementation is to return
+ * <code>true</code> if any of the <code>isVisible...</code>methods
+ * returns <code>true</code>.
+ * </p>
+ *
+ * @param annotation the annotation to return the visibility for
+ * @return <code>true</code> if the annotation is visible, false if not
+ */
+ protected boolean isVisible(Annotation annotation) {
+ return isVisibleOnOverviewRuler(annotation) || isVisibleOnAnnotationRuler(annotation) || isVisibleInText(annotation);
+ }
+
+ /**
+ * Returns the annotation preference for the given annotation.
+ *
+ * @param annotation the annotation
+ * @return the annotation preference or <code>null</code> if none
+ */
+ private AnnotationPreference getAnnotationPreference(Annotation annotation) {
+ return EditorsUI.getAnnotationPreferenceLookup().getAnnotationPreference(annotation);
+ }
+
+ /**
+ * Returns <code>true</code> if <code>annotation</code> is visible on
+ * the overview ruler.
+ *
+ * @param annotation the annotation to check the visibility of
+ * @return <code>true</code> if <code>annotation</code> is visible on
+ * the overview ruler, <code>false</code> otherwise
+ */
+ protected final boolean isVisibleOnOverviewRuler(Annotation annotation) {
+ AnnotationPreference preference= getAnnotationPreference(annotation);
+ if (preference == null)
+ return false;
+
+ String key= preference.getOverviewRulerPreferenceKey();
+ return key != null && fPreferences.getBoolean(key);
+ }
+
+ /**
+ * Returns <code>true</code> if <code>annotation</code> is visible on
+ * the annotation ruler.
+ *
+ * @param annotation the annotation to check the visibility of
+ * @return <code>true</code> if <code>annotation</code> is visible on
+ * the annotation ruler, <code>false</code> otherwise
+ */
+ protected final boolean isVisibleOnAnnotationRuler(Annotation annotation) {
+ AnnotationPreference preference= getAnnotationPreference(annotation);
+ if (preference == null)
+ return false;
+
+ String key= preference.getVerticalRulerPreferenceKey();
+ return key == null || fPreferences.getBoolean(key);
+ }
+
+ /**
+ * Returns <code>true</code> if <code>annotation</code> is visible in
+ * the text viewer (highlighted or decorated).
+ *
+ * @param annotation the annotation to check the visibility of
+ * @return <code>true</code> if <code>annotation</code> is visible in
+ * the text viewer, <code>false</code> otherwise
+ */
+ protected final boolean isVisibleInText(Annotation annotation) {
+ AnnotationPreference preference= getAnnotationPreference(annotation);
+ if (preference == null)
+ return false;
+
+ String key= preference.getTextPreferenceKey();
+ if (key != null)
+ return fPreferences.getBoolean(key);
+ key= preference.getHighlightPreferenceKey();
+ return key == null || fPreferences.getBoolean(key);
+ }
+
+ /**
+ * Returns <code>true</code> if the annotation should be filtered,
+ * <code>false</code> if not. The default returns <code>false</code>.
+ *
+ * @param tuple a tuple of <code>&lt;Annotation, Position&gt;</code>
+ * @param region the document region of interest
+ * @return <code>true</code> if the annotation is filtered out,
+ * <code>false</code> if it passes
+ */
+ protected boolean filter(Tuple tuple, IRegion region) {
+ return false;
+ }
+
+ /**
+ * Checks whether <code>hoverRegion</code> intersects with
+ * <code>position</code>.
+ *
+ * @param region the region of interest, or <code>null</code>
+ * @param position the position to check for intersection, or
+ * <code>null</code>
+ * @return <code>true</code> if <code>hoverRegion</code> and
+ * <code>position</code> intersect, <code>false</code> if not,
+ * or if either argument is <code>null</code>
+ */
+ protected boolean isRegionMatch(IRegion region, Position position) {
+ if (position == null || region == null)
+ return false;
+ return position.overlapsWith(region.getOffset(), region.getLength());
+ }
+
+ /*
+ * @see org.eclipse.jface.text.source.IAnnotationHover#getHoverInfo(org.eclipse.jface.text.source.ISourceViewer, int)
+ */
+ public final String getHoverInfo(ISourceViewer sourceViewer, int lineNumber) {
+ IRegion region= getLineCoverage(sourceViewer, lineNumber);
+ List<Tuple> tuples= getAnnotations(sourceViewer.getAnnotationModel(), region);
+ return computeHoverMessage(tuples);
+ }
+
+ /**
+ * Returns a region describing the line <code>lineNumber</code> in the
+ * <code>IDocument</code> of <code>viewer</code>.
+ *
+ * @param viewer the viewer to get the document from
+ * @param lineNumber the line number
+ * @return the document region describing the line <code>lineNumber</code>,
+ * or <code>NO_REGION</code>
+ */
+ private IRegion getLineCoverage(ITextViewer viewer, int lineNumber) {
+ IDocument document= viewer.getDocument();
+ if (document != null) {
+ try {
+ return document.getLineInformation(lineNumber);
+ } catch (BadLocationException e) {
+ return NO_REGION;
+ }
+ }
+ return NO_REGION;
+ }
+
+ /**
+ * Caches the list of tuples computed in <code>getHoverRegion</code> for
+ * later use in <code>getHoverInfo</code>.
+ */
+ private transient List<Tuple> fAnnotationCache;
+
+ /*
+ * @see org.eclipse.jface.text.ITextHover#getHoverInfo(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion)
+ */
+ public final String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
+ if (fAnnotationCache == null)
+ return null;
+ return computeHoverMessage(fAnnotationCache);
+ }
+
+ /*
+ * @see org.eclipse.jface.text.ITextHover#getHoverRegion(org.eclipse.jface.text.ITextViewer, int)
+ */
+ public final IRegion getHoverRegion(ITextViewer textViewer, int offset) {
+ fAnnotationCache= null;
+ if (!(textViewer instanceof ISourceViewer))
+ return null;
+ ISourceViewer viewer= (ISourceViewer) textViewer;
+ IAnnotationModel model= viewer.getAnnotationModel();
+
+ // hover region should not have length 0 to get meaningful relevances
+ IRegion hoverRegion= new Region(offset, 1);
+ List<Tuple> tuples= getAnnotations(model, hoverRegion);
+ List<Tuple> selected= select(tuples, hoverRegion);
+ IRegion coverage= computeCoverage(selected);
+ if (coverage == NO_REGION)
+ return null;
+ fAnnotationCache= selected;
+ return coverage;
+ }
+
+ /**
+ * Selects the tuples to display from the given list. Subclasses may
+ * replace.
+ * <p>
+ * The default behavior is to return the tuples whose positions most
+ * precisely match the <code>hoverRegion</code>.
+ * </p>
+ *
+ * @param tuples the list of <code>Tuple</code>
+ * @param hoverRegion the region of interest
+ * @return the list of <code>Tuple</code>s to display
+ */
+ protected List<Tuple> select(List<Tuple> tuples, IRegion hoverRegion) {
+ if (tuples.isEmpty())
+ return tuples;
+
+ float max_relevance= Float.MIN_VALUE;
+ List<Tuple> selected= new ArrayList<Tuple>();
+ for (Tuple tuple:tuples) {
+ float relevance= computeRelevance(tuple.position, hoverRegion);
+ if (relevance > max_relevance) {
+ max_relevance= relevance;
+ selected.clear();
+ selected.add(tuple);
+ } else if (relevance == max_relevance) {
+ selected.add(tuple);
+ }
+ }
+
+ return selected;
+ }
+
+ /**
+ * Computes the relevance of <code>position</code> with respect to the
+ * <code>hoverRegion</code>. The relevance is computed from two
+ * properties dependent on the <em>intersection</em> of
+ * <code>position</code> and <code>hoverRegion</code>:
+ * <ul>
+ * <li><strong>precision</strong> - the quotient of the
+ * <em>intersection</em> length and the <code>position</code> length</li>
+ * <li><strong>recall</strong> - the quotient of the <em>intersection</em>
+ * length and the <code>hoverRegion</code> length</li>
+ * </ul>
+ * <em>Precision</em> is considered more important than <em>recall</em>.
+ *
+ * @param position the position
+ * @param hoverRegion the hoverRegion
+ * @return the relevance of <code>position</code> with respect to
+ * <code>hoverRegion</code>
+ */
+ private float computeRelevance(Position position, IRegion hoverRegion) {
+ float intersectionLength= intersectionLength(position, hoverRegion);
+ float positionLength= position.getLength();
+ float sign= intersectionLength < 0 ? -1f : 1f;
+ float precision= positionLength == 0 ? 1f * sign : intersectionLength / positionLength;
+ float hoverRegionLength= hoverRegion.getLength();
+ float recall= hoverRegionLength == 0 ? 1f * sign : intersectionLength / hoverRegionLength;
+
+ float relevance= precision * 1000f + recall;
+ return relevance;
+ }
+
+ /**
+ * Returns the intersection length of a position and a region. The returned
+ * value may be negative if there is no intersection.
+ *
+ * @param position the position
+ * @param region the region
+ * @return the intersection length of <code>position</code> and
+ * <code>region</code>, negative if they don't intersect
+ */
+ private int intersectionLength(Position position, IRegion region) {
+ int offset= Math.max(position.getOffset(), region.getOffset());
+ int endOffset= Math.min(endOffset(position), endOffset(region));
+
+ return endOffset - offset;
+ }
+
+ /**
+ * Computes the region covering all positions in the given list of tuples.
+ *
+ * @param selected a list of <code>Tuple</code>
+ * @return the coverage of all positions
+ */
+ private IRegion computeCoverage(List<Tuple> selected) {
+ int offset= Integer.MAX_VALUE, endOffset= Integer.MIN_VALUE;
+ for (Tuple tuple:selected) {
+ if (!tuple.position.isDeleted()) {
+ offset= Math.min(tuple.position.getOffset(), offset);
+ endOffset= Math.max(endOffset(tuple.position), endOffset);
+ }
+ }
+ if (offset < Integer.MAX_VALUE && endOffset > Integer.MIN_VALUE)
+ return new Region(offset, endOffset - offset);
+ return NO_REGION;
+ }
+
+ /**
+ * Returns the end offset of a <code>position</code>.
+ *
+ * @param position the position to get the end offset of
+ * @return the end offset of <code>position</code>
+ */
+ private int endOffset(Position position) {
+ return position.getOffset() + position.getLength();
+ }
+
+ /**
+ * Returns the end offset of a <code>region</code>.
+ *
+ * @param region the region to get the end offset of
+ * @return the end offset of <code>region</code>
+ */
+ private int endOffset(IRegion region) {
+ return region.getOffset() + region.getLength();
+ }
+
+ /**
+ * Assembles the hover message from a list of
+ * <code>&lt;Annotation,Position&gt;</code> tuples.
+ *
+ * @param tuples the list of tuples
+ * @return the hover message, may be <code>null</code> if there are no
+ * messages
+ */
+ private String computeHoverMessage(List<Tuple> tuples) {
+ if (tuples.isEmpty())
+ return null;
+ List<String> messages= new ArrayList<String>();
+ for (Tuple tuple: tuples) {
+ String message= getMessage(tuple.annotation);
+ if (message != null)
+ messages.add(message.trim());
+ }
+ switch (messages.size()) {
+ case 0:
+ return null;
+ case 1:
+ return messages.get(0);
+ default:
+ return formatMultipleMessages(messages);
+ }
+ }
+
+ /**
+ * Returns the message text for a given annotation, or <code>null</code>
+ * if no message should be included for <code>annotation</code>.
+ * <p>
+ * Subclasses may replace. The default implementation returns the result of
+ * <code>annotation.getText()</code> if it is non-empty, <code>null</code>
+ * otherwise.
+ * </p>
+ *
+ * @param annotation the annotation to get the message for
+ * @return the annotation's message, or <code>null</code> for no message
+ */
+ protected String getMessage(Annotation annotation) {
+ final String text= annotation.getText();
+ return text == null || text.trim().length() == 0 ? null : text;
+ }
+
+ /**
+ * Appends a list of <code>String</code>, each on its own line
+ *
+ * @param messages the list of messages
+ * @return a <code>String</code> with all messages appended on their own
+ * line
+ */
+ private String formatMultipleMessages(List<String> messages) {
+ StringBuilder buf= new StringBuilder();
+ for (Iterator<String> it= messages.iterator(); it.hasNext();) {
+ String msg= it.next();
+ buf.append(msg);
+ if (it.hasNext())
+ buf.append('\n');
+ }
+ return buf.toString();
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/derived/HTML2TextReader.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/derived/HTML2TextReader.java
new file mode 100644
index 0000000000..3f97aa6e1a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/derived/HTML2TextReader.java
@@ -0,0 +1,330 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.editor.derived;
+
+
+import java.io.IOException;
+import java.io.PushbackReader;
+import java.io.Reader;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyleRange;
+
+import org.eclipse.jface.text.TextPresentation;
+
+
+/**
+ * Reads the text contents from a reader of HTML contents and translates
+ * the tags or cut them out.
+ * <p>
+ * Moved into this package from <code>org.eclipse.jface.internal.text.html</code>.</p>
+ */
+public class HTML2TextReader extends SubstitutionTextReader {
+
+ private static final String EMPTY_STRING= ""; //$NON-NLS-1$
+ private static final Map<String, String> fgEntityLookup;
+ private static final Set<String> fgTags;
+
+ static {
+
+ fgTags= new HashSet<String>();
+ fgTags.add("b"); //$NON-NLS-1$
+ fgTags.add("br"); //$NON-NLS-1$
+ fgTags.add("br/"); //$NON-NLS-1$
+ fgTags.add("div"); //$NON-NLS-1$
+ fgTags.add("h1"); //$NON-NLS-1$
+ fgTags.add("h2"); //$NON-NLS-1$
+ fgTags.add("h3"); //$NON-NLS-1$
+ fgTags.add("h4"); //$NON-NLS-1$
+ fgTags.add("h5"); //$NON-NLS-1$
+ fgTags.add("p"); //$NON-NLS-1$
+ fgTags.add("dl"); //$NON-NLS-1$
+ fgTags.add("dt"); //$NON-NLS-1$
+ fgTags.add("dd"); //$NON-NLS-1$
+ fgTags.add("li"); //$NON-NLS-1$
+ fgTags.add("ul"); //$NON-NLS-1$
+ fgTags.add("pre"); //$NON-NLS-1$
+ fgTags.add("head"); //$NON-NLS-1$
+
+ fgEntityLookup= new HashMap<String, String>(7);
+ fgEntityLookup.put("lt", "<"); //$NON-NLS-1$ //$NON-NLS-2$
+ fgEntityLookup.put("gt", ">"); //$NON-NLS-1$ //$NON-NLS-2$
+ fgEntityLookup.put("nbsp", " "); //$NON-NLS-1$ //$NON-NLS-2$
+ fgEntityLookup.put("amp", "&"); //$NON-NLS-1$ //$NON-NLS-2$
+ fgEntityLookup.put("circ", "^"); //$NON-NLS-1$ //$NON-NLS-2$
+ fgEntityLookup.put("tilde", "~"); //$NON-NLS-2$ //$NON-NLS-1$
+ fgEntityLookup.put("quot", "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ private int fCounter= 0;
+ private TextPresentation fTextPresentation;
+ private int fBold= 0;
+ private int fStartOffset= -1;
+ private boolean fInParagraph= false;
+ private boolean fIsPreformattedText= false;
+ private boolean fIgnore= false;
+ private boolean fHeaderDetected= false;
+
+ /**
+ * Transforms the HTML text from the reader to formatted text.
+ *
+ * @param reader the reader
+ * @param presentation If not <code>null</code>, formattings will be applied to
+ * the presentation.
+ */
+ public HTML2TextReader(Reader reader, TextPresentation presentation) {
+ super(new PushbackReader(reader));
+ fTextPresentation= presentation;
+ }
+
+ @Override
+ public int read() throws IOException {
+ int c= super.read();
+ if (c != -1)
+ ++ fCounter;
+ return c;
+ }
+
+ protected void startBold() {
+ if (fBold == 0)
+ fStartOffset= fCounter;
+ ++ fBold;
+ }
+
+ protected void startPreformattedText() {
+ fIsPreformattedText= true;
+ setSkipWhitespace(false);
+ }
+
+ protected void stopPreformattedText() {
+ fIsPreformattedText= false;
+ setSkipWhitespace(true);
+ }
+
+ protected void stopBold() {
+ -- fBold;
+ if (fBold == 0) {
+ if (fTextPresentation != null) {
+ fTextPresentation.addStyleRange(new StyleRange(fStartOffset, fCounter - fStartOffset, null, null, SWT.BOLD));
+ }
+ fStartOffset= -1;
+ }
+ }
+
+ /*
+ * @see org.eclipse.jdt.internal.ui.text.SubstitutionTextReader#computeSubstitution(int)
+ */
+ @Override
+ protected String computeSubstitution(int c) throws IOException {
+
+ if (c == '<')
+ return processHTMLTag();
+ else if (fIgnore)
+ return EMPTY_STRING;
+ else if (c == '&')
+ return processEntity();
+ else if (fIsPreformattedText)
+ return processPreformattedText(c);
+
+ return null;
+ }
+
+ private String html2Text(String html) {
+
+ if (html == null || html.length() == 0)
+ return EMPTY_STRING;
+
+ html= html.toLowerCase();
+
+ String tag= html;
+ if ('/' == tag.charAt(0))
+ tag= tag.substring(1);
+
+ if (!fgTags.contains(tag))
+ return EMPTY_STRING;
+
+
+ if ("pre".equals(html)) { //$NON-NLS-1$
+ startPreformattedText();
+ return EMPTY_STRING;
+ }
+
+ if ("/pre".equals(html)) { //$NON-NLS-1$
+ stopPreformattedText();
+ return EMPTY_STRING;
+ }
+
+ if (fIsPreformattedText)
+ return EMPTY_STRING;
+
+ if ("b".equals(html)) { //$NON-NLS-1$
+ startBold();
+ return EMPTY_STRING;
+ }
+
+ if ((html.length() > 1 && html.charAt(0) == 'h' && Character.isDigit(html.charAt(1))) || "dt".equals(html)) { //$NON-NLS-1$
+ startBold();
+ return EMPTY_STRING;
+ }
+
+ if ("dl".equals(html)) //$NON-NLS-1$
+ return LINE_DELIM;
+
+ if ("dd".equals(html)) //$NON-NLS-1$
+ return "\t"; //$NON-NLS-1$
+
+ if ("li".equals(html)) //$NON-NLS-1$
+ // FIXME: this hard-coded prefix does not work for RTL languages, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=91682
+ return LINE_DELIM + "\t-"; //$NON-NLS-1$
+
+ if ("/b".equals(html)) { //$NON-NLS-1$
+ stopBold();
+ return EMPTY_STRING;
+ }
+
+ if ("p".equals(html)) { //$NON-NLS-1$
+ fInParagraph= true;
+ return LINE_DELIM;
+ }
+
+ if ("br".equals(html) || "br/".equals(html) || "div".equals(html)) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ return LINE_DELIM;
+
+ if ("/p".equals(html)) { //$NON-NLS-1$
+ boolean inParagraph= fInParagraph;
+ fInParagraph= false;
+ return inParagraph ? EMPTY_STRING : LINE_DELIM;
+ }
+
+ if ((html.startsWith("/h") && html.length() > 2 && Character.isDigit(html.charAt(2))) || "/dt".equals(html)) { //$NON-NLS-1$ //$NON-NLS-2$
+ stopBold();
+ return LINE_DELIM;
+ }
+
+ if ("/dd".equals(html)) //$NON-NLS-1$
+ return LINE_DELIM;
+
+ if ("head".equals(html) && !fHeaderDetected) { //$NON-NLS-1$
+ fHeaderDetected= true;
+ fIgnore= true;
+ return EMPTY_STRING;
+ }
+
+ if ("/head".equals(html) && fHeaderDetected && fIgnore) { //$NON-NLS-1$
+ fIgnore= false;
+ return EMPTY_STRING;
+ }
+
+ return EMPTY_STRING;
+ }
+
+ /*
+ * A '<' has been read. Process a html tag
+ */
+ private String processHTMLTag() throws IOException {
+
+ StringBuffer buf= new StringBuffer();
+ int ch;
+ do {
+
+ ch= nextChar();
+
+ while (ch != -1 && ch != '>') {
+ buf.append(Character.toLowerCase((char) ch));
+ ch= nextChar();
+ if (ch == '"'){
+ buf.append(Character.toLowerCase((char) ch));
+ ch= nextChar();
+ while (ch != -1 && ch != '"'){
+ buf.append(Character.toLowerCase((char) ch));
+ ch= nextChar();
+ }
+ }
+ if (ch == '<'){
+ unread(ch);
+ return '<' + buf.toString();
+ }
+ }
+
+ if (ch == -1)
+ return null;
+
+ int tagLen= buf.length();
+ // needs special treatment for comments
+ if ((tagLen >= 3 && "!--".equals(buf.substring(0, 3))) //$NON-NLS-1$
+ && !(tagLen >= 5 && "--".equals(buf.substring(tagLen - 2)))) { //$NON-NLS-1$
+ // unfinished comment
+ buf.append(ch);
+ } else {
+ break;
+ }
+ } while (true);
+
+ return html2Text(buf.toString());
+ }
+
+ private String processPreformattedText(int c) {
+ if (c == '\r' || c == '\n')
+ fCounter++;
+ return null;
+ }
+
+
+ private void unread(int ch) throws IOException {
+ ((PushbackReader) getReader()).unread(ch);
+ }
+
+ protected String entity2Text(String symbol) {
+ if (symbol.length() > 1 && symbol.charAt(0) == '#') {
+ int ch;
+ try {
+ if (symbol.charAt(1) == 'x') {
+ ch= Integer.parseInt(symbol.substring(2), 16);
+ } else {
+ ch= Integer.parseInt(symbol.substring(1), 10);
+ }
+ return EMPTY_STRING + (char)ch;
+ } catch (NumberFormatException e) {
+ }
+ } else {
+ String str= fgEntityLookup.get(symbol);
+ if (str != null) {
+ return str;
+ }
+ }
+ return "&" + symbol; // not found //$NON-NLS-1$
+ }
+
+ /*
+ * A '&' has been read. Process a entity
+ */
+ private String processEntity() throws IOException {
+ StringBuffer buf= new StringBuffer();
+ int ch= nextChar();
+ while (Character.isLetterOrDigit((char)ch) || ch == '#') {
+ buf.append((char) ch);
+ ch= nextChar();
+ }
+
+ if (ch == ';')
+ return entity2Text(buf.toString());
+
+ buf.insert(0, '&');
+ if (ch != -1)
+ buf.append((char) ch);
+ return buf.toString();
+ }
+}
+
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/derived/HTMLTextPresenter.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/derived/HTMLTextPresenter.java
new file mode 100644
index 0000000000..695f2b2994
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/derived/HTMLTextPresenter.java
@@ -0,0 +1,202 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.editor.derived;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.StringReader;
+import java.util.Iterator;
+
+import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.swt.graphics.Drawable;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.widgets.Display;
+
+import org.eclipse.jface.text.DefaultInformationControl;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.TextPresentation;
+
+
+/**
+ * <p>
+ * Moved into this package from <code>org.eclipse.jface.internal.text.html</code>.</p>
+ */
+public class HTMLTextPresenter implements DefaultInformationControl.IInformationPresenter, DefaultInformationControl.IInformationPresenterExtension {
+
+ private static final String LINE_DELIM= System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ private int fCounter;
+ private boolean fEnforceUpperLineLimit;
+
+ public HTMLTextPresenter(boolean enforceUpperLineLimit) {
+ super();
+ fEnforceUpperLineLimit= enforceUpperLineLimit;
+ }
+
+ public HTMLTextPresenter() {
+ this(true);
+ }
+
+ protected Reader createReader(String hoverInfo, TextPresentation presentation) {
+ return new HTML2TextReader(new StringReader(hoverInfo), presentation);
+ }
+
+ protected void adaptTextPresentation(TextPresentation presentation, int offset, int insertLength) {
+
+ int yoursStart= offset;
+ int yoursEnd= offset + insertLength -1;
+ yoursEnd= Math.max(yoursStart, yoursEnd);
+
+ Iterator<StyleRange> e= presentation.getAllStyleRangeIterator();
+ while (e.hasNext()) {
+
+ StyleRange range= e.next();
+
+ int myStart= range.start;
+ int myEnd= range.start + range.length -1;
+ myEnd= Math.max(myStart, myEnd);
+
+ if (myEnd < yoursStart)
+ continue;
+
+ if (myStart < yoursStart)
+ range.length += insertLength;
+ else
+ range.start += insertLength;
+ }
+ }
+
+ private void append(StringBuffer buffer, String string, TextPresentation presentation) {
+
+ int length= string.length();
+ buffer.append(string);
+
+ if (presentation != null)
+ adaptTextPresentation(presentation, fCounter, length);
+
+ fCounter += length;
+ }
+
+ private String getIndent(String line) {
+ int length= line.length();
+
+ int i= 0;
+ while (i < length && Character.isWhitespace(line.charAt(i))) ++i;
+
+ return (i == length ? line : line.substring(0, i)) + " "; //$NON-NLS-1$
+ }
+
+ /*
+ * @see IHoverInformationPresenter#updatePresentation(Display display, String, TextPresentation, int, int)
+ */
+ public String updatePresentation(Display display, String hoverInfo, TextPresentation presentation, int maxWidth, int maxHeight) {
+ return updatePresentation((Drawable)display, hoverInfo, presentation, maxWidth, maxHeight);
+ }
+
+ /*
+ * @see IHoverInformationPresenterExtension#updatePresentation(Drawable drawable, String, TextPresentation, int, int)
+ * @since 3.2
+ */
+ public String updatePresentation(Drawable drawable, String hoverInfo, TextPresentation presentation, int maxWidth, int maxHeight) {
+
+ if (hoverInfo == null)
+ return null;
+
+ GC gc= new GC(drawable);
+ try {
+
+ StringBuffer buffer= new StringBuffer();
+ int maxNumberOfLines= Math.round(maxHeight / gc.getFontMetrics().getHeight());
+
+ fCounter= 0;
+ LineBreakingReader reader= new LineBreakingReader(createReader(hoverInfo, presentation), gc, maxWidth);
+
+ boolean lastLineFormatted= false;
+ String lastLineIndent= null;
+
+ String line=reader.readLine();
+ boolean lineFormatted= reader.isFormattedLine();
+ boolean firstLineProcessed= false;
+
+ while (line != null) {
+
+ if (fEnforceUpperLineLimit && maxNumberOfLines <= 0)
+ break;
+
+ if (firstLineProcessed) {
+ if (!lastLineFormatted)
+ append(buffer, LINE_DELIM, null);
+ else {
+ append(buffer, LINE_DELIM, presentation);
+ if (lastLineIndent != null)
+ append(buffer, lastLineIndent, presentation);
+ }
+ }
+
+ append(buffer, line, null);
+ firstLineProcessed= true;
+
+ lastLineFormatted= lineFormatted;
+ if (!lineFormatted)
+ lastLineIndent= null;
+ else if (lastLineIndent == null)
+ lastLineIndent= getIndent(line);
+
+ line= reader.readLine();
+ lineFormatted= reader.isFormattedLine();
+
+ maxNumberOfLines--;
+ }
+
+ if (line != null) {
+ append(buffer, LINE_DELIM, lineFormatted ? presentation : null);
+ append(buffer,"...", presentation); //$NON-NLS-1$
+ }
+
+ return trim(buffer, presentation);
+
+ } catch (IOException e) {
+
+ // ignore TODO do something else?
+ return null;
+
+ } finally {
+ gc.dispose();
+ }
+ }
+
+ private String trim(StringBuffer buffer, TextPresentation presentation) {
+
+ int length= buffer.length();
+
+ int end= length -1;
+ while (end >= 0 && Character.isWhitespace(buffer.charAt(end)))
+ -- end;
+
+ if (end == -1)
+ return ""; //$NON-NLS-1$
+
+ if (end < length -1)
+ buffer.delete(end + 1, length);
+ else
+ end= length;
+
+ int start= 0;
+ while (start < end && Character.isWhitespace(buffer.charAt(start)))
+ ++ start;
+
+ buffer.delete(0, start);
+ presentation.setResultWindow(new Region(start, buffer.length()));
+ return buffer.toString();
+ }
+}
+
+
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/derived/LineBreakingReader.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/derived/LineBreakingReader.java
new file mode 100644
index 0000000000..4eb00c017e
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/derived/LineBreakingReader.java
@@ -0,0 +1,133 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.editor.derived;
+
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.Reader;
+
+import com.ibm.icu.text.BreakIterator;
+import org.eclipse.swt.graphics.GC;
+
+/**
+ * Not a real reader. Could change if requested
+ * <p>Moved into this package from <code>org.eclipse.jface.internal.text.html</code>.</p>
+ */
+public class LineBreakingReader {
+
+ private BufferedReader fReader;
+ private GC fGC;
+ private int fMaxWidth;
+
+ private String fLine;
+ private int fOffset;
+
+ private BreakIterator fLineBreakIterator;
+ private boolean fBreakWords;
+
+ /**
+ * Creates a reader that breaks an input text to fit in a given width.
+ *
+ * @param reader Reader of the input text
+ * @param gc The graphic context that defines the currently used font sizes
+ * @param maxLineWidth The max width (pixels) where the text has to fit in
+ */
+ public LineBreakingReader(Reader reader, GC gc, int maxLineWidth) {
+ fReader= new BufferedReader(reader);
+ fGC= gc;
+ fMaxWidth= maxLineWidth;
+ fOffset= 0;
+ fLine= null;
+ fLineBreakIterator= BreakIterator.getLineInstance();
+ fBreakWords= true;
+ }
+
+ public boolean isFormattedLine() {
+ return fLine != null;
+ }
+
+ /**
+ * Reads the next line. The lengths of the line will not exceed the given maximum
+ * width.
+ *
+ * @return the next line
+ * @throws IOException
+ */
+ public String readLine() throws IOException {
+ if (fLine == null) {
+ String line= fReader.readLine();
+ if (line == null)
+ return null;
+
+ int lineLen= fGC.textExtent(line).x;
+ if (lineLen < fMaxWidth) {
+ return line;
+ }
+ fLine= line;
+ fLineBreakIterator.setText(line);
+ fOffset= 0;
+ }
+ int breakOffset= findNextBreakOffset(fOffset);
+ String res;
+ if (breakOffset != BreakIterator.DONE) {
+ res= fLine.substring(fOffset, breakOffset);
+ fOffset= findWordBegin(breakOffset);
+ if (fOffset == fLine.length()) {
+ fLine= null;
+ }
+ } else {
+ res= fLine.substring(fOffset);
+ fLine= null;
+ }
+ return res;
+ }
+
+ private int findNextBreakOffset(int currOffset) {
+ int currWidth= 0;
+ int nextOffset= fLineBreakIterator.following(currOffset);
+ while (nextOffset != BreakIterator.DONE) {
+ String word= fLine.substring(currOffset, nextOffset);
+ int wordWidth= fGC.textExtent(word).x;
+ int nextWidth= wordWidth + currWidth;
+ if (nextWidth > fMaxWidth) {
+ if (currWidth > 0)
+ return currOffset;
+
+ if (!fBreakWords)
+ return nextOffset;
+
+ // need to fit into fMaxWidth
+ int length= word.length();
+ while (length >= 0) {
+ length--;
+ word= word.substring(0, length);
+ wordWidth= fGC.textExtent(word).x;
+ if (wordWidth + currWidth < fMaxWidth)
+ return currOffset + length;
+ }
+ return nextOffset;
+ }
+ currWidth= nextWidth;
+ currOffset= nextOffset;
+ nextOffset= fLineBreakIterator.next();
+ }
+ return nextOffset;
+ }
+
+ private int findWordBegin(int idx) {
+ while (idx < fLine.length() && Character.isWhitespace(fLine.charAt(idx))) {
+ idx++;
+ }
+ return idx;
+ }
+}
+
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/derived/SingleCharReader.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/derived/SingleCharReader.java
new file mode 100644
index 0000000000..ed5f697c5d
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/derived/SingleCharReader.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.editor.derived;
+
+
+import java.io.IOException;
+import java.io.Reader;
+
+
+/**
+ * <p>
+ * Moved into this package from <code>org.eclipse.jface.internal.text.html</code>.</p>
+ */
+public abstract class SingleCharReader extends Reader {
+
+ /**
+ * @see Reader#read()
+ */
+ @Override
+ public abstract int read() throws IOException;
+
+ /**
+ * @see Reader#read(char[],int,int)
+ */
+ @Override
+ public int read(char cbuf[], int off, int len) throws IOException {
+ int end= off + len;
+ for (int i= off; i < end; i++) {
+ int ch= read();
+ if (ch == -1) {
+ if (i == off)
+ return -1;
+ return i - off;
+ }
+ cbuf[i]= (char)ch;
+ }
+ return len;
+ }
+
+ /**
+ * @see Reader#ready()
+ */
+ @Override
+ public boolean ready() throws IOException {
+ return true;
+ }
+
+ /**
+ * Returns the readable content as string.
+ * @return the readable content as string
+ * @exception IOException in case reading fails
+ */
+ public String getString() throws IOException {
+ StringBuffer buf= new StringBuffer();
+ int ch;
+ while ((ch= read()) != -1) {
+ buf.append((char)ch);
+ }
+ return buf.toString();
+ }
+}
+
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/derived/SubstitutionTextReader.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/derived/SubstitutionTextReader.java
new file mode 100644
index 0000000000..0e200add87
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/derived/SubstitutionTextReader.java
@@ -0,0 +1,164 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui.editor.derived;
+
+import java.io.IOException;
+import java.io.Reader;
+
+
+/**
+ * Reads the text contents from a reader and computes for each character
+ * a potential substitution. The substitution may eat more characters than
+ * only the one passed into the computation routine.
+ * <p>
+ * Moved into this package from <code>org.eclipse.jface.internal.text.html</code>.</p>
+ */
+public abstract class SubstitutionTextReader extends SingleCharReader {
+
+ protected static final String LINE_DELIM= System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ private Reader fReader;
+ protected boolean fWasWhiteSpace;
+ private int fCharAfterWhiteSpace;
+
+ /**
+ * Tells whether white space characters are skipped.
+ */
+ private boolean fSkipWhiteSpace= true;
+
+ private boolean fReadFromBuffer;
+ private StringBuffer fBuffer;
+ private int fIndex;
+
+
+ protected SubstitutionTextReader(Reader reader) {
+ fReader= reader;
+ fBuffer= new StringBuffer();
+ fIndex= 0;
+ fReadFromBuffer= false;
+ fCharAfterWhiteSpace= -1;
+ fWasWhiteSpace= true;
+ }
+
+ /**
+ * Computes the substitution for the given character and if necessary
+ * subsequent characters. Implementation should use <code>nextChar</code>
+ * to read subsequent characters.
+ *
+ * @param c the character to be substituted
+ * @return the substitution for <code>c</code>
+ * @throws IOException in case computing the substitution fails
+ */
+ protected abstract String computeSubstitution(int c) throws IOException;
+
+ /**
+ * Returns the internal reader.
+ *
+ * @return the internal reader
+ */
+ protected Reader getReader() {
+ return fReader;
+ }
+
+ /**
+ * Returns the next character.
+ * @return the next character
+ * @throws IOException in case reading the character fails
+ */
+ protected int nextChar() throws IOException {
+ fReadFromBuffer= (fBuffer.length() > 0);
+ if (fReadFromBuffer) {
+ char ch= fBuffer.charAt(fIndex++);
+ if (fIndex >= fBuffer.length()) {
+ fBuffer.setLength(0);
+ fIndex= 0;
+ }
+ return ch;
+ }
+
+ int ch= fCharAfterWhiteSpace;
+ if (ch == -1) {
+ ch= fReader.read();
+ }
+ if (fSkipWhiteSpace && Character.isWhitespace((char)ch)) {
+ do {
+ ch= fReader.read();
+ } while (Character.isWhitespace((char)ch));
+ if (ch != -1) {
+ fCharAfterWhiteSpace= ch;
+ return ' ';
+ }
+ } else {
+ fCharAfterWhiteSpace= -1;
+ }
+ return ch;
+ }
+
+ /**
+ * @see Reader#read()
+ */
+ @Override
+ public int read() throws IOException {
+ int c;
+ do {
+
+ c= nextChar();
+ while (!fReadFromBuffer) {
+ String s= computeSubstitution(c);
+ if (s == null)
+ break;
+ if (s.length() > 0)
+ fBuffer.insert(0, s);
+ c= nextChar();
+ }
+
+ } while (fSkipWhiteSpace && fWasWhiteSpace && (c == ' '));
+ fWasWhiteSpace= (c == ' ' || c == '\r' || c == '\n');
+ return c;
+ }
+
+ /**
+ * @see Reader#ready()
+ */
+ @Override
+ public boolean ready() throws IOException {
+ return fReader.ready();
+ }
+
+ /**
+ * @see Reader#close()
+ */
+ @Override
+ public void close() throws IOException {
+ fReader.close();
+ }
+
+ /**
+ * @see Reader#reset()
+ */
+ @Override
+ public void reset() throws IOException {
+ fReader.reset();
+ fWasWhiteSpace= true;
+ fCharAfterWhiteSpace= -1;
+ fBuffer.setLength(0);
+ fIndex= 0;
+ }
+
+ protected final void setSkipWhitespace(boolean state) {
+ fSkipWhiteSpace= state;
+ }
+
+ protected final boolean isSkippingWhitespace() {
+ return fSkipWhiteSpace;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/IStrictWordDetector.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/IStrictWordDetector.java
new file mode 100644
index 0000000000..bb3d697345
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/IStrictWordDetector.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * 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.detectors;
+
+import org.eclipse.jface.text.rules.IWordDetector;
+
+public interface IStrictWordDetector extends IWordDetector {
+ public boolean isEndingCharacter(char c);
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/KeywordWordDetector.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/KeywordWordDetector.java
new file mode 100644
index 0000000000..1de13cded2
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/KeywordWordDetector.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * 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.detectors;
+
+import org.eclipse.jface.text.rules.IWordDetector;
+
+public class KeywordWordDetector implements IWordDetector {
+
+ public boolean isWordPart(char c) {
+ return Character.isLetterOrDigit(c);
+ }
+
+ public boolean isWordStart(char c) {
+ return (c == '%');
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/MacroWordDetector.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/MacroWordDetector.java
new file mode 100644
index 0000000000..8d4581b76f
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/MacroWordDetector.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * 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.detectors;
+
+import org.eclipse.jface.text.rules.IWordDetector;
+
+public class MacroWordDetector implements IWordDetector {
+
+ public boolean isWordPart(char c) {
+ return (Character.isLetterOrDigit(c) || c == '%' || c == '{' || c == '}' || c == '_') ;
+ }
+
+ public boolean isWordStart(char c) {
+ return (c == '%');
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/PackageWordDetector.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/PackageWordDetector.java
new file mode 100644
index 0000000000..20169128e0
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/PackageWordDetector.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * 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.detectors;
+
+import org.eclipse.jface.text.rules.IWordDetector;
+
+public class PackageWordDetector implements IWordDetector {
+
+ public boolean isWordPart(char c) {
+ return Character.isLetterOrDigit(c) || (c == '-') || (c == '_') || (c == '+');
+ }
+
+ public boolean isWordStart(char c) {
+ return (c == ' ') || (c == ',') || (c == '\t') || (c == ':');
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/PatchNumberDetector.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/PatchNumberDetector.java
new file mode 100644
index 0000000000..2984a0cd30
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/PatchNumberDetector.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * 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.detectors;
+
+
+
+public class PatchNumberDetector implements IStrictWordDetector {
+
+ public boolean isWordPart(char c) {
+ return Character.isDigit(c);
+ }
+
+ public boolean isWordStart(char c) {
+ return Character.isDigit(c);
+ }
+
+ public boolean isEndingCharacter(char c) {
+ return Character.isWhitespace(c);
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/SuffixNumberDetector.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/SuffixNumberDetector.java
new file mode 100644
index 0000000000..3ee364fa54
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/SuffixNumberDetector.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * 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.detectors;
+
+
+public class SuffixNumberDetector implements IStrictWordDetector {
+
+ public boolean isEndingCharacter(char c) {
+ return (c == ':');
+ }
+
+ public boolean isWordPart(char c) {
+ return Character.isDigit(c);
+ }
+
+ public boolean isWordStart(char c) {
+ // TODO Auto-generated method stub
+ return Character.isDigit(c);
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/TagWordDetector.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/TagWordDetector.java
new file mode 100644
index 0000000000..c68b966e85
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/detectors/TagWordDetector.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * 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.detectors;
+
+import org.eclipse.jface.text.rules.IWordDetector;
+
+public class TagWordDetector implements IWordDetector {
+
+ public boolean isWordPart(char c) {
+ return Character.isLetterOrDigit(c) || (c == ':') || (c == '(') || (c == ')');
+ }
+
+ public boolean isWordStart(char c) {
+ return Character.isLetter(c);
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/forms/MainPackagePage.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/forms/MainPackagePage.java
new file mode 100644
index 0000000000..15e9997ccd
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/forms/MainPackagePage.java
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * 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.forms;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.linuxtools.rpm.ui.editor.RpmTags;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileParser;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+
+public class MainPackagePage extends FormPage {
+ private FormToolkit toolkit;
+ private ScrolledForm form;
+ private Specfile specfile;
+ SpecfileParser parser;
+
+ public MainPackagePage(SpecfileFormEditor editor, IDocument document) {
+ super(editor, "Overview", "Overview");
+ parser = new SpecfileParser();
+ specfile = parser.parse(document);
+ }
+
+ @Override
+ protected void createFormContent(IManagedForm managedForm) {
+ toolkit = managedForm.getToolkit();
+ form = managedForm.getForm();
+ form.setText("Main Package information");
+ GridLayout layout = new GridLayout();
+ form.getBody().setLayout(layout);
+ layout.numColumns = 2;
+ GridData gd = new GridData();
+ gd.horizontalSpan = 2;
+ final Section section = toolkit.createSection(form.getBody(),
+ ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE
+ | ExpandableComposite.EXPANDED);
+ section.setText("Main package information");
+ section.setLayout(new GridLayout());
+ Composite client2 = toolkit.createComposite(section);
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.marginWidth = gridLayout.marginHeight = 5;
+ gridLayout.numColumns = 2;
+ client2.setLayout(gridLayout);
+
+ Label label = toolkit.createLabel(client2, "Name:", SWT.SINGLE);
+ final Text nameText = toolkit.createText(client2, specfile.getName(),
+ SWT.BORDER_SOLID);
+ nameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ nameText.addModifyListener(new ModifyListener() {
+
+ public void modifyText(ModifyEvent e) {
+ Text text = (Text) e.widget;
+ int lineNumber = specfile.getDefine(RpmTags.NAME.toLowerCase())
+ .getLineNumber();
+ replaceTagValue(specfile.getDocument(), lineNumber,
+ RpmTags.NAME.toLowerCase(), text.getText());
+ }
+ });
+ label = toolkit.createLabel(client2, "Version:");
+ Text text = toolkit.createText(client2, specfile.getVersion(),
+ SWT.BORDER_SOLID);
+ text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ label = toolkit.createLabel(client2, "Release:");
+ text = toolkit.createText(client2, specfile.getRelease(),
+ SWT.BORDER_SOLID);
+ text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ label = toolkit.createLabel(client2, "Summary:");
+ text = toolkit.createText(client2, specfile.getDefine(
+ RpmTags.SUMMARY.toLowerCase()).getStringValue(),
+ SWT.BORDER_SOLID);
+ text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ section.setClient(client2);
+
+ toolkit.paintBordersFor(client2);
+
+ toolkit.paintBordersFor(section);
+
+ }
+
+ private void replaceTagValue(IDocument document, int lineNumber,
+ String tagName, String newValue) {
+ try {
+ document.replace(document.getLineOffset(lineNumber)
+ + tagName.length() + 2, newValue.length(), newValue);
+ specfile = parser.parse(document);
+ } catch (BadLocationException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/forms/Messages.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/forms/Messages.java
new file mode 100644
index 0000000000..bf33a45e7b
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/forms/Messages.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.editor.forms;
+
+import org.eclipse.osgi.util.NLS;
+
+public final class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.rpm.ui.editor.forms.messages"; //$NON-NLS-1$
+ public static String MainPackagePage_0;
+ public static String MainPackagePage_1;
+ public static String MainPackagePage_2;
+ public static String MainPackagePage_3;
+ public static String MainPackagePage_4;
+ public static String MainPackagePage_5;
+ public static String MainPackagePage_6;
+ public static String MainPackagePage_7;
+ public static String RpmTagText_0;
+ public static String SpecfileFormEditor_0;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ super();
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/forms/RpmSectionPage.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/forms/RpmSectionPage.java
new file mode 100644
index 0000000000..a8b2394da6
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/forms/RpmSectionPage.java
@@ -0,0 +1,52 @@
+package org.eclipse.linuxtools.rpm.ui.editor.forms;
+
+import org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileSection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+
+public class RpmSectionPage extends FormPage {
+ private String rpmSection;
+ private SpecfileSection section;
+
+ public RpmSectionPage(SpecfileFormEditor editor, Specfile specfile,
+ String rpmSection) {
+ super(editor, rpmSection, rpmSection);
+ this.rpmSection = rpmSection;
+ this.section = specfile.getSection(rpmSection.substring(1));
+ }
+
+ @Override
+ protected void createFormContent(IManagedForm managedForm) {
+ super.createFormContent(managedForm);
+ FormToolkit toolkit = managedForm.getToolkit();
+ ScrolledForm form = managedForm.getForm();
+ form.setText(rpmSection);
+ GridLayout layout = new GridLayout();
+
+ form.getBody().setLayout(layout);
+ layout.numColumns = 2;
+ toolkit.createLabel(form.getBody(), rpmSection);
+ final Text text = toolkit.createText(form.getBody(), section.getContents(),
+ SWT.MULTI | SWT.BORDER | SWT.V_SCROLL);
+ text.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ section.setContents(text.getText());
+ }
+ });
+ GridData gd = new GridData();
+ gd.grabExcessHorizontalSpace = true;
+ gd.grabExcessVerticalSpace = true;
+ gd.horizontalAlignment = SWT.FILL;
+ gd.verticalAlignment = SWT.FILL;
+ text.setLayoutData(gd);
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/forms/RpmTagText.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/forms/RpmTagText.java
new file mode 100644
index 0000000000..ad655a7bc1
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/forms/RpmTagText.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * 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.ui.editor.forms;
+
+import org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileDefine;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfilePackage;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileTag;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileTag.TagType;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+public class RpmTagText {
+
+ public RpmTagText(Composite parent, final String rpmTag,
+ final Specfile specfile) {
+ this(parent, rpmTag, specfile, SWT.SINGLE);
+ }
+
+ public RpmTagText(Composite parent, final String rpmTag,
+ final Specfile specfile, int flag) {
+ Label label = new Label(parent, SWT.SINGLE);
+ label.setText(rpmTag);
+ final Text text = new Text(parent, SWT.BORDER_SOLID | flag);
+ SpecfileDefine define = specfile.getDefine(rpmTag);
+ if (null != define) {
+ if (define.getTagType().equals(TagType.INT)) {
+ text.setText(String.valueOf(define.getIntValue()));
+ } else {
+ text.setText(define.getStringValue());
+ }
+ }
+ text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ text.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ specfile.modifyDefine(rpmTag, text.getText());
+ }
+ });
+ }
+
+ public RpmTagText(Composite parent, final String rpmTag,
+ final Specfile specfile, final SpecfilePackage rpmPackage, int flag) {
+ Label label = new Label(parent, SWT.SINGLE);
+ label.setText(rpmTag);
+ final Text text = new Text(parent, SWT.BORDER_SOLID | flag);
+ SpecfileDefine define = specfile.getDefine(rpmTag, rpmPackage);
+ if (null != define) {
+ text.setText(define.getStringValue());
+ }
+ text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ text.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ specfile.modifyDefine(rpmTag, rpmPackage, text.getText());
+ }
+ });
+ }
+
+ public RpmTagText(Composite parent, final SpecfileTag require, final Specfile specfile) {
+ Label label = new Label(parent, SWT.SINGLE);
+ label.setText(Messages.RpmTagText_0);
+ final Text text = new Text(parent, SWT.BORDER_SOLID);
+ text.setText(require.getStringValue());
+ text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ text.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ specfile.modifyDefine(require, text.getText());
+ }
+ });
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/forms/SpecfileFormEditor.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/forms/SpecfileFormEditor.java
new file mode 100644
index 0000000000..614227f05a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/forms/SpecfileFormEditor.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * 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.forms;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+public class SpecfileFormEditor extends FormEditor {
+
+ FormPage mainPackage;
+ SpecfileEditor editor;
+
+ @Override
+ protected FormToolkit createToolkit(Display display) {
+ // Create a toolkit that shares colors between editors.
+ return new FormToolkit(Display.getCurrent());
+ }
+
+ @Override
+ protected void addPages() {
+ try {
+ editor = new SpecfileEditor();
+ editor.init(getEditorSite(), getEditorInput());
+ editor.setInput(getEditorInput());
+ mainPackage = new MainPackagePage(this, editor.getDocumentProvider().getDocument(getEditorInput()));
+ addPage(mainPackage);
+ int index = addPage(editor, getEditorInput());
+ setPageText(index, "Source");
+// setActivePage(index);
+
+ } catch (PartInitException e) {
+ //
+ }
+ }
+
+ @Override
+ public void doSave(IProgressMonitor monitor) {
+ editor.doSave(monitor);
+ mainPackage.doSave(monitor);
+ }
+
+ @Override
+ public void doSaveAs() {
+ }
+
+ @Override
+ public boolean isSaveAsAllowed() {
+ return false;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/forms/messages.properties b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/forms/messages.properties
new file mode 100644
index 0000000000..d580b56c1c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/forms/messages.properties
@@ -0,0 +1,20 @@
+###############################################################################
+# Copyright (c) 2010 Red Hat, Inc.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat - initial API and implementation
+###############################################################################
+MainPackagePage_0=Overview
+MainPackagePage_1=Overview
+MainPackagePage_2=Main Package information
+MainPackagePage_3=Main package information
+MainPackagePage_4=Build Requires
+MainPackagePage_5=Requires
+MainPackagePage_6=Subpackages
+MainPackagePage_7=Requires
+RpmTagText_0=Require
+SpecfileFormEditor_0=Source
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/MailHyperlink.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/MailHyperlink.java
new file mode 100644
index 0000000000..6ba70746cf
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/MailHyperlink.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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.hyperlink;
+
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.hyperlink.URLHyperlink;
+import org.eclipse.swt.program.Program;
+
+/**
+ * Mail hyperlink.
+ */
+public class MailHyperlink extends URLHyperlink {
+
+
+ private String fURLString;
+
+
+ public MailHyperlink(IRegion region, String urlString) {
+ super(region, urlString);
+ fURLString = urlString;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.hyperlink.URLHyperlink#open()
+ */
+ @Override
+ public void open() {
+ if (fURLString != null) {
+ Program.launch(fURLString);
+ fURLString= null;
+ return;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/MailHyperlinkDetector.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/MailHyperlinkDetector.java
new file mode 100644
index 0000000000..53a967053a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/MailHyperlinkDetector.java
@@ -0,0 +1,217 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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.hyperlink;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.text.MessageFormat;
+import java.util.StringTokenizer;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.hyperlink.AbstractHyperlinkDetector;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.jface.text.hyperlink.URLHyperlinkDetector;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile;
+
+
+/**
+ * Mail hyperlink detector. Largely inspired of {@link URLHyperlinkDetector}
+ */
+public class MailHyperlinkDetector extends AbstractHyperlinkDetector {
+
+ private SpecfileEditor editor;
+
+ public MailHyperlinkDetector(SpecfileEditor editor) {
+ this.editor = editor;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.hyperlink.IHyperlinkDetector#detectHyperlinks(org.eclipse.jface.text.ITextViewer,
+ * org.eclipse.jface.text.IRegion, boolean)
+ */
+ public IHyperlink[] detectHyperlinks(ITextViewer textViewer, IRegion region, boolean canShowMultipleHyperlinks) {
+ if (region == null || textViewer == null)
+ return null;
+
+ IDocument document= textViewer.getDocument();
+
+ int offset= region.getOffset();
+
+ String urlString= null;
+ if (document == null)
+ return null;
+
+ IRegion lineInfo;
+ String line;
+ String mail;
+ int mailLength = 0;
+ int mailOffsetInLine;
+ try {
+ lineInfo= document.getLineInformationOfOffset(offset);
+ line= document.get(lineInfo.getOffset(), lineInfo.getLength());
+ } catch (BadLocationException ex) {
+ ex.printStackTrace();
+ return null;
+ }
+
+ int startSeparator= line.indexOf("<"); //$NON-NLS-1$
+ mailOffsetInLine = startSeparator + 1;
+
+ if (startSeparator != -1) {
+
+ int endSeparator= line.indexOf(">"); //$NON-NLS-1$
+
+ if (endSeparator < 5)
+ return null;
+
+ mail= line.substring(startSeparator + 1, endSeparator).trim();
+ mailLength= mail.length();
+
+ // Some cleanups, maybe we can add more.
+ mail= mail.replaceAll("(?i) at ", "@"); //$NON-NLS-1$ //$NON-NLS-2$
+ mail= mail.replaceAll("(?i) dot ", "."); //$NON-NLS-1$ //$NON-NLS-2$
+ mail= mail.replaceAll("(?i)_at_", "@"); //$NON-NLS-1$ //$NON-NLS-2$
+ mail= mail.replaceAll("(?i)_dot_", "."); //$NON-NLS-1$ //$NON-NLS-2$
+
+ mail= mail.replaceAll(" +", " "); //$NON-NLS-1$ //$NON-NLS-2$
+ if (mail.split(" ").length == 3) { //$NON-NLS-1$
+ if (mail.indexOf("@") == -1) //$NON-NLS-1$
+ mail = mail.replaceFirst(" ", "@").replaceFirst(" ", "."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ }
+ mail= mail.replaceAll(" ", ""); //$NON-NLS-1$ //$NON-NLS-2$
+
+ } else {
+
+ int offsetInLine= offset - lineInfo.getOffset();
+
+ boolean startDoubleQuote= false;
+ mailOffsetInLine= 0;
+
+ int mailSeparatorOffset= line.indexOf("@"); //$NON-NLS-1$
+ while (mailSeparatorOffset >= 0) {
+
+ // (left to "@")
+ mailOffsetInLine= mailSeparatorOffset;
+ char ch;
+ do {
+ mailOffsetInLine--;
+ ch= ' ';
+ if (mailOffsetInLine > -1)
+ ch= line.charAt(mailOffsetInLine);
+ startDoubleQuote= ch == '"';
+ } while (Character.isLetterOrDigit(ch) || ch == '.' || ch == '_' || ch == '-');
+ mailOffsetInLine++;
+
+ // a valid mail contain a left part.
+ if (mailOffsetInLine == mailSeparatorOffset)
+ return null;
+
+ // Right to "@"
+ StringTokenizer tokenizer= new StringTokenizer(line.substring(mailSeparatorOffset + 3), " \t\n\r\f<>", false); //$NON-NLS-1$
+ if (!tokenizer.hasMoreTokens())
+ return null;
+
+ mailLength= tokenizer.nextToken().length() + 3 + mailSeparatorOffset - mailOffsetInLine;
+ if (offsetInLine >= mailOffsetInLine && offsetInLine <= mailOffsetInLine + mailLength)
+ break;
+
+ mailSeparatorOffset= line.indexOf("@", mailSeparatorOffset + 1); //$NON-NLS-1$
+ }
+
+ if (mailSeparatorOffset < 0)
+ return null;
+
+ if (startDoubleQuote) {
+ int endOffset= -1;
+ int nextDoubleQuote= line.indexOf('"', mailOffsetInLine);
+ int nextWhitespace= line.indexOf(' ', mailOffsetInLine);
+ if (nextDoubleQuote != -1 && nextWhitespace != -1)
+ endOffset= Math.min(nextDoubleQuote, nextWhitespace);
+ else if (nextDoubleQuote != -1)
+ endOffset= nextDoubleQuote;
+ else if (nextWhitespace != -1)
+ endOffset= nextWhitespace;
+ if (endOffset != -1)
+ mailLength= endOffset - mailOffsetInLine;
+ }
+ if (mailLength == 0)
+ return null;
+
+ mail= line.substring(mailOffsetInLine, mailOffsetInLine + mailLength);
+ }
+
+ try {
+ // mail address contain at less one '@' and one '.' character.
+ if (!mail.contains("@") || !mail.contains(".")) //$NON-NLS-1$ //$NON-NLS-2$
+ return null;
+
+ urlString= "mailto:" + mail; //$NON-NLS-1$
+ char separator= '?';
+ String subject= getSubject();
+ if (subject != null) {
+ urlString+= separator + "subject=" + subject; //$NON-NLS-1$
+ separator= '&';
+ }
+ String body= getBody();
+ if (body != null)
+ urlString+= separator + "body=" + body; //$NON-NLS-1$
+
+ // url don't like %
+ urlString= urlString.replaceAll("\\%", "\\%25"); //$NON-NLS-1$ //$NON-NLS-2$
+ new URL(urlString);
+ } catch (MalformedURLException ex) {
+ ex.printStackTrace();
+ urlString= null;
+ return null;
+ }
+
+ IRegion urlRegion= new Region(lineInfo.getOffset() + mailOffsetInLine, mailLength);
+ return new IHyperlink[] {new MailHyperlink(urlRegion, urlString)};
+ }
+
+ private String getSubject() {
+ Specfile specfile= editor.getSpecfile();
+ return MessageFormat.format("[{0}.spec - {1}-{2}]", specfile.getName(), specfile.getVersion(), //$NON-NLS-1$
+ specfile.getRelease());
+ }
+
+ private String getBody() {
+ String body = null;
+ // Get current selection
+ IDocument document= editor.getSpecfileSourceViewer().getDocument();
+ ISelection currentSelection= editor.getSpecfileSourceViewer().getSelection();
+ if (currentSelection instanceof ITextSelection) {
+ ITextSelection selection= (ITextSelection) currentSelection;
+ try {
+ String txt= selection.getText();
+ if (txt.trim().length() > 0) {
+ int begin= document.getLineOffset(selection.getStartLine());
+ body= document.get().substring(begin,
+ selection.getOffset() + selection.getLength());
+ // replace left spaces or tabs and add a space at the begin of each line.
+ body= body.replaceAll("(?m)^[ \\t]+|[ \\t]+$|^", " "); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ } catch (BadLocationException e) {
+ }
+
+ }
+ return body;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/Messages.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/Messages.java
new file mode 100644
index 0000000000..0c681682f6
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/Messages.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.hyperlink;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.rpm.ui.editor.hyperlink.messages"; //$NON-NLS-1$
+ public static String SourcesFileHyperlink_0;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SourcesFileDownloadHyperlink.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SourcesFileDownloadHyperlink.java
new file mode 100644
index 0000000000..076d38a9a1
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SourcesFileDownloadHyperlink.java
@@ -0,0 +1,191 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Alexander Kurtakov (Red Hat) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.editor.hyperlink;
+
+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.net.URL;
+import java.net.URLConnection;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+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;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.linuxtools.rpm.core.IRPMConstants;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileLog;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.MessageBox;
+
+public class SourcesFileDownloadHyperlink implements IHyperlink {
+ class DownloadJob extends Job {
+ private IFile file;
+ private URLConnection content;
+ private boolean fileOverride;
+
+ public DownloadJob(IFile file, URLConnection content, boolean override) {
+ super(NLS.bind(Messages.SourcesFileDownloadHyperlink_4, file
+ .getName()));
+ this.file = file;
+ this.content = content;
+ this.fileOverride = override;
+ }
+
+ public DownloadJob(IFile file, URLConnection content) {
+ this(file, content, false);
+ }
+
+ @Override
+ public IStatus run(IProgressMonitor monitor) {
+ monitor.beginTask(NLS.bind(Messages.SourcesFileDownloadHyperlink_4,
+ file.getName()), content.getContentLength());
+ try {
+ File tempFile = File.createTempFile(file.getName(), ""); //$NON-NLS-1$
+ FileOutputStream fos = new FileOutputStream(tempFile);
+ InputStream is = new BufferedInputStream(content.getInputStream());
+ int b;
+ boolean canceled = false;
+ while ((b = is.read()) != -1) {
+ if (monitor.isCanceled()) {
+ canceled = true;
+ break;
+ }
+ fos.write(b);
+ monitor.worked(1);
+ }
+ is.close();
+ fos.close();
+ if (!canceled) {
+ if (fileOverride) {
+ file.setContents(new FileInputStream(tempFile), true,
+ false, monitor);
+ } else {
+ file.create(new FileInputStream(tempFile), true,
+ monitor);
+
+ }
+ }
+ tempFile.delete();
+ } catch (CoreException e) {
+ SpecfileLog.logError(e);
+ return Status.CANCEL_STATUS;
+ } catch (IOException e) {
+ SpecfileLog.logError(e);
+ return Status.CANCEL_STATUS;
+ }
+ monitor.done();
+ return Status.OK_STATUS;
+ }
+ };
+
+ String fileName;
+ IFile original;
+ IRegion region;
+
+ /**
+ * Creates hyperlink for the following file name, region and file whether
+ * the file name is found.
+ *
+ * @param original
+ * The file where the reference to this file name is.
+ * @param fileName
+ * The name of the file to open.
+ * @param region
+ * The hyperlink region.
+ */
+ public SourcesFileDownloadHyperlink(IFile original, String fileName,
+ IRegion region) {
+ this.fileName = fileName;
+ this.original = original;
+ this.region = region;
+ }
+
+ /**
+ * @see org.eclipse.jface.text.hyperlink.IHyperlink#getHyperlinkRegion()
+ */
+ public IRegion getHyperlinkRegion() {
+ return region;
+ }
+
+ /**
+ * @see org.eclipse.jface.text.hyperlink.IHyperlink#getHyperlinkText()
+ */
+ public String getHyperlinkText() {
+ return Messages.SourcesFileHyperlink_1 + ' ' + fileName;
+ }
+
+ /**
+ * @see org.eclipse.jface.text.hyperlink.IHyperlink#getTypeLabel()
+ */
+ public String getTypeLabel() {
+ return null;
+ }
+
+ /**
+ * Tries to open the given file name looking for it in the current directory
+ * and in ../SOURCES.
+ *
+ * @see org.eclipse.jface.text.hyperlink.IHyperlink#open()
+ */
+ public void open() {
+ IContainer container = original.getParent();
+ IResource saveFolder = container.getParent().findMember(
+ IRPMConstants.SOURCES_FOLDER);
+ if (saveFolder == null) {
+ saveFolder = container.findMember(original.getFullPath()
+ .removeLastSegments(1));
+ }
+ if (saveFolder == null) {
+ saveFolder = container.findMember("/"); //$NON-NLS-1$
+ }
+ try {
+ URL url = new URL(fileName);
+ URLConnection connection = url.openConnection();
+ String savedFileName = fileName
+ .substring(fileName.lastIndexOf('/') + 1);
+ IFile savedFile = original.getProject().getFile(
+ saveFolder.getProjectRelativePath().append(savedFileName));
+ if (savedFile.exists()) {
+ MessageBox mb = new MessageBox(Display.getCurrent()
+ .getActiveShell(), SWT.ICON_QUESTION | SWT.OK
+ | SWT.CANCEL);
+ mb.setText(Messages.SourcesFileDownloadHyperlink_0);
+ mb.setMessage(NLS.bind(Messages.SourcesFileDownloadHyperlink_1,
+ savedFileName));
+ int rc = mb.open();
+ if (rc == SWT.OK) {
+ new DownloadJob(savedFile, connection, true).schedule();
+ }
+
+ } else {
+ new DownloadJob(savedFile, connection).schedule();
+ }
+ } catch (IOException e) {
+ MessageBox mb = new MessageBox(Display.getCurrent()
+ .getActiveShell(), SWT.ICON_WARNING | SWT.OK);
+ mb.setMessage(Messages.SourcesFileDownloadHyperlink_2);
+ mb.setText(Messages.SourcesFileDownloadHyperlink_3);
+ mb.open();
+ }
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SourcesFileHyperlink.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SourcesFileHyperlink.java
new file mode 100644
index 0000000000..1584e9282c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SourcesFileHyperlink.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * 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.hyperlink;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileLog;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+
+/**
+ * Hyperlink implementation for the source and patch files in a srpm. Note: This
+ * implementation assumes two filesystem layouts where it looks for files. 1.
+ * Exploder srpm - Spec file and sources in one directory. 2. Rpmbuild structure
+ * - Assumes that the edited spec file is in a SPECS folder and looks for
+ * sources in ../SOURCES.
+ */
+public class SourcesFileHyperlink implements IHyperlink {
+
+ String fileName;
+ IFile original;
+ IRegion region;
+
+ /**
+ * Creates hyperlink for the following file name, region and file whether
+ * the file name is found.
+ *
+ * @param original The file where the reference to this file name is.
+ * @param fileName The name of the file to open.
+ * @param region The hyperlink region.
+ */
+ public SourcesFileHyperlink(IFile original, String fileName, IRegion region) {
+ this.fileName = fileName;
+ this.original = original;
+ this.region = region;
+ }
+
+ /**
+ * @see org.eclipse.jface.text.hyperlink.IHyperlink#getHyperlinkRegion()
+ */
+ public IRegion getHyperlinkRegion() {
+ return region;
+ }
+
+ /**
+ * @see org.eclipse.jface.text.hyperlink.IHyperlink#getHyperlinkText()
+ */
+ public String getHyperlinkText() {
+ return Messages.SourcesFileHyperlink_0 + fileName;
+ }
+
+ /**
+ * @see org.eclipse.jface.text.hyperlink.IHyperlink#getTypeLabel()
+ */
+ public String getTypeLabel() {
+ return null;
+ }
+
+ /**
+ * Tries to open the given file name looking for it in the current directory
+ * and in ../SOURCES.
+ *
+ * @see org.eclipse.jface.text.hyperlink.IHyperlink#open()
+ */
+ public void open() {
+ IContainer container = original.getParent();
+ IResource resourceToOpen = container.findMember(fileName);
+ if (resourceToOpen == null || !resourceToOpen.exists()) {
+ IResource sourcesFolder = container.getParent().findMember(
+ "SOURCES"); //$NON-NLS-1$
+ resourceToOpen = ((IFolder) sourcesFolder).getFile(fileName);
+ }
+ IWorkbenchPage page = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage();
+ try {
+ if (resourceToOpen.getType() == IResource.FILE) {
+ IDE.openEditor(page, (IFile) resourceToOpen);
+ }
+ } catch (PartInitException e) {
+ SpecfileLog.logError(e);
+ }
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SourcesFileHyperlinkDetector.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SourcesFileHyperlinkDetector.java
new file mode 100644
index 0000000000..cc212fc515
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SourcesFileHyperlinkDetector.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * 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.hyperlink;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.hyperlink.AbstractHyperlinkDetector;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+import org.eclipse.linuxtools.rpm.ui.editor.Utils;
+import org.eclipse.ui.part.FileEditorInput;
+
+/**
+ * Detects values for Patch and Source definitions.
+ *
+ */
+public class SourcesFileHyperlinkDetector extends AbstractHyperlinkDetector {
+
+ SpecfileEditor editor;
+ private static final String PATCH_IDENTIFIER = "Patch"; //$NON-NLS-1$
+ private static final String SOURCE_IDENTIFIER = "Source"; //$NON-NLS-1$
+
+ /**
+ * Creates the detector.
+ *
+ * @param editor Reference to the specfile editor.
+ */
+ public SourcesFileHyperlinkDetector(SpecfileEditor editor) {
+ this.editor = editor;
+ }
+
+ /**
+ * @see org.eclipse.jface.text.hyperlink.IHyperlinkDetector#detectHyperlinks(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion, boolean)
+ */
+ public IHyperlink[] detectHyperlinks(ITextViewer textViewer,
+ IRegion region, boolean canShowMultipleHyperlinks) {
+ if (region == null || textViewer == null) {
+ return null;
+ }
+
+ IDocument document = textViewer.getDocument();
+
+ int offset = region.getOffset();
+
+ if (document == null) {
+ return null;
+ }
+ IRegion lineInfo;
+ String line;
+ try {
+ lineInfo = document.getLineInformationOfOffset(offset);
+ line = document.get(lineInfo.getOffset(), lineInfo.getLength());
+ } catch (BadLocationException ex) {
+ return null;
+ }
+ if (editor.getEditorInput() instanceof FileEditorInput) {
+ IFile original = ((FileEditorInput) editor.getEditorInput())
+ .getFile();
+ if (line.startsWith(SOURCE_IDENTIFIER)
+ || line.startsWith(PATCH_IDENTIFIER)) {
+ int delimiterIndex = line.indexOf(":") + 1; //$NON-NLS-1$
+ String fileName = line.substring(delimiterIndex).trim();
+ if (region.getOffset() > lineInfo.getOffset()
+ + line.indexOf(fileName)) {
+ IRegion fileNameRegion = new Region(lineInfo.getOffset()
+ + line.indexOf(fileName), fileName.length());
+ return new IHyperlink[] { new SourcesFileHyperlink(
+ original, Utils.resolveDefines(
+ editor.getSpecfile(), fileName),
+ fileNameRegion) };
+ }
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SpecfileElementHyperlink.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SpecfileElementHyperlink.java
new file mode 100644
index 0000000000..05b8840fbf
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SpecfileElementHyperlink.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * 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.ui.editor.hyperlink;
+
+import java.util.HashMap;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileLog;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileElement;
+import org.eclipse.ui.IEditorDescriptor;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+
+/**
+ * Hyperlink implementation for the following hyperlink elements: SOURCE, PATCH
+ * and %define.
+ */
+public class SpecfileElementHyperlink implements IHyperlink {
+ private IRegion region;
+ private SpecfileElement source;
+ private IFile file;
+
+ public SpecfileElementHyperlink(IRegion region, SpecfileElement source,
+ IFile file) {
+ this.region = region;
+ this.source = source;
+ this.file = file;
+ }
+
+ public IRegion getHyperlinkRegion() {
+ return region;
+ }
+
+ public String getHyperlinkText() {
+ return null;
+ }
+
+ public String getTypeLabel() {
+ return null;
+ }
+
+ public void open() {
+ IWorkbenchPage page = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage();
+ IEditorDescriptor desc = PlatformUI.getWorkbench().getEditorRegistry()
+ .getDefaultEditor(file.getName());
+ HashMap<String, Object> map = new HashMap<String, Object>();
+ // TODO don't increment the line number once the SpecfileSource reports
+ // correct line
+ map.put(IMarker.LINE_NUMBER, Integer
+ .valueOf(getSource().getLineNumber() + 1));
+ map.put(IDE.EDITOR_ID_ATTR, desc.getId());
+ try {
+ IMarker marker = file.createMarker(IMarker.TEXT);
+ marker.setAttributes(map);
+ IDE.openEditor(page, marker);
+ marker.delete();
+ } catch (CoreException e) {
+ SpecfileLog.logError(e);
+ }
+ }
+
+ /**
+ * @return the source
+ */
+ public SpecfileElement getSource() {
+ return source;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SpecfileElementHyperlinkDetector.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SpecfileElementHyperlinkDetector.java
new file mode 100644
index 0000000000..ac7c6370af
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/SpecfileElementHyperlinkDetector.java
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * 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.ui.editor.hyperlink;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.hyperlink.AbstractHyperlinkDetector;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.linuxtools.rpm.ui.editor.ISpecfileSpecialSymbols;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileDefine;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileElement;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileSource;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+
+import com.ibm.icu.util.StringTokenizer;
+
+/**
+ * Hyperlink detector for source, patch and defines in the spec file.
+ *
+ */
+public class SpecfileElementHyperlinkDetector extends AbstractHyperlinkDetector {
+
+ private static final String PATCH_IDENTIFIER = "%patch"; //$NON-NLS-1$
+ private static final String SOURCE_IDENTIFIER = "%{SOURCE"; //$NON-NLS-1$
+ private Specfile specfile;
+
+ public SpecfileElementHyperlinkDetector(Specfile specfile) {
+ this.specfile = specfile;
+ }
+
+ public IHyperlink[] detectHyperlinks(ITextViewer textViewer,
+ IRegion region, boolean canShowMultipleHyperlinks) {
+
+ if (region == null || textViewer == null) {
+ return null;
+ }
+
+ IDocument document = textViewer.getDocument();
+
+ int offset = region.getOffset();
+
+ if (document == null) {
+ return null;
+ }
+ IRegion lineInfo;
+ String line;
+ try {
+ lineInfo = document.getLineInformationOfOffset(offset);
+ line = document.get(lineInfo.getOffset(), lineInfo.getLength());
+ } catch (BadLocationException ex) {
+ return null;
+ }
+
+ int offsetInLine = offset - lineInfo.getOffset();
+
+ StringTokenizer tokens = new StringTokenizer(line);
+ String word = ""; //$NON-NLS-1$
+ int tempLineOffset = 0;
+ int wordOffsetInLine = 0;
+ while (tokens.hasMoreTokens()) {
+ String tempWord = tokens.nextToken();
+ Pattern defineRegexp = Pattern.compile("%\\{(.*?)\\}"); //$NON-NLS-1$
+ Matcher fit = defineRegexp.matcher(tempWord);
+ while (fit.find()){
+ if ((fit.start() <= offsetInLine) && (offsetInLine <= fit.end())){
+ tempWord = fit.group();
+ wordOffsetInLine = fit.start();
+ tempLineOffset += fit.start();
+ break;
+ }
+ }
+ tempLineOffset += tempWord.length();
+ word = tempWord;
+ if (tempLineOffset > offsetInLine) {
+ break;
+ }
+ }
+ if (word.startsWith(SOURCE_IDENTIFIER)) {
+ int sourceNumber = Integer.valueOf(
+ word.substring(SOURCE_IDENTIFIER.length(),
+ word.length() - 1)).intValue();
+ SpecfileSource source = specfile.getSource(sourceNumber);
+ if (source != null)
+ return prepareHyperlink(lineInfo, line, word, source);
+ } else if (word.startsWith(PATCH_IDENTIFIER)) {
+
+ int sourceNumber = Integer.valueOf(
+ word.substring(PATCH_IDENTIFIER.length(), word.length()))
+ .intValue();
+ SpecfileSource source = specfile.getPatch(sourceNumber);
+ if (source != null)
+ return prepareHyperlink(lineInfo, line, word, source);
+ } else {
+ String defineName = getDefineName(word);
+ SpecfileDefine define = specfile.getDefine(defineName);
+ if (define != null) {
+ return prepareHyperlink(lineInfo, line, defineName, define,
+ wordOffsetInLine);
+ }
+ }
+ return null;
+ }
+
+ private String getDefineName(String word) {
+ if (word.startsWith(ISpecfileSpecialSymbols.MACRO_START_LONG)) {
+ return word.substring(2, word.length() - 1);
+ }
+ return null;
+ }
+
+ private IHyperlink[] prepareHyperlink(IRegion lineInfo, String line,
+ String word, SpecfileElement source, int lineIndex) {
+ IRegion urlRegion = new Region(lineInfo.getOffset()
+ + line.indexOf(word, lineIndex), word.length());
+
+ IWorkbench wb = PlatformUI.getWorkbench();
+ IWorkbenchWindow win = wb.getActiveWorkbenchWindow();
+ IWorkbenchPage page = win.getActivePage();
+ IEditorPart editor = page.getActiveEditor();
+ // A IFile cannot be retrieve from a IFileStoreEditorInput, so at this time
+ // we can only provide this functionality for resources inside the workbench.
+ if (editor.getEditorInput() instanceof FileEditorInput) {
+ IFile original = ((FileEditorInput) editor.getEditorInput()).getFile();
+ return new IHyperlink[] { new SpecfileElementHyperlink(urlRegion,
+ source, original) };
+ } else {
+ return null;
+ }
+
+
+ }
+
+ private IHyperlink[] prepareHyperlink(IRegion lineInfo, String line,
+ String word, SpecfileElement source) {
+ return prepareHyperlink(lineInfo, line, word, source, 0);
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/URLHyperlinkWithMacroDetector.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/URLHyperlinkWithMacroDetector.java
new file mode 100644
index 0000000000..2f9751bef3
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/URLHyperlinkWithMacroDetector.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Alphonse Van Assche and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Alphonse Van Assche
+ * Andrew Overholt
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui.editor.hyperlink;
+
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.jface.text.hyperlink.URLHyperlink;
+import org.eclipse.jface.text.hyperlink.URLHyperlinkDetector;
+import org.eclipse.linuxtools.rpm.ui.editor.Utils;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile;
+
+
+/**
+ * URL hyperlink with macro detector.
+ * derived form the JFace URLHyperlinkDetector class
+ *
+ */
+public class URLHyperlinkWithMacroDetector extends URLHyperlinkDetector {
+
+ private Specfile specfile;
+
+ /**
+ * Creates a new URL hyperlink with macro detector.
+ */
+ public URLHyperlinkWithMacroDetector(Specfile specfile) {
+ this.specfile= specfile;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.hyperlink.IHyperlinkDetector#detectHyperlinks(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion, boolean)
+ */
+ @Override
+ public IHyperlink[] detectHyperlinks(ITextViewer textViewer, IRegion region, boolean canShowMultipleHyperlinks) {
+ IHyperlink[] returned = super.detectHyperlinks(textViewer, region, canShowMultipleHyperlinks);
+ if (returned != null && returned.length > 0) {
+ IHyperlink hyperlink = returned[0];
+ if (hyperlink instanceof URLHyperlink) {
+ URLHyperlink urlHyperlink = (URLHyperlink) hyperlink;
+ String newURLString = Utils.resolveDefines(specfile, urlHyperlink.getURLString());
+ return new IHyperlink[] {new URLHyperlink(urlHyperlink.getHyperlinkRegion(), newURLString)};
+ }
+ }
+ return returned;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/messages.properties b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/messages.properties
new file mode 100644
index 0000000000..00929af9dd
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/hyperlink/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
+###############################################################################
+SourcesFileHyperlink_0=Open
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileErrorHandler.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileErrorHandler.java
new file mode 100644
index 0000000000..0bf73f1fe2
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileErrorHandler.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * 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
+ * Alphonse Van Assche
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui.editor.markers;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileLog;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileParseException;
+import org.eclipse.ui.texteditor.MarkerUtilities;
+
+public class SpecfileErrorHandler extends SpecfileMarkerHandler{
+
+ public static final String SPECFILE_ERROR_MARKER_ID = Activator.PLUGIN_ID
+ + ".specfileerror"; //$NON-NLS-1$
+
+ public SpecfileErrorHandler(IFile file, IDocument document)
+ {
+ super(file, document);
+ }
+
+ public void handleError(SpecfileParseException e) {
+ int lineNumber = e.getLineNumber();
+
+ if (file == null) { return; }
+
+ Map<String, Object> map = new HashMap<String, Object>();
+ MarkerUtilities.setLineNumber(map, lineNumber);
+ MarkerUtilities.setMessage(map, e.getMessage());
+ map.put(IMarker.MESSAGE, e.getMessage());
+ map.put(IMarker.LOCATION, file.getFullPath().toString());
+
+ Integer charStart = getCharOffset(lineNumber, e.getStartColumn());
+ if (charStart != null) {
+ map.put(IMarker.CHAR_START, charStart);
+ }
+ Integer charEnd = getCharOffset(lineNumber, e.getEndColumn());
+ if (charEnd != null) {
+ map.put(IMarker.CHAR_END, charEnd);
+ }
+
+ // FIXME: add severity level
+ map.put(IMarker.SEVERITY, Integer.valueOf(e.getSeverity()));
+
+ try {
+ MarkerUtilities.createMarker(file, map, SPECFILE_ERROR_MARKER_ID);
+ } catch (CoreException ee) {
+ SpecfileLog.logError(ee);
+ }
+ }
+
+ @Override
+ String getMarkerID() {
+ return SPECFILE_ERROR_MARKER_ID;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileMarkerHandler.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileMarkerHandler.java
new file mode 100644
index 0000000000..56d4183e8f
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileMarkerHandler.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * 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.markers;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileLog;
+
+public abstract class SpecfileMarkerHandler {
+
+ IDocument document;
+ IFile file;
+
+ public SpecfileMarkerHandler(IFile file, IDocument document) {
+ this.file = file;
+ this.document = document;
+ }
+
+ abstract String getMarkerID();
+
+ protected Integer getCharOffset(int lineNumber, int columnNumber) {
+ try {
+ return document.getLineOffset(lineNumber)
+ + columnNumber;
+ } catch (BadLocationException e) {
+ SpecfileLog.logError(e);
+ return null;
+ }
+ }
+
+ public void removeExistingMarkers() {
+ if (file == null) {
+ return;
+ }
+
+ try {
+ file.deleteMarkers(getMarkerID(), true, IResource.DEPTH_ZERO);
+ } catch (CoreException e1) {
+ SpecfileLog.logError(e1);
+ }
+ }
+
+ public void setFile(IFile file) {
+ this.file = file;
+ }
+
+ public void setDocument(IDocument document) {
+ this.document = document;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileTaskHandler.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileTaskHandler.java
new file mode 100644
index 0000000000..af40ffa6a4
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/markers/SpecfileTaskHandler.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * 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.markers;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileLog;
+import org.eclipse.ui.texteditor.MarkerUtilities;
+
+public class SpecfileTaskHandler extends SpecfileMarkerHandler{
+ public static final String SPECFILE_TASK_MARKER_ID = Activator.PLUGIN_ID
+ + ".specfiletask"; //$NON-NLS-1$
+
+ public SpecfileTaskHandler(IFile file, IDocument document) {
+ super(file, document);
+ }
+
+ public void handleTask(int lineNumber, String line, String taskType) {
+ if (file == null) {
+ return;
+ }
+
+ String message = line.substring(line.indexOf(taskType));
+ Map<String, Object> map = new HashMap<String, Object>();
+ MarkerUtilities.setLineNumber(map, lineNumber);
+ MarkerUtilities.setMessage(map, message);
+ map.put(IMarker.MESSAGE, message);
+ map.put(IMarker.LOCATION, file.getFullPath().toString());
+ map.put(IMarker.USER_EDITABLE, false);
+ Integer charStart = getCharOffset(lineNumber, 0);
+ if (charStart != null) {
+ map.put(IMarker.CHAR_START, charStart);
+ }
+ Integer charEnd = getCharOffset(lineNumber, line.length());
+ if (charEnd != null) {
+ map.put(IMarker.CHAR_END, charEnd);
+ }
+
+ try {
+ MarkerUtilities.createMarker(file, map, SPECFILE_TASK_MARKER_ID);
+ } catch (CoreException ee) {
+ SpecfileLog.logError(ee);
+ }
+ }
+
+ @Override
+ String getMarkerID() {
+ return SPECFILE_TASK_MARKER_ID;
+ }
+
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/messages.properties b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/messages.properties
new file mode 100644
index 0000000000..2946aafb44
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/messages.properties
@@ -0,0 +1,24 @@
+###############################################################################
+# 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
+###############################################################################
+RpmMacroProposalsList_0=Buildin rpm macro
+RpmPackageBuildProposalsJob_0=Update RPM packages proposal list
+RpmPackageBuildProposalsJob_1=Retrieving packages
+RpmPackageBuildProposalsJob_2=Run command '
+RpmPackageBuildProposalsJob_3=' ...
+RpmPackageProposalsList_0=RPM information is only available\nif the proposal list is less than
+RpmPackageProposalsList_1=\ item(s).\n\nYou can change the item limit in the \nRPM proposals preferences page.
+RpmPackageProposalsList_2=Cannot retrieve RPM information.\n\n
+RpmPackageProposalsList_3=Please adjust your preferences:\n\nSpecfile Editor-> Macro proposals-> Package Info
+SpecfileConfiguration_0=Press Ctrl+Space to see proposals
+SpecfileEditor_0=ContentAssistProposal.
+SpecfileEditor_1=ContentAssist
+SpecfileEditor_2=ContentAssist
+SpecfileLog_0=Unexpected Exception
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/ContainsFilter.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/ContainsFilter.java
new file mode 100644
index 0000000000..615c974bbf
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/ContainsFilter.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * 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.ui.editor.outline;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+
+/**
+ * Simple filter that only check whether the label contains the given string to
+ * look for.
+ */
+public class ContainsFilter extends ViewerFilter {
+
+ private String lookFor;
+
+ public void setLookFor(String lookFor) {
+ this.lookFor = lookFor;
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ if ((viewer instanceof TreeViewer) == false) {
+ return true;
+ }
+ TreeViewer treeViewer = (TreeViewer) viewer;
+ String currentLabel = ((ILabelProvider) treeViewer.getLabelProvider())
+ .getText(element);
+ if (lookFor == null) {
+ return true;
+ }
+ if (currentLabel != null && currentLabel.contains(lookFor)) {
+ return true;
+ }
+ return hasUnfilteredChild(treeViewer, element);
+ }
+
+ private boolean hasUnfilteredChild(TreeViewer viewer, Object element) {
+ Object[] children = ((ITreeContentProvider) viewer.getContentProvider())
+ .getChildren(element);
+ for (Object child :children) {
+ if (select(viewer, element, child)) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/Messages.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/Messages.java
new file mode 100644
index 0000000000..b3820e359c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/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.ui.editor.outline;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.rpm.ui.editor.outline.messages"; //$NON-NLS-1$
+ public static String SpecfileLabelProvider_0;
+ public static String SpecfileLabelProvider_1;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileContentOutlinePage.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileContentOutlinePage.java
new file mode 100644
index 0000000000..678995400f
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileContentOutlinePage.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * 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.outline;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileElement;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
+
+public class SpecfileContentOutlinePage extends ContentOutlinePage {
+
+ private ITextEditor editor;
+ private IEditorInput input;
+
+ public SpecfileContentOutlinePage(SpecfileEditor editor) {
+ super();
+ this.editor = editor;
+ }
+
+ public void setInput(IEditorInput editorInput) {
+ this.input = editorInput;
+ update();
+ }
+
+ public void update() {
+ //set the input so that the outlines parse can be called
+ //update the tree viewer state
+ final TreeViewer viewer = getTreeViewer();
+
+ if (viewer != null)
+ {
+ final Control control = viewer.getControl();
+ if (control != null && !control.isDisposed())
+ {
+ control.getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ if (!control.isDisposed()) {
+ control.setRedraw(false);
+ if (input != null)
+ viewer.setInput(input);
+ viewer.expandAll();
+ control.setRedraw(true);
+ }
+ }
+ });
+ }
+ }
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+
+ super.createControl(parent);
+
+ TreeViewer viewer= getTreeViewer();
+ viewer.setContentProvider(new SpecfileContentProvider(editor));
+ viewer.setLabelProvider(new SpecfileLabelProvider());
+ viewer.addSelectionChangedListener(this);
+
+ if (input != null)
+ viewer.setInput(input);
+ }
+
+ /*
+ * Change in selection
+ */
+ @Override
+ public void selectionChanged(SelectionChangedEvent event)
+ {
+ super.selectionChanged(event);
+
+ //find out which item in tree viewer we have selected, and set highlight range accordingly
+ ISelection selection = event.getSelection();
+ if (selection.isEmpty())
+ editor.resetHighlightRange();
+ else
+ {
+ SpecfileElement element = (SpecfileElement) ((IStructuredSelection) selection)
+ .getFirstElement();
+
+ int start = element.getLineStartPosition();
+ try
+ {
+ editor.setHighlightRange(start, 1, true);
+ }
+ catch (IllegalArgumentException e)
+ {
+ editor.resetHighlightRange();
+ }
+ }
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileContentProvider.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileContentProvider.java
new file mode 100644
index 0000000000..0d162831c6
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileContentProvider.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * 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.outline;
+
+import org.eclipse.jface.text.BadPositionCategoryException;
+import org.eclipse.jface.text.DefaultPositionUpdater;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IPositionUpdater;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfilePackage;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfilePackageContainer;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+public class SpecfileContentProvider implements ITreeContentProvider {
+
+ private IDocumentProvider documentProvider;
+ private Specfile specfile;
+ private SpecfileEditor specEditor;
+ protected final static String SECTION_POSITIONS = "section_positions"; //$NON-NLS-1$
+ protected IPositionUpdater positionUpdater = new DefaultPositionUpdater(SECTION_POSITIONS);
+
+ public SpecfileContentProvider(ITextEditor editor) {
+ if (editor instanceof SpecfileEditor) {
+ specEditor = (SpecfileEditor) editor;
+ specfile = specEditor.getSpecfile();
+ }
+ this.documentProvider = editor.getDocumentProvider();
+ }
+
+ public void dispose() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ if (oldInput != null)
+ {
+ IDocument document = documentProvider.getDocument(oldInput);
+ if (document != null)
+ {
+ try
+ {
+ document.removePositionCategory(SECTION_POSITIONS);
+ }
+ catch (BadPositionCategoryException x)
+ {
+ }
+ document.removePositionUpdater(positionUpdater);
+ }
+ }
+
+ if (newInput != null)
+ {
+ IDocument document = documentProvider.getDocument(newInput);
+ if (document != null)
+ {
+ document.addPositionCategory(SECTION_POSITIONS);
+ document.addPositionUpdater(positionUpdater);
+ if (specEditor != null)
+ specfile = specEditor.getSpecfile();
+ }
+ }
+ }
+
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement == specfile) {
+ Object[] elms = new Object[1 + 1 + specfile.getSections().size()];
+ elms[0] = specfile.getPreamble();
+ elms[1] = specfile.getPackages();
+ Object[] sections = specfile.getSections().toArray();
+ for (int i = 0; i < sections.length; i++) {
+ elms[i + 2] = sections[i];
+ }
+ return elms;
+ } else if (parentElement instanceof SpecfilePackageContainer) {
+ Object [] ret = ((SpecfilePackageContainer) parentElement).getPackages();
+ return ret;
+ } else if (parentElement instanceof SpecfilePackage) {
+ Object [] ret = ((SpecfilePackage) parentElement).getSections();
+ return ret;
+ }
+ return new Object[0];
+ }
+
+ public Object getParent(Object element) {
+ return null;
+ }
+
+ public boolean hasChildren(Object element) {
+ if (element == specfile) {
+ return true;
+ } else if (element instanceof SpecfilePackageContainer) {
+ return ((SpecfilePackageContainer) element).hasChildren();
+ } else if (element instanceof SpecfilePackage) {
+ return ((SpecfilePackage) element).hasChildren();
+ }
+ return false;
+ }
+
+ public Object[] getElements(Object inputElement) {
+ return this.getChildren(specfile);
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileLabelProvider.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileLabelProvider.java
new file mode 100644
index 0000000000..469639c688
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileLabelProvider.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * 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.outline;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.Specfile;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileElement;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfilePackage;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfilePackageContainer;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfilePreamble;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileSection;
+import org.eclipse.swt.graphics.Image;
+
+public class SpecfileLabelProvider implements ILabelProvider {
+
+ private static final String PREAMBLE_ICON="icons/preamble_obj.gif"; //$NON-NLS-1$
+ private static final String SECTION_ICON="icons/section_obj.gif"; //$NON-NLS-1$
+ private static final String PACKAGES_ICON="icons/packages_obj.gif"; //$NON-NLS-1$
+ private static final String PACKAGE_ICON="icons/package_obj.gif"; //$NON-NLS-1$
+
+ public SpecfileLabelProvider() {
+ super();
+ }
+
+ public void addListener(ILabelProviderListener listener) {
+ }
+
+ public void dispose() {
+ }
+
+ public boolean isLabelProperty(Object element, String property) {
+ return false;
+ }
+
+ public void removeListener(ILabelProviderListener listener) {
+ }
+
+ public Image getImage(Object element) {
+ if (element instanceof SpecfilePackage) {
+ return Activator.getDefault().getImage(PACKAGE_ICON);
+ } else if (element instanceof SpecfileSection) {
+ return Activator.getDefault().getImage(SECTION_ICON);
+ } else if (element instanceof SpecfilePackageContainer) {
+ return Activator.getDefault().getImage(PACKAGES_ICON);
+ }else if (element instanceof SpecfilePreamble) {
+ return Activator.getDefault().getImage(PREAMBLE_ICON);
+ }
+ return null;
+ }
+
+ public String getText(Object element) {
+ if (element instanceof SpecfileSection) {
+ SpecfileSection specfileSection = (SpecfileSection) element;
+ return specfileSection.toString();
+ } else if (element instanceof Specfile) {
+ return ((Specfile) element).getName();
+ } else if (element instanceof SpecfilePackageContainer) {
+ return Messages.SpecfileLabelProvider_0;
+ } else if (element instanceof SpecfilePreamble){
+ return Messages.SpecfileLabelProvider_1;
+ } else if (element instanceof SpecfileElement) {
+ SpecfileElement specfileElement = (SpecfileElement) element;
+ return specfileElement.getName();
+ } else if (element instanceof String) {
+ return (String) element;
+ } else if (element instanceof SpecfilePackage) {
+ return ((SpecfilePackage) element).getName();
+ }
+ return ""; //$NON-NLS-1$
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileQuickOutlineDialog.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileQuickOutlineDialog.java
new file mode 100644
index 0000000000..5e4a5373de
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/SpecfileQuickOutlineDialog.java
@@ -0,0 +1,166 @@
+/*******************************************************************************
+ * 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.ui.editor.outline;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.PopupDialog;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.viewers.AbstractTreeViewer;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor;
+import org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfileElement;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.FontMetrics;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
+
+public class SpecfileQuickOutlineDialog extends PopupDialog {
+
+ TreeViewer treeViewer;
+ private Text filterText;
+ private SpecfileEditor editor;
+ private ContainsFilter treeViewerFilter;
+
+ public SpecfileQuickOutlineDialog(Shell parent, int shellStyle,
+ SpecfileEditor editor) {
+ super(parent, shellStyle, true, true, true, true, true, null, null);
+ this.editor = editor;
+ create();
+ }
+
+ public void setSize(int width, int height) {
+ getShell().setSize(width, height);
+ }
+
+ public void setVisible(boolean visible) {
+ if (visible) {
+ open();
+ filterText.setFocus();
+ } else {
+ saveDialogBounds(getShell());
+ getShell().setVisible(false);
+ }
+ }
+
+ public void dispose() {
+ close();
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ createUIWidgetTreeViewer(parent);
+ createUIListenersTreeViewer();
+ return treeViewer.getControl();
+ }
+
+ @Override
+ protected Control createTitleControl(Composite parent) {
+ filterText = new Text(parent, SWT.NONE);
+ GC gc = new GC(parent);
+ gc.setFont(parent.getFont());
+ FontMetrics fontMetrics = gc.getFontMetrics();
+ gc.dispose();
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true,
+ false).hint(SWT.DEFAULT,
+ Dialog.convertHeightInCharsToPixels(fontMetrics, 1)).applyTo(
+ filterText);
+
+ filterText.addKeyListener(new KeyAdapter() {
+ @Override
+ public void keyPressed(KeyEvent e) {
+ if (e.keyCode == 0x0D) { // Enter pressed
+ gotoSelectedElement();
+ } else if (e.keyCode == SWT.ARROW_DOWN) {
+ treeViewer.getTree().setFocus();
+ } else if (e.keyCode == SWT.ARROW_UP) {
+ treeViewer.getTree().setFocus();
+ } else if (e.character == 0x1B) { // Escape pressed
+ dispose();
+ }
+ }
+ });
+ filterText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ String filterTextInput = ((Text) e.widget).getText()
+ .toLowerCase();
+ treeViewerFilter.setLookFor(filterTextInput);
+ stringMatcherUpdated();
+ }
+ });
+ return filterText;
+ }
+
+ private void stringMatcherUpdated() {
+ treeViewer.getControl().setRedraw(false);
+ treeViewer.refresh();
+ treeViewer.expandAll();
+ treeViewer.getControl().setRedraw(true);
+ }
+
+ private void createUIWidgetTreeViewer(Composite parent) {
+ final int style = SWT.H_SCROLL | SWT.V_SCROLL;
+ final Tree widget = new Tree(parent, style);
+ final GridData data = new GridData(GridData.FILL_BOTH);
+ data.heightHint = widget.getItemHeight() * 12;
+ widget.setLayoutData(data);
+ treeViewer = new TreeViewer(widget);
+ treeViewerFilter = new ContainsFilter();
+ treeViewer.addFilter(treeViewerFilter);
+ SpecfileContentProvider fOutlineContentProvider = new SpecfileContentProvider(
+ editor);
+ treeViewer.setContentProvider(fOutlineContentProvider);
+ SpecfileLabelProvider fTreeLabelProvider = new SpecfileLabelProvider();
+ treeViewer.setLabelProvider(fTreeLabelProvider);
+ treeViewer.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS);
+ treeViewer.setUseHashlookup(true);
+ treeViewer.setInput(fOutlineContentProvider);
+ }
+
+ private void createUIListenersTreeViewer() {
+ final Tree tree = treeViewer.getTree();
+ tree.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ gotoSelectedElement();
+ }
+ });
+ }
+
+ private void gotoSelectedElement() {
+ final SpecfileElement curElement = (SpecfileElement) getSelectedElement();
+ if (curElement == null) {
+ return;
+ }
+ dispose();
+ editor.setHighlightRange(curElement.getLineStartPosition(), 1, true);
+ }
+
+
+ private Object getSelectedElement() {
+ if (treeViewer == null) {
+ return null;
+ }
+ return ((IStructuredSelection) treeViewer.getSelection())
+ .getFirstElement();
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/messages.properties b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/messages.properties
new file mode 100644
index 0000000000..610533d9c4
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/outline/messages.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
+###############################################################################
+SpecfileLabelProvider_0=Packages
+SpecfileLabelProvider_1=Preamble
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/Messages.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/Messages.java
new file mode 100644
index 0000000000..a31417e209
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/Messages.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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.parser;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.rpm.ui.editor.parser.messages"; //$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.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SourceComparator.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SourceComparator.java
new file mode 100644
index 0000000000..ad1aa85802
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SourceComparator.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * 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.parser;
+
+import java.util.Comparator;
+
+public class SourceComparator implements Comparator<SpecfileSource> {
+ public int compare(SpecfileSource source0, SpecfileSource source1) {
+ if (source0 == null)
+ return -1;
+ if (source1 == null)
+ return 1;
+ if (source0.getNumber() < source1.getNumber())
+ return -1;
+ else if (source0.getNumber() == source1.getNumber())
+ return 0;
+ else
+ return 1;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/Specfile.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/Specfile.java
new file mode 100644
index 0000000000..9a2408221b
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/Specfile.java
@@ -0,0 +1,227 @@
+/*******************************************************************************
+ * 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
+ * Alphonse Van Assche
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui.editor.parser;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.linuxtools.rpm.ui.editor.RpmTags;
+
+public class Specfile {
+
+ SpecfilePreamble preamble;
+
+ SpecfilePackageContainer packages;
+
+ List<SpecfileSection> sections;
+ List<SpecfileSection> complexSections;
+
+ Map<String, SpecfileDefine> defines;
+
+ Map<Integer, SpecfileSource> sources;
+
+ Map<Integer, SpecfileSource> patches;
+
+ private IDocument document;
+
+ public Specfile() {
+ packages = new SpecfilePackageContainer();
+ preamble = new SpecfilePreamble();
+ sections = new ArrayList<SpecfileSection>();
+ complexSections = new ArrayList<SpecfileSection>();
+ defines = new HashMap<String, SpecfileDefine>();
+ sources = new HashMap<Integer, SpecfileSource>();
+ patches = new HashMap<Integer, SpecfileSource>();
+ }
+
+ public List<SpecfileSection> getSections() {
+ return sections;
+ }
+
+ public List<SpecfileSection> getComplexSections() {
+ return complexSections;
+ }
+
+ public SpecfileSource getPatch(int number) {
+ return patches.get(number);
+ }
+
+ public SpecfileSource getSource(int number) {
+ return sources.get(number);
+ }
+
+ public String getName() {
+ SpecfileDefine define = getDefine(RpmTags.NAME.toLowerCase());
+ if (define != null){
+ return define.getStringValue();
+ }
+ return " "; //$NON-NLS-1$
+ }
+
+ public void addSection(SpecfileSection section) {
+ sections.add(section);
+ }
+
+ public void addComplexSection(SpecfileSection section) {
+ complexSections.add(section);
+ }
+
+ public void addSource(SpecfileSource source) {
+ sources.put(Integer.valueOf(source.getNumber()), source);
+ }
+
+ public void addPatch(SpecfileSource patch) {
+ patches.put(Integer.valueOf(patch.getNumber()), patch);
+ }
+
+ /**
+ * Adds the given define to the map of defines for this specfile.
+ *
+ * @param define The define to add.
+ */
+ public void addDefine(SpecfileDefine define) {
+ defines.put(define.getName(), define);
+ }
+
+ public void addDefine(SpecfileTag tag) {
+ addDefine(new SpecfileDefine(tag));
+ }
+
+ public SpecfileDefine getDefine(String defineName) {
+ return defines.get(defineName);
+ }
+
+ public int getEpoch() {
+ SpecfileDefine define = getDefine(RpmTags.EPOCH.toLowerCase());
+ if (define != null){
+ return define.getIntValue();
+ }
+ return -1;
+ }
+
+ public String getRelease() {
+ SpecfileDefine define = getDefine(RpmTags.RELEASE.toLowerCase());
+ if (define != null){
+ return define.getStringValue();
+ }
+ return "0"; //$NON-NLS-1$
+ }
+
+ public String getVersion() {
+ SpecfileDefine define = getDefine(RpmTags.VERSION.toLowerCase());
+ if (define != null){
+ return define.getStringValue();
+ }
+ return "0"; //$NON-NLS-1$
+ }
+
+ public List<SpecfileSource> getPatches() {
+ List<SpecfileSource> patchesList = new ArrayList<SpecfileSource>(patches.values());
+ Collections.sort(patchesList, new SourceComparator());
+ return patchesList;
+ }
+
+ public Collection<SpecfileSource> getSources() {
+ List<SpecfileSource> sourcesList = new ArrayList<SpecfileSource>(sources.values());
+ Collections.sort(sourcesList, new SourceComparator());
+ return sourcesList;
+ }
+
+ public List<SpecfileDefine> getDefines() {
+ List<SpecfileDefine> definesList = new ArrayList<SpecfileDefine>(defines.values());
+ return definesList;
+ }
+
+ public void organizePatches() {
+ List<SpecfileSource> patches = getPatches();
+ int newPatchNumber = 0;
+ int oldPatchNumber = -1;
+ Map<Integer, SpecfileSource> newPatches = new HashMap<Integer, SpecfileSource>();
+ for (SpecfileSource thisPatch: patches) {
+ if (thisPatch.getSpecfile() == null)
+ thisPatch.setSpecfile(this);
+ oldPatchNumber = thisPatch.getNumber();
+ thisPatch.setNumber(newPatchNumber);
+ thisPatch.changeDeclaration(oldPatchNumber);
+ thisPatch.changeReferences(oldPatchNumber);
+ newPatches.put(Integer.valueOf(newPatchNumber), thisPatch);
+ newPatchNumber++;
+ }
+ setPatches(newPatches);
+ }
+
+ public void setDocument(IDocument specfileDocument) {
+ document = specfileDocument;
+ }
+
+ public String getLine(int lineNumber) throws BadLocationException {
+ int offset = document.getLineOffset(lineNumber);
+ int length = getLineLength(lineNumber);
+ String lineContents = document.get(offset, length);
+ return lineContents;
+ }
+
+ public IDocument getDocument() {
+ return document;
+ }
+
+ public int getLineLength(int lineNumber) throws BadLocationException {
+ int length = document.getLineLength(lineNumber);
+ String lineDelimiter = document.getLineDelimiter(lineNumber);
+ if (lineDelimiter != null)
+ length = length - lineDelimiter.length();
+ return length;
+ }
+
+ public void changeLine(int lineNumber, String string)
+ throws BadLocationException {
+ document.replace(document.getLineOffset(lineNumber),
+ getLineLength(lineNumber), string);
+ }
+
+ public void setPatches(Map<Integer, SpecfileSource> patches) {
+ this.patches = patches;
+ }
+
+ @Override
+ public String toString() {
+ return getName();
+ }
+
+ public String getLicense() {
+ return defines.get(RpmTags.LICENSE.toLowerCase()).getStringValue();
+ }
+
+ public SpecfilePackageContainer getPackages() {
+ return packages;
+ }
+
+ public SpecfileElement getPreamble() {
+ return preamble;
+ }
+
+ public SpecfilePackage getPackage(String packageName) {
+ return getPackages().getPackage(packageName);
+ }
+
+ public void addPackage(SpecfilePackage subPackage) {
+ if (! packages.contains(subPackage))
+ packages.addPackage(subPackage);
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileDefine.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileDefine.java
new file mode 100644
index 0000000000..7fbe86592a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileDefine.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * 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.parser;
+
+public class SpecfileDefine extends SpecfileTag {
+
+ public SpecfileDefine(String name, int value, Specfile specfile) {
+ super(name, value, specfile);
+ }
+
+ public SpecfileDefine(String name, String value, Specfile specfile) {
+ super(name, value, specfile);
+ }
+
+ public SpecfileDefine(SpecfileTag tag) {
+ setName(tag.getName().toLowerCase());
+ setSpecfile(tag.getSpecfile());
+ setLineNumber(tag.getLineNumber());
+ if (tag.getTagType().equals(TagType.STRING)) {
+ setStringValue(tag.getStringValue());
+ }
+ if (tag.getTagType().equals(TagType.INT)) {
+ setIntValue(tag.getIntValue());
+ }
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileElement.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileElement.java
new file mode 100644
index 0000000000..74c0a135e2
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileElement.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.parser;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class SpecfileElement {
+ private Specfile specfile;
+ private String name;
+ private int lineNumber;
+ private int lineStartPosition;
+ private int lineEndPosition;
+
+ public int getLineNumber() {
+ return lineNumber;
+ }
+
+ public void setLineNumber(int lineNumber) {
+ this.lineNumber = lineNumber;
+ }
+
+ public SpecfileElement(){
+ //weird
+ }
+
+ public SpecfileElement(String name) {
+ setName(name);
+ }
+
+ public String getName() {
+ return resolve(name);
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String toString() {
+ return name;
+ }
+
+ public int getLineEndPosition() {
+ return lineEndPosition;
+ }
+
+ public void setLineEndPosition(int lineEndPosition) {
+ this.lineEndPosition = lineEndPosition;
+ }
+
+ public int getLineStartPosition() {
+ return lineStartPosition;
+ }
+
+ public void setLineStartPosition(int lineStartPosition) {
+ this.lineStartPosition = lineStartPosition;
+ }
+
+ public Specfile getSpecfile() {
+ return specfile;
+ }
+
+ public void setSpecfile(Specfile specfile) {
+ this.specfile = specfile;
+ }
+
+ public String resolve(String toResolve) {
+ if (specfile == null) {
+ return toResolve;
+ }
+ String resolved = toResolve;
+ Pattern variablePattern = Pattern.compile("%\\{(\\S+?)\\}"); //$NON-NLS-1$
+ try {
+ Matcher variableMatcher = variablePattern.matcher(toResolve);
+ while (variableMatcher.find()) {
+ SpecfileDefine define = specfile
+ .getDefine(variableMatcher.group(1));
+ if (define != null) {
+ resolved = resolved.replaceAll("%\\{" //$NON-NLS-1$
+ + variableMatcher.group(1) + "\\}", define //$NON-NLS-1$
+ .getStringValue());
+ }
+ }
+ } catch (Exception e) {
+ // TODO: handle exception
+ }
+
+ return resolved;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileMacro.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileMacro.java
new file mode 100644
index 0000000000..4f341d47c2
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileMacro.java
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * 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.parser;
+
+public class SpecfileMacro extends SpecfileElement {
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePackage.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePackage.java
new file mode 100644
index 0000000000..e1d501f9b8
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePackage.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * 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.parser;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SpecfilePackage extends SpecfileSection {
+ private String description;
+ private List<SpecfileSection> sections;
+ private String packageName;
+
+ public SpecfilePackage(String packageName, Specfile specfile) {
+ super("package", specfile); //$NON-NLS-1$
+ super.setSpecfile(specfile);
+ setPackageName(packageName);
+ setPackage(this);
+ sections = new ArrayList<SpecfileSection>();
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ @Override
+ public String toString() {
+ return getPackageName();
+ }
+
+ public void addSection(SpecfileSection section) {
+ sections.add(section);
+ }
+
+
+ public SpecfileSection[] getSections() {
+ SpecfileSection[] toReturn = new SpecfileSection[sections.size()];
+ return sections.toArray(toReturn);
+ }
+
+ public boolean hasChildren() {
+ if (sections != null && sections.size() > 0)
+ return true;
+ return false;
+ }
+
+ @Override
+ public SpecfilePackage getPackage() {
+ return this;
+ }
+
+ @Override
+ public String getPackageName() {
+ return resolve(this.packageName);
+ }
+
+ public void setPackageName(String packageName) {
+ this.packageName = packageName;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePackageContainer.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePackageContainer.java
new file mode 100644
index 0000000000..3d9230c905
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePackageContainer.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * 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.parser;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileLog;
+
+public class SpecfilePackageContainer extends SpecfileElement {
+ List<SpecfilePackage> packages;
+
+ public SpecfilePackageContainer() {
+ packages = new ArrayList<SpecfilePackage>();
+ }
+
+ public SpecfilePackage[] getPackages() {
+ try {
+ Object [] objs = packages.toArray();
+ SpecfilePackage [] packs = new SpecfilePackage[objs.length];
+ for (int i = 0; i < objs.length; i++) {
+ SpecfilePackage pack = (SpecfilePackage) objs[i];
+ packs[i] = pack;
+ }
+ return packs;
+ }catch (Exception e){
+ SpecfileLog.logError(e);
+ }
+ return new SpecfilePackage[0] ;
+ }
+
+ void addPackage(SpecfilePackage subPackage) {
+ packages.add(subPackage);
+ }
+
+ @Override
+ public int getLineStartPosition() {
+ if ((packages == null) || (packages.size() == 0))
+ return 0;
+
+ int lowestStartLine = Integer.MAX_VALUE;
+
+ for (SpecfilePackage subPackage: packages){
+ if (subPackage.getLineStartPosition() < lowestStartLine)
+ lowestStartLine = subPackage.getLineStartPosition();
+ }
+
+ if (lowestStartLine == Integer.MAX_VALUE)
+ return 0;
+ return lowestStartLine;
+ }
+
+ @Override
+ public int getLineEndPosition() {
+ if ((packages == null) || (packages.size() == 0))
+ return 0;
+
+ int highestEndLine = 0;
+
+ for (SpecfilePackage subPackage: packages){
+ if (subPackage.getLineStartPosition() > highestEndLine)
+ highestEndLine = subPackage.getLineEndPosition();
+ }
+
+ if (highestEndLine < 0)
+ return 0;
+ return highestEndLine;
+ }
+
+ public SpecfilePackage getPackage(String packageName) {
+ for (SpecfilePackage thisPackage: packages) {
+ if (thisPackage.getPackageName().equals(thisPackage.resolve(packageName))) {
+ return thisPackage;
+ }
+ }
+ return null;
+ }
+
+ public boolean contains(SpecfilePackage subPackage){
+ return packages.contains(subPackage);
+ }
+
+ public boolean hasChildren() {
+ if (packages != null && packages.size() > 0)
+ return true;
+ return false;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParseException.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParseException.java
new file mode 100644
index 0000000000..043de91a92
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParseException.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * 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.parser;
+
+public class SpecfileParseException extends Exception {
+
+ private static final long serialVersionUID = 1L;
+ String message;
+ int severity;
+ int lineNumber;
+ int startColumn;
+ int endColumn;
+ public int getEndColumn() {
+ return endColumn;
+ }
+ public void setEndColumn(int endColumn) {
+ this.endColumn = endColumn;
+ }
+ public int getLineNumber() {
+ return lineNumber;
+ }
+ public void setLineNumber(int lineNumber) {
+ this.lineNumber = lineNumber;
+ }
+ @Override
+ public String getMessage() {
+ return message;
+ }
+ public void setMessage(String message) {
+ this.message = message;
+ }
+ public int getStartColumn() {
+ return startColumn;
+ }
+ public void setStartColumn(int startColumn) {
+ this.startColumn = startColumn;
+ }
+ public SpecfileParseException(String message, int lineNumber, int startColumn, int endColumn, int severity) {
+ super();
+ this.message = message;
+ this.lineNumber = lineNumber;
+ this.startColumn = startColumn;
+ this.endColumn = endColumn;
+ this.severity = severity;
+ }
+ public int getSeverity() {
+ return severity;
+ }
+ public void setSeverity(int severity) {
+ this.severity = severity;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java
new file mode 100644
index 0000000000..27719ca300
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileParser.java
@@ -0,0 +1,584 @@
+/*******************************************************************************
+ * 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
+ * Alphonse Van Assche
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui.editor.parser;
+
+import java.io.IOException;
+import java.io.LineNumberReader;
+import java.io.StringReader;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.linuxtools.rpm.ui.editor.ISpecfileSpecialSymbols;
+import org.eclipse.linuxtools.rpm.ui.editor.RpmTags;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileLog;
+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.SpecfileSource.SourceType;
+import org.eclipse.linuxtools.rpm.ui.editor.preferences.PreferenceConstants;
+
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmSections.*;
+
+public class SpecfileParser {
+
+ /**
+ * These are SRPM-wide sections, and they also cannot have any flags like -n
+ * or -f. Hence they are called simple. This is probably a misleading name
+ * and it should be renamed to reflect that they are SRPM-wide sections.
+ */
+ public static String[] simpleSections = { PREP_SECTION, BUILD_SECTION,
+ INSTALL_SECTION, CLEAN_SECTION, CHANGELOG_SECTION };
+
+ /**
+ * These are sections that apply to a particular sub-package (i.e. binary
+ * RPM), including the main package. These can also have flags like -f or -n
+ * appended to them, hence they are called complex. This should probably be
+ * renamed to reflect that they are in fact per-RPM sections.
+ */
+ private static String[] complexSections = { PRETRANS_SECTION, PRE_SECTION,
+ PREUN_SECTION, POST_SECTION, POSTUN_SECTION, POSTTRANS_SECTION,
+ FILES_SECTION, PACKAGE_SECTION, DESCRIPTION_SECTION };
+
+ // Fix bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=215771
+ // private static String[] simpleDefinitions = { "Epoch", "Name", "Version",
+ // "Release", "License", "URL" };
+ private static String[] simpleDefinitions = { RpmTags.EPOCH, RpmTags.NAME,
+ RpmTags.VERSION, RpmTags.RELEASE, RpmTags.URL };
+
+ private static String[] directValuesDefinitions = { RpmTags.LICENSE,
+ RpmTags.SUMMARY };
+ // Note that the ordering here should match that in
+ // SpecfileSource#SOURCETYPE
+ private static String[] complexDefinitions = { "Source", "Patch" }; //$NON-NLS-1$ //$NON-NLS-2$
+
+ // FIXME: Handle package-level definitions
+ // private static String[] packageLevelDefinitions = { "Summary", "Group",
+ // "Obsoletes", "Provides", "BuildRequires", "Requires",
+ // "Requires(pre)", "Requires(post)", "Requires(postun)" };
+
+ private SpecfileErrorHandler errorHandler;
+ private SpecfileTaskHandler taskHandler;
+ private IPreferenceStore store;
+ private SpecfileSection lastSection;
+
+ public SpecfileParser() {
+ store = Activator.getDefault().getPreferenceStore();
+ }
+
+ public Specfile parse(IDocument specfileDocument) {
+
+ // remove all existing markers, if a SpecfileErrorHandler is
+ // instantiated.
+ if (errorHandler != null)
+ errorHandler.removeExistingMarkers();
+ if (taskHandler != null) {
+ taskHandler.removeExistingMarkers();
+ }
+ LineNumberReader reader = new LineNumberReader(new StringReader(
+ specfileDocument.get()));
+ String line = ""; //$NON-NLS-1$
+ int lineStartPosition = 0;
+ Specfile specfile = new Specfile();
+ specfile.setDocument(specfileDocument);
+ try {
+ while ((line = reader.readLine()) != null) {
+ if (taskHandler != null) {
+ generateTaskMarker(reader.getLineNumber() - 1, line);
+ }
+ // IDocument.getLine(#) is 0-indexed whereas
+ // reader.getLineNumber appears to be 1-indexed
+ SpecfileElement element = parseLine(line, specfile, reader
+ .getLineNumber() - 1);
+ if (element != null) {
+ element.setLineNumber(reader.getLineNumber() - 1);
+ element.setLineStartPosition(lineStartPosition);
+ element.setLineEndPosition(lineStartPosition
+ + line.length());
+ if (element.getClass() == SpecfileTag.class) {
+ SpecfileTag tag = (SpecfileTag) element;
+ specfile.addDefine(tag);
+ } else if ((element.getClass() == SpecfilePatchMacro.class)) {
+ SpecfilePatchMacro thisPatchMacro = (SpecfilePatchMacro) element;
+ if (thisPatchMacro != null) {
+ thisPatchMacro.setSpecfile(specfile);
+ }
+ SpecfileSource thisPatch = specfile
+ .getPatch(thisPatchMacro.getPatchNumber());
+ if (thisPatch != null) {
+ thisPatch.addLineUsed(reader.getLineNumber() - 1);
+ thisPatch.setSpecfile(specfile);
+ }
+ } else if ((element.getClass() == SpecfileDefine.class)) {
+ specfile.addDefine((SpecfileDefine) element);
+ } else if ((element.getClass() == SpecfileSource.class)) {
+ SpecfileSource source = (SpecfileSource) element;
+
+ source.setLineNumber(reader.getLineNumber() - 1);
+ if (source.getSourceType() == SpecfileSource.SourceType.SOURCE) {
+ specfile.addSource(source);
+ } else {
+ specfile.addPatch(source);
+ }
+ }
+ }
+ // The +1 is for the line delimiter. FIXME: will we end up off
+ // by one on the last line?
+ lineStartPosition += line.length() + 1;
+ }
+ } catch (IOException e) {
+ // FIXME
+ SpecfileLog.logError(e);
+ }
+ return specfile;
+ }
+
+ private void generateTaskMarker(int lineNumber, String line) {
+ String[] taskTags = store.getString(PreferenceConstants.P_TASK_TAGS)
+ .split(";"); //$NON-NLS-1$
+ int commentCharIndex = line
+ .indexOf(ISpecfileSpecialSymbols.COMMENT_START);
+ if (commentCharIndex > -1) {
+ for (String item : taskTags) {
+ int taskIndex = line.indexOf(item);
+ if (taskIndex > commentCharIndex) {
+ taskHandler.handleTask(lineNumber, line, item);
+ }
+ }
+ }
+ }
+
+ public Specfile parse(String specfileContent) {
+ return parse(new Document(specfileContent));
+ }
+
+ public SpecfileElement parseLine(String lineText, Specfile specfile,
+ int lineNumber) {
+
+ if (lineText.startsWith("%")) //$NON-NLS-1$
+ return parseMacro(lineText, specfile, lineNumber);
+
+ for (String simpleDefinition : simpleDefinitions) {
+ if (lineText.startsWith(simpleDefinition + ":")) { //$NON-NLS-1$
+ if (simpleDefinition.equals("License")) { //$NON-NLS-1$
+ return parseSimpleDefinition(lineText, specfile,
+ lineNumber, true);
+ } else
+ return parseSimpleDefinition(lineText, specfile,
+ lineNumber, false);
+ }
+ }
+ for (String directValuesDefinition : directValuesDefinitions) {
+ if (lineText.startsWith(directValuesDefinition + ":")) { //$NON-NLS-1$
+ return parseDirectDefinition(lineText, specfile, lineNumber);
+ }
+ }
+
+ // FIXME: Handle package-level definitions
+ if (lineText.startsWith(complexDefinitions[0])) {
+ return parseComplexDefinition(lineText, lineNumber,
+ SourceType.SOURCE);
+ } else if (lineText.startsWith(complexDefinitions[1])) {
+ return parseComplexDefinition(lineText, lineNumber,
+ SourceType.PATCH);
+ }
+
+ return null;
+ }
+
+ private SpecfileSection parseSection(String lineText, Specfile specfile,
+ int lineNumber) {
+ List<String> tokens = Arrays.asList(lineText.split("\\s+")); //$NON-NLS-1$
+ SpecfileSection toReturn = null;
+ boolean isSimpleSection = false;
+ for (Iterator<String> iter = tokens.iterator(); iter.hasNext();) {
+ String token = iter.next();
+
+ // Sections
+ // Simple Section Headers
+ for (String simpleSection : simpleSections) {
+ if (token.equals(simpleSection)) {
+ toReturn = new SpecfileSection(token.substring(1), specfile);
+ specfile.addSection(toReturn);
+ isSimpleSection = true;
+ }
+
+ }
+
+ // Complex Section Headers
+ for (String complexSection : complexSections) {
+ if (token.equals(complexSection)) {
+ String name = token.substring(1);
+ if (!name.equals("package")) { //$NON-NLS-1$
+ toReturn = new SpecfileSection(name, specfile);
+ specfile.addComplexSection(toReturn);
+ }
+ while (iter.hasNext()) {
+ String nextToken = iter.next();
+ if (nextToken.equals("-n")) { //$NON-NLS-1$
+ if (!iter.hasNext()) {
+ errorHandler
+ .handleError(new SpecfileParseException(
+ Messages
+ .getString("SpecfileParser.1") //$NON-NLS-1$
+ + name
+ + Messages
+ .getString("SpecfileParser.2"), //$NON-NLS-1$
+ lineNumber, 0, lineText
+ .length(),
+ IMarker.SEVERITY_ERROR));
+ continue;
+ }
+
+ nextToken = iter.next();
+ if (nextToken.startsWith("-")) { //$NON-NLS-1$
+ errorHandler
+ .handleError(new SpecfileParseException(
+ Messages
+ .getString("SpecfileParser.3") //$NON-NLS-1$
+ + nextToken
+ + Messages
+ .getString("SpecfileParser.4"), //$NON-NLS-1$
+ lineNumber, 0, lineText
+ .length(),
+ IMarker.SEVERITY_ERROR));
+ }
+
+ } else if (nextToken.equals("-p")) { //$NON-NLS-1$
+ // FIXME: rest of line is the actual section
+ break;
+ } else if (nextToken.equals("-f")) { //$NON-NLS-1$
+ break;
+ }
+
+ // this is a package
+ if (toReturn == null) {
+ toReturn = specfile.getPackage(nextToken);
+
+ if (toReturn == null) {
+ toReturn = new SpecfilePackage(nextToken,
+ specfile);
+ specfile.addPackage((SpecfilePackage) toReturn);
+ }
+ return toReturn;
+ }
+
+ // this is another section
+ SpecfilePackage enclosingPackage = specfile
+ .getPackage(nextToken);
+ if (enclosingPackage == null) {
+ enclosingPackage = new SpecfilePackage(nextToken,
+ specfile);
+ specfile.addPackage(enclosingPackage);
+ }
+ toReturn.setPackage(enclosingPackage);
+ enclosingPackage.addSection(toReturn);
+ }
+ }
+ }
+ }
+
+ // if this package is part of the top level package, add it to
+ // it
+ if (toReturn != null && toReturn.getPackage() == null) {
+ SpecfilePackage topPackage = specfile
+ .getPackage(specfile.getName());
+ if (topPackage == null) {
+ topPackage = new SpecfilePackage(specfile.getName(), specfile);
+ specfile.addPackage(topPackage);
+ }
+ if (!isSimpleSection) {
+ topPackage.addSection(toReturn);
+ }
+ }
+ if (lastSection != null) {
+ lastSection.setSectionEndLine(lineNumber);
+ }
+ return toReturn;
+ }
+
+ private SpecfileElement parseMacro(String lineText, Specfile specfile,
+ int lineNumber) {
+ // FIXME: handle other macros
+
+ if (lineText.startsWith("%define") || lineText.startsWith("%global")) { //$NON-NLS-1$ //$NON-NLS-2$
+ return parseDefine(lineText, specfile, lineNumber);
+ } else if (lineText.startsWith("%patch")) { //$NON-NLS-1$
+ return parsePatch(lineText, lineNumber);
+ }
+
+ String[] sections = new String[simpleSections.length
+ + complexSections.length];
+ System.arraycopy(simpleSections, 0, sections, 0, simpleSections.length);
+ System.arraycopy(complexSections, 0, sections, simpleSections.length,
+ complexSections.length);
+ for (String section : sections) {
+ if (lineText.startsWith(section)) {
+ lastSection = parseSection(lineText, specfile, lineNumber);
+ lastSection.setSectionEndLine(lineNumber+1);
+ return lastSection;
+ }
+ }
+ // FIXME: add handling of lines containing %{SOURCENNN}
+ return null;
+ }
+
+ private SpecfileElement parsePatch(String lineText, int lineNumber) {
+
+ SpecfilePatchMacro toReturn = null;
+
+ List<String> tokens = Arrays.asList(lineText.split("\\s+")); //$NON-NLS-1$
+
+ for (String token : tokens) {
+ // %patchN+
+ try {
+ if (token.startsWith("%patch")) { //$NON-NLS-1$
+ int patchNumber = 0;
+ if (token.length() > 6) {
+ patchNumber = Integer.parseInt(token.substring(6));
+ }
+ toReturn = new SpecfilePatchMacro(patchNumber);
+ }
+ } catch (NumberFormatException e) {
+ errorHandler.handleError(new SpecfileParseException(
+ Messages.getString("SpecfileParser.5"), //$NON-NLS-1$
+ lineNumber, 0, lineText.length(),
+ IMarker.SEVERITY_ERROR));
+ return null;
+ }
+ }
+
+ return toReturn;
+ }
+
+ private SpecfileDefine parseDefine(String lineText, Specfile specfile,
+ int lineNumber) {
+ List<String> tokens = Arrays.asList(lineText.split("\\s+")); //$NON-NLS-1$
+ SpecfileDefine toReturn = null;
+ for (Iterator<String> iter = tokens.iterator(); iter.hasNext();) {
+ // Eat the actual "%define" or "%global" token
+ iter.next();
+ while (iter.hasNext()) {
+ String defineName = iter.next();
+ // FIXME: is this true? investigate in rpmbuild source
+ // Definitions must being with a letter
+ if (!Character.isLetter(defineName.charAt(0))
+ && (defineName.charAt(0) != '_')) {
+ errorHandler.handleError(new SpecfileParseException(
+ Messages.getString("SpecfileParser.6"), //$NON-NLS-1$
+ lineNumber, 0, lineText.length(),
+ IMarker.SEVERITY_ERROR));
+ return null;
+ } else {
+ if (!iter.hasNext()) {
+ // FIXME: Should this be an error?
+ errorHandler.handleError(new SpecfileParseException(
+ Messages.getString("SpecfileParser.7"), //$NON-NLS-1$
+ lineNumber, 0, lineText.length(),
+ IMarker.SEVERITY_WARNING));
+ } else {
+ String defineStringValue = iter.next();
+ // Defines that are more than one token
+ if (iter.hasNext()) {
+ defineStringValue = lineText.substring(lineText
+ .indexOf(defineStringValue));
+ // Eat up the rest of the tokens
+ while (iter.hasNext())
+ iter.next();
+ }
+ int defineIntValue = -1;
+ try {
+ defineIntValue = Integer
+ .parseInt(defineStringValue);
+ } catch (NumberFormatException e) {
+ toReturn = new SpecfileDefine(defineName,
+ defineStringValue, specfile);
+ }
+ if (toReturn == null)
+ toReturn = new SpecfileDefine(defineName,
+ defineIntValue, specfile);
+ }
+ }
+ }
+ }
+ return toReturn;
+ }
+
+ private SpecfileElement parseComplexDefinition(String lineText,
+ int lineNumber, SourceType sourceType) {
+ SpecfileSource toReturn = null;
+ List<String> tokens = Arrays.asList(lineText.split("\\s+")); //$NON-NLS-1$
+ int number = -1;
+ boolean firstToken = true;
+
+ for (Iterator<String> iter = tokens.iterator(); iter.hasNext();) {
+ String token = iter.next();
+ if (token != null && token.length() > 0) {
+ if (firstToken) {
+ if (token.endsWith(":")) { //$NON-NLS-1$
+ token = token.substring(0, token.length() - 1);
+ } else {
+ // FIXME: come up with a better error message here
+ // FIXME: what about descriptions that begin a line with
+ // the word "Source" or "Patch"?
+ errorHandler.handleError(new SpecfileParseException(
+ Messages.getString("SpecfileParser.8"), //$NON-NLS-1$
+ lineNumber, 0, lineText.length(),
+ IMarker.SEVERITY_WARNING));
+ return null;
+ }
+ if (sourceType == SourceType.PATCH) {
+ if (token.length() > 5) {
+ number = Integer.parseInt(token.substring(5));
+ if (!("patch" + number).equalsIgnoreCase(token)) { //$NON-NLS-1$
+ errorHandler
+ .handleError(new SpecfileParseException(
+ Messages
+ .getString("SpecfileParser.10"), //$NON-NLS-1$
+ lineNumber, 0, lineText
+ .length(),
+ IMarker.SEVERITY_ERROR));
+ return null;
+ }
+ } else {
+ number = 0;
+ }
+ } else {
+ if (token.length() > 6) {
+ number = Integer.parseInt(token.substring(6));
+ if (!("source" + number).equalsIgnoreCase(token)) { //$NON-NLS-1$
+ errorHandler
+ .handleError(new SpecfileParseException(
+ Messages
+ .getString("SpecfileParser.11"), //$NON-NLS-1$
+ lineNumber, 0, lineText
+ .length(),
+ IMarker.SEVERITY_ERROR));
+ return null;
+ }
+ } else {
+ number = 0;
+ }
+ }
+ toReturn = new SpecfileSource(number, ""); //$NON-NLS-1$
+ toReturn.setSourceType(sourceType);
+ firstToken = false;
+ } else {
+ // toReturn should never be null but check just in case
+ if (toReturn != null)
+ toReturn.setFileName(token);
+ if (iter.hasNext()) {
+ errorHandler.handleError(new SpecfileParseException(
+ Messages.getString("SpecfileParser.12"), //$NON-NLS-1$
+ lineNumber, 0, lineText.length(),
+ IMarker.SEVERITY_ERROR));
+ }
+ }
+ }
+ }
+
+ return toReturn;
+ }
+
+ private SpecfileElement parseSimpleDefinition(String lineText,
+ Specfile specfile, int lineNumber, boolean warnMultipleValues) {
+ List<String> tokens = Arrays.asList(lineText.split("\\s+")); //$NON-NLS-1$
+ SpecfileTag toReturn = null;
+
+ for (Iterator<String> iter = tokens.iterator(); iter.hasNext();) {
+ String token = iter.next();
+
+ if (token.length() <= 0) {
+ break;
+ }
+
+ if (iter.hasNext()) {
+ String possValue = iter.next();
+ if (possValue.startsWith("%") && iter.hasNext()) { //$NON-NLS-1$
+ possValue += ' ' + iter.next();
+ }
+ toReturn = new SpecfileTag(token.substring(0,
+ token.length() - 1).toLowerCase(), possValue, specfile);
+ if (iter.hasNext() && !warnMultipleValues) {
+ errorHandler.handleError(new SpecfileParseException(
+ token.substring(0, token.length() - 1)
+ + Messages.getString("SpecfileParser.13"), //$NON-NLS-1$
+ lineNumber, 0, lineText.length(),
+ IMarker.SEVERITY_ERROR));
+ return null;
+ }
+ // FIXME: investigate whether we should keep this or not
+ // } else {
+ // errorHandler.handleError(new SpecfileParseException(
+ // token.substring(0, token.length() - 1) +
+ // " should be an acronym.",
+ // lineNumber, 0, lineText.length(),
+ // IMarker.SEVERITY_WARNING));
+ // }
+ } else {
+ errorHandler.handleError(new SpecfileParseException(token
+ .substring(0, token.length() - 1)
+ + Messages.getString("SpecfileParser.14"), lineNumber, //$NON-NLS-1$
+ 0, lineText.length(), IMarker.SEVERITY_ERROR));
+ toReturn = null;
+ }
+ }
+ if ((toReturn != null) && (toReturn.getStringValue() != null)) {
+ if (toReturn.getStringValue().indexOf("_") > 0) { //$NON-NLS-1$
+ if (toReturn.getName().equalsIgnoreCase("release")) //$NON-NLS-1$
+ errorHandler
+ .handleError(new SpecfileParseException(
+ Messages.getString("SpecfileParser.15"), lineNumber, //$NON-NLS-1$
+ 0, lineText.length(),
+ IMarker.SEVERITY_WARNING));
+ }
+ try {
+ int intValue = Integer.parseInt(toReturn.getStringValue());
+ toReturn.setIntValue(intValue);
+ toReturn.setStringValue(null);
+ toReturn.setTagType(SpecfileTag.TagType.INT);
+ } catch (NumberFormatException e) {
+ if (toReturn.getName().equals("epoch")) { //$NON-NLS-1$
+ errorHandler
+ .handleError(new SpecfileParseException(
+ Messages.getString("SpecfileParser.16"), lineNumber, //$NON-NLS-1$
+ 0, lineText.length(),
+ IMarker.SEVERITY_ERROR));
+ toReturn = null;
+ }
+ }
+ }
+ return toReturn;
+ }
+
+ private SpecfileElement parseDirectDefinition(String lineText,
+ Specfile specfile, int lineNumber) {
+ String[] parts = lineText.split(":"); //$NON-NLS-1$
+ SpecfileTag licenseElement = new SpecfileTag(parts[0].toLowerCase(),
+ parts[1].trim(), specfile);
+ licenseElement.setLineNumber(lineNumber);
+ return licenseElement;
+ }
+
+ public void setErrorHandler(SpecfileErrorHandler specfileErrorHandler) {
+ errorHandler = specfileErrorHandler;
+ }
+
+ public void setTaskHandler(SpecfileTaskHandler specfileTaskHandler) {
+ taskHandler = specfileTaskHandler;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePatchMacro.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePatchMacro.java
new file mode 100644
index 0000000000..8a023c5e89
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePatchMacro.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * 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.parser;
+
+import java.text.MessageFormat;
+
+public class SpecfilePatchMacro extends SpecfileMacro {
+ private int patchNumber;
+ private int patchLevel;
+ // TODO: add patchLevel functionality
+ public SpecfilePatchMacro(int patchNumber) {
+ super();
+ this.patchNumber = patchNumber;
+// this.patchLevel = patchLevel;
+ }
+ public int getPatchLevel() {
+ return patchLevel;
+ }
+ public void setPatchLevel(int patchLevel) {
+ this.patchLevel = patchLevel;
+ }
+ public int getPatchNumber() {
+ return patchNumber;
+ }
+ public void setPatchNumber(int patchNumber) {
+ this.patchNumber = patchNumber;
+ }
+ @Override
+ public String toString() {
+ return MessageFormat.format("patch #{0} at level {1}", patchNumber, patchLevel); //$NON-NLS-1$
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePreamble.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePreamble.java
new file mode 100644
index 0000000000..84811572ce
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfilePreamble.java
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * 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.parser;
+
+public class SpecfilePreamble extends SpecfileElement {
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileSection.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileSection.java
new file mode 100644
index 0000000000..46da2a35ff
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileSection.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * 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.parser;
+
+import java.text.MessageFormat;
+
+public class SpecfileSection extends SpecfileElement {
+
+ private SpecfilePackage parentPackage;
+ private int sectionEndLine;
+
+ public SpecfileSection(String name, Specfile specfile) {
+ super(name);
+ parentPackage = null;
+ super.setSpecfile(specfile);
+ }
+
+ public SpecfilePackage getPackage() {
+ return parentPackage;
+ }
+
+ public void setPackage(SpecfilePackage thePackage) {
+ this.parentPackage = thePackage;
+ }
+
+ @Override
+ public String toString() {
+ if (parentPackage == null) {
+ return getName();
+ } else {
+ return MessageFormat.format("{0} {1}", getName(), parentPackage); //$NON-NLS-1$
+ }
+ }
+
+ public String getPackageName() {
+ return parentPackage.getPackageName();
+ }
+
+ /**
+ * @param sectionEnd
+ * the sectionEnd to set
+ */
+ public void setSectionEndLine(int sectionEnd) {
+ this.sectionEndLine = sectionEnd;
+ }
+
+ /**
+ * @return the sectionEnd
+ */
+ public int getSectionEndLine() {
+ return sectionEndLine;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileSource.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileSource.java
new file mode 100644
index 0000000000..0d98290057
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileSource.java
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * 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.parser;
+
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileLog;
+
+public class SpecfileSource extends SpecfileElement {
+ int number;
+ int lineNumber = -1;
+ String fileName;
+ public enum SourceType { SOURCE, PATCH}
+ SourceType sourceType;
+ List<Integer> linesUsed;
+
+ public SourceType getSourceType() {
+ return sourceType;
+ }
+ public void setSourceType(SourceType sourceType) {
+ this.sourceType = sourceType;
+ }
+ public SpecfileSource(int number, String fileName) {
+ super("source"); //$NON-NLS-1$
+ this.number = number;
+ this.fileName = fileName;
+ this.linesUsed = new ArrayList<Integer>();
+ }
+ public String getFileName() {
+ return resolve(fileName);
+ }
+ public void setFileName(String fileName) {
+ this.fileName = fileName;
+ }
+ public int getNumber() {
+ return number;
+ }
+ public void setNumber(int number) {
+ this.number = number;
+ }
+ public void addLineUsed(int lineNumber) {
+ linesUsed.add(Integer.valueOf(lineNumber));
+ }
+ public void removeLineUsed(int lineNumber) {
+ linesUsed.remove(Integer.valueOf(lineNumber));
+ }
+ public List<Integer> getLinesUsed() {
+ return linesUsed;
+ }
+ @Override
+ public String toString() {
+ if (sourceType == SourceType.SOURCE)
+ return MessageFormat.format(
+ "Source #{0} (line #{1}, used on lines {2}) -> {3}", //$NON-NLS-1$
+ number, lineNumber, getLinesUsed(), fileName);
+ return MessageFormat.format(
+ "Patch #{0} (line #{1}, used on lines {2}) -> {3}", number, //$NON-NLS-1$
+ lineNumber, getLinesUsed(), fileName);
+ }
+
+ // Note that changeReferences assumes that the number of the source/patch
+ // has *already been set*. If this is not true, it will simply do nothing
+ public void changeReferences(int oldPatchNumber) {
+ Specfile specfile = this.getSpecfile();
+ Pattern patchPattern;
+ if (oldPatchNumber == 0) {
+ patchPattern = Pattern.compile("%patch" + oldPatchNumber + "|%patch"); //$NON-NLS-1$ //$NON-NLS-2$
+ } else {
+ patchPattern = Pattern.compile("%patch" + oldPatchNumber); //$NON-NLS-1$
+ }
+ for (int lineNumber: getLinesUsed()){
+ String line;
+ try {
+ line = specfile.getLine(lineNumber);
+ Matcher patchMatcher = patchPattern.matcher(line);
+ if (!patchMatcher.find()) {
+ System.out.println(Messages.getString("SpecfileSource.0") + patchPattern.pattern()); //$NON-NLS-1$
+// throw new BadLocationException("can't match " + patchPattern);
+ }
+ specfile.changeLine(lineNumber, line.replaceAll(patchPattern.pattern(), Messages.getString("SpecfileSource.1") + number)); //$NON-NLS-1$
+ } catch (BadLocationException e) {
+ SpecfileLog.logError(e);
+ }
+ }
+ }
+ public void changeDeclaration(int oldPatchNumber) {
+ Specfile specfile = this.getSpecfile();
+ Pattern patchPattern;
+ if (oldPatchNumber == 0) {
+ patchPattern = Pattern.compile("Patch" + oldPatchNumber + "|Patch"); //$NON-NLS-1$ //$NON-NLS-2$
+ } else {
+ patchPattern = Pattern.compile("Patch" + oldPatchNumber); //$NON-NLS-1$
+ }
+ String line;
+ try {
+ line = specfile.getLine(lineNumber);
+ Matcher patchMatcher = patchPattern.matcher(line);
+ if (!patchMatcher.find())
+ // TODO: Maybe we can throw a exception here.
+ System.out.println(Messages.getString("SpecfileSource.2") + patchPattern.pattern()); //$NON-NLS-1$
+ specfile.changeLine(lineNumber, line.replaceAll(patchPattern.pattern(), "Patch" + number)); //$NON-NLS-1$
+ } catch (BadLocationException e) {
+ SpecfileLog.logError(e);
+ }
+ }
+ @Override
+ public int getLineNumber() {
+ return lineNumber;
+ }
+ @Override
+ public void setLineNumber(int lineNumber) {
+ this.lineNumber = lineNumber;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileTag.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileTag.java
new file mode 100644
index 0000000000..909d7f600d
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/SpecfileTag.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * 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.parser;
+
+
+public class SpecfileTag extends SpecfileElement {
+
+ public enum TagType { INT, STRING}
+ TagType tagType;
+
+ String stringValue;
+ int intValue;
+
+ public SpecfileTag(){
+ // Empty constructor
+ }
+
+ public SpecfileTag(String name, String value, Specfile specfile) {
+ setName(name);
+ this.stringValue = value;
+ this.tagType = TagType.STRING;
+ super.setSpecfile(specfile);
+ }
+
+ public String getStringValue() {
+ if (tagType == TagType.INT) {
+ return Integer.toString(intValue);
+ }
+ return resolve(stringValue);
+ }
+ public void setStringValue(String value) {
+ this.stringValue = value;
+ }
+
+ public SpecfileTag(String name, int value, Specfile specfile) {
+ setName(name);
+ this.intValue = value;
+ this.tagType = TagType.INT;
+ super.setSpecfile(specfile);
+ }
+
+ public int getIntValue() {
+ return intValue;
+ }
+
+ public void setIntValue(int value) {
+ this.intValue = value;
+ }
+
+ @Override
+ public String toString() {
+ if (tagType == TagType.INT) {
+ return getName() + ": " + getIntValue(); //$NON-NLS-1$
+ }
+ String tagValue = getStringValue();
+ if ((tagValue != null) && (tagValue.length() > 0) && (tagValue.indexOf("%") > 0)) { //$NON-NLS-1$
+ return getName() + ": " + super.resolve(tagValue); //$NON-NLS-1$
+ }
+ return getName() + ": " + getStringValue(); //$NON-NLS-1$
+ }
+
+ public TagType getTagType() {
+ return tagType;
+ }
+
+ public void setTagType(TagType tagType) {
+ this.tagType = tagType;
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/messages.properties b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/messages.properties
new file mode 100644
index 0000000000..488562cd33
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/parser/messages.properties
@@ -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
+###############################################################################
+SpecfileParser.1=No package name after -n in
+SpecfileParser.10=Invalid patch directive.
+SpecfileParser.11=Invalid source directive.
+SpecfileParser.12=Filename cannot be multiple words.
+SpecfileParser.13=\ cannot have multiple values.
+SpecfileParser.14=\ declaration without value.
+SpecfileParser.15=Release should not contain an underscore.
+SpecfileParser.16=Epoch cannot have non-integer value.
+SpecfileParser.2=\ section.
+SpecfileParser.3=Package name must not start with '-':
+SpecfileParser.4=.
+SpecfileParser.5=Patch number be an integer.
+SpecfileParser.6=Definition lvalue must begin with a letter or an underscore.
+SpecfileParser.7=No value name after define.
+SpecfileParser.8=If this is a Source or Patch directive, it must end with a colon.
+SpecfileSource.0=error: can't match
+SpecfileSource.1=%patch
+SpecfileSource.2=error: can't match
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/MacroProposalsPreferencePage.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/MacroProposalsPreferencePage.java
new file mode 100644
index 0000000000..fcebc8ab78
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/MacroProposalsPreferencePage.java
@@ -0,0 +1,427 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Alphonse Van Assche.
+ * 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:
+ * Alphonse Van Assche - initial API and implementation
+ * Wind River Systems, Inc - compile fixes
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui.editor.preferences;
+
+import java.util.ArrayList;
+import java.util.StringTokenizer;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.ListEditor;
+import org.eclipse.jface.preference.RadioGroupFieldEditor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Widget;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.preferences.ScopedPreferenceStore;
+
+/**
+ * RPM macro proposals and hover preference page class.
+ *
+ */
+public class MacroProposalsPreferencePage extends FieldEditorPreferencePage
+ implements IWorkbenchPreferencePage {
+ ScopedPreferenceStore preferences;
+
+ public MacroProposalsPreferencePage() {
+ super(FLAT);
+ setPreferenceStore(Activator.getDefault().getPreferenceStore());
+ }
+
+ public void init(IWorkbench workbench) {
+ }
+
+ @Override
+ protected void createFieldEditors() {
+ ListEditor macroListEditor = new MacroListEditor(
+ PreferenceConstants.P_MACRO_PROPOSALS_FILESPATH,
+ Messages.MacroProposalsPreferencePage_0, getFieldEditorParent());
+ addField(macroListEditor);
+ RadioGroupFieldEditor macroHoverListEditor = new RadioGroupFieldEditor(
+ PreferenceConstants.P_MACRO_HOVER_CONTENT,
+ Messages.MacroProposalsPreferencePage_1,
+ 1,
+ new String[][] {
+ {
+ Messages.MacroProposalsPreferencePage_2,
+ PreferenceConstants.P_MACRO_HOVER_CONTENT_VIEWDESCRIPTION },
+ {
+ Messages.MacroProposalsPreferencePage_3,
+ PreferenceConstants.P_MACRO_HOVER_CONTENT_VIEWCONTENT } },
+ getFieldEditorParent(), true);
+ addField(macroHoverListEditor);
+ }
+
+ class MacroListEditor extends ListEditor {
+
+ /**
+ * The list widget; <code>null</code> if none (before creation or
+ * after disposal).
+ */
+ private List list;
+
+ /**
+ * The button box containing the Add, Remove, Up, and Down buttons;
+ * <code>null</code> if none (before creation or after disposal).
+ */
+ private Composite buttonBox;
+
+ /**
+ * The Add file button.
+ */
+ private Button addFileButton;
+
+ /**
+ * The Add button.
+ */
+ private Button addDirButton;
+
+ /**
+ * The Remove button.
+ */
+ private Button removeButton;
+
+ /**
+ * The Up button.
+ */
+ private Button upButton;
+
+ /**
+ * The Down button.
+ */
+ private Button downButton;
+
+ /**
+ * The selection listener.
+ */
+ private SelectionListener selectionListener;
+
+ public MacroListEditor(String name, String labelText, Composite parent) {
+ init(name, labelText);
+ createControl(parent);
+ list = getListControl(parent);
+ }
+
+ @Override
+ protected String createList(String[] items) {
+ StringBuilder path = new StringBuilder(""); //$NON-NLS-1$
+ for (String item:items) {
+ path.append(item);
+ path.append(";"); //$NON-NLS-1$
+ }
+ return path.toString();
+ }
+
+ @Override
+ protected String getNewInputObject() {
+ FileDialog dialog = new FileDialog(getShell());
+ return dialog.open();
+ }
+
+ protected String getNewDirInputObject() {
+ DirectoryDialog dialog = new DirectoryDialog(getShell());
+ return dialog.open();
+ }
+
+ @Override
+ protected String[] parseString(String stringList) {
+ StringTokenizer st = new StringTokenizer(stringList, ";\n\r"); //$NON-NLS-1$
+ ArrayList<String> v = new ArrayList<String>();
+ while (st.hasMoreTokens()) {
+ v.add(st.nextToken());
+ }
+ return v.toArray(new String[v.size()]);
+ }
+
+ /**
+ * Notifies that the Add button has been pressed.
+ */
+ private void addFilePressed() {
+ setPresentsDefaultValue(false);
+ String input = getNewInputObject();
+
+ if (input != null) {
+ int index = list.getSelectionIndex();
+ if (index >= 0) {
+ list.add(input, index + 1);
+ } else {
+ list.add(input, 0);
+ }
+ selectionChanged();
+ }
+ }
+
+ /**
+ * Notifies that the Add button has been pressed.
+ */
+ private void addDirPressed() {
+ setPresentsDefaultValue(false);
+ String input = getNewDirInputObject();
+
+ if (input != null) {
+ int index = list.getSelectionIndex();
+ if (index >= 0) {
+ list.add(input, index + 1);
+ } else {
+ list.add(input, 0);
+ }
+ selectionChanged();
+ }
+ }
+
+ /**
+ * Creates the Add, Remove, Up, and Down button in the given button box.
+ *
+ * @param box
+ * the box for the buttons
+ */
+ private void createButtons(Composite box) {
+ addFileButton = createPushButton(box, Messages.MacroProposalsPreferencePage_4);
+ addDirButton = createPushButton(box, Messages.MacroProposalsPreferencePage_5);
+ removeButton = createPushButton(box, "ListEditor.remove");//$NON-NLS-1$
+ upButton = createPushButton(box, "ListEditor.up");//$NON-NLS-1$
+ downButton = createPushButton(box, "ListEditor.down");//$NON-NLS-1$
+ }
+
+ /**
+ * Helper method to create a push button.
+ *
+ * @param parent
+ * the parent control
+ * @param key
+ * the resource name used to supply the button's label text
+ * @return Button
+ */
+ private Button createPushButton(Composite parent, String key) {
+ Button button = new Button(parent, SWT.PUSH);
+ button.setText(JFaceResources.getString(key));
+ button.setFont(parent.getFont());
+ GridData data = new GridData(GridData.FILL_HORIZONTAL);
+ int widthHint = convertHorizontalDLUsToPixels(button,
+ IDialogConstants.BUTTON_WIDTH);
+ data.widthHint = Math.max(widthHint, button.computeSize(
+ SWT.DEFAULT, SWT.DEFAULT, true).x);
+ button.setLayoutData(data);
+ button.addSelectionListener(getSelectionListener());
+ return button;
+ }
+
+ /**
+ * Creates a selection listener.
+ */
+ @Override
+ public void createSelectionListener() {
+ selectionListener = new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent event) {
+ Widget widget = event.widget;
+ if (widget == addFileButton) {
+ addFilePressed();
+ } else if (widget == addDirButton) {
+ addDirPressed();
+ }else if (widget == removeButton) {
+ removePressed();
+ } else if (widget == upButton) {
+ upPressed();
+ } else if (widget == downButton) {
+ downPressed();
+ } else if (widget == list) {
+ selectionChanged();
+ }
+ }
+ };
+ }
+
+ /**
+ * Notifies that the Down button has been pressed.
+ */
+ private void downPressed() {
+ swap(false);
+ }
+
+ /**
+ * Returns this field editor's button box containing the Add, Remove,
+ * Up, and Down button.
+ *
+ * @param parent The parent control
+ * @return the button box
+ */
+ @Override
+ public Composite getButtonBoxControl(Composite parent) {
+ if (buttonBox == null) {
+ buttonBox = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout();
+ layout.marginWidth = 0;
+ buttonBox.setLayout(layout);
+ createButtons(buttonBox);
+ buttonBox.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent event) {
+ addFileButton = null;
+ addDirButton = null;
+ removeButton = null;
+ upButton = null;
+ downButton = null;
+ buttonBox = null;
+ }
+ });
+
+ } else {
+ checkParent(buttonBox, parent);
+ }
+
+ selectionChanged();
+ return buttonBox;
+ }
+
+ /**
+ * Returns this field editor's list control.
+ *
+ * @param parent The parent control
+ * @return the list control
+ */
+ @Override
+ public List getListControl(Composite parent) {
+ if (list == null) {
+ list = new List(parent, SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL
+ | SWT.H_SCROLL);
+ list.setFont(parent.getFont());
+ list.addSelectionListener(getSelectionListener());
+ list.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent event) {
+ list = null;
+ }
+ });
+ } else {
+ checkParent(list, parent);
+ }
+ return list;
+ }
+
+ /**
+ * Returns this field editor's selection listener. The listener is
+ * created if nessessary.
+ *
+ * @return the selection listener
+ */
+ private SelectionListener getSelectionListener() {
+ if (selectionListener == null) {
+ createSelectionListener();
+ }
+ return selectionListener;
+ }
+
+ /**
+ * Returns this field editor's shell.
+ * <p>
+ * This method is internal to the framework; subclassers should not call
+ * this method.
+ * </p>
+ *
+ * @return the shell
+ */
+ @Override
+ protected Shell getShell() {
+ if (addFileButton == null) {
+ return null;
+ }
+ return addFileButton.getShell();
+ }
+
+ /**
+ * Notifies that the Remove button has been pressed.
+ */
+ private void removePressed() {
+ setPresentsDefaultValue(false);
+ int index = list.getSelectionIndex();
+ if (index >= 0) {
+ list.remove(index);
+ selectionChanged();
+ }
+ }
+
+ /**
+ * Notifies that the list selection has changed.
+ */
+ protected void selectionChanged() {
+
+ int index = list.getSelectionIndex();
+ int size = list.getItemCount();
+
+ removeButton.setEnabled(index >= 0);
+ upButton.setEnabled(size > 1 && index > 0);
+ downButton.setEnabled(size > 1 && index >= 0 && index < size - 1);
+ }
+
+ /**
+ * Moves the currently selected item up or down.
+ *
+ * @param up
+ * <code>true</code> if the item should move up, and
+ * <code>false</code> if it should move down
+ */
+ private void swap(boolean up) {
+ setPresentsDefaultValue(false);
+ int index = list.getSelectionIndex();
+ int target = up ? index - 1 : index + 1;
+
+ if (index >= 0) {
+ String[] selection = list.getSelection();
+ Assert.isTrue(selection.length == 1);
+ list.remove(index);
+ list.add(selection[0], target);
+ list.setSelection(target);
+ }
+ selectionChanged();
+ }
+
+ /**
+ * Notifies that the Up button has been pressed.
+ */
+ private void upPressed() {
+ swap(true);
+ }
+
+ /*
+ * @see FieldEditor.setEnabled(boolean,Composite).
+ */
+ @Override
+ public void setEnabled(boolean enabled, Composite parent) {
+ super.setEnabled(enabled, parent);
+ getListControl(parent).setEnabled(enabled);
+ addFileButton.setEnabled(enabled);
+ addDirButton.setEnabled(enabled);
+ removeButton.setEnabled(enabled);
+ upButton.setEnabled(enabled);
+ downButton.setEnabled(enabled);
+ }
+
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/MainPreferencePage.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/MainPreferencePage.java
new file mode 100644
index 0000000000..d0bde283a9
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/MainPreferencePage.java
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * 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.preferences;
+
+import java.util.Locale;
+
+import org.eclipse.jface.preference.FieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.RadioGroupFieldEditor;
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.dialogs.PreferencesUtil;
+
+
+/**
+ * Specfile editor main preference page class.
+ *
+ */
+public class MainPreferencePage extends FieldEditorPreferencePage implements
+ IWorkbenchPreferencePage {
+
+ private Combo combo;
+
+ private int defaultItem;
+
+ private Composite fieldEditorParent;
+
+ /**
+ * default constructor
+ */
+ public MainPreferencePage() {
+ super(GRID);
+ setPreferenceStore(Activator.getDefault().getPreferenceStore());
+ //setDescription("Main preference page for Specfile Plug-in editor");
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createContents(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createContents(Composite parent) {
+ fieldEditorParent = new Composite(parent, SWT.LEFT);
+ fieldEditorParent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ fieldEditorParent.setLayout(new GridLayout());
+
+ Link link= new Link(fieldEditorParent, SWT.NONE);
+ link.setText(Messages.MainPreferencePage_0);
+ link.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ PreferencesUtil.createPreferenceDialogOn(fieldEditorParent.getShell() , e.text, null, null);
+ }
+ });
+
+ createFieldEditors();
+
+ Label labelLocal = new Label(fieldEditorParent, SWT.NONE);
+ labelLocal.setText(Messages.MainPreferencePage_1);
+ createLocalesCombo(fieldEditorParent);
+
+ initialize();
+ checkState();
+
+ return fieldEditorParent;
+ }
+
+ private FieldEditor changelogEntryFormatFieldEditor(Composite parent) {
+ RadioGroupFieldEditor changelogEntryFormatRadioGroupEditor = new RadioGroupFieldEditor(
+ PreferenceConstants.P_CHANGELOG_ENTRY_FORMAT,
+ Messages.MainPreferencePage_2, 1, new String[][] {
+ { Messages.MainPreferencePage_3, PreferenceConstants.P_CHANGELOG_ENTRY_FORMAT_VERSIONED },
+ { Messages.MainPreferencePage_4, PreferenceConstants.P_CHANGELOG_ENTRY_FORMAT_VERSIONED_WITH_SEPARATOR},
+ { Messages.MainPreferencePage_5, PreferenceConstants.P_CHANGELOG_ENTRY_FORMAT_UNVERSIONED }}, parent, true);
+ return changelogEntryFormatRadioGroupEditor;
+ }
+
+ private void createLocalesCombo(Composite parent) {
+ combo = new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY);
+ // populate the combo with all ISO countries
+ int selectedItem = 0;
+ String lastLocale = getPreferenceStore().getString(PreferenceConstants.P_CHANGELOG_LOCAL);
+ String[] countries = Locale.getISOCountries();
+ for (int i = 0; i < countries.length; i++) {
+ Locale currentLocale = new Locale(countries[i]);
+ combo.add(countries[i] + " - " + currentLocale.getDisplayLanguage()); //$NON-NLS-1$
+ // get index of the Locale store in the preferences
+ if (countries[i].equals(lastLocale))
+ selectedItem = i;
+ // get the index of the default Locale
+ if (countries[i].equals(PreferenceConstants.DP_CHANGELOG_LOCAL))
+ defaultItem = i;
+ }
+ combo.select(selectedItem);
+ // update preferences
+ combo.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ Combo combo = (Combo) e.getSource();
+ getPreferenceStore().setValue(
+ PreferenceConstants.P_CHANGELOG_LOCAL,
+ combo.getText().split("-")[0].trim()); //$NON-NLS-1$
+ }
+ });
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+ */
+ @Override
+ public void createFieldEditors() {
+ addField(changelogEntryFormatFieldEditor(fieldEditorParent));
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ public void init(IWorkbench workbench) {
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.FieldEditorPreferencePage#performDefaults()
+ */
+ @Override
+ protected void performDefaults() {
+ super.performDefaults();
+ combo.select(defaultItem);
+ getPreferenceStore().setValue(PreferenceConstants.P_CHANGELOG_LOCAL, PreferenceConstants.DP_CHANGELOG_LOCAL);
+ getPreferenceStore().setValue(PreferenceConstants.P_CHANGELOG_ENTRY_FORMAT, PreferenceConstants.DP_CHANGELOG_ENTRY_FORMAT);
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/Messages.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/Messages.java
new file mode 100644
index 0000000000..4b01a3ac24
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/Messages.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * 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.preferences;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.rpm.ui.editor.preferences.messages"; //$NON-NLS-1$
+ public static String MacroProposalsPreferencePage_0;
+ public static String MacroProposalsPreferencePage_1;
+ public static String MacroProposalsPreferencePage_2;
+ public static String MacroProposalsPreferencePage_3;
+ public static String MacroProposalsPreferencePage_4;
+ public static String MacroProposalsPreferencePage_5;
+ public static String MainPreferencePage_0;
+ public static String MainPreferencePage_1;
+ public static String MainPreferencePage_2;
+ public static String MainPreferencePage_3;
+ public static String MainPreferencePage_4;
+ public static String MainPreferencePage_5;
+ public static String RpmInformationsPreferencePage_0;
+ public static String RpmInformationsPreferencePage_1;
+ public static String RpmInformationsPreferencePage_2;
+ public static String RpmInformationsPreferencePage_3;
+ public static String RpmInformationsPreferencePage_4;
+ public static String RpmInformationsPreferencePage_5;
+ public static String RpmInformationsPreferencePage_6;
+ public static String RpmInformationsPreferencePage_7;
+ public static String RpmProposalsPreferencePage_0;
+ public static String RpmProposalsPreferencePage_1;
+ public static String RpmProposalsPreferencePage_10;
+ public static String RpmProposalsPreferencePage_12;
+ public static String RpmProposalsPreferencePage_2;
+ public static String RpmProposalsPreferencePage_3;
+ public static String RpmProposalsPreferencePage_4;
+ public static String RpmProposalsPreferencePage_5;
+ public static String RpmProposalsPreferencePage_6;
+ public static String RpmProposalsPreferencePage_7;
+ public static String RpmProposalsPreferencePage_8;
+ public static String TaskTagsPreferencePage_0;
+ public static String TaskTagsPreferencePage_1;
+ public static String TaskTagsPreferencePage_2;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/PreferenceConstants.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/PreferenceConstants.java
new file mode 100644
index 0000000000..d21f2a107d
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/PreferenceConstants.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * 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.preferences;
+
+/**
+ * Constant definitions for plug-in preferences
+ */
+public class PreferenceConstants {
+
+ /*
+ * Other Constant
+ *
+ */
+ public static final String RPMMACRO_FILE = System.getProperty("user.home") + "/.rpmmacros"; //$NON-NLS-1$//$NON-NLS-2$
+
+
+ /*
+ * Prefences keys
+ */
+
+ // rpm list builder
+ public static final String P_RPM_LIST_FILEPATH = "rpmListFilePath"; //$NON-NLS-1$
+ public static final String P_RPM_LIST_MAX_PROPOSALS = "rpmListMaxProposalsInfo"; //$NON-NLS-1$
+ public static final String P_CURRENT_RPMTOOLS = "currentRpmtools"; //$NON-NLS-1$
+ public static final String P_RPM_LIST_BACKGROUND_BUILD = "rpmListBackgroundBuild"; //$NON-NLS-1$
+ public static final String P_RPM_LIST_BUILD_PERIOD = "rpmListBuildPeriod"; //$NON-NLS-1$
+ public static final String P_RPM_LIST_LAST_BUILD = "rpmLisMastBuild"; //$NON-NLS-1$
+ // macro
+ public static final String P_MACRO_PROPOSALS_FILESPATH = "macroProposalsFilespath"; //$NON-NLS-1$
+ public static final String P_MACRO_HOVER_CONTENT_VIEWCONTENT = "macroHoverViewContent"; //$NON-NLS-1$
+ public static final String P_MACRO_HOVER_CONTENT_VIEWDESCRIPTION = "macroHoverViewDescription"; //$NON-NLS-1$
+ public static final String P_MACRO_HOVER_CONTENT = P_MACRO_HOVER_CONTENT_VIEWCONTENT;
+ // changelog
+ public static final String P_CHANGELOG_LOCAL = "changelogLocal"; //$NON-NLS-1$
+
+ public static final String P_CHANGELOG_ENTRY_FORMAT = "changelogEntryFormat"; //$NON-NLS-1$
+ public static final String P_CHANGELOG_ENTRY_FORMAT_VERSIONED = "1"; //$NON-NLS-1$
+ public static final String P_CHANGELOG_ENTRY_FORMAT_VERSIONED_WITH_SEPARATOR = "2"; //$NON-NLS-1$
+ public static final String P_CHANGELOG_ENTRY_FORMAT_UNVERSIONED = "3"; //$NON-NLS-1$
+
+ // RPM informations
+ public static final String P_RPMINFO_NAME = "RpmInfoName"; //$NON-NLS-1$
+ public static final String P_RPMINFO_VERSION = "RpmInfoVersion"; //$NON-NLS-1$
+ public static final String P_RPMINFO_RELEASE = "RpmInfoRelease"; //$NON-NLS-1$
+ public static final String P_RPMINFO_SUMMARY = "RpmInfoSummary"; //$NON-NLS-1$
+ public static final String P_RPMINFO_LICENSE = "RpmInfoLicense"; //$NON-NLS-1$
+ public static final String P_RPMINFO_GROUP = "RpmInfoName"; //$NON-NLS-1$
+ public static final String P_RPMINFO_URL = "RpmInfoUrl"; //$NON-NLS-1$
+ public static final String P_RPMINFO_DESCRIPTION = "RpmInfoDescription"; //$NON-NLS-1$
+ public static final String P_RPMINFO_INSTALLTIME = "RpmInfoInstallDate"; //$NON-NLS-1$
+ public static final String P_RPMINFO_SIZE = "RpmInfoSize"; //$NON-NLS-1$
+ public static final String P_RPMINFO_PACKAGER = "RpmInfoPackager"; //$NON-NLS-1$
+ public static final String P_RPMINFO_VENDOR = "RpmInfoVendor"; //$NON-NLS-1$
+ public static final String P_RPMINFO_BUILDTIME = "RpmInfoBuildDate"; //$NON-NLS-1$
+ public static final String P_RPMINFO_SOURCERPM = "RpmInfoSourceRpm"; //$NON-NLS-1$
+ public static final String P_TASK_TAGS = "RpmSpecTaskTags"; //$NON-NLS-1$
+
+ /*
+ * Preferences default values
+ */
+
+ public static final String DP_RPM_LIST_FILEPATH = System.getProperty("user.dir") + "/.pkglist"; //$NON-NLS-1$ //$NON-NLS-2$
+ public static final String DP_RPM_LIST_MAX_PROPOSALS = "10"; //$NON-NLS-1$
+ public static final String DP_RPMTOOLS_RPM = "rpm -qa --qf '%{NAME}\\n'"; //$NON-NLS-1$
+ public static final String DP_RPMTOOLS_YUM = "yum -C list all | grep - | cut -d \".\" -f 1"; //$NON-NLS-1$
+ public static final String DP_RPMTOOLS_URPM = "urpmq --list"; //$NON-NLS-1$
+ //public static final String DP_RPM_LIST_HIDE_PROPOSALS_WARNING = "false";
+ public static final boolean DP_RPM_LIST_BACKGROUND_BUILD = true;
+ public static final String DP_RPM_LIST_BUILD_PERIOD = "1"; //$NON-NLS-1$
+ //public static final String DP_RPM_LIST_LAST_BUILD = "";
+
+
+ // macro
+ public static final String DP_MACRO_PROPOSALS_FILESPATH = RPMMACRO_FILE + ";/usr/lib/rpm/macros"; //$NON-NLS-1$
+ // changelog
+ public static final String DP_CHANGELOG_LOCAL = "US"; //$NON-NLS-1$
+ public static final String DP_CHANGELOG_ENTRY_FORMAT = P_CHANGELOG_ENTRY_FORMAT_VERSIONED;
+ // task tags
+ public static final String DP_TASK_TAGS = "TODO;FIXME"; //$NON-NLS-1$
+
+ // RPM informations
+ public static final boolean DP_RPMINFO_NAME = true;
+ public static final boolean DP_RPMINFO_VERSION = true;
+ public static final boolean DP_RPMINFO_RELEASE = true;
+ public static final boolean DP_RPMINFO_SUMMARY = true;
+ public static final boolean DP_RPMINFO_LICENSE = true;
+ public static final boolean DP_RPMINFO_GROUP = true;
+ public static final boolean DP_RPMINFO_URL = true;
+ public static final boolean DP_RPMINFO_DESCRIPTION = false;
+ public static final boolean DP_RPMINFO_INSTALLTIME = true;
+ public static final boolean DP_RPMINFO_SIZE = true;
+ public static final boolean DP_RPMINFO_PACKAGER = false;
+ public static final boolean DP_RPMINFO_VENDOR = true;
+ public static final boolean DP_RPMINFO_BUILDTIME = true;
+ public static final boolean DP_RPMINFO_SOURCERPM = true;
+
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/PreferenceInitializer.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/PreferenceInitializer.java
new file mode 100644
index 0000000000..84e0798577
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/PreferenceInitializer.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * 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.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.linuxtools.rpm.ui.editor.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_CURRENT_RPMTOOLS, PreferenceConstants.DP_RPMTOOLS_RPM);
+ store.setDefault(PreferenceConstants.P_RPM_LIST_FILEPATH, PreferenceConstants.DP_RPM_LIST_FILEPATH);
+ store.setDefault(PreferenceConstants.P_RPM_LIST_MAX_PROPOSALS, PreferenceConstants.DP_RPM_LIST_MAX_PROPOSALS);
+ store.setDefault(PreferenceConstants.P_RPM_LIST_BACKGROUND_BUILD, PreferenceConstants.DP_RPM_LIST_BACKGROUND_BUILD);
+ store.setDefault(PreferenceConstants.P_RPM_LIST_BUILD_PERIOD, PreferenceConstants.DP_RPM_LIST_BUILD_PERIOD);
+ store.setDefault(PreferenceConstants.P_MACRO_PROPOSALS_FILESPATH, PreferenceConstants.DP_MACRO_PROPOSALS_FILESPATH);
+ store.setDefault(PreferenceConstants.P_CHANGELOG_LOCAL, PreferenceConstants.DP_CHANGELOG_LOCAL);
+ store.setDefault(PreferenceConstants.P_CHANGELOG_ENTRY_FORMAT, PreferenceConstants.DP_CHANGELOG_ENTRY_FORMAT);
+ store.setDefault(PreferenceConstants.P_MACRO_HOVER_CONTENT, PreferenceConstants.P_MACRO_HOVER_CONTENT_VIEWDESCRIPTION);
+ store.setDefault(PreferenceConstants.P_RPMINFO_NAME, PreferenceConstants.DP_RPMINFO_NAME);
+ store.setDefault(PreferenceConstants.P_RPMINFO_VERSION, PreferenceConstants.DP_RPMINFO_VERSION);
+ store.setDefault(PreferenceConstants.P_RPMINFO_RELEASE, PreferenceConstants.DP_RPMINFO_RELEASE);
+ store.setDefault(PreferenceConstants.P_RPMINFO_SUMMARY, PreferenceConstants.DP_RPMINFO_SUMMARY);
+ store.setDefault(PreferenceConstants.P_RPMINFO_LICENSE, PreferenceConstants.DP_RPMINFO_LICENSE);
+ store.setDefault(PreferenceConstants.P_RPMINFO_GROUP, PreferenceConstants.DP_RPMINFO_GROUP);
+ store.setDefault(PreferenceConstants.P_RPMINFO_URL, PreferenceConstants.DP_RPMINFO_URL);
+ store.setDefault(PreferenceConstants.P_RPMINFO_DESCRIPTION, PreferenceConstants.DP_RPMINFO_DESCRIPTION);
+ store.setDefault(PreferenceConstants.P_RPMINFO_INSTALLTIME, PreferenceConstants.DP_RPMINFO_INSTALLTIME);
+ store.setDefault(PreferenceConstants.P_RPMINFO_SIZE, PreferenceConstants.DP_RPMINFO_SIZE);
+ store.setDefault(PreferenceConstants.P_RPMINFO_PACKAGER, PreferenceConstants.DP_RPMINFO_PACKAGER);
+ store.setDefault(PreferenceConstants.P_RPMINFO_VENDOR, PreferenceConstants.DP_RPMINFO_VENDOR);
+ store.setDefault(PreferenceConstants.P_RPMINFO_BUILDTIME, PreferenceConstants.DP_RPMINFO_BUILDTIME);
+ store.setDefault(PreferenceConstants.P_RPMINFO_SOURCERPM, PreferenceConstants.DP_RPMINFO_SOURCERPM);
+ store.setDefault(PreferenceConstants.P_TASK_TAGS, PreferenceConstants.DP_TASK_TAGS);
+
+
+
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/RpmInformationsPreferencePage.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/RpmInformationsPreferencePage.java
new file mode 100644
index 0000000000..4c9e4d3488
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/RpmInformationsPreferencePage.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * 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.preferences;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.IntegerFieldEditor;
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.linuxtools.rpm.ui.editor.RpmTags;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+public class RpmInformationsPreferencePage extends FieldEditorPreferencePage implements
+IWorkbenchPreferencePage{
+
+ /**
+ * Default constructor
+ */
+ public RpmInformationsPreferencePage() {
+ super(GRID);
+ setDescription(Messages.RpmInformationsPreferencePage_0);
+ setPreferenceStore(Activator.getDefault().getPreferenceStore());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+ */
+ @Override
+ public void createFieldEditors() {
+ addField(maxProposalsIntegerFieldEditor());
+ addField(new BooleanFieldEditor(PreferenceConstants.P_RPMINFO_NAME, RpmTags.NAME, getFieldEditorParent()));
+ addField(new BooleanFieldEditor(PreferenceConstants.P_RPMINFO_VERSION, RpmTags.VERSION, getFieldEditorParent()));
+ addField(new BooleanFieldEditor(PreferenceConstants.P_RPMINFO_RELEASE, RpmTags.RELEASE, getFieldEditorParent()));
+ addField(new BooleanFieldEditor(PreferenceConstants.P_RPMINFO_SUMMARY, RpmTags.SUMMARY, getFieldEditorParent()));
+ addField(new BooleanFieldEditor(PreferenceConstants.P_RPMINFO_LICENSE, RpmTags.LICENSE, getFieldEditorParent()));
+ addField(new BooleanFieldEditor(PreferenceConstants.P_RPMINFO_GROUP, RpmTags.GROUP, getFieldEditorParent()));
+ addField(new BooleanFieldEditor(PreferenceConstants.P_RPMINFO_URL, RpmTags.URL, getFieldEditorParent()));
+ addField(new BooleanFieldEditor(PreferenceConstants.P_RPMINFO_INSTALLTIME, Messages.RpmInformationsPreferencePage_1, getFieldEditorParent()));
+ addField(new BooleanFieldEditor(PreferenceConstants.P_RPMINFO_DESCRIPTION, Messages.RpmInformationsPreferencePage_2, getFieldEditorParent()));
+ addField(new BooleanFieldEditor(PreferenceConstants.P_RPMINFO_PACKAGER, RpmTags.PACKAGER, getFieldEditorParent()));
+ addField(new BooleanFieldEditor(PreferenceConstants.P_RPMINFO_VENDOR, RpmTags.VENDOR, getFieldEditorParent()));
+ addField(new BooleanFieldEditor(PreferenceConstants.P_RPMINFO_SIZE, Messages.RpmInformationsPreferencePage_3, getFieldEditorParent()));
+ addField(new BooleanFieldEditor(PreferenceConstants.P_RPMINFO_BUILDTIME, Messages.RpmInformationsPreferencePage_4, getFieldEditorParent()));
+ addField(new BooleanFieldEditor(PreferenceConstants.P_RPMINFO_SOURCERPM, Messages.RpmInformationsPreferencePage_5, getFieldEditorParent()));
+ }
+
+ private FieldEditor maxProposalsIntegerFieldEditor() {
+ IntegerFieldEditor maxProposalsFieldEditor = new IntegerFieldEditor(
+ PreferenceConstants.P_RPM_LIST_MAX_PROPOSALS,
+ Messages.RpmInformationsPreferencePage_6, getFieldEditorParent());
+ maxProposalsFieldEditor.setValidRange(1, 40);
+ maxProposalsFieldEditor.setErrorMessage(Messages.RpmInformationsPreferencePage_7);
+ return maxProposalsFieldEditor;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ public void init(IWorkbench workbench) {
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/RpmProposalsPreferencePage.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/RpmProposalsPreferencePage.java
new file mode 100644
index 0000000000..91755827f7
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/RpmProposalsPreferencePage.java
@@ -0,0 +1,135 @@
+/*******************************************************************************
+ * 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.preferences;
+
+import java.util.ArrayList;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.RadioGroupFieldEditor;
+import org.eclipse.jface.preference.StringFieldEditor;
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.linuxtools.rpm.ui.editor.Utils;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.dialogs.PreferencesUtil;
+
+/**
+ * RPM package proposals preference page class.
+ *
+ */
+public class RpmProposalsPreferencePage extends FieldEditorPreferencePage
+ implements IWorkbenchPreferencePage {
+
+ /*
+ * default constructor
+ */
+ public RpmProposalsPreferencePage() {
+ super(FLAT);
+ setPreferenceStore(Activator.getDefault().getPreferenceStore());
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+ */
+ @Override
+ public void createFieldEditors() {
+ addField(rpmtoolsRadioGroupFieldEditor());
+ // FIXME: there is validations problem when a FileFieldEditor is used, so
+ // as a quick fix, StringFieldEditor is used.
+ StringFieldEditor rpmListFieldEditor = new StringFieldEditor(PreferenceConstants.P_RPM_LIST_FILEPATH,
+ Messages.RpmProposalsPreferencePage_0, getFieldEditorParent());
+ addField(rpmListFieldEditor);
+ addField(new BooleanFieldEditor(PreferenceConstants.P_RPM_LIST_BACKGROUND_BUILD,Messages.RpmProposalsPreferencePage_1, getFieldEditorParent()));
+ addField(buildTimeListRateFieldEditor());
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createContents(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createContents(final Composite parent) {
+ Link link= new Link(parent, SWT.NONE);
+ link.setText(Messages.RpmProposalsPreferencePage_2);
+ link.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ PreferencesUtil.createPreferenceDialogOn(parent.getShell() , e.text, null, null);
+ }
+ });
+ Composite fieldEditorComposite = (Composite) super
+ .createContents(parent);
+ return fieldEditorComposite;
+ }
+
+ private FieldEditor rpmtoolsRadioGroupFieldEditor() {
+ ArrayList<String[]> list = new ArrayList<String[]>();
+ list.add(new String[] { Messages.RpmProposalsPreferencePage_3,
+ PreferenceConstants.DP_RPMTOOLS_RPM });
+ /*
+ * Show only installed tools.
+ * Don't forgot to add sanity check in Utils.pluginSanityCheck().
+ */
+ if (Utils.fileExist("/usr/bin/yum")) //$NON-NLS-1$
+ list.add(new String[] { Messages.RpmProposalsPreferencePage_4,
+ PreferenceConstants.DP_RPMTOOLS_YUM });
+ if (Utils.fileExist("/usr/bin/urpmq")) //$NON-NLS-1$
+ list.add(new String[] { Messages.RpmProposalsPreferencePage_5,
+ PreferenceConstants.DP_RPMTOOLS_URPM });
+
+ String[][] radioItems = new String[list.size()][2];
+ int pos = 0;
+ for (String[] item: list) {
+ radioItems[pos][0] = item[0];
+ radioItems[pos][1] = item[1];
+ pos++;
+
+ }
+
+ RadioGroupFieldEditor rpmToolsRadioGroupEditor = new RadioGroupFieldEditor(
+ PreferenceConstants.P_CURRENT_RPMTOOLS,
+ Messages.RpmProposalsPreferencePage_6, 1, radioItems ,
+ getFieldEditorParent(), true);
+ return rpmToolsRadioGroupEditor;
+ }
+
+ private FieldEditor buildTimeListRateFieldEditor() {
+ RadioGroupFieldEditor buildListTimeRateRadioGroupEditor = new RadioGroupFieldEditor(
+ PreferenceConstants.P_RPM_LIST_BUILD_PERIOD,
+ Messages.RpmProposalsPreferencePage_7, 1, new String[][] {
+ { Messages.RpmProposalsPreferencePage_8, "1" }, //$NON-NLS-1$
+ { Messages.RpmProposalsPreferencePage_10, "2" }, //$NON-NLS-1$
+ { Messages.RpmProposalsPreferencePage_12, "3" }}, getFieldEditorParent(), true); //$NON-NLS-1$
+ return buildListTimeRateRadioGroupEditor;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ public void init(IWorkbench workbench) {
+
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/SpecTemplatePreferencePage.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/SpecTemplatePreferencePage.java
new file mode 100644
index 0000000000..d6b0f2151b
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/SpecTemplatePreferencePage.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.ui.editor.preferences;
+
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.ui.texteditor.templates.TemplatePreferencePage;
+
+/**
+ * Templates preference page
+ *
+ */
+public class SpecTemplatePreferencePage extends TemplatePreferencePage {
+
+ /**
+ * Default constructor
+ */
+ public SpecTemplatePreferencePage() {
+ setPreferenceStore(Activator.getDefault().getPreferenceStore());
+ setTemplateStore(Activator.getDefault().getTemplateStore());
+ setContextTypeRegistry(Activator.getDefault().getContextTypeRegistry());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.texteditor.templates.TemplatePreferencePage#isShowFormatterSetting()
+ */
+ @Override
+ protected boolean isShowFormatterSetting() {
+ return true;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.texteditor.templates.TemplatePreferencePage#performOk()
+ */
+ @Override
+ public boolean performOk() {
+ boolean ok= super.performOk();
+ Activator.getDefault().savePluginPreferences();
+ return ok;
+ }
+
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/TaskTagsPreferencePage.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/TaskTagsPreferencePage.java
new file mode 100644
index 0000000000..b9cb515541
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/TaskTagsPreferencePage.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * 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.preferences;
+
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.ListEditor;
+import org.eclipse.jface.window.Window;
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+public class TaskTagsPreferencePage extends FieldEditorPreferencePage implements
+ IWorkbenchPreferencePage {
+
+ public TaskTagsPreferencePage() {
+ super(GRID);
+ setPreferenceStore(Activator.getDefault().getPreferenceStore());
+ }
+
+ public void init(IWorkbench workbench) {
+ }
+
+ @Override
+ protected void createFieldEditors() {
+ addField(new TasksListEditor(PreferenceConstants.P_TASK_TAGS,
+ Messages.TaskTagsPreferencePage_0,
+ getFieldEditorParent()));
+ }
+
+ class TasksListEditor extends ListEditor {
+
+ public TasksListEditor(String name, String labelText, Composite parent) {
+ super(name, labelText, parent);
+ }
+
+ @Override
+ protected String createList(String[] items) {
+ StringBuilder itemsString = new StringBuilder();
+ for (String item : items) {
+ itemsString.append(item + ';');
+ }
+ return itemsString.toString();
+ }
+
+ @Override
+ protected String getNewInputObject() {
+ String result = null;
+ // open an input dialog so that the user can enter a new task tag
+ InputDialog inputDialog = new InputDialog(getShell(),
+ Messages.TaskTagsPreferencePage_1, Messages.TaskTagsPreferencePage_2, "", null); //$NON-NLS-1$
+ int returnCode = inputDialog.open();
+
+ if (returnCode == Window.OK) {
+ result = inputDialog.getValue();
+ }
+
+ return result;
+
+ }
+
+ @Override
+ protected String[] parseString(String stringList) {
+ String[] items = stringList.split(";"); //$NON-NLS-1$
+ return items;
+ }
+
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/messages.properties b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/messages.properties
new file mode 100644
index 0000000000..16d2a89a54
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/preferences/messages.properties
@@ -0,0 +1,44 @@
+###############################################################################
+# 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
+###############################################################################
+MacroProposalsPreferencePage_0=Macro Definitions
+MacroProposalsPreferencePage_1=Mouse hover content
+MacroProposalsPreferencePage_2=Show macro descriptions (e.g '%{prefix}/share')
+MacroProposalsPreferencePage_3=Show macro contents (e.g '/usr/share')
+MacroProposalsPreferencePage_4=Add file
+MacroProposalsPreferencePage_5=Add directory
+MainPreferencePage_0=Use the <a href="org.eclipse.linuxtools.changelog.core.Page1">ChangeLog</a> preferences to configure your name and e-mail address.
+MainPreferencePage_1=Changelog entries Locale:
+MainPreferencePage_2=Changelog entries format:
+MainPreferencePage_3=Versioned entry (e.g. * Date Name <Mail> 1.1-1)
+MainPreferencePage_4=Versioned entry with separator (e.g. * Date Name <Mail> - 1.1-1)
+MainPreferencePage_5=Unversioned entry (e.g. * Date Name <Mail>)
+RpmInformationsPreferencePage_0=RPM tags used as proposal descriptions
+RpmInformationsPreferencePage_1=Installation Date
+RpmInformationsPreferencePage_2=Description
+RpmInformationsPreferencePage_3=Size
+RpmInformationsPreferencePage_4=Build Date
+RpmInformationsPreferencePage_5=Source Rpm
+RpmInformationsPreferencePage_6=This information is only shown when the number of proposals is less than
+RpmInformationsPreferencePage_7=Proposal limit for RPM information must be an integer between 1 and 40
+RpmProposalsPreferencePage_0=Path to packages list file:
+RpmProposalsPreferencePage_1=Automatically build the RPM packages proposals list
+RpmProposalsPreferencePage_10=Once a week
+RpmProposalsPreferencePage_12=Once a month
+RpmProposalsPreferencePage_2=<a href="org.eclipse.linuxtools.rpm.ui.editor.preferences.RpmInformationsPreferencePage">Package Information</a> page helps to configure proposal descriptions
+RpmProposalsPreferencePage_3=RPM (Red Hat Package Manager)
+RpmProposalsPreferencePage_4=YUM (Yellowdog Updater, Modified)
+RpmProposalsPreferencePage_5=URPM (User RPM)
+RpmProposalsPreferencePage_6=RPM tools used to build the package list
+RpmProposalsPreferencePage_7=Proposals RPM list build rate
+RpmProposalsPreferencePage_8=Each time that the workbench is open
+TaskTagsPreferencePage_0=Strings indicating tasks in RPM specfile.
+TaskTagsPreferencePage_1=New Task Tag...
+TaskTagsPreferencePage_2=Enter new Task Tag:
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/AuthorEmailRule.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/AuthorEmailRule.java
new file mode 100644
index 0000000000..87bd36833c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/AuthorEmailRule.java
@@ -0,0 +1,134 @@
+/*******************************************************************************
+ * 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.rules;
+
+import org.eclipse.jface.text.rules.ICharacterScanner;
+import org.eclipse.jface.text.rules.IPredicateRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.Token;
+
+public class AuthorEmailRule implements IPredicateRule {
+
+ /** Buffer used for pattern detection */
+ private StringBuilder fBuffer = new StringBuilder();
+
+ /** The success token */
+ IToken token;
+
+ char START_CHAR = '<';
+
+ char END_CHAR = '>';
+
+ char[] INTER_CHARS = { '@', '.' };
+
+ int STATE_START = 0;
+
+ int STATE_OPENED = 1;
+
+ int STATE_AT = 2;
+
+ int STATE_PERIOD = 3;
+
+ int STATE_DONE = 4;
+
+ public AuthorEmailRule(IToken token) {
+ this.token = token;
+ }
+
+ public IToken getSuccessToken() {
+ return token;
+ }
+
+ public IToken evaluate(ICharacterScanner scanner, boolean resume) {
+ /*
+ * whether we think we're reading the ending sequence, i.e. the next
+ * section heading
+ */
+ int state = STATE_START;
+ fBuffer.setLength(0);
+ int c;
+
+ do {
+ c = scanner.read();
+ fBuffer.append((char) c);
+
+ // we have reached the end of file or line prematurely, this is not
+ // considered success
+ if (c == ICharacterScanner.EOF || (char) c == '\n') {
+ unreadBuffer(scanner, fBuffer);
+ return Token.UNDEFINED;
+ }
+
+ // we encountered the opening character at the beginning
+ if (state == STATE_START && (char) c == START_CHAR) {
+ state++;
+ } else if (state == STATE_OPENED) {
+ // we encountered the first neccessary intermediary char
+ if ((char) c == INTER_CHARS[0]) {
+ state++;
+ }
+
+ // check if we have a valid char
+ if (! (Character.isLetterOrDigit((char) c) || c == '.' || c == '_' || c == '-' || c == '@')){
+ unreadBuffer(scanner, fBuffer);
+ return Token.UNDEFINED;
+ }
+
+ // we just keep reading
+
+ } else if (state == STATE_AT) {
+ // we encountered the second neccessary intermediary char
+ if ((char) c == INTER_CHARS[1]) {
+ state++;
+ }
+
+ // check if we have a valid char
+ if (! (Character.isLetterOrDigit((char) c) || c == '.' || c == '_' || c == '-')){
+ unreadBuffer(scanner, fBuffer);
+ return Token.UNDEFINED;
+ }
+ // we just keep reading
+ } else if (state == STATE_PERIOD) {
+ // the last char before the ending char cannot be a '.'
+ if ((char) c == END_CHAR && fBuffer.charAt(fBuffer.length() - 1) != '.')
+ state++;
+ else if ((char) c == END_CHAR){
+ unreadBuffer(scanner, fBuffer);
+ return Token.UNDEFINED;
+ }
+ } else {
+ unreadBuffer(scanner, fBuffer);
+ return Token.UNDEFINED;
+ }
+
+ } while (state != STATE_DONE);
+
+ // we've gone through all states until we've reached STATE_DONE, success
+ return token;
+ }
+
+ public IToken evaluate(ICharacterScanner scanner) {
+ return evaluate(scanner, false);
+ }
+
+ /**
+ * Returns the characters in the buffer to the scanner.
+ *
+ * @param scanner
+ * the scanner to be used
+ */
+ protected void unreadBuffer(ICharacterScanner scanner, StringBuilder buffer) {
+ for (int i = buffer.length() - 1; i >= 0; i--)
+ scanner.unread();
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/CommentRule.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/CommentRule.java
new file mode 100644
index 0000000000..3d56f517eb
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/CommentRule.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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.rules;
+
+import org.eclipse.jface.text.rules.EndOfLineRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.linuxtools.rpm.ui.editor.ISpecfileSpecialSymbols;
+
+/**
+ * A rule for matching comment line.
+ * Starts with # and ends at the end of line.
+ *
+ */
+public class CommentRule extends EndOfLineRule{
+ /**
+ * Creates a EndofLineRule starting with the comment("#") symbol.
+ *
+ * @param token The token to look into.
+ */
+ public CommentRule(IToken token) {
+ super(ISpecfileSpecialSymbols.COMMENT_START, token);
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/MacroRule.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/MacroRule.java
new file mode 100644
index 0000000000..a43f927997
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/MacroRule.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * 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.rules;
+
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.SingleLineRule;
+import org.eclipse.linuxtools.rpm.ui.editor.ISpecfileSpecialSymbols;
+
+/**
+ * A rule for matching %{...} sections in spec file.
+ *
+ */
+public class MacroRule extends SingleLineRule {
+
+ /**
+ * Creates a SingleLineRule by using macros start and end identifiers for
+ * start and end delimiters.
+ *
+ * @param token The token to look into.
+ */
+ public MacroRule(IToken token) {
+ super(ISpecfileSpecialSymbols.MACRO_START_LONG,
+ ISpecfileSpecialSymbols.MACRO_END_LONG, token);
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/SectionRule.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/SectionRule.java
new file mode 100644
index 0000000000..51c5f835da
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/SectionRule.java
@@ -0,0 +1,140 @@
+/*******************************************************************************
+ * 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.rules;
+
+import org.eclipse.jface.text.rules.ICharacterScanner;
+import org.eclipse.jface.text.rules.IPredicateRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.Token;
+
+public class SectionRule implements IPredicateRule {
+
+ /** Buffer used for pattern detection */
+ private StringBuilder fBuffer = new StringBuilder();
+
+ /** Buffer used for pattern detection of next header */
+ private StringBuilder nextHeaderBuffer = new StringBuilder();
+
+ /** The success token */
+ IToken token;
+
+ /** The beginning token, represents a section of the spec file */
+ String startingHeader;
+
+ /** A list of possible ending section headers */
+ String[] endingHeaders;
+
+ public SectionRule(String startingHeader, String[] endingHeaders,
+ IToken token) {
+ this.startingHeader = startingHeader;
+ this.endingHeaders = endingHeaders;
+ this.token = token;
+ }
+
+ public IToken getSuccessToken() {
+ return token;
+ }
+
+ public IToken evaluate(ICharacterScanner scanner, boolean resume) {
+ /* whether we think we're reading the ending sequence, i.e. the next
+ * section heading
+ */
+ boolean readingEndSequence = false;
+ fBuffer.setLength(0);
+ nextHeaderBuffer.setLength(0);
+ int c = scanner.read();
+
+ /* if we're starting at the beginning header we check that the partition
+ * begins with the required header */
+ if (!resume) {
+ for (int i = 0; i < startingHeader.length(); i++) {
+ fBuffer.append((char) c);
+ if (startingHeader.charAt(i) != (char) c) {
+ unreadBuffer(scanner, fBuffer);
+ return Token.UNDEFINED;
+ }
+ c = scanner.read();
+ }
+ }
+
+ fBuffer.append((char) c);
+
+ do {
+ // Sections can only begin with a % on a new line
+ if (c == '\n') {
+ // if we were readin a %blah, reset because it turned out to
+ // not be a terminating section header
+ readingEndSequence = false;
+
+ // if we're reading a line beginning with % then it might be
+ // at terminating sectino header
+ c = scanner.read();
+ if (c == '%') {
+ // Start appending to the we reset the buffer for section
+ // headers, and indicate that this line can be a terminating
+ // section header
+ nextHeaderBuffer.setLength(0);
+ readingEndSequence = true;
+ } else if (c == ICharacterScanner.EOF) {
+
+ // we allow EOF as a valid ending to a section
+ break;
+ } else {
+ fBuffer.append((char) c);
+ continue;
+ }
+ }
+ // we're in a line that's a possible terminating section header,
+ // so we compare it with all terminating headers
+ if (readingEndSequence) {
+ nextHeaderBuffer.append((char) c);
+ for (int i = 0; i < endingHeaders.length; i++) {
+ String tempSectionheader = endingHeaders[i];
+
+ // we've found our terminating header
+ if (nextHeaderBuffer.toString().equals(tempSectionheader)) {
+
+ // exclude the terminating header from the partition
+ unreadBuffer(scanner, nextHeaderBuffer);
+
+ return token;
+ }
+ }
+ }
+
+ // read the next char
+ c = scanner.read();
+ fBuffer.append((char) c);
+ } while (c != ICharacterScanner.EOF);
+
+ // we've reached EOF and since our section started with the correct
+ // header, then this is just the current end of the partition, and
+ // we return the success token
+ return token;
+ }
+
+ public IToken evaluate(ICharacterScanner scanner) {
+ return evaluate(scanner, false);
+ }
+
+ /**
+ * Returns the characters in the buffer to the scanner.
+ *
+ * @param scanner
+ * the scanner to be used
+ */
+ protected void unreadBuffer(ICharacterScanner scanner, StringBuilder buffer) {
+ for (int i = buffer.length() - 1; i >= 0; i--)
+ scanner.unread();
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/StringWithEndingRule.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/StringWithEndingRule.java
new file mode 100644
index 0000000000..4b624f4a8f
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/StringWithEndingRule.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * 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.rules;
+
+import org.eclipse.jface.text.rules.ICharacterScanner;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.linuxtools.rpm.ui.editor.detectors.IStrictWordDetector;
+
+public class StringWithEndingRule implements IRule {
+ /**
+ * The default token to be returned on success and if nothing else has been
+ * specified.
+ */
+ protected IToken fDefaultToken;
+
+ protected IToken token;
+
+ protected IStrictWordDetector fDetector;
+
+ /** The column constraint */
+ protected int fColumn = UNDEFINED;
+
+ /** Internal setting for the un-initialized column constraint */
+ protected static final int UNDEFINED = -1;
+
+ /** Buffer used for pattern detection */
+ private StringBuilder fBuffer = new StringBuilder();
+
+ private String fStartingSequence;
+
+ private boolean fMandatoryEndSequence;
+
+ public StringWithEndingRule(String startingSequence,
+ IStrictWordDetector trailingCharDetector, IToken inToken,
+ boolean endSequenceRequired) {
+ token = inToken;
+ fDetector = trailingCharDetector;
+ fStartingSequence = startingSequence;
+ fMandatoryEndSequence = endSequenceRequired;
+ fDefaultToken = Token.UNDEFINED;
+
+ }
+
+ public IToken evaluate(ICharacterScanner scanner) {
+ int c = scanner.read();
+ fBuffer.setLength(0);
+
+ for (int i = 0; i < fStartingSequence.length(); i++) {
+ fBuffer.append((char) c);
+ if (fStartingSequence.charAt(i) != c) {
+ unreadBuffer(scanner);
+ return Token.UNDEFINED;
+ }
+ c = scanner.read();
+ }
+
+ if (fDetector.isWordStart((char) c)) {
+ if (fColumn == UNDEFINED || (fColumn == scanner.getColumn() - 1)) {
+
+ do {
+ fBuffer.append((char) c);
+ c = scanner.read();
+ } while (c != ICharacterScanner.EOF
+ && fDetector.isWordPart((char) c));
+
+ if (c != ICharacterScanner.EOF && !fDetector.isEndingCharacter((char) c)) {
+ unreadBuffer(scanner);
+ return Token.UNDEFINED;
+ }
+
+ return token;
+ }
+
+ }
+
+ if (!fMandatoryEndSequence && fDetector.isEndingCharacter((char) c))
+ return token;
+ scanner.unread();
+
+ unreadBuffer(scanner);
+ return Token.UNDEFINED;
+ }
+
+ /**
+ * Returns the characters in the buffer to the scanner.
+ *
+ * @param scanner
+ * the scanner to be used
+ */
+ protected void unreadBuffer(ICharacterScanner scanner) {
+ for (int i = fBuffer.length() - 1; i >= 0; i--)
+ scanner.unread();
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/VersionReleaseRule.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/VersionReleaseRule.java
new file mode 100644
index 0000000000..854656a926
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/rules/VersionReleaseRule.java
@@ -0,0 +1,164 @@
+/*******************************************************************************
+ * 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.rules;
+
+import org.eclipse.jface.text.rules.ICharacterScanner;
+import org.eclipse.jface.text.rules.IPredicateRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.linuxtools.rpm.ui.editor.scanners.SpecfileChangelogScanner;
+
+public class VersionReleaseRule implements IPredicateRule {
+
+ /** Buffer used for pattern detection */
+ private StringBuilder fBuffer = new StringBuilder();
+
+ /** Buffer to keep track of trailing whitespace */
+ private StringBuilder fWhiteSpaceBuffer = new StringBuilder();
+
+ /** The success token */
+ IToken fToken;
+
+ /** The token that has to preceed this token */
+ IToken fPreceedingToken;
+
+ /** Where we can find out what the preceeding token was */
+ SpecfileChangelogScanner fChangelogScanner;
+
+ char CHARS_SEPERATOR = '-';
+
+ int STATE_START = 0;
+
+ int STATE_VERSION = 1;
+
+ int STATE_RELEASE = 2;
+
+ int STATE_TRAIL = 3;
+
+ int STATE_DONE = 4;
+
+ public VersionReleaseRule(IToken token) {
+ this.fToken = token;
+ }
+
+ public VersionReleaseRule(IToken successToken, IToken preceedingToken,
+ SpecfileChangelogScanner scanner) {
+ fToken = successToken;
+ fPreceedingToken = preceedingToken;
+ fChangelogScanner = scanner;
+ }
+
+ public IToken getSuccessToken() {
+ return fToken;
+ }
+
+public IToken evaluate(ICharacterScanner scanner, boolean resume) {
+ // if the last token successfully read was not the fPreceedingToke fail
+ IToken lastToken = getLastToken();
+
+ if (lastToken != fPreceedingToken ) {
+ return Token.UNDEFINED;
+ }
+
+ fBuffer.setLength(0);
+ int state = STATE_START;
+ int c;
+ int numPreceedingBlanks = 0;
+
+ do {
+ c = scanner.read();
+ fBuffer.append((char) c);
+
+ // preceeding white space
+ if (state == STATE_START){
+ if (Character.isWhitespace((char) c) || c == '-')
+ numPreceedingBlanks++;
+ else
+ state++;
+ }
+ // version state (first part of version-release)
+ if (state == STATE_VERSION) {
+ // if we've read some semblance of a version and we've reached
+ // the separator character
+ if (fBuffer.length() > numPreceedingBlanks && c == CHARS_SEPERATOR){
+ state++;
+ }
+ // otherwise we allow only digits, letters, underscores, ':' or
+ // '.' in the version
+ else if (!(Character.isLetterOrDigit((char) c) || c == '.' || c == '_' || c == ':')) {
+ unreadBuffer(scanner, fBuffer);
+ return Token.UNDEFINED;
+ }
+ }
+ // release state (second part of version-release)
+ else if (state == STATE_RELEASE){
+ // an EOF or EOL indicates success
+ if (c == ICharacterScanner.EOF || c == '\n'){
+ state = STATE_DONE;
+ }
+
+ // if we encounter a space, we enter the optional trailing
+ // space section which we consider valid (but not part of the
+ // token) if and only if it is ended by and EOF or EOL
+ else if (Character.isWhitespace((char) c)){
+ state++;
+ fWhiteSpaceBuffer.setLength(0);
+ fWhiteSpaceBuffer.append(c);
+ }
+ // allow digits, characters or '.' in the release
+ else if (! ( Character.isLetterOrDigit((char) c) || c == '.' || c == '_')){
+ unreadBuffer(scanner, fBuffer);
+ return Token.UNDEFINED;
+ }
+
+ }
+ // whitespace state, we finished redeaing the ver-rel and are
+ // now looking for an EOF or EOL for success
+ else if (state == STATE_TRAIL) {
+ // success, unwind the whitespace
+ if (c == ICharacterScanner.EOF || c == '\n'){
+ unreadBuffer(scanner, fWhiteSpaceBuffer);
+ state++;
+ } // some other illegal token after ver-rel unwind the whole
+ // deal
+ else if (!Character.isWhitespace((char) c)){
+ unreadBuffer(scanner, fBuffer);
+ return Token.UNDEFINED;
+ }
+ else{ // white space, keep reading
+ fWhiteSpaceBuffer.append((char)c);
+ }
+
+ }
+ } while (state != STATE_DONE);
+
+ // we've gone through all states until we've reached STATE_DONE, success
+ return fToken;
+ } public IToken evaluate(ICharacterScanner scanner) {
+ return evaluate(scanner, false);
+ }
+
+ /**
+ * Returns the characters in the buffer to the scanner.
+ *
+ * @param scanner
+ * the scanner to be used
+ */
+ protected void unreadBuffer(ICharacterScanner scanner, StringBuilder buffer) {
+ for (int i = buffer.length() - 1; i >= 0; i--)
+ scanner.unread();
+ }
+
+ protected IToken getLastToken() {
+ return fChangelogScanner.getLastToken();
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileChangelogScanner.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileChangelogScanner.java
new file mode 100644
index 0000000000..d3dbc3ab86
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileChangelogScanner.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * 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.scanners;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.RuleBasedScanner;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.jface.text.rules.WordRule;
+import org.eclipse.linuxtools.rpm.ui.editor.ColorManager;
+import org.eclipse.linuxtools.rpm.ui.editor.ISpecfileColorConstants;
+import org.eclipse.linuxtools.rpm.ui.editor.RpmSections;
+import org.eclipse.linuxtools.rpm.ui.editor.detectors.KeywordWordDetector;
+import org.eclipse.linuxtools.rpm.ui.editor.rules.AuthorEmailRule;
+import org.eclipse.linuxtools.rpm.ui.editor.rules.VersionReleaseRule;
+import org.eclipse.swt.SWT;
+/**
+ * This class is used specifically of the syntax coloring of the %changelog
+ * section of a spec file, which has completely different syntax than
+ * the rest of the file.
+ *
+ */
+public class SpecfileChangelogScanner extends RuleBasedScanner {
+
+ private static String[] sections = { RpmSections.CHANGELOG_SECTION };
+ private IToken fLastToken;
+
+ public SpecfileChangelogScanner(ColorManager manager) {
+ IToken sectionToken = new Token(new TextAttribute(manager
+ .getColor(ISpecfileColorConstants.SECTIONS), null, SWT.ITALIC));
+
+ IToken authorEmail = new Token(new TextAttribute(manager
+ .getColor(ISpecfileColorConstants.AUTHOR_MAIL), null, SWT.NONE));
+
+ IToken versionRelease = new Token(new TextAttribute(manager
+ .getColor(ISpecfileColorConstants.VER_REL), null, SWT.NONE));
+
+ List<IRule> rules = new ArrayList<IRule>();
+
+ // %prep, %build, ...
+ WordRule wordRule = new WordRule(new KeywordWordDetector(), Token.UNDEFINED);
+ for (String section : sections) {
+ wordRule.addWord(section, sectionToken);
+ }
+ rules.add(wordRule);
+
+
+ AuthorEmailRule emailRule= new AuthorEmailRule(authorEmail);
+ rules.add(emailRule);
+
+ VersionReleaseRule verRelRule = new VersionReleaseRule(versionRelease, authorEmail, this);
+ rules.add(verRelRule);
+
+ IRule[] result = new IRule[rules.size()];
+ rules.toArray(result);
+ setRules(result);
+ }
+
+ public IToken getLastToken (){
+ return fLastToken;
+ }
+
+ @Override
+ public IToken nextToken() {
+ fLastToken = super.nextToken();
+ return fLastToken;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfilePackagesScanner.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfilePackagesScanner.java
new file mode 100644
index 0000000000..789267b581
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfilePackagesScanner.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.ui.editor.scanners;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.RuleBasedScanner;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.jface.text.rules.WordRule;
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.linuxtools.rpm.ui.editor.ColorManager;
+import org.eclipse.linuxtools.rpm.ui.editor.ISpecfileColorConstants;
+import org.eclipse.linuxtools.rpm.ui.editor.detectors.PackageWordDetector;
+import org.eclipse.linuxtools.rpm.ui.editor.detectors.TagWordDetector;
+import org.eclipse.linuxtools.rpm.ui.editor.rules.MacroRule;
+import org.eclipse.swt.SWT;
+
+/**
+ * This class is used specifically for syntax coloring of the Requires
+ * and BuildRquires, etc... tags of a spec file.
+ *
+ */
+public class SpecfilePackagesScanner extends RuleBasedScanner {
+
+ private IToken fLastToken;
+
+ protected static final String[] PACKAGES_TAGS = {
+ "BuildRequires", "BuildConflicts", //$NON-NLS-1$ //$NON-NLS-2$
+ "BuildPreReq", "Requires", "Requires(post)", "Requires(postun)", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "Requires(pre)", "Requires(preun)", "Requires(hint)", "Conflicts", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "Obsoletes", "Prereq" }; //$NON-NLS-1$ //$NON-NLS-2$
+
+ public SpecfilePackagesScanner(ColorManager manager) {
+ IToken packageToken = new Token(new TextAttribute(manager
+ .getColor(ISpecfileColorConstants.PACKAGES), null, SWT.NONE));
+
+ IToken tagToken = new Token(new TextAttribute(manager
+ .getColor(ISpecfileColorConstants.TAGS)));
+
+ IToken macroToken = new Token(new TextAttribute(manager
+ .getColor(ISpecfileColorConstants.MACROS)));
+
+ List<IRule> rules = new ArrayList<IRule>();
+
+ rules.add(new MacroRule(macroToken));
+
+ // BuildRequires:, ...
+ WordRule wordRule = new WordRule(new TagWordDetector(), Token.UNDEFINED);
+ for (String packageTag : PACKAGES_TAGS) {
+ wordRule.addWord(packageTag + ":", tagToken); //$NON-NLS-1$
+ }
+ rules.add(wordRule);
+
+ // RPM packages
+ wordRule = new WordRule(new PackageWordDetector(), Token.UNDEFINED);
+ List<String[]> rpmPackages = Activator.getDefault().getRpmPackageList()
+ .getProposals(""); //$NON-NLS-1$
+ char[] startWith = {' ', '\t', ',', ':'};
+ for (String[] item: rpmPackages){
+ // FIXME Perhaps, that can slow down the scanning?
+ for (char startChar : startWith) {
+ wordRule.addWord(startChar + item[0], packageToken);
+ }
+ }
+ rules.add(wordRule);
+
+ IRule[] result = new IRule[rules.size()];
+ rules.toArray(result);
+ setRules(result);
+ }
+
+ protected IToken getLastToken() {
+ return fLastToken;
+ }
+
+ @Override
+ public IToken nextToken() {
+ fLastToken = super.nextToken();
+ return fLastToken;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfilePartitionScanner.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfilePartitionScanner.java
new file mode 100644
index 0000000000..1eaa247c6a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfilePartitionScanner.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * 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
+ * Alphonse Van Assche
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.rpm.ui.editor.scanners;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.rules.EndOfLineRule;
+import org.eclipse.jface.text.rules.IPredicateRule;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.MultiLineRule;
+import org.eclipse.jface.text.rules.RuleBasedPartitionScanner;
+import org.eclipse.jface.text.rules.SingleLineRule;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.linuxtools.rpm.ui.editor.RpmSections;
+import org.eclipse.linuxtools.rpm.ui.editor.rules.CommentRule;
+import org.eclipse.linuxtools.rpm.ui.editor.rules.SectionRule;
+
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmSections.*;
+
+public class SpecfilePartitionScanner extends RuleBasedPartitionScanner {
+
+ public final static String SPEC_PREP = "__spec_prep"; //$NON-NLS-1$
+ public final static String SPEC_SCRIPT = "__spec_script"; //$NON-NLS-1$
+ public final static String SPEC_FILES = "__spec_files"; //$NON-NLS-1$
+ public final static String SPEC_CHANGELOG = "__spec_changelog"; //$NON-NLS-1$
+ public final static String SPEC_PACKAGES = "__spec_packages"; //$NON-NLS-1$
+ public final static String SPEC_GROUP = "__spec_group"; //$NON-NLS-1$
+ public final static String SPEC_FILE_PARTITIONING = "___spec_partitioning"; //$NON-NLS-1$
+
+ public static String[] SPEC_PARTITION_TYPES = { IDocument.DEFAULT_CONTENT_TYPE, SPEC_PREP, SPEC_SCRIPT,
+ SPEC_FILES, SPEC_CHANGELOG, SPEC_PACKAGES, SPEC_GROUP};
+
+ /** All possible headers for sections of the type SPEC_SCRIPT */
+ private static String[] sectionHeaders = { BUILD_SECTION, INSTALL_SECTION,
+ PRETRANS_SECTION, PRE_SECTION, PREUN_SECTION, POST_SECTION, POSTUN_SECTION,
+ POSTTRANS_SECTION, CLEAN_SECTION};
+
+ /** All possible headers for section that can come after sections of the type SPEC_SCRIPT */
+ private static String[] sectionEndingHeaders = { BUILD_SECTION, INSTALL_SECTION,
+ PRETRANS_SECTION, PRE_SECTION, PREUN_SECTION, POST_SECTION, POSTUN_SECTION, POSTTRANS_SECTION,
+ CLEAN_SECTION, FILES_SECTION};
+
+ public SpecfilePartitionScanner() {
+ super();
+
+ IToken specPrep = new Token(SPEC_PREP);
+ IToken specScript = new Token(SPEC_SCRIPT);
+ IToken specFiles = new Token(SPEC_FILES);
+ IToken specChangelog = new Token(SPEC_CHANGELOG);
+ IToken specPackages = new Token(SPEC_PACKAGES);
+ IToken specGroup = new Token(SPEC_GROUP);
+
+ List<IRule> rules = new ArrayList<IRule>();
+
+ // RPM packages
+ for (String packageTag :SpecfilePackagesScanner.PACKAGES_TAGS) {
+ rules.add(new SingleLineRule(packageTag, "", specPackages, (char)0 , true)); //$NON-NLS-1$
+ }
+
+ // %prep
+ rules.add(new SectionRule(PREP_SECTION, new String[] { BUILD_SECTION }, specPrep));
+
+ // %changelog
+ rules.add(new MultiLineRule(RpmSections.CHANGELOG_SECTION, "", specChangelog, (char)0 , true)); //$NON-NLS-1$
+
+ // "%build", "%install", "%pre", "%preun", "%post", "%postun"
+ for (String sectionHeader : sectionHeaders)
+ rules.add(new SectionRule(sectionHeader, sectionEndingHeaders, specScript));
+
+ // comments
+ rules.add(new CommentRule(specScript));
+
+ // group tag
+ rules.add(new EndOfLineRule("Group:", specGroup)); //$NON-NLS-1$
+
+
+ // %files
+ rules.add(new SectionRule(FILES_SECTION, new String[] { FILES_SECTION,
+ CHANGELOG_SECTION }, specFiles));
+
+ IPredicateRule[] result= new IPredicateRule[rules.size()];
+ rules.toArray(result);
+ setPredicateRules(result);
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileScanner.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileScanner.java
new file mode 100644
index 0000000000..0a0dd226c1
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/scanners/SpecfileScanner.java
@@ -0,0 +1,160 @@
+/*******************************************************************************
+ * 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.scanners;
+
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmSections.BUILD_SECTION;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmSections.CHANGELOG_SECTION;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmSections.CHECK_SECTION;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmSections.CLEAN_SECTION;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmSections.DESCRIPTION_SECTION;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmSections.FILES_SECTION;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmSections.INSTALL_SECTION;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmSections.PACKAGE_SECTION;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmSections.POSTTRANS_SECTION;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmSections.POSTUN_SECTION;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmSections.POST_SECTION;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmSections.PREP_SECTION;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmSections.PRETRANS_SECTION;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmSections.PREUN_SECTION;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmSections.PRE_SECTION;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmTags.AUTO_PROV;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmTags.AUTO_REQ;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmTags.AUTO_REQUIRES;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmTags.AUTO_REQ_PROV;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmTags.BUILD_ARCH;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmTags.BUILD_ARCHITECTURES;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmTags.BUILD_ROOT;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmTags.DISTRIBUTION;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmTags.EPOCH;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmTags.EXCLUDE_ARCH;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmTags.EXCLUDE_OS;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmTags.EXCLUSIVE_ARCH;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmTags.GROUP;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmTags.ICON;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmTags.LICENSE;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmTags.NAME;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmTags.PACKAGER;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmTags.PREFIX;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmTags.PROVIDES;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmTags.RELEASE;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmTags.SUMMARY;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmTags.URL;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmTags.VENDOR;
+import static org.eclipse.linuxtools.rpm.ui.editor.RpmTags.VERSION;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.RuleBasedScanner;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.jface.text.rules.WordRule;
+import org.eclipse.linuxtools.rpm.ui.editor.ColorManager;
+import org.eclipse.linuxtools.rpm.ui.editor.ISpecfileColorConstants;
+import org.eclipse.linuxtools.rpm.ui.editor.detectors.KeywordWordDetector;
+import org.eclipse.linuxtools.rpm.ui.editor.detectors.MacroWordDetector;
+import org.eclipse.linuxtools.rpm.ui.editor.detectors.PatchNumberDetector;
+import org.eclipse.linuxtools.rpm.ui.editor.detectors.SuffixNumberDetector;
+import org.eclipse.linuxtools.rpm.ui.editor.detectors.TagWordDetector;
+import org.eclipse.linuxtools.rpm.ui.editor.rules.CommentRule;
+import org.eclipse.linuxtools.rpm.ui.editor.rules.MacroRule;
+import org.eclipse.linuxtools.rpm.ui.editor.rules.StringWithEndingRule;
+import org.eclipse.swt.SWT;
+
+public class SpecfileScanner extends RuleBasedScanner {
+
+ private static String[] sections = { PREP_SECTION, BUILD_SECTION, INSTALL_SECTION,
+ PRETRANS_SECTION, PRE_SECTION, PREUN_SECTION, POST_SECTION, FILES_SECTION, CHANGELOG_SECTION,
+ PACKAGE_SECTION, DESCRIPTION_SECTION, POSTUN_SECTION, POSTTRANS_SECTION, CLEAN_SECTION,
+ CHECK_SECTION };
+
+ public static String[] DEFINED_MACROS = {
+ "%define", "%global", "%make", "%setup", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "%attrib", "%defattr", "%attr", "%dir", "%config", "%docdir", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+ "%doc", "%lang", "%verify", "%ghost" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+
+ private static String[] keywords = { "%if", "%ifarch", "%ifnarch", "%else", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "%endif" }; //$NON-NLS-1$
+
+ private static String[] TAGS = { SUMMARY, NAME, VERSION, PACKAGER, ICON,
+ URL, PREFIX, GROUP, LICENSE, RELEASE, BUILD_ROOT, DISTRIBUTION,
+ VENDOR, PROVIDES, EXCLUSIVE_ARCH, EXCLUDE_ARCH, EXCLUDE_OS,
+ BUILD_ARCH, BUILD_ARCHITECTURES, AUTO_REQUIRES, AUTO_REQ,
+ AUTO_REQ_PROV, AUTO_PROV, EPOCH };
+
+ public SpecfileScanner(ColorManager manager) {
+ IToken sectionToken = new Token(new TextAttribute(manager
+ .getColor(ISpecfileColorConstants.SECTIONS), null, SWT.ITALIC));
+
+ IToken macroToken = new Token(new TextAttribute(manager
+ .getColor(ISpecfileColorConstants.MACROS)));
+
+ IToken keywordToken = new Token(new TextAttribute(manager
+ .getColor(ISpecfileColorConstants.KEYWORDS), null, SWT.BOLD));
+
+ IToken tagToken = new Token(new TextAttribute(manager
+ .getColor(ISpecfileColorConstants.TAGS)));
+
+ IToken commentToken = new Token(new TextAttribute(manager
+ .getColor(ISpecfileColorConstants.COMMENT)));
+
+ List<IRule> rules = new ArrayList<IRule>();
+
+ rules.add(new CommentRule(commentToken));
+ rules.add(new MacroRule( macroToken));
+
+ // %define, %make, ...
+ WordRule wordRule = new WordRule(new MacroWordDetector(),
+ Token.UNDEFINED);
+ for (String definedMacro : DEFINED_MACROS) {
+ wordRule.addWord(definedMacro, macroToken);
+ }
+ rules.add(wordRule);
+
+ // %patch[0-9]+[\ \t]
+ rules.add(new StringWithEndingRule("%patch", new PatchNumberDetector(), //$NON-NLS-1$
+ macroToken, false ));
+
+ // %if, %else ...
+ wordRule = new WordRule(new KeywordWordDetector(), Token.UNDEFINED);
+ for (String keyword : keywords) {
+ wordRule.addWord(keyword, keywordToken);
+ }
+ rules.add(wordRule);
+
+ // %prep, %build, ...
+ wordRule = new WordRule(new KeywordWordDetector(), Token.UNDEFINED);
+ for (String section : sections) {
+ wordRule.addWord(section, sectionToken);
+ }
+ rules.add(wordRule);
+
+ // Name:, Summary:, ...
+ wordRule = new WordRule(new TagWordDetector(), Token.UNDEFINED);
+ for (String tag : TAGS) {
+ wordRule.addWord(tag + ":", tagToken); //$NON-NLS-1$
+ }
+ rules.add(wordRule);
+
+ // Source[0-9]*:, Patch[0-9]*:
+ rules.add(new StringWithEndingRule("Source", //$NON-NLS-1$
+ new SuffixNumberDetector(), tagToken, false));
+ rules.add(new StringWithEndingRule("Patch", new SuffixNumberDetector(), //$NON-NLS-1$
+ tagToken, false));
+
+ IRule[] result = new IRule[rules.size()];
+ rules.toArray(result);
+ setRules(result);
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/wizards/Messages.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/wizards/Messages.java
new file mode 100644
index 0000000000..cda1f0b5dd
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/wizards/Messages.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * 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.wizards;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.rpm.ui.editor.wizards.messages"; //$NON-NLS-1$
+ public static String SpecfileNewWizard_0;
+ public static String SpecfileNewWizard_1;
+ public static String SpecfileNewWizard_2;
+ public static String SpecfileNewWizard_3;
+ public static String SpecfileNewWizard_4;
+ public static String SpecfileNewWizardPage_10;
+ public static String SpecfileNewWizardPage_11;
+ public static String SpecfileNewWizardPage_12;
+ public static String SpecfileNewWizardPage_13;
+ public static String SpecfileNewWizardPage_14;
+ public static String SpecfileNewWizardPage_15;
+ public static String SpecfileNewWizardPage_16;
+ public static String SpecfileNewWizardPage_17;
+ public static String SpecfileNewWizardPage_18;
+ public static String SpecfileNewWizardPage_19;
+ public static String SpecfileNewWizardPage_20;
+ public static String SpecfileNewWizardPage_21;
+ public static String SpecfileNewWizardPage_22;
+ public static String SpecfileNewWizardPage_23;
+ public static String SpecfileNewWizardPage_24;
+ public static String SpecfileNewWizardPage_25;
+ public static String SpecfileNewWizardPage_26;
+ public static String SpecfileNewWizardPage_27;
+ public static String SpecfileNewWizardPage_28;
+ public static String SpecfileNewWizardPage_29;
+ public static String SpecfileNewWizardPage_9;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/wizards/NoExecutableWizardPage.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/wizards/NoExecutableWizardPage.java
new file mode 100644
index 0000000000..fcd8911516
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/wizards/NoExecutableWizardPage.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * 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.wizards;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+public class NoExecutableWizardPage extends WizardPage {
+
+ protected NoExecutableWizardPage() {
+ super(Messages.NoExecutableWizardPage_0);
+ this.setImageDescriptor(ImageDescriptor.createFromFile(getClass(),
+ "/icons/rpm.gif")); //$NON-NLS-1$
+ }
+
+ public void createControl(Composite parent) {
+ final Composite container = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout();
+ container.setLayout(layout);
+ layout.numColumns = 3;
+ layout.verticalSpacing = 9;
+
+ // Project
+ Label label = new Label(container, SWT.NULL);
+ label
+ .setText(Messages.NoExecutableWizardPage_1);
+ // empty label for the last row.
+ new Label(container, SWT.NULL);
+ setControl(container);
+ this.setTitle(Messages.NoExecutableWizardPage_2);
+ }
+
+ @Override
+ public boolean isPageComplete() {
+ return false;
+ }
+
+
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizard.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizard.java
new file mode 100644
index 0000000000..d619187280
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizard.java
@@ -0,0 +1,154 @@
+/*******************************************************************************
+ * 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.wizards;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.core.runtime.*;
+import org.eclipse.jface.operation.*;
+import java.lang.reflect.InvocationTargetException;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileLog;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.CoreException;
+import java.io.*;
+import org.eclipse.ui.*;
+import org.eclipse.ui.ide.IDE;
+
+public class SpecfileNewWizard extends Wizard implements INewWizard {
+ private SpecfileNewWizardPage page;
+ private ISelection selection;
+
+ /**
+ * Constructor for SpecfileNewWizard.
+ */
+ public SpecfileNewWizard() {
+ super();
+ setNeedsProgressMonitor(true);
+ }
+
+ /**
+ * Adding the page to the wizard.
+ */
+ @Override
+ public void addPages() {
+ page = new SpecfileNewWizardPage(selection);
+ addPage(page);
+ }
+
+ /**
+ * This method is called when 'Finish' button is pressed in the wizard. We
+ * will create an operation and run it using wizard as execution context.
+ */
+ @Override
+ public boolean performFinish() {
+ final String containerName = page.getProjectName();
+ final String fileName = page.getFileName();
+ final InputStream contentInputStream = openContentStream();
+ IRunnableWithProgress op = new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor)
+ throws InvocationTargetException {
+ try {
+ doFinish(containerName, fileName, contentInputStream,
+ monitor);
+ } catch (CoreException e) {
+ throw new InvocationTargetException(e);
+ } finally {
+ monitor.done();
+ }
+ }
+ };
+ try {
+ getContainer().run(true, false, op);
+ } catch (InterruptedException e) {
+ return false;
+ } catch (InvocationTargetException e) {
+ SpecfileLog.logError(e);
+ Throwable realException = e.getTargetException();
+ MessageDialog.openError(getShell(), Messages.SpecfileNewWizard_0, realException
+ .getMessage());
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * The worker method. It will find the container, create the file if missing
+ * or just replace its contents, and open the editor on the newly created
+ * file.
+ */
+ private void doFinish(String projectName, String fileName,
+ InputStream contentInputStream, IProgressMonitor monitor)
+ throws CoreException {
+ monitor.beginTask(Messages.SpecfileNewWizard_1 + fileName, 2);
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ IResource resource = root.findMember(new Path(projectName));
+ if (!resource.exists() || !(resource instanceof IContainer)) {
+ throwCoreException(Messages.SpecfileNewWizard_2 + projectName
+ + Messages.SpecfileNewWizard_3);
+ }
+ IContainer container = (IContainer) resource;
+ final IFile file = container.getFile(new Path(fileName));
+ try {
+ InputStream stream = contentInputStream;
+ if (file.exists()) {
+ file.setContents(stream, true, true, monitor);
+ } else {
+ file.create(stream, true, monitor);
+ }
+ stream.close();
+ } catch (IOException e) {
+ }
+ monitor.worked(1);
+ monitor.setTaskName(Messages.SpecfileNewWizard_4);
+ getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ IWorkbenchPage page = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage();
+ try {
+ IDE.openEditor(page, file, true);
+ } catch (PartInitException e) {
+ }
+ }
+ });
+ monitor.worked(1);
+ }
+
+ /**
+ * We will initialize file contents with the modified template text.
+ */
+ private InputStream openContentStream() {
+ String contents = page.getContent();
+ return new ByteArrayInputStream(contents.getBytes());
+ }
+
+ private void throwCoreException(String message) throws CoreException {
+ IStatus status = new Status(IStatus.ERROR,
+ Activator.PLUGIN_ID, IStatus.OK, message,
+ null);
+ throw new CoreException(status);
+ }
+
+ /**
+ * We will accept the selection in the workbench to see if we can initialize
+ * from it.
+ *
+ * @see IWorkbenchWizard#init(IWorkbench, IStructuredSelection)
+ */
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.selection = selection;
+ }
+} \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizardPage.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizardPage.java
new file mode 100644
index 0000000000..2ba6a77af9
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/wizards/SpecfileNewWizardPage.java
@@ -0,0 +1,442 @@
+/*******************************************************************************
+ * 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.wizards;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.LineNumberReader;
+import java.util.List;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.IDialogPage;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.linuxtools.rpm.ui.editor.Activator;
+import org.eclipse.linuxtools.rpm.ui.editor.SpecfileLog;
+import org.eclipse.linuxtools.rpm.ui.editor.Utils;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.ContainerSelectionDialog;
+
+public class SpecfileNewWizardPage extends WizardPage {
+
+ private static final String NAME = "package_name"; //$NON-NLS-1$
+
+ private static final String VERSION = "1.0"; //$NON-NLS-1$
+
+ private static final String SUMMARY = "Summary of the package"; //$NON-NLS-1$
+
+ private static final String GROUP = "Amusements/Games"; //$NON-NLS-1$
+
+ private static final String LICENSE = "GPL"; //$NON-NLS-1$
+
+ private static final String URL = "http://"; //$NON-NLS-1$
+
+ private static final String SOURCE0 = "archive_name-%{version}"; //$NON-NLS-1$
+
+ private Text projectText;
+
+ private Text nameText;
+
+ private Text versionText;
+
+ private Text summaryText;
+
+ private Combo groupCombo;
+
+ private Text licenseText;
+
+ private Text URLText;
+
+ private Text source0Text;
+
+ private GridData gd;
+
+ private Combo templateCombo;
+
+ private ISelection selection;
+
+ private String selectedTemplate = "minimal"; //$NON-NLS-1$
+
+ private String content;
+
+ /**
+ * Constructor for SpecfileNewWizardPage.
+ *
+ * @param selection The selection to put the new spec file in.
+ */
+ public SpecfileNewWizardPage(ISelection selection) {
+ super("wizardPage"); //$NON-NLS-1$
+ setTitle(Messages.SpecfileNewWizardPage_9);
+ setDescription(Messages.SpecfileNewWizardPage_10);
+ this.selection = selection;
+ }
+
+ /**
+ * @see IDialogPage#createControl(Composite)
+ */
+ public void createControl(Composite parent) {
+ final Composite container = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout();
+ container.setLayout(layout);
+ layout.numColumns = 3;
+ layout.verticalSpacing = 9;
+
+ // Project
+ Label label = new Label(container, SWT.NULL);
+ label.setText(Messages.SpecfileNewWizardPage_11);
+ projectText = new Text(container, SWT.BORDER | SWT.SINGLE);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ projectText.setLayoutData(gd);
+ projectText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ dialogChanged();
+ }
+ });
+ Button button = new Button(container, SWT.PUSH);
+ button.setText(Messages.SpecfileNewWizardPage_12);
+ button.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ handleBrowse();
+ }
+ });
+
+ // Template to use
+ label = new Label(container, SWT.NULL);
+ label.setText(Messages.SpecfileNewWizardPage_13);
+ templateCombo = new Combo(container, SWT.NULL);
+ try {
+ populateTemplateCombo(templateCombo);
+ } catch (CoreException e2) {
+ SpecfileLog.logError(e2);
+ }
+ // empty label for the last row.
+ label = new Label(container, SWT.NULL);
+ templateCombo.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ selectedTemplate = ((Combo) e.getSource()).getText();
+ InputStream inputStream = runRpmdevNewSpec(selectedTemplate);
+ LineNumberReader reader = new LineNumberReader(
+ new InputStreamReader(inputStream));
+ String line;
+ try {
+ content = ""; //$NON-NLS-1$
+ setDefaultValues();
+ while ((line = reader.readLine()) != null) {
+ if (line.startsWith("Name:")) { //$NON-NLS-1$
+ setTemplateTagValue(nameText, line);
+ }
+ if (line.startsWith("Version:")) { //$NON-NLS-1$
+ setTemplateTagValue(versionText, line);
+ }
+ if (line.startsWith("Summary:")) { //$NON-NLS-1$
+ setTemplateTagValue(summaryText, line);
+ }
+ if (line.startsWith("Group:")) { //$NON-NLS-1$
+ String[] items = line.split(":", 2); //$NON-NLS-1$
+ String value = items[1].trim();
+ if (!value.equals("")) //$NON-NLS-1$
+ groupCombo.setText(value);
+ }
+ if (line.startsWith("License:")) { //$NON-NLS-1$
+ setTemplateTagValue(licenseText, line);
+ }
+ if (line.startsWith("URL:")) { //$NON-NLS-1$
+ setTemplateTagValue(URLText, line);
+ }
+ if (line.startsWith("Source0:")) { //$NON-NLS-1$
+ setTemplateTagValue(source0Text, line);
+ }
+ content += line + '\n';
+ }
+ } catch (IOException e1) {
+ SpecfileLog.logError(e1);
+ }
+ }
+ });
+
+ // Package Name
+ nameText = setTextItem(container, Messages.SpecfileNewWizardPage_14);
+
+ // Package Version
+ versionText = setTextItem(container, Messages.SpecfileNewWizardPage_15);
+
+ // Package Summary
+ summaryText = setTextItem(container, Messages.SpecfileNewWizardPage_16);
+
+ // Package Group
+ label = new Label(container, SWT.NULL);
+ label.setText(Messages.SpecfileNewWizardPage_17);
+ groupCombo = new Combo(container, SWT.NULL);
+ populateGroupCombo(groupCombo);
+ // empty label for the last row.
+ label = new Label(container, SWT.NULL);
+
+ // Package License
+ licenseText = setTextItem(container, Messages.SpecfileNewWizardPage_18);
+
+ // Package URL
+ URLText = setTextItem(container, Messages.SpecfileNewWizardPage_19);
+
+ // Package Source0
+ source0Text = setTextItem(container, Messages.SpecfileNewWizardPage_20);
+
+ initialize();
+ dialogChanged();
+ setControl(container);
+ }
+
+ private Text setTextItem(Composite container, String textLabel) {
+ Label label = new Label(container, SWT.NULL);
+ label.setText(textLabel);
+ Text text = new Text(container, SWT.BORDER | SWT.SINGLE);
+ text.setLayoutData(gd);
+ text.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ dialogChanged();
+ }
+ });
+ // empty label for the last row.
+ label = new Label(container, SWT.NULL);
+ return text;
+ }
+
+ private void setTemplateTagValue(Text text, String line) {
+ String[] items = line.split(":", 2); //$NON-NLS-1$
+ String value = items[1].trim();
+ if (!value.equals("")) { //$NON-NLS-1$
+ text.setText(value);
+ }
+ }
+
+ public String getProjectName() {
+ return projectText.getText();
+ }
+
+ public String getFileName() {
+ return nameText.getText() + ".spec"; //$NON-NLS-1$
+ }
+
+ public String getSelectedTemplate() {
+ return selectedTemplate;
+ }
+
+ public String getContent() {
+ InputStream inputStream = runRpmdevNewSpec(selectedTemplate);
+ LineNumberReader reader = new LineNumberReader(new InputStreamReader(
+ inputStream));
+ String line;
+ try {
+ content = ""; //$NON-NLS-1$
+ while ((line = reader.readLine()) != null) {
+ if (line.startsWith("Name:")) { //$NON-NLS-1$
+ line = "Name:" + " " + nameText.getText(); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ if (line.startsWith("Version:")) { //$NON-NLS-1$
+ line = "Version:" + " " + versionText.getText(); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ if (line.startsWith("Summary:")) { //$NON-NLS-1$
+ line = "Summary:" + " " + summaryText.getText(); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ if (line.startsWith("Group:")) { //$NON-NLS-1$
+ line = "Group:" + " " + groupCombo.getText(); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ if (line.startsWith("License:")) { //$NON-NLS-1$
+ line = "License:" + " " + licenseText.getText(); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ if (line.startsWith("URL:")) { //$NON-NLS-1$
+ line = "URL:" + " " + URLText.getText(); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ if (line.startsWith("Source0:")) { //$NON-NLS-1$
+ line = "Source0:" + " " + source0Text.getText(); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ content += line + '\n';
+ }
+ } catch (IOException e1) {
+ SpecfileLog.logError(e1);
+ }
+ return content;
+ }
+
+ /**
+ * Tests if the current workbench selection is a suitable container to use.
+ */
+ private void initialize() {
+ if (selection != null && selection.isEmpty() == false
+ && selection instanceof IStructuredSelection) {
+ IStructuredSelection ssel = (IStructuredSelection) selection;
+ if (ssel.size() > 1)
+ return;
+ Object obj = ssel.getFirstElement();
+ if (obj instanceof IResource) {
+ IContainer container;
+ if (obj instanceof IContainer)
+ container = (IContainer) obj;
+ else
+ container = ((IResource) obj).getParent();
+ projectText.setText(container.getFullPath().toString());
+ }
+ }
+ setDefaultValues();
+ }
+
+ /**
+ * Uses the standard container selection dialog to choose the new value for
+ * the container field.
+ */
+ private void handleBrowse() {
+ ContainerSelectionDialog dialog = new ContainerSelectionDialog(
+ getShell(), ResourcesPlugin.getWorkspace().getRoot(), false,
+ Messages.SpecfileNewWizardPage_21);
+ if (dialog.open() == Window.OK) {
+ Object[] result = dialog.getResult();
+ if (result.length == 1) {
+ projectText.setText(((Path) result[0]).toString());
+ }
+ }
+ }
+
+ /**
+ * Ensures that both text fields are set.
+ */
+ private void dialogChanged() {
+ IResource container = ResourcesPlugin.getWorkspace().getRoot()
+ .findMember(new Path(getProjectName()));
+ String fileName = getFileName();
+ if (getProjectName().length() == 0) {
+ updateStatus(Messages.SpecfileNewWizardPage_22);
+ return;
+ }
+ if (container == null
+ || (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) {
+ updateStatus(Messages.SpecfileNewWizardPage_23);
+ return;
+ }
+ if (!container.isAccessible()) {
+ updateStatus(Messages.SpecfileNewWizardPage_24);
+ return;
+ }
+ if (fileName.length() == 0) {
+ updateStatus(Messages.SpecfileNewWizardPage_25);
+ return;
+ }
+
+ /*
+ * Current RPM doc content (4.4.2):
+ * Names must not include whitespace and may include a hyphen '-'
+ * (unlike version and releasetags). Names should not include any
+ * numeric operators ('<', '>','=') as future versions of rpm may need
+ * to reserve characters other than '-'.
+ *
+ */
+ String packageName = nameText.getText();
+ if (packageName.indexOf(" ") != -1 || packageName.indexOf("<") != -1 //$NON-NLS-1$ //$NON-NLS-2$
+ || packageName.indexOf(">") != -1 || packageName.indexOf("=") != -1){ //$NON-NLS-1$ //$NON-NLS-2$
+ updateStatus(Messages.SpecfileNewWizardPage_26
+ + Messages.SpecfileNewWizardPage_27);
+ return;
+ }
+
+ if (versionText.getText().indexOf("-") > -1) { //$NON-NLS-1$
+ updateStatus(Messages.SpecfileNewWizardPage_28);
+ return;
+ }
+
+ updateStatus(null);
+ }
+
+ private void updateStatus(String message) {
+ setErrorMessage(message);
+ setPageComplete(message == null);
+ }
+
+ private void setDefaultValues() {
+ nameText.setText(NAME);
+ versionText.setText(VERSION);
+ summaryText.setText(SUMMARY);
+ groupCombo.setText(GROUP);
+ licenseText.setText(LICENSE);
+ URLText.setText(URL);
+ source0Text.setText(SOURCE0);
+ }
+
+ private void populateTemplateCombo(Combo templateCombo) throws CoreException {
+ // get a list of all files in a directory
+ File dir = new File("/etc/rpmdevtools"); //$NON-NLS-1$
+ String[] files = dir.list();
+ if (dir.exists()) {
+ String templateCSV = ""; //$NON-NLS-1$
+ for (String file : files) {
+ if (file.startsWith("spectemplate-")) //$NON-NLS-1$
+ templateCSV += file.split("-", 2)[1].replaceAll("\\.spec", //$NON-NLS-1$ //$NON-NLS-2$
+ "") //$NON-NLS-1$
+ + ","; //$NON-NLS-1$
+ }
+ String[] templates = templateCSV.split(","); //$NON-NLS-1$
+ for (String template: templates) {
+ templateCombo.add(template);
+ }
+ templateCombo.setText(selectedTemplate);
+ } else {
+ throwCoreException(Messages.SpecfileNewWizardPage_29);
+ }
+ }
+
+ private void populateGroupCombo(Combo groupsCombo) {
+ List<String> rpmGroups = Activator.getDefault().getRpmGroups();
+ for (String rpmGroup : rpmGroups) {
+ groupsCombo.add(rpmGroup);
+ }
+ }
+
+ private BufferedInputStream runRpmdevNewSpec(String template) {
+ BufferedInputStream in = null;
+ // Here we assuming that the rpmdevtools package is installed.
+ try {
+ in = Utils.runCommandToInputStream("rpmdev-newspec", "-o", "-", "-t", template ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ } catch (IOException e) {
+ // FIXME: rpmdev-newspec is not in the system $PATH, what should we do here?.
+ SpecfileLog.logError(e);
+ }
+ return in;
+ }
+
+ private void throwCoreException(String message) throws CoreException {
+ IStatus status = new Status(IStatus.ERROR,
+ Activator.PLUGIN_ID, IStatus.OK, message,
+ null);
+ throw new CoreException(status);
+ }
+
+} \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/wizards/messages.properties b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/wizards/messages.properties
new file mode 100644
index 0000000000..6605c8e6f3
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/rpm/ui/editor/wizards/messages.properties
@@ -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
+###############################################################################
+SpecfileNewWizard_0=Error
+SpecfileNewWizard_1=Creating
+SpecfileNewWizard_2=Project "
+SpecfileNewWizard_3=" does not exist.
+SpecfileNewWizard_4=Opening file for editing...
+SpecfileNewWizardPage_10=This wizard creates a new specfile based on a selected template.
+SpecfileNewWizardPage_11=&Project:
+SpecfileNewWizardPage_12=Select a project...
+SpecfileNewWizardPage_13=Select a Template:
+SpecfileNewWizardPage_14=&Name:
+SpecfileNewWizardPage_15=&Version:
+SpecfileNewWizardPage_16=&Summary:
+SpecfileNewWizardPage_17=&Group:
+SpecfileNewWizardPage_18=&License:
+SpecfileNewWizardPage_19=&URL:
+SpecfileNewWizardPage_20=Source&0:
+SpecfileNewWizardPage_21=Select new file container
+SpecfileNewWizardPage_22=File container must be specified
+SpecfileNewWizardPage_23=The Project must exist
+SpecfileNewWizardPage_24=Project must be writable
+SpecfileNewWizardPage_25=Spec file name must be specified
+SpecfileNewWizardPage_26=The Name tag must not include whitespace and
+SpecfileNewWizardPage_27=should not include any numeric operators ('<', '>','=')
+SpecfileNewWizardPage_28=Please, no dashes in the version\!
+SpecfileNewWizardPage_29=/etc/rpmdevtools directory was not found
+SpecfileNewWizardPage_9=New specfile based on a template
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/templates/templates.xml b/rpm/org.eclipse.linuxtools.rpm.ui.editor/templates/templates.xml
new file mode 100644
index 0000000000..38d1b8600b
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/templates/templates.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="ISO-8859-1"?><!--
+ 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
+ -->
+
+<templates>
+
+<!-- PREAMBLE SECTION TEMPLATES -->
+<template id="prep" name="%prep" description="%prep template" context="org.eclipse.linuxtools.rpm.ui.editor.preambleSection" enabled="true">%prep
+</template>
+<template id="define" name="%define" description="%define template" context="org.eclipse.linuxtools.rpm.ui.editor.preambleSection" enabled="true">%define ${key} ${value}</template>
+<template id="name" name="Name:" description="Name template" context="org.eclipse.linuxtools.rpm.ui.editor.preambleSection" enabled="true">Name: ${package_name}</template>
+<template id="url" name="URL:" description="Url template" context="org.eclipse.linuxtools.rpm.ui.editor.preambleSection" enabled="true">Url: ${package_url}</template>
+<template id="license" name="License:" description="License template" context="org.eclipse.linuxtools.rpm.ui.editor.preambleSection" enabled="true">License: ${package_name}</template>
+<template id="group" name="Group:" description="Group template" context="org.eclipse.linuxtools.rpm.ui.editor.preambleSection" enabled="true">Group: ${package_group}</template>
+<template id="version" name="Version:" description="Version template" context="org.eclipse.linuxtools.rpm.ui.editor.preambleSection" enabled="true">Version: ${package_name}</template>
+<template id="release" name="Release:" description="Release template" context="org.eclipse.linuxtools.rpm.ui.editor.preambleSection" enabled="true">Release: ${package_name}%{?dist}</template>
+<template id="summary" name="Summary:" description="Summary template" context="org.eclipse.linuxtools.rpm.ui.editor.preambleSection" enabled="true">Summary: ${package_name}</template>
+<template id="buildRoot" name="BuildRoot:" description="BuildRoot template" context="org.eclipse.linuxtools.rpm.ui.editor.preambleSection" enabled="true">BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)</template>
+<template id="excludeArch" name="ExcludeArch:" description="ExcludeArch template" context="org.eclipse.linuxtools.rpm.ui.editor.preambleSection" enabled="true">ExcludeArch: ${exluded_arches}</template>
+<template id="requires" name="Requires" description="Requires template" context="org.eclipse.linuxtools.rpm.ui.editor.preambleSection" enabled="true">Requires: ${package_name}</template>
+<template id="requiresPre" name="Requires" description="Requires(pre) template" context="org.eclipse.linuxtools.rpm.ui.editor.preambleSection" enabled="true">Requires(pre): ${package_name}</template>
+<template id="requiresPost" name="Requires" description="Requires(post) template" context="org.eclipse.linuxtools.rpm.ui.editor.preambleSection" enabled="true">Requires(post): ${package_name}</template>
+<template id="buildRequires" name="BuildRequires:" description="BuildRequires template" context="org.eclipse.linuxtools.rpm.ui.editor.preambleSection" enabled="true">BuildRequires: ${package_name}</template>
+<template id="source" name="Source:" description="Source template" context="org.eclipse.linuxtools.rpm.ui.editor.preambleSection" enabled="true">Source${src_number}: ${source_filename}</template>
+<template id="sourceZero" name="Source0:" description="Source0 template" context="org.eclipse.linuxtools.rpm.ui.editor.preambleSection" enabled="true">Source0: %{name}-%{version}.tar.${bz2}</template>
+<template id="patch" name="Patch:" description="Patch template" context="org.eclipse.linuxtools.rpm.ui.editor.preambleSection" enabled="true">Patch${patch_number}: ${path_filename}</template>
+<template id="description" name="%description" description="%description main package template" context="org.eclipse.linuxtools.rpm.ui.editor.preambleSection" enabled="true">%description
+${package_description}
+</template>
+<template id="package" name="%package template" description="Add a package template" context="org.eclipse.linuxtools.rpm.ui.editor.preambleSection" enabled="true">%package ${package_name}</template>
+<template id="develPackage" name="%package devel template" description="Add a devel package template" context="org.eclipse.linuxtools.rpm.ui.editor.preambleSection" enabled="true">%package devel
+Summary: Development packages for %{name}.
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: ${package_name}
+</template>
+<template id="develDescription" name="%description devel" description="Add a devel package template" context="org.eclipse.linuxtools.rpm.ui.editor.preambleSection" enabled="true">%description devel
+The %{name}-devel package includes the header files
+and developer docs for the %{name} package.
+${more_dev_informations_on_this_devel_package}
+</template>
+
+<!-- PRE SECTION TEMPLATES -->
+<template id="build" name="%build" description="%build template" context="org.eclipse.linuxtools.rpm.ui.editor.preSection" enabled="true">%build
+</template>
+<template id="setup" name="%setup" description="setup -q template" context="org.eclipse.linuxtools.rpm.ui.editor.preSection" enabled="true">%setup -q</template>
+<template id="setupName" name="%setup" description="setup -q -n template" context="org.eclipse.linuxtools.rpm.ui.editor.preSection" enabled="true">%setup -q -n ${dir_name}</template>
+<template id="simplePatch" name="%patch" description="Add a simple patch entry" context="org.eclipse.linuxtools.rpm.ui.editor.preSection" enabled="true">%patch${patch_nbr} -b .${bkup_name}</template>
+<template id="levelPatch" name="%patch" description="Add a patch entry with source level" context="org.eclipse.linuxtools.rpm.ui.editor.preSection" enabled="true">%patch${patch_nbr} -p${src_level} -b .${bkup_name}</template>
+
+
+<!-- BUILD SECTION TEMPLATES -->
+<template id="install" name="%install" description="%install template" context="org.eclipse.linuxtools.rpm.ui.editor.buildSection" enabled="true">%install
+</template>
+<template id="configure" name="%configure" description="%configure template" context="org.eclipse.linuxtools.rpm.ui.editor.buildSection" enabled="true">%configure ${param}</template>
+<template id="make" name="make" description="make template" context="org.eclipse.linuxtools.rpm.ui.editor.buildSection" enabled="true">make</template>
+<template id="makeSmpFlag" name="make %{?_smp_mflags}" description="make template with smp macro" context="org.eclipse.linuxtools.rpm.ui.editor.buildSection" enabled="true">make %{?_smp_mflags}</template>
+
+<!-- INSTALL SECTION TEMPLATES -->
+<template id="changelog" name="%changelog" description="%changelog template" context="org.eclipse.linuxtools.rpm.ui.editor.installSection" enabled="true">%changelog</template>
+<template id="defattr" name="%defattr" description="%defattr template" context="org.eclipse.linuxtools.rpm.ui.editor.installSection" enabled="true">%defattr(-, root, root, -)</template>
+<template id="doc" name="%doc" description="%doc template" context="org.eclipse.linuxtools.rpm.ui.editor.installSection" enabled="true">%doc ${COPYING} ${AUTHORS} ${INSTALL} ${README}</template>
+<template id="post" name="%post" description="%post section template" context="org.eclipse.linuxtools.rpm.ui.editor.installSection" enabled="true">%post</template>
+<template id="pre" name="%pre" description="%pre section template" context="org.eclipse.linuxtools.rpm.ui.editor.installSection" enabled="true">%pre</template>
+<template id="preun" name="%preun" description="%preun section template" context="org.eclipse.linuxtools.rpm.ui.editor.installSection" enabled="true">%preun</template>
+<template id="clean" name="%clean" description="%clean section template" context="org.eclipse.linuxtools.rpm.ui.editor.installSection" enabled="true">%clean
+rm -rf %{buildroot}
+</template>
+<template id="files" name="%files" description="%files section template" context="org.eclipse.linuxtools.rpm.ui.editor.installSection" enabled="true">%files
+%defattr(-, root, root, -)
+</template>
+<template id="filesDevel" name="%files devel" description="%files devel section template" context="org.eclipse.linuxtools.rpm.ui.editor.installSection" enabled="true">%files devel
+%defattr(-, root, root, -)
+</template>
+<template id="rm" name="rm" description="remove command template" context="org.eclipse.linuxtools.rpm.ui.editor.installSection" enabled="true">rm</template>
+<template id="rmBuildRoot" name="rm" description="rm -rf ${buildroot} template" context="org.eclipse.linuxtools.rpm.ui.editor.installSection" enabled="true">rm -rf %{buildroot}</template>
+<template id="makeInstall" name="make DESTDIR=" description="make DESTDIR" context="org.eclipse.linuxtools.rpm.ui.editor.installSection" enabled="true">make DESTDIR=%{buildroot} install || exit 1</template>
+<template id="desktopFileInstall" name="desktop-file-install" description="desktop-file-install template" context="org.eclipse.linuxtools.rpm.ui.editor.installSection" enabled="true">desktop-file-install --vendor ${vendor} \
+ --dir %{buildroot}%{_datadir}/applications \
+ --add-category ${app_category} \
+ %{buildroot}%{_datadir}/applications/${desktopfile_name}.desktop
+</template>
+<template id="updateDesktopDB" name="update-desktop-database" description="desktop-file-install template" context="org.eclipse.linuxtools.rpm.ui.editor.installSection" enabled="true">update-desktop-database -q %{_datadir}/applications</template>
+
+<!-- CHANGELOG SECTION TEMPLATES -->
+<template id="fix" name="fix" description="fix changelog message template" context="org.eclipse.linuxtools.rpm.ui.editor.changelogSection" enabled="true">fix: ${fix_msg} (#${bz_id})</template>
+<template id="bump" name="bump" description="bump changelog message template" context="org.eclipse.linuxtools.rpm.ui.editor.changelogSection" enabled="true">bump to ${versions} version.</template>
+
+</templates>
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/.classpath b/rpm/org.eclipse.linuxtools.rpm.ui/.classpath
new file mode 100644
index 0000000000..ce73933404
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/.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.4"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/.cvsignore b/rpm/org.eclipse.linuxtools.rpm.ui/.cvsignore
new file mode 100644
index 0000000000..ba077a4031
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/.cvsignore
@@ -0,0 +1 @@
+bin
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/.project b/rpm/org.eclipse.linuxtools.rpm.ui/.project
new file mode 100644
index 0000000000..37dc27eae3
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/.project
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.rpm.ui</name>
+ <comment></comment>
+ <projects>
+ <project>com.redhat.eclipse.rpm.core</project>
+ </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/.settings/org.eclipse.core.resources.prefs b/rpm/org.eclipse.linuxtools.rpm.ui/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000000..678ba62569
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Jan 29 17:24:34 EST 2007
+eclipse.preferences.version=1
+encoding//src/org/eclipse/linuxtools/rpm/ui/propertypage/messages.properties=8859_1
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/.template b/rpm/org.eclipse.linuxtools.rpm.ui/.template
new file mode 100644
index 0000000000..d65e0f4481
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/.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.ui/ChangeLog b/rpm/org.eclipse.linuxtools.rpm.ui/ChangeLog
new file mode 100644
index 0000000000..35347be9f1
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/ChangeLog
@@ -0,0 +1,403 @@
+2008-11-01 Alexander Kurtakov <akurtakov@gmail.com>
+
+ * META-INF/MANIFEST.MF: Replace deprecated Eclipse-LazyStart usage.
+ * build.properties: Add META-INF to bin.includes.
+
+2007-05-04 Andrew Overholt <overholt@redhat.com>
+
+ Bug #185598
+ * META-INF/MANIFEST.MF: Add "Incubation" to Bundle-Name.
+
+2007-01-29 Remy Suen <remy.suen@gmail.com>
+
+ Bug #181249
+ * META-INF/MANIFEST.MF: Initial import.
+ * .classpath: Set a J2SE-1.4 JRE.
+ * plugin.xml: Migrate dependency information to 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-24 Jeremy Handcock <handcock@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/ui/rpm_strings.properties: New strings.
+ * src/org/eclipse/cdt/rpm/ui/RPMExportPage.java
+ VALID_CHARS: New field contains list of valid version-release
+ characters.
+ specFileCombo: Change type to Text and rename to specFileField.
+ (getSelectedSpecFile): Reflect type change.
+ (setSpecFileComboData): Rename to setSpecFileField.
+ (setSpecFileField): Reflect type change.
+ (createProjectBox): Don't call setPageComplete.
+ (createSpecFileFields): Reflect type change. Use a
+ ResourceSelectionDialog to limit selections to workspace spec files.
+ (canFinish): Reflect type change. Change ordering to verify fields
+ in order of appearance.
+ (canGoNext): Enforce canFinish() == true before wizard can advance to
+ next page.
+ (handleEvent): Call canFinish().
+ * src/org/eclipse/cdt/rpm/ui/RPMExportPatchPage.java
+ valid_char_list: '.' is valid.
+ (canFinish): Change ordering to verify fields in order of appearance.
+
+2005-05-19 Jeremy Handcock <handcock@redhat.com>
+
+ Eclipse.org Bugzilla #82196:
+ * plugin.xml (extension): Add property page extensions.
+ * .settings/org.eclipse.core.resources.prefs: New.
+
+ * src/org/eclipse/cdt/rpm/ui/propertypage/ChangelogPage.java: Move from
+ rpm.propertypage. Externalize strings.
+ (addFirstSection): Remove method.
+ (addSeparator): Same.
+ (addSecondSection): Rename to addChangelogField.
+ (addChangelogField): Use rpm.core.utils.RPMQuery.
+ (createContents): Remove calls to removed methods; reflect method rename
+ changes.
+ * src/org/eclipse/cdt/rpm/ui/propertypage/InstallScriptsPage.java: Move
+ from rpm.propertypage. Externalize strings.
+ (addFirstSection): Remove method.
+ (addSeparator): Same.
+ (addSecondSection): Rename to addScriptFields.
+ (addScriptFields): Use rpm.core.utils.RPMQuery.
+ (createContents): Remove calls to removed methods; reflect method rename
+ changes.
+ * src/org/eclipse/cdt/rpm/ui/propertypage/Messages.java: New.
+ * src/org/eclipse/cdt/rpm/ui/propertypage/messages.properties: New.
+ * src/org/eclipse/cdt/rpm/ui/propertypage/ProvidesPage.java: Move from
+ rpm.propertypage. Externalize strings.
+ (addFirstSection): Remove method.
+ (addSeparator): Same.
+ (addSecondSection): Rename to addProvidesField.
+ (addProvidesField): Use rpm.core.utils.RPMQuery.
+ (createContents): Remove calls to removed methods; reflect method rename
+ changes.
+ * src/org/eclipse/cdt/rpm/ui/propertypage/SpecFileHeaderPage.java: Move
+ from rpm.propertypage. Externalize strings.
+ (addFirstSection): Remove method.
+ (addSeparator): Same.
+ (addSecondSection): Rename to addInfoFields.
+ (addInfoFields): Use rpm.core.utils.RPMQuery.
+ (createContents): Remove calls to removed methods; reflect method rename
+ changes.
+ * src/org/eclipse/cdt/rpm/ui/propertypage/TargetPage.java: Move from
+ rpm.propertypage. Externalize strings.
+ (addFirstSection): Remove method.
+ (addSeparator): Same.
+ (addSecondSection): Rename to addTargetFields.
+ (addTargetFields): Convert Text widgets to Label widgets. Use
+ rpm.core.utils.RPMQuery.
+
+2005-05-18 Jeremy Handcock <handcock@redhat.com>
+
+ Eclipse.org Bugzilla #82195:
+
+ * build.properties (bin.includes): Correct.
+ (src.includes): Ditto.
+ * plugin.xml (plugin): Set plugin class.
+ (extension): Tweak wording.
+
+ * src/org/eclipse/cdt/rpm/ui/IRPMUIConstants.java: New.
+ * src/org/eclipse/cdt/rpm/ui/rpm_strings.properties: Add new strings.
+ * src/org/eclipse/cdt/rpm/ui/RPMExportOperation.java
+ (RPMExportOperation): Simplify.
+ (run): Update to use new core model.
+ * src/org/eclipse/cdt/rpm/ui/RPMExportPage_2.java: Rename to ...
+ * src/org/eclipse/cdt/rpm/ui/RPMExportPatchPage.java: ... this.
+ * src/org/eclipse/cdt/rpm/ui/RPMExportPage.java: Simplify.
+ Update to use new core model.
+ * src/org/eclipse/cdt/rpm/ui/RPMExportWizard.java
+ (performFinish): Update to use new core model.
+ (addPages): Use renamed RPMExportPatchPage.
+ * src/org/eclipse/cdt/rpm/ui/RPMUIPlugin.java: New.
+ Where was this before???
+ * src/org/eclipse/cdt/rpm/ui/SRPMImportOperation.java
+ (SRPMImportOperation): Simplify.
+ (run): Update to use new core model.
+ * src/org/eclipse/cdt/rpm/ui/SRPMImportPage.java: Simplify.
+ Update to use new core model.
+ * src/org/eclipse/cdt/rpm/ui/SRPMImportwizard.java: Rename to ...
+ * src/org/eclipse/cdt/rpm/ui/SRPMImportWizard.java: ... this.
+
+ * src/org/eclipse/cdt/rpm/ui/logviewer/LogReader.java
+ (getLogFile): Get log file from plug-in core class.
+
+ * src/org/eclipse/cdt/rpm/ui/preferences/RPMPluginPreferencesPage.java
+ (doGetPreferenceStore): Remove.
+ (init): Remove call to initializeDefaultPreferences.
+ (initializeDefaults): Use constants.
+ (storeValues): Ditto.
+ (createContents): Remove fields not used by new core model.
+
+ * src/org/eclipse/cdt/rpm/ui/util/ExceptionHandler.java: New.
+
+2005-01-18 Aaron Luchko <aluchko@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/ui/preferences/RPMPluginPreferencesPage.java
+ (initializeDefaultPreferences): Changed path to diff from "diff" to
+ "/usr/bin/diff" -- bz#83150
+
+2005-01-18 Aaron Luchko <aluchko@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/ui/SRPMImportPage.java (): bz# 83135
+ Can import into a new project using New Project Wizard
+ * src/org/eclipse/cdt/rpm/ui/rpm_strings.properties: bz# 83135
+ Can import into a new project using New Project Wizard
+
+2005-01-17 Aaron Luchko <aluchko@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/ui/RPMExportPage.java (): bz# 83031
+ * src/org/eclipse/cdt/rpm/ui/SRPMImportOperation.java (): ditto
+ * src/org/eclipse/cdt/rpm/ui/SRPMImportPage.java (): ditto
+ * src/org/eclipse/cdt/rpm/ui/SRPMImportWizard.java (): ditto
+ * src/org/eclipse/cdt/rpm/ui/rpm_strings.properties: ditto
+
+2005-01-15 Aaron Luchko <aluchko@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/ui/SRPMImportPage.java:
+ Add previously opened srpms to the combo box when opening srpms
+
+2004-12-15 Rick Moseley <rmoseley@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/ui/RPMExportPage.java (returnProjectPath):
+ bz #81145 - fixed unhandled exception when exporting a source/binary RPM
+
+2004-12-09 Rick Moseley <rmoseley@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/ui/rpm_strings.properties: bz# 78773/78788
+ * src/org/eclipse/cdt/rpm/ui/RPMExportPage_2.java (modifyText): bz#
+ 78773/78788
+
+2004-11-11 Rick Moseley <rmoseley@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/ui/SRPMImportPage.java (createProjectBox): add
+ addSelectionListener for when a project to import into is not selected
+
+2004-11-11 Rick Moseley <rmoseley@redhat.com>
+ * plugin.xml: remove "test" from labels
+
+2004-11-11 Rick Moseley <rmoseley@redhat.com>
+ * plugin.xml: change version to 1.2
+
+2004-11-05 Aaron Luchko <aluchko@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/ui/RPMExportPage.java (): show only C/C++ projects to
+ be exported
+ * src/org/eclipse/cdt/rpm/ui/RPMExportWizard.java (): ditto
+ * src/org/eclipse/cdt/rpm/ui/RPMImportPage.java (): ditto
+ * src/org/eclipse/cdt/rpm/ui/SRPMImportPage.java (): ditto
+
+2004-11-04 Jeffery Pound <jpound@redhat.com>
+
+ * src/org/eclipse/cdt/rpm/ui/SRPMImportOperation.java (): put commands into
+ a properties bundle`
+ * src/org/eclipse/cdt/rpm/ui/preferences/RPMPluginPreferencesPage.java (): add
+ shell commands to be user configurable
+
+2004-08-31 Rick Moseley <rmoseley@redhat.com>
+
+ * build.xml: rebuilt after merge/refactoring
+
+2004-08-19 Phil Muldoon <pmuldoon@redhat.com>
+
+ * src/com/redhat/eclipse/rpm/ui/SRPMImportPage.java (createProjectBox):
+ Added a C Nature check for project list.
+ * src/com/redhat/eclipse/rpm/ui/RPMExportPage.java (createProjectBox):
+ Added a C Nature check.
+ (createProjectBox): Removed debug statement
+ * plugin.xml: Added import cdt
+
+2004-08-10 Rick Moseley <rmoseley@redhat.com>
+
+ * src/com/redhat/eclipse/rpm/ui/RPMExportPage_2.java (modifyText):
+ add back in hot verifiction of patch tag names; correct when "Finish"
+ button is enabled
+ (canFinish): correct when "Finish" button is enabled
+ * src/com/redhat/eclipse/rpm/ui/rpm_strings.properties: externalize new
+ message for above change
+
+2004-08-04 Jeremy Handcock <handcock@redhat.com>
+
+ * .cvsignore: New file.
+ * src/com/redhat/eclipse/rpm/ui/RPMExportPage_2.java: Rename core
+ plugin import.
+ * src/com/redhat/eclipse/rpm/ui/logviewer/LogReader.java: Same.
+ * src/com/redhat/eclipse/rpm/ui/preferences/RPMPluginPreferencesPage.java:
+ New file; moved from com.redhat.eclipse.rpm.core.
+ * plugin.xml: Add preference page extension.
+
+2004-08-04 rmoseley <rmoseley@dhcp-232.hsv.redhat.com>
+
+ * plugin.xml : do not start RPM log viewer automatically
+ fixes bz #129071
+
+2004-07-27 Rick Moseley <rmoseley@redhat.com>
+
+ * src/com/redhat/eclipse/rpm/ui/rpm_strings.properties : add strings
+ * src/com/redhat/eclipse/rpm/ui/RPMExportOperation.java (run):
+ internationalize strings
+ * src/com/redhat/eclipse/rpm/ui/SRPMImportOperation.java : same as below
+ * src/com/redhat/eclipse/rpm/ui/RPMExportPage_2.java (RPMExportPage_2):
+ correct message/internationalize strings
+ (canFinish): correct message/internationalize strings
+
+2004-07-22 Rick Moseley <rmoseley@redhat.com>
+
+ * src/com/redhat/eclipse/rpm/ui/RPMExportOperation.java (run): conditionalize
+ the last change based on whether or not source/binary rpm is produced
+ * src/com/redhat/eclipse/rpm/ui/RPMExportOperation.java (run): propagate
+ the patch tag and changlog entry when only binary RPM is created
+ (bugzilla #128343)
+ * src/com/redhat/eclipse/rpm/ui/RPMExportPage_2.java (modifyText): add
+ listener for patch tag field for hot verify
+ * src/com/redhat/eclipse/rpm/ui/RPMExportPage_2.java : remove hot verify
+ for patch tag field
+ (populatePatchInfo): add "- " to the changelog text field
+ (getPatchNames): new parser to get patch tags from spec file
+ (canFinish): add loop to check for duplucate patch tags
+
+2004-07-16 Rick Moseley <rmoseley@redhat.com>
+
+ * build.properties : add /icons
+
+2004-07-14 Rick Moseley <rmoseley@redhat.com>
+
+ * build.xml : Eclipse 3.0 changes
+ * src/com/redhat/eclipse/rpm/ui/logviewer/RPMLogViewer.java : renamed from
+ RpmLogViewer
+ * plugin.xml : rename RpmLogViewer -> RPMLogViewer
+ remove bogus dependencies
+ Eclipse 3.0 changes
+ * src/com/redhat/eclipse/rpm/ui/RPMExportPage.java: add platform-independent file
+ separator
+ * src/com/redhat/eclipse/rpm/ui/RPMExportPage.java (setSpecFileComboData): add call
+ to setVersionReleaseFields when spec field is changed
+ * src/com/redhat/eclipse/rpm/ui/SRPMImportOperation.java : check if passed a null
+ error message
+ * src/com/redhat/eclipse/rpm/ui/logviewer/LogReader.java : rename RpmCorePlugin ->
+ RPMCorePlugin
+
+2004-06-18 Rick Moseley <rmoseley@redhat.com>
+
+ * src/com/redhat/eclipse/rpm/ui/RPMExportPage.java (getSpecFilePath): new method
+ to save the spec file path for the next page
+ (canFinish): add saving of path_to_specfile static variable
+ (): add file_sep/line_sep variables for portability
+
+2004-05-27 Rick Moseley <rmoseley@redhat.com>
+
+ * src/com/redhat/eclipse/rpm/ui/SRPMImportOperation.java (): rename
+ RpmCore -> RPMCore
+ * src/com/redhat/eclipse/rpm/ui/RPMExportPage.java (compareCheckSum): rename
+ RpmCore -> RPMCore
+
+2004-05-26 Rick Moseley <rmoseley@redhat.com>
+
+ * src/com/redhat/eclipse/rpm/ui/logviewer/LogReader.java (getLogFile): changes for
+ prefs store
+ * src/com/redhat/eclipse/rpm/ui/RPMExportPage_2.java (populatePatchInfo): get name
+ and e-mail address from prefs store
+ * src/com/redhat/eclipse/rpm/ui/SRPMImportOperation.java (run): changes for prefs
+ store addition
+ * src/com/redhat/eclipse/rpm/ui/RPMExportOperation.java (run): changes for prefs
+ store addition
+
+2004-05-05 Rick Moseley <rmoseley@redhat.com>
+
+ * src/com/redhat/eclipse/rpm/ui/logviewer/RpmLogViewer.java (): new class to
+ display RPM plugin log files
+ * src/com/redhat/eclipse/rpm/ui/logviewer/LogReader.java (): new class to
+ display RPM plugin log files
+ * plugin.xml : add RPM log viewer stuff
+
+2004-04-05 Rick Moseley <rmoseley@redhat.com>
+
+ * src/com/redhat/eclipse/rpm/ui/RPMExportPage_2.java (getHostName): add functionality
+ to remove superfluous part of the host/domain name for the changelog e-mail address
+ * (populatePatchInfo): add login to get the host name to put into the e-mail address
+ in the changelog entry
+
+2004-04-02 Rick Moseley <rmoseley@redhat.com>
+
+ * src/com/redhat/eclipse/rpm/ui/RPMExportPage.java (compareCheckSum): add
+ call to firstSRPM() to check for existence of .srpminfo
+
+2004-03-31 Phil Muldoon <pmuldoon@redhat.com>
+
+ * src/com/redhat/eclipse/rpm/ui/RPMExportOperation.java (getStatus): check to see what kind
+ of object (Status or Throwable) is passed back from RpmCore
+ * src/com/redhat/eclipse/rpm/ui/SRPMImportOperation.java (getStatus): same
+
+2004-03-26 Phil Muldoon <pmuldoon@redhat.com>
+
+ * SRPMImportOperation.java (getStatus): Change ISTATUS
+ to STATUS
+ * RPMExportOperation.java (getStatus): Ditto
+
+
+2004-02-13 Phil Muldoon <pmuldoon@redhat.com>
+
+ * RPMExportPage.java (createSpecFileField):: added Version/Release
+ trigger on browse spec file
+ * RPMExportOperation.java (refreshWorkspace): Created
+ (run): Added refreshWorkspace on each try block
+
+
+2004-02-12 Phil Muldoon <pmuldoon@redhat.com>
+
+ * RPMExportPage_2.java (keyPressed): Refactored/rewritten
+ * SRPMImportPage.java (finish): Fixed ImportOperation calling pattern
+ (validateFinish): Added JavaDoc
+ (canFinish): Added JavaDoc
+ (createProjectBox): rewrote
+ * SRPMImportOperation.java (getStatus): Added more robust getStatus
+ from RPMExportOperation
+ * RPMExportPage.java (finish): Fixed ExportOperation calling pattern
+ (hasMakefile): rewritten/refactored
+ (returnSpecFiles): Rewritten and refactored
+ * RPMExportOperation.java (rpmDeleteLogFile): Deleted.
+ Removed log file and preserve parameters
+
+
+2004-02-12 Phil Muldoon <pmuldoon@redhat.com>
+
+ * readme : Updated. Added author and maintenance boundary
+ for each plug-in
+ * SRPMImportOperation.java (run): Modified flow for
+ RPM Core refactor
+ * rpm_strings.properties : Added SRPM/RPM Export Messages
+ Removed Old ones.
+ * RPMExportOperation.java (run): Modified flow for
+ RPM Core refactor
+
+2004-02-12 Phil Muldoon <pmuldoon@redhat.com>
+
+ * plugin.xml : Fixed typos
+ * rpm_strings.properties : Refactored strings to match new
+ class names
+
+2004-02-11 Phil Muldoon <pmuldoon@redhat.com>
+
+ * build.xml: Added com.redhat.eclipse.rpm.core/RpmCore.jar to classpath
+
+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>
+
+ * RPMExportOperation.java (run): Comment out some old run monitor code, correct bug of calling
+ rpmexport.run() twice, change one of them to srpmexport.run()
+
+2004-02-11 Phil Muldoon <pmuldoon@redhat.com>
+
+ * Initial Import:
+
+
+
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/META-INF/MANIFEST.MF b/rpm/org.eclipse.linuxtools.rpm.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..4c8c76a37d
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,25 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: RPM UI Plug-in (Incubation)
+Bundle-SymbolicName: org.eclipse.linuxtools.rpm.ui;singleton:=true
+Bundle-Version: 3.0.0
+Bundle-Activator: org.eclipse.linuxtools.rpm.ui.RPMUIPlugin
+Bundle-Vendor: Eclipse.org
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-Classpath: RpmUi.jar
+Require-Bundle: org.eclipse.ui.ide,
+ org.eclipse.jface.text,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.ui,
+ org.eclipse.swt,
+ org.eclipse.jface,
+ org.eclipse.text,
+ org.eclipse.linuxtools.rpm.core
+Export-Package:
+ org.eclipse.linuxtools.rpm.ui,
+ org.eclipse.linuxtools.rpm.ui.logviewer,
+ org.eclipse.linuxtools.rpm.ui.preferences,
+ org.eclipse.linuxtools.rpm.ui.propertypage,
+ org.eclipse.linuxtools.rpm.ui.util
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/about.html b/rpm/org.eclipse.linuxtools.rpm.ui/about.html
new file mode 100644
index 0000000000..44e229003e
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/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.ui/build.properties b/rpm/org.eclipse.linuxtools.rpm.ui/build.properties
new file mode 100644
index 0000000000..387372d4db
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/build.properties
@@ -0,0 +1,24 @@
+###############################################################################
+# (c) 2004 Red Hat, Inc.
+#
+# This program is open source software licensed under the
+# Eclipse Public License ver. 1
+#
+###############################################################################
+
+source.RpmUi.jar = src/
+bin.includes = plugin.xml,\
+ *.jar,\
+ RpmUi.jar,\
+ icons/,\
+ about.html,\
+ META-INF/
+src.includes = .classpath,\
+ .project,\
+ .template,\
+ ChangeLog,\
+ about.html,\
+ build.properties,\
+ icons/,\
+ plugin.xml,\
+ src/
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/icons/rpm.gif b/rpm/org.eclipse.linuxtools.rpm.ui/icons/rpm.gif
new file mode 100644
index 0000000000..8e820890be
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/icons/rpm.gif
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/plugin.xml b/rpm/org.eclipse.linuxtools.rpm.ui/plugin.xml
new file mode 100644
index 0000000000..928bf5ac33
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/plugin.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.exportWizards">
+ <wizard
+ name="Source/Binary RPM"
+ icon="icons/rpm.gif"
+ class="org.eclipse.linuxtools.rpm.ui.RPMExportWizard"
+ id="org.eclipse.cdt.rpm.ui.RPMExportWizard">
+ <description>
+ Export an RPM
+ </description>
+ <selection
+ class="org.eclipse.core.resources.IResource">
+ </selection>
+ </wizard>
+ </extension>
+ <extension
+ point="org.eclipse.ui.importWizards">
+ <wizard
+ name="Source RPM"
+ icon="icons/rpm.gif"
+ class="org.eclipse.linuxtools.rpm.ui.SRPMImportWizard"
+ id="org.eclipse.cdt.rpm.ui.SRPMImportWizard">
+ <description>
+ Imports a Source RPM to a project
+ </description>
+ <selection
+ class="org.eclipse.core.resources.IResource">
+ </selection>
+ </wizard>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views">
+ <category
+ name="RPM Log File"
+ id="org.eclipse.cdt.rpm.ui.logviewer">
+ </category>
+ <view
+ name="RPM Log Viewer"
+ icon="icons/rpm.gif"
+ class="org.eclipse.linuxtools.rpm.ui.logviewer.RPMLogViewer"
+ id="org.eclipse.cdt.rpm.ui.logviewer.RPMLogViewer"
+ category="org.eclipse.cdt.rpm.ui.logviewer">
+ </view>
+ </extension>
+
+ <extension
+ point = "org.eclipse.ui.preferencePages">
+ <page id="org.eclipse.cdt.rpm.ui.preferences.Page1"
+ class="org.eclipse.linuxtools.rpm.ui.preferences.RPMPluginPreferencesPage"
+ name="RPM">
+ </page>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ class="org.eclipse.linuxtools.rpm.ui.propertypage.SpecFileHeaderPage"
+ id="rg.eclipse.cdt.rpm.ui.propertypage.SpecFileHeaderPage"
+ name="Spec File Header"
+ nameFilter="*.rpm"
+ objectClass="org.eclipse.core.resources.IFile">
+ </page>
+ <page
+ class="org.eclipse.linuxtools.rpm.ui.propertypage.ChangelogPage"
+ id="org.eclipse.cdt.rpm.ui.propertypage.ChangelogPage"
+ name="Changelog Entries"
+ nameFilter="*.rpm"
+ objectClass="org.eclipse.core.resources.IFile">
+ </page>
+ <page
+ class="org.eclipse.linuxtools.rpm.ui.propertypage.TargetPage"
+ id="org.eclipse.cdt.rpm.ui.propertypage.TargetPage"
+ name="Target"
+ nameFilter="*.rpm"
+ objectClass="org.eclipse.core.resources.IFile">
+ </page>
+ <page
+ class="org.eclipse.linuxtools.rpm.ui.propertypage.InstallScriptsPage"
+ id="org.eclipse.cdt.rpm.ui.propertypage.InstallScriptsPage"
+ name="Install/Uninstall Scripts"
+ nameFilter="*.rpm"
+ objectClass="org.eclipse.core.resources.IFile">
+ </page>
+ <page
+ class="org.eclipse.linuxtools.rpm.ui.propertypage.ProvidesPage"
+ id="org.eclipse.cdt.rpm.ui.propertypage.ProvidesPage"
+ name="Files Package Provides"
+ nameFilter="*.rpm"
+ objectClass="org.eclipse.core.resources.IFile">
+ </page>
+ </extension>
+</plugin>
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/IRPMUIConstants.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/IRPMUIConstants.java
new file mode 100644
index 0000000000..c3f63360bc
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/IRPMUIConstants.java
@@ -0,0 +1,22 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+package org.eclipse.linuxtools.rpm.ui;
+
+public interface IRPMUIConstants {
+
+ public static final String FILE_SEP = System.getProperty("file.separator"); //$NON-NLS-1$
+
+ public static final String LINE_SEP = System.getProperty("line.separator"); //$NON-NLS-1$
+
+ public static final int BUILD_ALL = 1;
+
+ public static final int BUILD_BINARY = 2;
+
+ public static final int BUILD_SOURCE = 3;
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/Messages.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/Messages.java
new file mode 100644
index 0000000000..458743dfb7
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/Messages.java
@@ -0,0 +1,29 @@
+/*
+ * (c) 2004 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+package org.eclipse.linuxtools.rpm.ui;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.rpm.ui.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.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportOperation.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportOperation.java
new file mode 100644
index 0000000000..db833ecdf7
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportOperation.java
@@ -0,0 +1,122 @@
+/*
+ * (c) 2004, 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+*/
+
+package org.eclipse.linuxtools.rpm.ui;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.linuxtools.rpm.core.IRPMProject;
+import org.eclipse.linuxtools.rpm.core.RPMExportDelta;
+
+import org.eclipse.ui.PlatformUI;
+
+import java.lang.reflect.InvocationTargetException;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+public class RPMExportOperation implements IRunnableWithProgress {
+ private IProgressMonitor monitor;
+ private ArrayList rpm_errorTable;
+ private IRPMProject rpmProject;
+ private RPMExportDelta exportDelta;
+ private int exportType;
+
+ public RPMExportOperation(IRPMProject rpmProject, int exportType,
+ RPMExportDelta exportDelta) {
+ this.rpmProject = rpmProject;
+ this.exportDelta = exportDelta;
+ this.exportType = exportType;
+ }
+
+ /**
+ * @see org.eclipse.jface.operation.IRunnableWithProgress#run(IProgressMonitor)
+ *
+ */
+ public void run(IProgressMonitor progressMonitor)
+ throws InvocationTargetException {
+ int totalWork = 2;
+
+ monitor = progressMonitor;
+
+ // We keep a all our reported errors in an ArrayList.
+ rpm_errorTable = new ArrayList();
+
+ // Start progress
+ monitor.beginTask(Messages.getString("RPMExportOperation.Starting"), //$NON-NLS-1$
+ totalWork);
+ monitor.worked(1);
+
+ switch(exportType) {
+ case IRPMUIConstants.BUILD_ALL:
+ try {
+ monitor.setTaskName(Messages.getString("RPMExportOperation.Executing_RPM_Export"));
+ rpmProject.buildAll(exportDelta);
+ } catch(Exception e) {
+ rpm_errorTable.add(e);
+ }
+ break;
+
+ case IRPMUIConstants.BUILD_BINARY:
+ monitor.setTaskName(Messages.getString("RPMExportOperation.Executing_RPM_Export")); //$NON-NLS-1$
+ try {
+ rpmProject.buildBinaryRPM(exportDelta);
+ } catch(Exception e) {
+ rpm_errorTable.add(e);
+ }
+ break;
+
+ case IRPMUIConstants.BUILD_SOURCE:
+ monitor.setTaskName(Messages.getString("RPMExportOperation.Executing_SRPM_Export")); //$NON-NLS-1$
+ try {
+ rpmProject.buildSourceRPM(exportDelta);
+ } catch(Exception e) {
+ rpm_errorTable.add(e);
+ }
+ break;
+ }
+ monitor.worked(1);
+ }
+
+ public MultiStatus getStatus() {
+ IStatus[] errors = new IStatus[rpm_errorTable.size()];
+ Iterator count = rpm_errorTable.iterator();
+ int iCount = 0;
+ String error_message=Messages.getString("RPMExportOperation.0"); //$NON-NLS-1$
+ while (count.hasNext()) {
+
+ Object anonErrorObject = count.next();
+ if (anonErrorObject instanceof Throwable) {
+ Throwable errorObject = (Throwable) anonErrorObject;
+ error_message=errorObject.getMessage();
+
+ }
+ else
+ if (anonErrorObject instanceof Status)
+ {
+ Status errorObject = (Status) anonErrorObject;
+ error_message=errorObject.getMessage();
+ }
+ IStatus error =
+ new Status(
+ Status.ERROR,
+ "RPM Plugin",Status.OK, //$NON-NLS-1$
+ error_message,
+ null);
+ errors[iCount] = error;
+ iCount++;
+ }
+
+ return new MultiStatus(PlatformUI.PLUGIN_ID, IStatus.OK, errors, Messages.getString("RPMExportOperation.Open_SRPM_Errors"), //$NON-NLS-1$
+ null);
+ }
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportPage.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportPage.java
new file mode 100644
index 0000000000..2adf31e445
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportPage.java
@@ -0,0 +1,640 @@
+/*
+ ** (c) 2004, 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+*/
+
+/**
+ * @author pmuldoon
+ * @version 1.0
+ *
+ * S/RPM export Defines the page that is shown to the user when they choose
+ * to export to an S/RPM. Defines the UI elements shown, and the basic validation
+ *
+ */
+package org.eclipse.linuxtools.rpm.ui;
+
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IFile;
+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.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.linuxtools.rpm.core.IRPMProject;
+import org.eclipse.linuxtools.rpm.core.RPMProjectFactory;
+import org.eclipse.linuxtools.rpm.core.RPMProjectNature;
+import org.eclipse.linuxtools.rpm.ui.util.ExceptionHandler;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.ResourceSelectionDialog;
+
+
+/**
+ *
+ * RPMExportPage. Called by RPMExportWizard. Class can not be subclassed
+ *extends WizardPage for the RPM export wizard, implements Listener
+ *
+ */
+public class RPMExportPage extends WizardPage implements Listener {
+ private static final String VALID_CHARS = "0123456789."; //$NON-NLS-1$
+
+ // Checkbox Buttons
+ private Button generatePatch;
+ private Button exportBinary;
+ private Button exportSource;
+
+ // Version and release fields
+ private Text rpmVersion;
+ private Text rpmRelease;
+
+ // The current selection
+ private IStructuredSelection selection;
+
+ //Composite Project Listbox control
+ private List projectList;
+
+ //Spec file field
+ private Text specFileField;
+
+ //Patch grid
+ private Group patchNeedHintGrid;
+
+ //The currently selected RPM project
+ private IRPMProject rpmProject;
+
+ //Is a patch needed?
+ private boolean patchNeeded = false;
+
+ public RPMExportPage(IStructuredSelection currentSelection) {
+ super(Messages.getString("RPMExportPage.Export_SRPM"), //$NON-NLS-1$
+ Messages.getString("RPMExportPage.Export_SRPM_from_project"), null); //$NON-NLS-1$ //$NON-NLS-2$
+ setDescription(Messages.getString("RPMExportPage.Select_project_export")); //$NON-NLS-1$
+ setPageComplete(true);
+ selection = currentSelection;
+ }
+
+ public IRPMProject getSelectedRPMProject() {
+ return rpmProject;
+ }
+
+ public IFile getSelectedSpecFile() {
+ Path newSpecFilePath =
+ new Path(specFileField.getText());
+ return rpmProject.getProject().getFile(newSpecFilePath);
+ }
+
+ public String getSelectedVersion() {
+ return rpmVersion.getText();
+ }
+
+ public String getSelectedRelease() {
+ return rpmRelease.getText();
+ }
+
+ public int getExportType() {
+ int exportType = 0;
+ if(exportBinary.getSelection() && exportSource.getSelection()) {
+ exportType = IRPMUIConstants.BUILD_ALL;
+ } else if(exportBinary.getSelection()) {
+ exportType = IRPMUIConstants.BUILD_BINARY;
+ } else if(exportSource.getSelection()) {
+ exportType = IRPMUIConstants.BUILD_SOURCE;
+ }
+ return exportType;
+ }
+
+ private String getSelectedProjectName() {
+ String projSelect = null;
+ String[] projDetails = projectList.getSelection();
+
+ if (projDetails.length > 0) {
+ projSelect = projDetails[0];
+ }
+ return projSelect;
+ }
+
+ private void setPatchNeeded(boolean patchDelta) {
+ patchNeeded = patchDelta;
+ }
+
+ private boolean isPatchNeeded() {
+ return patchNeeded;
+ }
+
+ /**
+ * @see org.eclipse.jface.dialogs.IDialogPage#createControl(Composite)
+ *
+ * Parent control. Creates the listbox, Destination box, and options box
+ *
+ */
+ public void createControl(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NULL);
+
+ // Create a layout for the wizard page
+ composite.setLayout(new GridLayout());
+ composite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
+ setControl(composite);
+
+ // Create contols on the page
+ createProjectBox(composite);
+ createSpecFileFields(composite);
+ createSpacer(composite);
+ createExportTypeControls(composite);
+ createPatchHint(composite);
+
+ // Fill in the fields
+ setSpecFileField();
+ setVersionReleaseFields();
+
+ // Check if the project has changed
+ // and therefore the project needs a patch
+ boolean projectChanged = false;
+ try {
+ if(rpmProject != null) {
+ projectChanged = rpmProject.isChanged();
+ }
+ } catch(CoreException e) {
+ ExceptionHandler.handle(e, getShell(), Messages.getString("ErrorDialog.title"),
+ e.getMessage());
+ }
+ if(projectChanged) {
+ patchNeedHintGrid.setVisible(true);
+ setPatchNeeded(true);
+ setPageComplete(true);
+ } else {
+ setPatchNeeded(false);
+ setPageComplete(false);
+ }
+ }
+
+ private void createExportTypeControls(Composite parent) {
+ //Create a group for the control and set up the layout.
+ Group group = new Group(parent, SWT.NONE);
+ group.setLayout(new GridLayout());
+ group.setText(Messages.getString("RPMExportPage.Composite_Export_Type")); //$NON-NLS-1$
+ group.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL |
+ GridData.HORIZONTAL_ALIGN_FILL));
+
+ // Create the export binary checkbox
+ exportBinary = new Button(group, SWT.CHECK);
+ exportBinary.setText(Messages.getString("RPMExportPage.Export_Binary")); //$NON-NLS-1$
+ exportBinary.setSelection(true);
+ exportBinary.setToolTipText(Messages.getString(
+ "RPMExportPage.toolTip_Export_Binary")); //$NON-NLS-1$
+
+ // Create the export source checkbox
+ exportSource = new Button(group, SWT.CHECK);
+ exportSource.setText(Messages.getString("RPMExportPage.Export_Source")); //$NON-NLS-1$
+ exportSource.setSelection(true);
+ exportSource.setToolTipText(Messages.getString(
+ "RPMExportPage.toolTip_Export_Source")); //$NON-NLS-1$
+
+ SelectionListener listener = new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ handleEvent(null);
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ handleEvent(null);
+ }
+ };
+ exportBinary.addSelectionListener(listener);
+ exportSource.addSelectionListener(listener);
+ }
+
+ /**
+ * Method createProjectBox.
+ * @param parent - parent widget
+ *
+ * Create a list box and populate it with
+ * the list of current projects in the workspace
+ */
+ private void createProjectBox(Composite parent) {
+ // Creates a control that enumerates all the projects in the current
+ // Workspace and places them in a listbox.
+ IProject[] internalProjectList;
+ String Proj_Enum;
+
+ //Get the current workspace root.
+ final IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace()
+ .getRoot();
+
+ //Create a group for the control and set up the layout. Even though it is a single control,
+ // we want to seperate it from the other widgets on the wizard dialog box
+ Group group = new Group(parent, SWT.NONE);
+ group.setLayout(new GridLayout());
+ group.setText(Messages.getString("RPMPage.Select_a_project")); //$NON-NLS-1$
+ group.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL |
+ GridData.HORIZONTAL_ALIGN_FILL));
+
+ // Creata a new SWT listbox. Only allow single selection of items
+ // Set up the layout data
+ projectList = new List(group, SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL);
+ projectList.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL |
+ GridData.HORIZONTAL_ALIGN_FILL));
+ projectList.setToolTipText(Messages.getString(
+ "SRPMImportPage.toolTip_project_destination")); //$NON-NLS-1$
+
+ // Set the height to 4 elements high
+ GridData projectLayout = new GridData(GridData.GRAB_HORIZONTAL |
+ GridData.HORIZONTAL_ALIGN_FILL);
+ projectLayout.heightHint = projectList.getItemHeight() * 4;
+ projectList.setLayoutData(projectLayout);
+
+ // From the current Workspace root, get a list of all current projects
+ // This should come back to us as an array of IProject.
+ internalProjectList = workspaceRoot.getProjects();
+
+ if (internalProjectList.length < 1) {
+ projectList.add(Messages.getString(
+ "RPMPage.No_RPM_projects_found")); //$NON-NLS-1$
+ return;
+ }
+
+ // Find the first selected project in the workspace
+ Iterator iter = selection.iterator();
+ Object selectedObject= null;
+ IProject selectedProject = null;
+ boolean isSelection = false;
+ if (iter.hasNext()) {
+ selectedObject = iter.next();
+ if (selectedObject instanceof IResource) {
+ selectedProject = ((IResource) selectedObject).getProject();
+ isSelection = true;
+ }
+ }
+
+ // Stuff the listbox with the text names of the projects
+ // Highlight the currently selected project in the workspace
+ int selectedProjectIndex = 0;
+ for (int a = 0; a < internalProjectList.length; a++) {
+ try {
+ if(internalProjectList[a].hasNature(RPMProjectNature.RPM_NATURE_ID)) {
+ projectList.add(internalProjectList[a].getName());
+ if (isSelection && internalProjectList[a].equals(selectedProject)) {
+ selectedProjectIndex = a;
+ }
+ }
+ } catch(CoreException e) {
+ ExceptionHandler.handle(e, getShell(),
+ Messages.getString("ErrorDialog.title"), e.getMessage());
+ }
+ }
+ projectList.setSelection(selectedProjectIndex);
+ try {
+ rpmProject = RPMProjectFactory.getRPMProject(internalProjectList[selectedProjectIndex]);
+ } catch(CoreException e) {
+ ExceptionHandler.handle(e, getShell(),
+ Messages.getString("ErrorDialog.title"), e.getMessage());
+ }
+
+ // Add a listener to the project box
+ projectList.addListener(SWT.Selection,
+ new Listener() {
+ public void handleEvent(Event event) {
+ // Reset the RPM project
+ int i = projectList.getSelectionIndex();
+ if(i != -1) {
+ IProject project = workspaceRoot.getProject(projectList.getSelection()[0]);
+ try {
+ rpmProject = RPMProjectFactory.getRPMProject(project);
+ if(rpmProject.isChanged()) {
+ setPatchNeeded(true);
+ patchNeedHintGrid.setVisible(true);
+ } else {
+ setPatchNeeded(false);
+ patchNeedHintGrid.setVisible(false);
+ }
+ } catch(CoreException e) {
+ ExceptionHandler.handle(e, getShell(),
+ Messages.getString("ErrorDialog.title"), e.getMessage());
+ }
+ } else {
+ rpmProject = null;
+ setPatchNeeded(false);
+ patchNeedHintGrid.setVisible(false);
+ }
+ setSpecFileField();
+ setVersionReleaseFields();
+ }
+ });
+ projectList.addListener(SWT.Modify, this);
+ }
+
+ /**
+ * Method setSpecFileComboData
+ *
+ * Populates the specFile Combo Box
+ *
+ */
+ private void setSpecFileField() {
+ if(rpmProject != null) {
+ String specFile =
+ rpmProject.getSpecFile().getFile().getProjectRelativePath().toOSString();
+ specFileField.setText(specFile);
+ }
+ }
+
+ /**
+ * Method createSpecFileField
+ * @param parent
+ *
+ * Creates the Spec file combo box
+ */
+ private void createSpecFileFields(Composite parent) {
+ Group specGrid = new Group(parent, SWT.NONE);
+ specGrid.setLayout(new GridLayout());
+ specGrid.setText(Messages.getString("RPMExportPage.SPEC_file")); //$NON-NLS-1$
+ specGrid.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL |
+ GridData.HORIZONTAL_ALIGN_FILL));
+
+ Composite composite = new Composite(specGrid, SWT.NONE);
+
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ composite.setLayout(layout);
+ composite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL |
+ GridData.GRAB_HORIZONTAL));
+
+ specFileField = new Text(composite, SWT.BORDER);
+ specFileField.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ handleEvent(null);
+ }
+ });
+ specFileField.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ handleEvent(null);
+ }
+ public void widgetSelected(SelectionEvent e) {
+ handleEvent(null);
+ }
+ });
+
+ GridData gridData = new GridData();
+ gridData.horizontalAlignment = GridData.FILL;
+ gridData.grabExcessHorizontalSpace = true;
+
+ specFileField.setLayoutData(gridData);
+ specFileField.setToolTipText(Messages.getString(
+ "RPMExportPage.toolTip_SpecFile")); //$NON-NLS-1$
+
+ Button rpmBrowseButton = new Button(composite, SWT.PUSH);
+ rpmBrowseButton.setToolTipText(Messages.getString(
+ "RPMExportPage.toolTip_file_navigator")); //$NON-NLS-1$
+ rpmBrowseButton.setText(Messages.getString("RPMPage.Browse")); //$NON-NLS-1$
+ rpmBrowseButton.addListener(SWT.Selection,
+ new Listener() {
+ public void handleEvent(Event event) {
+ ResourceSelectionDialog specFileDialog =
+ new ResourceSelectionDialog(getContainer().getShell(),
+ rpmProject.getConfiguration().getSpecsFolder(),
+ Messages.getString("RPMExportPage.Select_spec_file"));
+ specFileDialog.setBlockOnOpen(true);
+ int result = specFileDialog.open();
+ if(result == Window.OK) {
+ Object[] foo = specFileDialog.getResult();
+ if(foo[0] instanceof IFile) {
+ IFile newSpecFile = (IFile) foo[0];
+ specFileField.setText(newSpecFile.getProjectRelativePath().toOSString());
+ }
+ }
+ }
+ });
+
+
+ Composite versionReleaseComposite = new Composite(specGrid, SWT.NONE);
+ GridLayout versionReleaseLayout = new GridLayout();
+ versionReleaseLayout.numColumns = 5;
+ versionReleaseComposite.setLayout(versionReleaseLayout);
+ versionReleaseComposite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL |
+ GridData.GRAB_HORIZONTAL));
+
+ GridData lineGridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL |
+ GridData.GRAB_HORIZONTAL);
+ Label line = new Label(versionReleaseComposite, SWT.SEPARATOR | SWT.HORIZONTAL);
+ lineGridData.widthHint = 5;
+ line.setLayoutData(lineGridData);
+
+ GridData versionGridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL |
+ GridData.GRAB_HORIZONTAL);
+ new Label(versionReleaseComposite, SWT.NONE).setText(Messages.getString(
+ "RPMExportPage.Version")); //$NON-NLS-1$
+ rpmVersion = new Text(versionReleaseComposite, SWT.BORDER);
+ rpmVersion.setToolTipText(Messages.getString(
+ "RPMExportPage.toolTip_Version")); //$NON-NLS-1$
+ rpmVersion.setLayoutData(versionGridData);
+
+ GridData releaseGridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL |
+ GridData.GRAB_HORIZONTAL);
+
+ new Label(versionReleaseComposite, SWT.NONE).setText(Messages.getString(
+ "RPMExportPage.Release")); //$NON-NLS-1$
+ rpmRelease = new Text(versionReleaseComposite, SWT.BORDER);
+ rpmRelease.setToolTipText(Messages.getString(
+ "RPMExportPage.toolTip_Release")); //$NON-NLS-1$
+ rpmRelease.setLayoutData(releaseGridData);
+
+ // Set listeners
+ ModifyListener modListener = new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ handleEvent(null);
+ }
+ };
+ KeyListener keyListener = new KeyListener() {
+ public void keyPressed(KeyEvent e) {
+ }
+ public void keyReleased(KeyEvent e) {
+ handleEvent(null);
+ }
+ };
+ rpmVersion.addModifyListener(modListener);
+ rpmRelease.addModifyListener(modListener);
+ rpmVersion.addKeyListener(keyListener);
+ rpmRelease.addKeyListener(keyListener);
+ }
+
+ private void createPatchHint(Composite parent) {
+ Display display = null;
+ patchNeedHintGrid = new Group(parent, SWT.NONE);
+ patchNeedHintGrid.setVisible(false);
+ patchNeedHintGrid.setLayout(new GridLayout());
+ patchNeedHintGrid.setText(Messages.getString("RPMExportPage.groupPatchTitle")); //$NON-NLS-1$
+ patchNeedHintGrid.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL |
+ GridData.HORIZONTAL_ALIGN_FILL));
+
+ Composite patchHintComposite = new Composite(patchNeedHintGrid, SWT.NONE);
+
+ GridLayout patchHintLayout = new GridLayout();
+ patchHintLayout.numColumns = 2;
+ patchHintComposite.setLayout(patchHintLayout);
+ patchHintComposite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL |
+ GridData.GRAB_HORIZONTAL));
+ final Image patchHintImage = new Image(display,getClass().getResourceAsStream("redhat-system_tools.png"));
+
+ Canvas canvas = new Canvas(patchHintComposite,SWT.NO_REDRAW_RESIZE);
+ canvas.addPaintListener(new PaintListener() {
+ public void paintControl(PaintEvent e) {
+ e.gc.drawImage(patchHintImage,0,0);
+ }
+ });
+ new Label(patchHintComposite, SWT.NONE).setText(Messages.getString(
+ "RPMExportPage.needPatch_Project") + //$NON-NLS-1$
+ Messages.getString("RPMExportPage.needPatch_desc")); //$NON-NLS-1$
+ }
+
+
+ private void setVersionReleaseFields() {
+ if(rpmProject != null) {
+ String version = rpmProject.getSpecFile().getVersion();
+ String release = rpmProject.getSpecFile().getRelease();
+ rpmVersion.setText(version);
+ rpmRelease.setText(release);
+ }
+ }
+
+ /**
+ * Method createSpacer.
+ * @param parent - parent widget
+ *
+ * Create a generic filler control so that we can dump
+ * controls in a better layout
+ */
+ private void createSpacer(Composite parent) {
+ Label spacer = new Label(parent, SWT.NONE);
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ data.verticalAlignment = GridData.BEGINNING;
+ spacer.setLayoutData(data);
+ }
+
+ /**
+ * canFinish()
+ *
+ * Hot validation. Called to determine whether Finish
+ * button can be set to true
+ * @return boolean. true if finish can be activated
+ */
+ public boolean canFinish() {
+ // Make sure project has been selected
+ if (getSelectedProjectName() == null && rpmProject == null) {
+ setDescription(Messages.getString("RPMExportPage.Select_project")); //$NON-NLS-1$
+ return false;
+ }
+
+ // Make sure spec file is selected
+ if(specFileField.getText() == "") { //$NON-NLS-1$
+ setDescription(Messages.getString("RPMExportPage.Select_spec_file"));
+ return false;
+ }
+ // Make sure spec file exists and path is valid
+ else {
+ IPath path = rpmProject.getProject().getFullPath().addTrailingSeparator().append(specFileField.getText());
+ IFile newSpecFile = rpmProject.getProject().getParent().getFile(path);
+ IPath newSpecFilePath = newSpecFile.getFullPath();
+ IPath specFolderPath = rpmProject.getConfiguration().getSpecsFolder().getFullPath();
+ if(!specFolderPath.isPrefixOf(newSpecFilePath)) {
+ setErrorMessage(Messages.getString("RPMExportPage.Not_in_specs"));
+ return false;
+ }
+ if(!newSpecFile.exists()) {
+ setErrorMessage(Messages.getString("RPMExportPage.Spec_file_does_not_exist"));
+ return false;
+ }
+ }
+
+ // Make sure version/release fields are filled in
+ if (!checkVersionReleaseFields()) {
+ setDescription(Messages.getString("RPMExportPage.Fill_in_ver_rel")); //$NON-NLS-1$
+ return false;
+ }
+ // Make sure version/release fields are valid
+ if(!checkInvalidChars(rpmVersion.getText()) || !checkInvalidChars(rpmRelease.getText())) {
+ setErrorMessage(Messages.getString("RPMExportPage.Invalid_ver_rel"));
+ return false;
+ }
+
+ // Make sure either export binary/source is checked
+ if (!exportBinary.getSelection() && !exportSource.getSelection()) {
+ setErrorMessage(Messages.getString("RPMExportPage.Select_export_type")); //$NON-NLS-1$
+ return false;
+ }
+
+ setDescription(null);
+ setErrorMessage(null);
+ return true;
+ }
+
+ /**
+ * Method checkVersionReleaseFields
+ *
+ * Check that Version and Release
+ * are not empty
+ * @return boolean - true if valid
+ */
+ private boolean checkVersionReleaseFields() {
+ if (!rpmVersion.getText().equals("")) { //$NON-NLS-1$
+ if (!rpmRelease.getText().equals("")) { //$NON-NLS-1$
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private boolean checkInvalidChars(String input) {
+ char[] inputChars = input.toCharArray();
+ for(int i=0; i < inputChars.length; i++) {
+ if(VALID_CHARS.indexOf(inputChars[i]) == -1) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Method canGoNext()
+ *
+ * Method to enable Next button
+ * @return
+ */
+ public boolean canGoNext() {
+ // if a patch is needed, the next button should
+ // be enabled
+ if (canFinish() && isPatchNeeded()) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public void handleEvent(Event e) {
+ setPageComplete(canFinish());
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportPatchPage.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportPatchPage.java
new file mode 100644
index 0000000000..6175684a32
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportPatchPage.java
@@ -0,0 +1,279 @@
+/*
+ * (c) 2004, 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+/**
+ * @author pmuldoon
+ * @version 1.0
+ *
+ * S/RPM export page 2. Defines the patch page that is shown to the user when they choose
+ * to export to an SRPM and patch. Defines the UI elements shown, and the basic validation (need to add to
+ * this)
+ */
+package org.eclipse.linuxtools.rpm.ui;
+
+import java.net.UnknownHostException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.linuxtools.rpm.core.IRPMConstants;
+import org.eclipse.linuxtools.rpm.core.RPMCorePlugin;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Text;
+
+public class RPMExportPatchPage extends WizardPage implements Listener {
+ // Checkbox Buttons
+ private Button generatePatch;
+
+ // Patch Fields
+ private Text patchTag;
+
+ private Text patchChangeLog;
+
+ private Text patchChangeLogstamp;
+
+ private final String valid_char_list = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-."; //$NON-NLS-1$
+
+ /**
+ * @see java.lang.Object#Object()
+ *
+ * Constructor for RPMExportPage class
+ */
+ public RPMExportPatchPage() {
+ super(
+ Messages.getString("RPMExportPage.Export_SRPM"), //$NON-NLS-1$
+ Messages.getString("RPMExportPage.Export_SRPM_from_project"), null); //$NON-NLS-1$ //$NON-NLS-2$
+ setDescription(Messages.getString("RPMExportPage_2.0")); //$NON-NLS-1$
+ }
+
+ /**
+ * @see org.eclipse.jface.dialogs.IDialogPage#createControl(Composite)
+ *
+ * Parent control. Creates the listbox, Destination box, and options box
+ *
+ */
+ public void createControl(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NULL);
+ // Create a layout for the wizard page
+ composite.setLayout(new GridLayout());
+ composite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
+ setControl(composite);
+
+ // Create contols on the page
+ createPatchFields(composite);
+ populatePatchInfo();
+ }
+
+ /**
+ * Method populatePatchInfo
+ *
+ * Populate the patch widgets with data
+ */
+ private void populatePatchInfo() {
+
+ String userName = RPMCorePlugin.getDefault().getPreferenceStore()
+ .getString(IRPMConstants.AUTHOR_NAME); //$NON-NLS-1$
+ String userEmail = RPMCorePlugin.getDefault().getPreferenceStore()
+ .getString(IRPMConstants.AUTHOR_EMAIL); //$NON-NLS-1$
+
+ // Populate the changeLog
+ Date today = new Date();
+ SimpleDateFormat df = new SimpleDateFormat("E MMM dd yyyy"); //$NON-NLS-1$
+
+ patchChangeLogstamp.setText("* " + df.format(today) + //$NON-NLS-1$
+ " -- " + userName + " <" + userEmail + ">"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ patchChangeLog.setText("- "); //$NON-NLS-1$
+ }
+
+ /**
+ * Method createGenPatchFields
+ *
+ * Create the patch generation widgets
+ */
+ private void createPatchFields(Composite parent) {
+ Group group = new Group(parent, SWT.NONE);
+ group.setLayout(new GridLayout());
+ group.setText(Messages.getString("RPMExportPage.Patch_Options")); //$NON-NLS-1$
+ group.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
+ | GridData.HORIZONTAL_ALIGN_FILL));
+
+ Composite composite = new Composite(group, SWT.NONE);
+
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ composite.setLayout(layout);
+ composite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL
+ | GridData.GRAB_HORIZONTAL));
+
+ ModifyListener patchListener = new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ handleEvent(null);
+ }
+ };
+ KeyListener patchKeyListener = new KeyListener() {
+ public void keyPressed(KeyEvent e) {}
+ public void keyReleased(KeyEvent e) {
+ handleEvent(null);
+ }
+ };
+
+ GridData patchTagGridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL
+ | GridData.GRAB_HORIZONTAL);
+ new Label(composite, SWT.NONE).setText(Messages
+ .getString("RPMExportPage.Patch_Name")); //$NON-NLS-1$
+ patchTag = new Text(composite, SWT.BORDER);
+ patchTag.setToolTipText(Messages
+ .getString("RPMExportPage.toolTip_Patch_Name")); //$NON-NLS-1$
+ patchTag.setLayoutData(patchTagGridData);
+ patchTag.addModifyListener(patchListener);
+ patchTag.addKeyListener(patchKeyListener);
+
+ GridData pChangelogStampGridData = new GridData(
+ GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
+ new Label(composite, SWT.NONE).setText(Messages
+ .getString("RPMExportPage.Patch_Changelog_Stamp")); //$NON-NLS-1$
+
+ patchChangeLogstamp = new Text(composite, SWT.BORDER);
+ patchChangeLogstamp.setLayoutData(pChangelogStampGridData);
+ //patchTag.addModifyListener(trapTag);
+ patchChangeLogstamp.addModifyListener(patchListener);
+ patchChangeLogstamp.setToolTipText(Messages
+ .getString("RPMExportPage.toolTip_Changelog_Stamp")); //$NON-NLS-1$
+
+ new Label(composite, SWT.NONE).setText(Messages
+ .getString("RPMExportPage.Patch_Changelog")); //$NON-NLS-1$
+
+ KeyListener patchChangelogListener = new KeyListener() {
+ public void keyPressed(KeyEvent e) {
+ handleEvent(null);
+ }
+
+ public void keyReleased(KeyEvent e) {
+ handleEvent(null);
+ if (e.keyCode == 13) {
+ if (patchChangeLog.getCaretPosition() == patchChangeLog
+ .getCharCount())
+ patchChangeLog.append("- "); //$NON-NLS-1$
+ else if (patchChangeLog.getText(
+ patchChangeLog.getCaretPosition() - 1,
+ patchChangeLog.getCaretPosition() - 1).equals("\n")) //$NON-NLS-1$
+ patchChangeLog.insert("- "); //$NON-NLS-1$
+ }
+ }
+ };
+
+ GridData pChangelogGridData = new GridData(
+ GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
+
+ patchChangeLog = new Text(composite, SWT.BORDER | SWT.MULTI);
+ pChangelogGridData.heightHint = 7 * patchChangeLog.getLineHeight();
+ patchChangeLog.setLayoutData(pChangelogGridData);
+ patchChangeLog.addKeyListener(patchChangelogListener);
+ patchChangeLog.addModifyListener(patchListener);
+ patchChangeLog.setToolTipText(Messages
+ .getString("RPMExportPage.toolTip_Changelog")); //$NON-NLS-1$
+
+ }
+
+ /**
+ * canFinish()
+ *
+ * Hot validation. Called to determine whether Finish
+ * button can be set to true
+ * @return boolean. true if finish can be activated
+ */
+ public boolean canFinish() {
+ // Is the patch tag empty
+ if (patchTag.getText().equals("")) { //$NON-NLS-1$
+ setErrorMessage(null);
+ setDescription(Messages.getString("RPMExportPage_2.5")); //$NON-NLS-1$
+ return false;
+ }
+
+ //Check for invalid character in patch name
+ char[] chars = patchTag.getText().toCharArray();
+ for(int i=0; i < chars.length; i++) {
+ if(valid_char_list.indexOf(chars[i]) == -1) {
+ setErrorMessage(Messages.getString("RPMExportPage_2.1"));
+ return false;
+ }
+ }
+
+ // Is the Changelog fields empty?
+ if (patchChangeLog.getText().equals("- ") | patchChangeLog.getText().equals("") | //$NON-NLS-1$ //$NON-NLS-2$
+ patchChangeLog.getText().equals("-")) {
+ setErrorMessage(null);
+ setDescription(Messages.getString("RPMExportPage_2.4")); //$NON-NLS-1$
+ return false;
+ } else if (patchTag.getText().equals("")) {
+ setErrorMessage(null);
+ setDescription(Messages.getString("RPMExportPage_2.5")); //$NON-NLS-1$
+ return false;
+ }
+
+ // Is the time stamp empty?
+ if (patchChangeLogstamp.getText().equals("")) { //$NON-NLS-1$
+ setErrorMessage(null);
+ setDescription(Messages.getString("RPMExportPage_2.4")); //$NON-NLS-1$
+ return false;
+ }
+
+ setDescription(null);
+ setErrorMessage(null);
+ return true;
+ }
+
+ public String getSelectedPatchName() {
+ return patchTag.getText();
+ }
+
+ public String getSelectedChangelog() {
+ return patchChangeLogstamp.getText() + IRPMUIConstants.LINE_SEP +
+ patchChangeLog.getText() + IRPMUIConstants.LINE_SEP +
+ IRPMUIConstants.LINE_SEP;
+ }
+
+ public void handleEvent(Event e) {
+ setPageComplete(canFinish());
+ }
+
+ private String getHostName() {
+ String hostname;
+ try {
+ hostname = java.net.InetAddress.getLocalHost().getHostName();
+ } catch (UnknownHostException e) {
+ return ""; //$NON-NLS-1$
+ }
+ // Trim off superflous stuff from the hostname
+ int firstdot = hostname.indexOf("."); //$NON-NLS-1$
+ int lastdot = hostname.lastIndexOf("."); //$NON-NLS-1$
+ // If the two are equal, no need to trim name
+ if (firstdot == lastdot) {
+ return hostname;
+ }
+ String hosttemp = ""; //$NON-NLS-1$
+ String hosttemp2 = hostname;
+ while (firstdot != lastdot) {
+ hosttemp = hosttemp2.substring(lastdot) + hosttemp;
+ hosttemp2 = hostname.substring(0, lastdot);
+ lastdot = hosttemp2.lastIndexOf("."); //$NON-NLS-1$
+ }
+ return hosttemp.substring(1);
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportWizard.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportWizard.java
new file mode 100644
index 0000000000..253e1ac3a4
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMExportWizard.java
@@ -0,0 +1,94 @@
+/*
+ * (c) 2004, 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+*/
+package org.eclipse.linuxtools.rpm.ui;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.linuxtools.rpm.core.IRPMProject;
+import org.eclipse.linuxtools.rpm.core.RPMExportDelta;
+import org.eclipse.ui.IExportWizard;
+import org.eclipse.ui.IWorkbench;
+
+public class RPMExportWizard extends Wizard implements IExportWizard {
+ private RPMExportPage mainPage;
+ private RPMExportPatchPage patchPage;
+ private IStructuredSelection selection;
+ private IRPMProject rpmProject;
+
+ /**
+ * @see org.eclipse.ui.IWorkbenchWizard#init(IWorkbench, IStructuredSelection)
+ *
+ * Basic constructor. Don't do much, just print out debug, and set progress
+ * monitor status to true
+ */
+ public void init(IWorkbench workbench, IStructuredSelection currentSelection) {
+ setNeedsProgressMonitor(true);
+ setWindowTitle(Messages.getString("RPMExportWizard.Export_an_SRPM")); //$NON-NLS-1$
+ selection = currentSelection;
+ }
+
+ public boolean performFinish() {
+ RPMExportDelta exportDelta = new RPMExportDelta();
+ exportDelta.setVersion(mainPage.getSelectedVersion());
+ exportDelta.setRelease(mainPage.getSelectedRelease());
+ exportDelta.setSpecFile(mainPage.getSelectedSpecFile());
+ if(mainPage.canGoNext()) {
+ exportDelta.setPatchName(patchPage.getSelectedPatchName());
+ exportDelta.setChangelogEntry(patchPage.getSelectedChangelog());
+ }
+
+ // Create a new instance of the RPMExportOperation runnable
+ RPMExportOperation rpmExport = new RPMExportOperation(mainPage.getSelectedRPMProject(),
+ mainPage.getExportType(), exportDelta);
+
+ // Run the export
+ try {
+ getContainer().run(true, true, rpmExport);
+ } catch (InvocationTargetException e1) {
+ // use ExceptionHandler?
+ return false;
+ } catch (InterruptedException e1) {
+ }
+
+ MultiStatus status = rpmExport.getStatus();
+
+ if (!status.isOK()) {
+ ErrorDialog.openError(getContainer().getShell(),
+ Messages.getString(
+ "RPMExportPage.Errors_encountered_importing_SRPM"), //$NON-NLS-1$
+ null, // no special message
+ status);
+
+ return false;
+ }
+
+ // Need to return some meaninful status. Should only return true if the wizard completed
+ // successfully.
+ return true;
+ }
+
+ public boolean canFinish() {
+ if (!mainPage.canGoNext()) {
+ return mainPage.canFinish();
+ } else if (mainPage.canFinish() && patchPage.canFinish()) {
+ return true;
+ }
+ return false;
+ }
+
+ // Add the RPMExportPage as the only page in this wizard.
+ public void addPages() {
+ mainPage = new RPMExportPage(selection);
+ addPage(mainPage);
+ patchPage = new RPMExportPatchPage();
+ addPage(patchPage);
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMUIPlugin.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMUIPlugin.java
new file mode 100644
index 0000000000..5d68f929af
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/RPMUIPlugin.java
@@ -0,0 +1,122 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+*/
+package org.eclipse.linuxtools.rpm.ui;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class RPMUIPlugin extends AbstractUIPlugin {
+ //The shared instance.
+ private static RPMUIPlugin plugin;
+ //Resource bundle.
+ private ResourceBundle resourceBundle;
+
+ public static final String ID = "org.eclipse.linuxtools.rpm.ui"; //$NON-NLS-1$
+
+ /**
+ * The constructor.
+ */
+ public RPMUIPlugin() {
+ super();
+ plugin = this;
+ }
+
+ /**
+ * This method is called upon plug-in activation
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /**
+ * This method is called when the plug-in is stopped
+ */
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ plugin = null;
+ resourceBundle = null;
+ }
+
+ /**
+ * Returns the shared instance.
+ */
+ public static RPMUIPlugin getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Returns the string from the plugin's resource bundle,
+ * or 'key' if not found.
+ */
+ public static String getResourceString(String key) {
+ ResourceBundle bundle = RPMUIPlugin.getDefault().getResourceBundle();
+ try {
+ return (bundle != null) ? bundle.getString(key) : key;
+ } catch (MissingResourceException e) {
+ return key;
+ }
+ }
+
+ /**
+ * Returns the plugin's resource bundle,
+ */
+ public ResourceBundle getResourceBundle() {
+ try {
+ if (resourceBundle == null)
+ resourceBundle = ResourceBundle.getBundle("rpmui.RpmuiPluginResources");
+ } catch (MissingResourceException x) {
+ resourceBundle = null;
+ }
+ return resourceBundle;
+ }
+
+ /**
+ * 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 AbstractUIPlugin.imageDescriptorFromPlugin("rpmui", path);
+ }
+
+ public void log(Throwable e) {
+ log(new Status(IStatus.ERROR, ID, IStatus.ERROR, "Error", e)); //$NON-NLS-1$
+ }
+
+ public void log(IStatus status) {
+ getLog().log(status);
+ }
+
+ public void logErrorMessage(String message) {
+ log(new Status(IStatus.ERROR, ID, 1, message, null));
+ }
+
+ public static Shell getActiveWorkbenchShell() {
+ IWorkbenchWindow window= getActiveWorkbenchWindow();
+ if (window != null) {
+ return window.getShell();
+ }
+ return null;
+ }
+
+ public static IWorkbenchWindow getActiveWorkbenchWindow() {
+ return getDefault().getWorkbench().getActiveWorkbenchWindow();
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportOperation.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportOperation.java
new file mode 100644
index 0000000000..61fe0694e3
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportOperation.java
@@ -0,0 +1,119 @@
+/*
+ * (c) 2004, 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+*/
+package org.eclipse.linuxtools.rpm.ui;
+
+import java.io.File;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.linuxtools.rpm.core.IRPMProject;
+import org.eclipse.linuxtools.rpm.core.RPMProjectFactory;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Import Operation Class for RPM plug-in. This allows us to abstract the operations
+ * to a utility class which also inherits IRunnableWithProgress that allows use of
+ * progress bar
+ */
+
+public class SRPMImportOperation implements IRunnableWithProgress {
+ private IProject project;
+ private File sourceRPM;
+
+ // Progressmonitor
+ private IProgressMonitor monitor;
+
+ private List rpm_errorTable;
+
+ /**
+ * Method SRPMImportOperation.
+ * @param name - (IProject) name
+ * @param srpm_name - name of input srpm
+ * @param applyPatchesFlag - Apply patches on import
+ * @param runAutoConfFlag - Run autoconf on import
+ */
+ public SRPMImportOperation(IProject project, File sourceRPM) {
+ this.project = project;
+ this.sourceRPM = sourceRPM;
+ }
+
+ /**
+ * @see org.eclipse.jface.operation.IRunnableWithProgress#run(IProgressMonitor)
+ *
+ * Perform the import of SRPM import. Call the build class incrementally
+ */
+ public void run(IProgressMonitor progressMonitor)
+ throws InvocationTargetException {
+ // Total number of work steps needed
+ int totalWork = 2;
+
+ monitor = progressMonitor;
+ rpm_errorTable = new ArrayList();
+
+ monitor.beginTask(Messages.getString("SRPMImportOperation.Starting"), //$NON-NLS-1$
+ totalWork); //$NON-NLS-1$
+
+ // Try to create an instance of the build class.
+ try {
+ IRPMProject rpmProject = RPMProjectFactory.getRPMProject(project);
+ monitor.worked(1);
+ monitor.setTaskName(Messages.getString("SRPMImportOperation.Importing_SRPM")); //$NON-NLS-1$
+ rpmProject.importSourceRPM(sourceRPM);
+ } catch (Exception e) {
+ rpm_errorTable.add(e);
+ return;
+ }
+ monitor.worked(1);
+ }
+
+
+ public MultiStatus getStatus() {
+ IStatus[] errors = new IStatus[rpm_errorTable.size()];
+ Iterator count = rpm_errorTable.iterator();
+ int iCount = 0;
+ String error_message=Messages.getString("SRPMImportOperation.0"); //$NON-NLS-1$
+ while (count.hasNext()) {
+
+ Object anonErrorObject = count.next();
+ if (anonErrorObject instanceof Throwable) {
+ Throwable errorObject = (Throwable) anonErrorObject;
+ error_message=errorObject.getMessage();
+ if (error_message == null)
+ error_message=Messages.getString("SRPMImportOperation.1"); //$NON-NLS-1$
+
+ }
+ else
+ if (anonErrorObject instanceof Status)
+ {
+ Status errorObject = (Status) anonErrorObject;
+ error_message=errorObject.getMessage();
+ if (error_message == null)
+ error_message=Messages.getString("SRPMImportOperation.2"); //$NON-NLS-1$
+ }
+ IStatus error =
+ new Status(
+ Status.ERROR,
+ "RPM Plugin",Status.OK, //$NON-NLS-1$
+ error_message,
+ null);
+ errors[iCount] = error;
+ iCount++;
+ }
+
+ return new MultiStatus(PlatformUI.PLUGIN_ID, IStatus.OK, errors, Messages.getString("SRPMImportOperation.3"), //$NON-NLS-1$
+ null);
+}
+
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportPage.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportPage.java
new file mode 100644
index 0000000000..7c0237cd8d
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportPage.java
@@ -0,0 +1,455 @@
+/*
+ * (c) 2004, 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+*/
+
+/**
+ * @author pmuldoon
+ * @version 1.0
+ *
+ * RPM GUI import page. Defines the page the is shown to the user when they choose
+ * to export to and RPM. Defines the UI elements shown, and the basic validation (need to add to
+ * this)
+ */
+package org.eclipse.linuxtools.rpm.ui;
+
+import java.io.File;
+import java.util.Iterator;
+import java.util.Vector;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.NewProjectAction;
+
+/**
+ * SRPMImportPage. Called by SRPMImportwizard. Class can not be subclassed
+ * extends WizardPage and implements Listener (for events)
+ *
+ */
+public class SRPMImportPage extends WizardPage implements Listener {
+
+ /** This is a copy of
+ * org.eclipse.team.internal.ccvs.ui.wizards.CheckoutAsWizard.NewProjectListener**/
+ class NewProjectListener implements IResourceChangeListener {
+ private IProject newProject = null;
+
+ /**
+ * @see IResourceChangeListener#resourceChanged(IResourceChangeEvent)
+ */
+ public void resourceChanged(IResourceChangeEvent event) {
+ IResourceDelta root = event.getDelta();
+ IResourceDelta[] projectDeltas = root.getAffectedChildren();
+ for (int i = 0; i < projectDeltas.length; i++) {
+ IResourceDelta delta = projectDeltas[i];
+ IResource resource = delta.getResource();
+ if (delta.getKind() == IResourceDelta.ADDED) {
+ newProject = (IProject) resource;
+ }
+ }
+ }
+
+ /**
+ * Gets the newProject.
+ *
+ * @return Returns a IProject
+ */
+ public IProject getNewProject() {
+ return newProject;
+ }
+ }
+
+ private IWorkbench workbench;
+
+ // GUI Control variables
+ private Combo sourceSRPM;
+ private Button intoConfigured;
+ private Button intoExisting;
+ private List projectList;
+ private IStructuredSelection selection;
+
+ static private Vector srpmVector;
+
+ /**
+ * @see java.lang.Object#Object()
+ *
+ * Constructor for SRPMImportPage class
+ * @param aWorkbench - Workbench
+ * @param selection - IStructuredSelection
+ */
+ public SRPMImportPage(IWorkbench aWorkbench, IStructuredSelection currentSelection) {
+ super(Messages.getString("SRPMImportPage.Import_SRPM"), //$NON-NLS-1$
+ Messages.getString("SRPMImportPage.Select_project_to_import"), null); //$NON-NLS-1$ //$NON-NLS-2$
+
+ this.workbench = aWorkbench;
+ setPageComplete(false);
+ setDescription(Messages.getString(
+ "SRPMImportPage.Select_project_to_import")); //$NON-NLS-1$
+ selection = currentSelection;
+ }
+
+
+ private String getSelectedProjectName() {
+ String[] selections = projectList.getSelection();
+ if (selections.length > 0) {
+ return selections[0];
+ }
+ return null;
+ }
+
+ private File getSelectedSRPM() {
+ String srpmName = sourceSRPM.getText();
+ if(srpmName.equals("") || srpmName == null) { //$NON-NLS-1$
+ return null;
+ }
+ return new File(sourceSRPM.getText());
+ }
+
+ public void createControl(Composite parent) {
+ // Set Page complete to false. Don't allow the user to execute wizard
+ // until we have all the required data
+ setPageComplete(false);
+
+ // Create a generic composite to hold ui variable
+ Composite composite = new Composite(parent, SWT.NULL);
+
+ // Create a layout for the wizard page
+ composite.setLayout(new GridLayout());
+ composite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
+ setControl(composite);
+
+ // Create contols on the page
+ createSourceRPMCombo(composite);
+ createProjectBox(composite);
+ }
+
+ private void createSourceRPMCombo(Composite parent) {
+ Group specGrid = new Group(parent, SWT.NONE);
+ specGrid.setLayout(new GridLayout());
+ specGrid.setText(Messages.getString("SRPMImportPage.SRPM_Name")); //$NON-NLS-1$
+ specGrid.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL |
+ GridData.HORIZONTAL_ALIGN_FILL));
+
+ Composite sourceSpecComposite = new Composite(specGrid, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ sourceSpecComposite.setLayout(layout);
+ sourceSpecComposite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL |
+ GridData.GRAB_HORIZONTAL));
+
+ sourceSRPM = new Combo(sourceSpecComposite, SWT.BORDER);
+ sourceSRPM.setToolTipText(Messages.getString(
+ "SRPMImportPage.toolTip_SRPM_Name")); //$NON-NLS-1$
+
+ if (srpmVector == null)
+ srpmVector = new Vector();
+ for (int i = srpmVector.size(); i > 0; i--)
+ sourceSRPM.add((String)(srpmVector.elementAt(i - 1)));
+ GridData gridData = new GridData();
+ gridData.horizontalAlignment = GridData.FILL;
+ gridData.grabExcessHorizontalSpace = true;
+ sourceSRPM.setLayoutData(gridData);
+ sourceSRPM.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ handleEvent(null);
+ }
+ });
+
+ Button srpmBrowse = new Button(sourceSpecComposite, SWT.PUSH);
+ srpmBrowse.setToolTipText(Messages.getString(
+ "SRPMImportPage.toolTip_Open_file_navigator")); //$NON-NLS-1$
+ srpmBrowse.setText(Messages.getString("RPMPage.Browse")); //$NON-NLS-1$
+ srpmBrowse.addListener(SWT.Selection,
+ new Listener() {
+ public void handleEvent(Event event) {
+ FileDialog srpmBrowseDialog = new FileDialog(getContainer()
+ .getShell(), SWT.OPEN);
+ String selectedSRPM_name = srpmBrowseDialog.open();
+ if (selectedSRPM_name != null)
+ {
+ File testSRPMfilename = new File(selectedSRPM_name);
+ if (testSRPMfilename.isFile())
+ sourceSRPM.setText(selectedSRPM_name);
+ }
+ }
+ });
+ srpmBrowse.addListener(SWT.FocusOut, this);
+ }
+
+ /**
+ * Method createProjectBox.
+ * @param parent - parent widget
+ *
+ * Create a list box and populate it with
+ * the list of current projects in the workspace
+ * along with adding the option for a configured project
+ */
+ private void createProjectBox(Composite parent) {
+ // Creates a control that enumerates all the projects in the current
+ // Workspace and places them in a listbox.
+ // Give the option of importing into an existing project or creating a new one
+
+ // Declare an array of IProject;
+ IProject[] internalProjectList;
+ String Proj_Enum;
+
+ //Get the current workspace root.
+ final IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace()
+ .getRoot();
+
+ // Create a group and set up the layout, we want to seperate
+ // project selection from the other widgets on the wizard dialog box
+ Group group = new Group(parent, SWT.NONE);
+ group.setLayout(new GridLayout());
+ group.setText(Messages.getString("SRPMImportPage.import_srpm_into")); //$NON-NLS-1$
+ group.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL |
+ GridData.HORIZONTAL_ALIGN_FILL));
+ intoExisting = new Button(group, SWT.RADIO);
+ intoExisting.setText(Messages.getString("RPMPage.Select_a_project")); //$NON-NLS-1$
+
+ // Create a new SWT listbox. Only allow single selection of items
+ // Set up the layout data
+ projectList = new List(group, SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL);
+ projectList.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL |
+ GridData.HORIZONTAL_ALIGN_FILL));
+ projectList.setToolTipText(Messages.getString(
+ "SRPMImportPage.toolTip_project_destination")); //$NON-NLS-1$
+
+ intoConfigured = new Button(group, SWT.RADIO);
+ intoConfigured.setText(Messages.getString("SRPMImportPage.Configured_New_Project")); //$NON-NLS-1$
+
+ // Set the height to 4 elements high
+ GridData projectLayout = new GridData(GridData.GRAB_HORIZONTAL |
+ GridData.HORIZONTAL_ALIGN_FILL);
+ projectLayout.heightHint = projectList.getItemHeight() * 4;
+ projectList.setLayoutData(projectLayout);
+
+ // From the current Workspace root, get a list of all current projects
+ // This should come back to us as an array of IProject.
+ internalProjectList = workspaceRoot.getProjects();
+
+ // Stuff the listbox with the text name of the projects
+ // using the getName() method
+ // Find the first selected project in the workspace
+
+ Iterator iter = selection.iterator();
+ Object selectedObject= null;
+ IProject selectedProject = null;
+ boolean isSelection = false;
+ if (iter.hasNext())
+ {
+ selectedObject = iter.next();
+ if (selectedObject instanceof IResource)
+ {
+ selectedProject = ((IResource) selectedObject).getProject();
+ isSelection = true;
+ }
+ }
+
+ // Stuff the listbox with the text names of the projects
+ // using the getName() method and select the selected
+ // project if available
+
+ for (int a = 0; a < internalProjectList.length; a++)
+ {
+ projectList.add(internalProjectList[a].getName());
+ if (isSelection && internalProjectList[a].equals(selectedProject)) {
+ projectList.setSelection(a);
+ }
+ }
+
+ if (projectList.getItemCount() == 0) //there were no projects
+ {
+ projectList.add(Messages.getString(
+ "SRPMImportPage.No_projects_found")); //$NON-NLS-1$
+ intoExisting.setEnabled(false); // Can't very well import into an existing
+ projectList.setEnabled(false); // project now can we?
+ intoConfigured.setSelection(true);
+ isSelection = true; // we don't want select the "RPMPage.No_c/c++_projects_found_2"
+ }
+ else {
+ intoExisting.setSelection(true);
+ }
+
+ if (!isSelection) { //if none is selected select first project
+ projectList.setSelection(0);
+ }
+ else {
+ projectList.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ handleEvent(null);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+ }
+
+ intoExisting.addListener(SWT.Selection, this);
+ intoConfigured.addListener(SWT.Selection, this);
+ projectList.addListener(SWT.FocusOut, this);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
+ */
+ public void handleEvent(Event event) {
+ if (event != null)
+ {
+ if (event.widget == intoExisting && intoExisting.getSelection())
+ {
+ projectList.setEnabled(true);
+ }
+ else if (event.widget == intoConfigured && intoConfigured.getSelection())
+ {
+ projectList.setEnabled(false);
+ }
+ }
+ setPageComplete(canFinish());
+ }
+
+
+ /**
+ * canFinish()
+ *
+ * Hot validation. Called to determine whether Finish
+ * button can be set to true
+ * @return boolean. true if finish can be activated
+ */
+ public boolean canFinish() {
+ // Make sure project has been selected or the user
+ // has decided to configure a new one instead
+ if (getSelectedProjectName() == null && !intoConfigured.getSelection()) {
+ return false;
+ }
+
+ // Make sure an srpm name has been provided
+ if (sourceSRPM.getText().equals("")) { //$NON-NLS-1$
+ return false;
+ }
+ File srpm = new File(sourceSRPM.getText());
+ if (!srpm.isFile()){
+ setErrorMessage(Messages.getString("SRPMImportPage.Source_not_Valid"));
+ return false;
+ }
+ if (sourceSRPM.getText().lastIndexOf(".src.rpm") == -1)
+ {
+ setErrorMessage(Messages.getString("SRPMImportPage.No_src_rpm_ext"));
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * finish()
+ *
+ * Perform finish after finish button is pressed
+ * @return boolean
+ * @throws CoreException
+ * */
+ public boolean finish() throws CoreException {
+ IPath detailedProjectLocation = null;
+ IProject detailedProject;
+
+ // Get the handle to the current activate Workspace
+ IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
+
+ // User chooses an existing project or make a new project
+ if (intoExisting.getSelection()) {
+ // Get the current selected member from the list box (projectList)
+ String[] selectedProject = projectList.getSelection();
+
+ // As we only allow a single selection in the listbox, and the listbox always
+ // comes with the first element selected, we can assume the first element
+ // in the returned array is valid.
+ detailedProject = workspaceRoot.getProject(selectedProject[0]);
+ }
+ else {
+ detailedProject = getNewProject();
+ if(detailedProject == null) {
+ return false;
+ }
+ }
+ // Add this SRPM to srpmList
+ for (int i = 0; i < srpmVector.size(); i++)
+ { // There can only be one occurance
+ if (srpmVector.elementAt(i).equals(sourceSRPM.getText()))
+ {
+ srpmVector.remove(i);
+ break;
+ }
+ }
+ srpmVector.add((String)(sourceSRPM.getText()));
+
+ SRPMImportOperation srpmImportOp = null;
+ try {
+ srpmImportOp = new SRPMImportOperation(detailedProject,
+ getSelectedSRPM());
+ getContainer().run(true, true, srpmImportOp);
+ } catch (Exception e) {
+ setErrorMessage(e.toString());
+ return false;
+ }
+
+ // Get the status of the operation
+ IStatus srpmImportStatus = srpmImportOp.getStatus();
+
+ // If the status does not come back clean, open error dialog
+ if (!srpmImportStatus.isOK()) {
+ ErrorDialog.openError(getContainer().getShell(),
+ Messages.getString("SRPMImportPage.Errors_importing_SRPM"), //$NON-NLS-1$
+ null, // no special message
+ srpmImportStatus);
+
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Get a new project that is configured by the new project wizard. This is
+ * currently the only way to do this. This is a copy of
+ * org.eclipse.team.internal.ccvs.ui.wizards.CheckoutAsWizard.getNewProject()
+ */
+ private IProject getNewProject() {
+ NewProjectListener listener = new NewProjectListener();
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(listener,
+ IResourceChangeEvent.POST_CHANGE);
+ (new NewProjectAction(PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow())).run();
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(listener);
+ IProject project = listener.getNewProject();
+ return project;
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportWizard.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportWizard.java
new file mode 100644
index 0000000000..4de2b4345c
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/SRPMImportWizard.java
@@ -0,0 +1,79 @@
+/*
+ * (c) 2004, 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+*/
+
+/**
+ * @author pmuldoon
+ * @version 1.0
+ *
+ *
+ * Plug-in entry point. When the user chooses to import an RPM the plug-in manager in Eclipse
+ * will invoke this class. This class extends Wizard and implements IImportWizard.
+ */
+package org.eclipse.linuxtools.rpm.ui;
+
+import org.eclipse.core.runtime.CoreException;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+
+import org.eclipse.ui.IImportWizard;
+import org.eclipse.ui.IWorkbench;
+
+
+/**
+ * The main plugin class to be used in the desktop. This is the "entrypoint"
+ * for the import rpm plug-in.
+ */
+public class SRPMImportWizard extends Wizard implements IImportWizard {
+ private IWorkbench workbench;
+ private IStructuredSelection selection;
+ private SRPMImportPage mainPage;
+
+ /**
+ * @see org.eclipse.ui.IWorkbenchWizard#init(IWorkbench, IStructuredSelection)
+ */
+ public void init(IWorkbench workbench, IStructuredSelection currentSelection) {
+ this.workbench = workbench;
+ selection = currentSelection;
+ setWindowTitle(Messages.getString("SRPMImportwizard.Import_an_SRPM")); //$NON-NLS-1$
+ setNeedsProgressMonitor(true);
+ }
+
+ /**
+ * @see org.eclipse.jface.wizard.IWizard#performFinish()
+ */
+
+ // We have elected to do the Finish button clickin in the SRPMImportPage. So override
+ //the default and point to SRPMImport finish()
+ public boolean performFinish() {
+ try {
+ return mainPage.finish();
+ } catch (CoreException e) {
+ return false;
+ }
+ }
+
+ /**
+ * @see org.eclipse.jface.wizard.IWizard#canFinish()
+ *
+ * Select to finish validation in the SRPMImportPage
+ */
+ public boolean canFinish() {
+ return mainPage.canFinish();
+ }
+
+ /**
+ * @see org.eclipse.jface.wizard.IWizard#addPages()
+ */
+
+ // Add the SRPMImportPage as the only page in this wizard.
+ public void addPages() {
+ mainPage = new SRPMImportPage(workbench, selection);
+ addPage(mainPage);
+ super.addPages();
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/logviewer/LogReader.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/logviewer/LogReader.java
new file mode 100644
index 0000000000..671d9e14d7
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/logviewer/LogReader.java
@@ -0,0 +1,117 @@
+/*
+ * (c) 2004, 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+*/
+
+package org.eclipse.linuxtools.rpm.ui.logviewer;
+
+import org.eclipse.core.runtime.CoreException;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.TextViewer;
+import org.eclipse.linuxtools.rpm.core.RPMCorePlugin;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * A Runnable to read rpm's logfile and stuff it into the daemon view's TextViewer.
+ * @author Keith Seitz <keiths@redhat.com> (oringinally for oprofile)
+ * modified to be used in the Rpm plugin to view the RPM import/export log
+ */
+public class LogReader implements Runnable {
+ private static String log_name = ""; //$NON-NLS-1$
+ private static TextViewer _viewer = null;
+ private static String _logfile = null;
+ private static long last_modified = 0;
+ static final String file_sep = System.getProperty("file.separator"); //$NON-NLS-1$
+ static final String line_sep = System.getProperty("line.separator"); //$NON-NLS-1$
+ /**
+ * Constructor
+ * @param viewer the TextViewer in which to display log file
+ */
+ public LogReader(TextViewer viewer) {
+ _viewer = viewer;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Runnable#run()
+ */
+ public void run() {
+
+ // Don't do anything if the logviewer was disposed since the last time
+ if (_viewer != null) {
+ String logfile_name = getLogFile();
+ if (logfile_name == null) {
+ return;
+ }
+ File log_file = new File(logfile_name);
+ // If the file does not exist, do not do anything
+ if (log_file.exists()) {
+ long size = log_file.length();
+ if (!logfile_name.equals(log_name) | size != last_modified) {
+ /* Log file has changed read it in and stuff it into the
+ log viewer. */
+ log_name = logfile_name;
+ last_modified = size;
+
+ try {
+ BufferedReader reader = new BufferedReader(new FileReader(log_file));
+ String contents = new String();
+ String line;
+ while ((line = reader.readLine()) != null) {
+ contents += line + line_sep;
+ }
+
+ // Content changed, notify logviewer
+ _viewer.setDocument(new Document(contents));
+ } catch (FileNotFoundException e) {
+ // The file doesn't exist or was erased. Try again next time.
+ } catch (IOException e) {
+ // Error reading log. Try again next time.
+ }
+ }
+
+ // Re-register ourselves to be run after the timeout
+ Display.getCurrent().timerExec(1000, this);
+ }
+ } else {
+ last_modified = 0;
+ log_name = "";
+ }
+ }
+
+ /**
+ * Stop updating log file view because viewer was disposed
+ */
+ public void dispose() {
+ _viewer = null;
+ }
+
+ public String getLogFile() {
+ File f = null;
+ try {
+ f = RPMCorePlugin.getDefault().getExternalLogFile();
+ } catch(CoreException e) {
+ // Too bad.
+ }
+ if (!f.exists()) {
+ return null;
+ }
+ try {
+ BufferedReader reader = new BufferedReader(new FileReader(f));
+ return reader.readLine();
+ } catch (FileNotFoundException e) {
+ // The file doesn't exist or was erased. Try again next time.
+ } catch (IOException e) {
+ // Error reading log. Try again next time.
+ }
+ return null;
+ }
+} \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/logviewer/RPMLogViewer.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/logviewer/RPMLogViewer.java
new file mode 100644
index 0000000000..4f993a3a17
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/logviewer/RPMLogViewer.java
@@ -0,0 +1,112 @@
+/*
+ * (c) 2004 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+*/
+
+package org.eclipse.linuxtools.rpm.ui.logviewer;
+
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.TextViewer;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.action.*;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.part.ViewPart;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.*;
+
+/**
+ * A view to display the oprofied log file.
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class RPMLogViewer extends ViewPart {
+
+ private TextViewer _viewer;
+ private LogReader _reader;
+ private String _logfile;
+
+ class ViewLabelProvider extends LabelProvider implements ITableLabelProvider {
+ public String getColumnText(Object obj, int index) {
+ return getText(obj);
+ }
+ public Image getColumnImage(Object obj, int index) {
+ return getImage(obj);
+ }
+ public Image getImage(Object obj) {
+ return PlatformUI.getWorkbench().
+ getSharedImages().getImage(ISharedImages.IMG_OBJ_ELEMENT);
+ }
+ }
+
+ public RPMLogViewer() {
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createPartControl(Composite top) {
+ _viewer = new TextViewer(top, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
+ _defineLayout(top);
+ _defineActions(top);
+
+ // Create log reader runnable
+ _reader = new LogReader(_viewer);
+ }
+
+ private void hookContextMenu() {
+ MenuManager menuMgr = new MenuManager("#PopupMenu");
+ menuMgr.setRemoveAllWhenShown(true);
+// menuMgr.addMenuListener(new IMenuListener() {
+// public void menuAboutToShow(IMenuManager manager) {
+// RPMLogViewer.this.fillContextMenu(manager);
+// }
+// });
+ Menu menu = menuMgr.createContextMenu(_viewer.getControl());
+ _viewer.getControl().setMenu(menu);
+ getSite().registerContextMenu(menuMgr, _viewer);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPart#dispose()
+ */
+ public void dispose() {
+ _reader.dispose();
+ }
+
+ // Defines the actions associated with this view
+ private void _defineActions(Composite top) {
+ //DumpAction dumpAction = new DumpAction("label");
+ //IActionBars actionBars = getViewSite().getActionBars();
+
+ /* THIS ADDS TO OUR LOCAL TOOLBAR/MENU
+ // Add menu contributions
+ IMenuManager menubar = actionBars.getMenuManager();
+ menubar.add(dumpAction);
+ //menubar.add(new StopAction());
+
+ // Add toolbar contributions
+ IToolBarManager toolbar = actionBars.getToolBarManager();
+ toolbar.add(dumpAction);
+ //toolbar.add(new StopAction());
+ */
+ }
+
+ // Defines the UI layout for this view
+ private void _defineLayout(Composite top) {
+
+ _viewer.setDocument(new Document());
+ _viewer.setEditable(false);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPart#setFocus()
+ */
+ public void setFocus() {
+ // Start the reader -- can I invoke the run method directly?
+ Display.getCurrent().timerExec(2000, _reader);
+// Display.getCurrent().asyncExec(_reader);
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/preferences/RPMPluginPreferencesPage.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/preferences/RPMPluginPreferencesPage.java
new file mode 100644
index 0000000000..077d60c672
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/preferences/RPMPluginPreferencesPage.java
@@ -0,0 +1,295 @@
+/*
+ * (c) 2004, 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+*/
+
+package org.eclipse.linuxtools.rpm.ui.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.linuxtools.rpm.core.IRPMConstants;
+import org.eclipse.linuxtools.rpm.core.RPMCorePlugin;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+
+
+/**
+ * This class implements a sample preference page that is
+ * added to the preference dialog based on the registration.
+ */
+public class RPMPluginPreferencesPage extends PreferencePage
+ implements IWorkbenchPreferencePage, SelectionListener, ModifyListener {
+
+ private Button dateFormat;
+ private Text emailField;
+ private Text nameField;
+
+ private Text rpmField;
+ private Text rpmbuildField;
+ private Text diffField;
+
+ private Button createCheckBox(Composite group, String label) {
+ Button button = new Button(group, SWT.CHECK | SWT.LEFT);
+ button.setText(label);
+ button.addSelectionListener(this);
+ GridData data = new GridData();
+ button.setLayoutData(data);
+ return button;
+ }
+
+ private Composite createComposite(Composite parent, int numColumns) {
+ Composite composite = new Composite(parent, SWT.NULL);
+
+ //GridLayout
+ GridLayout layout = new GridLayout();
+ layout.numColumns = numColumns;
+ composite.setLayout(layout);
+
+ //GridData
+ GridData data = new GridData();
+ data.verticalAlignment = GridData.FILL;
+ data.horizontalAlignment = GridData.FILL;
+ composite.setLayoutData(data);
+ return composite;
+ }
+
+ private Label createLabel(Composite parent, String text) {
+ Label label = new Label(parent, SWT.LEFT);
+ label.setText(text);
+ GridData data = new GridData();
+ data.horizontalSpan = 1;
+ data.horizontalAlignment = GridData.FILL;
+ label.setLayoutData(data);
+ return label;
+ }
+
+ private Button createPushButton(Composite parent, String label) {
+ Button button = new Button(parent, SWT.PUSH);
+ button.setText(label);
+ button.addSelectionListener(this);
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ button.setLayoutData(data);
+ return button;
+ }
+
+ private Button createBrowseButton(Composite parent, Text field, String command) {
+ Button button = new Button(parent, SWT.PUSH);
+ button.setText("Browse..."); //$NON-NLS-1$
+ button.addSelectionListener(new BrowseSelectionListener(getShell(),
+ "Select '" + command + //$NON-NLS-1$
+ "' Command", field)); //$NON-NLS-1$
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ button.setLayoutData(data);
+ return button;
+ }
+
+ private Button createRadioButton(Composite parent, String label) {
+ Button button = new Button(parent, SWT.RADIO | SWT.LEFT);
+ button.setText(label);
+ button.addSelectionListener(this);
+ GridData data = new GridData();
+ button.setLayoutData(data);
+ return button;
+ }
+
+ private Text createTextField(Composite parent) {
+ Text text = new Text(parent, SWT.SINGLE | SWT.BORDER);
+ text.addModifyListener(this);
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ data.grabExcessHorizontalSpace = true;
+ data.verticalAlignment = GridData.CENTER;
+ data.grabExcessVerticalSpace = false;
+ text.setLayoutData(data);
+ return text;
+ }
+
+ protected void createSpacer(Composite composite, int columnSpan) {
+ Label label = new Label(composite, SWT.NONE);
+ GridData gd = new GridData();
+ gd.horizontalSpan = columnSpan;
+ label.setLayoutData(gd);
+ }
+
+ private void tabForward(Composite parent) {
+ Label vfiller = new Label(parent, SWT.LEFT);
+ GridData gridData = new GridData();
+ gridData = new GridData();
+ gridData.horizontalAlignment = GridData.BEGINNING;
+ gridData.grabExcessHorizontalSpace = false;
+ gridData.verticalAlignment = GridData.CENTER;
+ gridData.grabExcessVerticalSpace = false;
+ vfiller.setLayoutData(gridData);
+ }
+
+ public void init(IWorkbench workbench){
+ }
+
+ private String getUserName()
+ {
+ return System.getProperty ( "user.name" ); //$NON-NLS-1$
+
+ }
+
+ private void initializeDefaults()
+ {
+ IPreferenceStore store = RPMCorePlugin.getDefault().getPreferenceStore();
+
+ emailField.setText(store.getDefaultString(IRPMConstants.AUTHOR_EMAIL));
+ nameField.setText(store.getDefaultString(IRPMConstants.AUTHOR_NAME));
+ rpmField.setText(store.getDefaultString(IRPMConstants.RPM_CMD));
+ rpmbuildField.setText(store.getDefaultString(IRPMConstants.RPMBUILD_CMD));
+ diffField.setText(store.getDefaultString(IRPMConstants.DIFF_CMD));
+
+ }
+
+ private void initializeValues() {
+ IPreferenceStore store = RPMCorePlugin.getDefault().getPreferenceStore();
+
+ emailField.setText(store.getString(IRPMConstants.AUTHOR_EMAIL));
+ nameField.setText(store.getString(IRPMConstants.AUTHOR_NAME));
+ rpmField.setText(store.getString(IRPMConstants.RPM_CMD));
+ rpmbuildField.setText(store.getString(IRPMConstants.RPMBUILD_CMD));
+ diffField.setText(store.getString(IRPMConstants.DIFF_CMD));
+ }
+
+ private void storeValues() {
+ IPreferenceStore store = RPMCorePlugin.getDefault().getPreferenceStore();
+
+ store.setValue(IRPMConstants.AUTHOR_NAME, nameField.getText());
+ store.setValue(IRPMConstants.AUTHOR_EMAIL, emailField.getText());
+ store.setValue(IRPMConstants.RPM_CMD, rpmField.getText());
+ store.setValue(IRPMConstants.RPMBUILD_CMD, rpmbuildField.getText());
+ store.setValue(IRPMConstants.DIFF_CMD, diffField.getText());
+ }
+
+ public void modifyText(ModifyEvent event) {
+ //Do nothing on a modification in this example
+ }
+ /* (non-Javadoc)
+ * Method declared on PreferencePage
+ */
+ protected void performDefaults() {
+ super.performDefaults();
+ initializeDefaults();
+
+ }
+ /* (non-Javadoc)
+ * Method declared on PreferencePage
+ */
+ public boolean performOk() {
+ storeValues();
+ RPMCorePlugin.getDefault().savePluginPreferences();
+ return true;
+ }
+
+ protected Control createContents(Composite parent)
+ {
+ //mainComposite << parent
+ Composite mainComposite = createComposite(parent, 1);
+ mainComposite.setLayout(new GridLayout());
+
+ Group userPrefs = new Group(mainComposite, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ userPrefs.setLayout(layout);
+ userPrefs.setText("RPM Preferences"); //$NON-NLS-1$
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ userPrefs.setLayoutData(gd);
+
+ createLabel(userPrefs, "Author Name: "); //$NON-NLS-1$
+ nameField = createTextField(userPrefs);
+
+ createLabel(userPrefs, "Author Email: "); //$NON-NLS-1$
+ emailField = createTextField(userPrefs);
+
+ createSpacer(mainComposite, 2);
+
+ Group shellPrefs = new Group(mainComposite, SWT.NONE);
+ shellPrefs.setText("Shell Commands"); //$NON-NLS-1$
+ layout = new GridLayout();
+ layout.numColumns = 3;
+ shellPrefs.setLayout(layout);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ shellPrefs.setLayoutData(gd);
+
+ String spacer = ": "; //$NON-NLS-1$
+ String title = "rpm"; //$NON-NLS-1$
+ createLabel(shellPrefs, title + spacer);
+ rpmField = createTextField(shellPrefs);
+ createBrowseButton(shellPrefs, rpmField, title);
+
+ title = "rpmbuild"; //$NON-NLS-1$
+ createLabel(shellPrefs, title + spacer);
+ rpmbuildField = createTextField(shellPrefs);
+ createBrowseButton(shellPrefs, rpmbuildField, title);
+
+ title = "diff"; //$NON-NLS-1$
+ createLabel(shellPrefs, title + spacer);
+ diffField = createTextField(shellPrefs);
+ createBrowseButton(shellPrefs, diffField, title);
+
+ initializeValues();
+
+ return new Composite(parent, SWT.NULL);
+ }
+
+
+ public void widgetDefaultSelected(SelectionEvent event) {
+ //Handle a default selection. Do nothing in this example
+ }
+ /** (non-Javadoc)
+ * Method declared on SelectionListener
+ */
+ public void widgetSelected(SelectionEvent event) {
+ //Do nothing on selection in this example;
+ }
+
+ private class BrowseSelectionListener implements SelectionListener {
+ private Text text;
+ private String title;
+ private Shell parent;
+
+ public BrowseSelectionListener(Shell disp, String title, Text text) {
+ this.text = text;
+ this.title = title;
+ this.parent = disp;
+ }
+
+ public void widgetDefaultSelected(SelectionEvent event) {
+ // no action
+ }
+
+ public void widgetSelected(SelectionEvent event) {
+
+ FileDialog fd = new FileDialog(parent, SWT.OPEN | SWT.APPLICATION_MODAL);
+ fd.setText(title);
+ fd.setFileName(text.getText());
+ String result;
+ if( (result = fd.open()) != null )
+ text.setText(result);
+ }
+ }
+ }
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/ChangelogPage.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/ChangelogPage.java
new file mode 100644
index 0000000000..4c97c9130a
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/ChangelogPage.java
@@ -0,0 +1,108 @@
+/*
+ * (c) 2004, 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+package org.eclipse.linuxtools.rpm.ui.propertypage;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.linuxtools.rpm.core.utils.RPMQuery;
+import org.eclipse.linuxtools.rpm.ui.util.ExceptionHandler;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.PropertyPage;
+
+public class ChangelogPage extends PropertyPage {
+
+ private static final String RPM_CHANGELOG_ENTRIES =
+ Messages.getString("ChangelogPage.entries"); //$NON-NLS-1$
+
+ private static final int NAME_FIELD_WIDTH = 20;
+
+ private static final int CL_ENTRIES_FIELD_WIDTH = 80;
+
+ private static final int CL_ENTRIES_FIELD_HEIGHT = 50;
+
+ private Text rpm_nameText;
+
+ private Text rpm_ChangelogEntriesText;
+
+ /**
+ * Constructor for RPMPropertyPage.
+ */
+ public ChangelogPage() {
+ super();
+ }
+
+ private void addChangelogField(Composite parent) {
+ Composite composite = createDefaultComposite(parent);
+
+ // RPM labels and text fields setup
+
+ Label rpmChangelogEntriesLabel = new Label(composite, SWT.NONE);
+ rpmChangelogEntriesLabel.setText(RPM_CHANGELOG_ENTRIES);
+ rpm_ChangelogEntriesText = new Text(composite, SWT.MULTI | SWT.BORDER
+ | SWT.READ_ONLY | SWT.V_SCROLL | SWT.WRAP);
+ GridData gdEntries = new GridData();
+ gdEntries.widthHint = convertWidthInCharsToPixels(CL_ENTRIES_FIELD_WIDTH);
+ gdEntries.heightHint = convertWidthInCharsToPixels(CL_ENTRIES_FIELD_HEIGHT);
+ rpm_ChangelogEntriesText.setLayoutData(gdEntries);
+
+ try {
+ String rpm_ChangelogEntries = RPMQuery.getChangelog((IFile) getElement());
+ rpm_ChangelogEntriesText.setText(rpm_ChangelogEntries);
+ } catch(CoreException e) {
+ ExceptionHandler.handle(e, getShell(),
+ Messages.getString("ErrorDialog.title"), e.getMessage());
+ }
+
+ }
+
+ /**
+ * @see PreferencePage#createContents(Composite)
+ */
+ protected Control createContents(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ composite.setLayout(layout);
+ GridData data = new GridData(GridData.FILL);
+ data.grabExcessHorizontalSpace = true;
+ composite.setLayoutData(data);
+
+ addChangelogField(composite);
+ return composite;
+ }
+
+ private Composite createDefaultComposite(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ composite.setLayout(layout);
+
+ GridData data = new GridData();
+ data.verticalAlignment = GridData.FILL;
+ data.horizontalAlignment = GridData.FILL;
+ composite.setLayoutData(data);
+
+ return composite;
+ }
+
+ protected void performDefaults() {
+
+ }
+
+ public boolean performOk() {
+
+ return true;
+ }
+
+} \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/InstallScriptsPage.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/InstallScriptsPage.java
new file mode 100644
index 0000000000..bf9d04aa26
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/InstallScriptsPage.java
@@ -0,0 +1,157 @@
+/*
+ * (c) 2004, 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+package org.eclipse.linuxtools.rpm.ui.propertypage;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.linuxtools.rpm.core.utils.RPMQuery;
+import org.eclipse.linuxtools.rpm.ui.util.ExceptionHandler;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.PropertyPage;
+
+public class InstallScriptsPage extends PropertyPage {
+
+ private static final String RPM_PRE_INSTALL = Messages.getString("InstallScriptsPage.PreinstallScript"); //$NON-NLS-1$
+
+ private static final String RPM_POST_INSTALL = Messages.getString("InstallScriptsPage.PostinstallScript"); //$NON-NLS-1$
+
+ private static final String RPM_PRE_UNINSTALL = Messages.getString("InstallScriptsPage.PreuninstallScript"); //$NON-NLS-1$
+
+ private static final String RPM_POST_UNINSTALL = Messages.getString("InstallScriptsPage.PostuninstallScript"); //$NON-NLS-1$
+
+ private static final int NAME_FIELD_WIDTH = 20;
+
+ private static final int SCRIPT_ENTRIES_FIELD_WIDTH = 80;
+
+ private static final int SCRIPT_ENTRIES_FIELD_HEIGHT = 20;
+
+ private Text rpm_nameText;
+
+ private Text rpm_PreInstallText;
+
+ private Text rpm_PostInstallText;
+
+ private Text rpm_PreUnInstallText;
+
+ private Text rpm_PostUnInstallText;
+
+ /**
+ * Constructor for RPMPropertyPage.
+ */
+ public InstallScriptsPage() {
+ super();
+ }
+
+ private void addScriptFields(Composite parent) {
+ Composite composite = createDefaultComposite(parent);
+
+ // RPM labels and text fields setup
+
+ Label rpmPreInstallLabel = new Label(composite, SWT.NONE);
+ rpmPreInstallLabel.setText(RPM_PRE_INSTALL);
+ rpm_PreInstallText = new Text(composite, SWT.MULTI | SWT.BORDER
+ | SWT.READ_ONLY | SWT.V_SCROLL | SWT.WRAP);
+ GridData gdPreInst = new GridData();
+ gdPreInst.widthHint = convertWidthInCharsToPixels(SCRIPT_ENTRIES_FIELD_WIDTH);
+ gdPreInst.heightHint = convertWidthInCharsToPixels(SCRIPT_ENTRIES_FIELD_HEIGHT);
+ rpm_PreInstallText.setLayoutData(gdPreInst);
+
+ Label rpmPostInstallLabel = new Label(composite, SWT.NONE);
+ rpmPostInstallLabel.setText(RPM_POST_INSTALL);
+ rpm_PostInstallText = new Text(composite, SWT.MULTI | SWT.BORDER
+ | SWT.READ_ONLY | SWT.V_SCROLL | SWT.WRAP);
+ GridData gdPostInst = new GridData();
+ gdPostInst.widthHint = convertWidthInCharsToPixels(SCRIPT_ENTRIES_FIELD_WIDTH);
+ gdPostInst.heightHint = convertWidthInCharsToPixels(SCRIPT_ENTRIES_FIELD_HEIGHT);
+ rpm_PostInstallText.setLayoutData(gdPostInst);
+
+ Label rpmPreUnInstallLabel = new Label(composite, SWT.NONE);
+ rpmPreUnInstallLabel.setText(RPM_PRE_UNINSTALL);
+ rpm_PreUnInstallText = new Text(composite, SWT.MULTI | SWT.BORDER
+ | SWT.READ_ONLY | SWT.V_SCROLL | SWT.WRAP);
+ GridData gdPreUnInst = new GridData();
+ gdPreUnInst.widthHint = convertWidthInCharsToPixels(SCRIPT_ENTRIES_FIELD_WIDTH);
+ gdPreUnInst.heightHint = convertWidthInCharsToPixels(SCRIPT_ENTRIES_FIELD_HEIGHT);
+ rpm_PreUnInstallText.setLayoutData(gdPreUnInst);
+
+ Label rpmPostUnInstallLabel = new Label(composite, SWT.NONE);
+ rpmPostUnInstallLabel.setText(RPM_POST_UNINSTALL);
+ rpm_PostUnInstallText = new Text(composite, SWT.MULTI | SWT.BORDER
+ | SWT.READ_ONLY | SWT.V_SCROLL | SWT.WRAP);
+ GridData gdPostUnInst = new GridData();
+ gdPostUnInst.widthHint = convertWidthInCharsToPixels(SCRIPT_ENTRIES_FIELD_WIDTH);
+ gdPostUnInst.heightHint = convertWidthInCharsToPixels(SCRIPT_ENTRIES_FIELD_HEIGHT);
+ rpm_PostUnInstallText.setLayoutData(gdPostUnInst);
+
+ // Populate RPM text fields
+ try {
+ IFile rpmFile = (IFile) getElement();
+ String rpm_PreInstall = RPMQuery.getPreInstallScript(rpmFile);
+ rpm_PreInstallText.setText(rpm_PreInstall);
+
+ String rpm_PostInstall = RPMQuery.getPostInstallScript(rpmFile);
+ rpm_PostInstallText.setText(rpm_PostInstall);
+
+ String rpm_PreUnInstall = RPMQuery.getPreUninstallScript(rpmFile);
+ rpm_PreUnInstallText.setText(rpm_PreUnInstall);
+
+ String rpm_PostUnInstall = RPMQuery.getPostUninstallScript(rpmFile);
+ rpm_PostUnInstallText.setText(rpm_PostUnInstall);
+ } catch(CoreException e) {
+ ExceptionHandler.handle(e, getShell(),
+ Messages.getString("ErrorDialog.title"), e.getMessage());
+ }
+
+ }
+
+ /**
+ * @see PreferencePage#createContents(Composite)
+ */
+ protected Control createContents(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ composite.setLayout(layout);
+ GridData data = new GridData(GridData.FILL);
+ data.grabExcessHorizontalSpace = true;
+ composite.setLayoutData(data);
+
+ addScriptFields(composite);
+ return composite;
+ }
+
+ private Composite createDefaultComposite(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ composite.setLayout(layout);
+
+ GridData data = new GridData();
+ data.verticalAlignment = GridData.FILL;
+ data.horizontalAlignment = GridData.FILL;
+ composite.setLayoutData(data);
+
+ return composite;
+ }
+
+ protected void performDefaults() {
+
+ }
+
+ public boolean performOk() {
+
+ return true;
+ }
+
+} \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/Messages.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/Messages.java
new file mode 100644
index 0000000000..c955e36f24
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/Messages.java
@@ -0,0 +1,30 @@
+/*
+ * (c) 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+package org.eclipse.linuxtools.rpm.ui.propertypage;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.rpm.ui.propertypage.messages"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private Messages() {
+ }
+
+ public static String getString(String key) {
+ // TODO Auto-generated method stub
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/ProvidesPage.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/ProvidesPage.java
new file mode 100644
index 0000000000..84c9057878
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/ProvidesPage.java
@@ -0,0 +1,111 @@
+/*
+ * (c) 2004, 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+package org.eclipse.linuxtools.rpm.ui.propertypage;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.linuxtools.rpm.core.utils.RPMQuery;
+import org.eclipse.linuxtools.rpm.ui.util.ExceptionHandler;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.PropertyPage;
+
+public class ProvidesPage extends PropertyPage {
+
+ private static final String RPM_QL = Messages.getString("ProvidesPage.Provides"); //$NON-NLS-1$
+
+ private static final int NAME_FIELD_WIDTH = 20;
+
+ private static final int QL_FIELD_WIDTH = 80;
+
+ private static final int QL_FIELD_HEIGHT = 40;
+
+ private Text rpm_nameText;
+
+ private Text rpm_qlText;
+
+ /**
+ * Constructor for RPMPropertyPage.
+ */
+ public ProvidesPage() {
+ super();
+ }
+
+ private void addProvidesField(Composite parent) {
+ Composite composite = createDefaultComposite(parent);
+
+ // RPM labels and text fields setup
+
+ Label rpmDescriptionLabel = new Label(composite, SWT.NONE);
+ rpmDescriptionLabel.setText(RPM_QL);
+ rpm_qlText = new Text(composite, SWT.MULTI | SWT.BORDER | SWT.READ_ONLY
+ | SWT.V_SCROLL | SWT.WRAP);
+ GridData gdQL = new GridData();
+ gdQL.widthHint = convertWidthInCharsToPixels(QL_FIELD_WIDTH);
+ gdQL.heightHint = convertWidthInCharsToPixels(QL_FIELD_HEIGHT);
+ rpm_qlText.setLayoutData(gdQL);
+
+ // Populate RPM text fields
+ String rpm_path = ((IResource) getElement()).getRawLocation()
+ .toString();
+
+ try {
+ String rpm_ql = RPMQuery.getProvides((IFile) getElement());
+ rpm_qlText.setText(rpm_ql);
+ } catch(CoreException e) {
+ ExceptionHandler.handle(e, getShell(),
+ Messages.getString("ErrorDialog.title"), e.getMessage());
+ }
+
+ }
+
+ /**
+ * @see PreferencePage#createContents(Composite)
+ */
+ protected Control createContents(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ composite.setLayout(layout);
+ GridData data = new GridData(GridData.FILL);
+ data.grabExcessHorizontalSpace = true;
+ composite.setLayoutData(data);
+
+ addProvidesField(composite);
+ return composite;
+ }
+
+ private Composite createDefaultComposite(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ composite.setLayout(layout);
+
+ GridData data = new GridData();
+ data.verticalAlignment = GridData.FILL;
+ data.horizontalAlignment = GridData.FILL;
+ composite.setLayoutData(data);
+
+ return composite;
+ }
+
+ protected void performDefaults() {
+
+ }
+
+ public boolean performOk() {
+
+ return true;
+ }
+
+} \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/SpecFileHeaderPage.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/SpecFileHeaderPage.java
new file mode 100644
index 0000000000..0c8449ef13
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/SpecFileHeaderPage.java
@@ -0,0 +1,107 @@
+/*
+ * (c) 2004, 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+package org.eclipse.linuxtools.rpm.ui.propertypage;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.linuxtools.rpm.core.utils.RPMQuery;
+import org.eclipse.linuxtools.rpm.ui.util.ExceptionHandler;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.PropertyPage;
+
+public class SpecFileHeaderPage extends PropertyPage {
+
+ private static final String RPM_QI = Messages.getString("SpecFileHeaderPage.info"); //$NON-NLS-1$
+
+ private static final int NAME_FIELD_WIDTH = 20;
+
+ private static final int QI_FIELD_WIDTH = 80;
+
+ private static final int QI_FIELD_HEIGHT = 40;
+
+ private Text rpm_nameText;
+
+ private Text rpm_qiText;
+
+ /**
+ * Constructor for RPMPropertyPage.
+ */
+ public SpecFileHeaderPage() {
+ super();
+ }
+
+ private void addInfoField(Composite parent) {
+ Composite composite = createDefaultComposite(parent);
+
+ // RPM labels and text fields setup
+
+ Label rpmDescriptionLabel = new Label(composite, SWT.NONE);
+ rpmDescriptionLabel.setText(RPM_QI);
+ rpm_qiText = new Text(composite, SWT.MULTI | SWT.BORDER | SWT.READ_ONLY
+ | SWT.V_SCROLL | SWT.WRAP);
+ GridData gdQI = new GridData();
+ gdQI.widthHint = convertWidthInCharsToPixels(QI_FIELD_WIDTH);
+ gdQI.heightHint = convertWidthInCharsToPixels(QI_FIELD_HEIGHT);
+ rpm_qiText.setLayoutData(gdQI);
+
+ // Populate RPM text field
+ try {
+ String rpm_qi = RPMQuery.getHeaderInfo((IFile) getElement());
+ rpm_qiText.setText(rpm_qi);
+ } catch(CoreException e) {
+ ExceptionHandler.handle(e, getShell(),
+ Messages.getString("ErrorDialog.title"), e.getMessage());
+ }
+ }
+
+ /**
+ * @see PreferencePage#createContents(Composite)
+ */
+ protected Control createContents(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ composite.setLayout(layout);
+ GridData data = new GridData(GridData.FILL);
+ data.grabExcessHorizontalSpace = true;
+ composite.setLayoutData(data);
+
+ addInfoField(composite);
+ return composite;
+ }
+
+ private Composite createDefaultComposite(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ composite.setLayout(layout);
+
+ GridData data = new GridData();
+ data.verticalAlignment = GridData.FILL;
+ data.horizontalAlignment = GridData.FILL;
+ composite.setLayoutData(data);
+
+ return composite;
+ }
+
+ protected void performDefaults() {
+
+ }
+
+ public boolean performOk() {
+
+ return true;
+ }
+
+} \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/TargetPage.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/TargetPage.java
new file mode 100644
index 0000000000..7906907d1e
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/TargetPage.java
@@ -0,0 +1,167 @@
+/*
+ * (c) 2004, 2005 Red Hat, Inc.
+ *
+ * This program is open source software licensed under the
+ * Eclipse Public License ver. 1
+ */
+
+package org.eclipse.linuxtools.rpm.ui.propertypage;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.linuxtools.rpm.core.utils.RPMQuery;
+import org.eclipse.linuxtools.rpm.ui.util.ExceptionHandler;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.dialogs.PropertyPage;
+
+public class TargetPage extends PropertyPage {
+
+ private static final String RPM_ARCH = Messages.getString("TargetPage.Architecture"); //$NON-NLS-1$
+
+ private static final String RPM_PLATFORM = Messages.getString("TargetPage.Platform"); //$NON-NLS-1$
+
+ private static final String RPM_OS = Messages.getString("TargetPage.OS"); //$NON-NLS-1$
+
+ private static final String RPM_HOST = Messages.getString("TargetPage.BuildHost"); //$NON-NLS-1$
+
+ private static final String RPM_TIME = Messages.getString("TargetPage.BuildTime"); //$NON-NLS-1$
+
+ private static final int NAME_FIELD_WIDTH = 20;
+
+ private static final int ARCH_FIELD_WIDTH = 8;
+
+ private static final int PLATFORM_FIELD_WIDTH = 20;
+
+ private static final int OS_FIELD_WIDTH = 10;
+
+ private static final int HOST_FIELD_WIDTH = 40;
+
+ private static final int TIME_FIELD_WIDTH = 35;
+
+ private Label rpm_nameText;
+
+ private Label rpm_archText;
+
+ private Label rpm_platformText;
+
+ private Label rpm_osText;
+
+ private Label rpm_hostText;
+
+ private Label rpm_timeText;
+
+ /**
+ * Constructor for RPMPropertyPage.
+ */
+ public TargetPage() {
+ super();
+ }
+
+ private void addTargetFields(Composite parent) {
+ Composite composite = createDefaultComposite(parent);
+
+ // RPM labels and text fields setup
+
+ Label rpmArchLabel = new Label(composite, SWT.NONE);
+ rpmArchLabel.setText(RPM_ARCH);
+ rpm_archText = new Label(composite, SWT.HORIZONTAL);
+ GridData gdArch = new GridData();
+ gdArch.widthHint = convertWidthInCharsToPixels(ARCH_FIELD_WIDTH);
+ rpm_archText.setLayoutData(gdArch);
+
+ Label rpmPlatformLabel = new Label(composite, SWT.NONE);
+ rpmPlatformLabel.setText(RPM_PLATFORM);
+ rpm_platformText = new Label(composite, SWT.HORIZONTAL);
+ GridData gdPlatform = new GridData();
+ gdPlatform.widthHint = convertWidthInCharsToPixels(PLATFORM_FIELD_WIDTH);
+ rpm_platformText.setLayoutData(gdPlatform);
+
+ Label rpmOSLabel = new Label(composite, SWT.NONE);
+ rpmOSLabel.setText(RPM_OS);
+ rpm_osText = new Label(composite, SWT.HORIZONTAL);
+ GridData gdOS = new GridData();
+ gdOS.widthHint = convertWidthInCharsToPixels(OS_FIELD_WIDTH);
+ rpm_osText.setLayoutData(gdOS);
+
+ Label rpmHostLabel = new Label(composite, SWT.NONE);
+ rpmHostLabel.setText(RPM_HOST);
+ rpm_hostText = new Label(composite, SWT.HORIZONTAL);
+ GridData gdHost = new GridData();
+ gdHost.widthHint = convertWidthInCharsToPixels(HOST_FIELD_WIDTH);
+ rpm_hostText.setLayoutData(gdHost);
+
+ Label rpmTimeLabel = new Label(composite, SWT.NONE);
+ rpmTimeLabel.setText(RPM_TIME);
+ rpm_timeText = new Label(composite, SWT.HORIZONTAL);
+ GridData gdTime = new GridData();
+ gdTime.widthHint = convertWidthInCharsToPixels(TIME_FIELD_WIDTH);
+ rpm_timeText.setLayoutData(gdTime);
+
+ // Populate RPM text fields
+ try {
+ IFile rpmFile = (IFile) getElement();
+ String rpm_path = ((IResource) getElement()).getRawLocation()
+ .toString();
+ String rpm_arch = RPMQuery.getArch(rpmFile);
+ rpm_archText.setText(rpm_arch);
+ String rpm_platform = RPMQuery.getPlatform(rpmFile);
+ rpm_platformText.setText(rpm_platform);
+ String rpm_os = RPMQuery.getOS(rpmFile);
+ rpm_osText.setText(rpm_os);
+ String rpm_host = RPMQuery.getBuildHost(rpmFile);
+ rpm_hostText.setText(rpm_host);
+ String rpm_time = RPMQuery.getBuildTime(rpmFile);
+ rpm_timeText.setText(rpm_time);
+ } catch(CoreException e) {
+ ExceptionHandler.handle(e, getShell(),
+ Messages.getString("ErrorDialog.title"), e.getMessage());
+ }
+
+ }
+
+ /**
+ * @see PreferencePage#createContents(Composite)
+ */
+ protected Control createContents(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ composite.setLayout(layout);
+ GridData data = new GridData(GridData.FILL);
+ data.grabExcessHorizontalSpace = true;
+ composite.setLayoutData(data);
+
+ addTargetFields(composite);
+ return composite;
+ }
+
+ private Composite createDefaultComposite(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ composite.setLayout(layout);
+
+ GridData data = new GridData();
+ data.verticalAlignment = GridData.FILL;
+ data.horizontalAlignment = GridData.FILL;
+ composite.setLayoutData(data);
+
+ return composite;
+ }
+
+ protected void performDefaults() {
+
+ }
+
+ public boolean performOk() {
+
+ return true;
+ }
+
+} \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/messages.properties b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/messages.properties
new file mode 100644
index 0000000000..f26004e427
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/propertypage/messages.properties
@@ -0,0 +1,13 @@
+ErrorDialog.title=Error
+SpecFileHeaderPage.info=Header Information:
+ChangelogPage.entries=ChangeLog Entries:
+TargetPage.Architecture=Architecture:
+TargetPage.Platform=Platform:
+TargetPage.OS=OS Target:
+TargetPage.BuildHost=Build Host:
+TargetPage.BuildTime=Build Time:
+InstallScriptsPage.PreinstallScript=Pre-install script:
+InstallScriptsPage.PostinstallScript=Post-install script:
+InstallScriptsPage.PreuninstallScript=Pre-uninstall script:
+InstallScriptsPage.PostuninstallScript=Post-uninstall script:
+ProvidesPage.Provides=Files Provided:
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/redhat-system_tools.png b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/redhat-system_tools.png
new file mode 100644
index 0000000000..0cc5d06549
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/redhat-system_tools.png
Binary files differ
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/rpm_strings.properties b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/rpm_strings.properties
new file mode 100644
index 0000000000..965bfb0c79
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/rpm_strings.properties
@@ -0,0 +1,166 @@
+###############################################################################
+# (c) 2004 Red Hat, Inc.
+#
+# This program is open source software licensed under the
+# Eclipse Public License ver. 1
+#
+###############################################################################
+
+RPMExportOperation.Cannot_invoke_core_rpmbuild_class=Cannot invoke the core rpm build class
+RPMExportOperation.Makefile_exists_check=Checking existence of Makefile/makefile
+RPMExportOperation.Create_RPM_directories=Creating RPM directories
+RPMExportOperation.Create_.rpmrc_RPM_resource=Creating .rpmrc RPM resource file
+RPMExportOperation.Creat_.rpmmacro_RPM_resource=Creating .rpmmacro RPM resource file
+RPMExportOperation.Replicate_project_dir=Replicating project directory
+RPMExportOperation.Setting_RPM_spec=Setting RPM spec file
+RPMExportOperation.Retrieving_RPM_info=Retrieving RPM info
+RPMExportOperation.Installing_previous_SRPM_source=Installing previous SRPM source
+RPMExportOperation.Executing_Build_Preparation=Executing Build Preparation
+RPMExportOperation.Modifying_Spec_File=Modifying Spec File
+RPMExportOperation.Generating_patch=Generating patch
+RPMExportOperation.Creating_new_SPEC_file=Creating new SPEC file
+RPMExportOperation.Create_RPM_Tar_file=Create RPM Tar file
+RPMExportOperation.Creating_the_RPM_binary=Creating the RPM binary
+RPMExportOperation.Starting_task=Starting ...
+RPMExportOperation.Cleaning_up_RPM_workarea=Cleaning up RPM work area
+RPMExportOperation.Export_RPM_errors=Export RPM errors
+
+RPMExportPage.Export_an_RPM=Export an RPM
+RPMExportPage.Makefile_pc=Makefile
+RPMExportPage.Makefile_lc=makefile
+RPMExportPage.specify_version_and_release_if_SPEC_file_not_provided=You must specify a version and release if a SPEC file is not provided
+RPMExportPage.selected_project_does_not_have_Makefile=The selected project does not have a Makefile
+RPMExportPage.Cannont_find_file=Cannot find the file:
+RPMExportPage.Core_Exception=Core Exception:
+RPMExportPage.SPEC_file=SPEC file
+RPMExportPage.Version=Version:
+RPMExportPage.Release=\ \ Release:
+RPMExportPage.project_to_export_to_RPM=Select a project to export to RPM
+RPMExportPage.No_c/c++_projects_found=---> No c/c++ projects found <--
+RPMExportPage.Invald_project_specified_(not_c/c++)=Invald project specified (not_c/c++)
+RPMExportPage.Select_project=Select a project
+RPMExportPage.No_c/c++_projects_found_2=---> No c/c++ projects found <---
+RPMExportPage.Binary_RPM_filename=Binary RPM filename
+RPMExportPage.Preserve_RPM_environment=Preserve RPM build environment
+RPMExportPage.Gen_build_log_file=Generate build output log file
+RPMExportPage.Composite_Export_Type=Composite Export Type
+RPMExportPage.Export_Binary=Export a Binary RPM
+RPMExportPage.Export_Source=Export a Source RPM
+RPMExportPage.Fill_in_ver_rel=Specify version and release information
+RPMExportPage.Invalid_ver_rel=Invalid version or release
+RPMExportPage.Select_export_type=Select export type(s)
+RPMExportPage.Select_spec_file=Select a spec file
+RPMExportPage.Not_in_specs=Spec file must be in SPECS folder
+RPMExportPage.Spec_file_does_not_exist=Selected spec file does not exist
+
+
+RPMexportwiz.Export_an_RPM_title=Export an RPM
+
+SRPMImportPage.Configured_New_Project=Import into project &configured using the New Project Wizard
+SRPMImportPage.Project_does_not_exist=Project does not exist. Please select a project
+SRPMImportPage.Problems_identifying_import_source_directory=Problems identifying import source directory
+SRPMImportPage.SRPM_Name=SRPM
+SRPMImportPage.Import_SRPM=Import SRPM
+SRPMImportPage.Select_project_to_import=Select a project to import an SRPM into
+SRPMImportPage.No_objects_selected_to_be_imported=No objects have been selected to be imported
+SRPMImportPage.Errors_importing_SRPM=Errors encountered importing the SRPM
+SRPMImportPage.Preserve_SRPM_envionment=Preserve SRPM envionment
+SRPMImportPage.Create_logfile_operations=Create a logfile of operations
+SRPMImportPage.Browse=Browse...
+SRPMImportPage.Errors_importing_SRPM=Errors encountered importing the SRPM
+SRPMImportPage.Errors_importing_SRPM_2=Errors encountered importing the SRPM
+SRPMImportPage.ApplyPatches=Apply all patches to pristine source
+SRPMImportPage.runAutoConf=Run AutoConf (configure) if applicable
+SRPMImportPage.preserveRPMenvironment=Preserve RPM environment
+SRPMImportPage.Source_not_Valid=Source File is not a valid file
+SRPMImportPage.No_src_rpm_ext=Filename does not have src.rpm extension
+SRPMImportPage.Build_Options=Build Options
+SRPMImportPage.import_srpm_into=Import SRPM into...
+SRPMImportwizard.Import_an_SRPM=Import an SRPM
+SRPMImportPage.No_projects_found=No projects found
+
+
+SRPMImportPage.toolTip_ApplyPatches=Typically, an SRPM is comprised of a source tarball\nand a set of patches that are applied to that tarball.\nTherefore changes are made to the SRPM in the form of\npatches, while leaving the original source 'pristine'\n\nThis option allows you to import the unpatched\n'pristine' source code, and not apply patches
+SRPMImportPage.toolTip_runAutoConf=Many projects use autoconf to create their\nbuild environments automatically. Typically,\nthis is done by running the 'configure' script that\ncreates, among other things, a Makefile\n\nClick this option to run the configure step if this\nis an autoconf project
+SRPMImportPage.toolTip_preserveEnv=Click to preserve the RPM environment after import\nThis option is normally only used for debugging.
+SRPMImportPage.toolTip_genLog=Click to generate a log of the import process
+SRPMImportPage.toolTip_SRPM_Name=Name of SRPM file to import into a project
+SRPMImportPage.toolTip_Open_file_navigator=Click to open a file navigator to select an SRPM file
+SRPMImportPage.toolTip_project_destination=Select a project as a destination for the imported SRPM files
+
+RPMExportOperation.Starting=Starting ...
+RPMExportOperation.0=Error message not defined
+RPMExportOperation.Open_SRPM_Errors=Export RPM Errors
+RPMExportOperation.Starting_SRPM_Export=Starting SRPM Export Operation
+RPMExportOperation.Executing_SRPM_Export=Executing SRPM Export
+RPMExportOperation.Starting_RPM_Export=Starting RPM Export Operation
+RPMExportOperation.Executing_RPM_Export=Executing RPM Export
+
+RPMExportPage.Export_SRPM=Export SRPM
+RPMExportPage.Export_SRPM_from_project=Export an SRPM from a project
+RPMExportPage.Select_project_export=Select a project to export
+RPMExportPage.Makefile_pc=Makefile
+RPMExportPage.makefile_lc=makefile
+RPMExportPage.project_does_not_have_Makefile=The selected project does not have a Makefile
+RPMExportPage.No_c/c++_projects_found=---> No c/c++ projects found <---
+RPMExportPage.Invald_project_specified=Invald project specified (not c/c++)
+RPMExportPage.Patch_must_have_name=Patch must have a name
+RPMExportPage.must_supply_version_number=You must supply a version number
+RPMExportPage.must_supply_release_number=You must supply a release number
+RPMExportPage.version_or_release_change=Either version or release must change for exporting
+RPMExportPage.Patch_have_descriptive_tag=Patch must have a short descriptive tag
+RPMExportPage.Patch_tag_cannot_have_spaces=Patch tag cannot have any spaces
+RPMExportPage.Patch_must_have_changelog=Patch must have a changelog entry
+RPMExportPage.Errors_encountered_importing_SRPM=Errors encountered importing the SRPM
+RPMExportPage.SPEC_file=SPEC file
+RPMExportPage_2.0=Enter patch/changelog information for spec file
+RPMExportPage_2.1=Patch name contains invalid character(s)
+RPMExportPage_2.2=Enter patch/changelog information for spec file
+RPMExportPage_2.3=Patch name is not unique
+RPMExportPage_2.4=Enter changelog entry info
+RPMExportPage_2.5=Enter a patch name
+RPMExportPage.Generate_patch=Generate patch (against previously imported SRPM)
+RPMExportPage.YourName=YourName
+RPMExportPage.your@mail.com=mail.com
+RPMExportPage.Patch_Options=Patch Options
+RPMExportPage.Patch_Name=Patch Name:
+RPMExportPage.Patch_Tag=Patch Tag
+RPMExportPage.Patch_Changelog_Stamp=Changelog Date Stamp:
+RPMExportPage.Patch_Changelog=Changelog Comment:
+RPMExportPage.Version=\ \Version:
+RPMExportPage.Release=\ \Release:
+RPMExportPage.RPM_Export_Filename=RPM Export Filename
+RPMExportPage.groupPatchTitle=Patch Needed
+RPMExportPage.needPatch_Project=The project
+RPMExportPage.needPatch_desc=\ has changed since last imported as an SRPM. To continue export\nas an SRPM, you will have to generate a patch (on the next page)
+
+
+RPMExportPage.toolTip_Export_Binary=Enable to export a Binary RPM
+RPMExportPage.toolTip_Export_Source=Enable to export a source RPM
+RPMExportPage.toolTip_Select_a_project=Select a project as a source for the exported RPM/SRPM
+RPMExportPage.toolTip_SpecFile=Select an RPM SPEC file to export the project.\nA list of SPEC files found in the project are already placed in the combo box,\nor choose another SPEC file using the Browse button.
+RPMExportPage.toolTip_file_navigator=Click to open a file navigator to select an external SPEC file
+RPMExportPage.toolTip_Version=The Version associated with this RPM.\nChange the version here to change the\nversion of the RPM.
+RPMExportPage.toolTip_Release=The Release associated with this RPM.\nChange the release here to change the release number of the RPM.
+RPMExportPage.toolTip_Patch_Name=Patch Name - unique identifier for the patch.
+RPMExportPage.toolTip_Changelog_Stamp=Changelog Date - Date stamp for the changelog entry. \n\nExample: * Wed Oct 12 2003 -- John Doe <jdoe@redhat.com>
+RPMExportPage.toolTip_Changelog=Changelog Comment - short descriptive summary of change made in patch\n\nExample: - Fixed bugzilla entry #125642
+
+RPMPage.Browse=Browse...
+RPMPage.Select_a_project=Select a project ...
+RPMPage.No_RPM_projects_found=No RPM projects found
+
+
+RPMExportWizard.Export_an_SRPM=Export an SRPM
+
+SRPMImportOperation.Starting=Starting ...
+SRPMImportOperation.import=import
+SRPMImportOperation.0=Error message not defined
+SRPMImportOperation.1=Undefined Error\!
+SRPMImportOperation.2=Undefined Error\!
+SRPMImportOperation.3=Source RPM Import Error
+SRPMImportOperation.Open_SRPM_Errors=Import SRPM Errors=
+SRPMImportOperation.Importing_SRPM=Importing SRPM
+
+ExceptionDialog.seeErrorLogMessage=An exception occurred. See error log for details.
+ErrorDialog.title=Error \ No newline at end of file
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/util/ExceptionHandler.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/util/ExceptionHandler.java
new file mode 100644
index 0000000000..692db5a710
--- /dev/null
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/rpm/ui/util/ExceptionHandler.java
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * Copyright (c) 2001 Rational Software Corp. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v0.5
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v05.html
+ *
+ * Contributors:
+ * Rational Software - initial implementation
+ * Red Hat, Inc. - modified for reuse
+ ******************************************************************************/
+package org.eclipse.linuxtools.rpm.ui.util;
+
+
+import java.io.StringWriter;
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.linuxtools.rpm.ui.Messages;
+import org.eclipse.linuxtools.rpm.ui.RPMUIPlugin;
+
+/**
+ * The default exception handler shows an error dialog when one of its handle methods
+ * is called. If the passed exception is a <code>CoreException</code> an error dialog
+ * pops up showing the exception's status information. For a <code>InvocationTargetException</code>
+ * a normal message dialog pops up showing the exception's message. Additionally the exception
+ * is written to the platform log.
+ */
+public class ExceptionHandler {
+
+ private static ExceptionHandler fgInstance= new ExceptionHandler();
+
+ /**
+ * Logs the given exception using the platform's logging mechanism. The exception is
+ * logged as an error with the error code <code>JavaStatusConstants.INTERNAL_ERROR</code>.
+ */
+ public static void log(Throwable t, String message) {
+ RPMUIPlugin.getDefault().log(new Status(IStatus.ERROR, RPMUIPlugin.ID,
+ 1, message, t));
+ }
+
+ /**
+ * Handles the given <code>CoreException</code>. The workbench shell is used as a parent
+ * for the dialog window.
+ *
+ * @param e the <code>CoreException</code> to be handled
+ * @param title the dialog window's window title
+ * @param message message to be displayed by the dialog window
+ */
+ public static void handle(CoreException e, String title, String message) {
+ handle(e, RPMUIPlugin.getActiveWorkbenchShell(), title, message);
+ }
+
+ /**
+ * Handles the given <code>CoreException</code>.
+ *
+ * @param e the <code>CoreException</code> to be handled
+ * @param parent the dialog window's parent shell
+ * @param title the dialog window's window title
+ * @param message message to be displayed by the dialog window
+ */
+ public static void handle(CoreException e, Shell parent, String title, String message) {
+ fgInstance.perform(e, parent, title, message);
+ }
+
+ /**
+ * Handles the given <code>InvocationTargetException</code>. The workbench shell is used
+ * as a parent for the dialog window.
+ *
+ * @param e the <code>InvocationTargetException</code> to be handled
+ * @param title the dialog window's window title
+ * @param message message to be displayed by the dialog window
+ */
+ public static void handle(InvocationTargetException e, String title, String message) {
+ handle(e, RPMUIPlugin.getActiveWorkbenchShell(), title, message);
+ }
+
+ /**
+ * Handles the given <code>InvocationTargetException</code>.
+ *
+ * @param e the <code>InvocationTargetException</code> to be handled
+ * @param parent the dialog window's parent shell
+ * @param title the dialog window's window title
+ * @param message message to be displayed by the dialog window
+ */
+ public static void handle(InvocationTargetException e, Shell parent, String title, String message) {
+ fgInstance.perform(e, parent, title, message);
+ }
+
+ //---- Hooks for subclasses to control exception handling ------------------------------------
+
+ protected void perform(CoreException e, Shell shell, String title, String message) {
+ RPMUIPlugin.getDefault().log(e);
+ IStatus status= e.getStatus();
+ if (status != null) {
+ ErrorDialog.openError(shell, title, message, status);
+ } else {
+ displayMessageDialog(e, e.getMessage(), shell, title, message);
+ }
+ }
+
+ protected void perform(InvocationTargetException e, Shell shell, String title, String message) {
+ Throwable target= e.getTargetException();
+ if (target instanceof CoreException) {
+ perform((CoreException)target, shell, title, message);
+ } else {
+ RPMUIPlugin.getDefault().log(e);
+ if (e.getMessage() != null && e.getMessage().length() > 0) {
+ displayMessageDialog(e, e.getMessage(), shell, title, message);
+ } else {
+ displayMessageDialog(e, target.getMessage(), shell, title, message);
+ }
+ }
+ }
+
+ //---- Helper methods -----------------------------------------------------------------------
+
+ private void displayMessageDialog(Throwable t, String exceptionMessage, Shell shell, String title, String message) {
+ StringWriter msg= new StringWriter();
+ if (message != null) {
+ msg.write(message);
+ msg.write("\n\n"); //$NON-NLS-1$
+ }
+ if (exceptionMessage == null || exceptionMessage.length() == 0)
+ msg.write(Messages.getString("ExceptionDialog.seeErrorLogMessage")); //$NON-NLS-1$
+ else
+ msg.write(exceptionMessage);
+ MessageDialog.openError(shell, title, msg.toString());
+ }
+}
diff --git a/systemtap/.project b/systemtap/.project
deleted file mode 100644
index 37d3b6d89f..0000000000
--- a/systemtap/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.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/systemtap/SystemTapGuiServer/.project b/systemtap/SystemTapGuiServer/.project
deleted file mode 100644
index 229b52a144..0000000000
--- a/systemtap/SystemTapGuiServer/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>SystemTapGuiServer</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
diff --git a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/MailBox.cpp b/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/MailBox.cpp
deleted file mode 100644
index 298ae111e1..0000000000
--- a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/MailBox.cpp
+++ /dev/null
@@ -1,328 +0,0 @@
-#include "include/stapdebug.hpp"
-#include <iostream>
-using std::cout;
-using std::endl;
-using std::cerr;
-
-#include "include/MailBox.hpp"
-#include "include/confReader.hpp"
-#include "include/dmerror.hpp"
-#include "include/common.hpp"
-#include "include/logger.hpp"
-#include "include/datamanager.hpp"
-
-#include <algorithm>
-#include <iostream>
-#include <sstream>
-
-#include <unistd.h>
-#include <arpa/inet.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <strings.h>
-
-using namespace std;
-
-/*
- * TODO All of the pthread calls that might fail need to do something more than
- * report the error, if they move forward after reporting we have the potential
- * to introduce race conditions.
- */
-
-namespace datamanager
-{
-
- // static initializations
- MailBox* MailBox::spMailBox = NULL;
- std::map<int, std::set<int> > MailBox::boxes;
- std::map<int, pthread_mutex_t> MailBox::locks;
- std::set<int> MailBox::fds;
- std::map<int, std::set<int> >::iterator MailBox::m_it;
- std::map<int, pthread_mutex_t>::iterator MailBox::pit;
-
- MailBox::~MailBox ()
- {
- std::set<int>::iterator s_it;
- // close all socket file descriptors
-
- for (m_it = boxes.begin(); m_it != boxes.end(); ++m_it)
- for (s_it = m_it->second.begin(); s_it != m_it->second.end(); ++s_it) {
- // this is where we could send one last packet to clients
- //cerr <<"\tClosing : " <<*s_it <<endl;
- close (*s_it);
- }
-
-// for (pit = locks.begin(); pit != locks.end(); ++pit)
-// pthread_mutex_unlock (&pit->second) && pthread_mutex_destroy (&pit->second);
-
- }
-
- MailBox* MailBox::getInstance (void)
- {
- if (spMailBox == 0) spMailBox = new MailBox ();
- return spMailBox;
- }
-
- void MailBox::deleteInstance ()
- {
- if (MailBox::spMailBox == NULL)
- return;
- MailBox *temp = MailBox::spMailBox;
- MailBox::spMailBox = NULL;
- delete temp;
- }
-
- void MailBox::resetMailBoxes ()
- {
-
- fds.clear();
-
- for (m_it = boxes.begin(); m_it != boxes.end(); ++m_it)
- m_it->second.clear ();
-
- boxes.clear();
-
- for (pit = locks.begin(); pit != locks.end(); ++pit)
- pthread_mutex_destroy (&pit->second);
-
- locks.clear();
- }
-
- bool MailBox::isEmpty(int boxnum) const
- { // *no locking, do not call while unsubscribe is being called
- // *check if the mailbox is valid before calling this method!
-
- return boxes[boxnum].size() == 0;
- }
-
- bool MailBox::addClient (int socketfd)
- {
- fds.insert(socketfd);
- return true;
- }
-
- bool MailBox::delClient (int socketfd)
- {
- return fds.erase(socketfd) != 0;
- }
-
- bool MailBox::isClient(int socketfd) const
- {
- if (fds.find(socketfd) != fds.end())
- return true;
- else
- return false;
- }
-
- int MailBox::cleanBox (int boxnum)
- {
- struct dmResponse notice;
-
- /* This script died or completed - notify consumers and cleanup
- * mailbox */
-
- // assemble packet
- notice.beginIdStr = htonl (DM_PACKET_BEGIN);
- notice.src = htonl (DATA_MGR);
- notice.scriptID = htonl (boxnum);
- notice.size = htonl(0);
- notice.returnCode = htonl (DM_NOTICE_SCRIPT_COMPLETED);
-
- if (pthread_mutex_lock (&locks[boxnum])) {
- ostringstream err;
- err <<"Failed to lock!\n";
- Logger log;
- log.log (err.str ());
- }
-
- // for each subscriber in mailbox, write data to socketfd
- std::set<int>::iterator end = boxes[boxnum].end();
- std::set<int>::iterator sit = boxes[boxnum].begin();
-
- for (; sit != end; ++sit) {
- notice.clientID = htonl (*sit);
-
- send (*sit, &notice, sizeof (notice), 0);
- }
-
- coutd << "Emptied mbox: " << boxnum <<endl;
- boxes[boxnum].clear();
-
- if (pthread_mutex_unlock (&locks[boxnum])) {
- ostringstream err;
- err <<"Failed to unlock!\n";
- Logger log;
- log.log (err.str ());
- }
-
- return 0;
- }
-
- bool MailBox::sendData (struct dmResponse *resp)
- //(int boxnum, unsigned int size, void* data, bool errflag)
- {
- char buf[DataManager::BUFFER_SIZE];
- bool rc = true;
- struct dmResponse_header header, *ptr;
-
- if (!ConfReader::getInstance()->isValid(resp->scriptID))
- return false;
-
- // check if mailbox has subscribers or return false,
- // this should not happen now anymore
- if (boxes[resp->scriptID].empty()) {
- ostringstream err;
- err << "sending data to an empty mailbox!?\n";
- Logger log;
- log.log (err.str ());
- return false;
- }
-
- header.beginIdStr = htonl(resp->beginIdStr);
- header.returnCode = htonl(resp->returnCode);
- header.scriptID = htonl(resp->scriptID);
- header.size = htonl(resp->size);
- header.src = htonl(resp->src);
-
- ptr = (dmResponse_header *) buf;
- // build concatenated buffer : header + data
- memset(buf, '\0', DataManager::BUFFER_SIZE);
- memcpy(buf, &header, sizeof(header));
- memcpy(buf + sizeof(header), resp->data, resp->size);
-
- // aquire mutex lock or block
- if (pthread_mutex_lock (&locks[resp->scriptID])) {
- ostringstream err;
- err << "Failed to lock!\n";
- Logger log;
- log.log (err.str ());
- }
-
- // assign iterators
- std::set<int>::iterator end = boxes[resp->scriptID].end();
- std::set<int>::iterator sit = boxes[resp->scriptID].begin();
-
- // for each subscriber in mailbox, write data to socketfd
- for (; sit != end; ++sit) {
- /* Add client id info to buffer, now that we have it */
- ptr->clientID = htonl(*sit);
-
- // if error, assume connection is dead and remove
- if (send (*sit, buf, sizeof (header) + resp->size, 0) < 0) {
- boxes[resp->scriptID].erase (*sit);
- fds.erase (*sit);
- }
- }
-
- if (boxes[resp->scriptID].size() == 0)
- rc = false;
-
- // release lock
- if (pthread_mutex_unlock (&locks[resp->scriptID])) {
- ostringstream err;
- err <<"Failed to unlock!\n";
- Logger log;
- log.log (err.str ());
- }
-
- return rc;
-
- }
-
- int MailBox::unsubscribeAll(int socketfd)
- { // ** not thread safe?
- // ** also, only returns one of possibly many scriptIDs to be stopped by DM
-
- int rc = -1;
-
- // remove socketfd from each mailbox
- for (m_it = boxes.begin(); m_it != boxes.end(); ++m_it) {
-
- if (pthread_mutex_lock (&locks[m_it->first])) {
- ostringstream err;
- err <<"Failed to lock!\n";
- Logger log;
- log.log (err.str ());
- }
- if (m_it->second.erase (socketfd) != 0 && m_it->second.size () == 0)
- rc = m_it->first;
- if (pthread_mutex_unlock (&locks[m_it->first])) {
- ostringstream err;
- err <<"Failed to unlock!\n";
- Logger log;
- log.log (err.str ());
- }
- }
-
- return rc;
- }
-
- int MailBox::subscribe(struct dmRequest *req)
- {
- int retval;
- Logger log;
- int boxnum = req->scriptID;
- int socketfd = req->clientID;
-
- // check if mailbox number is valid or return error
- if (!ConfReader::getInstance()->isValid(boxnum)) {
- return ConfReader::getInstance()->checkScript(boxnum);
- }
-
- if (boxes.find(boxnum) == boxes.end()) {
- // mailbox is not in here, create
- pthread_mutex_init (&locks[boxnum], NULL);
- coutd << "Created lock on box :" << boxnum <<endl;
- }
-
- if (pthread_mutex_lock (&locks[boxnum])) {
- ostringstream err;
- err <<"Failed to lock!\n";
- log.log (err.str ());
- }
-
- retval = boxes[boxnum].insert(socketfd).second;
- coutd << "Added mbox + rx :" << boxnum << " + " << socketfd <<endl;
-
- if (pthread_mutex_unlock (&locks[boxnum])) {
- ostringstream err;
- err <<"Failed to unlock!\n";
- log.log (err.str ());
- }
-
- // note if 0 is ever not returned here there are problems
- return retval ? 0 : DM_ERR_MBOX_DUPLICATE;
- }
-
- int MailBox::unsubscribe(int boxnum, int socketfd)
- {
- int retval;
-
- // check if mailbox number is valid or return false
- if (!ConfReader::getInstance()->isValid(boxnum))
- return ConfReader::getInstance()->checkScript(boxnum);
-
- if (pthread_mutex_lock (&locks[boxnum])) {
- ostringstream err;
- err <<"Failed to lock!\n";
- Logger log;
- log.log (err.str ());
- }
-
- retval = boxes[boxnum].erase(socketfd);
- coutd << "Deleted mbox + rx :" << boxnum << " + " << socketfd <<endl;
-
- if (pthread_mutex_unlock (&locks[boxnum])) {
- ostringstream err;
- err <<"Failed to unlock!\n";
- Logger log;
- log.log (err.str ());
- }
-
- return (retval == 1) ? 0 : DM_ERR_MBOX_DUPLICATE;
- }
-
-} // end of datamanager namespace
diff --git a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/Makefile b/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/Makefile
deleted file mode 100644
index a21dea7fbb..0000000000
--- a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-# Makefile for datamanager daemon
-OBJECTS = subscriptionMgr.o datamanager.o MailBox.o confReader.o dmerror.o \
-common.o logger.o
-TESTOBJS = test/testdriver.o dmerror.o common.o
-LD_FLAGS = -lpthread
-
-all: makefile.dep stapgui-server
-
-makefile.dep : *.cpp include/*.hpp
- for i in *.cpp; do gcc -MM "$${i}"; done > $@
-include makefile.dep
-
-stapgui-server: $(OBJECTS)
- $(CXX) -o $@ $^ $(LD_FLAGS)
-
-.PHONY: clean
-
-clean:
- rm -f stapgui-server $(OBJECTS) $(TESTOBJS) stapgui-server
diff --git a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/common.cpp b/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/common.cpp
deleted file mode 100644
index 2b48e9c139..0000000000
--- a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/common.cpp
+++ /dev/null
@@ -1,185 +0,0 @@
-#include "include/common.hpp"
-#include "include/dmerror.hpp"
-#include <netinet/in.h>
-#include <stdlib.h>
-#include <iostream>
-#include <fcntl.h>
-
-using namespace std;
-namespace datamanager
-{
- /* Convert packet to network byte order */
- struct dmRequest * reqConvToN(struct dmRequest *req)
- {
- /* Only allow conversion once */
- if (req->beginIdStr != DM_PACKET_BEGIN)
- return req;
- cout << "conversion" << req->data;
- req->beginIdStr = htonl(req->beginIdStr);
- req->reqAction = htonl(req->reqAction);
- req->scriptID = htonl(req->scriptID);
- req->clientID = htonl(req->clientID);
- req->size = htonl(req->size);
-// req->data = htonl(req->data);
- return req;
- }
-
- /* Convert packet to host byte order only if needed */
- struct dmRequest * reqConvToH(struct dmRequest *req)
- {
- if (req->beginIdStr == DM_PACKET_BEGIN)
- return req;
- else if (ntohl(req->beginIdStr) == DM_PACKET_BEGIN) {
- req->beginIdStr = ntohl(req->beginIdStr);
- req->reqAction = ntohl(req->reqAction);
- req->scriptID = ntohl(req->scriptID);
- req->clientID = ntohl(req->clientID);
- req->size = ntohl(req->size);
- // req->data = ntohl(req->data);
- }
- return req;
- }
-
- struct dmResponse * respConvToN(struct dmResponse *resp)
- {
- /* Only allow conversion once */
- if (resp->beginIdStr != DM_PACKET_BEGIN)
- return resp;
-
- resp->beginIdStr = htonl(resp->beginIdStr);
- resp->clientID = htonl(resp->clientID);
- resp->scriptID = htonl(resp->scriptID);
- resp->size = htonl(resp->size);
- resp->src = htonl(resp->src);
- resp->returnCode = htonl(resp->returnCode);
-
- return resp;
- }
-
- struct dmResponse * respConvToH(struct dmResponse *resp)
- {
- if (resp->beginIdStr == DM_PACKET_BEGIN)
- return resp;
- else if (ntohl(resp->beginIdStr) == DM_PACKET_BEGIN) {
- resp->beginIdStr = ntohl(resp->beginIdStr);
- resp->clientID = ntohl(resp->clientID);
- resp->scriptID = ntohl(resp->scriptID);
- resp->size = ntohl(resp->size);
- resp->src = ntohl(resp->src);
- resp->returnCode = ntohl(resp->returnCode);
- }
- return resp;
- }
-
- void printReq(struct dmRequest *req)
- {
- cout << "Request Packet: " << endl;
- cout << "\treqAction:" << req->reqAction << " - ";
- switch (req->reqAction) {
- case REQ_CREATE_CONN:
- cout << "Create connection." << endl;
- break;
- case REQ_DESTROY_CONN:
- cout << "Destroy connection." << endl;
- break;
- case REQ_SUBSCRIBE:
- cout << " Subscribing." << endl;
- break;
- case REQ_UNSUBSCRIBE:
- cout << " Unubscribing." << endl;
- break;
- case REQ_GET_STATUS:
- cout << " REQ_GET_STATUS." << endl;
- break;
- case REQ_SUBSCRIPTION_MODIFY:
- cout << " REQ_SUBSCRIPTION_MODIFY." << endl;
- break;
- default:
- cout << " Unknown command. " << endl;
- }
-
- cout << "\tClientID: " << req->clientID << endl;
- cout << "\tScriptID: " << req->scriptID << endl;
- cout << "\tData size: " << req->size << endl;
- cout << "\tData : " << req->data << " -----------------------------" << endl;
- }
-
- bool printResp(struct dmResponse *resp)
- {
- bool rc = false;
- char *str;
-
- if (resp == NULL)
- return false;
-
- cout << "Response Packet: " << endl;
-
- cout << "\tbeginIdStr: ";
- if (resp->beginIdStr == DM_PACKET_BEGIN) {
- cout << " Verified. " << endl;
- rc = true;
- }
- else {
- char *buf;
- cout << " Failed verification. " << endl;
- cout << "Resp ID: " << resp->beginIdStr << endl;
- cout << "Required ID: " << DM_PACKET_BEGIN << endl;
- buf = (char *) resp;
- cout << "Buffer: \n" << endl;
- for (unsigned int i = 0; i < sizeof(*resp); i++)
- cout << i << " : " << buf[i] << endl;
-
- return false;
- }
-
- cout << "\tsrc: " << resp->src;
- switch (resp->src) {
- case STDOUT:
- cout << " STDOUT." << endl;
- break;
- case STDERR:
- cout << " STDERR." << endl;
- break;
- case SUBSCRIPTION_MGR:
- cout << " SUBSCRIPTION_MGR." << endl;
- break;
- case DATA_MGR:
- cout << " DATA_MGR." << endl;
- break;
- case MAILBOX:
- cout << " MAILBOX." << endl;
- break;
- default:
- cout << ": Unknown source. " << endl;
- }
- cout << "\tscriptID: " << resp->scriptID << endl;
- cout << "\tclientID: " << resp->clientID << endl;
- cout << "\tdata size: " << resp->size << endl;
- cout << "\tReturn Code: " << resp->returnCode << " : " << dm_error_print(resp->returnCode) << endl;
-
- if (resp->size > 0) {
- cout << " \t Data: " << endl;
- str = (char *) resp->data;
- for (unsigned int i = 0; i < resp->size; i++)
- cout << str[i];
- cout << endl;
- }
-
- cout << " -----------------------------" << endl;
-
- return rc;
- }
-
- int forceNonBlocking(int fd)
- {
- int flags;
-
- /* Force socket to be non-blocking */
- flags = fcntl(fd, F_GETFL, 0);
- if (flags < 0) {
- return -1;
- }
- fcntl(fd, F_SETFL, flags | O_NONBLOCK);
- return 0;
- }
-}
diff --git a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/confReader.cpp b/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/confReader.cpp
deleted file mode 100644
index e5cef34db6..0000000000
--- a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/confReader.cpp
+++ /dev/null
@@ -1,217 +0,0 @@
-#include "include/confReader.hpp"
-#include "include/logger.hpp"
-#include "include/dmerror.hpp"
-#include "include/common.hpp"
-
-#include <iostream>
-#include <fstream>
-#include <sstream>
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-using namespace std;
-
-namespace datamanager
-{
- // static intitializations
- ConfReader* ConfReader::crInstance = NULL;
-
- ConfReader::ConfReader (void) : scriptMax( 0 ), scriptCount( 0 )
- {
- loadScripts();
- }
-
- void ConfReader::resetConf ()
- {
- // erase everything
- // then reread config file
-
- scriptList.clear();
- loadScripts();
- }
-
- ConfReader* ConfReader::getInstance ()
- {
- if (crInstance == NULL) crInstance = new ConfReader();
- return crInstance;
- }
-
- void ConfReader::setInvalid(int scriptNum)
- {
- if (checkScript(scriptNum) == 1)
- scriptList[scriptNum].valid = DM_ERR_SCRIPT_LOAD;
- }
-
- /** checkScript
- * @brief Looks to see if the physical file represented by a script
- * index exists, and whether it corresponds to a script that should
- * be installed as defined through the script_list.conf file.
- * @ret Returns 1 if script has been found and appears valid,
- * otherwise will return error codes defined in dmerror.hpp
- */
- int ConfReader::checkScript(int scriptNum)
- {
- if ((scriptNum > scriptMax) || (scriptNum < 0)) {
- return DM_ERR_SCRIPT_NOEXIST;
- }
- else if (scriptList[scriptNum].valid == 1) {
- /* already confirmed valid */
- return 1;
- }
- else if (scriptList[scriptNum].valid != -1) {
- /* already confirmed invalid */
- return scriptList[scriptNum].valid;
- }
-
- /* If script has not yet been checked... */
- for (int n = 0; n <= scriptMax; n++) {
- if (scriptNum == scriptList[n].scriptNum) {
- if ((fopen (scriptList[scriptNum].scriptName.c_str(), "r")) == NULL) {
- scriptList[scriptNum].valid = DM_ERR_SCRIPT_NOINST;
- }
- else {
- scriptList[scriptNum].valid = 1;
- }
-
- return scriptList[scriptNum].valid;
- }
- }
-
- scriptList[scriptNum].valid = DM_ERR_SCRIPT_NOEXIST;
- return scriptList[scriptNum].valid;
- }
-
- bool ConfReader::isValid (int scriptNum)
- {
- return checkScript(scriptNum) == 1;
- }
-
- const scriptElement* ConfReader::getScript( int scriptnum )
- {
- if (scriptList.find (scriptnum) == scriptList.end())
- return NULL;
- return &scriptList[scriptnum];
- }
-
- /* parseString
- * @brief Parses out a specific sub-string from a given line of text.
- * The line of text must consist of "-delimited sub-strings. Given
- * this, and a number reference 'str_pos', this function returns the sub-
- * string at position 'str_pos'
- * Note: Count starts at 0
- *
- * @param str_pos: Position of substring in line
- * @param out: Reference to a string, which will hold value of substring
- * at completion
- */
- std::string ConfReader::parseString(const std::string& line, int str_pos)
- {
- int count = 0;
- size_t pos = 0;
- int beg, len;
-
- do {
- beg = line.find('"', pos) + 1;
- pos = line.find('"', beg) + 1;
- len = pos - beg;
- count++;
- } while ((pos != string::npos) && (count < str_pos));
-
- return line.substr(beg, len - 1);
-
- }
-
- int ConfReader::readConfFile(string fileContents)
- {
- ifstream fin (SCRIPTLIST.c_str(), ifstream::in);
- ostringstream str;
- char tmp[512];
-
- if (fin.fail()) {
- ostringstream err;
- err << "Error loading " << SCRIPTLIST << " file" << endl;
- Logger log;
- log.log( err.str( ) );
- return -1;
- }
-
- while(fin.good()) {
- fin.get(tmp, 512);
- str << tmp;
- }
- fileContents = str.str();
- return 0;
- }
-
- int ConfReader::loadScripts()
- {
- using std::ifstream;
- using std::string;
- using std::cout;
- using std::endl;
-
- ifstream fin (SCRIPTLIST.c_str(), ifstream::in);
- string line;
- char tmp_buf[512];
-
- if (fin.fail()) {
- ostringstream err;
- err << "Error loading " << SCRIPTLIST << " file" << endl;
- Logger log;
- log.log( err.str( ) );
- return -1;
- }
-
- while(!fin.eof()) {
- scriptElement cur;
-
- fin.getline(tmp_buf,512);
- line = string(tmp_buf);
-
- if ((line.find('#', 0) == string::npos)
- && (line.length() > 0)) {
- cur.scriptNum = atoi(parseString(line, 1).c_str());
- cur.scriptType = atoi(parseString(line, 2).c_str());
- if (cur.scriptNum > scriptMax) {
- scriptMax = cur.scriptNum;
- }
-
- cur.scriptName = parseString(line, 3);
- cur.format_str = parseString(line, 4);
- cur.args = parseString(line, 5);
- cur.valid = -1;
-
- scriptList.insert( pair<int, scriptElement>( cur.scriptNum, cur ) );
- }
- }
-
- scriptCount = scriptList.size();
- fin.close();
- return 0;
- }
-
- int ConfReader::addScript(struct dmRequest* req)
- {
- scriptElement cur;
- ostringstream os;
- cur.scriptNum = req->scriptID;
- char inputfilename[40];
- sprintf(inputfilename,"/tmp/%s",req->data);
- cur.scriptName = inputfilename;
- if(req->guru == 1)
- cur.scriptType = 5;
- else
- cur.scriptType = 4;
- cur.format_str = "";
- cur.args = "";
- scriptMax = scriptMax + 1;
- if(scriptMax < cur.scriptNum)
- scriptMax = cur.scriptNum;
- cur.valid = -1;
- scriptList.insert( pair<int,scriptElement>(cur.scriptNum, cur) );
- scriptCount = scriptList.size();
- return cur.scriptNum;
- }
-
-} // end of datamanager namespace
diff --git a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/datamanager.cpp b/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/datamanager.cpp
deleted file mode 100644
index 96d9b3ed55..0000000000
--- a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/datamanager.cpp
+++ /dev/null
@@ -1,914 +0,0 @@
- #include "include/datamanager.hpp"
- #include "include/MailBox.hpp"
- #include "include/common.hpp"
- #include "include/confReader.hpp"
- #include "include/dmerror.hpp"
- #include "include/stapdebug.hpp"
- #include "include/logger.hpp"
- #include "include/subscriptionMgr.hpp"
-
- #include <sys/time.h>
- #include <sys/types.h>
- #include <sys/select.h>
- #include <sys/socket.h>
- #include <sys/wait.h>
- #include <sys/un.h>
- #include <dirent.h>
- #include <errno.h>
- #include <fcntl.h>
- #include <string.h>
- #include <signal.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <strings.h>
- #include <unistd.h>
-
- #include <vector>
- #include <iostream>
- #include <sstream>
-
- using namespace std;
- using namespace datamanager;
-
- extern int errno;
-
- const string DataManager::TMP_DIR = "/var/tmp/";
- const string DataManager::DATAMANAGER_SOCKET = TMP_DIR + "stapguidm";
- const string DataManager::STDOUT_SOCK_BASE = TMP_DIR + "stdout-";
- const string DataManager::STDERR_SOCK_BASE = TMP_DIR + "stderr-";
- DataManager* DataManager::spDataMan = NULL;
-
- DataManager* DataManager::getInstance( )
- {
- if( DataManager::spDataMan == NULL )
- {
- DataManager::spDataMan = new DataManager( );
- }
- return DataManager::spDataMan;
- }
- void DataManager::deleteInstance( )
- {
- if( DataManager::spDataMan == NULL )
- return;
- DataManager *temp = DataManager::spDataMan;
- DataManager::spDataMan = NULL;
- delete temp;
- }
-
- DataManager::DataManager( ) : mSetup( false ), mNotificationFd( 0 )
- { }
-
- DataManager::~DataManager( )
- {
- vector<struct stap_process_t*>::iterator i, end;
-
- close( mNotificationFd );
-
- end = mProcessInfo.end( );
- for( i = mProcessInfo.begin( ); i != end; ++i )
- {
- destroyStapProcess( (*i) );
- delete (*i);
- }
- }
-
- bool DataManager::generateStatus( int scriptID ) const
- {
- // Stub for future use
- return true;
- }
-
- void DataManager::run( )
- {
- int stdOut, stdErr, numFd, ret = 0;
- fd_set readSet, temp;
- struct dmRequest req;
- Logger log;
-
- mNotificationFd = setupSocket( );
- if( mNotificationFd < 0 )
- return;
-
- FD_ZERO( &readSet );
- FD_SET( mNotificationFd, &readSet );
-
- numFd = mNotificationFd + 1;
-
- /*
- * This is the main loop for this thread, it waits for data to collect,
- * sends data to the MailBox manager, and manages stap processes.
- */
- while( true )
- {
- memcpy( &temp, &readSet, sizeof( fd_set ) );
- ret = select( numFd, &temp, NULL, NULL, NULL );
- if( ret < 0 )
- {
- ostringstream err;
- err.str() = ("");
- err << "Invalid return from select: '" << strerror( errno ) <<
- "'" << endl;
- log.log( err.str( ) );
- return;
- }
-
- // We got a message from the SubscriptionMgr
- if( FD_ISSET( mNotificationFd, &temp ) )
- {
- // new notification from SM
- recv( mNotificationFd, &req, sizeof( req ), MSG_WAITALL );
- ret = handleNotification( &req, stdOut, stdErr );
-
- if( CREATED_PROCESS == ret )
- {
- //A new Process was started.
- FD_SET( stdOut, &readSet );
- FD_SET( stdErr, &readSet );
- numFd = findHighestFd( ) + 1;
- }
- else if( DESTROYED_PROCESS == ret )
- {
- // A process was destroyed
- FD_CLR( stdOut, &readSet );
- FD_CLR( stdErr, &readSet );
- numFd = findHighestFd( ) + 1;
- }
- else if( SHUTDOWN_DATAMANAGER == ret )
- {
- // Shutdown was requested.
- return;
- }
- }
- else
- { // some process is writing ...
-
- vector<struct stap_process_t*>::iterator i, end;
- end = mProcessInfo.end( );
-
- for( i = mProcessInfo.begin( ); ret > 0 && i != end; ++i )
- {
- struct stap_process_t* curr = (*i);
- /*
- * This section is not an if/else construct because it is
- * possible that select has found data on both the stdout and
- * the stderr socket for a process.
- */
- int bytesCollected = 0;
- if( FD_ISSET( curr->stdOut, &temp ) )
- {
- ret--;
- bytesCollected = collectData( (*i), false );
- if( bytesCollected > 0 )
- {
- if( !sendData( (*i) ) )
- {
- /*
- * Send failed to send data to any clients, stop
- * listening for data
- */
- destroyStapProcess( curr );
- FD_CLR( curr->stdOut, &readSet );
- FD_CLR( curr->stdErr, &readSet );
- delete curr;
- i = mProcessInfo.erase( i );
- numFd = findHighestFd( ) + 1;
- continue;
- }
- }
- }
-
- bytesCollected = 0;
- if( FD_ISSET( (*i)->stdErr, &temp ) )
- {
- ret--;
- bytesCollected = collectData( (*i), true );
- if( bytesCollected > 0 )
- {
- if( !sendData( (*i) ) )
- {
- /*
- * Send failed to send data to any clients, stop
- * listening for data
- */
- destroyStapProcess( curr );
- FD_CLR( curr->stdOut, &readSet );
- FD_CLR( curr->stdErr, &readSet );
- delete curr;
- i = mProcessInfo.erase( i );
- numFd = findHighestFd( ) + 1;
- continue;
- }
- }
- }
-
- /*
- * The waitpid call is used to check the status of this
- * process. waitpid is used instead of kill because if a
- * process has terminated it will be cleaned up before we are
- * notified of its status.
- */
-
- int status, tmp;
- tmp = waitpid( curr->pid, &status, WNOHANG | WUNTRACED);
- if( tmp > 0 &&
- ( WIFEXITED( status ) || WIFSIGNALED( status ) ) )
- {
- // This process has been terminated
- MailBox::getInstance( )->cleanBox( curr->scriptid );
- destroyStapProcess( curr );
- FD_CLR( curr->stdOut, &readSet );
- FD_CLR( curr->stdErr, &readSet );
- delete curr;
- i = mProcessInfo.erase( i );
- numFd = findHighestFd( ) + 1;
- }
- }
- }
- }
- }
-
- int DataManager::collectData( struct stap_process_t* script, bool isError )
- {
- int fd, ret;
- int* size;
- char* buffer;
-
- script->isMessageError = isError;
- if( isError )
- {
- fd = script->stdErr;
- buffer = script->errBuffer;
- size = &( script->errSize );
- }
- else
- {
- fd = script->stdOut;
- buffer = script->outBuffer;
- size = &( script->outSize );
- }
-
- // Reads data
- while( *size < BUFFER_SIZE &&
- ( ret = read( fd, buffer + (*size), BUFFER_SIZE - (*size) ) ) > 0 )
- *size += ret;
-
- if( (*size) > BUFFER_SIZE )
- {
- // Error condition
- ostringstream err;
- if( isError )
- err << "stderr ";
- else
- err << "stdout";
-
- err << "buffer overrun for script " << script->scriptid;
-
- Logger log;
- log.log( err.str( ) );
- cerr << err.str( ) << endl;
- *size = 0;
- memset( buffer, 0, BUFFER_SIZE );
- return 0;
- }
-
- /*
- * Starts at the back of the buffer and walks towards the front until we
- * find the first newline, this delimits a quantum of data and we will only
- * send a complete quantum to the client. If we don't find a newline then
- * we will send the entire buffer.
- */
- while( (*size) >= 0 && buffer[ *size ] != '\n' )
- (*size)--;
-
- if( (*size) < 0 )
- *size = strlen( buffer );
- else
- (*size)++;
-
- return (*size);
- }
-
- /**
- * Forks a process that will exec stap after establishing socket communication
- * with the main process and redirecting stdout and stderr to these sockets.
- * The main process will setup the sockets and listen for incoming connections
- * on them.
- *
- * @param scriptID The ID number of the script to start
- *
- * @return A pointer to the new process structure.
- */
- struct stap_process_t* DataManager::createUserProcess( struct dmRequest *req )
- {
- struct stap_process_t* ret = NULL;
- int pid, fd, len;
- ret = new struct stap_process_t;
- if( ret == NULL )
- {
- Logger log;
- ostringstream err;
- err << "Out of memory" << endl;
- log.log( err.str( ) );
- return ret;
- }
-
- memset( ret, 0, sizeof( struct stap_process_t ));
-
- ret->scriptid = req->scriptID;
-
- if( !setupStapIPC( ret ) )
- {
- delete ret;
- return NULL;
- }
-
- len = sizeof( struct sockaddr_un );
-
- pid = fork( );
- if( pid < 0 )
- {
- ostringstream err;
- err << "Failed to fork:" << strerror( errno ) << endl;
- Logger log;
- log.log( err.str( ) );
- delete ret;
- return NULL;
- }
- else if( pid == 0 )
- {
- setpgid(0,0);
- // Child Process
- execStap( req );
- /*
- * If execStap returns, the exec call failed and we should terminate
- * this process.
- */
-
- exit( 1 );
- }
- else
- {
- // Parent process
- ret->pid = pid;
- ostringstream os;
- struct sockaddr_un local;
- local.sun_family = AF_UNIX;
-
- // Accept the stdOut connection
- os << STDOUT_SOCK_BASE << ret->scriptid;
- strcpy( local.sun_path, os.str( ).c_str( ) );
- fd = accept( ret->stdOut, (struct sockaddr*)&local, (socklen_t*)&len );
- if( fd < 0 )
- goto PARENT_PROC_ERR;
-
- close( ret->stdOut );
- ret->stdOut = fd;
-
- forceNonBlocking(fd);
-
- os.str( "" );
- // Accept the stdErr connection
- os << STDERR_SOCK_BASE << ret->scriptid;
- strcpy( local.sun_path, os.str( ).c_str( ) );
- fd = accept( ret->stdErr, (struct sockaddr*)&local, (socklen_t*)&len );
- if( fd < 0 )
- goto PARENT_PROC_ERR;
-
- forceNonBlocking(fd);
-
- close( ret->stdErr );
- ret->stdErr = fd;
- }
-
- return ret;
-
- PARENT_PROC_ERR:
- ostringstream err;
- err << "Error redirecting stdout or stderr: '" << strerror( errno ) << "'"
- << endl;
- Logger log;
- log.log( err.str( ) );
- close( ret->stdErr );
- close( ret->stdOut );
- kill( ret->pid, SIGINT );
- delete ret;
- return NULL;
- }
-
- /**
- * Close sockets for stdout and stderr, kill the process and remove the socket
- * files.
- */
- void DataManager::destroyStapProcess( struct stap_process_t* script )
- {
- char command[1024];
- close( script->stdOut );
- close( script->stdErr );
- ostringstream os;
- // sprintf(command,"pkill -SIGINT -f .*stapio.*%d.*", script->pid);
- // system(command);
- sprintf(command,"pkill -g %d",script->pid);
- // system(command);
- // sprintf(command,"kill %d",script->pid);
- if(system(command)) {}
- os << DataManager::STDOUT_SOCK_BASE << script->scriptid;
- unlink( os.str( ).c_str( ) );
- os.str( "" );
- os << DataManager::STDERR_SOCK_BASE << script->scriptid;
- unlink( os.str( ).c_str( ) );
-
- }
-
- int DataManager::handleNotification( struct dmRequest *req, int& stdOut, int& stdErr )
- {
- int mailBoxID = req->scriptID;
-
- // If the ID is negative a shutdown has been requested.
- if( mailBoxID < 0 )
- return SHUTDOWN_DATAMANAGER;
-
- /*
- * If the ID is not a valid script to run, nothing to do, not sure if this
- * should be reported.
- */
- if( !ConfReader::getInstance( )->isValid( mailBoxID ) )
- return 0;
-
- vector<struct stap_process_t*>::iterator i, end;
- end = mProcessInfo.end( );
- struct stap_process_t* temp = NULL;
-
- for( i = mProcessInfo.begin( ); i != end; ++i )
- {
- if( (*i)->scriptid == mailBoxID )
- {
- if( MailBox::getInstance( )->isEmpty( mailBoxID ) )
- {
- /*
- * The process exists but there are not any clients subscribed
- * to this box any longer, kill the process.
- */
- temp = (*i);
- mProcessInfo.erase( i );
- destroyStapProcess( temp );
- stdOut = temp->stdOut;
- stdErr = temp->stdErr;
- delete temp;
- return DESTROYED_PROCESS;
- }
- else
- {
- /*
- * The process exists and there are clients subscribed,
- * do nothing
- */
- return 0;
- }
- }
- }
-
- /*
- * The first subscription was added to the specified box, create the
- * process for it
- */
- temp = createUserProcess( req );
- if( temp == NULL )
- return 0;
- stdOut = temp->stdOut;
- stdErr = temp->stdErr;
- mProcessInfo.push_back( temp );
-
- return CREATED_PROCESS;
- }
-
- /**
- * Sets up the socket used to comminucate with the SubscriptionMgr
- */
- int DataManager::setupSocket( )
- {
- int s, fd, ret;
- struct sockaddr_un local;
- s = socket( AF_UNIX, SOCK_STREAM, 0 );
- if( s < 0 )
- {
- ostringstream err;
- err << "Unable to create dm socket: '" << strerror( errno ) << "'" <<
- endl;
- Logger log;
- log.log( err.str( ) );
- return -1;
- }
-
- local.sun_family = AF_UNIX;
- strcpy( local.sun_path, DATAMANAGER_SOCKET.c_str( ) );
-
- ret = bind( s, (struct sockaddr*)&local, sizeof( struct sockaddr_un ) );
- if( ret < 0 )
- {
- ostringstream err;
- err << "Unable to bind dm socket: '" << strerror( errno ) << "'" <<
- endl;
- Logger log;
- log.log( err.str( ) );
- cerr << err.str( ) << endl;
- close( s );
- return -1;
- }
-
-
- ret = listen( s , 1 );
- if( ret < 0 )
- {
- ostringstream err;
- err << "Unable to listen to dm socket: '" << strerror( errno ) << "'" <<
- endl;
- Logger log;
- log.log( err.str( ) );
- cerr << err.str( ) << endl;
- close( s );
- return -1;
- }
-
- ret = sizeof( struct sockaddr_un );
- mSetup = true;
-
- fd = accept( s, (struct sockaddr*)&local, (socklen_t*)&ret );
- if( fd < 0 )
- {
- ostringstream err;
- err << "Error accepting new dm connection: '" << strerror( errno ) <<
- "'" << endl;
- Logger log;
- log.log( err.str( ) );
- cerr << err.str( ) << endl;
- close( s );
- return -1;
- }
- //mSetup = true;
-// if( fd == 0)
- // {
- forceNonBlocking(fd);
-
- close( s );
- mSetup = false;
-
- return fd;
- // }
- }
-
- /**
- * Sets up te sockets to recieve data from this stap process
- */
- bool DataManager::setupStapIPC( struct stap_process_t* script )
- {
- struct sockaddr_un local;
- int fd, len;
- local.sun_family = AF_UNIX;
- len = sizeof( struct sockaddr_un );
- ostringstream os;
-
- os << STDOUT_SOCK_BASE << script->scriptid;
- strcpy( local.sun_path, os.str( ).c_str( ) );
- fd = socket( AF_UNIX, SOCK_STREAM, 0 );
- if( fd < 1 )
- {
- ostringstream err;
- err << "Error creating stdout socket: '" << strerror( errno ) << "'"
- << endl;
- Logger log;
- log.log( err.str( ) );
- return false;
- }
-
- if( 0 > bind( fd, (struct sockaddr*)&local, len ) )
- {
- ostringstream err;
- err << "Error binding stdout socket: '" << strerror( errno ) << "'"
- << endl;
- Logger log;
- log.log( err.str( ) );
- close( fd );
- return false;
- }
-
- if( 0 > listen( fd, 1 ) )
- {
- ostringstream err;
- err << "Error listening on stdout socket: '" << strerror( errno ) << "'"
- << endl;
- Logger log;
- log.log( err.str( ) );
- close( fd );
- return false;
- }
-
- script->stdOut = fd;
-
- os.str( "" );
- os << STDERR_SOCK_BASE << script->scriptid;
- local.sun_path[ 0 ] = 0;
- strcpy( local.sun_path, os.str( ).c_str( ) );
- fd = socket( AF_UNIX, SOCK_STREAM, 0 );
- if( fd < 1 )
- {
- ostringstream err;
- err << "Error creating stderr socket: '" << strerror( errno ) << "'"
- << endl;
- Logger log;
- log.log( err.str( ) );
- return false;
- }
-
- if( 0 > bind( fd, (struct sockaddr*)&local, len ) )
- {
- ostringstream err;
- err << "Error binding stderr socket: '" << strerror( errno ) << "'" <<
- " " << local.sun_path << endl;
- Logger log;
- log.log( err.str( ) );
- close( fd );
- return false;
- }
-
- if( 0 > listen( fd, 1 ) )
- {
- ostringstream err;
- err << "Error listening on stderr socket: '" << strerror( errno ) << "'"
- << endl;
- Logger log;
- log.log( err.str( ) );
- close( fd );
- return false;
- }
-
- script->stdErr = fd;
-
- return true;
- }
-
- /**
- * Connects to data sockets, redirects stdout and stderr then calls exec
- */
- void DataManager::execStap( struct dmRequest *req )
- {
- int stdOut, stdErr;
- struct sockaddr_un local;
- ostringstream os;
- Logger log;
- local.sun_family = AF_UNIX;
- int rc = 0;
- char cmd[75];
-
- const scriptElement* args =
- ConfReader::getInstance( )->getScript( req->scriptID );
-
- if( args == NULL )
- {
- // failed to find script ...
- ostringstream err;
- err << "Failed to find script number : " << req->scriptID << endl;
- Logger log;
- log.log( err.str( ) );
- return;
- }
-
- // Set stdout as unbuffered to avoid double buffering
- setvbuf( stdout, NULL, _IONBF, 0 );
-
- os << STDOUT_SOCK_BASE << req->scriptID;
- strcpy( local.sun_path, os.str( ).c_str( ) );
- stdOut = socket( AF_UNIX, SOCK_STREAM, 0 );
- stdErr = socket( AF_UNIX, SOCK_STREAM, 0 );
- if( stdOut < 0 || stdErr < 0 )
- {
- ostringstream err;
- err << "Error creating output sockets: '" << strerror( errno ) << "'"
- << endl;
- Logger log;
- log.log( err.str( ) );
- return;
- }
-
- if( 0 > dup2( stdOut, STDOUT_FILENO ) ||
- 0 > dup2( stdErr, STDERR_FILENO ) )
- {
- ostringstream err;
- err << "Failed to dup output: " << strerror (errno) << endl;
- Logger log;
- log.log( err.str( ) );
- return;
- }
-
- if( 0 > connect( stdOut, (struct sockaddr*)&local,
- sizeof( struct sockaddr_un ) ) )
- {
- ostringstream err;
- err << "Error connecting to stdout socket: '" << strerror( errno ) << "'"
- << endl;
- Logger log;
- log.log( err.str( ) );
- return;
- }
-
- os.str( "" );
- os << STDERR_SOCK_BASE << req->scriptID;
- strcpy( local.sun_path, os.str( ).c_str( ) );
- if( 0 > connect( stdErr, (struct sockaddr*)&local,
- sizeof( struct sockaddr_un ) ) )
- {
- ostringstream err;
- err << "Error connecting to stderr socket: '" << strerror( errno ) << "'"
- << endl;
- Logger log;
- log.log( err.str( ) );
- return;
- }
- sprintf(cmd,"stap %s",(args->scriptName).c_str());
- // strip data of excess spaces
- int i;
- for(i=0;i<20;i++)
- if(req->data[i] == ' ') {break;}
- char username[i];
- for(int n=0;n<i;n++)
- username[n] = req->data[n];
- username[i]='\0';
-
-
-
- switch(args->scriptType) {
- case (SYSTEM_TAP):
- os.str( "" );
- os << "Executing '" << "stap process. " << endl;
- os << "Command: " << args->scriptName << ", args = " << args->args.c_str( ) << endl;
- log.log( os.str( ) );
- execlp("staprun", "staprun", (args->scriptName).c_str( ), (char*)NULL );
- break;
- case (STP):
- os.str( "" );
- os << "Executing " << "stap stp process. "<< endl;
- os << "Command: " << args->scriptName << endl;
- // sprintf(cmd,"su %s -c \"stap %s\"",username,(args->scriptName).c_str());
- sprintf(cmd,"stap %s", (args->scriptName).c_str());
- // strip data of excess spaces
- // int i;
- // for(i=0;i<20;i++)
- // if(req->data[i] == ' ') {break;}
- // char username[i];
- // for(int n=0;n<i;n++)
- // username[n] = req->data[n];
- // username[i]='\0';
- log.log( os.str( ) );
- os << cmd << endl;
- // system(cmd);
-
- execlp("su","su",username,"-c",cmd,(char*)NULL);
- break;
-
- case (STP_GURU):
- os.str( "" );
- os << "Executing " << "stap -g process. "<< endl;
- os << "Command: " << args->scriptName << endl;
- log.log( os.str( ) );
- sprintf(cmd,"stap -g %s",(args->scriptName).c_str());
- // execlp("stap -g", "stap", (args->scriptName).c_str( ),(char*)NULL);
- execlp("su","su",username,"-c",cmd,(char*)NULL);
- break;
-
- case (BLUEDYE):
- os.str( "" );
- os << "Exec'ing Bluedye Analyzer: Ensuring Module is in place: " << endl;
- log.log(os.str());
- rc = system("modprobe bluedye");
- if (rc) {
- os.str( "" );
- os << "Error: Bluedye Module Not Found. Please install Bluedye package." << endl;
- log.log(os.str());
- exit(1);
- }
- os.str( "" );
- os << "Exec'ing: " << args->scriptName << ", args = " << args->args.c_str( ) << endl;
- log.log(os.str());
- execl(args->scriptName.c_str( ), " ", args->args.c_str( ), (char*) NULL );
- break;
- case (SHELL):
- string cmd;
- cmd = args->scriptName + " " + args->args;
- os.str( "" );
- os << "pid: " << getpid() << ", DMD Execing Shell Cmd: " << cmd << endl;
- log.log(os.str());
- if(system(cmd.c_str())) {}
- exit(0);
- break;
- }
-
- ostringstream err;
- err << "Failed to execute script #: " << cmd << ", Error: " << strerror (errno) << endl;
- log.log( err.str( ) );
-
- exit( 1 );
-}
-
-bool DataManager::sendData( struct stap_process_t* script )
-{
- char* buffer;
- int* size;
- struct dmResponse resp;
-
- /*
- * buffer has the message data, size has how many bytes we
- * should send
- */
- if( script->isMessageError )
- {
- buffer = script->errBuffer;
- resp.src = STDERR;
- size = &( script->errSize );
- }
- else
- {
- buffer = script->outBuffer;
- resp.src = STDOUT;
- size = &( script->outSize );
- }
-
- resp.beginIdStr = DM_PACKET_BEGIN;
- resp.scriptID = script->scriptid;
- resp.data = buffer;
- resp.returnCode = 0;
- resp.size = (*size) + 1;
-
- if( !MailBox::getInstance( )-> sendData( &resp ))
- {
- /*
- * the mailbox appears to be empty, probably because the clients
- * unexpectedly died off.
- */
- return false;
- }
-
- char temp[ DataManager::BUFFER_SIZE + 1 ] = { '\0' };
- strcpy( temp, buffer + (*size) );
- memset( buffer, 0, BUFFER_SIZE );
- strcpy( buffer, temp );
- *size = strlen( buffer );
-
- return true;
-}
-
-int DataManager::findHighestFd( )
-{
- int ret = mNotificationFd;
- vector<struct stap_process_t*>::iterator i, end;
- end = mProcessInfo.end( );
-
- for( i = mProcessInfo.begin( ); i != end; ++i )
- {
- if( (*i)->stdErr >= ret )
- ret = (*i)->stdErr;
- if( (*i)->stdOut >= ret )
- ret = (*i)->stdOut;
- }
- return ret;
-}
-
-void* startDataManager( void* data )
-{
- DataManager* dm = DataManager::getInstance( );
-
- /*
- * This thread will ignore signals, start with a set of ignored signals
- * that ignores all and remove a few key ones.
- */
- sigset_t ignore;
- sigfillset( &ignore );
- sigdelset( &ignore, SIGFPE );
- sigdelset( &ignore, SIGSEGV );
- sigdelset( &ignore, SIGBUS );
- pthread_sigmask( SIG_SETMASK, &ignore, NULL );
- dm->run( );
-
- /*
- * dm->run only returns if we have a fatal error or we recieve the
- * shutdown signal.
- */
- DataManager::deleteInstance( );
-
- // Remove all the socket files
- unlink( DataManager::DATAMANAGER_SOCKET.c_str( ) );
- struct dirent* info;
- DIR* tmpDir = opendir( DataManager::TMP_DIR.c_str( ) );
- if( tmpDir == NULL )
- return NULL;
-
- while( ( info = readdir( tmpDir ) ) != NULL )
- {
- string path = DataManager::TMP_DIR + info->d_name;
- if( path.find( DataManager::STDOUT_SOCK_BASE ) != string::npos ||
- path.find( DataManager::STDERR_SOCK_BASE ) != string::npos )
- {
- unlink( path.c_str( ) );
- }
- }
-
- return NULL;
-}
diff --git a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/dmerror.cpp b/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/dmerror.cpp
deleted file mode 100644
index 09847c209a..0000000000
--- a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/dmerror.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-
-#include "include/dmerror.hpp"
-#include <errno.h>
-#include <string.h>
-
-const char * dm_error_print(uint32_t err)
-{
- if (err == 0)
- return "Success";
-
- if (!(err & DM_ERROR))
- return strerror((int) err);
-
- switch (err) {
- case DM_ERR_MBOX_LOCK:
- return "Mailbox can not be locked or unlocked";
- case DM_ERR_MBOX_DUPLICATE:
- return "Notice: Subscription already removed.";
- case DM_ERR_SOCKET_READ:
- return "Error reading from socket";
- case DM_ERR_LISTEN_SOCKET:
- return "Error on listen socket";
- case DM_ERR_PACKET_FORMAT:
- return "Format of packet sent is unreadable.";
- case DM_ERR_BAD_CLIENTID:
- return "Client specifying a non-allocated clientID";
- case DM_ERR_REQUEST_TYPE:
- return "Unknown request type.";
- case DM_ERR_COMM_CHANNEL:
- return "Communications socket not opened.";
- case DM_ERR_SCRIPT_LOAD:
- return "Error: Script failed to compile/insmod.";
- case DM_ERR_SCRIPT_NOEXIST:
- return "Error: Script does not exist. Possible version difference between client and daemon. ";
- case DM_ERR_SCRIPT_NOINST:
- return "Error: Script has not been installed. Run 'make install' on server.";
- case DM_NOTICE_SCRIPT_COMPLETED:
- return "Notice: Script/command on remote system has completed and exited.";
- case DM_NOTICE_CONNECTION_CLOSED:
- return "Notice: Connection to Data Management Daemon (DMD) has been closed.";
- case DM_NOTICE_CONNECTION_CREATED:
- return "Notice: Connection to Data Management Daemon (DMD) created.";
- case DM_NOTICE_SUB_SUCCESS:
- return "Notice: Client subscribed to script/command output.";
- case DM_NOTICE_UNSUB_SUCCESS:
- return "Notice: Client unsubscribed to script/command.";
- default:
- return "Unknown error";
- }
-}
diff --git a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/docs/README b/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/docs/README
deleted file mode 100644
index b3e8606dfe..0000000000
--- a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/docs/README
+++ /dev/null
@@ -1,113 +0,0 @@
-SystemTapGui
-
-Table of Contents
------------------
-
-1. Introduction
-2. Requirements
-3. Architecture
-4. Installation
-5. Known Bugs
-6. Future Plans
-7. FAQ
-
-
-1. Introduction
-----------------
-
-SystemtapGui is a tool being developed to assist in writing SystemTap
-scripts and viewing kernel performance. It is both an Integrated
-Development Environment for the SystemTap scripting language, as well as
-a data visualization and analysis tool.
-
-The GUI is targetted at System Administrators who want to get
-information out of their system using SystemTap, as well as Developers
-who wish to write new SystemTap scripts. It is an Eclipse-based
-application.
-
-
-2. Requirements
-----------------
-
-Hardware Requirements:
- * x86, x86_64, ppc64, s390
-
-Software Requirements:
- * Linux kernel v2.6.14 or newer
- * Eclipse v3.4
- * SystemTap v0.7 or newer
-
-
-3. Architecture
----------------
-
-The Gui is a client-server application and the server and client can be installed seperately. The client is an eclipse plugin and requires eclipse to be installed. It provides an IDE to write scripts and a visualizer to view the output in graphical form.
- The server (stapgui-server) provides stdout/stderr data collection and process management services for processes run on a remote system. The server executes the SystemTap script, collects all output to stderr and stdout from that process, then funnels it via a socket to the client.
-The client and server can be installed on machines with different architectures.This allows users to monitor remote machines. You may also download and build the source yourself.
-
-4. Installation
-----------------
-
-NOTE: Installation assumes you already have both Eclipse and SystemTap
-installed.
-
- Server
- ------
- 1 Install the systemtapguiserver rpm. Eg on Fedora run the command
- yum install systemtapguiserver
- 2. Run the command 'stapgui-server'. You will get a message saying "Listening for Connections..." in a minute or so which shows that the server is up and running.
-
- Client
- -------
- 1. Install the eclipse-systemtapgui rpm. Eg on Fedora run the command
- yum install eclipse-systemtapgui
- 2. Launch eclipse and open the SystemTap IDE perspective to start writing scripts.
- 3. For detailed help see the Help Section in Eclipse.
-
-5. Known Bugs
---------------
-
-This is a list of known bugs that the developers are aware of and will
-be fixed:
-
-a. Performance issues with large outputs
-
-b. Indicate terminate on self ending scripts
-
-c. Multiple probes can be added for the same line
-
-d. Time-wait between script submission and execution.
-
-
-6. Future Plans
-----------------
-
-The next steps in development are to fix the known bugs in they system
-as well as to improve system performance.
-
-Please post any feedback, whether it be bugs, requested features, or
-general questions. Feedback can be posted directly to the projects
-website (https://sourceforge.net/projects/stapgui/) or to the systemtap
-mailing list. We welcome your input and hope to develop an excellent
-open source tool for the community in the coming months.
-
-
-7. FAQ
---------
-
-
-1. Why does it freeze / do nothing when I try to run a script?
-The script would take 2-3 minutes to execute. The time taken is for the
-script to be transferred to and executed on the remote machine. If you
-do not see a response after 3 minutes make sure SystemTap and your
-kernel are set up properly on the remote machine. For information on how
-to do this visit the SystemTap Wiki at
-http://sourceware.org/systemtap/wiki
-
-2. Why does it take a long time to start up the first time I open the IDE?
-It is running each of the probes to gather information about the
-available variables. This only has to be done once, so its recommended
-that you let it complete. If you don't need this information, you can
-click "Cancel" to stop this process.
-
-END OF DOCUMENT
diff --git a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/MailBox.hpp b/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/MailBox.hpp
deleted file mode 100644
index 24f215ff5b..0000000000
--- a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/MailBox.hpp
+++ /dev/null
@@ -1,145 +0,0 @@
-#ifndef MAILBOX_HPP_
-#define MAILBOX_HPP_
-
-#include <map>
-#include <set>
-
-#include <pthread.h>
-#include "common.hpp"
-
-namespace datamanager
-{
- class MailBox
- {
- friend class SubscriptionMgr;
-
- private:
-// public:
- // only instance of this class
- static MailBox* spMailBox;
-
- // maps and iterators for the mailbox and mutexes
- static std::map<int, std::set<int> > boxes;
- static std::map<int, pthread_mutex_t> locks;
- static std::set<int> fds;
-
- static std::map<int, std::set<int> >::iterator m_it;
- static std::map<int, pthread_mutex_t>::iterator pit;
-
- /**
- * Add a "subscriber" to a mailbox, which will receive the output
- * of a running process. A subscriber is an open file descriptor.
- *
- * @param boxnum The mailbox number, isValidMod(boxnum) must return true.
- * @param socketfd The file descriptor for the open socket that is to be written to.
- * @return STAPDM_MBOX_[INVALID,DUPLICATE,LOCK] for invalid mailbox, duplicate
- * subscription request, and mutex un/locking failures reespectively.
- * 0 on success.
- */
- int subscribe (struct dmRequest *req);
-
- /**
- * Remove a file descriptor from the given mailbox. The file descriptor will
- * no longer be written to.
- *
- * @param boxnum The mailbox number that the file descriptor is in.
- * @param socketfd The file descriptor to be removed.
- * @return STAPDM_MBOX_[INVALID,DUPLICATE,LOCK] for invalid mailbox, duplicate
- * subscription request, and mutex un/locking failures reespectively.
- * 0 on success.
- */
- int unsubscribe (int boxnum, int socketfd);
-
- /**
- * Remove the given clientID/socket fd from all mailboxes. This most likely
- * happens because a client has closed communication with the data manager.
- *
- * @param socketfd The clientID to be removed from all mailboxes.
- * @return The last mailbox from which socketfd was removed and size equals 0
- * or, -1 if that condition was never true.
- */
- int unsubscribeAll(int socketfd);
-
- /**
- * Given a clientID from a request or response packet, this tells if it has been
- * added before to the set of known IDs.
- *
- * @param socketfd The clientID/socket fd to query
- * @return true if it has been previously added, false otherwise
- */
- bool isClient (int socketfd) const;
-
- /**
- * Given a clientID/socket fd, add it to the set of previously seen clientIDs.
- *
- * @param socketfd A clientID/socket fd, most likely from a dmRequest packet
- * return true if the client was added successfully, false otherwise
- */
- bool addClient (int socketfd);
-
- /**
- * Given a clientID/socket fd, remove it from the set of previously seen clientIDs.
- *
- * @param socketfd A clientID/socket fd, most likely from a dmRequest packet
- * @return true if the clientID was removed from the set, false otherwise
- */
- bool delClient (int socketfd);
-
- /**
- * Delete the instance of the mailbox: close all open file descriptors
- * and optionally send a message to each client notifying them of the
- * imminent closure of the data manager.
- */
- void deleteInstance ();
-
- public:
-
- /**
- * The destructor does nothing, this might be removed in the future.
- */
- ~MailBox ();
-
- /**
- * Returns a pointer to an internally maintained <code>MailBox</code>.
- */
- static MailBox* getInstance ();
-
- /**
- * Determines if the given mailbox has any subscribers.
- *
- * @return true, if there are zero subscribers, false otherwise.
- */
- bool isEmpty(int boxnum) const;
-
- /**
- * Send data of length size to all clients subscribed to boxnum from
- * stdout (errflag == false) or stderr (errflag == true). If a client
- * in the mailbox is dead (send error), it is removed.
- *
- * @param boxnum The mailbox to aggregate the data to.
- * @param size The size in bytes of the data.
- * @param data A pointer to the data to be sent, this is probably an array of chars.
- * @param errflag true if the data came from stderr, false otherwise.
- * @return true if data was sent and there are still subscribers, false otherwise
- */
- bool sendData (struct dmResponse *);
-
- /**
- * Send a message to all clients subscribed to given boxnum that the
- * corresponding process is no longer running, and then unsubscribe
- * all of them, leaving the mailbox empty.
- *
- * @param boxnum Which mailbox to clear of subscribers.
- * @return Zero if everything went fine, non zero otherwise.
- */
- int cleanBox (int boxnum);
-
- /**
- * This will remove and reset all mailboxes and their corresponding locks.
- */
- void resetMailBoxes ();
- };
-
-}
-
-#endif /*MAILBOX_HPP_*/
diff --git a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/common.hpp b/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/common.hpp
deleted file mode 100644
index 0368a9e9a4..0000000000
--- a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/common.hpp
+++ /dev/null
@@ -1,112 +0,0 @@
-#ifndef COMMON_H_
-#define COMMON_H_
-
-#include <stdint.h>
-#include <string>
-
-using std::string;
-
-namespace datamanager
-{
- /* static intitializations */
- const string SCRIPTLIST = "/var/tmp/dmd/script_list.conf";
- const string SCRIPT_DIR = "/var/tmp/dmd/scripts/";
-
- struct dmRequest * reqConvToH(struct dmRequest *req);
- struct dmRequest * reqConvToN(struct dmRequest *req);
- struct dmResponse * respConvToH(struct dmResponse *resp);
- struct dmResponse * respConvToN(struct dmResponse *resp);
- void printReq(struct dmRequest *req);
- bool printResp(struct dmResponse *resp);
- int forceNonBlocking(int fd);
-
- /* definitions/declarations possibly needed by a client app */
-
- /* Message passed to datamanager to indicate requested shutdown */
- static const int SHUTDOWN_DATAMANAGER = -1;
-
- /* Identifies beginning of a stap-gui packet */
- static const uint32_t DM_PACKET_BEGIN = 0xa1b2c3d4;
-
- /* primary port for socket communication with
- subscription manager */
- static const int LISTEN_PORT = 22462;
- static const int TIMEOUT_FOR_LISTEN = 5; /* seconds */
-
- /* Valid request types */
- enum reqAction_t {
- REQ_CREATE_CONN = 1,
- REQ_SUBSCRIBE,
- REQ_UNSUBSCRIBE,
- REQ_GET_STATUS,
- REQ_SUBSCRIPTION_MODIFY,
- REQ_DESTROY_CONN,
- REQ_CONFIG_FILE /* TODO : Add support for this. Sends servers
- script_list.conf file to client */
- };
-
- enum reqType_t {
- SYSTEM_TAP = 1,
- BLUEDYE,
- SHELL,
- STP,
- STP_GURU
- };
-
- /* For requests sent from client or dashboard to subscriptionMgr */
- struct dmRequest {
- uint32_t beginIdStr; /* DM_PACKET_BEGIN or other as needed */
- uint32_t reqAction; /* action to take on specified service */
- uint32_t scriptID;
- uint32_t clientID; /* Unique id, set to 0 for first subscription req,
- then set to assigned id for future req's */
- uint32_t guru;
- uint32_t size; /* size of data */
- char data[20]; /* For requests requiring passing of added data */
- };
-
- enum dmResponseDataSources {
- STDOUT = 1,
- STDERR,
- SUBSCRIPTION_MGR,
- DATA_MGR,
- MAILBOX
- };
-
- /* Response Packet: for packaging by mailbox, will be sent in this format
- * to client (consumer) */
- struct dmResponse {
- uint32_t beginIdStr; /* DM_PACKET_BEGIN or other as needed */
- uint32_t src; /* identifies data or error source -lookup in dmResponseDataSources */
- uint32_t scriptID;
- uint32_t clientID; /* Unique id, generated by data manager during first
- request, then included with all data packets */
- uint32_t returnCode; /* Optional return code from request */
- uint32_t size; /* size of data */
- void *data;
- };
-
- struct dmResponse_header {
- uint32_t beginIdStr; /* DM_PACKET_BEGIN or other as needed */
- uint32_t src; /* identifies data or error source -lookup in dmResponseDataSources */
- uint32_t scriptID;
- uint32_t clientID; /* Unique id, generated by data manager during first
- request, then included with all data packets */
- uint32_t returnCode; /* Optional return code from request */
- uint32_t size; /* size of data */
- };
-
- /* Holds data as read from script_list.conf */
- struct scriptElement {
- int scriptType;
- int scriptNum;
- string scriptName;
- string format_str; /* describes format of data returned from script */
- string args;
- int valid;
- };
-
-}
-
-#endif /*COMMON_H_*/
-
diff --git a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/confReader.hpp b/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/confReader.hpp
deleted file mode 100644
index c5f29cc348..0000000000
--- a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/confReader.hpp
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef CONFREADER_HPP_
-#define CONFREADER_HPP_
-
-#include <string>
-#include <map>
-
-#include "common.hpp"
-
-namespace datamanager
-{
- class ConfReader
- {
- private:
- static ConfReader* crInstance;
-
- // map of script# -> scriptElement, plus iterators
- std::map<int, scriptElement> scriptList;
-
- // currently unused
- int scriptMax, scriptCount;
-
- ConfReader();
- int loadScripts ();
- std::string parseString (const std::string& line, int str_pos);
-
- public:
- static ConfReader* getInstance ();
- int getScriptCount () const;
- bool isValid (int scriptNum);
- void setInvalid(int scriptNum);
- int checkScript(int scriptNum);
- int addScript(struct dmRequest* req);
- void resetConf ();
- static int readConfFile(string fileContents);
- const scriptElement* getScript( int index );
- };
-
-}
-#endif /*ConfReader_HPP_*/
diff --git a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/datamanager.hpp b/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/datamanager.hpp
deleted file mode 100644
index 98f3d28bfd..0000000000
--- a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/datamanager.hpp
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * License stuff goes here.
- */
-
-#ifndef DATAMANAGER_H_
-#define DATAMANAGER_H_
-
-#include <string>
-#include <vector>
-
-using namespace std;
-
-namespace datamanager
-{
-
- /**
- * The DataManager class implements the Singleton pattern. It will be
- * responsible for collecting data quanta from the open stap process and
- * passing that data to the MailBox class for distribution. DataManager
- * will also handle start up and shutdown of stap processesat the appropriate
- * time.
- *
- * @Class DataManager
- *
- * @ingroup stapguidm
- *
- * @brief Handles startup, shutdown, and data collection for stap scripts.
- */
-
- class DataManager
- {
- public:
-
- ~DataManager( );
-
- /**
- * Gets the status of the specified script
- *
- * @param scriptID
- * The id number for the script to query.
- *
- * @return
- * True if the process is alive or has been killed normally,
- * otherwise false.
- */
- bool generateStatus( int scriptID ) const;
-
- /**
- * Main DataManager method. Runs a tight loop using select
- * for notification that data is ready to be collected.
- */
- void run( );
-
- /**
- * Returns setup status for the DataManager
- *
- * @return
- * true if setup is finished, false otherwise
- */
- inline bool isSetup( ) { return mSetup; }
-
- /**
- * Returns a reference to the DataManager, constructs one if
- * necessary.
- *
- * @return
- * Refence to the DataManager.
- */
- static DataManager* getInstance( );
-
- /**
- * Deletes the instance of DataManager and sets pointer to NULL.
- */
- static void deleteInstance( );
-
- static const int BUFFER_SIZE = 4095;
- static const int CREATED_PROCESS = 1;
- static const int DESTROYED_PROCESS = 2;
- static const string DATAMANAGER_SOCKET;
- static const string STDOUT_SOCK_BASE;
- static const string STDERR_SOCK_BASE;
- static const string TMP_DIR;
-
- private:
- static DataManager* spDataMan;
-
- bool mSetup;
- int mNotificationFd;
- vector<struct stap_process_t*> mProcessInfo;
-
- DataManager( );
- int collectData( struct stap_process_t* script, bool isError = false );
- struct stap_process_t* createUserProcess( struct dmRequest *req );
- void destroyStapProcess( struct stap_process_t* script );
- int handleNotification( struct dmRequest *req, int& stdOut, int& stdErr );
- int setupSocket( );
- int findHighestFd( );
- bool setupStapIPC( struct stap_process_t* script );
- void execStap( struct dmRequest *req );
- bool sendData( struct stap_process_t* script );
- };
-
- struct stap_process_t
- {
- int pid;
- int scriptid;
- int stdOut;
- int stdErr;
- int outSize;
- int errSize;
- bool isMessageError;
- char outBuffer[ DataManager::BUFFER_SIZE + 1 ];
- char errBuffer[ DataManager::BUFFER_SIZE + 1 ];
- };
-}
-
-/**
- * This method is for the call to pthread_create, it will not take any
- * actual input nor will it return anything but NULL (the void*s are for
- * compatibility with the pthread_create call).
- */
-void* startDataManager( void* data );
-
-#endif /*DATAMANAGER_H_*/
diff --git a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/dmerror.hpp b/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/dmerror.hpp
deleted file mode 100644
index 9334174461..0000000000
--- a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/dmerror.hpp
+++ /dev/null
@@ -1,69 +0,0 @@
-#ifndef STAPERROR_H_
-#define STAPERROR_H_
-
-#include <stdint.h>
-
-/**
- * @page error_codes Error Code Layout
- *
- * Error code format: 0x8cs0nnnn, where:
- * - c = category
- * - s = severity
- * - nnnn = error code; this 16-bit number is sufficient to uniquely identify
- * the error within the stap data manager
- */
-
- #define DM_ERROR 0x80000000
-
- #define DM_ERR_CAT_MASK 0x0F000000
- #define DM_ERR_SEV_MASK 0x00F00000
- #define DM_ERR_CODE_MASK 0x0000FFFF
-
- #define DM_ERR_CAT_INTERNAL 0x01000000
- #define DM_ERR_CAT_USER 0x02000000
- #define DM_ERR_CAT_SETUP 0x04000000
-
- #define DM_ERR_SEV_ERR 0x00100000
- #define DM_ERR_SEV_WARN 0x00200000
- #define DM_ERR_SEV_INFO 0x00400000
-
- /* Error definition */
- #define DM_ERR_REQUEST_TYPE (DM_ERROR | DM_ERR_CAT_USER \
- | DM_ERR_SEV_ERR | 0x00000001)
- #define DM_ERR_LISTEN_SOCKET (DM_ERROR | DM_ERR_CAT_USER \
- | DM_ERR_SEV_ERR | 0x00000002)
- #define DM_ERR_SOCKET_READ (DM_ERROR | DM_ERR_CAT_INTERNAL \
- | DM_ERR_SEV_ERR | 0x00000004)
-
- #define DM_ERR_MBOX_DUPLICATE (DM_ERROR | DM_ERR_CAT_USER \
- | DM_ERR_SEV_WARN | 0x00000008)
- #define DM_ERR_MBOX_LOCK (DM_ERROR | DM_ERR_CAT_INTERNAL \
- | DM_ERR_SEV_ERR | 0x0000000F)
- #define DM_ERR_PACKET_FORMAT (DM_ERROR | DM_ERR_CAT_USER \
- | DM_ERR_SEV_WARN | 0x00000010)
- #define DM_ERR_BAD_CLIENTID (DM_ERROR | DM_ERR_CAT_USER \
- | DM_ERR_SEV_WARN | 0x00000011)
- #define DM_ERR_COMM_CHANNEL (DM_ERROR | DM_ERR_CAT_USER \
- | DM_ERR_SEV_WARN | 0x00000012)
-
- #define DM_ERR_SCRIPT_LOAD (DM_ERROR | DM_ERR_CAT_INTERNAL \
- | DM_ERR_SEV_ERR | 0x00000014)
- #define DM_ERR_SCRIPT_NOEXIST (DM_ERROR | DM_ERR_CAT_USER \
- | DM_ERR_SEV_ERR | 0x00000018)
- #define DM_ERR_SCRIPT_NOINST (DM_ERROR | DM_ERR_CAT_USER \
- | DM_ERR_SEV_ERR | 0x0000001F)
- #define DM_NOTICE_SCRIPT_COMPLETED (DM_ERROR | DM_ERR_CAT_USER \
- | DM_ERR_SEV_INFO | 0x00000020)
- #define DM_NOTICE_CONNECTION_CLOSED (DM_ERROR | DM_ERR_CAT_USER \
- | DM_ERR_SEV_INFO | 0x00000021)
- #define DM_NOTICE_CONNECTION_CREATED (DM_ERROR | DM_ERR_CAT_USER \
- | DM_ERR_SEV_INFO | 0x00000022)
- #define DM_NOTICE_SUB_SUCCESS (DM_ERROR | DM_ERR_CAT_USER \
- | DM_ERR_SEV_INFO | 0x00000024)
- #define DM_NOTICE_UNSUB_SUCCESS (DM_ERROR | DM_ERR_CAT_USER \
- | DM_ERR_SEV_INFO | 0x00000028)
-
- /* Function for looking up error code meaning */
- const char* dm_error_print(uint32_t err);
-
-#endif /*STAPERROR_H_*/
diff --git a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/logger.hpp b/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/logger.hpp
deleted file mode 100644
index b77dbd3a2b..0000000000
--- a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/logger.hpp
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef LOGGER_H
-#define LOGGER_H
-
-#include <string>
-
-#include <syslog.h>
-#define L_DEFAULT_HANDLER syslog // replaces fprintf(3) by syslog(3)
-#define L_DEFAULT_PARAMS LOG_USER // default priority for syslog info
-
-using namespace std;
-
-namespace datamanager
-{
-
- class Logger
- {
- public:
- /*
- * Log level will use the constants defined in syslog.h see
- * syslog(3) for their meanings.
- */
-
- Logger( const string& ident = "stapguidm" );
-
- ~Logger();
-
- inline const string& getIdent( ) const { return mIdent; }
-
- /**
- * Sends the specified message to syslogd with the specified
- * severity level. The severity level defaults to LOG_NOTICE if
- * nothing is specified.
- */
- void log( const string& message, int level = LOG_NOTICE ) const;
-
- private:
- string mIdent;
- };
-
-}
-
-#endif //LOGGER_H
-
diff --git a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/stapdebug.hpp b/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/stapdebug.hpp
deleted file mode 100644
index a41bc7b01c..0000000000
--- a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/stapdebug.hpp
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef STAPDEBUG_HPP_
-#define STAPDEBUG_HPP_
-
-#ifdef DEBUG_ON
-#define coutd cout << __FILE__ << ": " << __func__ << "()" << " [" << __LINE__ << "] "
-#else
-#define coutd if(0) cout
-#endif
-
-#endif /*STAPDEBUG_HPP_*/
diff --git a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/subscriptionMgr.hpp b/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/subscriptionMgr.hpp
deleted file mode 100644
index dd64b7d276..0000000000
--- a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/include/subscriptionMgr.hpp
+++ /dev/null
@@ -1,106 +0,0 @@
-#ifndef SUBSCRIPTIONMGR_H_
-#define SUBSCRIPTIONMGR_H_
-
-#include "datamanager.hpp"
-#include "MailBox.hpp"
-#include <linux/types.h>
-#include <pthread.h>
-#include <map>
-
-namespace datamanager
-{
- /* @class subscriptionMgr
- * @brief This class is responsible for managing all incoming
- * requests for connections / communication with the stap-gui
- * data manager
- */
- class SubscriptionMgr
- {
- public:
- static bool SYSTEM_EXITING;
-
- ~SubscriptionMgr();
- int startService();
-
- /* Accession methods for the subscritpionMap, linking a unique
- * subscriber ID to a socket file descriptor */
- int addSubscriberID(int uniqueID, int socketfd);
- int removeSubscriberID(int uniqueID);
- int getSubscriberSocketFD(int uniqueID);
-
- /* getInstance
- * @brief Returns instance of singleton SubscriptionMgr class, or
- * constructs and returns as needed
- */
- static SubscriptionMgr *getInstance();
-
- /* getStatus
- * @brief For future use - allows a request for status to come from
- * the dashboard, which then also spawns cleanup in the
- * DM
- * param scriptID - identifier for the script to query about
- * param flags - bitmap of flag options
- * @return 0 if successful, otherwise a negative error code*/
- int getStatus(int scriptID, int flags);
- /* runScript
- * @brief For future use - for execution of custom scripts
- * @param path - Path and script name to be compiled and insmod'd
- * @return 0 if successful, otherwise a negative error code*/
- int runScript(char path);
-
- /* dmdSighandler
- * @brief Cleans up whenever the server is being shut down
- * by a signal
- */
- void dmdCleanup();
-
- private:
- static SubscriptionMgr *smInstance;
- static std::map<int, char *> users;
- static char user[20];
- pthread_t dmThread;
- int permSocketfd, dmSocketfd;
-
- /* default constructor available only to members or
- friends of this class*/
- SubscriptionMgr();
- /* disallow copy constructor */
- SubscriptionMgr(const SubscriptionMgr &old);
- /* disallow assignment operator */
- const SubscriptionMgr &operator=(const SubscriptionMgr &old);
-
- /* initDMComm
- * @brief Initiates socket communication with data manager
- * @return - number of bytes written, or negative error code on
- * failure
- */
- int initDMComm();
- /* notiftyDM
- * @brief Sends the mailbox ID for which the linked list has
- * been changed to the data manager
- * @param sigType - Either a scriptID, or if negative, a request
- * for some predefined action (ie - shutdown)
- * list being modified
- * @return 0 if successful, otherwise a negative error code*/
- int notifyDM(struct dmRequest *req);
- /* subscribe
- * @brief Handles modification of the array shared with the
- * data manager, adding a new socket descriptor to the linked list
- * @param scriptID - identifier for the script being subscribed to
- * @return 0 if successful, otherwise a negative error code*/
- int subscribe(int scriptID);
- /* unSubscribe
- * @brief Handles modification of the array shared with the
- * data manager, removing a socket descriptor from the linked list
- * @param scriptID - identifier for the script being unsubscribed
- * from
- * @return 0 if successful, otherwise a negative error code
- * */
- int unSubscribe(int scriptID);
-
- int handleRequest(struct dmRequest* req, struct dmResponse* resp, int newfd);
-
- };
-}
-
-#endif /*SUBSCRIPTIONMGR_H_*/
diff --git a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/logger.cpp b/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/logger.cpp
deleted file mode 100644
index 1eeb1c0d91..0000000000
--- a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/logger.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-#include "include/logger.hpp"
-
-namespace datamanager
-{
- Logger::Logger( const string& ident ) :
- mIdent( ident )
- {
- openlog( mIdent.c_str( ), LOG_PID, LOG_USER );
- }
-
- Logger::~Logger( )
- {
- closelog( );
- }
-
- void Logger::log( const string& message, int level ) const
- {
- syslog( level, "%s", message.c_str( ) );
- }
-
-}
-
diff --git a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/makefile.dep b/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/makefile.dep
deleted file mode 100644
index 53c4c654da..0000000000
--- a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/makefile.dep
+++ /dev/null
@@ -1,18 +0,0 @@
-common.o: common.cpp include/common.hpp include/dmerror.hpp
-confReader.o: confReader.cpp include/confReader.hpp include/common.hpp \
- include/logger.hpp include/dmerror.hpp include/common.hpp
-datamanager.o: datamanager.cpp include/datamanager.hpp \
- include/MailBox.hpp include/common.hpp include/common.hpp \
- include/confReader.hpp include/dmerror.hpp include/stapdebug.hpp \
- include/logger.hpp include/subscriptionMgr.hpp include/datamanager.hpp \
- include/MailBox.hpp
-dmerror.o: dmerror.cpp include/dmerror.hpp
-logger.o: logger.cpp include/logger.hpp
-MailBox.o: MailBox.cpp include/stapdebug.hpp include/MailBox.hpp \
- include/common.hpp include/confReader.hpp include/dmerror.hpp \
- include/common.hpp include/logger.hpp include/datamanager.hpp
-subscriptionMgr.o: subscriptionMgr.cpp include/subscriptionMgr.hpp \
- include/datamanager.hpp include/MailBox.hpp include/common.hpp \
- include/datamanager.hpp include/stapdebug.hpp include/dmerror.hpp \
- include/MailBox.hpp include/common.hpp include/logger.hpp \
- include/confReader.hpp
diff --git a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/subscriptionMgr.cpp b/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/subscriptionMgr.cpp
deleted file mode 100644
index 1ae4457c6f..0000000000
--- a/systemtap/SystemTapGuiServer/systemtapguiserver-1.0/subscriptionMgr.cpp
+++ /dev/null
@@ -1,401 +0,0 @@
-#include "include/subscriptionMgr.hpp"
-#include "include/datamanager.hpp"
-#include "include/stapdebug.hpp"
-#include "include/dmerror.hpp"
-#include "include/MailBox.hpp"
-#include "include/common.hpp"
-#include "include/logger.hpp"
-#include "include/confReader.hpp"
-
-#include <iostream>
-#include <sstream>
-#include <linux/types.h>
-#include <linux/socket.h>
-#include <netinet/in.h>
-#include <pthread.h>
-#include <signal.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <strings.h>
-#include <sys/un.h>
-#include <unistd.h>
-#include <errno.h>
-#include <sys/stat.h>
-
-using namespace std;
-using namespace datamanager;
-
-SubscriptionMgr* SubscriptionMgr::smInstance = NULL;
-bool SubscriptionMgr::SYSTEM_EXITING = false;
-std::map<int, char* > SubscriptionMgr::users;
-char SubscriptionMgr::user[20];
-
-
-extern char *optarg;
-extern int optind, opterr, optopt;
-
-extern int errno;
-
-SubscriptionMgr::SubscriptionMgr() : dmThread( 0 ),
- permSocketfd( -1 ), dmSocketfd( -1 )
-{
- /* Create data manager thread */
- pthread_create(&dmThread, NULL, startDataManager, NULL);
- /* init communication with datamanager */
- sleep(1);
- initDMComm();
-}
-
-int SubscriptionMgr::initDMComm()
-{
- struct sockaddr_un server;
- int rc;
- DataManager *dm;
- dmSocketfd = socket(AF_UNIX, SOCK_STREAM, 0);
- if (dmSocketfd < 0) {
- ostringstream err;
- err << "Error calling socket on data manager" << endl;
- Logger log;
- log.log(err.str());
- dmdCleanup();
- }
- server.sun_family = AF_UNIX;
- strcpy(server.sun_path, DataManager::DATAMANAGER_SOCKET.c_str());
-
- dm = DataManager::getInstance();
- while (!dm->isSetup()) {}
-
- rc = connect(dmSocketfd, (struct sockaddr *)&server,
- sizeof(struct sockaddr_un));
-
- forceNonBlocking(dmSocketfd);
-
- if (rc) {
- ostringstream err;
- err << "Error connecting to data manager RC: " << rc << " : "
- << strerror(errno) << endl;
- Logger log;
- log.log(err.str());
- dmdCleanup();
- }
- return 0;
-}
-
-int SubscriptionMgr::notifyDM(struct dmRequest *req)
-{
- unsigned int size = 0;
- int ret;
-
- while( size < sizeof(req->scriptID) &&
- ( ret = write(
- dmSocketfd, req + size, sizeof(*req) - size ) ) > 0 )
- size += ret;
-
- if (ret < 0) {
- ostringstream err;
- err << "Error writing to data manager socket" << endl;
- Logger log;
- log.log(err.str());
- dmdCleanup();
- return ret;
- }
- return size;
-}
-
-SubscriptionMgr * SubscriptionMgr::getInstance()
-{
- if (!smInstance)
- smInstance = new SubscriptionMgr();
-
- return smInstance;
-}
-
-int SubscriptionMgr::getStatus(int scriptID, int flags)
-{
- return -1;
-}
-
-/* runScript
- * @brief: Stub for future expansion. Will allow custom script execution
- */
-int SubscriptionMgr::runScript(char path)
-{
- return -1;
-}
-
-int SubscriptionMgr::handleRequest(struct dmRequest* req, struct dmResponse* resp, int newfd)
-{
- int rc = 0;
- MailBox* mbInstance = MailBox::getInstance ();
- resp->size = 0;
- string str;
- char *buf;
- ostringstream os;
- ConfReader *cr = ConfReader::getInstance();
-
- if (req->beginIdStr != DM_PACKET_BEGIN)
- rc = DM_ERR_PACKET_FORMAT;
- else if (!mbInstance->isClient (req->clientID) && req->reqAction != REQ_CREATE_CONN)
- rc = DM_ERR_COMM_CHANNEL;
- else {
- switch (req->reqAction) {
- case REQ_CREATE_CONN:
- // A new connection was requested
- mbInstance->addClient (newfd);
- sprintf(user,"%s",req->data);
- users[newfd] = user;
- rc = DM_NOTICE_CONNECTION_CREATED;
- break;
- case REQ_DESTROY_CONN:
- // Remove all state related to clientID
- mbInstance->delClient (req->clientID);
- rc = mbInstance->unsubscribeAll (req->clientID);
- if (rc != -1) {
- req->scriptID = rc;
- notifyDM (req);
- }
- rc = DM_NOTICE_CONNECTION_CLOSED;
- break;
- case REQ_SUBSCRIBE:
- int id;
- id = cr->addScript(req);
- req->scriptID = id;
- rc = mbInstance->subscribe(req);
- if (rc == 0) {
- sprintf(req->data,"%s",users[req->clientID]);
- notifyDM(req);
- rc = DM_NOTICE_SUB_SUCCESS;
- }
- break;
- case REQ_UNSUBSCRIBE:
- rc = mbInstance->unsubscribe (req->scriptID, req->clientID);
-
- // unsubscribe will be non-zero if script is invalid
- if (rc == 0 && mbInstance->isEmpty(req->scriptID)) {
- notifyDM (req);
- rc = DM_NOTICE_UNSUB_SUCCESS;
- }
-
- break;
- case REQ_GET_STATUS:
- // currently not supported
- rc = DM_ERR_REQUEST_TYPE;
- break;
- case REQ_SUBSCRIPTION_MODIFY:
- // currently not supported
- rc = DM_ERR_REQUEST_TYPE;
- break;
- case REQ_CONFIG_FILE:
- cr->readConfFile(str);
- buf = strdup(str.c_str());
- resp->data = buf;
- resp->size = str.length();
- break;
-
-
- default:
- rc = DM_ERR_REQUEST_TYPE;
- break;
- } // switch
-
- } // else
-
-
- resp->beginIdStr = DM_PACKET_BEGIN;
- resp->src = SUBSCRIPTION_MGR;
- resp->scriptID = req->scriptID;
-
- if (req->reqAction == REQ_CREATE_CONN)
- resp->clientID = newfd;
- else
- resp->clientID = req->clientID;
-
- resp->returnCode = rc;
- // currently unused
- return rc;
- }
-
- int SubscriptionMgr::startService()
- {
- struct sockaddr_in serv_addr, client_addr;
- int newfd, rc;
- socklen_t client_len = sizeof(client_addr);
- char buf[255];
-
- permSocketfd = socket(AF_INET, SOCK_STREAM, 0);
- if (permSocketfd < 0) {
- ostringstream err;
- err << "Error on socket: " << strerror (errno) << endl;
- cerr << err.str() << endl;
- Logger log;
- log.log(err.str());
- return -1;
- }
-
- memset(&serv_addr, 0, sizeof(serv_addr));
- serv_addr.sin_family = AF_INET;
- serv_addr.sin_addr.s_addr = INADDR_ANY;
- serv_addr.sin_port = htons(LISTEN_PORT);
-
- if (bind(permSocketfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) {
- ostringstream err;
- err << "Error on binding: " << strerror (errno) << endl;
- cerr << err.str() << endl;
- Logger log;
- log.log(err.str());
- return -1;
- }
-
- if (listen(permSocketfd, 5) != 0) {
- ostringstream err;
- err << "Error on listen: " << strerror (errno) << endl;
- cerr << err.str() << endl;
- Logger log;
- log.log(err.str());
- return -1;
- }
-
- cout << "Listening for connections... " << endl;
-
- /* Loop looking for new connection requests */
- while (true) {
- struct dmRequest* req;
- struct dmResponse resp;
-
- newfd = accept(permSocketfd, (struct sockaddr *) &client_addr, &client_len);
-
- if (newfd < 0) {
- ostringstream err;
- err << "Error on accept: " << strerror (errno) << endl;
- cerr << err.str() << endl;
- Logger log;
- log.log(err.str());
- return -1;
- }
-
- memset(&buf, 0, 255);
-
- if (recv(newfd, buf, sizeof( struct dmRequest ), MSG_WAITALL) < 0) {
- ostringstream err;
- err << "Error reading from socket: " << strerror (errno) << endl;
- cerr << err.str() << endl;
- Logger log;
- log.log(err.str());
- return -1;
- }
-
- /* convert request to host byte order */
- req = (struct dmRequest*) buf;
- handleRequest(reqConvToH(req), &resp, newfd);
-
-
- /* Send response to client */
- respConvToN(&resp);
- send(ntohl(resp.clientID), &resp, sizeof(resp), 0);
- if (resp.size) { /* if there is anything to send */
- send(ntohl(resp.clientID), resp.data, ntohl(resp.size), 0);
- }
- if (req->reqAction != REQ_CREATE_CONN)
- close (newfd);
- }
-
- return rc;
-}
-
-void SubscriptionMgr::dmdCleanup()
-{
- void *tmp;
- struct dmRequest req;
-
- ostringstream out;
- out << "Closing stapgui daemon\n";
- Logger log;
- log.log(out.str());
- memset(&req, 0, sizeof(req));
- req.scriptID = SHUTDOWN_DATAMANAGER;
- notifyDM(&req);
- pthread_join(dmThread, &tmp);
- MailBox::getInstance()->deleteInstance();
- close(permSocketfd);
- close(dmSocketfd);
- exit(0);
-}
-
-void dmdSighandler(int sig)
-{
- SubscriptionMgr::getInstance( )->dmdCleanup();
-}
-
-void printUsage( const string& name )
-{
- cerr << "Usage: " << name << " [-h] [-b] [-p PORTNUMBER ]" << endl;
- cerr << " -h: help, this message" << endl;
- cerr << " -b: Run in background (daemonize the process)" << endl;
- cerr << " -p PORTNUMBER: Use specified port number instead of default (" <<
- LISTEN_PORT << ")" << endl;
-}
-
-int main(int argc, char **argv)
-{
- struct sigaction sigact;
- SubscriptionMgr* sm = NULL;
- bool daemon = false;
- int port = LISTEN_PORT;
- int opt;
-
- while ((opt = getopt(argc, argv, "hbp:")) != -1) {
- switch (opt) {
- case 'b':
- daemon = true;
- break;
- case 'p':
- port = atoi(optarg);
- break;
- case 'h':
- default:
- printUsage(argv[0]);
- exit( 1 );
- }
- }
-
- /* Daemonize child process */
- if (daemon) {
- if(fork()) return 0;
- setsid();
- umask(0);
- // Close stdout, stderr, stdin
- close(0);
- close(1);
- close(2);
- }
-
- try {
- sm = SubscriptionMgr::getInstance();
- }
- catch ( exception& e )
- {
- ostringstream err;
- err << "Error creating subscription manager" << endl;
- Logger log;
- log.log(err.str());
- return -1;
- }
-
- /* Setup signal interception, so when process is killed, it cleans
- * up properly */
- sigact.sa_handler = dmdSighandler;
- sigemptyset(&sigact.sa_mask);
-
- sigaction(SIGABRT, &sigact, NULL);
- sigaction(SIGILL, &sigact, NULL);
- sigaction(SIGINT, &sigact, NULL);
- sigaction(SIGQUIT, &sigact, NULL);
- sigaction(SIGTERM, &sigact, NULL);
-
- sm->startService();
- sm->dmdCleanup();
-
- return 0;
-}
diff --git a/systemtap/feature.xml b/systemtap/feature.xml
deleted file mode 100644
index e45595d481..0000000000
--- a/systemtap/feature.xml
+++ /dev/null
@@ -1,236 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.linuxtools.systemtap.feature"
- label="Feature Feature"
- version="1.0.0">
-
- <description>
- Plugins for maintaining and developing Systemtap scripts.
- </description>
-
- <copyright>
- Copyright 2008 Phillip Muldoon.
- </copyright>
-
- <license url="http://www.eclipse.org/org/documents/epl-v10.php">
- Eclipse Public License - v 1.0
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS
-ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT’S ACCEPTANCE
-OF THIS AGREEMENT.
-1. DEFINITIONS
-&quot;Contribution&quot; means:
-a) in the case of the initial Contributor, the initial code and
-documentation distributed under this Agreement, and
-b) in the case of each subsequent Contributor:
-i)changes to the Program, and
-ii)additions to the Program;
-where such changes and/or additions to the Program originate
-from and are distributed by that particular Contributor. A Contribution
-&apos;originates&apos; 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.
-&quot;Contributor&quot; means any person or entity that distributes the
-Program.
-&quot;Licensed Patents &quot; 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.
-&quot;Program&quot; means the Contributions distributed in accordance with
-this Agreement.
-&quot;Recipient&quot; means anyone who receives the Program under this
-Agreement, including all Contributors.
-2. GRANT OF RIGHTS
-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.
-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.
-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.
-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.
-3. REQUIREMENTS
-A Contributor may choose to distribute the Program in object
-code form under its own license agreement, provided that:
-a) it complies with the terms and conditions of this Agreement;
-and
-b) its license agreement:
-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;
-ii) effectively excludes on behalf of all Contributors all liability
-for damages, including direct, indirect, special, incidental
-and consequential damages, such as lost profits;
-iii) states that any provisions which differ from this Agreement
-are offered by that Contributor alone and not by any other party;
-and
-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.
-When the Program is made available in source code form:
-a) it must be made available under this Agreement; and
-b) a copy of this Agreement must be included with each copy of
-the Program.
-Contributors may not remove or alter any copyright notices contained
-within the Program.
-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.
-4. COMMERCIAL DISTRIBUTION
-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
-(&quot;Commercial Contributor&quot;) hereby agrees to defend and indemnify
-every other Contributor (&quot;Indemnified Contributor&quot;) against any
-losses, damages and costs (collectively &quot;Losses&quot;) 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.
-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.
-5. NO WARRANTY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM
-IS PROVIDED ON AN &quot;AS IS&quot; 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.
-6. DISCLAIMER OF LIABILITY
-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.
-7. GENERAL
-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.
-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.
-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.
-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.
-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.
-Related Links
-* EPL in plain HTML
-* The EPL on OSI’s site
-* CPL to EPL conversion
-* Home
-* Privacy Policy
-* Terms of Use
-Copyright © 2006 The Eclipse Foundation. All Rights Reserved
- </license>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.ui.editors"/>
- </requires>
-
- <plugin
- id="org.eclipse.linuxtools.systemtap.ui.editor"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/systemtap/org.eclipse.linuxtools.callgraph-feature/ChangeLog b/systemtap/org.eclipse.linuxtools.callgraph-feature/ChangeLog
deleted file mode 100644
index f1de8180fd..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph-feature/ChangeLog
+++ /dev/null
@@ -1,4 +0,0 @@
-2009-11-03 chwang <chwang@toto>
-
- * feature.properties: Change description for Callgraph feature. Add Changelog
- * feature.properties: Change featureName \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph-feature/feature.properties b/systemtap/org.eclipse.linuxtools.callgraph-feature/feature.properties
index d7b3fa5018..fc10012e06 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph-feature/feature.properties
+++ b/systemtap/org.eclipse.linuxtools.callgraph-feature/feature.properties
@@ -8,9 +8,9 @@
# Contributors:
# Red Hat, Inc. - initial API and implementation
#********************************************************************************
-featureName=C/C++ Call Graph Visualization (Incubation)
+featureName=SystemTap C/C++ Visualization Tool (Incubation)
featureProvider=Eclipse
-description=Tracks function calls in a C/C++ program as they occur. Records start and end time for each function as well as any user-specified information, and displays everything as a graph of nodes.
+description=Graphically displays the call hierarchy from executing a C/C++ binary, along with various other runtime statistics.
copyright=Copyright (c) 2009 Red Hat, Inc.\n\
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0\n\
which accompanies this distribution, and is available at\n\
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/ChangeLog b/systemtap/org.eclipse.linuxtools.callgraph.core/ChangeLog
deleted file mode 100644
index b94e469d29..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/ChangeLog
+++ /dev/null
@@ -1,50 +0,0 @@
-2009-12-17 Roland Grunberg <rgrunber@redhat.com>
-
- * parse_function_partial.stp: Remove dependence on kernel function syscall.exit.
- This allows profiling without the kernel debuginfo.
-
-2009-11-18 Roland Grunberg <rgrunber@redhat.com>
-
- * build.properties: Add errors.prop to build.
-
-2009-11-16 Roland Grunberg <rgrunber@redhat.com>
-
- * META-INF/MANIFEST.MF: Add Eclipse To Provider field.
-
-2009-11-10 Charley Wang <chwang@redhat.com>
-
- * plugin.xml: Add icons folder
- * src/org/eclipse/linuxtools/callgraph/core/SystemTapView.java: Change reference to kill button to use imageDescriptor function in AbstractUIPlugin
- * src/org/eclipse/linuxtools/callgraph/core/CallgraphCorePlugin.java: Add PLUGIN_ID string
-
-
-2009-11-09 Roland Grunberg <rgrunber@redhat.com>
-
- * src/org/eclipse/linuxtools/callgraph/core/messages.properties: Externalize/Fix Strings
- * src/org/eclipse/linuxtools/callgraph/core/PluginConstants.java: Externalize/Fix Strings
- * src/org/eclipse/linuxtools/callgraph/core/SystemTapErrorHandler.java: Give some variables more meaningful names.
-
- * src/org/eclipse/linuxtools/callgraph/core/SystemTapCommandGenerator.java: Remove commented out unused code.
- * src/org/eclipse/linuxtools/callgraph/core/DocWriter.java: Add necessary headers to all files listed below.
- * src/org/eclipse/linuxtools/callgraph/core/SystemTapTextParser.java:
- * src/org/eclipse/linuxtools/callgraph/core/SystemTapTextView.java:
- * src/org/eclipse/linuxtools/callgraph/core/XMLParser.java:
-
-2009-11-06 Charley Wang <chwang@redhat.com>
-
- * src/org/eclipse/linuxtools/callgraph/core/CallgraphCorePlugin.java: Rename Activator --> CallgraphCorePlugin.
- (start): Clean out the start method to contain only the bare essentials instead of always finding the location, etc. on startup.
- * src/org/eclipse/linuxtools/callgraph/core/ViewFactory.java: Change the way viewFactory creates views. Have ViewFactory set the view id.
- * src/org/eclipse/linuxtools/callgraph/core/StapUIJob.java: Simplify StapUIJob by using ViewFactory to instantiate views.
- * src/org/eclipse/linuxtools/callgraph/core/DocWriter.java: Update DocWriter's methods.
- * src/org/eclipse/linuxtools/callgraph/core/XMLParser.java: Add javadocs, modify functions for ease of use.
-
-2009-11-05 Charley Wang <chwang@redhat.com>
-
- * src/org/eclipse/linuxtools/callgraph/core/SystemTapView.java: Rename loadView --> initializeView
- * src/org/eclipse/linuxtools/callgraph/core/SystemTapTextView.java: Rename loadView --> initializeView
- * src/org/eclipse/linuxtools/callgraph/core/StapUIJob.java: Rename loadView --> initializeView
-
-2009-11-04 Charley Wang <chwang@redhat.com>
-
- * src/org/eclipse/linuxtools/callgraph/core/SystemTapParser.java: Fix nonRealTimeParsing. \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.callgraph.core/META-INF/MANIFEST.MF
index 0dec39c6f5..871c6a5747 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/META-INF/MANIFEST.MF
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/META-INF/MANIFEST.MF
@@ -1,9 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Callgraph Core (Incubation)
+Bundle-Name: SystemTap Local Core Project
Bundle-SymbolicName: org.eclipse.linuxtools.callgraph.core;singleton:=true
Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.linuxtools.callgraph.core.CallgraphCorePlugin
+Bundle-Activator: org.eclipse.linuxtools.callgraph.core.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime
Bundle-ActivationPolicy: lazy
@@ -19,4 +19,3 @@ Import-Package: org.eclipse.cdt.core,
org.eclipse.ui.console,
org.eclipse.ui.ide,
org.eclipse.ui.texteditor
-Bundle-Vendor: Eclipse
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/build.properties b/systemtap/org.eclipse.linuxtools.callgraph.core/build.properties
index af6bccfd21..1b9a74f53b 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/build.properties
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/build.properties
@@ -14,11 +14,10 @@ bin.includes = META-INF/,\
.,\
install.sh,\
systemtap.png,\
+ parse_function_mark_partial.stp,\
parse_function_partial.stp,\
bin/,\
systemtapbanner.png,\
- plugin.xml,\
- icons/,\
- errors.prop
+ plugin.xml
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/icons/progress_stop.gif b/systemtap/org.eclipse.linuxtools.callgraph.core/icons/progress_stop.gif
deleted file mode 100644
index dc47edf069..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/icons/progress_stop.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/install.sh b/systemtap/org.eclipse.linuxtools.callgraph.core/install.sh
index 97783c3792..004fe90319 100755
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/install.sh
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/install.sh
@@ -4,7 +4,7 @@ num=1
#CREATE A BACKUP FILE WITHOUT OVERWRITING ANYTHING
while [ -e "${FILE}.bak${num}" ]; do
- num=$[ ${num} + 1 ]
+ num=`expr ${num} + 1`
done
USEREXISTS=`grep stapdev ${FILE}| grep ${USER}`
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/markup.stp b/systemtap/org.eclipse.linuxtools.callgraph.core/markup.stp
deleted file mode 100644
index cf988ac086..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/markup.stp
+++ /dev/null
@@ -1,81 +0,0 @@
-global var
-global tagmap
-global taglimit = 100
-global stillopen = 0
-
-
-function opentag:long(s:string) {
- if (var == taglimit) return -1
- var++
- tagmap[var] = tokenize(s," ")
- if (stillopen == 1)
- printf(">")
- indentless()
- printf("<%s", s)
- stillopen = 1
- return 1
-}
-
-function openclosetag(s:string) {
- opentag(s)
- printf("/>")
- var--
-}
-
-function addlong:long(s:string, l:long) {
- if (var < 1)
- return -1
- indent()
- printf("%s=%d", s,l);
-
-}
-
-function addstr:long(s:string, s1:string) {
- if (var < 1)
- return -1
- indent()
- printf("%s=%s", s, s1)
-}
-
-function addtext:long(s:string) {
- if (stillopen == 1) {
- printf(">")
- }
- stillopen = 0
- if (var < 1)
- return -1
- indent()
- printf("%s", s)
-}
-
-function indent() {
- printf("\n")
- for (i = 0; i < var; i++) printf("\t")
-}
-
-function indentless() {
- printf("\n")
- for (i = 1; i < var; i++) printf("\t")
-}
-
-function closetag(s:string) {
- if (stillopen == 1) {
- printf(">")
- }
- stillopen = 0
- indentless()
- printf("</%s>", s)
- var--
-}
-
-function closecurrent() {
- closetag(tagmap[var])
-}
-
-function setLimit(v:long) {
- taglimit = v
-}
-
-function closeall() {
- for (i = 0; i <= var; i ++) closecurrent()
-}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/parse_function_mark_partial.stp b/systemtap/org.eclipse.linuxtools.callgraph.core/parse_function_mark_partial.stp
new file mode 100644
index 0000000000..5145c21d1d
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/parse_function_mark_partial.stp
@@ -0,0 +1,122 @@
+
+probe begin{
+ printf("\nPROBE_BEGIN\n")
+ printf("0<")
+ funcName[0] = "init"
+ serial++
+ exitCalled = 0
+ start[0] = gettimeofday_ns()
+}
+
+
+/*HANDLE CASE WHEN AN EXIT() IS MADE*/
+probe syscall.exit{
+ if (target() == pid()){
+ exitCalled = 1
+ }
+}
+
+function callFunction(probefunc) {
+
+ start[serial] = gettimeofday_ns()
+
+ if (probefunc != "___STAP_MARKER___" && !(isinstr(probefunc,"(")) && !(isinstr(probefunc,")")) ) {
+ currentLevel++
+ currentlyIn[currentLevel] = serial
+
+
+ /*RELATED TO MEASURING TOTAL TIME A FUNCTION TAKES */
+ if (nested[probefunc] == 0){
+ start_total[probefunc] = start_total[probefunc] - gettimeofday_ns()
+ }
+ nested[probefunc]++
+
+
+ /*TRACK THE DEPTH OF A FUNCTION*/
+ depth[serial] = val
+ printf("%d<",serial)
+
+
+ /*RECORD NAME OF THE FUNCTION*/
+ funcName[serial] = probefunc
+ /*TALLY NUMBER OF USES OF FUNCTION*/
+
+ val++
+ serial++
+ }
+}
+
+function returnFunction(probefunc) {
+ if (probefunc != "___STAP_MARKER___" && !(isinstr(probefunc,"(")) && !(isinstr(probefunc,")")) ) {
+ val--
+ currentLevel--
+
+ /*IF WE ARE BACK TO THE DEPTH OF ANY FUNCTION WE HAVE RETURNED FROM IT*/
+ foreach (ser in depth)
+ if (depth[ser] == val){
+ total[ser] = gettimeofday_ns() - start[ser]
+ delete start[ser]
+ }
+ /*PREVENT CHANGING THE TIME OF THIS FUNCTION ONCE FOUND*/
+ delete depth[ser]
+
+ /*RELATED TO MEASURING TOTAL TIME A FUNCTION TAKES */
+ if (nested[probefunc] == 1){
+ start_total[probefunc] = start_total[probefunc] + ( gettimeofday_ns() )
+ }
+
+ printf(">")
+
+ /*RELATED TO MEASURING TOTAL TIME A FUNCTION TAKES */
+ nested[probefunc]--
+ }
+}
+
+
+
+probe end{
+ total[0] = gettimeofday_ns() - start[0]
+ start_total["init"] = total[0]
+
+ /*IF EXIT() WAS CALLED TALLY TIME FOR FUNCTIONS THAT DID NOT RETURN*/
+ if (exitCalled == 1){
+ foreach (fc in funcName){
+ if (total[fc] == 0){
+ total[fc] = gettimeofday_ns() - start[fc]
+ }
+ }
+
+ foreach (fd in nested){
+ if (start_total[fd] < 0){
+ start_total[fd] = start_total[fd] + (nested[fd] * gettimeofday_ns())
+ }
+ }
+ }
+
+ printf(">")
+
+ printf("\n")
+
+ foreach (fa in funcName)
+ printf("%d:%s;", fa, funcName[fa])
+
+ printf("\n")
+
+ foreach (ser in total)
+ printf("%d:%d;", ser, total[ser])
+
+ printf("\n")
+
+ foreach (fn in start_total) {
+ if (start_total[fn] > 0)
+ printf("%s:%d;", fn, start_total[fn])
+ }
+
+ printf("\n")
+
+ foreach (fc in markedFunctions) {
+ printf("%d:%s;", markedFunctions[fc], markedMessages[fc])
+ }
+ printf("\n")
+ exit()
+}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/parse_function_partial.stp b/systemtap/org.eclipse.linuxtools.callgraph.core/parse_function_partial.stp
index 5db5d64b8d..06003ec96c 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/parse_function_partial.stp
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/parse_function_partial.stp
@@ -1,32 +1,21 @@
-global serial
-global startTime
-global finalTime
-global currentDepth
-
-
function callFunction(probefunc) {
if (startTime == 0) {
startTime = gettimeofday_ns()
- printf("<%s,,%d,,%d;\n", probefunc, serial, startTime)
+ printf("<%s,,%d,,%d;", probefunc, serial, startTime)
} else
- printf("<%s,,%d,,%d;\n", probefunc, serial, gettimeofday_ns())
- currentDepth++
+ printf("<%s,,%d,,%d;", probefunc, serial, gettimeofday_ns())
serial++
}
+
function returnFunction(probefunc) {
finalTime = gettimeofday_ns()
- printf(">%s,,%d;\n", probefunc, finalTime)
- currentDepth--
+ printf(">%s,,%d;", probefunc, finalTime)
}
probe end {
- printf("-%d\n",finalTime);
- printf("+%d\n",finalTime - startTime);
+ printf("\n%d",finalTime);
+ printf("\n%d",finalTime - startTime);
exit()
}
-
-probe process(@1).end {
- finalTime = gettimeofday_ns()
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/plugin.xml b/systemtap/org.eclipse.linuxtools.callgraph.core/plugin.xml
index 285e996a12..3de9b750b8 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/plugin.xml
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/plugin.xml
@@ -2,29 +2,5 @@
<?eclipse version="3.4"?>
<plugin>
<extension-point id="org.eclipse.linuxtools.callgraph.core.parser" name="SystemTapParserPoint" schema="schema/org.eclipse.linuxtools.callgraph.core.parser.exsd"/>
- <!--
- <extension
- id="org.eclipse.linuxtools.callgraph.core.systemtaptextview"
- name="SystemTapTextView"
- point="org.eclipse.ui.views">
- <view
- category="org.eclipse.cdt.ui.views"
- class="org.eclipse.linuxtools.callgraph.core.SystemTapTextView"
- id="org.eclipse.linuxtools.callgraph.core.staptextview"
- name="SystemTap Text View"
- restorable="true">
- </view>
- </extension>-->
-
- <extension
- id="org.eclipse.linuxtools.callgraph.core.systemtaptextparser"
- name="SleepingThreadParser"
- point="org.eclipse.linuxtools.callgraph.core.parser">
- <parser
- class="org.eclipse.linuxtools.callgraph.core.SystemTapTextParser"
- realtime="true">
- </parser>
- </extension>
-
</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/schema/org.eclipse.linuxtools.callgraph.core.parser.exsd b/systemtap/org.eclipse.linuxtools.callgraph.core/schema/org.eclipse.linuxtools.callgraph.core.parser.exsd
index 5aec36ef5d..1d37983bbc 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/schema/org.eclipse.linuxtools.callgraph.core.parser.exsd
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/schema/org.eclipse.linuxtools.callgraph.core.parser.exsd
@@ -6,7 +6,7 @@
<meta.schema plugin="org.eclipse.linuxtools.callgraph.core" id="org.eclipse.linuxtools.callgraph.core.parser" name="StapParserPoint"/>
</appinfo>
<documentation>
- Extension point for SystemTap data parsers. Parsers have a bit of flexibility: You can create a parser that just generates data structures for a SystemTapView object to render, or a parser that continuously and actively updates the view.
+ [Enter description of this extension point.]
</documentation>
</annotation>
@@ -83,7 +83,7 @@
<meta.section type="examples"/>
</appinfo>
<documentation>
- See org.eclipse.linuxtools.callgraph family of plugins
+ [Enter extension point usage example here.]
</documentation>
</annotation>
@@ -92,7 +92,7 @@
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
- See built-in JavaDocs.
+ [Enter API information here.]
</documentation>
</annotation>
@@ -105,23 +105,5 @@
</documentation>
</annotation>
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- /*******************************************************************************
- * 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
- *******************************************************************************/
-
- </documentation>
- </annotation>
</schema>
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/Activator.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/Activator.java
new file mode 100644
index 0000000000..e54a96ab45
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/Activator.java
@@ -0,0 +1,133 @@
+/*******************************************************************************
+ * 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.callgraph.core;
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * Activator class behaves like standard Wizard-created activator,
+ * except for the checkRun() function.
+ *
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ PluginConstants.setPluginLocation(getPluginLocation());
+ PluginConstants.setWorkspaceLocation(getDefault().getStateLocation().toString()+"/"); //$NON-NLS-1$
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ 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(LaunchConfigurationConstants.PLUGIN_ID, path);
+ }
+
+ public String getPluginLocation() {
+ Bundle bundle = getBundle();
+
+ URL locationUrl = FileLocator.find(bundle,new Path("/"), null); //$NON-NLS-1$
+ URL fileUrl = null;
+ try {
+ fileUrl = FileLocator.toFileURL(locationUrl);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return fileUrl.getFile();
+
+ }
+
+
+
+ /**
+ * Check if install script has been executed. Install script MUST delete the FirstRun file,
+ * or else this will execute every time!
+ *
+ * Opens an install script to prompt user to properly install the plugin.
+ */
+ //@SuppressWarnings("static-access")
+/* private void checkRun() {
+
+ PluginConstants.setPluginLocation(getPluginLocation());
+ File initFile = new File(PluginConstants.PLUGIN_LOCATION + "SystemTapPlugin.init");//$NON-NLS-1
+ String line;
+
+ try {
+ BufferedReader br = new BufferedReader (new FileReader(initFile));
+ while ( (line = br.readLine()) != null) {
+ if (line.contains("First time")) {
+ Shell sh = new Shell();
+ //String command = "SystemTapPluginInstall/" + "install.sh"; //$NON-NLS-1$ $NON-NLS-2$
+ MessageDialog.openInformation(sh, Messages.getString("Activator.0"), Messages.getString("Activator.1")); //$NON-NLS-1$ //$NON-NLS-2$
+ BufferedWriter bw = new BufferedWriter(new FileWriter(initFile));
+ bw.append("Easter egg");
+ bw.close();
+ }
+ }
+
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ }*/
+
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/CallgraphCorePlugin.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/CallgraphCorePlugin.java
deleted file mode 100644
index 0736d99137..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/CallgraphCorePlugin.java
+++ /dev/null
@@ -1,133 +0,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
- *******************************************************************************/
-
-package org.eclipse.linuxtools.callgraph.core;
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-
-/**
- * Activator class behaves like standard Wizard-created activator,
- * except for the checkRun() function.
- *
- */
-public class CallgraphCorePlugin extends AbstractUIPlugin {
-
-
- public static final String PLUGIN_ID = "org.eclipse.linuxtools.callgraph.core";
- // The shared instance
- private static CallgraphCorePlugin plugin;
-
- /**
- * The constructor
- */
- public CallgraphCorePlugin() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
-
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static CallgraphCorePlugin 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);
- }
-
- public String getPluginLocation() {
- Bundle bundle = getBundle();
-
- URL locationUrl = FileLocator.find(bundle,new Path("/"), null); //$NON-NLS-1$
- URL fileUrl = null;
- try {
- fileUrl = FileLocator.toFileURL(locationUrl);
- } catch (IOException e) {
- e.printStackTrace();
- }
- return fileUrl.getFile();
-
- }
-
-
-
- /**
- * Check if install script has been executed. Install script MUST delete the FirstRun file,
- * or else this will execute every time!
- *
- * Opens an install script to prompt user to properly install the plugin.
- */
- //@SuppressWarnings("static-access")
-/* private void checkRun() {
-
- PluginConstants.setPluginLocation(getPluginLocation());
- File initFile = new File(PluginConstants.PLUGIN_LOCATION + "SystemTapPlugin.init");//$NON-NLS-1
- String line;
-
- try {
- BufferedReader br = new BufferedReader (new FileReader(initFile));
- while ( (line = br.readLine()) != null) {
- if (line.contains("First time")) {
- Shell sh = new Shell();
- //String command = "SystemTapPluginInstall/" + "install.sh"; //$NON-NLS-1$ $NON-NLS-2$
- MessageDialog.openInformation(sh, Messages.getString("Activator.0"), Messages.getString("Activator.1")); //$NON-NLS-1$ //$NON-NLS-2$
- BufferedWriter bw = new BufferedWriter(new FileWriter(initFile));
- bw.append("Easter egg");
- bw.close();
- }
- }
-
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- }*/
-
-
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/DocWriter.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/DocWriter.java
index 4daef577c7..3878e5e275 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/DocWriter.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/DocWriter.java
@@ -1,13 +1,3 @@
-/*******************************************************************************
- * 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.callgraph.core;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -21,14 +11,10 @@ import org.eclipse.ui.progress.UIJob;
public class DocWriter extends UIJob {
private TextConsole console;
private String message;
- private int length;
- private int start;
/**
* Initiate DocWriter class. DocWriter will append the given message
- * to the given console in a separate UI job. By default, DocWriter will
- * append to the end of the console and replace 0 characters. To change this,
- * see DocWriter's set methods.
+ * to the given console in a separate UI job.
*
*
* @param name
@@ -40,56 +26,34 @@ public class DocWriter extends UIJob {
super(name);
this.console = console;
this.message = message;
- this.start=-1;
- this.length=-1;
}
-
-
- /**
- * Set the start location for DocWriter. Defaults to 0.
- * @param val
- */
- public void setStart(int val) {
- this.start =val;
- }
-
- /**
- * Sets the number of characters to replace for DocWriter. Defaults
- * @param val
- */
- public void setLength(int val) {
- this.length=val;
- }
-
- /**
- * Convenience method to set start and length.
- * @param start
- * @param length
- */
- public void setRegion(int start, int length) {
- this.start = start;
- this.length = length;
- }
-
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
+
if (console == null)
return Status.CANCEL_STATUS;
- if (message == null)
- return Status.OK_STATUS;
IDocument doc = console.getDocument();
- if (length < 0)
- length = 0;
- if (start < 0)
- start = doc.getLength();
+
try {
- doc.replace(start, length, message);
+ doc.replace(doc.getLength(), 0, message);
} catch (BadLocationException e) {
e.printStackTrace();
}
+// try {
+// doc.replace(doc.getLength(), 0,
+// PluginConstants.NEW_LINE +
+// PluginConstants.NEW_LINE + "-------------" + //$NON-NLS-1$
+// PluginConstants.NEW_LINE +
+// "Configuration name: "//$NON-NLS-1$
+// + configName + PluginConstants.NEW_LINE +
+// "No binary commands specified. To specify commands, check under the Binary Arguments tab for this configuration in Profile As --> Profile Configurations." + //$NON-NLS-1$
+// PluginConstants.NEW_LINE + PluginConstants.NEW_LINE);
+// } catch (BadLocationException e) {
+// e.printStackTrace();
+// }
return Status.OK_STATUS;
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/FileFinderOpener.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/FileFinderOpener.java
index 4d0fa8ff10..60b2a7b97f 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/FileFinderOpener.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/FileFinderOpener.java
@@ -28,6 +28,7 @@ import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.linuxtools.callgraph.core.SystemTapUIErrorMessages;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
@@ -48,9 +49,6 @@ public class FileFinderOpener {
/**
- * Returns a list of files locations for all files that contain the selected
- * function name.
- *
* @param project : C Project Type
* @param functionName : name of a function
* @return an ArrayList of String paths (relative to current workspace) of
@@ -95,15 +93,6 @@ public class FileFinderOpener {
}
- /**
- * Seeks all functions in the given proejct that contains the given function name.
- * Farms off the work of generating the list to the findFunctionsInProject function.
- * Opens a selection dialog if more than one file is found.
- *
- * @param project
- * @param functionName
- * @return
- */
public static String findAndOpen(ICProject project, String functionName) {
offset.clear();
length.clear();
@@ -135,14 +124,7 @@ public class FileFinderOpener {
return output.toString();
}
- /**
- * Open a file in the Editor at the specified offset, highlighting the given length
- *
- * @param path : Absolute path pointing to the file which will be opened.
- * @param offset : Offset of the function to be highlighted.
- * @param length : Length of the function to be highlighted.
- * @return The title of the workbench.
- */
+
public static String open(String path, int offset, int length) {
if (path == null)
return null;
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/Helper.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/Helper.java
index 9333f690ef..01e9543b94 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/Helper.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/Helper.java
@@ -73,11 +73,7 @@ public class Helper {
}
}
- /**
- * Append a String to a file
- * @param absoluteFilePath : The absolute path to the file to which we will append.
- * @param content : The contents to append.
- */
+
public static void appendToFile(String absoluteFilePath, String content) {
try {
FileWriter fstream;
@@ -93,12 +89,7 @@ public class Helper {
e.printStackTrace();
}
}
-
- /**
- * Read the contents of a file
- * @param absoluteFilePath : The absolute path of the file from which to read.
- * @return : The contents of the file as a String.
- */
+
public static String readFile(String absoluteFilePath) {
try {
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/LaunchConfigurationConstants.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/LaunchConfigurationConstants.java
index df7413e743..4df7831026 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/LaunchConfigurationConstants.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/LaunchConfigurationConstants.java
@@ -48,8 +48,7 @@ public final class LaunchConfigurationConstants {
public static final String BUILD_PROJECT = PLUGIN_ID + ".BUILD_PROJECT"; //$NON-NLS-1$
public static final String COMMAND_LIST = PLUGIN_ID + ".COMMAND_LIST"; //$NON-NLS-1$
public static final String BINARY_ARGUMENTS = PLUGIN_ID + ".BINARY_ARGUMENTS"; //$NON-NLS-1$
- public static final String PARSER_CLASS = PLUGIN_ID + ".PARSER_CLASS"; //$NON-NLS-1$
- public static final String VIEW_CLASS = PLUGIN_ID + ".VIEW_CLASS"; //$NON-NLS-1$
+ public static final String PARSER_CLASS = PLUGIN_ID + ".PARSER_CLASS";
public static final String GENERATED_SCRIPT = PLUGIN_ID + ".GENERATED_SCRIPT"; //$NON-NLS-1$
@@ -89,6 +88,5 @@ public final class LaunchConfigurationConstants {
public static final boolean DEFAULT_USE_COLOUR = false;
public static final String DEFAULT_PARSER_CLASS = INVALID;
- public static final String DEFAULT_VIEW_CLASS = INVALID;
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/PluginConstants.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/PluginConstants.java
index 1d609e712e..4e30876503 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/PluginConstants.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/PluginConstants.java
@@ -12,28 +12,21 @@ package org.eclipse.linuxtools.callgraph.core;
public final class PluginConstants {
- private static String DEFAULT_OUTPUT = ""; //$NON-NLS-1$
+ public static String DEFAULT_OUTPUT = ""; //$NON-NLS-1$
public static final String CONFIGURATION_TYPE_ID = "org.eclipse.linuxtools.callgraph.launch.systemtapLaunch"; //$NON-NLS-1$
- public static final String PARSER_CLASS = "org.eclipse.linuxtools.callgraph.core.parser"; //$NON-NLS-1$
- public static final String PARSER_RESOURCE = "org.eclipse.linuxtools.callgraph.core"; //$NON-NLS-1$
- public static final String PARSER_NAME = "parser"; //$NON-NLS-1$
- public static final String VIEW_CLASS = "org.eclipse.linuxtools.callgraph.core.view"; //$NON-NLS-1$
- public static final String VIEW_RESOURCE = "org.eclipse.ui"; //$NON-NLS-1$
- public static final String VIEW_NAME = "views"; //$NON-NLS-1$
- public static final String ATTR_CLASS = "class"; //$NON-NLS-1$
- public static final String ATTR_REALTIME = "realtime"; //$NON-NLS-1$
- public static final String VAL_TRUE = "true"; //$NON-NLS-1$
- public static final String DEFAULT_VIEW_ID = "org.eclipse.linuxtools.callgraph.core.systemtaptextview"; //$NON-NLS-1$
+ public static final String PARSER_CLASS = "org.eclipse.linuxtools.callgraph.core.parser";
+ public static final String PARSER_RESOURCE = "org.eclipse.linuxtools.callgraph.core";
+ public static final String PARSER_NAME = "parser";
public static final String NEW_LINE = "\n"; //$NON-NLS-1$
public static final int MAX_ERRORS = 500; //Maximum number of errors to tolerate
- private static String PLUGIN_LOCATION = ""; //$NON-NLS-1$
+ public static String PLUGIN_LOCATION = ""; //$NON-NLS-1$
public static int SYSTEMTAP_OPTIONS_TAB_HORIZONTAL_SPACING = 30;
public static final String STAP_PATH = "stap"; //$NON-NLS-1$
- private static String STAP_GRAPH_DEFAULT_IO_PATH = ""; //$NON-NLS-1$
+ public static String STAP_GRAPH_DEFAULT_IO_PATH = ""; //$NON-NLS-1$
/**
* Sets the absolute path of the Plugin folder and updates
@@ -46,22 +39,12 @@ public final class PluginConstants {
}
public static String getPluginLocation() {
- if (PLUGIN_LOCATION.length() < 1)
- PluginConstants.setPluginLocation(CallgraphCorePlugin.getDefault().getPluginLocation());
-
return PLUGIN_LOCATION;
}
-
- public static String getDefaultOutput() {
- if (DEFAULT_OUTPUT.length() < 1)
- DEFAULT_OUTPUT = CallgraphCorePlugin.getDefault().getStateLocation().toString()+"/"; //$NON-NLS-1$
- return DEFAULT_OUTPUT;
- }
- public static String getDefaultIOPath() {
- if (STAP_GRAPH_DEFAULT_IO_PATH.length() < 1)
- STAP_GRAPH_DEFAULT_IO_PATH = CallgraphCorePlugin.getDefault().getStateLocation().toString()+"/callgraph.out"; //$NON-NLS-1$
- return STAP_GRAPH_DEFAULT_IO_PATH;
+ public static void setWorkspaceLocation(String loc){
+ DEFAULT_OUTPUT = loc;
+ STAP_GRAPH_DEFAULT_IO_PATH = DEFAULT_OUTPUT+"callgraph.out"; //$NON-NLS-1$
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/StapUIJob.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/StapUIJob.java
deleted file mode 100644
index 03293b57a2..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/StapUIJob.java
+++ /dev/null
@@ -1,73 +0,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
- *******************************************************************************/
-
-package org.eclipse.linuxtools.callgraph.core;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.ui.progress.UIJob;
-
-/**
- * Initializes and runs a StapGraph and TreeViewer within the SystemTap View
- *
- * @author chwang
- *
- */
-public class StapUIJob extends UIJob {
- private SystemTapParser parser;
- private String viewID;
- private SystemTapView viewer;
-
- public StapUIJob(String name, SystemTapParser parser, String viewID) {
- super(name);
- // CREATE THE SHELL
- this.parser = parser;
- this.viewID = viewID;
- }
-
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
- viewer = ViewFactory.createView(viewID);
- if (!viewer.setParser(parser))
- return Status.CANCEL_STATUS;
- if (viewer.initializeView(this.getDisplay(), monitor) == Status.CANCEL_STATUS)
- return Status.CANCEL_STATUS;
-
- if (!parser.realTime) {
- viewer.updateMethod();
- }
- viewer.setSourcePath(parser.getFile());
- viewer.setKillButtonEnabled(true);
-
- return Status.OK_STATUS;
- }
-
- /**
- * For easier JUnit testing only. Allows public access to run method without
- * scheduling an extra job.
- *
- * @param m
- * @return
- */
- public IStatus testRun(IProgressMonitor m) {
- return runInUIThread(m);
- }
-
- /**
- * Returns the viewer object. Viewer is initialized within the run method, and
- * is not guaranteed to be non-null until the job has terminated.
- * @return
- */
- public SystemTapView getViewer() {
- return viewer;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapCommandGenerator.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapCommandGenerator.java
index 137a44b9bc..c0837dd118 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapCommandGenerator.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapCommandGenerator.java
@@ -149,3 +149,88 @@ public class SystemTapCommandGenerator extends Action implements IWorkbenchWindo
}
}
+
+
+/**
+ * Checks if the current editor is operating on a file that actually exists and can be
+ * used as an argument to stap (as opposed to an unsaved buffer).
+ * @return True if the file is valid.
+ */
+//protected boolean isValid() {
+// IEditorPart ed = fWindow.getActivePage().getActiveEditor();
+// if (ed == null) return true;
+// if(isValidFile(ed)){
+//
+// String ret = getFilePath();
+//
+// if(isValidDirectory(ret))
+// return true;
+// }
+// return true;
+//}
+
+//private boolean isValidFile(IEditorPart editor) {
+// if(null == editor) {
+// String msg = MessageFormat.format("No script file is selected", (Object[])null);
+// //LogManager.logInfo("Initializing", MessageDialog.class);
+// MessageDialog.openWarning(fWindow.getShell(), "Problem running SystemTap script - invalid script", msg);
+// //LogManager.logInfo("Disposing", MessageDialog.class);
+// return false;
+// }
+//
+// if(editor.isDirty())
+// editor.doSave(new ProgressMonitorPart(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), new FillLayout()));
+//
+// return true;
+//}
+
+
+/*private boolean isValidDirectory(String fileName) {
+ this.fileName = fileName;
+
+ if(0 == IDESessionSettings.tapsetLocation.trim().length())
+ TapsetLibrary.getTapsetLocation(IDEPlugin.getDefault().getPreferenceStore());
+ if(fileName.contains(IDESessionSettings.tapsetLocation)) {
+ String msg = MessageFormat.format(Localization.getString("RunScriptAction.TapsetDirectoryRun"), (Object[])null);
+ MessageDialog.openWarning(fWindow.getShell(), Localization.getString("RunScriptAction.Error"), msg);
+ return false;
+ }
+ return true;
+}*/
+
+//protected Subscription getSubscription()
+//{
+// return subscription;
+//}
+//
+
+//private void buildEnablementChecks() {
+//if(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor() instanceof STPEditor)
+// setEnablement(true);
+//}
+//
+
+//
+//protected String[] getEnvironmentVariables() {
+// return EnvironmentVariablesPreferencePage.getEnvironmentVariables();
+//}
+
+//
+//protected boolean createClientSession()
+//{
+// if (!ClientSession.isConnected())
+// {
+// new SelectServerDialog(fWindow.getShell()).open();
+// }
+// if((ConsoleLogPlugin.getDefault().getPluginPreferences().getBoolean(ConsoleLogPreferenceConstants.CANCELLED))!=true)
+// {
+// subscription = new Subscription(fileName,isGuru());
+// if (ClientSession.isConnected())
+// {
+// console = ScriptConsole.getInstance(fileName, subscription);
+// console.run();
+// }
+// }
+// return true;
+//}
+//
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapErrorHandler.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapErrorHandler.java
index 68bdd8bbaf..5121e3d83b 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapErrorHandler.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapErrorHandler.java
@@ -27,25 +27,25 @@ import java.util.regex.Pattern;
import org.eclipse.core.runtime.IProgressMonitor;
/**
- * Helper class parses the given string for recognizable error messages
- *
+ * Helper class parses the given string for recognizable error messages
+ *
*/
public class SystemTapErrorHandler {
-
+
public static final String FILE_PROP = "errors.prop"; //$NON-NLS-1$
public static final String FILE_ERROR_LOG = "Error.log"; //$NON-NLS-1$
public static final int MAX_LOG_SIZE = 50000;
private boolean errorRecognized;
- private StringBuilder errorMessage = new StringBuilder(""); //$NON-NLS-1$
+ private String errorMessage = ""; //$NON-NLS-1$
private StringBuilder logContents;
private boolean mismatchedProbePoints;
ArrayList<String> functions = new ArrayList<String>();
-
+
/**
* Delete the log file and create an empty one
*/
- public static void delete() {
- File log = new File(PluginConstants.getDefaultOutput() + FILE_ERROR_LOG); //$NON-NLS-1$
+ public static void delete(){
+ File log = new File(PluginConstants.DEFAULT_OUTPUT + FILE_ERROR_LOG); //$NON-NLS-1$
log.delete();
try {
log.createNewFile();
@@ -53,65 +53,63 @@ public class SystemTapErrorHandler {
e.printStackTrace();
}
}
-
+
+
public SystemTapErrorHandler() {
mismatchedProbePoints = false;
errorRecognized = false;
if (errorMessage.length() < 1) {
- errorMessage.append(Messages
- .getString("SystemTapErrorHandler.ErrorMessage") + //$NON-NLS-1$
- Messages.getString("SystemTapErrorHandler.ErrorMessage1")); //$NON-NLS-1$
+ errorMessage =
+ Messages.getString("SystemTapErrorHandler.ErrorMessage") + //$NON-NLS-1$
+ Messages.getString("SystemTapErrorHandler.ErrorMessage1"); //$NON-NLS-1$
}
-
+
logContents = new StringBuilder(); //$NON-NLS-1$
}
+
/**
- * Search given string for recognizable error messages. Can append the
- * contents of the string to the error log if writeToLog() or
- * finishHandling() are called. A call to finishHandling() will also open a
- * popup window with user-friendly messages corresponding to the
- * recognizable errors.
+ * Search given string for recognizable error messages. Can append the contents of
+ * the string to the error log if writeToLog() or finishHandling() are called.
+ * A call to finishHandling() will also open a popup window with user-friendly messages
+ * corresponding to the recognizable errors.
*
* @param doc
*/
- public void handle(IProgressMonitor m, String errors) {
- String[] errorsList = errors.split("\n"); //$NON-NLS-1$
-
- // READ FROM THE PROP FILE AND DETERMINE TYPE OF ERROR
- File file = new File(PluginConstants.getPluginLocation() + FILE_PROP);
+ public void handle (IProgressMonitor m, String errors){
+ String[] blah = errors.split("\n"); //$NON-NLS-1$
+
+ //READ FROM THE PROP FILE AND DETERMINE TYPE OF ERROR
+ File file = new File(PluginConstants.PLUGIN_LOCATION+FILE_PROP);
try {
- BufferedReader buff = new BufferedReader(new FileReader(file));
+ BufferedReader buff = new BufferedReader (new FileReader(file));
String line;
int index;
-
- for (String message : errorsList) {
- boolean firstLine = true; // Keep the error about mismatched
- // probe points first
- buff = new BufferedReader(new FileReader(file));
- while ((line = buff.readLine()) != null) {
+
+ for (String message : blah) {
+ boolean firstLine = true; //Keep the error about mismatched probe points first
+ buff = new BufferedReader (new FileReader(file));
+ while ((line = buff.readLine()) != null){
if (m != null && m.isCanceled())
return;
index = line.indexOf('=');
- Pattern pat = Pattern.compile(line.substring(0, index),
- Pattern.DOTALL);
+ String matchString = line.substring(0, index);
+ Pattern pat = Pattern.compile(matchString, Pattern.DOTALL);
Matcher matcher = pat.matcher(message);
-
+
+
if (matcher.matches()) {
if (!isErrorRecognized()) {
- errorMessage
- .append(Messages
- .getString("SystemTapErrorHandler.ErrorMessage2")); //$NON-NLS-1$
+ errorMessage+=Messages.getString("SystemTapErrorHandler.ErrorMessage2"); //$NON-NLS-1$
setErrorRecognized(true);
}
- String errorFound = line.substring(index+1);
-
- if (!errorMessage.toString().contains(
- errorFound)) {
- errorMessage.append(errorFound
- + PluginConstants.NEW_LINE);
+
+ //TODO: Rough hack, very slow
+ if (!errorMessage.contains(line.substring(index+1))) {
+ errorMessage+=line.substring(index+1)
+ + PluginConstants.NEW_LINE;
}
-
+
if (firstLine) {
findFunctions(m, message, pat);
mismatchedProbePoints = true;
@@ -122,36 +120,29 @@ public class SystemTapErrorHandler {
}
buff.close();
}
-
+
logContents.append(errors);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
-
+
}
-
- /**
- * Handle the error. Intended to work with a FileReader for a temporary error file.
- *
- * @param m
- * @param f
- * @return
- * @throws IOException
- */
- public String handle(IProgressMonitor m, FileReader f) throws IOException {
- BufferedReader br = new BufferedReader(f);
-
+
+
+ public String handle (IProgressMonitor m, FileReader f) throws IOException {
+ BufferedReader br = new BufferedReader (f);
+
String line;
StringBuilder builder = new StringBuilder();
int counter = 0;
- while ((line = br.readLine()) != null) {
+ while ( (line = br.readLine()) != null) {
counter++;
builder.append(line);
builder.append("\n"); //$NON-NLS-1$
if (m != null && m.isCanceled())
- return ""; //$NON-NLS-1$
+ return "";
if (counter == 300) {
handle(m, builder.toString());
builder = new StringBuilder();
@@ -159,165 +150,154 @@ public class SystemTapErrorHandler {
}
}
handle(m, builder.toString());
- return errorMessage.toString();
+ return errorMessage;
}
/**
- * Run this method when there are no more error messages to handle. Creates
- * the error pop-up message and writes to log. Returns true if a relaunch should
- * be attempted. Currently relaunch only works for the callgraph script.
+ * Run this method when there are no more error messages to handle.
+ * Creates the error pop-up message and writes to log.
*
*/
- public boolean finishHandling(IProgressMonitor m, int numberOfErrors) {
+ public void finishHandling(IProgressMonitor m, int numberOfErrors) {
if (!isErrorRecognized()) {
- errorMessage.append(Messages.getString("SystemTapErrorHandler.4") + //$NON-NLS-1$
- Messages.getString("SystemTapErrorHandler.5")); //$NON-NLS-1$
+ errorMessage+=Messages.getString("SystemTapErrorHandler.4") + //$NON-NLS-1$
+ Messages.getString("SystemTapErrorHandler.5"); //$NON-NLS-1$
}
-
+
writeToLog();
-
- if (mismatchedProbePoints) {
+
+ if (mismatchedProbePoints){
if (numberOfErrors > PluginConstants.MAX_ERRORS) {
- errorMessage.setLength(0);
- errorMessage
- .append(PluginConstants.NEW_LINE
- + Messages
- .getString("SystemTapErrorHandler.TooManyErrors1") + numberOfErrors + Messages.getString("SystemTapErrorHandler.TooManyErrors2") + //$NON-NLS-1$ //$NON-NLS-2$
- Messages
- .getString("SystemTapErrorHandler.TooManyErrors3") + //$NON-NLS-1$
- Messages
- .getString("SystemTapErrorHandler.TooManyErrors4")); //$NON-NLS-1$
- SystemTapUIErrorMessages mes = new SystemTapUIErrorMessages(
- Messages
- .getString("SystemTapErrorHandler.ErrorMessageName"), //$NON-NLS-1$
- Messages
- .getString("SystemTapErrorHandler.ErrorMessageTitle"), //$NON-NLS-1$
- errorMessage.toString());
- mes.schedule();
+ errorMessage = PluginConstants.NEW_LINE
+ + Messages.getString("SystemTapErrorHandler.TooManyErrors1") + numberOfErrors +Messages.getString("SystemTapErrorHandler.TooManyErrors2") + //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.getString("SystemTapErrorHandler.TooManyErrors3") + //$NON-NLS-1$
+ Messages.getString("SystemTapErrorHandler.TooManyErrors4"); //$NON-NLS-1$
+// SystemTapUIErrorMessages mes = new SystemTapUIErrorMessages(
+// Messages.getString("SystemTapErrorHandler.ErrorMessageName"), //$NON-NLS-1$
+// Messages.getString("SystemTapErrorHandler.ErrorMessageTitle"), //$NON-NLS-1$
+// errorMessage); //$NON-NLS-1$ //$NON-NLS-2$
+// mes.schedule();
m.setCanceled(true);
- return false;
+ return;
}
-
- StringBuilder resultFileContent = new StringBuilder();
- String fileLocation = PluginConstants.getDefaultOutput()
- + "callgraphGen.stp"; //$NON-NLS-1$
+
+
+ StringBuffer resultFileContent = new StringBuffer();
+ String fileLocation = PluginConstants.DEFAULT_OUTPUT + "callgraphGen.stp"; //$NON-NLS-1$
String line;
boolean skip = false;
File file = new File(fileLocation);
- int counter = 0;
try {
BufferedReader buff = new BufferedReader(new FileReader(file));
- while ((line = buff.readLine()) != null) {
+ while ((line = buff.readLine()) != null){
if (m != null && m.isCanceled())
- return false;
- skip = false;
- for (String func : functions) {
- if (line.contains("function(\"" + func + "\").call")) { //$NON-NLS-1$ //$NON-NLS-2$
+ return;
+ skip = false;
+ for (String func : functions){
+ if (line.contains("function(\"" + func + "\").call")){ //$NON-NLS-1$ //$NON-NLS-2$
skip = true;
- counter++;
- if (counter == functions.size()) {
- buff.close();
- return false;
- }
break;
}
}
-
- if (!skip && !line.equals("\n")) { //$NON-NLS-1$
- //This works because call and return are on the same line.
+ if (!skip && !line.equals("\n")){ //$NON-NLS-1$
resultFileContent.append(line);
resultFileContent.append("\n"); //$NON-NLS-1$
}
}
-
+
buff.close();
-
- BufferedWriter wbuff = new BufferedWriter(new FileWriter(file));
+
+ BufferedWriter wbuff= new BufferedWriter(new FileWriter(file));
wbuff.write(resultFileContent.toString());
wbuff.close();
- return true;
-
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
-
+
+ }else{
+// SystemTapUIErrorMessages mes = new SystemTapUIErrorMessages(
+// Messages.getString("SystemTapErrorHandler.ErrorMessageName"), //$NON-NLS-1$
+// Messages.getString("SystemTapErrorHandler.ErrorMessageTitle"), //$NON-NLS-1$
+// errorMessage); //$NON-NLS-1$ //$NON-NLS-2$
+// mes.schedule();
}
- return false;
-
+
+
}
-
+
+
/**
- * Writes the contents of logContents to the error log, along with date and
- * time.
+ * Writes the contents of logContents to the error log, along with date and time.
*/
public void writeToLog() {
- File errorLog = new File(PluginConstants.getDefaultOutput() + "Error.log"); //$NON-NLS-1$
+ File errorLog = new File(PluginConstants.DEFAULT_OUTPUT + "Error.log"); //$NON-NLS-1$
try {
- // CREATE THE ERROR LOG IF IT DOES NOT EXIST
- // CLEAR THE ERROR LOG AFTER A FIXED SIZE(BYTES)
- if (!errorLog.exists() || errorLog.length() > MAX_LOG_SIZE) {
+ //CREATE THE ERROR LOG IF IT DOES NOT EXIST
+ //CLEAR THE ERROR LOG AFTER A FIXED SIZE(BYTES)
+ if (!errorLog.exists()
+ || errorLog.length() > MAX_LOG_SIZE) {
errorLog.delete();
- errorLog.createNewFile();
+ errorLog.createNewFile();
}
-
- Calendar cal = Calendar.getInstance(TimeZone.getDefault());
- int year = cal.get(Calendar.YEAR);
- int month = cal.get(Calendar.MONTH);
- int day = cal.get(Calendar.DAY_OF_MONTH);
- int hour = cal.get(Calendar.HOUR_OF_DAY);
- int minute = cal.get(Calendar.MINUTE);
- int second = cal.get(Calendar.SECOND);
-
- // APPEND THE ERROR TO THE LOG
- Helper.appendToFile(errorLog.getAbsolutePath(), Messages
- .getString("SystemTapErrorHandler.ErrorLogDashes") //$NON-NLS-1$
- + PluginConstants.NEW_LINE
- + day
- + "/" + month //$NON-NLS-1$
- + "/" + year + " - " + hour + ":" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- + minute
- + ":" + second //$NON-NLS-1$
- + PluginConstants.NEW_LINE
- + logContents
- + PluginConstants.NEW_LINE + PluginConstants.NEW_LINE);
+
+ Calendar cal = Calendar.getInstance(TimeZone.getDefault());
+ int year = cal.get(Calendar.YEAR);
+ int month = cal.get(Calendar.MONTH);
+ int day = cal.get(Calendar.DAY_OF_MONTH);
+ int hour = cal.get(Calendar.HOUR_OF_DAY);
+ int minute = cal.get(Calendar.MINUTE);
+ int second = cal.get(Calendar.SECOND);
+
+ //APPEND THE ERROR TO THE LOG
+ Helper
+ .appendToFile(errorLog.getAbsolutePath(),
+ Messages.getString("SystemTapErrorHandler.ErrorLogDashes") //$NON-NLS-1$
+ + PluginConstants.NEW_LINE
+ + day + "/" + month //$NON-NLS-1$
+ + "/" + year + " - " + hour + ":" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ + minute + ":" + second //$NON-NLS-1$
+ + PluginConstants.NEW_LINE + logContents
+ + PluginConstants.NEW_LINE + PluginConstants.NEW_LINE);
} catch (IOException e) {
e.printStackTrace();
}
-
+
logContents = new StringBuilder(); //$NON-NLS-1$
}
/**
* Returns true if an error matches one of the regex's in error.prop
- *
* @return
*/
public boolean isErrorRecognized() {
return errorRecognized;
}
+
/**
* Convenience method to change the error recognition value.
- *
* @param errorsRecognized
*/
private void setErrorRecognized(boolean errorsRecognized) {
errorRecognized = errorsRecognized;
}
+
public boolean hasMismatchedProbePoints() {
return mismatchedProbePoints;
}
+
public void setMismatchedProbePoints(boolean mismatchedProbePoints) {
this.mismatchedProbePoints = mismatchedProbePoints;
}
-
+
+
public void findFunctions(IProgressMonitor m, String message, Pattern pat) {
String[] list = message.split("\n"); //$NON-NLS-1$
String result;
@@ -331,13 +311,14 @@ public class SystemTapErrorHandler {
int secondLastQuote = s.lastIndexOf('"', lastQuote - 1);
if (secondLastQuote < 0)
return;
- result = s.substring(secondLastQuote + 1, lastQuote);
+ result = s.substring(secondLastQuote+1, lastQuote);
if (!functions.contains(result))
functions.add(result);
}
}
}
+
public ArrayList<String> getFunctions() {
return functions;
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapParser.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapParser.java
index d237176be1..84307e15d2 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapParser.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapParser.java
@@ -10,105 +10,64 @@
*******************************************************************************/
package org.eclipse.linuxtools.callgraph.core;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
public abstract class SystemTapParser extends Job {
protected IProgressMonitor monitor;
- protected String sourcePath;
- protected String viewID;
- protected SystemTapView view;
- protected boolean realTime = false;
- protected Object data;
- protected Object internalData;
-
- public boolean isDone;
+ protected String filePath;
- private RunTimeJob job;
- private boolean jobCancelled;
-
public SystemTapParser() {
- super("Parsing data"); //$NON-NLS-1$
- this.sourcePath = PluginConstants.getDefaultIOPath();
- this.viewID = null;
+ super("New_Job");
+ this.filePath = PluginConstants.STAP_GRAPH_DEFAULT_IO_PATH;
initialize();
- isDone = false;
-
- //PURELY FOR TESTING
- if (monitor == null){
- monitor = new NullProgressMonitor();
- }
}
-
- public SystemTapParser(String name, String filePath) {
- super(name);
- // BY DEFAULT READ/WRITE FROM HERE
- if (filePath != null)
- this.sourcePath = filePath;
- else
- this.sourcePath = PluginConstants.getDefaultIOPath();
- this.viewID = null;
- initialize();
- }
-
-
-
/**
- * Initialize will be called in the constructors for this class. Use this
- * method to initialize variables.
+ * Initialize will be called in the constructors for this class.
+ * Use this method to initialize variables.
*/
protected abstract void initialize();
-
+
/**
* Implement this method to execute parsing. The return from
* executeParsing() will be the return value of the run command.
*
- * SystemTapParser will call executeParsing() within its run method. (i.e.
- * will execute in a separate, non-UI thread)
- *
+ * SystemTapParser will call executeParsing() within its run method.
+ * (i.e. will execute in a separate, non-UI thread)
* @return
*/
- public abstract IStatus nonRealTimeParsing();
-
-
+ public abstract IStatus executeParsing();
+ public abstract void saveData(String filePath);
- /**
- * Implement this method if your parser is to execute in realtime. This method
- * will be called as part of a while loop in a separate Job. Use the setInternalData
- * method to initialize some data object for use in realTimeParsing. The default
- * setInternalMethod method will set internalData to a BufferedReader
- * <br> <br>
- * After the isDone flag is set to true, the realTimeParsing() method will
- * be run one more time to catch any stragglers.
- */
- public abstract IStatus realTimeParsing();
+ public SystemTapParser(String name, String filePath) {
+ super(name);
+ //BY DEFAULT READ/WRITE FROM HERE
+ if (filePath != null)
+ this.filePath = filePath;
+ else
+ this.filePath = PluginConstants.STAP_GRAPH_DEFAULT_IO_PATH;
+ initialize();
+ }
/**
* Cleans names of form 'name").return', returning just the name
- *
* @param name
*/
protected String cleanFunctionName(String name) {
return name.split("\"")[0]; //$NON-NLS-1$
}
-
+
/**
* Checks for quotations and brackets in the function name
- *
* @param name
*/
protected boolean isFunctionNameClean(String name) {
@@ -116,272 +75,95 @@ public abstract class SystemTapParser extends Job {
return false;
return true;
}
-
+
/**
- * Creates a popup error dialog in a separate UI thread. Dialog title is
- * 'Unexpected symbol,' name is 'ParseError' and body is the specified
- * message.
- *
+ * Creates a popup error dialog in a separate UI thread.
+ * Dialog title is 'Unexpected symbol,' name is 'ParseError' and body
+ * is the specified message.
* @param message
*/
protected void parsingError(String message) {
SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
- Messages.getString("SystemTapParser.0"), Messages.getString("SystemTapParser.1"), message); //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.getString("SystemTapParser.0"), Messages.getString("SystemTapParser.1"), message); //$NON-NLS-1$ //$NON-NLS-2$
mess.schedule();
}
-
- /**
- * Load the specified viewID by creating a StapUIJob. Does not return until the StapUIJob has.
- * Returns true if the makeView was successful, false otherwise.
- */
- protected boolean makeView() {
- // Create a UIJob to handle the rest
- if (viewID != null && viewID.length() > 0) {
- try {
- StapUIJob uijob = new StapUIJob(Messages
- .getString("StapGraphParser.5"), this, viewID); //$NON-NLS-1$
- uijob.schedule();
- uijob.join();
- view = uijob.getViewer();
- return true;
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- return false;
- }
+
+
@Override
protected IStatus run(IProgressMonitor monitor) {
- // Generate real-time job
- IStatus returnStatus = Status.CANCEL_STATUS;
+ this.monitor = monitor;
+ return executeParsing();
- makeView();
-
- if (realTime && (job == null || job.getResult()==null)) {
- job = new RunTimeJob("RealTimeParser"); //$NON-NLS-1$
- job.schedule();
- } else {
- returnStatus = nonRealTimeParsing();
- }
-
-
- if (!returnStatus.isOK()){
- return returnStatus;
- }
-
- setData(this);
- return returnStatus;
}
-
+
public void printArrayListMap(HashMap<Integer, ArrayList<Integer>> blah) {
int amt = 0;
for (int a : blah.keySet()) {
amt++;
MP.print(a + " ::> "); //$NON-NLS-1$
for (int c : blah.get(a)) {
- System.out.print(c + " "); //$NON-NLS-1$
+ System.out.print(c + " "); //$NON-NLS-1$
}
MP.println(""); //$NON-NLS-1$
}
}
-
+
@SuppressWarnings("unchecked")
public void printMap(Map blah) {
int amt = 0;
for (Object a : blah.keySet()) {
amt++;
- MP.println(a + " ::> " + blah.get(a)); //$NON-NLS-1$
- }
- }
-
-
- /**
- * For easier JUnit testing only. Allows public access to run method without
- * scheduling an extra job.
- *
- * @param m
- * @return
- */
- public IStatus testRun(IProgressMonitor m) {
- StapUIJob uijob = new StapUIJob(Messages
- .getString("StapGraphParser.5"), this, viewID); //$NON-NLS-1$
- uijob.schedule();
- view = uijob.getViewer();
- return Status.OK_STATUS;
- }
-
- public void launchFileErrorDialog() {
- SystemTapUIErrorMessages err = new SystemTapUIErrorMessages(Messages
- .getString("SystemTapParser.2"), //$NON-NLS-1$
- Messages.getString("SystemTapParser.3"), //$NON-NLS-1$
- Messages.getString("SystemTapParser.4") + sourcePath + //$NON-NLS-1$
- Messages.getString("SystemTapParser.5")); //$NON-NLS-1$
- err.schedule();
- }
-
-
-
-
- private class RunTimeJob extends Job {
- public RunTimeJob(String name) {
- super(name);
+ MP.println(a + " ::> "+blah.get(a)); //$NON-NLS-1$
}
-
- @Override
- public IStatus run(IProgressMonitor monitor) {
- IStatus returnStatus = Status.CANCEL_STATUS;
- try {
- setInternalData();
- while (!isDone){
- returnStatus = realTimeParsing();
-
-
- if (monitor.isCanceled() || returnStatus == Status.CANCEL_STATUS) {
- return Status.CANCEL_STATUS;
- }
- }
- returnStatus = realTimeParsing();
- } catch (Exception e) {
- e.printStackTrace();
- }
- return returnStatus;
- }
- }
-
- /**
- * Return the Data object.
- * @return
- */
- public Object getData() {
- return data;
}
- /**
- * Generic method for setting the internalData object. This will be called
- * by a real-time-parser immediately before its main polling loop. By default,
- * this method will attempt to create a bufferedReader around File(filePath)
- *
- * @throws Exception
- */
- protected void setInternalData() throws Exception {
- File file = new File(sourcePath);
- internalData = new BufferedReader(new FileReader(file));
- }
-
/**
* Returns the monitor
- *
* @return
*/
public IProgressMonitor getMonitor() {
return monitor;
}
-
-
+
+
/**
- * Gets the file to read from
- *
+ * For easier JUnit testing only. Allows public access to run method without scheduling an extra job.
+ *
+ * @param m
* @return
*/
- public String getFile() {
- return sourcePath;
+ public IStatus testRun(IProgressMonitor m) {
+ return run(m);
}
- public Job getJob() {
- return job;
+ public void launchFileDialogError(){
+ SystemTapUIErrorMessages err = new SystemTapUIErrorMessages(
+ Messages.getString("SystemTapParser.2"), //$NON-NLS-1$
+ Messages.getString("SystemTapParser.3"), //$NON-NLS-1$
+ Messages.getString("SystemTapParser.4")+filePath+ //$NON-NLS-1$
+ Messages.getString("SystemTapParser.5")); //$NON-NLS-1$
+ err.schedule();
}
-
/**
* Sets the file to read from
- *
- * @param source
+ * @param filePath
*/
- public void setSourcePath(String source) {
- this.sourcePath = source;
- }
-
-
- public void setDone(boolean val) {
- isDone = val;
+ public void setFile(String filePath) {
+ this.filePath = filePath;
}
- public void setMonitor(IProgressMonitor m) {
- this.monitor = m;
- }
-
- /**
- * Set whether or not this parser runs in real time. If viewID has already
- * been set, this will also attempt to open the view.
- *
- * @throws InterruptedException
- */
- public void setRealTime(boolean val) throws InterruptedException {
- realTime = val;
-
- }
-
/**
- * Set the viewID to use for this parser -- see the callgraph.core view
- * extension point. If realTime is set to true, this will also attempt to
- * open the view.
- *
- * @throws InterruptedException
- */
- public void setViewID(String value) throws InterruptedException {
- viewID = value;
- }
-
- /**
- * Called at the end of a non-realtime run.
- * Feel free to override this method if using non-realtime functions.
- * The setData method will be called after executeParsing() is run. The getData() method
- * will be used by the SystemTapView to get the data associated with this parser.
- * <br><br>
- * Alternatively, you can cast the parser within SystemTapView to your own parser class and access
- * its data structures that way.
- */
- public void setData(Object obj) {
- data = obj;
- }
-
- /**
- * Cancels the RunTimeJob affiliated with this parser. Returns the result
- * of job.cancel() if job is not null, or false if job is null.
- */
- public boolean cancelJob() {
- if (job != null) {
- jobCancelled = true;
- return job.cancel();
- }
- return false;
- }
-
- /**
- * Returns true if job is not null and the job's last result was CANCEL_STATUS.
- * False otherwise.
+ * Gets the file to read from
+ * @return
*/
- public boolean isJobCancelled() {
- if ((job != null && job.getResult() == Status.CANCEL_STATUS)
- || jobCancelled) {
- return true;
- }
- return false;
+ public String getFile() {
+ return filePath;
}
-
- public void setKillButtonEnabled(boolean val) {
- if (view != null)
- view.setKillButtonEnabled(val);
-
- }
-
- public boolean isRealTime() {
- return realTime;
- }
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapTextParser.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapTextParser.java
deleted file mode 100644
index 362041ed73..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapTextParser.java
+++ /dev/null
@@ -1,61 +0,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
- *******************************************************************************/
-package org.eclipse.linuxtools.callgraph.core;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-public class SystemTapTextParser extends SystemTapParser{
-
- protected String contents;
-
- @Override
- public IStatus nonRealTimeParsing() {
- contents = Helper.readFile(sourcePath);
- System.out.println(contents);
- return Status.OK_STATUS;
- }
-
- @Override
- protected void initialize() {
- System.out.println("INITIALIZING");
- }
-
- @Override
- public IStatus realTimeParsing() {
- if (!(internalData instanceof BufferedReader))
- return Status.CANCEL_STATUS;
-
- BufferedReader buff = (BufferedReader) internalData;
- StringBuffer text = new StringBuffer();
-
- String line;
- try {
- while ((line = buff.readLine()) != null) {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- text.append(line);
- }
- setData(text.toString());
- view.update();
- } catch (IOException e) {
- e.printStackTrace();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
-
- return Status.OK_STATUS;
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapTextView.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapTextView.java
deleted file mode 100644
index 6fa850ec60..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapTextView.java
+++ /dev/null
@@ -1,244 +0,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
- *******************************************************************************/
-package org.eclipse.linuxtools.callgraph.core;
-
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-
-public class SystemTapTextView extends SystemTapView {
- private SystemTapParser parser;
- private StyledText viewer;
-
- private Display display;
- private int previousEnd;
-
-
- /**
- * Passing the focus request to the viewer's control.
- */
- public void setFocus() {
- if (viewer != null && !viewer.isDisposed())
- viewer.setFocus();
- }
-
- public void createViewer(Composite parent) {
- viewer = new StyledText(parent, SWT.READ_ONLY | SWT.MULTI
- | SWT.V_SCROLL | SWT.WRAP);
-
- viewer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- Font font = new Font(parent.getDisplay(), "Monospace", 11, SWT.NORMAL); //$NON-NLS-1$
- viewer.setFont(font);
- masterComposite = parent;
- display = masterComposite.getDisplay();
- }
-
- /**
- * Print with colour codes. Colour codes accepted in the form of ~(R,G,B)~,
- * and apply for the rest of the line or until another code is encountered
- * @param text
- */
- public void prettyPrintln(String text) {
- Vector<StyleRange> styles = new Vector<StyleRange>();
- String[] txt = text.split("\\n"); //$NON-NLS-1$
- int lineOffset = 0;
- int inLineOffset;
-
- // txt[] contains text, with one entry for each new line
- for (int i = 0; i < txt.length; i++) {
-
- // Skip blank strings
- if (txt[i].length() == 0) {
- viewer.append(PluginConstants.NEW_LINE);
- continue;
- }
-
- // Search for colour codes, if none exist then continue
- String[] split_txt = txt[i].split("~\\("); //$NON-NLS-1$
- if (split_txt.length == 1) {
- viewer.append(split_txt[0]);
- viewer.append(PluginConstants.NEW_LINE);
- continue;
- }
-
- inLineOffset = 0;
- for (int k = 0; k < split_txt.length; k++) {
- // Skip blank substrings
- if (split_txt[k].length() == 0)
- continue;
-
- // Split for the number codes
- String[] coloursAndText = split_txt[k].split("\\)~"); //$NON-NLS-1$
-
- // If the string is properly formatted, colours should be length
- // 2
- // If it is not properly formatted, don't colour (just print)
- if (coloursAndText.length != 2) {
- for (int j = 0; j < coloursAndText.length; j++) {
- viewer.append(coloursAndText[j]);
- inLineOffset += coloursAndText[j].length();
- }
- continue;
- }
-
- // The first element in the array should contain the colours
- String[] colours = coloursAndText[0].split(","); //$NON-NLS-1$
- if (colours.length < 3)
- continue;
-
- // The second element in the array should contain the text
- viewer.append(coloursAndText[1]);
-
- // Create a colour based on the 3 integers (if there are any
- // more integers, just ignore)
- int R = new Integer(colours[0].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
- int G = new Integer(colours[1].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
- int B = new Integer(colours[2].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
-
- if (R > 255) R = 255;
- if (G > 255) G = 255;
- if (B > 255) B = 255;
-
- if (R < 0) R = 0;
- if (G < 0) G = 0;
- if (B < 0) B = 0;
-
- Color newColor = new Color(display, R, G, B);
-
- // Find the offset of the current line
- lineOffset = viewer.getOffsetAtLine(viewer.getLineCount() - 1);
-
- // Create a new style that lasts no further than the length of
- // the line
- StyleRange newStyle = new StyleRange(lineOffset + inLineOffset,
- coloursAndText[1].length(), newColor, null);
- styles.addElement(newStyle);
-
- inLineOffset += coloursAndText[1].length();
- }
-
- viewer.append(PluginConstants.NEW_LINE);
- }
-
- // Create a new style range
- StyleRange[] s = new StyleRange[styles.size()];
- styles.copyInto(s);
-
- int cnt = viewer.getCharCount();
-
- // Using replaceStyleRanges with previousEnd, etc, effectively adds
- // the StyleRange to the existing set of Style Ranges (so we don't
- // waste time fudging with old style ranges that haven't changed)
- viewer.replaceStyleRanges(previousEnd, cnt - previousEnd, s);
- previousEnd = cnt;
-
- // Change focus and update
- viewer.setTopIndex(viewer.getLineCount() - 1);
- viewer.update();
- }
-
- /**
- * Default print, just dumps text into the viewer.
- * @param text
- */
- public void println(String text) {
- if (viewer != null && !viewer.isDisposed()) {
- viewer.append(text);
- viewer.setTopIndex(viewer.getLineCount() - 1);
- viewer.update();
- }
- }
-
- public void clearAll() {
- if (viewer != null && !viewer.isDisposed()) {
- previousEnd = 0;
- viewer.setText(""); //$NON-NLS-1$
- viewer.update();
- }
- }
-
- /**
- * Testing convenience method to see what was printed
- *
- * @return viewer text
- */
- public String getText() {
- return viewer.getText();
- }
-
-
- @Override
- public IStatus initializeView(Display targetDisplay, IProgressMonitor monitor) {
- previousEnd = 0;
- viewer.setText(""); //$NON-NLS-1$
- viewer.update();
- return Status.OK_STATUS;
- }
-
- @Override
- public boolean setParser(SystemTapParser p) {
- parser = p;
- return true;
- }
-
- @Override
- public void createPartControl(Composite parent) {
- createViewer(parent);
-
- addKillButton();
- addFileMenu();
- addErrorMenu();
- addHelpMenu();
- ViewFactory.addView(this);
- }
-
- @Override
- public void updateMethod() {
- if (parser.getData() instanceof String) {
- String data = (String) parser.getData();
- if (data.length() > 0)
- prettyPrintln((String) parser.getData());
- }
- }
-
- @Override
- public void setViewID() {
- viewID = "org.eclipse.linuxtools.callgraph.core.staptextview"; //$NON-NLS-1$
- }
-
- @Override
- protected boolean createOpenAction() {
- return false;
- }
-
- @Override
- protected boolean createOpenDefaultAction() {
- return false;
- }
-
- @Override
- public SystemTapParser getParser() {
- return parser;
- }
-
-
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapView.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapView.java
deleted file mode 100644
index 98c018f831..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapView.java
+++ /dev/null
@@ -1,540 +0,0 @@
-package org.eclipse.linuxtools.callgraph.core;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.nio.MappedByteBuffer;
-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.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-import org.eclipse.ui.part.ViewPart;
-import org.eclipse.ui.progress.UIJob;
-
-public abstract class SystemTapView extends ViewPart {
-
- private final String NEW_LINE = Messages.getString("SystemTapView.1"); //$NON-NLS-1$
-
- public Composite masterComposite;
- private Action error_errorLog;
- private Action error_deleteError;
- private IMenuManager errors;
- private IMenuManager help;
- private Action kill;
-
- protected String viewID;
- @SuppressWarnings("unused")
- private Action help_about;
- private Action help_version;
- protected Action save_file;
- protected Action open_file;
- protected Action open_default;
- protected String sourcePath;
- protected IMenuManager file;
-
-
- /**
- * The constructor.
- *
- * @return
- */
- public SystemTapView() {
- }
-
- /**
- * This method will be called from GraphUIJob to load the view
- * @param targetDisplay
- * @param monitor
- * @return Status.OK_STATUS to continue, Status.CANCEL_STATUS to abort
- */
- public abstract IStatus initializeView(Display targetDisplay,
- IProgressMonitor monitor);
-
- /**
- * @param doMaximize
- * : true && view minimized will maximize the view, otherwise it
- * will just 'refresh'
- */
- public void maximizeOrRefresh(boolean doMaximize) {
- IWorkbenchPage page = this.getViewSite()
- .getWorkbenchWindow().getActivePage();
-
- if (doMaximize
- && page.getPartState(page.getActivePartReference()) != IWorkbenchPage.STATE_MAXIMIZED) {
- IWorkbenchAction action = ActionFactory.MAXIMIZE.create(this
- .getViewSite().getWorkbenchWindow());
- action.run();
- } else {
- this.layout();
- }
- }
-
- public void layout() {
- masterComposite.layout();
- }
-
- /**
- * If view is not maximized it will be maximized
- */
- public void maximizeIfUnmaximized() {
- IWorkbenchPage page = this.getViewSite()
- .getWorkbenchWindow().getActivePage();
-
- if (page.getPartState(page.getActivePartReference()) != IWorkbenchPage.STATE_MAXIMIZED) {
- IWorkbenchAction action = ActionFactory.MAXIMIZE.create(this
- .getViewSite().getWorkbenchWindow());
- action.run();
- }
- }
-
- /**
- * Schedules the updateMethod job in a UI Thread. Does not return until
- * updateMethod is complete.
- *
- * @throws InterruptedException
- */
- public void update() throws InterruptedException {
- ViewUIUpdater updater = new ViewUIUpdater("SystemTapView.update"); //$NON-NLS-1$
- updater.schedule();
- updater.join();
- }
-
- private class ViewUIUpdater extends UIJob {
-
- public ViewUIUpdater(String name) {
- super(name);
- }
-
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
- updateMethod();
- return Status.OK_STATUS;
- }
-
- };
-
- /**
- * Method for fetching a parser object. This method should return
- * the running parser, or else some features may not work. Create
- * your own parser parameter, but please ensure that it extends
- * SystemTapParser.
- *
- * @return
- */
- public abstract SystemTapParser getParser();
-
- /**
- * Method for setting the parser object of the view. Make this method return
- * true if the parser is of the expected class, false if it is null or
- * unexpected.
- *
- * @param parser
- * @return
- */
- public abstract boolean setParser(SystemTapParser parser);
-
- /**
- * Perform whatever actions are necessary to 'update' this viewer. It is
- * recommended that the update function be called after the setParser method
- * is called.
- */
- public abstract void updateMethod();
-
- /**
- * Implement this method to set the viewID variable to the id of the view
- * that extends SystemTapView and uses the core.systemtapview extension
- * point.
- */
- public abstract void setViewID();
-
- /**
- * Implement this method so that the Open button in the file menu created
- * by <code>addFileMenu()</code> is able to actually open files. User will
- * be prompted for a file to open.
- *
- * @return True if an open action should be created, false otherwise.
- */
- protected abstract boolean createOpenAction();
-
- /**
- * Implement this method so that the Open default button in the file menu created
- * by <code>addFileMenu()</code> is able to actually open default. The Open
- * default button should open from a fixed location, usually the default output
- * path if that is accessible..
- *
- * @return True if an open default action should be created, false otherwise.
- */
- protected abstract boolean createOpenDefaultAction();
-
- /**
- * Appends the error menu, containing options for opening and clearing the
- * error log.
- */
- public void addErrorMenu() {
- IMenuManager menu = getViewSite().getActionBars().getMenuManager();
- errors = new MenuManager(Messages.getString("SystemTapView.2")); //$NON-NLS-1$
- menu.add(errors);
- createErrorActions();
-
- errors.add(error_errorLog);
- errors.add(error_deleteError);
- }
-
- /**
- * Create File menu -- calls the abstract protected methods
- * <code>createOpenAction()</code> and <code>createOpenDefaultAction()</code>. Have
- * these methods return false if you do not wish to create an Open or Open Default
- * option in the File menu of your view.
- */
- public void addFileMenu() {
- IMenuManager menu = getViewSite().getActionBars().getMenuManager();
- if (file == null) {
- file = new MenuManager(Messages.getString("SystemTapView.8")); //$NON-NLS-1$
- menu.add(file);
- }
-
-
- if (createOpenAction())
- file.add(open_file);
- if (createOpenDefaultAction())
- file.add(open_default);
-
- createSaveAction();
- file.add(save_file);
- }
-
-
- public void addHelpMenu() {
- IMenuManager menu = getViewSite().getActionBars().getMenuManager();
- help = new MenuManager(Messages.getString("SystemTapView.3")); //$NON-NLS-1$
- menu.add(help);
- createHelpActions();
-
- help.add(help_version);
- }
-
-
- public void createHelpActions() {
- help_version = new Action(Messages.getString("SystemTapView.4")) { //$NON-NLS-1$
- public void run() {
- Runtime rt = Runtime.getRuntime();
- try {
- Process pr = rt.exec("stap -V"); //$NON-NLS-1$
- BufferedReader buf = new BufferedReader(
- new InputStreamReader(pr.getErrorStream()));
- String line = ""; //$NON-NLS-1$
- String message = ""; //$NON-NLS-1$
-
- while ((line = buf.readLine()) != null) {
- message += line + NEW_LINE; //$NON-NLS-1$
- }
-
- try {
- pr.waitFor();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
-
- Shell sh = new Shell();
-
- MessageDialog.openInformation(sh, Messages
- .getString("SystemTapView.5"), message); //$NON-NLS-1$
-
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- };
-
- help_about = new Action(Messages.getString("SystemTapView.6")) { //$NON-NLS-1$
- public void run() {
- Display disp = Display.getCurrent();
- if (disp == null){
- disp = Display.getDefault();
- }
-
-
- Shell sh = new Shell(disp, SWT.MIN | SWT.MAX);
- sh.setSize(425, 540);
- GridLayout gl = new GridLayout(1, true);
- sh.setLayout(gl);
-
- sh.setText(""); //$NON-NLS-1$
-
- Image img = new Image(disp, PluginConstants.getPluginLocation()+"systemtap.png"); //$NON-NLS-1$
- Composite cmp = new Composite(sh, sh.getStyle());
- cmp.setLayout(gl);
- GridData data = new GridData(415,100);
- cmp.setLayoutData(data);
- cmp.setBackgroundImage(img);
-
- Composite c = new Composite(sh, sh.getStyle());
- c.setLayout(gl);
- GridData gd = new GridData(415,400);
- c.setLayoutData(gd);
- c.setLocation(0,300);
- StyledText viewer = new StyledText(c, SWT.READ_ONLY | SWT.MULTI
- | SWT.V_SCROLL | SWT.WRAP | SWT.BORDER);
-
- GridData viewerGD = new GridData(SWT.FILL, SWT.FILL, true, true);
- viewer.setLayoutData(viewerGD);
- Font font = new Font(sh.getDisplay(), "Monospace", 11, SWT.NORMAL); //$NON-NLS-1$
- viewer.setFont(font);
- viewer.setText(
- "" + //$NON-NLS-1$
- "" + //$NON-NLS-1$
- "" + //$NON-NLS-1$
- "" + //$NON-NLS-1$
- "" + //$NON-NLS-1$
- "" + //$NON-NLS-1$
-
- "" + //$NON-NLS-1$
-//
-// Messages.getString("LaunchAbout.9") + //$NON-NLS-1$
-// Messages.getString("LaunchAbout.10") + //$NON-NLS-1$
-
- "" + //$NON-NLS-1$
- "" + //$NON-NLS-1$
- "" + //$NON-NLS-1$
-
-// Messages.getString("LaunchAbout.14") + //$NON-NLS-1$
-// Messages.getString("LaunchAbout.15") + //$NON-NLS-1$
-// Messages.getString("LaunchAbout.16") + //$NON-NLS-1$
-
- "" + //$NON-NLS-1$
-
-// Messages.getString("LaunchAbout.18") + //$NON-NLS-1$
-// Messages.getString("LaunchAbout.19") + //$NON-NLS-1$
-
- "" + //$NON-NLS-1$
- "" //$NON-NLS-1$
- );
-
-
-
- sh.open();
- }
- };
- }
-
- protected void createSaveAction() {
- //Save callgraph.out
- save_file = new Action(Messages.getString("SystemTapView.9")){ //$NON-NLS-1$
- public void run(){
- Shell sh = new Shell();
- FileDialog dialog = new FileDialog(sh, SWT.SAVE);
- String filePath = dialog.open();
-
- if (filePath != null) {
- saveData(filePath);
- }
- }
- };
- }
-
-
-
-
- /**
- * Populates the Errors menu
- */
- public void createErrorActions() {
-
- error_errorLog = new Action(Messages.getString("SystemTapView.0")) { //$NON-NLS-1$
- public void run() {
- boolean error = false;
- File log = new File(PluginConstants.getDefaultOutput()
- + "Error.log"); //$NON-NLS-1$
- BufferedReader buff;
- try {
- buff = new BufferedReader(new FileReader(log));
- String logText = ""; //$NON-NLS-1$
- String line;
-
- while ((line = buff.readLine()) != null) {
- logText += line + PluginConstants.NEW_LINE;
- }
-
- Shell sh = new Shell(SWT.BORDER | SWT.TITLE);
-
- sh.setText(Messages.getString("SystemTapView.15")); //$NON-NLS-1$
- sh.setLayout(new FillLayout());
- sh.setSize(600, 600);
-
- StyledText txt = new StyledText(sh, SWT.MULTI
- | SWT.V_SCROLL | SWT.WRAP | SWT.READ_ONLY);
-
- txt.setText(logText);
-
- sh.setText(Messages.getString("SystemTapView.21")); //$NON-NLS-1$
-
- sh.open();
- txt.setTopIndex(txt.getLineCount());
-
- } catch (FileNotFoundException e) {
- error = true;
- } catch (IOException e) {
- error = true;
- } finally {
- if (error) {
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
- Messages
- .getString("SystemTapView.ErrorMessageName"), //$NON-NLS-1$
- Messages
- .getString("SystemTapView.ErrorMessageTitle"), //$NON-NLS-1$
- Messages
- .getString("SystemTapView.ErrorMessageBody") //$NON-NLS-1$
- + Messages
- .getString("SystemTapView.ErrorMessageBody2")); //$NON-NLS-1$
- mess.schedule();
- }
- }
-
- }
- };
-
- error_deleteError = new Action(Messages
- .getString("SystemTapView.ClearLog")) { //$NON-NLS-1$
- public void run() {
- if (!MessageDialog.openConfirm(new Shell(), Messages
- .getString("SystemTapView.DeleteLogsTitle"), Messages //$NON-NLS-1$
- .getString("SystemTapView.DeleteLogsMessage") //$NON-NLS-1$
- + Messages
- .getString("SystemTapView.DeleteLogsMessage2"))) //$NON-NLS-1$
- return;
-
- SystemTapErrorHandler.delete();
- }
- };
- }
-
- protected void addKillButton() {
- IToolBarManager mgr = getViewSite().getActionBars().getToolBarManager();
- kill = new Action(Messages.getString("SystemTapView.16"),
- CallgraphCorePlugin.imageDescriptorFromPlugin(CallgraphCorePlugin.PLUGIN_ID, "icons/progress_stop.gif")) { //$NON-NLS-1$
- public void run() {
- getParser().cancelJob();
- }
- };
- mgr.add(kill);
- setKillButtonEnabled(false);
- }
-
- public void setKillButtonEnabled(boolean val) {
- if (kill != null)
- kill.setEnabled(val);
- }
-
-
- public Action getKillButton() {
- return kill;
- }
-
- public Action getError_errorLog() {
- return error_errorLog;
- }
-
- public void setError_errorLog(Action errorErrorLog) {
- error_errorLog = errorErrorLog;
- }
-
- public Action getError_deleteError() {
- return error_deleteError;
- }
-
- public void setError_deleteError(Action errorDeleteError) {
- error_deleteError = errorDeleteError;
- }
-
- public Action getHelp_version() {
- return help_version;
- }
-
- public void setHelp_version(Action helpVersion) {
- help_version = helpVersion;
- }
-
- public Action getSave_file() {
- return save_file;
- }
-
-
- /**
- * Implement this method to save data in whichever format your program
- * needs. Keep in mind that the filePath variable should contain the
- * filePath of the most recently opened file.
- *
- * @param sourcePath
- */
- public void saveData(String targetFile) {
- try {
- File file = new File(targetFile);
- file.delete();
- file.createNewFile();
-
- File sFile = new File(sourcePath);
- if (!sFile.exists()) {
- return;
- }
-
- FileChannel in = null;
- FileChannel out = null;
-
- try {
- in = new FileInputStream(sFile).getChannel();
- out = new FileOutputStream(file).getChannel();
-
- if (in == null || out == null)
- return;
-
- long size = in.size();
- MappedByteBuffer buf = in.map(FileChannel.MapMode.READ_ONLY, 0, size);
-
- out.write(buf);
-
- } finally {
- if (in != null)
- in.close();
- if (out != null)
- out.close();
- }
-
-
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- public void setSourcePath(String file) {
- sourcePath = file;
- }
-
- public Action getOpen_file() {
- return open_file;
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/ViewFactory.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/ViewFactory.java
deleted file mode 100644
index 582596f970..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/ViewFactory.java
+++ /dev/null
@@ -1,86 +0,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
- *******************************************************************************/
-package org.eclipse.linuxtools.callgraph.core;
-
-import java.util.ArrayList;
-
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-
-
-/**
- * Class to create / manipulate Views
- */
-public class ViewFactory {
-
- private static ArrayList<IViewPart> views;
- private static SystemTapView newView;
-
- /**
- * Create a view of type designated by the viewID argument
- * @param viewID : A string corresponding to a type of View
- * @return : The view object that corresponds to the viewID
- */
- public static SystemTapView createView(final String viewID) {
- Display.getDefault().syncExec(new Runnable() {
-
- @Override
- public void run() {
- try {
- IViewPart view = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getActivePage().showView(viewID);
- if (!(view instanceof SystemTapView))
- throw new Exception("Miscast type: " + view.getClass().toString()); //$NON-NLS-1$
- newView = ((SystemTapView) view);
- newView.setViewID();
- } catch (PartInitException e) {
- e.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- });
-
- addView(newView);
- return newView;
- }
-
- /**
- * Adds a view to the factory's list of active SystemTapViews.
- */
- public static void addView(SystemTapView view) {
- if (views == null)
- views = new ArrayList<IViewPart>();
- views.add(view);
- }
-
- /**
- * Returns the first view added to the views list that is of type SystemTapView.
- */
- public static IViewPart getView() {
- for (IViewPart view : views) {
- if (view instanceof SystemTapView)
- return view;
- }
- return null;
- }
-
- /**
- * Returns the list of views
- * @return
- */
- public static SystemTapView[] getViews() {
- return (SystemTapView[]) views.toArray();
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/XMLParser.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/XMLParser.java
deleted file mode 100644
index 268a8a3fb5..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/XMLParser.java
+++ /dev/null
@@ -1,198 +0,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
- *******************************************************************************/
-package org.eclipse.linuxtools.callgraph.core;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-
-public class XMLParser {
-
- private HashMap<Integer, HashMap<String,String>> keyValues;
- private ArrayList<Integer> idList;
- private int id;
- private int currentlyIn;
- private static final String ATTR_NAME = "name";
- private static final String ATTR_TEXT = "text";
- public static final String noName = "NoName";
- private boolean textMode;
- private int counter;
-
- XMLParser() {
- id = 0;
- currentlyIn = 0;
- if (keyValues != null)
- keyValues.clear();
- keyValues = new HashMap<Integer,HashMap<String,String>>();
-
- if (idList != null)
- idList.clear();
- idList = new ArrayList<Integer>();
-
- textMode = false;
- counter = 0;
- }
-
- /**
- * Helper method to call parse on the contents of a file.
- * @param file
- */
- public void parse(File file) {
- parse(getContents(file));
- }
-
-
- /**
- * Parses a String according to XML formatting rules. Will return a HashMap indexed by an
- * identification number, where each value is a further HashMap of String, String pairs representing
- * attributes.
- * @param message
- */
- public void parse(String message) {
- String tabstrip = message.replaceAll("\t", "");
- String[] lines = tabstrip.split("\n");
-
- for (String line : lines) {
- if (line.length() < 1)
- continue;
-
- if (line.charAt(0) == '<') {
- //Either an open or close tag
- if (line.charAt(1) == '/') {
- //Closing tag -- assume properly formed
- idList.remove((Integer) currentlyIn);
- currentlyIn = -1;
- if (idList.size() > 0)
- currentlyIn = idList.get(idList.size()-1);
- setTextMode(true);
-
- } else if (line.substring(line.length()-2, line.length() - 1) == "/>") {
- //This tag opens and closes in one line
- id++;
- String[] tokens = line.split(" ");
- HashMap<String,String> map = new HashMap<String,String>();
- map.put(ATTR_NAME, tokens[0]);
- keyValues.put(id,map);
- textMode = false;
- addAttributes(currentlyIn, tokens, 1);
-
- } else {
- //Open tag
- idList.add(id);
- id++;
- currentlyIn = id;
-
- String[] tokens = line.split(" ");
-
- //Add name variable
- HashMap<String,String> map = new HashMap<String,String>();
- map.put(ATTR_NAME, tokens[0]);
- keyValues.put(id,map);
-
- addAttributes(currentlyIn, tokens, 1);
- }
- } else {
- //Attribute addition
- if (currentlyIn < 0 )
- continue;
-
- if (textMode) {
- HashMap<String,String> map = keyValues.get(currentlyIn);
- map.put(ATTR_TEXT, line);
- counter++;
- }
-
- String[] tokens = line.split(" ");
- addAttributes(currentlyIn, tokens, 0);
- }
- }
- }
-
- /**
- * Turns an array of Strings of form attribute=value into attribute/value pairings for the specified node.
- * Starts looking at token number start.
- * @param tokens
- * @param start
- */
- public void addAttributes(int id, String[] tokens, int start) {
- HashMap<String,String> map = keyValues.get(id);
- int nameless = 0;
-
-
- for (int j = start; j < tokens.length; j++) {
- String[] kvPair = tokens[j].split("=");
- String value = "";
- String key = "";
- if (kvPair.length < 1)
- continue;
-
- if (kvPair.length < 2) {
- value = kvPair[0];
- if (value.charAt(value.length() - 1) == '>') {
-
- setTextMode(true);
- value = value.substring(0, value.length()-1);
- }
- map.put(noName + nameless, value);
- nameless++;
- continue;
- }
-
- value = kvPair[0];
- key = kvPair[1];
- if (value.charAt(value.length() - 1) == '>') {
- setTextMode(true);
- value = value.substring(0, value.length()-1);
- }
-
- map.put(key, value);
- }
-
- keyValues.put(id, map);
- }
-
- public HashMap<Integer, HashMap<String,String>> getKeyValues() {
- return keyValues;
- }
-
-
-
- static public String getContents(File file) {
- StringBuilder contents = new StringBuilder();
-
- try {
- BufferedReader input = new BufferedReader(new FileReader(file));
- try {
- String line = null;
- while (( line = input.readLine()) != null){
- contents.append(line);
- contents.append("\n");
- }
- }
- finally {
- input.close();
- }
- }
- catch (IOException ex){
- ex.printStackTrace();
- }
-
- return contents.toString();
- }
-
- public void setTextMode(boolean val) {
- counter = 0;
- textMode = val;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/messages.properties b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/messages.properties
index 7451baec89..6531ba7c47 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/messages.properties
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/messages.properties
@@ -33,28 +33,6 @@ SystemTapParser.2=Invalid File Error
SystemTapParser.3=File Specified Invalid
SystemTapParser.4=The file :
SystemTapParser.5=\ could not be rendered. Please make sure the file exists and is valid.
-SystemTapView.0=Open Log
-SystemTapView.3=Help
SystemTapView.31=IO error
SystemTapView.32=File access error
SystemTapView.33=Could not access the selected file. This could be because due to a permissions error.
-SystemTapView.1=\n
-SystemTapView.15=SystemTap Error Log
-SystemTapView.16=Stop Script
-SystemTapView.2=Errors
-SystemTapView.21=Error Log
-SystemTapView.4=Version
-SystemTapView.5=Systemtap Version
-SystemTapView.6=About
-SystemTapView.8=File
-SystemTapView.9=Save
-SystemTapView.DeleteLogsMessage=This will permanently clear the SystemTap Eclipse error
-SystemTapView.DeleteLogsMessage2=logs. Are you sure you want to continue?
-SystemTapView.DeleteLogsTitle=Delete logs?
-SystemTapView.ErrorMessageBody=Error log could not be read, most likely this is because
-SystemTapView.ErrorMessageBody2=\ the log file could not be found.
-SystemTapView.ErrorMessageName=ErrorLog reading error
-SystemTapView.ErrorMessageTitle=Error reading error log
-SystemTapView.ClearLog=Clear log
-StapGraphParser.5=GraphUIJob instance
-
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/ChangeLog b/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/ChangeLog
new file mode 100644
index 0000000000..1ee9db69f4
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/ChangeLog
@@ -0,0 +1,25 @@
+2009-12-24 rgrunber <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/tests/SystemTapErrorHandlerTest.java (testUprobesError):
+ Update message to reflect new error message.
+
+2009-12-16 rgrunber <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/tests/SystemTapErrorHandlerTest.java:
+ New File. Basic class to test the error handling.
+
+2009-12-08 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/tests/ConfigurationTest.java: Call generateCommand directly
+
+2009-11-27 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/tests/SystemTapCommandGeneratorTest.java: Add functions to use the new command option in the CommandGenerator class.
+
+2009-11-16 Roland Grunberg <rgrunber@redhat.com>
+
+ * META-INF/MANIFEST.MF: Add Eclipse to Provider field.
+
+2009-11-16 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/tests/SystemTapCommandGeneratorTest.java: Reflect change to static in SystemTapCommandGenerator \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/resources/.cproject b/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/resources/.cproject
new file mode 100644
index 0000000000..c0cd73664f
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/resources/.cproject
@@ -0,0 +1,936 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+
+<cproject>
+<storageModule moduleId="org.eclipse.cdt.core.settings">
+<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.1770452088">
+<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.1770452088" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+<externalSettings/>
+<extensions>
+<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+</extensions>
+</storageModule>
+<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+<configuration artifactName="eag" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.1770452088" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug">
+<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.1770452088." name="/" resourcePath="">
+<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.1442429891" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
+<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.535947733" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
+<builder buildPath="${workspace_loc:/eag/Debug}" id="cdt.managedbuild.target.gnu.builder.exe.debug.1661255968" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
+<tool id="cdt.managedbuild.tool.gnu.archiver.base.225690961" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
+<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.374528198" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
+<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.886738070" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
+<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.1663737825" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
+<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.28775023" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
+</tool>
+<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1832776764" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
+<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.534412024" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
+<option id="gnu.c.compiler.exe.debug.option.debugging.level.1449229527" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
+<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1481141764" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+</tool>
+<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.739464353" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug"/>
+<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.843559057" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
+<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1416890963" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
+<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+<additionalInput kind="additionalinput" paths="$(LIBS)"/>
+</inputType>
+</tool>
+<tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.1550114770" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
+<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1413052230" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+</tool>
+</toolChain>
+</folderInfo>
+<sourceEntries>
+<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+</sourceEntries>
+</configuration>
+</storageModule>
+<storageModule moduleId="scannerConfiguration">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.2027009676;cdt.managedbuild.config.gnu.exe.release.2027009676.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.832705582;cdt.managedbuild.tool.gnu.c.compiler.input.1127782331">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+</scannerConfigBuildInfo>
+<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.2027009676;cdt.managedbuild.config.gnu.exe.release.2027009676.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1081690282;cdt.managedbuild.tool.gnu.cpp.compiler.input.1387572330">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+</scannerConfigBuildInfo>
+<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1770452088;cdt.managedbuild.config.gnu.exe.debug.1770452088.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.374528198;cdt.managedbuild.tool.gnu.cpp.compiler.input.28775023">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+</scannerConfigBuildInfo>
+<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1770452088;cdt.managedbuild.config.gnu.exe.debug.1770452088.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1832776764;cdt.managedbuild.tool.gnu.c.compiler.input.1481141764">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+</scannerConfigBuildInfo>
+</storageModule>
+<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
+</cconfiguration>
+<cconfiguration id="cdt.managedbuild.config.gnu.exe.release.2027009676">
+<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.2027009676" moduleId="org.eclipse.cdt.core.settings" name="Release">
+<externalSettings/>
+<extensions>
+<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+</extensions>
+</storageModule>
+<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+<configuration artifactName="eag" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.release.2027009676" name="Release" parent="cdt.managedbuild.config.gnu.exe.release">
+<folderInfo id="cdt.managedbuild.config.gnu.exe.release.2027009676." name="/" resourcePath="">
+<toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.1386132769" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
+<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.release.1801541583" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.release"/>
+<builder buildPath="${workspace_loc:/eag/Release}" id="cdt.managedbuild.target.gnu.builder.exe.release.1322398833" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.release"/>
+<tool id="cdt.managedbuild.tool.gnu.archiver.base.861618002" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
+<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1081690282" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release">
+<option id="gnu.cpp.compiler.exe.release.option.optimization.level.1242434100" name="Optimization Level" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
+<option id="gnu.cpp.compiler.exe.release.option.debugging.level.1288000062" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
+<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1387572330" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
+</tool>
+<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.832705582" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
+<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.1207253534" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" valueType="enumerated"/>
+<option id="gnu.c.compiler.exe.release.option.debugging.level.2131641039" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
+<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1127782331" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+</tool>
+<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.release.1835444074" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.release"/>
+<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.release.1813279246" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.release">
+<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1312332519" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
+<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+<additionalInput kind="additionalinput" paths="$(LIBS)"/>
+</inputType>
+</tool>
+<tool id="cdt.managedbuild.tool.gnu.assembler.exe.release.32275748" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.release">
+<inputType id="cdt.managedbuild.tool.gnu.assembler.input.2043969971" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+</tool>
+</toolChain>
+</folderInfo>
+<sourceEntries>
+<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+</sourceEntries>
+</configuration>
+</storageModule>
+<storageModule moduleId="scannerConfiguration">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.2027009676;cdt.managedbuild.config.gnu.exe.release.2027009676.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.832705582;cdt.managedbuild.tool.gnu.c.compiler.input.1127782331">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+</scannerConfigBuildInfo>
+<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.2027009676;cdt.managedbuild.config.gnu.exe.release.2027009676.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1081690282;cdt.managedbuild.tool.gnu.cpp.compiler.input.1387572330">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+</scannerConfigBuildInfo>
+<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1770452088;cdt.managedbuild.config.gnu.exe.debug.1770452088.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.374528198;cdt.managedbuild.tool.gnu.cpp.compiler.input.28775023">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+</scannerConfigBuildInfo>
+<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1770452088;cdt.managedbuild.config.gnu.exe.debug.1770452088.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1832776764;cdt.managedbuild.tool.gnu.c.compiler.input.1481141764">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+</scannerConfigBuildInfo>
+</storageModule>
+<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
+</cconfiguration>
+</storageModule>
+<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+<project id="eag.cdt.managedbuild.target.gnu.exe.2013229658" name="Executable" projectType="cdt.managedbuild.target.gnu.exe"/>
+</storageModule>
+</cproject>
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/resources/.project b/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/resources/.project
new file mode 100644
index 0000000000..ddf0661f81
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/resources/.project
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>CallGraphDemo</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <triggers>clean,full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>?name?</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.append_environment</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+ <value>all</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildArguments</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildCommand</key>
+ <value>make</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildLocation</key>
+ <value>${workspace_loc:/eag/Debug}</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
+ <value>clean</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.contents</key>
+ <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+ <value>false</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableFullBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
+ <value>all</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.stopOnError</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+ <value>true</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ </natures>
+</projectDescription>
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/src/org/eclipse/linuxtools/callgraph/launch/tests/ConfigurationTest.java b/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/src/org/eclipse/linuxtools/callgraph/launch/tests/ConfigurationTest.java
index f0dcf2cb2c..db7dcb4ef3 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/src/org/eclipse/linuxtools/callgraph/launch/tests/ConfigurationTest.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/src/org/eclipse/linuxtools/callgraph/launch/tests/ConfigurationTest.java
@@ -77,13 +77,11 @@ public class ConfigurationTest extends TestCase{
SystemTapLaunchConfigurationDelegate del = new SystemTapLaunchConfigurationDelegate();
del.launch(config, "profile", null, null);
- System.out.println(del.getCommand());
-
assertEquals("stap -v -p" + testPass + " -k -g -P -u -w -b -t -s"
+ testBuffer + " -x" + testPid + " "
+ testCDirectives + " -F --skip-badvars --ignore-dwarf -q " + "-o "
+ testOutputPath + " -c '"
- + testBinaryPath + "' " + testScriptPath + " " + testArguments, del.getCommand());
+ + testBinaryPath + "' " + testScriptPath + " " + testArguments, del.generateCommand(config));
} catch (CoreException e) {
e.printStackTrace();
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/src/org/eclipse/linuxtools/callgraph/launch/tests/SystemTapCommandGeneratorTest.java b/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/src/org/eclipse/linuxtools/callgraph/launch/tests/SystemTapCommandGeneratorTest.java
index ef759b4d2e..1b932b0c58 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/src/org/eclipse/linuxtools/callgraph/launch/tests/SystemTapCommandGeneratorTest.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/src/org/eclipse/linuxtools/callgraph/launch/tests/SystemTapCommandGeneratorTest.java
@@ -13,6 +13,7 @@ package org.eclipse.linuxtools.callgraph.launch.tests;
import java.io.File;
import java.io.IOException;
+import org.eclipse.linuxtools.callgraph.core.PluginConstants;
import org.eclipse.linuxtools.callgraph.core.SystemTapCommandGenerator;
import junit.framework.TestCase;
@@ -31,18 +32,18 @@ public class SystemTapCommandGeneratorTest extends TestCase{
String scriptPath = location + "function_count.stp";
//RUN
- stapgen
+ String cmd = SystemTapCommandGenerator
.generateCommand(
scriptPath,
binaryFilePath,
"",
true,
true,
- binaryFilePath, "");
+ binaryFilePath, "", PluginConstants.STAP_PATH);
assertEquals(
"stap -c '"+binaryFilePath+"' "+scriptPath+ " " +binaryFilePath,
- stapgen.getExecuteCommand());
+ cmd);
killStap();
//END
}
@@ -52,18 +53,18 @@ public class SystemTapCommandGeneratorTest extends TestCase{
String scriptPath = location + "simple.stp";
//RUN
- stapgen
+ String cmd = SystemTapCommandGenerator
.generateCommand(
scriptPath,
"",
"",
false,
false,
- "", "");
+ "", "", PluginConstants.STAP_PATH);
assertEquals(
"stap "+scriptPath,
- stapgen.getExecuteCommand());
+ cmd);
//END
}
@@ -73,10 +74,10 @@ public class SystemTapCommandGeneratorTest extends TestCase{
String binaryFilePath = location + "factorial";
String scriptPath = location + "allsyscall.stp";
- stapgen.generateCommand(scriptPath, binaryFilePath, "", true, false, "", "");
+ String cmd = SystemTapCommandGenerator.
+ generateCommand(scriptPath, binaryFilePath, "", true, false, "", "", PluginConstants.STAP_PATH);
- assertEquals("stap -c '" + binaryFilePath + "' " + scriptPath, stapgen
- .getExecuteCommand());
+ assertEquals("stap -c '" + binaryFilePath + "' " + scriptPath, cmd);
// END
killStap();
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/src/org/eclipse/linuxtools/callgraph/launch/tests/SystemTapErrorHandlerTest.java b/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/src/org/eclipse/linuxtools/callgraph/launch/tests/SystemTapErrorHandlerTest.java
new file mode 100644
index 0000000000..6458e2ebe4
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/src/org/eclipse/linuxtools/callgraph/launch/tests/SystemTapErrorHandlerTest.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * 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.callgraph.launch.tests;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.linuxtools.callgraph.core.SystemTapErrorHandler;
+
+public class SystemTapErrorHandlerTest extends TestCase {
+
+ SystemTapErrorHandler errHandler;
+ String errorString;
+
+
+ public void testErrorNotRecognized(){
+
+ errorString = "This error will not be caught \n" +
+ "Not even this one \n" +
+ "Unrecognized \n" +
+ "Not found \n" +
+ "Error";
+
+ errHandler = new SystemTapErrorHandler();
+ errHandler.handle(new NullProgressMonitor(), errorString);
+
+ assertTrue(!errHandler.isErrorRecognized());
+ }
+
+
+ public void testErrorRecognized(){
+
+ errorString = "As long as the word stapdev or stapusr is here, error is recognized";
+
+ errHandler = new SystemTapErrorHandler();
+ errHandler.handle(new NullProgressMonitor(), errorString);
+
+ assertTrue(errHandler.isErrorRecognized());
+ }
+
+
+ public void testUserGroupError(){
+
+ errorString = "ERROR: You are trying to run systemtap as a normal user.\n" +
+ "You should either be root, or be part of either " +
+ "group \"stapdev\" or group \"stapusr.\n";
+
+ errHandler = new SystemTapErrorHandler();
+ errHandler.handle(new NullProgressMonitor(), errorString);
+
+ assertTrue(errHandler.isErrorRecognized());
+ assertTrue(errHandler.getErrorMessage().contains("Please add yourself to the 'stapdev' or 'stapusr' group in order to run stap."));
+ }
+
+
+ public void testDebugInfoError(){
+
+ errorString = "missing [architecture] kernel/module debuginfo under '[kernel-build-tree]'";
+
+ errHandler = new SystemTapErrorHandler();
+ errHandler.handle(new NullProgressMonitor(), errorString);
+
+ assertTrue(errHandler.isErrorRecognized());
+ assertTrue(errHandler.getErrorMessage().contains("No debuginfo could be found. Make sure you have yum-utils installed, and run debuginfo-install kernel as root."));
+ }
+
+
+ public void testUprobesError(){
+
+ errorString = "SystemTap's version of uprobes is out of date. As root, or a member of the 'root' group, run \"make -C /usr/local/share/systemtap/runtime/uprobes\".";
+
+ errHandler = new SystemTapErrorHandler();
+ errHandler.handle(new NullProgressMonitor(), errorString);
+
+ assertTrue(errHandler.isErrorRecognized());
+ assertTrue(errHandler.getErrorMessage().contains("SystemTap's version of uprobes is out of date. As root, please run \"make -C /usr/local/share/systemtap/runtime/uprobes\"."));
+
+ }
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/ChangeLog b/systemtap/org.eclipse.linuxtools.callgraph.launch/ChangeLog
deleted file mode 100644
index 06bdb0079b..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/ChangeLog
+++ /dev/null
@@ -1,21 +0,0 @@
-2009-11-20 Roland Grunberg <rgrunber@redhat.com>
-
- * src/org/eclipse/linuxtools/callgraph/launch/LaunchStapGraph.java (launch):
- Fix ctrl double click not finding name of specified function.
- Also gain the ability to ctrl double click during real-time parsing.
-
-2009-11-16 Roland Grunberg <rgrunber@redhat.com>
-
- * META-INF/MANIFEST.MF: Add Eclipse to Provider field.
-
-2009-11-09 Charley Wang <chwang@redhat.com>
-
- * src/org/eclipse/linuxtools/callgraph/launch/ConfigurationOptionsSetter.java: Use StringBuilder instead of String
- * META-INF/MANIFEST.MF: Change to reflect rename of Activator
- * src/org/eclipse/linuxtools/callgraph/launch/CallgraphLaunchPlugin.java: RENAME: Activator --> CallgraphLaunchPlugin
-
-2009-11-06 Charley Wang <chwang@redhat.com>
-
- * src/org/eclipse/linuxtools/callgraph/launch/ConfigurationOptionsSetter.java: Remove unused Options setting function
- * src/org/eclipse/linuxtools/callgraph/launch/: Removed the ASTTranslationVisitor, which is never used.
- * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java: Delete unused functions, add javadoc comments to other functions. \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.callgraph.launch/META-INF/MANIFEST.MF
index c89a2439f5..e009cb2929 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/META-INF/MANIFEST.MF
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/META-INF/MANIFEST.MF
@@ -1,9 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Callgraph Launch (Incubation)
+Bundle-Name: SystemTap Local Launch
Bundle-SymbolicName: org.eclipse.linuxtools.callgraph.launch;singleton:=true
Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.linuxtools.callgraph.launch.CallgraphLaunchPlugin
+Bundle-Activator: org.eclipse.linuxtools.callgraph.launch.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.debug.ui,
@@ -28,4 +28,3 @@ Import-Package: org.eclipse.cdt.core.model,
org.eclipse.ui.views.navigator
Bundle-Localization: plugin
Export-Package: org.eclipse.linuxtools.callgraph.launch
-Bundle-Vendor: Eclipse
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/plugin.xml b/systemtap/org.eclipse.linuxtools.callgraph.launch/plugin.xml
index 85199c6e74..8c41103218 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/plugin.xml
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/plugin.xml
@@ -85,14 +85,6 @@
</contextualLaunch>
</shortcut>
</extension>
- <extension
- point="org.eclipse.debug.ui.launchConfigurationTypeImages">
- <launchConfigurationTypeImage
- configTypeID="org.eclipse.linuxtools.callgraph.launch.systemtapLaunch"
- icon="icons/bar_graph.png"
- id="org.eclipse.linuxtools.callgraph.launch.systemtapLaunchImage">
- </launchConfigurationTypeImage>
- </extension>
</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ASTTranslationUnitVisitor.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ASTTranslationUnitVisitor.java
new file mode 100644
index 0000000000..f7c52c3a9a
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ASTTranslationUnitVisitor.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.callgraph.launch;
+
+import java.util.ArrayList;
+
+import org.eclipse.cdt.core.dom.ast.ASTVisitor;
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+
+
+//TODO: Remove unused class?
+public class ASTTranslationUnitVisitor extends ASTVisitor{
+
+ public ASTTranslationUnitVisitor () {
+ super();
+ shouldVisitStatements = true;
+ shouldVisitDeclarations = true;
+ funcs = new ArrayList<String>();
+ }
+
+
+ private String fileName;
+
+ private ArrayList<String> funcs;
+ public int visit(IASTDeclaration s) {
+ if (!s.getParent().getContainingFilename().contains(fileName))
+ return PROCESS_SKIP;
+ if (s instanceof IASTFunctionDefinition) {
+ String name =((IASTFunctionDefinition) s).getDeclarator().getName().toString();
+ if (!name.substring(0, 2).equals("__")) { //$NON-NLS-1$
+ funcs.add(name);
+ }
+ }
+ return PROCESS_CONTINUE;
+ }
+
+
+ public ArrayList<String> getFunctions() {
+ return funcs;
+ }
+
+ public void setFileName(String val) {
+ fileName = val;
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/Activator.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/Activator.java
new file mode 100644
index 0000000000..221c6b6a81
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/Activator.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * 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.callgraph.launch;
+
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.linuxtools.callgraph.core.LaunchConfigurationConstants;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ *
+ * This is more or less the default Eclipse plugin-wizard Activator.
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+
+ }
+
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ 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(LaunchConfigurationConstants.PLUGIN_ID, path);
+ }
+
+
+}
+
+
+//public String getPluginLocation() {
+//Bundle bundle = getBundle();
+//
+//URL locationUrl = FileLocator.find(bundle,new Path("/"), null);
+//URL fileUrl = null;
+//try {
+// fileUrl = FileLocator.toFileURL(locationUrl);
+//} catch (IOException e) {
+// e.printStackTrace();
+//}
+//return fileUrl.getFile();
+//}
+
+//private void checkRun() {
+////Check if install script has been executed. Install script MUST delete the FirstRun file,
+////this will execute every time!
+//String firstRun = getPluginLocation() + "FirstRun";
+//File firstFile = new File(firstRun);
+//if (firstFile.exists()) {
+// Shell sh = new Shell();
+// String command = "./" + getPluginLocation() + "install.sh " + firstRun;
+// InputDialog id = new InputDialog(sh, "First time startup", "Hi there! Looks like this is your first time running the SystemTap Eclipse plugin. In order for this plugin to work, you will first need to install SystemTap. Then please open a terminal and execute the following command. ", command, null);
+// id.open();
+//}
+//}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/CallgraphLaunchPlugin.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/CallgraphLaunchPlugin.java
deleted file mode 100644
index fc59d3cf01..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/CallgraphLaunchPlugin.java
+++ /dev/null
@@ -1,105 +0,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
- *******************************************************************************/
-package org.eclipse.linuxtools.callgraph.launch;
-
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.linuxtools.callgraph.core.LaunchConfigurationConstants;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- *
- * This is more or less the default Eclipse plugin-wizard Activator.
- */
-public class CallgraphLaunchPlugin extends AbstractUIPlugin {
-
- // The shared instance
- private static CallgraphLaunchPlugin plugin;
-
- /**
- * The constructor
- */
- public CallgraphLaunchPlugin() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
-
- }
-
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
-
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static CallgraphLaunchPlugin 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(LaunchConfigurationConstants.PLUGIN_ID, path);
- }
-
-
-}
-
-
-//public String getPluginLocation() {
-//Bundle bundle = getBundle();
-//
-//URL locationUrl = FileLocator.find(bundle,new Path("/"), null);
-//URL fileUrl = null;
-//try {
-// fileUrl = FileLocator.toFileURL(locationUrl);
-//} catch (IOException e) {
-// e.printStackTrace();
-//}
-//return fileUrl.getFile();
-//}
-
-//private void checkRun() {
-////Check if install script has been executed. Install script MUST delete the FirstRun file,
-////this will execute every time!
-//String firstRun = getPluginLocation() + "FirstRun";
-//File firstFile = new File(firstRun);
-//if (firstFile.exists()) {
-// Shell sh = new Shell();
-// String command = "./" + getPluginLocation() + "install.sh " + firstRun;
-// InputDialog id = new InputDialog(sh, "First time startup", "Hi there! Looks like this is your first time running the SystemTap Eclipse plugin. In order for this plugin to work, you will first need to install SystemTap. Then please open a terminal and execute the following command. ", command, null);
-// id.open();
-//}
-//}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ConfigurationOptionsSetter.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ConfigurationOptionsSetter.java
index 7154f2bfd5..8911be1e3b 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ConfigurationOptionsSetter.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ConfigurationOptionsSetter.java
@@ -12,116 +12,110 @@ package org.eclipse.linuxtools.callgraph.launch;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.linuxtools.callgraph.core.LaunchConfigurationConstants;
public class ConfigurationOptionsSetter {
-
- /**
- * Returns a SystemTap command string containing the options specified
- * in the configuration.
- * @param config
- * @return
- */
public static String setOptions(ILaunchConfiguration config) {
- StringBuilder options = new StringBuilder(); //$NON-NLS-1$
+ String options = ""; //$NON-NLS-1$
try {
if (config.getAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE,
LaunchConfigurationConstants.DEFAULT_COMMAND_VERBOSE)) {
- options.append("-v "); //$NON-NLS-1$
+ options += "-v "; //$NON-NLS-1$
}
if (config.getAttribute(LaunchConfigurationConstants.COMMAND_PASS,
LaunchConfigurationConstants.DEFAULT_COMMAND_PASS) > 0) {
- options.append("-p" + config.getAttribute(LaunchConfigurationConstants.COMMAND_PASS, LaunchConfigurationConstants.DEFAULT_COMMAND_PASS) + " "); //$NON-NLS-1$ //$NON-NLS-2$
+ options += "-p" + config.getAttribute(LaunchConfigurationConstants.COMMAND_PASS, LaunchConfigurationConstants.DEFAULT_COMMAND_PASS) + " "; //$NON-NLS-1$ //$NON-NLS-2$
}
if (config.getAttribute(
LaunchConfigurationConstants.COMMAND_KEEP_TEMPORARY,
LaunchConfigurationConstants.DEFAULT_COMMAND_KEEP_TEMPORARY)) {
- options.append("-k "); //$NON-NLS-1$
+ options += "-k "; //$NON-NLS-1$
}
if (config.getAttribute(LaunchConfigurationConstants.COMMAND_GURU,
LaunchConfigurationConstants.DEFAULT_COMMAND_GURU)) {
- options.append("-g "); //$NON-NLS-1$
+ options += "-g "; //$NON-NLS-1$
}
if (config.getAttribute(
LaunchConfigurationConstants.COMMAND_PROLOGUE_SEARCH,
LaunchConfigurationConstants.DEFAULT_COMMAND_PROLOGUE_SEARCH)) {
- options.append("-P "); //$NON-NLS-1$
+ options += "-P "; //$NON-NLS-1$
}
if (config.getAttribute(
LaunchConfigurationConstants.COMMAND_NO_CODE_ELISION,
LaunchConfigurationConstants.DEFAULT_COMMAND_NO_CODE_ELISION)) {
- options.append("-u "); //$NON-NLS-1$
+ options += "-u "; //$NON-NLS-1$
}
if (config.getAttribute(
LaunchConfigurationConstants.COMMAND_DISABLE_WARNINGS,
LaunchConfigurationConstants.DEFAULT_COMMAND_DISABLE_WARNINGS)) {
- options.append("-w "); //$NON-NLS-1$
+ options += "-w "; //$NON-NLS-1$
}
if (config.getAttribute(LaunchConfigurationConstants.COMMAND_BULK_MODE,
LaunchConfigurationConstants.DEFAULT_COMMAND_BULK_MODE)) {
- options.append("-b "); //$NON-NLS-1$
+ options += "-b "; //$NON-NLS-1$
}
if (config.getAttribute(
LaunchConfigurationConstants.COMMAND_TIMING_INFO,
LaunchConfigurationConstants.DEFAULT_COMMAND_TIMING_INFO)) {
- options.append("-t "); //$NON-NLS-1$
+ options += "-t "; //$NON-NLS-1$
}
if (config.getAttribute(
LaunchConfigurationConstants.COMMAND_BUFFER_BYTES,
LaunchConfigurationConstants.DEFAULT_COMMAND_BUFFER_BYTES) > 0) {
- options.append("-s" + config.getAttribute(LaunchConfigurationConstants.COMMAND_BUFFER_BYTES, LaunchConfigurationConstants.DEFAULT_COMMAND_BUFFER_BYTES) + " "); //$NON-NLS-1$ //$NON-NLS-2$
+ options += "-s" + config.getAttribute(LaunchConfigurationConstants.COMMAND_BUFFER_BYTES, LaunchConfigurationConstants.DEFAULT_COMMAND_BUFFER_BYTES) + " "; //$NON-NLS-1$ //$NON-NLS-2$
}
if (config.getAttribute(
LaunchConfigurationConstants.COMMAND_TARGET_PID,
LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID) > 0) {
- options.append("-x" + config.getAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID, LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID) + " "); //$NON-NLS-1$ //$NON-NLS-2$
+ options += "-x" + config.getAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID, LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID) + " "; //$NON-NLS-1$ //$NON-NLS-2$
}
if (config.getAttribute(
LaunchConfigurationConstants.COMMAND_C_DIRECTIVES,
LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES) != LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES) {
- options.append(config.getAttribute(
+ options += config.getAttribute(
LaunchConfigurationConstants.COMMAND_C_DIRECTIVES,
LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES)
- + " "); //$NON-NLS-1$ //$NON-NLS-2$
+ + " "; //$NON-NLS-1$ //$NON-NLS-2$
}
if (config.getAttribute(
LaunchConfigurationConstants.COMMAND_LEAVE_RUNNING,
LaunchConfigurationConstants.DEFAULT_COMMAND_LEAVE_RUNNING)) {
- options.append("-F "); //$NON-NLS-1$
+ options += "-F "; //$NON-NLS-1$
}
if (config.getAttribute(
LaunchConfigurationConstants.COMMAND_SKIP_BADVARS,
LaunchConfigurationConstants.DEFAULT_COMMAND_SKIP_BADVARS)) {
- options.append("--skip-badvars "); //$NON-NLS-1$
+ options += "--skip-badvars "; //$NON-NLS-1$
}
if (config.getAttribute(
LaunchConfigurationConstants.COMMAND_IGNORE_DWARF,
LaunchConfigurationConstants.DEFAULT_COMMAND_IGNORE_DWARF)) {
- options.append("--ignore-dwarf "); //$NON-NLS-1$
+ options += "--ignore-dwarf "; //$NON-NLS-1$
}
if (config.getAttribute(
LaunchConfigurationConstants.COMMAND_TAPSET_COVERAGE,
LaunchConfigurationConstants.DEFAULT_COMMAND_TAPSET_COVERAGE)) {
- options.append("-q "); //$NON-NLS-1$
+ options += "-q "; //$NON-NLS-1$
}
- return options.toString();
+ return options;
} catch (CoreException e) {
e.printStackTrace();
@@ -129,4 +123,113 @@ public class ConfigurationOptionsSetter {
return null;
}
+
+ public static String setOptions(ILaunchConfigurationWorkingCopy config) {
+ String options = ""; //$NON-NLS-1$
+ try {
+ if (config.getAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_VERBOSE)) {
+ options += "-v "; //$NON-NLS-1$
+ }
+
+
+ if (config.getAttribute(LaunchConfigurationConstants.COMMAND_PASS,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_PASS) > 0) {
+ options += "-p" + config.getAttribute(LaunchConfigurationConstants.COMMAND_PASS, LaunchConfigurationConstants.DEFAULT_COMMAND_PASS) + " "; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_KEEP_TEMPORARY,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_KEEP_TEMPORARY)) {
+ options += "-k "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(LaunchConfigurationConstants.COMMAND_GURU,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_GURU)) {
+ options += "-g "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_PROLOGUE_SEARCH,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_PROLOGUE_SEARCH)) {
+ options += "-P "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_NO_CODE_ELISION,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_NO_CODE_ELISION)) {
+ options += "-u "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_DISABLE_WARNINGS,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_DISABLE_WARNINGS)) {
+ options += "-w "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(LaunchConfigurationConstants.COMMAND_BULK_MODE,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_BULK_MODE)) {
+ options += "-b "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_TIMING_INFO,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_TIMING_INFO)) {
+ options += "-t "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_BUFFER_BYTES,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_BUFFER_BYTES) > 0) {
+ options += "-s" + config.getAttribute(LaunchConfigurationConstants.COMMAND_BUFFER_BYTES, LaunchConfigurationConstants.DEFAULT_COMMAND_BUFFER_BYTES) + " "; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_TARGET_PID,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID) > 0) {
+ options += "-x" + config.getAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID, LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID) + " "; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_C_DIRECTIVES,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES) != LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES) {
+ options += config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_C_DIRECTIVES,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES)
+ + " "; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_LEAVE_RUNNING,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_LEAVE_RUNNING)) {
+ options += "-F "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_SKIP_BADVARS,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_SKIP_BADVARS)) {
+ options += "--skip-badvars "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_IGNORE_DWARF,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_IGNORE_DWARF)) {
+ options += "--ignore-dwarf "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_TAPSET_COVERAGE,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_TAPSET_COVERAGE)) {
+ options += "-q "; //$NON-NLS-1$
+ }
+ return options;
+
+ } catch (CoreException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ return null;
+
+ }
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchStapGraph.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchStapGraph.java
index a6dc033c4f..ad42939295 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchStapGraph.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchStapGraph.java
@@ -24,17 +24,48 @@ import org.eclipse.linuxtools.callgraph.core.SystemTapUIErrorMessages;
import org.eclipse.ui.IEditorPart;
public class LaunchStapGraph extends SystemTapLaunchShortcut {
+ /*
+ * The following protected parameters are provided by
+ * SystemTapLaunchShortcut:
+ *
+ * Optional customization parameters: protected String name; protected
+ * String binaryPath; protected String arguments; protected String
+ * outputPath; protected String dirPath; protected String generatedScript;
+ * protected boolean needToGenerate; protected boolean overwrite;
+ *
+ * Mandatory: protected String scriptPath; protected ILaunchConfiguration
+ * config;
+ */
-
- //TODO: Do not let this class persist, or otherwise change it so persistence doesn't matter.
+ /**
+ * Launch method for a generated script that executes on a binary
+ *
+ * MUST specify (String) scriptPath and call config =
+ * createConfiguration(bin)!
+ *
+ * Noteworthy defaults: name defaults to "", but please set it (for
+ * usability) overwrite defaults to true - don't change it unless you really
+ * have to.
+ *
+ * To create new launches: -Copy shortcut code in xml, changing class name
+ * and label accordingly -Create a class that extends
+ * SystemTapLaunchShortcut with a function launch(IBinary bin, String mode)
+ * -Call super.Init() -Set name (this is shortcut-specific) -If a binary is
+ * used, call binName = getName(bin) -Call createConfiguration(bin, name)
+ *
+ * -Specify whichever of the optional parameters you need -Set scriptPath
+ * -Set an ILaunchConfiguration -Call finishLaunch or
+ * finishLaunchWithoutBinary
+ */
+
private String partialScriptPath;
private String funcs;
private ArrayList<String> exclusions;
private String projectName;
- protected static final String ATTR_PARSER = "org.eclipse.linuxtools.callgraph.graphparser"; //$NON-NLS-1$
- protected static final String ATTR_VIEWER = "org.eclipse.linuxtools.callgraph.callgraphview"; //$NON-NLS-1$
-
+ public void setProjectName(String val) {
+ projectName = val;
+ }
public LaunchStapGraph() {
funcs = null;
@@ -54,32 +85,44 @@ public class LaunchStapGraph extends SystemTapLaunchShortcut {
}
public void launch(IBinary bin, String mode) {
- super.initialize();
+ super.Init();
this.bin = bin;
name = "SystemTapGraph"; //$NON-NLS-1$
binName = getName(bin);
partialScriptPath = PluginConstants.getPluginLocation()
+ "parse_function_partial.stp"; //$NON-NLS-1$
- viewID = "org.eclipse.linuxtools.callgraph.callgraphview"; //$NON-NLS-1$
+ scriptPath = PluginConstants.DEFAULT_OUTPUT
+ + "callgraphGen.stp"; //$NON-NLS-1$
+
+ parserID = "org.eclipse.linuxtools.callgraph.graphparser";
- projectName = bin.getCProject().getElementName();
+ if (projectName == null || projectName.length() < 1)
+ projectName = bin.getCProject().getElementName();
try {
config = createConfiguration(bin, name);
binaryPath = bin.getResource().getLocation().toString();
arguments = binaryPath;
- outputPath = PluginConstants.getDefaultIOPath();
+ outputPath = PluginConstants.STAP_GRAPH_DEFAULT_IO_PATH;
- if (writeFunctionListToScript(resourceToSearchFor) == null)
- return;
+ writeFunctionListToScript(resourceToSearchFor);
if (funcs == null || funcs.length() < 0)
return;
+ generatedScript = generateScript();
+ if (generatedScript == null || generatedScript.length() < 0)
+ return;
+ generatedScript+= "probe syscall.exit {\n" +
+ "if (pid() == target()) {\n" +
+ "finalTime = gettimeofday_ns()\n" +
+ "}\n" +
+ "}\n";
needToGenerate = true;
+
finishLaunch(name, mode);
} catch (IOException e) {
@@ -111,7 +154,14 @@ public class LaunchStapGraph extends SystemTapLaunchShortcut {
* @return
*/
private String generateProbe(String function) {
- String output = "probe process(@1).function(\"" + function + "\").call{ if ( ! isinstr(probefunc(), \"___STAP_MARKER___\")) { callFunction(probefunc()) } } probe process(@1).function(\"" + function + "\").return{ if ( ! isinstr(probefunc(), \"___STAP_MARKER___\")) returnFunction(probefunc()) else { printf(\"?%s\\n\", user_string(strtol(tokenize($$return, \"return=\"),16)))}}\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ String output = "probe process(@1).function(\"" + //$NON-NLS-1$
+ function + "\").call{" + //$NON-NLS-1$
+ "\tcallFunction(probefunc())\t" + //$NON-NLS-1$
+ "}\t" + //$NON-NLS-1$
+ "probe process(@1).function(\"" + //$NON-NLS-1$
+ function + "\").return{\t" + //$NON-NLS-1$
+ "\treturnFunction(probefunc())\t" + //$NON-NLS-1$
+ "}\n"; //$NON-NLS-1$
return output;
}
@@ -154,7 +204,7 @@ public class LaunchStapGraph extends SystemTapLaunchShortcut {
private String writeFromPartialScript(String projectName) throws IOException {
String toWrite = ""; //$NON-NLS-1$
String temp = ""; //$NON-NLS-1$
- toWrite += "\nprobe begin{\n" + //$NON-NLS-1$
+ toWrite += "probe begin{\n" + //$NON-NLS-1$
"printf(\"\\nPROBE_BEGIN\\n\")\n" + //$NON-NLS-1$
"serial=1\n" + //$NON-NLS-1$
"startTime = 0;\n" + //$NON-NLS-1$
@@ -176,42 +226,46 @@ public class LaunchStapGraph extends SystemTapLaunchShortcut {
exclusions = e;
}
+
+ /**
+ * Writes global variables for the StapGraph script to the BufferedWriter.
+ * Should be called first.
+ *
+ * @param bw
+ * @return
+ * @throws IOException
+ */
+ private String writeGlobalVariables() throws IOException {
+ String toWrite = "global serial\n" + //$NON-NLS-1$
+ "global startTime\n " + //$NON-NLS-1$
+ "global finalTime\n"; //$NON-NLS-1$
+
+ return toWrite;
+ }
+
@Override
public String generateScript() throws IOException {
String scriptContents = ""; //$NON-NLS-1$
+ scriptContents += writeGlobalVariables();
// scriptContents += writeStapMarkers();
scriptContents += funcs;
scriptContents += writeFromPartialScript(projectName);
+// BufferedWriter bw = new BufferedWriter(new FileWriter(scriptFile));
+//// bw.write("probe begin { printf(\"HELLO\") }");
+// bw.write(scriptContents);
+// bw.close();
return scriptContents;
}
public void setPartialScriptPath(String val) {
partialScriptPath = val;
}
-
- @Override
- public String setScriptPath() {
- scriptPath = PluginConstants.getDefaultOutput()
- + "callgraphGen.stp"; //$NON-NLS-1$
- return scriptPath;
- }
-
- @Override
- public String setParserID() {
- parserID = ATTR_PARSER;
- return parserID;
- }
-
- @Override
- public String setViewID() {
- return ATTR_VIEWER;
- }
// /**
// * Determines whether or not the user wants StapMarkers and inserts them. To
@@ -244,4 +298,4 @@ public class LaunchStapGraph extends SystemTapLaunchShortcut {
//
// return toWrite;
// }
-} \ No newline at end of file
+}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchWizard.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchWizard.java
index e6ac90572d..68a240e98b 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchWizard.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchWizard.java
@@ -101,7 +101,7 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
@Override
public void launch(IEditorPart ed, String mode) {
- super.initialize();
+ super.Init();
promptForInputs();
this.mode = mode;
@@ -111,7 +111,7 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
@Override
public void launch(ISelection selection, String mode) {
- super.initialize();
+ super.Init();
completed = false;
promptForInputs();
@@ -147,7 +147,7 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
sh.setText(name);
- Image img = new Image(sh.getDisplay(), PluginConstants.getPluginLocation() + "systemtapbanner.png"); //$NON-NLS-1$
+ Image img = new Image(sh.getDisplay(), PluginConstants.PLUGIN_LOCATION + "systemtapbanner.png"); //$NON-NLS-1$
Composite imageCmp = new Composite(sh, SWT.BORDER);
imageCmp.setLayout(new FillLayout());
GridData imageData = new GridData(650, 157);
@@ -271,21 +271,6 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
return completed;
}
- public String setScriptPath() {
- scriptPath = "IMPLEMENT";
- return scriptPath;
- }
-
- @Override
- public String setParserID() {
- return null;
- }
-
- @Override
- public String setViewID() {
- return null;
- }
-
}
//
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java
index 7c56096580..6cbd4c6f13 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java
@@ -55,7 +55,7 @@ public class SystemTapLaunchConfigurationDelegate extends
AbstractCLaunchDelegate {
private static final String TEMP_ERROR_OUTPUT =
- PluginConstants.getDefaultOutput() + "stapTempError.error"; //$NON-NLS-1$
+ PluginConstants.PLUGIN_LOCATION + "stapTempError.error"; //$NON-NLS-1$
private String cmd;
private File temporaryScript = null;
private String arguments = ""; //$NON-NLS-1$
@@ -74,46 +74,31 @@ public class SystemTapLaunchConfigurationDelegate extends
return null;
}
-
- /**
- * Sets strings to blank, booleans to false and everything else to null
- */
- private void initialize() {
- temporaryScript = null;
- arguments = ""; //$NON-NLS-1$
- scriptPath = ""; //$NON-NLS-1$
- binaryPath = ""; //$NON-NLS-1$
- outputPath = ""; //$NON-NLS-1$
- needsBinary = false; // Set to false if we want to use SystemTap
- needsArguments = false;
- useColour = false;
- binaryArguments = ""; //$NON-NLS-1$
- }
-
@Override
public void launch(ILaunchConfiguration config, String mode,
ILaunch launch, IProgressMonitor m) throws CoreException {
-
+
if (m == null) {
m = new NullProgressMonitor();
}
SubMonitor monitor = SubMonitor.convert(m,
"SystemTap runtime monitor", 5); //$NON-NLS-1$
- initialize();
+
+ //System.out.println("SystemTapLaunchConfigurationDelegate: launch"); //$NON-NLS-1$
// check for cancellation
if (monitor.isCanceled()) {
return;
}
+
+
+ String command = ConfigurationOptionsSetter.setOptions(config);
-
- /*
- * Set variables
- */
if (config.getAttribute(LaunchConfigurationConstants.USE_COLOUR,
LaunchConfigurationConstants.DEFAULT_USE_COLOUR))
useColour = true;
+
if (!config.getAttribute(LaunchConfigurationConstants.ARGUMENTS,
LaunchConfigurationConstants.DEFAULT_ARGUMENTS).equals(
LaunchConfigurationConstants.DEFAULT_ARGUMENTS)) {
@@ -122,6 +107,8 @@ public class SystemTapLaunchConfigurationDelegate extends
LaunchConfigurationConstants.DEFAULT_ARGUMENTS);
needsArguments = true;
}
+
+
if (!config.getAttribute(LaunchConfigurationConstants.BINARY_PATH,
LaunchConfigurationConstants.DEFAULT_BINARY_PATH).equals(
LaunchConfigurationConstants.DEFAULT_BINARY_PATH)) {
@@ -130,6 +117,7 @@ public class SystemTapLaunchConfigurationDelegate extends
LaunchConfigurationConstants.DEFAULT_BINARY_PATH);
needsBinary = true;
}
+
if (!config.getAttribute(LaunchConfigurationConstants.BINARY_ARGUMENTS,
LaunchConfigurationConstants.DEFAULT_BINARY_ARGUMENTS).equals(
LaunchConfigurationConstants.DEFAULT_BINARY_ARGUMENTS)) {
@@ -137,6 +125,9 @@ public class SystemTapLaunchConfigurationDelegate extends
LaunchConfigurationConstants.BINARY_ARGUMENTS,
LaunchConfigurationConstants.DEFAULT_BINARY_ARGUMENTS);
}
+
+
+
if (!config.getAttribute(LaunchConfigurationConstants.SCRIPT_PATH,
LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH).equals(
LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH)) {
@@ -144,11 +135,13 @@ public class SystemTapLaunchConfigurationDelegate extends
LaunchConfigurationConstants.SCRIPT_PATH,
LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH);
}
+
// Generate script if needed
if (config.getAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE,
LaunchConfigurationConstants.DEFAULT_NEED_TO_GENERATE)) {
temporaryScript = new File(scriptPath);
temporaryScript.delete();
+
try {
temporaryScript.createNewFile();
FileWriter fstream = new FileWriter(temporaryScript);
@@ -162,21 +155,14 @@ public class SystemTapLaunchConfigurationDelegate extends
}
}
- /**
- * Generate partial command
- */
- String partialCommand = ConfigurationOptionsSetter.setOptions(config);
-
outputPath = config.getAttribute(
LaunchConfigurationConstants.OUTPUT_PATH,
- PluginConstants.getDefaultOutput());
- partialCommand += "-o " + outputPath; //$NON-NLS-1$
-
+ PluginConstants.DEFAULT_OUTPUT);
+ command += "-o " + outputPath; //$NON-NLS-1$
try {
- //Make sure the output file exists
File tempFile = new File(outputPath);
- tempFile.delete();
tempFile.createNewFile();
+ //Make sure the output file exists
} catch (IOException e1) {
e1.printStackTrace();
}
@@ -187,14 +173,9 @@ public class SystemTapLaunchConfigurationDelegate extends
return;
}
- finishLaunch(launch, config, partialCommand, m, true);
+ finishLaunch(launch, config, command, m, true);
}
-
- /**
- * Returns the current SystemTap command, or returns an error message.
- * @return
- */
public String getCommand() {
if (cmd.length() > 0)
return cmd;
@@ -202,17 +183,6 @@ public class SystemTapLaunchConfigurationDelegate extends
return Messages.getString("SystemTapLaunchConfigurationDelegate.0"); //$NON-NLS-1$
}
-
- /**
- * Executes a command array using pty
- *
- * @param commandArray -- Split a command string on the ' ' character
- * @param env -- Use <code>getEnvironment(ILaunchConfiguration)</code> in the AbstractCLaunchDelegate.
- * @param wd -- Working directory
- * @param usePty -- A value of 'true' usually suffices
- * @return A properly formed process, or null
- * @throws IOException -- If the process cannot be created
- */
public Process execute(String[] commandArray, String[] env, File wd,
boolean usePty) throws IOException {
Process process = null;
@@ -239,23 +209,25 @@ public class SystemTapLaunchConfigurationDelegate extends
- /**
- * Spawn a new IProcess using the Debug Plugin.
- *
- * @param launch
- * @param systemProcess
- * @param programName
- * @return
- */
protected IProcess createNewProcess(ILaunch launch, Process systemProcess,
String programName) {
return DebugPlugin.newProcess(launch, systemProcess,
renderProcessLabel(programName));
}
+ public String getCommandLine(String[] args) {
+ StringBuffer ret = new StringBuffer();
+ for (String arg : args) {
+ ret.append(arg + " "); //$NON-NLS-1$
+ }
+ return ret.toString().trim();
+ }
+
+
+
private void finishLaunch(ILaunch launch, ILaunchConfiguration config, String command,
IProgressMonitor monitor, boolean retry) {
- String errorMessage = ""; //$NON-NLS-1$
+ String errorMessage = "";
try {
File workDir = getWorkingDirectory(config);
@@ -263,12 +235,15 @@ public class SystemTapLaunchConfigurationDelegate extends
workDir = new File(System.getProperty("user.home", ".")); //$NON-NLS-1$ //$NON-NLS-2$
}
+
+
// Generate the command
SystemTapCommandGenerator cmdGenerator = new SystemTapCommandGenerator();
cmd = cmdGenerator.generateCommand(scriptPath, binaryPath,
command, needsBinary, needsArguments, arguments, binaryArguments);
+// MP.println(cmd);
// Prepare cmd for execution - we need a command array of strings,
// no string can contain a space character. (One of the process'
// requirements)
@@ -277,7 +252,8 @@ public class SystemTapLaunchConfigurationDelegate extends
for (String str : tmp) {
cmdLine.add(str);
}
- String[] commandArray = (String[]) cmdLine.toArray(new String[cmdLine.size()]);
+ String[] commandArray = (String[]) cmdLine
+ .toArray(new String[cmdLine.size()]);
// Check for cancellation
if (monitor.isCanceled()) {
@@ -303,8 +279,7 @@ public class SystemTapLaunchConfigurationDelegate extends
if (extensions == null || extensions.length < 1) {
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("SystemTapLaunchConfigurationDelegate.InvalidParser1"), //$NON-NLS-1$
- Messages.getString("SystemTapLaunchConfigurationDelegate.InvalidParser2"), //$NON-NLS-1$ //$NON-NLS-2$
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("SystemTapLaunchConfigurationDelegate.InvalidParser1"), Messages.getString("SystemTapLaunchConfigurationDelegate.InvalidParser2"), //$NON-NLS-1$ //$NON-NLS-2$
Messages.getString("SystemTapLaunchConfigurationDelegate.InvalidParser3") + //$NON-NLS-1$
Messages.getString("SystemTapLaunchConfigurationDelegate.InvalidParser4") + parserClass); //$NON-NLS-1$
mess.schedule();
@@ -314,17 +289,10 @@ public class SystemTapLaunchConfigurationDelegate extends
IConfigurationElement element = extensions[0];
SystemTapParser parser =
- (SystemTapParser) element.createExecutableExtension(PluginConstants.ATTR_CLASS);
- parser.setViewID(config.getAttribute(LaunchConfigurationConstants.VIEW_CLASS,
- LaunchConfigurationConstants.VIEW_CLASS));
- parser.setSourcePath(outputPath);
- parser.setMonitor(SubMonitor.convert(monitor));
- parser.setDone(false);
-
- parser.setKillButtonEnabled(true);
-
- if (element.getAttribute(PluginConstants.ATTR_REALTIME).equals(PluginConstants.VAL_TRUE)) {
- parser.setRealTime(true);
+ (SystemTapParser) element.createExecutableExtension("class"); //$NON-NLS-1$
+
+
+ if (element.getAttribute("realtime") == "true") { //$NON-NLS-1$ //$NON-NLS-2$
parser.schedule();
}
@@ -335,96 +303,74 @@ public class SystemTapLaunchConfigurationDelegate extends
workDir, true);
if (subProcess == null){
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("SystemTapLaunchConfigurationDelegate.NullProcessErrorName"), //$NON-NLS-1$
- Messages.getString("SystemTapLaunchConfigurationDelegate.NullProcessErrorTitle"), //$NON-NLS-1$ //$NON-NLS-2$
- Messages.getString("SystemTapLaunchConfigurationDelegate.NullProcessErrorMessage1")); //$NON-NLS-1$
+ //TODO: FIgure out what the console error message is so we can catch it in errorlog
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("SystemTapLaunchConfigurationDelegate.NullProcessErrorName"), Messages.getString("SystemTapLaunchConfigurationDelegate.NullProcessErrorTitle"), //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.getString("SystemTapLaunchConfigurationDelegate.NullProcessErrorMessage1") + //$NON-NLS-1$
+ Messages.getString("SystemTapLaunchConfigurationDelegate.NullProcessErrorMessage2")); //$NON-NLS-1$
mess.schedule();
return;
}
- IProcess process = createNewProcess(launch, subProcess,commandArray[0]);
+ IProcess process = createNewProcess(launch, subProcess,
+ commandArray[0]);
// set the command line used
- process.setAttribute(IProcess.ATTR_CMDLINE,cmd);
+ process.setAttribute(IProcess.ATTR_CMDLINE,
+ cmd);
monitor.worked(1);
+ ((TextConsole)Helper.getConsoleByName(config.getName())).activate();
StreamListener s = new StreamListener();
process.getStreamsProxy().getErrorStreamMonitor().addListener(s);
-
+
+
while (!process.isTerminated()) {
Thread.sleep(100);
- if ((monitor != null && monitor.isCanceled()) || parser.isJobCancelled()) {
- parser.cancelJob();
+ if (monitor.isCanceled()) {
+ Runtime run = Runtime.getRuntime();
+ run.exec("kill stap"); //$NON-NLS-1$
process.terminate();
return;
}
}
Thread.sleep(100);
s.close();
- parser.setKillButtonEnabled(false);
if (process.getExitValue() != 0) {
- parser.cancelJob();
//SystemTap terminated with errors, parse console to figure out which error
IDocument doc = Helper.getConsoleDocumentByName(config.getName());
//Sometimes the console has not been printed to yet, wait for a little while longer
if (doc.get().length() < 1)
Thread.sleep(300);
SystemTapErrorHandler errorHandler = new SystemTapErrorHandler();
- errorHandler.handle(monitor, config.getName()
- + Messages.getString("SystemTapLaunchConfigurationDelegate.stap_command") //$NON-NLS-1$
- + cmd
+ errorHandler.handle(monitor, config.getName() + Messages.getString("SystemTapLaunchConfigurationDelegate.stap_command") //$NON-NLS-1$
+ + PluginConstants.NEW_LINE + cmd
+ PluginConstants.NEW_LINE + PluginConstants.NEW_LINE);
errorMessage = errorHandler.handle(monitor, new FileReader(TEMP_ERROR_OUTPUT)); //$NON-NLS-1$
- if ((monitor != null && monitor.isCanceled())) {
+ if (monitor != null && monitor.isCanceled())
return;
- }
if (errorHandler.hasMismatchedProbePoints() && retry) {
-
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("SystemTapLaunchConfigurationDelegate.Relaunch1"), //$NON-NLS-1$
- Messages.getString("SystemTapLaunchConfigurationDelegate.Relaunch2"), //$NON-NLS-1$
- Messages.getString("SystemTapLaunchConfigurationDelegate.Relaunch3")); //$NON-NLS-1$
- mess.schedule();
-
- if (!errorHandler.finishHandling(monitor, s.getNumberOfErrors())) {
- //Check if we should attempt a relaunch or not
+ errorHandler.finishHandling(monitor, s.getNumberOfErrors());
+ if (monitor != null && monitor.isCanceled())
return;
- }
-
- if ((monitor != null && monitor.isCanceled()) || parser.isJobCancelled()) {
- monitor.setCanceled(true);
- parser.cancelJob();
- return;
- }
finishLaunch(launch, config, command, monitor, false);
return;
}
-
errorHandler.finishHandling(monitor, s.getNumberOfErrors());
+
return;
}
- if (! element.getAttribute(PluginConstants.ATTR_REALTIME).equals(PluginConstants.VAL_TRUE)) { //$NON-NLS-1$ //$NON-NLS-2$
+ if (element.getAttribute(Messages.getString("SystemTapLaunchConfigurationDelegate.8")) != Messages.getString("SystemTapLaunchConfigurationDelegate.9")) { //$NON-NLS-1$ //$NON-NLS-2$
parser.schedule();
- } else {
- //Parser already scheduled, but double-check
- if (parser != null)
- parser.setDone(true);
}
monitor.worked(1);
-
- errorMessage = generateErrorMessage(config.getName(), command) + errorMessage;
-
- DocWriter dw = new DocWriter(Messages.getString("SystemTapLaunchConfigurationDelegate.DocWriterName"), //$NON-NLS-1$
- ((TextConsole)Helper.getConsoleByName(config.getName())), errorMessage);
- dw.schedule();
-
} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
@@ -432,23 +378,27 @@ public class SystemTapLaunchConfigurationDelegate extends
} catch (CoreException e) {
e.printStackTrace();
} finally {
- monitor.done();
+ errorMessage = generateErrorMessage(config.getName(), command) + errorMessage;
+ DocWriter dw = new DocWriter(Messages.getString("SystemTapLaunchConfigurationDelegate.DocWriterName"), //$NON-NLS-1$
+ ((TextConsole)Helper.getConsoleByName(config.getName())), errorMessage);
+ dw.schedule();
+ monitor.done();
}
}
private String generateErrorMessage(String configName, String binaryCommand) {
- String output = ""; //$NON-NLS-1$
+ String output = "";
if (binaryCommand == null || binaryCommand.length() < 0) {
output = PluginConstants.NEW_LINE +
PluginConstants.NEW_LINE + "-------------" + //$NON-NLS-1$
PluginConstants.NEW_LINE +
- Messages.getString("SystemTapLaunchConfigurationDelegate.Relaunch10") //$NON-NLS-1$
+ "Configuration name: "//$NON-NLS-1$
+ configName + PluginConstants.NEW_LINE +
- Messages.getString("SystemTapLaunchConfigurationDelegate.Relaunch8") + //$NON-NLS-1$
- Messages.getString("SystemTapLaunchConfigurationDelegate.Relaunch9") + //$NON-NLS-1$
+ "No binary commands specified. To specify commands, " +
+ "check under the Binary Arguments tab for this " +
"configuration in Profile As --> Profile Configurations." + //$NON-NLS-1$
PluginConstants.NEW_LINE + PluginConstants.NEW_LINE;
}
@@ -456,13 +406,13 @@ public class SystemTapLaunchConfigurationDelegate extends
output = PluginConstants.NEW_LINE
+ PluginConstants.NEW_LINE +"-------------" //$NON-NLS-1$
+ PluginConstants.NEW_LINE
- + Messages.getString("SystemTapLaunchConfigurationDelegate.EndMessage1") //$NON-NLS-1$
+ + "Configuration name: "//$NON-NLS-1$
+ configName + PluginConstants.NEW_LINE +
- Messages.getString("SystemTapLaunchConfigurationDelegate.EndMessage2") //$NON-NLS-1$
+ "Binary arguments : "//$NON-NLS-1$
+ binaryCommand + PluginConstants.NEW_LINE +
- Messages.getString("SystemTapLaunchConfigurationDelegate.EndMessage3") + //$NON-NLS-1$
- Messages.getString("SystemTapLaunchConfigurationDelegate.EndMessage4") + //$NON-NLS-1$
- Messages.getString("SystemTapLaunchConfigurationDelegate.EndMessage5") + //$NON-NLS-1$
+ "To change this command, check under the Binary " + //$NON-NLS-1$
+ "Arguments tab for this configuration in " + //$NON-NLS-1$
+ "Profile As --> Profile Configurations." + //$NON-NLS-1$
PluginConstants.NEW_LINE + PluginConstants.NEW_LINE;
}
@@ -474,9 +424,6 @@ public class SystemTapLaunchConfigurationDelegate extends
private Helper h;
private int counter;
public StreamListener() throws IOException {
- File file = new File(TEMP_ERROR_OUTPUT);
- file.delete();
- file.createNewFile();
h = new Helper();
counter = 0;
h.setBufferedWriter(TEMP_ERROR_OUTPUT); //$NON-NLS-1$
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchShortcut.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchShortcut.java
index bd2966f19b..2aa9de5783 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchShortcut.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchShortcut.java
@@ -11,6 +11,7 @@
package org.eclipse.linuxtools.callgraph.launch;
+
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@@ -34,7 +35,6 @@ import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.debug.core.DebugPlugin;
@@ -51,62 +51,11 @@ import org.eclipse.swt.widgets.Button;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.model.WorkbenchLabelProvider;
-/**
- * Launch method for a generated script that executes on a binary <br>
- * MUST specify (String) scriptPath and call config = createConfiguration(bin)! <br>
- * Noteworthy defaults:
- * <ul>
- * <li>'name' defaults to ""</li>
- * <li>'overwrite' defaults to true</li>
- * </ul>
- * To create new launches: <br>
- * <ul>
- * <li>
- * Extend the shortcut extension in Eclipse (recommend copying code from the
- * existing launch in the plugin.xml)</li>
- * <li>
- * Create a class that extends SystemTapLaunchShortcut with a function public
- * void launch(IBinary bin, String mode) that calls super.Init().</li>
- * <li>
- * Set name</li>
- * <li>
- * If the script is to be launched with a binary, call binName = getName(bin)</li>
- * <li>
- * Call config=createConfiguration(bin, name) or
- * config=createConfiguration(name)</li>
- * <li>
- * Specify whichever of the optional parameters you need</li>
- * <li>
- * Extend the parser extension defined in org.eclipse.linuxtools.callgraph
- * .core. Build a basic parsing class.</li>
- * <li>
- * Set parserID to the id of your extension</li>
- * <li>
- * Set scriptPath</li>
- * <li>
- * If you wish to generate a script on-the-fly, override generateScript() and
- * set needToGenerate to true</li>
- * <li>
- * Call finishLaunch or finishLaunchWithoutBinary</li>
- * </ul>
- *<br>
- *<br>
- * The following protected parameters are provided by
- * SystemTapLaunchShortcut:
- *<br> <br>
- * Optional customization parameters: <code> protected String name; protected
- * String binaryPath; protected String arguments; protected String
- * outputPath; protected String dirPath; protected String generatedScript;
- * protected boolean needToGenerate; protected boolean overwrite;</code>
- * <br> <br>
- * Mandatory: <code> protected String scriptPath; protected ILaunchConfiguration
- * config;</code>
- */
-public abstract class SystemTapLaunchShortcut extends ProfileLaunchShortcut {
+public class SystemTapLaunchShortcut extends ProfileLaunchShortcut{
protected IEditorPart editor;
protected ILaunchConfiguration config;
-
+
private static final String USER_SELECTED_ALL = "ALL"; //$NON-NLS-1$
protected String name;
@@ -118,17 +67,18 @@ public abstract class SystemTapLaunchShortcut extends ProfileLaunchShortcut {
protected String dirPath;
protected String generatedScript;
protected String parserID;
- protected String viewID;
protected boolean needToGenerate;
protected boolean overwrite;
protected boolean useColours;
protected String resourceToSearchFor;
protected boolean searchForResource;
protected IBinary bin;
-
+
+
private Button OKButton;
private boolean testMode = false;
-
+
+
/**
* Provides access to the Profiling Frameworks' launch method
*
@@ -138,104 +88,105 @@ public abstract class SystemTapLaunchShortcut extends ProfileLaunchShortcut {
public void reLaunch(IEditorPart editor, String mode) {
launch(editor, mode);
}
-
- /**
- * Initialize variables. Highly recommend calling this function within the
- * launch methods. Will call setScriptPath, setParserID and setViewID.
- */
- public void initialize() {
+
+ public void Init() {
name = ""; //$NON-NLS-1$
- dirPath = ResourcesPlugin.getWorkspace().getRoot().getLocation()
- .toString();
+ dirPath = ResourcesPlugin.getWorkspace().getRoot().getLocation().toString();
binaryPath = LaunchConfigurationConstants.DEFAULT_BINARY_PATH;
arguments = LaunchConfigurationConstants.DEFAULT_ARGUMENTS;
- outputPath = PluginConstants.getDefaultIOPath();
+ outputPath = PluginConstants.STAP_GRAPH_DEFAULT_IO_PATH;
overwrite = true;
+ scriptPath = null; //Every shortcut MUST declare its own script path.
generatedScript = LaunchConfigurationConstants.DEFAULT_GENERATED_SCRIPT;
needToGenerate = false;
useColours = false;
+ parserID = null;
}
@Override
protected ILaunchConfigurationType getLaunchConfigType() {
- return getLaunchManager().getLaunchConfigurationType(
- PluginConstants.CONFIGURATION_TYPE_ID);
+ //System.out.println("SystemTapLaunchShortcut: getLaunchConfigType"); //$NON-NLS-1$
+ return getLaunchManager().getLaunchConfigurationType(PluginConstants.CONFIGURATION_TYPE_ID);
}
+
@Override
protected void setDefaultProfileAttributes(
ILaunchConfigurationWorkingCopy wc) throws CoreException {
SystemTapOptionsTab tab = new SystemTapOptionsTab();
tab.setDefaults(wc);
- }
+ //System.out.println("SystemTapLaunchShortcut: setDefaultProfileAttributes"); //$NON-NLS-1$
+ }
+
protected ILaunchConfiguration checkForExistingConfiguration() {
ILaunchConfigurationType configType = getLaunchConfigType();
try {
- ILaunchConfiguration[] configs = DebugPlugin.getDefault()
- .getLaunchManager().getLaunchConfigurations(configType);
-
+ ILaunchConfiguration[] configs = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations(configType);
+
for (int i = 0; i < configs.length; i++) {
- if (configs[i].exists() && configs[i] != null
- && !config.equals(configs[i])) {
- if (checkIfAttributesAreEqual(config, configs[i])) {
+ if (configs[i].exists() && configs[i]!=null && !config.equals(configs[i])) {
+ if(checkIfAttributesAreEqual(config, configs[i])) {
config.delete();
config = configs[i];
- }
+ }
}
}
-
+
} catch (CoreException e) {
e.printStackTrace();
}
-
+
return config;
-
+
}
-
+
+
/**
- * Returns true if two configurations are exactly identical (i.e. all
- * attributes are equal)
+ * Returns true if two configurations are exactly identical (i.e. all attributes are equal)
*
* @param first
* @param second
- * @return True if two configurations are exactly identical (i.e. all
- * attributes are equal)
+ * @return True if two configurations are exactly identical (i.e. all attributes are equal)
*/
- private boolean checkIfAttributesAreEqual(ILaunchConfiguration first,
- ILaunchConfiguration second) {
+ private boolean checkIfAttributesAreEqual(ILaunchConfiguration first,ILaunchConfiguration second) {
boolean isEqual = false;
-
+
try {
if (first.getAttributes().equals(second.getAttributes()))
isEqual = true;
} catch (CoreException e) {
e.printStackTrace();
}
-
+
return isEqual;
}
-
- /**
- * Helper function to complete launches. Uses protected parameters (Strings)
- * scriptPath, binaryPath, arguments, outputPath and (boolean) overwrite.
- * These must be set by the calling function (or else nonsensical results
- * will occur). <br>
- * If scriptPath has not been set, the setScriptPath() method will be
- * called.
- *
- * @param name
- * : Used to generate the name of the new configuration
- * @param bin
- * : Affiliated executable
- * @param mode
- * : Mode setting
- * @throws Exception
- */
+
+/**
+ * Helper function to complete launches. Uses protected parameters
+ * (Strings) scriptPath, binaryPath, arguments, outputPath and (boolean)
+ * overwrite. These must be set by the calling function (or else
+ * nonsensical results will occur).
+ *
+ * ScriptPath MUST be set.
+ *
+ * @param name: Used to generate the name of the new configuration
+ * @param bin: Affiliated executable
+ * @param mode: Mode setting
+ * @throws Exception
+ */
protected void finishLaunch(String name, String mode) throws Exception {
- if (!finishLaunchHelper())
+ if (parserID == null)
+ throw new Exception();
+
+ if (scriptPath.length() < 1) {
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("SystemTapLaunchShortcut.ErrorMessageName"), //$NON-NLS-1$
+ Messages.getString("SystemTapLaunchShortcut.ErrorMessageTitle"), Messages.getString("SystemTapLaunchShortcut.ErrorMessage") + name); //$NON-NLS-1$ //$NON-NLS-2$
+ mess.schedule();
return;
-
+ }
+
+
ILaunchConfigurationWorkingCopy wc = null;
if (config != null) {
try {
@@ -243,161 +194,128 @@ public abstract class SystemTapLaunchShortcut extends ProfileLaunchShortcut {
} catch (CoreException e1) {
e1.printStackTrace();
}
-
- wc.setAttribute(LaunchConfigurationConstants.SCRIPT_PATH,
- scriptPath);
-
- if (!invalid(binaryPath))
- wc.setAttribute(LaunchConfigurationConstants.BINARY_PATH,
- binaryPath);
-
- wc.setAttribute(LaunchConfigurationConstants.OUTPUT_PATH,
- outputPath);
+
+ wc.setAttribute(LaunchConfigurationConstants.SCRIPT_PATH, scriptPath);
+ wc.setAttribute(LaunchConfigurationConstants.BINARY_PATH, binaryPath);
+ wc.setAttribute(LaunchConfigurationConstants.OUTPUT_PATH, outputPath);
wc.setAttribute(LaunchConfigurationConstants.ARGUMENTS, arguments);
- wc.setAttribute(LaunchConfigurationConstants.GENERATED_SCRIPT,
- generatedScript);
- wc.setAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE,
- needToGenerate);
+ wc.setAttribute(LaunchConfigurationConstants.GENERATED_SCRIPT, generatedScript);
+ wc.setAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE, needToGenerate);
wc.setAttribute(LaunchConfigurationConstants.OVERWRITE, overwrite);
- wc
- .setAttribute(LaunchConfigurationConstants.USE_COLOUR,
- useColours);
- wc
- .setAttribute(LaunchConfigurationConstants.PARSER_CLASS,
- parserID);
- wc.setAttribute(LaunchConfigurationConstants.VIEW_CLASS, viewID);
-
+ wc.setAttribute(LaunchConfigurationConstants.USE_COLOUR, useColours);
+ wc.setAttribute(LaunchConfigurationConstants.PARSER_CLASS, parserID);
+
+
try {
config = wc.doSave();
} catch (CoreException e) {
e.printStackTrace();
}
-
+
checkForExistingConfiguration();
-
+
if (!testMode)
DebugUITools.launch(config, mode);
- } else
- throw new Exception(
- Messages
- .getString("SystemTapLaunchShortcut.NullConfiguration") + name); //$NON-NLS-1$
-
+ }
+
}
-
+
+ //TODO: Should merge finishWith and Without binary - we only use
+ //the IBinary to find the name, in any case.
/**
- * returns true if str == null || str.length() < 1. Convenience method.
+ * This function is identical to the function above, except it does not
+ * require a binary.
*
- * @param str
- * @return
- */
- private static boolean invalid(String str) {
- return (str == null || str.length() < 1);
- }
-
- /**
- * Helper function for methods common to both types of finishLaunch.
+ * Helper function to complete launches. Uses protected parameters
+ * (Strings) scriptPath, arguments, outputPath and (boolean)
+ * overwrite. These must be set by the calling function (or else
+ * nonsensical results will occur).
*
- * @throws Exception
+ * ScriptPath MUST be set.
+ *
+ * @param name: Used to generate the name of the new configuration
+ * @param bin: Affiliated executable
+ * @param mode: Mode setting
*/
- private boolean finishLaunchHelper() throws Exception {
- if (invalid(scriptPath))
- scriptPath = setScriptPath();
- if (invalid(scriptPath)) {
- // Setting the variable didn't work, do not launch.
-
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
- Messages
- .getString("SystemTapLaunchShortcut.ErrorMessageName"), //$NON-NLS-1$
- Messages
- .getString("SystemTapLaunchShortcut.ErrorMessageTitle"), Messages.getString("SystemTapLaunchShortcut.ErrorMessage") + name); //$NON-NLS-1$ //$NON-NLS-2$
- mess.schedule();
- return false;
- }
-
- if (invalid(parserID))
- parserID = setParserID();
- if (invalid(parserID)) {
- // Setting the variable didn't work, do not launch.
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
- Messages
- .getString("SystemTapLaunchShortcut.InvalidParser1"), //$NON-NLS-1$
- Messages
- .getString("SystemTapLaunchShortcut.InvalidParser2"), Messages.getString("SystemTapLaunchShortcut.InvalidParser3")); //$NON-NLS-1$ //$NON-NLS-2$
- mess.schedule();
- return false;
- }
-
- if (invalid(viewID))
- viewID = setViewID();
- if (invalid(viewID)) {
- // Setting the variable didn't work, do not launch.
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
- Messages.getString("SystemTapLaunchShortcut.InvalidView1"), //$NON-NLS-1$
- Messages.getString("SystemTapLaunchShortcut.InvalidView2"), Messages.getString("SystemTapLaunchShortcut.InvalidView3")); //$NON-NLS-1$ //$NON-NLS-2$
+protected void finishLaunchWithoutBinary(String name, String mode) {
+
+
+ if (scriptPath.length() < 1) {
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("SystemTapLaunchShortcut.ErrorMessagename"), //$NON-NLS-1$
+ Messages.getString("SystemTapLaunchShortcut.ErrorMessageTitle"), Messages.getString("SystemTapLaunchShortcut.ErrorMessage") + name); //$NON-NLS-1$ //$NON-NLS-2$
mess.schedule();
- return false;
+ return;
}
+
+ ILaunchConfigurationWorkingCopy wc = null;
+ if (config != null) {
+ try {
+ wc = config.getWorkingCopy();
+ } catch (CoreException e1) {
+ e1.printStackTrace();
+ }
+
+ wc.setAttribute(LaunchConfigurationConstants.SCRIPT_PATH, scriptPath);
+ wc.setAttribute(LaunchConfigurationConstants.OUTPUT_PATH, outputPath);
+ wc.setAttribute(LaunchConfigurationConstants.ARGUMENTS, arguments);
+ wc.setAttribute(LaunchConfigurationConstants.GENERATED_SCRIPT, generatedScript);
+ wc.setAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE, needToGenerate);
+ wc.setAttribute(LaunchConfigurationConstants.OVERWRITE, overwrite);
+ wc.setAttribute(LaunchConfigurationConstants.USE_COLOUR, useColours);
- if (needToGenerate) {
- if (invalid(generatedScript))
- generatedScript = generateScript();
- if (invalid(generatedScript)) {
- // Setting the variable didn't work, do not launch.
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
- Messages
- .getString("SystemTapLaunchShortcut.InvalidGeneration1"), //$NON-NLS-1$
- Messages
- .getString("SystemTapLaunchShortcut.InvalidGeneration2"), Messages.getString("SystemTapLaunchShortcut.InvalidGeneration3"));//$NON-NLS-1$ //$NON-NLS-2$
- mess.schedule();
- return false;
+
+ try {
+ config = wc.doSave();
+ } catch (CoreException e) {
+ e.printStackTrace();
}
+ checkForExistingConfiguration();
+
+ if (!testMode)
+ DebugUITools.launch(config, mode);
}
- return true;
}
- /**
- * Returns bin.getPath().toString()
- *
- * @param bin
- * @return
- */
+
+/**
+ * Returns bin.getPath().toString()
+ *
+ * @param bin
+ * @return
+ */
public String getName(IBinary bin) {
if (bin != null) {
binName = bin.getPath().toString();
} else {
binName = ""; //$NON-NLS-1$
- // SystemTapUIErrorMessages error = new SystemTapUIErrorMessages(
- // "Null_Binary",
- // "Invalid executable",
- // "An error has occured: a binary/executable file was not given to the launch shortcut.");
- // error.schedule();
+// SystemTapUIErrorMessages error = new SystemTapUIErrorMessages(
+// "Null_Binary",
+// "Invalid executable",
+// "An error has occured: a binary/executable file was not given to the launch shortcut.");
+// error.schedule();
}
return binName;
}
-
+
/**
* Creates a configuration for the given IBinary
*
*/
@Override
- protected ILaunchConfiguration createConfiguration(IBinary bin) {
- if (bin != null) {
+ protected ILaunchConfiguration createConfiguration(IBinary bin){
+ if (bin != null){
return super.createConfiguration(bin);
- } else {
+ }else{
try {
- return getLaunchConfigType()
- .newInstance(
- null,
- getLaunchManager()
- .generateUniqueLaunchConfigurationNameFrom(
- Messages
- .getString("SystemTapLaunchShortcut.0"))); //$NON-NLS-1$
+ return getLaunchConfigType().newInstance(null, getLaunchManager().generateUniqueLaunchConfigurationNameFrom(Messages.getString("SystemTapLaunchShortcut.0"))); //$NON-NLS-1$
} catch (CoreException e) {
e.printStackTrace();
}
}
return null;
}
+
+
/**
* Creates a configuration with the given name - does not use a binary
@@ -409,69 +327,51 @@ public abstract class SystemTapLaunchShortcut extends ProfileLaunchShortcut {
ILaunchConfiguration config = null;
try {
ILaunchConfigurationType configType = getLaunchConfigType();
- ILaunchConfigurationWorkingCopy wc = configType.newInstance(null,
- getLaunchManager()
- .generateUniqueLaunchConfigurationNameFrom(name));
-
+ ILaunchConfigurationWorkingCopy wc = configType.newInstance(null, getLaunchManager().generateUniqueLaunchConfigurationNameFrom(name));
+
setDefaultProfileAttributes(wc);
-
+
config = wc.doSave();
} catch (CoreException e) {
e.printStackTrace();
}
return config;
}
-
+
/**
- * Allows null configurations to be launched. Any launch that uses a binary
- * should never call this configuration with a null parameter, and any
- * launch that does not use a binary should never call this function. The
- * null handling is included for ease of testing.
+ * Allows null configurations to be launched. Any launch that uses a binary should
+ * never call this configuration with a null parameter, and any launch that does not
+ * use a binary should never call this function. The null handling is included for
+ * ease of testing.
*
* @param bin
- * @param name
- * - Customize the name based on the shortcut being launched
+ * @param name - Customize the name based on the shortcut being launched
* @return A launch configuration, or null
*/
protected ILaunchConfiguration createConfiguration(IBinary bin, String name) {
if (bin != null) {
config = null;
try {
- String projectName = bin.getResource().getProjectRelativePath()
- .toString();
+ String projectName = bin.getResource().getProjectRelativePath().toString();
ILaunchConfigurationType configType = getLaunchConfigType();
- ILaunchConfigurationWorkingCopy wc = configType.newInstance(
- null, getLaunchManager()
- .generateUniqueLaunchConfigurationNameFrom(
- name + " - " + bin.getElementName())); //$NON-NLS-1$
-
- wc.setAttribute(
- ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME,
- projectName);
- wc.setAttribute(
- ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, bin
- .getCProject().getElementName());
- wc.setMappedResources(new IResource[] { bin.getResource(),
- bin.getResource().getProject() });
- wc
- .setAttribute(
- ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
- (String) null);
-
+ ILaunchConfigurationWorkingCopy wc = configType.newInstance(null,
+ getLaunchManager().generateUniqueLaunchConfigurationNameFrom(name + " - " + bin.getElementName())); //$NON-NLS-1$
+
+ wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, projectName);
+ wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, bin.getCProject().getElementName());
+ wc.setMappedResources(new IResource[] {bin.getResource(), bin.getResource().getProject()});
+ wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, (String) null);
+
setDefaultProfileAttributes(wc);
-
+
config = wc.doSave();
} catch (CoreException e) {
e.printStackTrace();
}
- } else
+ }
+ else
try {
- ILaunchConfigurationWorkingCopy wc = getLaunchConfigType()
- .newInstance(
- null,
- getLaunchManager()
- .generateUniqueLaunchConfigurationNameFrom(
- name)); //$NON-NLS-1$
+ ILaunchConfigurationWorkingCopy wc = getLaunchConfigType().newInstance(null, getLaunchManager().generateUniqueLaunchConfigurationNameFrom(name)); //$NON-NLS-1$
setDefaultProfileAttributes(wc);
config = wc.doSave();
} catch (CoreException e) {
@@ -480,60 +380,58 @@ public abstract class SystemTapLaunchShortcut extends ProfileLaunchShortcut {
}
return config;
}
-
+
/**
- * Creates an error message stating that the launch failed for the specified
- * reason.
+ * Creates an error message stating that the launch failed for the specified reason.
*
* @param reason
*/
protected void failedToLaunch(String reason) {
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
- Messages.getString("SystemTapLaunchShortcut.StapLaunchFailed"), //$NON-NLS-1$
- Messages
- .getString("SystemTapLaunchShortcut.StapLaunchFailedTitle"), Messages.getString("SystemTapLaunchShortcut.StapLaunchFailedMessage") + reason); //$NON-NLS-1$ //$NON-NLS-2$
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("SystemTapLaunchShortcut.StapLaunchFailed"), //$NON-NLS-1$
+ Messages.getString("SystemTapLaunchShortcut.StapLaunchFailedTitle"), Messages.getString("SystemTapLaunchShortcut.StapLaunchFailedMessage") + reason); //$NON-NLS-1$ //$NON-NLS-2$
mess.schedule();
}
-
+
+
public void errorHandler() {
};
- /*
+
+ /**
* The following are convenience methods for test programs, etc. to check
* the value of certain protected parameters.
+ *
*/
-
public ILaunchConfigurationType outsideGetLaunchConfigType() {
return getLaunchConfigType();
}
public ILaunchConfiguration getConfig() {
- return config;
+ return config;
}
public String getScriptPath() {
return scriptPath;
}
-
+
public String getDirPath() {
return dirPath;
}
-
+
public String getArguments() {
return arguments;
}
-
+
public String getBinaryPath() {
return binaryPath;
}
/**
- * Retrieves the names of all functions referenced by the binary. If
- * searchForResource is true, this function will return all function names
- * belonging to an element with name matching the String held by
- * resourceToSearchFor. Otherwise it will create a dialog prompting the user
- * to select from a list of files to profile, or select the only available
- * file if only one file is available.
+ * Retrieves the names of all functions referenced by the binary. If searchForResource
+ * is true, this function will return all function names belonging to an element with name
+ * matching the String held by resourceToSearchFor. Otherwise it will create a dialog
+ * prompting the user to select from a list of files to profile, or select the only
+ * available file if only one file is available.
*
*
* @param bin
@@ -543,39 +441,34 @@ public abstract class SystemTapLaunchShortcut extends ProfileLaunchShortcut {
String funcs = ""; //$NON-NLS-1$
if (bin == null)
return funcs;
- try {
+ try {
ArrayList<ICContainer> list = new ArrayList<ICContainer>();
TranslationUnitVisitor v = new TranslationUnitVisitor();
- // ASTTranslationUnitVisitor v = new ASTTranslationUnitVisitor();
+// ASTTranslationUnitVisitor v = new ASTTranslationUnitVisitor();
- for (ICElement b : bin.getCProject().getChildrenOfType(
- ICElement.C_CCONTAINER)) {
+ for (ICElement b : bin.getCProject().getChildrenOfType(ICElement.C_CCONTAINER)) {
ICContainer c = (ICContainer) b;
-
- for (ITranslationUnit tu : c.getTranslationUnits()) {
- if (searchForResource
- && tu.getElementName().contains(targetResource)) {
+
+ for (ITranslationUnit tu : c .getTranslationUnits()) {
+ if (searchForResource && tu.getElementName().contains(targetResource)) {
tu.accept(v);
- funcs += v.getFunctions();
+ funcs+=v.getFunctions();
return funcs;
} else {
if (!list.contains(c))
list.add(c);
}
}
-
- // Iterate down to all children, checking for more C_Containers
+
+ //Iterate down to all children, checking for more C_Containers
while (c.getChildrenOfType(ICElement.C_CCONTAINER).size() > 0) {
ICContainer e = null;
- for (ICElement d : c
- .getChildrenOfType(ICElement.C_CCONTAINER)) {
+ for (ICElement d : c.getChildrenOfType(ICElement.C_CCONTAINER)) {
e = (ICContainer) d;
for (ITranslationUnit tu : e.getTranslationUnits()) {
- if (searchForResource
- && tu.getElementName().contains(
- targetResource)) {
+ if (searchForResource && tu.getElementName().contains(targetResource)) {
tu.accept(v);
- funcs += (v.getFunctions());
+ funcs+=(v.getFunctions());
return funcs;
} else {
if (!list.contains(c))
@@ -586,262 +479,250 @@ public abstract class SystemTapLaunchShortcut extends ProfileLaunchShortcut {
c = e;
}
}
-
+
int numberOfFiles = numberOfValidFiles(list.toArray());
if (numberOfFiles == 1) {
for (ICContainer c : list) {
for (ITranslationUnit e : c.getTranslationUnits()) {
- if (e.getElementName().endsWith(".c") || //$NON-NLS-1$
+ if (e.getElementName().endsWith(".c") || //$NON-NLS-1$
e.getElementName().endsWith(".cpp")) { //$NON-NLS-1$
e.accept(v);
- funcs += v.getFunctions();
+ funcs+=v.getFunctions();
}
}
}
} else {
- Object[] unitList = chooseUnit(list, numberOfFiles);
+ Object[] unitList = chooseUnit(list, numberOfFiles);
if (unitList == null || unitList.length == 0) {
return null; //$NON-NLS-1$
- } else if (unitList.length == 1
- && unitList[0].toString().equals(USER_SELECTED_ALL)) {
+ } else if (unitList.length == 1 && unitList[0].toString().equals(USER_SELECTED_ALL)) {
funcs = "*"; //$NON-NLS-1$
- return funcs;
+ return funcs;
}
-
- StringBuilder tmpFunc = new StringBuilder();
- for (String item : getAllFunctions(bin.getCProject(), unitList)) {
- tmpFunc.append(item);
- tmpFunc.append(" "); //$NON-NLS-1$
- }
- funcs = tmpFunc.toString();
-
+
+ StringBuffer tmpFunc = new StringBuffer();
+ for (String item : getAllFunctions(bin.getCProject(), unitList)){
+ tmpFunc.append(item);
+ tmpFunc.append(" "); //$NON-NLS-1$
+ }
+ funcs = tmpFunc.toString();
+
}
-
+
return funcs;
-
+
} catch (CModelException e) {
e.printStackTrace();
} catch (CoreException e) {
e.printStackTrace();
}
-
+
return null;
}
-
+
/**
- * Creates a dialog that prompts the user to select from the given list of
- * ICElements
+ * Creates a dialog that prompts the user to select from the given list
+ * of ICElements
*
- * @param list
- * : list of ICElements
+ * @param list: list of ICElements
* @return
*/
- protected Object[] chooseUnit(List<ICContainer> list, int numberOfValidFiles) {
+ protected Object[] chooseUnit(List<ICContainer> list, int numberOfValidFiles) {
ListTreeContentProvider prov = new ListTreeContentProvider();
-
- RuledTreeSelectionDialog dialog = new RuledTreeSelectionDialog(
- getActiveWorkbenchShell(), new WorkbenchLabelProvider(), prov);
-
- dialog.setTitle(Messages.getString("SystemTapLaunchShortcut.8")); //$NON-NLS-1$
- dialog.setMessage(Messages.getString("SystemTapLaunchShortcut.9")); //$NON-NLS-1$
- dialog.setInput(list);
- dialog.setHelpAvailable(false);
- dialog.setStatusLineAboveButtons(false);
- dialog.setEmptyListMessage(Messages
- .getString("SystemTapLaunchShortcut.10")); //$NON-NLS-1$
- dialog.setContainerMode(true);
-
- Object[] topLevel = prov.findElements(list);
- dialog.setInitialSelections(topLevel);
- dialog.setSize(cap(topLevel.length * 10, 30, 55), cap(
- (int) (topLevel.length * 1.5), 3, 13));
-
- dialog.create();
- OKButton = dialog.getOkButton();
-
- Object[] result = null;
-
- if (testMode) {
- OKButton.setSelection(true);
- result = list.toArray();
+
+ RuledTreeSelectionDialog dialog = new RuledTreeSelectionDialog(getActiveWorkbenchShell(),
+ new WorkbenchLabelProvider(), prov);
+
+ dialog.setTitle(Messages.getString("SystemTapLaunchShortcut.8")); //$NON-NLS-1$
+ dialog.setMessage(Messages.getString("SystemTapLaunchShortcut.9")); //$NON-NLS-1$
+ dialog.setInput(list);
+ dialog.setHelpAvailable(false);
+ dialog.setStatusLineAboveButtons(false);
+ dialog.setEmptyListMessage(Messages.getString("SystemTapLaunchShortcut.10")); //$NON-NLS-1$
+ dialog.setContainerMode(true);
+
+ Object[] topLevel = prov.findElements(list);
+ dialog.setInitialSelections(topLevel);
+ dialog.setSize(cap(topLevel.length*10, 30, 55),
+ cap((int) (topLevel.length*1.5), 3, 13));
+
+ dialog.create();
+ OKButton = dialog.getOkButton();
+
+ Object[] result = null;
+
+
+ if (testMode) {
+ OKButton.setSelection(true);
+ result = list.toArray();
ArrayList<Object> output = new ArrayList<Object>();
try {
for (Object obj : result) {
- if (obj instanceof ICContainer) {
+ if (obj instanceof ICContainer){
ICElement[] array = ((ICContainer) obj).getChildren();
for (ICElement c : array) {
if (!(c.getElementName().endsWith(".c") || //$NON-NLS-1$
- c.getElementName().endsWith(".cpp"))) //$NON-NLS-1$
+ c.getElementName().endsWith(".cpp"))) //$NON-NLS-1$
continue;
if (c.getElementName().contains("main") && !output.contains(c)) //$NON-NLS-1$
output.add(c);
}
}
}
-
- if (output.size() >= numberOfValidFiles) {
+
+ if ( output.size() >= numberOfValidFiles) {
output.clear();
output.add(USER_SELECTED_ALL);
}
} catch (CModelException e) {
e.printStackTrace();
}
-
+
result = output.toArray();
- } else {
- if (dialog.open() == Window.CANCEL)
- return null;
- result = dialog.getResult();
- }
+ }
+ else {
+ if (dialog.open() == Window.CANCEL)
+ return null;
+ result = dialog.getResult();
+ }
if (result == null)
return null;
-
+
ArrayList<Object> output = new ArrayList<Object>();
try {
for (Object obj : result) {
- if (obj instanceof ICContainer) {
+ if (obj instanceof ICContainer){
ICElement[] array = ((ICContainer) obj).getChildren();
for (ICElement c : array) {
if (!(c.getElementName().endsWith(".c") || //$NON-NLS-1$
- c.getElementName().endsWith(".cpp"))) //$NON-NLS-1$
+ c.getElementName().endsWith(".cpp"))) //$NON-NLS-1$
continue;
if (!output.contains(c))
output.add(c);
}
- } else if (obj instanceof ICElement) {
- if (((ICElement) obj).getElementName().endsWith(".c") //$NON-NLS-1$
- || ((ICElement) obj).getElementName().endsWith(
- ".cpp")) { //$NON-NLS-1$
+ }
+ else if (obj instanceof ICElement) {
+ if (((ICElement) obj).getElementName().endsWith(".c") //$NON-NLS-1$
+ || ((ICElement) obj).getElementName().endsWith(".cpp")) { //$NON-NLS-1$
if (!output.contains(obj)) {
output.add(obj);
}
}
}
}
-
- if (output.size() >= numberOfValidFiles) {
+
+ if ( output.size() >= numberOfValidFiles) {
output.clear();
output.add(USER_SELECTED_ALL);
}
} catch (CModelException e) {
e.printStackTrace();
}
-
+
return output.toArray();
}
-
+
+
private int numberOfValidFiles(Object[] list) throws CModelException {
int output = 0;
for (Object parent : list) {
if (parent instanceof ICContainer) {
ICContainer cont = (ICContainer) parent;
- for (ICElement ele : cont.getChildren()) {
+ for (ICElement ele : cont.getChildren()) {
if (ele instanceof ICContainer) {
- output += numberOfValidFiles(((ICContainer) ele)
- .getChildren());
+ output += numberOfValidFiles(((ICContainer) ele).getChildren());
}
if (ele instanceof ICElement) {
if (ele.getElementName().endsWith(".c") || //$NON-NLS-1$
- ele.getElementName().endsWith(".cpp")) //$NON-NLS-1$
+ ele.getElementName().endsWith(".cpp")) //$NON-NLS-1$
output++;
}
}
} else if (parent instanceof ICElement) {
if (((ICElement) parent).getElementName().endsWith(".c") || //$NON-NLS-1$
((ICElement) parent).getElementName().endsWith(".cpp")) //$NON-NLS-1$
- output++;
+ output++;
}
}
return output;
}
+
/**
* Convenience method for creating a new configuration
- *
* @return a new configuration
- * @throws CoreException
+ * @throws CoreException
*/
public ILaunchConfiguration getNewConfiguration() throws CoreException {
ILaunchConfigurationType configType = getLaunchConfigType();
- ILaunchConfigurationWorkingCopy wc = configType.newInstance(null,
- getLaunchManager().generateUniqueLaunchConfigurationNameFrom(
- "TestingConfiguration")); //$NON-NLS-1$
+ ILaunchConfigurationWorkingCopy wc = configType.newInstance(null,
+ getLaunchManager().generateUniqueLaunchConfigurationNameFrom("TestingConfiguration")); //$NON-NLS-1$
return wc.doSave();
-
+
}
-
+
+
/**
- * @param project
- * : C Project Type
- * @return A String list of all functions contained within the specified C
- * Project
+ * @param project : C Project Type
+ * @return A String list of all functions contained within the specified
+ * C Project
*/
- public static ArrayList<String> getAllFunctions(ICProject project,
- Object[] listOfFiles) {
+ public static ArrayList<String> getAllFunctions(ICProject project, Object [] listOfFiles){
try {
- GetFunctionsJob j = new GetFunctionsJob(project
- .getHandleIdentifier(), project, listOfFiles);
+ GetFunctionsJob j = new GetFunctionsJob(project.getHandleIdentifier(), project, listOfFiles);
j.schedule();
j.join();
ArrayList<String> functionList = j.getFunctionList();
-
+
return functionList;
} catch (InterruptedException e) {
e.printStackTrace();
}
return null;
}
-
- /**
- * Returns all ICElements in val that contains the given path. WARNING: Uses
- * .contains, so be careful with the String path or you'll get too many
- * hits.
- *
- * @param list
- * @param path
- * @return
- */
- private static boolean specialContains(Object[] list, String path) {
- for (Object val : list) {
+
+ private static boolean specialContains (Object [] list, String input){
+ for (Object val : list){
if (val instanceof ICElement) {
ICElement el = (ICElement) val;
- if (el.getPath().toString().contains(path)) {
+ if (el.getPath().toString().contains(input)){
return true;
}
}
}
return false;
}
-
- /**
- * Returns a number clipped into the range [low,high].
- *
- * @param number
- * @param low
- * @param high
- * @return number if number is in [low,high], low, or high.
- */
- private int cap(int number, int low, int high) {
+
+
+
+ private int cap (int number, int low, int high) {
if (number > high)
return high;
if (number < low)
return low;
return number;
}
-
+
/**
- * Function for generating scripts. Should be overriden by interested
- * classes
- *
- * @throws IOException
+ * Function for generating scripts. Should be overriden by interested classes
+ * @throws IOException
*/
public String generateScript() throws IOException {
return null;
}
+
+ public void setScriptPath(String val) {
+ this.scriptPath = val;
+ }
+ public void setBinary(IBinary val) {
+ this.bin = val;
+ }
+
+
private static class GetFunctionsJob extends Job {
private ArrayList<String> functionList;
private ICProject project;
@@ -858,94 +739,55 @@ public abstract class SystemTapLaunchShortcut extends ProfileLaunchShortcut {
protected IStatus run(IProgressMonitor monitor) {
IIndexManager manager = CCorePlugin.getIndexManager();
IIndex index = null;
- IProgressMonitor m = monitor;
-
- if (m == null)
- m = new NullProgressMonitor();
- m.worked(1);
-
+
try {
index = manager.getIndex(project);
index.acquireReadLock();
-
+
IIndexFile[] blah = index.getAllFiles();
for (IIndexFile file : blah) {
String fullFilePath = file.getLocation().getFullPath();
- if (fullFilePath == null
- || !specialContains(listOfFiles, fullFilePath)) {
+ if (fullFilePath == null || !specialContains(listOfFiles, fullFilePath)) {
continue;
}
- IIndexName[] indexNamesArray = file.findNames(0,
- Integer.MAX_VALUE);
+ IIndexName[] indexNamesArray = file.findNames(0, Integer.MAX_VALUE);
for (IIndexName name : indexNamesArray) {
- if (name.isDefinition()
- && specialContains(listOfFiles, name.getFile()
- .getLocation().getFullPath())) {
- IIndexBinding binder = index.findBinding(name);
- if (binder instanceof IFunction
- && !functionList.contains(binder.getName())) {
- functionList.add(binder.getName());
- }
+ if (name.isDefinition() && specialContains(listOfFiles, name.getFile().getLocation().getFullPath())) {
+ IIndexBinding binder = index.findBinding(name);
+ if (binder instanceof IFunction && !functionList.contains(binder.getName())) {
+ functionList.add(binder.getName());
+ }
}
}
-
- m.worked(1);
+
}
-
+
} catch (CoreException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
-
+
index.releaseReadLock();
return Status.OK_STATUS;
}
-
+
public ArrayList<String> getFunctionList() {
return functionList;
}
}
-
+
+
public String getScript() {
return generatedScript;
}
-
+
public Button getButton() {
return OKButton;
}
-
+
public void setTestMode(boolean val) {
testMode = val;
}
-
- /**
- * Set the viewID variable. ViewID should point to the ID of an extension
- * extending the org.eclipse.ui.views extension point. This function must
- * return the viewID to be set. Defaults to the SystemTap Text View, if
- * not overridden.
- *
- * @return a valid viewID
- */
- public String setViewID() {
- return PluginConstants.DEFAULT_VIEW_ID;
- }
-
- /**
- * Set the parserID variable. ParserID should point to the ID of an
- * extension extending the org.eclipse.linuxtools.callgraph.core.parser
- * extension point. This function must return the parserID to be set.
- *
- * @return a valid parserID
- */
- public abstract String setParserID();
-
-
-
- /**
- * Each launch class should define its own script path. Must return the
- * correct script path or launch will fail.
- */
- public abstract String setScriptPath();
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapOptionsTab.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapOptionsTab.java
index 8a32d28e16..b6fc8c1f5a 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapOptionsTab.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapOptionsTab.java
@@ -12,7 +12,6 @@
package org.eclipse.linuxtools.callgraph.launch;
import java.io.File;
-import java.util.ArrayList;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
@@ -33,7 +32,6 @@ import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.linuxtools.callgraph.core.LaunchConfigurationConstants;
import org.eclipse.linuxtools.callgraph.core.PluginConstants;
-import org.eclipse.linuxtools.callgraph.core.SystemTapView;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.events.FocusEvent;
@@ -89,14 +87,11 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
protected Text button_D_text;
protected Text binaryArguments;
protected Text parser;
- protected Text viewer;
// protected Text commandFile;
protected Button fileBrowseButton;
protected Button workspaceBrowseButton;
protected Button parserButton;
- protected Button viewerButton;
-
protected Button button_v;
protected Button button_k;
@@ -154,7 +149,7 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
scriptFile.setEnabled(false);
workspaceBrowseButton.setEnabled(false);
fileBrowseButton.setEnabled(false);
- scriptFile.setText(PluginConstants.getPluginLocation()+"parse_function.stp"); //$NON-NLS-1$
+ scriptFile.setText(PluginConstants.PLUGIN_LOCATION+"parse_function.stp"); //$NON-NLS-1$
}else{
scriptFile.setEnabled(true);
workspaceBrowseButton.setEnabled(true);
@@ -312,7 +307,7 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
/*
- * Parser folder -- Tab for selecting a parser and viewer to use
+ * Parser folder -- Tab for selecting a parser to use
*/
parserFolder = new TabFolder(top, SWT.BORDER);
parserFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
@@ -372,7 +367,7 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
browseTop.setLayoutData(browseData);
Label suppFileLabel = new Label(browseTop, SWT.NONE);
- suppFileLabel.setText("Parser"); //$NON-NLS-1$
+ suppFileLabel.setText("Parser");
parser = new Text(browseTop, SWT.BORDER);
parser.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
@@ -398,46 +393,6 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
}
}
});
-
-
- viewer = new Text(browseTop, SWT.BORDER);
- viewer.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- viewer.addModifyListener(modifyListener);
-
- viewerButton = createPushButton(browseTop,
- "Find viewers", null); //$NON-NLS-1$
- viewerButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(),
- new ListLabelProvider());
- dialog.setTitle("Select viewer"); //$NON-NLS-1$
- dialog.setMessage("Select viewer to use."); //$NON-NLS-1$
- IExtensionRegistry reg = Platform.getExtensionRegistry();
- IConfigurationElement[] extensions = reg
- .getConfigurationElementsFor(PluginConstants.VIEW_RESOURCE,
- PluginConstants.VIEW_NAME);
- ArrayList<IConfigurationElement> ext = new ArrayList<IConfigurationElement>();
- for (IConfigurationElement el : extensions) {
- if (!el.getNamespaceIdentifier().contains("org.eclipse.linuxtools")) //$NON-NLS-1$
- continue;
- //TODO: Rough hack to get all the objects. We restrict to id's containing org.eclipse.linuxtools, then see if the class extends SystemTapView
- try {
- if (el.createExecutableExtension(PluginConstants.ATTR_CLASS)
- instanceof SystemTapView) {
- ext.add(el);
- }
- } catch (CoreException e1) {
- }
- }
-
- dialog.setElements(ext.toArray());
- if (dialog.open() == IDialogConstants.OK_ID) {
- String arg = getUsefulLabel(dialog.getFirstResult());
- viewer.setText(arg);
- }
- }
- });
-
}
protected void createGeneratedScriptOption(Composite generatedScriptTop) {
@@ -852,7 +807,6 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
binaryArguments.setText(configuration.getAttribute(LaunchConfigurationConstants.BINARY_ARGUMENTS, LaunchConfigurationConstants.DEFAULT_BINARY_ARGUMENTS));
parser.setText(configuration.getAttribute(LaunchConfigurationConstants.PARSER_CLASS, LaunchConfigurationConstants.DEFAULT_PARSER_CLASS));
- viewer.setText(configuration.getAttribute(LaunchConfigurationConstants.VIEW_CLASS, LaunchConfigurationConstants.DEFAULT_VIEW_CLASS));
if (generatedScript != null){
generatedScript.setText(configuration.getAttribute(LaunchConfigurationConstants.GENERATED_SCRIPT, LaunchConfigurationConstants.DEFAULT_GENERATED_SCRIPT));
@@ -891,8 +845,6 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
configuration.setAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID, button_x_Spinner.getSelection());
configuration.setAttribute(LaunchConfigurationConstants.PARSER_CLASS, parser.getText());
- configuration.setAttribute(LaunchConfigurationConstants.VIEW_CLASS, viewer.getText());
-
configuration.setAttribute(LaunchConfigurationConstants.COMMAND_C_DIRECTIVES, button_D_text.getText());
configuration.setAttribute(LaunchConfigurationConstants.BINARY_PATH, binaryFile.getText());
configuration.setAttribute(LaunchConfigurationConstants.SCRIPT_PATH, scriptFile.getText());
@@ -960,8 +912,6 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
configuration.setAttribute(LaunchConfigurationConstants.GENERATED_SCRIPT, LaunchConfigurationConstants.DEFAULT_GENERATED_SCRIPT);
configuration.setAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE, LaunchConfigurationConstants.DEFAULT_NEED_TO_GENERATE);
configuration.setAttribute(LaunchConfigurationConstants.PARSER_CLASS, LaunchConfigurationConstants.DEFAULT_PARSER_CLASS);
- configuration.setAttribute(LaunchConfigurationConstants.VIEW_CLASS, LaunchConfigurationConstants.DEFAULT_VIEW_CLASS);
-
configuration.setAttribute(LaunchConfigurationConstants.USE_COLOUR, LaunchConfigurationConstants.DEFAULT_USE_COLOUR);
@@ -1012,7 +962,7 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
return e.getUniqueIdentifier();
}
}
- return Messages.getString("SystemTapOptionsTab.1"); //$NON-NLS-1$
+ return "Invalid";
}
@@ -1037,7 +987,7 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
}
}
- return Messages.getString("SystemTapOptionsTab.46"); } //$NON-NLS-1$
+ return "No name -- set name attribute of extension"; }
@Override
public void addListener(ILabelProviderListener listener) {
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/messages.properties b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/messages.properties
index 09f344d777..797ef1fec1 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/messages.properties
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/messages.properties
@@ -8,6 +8,20 @@
# Contributors:
# Red Hat - initial API and implementation
###############################################################################
+LaunchAbout.0=About SystemTap Eclipse plugin
+LaunchAbout.11=Function callgraph: Produces a graph of all function calls. You can also mark functions by
+LaunchAbout.12=\ pressing CTRL+4 while in the editor. (Warning: Marking functions currently annotates your code
+LaunchAbout.13=\ by adding calls to a ___STAP_MARKER___ function.)\n\n
+LaunchAbout.17=Launch Wizard: Helper for launching SystemTap scripts.\n\n
+LaunchAbout.2=-------------SystemTap Eclipse Plugin---------\n
+LaunchAbout.20=Thank you for trying the SystemTap Eclipse plugin - if you have any comments or
+LaunchAbout.21=suggestions, please feel free to direct them to the e-mails above\!
+LaunchAbout.3=/*********************************************\n
+LaunchAbout.4=* Comments and concerns:\n
+LaunchAbout.5=* Charley Wang (chwang@redhat.com)\t\t\n
+LaunchAbout.6=* Roland Grunberg (rgrunber@redhat.com) \n
+LaunchAbout.7=*********************************************/\n\n
+LaunchAbout.8=Available pre-bundled scripts:\n\n
LaunchStapGraph.0=Error generating script
LaunchStapGraph.6=The path to the temporary script could not be opened.
LaunchWizard.0=Welcome to SystemTap Wizard
@@ -21,50 +35,31 @@ LaunchWizard.24=Launch
LaunchWizard.3=If the name already exists, a (1), (2), etc. will be appended to make the name unique.\n
LaunchWizard.4=MyWizardLaunch
LaunchWizard.19=Script:
+RunSystemTapAction.0=System Tap Command Executing...
SystemTapLaunchConfigurationDelegate.0=SystemTapLaunchConfigurationDelegate does not have a command yet
+SystemTapLaunchConfigurationDelegate.8=realtime
+SystemTapLaunchConfigurationDelegate.9=true
SystemTapLaunchConfigurationDelegate.DocWriterName=DocWriter, Delegate
-SystemTapLaunchConfigurationDelegate.EndMessage1=Configuration name:
-SystemTapLaunchConfigurationDelegate.EndMessage2=Binary arguments :
-SystemTapLaunchConfigurationDelegate.EndMessage3=To change this command, check under the Binary
-SystemTapLaunchConfigurationDelegate.EndMessage4=Arguments tab for this configuration in
-SystemTapLaunchConfigurationDelegate.EndMessage5=Profile As --> Profile Configurations.
SystemTapLaunchConfigurationDelegate.InvalidParser1=Invalid parser
SystemTapLaunchConfigurationDelegate.InvalidParser2=invalid parser
SystemTapLaunchConfigurationDelegate.InvalidParser3=The selected parser is not valid. Please select a different parser. \n\n
SystemTapLaunchConfigurationDelegate.InvalidParser4=Invalid id:
-SystemTapLaunchConfigurationDelegate.NullProcessErrorMessage1=SystemTap could not execute. This could be because SystemTap is not installed.
+SystemTapLaunchConfigurationDelegate.NullProcessErrorMessage1=SystemTap could not execute. This could be due to missing
+SystemTapLaunchConfigurationDelegate.NullProcessErrorMessage2=packages that are necessary to the running of SystemTap
SystemTapLaunchConfigurationDelegate.NullProcessErrorName=Error
SystemTapLaunchConfigurationDelegate.NullProcessErrorTitle=SystemTap Error
-SystemTapLaunchConfigurationDelegate.Relaunch1=Relaunch
-SystemTapLaunchConfigurationDelegate.Relaunch10=Configuration name:
-SystemTapLaunchConfigurationDelegate.Relaunch2=Attempting relaunch
-SystemTapLaunchConfigurationDelegate.Relaunch3=Some functions defined in the selected files could \
-not be found in the binary. Attempting relaunch with those files removed. Alternatively, \
-try profiling again with all files selected.
-SystemTapLaunchConfigurationDelegate.Relaunch8=No binary commands specified. To specify commands,
-SystemTapLaunchConfigurationDelegate.Relaunch9=check under the Binary Arguments tab for this
-SystemTapLaunchConfigurationDelegate.stap_command=\ stap command: \n
+SystemTapLaunchConfigurationDelegate.stap_command=\ stap command:
SystemTapLaunchShortcut.0=invalid
SystemTapLaunchShortcut.10=No files found.
SystemTapLaunchShortcut.8=Select files to probe
SystemTapLaunchShortcut.9=For faster probing, select all files.
SystemTapLaunchShortcut.ErrorMessage=Error: Script path not given by :
+SystemTapLaunchShortcut.ErrorMessagename=Error
SystemTapLaunchShortcut.ErrorMessageName=Error
SystemTapLaunchShortcut.ErrorMessageTitle=Script not found
-SystemTapLaunchShortcut.InvalidGeneration1=Generation Error
-SystemTapLaunchShortcut.InvalidGeneration2=Script not generated
-SystemTapLaunchShortcut.InvalidGeneration3=Launch shortcut specifies needToGenerate but does not specify a corresponding generateScript() function.
-SystemTapLaunchShortcut.InvalidParser1=no_parser_specified_error_message
-SystemTapLaunchShortcut.InvalidParser2=No parser specified
-SystemTapLaunchShortcut.InvalidParser3=A null parserID or empty parserID was submitted. Please submit a valid parserID. Parsers should extend the bundled parser extension point.
-SystemTapLaunchShortcut.InvalidView1=no_view_specified_error_message
-SystemTapLaunchShortcut.InvalidView2=No view specified
-SystemTapLaunchShortcut.InvalidView3=A null viewID or empty viewID was submitted. Please submit a valid viewID. Views should extend org.eclipse.ui.views.
-SystemTapLaunchShortcut.NullConfiguration=Configuration is null for
SystemTapLaunchShortcut.StapLaunchFailed=FailedToLaunch
SystemTapLaunchShortcut.StapLaunchFailedMessage=The launch failed. This could be because of :
SystemTapLaunchShortcut.StapLaunchFailedTitle=Launch failed
-SystemTapOptionsTab.1=Invalid
SystemTapOptionsTab.10=Prologue-searching mode. Activate heuristics to work around
SystemTapOptionsTab.11=incorrect debugging information for $target variables.
SystemTapOptionsTab.12=Unoptimized mode. Disable unused code elision during elaboration.
@@ -104,7 +99,6 @@ SystemTapOptionsTab.42=Add the given C preprocessor directive to the module Make
SystemTapOptionsTab.43=These can be used to override limit parameters.
SystemTapOptionsTab.44=Binary Arguments
SystemTapOptionsTab.45=Please input the desired arguments, separated by spaces to be given to your binary.
-SystemTapOptionsTab.46=No name -- set name attribute of extension
SystemTapOptionsTab.5=Keep the temporary directory after all processing. This may be
SystemTapOptionsTab.6=useful in order to examine the generated C code, or to reuse the
SystemTapOptionsTab.7=compiled kernel object.
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests-feature/feature.properties b/systemtap/org.eclipse.linuxtools.callgraph.tests-feature/feature.properties
index 46593b5798..00e7f1d7b5 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests-feature/feature.properties
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests-feature/feature.properties
@@ -8,7 +8,7 @@
# Contributors:
# Red Hat, Inc. - initial API and implementation
#********************************************************************************
-featureName=Callgraph Tests (Incubation)
+featureName=Tests for local SystemTap on Eclipse
description=Tests for local integration of SystemTap on Eclipse
featureProvider=Eclipse
copyright=Copyright 2009 Red Hat, Inc.
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/ChangeLog b/systemtap/org.eclipse.linuxtools.callgraph.tests/ChangeLog
deleted file mode 100644
index b71c708c9e..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/ChangeLog
+++ /dev/null
@@ -1,16 +0,0 @@
-2009-11-16 Roland Grunberg <rgrunber@redhat.com>
-
- * META-INF/MANIFEST.MF: Add Eclipse to Provider field.
-
-2009-11-04 Roland Grunberg <rgrunber@redhat.com>
-
- * build.properties: Add data files to build.properties
- * src/org/eclipse/linuxtools/callgraph/tests/StapGraphParserTest.java: Set the correct location for graph data files.
- * basic.graph: Change all .graph data files format to conform with new parsing strategy
- * catlan.graph:
- * comprehensive.graph:
- * eag.graph:
- * heavy.graph:
- * main.graph:
- * parse_function_nomark.stp: Update stap test script to conform with new data output format
- * StapGraphParserTest.java: Use non-realtime parsing when parsing the data \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.callgraph.tests/META-INF/MANIFEST.MF
index 320c197d1c..ca7ea89e3b 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/META-INF/MANIFEST.MF
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests/META-INF/MANIFEST.MF
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Callgraph Graphing Tests (Incubation)
+Bundle-Name: Tests
Bundle-SymbolicName: org.eclipse.linuxtools.callgraph.tests;singleton:=true
Bundle-Version: 0.0.1.qualifier
Bundle-Activator: org.eclipse.linuxtools.callgraph.tests.Activator
@@ -16,4 +16,3 @@ Import-Package: org.eclipse.cdt.core.model,
org.eclipse.zest.core.widgets,
org.eclipse.zest.layouts,
org.eclipse.zest.layouts.algorithms
-Bundle-Vendor: Eclipse
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/basic.graph b/systemtap/org.eclipse.linuxtools.callgraph.tests/basic.graph
index 6fafeb4f74..f40f0cbc11 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/basic.graph
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests/basic.graph
@@ -1,8 +1,6 @@
+
PROBE_BEGIN
-basic
-<main,,1,,1257346304668588887;
-<foo,,2,,1257346304668603747;
->foo,,1257346304668628537;
->main,,1257346304668634399;
--1257346304668646035
-+57148 \ No newline at end of file
+eag
+<main,,1,,1253642348832787256;<foo,,2,,1253642348832800639;>foo,,1253642348832807674;>main,,1253642348832811601;
+1253642348832817971
+30715 \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/build.properties b/systemtap/org.eclipse.linuxtools.callgraph.tests/build.properties
index 07caf543a7..c6baffa001 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/build.properties
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests/build.properties
@@ -2,10 +2,4 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
- icons/,\
- catlan.graph,\
- comprehensive.graph,\
- eag.graph,\
- heavy.graph,\
- basic.graph,\
- main.graph
+ icons/
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/catlan.graph b/systemtap/org.eclipse.linuxtools.callgraph.tests/catlan.graph
index eaca8f3240..3ab50c2871 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/catlan.graph
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests/catlan.graph
@@ -1,493 +1,6 @@
PROBE_BEGIN
-basic
-<main,,1,,1257346407168350569;
-<catlan,,2,,1257346407168366590;
-<catlan,,3,,1257346407168378951;
-<catlan,,4,,1257346407168389516;
-<catlan,,5,,1257346407168399720;
-<catlan,,6,,1257346407168410102;
-<catlan,,7,,1257346407168420408;
->catlan,,1257346407168427797;
-<catlan,,8,,1257346407168436630;
->catlan,,1257346407168443914;
->catlan,,1257346407168449418;
-<catlan,,9,,1257346407168457820;
->catlan,,1257346407168465113;
-<catlan,,10,,1257346407168473525;
->catlan,,1257346407168480923;
-<catlan,,11,,1257346407168489194;
-<catlan,,12,,1257346407168499530;
->catlan,,1257346407168506697;
-<catlan,,13,,1257346407168515157;
->catlan,,1257346407168522372;
->catlan,,1257346407168527725;
->catlan,,1257346407168532940;
-<catlan,,14,,1257346407168541436;
->catlan,,1257346407168548639;
-<catlan,,15,,1257346407168557057;
-<catlan,,16,,1257346407168567267;
->catlan,,1257346407168574502;
-<catlan,,17,,1257346407168582899;
->catlan,,1257346407168590198;
->catlan,,1257346407168595534;
-<catlan,,18,,1257346407168603804;
-<catlan,,19,,1257346407168614041;
->catlan,,1257346407168621340;
-<catlan,,20,,1257346407168629728;
->catlan,,1257346407168636949;
->catlan,,1257346407168642335;
-<catlan,,21,,1257346407168650861;
->catlan,,1257346407168658130;
-<catlan,,22,,1257346407168666557;
-<catlan,,23,,1257346407168676695;
-<catlan,,24,,1257346407168687014;
->catlan,,1257346407168694189;
-<catlan,,25,,1257346407168702616;
->catlan,,1257346407168709867;
->catlan,,1257346407168715247;
-<catlan,,26,,1257346407168723560;
->catlan,,1257346407168761483;
-<catlan,,27,,1257346407168770845;
->catlan,,1257346407168778234;
-<catlan,,28,,1257346407168786571;
-<catlan,,29,,1257346407168796952;
->catlan,,1257346407168804158;
-<catlan,,30,,1257346407168812576;
->catlan,,1257346407168819830;
->catlan,,1257346407168825222;
->catlan,,1257346407168830416;
->catlan,,1257346407168835679;
-<catlan,,31,,1257346407168844115;
->catlan,,1257346407168851342;
-<catlan,,32,,1257346407168859666;
-<catlan,,33,,1257346407168869874;
-<catlan,,34,,1257346407168880069;
->catlan,,1257346407168887332;
-<catlan,,35,,1257346407168895764;
->catlan,,1257346407168903070;
->catlan,,1257346407168908396;
-<catlan,,36,,1257346407168916816;
->catlan,,1257346407168924052;
-<catlan,,37,,1257346407168932428;
->catlan,,1257346407168939619;
-<catlan,,38,,1257346407168947989;
-<catlan,,39,,1257346407168958241;
->catlan,,1257346407168965540;
-<catlan,,40,,1257346407168973879;
->catlan,,1257346407168981197;
->catlan,,1257346407168986574;
->catlan,,1257346407168991906;
-<catlan,,41,,1257346407169000252;
-<catlan,,42,,1257346407169010555;
->catlan,,1257346407169017725;
-<catlan,,43,,1257346407169026172;
->catlan,,1257346407169033438;
->catlan,,1257346407169038858;
-<catlan,,44,,1257346407169047149;
-<catlan,,45,,1257346407169057516;
->catlan,,1257346407169064704;
-<catlan,,46,,1257346407169073170;
->catlan,,1257346407169080412;
->catlan,,1257346407169085801;
-<catlan,,47,,1257346407169094059;
-<catlan,,48,,1257346407169104342;
-<catlan,,49,,1257346407169114639;
->catlan,,1257346407169121926;
-<catlan,,50,,1257346407169130317;
->catlan,,1257346407169137628;
->catlan,,1257346407169142924;
-<catlan,,51,,1257346407169151273;
->catlan,,1257346407169158433;
-<catlan,,52,,1257346407169166983;
->catlan,,1257346407169174186;
-<catlan,,53,,1257346407169182809;
-<catlan,,54,,1257346407169193028;
->catlan,,1257346407169200303;
-<catlan,,55,,1257346407169208684;
->catlan,,1257346407169215977;
->catlan,,1257346407169221249;
->catlan,,1257346407169226651;
-<catlan,,56,,1257346407169234966;
->catlan,,1257346407169242389;
-<catlan,,57,,1257346407169250776;
-<catlan,,58,,1257346407169261008;
-<catlan,,59,,1257346407169271260;
-<catlan,,60,,1257346407169281440;
->catlan,,1257346407169288580;
-<catlan,,61,,1257346407169296967;
->catlan,,1257346407169304122;
->catlan,,1257346407169309587;
-<catlan,,62,,1257346407169317869;
->catlan,,1257346407169325291;
-<catlan,,63,,1257346407169333685;
->catlan,,1257346407169341005;
-<catlan,,64,,1257346407169349393;
-<catlan,,65,,1257346407169359718;
->catlan,,1257346407169366896;
-<catlan,,66,,1257346407169375317;
->catlan,,1257346407169382553;
->catlan,,1257346407169387960;
->catlan,,1257346407169393169;
-<catlan,,67,,1257346407169401713;
->catlan,,1257346407169408907;
-<catlan,,68,,1257346407169417286;
-<catlan,,69,,1257346407169427526;
->catlan,,1257346407169434669;
-<catlan,,70,,1257346407169443014;
->catlan,,1257346407169450265;
->catlan,,1257346407169455519;
-<catlan,,71,,1257346407169463988;
-<catlan,,72,,1257346407169474153;
->catlan,,1257346407169481422;
-<catlan,,73,,1257346407169489813;
->catlan,,1257346407169497037;
->catlan,,1257346407169502294;
-<catlan,,74,,1257346407169510783;
->catlan,,1257346407169517995;
-<catlan,,75,,1257346407169526380;
-<catlan,,76,,1257346407169536620;
-<catlan,,77,,1257346407169546978;
->catlan,,1257346407169554157;
-<catlan,,78,,1257346407169562614;
->catlan,,1257346407169569822;
->catlan,,1257346407169575203;
-<catlan,,79,,1257346407169583563;
->catlan,,1257346407169590838;
-<catlan,,80,,1257346407169599121;
->catlan,,1257346407169606477;
-<catlan,,81,,1257346407169614820;
-<catlan,,82,,1257346407169625159;
->catlan,,1257346407169632374;
-<catlan,,83,,1257346407169640828;
->catlan,,1257346407169648040;
->catlan,,1257346407169653501;
->catlan,,1257346407169658710;
->catlan,,1257346407169664072;
->catlan,,1257346407169669272;
-<catlan,,84,,1257346407169677575;
->catlan,,1257346407169684845;
-<catlan,,85,,1257346407169693338;
-<catlan,,86,,1257346407169703473;
-<catlan,,87,,1257346407169713716;
-<catlan,,88,,1257346407169723896;
->catlan,,1257346407169735847;
-<catlan,,89,,1257346407169744476;
->catlan,,1257346407169751850;
->catlan,,1257346407169757227;
-<catlan,,90,,1257346407169765672;
->catlan,,1257346407169772896;
-<catlan,,91,,1257346407169781458;
->catlan,,1257346407169788661;
-<catlan,,92,,1257346407169797118;
-<catlan,,93,,1257346407169807382;
->catlan,,1257346407169814630;
-<catlan,,94,,1257346407169823039;
->catlan,,1257346407169830392;
->catlan,,1257346407169835721;
->catlan,,1257346407169841056;
-<catlan,,95,,1257346407169849297;
->catlan,,1257346407169856605;
-<catlan,,96,,1257346407169864980;
-<catlan,,97,,1257346407169875290;
->catlan,,1257346407169882505;
-<catlan,,98,,1257346407169890956;
->catlan,,1257346407169898216;
->catlan,,1257346407169903602;
-<catlan,,99,,1257346407169911965;
-<catlan,,100,,1257346407169922248;
->catlan,,1257346407169929526;
-<catlan,,101,,1257346407169938055;
->catlan,,1257346407169945324;
->catlan,,1257346407169950713;
-<catlan,,102,,1257346407169959089;
->catlan,,1257346407169966388;
-<catlan,,103,,1257346407169974751;
-<catlan,,104,,1257346407169985004;
-<catlan,,105,,1257346407169995166;
->catlan,,1257346407170002414;
-<catlan,,106,,1257346407170010814;
->catlan,,1257346407170018052;
->catlan,,1257346407170023412;
-<catlan,,107,,1257346407170031778;
->catlan,,1257346407170039011;
-<catlan,,108,,1257346407170047537;
->catlan,,1257346407170054749;
-<catlan,,109,,1257346407170063227;
-<catlan,,110,,1257346407170073428;
->catlan,,1257346407170080658;
-<catlan,,111,,1257346407170089067;
->catlan,,1257346407170096378;
->catlan,,1257346407170101683;
->catlan,,1257346407170106976;
->catlan,,1257346407170112221;
-<catlan,,112,,1257346407170120675;
-<catlan,,113,,1257346407170130858;
->catlan,,1257346407170138133;
-<catlan,,114,,1257346407170146488;
->catlan,,1257346407170153775;
->catlan,,1257346407170159038;
-<catlan,,115,,1257346407170167531;
-<catlan,,116,,1257346407170177819;
-<catlan,,117,,1257346407170188177;
->catlan,,1257346407170195461;
-<catlan,,118,,1257346407170203806;
->catlan,,1257346407170211132;
->catlan,,1257346407170216519;
-<catlan,,119,,1257346407170224987;
->catlan,,1257346407170232187;
-<catlan,,120,,1257346407170240683;
->catlan,,1257346407170247934;
-<catlan,,121,,1257346407170256379;
-<catlan,,122,,1257346407170266674;
->catlan,,1257346407170273954;
-<catlan,,123,,1257346407170282345;
->catlan,,1257346407170289723;
->catlan,,1257346407170295052;
->catlan,,1257346407170300384;
-<catlan,,124,,1257346407170308714;
-<catlan,,125,,1257346407170318985;
-<catlan,,126,,1257346407170329249;
->catlan,,1257346407170336593;
-<catlan,,127,,1257346407170344969;
->catlan,,1257346407170352307;
->catlan,,1257346407170357636;
-<catlan,,128,,1257346407170365949;
->catlan,,1257346407170373224;
-<catlan,,129,,1257346407170381554;
->catlan,,1257346407170388784;
-<catlan,,130,,1257346407170397439;
-<catlan,,131,,1257346407170407719;
->catlan,,1257346407170415012;
-<catlan,,132,,1257346407170423373;
->catlan,,1257346407170430578;
->catlan,,1257346407170435956;
->catlan,,1257346407170441165;
-<catlan,,133,,1257346407170449531;
-<catlan,,134,,1257346407170459781;
->catlan,,1257346407170466986;
-<catlan,,135,,1257346407170475419;
->catlan,,1257346407170482667;
->catlan,,1257346407170488143;
-<catlan,,136,,1257346407170496408;
-<catlan,,137,,1257346407170506802;
-<catlan,,138,,1257346407170517027;
-<catlan,,139,,1257346407170527348;
->catlan,,1257346407170534497;
-<catlan,,140,,1257346407170542987;
->catlan,,1257346407170550166;
->catlan,,1257346407170555603;
-<catlan,,141,,1257346407170563994;
->catlan,,1257346407170571239;
-<catlan,,142,,1257346407170579536;
->catlan,,1257346407170586947;
-<catlan,,143,,1257346407170595313;
-<catlan,,144,,1257346407170605632;
->catlan,,1257346407170612937;
-<catlan,,145,,1257346407170621364;
->catlan,,1257346407170628666;
->catlan,,1257346407170634037;
->catlan,,1257346407170639234;
-<catlan,,146,,1257346407170647706;
->catlan,,1257346407170654923;
-<catlan,,147,,1257346407170663468;
-<catlan,,148,,1257346407170673741;
->catlan,,1257346407170681058;
-<catlan,,149,,1257346407170689503;
->catlan,,1257346407170696757;
->catlan,,1257346407170702149;
-<catlan,,150,,1257346407170710477;
-<catlan,,151,,1257346407170720738;
->catlan,,1257346407170733007;
-<catlan,,152,,1257346407170742318;
->catlan,,1257346407170749581;
->catlan,,1257346407170754949;
-<catlan,,153,,1257346407170763295;
->catlan,,1257346407170770696;
-<catlan,,154,,1257346407170779096;
-<catlan,,155,,1257346407170789358;
-<catlan,,156,,1257346407170799501;
->catlan,,1257346407170806759;
-<catlan,,157,,1257346407170815098;
->catlan,,1257346407170822415;
->catlan,,1257346407170827786;
-<catlan,,158,,1257346407170836261;
->catlan,,1257346407170843497;
-<catlan,,159,,1257346407170851999;
->catlan,,1257346407170859202;
-<catlan,,160,,1257346407170867587;
-<catlan,,161,,1257346407170877788;
->catlan,,1257346407170885135;
-<catlan,,162,,1257346407170893505;
->catlan,,1257346407170900789;
->catlan,,1257346407170906163;
->catlan,,1257346407170911492;
->catlan,,1257346407170916755;
-<catlan,,163,,1257346407170925197;
->catlan,,1257346407170932373;
-<catlan,,164,,1257346407170940878;
-<catlan,,165,,1257346407170951109;
-<catlan,,166,,1257346407170961455;
-<catlan,,167,,1257346407170971725;
-<catlan,,168,,1257346407170981938;
->catlan,,1257346407170989204;
-<catlan,,169,,1257346407170997655;
->catlan,,1257346407171004882;
->catlan,,1257346407171010343;
-<catlan,,170,,1257346407171018692;
->catlan,,1257346407171026003;
-<catlan,,171,,1257346407171034397;
->catlan,,1257346407171041633;
-<catlan,,172,,1257346407171050029;
-<catlan,,173,,1257346407171060414;
->catlan,,1257346407171067590;
-<catlan,,174,,1257346407171076071;
->catlan,,1257346407171083382;
->catlan,,1257346407171088645;
->catlan,,1257346407171093832;
-<catlan,,175,,1257346407171102317;
->catlan,,1257346407171109543;
-<catlan,,176,,1257346407171117931;
-<catlan,,177,,1257346407171128183;
->catlan,,1257346407171135416;
-<catlan,,178,,1257346407171143804;
->catlan,,1257346407171151043;
->catlan,,1257346407171156390;
-<catlan,,179,,1257346407171164745;
-<catlan,,180,,1257346407171175066;
->catlan,,1257346407171182314;
-<catlan,,181,,1257346407171190801;
->catlan,,1257346407171198073;
->catlan,,1257346407171203435;
-<catlan,,182,,1257346407171211754;
->catlan,,1257346407171219053;
-<catlan,,183,,1257346407171227335;
-<catlan,,184,,1257346407171237693;
-<catlan,,185,,1257346407171247918;
->catlan,,1257346407171255229;
-<catlan,,186,,1257346407171263695;
->catlan,,1257346407171271039;
->catlan,,1257346407171276302;
-<catlan,,187,,1257346407171284654;
->catlan,,1257346407171291917;
-<catlan,,188,,1257346407171300296;
->catlan,,1257346407171307468;
-<catlan,,189,,1257346407171315910;
-<catlan,,190,,1257346407171326141;
->catlan,,1257346407171333492;
-<catlan,,191,,1257346407171341867;
->catlan,,1257346407171349154;
->catlan,,1257346407171354474;
->catlan,,1257346407171359716;
->catlan,,1257346407171364880;
-<catlan,,192,,1257346407171373208;
->catlan,,1257346407171380444;
-<catlan,,193,,1257346407171389033;
-<catlan,,194,,1257346407171399270;
-<catlan,,195,,1257346407171409540;
->catlan,,1257346407171416785;
-<catlan,,196,,1257346407171425239;
->catlan,,1257346407171432403;
->catlan,,1257346407171437861;
-<catlan,,197,,1257346407171446159;
->catlan,,1257346407171453497;
-<catlan,,198,,1257346407171461906;
->catlan,,1257346407171469175;
-<catlan,,199,,1257346407171477580;
-<catlan,,200,,1257346407171487896;
->catlan,,1257346407171495129;
-<catlan,,201,,1257346407171503544;
->catlan,,1257346407171510776;
->catlan,,1257346407171516217;
->catlan,,1257346407171521456;
-<catlan,,202,,1257346407171529873;
-<catlan,,203,,1257346407171540096;
->catlan,,1257346407171547323;
-<catlan,,204,,1257346407171555659;
->catlan,,1257346407171562994;
->catlan,,1257346407171568263;
-<catlan,,205,,1257346407171576771;
-<catlan,,206,,1257346407171586958;
->catlan,,1257346407171594287;
-<catlan,,207,,1257346407171602695;
->catlan,,1257346407171610001;
->catlan,,1257346407171615294;
-<catlan,,208,,1257346407171623639;
-<catlan,,209,,1257346407171633849;
-<catlan,,210,,1257346407171644213;
->catlan,,1257346407171651524;
-<catlan,,211,,1257346407171659798;
->catlan,,1257346407171667151;
->catlan,,1257346407171672453;
-<catlan,,212,,1257346407171680750;
->catlan,,1257346407171688055;
-<catlan,,213,,1257346407171696449;
->catlan,,1257346407171703616;
-<catlan,,214,,1257346407171712148;
-<catlan,,215,,1257346407171722448;
->catlan,,1257346407171733953;
-<catlan,,216,,1257346407171742701;
->catlan,,1257346407171750082;
->catlan,,1257346407171755383;
->catlan,,1257346407171760626;
-<catlan,,217,,1257346407171768980;
->catlan,,1257346407171776276;
-<catlan,,218,,1257346407171784589;
-<catlan,,219,,1257346407171795013;
-<catlan,,220,,1257346407171805238;
-<catlan,,221,,1257346407171815475;
->catlan,,1257346407171822660;
-<catlan,,222,,1257346407171831126;
->catlan,,1257346407171838395;
->catlan,,1257346407171843757;
-<catlan,,223,,1257346407171852075;
->catlan,,1257346407171859416;
-<catlan,,224,,1257346407171867771;
->catlan,,1257346407171875070;
-<catlan,,225,,1257346407171883368;
-<catlan,,226,,1257346407171893761;
->catlan,,1257346407171900931;
-<catlan,,227,,1257346407171909310;
->catlan,,1257346407171916573;
->catlan,,1257346407171921935;
->catlan,,1257346407171927141;
-<catlan,,228,,1257346407171935468;
->catlan,,1257346407171942734;
-<catlan,,229,,1257346407171951200;
-<catlan,,230,,1257346407171961483;
->catlan,,1257346407171968694;
-<catlan,,231,,1257346407171977067;
->catlan,,1257346407171984249;
->catlan,,1257346407171989494;
-<catlan,,232,,1257346407171997902;
-<catlan,,233,,1257346407172008107;
->catlan,,1257346407172015466;
-<catlan,,234,,1257346407172023824;
->catlan,,1257346407172031141;
->catlan,,1257346407172036428;
-<catlan,,235,,1257346407172044803;
->catlan,,1257346407172052078;
-<catlan,,236,,1257346407172060571;
-<catlan,,237,,1257346407172070785;
-<catlan,,238,,1257346407172081004;
->catlan,,1257346407172088312;
-<catlan,,239,,1257346407172096709;
->catlan,,1257346407172103924;
->catlan,,1257346407172109174;
-<catlan,,240,,1257346407172117556;
->catlan,,1257346407172124864;
-<catlan,,241,,1257346407172133168;
->catlan,,1257346407172140412;
-<catlan,,242,,1257346407172148692;
-<catlan,,243,,1257346407172159098;
->catlan,,1257346407172166358;
-<catlan,,244,,1257346407172174712;
->catlan,,1257346407172182035;
->catlan,,1257346407172187277;
->catlan,,1257346407172192564;
->catlan,,1257346407172197788;
->catlan,,1257346407172202937;
->catlan,,1257346407172208197;
->main,,1257346407172253125;
--1257346407172259825
-+3909256 \ No newline at end of file
+eag
+<main,,1,,1253642412717911933;<catlan,,2,,1253642412717925326;<catlan,,3,,1253642412717935566;<catlan,,4,,1253642412717944129;<catlan,,5,,1253642412717952833;<catlan,,6,,1253642412717961350;<catlan,,7,,1253642412717969909;>catlan,,1253642412717975575;<catlan,,8,,1253642412717982613;>catlan,,1253642412717988032;>catlan,,1253642412717991647;<catlan,,9,,1253642412717998252;>catlan,,1253642412718003749;<catlan,,10,,1253642412718010330;>catlan,,1253642412718015806;<catlan,,11,,1253642412718022399;<catlan,,12,,1253642412718030940;>catlan,,1253642412718036387;<catlan,,13,,1253642412718042961;>catlan,,1253642412718048489;>catlan,,1253642412718051966;>catlan,,1253642412718055421;<catlan,,14,,1253642412718061905;>catlan,,1253642412718067343;<catlan,,15,,1253642412718073881;<catlan,,16,,1253642412718082492;>catlan,,1253642412718087950;<catlan,,17,,1253642412718094603;>catlan,,1253642412718109066;>catlan,,1253642412718113093;<catlan,,18,,1253642412718119950;<catlan,,19,,1253642412718128522;>catlan,,1253642412718133938;<catlan,,20,,1253642412718140537;>catlan,,1253642412718145992;>catlan,,1253642412718149511;<catlan,,21,,1253642412718156100;>catlan,,1253642412718161475;<catlan,,22,,1253642412718168106;<catlan,,23,,1253642412718176633;<catlan,,24,,1253642412718185165;>catlan,,1253642412718190648;<catlan,,25,,1253642412718197291;>catlan,,1253642412718202828;>catlan,,1253642412718206326;<catlan,,26,,1253642412718212993;>catlan,,1253642412718218350;<catlan,,27,,1253642412718224942;>catlan,,1253642412718230292;<catlan,,28,,1253642412718236849;<catlan,,29,,1253642412718245432;>catlan,,1253642412718250903;<catlan,,30,,1253642412718257537;>catlan,,1253642412718262975;>catlan,,1253642412718266930;>catlan,,1253642412718287059;>catlan,,1253642412718290848;<catlan,,31,,1253642412718298051;>catlan,,1253642412718303690;<catlan,,32,,1253642412718310301;<catlan,,33,,1253642412718318860;<catlan,,34,,1253642412718327347;>catlan,,1253642412718332905;<catlan,,35,,1253642412718339525;>catlan,,1253642412718345019;>catlan,,1253642412718348511;<catlan,,36,,1253642412718355149;>catlan,,1253642412718360592;<catlan,,37,,1253642412718367227;>catlan,,1253642412718372682;<catlan,,38,,1253642412718379287;<catlan,,39,,1253642412718387804;>catlan,,1253642412718393293;<catlan,,40,,1253642412718399904;>catlan,,1253642412718405458;>catlan,,1253642412718408944;>catlan,,1253642412718412469;<catlan,,41,,1253642412718419058;<catlan,,42,,1253642412718427597;>catlan,,1253642412718433109;<catlan,,43,,1253642412718439666;>catlan,,1253642412718445127;>catlan,,1253642412718448679;<catlan,,44,,1253642412718455389;<catlan,,45,,1253642412718463888;>catlan,,1253642412718469419;<catlan,,46,,1253642412718475981;>catlan,,1253642412718481416;>catlan,,1253642412718484974;<catlan,,47,,1253642412718491578;<catlan,,48,,1253642412718500098;<catlan,,49,,1253642412718508607;>catlan,,1253642412718514038;<catlan,,50,,1253642412718520679;>catlan,,1253642412718526134;>catlan,,1253642412718529647;<catlan,,51,,1253642412718536221;>catlan,,1253642412718541734;<catlan,,52,,1253642412718548381;>catlan,,1253642412718553824;<catlan,,53,,1253642412718560435;<catlan,,54,,1253642412718568940;>catlan,,1253642412718574314;<catlan,,55,,1253642412718581036;>catlan,,1253642412718586507;>catlan,,1253642412718590044;>catlan,,1253642412718593511;<catlan,,56,,1253642412718600083;>catlan,,1253642412718605544;<catlan,,57,,1253642412718612194;<catlan,,58,,1253642412718620750;<catlan,,59,,1253642412718629316;<catlan,,60,,1253642412718637809;>catlan,,1253642412718643345;<catlan,,61,,1253642412718649980;>catlan,,1253642412718655511;>catlan,,1253642412718659003;<catlan,,62,,1253642412718665508;>catlan,,1253642412718671069;<catlan,,63,,1253642412718677589;>catlan,,1253642412718683126;<catlan,,64,,1253642412718689784;<catlan,,65,,1253642412718698362;>catlan,,1253642412718703832;<catlan,,66,,1253642412718710404;>catlan,,1253642412718715817;>catlan,,1253642412718719339;>catlan,,1253642412718722741;<catlan,,67,,1253642412718729369;>catlan,,1253642412718734816;<catlan,,68,,1253642412718741456;<catlan,,69,,1253642412718749967;>catlan,,1253642412718755555;<catlan,,70,,1253642412718762175;>catlan,,1253642412718767826;>catlan,,1253642412718771330;<catlan,,71,,1253642412718777868;<catlan,,72,,1253642412718786352;>catlan,,1253642412718791793;<catlan,,73,,1253642412718798445;>catlan,,1253642412718803892;>catlan,,1253642412718807330;<catlan,,74,,1253642412718813943;>catlan,,1253642412718819501;<catlan,,75,,1253642412718826063;<catlan,,76,,1253642412718834653;<catlan,,77,,1253642412718843149;>catlan,,1253642412718848559;<catlan,,78,,1253642412718855095;>catlan,,1253642412718860592;>catlan,,1253642412718864042;<catlan,,79,,1253642412718870682;>catlan,,1253642412718876063;<catlan,,80,,1253642412718882646;>catlan,,1253642412718888051;<catlan,,81,,1253642412718894634;<catlan,,82,,1253642412718903176;>catlan,,1253642412718908574;<catlan,,83,,1253642412718915167;>catlan,,1253642412718920601;>catlan,,1253642412718924045;>catlan,,1253642412718927600;>catlan,,1253642412718931022;>catlan,,1253642412718934475;<catlan,,84,,1253642412718941040;>catlan,,1253642412718946556;<catlan,,85,,1253642412718953079;<catlan,,86,,1253642412718961683;<catlan,,87,,1253642412718970074;<catlan,,88,,1253642412718978589;>catlan,,1253642412718984071;<catlan,,89,,1253642412718990739;>catlan,,1253642412718996153;>catlan,,1253642412718999602;<catlan,,90,,1253642412719006149;>catlan,,1253642412719011719;<catlan,,91,,1253642412719018390;>catlan,,1253642412719023836;<catlan,,92,,1253642412719030405;<catlan,,93,,1253642412719038922;>catlan,,1253642412719044378;<catlan,,94,,1253642412719051000;>catlan,,1253642412719056612;>catlan,,1253642412719060071;>catlan,,1253642412719063551;<catlan,,95,,1253642412719070140;>catlan,,1253642412719075650;<catlan,,96,,1253642412719082305;<catlan,,97,,1253642412719090669;>catlan,,1253642412719096167;<catlan,,98,,1253642412719107443;>catlan,,1253642412719113365;>catlan,,1253642412719116976;<catlan,,99,,1253642412719123605;<catlan,,100,,1253642412719132212;>catlan,,1253642412719137674;<catlan,,101,,1253642412719144456;>catlan,,1253642412719149966;>catlan,,1253642412719153545;<catlan,,102,,1253642412719160068;>catlan,,1253642412719165545;<catlan,,103,,1253642412719172152;<catlan,,104,,1253642412719180660;<catlan,,105,,1253642412719189196;>catlan,,1253642412719194603;<catlan,,106,,1253642412719201174;>catlan,,1253642412719206642;>catlan,,1253642412719210077;<catlan,,107,,1253642412719216624;>catlan,,1253642412719222070;<catlan,,108,,1253642412719229998;>catlan,,1253642412719235622;<catlan,,109,,1253642412719242230;<catlan,,110,,1253642412719250876;>catlan,,1253642412719256374;<catlan,,111,,1253642412719262918;>catlan,,1253642412719268314;>catlan,,1253642412719271754;>catlan,,1253642412719275171;>catlan,,1253642412719278587;<catlan,,112,,1253642412719285129;<catlan,,113,,1253642412719293787;>catlan,,1253642412719299219;<catlan,,114,,1253642412719305700;>catlan,,1253642412719311068;>catlan,,1253642412719314599;<catlan,,115,,1253642412719321141;<catlan,,116,,1253642412719329844;<catlan,,117,,1253642412719338338;>catlan,,1253642412719343826;<catlan,,118,,1253642412719350398;>catlan,,1253642412719355976;>catlan,,1253642412719359426;<catlan,,119,,1253642412719366003;>catlan,,1253642412719371453;<catlan,,120,,1253642412719378064;>catlan,,1253642412719383444;<catlan,,121,,1253642412719390051;<catlan,,122,,1253642412719398593;>catlan,,1253642412719404078;<catlan,,123,,1253642412719410662;>catlan,,1253642412719416193;>catlan,,1253642412719419633;>catlan,,1253642412719423116;<catlan,,124,,1253642412719429750;<catlan,,125,,1253642412719438361;<catlan,,126,,1253642412719446791;>catlan,,1253642412719452222;<catlan,,127,,1253642412719458749;>catlan,,1253642412719464202;>catlan,,1253642412719467690;<catlan,,128,,1253642412719474195;>catlan,,1253642412719479693;<catlan,,129,,1253642412719486283;>catlan,,1253642412719491693;<catlan,,130,,1253642412719498313;<catlan,,131,,1253642412719506860;>catlan,,1253642412719512348;<catlan,,132,,1253642412719518941;>catlan,,1253642412719524454;>catlan,,1253642412719527882;>catlan,,1253642412719531371;<catlan,,133,,1253642412719537876;<catlan,,134,,1253642412719546556;>catlan,,1253642412719552035;<catlan,,135,,1253642412719558736;>catlan,,1253642412719564180;>catlan,,1253642412719567692;<catlan,,136,,1253642412719574174;<catlan,,137,,1253642412719582793;<catlan,,138,,1253642412719591307;<catlan,,139,,1253642412719599792;>catlan,,1253642412719605226;<catlan,,140,,1253642412719611912;>catlan,,1253642412719617394;>catlan,,1253642412719620943;<catlan,,141,,1253642412719627500;>catlan,,1253642412719633045;<catlan,,142,,1253642412719639668;>catlan,,1253642412719645151;<catlan,,143,,1253642412719651764;<catlan,,144,,1253642412719660303;>catlan,,1253642412719665713;<catlan,,145,,1253642412719672290;>catlan,,1253642412719677752;>catlan,,1253642412719681223;>catlan,,1253642412719684651;<catlan,,146,,1253642412719691172;>catlan,,1253642412719696678;<catlan,,147,,1253642412719703400;<catlan,,148,,1253642412719712074;>catlan,,1253642412719717568;<catlan,,149,,1253642412719724134;>catlan,,1253642412719729550;>catlan,,1253642412719733069;<catlan,,150,,1253642412719739565;<catlan,,151,,1253642412719748290;>catlan,,1253642412719753704;<catlan,,152,,1253642412719760311;>catlan,,1253642412719765746;>catlan,,1253642412719769267;<catlan,,153,,1253642412719775791;>catlan,,1253642412719781361;<catlan,,154,,1253642412719787950;<catlan,,155,,1253642412719796633;<catlan,,156,,1253642412719805177;>catlan,,1253642412719810705;<catlan,,157,,1253642412719817372;>catlan,,1253642412719822915;>catlan,,1253642412719826431;<catlan,,158,,1253642412719833122;>catlan,,1253642412719838653;<catlan,,159,,1253642412719845348;>catlan,,1253642412719850879;<catlan,,160,,1253642412719857516;<catlan,,161,,1253642412719866058;>catlan,,1253642412719871574;<catlan,,162,,1253642412719878172;>catlan,,1253642412719883748;>catlan,,1253642412719887237;>catlan,,1253642412719890716;>catlan,,1253642412719894175;<catlan,,163,,1253642412719900906;>catlan,,1253642412719906427;<catlan,,164,,1253642412719913125;<catlan,,165,,1253642412719921672;<catlan,,166,,1253642412719930253;<catlan,,167,,1253642412719938704;<catlan,,168,,1253642412719947236;>catlan,,1253642412719952683;<catlan,,169,,1253642412719959326;>catlan,,1253642412719964749;>catlan,,1253642412719968237;<catlan,,170,,1253642412719974830;>catlan,,1253642412719980445;<catlan,,171,,1253642412719987034;>catlan,,1253642412719992499;<catlan,,172,,1253642412719999070;<catlan,,173,,1253642412720007633;>catlan,,1253642412720013070;<catlan,,174,,1253642412720019756;>catlan,,1253642412720025248;>catlan,,1253642412720028691;>catlan,,1253642412720032105;<catlan,,175,,1253642412720038793;>catlan,,1253642412720044234;<catlan,,176,,1253642412720050790;<catlan,,177,,1253642412720059287;>catlan,,1253642412720064884;<catlan,,178,,1253642412720071476;>catlan,,1253642412720076956;>catlan,,1253642412720080390;<catlan,,179,,1253642412720086889;<catlan,,180,,1253642412720095304;>catlan,,1253642412720100745;<catlan,,181,,1253642412720124363;>catlan,,1253642412720129875;>catlan,,1253642412720133316;<catlan,,182,,1253642412720139818;>catlan,,1253642412720145238;<catlan,,183,,1253642412720151752;<catlan,,184,,1253642412720160314;<catlan,,185,,1253642412720168798;>catlan,,1253642412720174350;<catlan,,186,,1253642412720180862;>catlan,,1253642412720186416;>catlan,,1253642412720189926;<catlan,,187,,1253642412720196609;>catlan,,1253642412720201995;<catlan,,188,,1253642412720208479;>catlan,,1253642412720213872;<catlan,,189,,1253642412720220431;<catlan,,190,,1253642412720230055;>catlan,,1253642412720235697;<catlan,,191,,1253642412720242365;>catlan,,1253642412720247842;>catlan,,1253642412720251324;>catlan,,1253642412720254885;>catlan,,1253642412720258317;<catlan,,192,,1253642412720265014;>catlan,,1253642412720270539;<catlan,,193,,1253642412720277123;<catlan,,194,,1253642412720285634;<catlan,,195,,1253642412720294148;>catlan,,1253642412720299534;<catlan,,196,,1253642412720306268;>catlan,,1253642412720311679;>catlan,,1253642412720315213;<catlan,,197,,1253642412720321742;>catlan,,1253642412720327291;<catlan,,198,,1253642412720333793;>catlan,,1253642412720339261;<catlan,,199,,1253642412720345799;<catlan,,200,,1253642412720354433;>catlan,,1253642412720359916;<catlan,,201,,1253642412720366479;>catlan,,1253642412720371886;>catlan,,1253642412720375387;>catlan,,1253642412720378788;<catlan,,202,,1253642412720385305;<catlan,,203,,1253642412720393892;>catlan,,1253642412720399438;<catlan,,204,,1253642412720406012;>catlan,,1253642412720411597;>catlan,,1253642412720415077;<catlan,,205,,1253642412720421657;<catlan,,206,,1253642412720430147;>catlan,,1253642412720435666;<catlan,,207,,1253642412720442204;>catlan,,1253642412720447687;>catlan,,1253642412720451137;<catlan,,208,,1253642412720457687;<catlan,,209,,1253642412720466279;<catlan,,210,,1253642412720474791;>catlan,,1253642412720480291;<catlan,,211,,1253642412720486875;>catlan,,1253642412720492348;>catlan,,1253642412720495798;<catlan,,212,,1253642412720502345;>catlan,,1253642412720507768;<catlan,,213,,1253642412720514436;>catlan,,1253642412720519966;<catlan,,214,,1253642412720526622;<catlan,,215,,1253642412720535175;>catlan,,1253642412720540571;<catlan,,216,,1253642412720547166;>catlan,,1253642412720552700;>catlan,,1253642412720556126;>catlan,,1253642412720559677;<catlan,,217,,1253642412720566231;>catlan,,1253642412720571797;<catlan,,218,,1253642412720578435;<catlan,,219,,1253642412720586901;<catlan,,220,,1253642412720595391;<catlan,,221,,1253642412720603903;>catlan,,1253642412720609352;<catlan,,222,,1253642412720615936;>catlan,,1253642412720621331;>catlan,,1253642412720624835;<catlan,,223,,1253642412720631397;>catlan,,1253642412720636802;<catlan,,224,,1253642412720643358;>catlan,,1253642412720648847;<catlan,,225,,1253642412720655358;<catlan,,226,,1253642412720663923;>catlan,,1253642412720669304;<catlan,,227,,1253642412720675980;>catlan,,1253642412720681457;>catlan,,1253642412720684982;>catlan,,1253642412720688452;<catlan,,228,,1253642412720695093;>catlan,,1253642412720700588;<catlan,,229,,1253642412720707267;<catlan,,230,,1253642412720715830;>catlan,,1253642412720721246;<catlan,,231,,1253642412720727845;>catlan,,1253642412720733418;>catlan,,1253642412720736861;<catlan,,232,,1253642412720743439;<catlan,,233,,1253642412720751929;>catlan,,1253642412720757390;<catlan,,234,,1253642412720763989;>catlan,,1253642412720769468;>catlan,,1253642412720772978;<catlan,,235,,1253642412720779592;>catlan,,1253642412720785083;<catlan,,236,,1253642412720791742;<catlan,,237,,1253642412720800196;<catlan,,238,,1253642412720808659;>catlan,,1253642412720814094;<catlan,,239,,1253642412720820644;>catlan,,1253642412720826124;>catlan,,1253642412720829739;<catlan,,240,,1253642412720836316;>catlan,,1253642412720841919;<catlan,,241,,1253642412720848530;>catlan,,1253642412720854006;<catlan,,242,,1253642412720860590;<catlan,,243,,1253642412720869197;>catlan,,1253642412720874593;<catlan,,244,,1253642412720881260;>catlan,,1253642412720886740;>catlan,,1253642412720890229;>catlan,,1253642412720893621;>catlan,,1253642412720896996;>catlan,,1253642412720900511;>catlan,,1253642412720903898;>main,,1253642412722440674;
+1253642412722448040
+4536107 \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/comprehensive.graph b/systemtap/org.eclipse.linuxtools.callgraph.tests/comprehensive.graph
deleted file mode 100644
index 9c500cad8c..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/comprehensive.graph
+++ /dev/null
@@ -1,189 +0,0 @@
-
-PROBE_BEGIN
-basic
-<main,,1,,1257346436048807166;
-<callThisOnce,,2,,1257346436048822155;
->callThisOnce,,1257346436048831547;
-<callThisTwice,,3,,1257346436048841881;
->callThisTwice,,1257346436048850864;
-<callThisTwice,,4,,1257346436048859703;
->callThisTwice,,1257346436048867329;
-<hasOneChild,,5,,1257346436048877389;
-<callThisOnce,,6,,1257346436077825326;
->callThisOnce,,1257346436077833407;
->hasOneChild,,1257346436077839238;
-<hasTwoDifferentChildren,,7,,1257346436077849593;
-<hasOneChild,,8,,1257346436107900181;
-<callThisOnce,,9,,1257346436136866529;
->callThisOnce,,1257346436136874941;
->hasOneChild,,1257346436136880817;
-<callThisOnce,,10,,1257346436136889608;
->callThisOnce,,1257346436136897292;
->hasTwoDifferentChildren,,1257346436136903370;
-<chainOfFifty,,11,,1257346440135212743;
-<chainOfFifty,,12,,1257346440135227034;
-<chainOfFifty,,13,,1257346440135237770;
-<chainOfFifty,,14,,1257346440135248393;
-<chainOfFifty,,15,,1257346440135258946;
-<chainOfFifty,,16,,1257346440135269291;
-<chainOfFifty,,17,,1257346440135279742;
-<chainOfFifty,,18,,1257346440135290157;
-<chainOfFifty,,19,,1257346440135300605;
-<chainOfFifty,,20,,1257346440135310995;
-<chainOfFifty,,21,,1257346440135321446;
-<chainOfFifty,,22,,1257346440135331900;
-<chainOfFifty,,23,,1257346440135342324;
-<chainOfFifty,,24,,1257346440135352696;
-<chainOfFifty,,25,,1257346440135363189;
-<chainOfFifty,,26,,1257346440135373529;
-<chainOfFifty,,27,,1257346440135383989;
-<chainOfFifty,,28,,1257346440135394463;
-<chainOfFifty,,29,,1257346440135405143;
-<chainOfFifty,,30,,1257346440135415813;
-<chainOfFifty,,31,,1257346440135426363;
-<chainOfFifty,,32,,1257346440135439620;
-<chainOfFifty,,33,,1257346440135450784;
-<chainOfFifty,,34,,1257346440135461412;
-<chainOfFifty,,35,,1257346440135471784;
-<chainOfFifty,,36,,1257346440135482356;
-<chainOfFifty,,37,,1257346440135492842;
-<chainOfFifty,,38,,1257346440135503299;
-<chainOfFifty,,39,,1257346440135513759;
-<chainOfFifty,,40,,1257346440135524333;
-<chainOfFifty,,41,,1257346440135535127;
-<chainOfFifty,,42,,1257346440135545912;
-<chainOfFifty,,43,,1257346440135556489;
-<chainOfFifty,,44,,1257346440135568494;
-<chainOfFifty,,45,,1257346440135578903;
-<chainOfFifty,,46,,1257346440135589321;
-<chainOfFifty,,47,,1257346440135599690;
-<chainOfFifty,,48,,1257346440135610156;
-<chainOfFifty,,49,,1257346440135620598;
-<chainOfFifty,,50,,1257346440135630965;
-<chainOfFifty,,51,,1257346440135641298;
-<chainOfFifty,,52,,1257346440135651704;
-<chainOfFifty,,53,,1257346440135662070;
-<chainOfFifty,,54,,1257346440135672431;
-<chainOfFifty,,55,,1257346440135682876;
-<chainOfFifty,,56,,1257346440135693239;
-<chainOfFifty,,57,,1257346440135703597;
-<chainOfFifty,,58,,1257346440135714039;
-<chainOfFifty,,59,,1257346440135724418;
-<chainOfFifty,,60,,1257346440135740278;
-<chainOfFifty,,61,,1257346440135750801;
->chainOfFifty,,1257346440135758845;
->chainOfFifty,,1257346440135764767;
->chainOfFifty,,1257346440135770292;
->chainOfFifty,,1257346440135775843;
->chainOfFifty,,1257346440135781332;
->chainOfFifty,,1257346440135786851;
->chainOfFifty,,1257346440135792330;
->chainOfFifty,,1257346440135797903;
->chainOfFifty,,1257346440135803482;
->chainOfFifty,,1257346440135808967;
->chainOfFifty,,1257346440135814483;
->chainOfFifty,,1257346440135819962;
->chainOfFifty,,1257346440135825478;
->chainOfFifty,,1257346440135831027;
->chainOfFifty,,1257346440135836543;
->chainOfFifty,,1257346440135842055;
->chainOfFifty,,1257346440135847733;
->chainOfFifty,,1257346440135853327;
->chainOfFifty,,1257346440135858879;
->chainOfFifty,,1257346440135864524;
->chainOfFifty,,1257346440135870186;
->chainOfFifty,,1257346440135875910;
->chainOfFifty,,1257346440135881437;
->chainOfFifty,,1257346440135887046;
->chainOfFifty,,1257346440135892652;
->chainOfFifty,,1257346440135898159;
->chainOfFifty,,1257346440135903692;
->chainOfFifty,,1257346440135909193;
->chainOfFifty,,1257346440135914856;
->chainOfFifty,,1257346440135920366;
->chainOfFifty,,1257346440135925992;
->chainOfFifty,,1257346440135931568;
->chainOfFifty,,1257346440135937165;
->chainOfFifty,,1257346440135942858;
->chainOfFifty,,1257346440135948485;
->chainOfFifty,,1257346440135954085;
->chainOfFifty,,1257346440135959591;
->chainOfFifty,,1257346440135965191;
->chainOfFifty,,1257346440135970764;
->chainOfFifty,,1257346440135976370;
->chainOfFifty,,1257346440135981967;
->chainOfFifty,,1257346440135987476;
->chainOfFifty,,1257346440135993073;
->chainOfFifty,,1257346440135998646;
->chainOfFifty,,1257346440136004249;
->chainOfFifty,,1257346440136009791;
->chainOfFifty,,1257346440136015400;
->chainOfFifty,,1257346440136020907;
->chainOfFifty,,1257346440136026570;
->chainOfFifty,,1257346440136032122;
->chainOfFifty,,1257346440136037634;
-<callThisThirtyTimes,,62,,1257346441255131051;
->callThisThirtyTimes,,1257346441255143613;
-<callThisThirtyTimes,,63,,1257346441255153399;
->callThisThirtyTimes,,1257346441255161405;
-<callThisThirtyTimes,,64,,1257346441255170481;
->callThisThirtyTimes,,1257346441255178280;
-<callThisThirtyTimes,,65,,1257346441255187266;
->callThisThirtyTimes,,1257346441255195166;
-<callThisThirtyTimes,,66,,1257346441255204017;
->callThisThirtyTimes,,1257346441255211752;
-<callThisThirtyTimes,,67,,1257346441255220718;
->callThisThirtyTimes,,1257346441255228648;
-<callThisThirtyTimes,,68,,1257346441255237475;
->callThisThirtyTimes,,1257346441255245372;
-<callThisThirtyTimes,,69,,1257346441255254295;
->callThisThirtyTimes,,1257346441255262055;
-<callThisThirtyTimes,,70,,1257346441255271158;
->callThisThirtyTimes,,1257346441255278929;
-<callThisThirtyTimes,,71,,1257346441255287831;
->callThisThirtyTimes,,1257346441255295699;
-<callThisThirtyTimes,,72,,1257346441255304652;
->callThisThirtyTimes,,1257346441255312528;
-<callThisThirtyTimes,,73,,1257346441255321448;
->callThisThirtyTimes,,1257346441255329232;
-<callThisThirtyTimes,,74,,1257346441255338209;
->callThisThirtyTimes,,1257346441255346016;
-<callThisThirtyTimes,,75,,1257346441255354927;
->callThisThirtyTimes,,1257346441255362801;
-<callThisThirtyTimes,,76,,1257346441255371666;
->callThisThirtyTimes,,1257346441255379612;
-<callThisThirtyTimes,,77,,1257346441255388571;
->callThisThirtyTimes,,1257346441255396508;
-<callThisThirtyTimes,,78,,1257346441255405395;
->callThisThirtyTimes,,1257346441255413265;
-<callThisThirtyTimes,,79,,1257346441255422230;
->callThisThirtyTimes,,1257346441255430007;
-<callThisThirtyTimes,,80,,1257346441255438988;
->callThisThirtyTimes,,1257346441255446768;
-<callThisThirtyTimes,,81,,1257346441255455616;
->callThisThirtyTimes,,1257346441255463600;
-<callThisThirtyTimes,,82,,1257346441255472617;
->callThisThirtyTimes,,1257346441255480475;
-<callThisThirtyTimes,,83,,1257346441255489329;
->callThisThirtyTimes,,1257346441255497106;
-<callThisThirtyTimes,,84,,1257346441255506092;
->callThisThirtyTimes,,1257346441255513860;
-<callThisThirtyTimes,,85,,1257346441255522787;
->callThisThirtyTimes,,1257346441255530489;
-<callThisThirtyTimes,,86,,1257346441255539267;
->callThisThirtyTimes,,1257346441255547008;
-<callThisThirtyTimes,,87,,1257346441255555883;
->callThisThirtyTimes,,1257346441255563655;
-<callThisThirtyTimes,,88,,1257346441255572563;
->callThisThirtyTimes,,1257346441255580430;
-<callThisThirtyTimes,,89,,1257346441255589461;
->callThisThirtyTimes,,1257346441255597212;
-<callThisThirtyTimes,,90,,1257346441255606086;
->callThisThirtyTimes,,1257346441255613987;
-<callThisThirtyTimes,,91,,1257346441255622943;
->callThisThirtyTimes,,1257346441255630624;
-<abcdefghijklmnopqrstuvwxyz,,92,,1257346441255641754;
->abcdefghijklmnopqrstuvwxyz,,1257346441255651279;
-<brokenFunction,,93,,1257346442951165356;
--1257346442951195211
-+6902388045 \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/eag.graph b/systemtap/org.eclipse.linuxtools.callgraph.tests/eag.graph
index eeb28995cf..49135620bb 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/eag.graph
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests/eag.graph
@@ -1,195 +1,6 @@
PROBE_BEGIN
-basic
-<_GLOBAL__I_main").call,,1,,1257346369862712856;
-<__static_initialization_and_destruction_0").call,,2,,1257346369862740988;
->__static_initialization_and_destruction_0").return,,1257346369862819833;
->_GLOBAL__I_main").return,,1257346369862826426;
-<main,,3,,1257346369862837782;
-<callThisOnce,,4,,1257346369862850744;
->callThisOnce,,1257346369862859261;
-<callThisTwice,,5,,1257346369862868987;
->callThisTwice,,1257346369862877606;
-<callThisTwice,,6,,1257346369862886045;
->callThisTwice,,1257346369862893227;
-<hasOneChild,,7,,1257346369862902881;
-<callThisOnce,,8,,1257346369896715797;
->callThisOnce,,1257346369896724720;
->hasOneChild,,1257346369896734489;
-<hasTwoDifferentChildren,,9,,1257346369896745791;
-<hasOneChild,,10,,1257346369929634234;
-<callThisOnce,,11,,1257346369960416668;
->callThisOnce,,1257346369960426623;
->hasOneChild,,1257346369960432572;
-<callThisOnce,,12,,1257346369960441311;
->callThisOnce,,1257346369960448580;
->hasTwoDifferentChildren,,1257346369960454336;
-<chainOfFifty,,13,,1257346369960466119;
-<chainOfFifty,,14,,1257346369960478155;
-<chainOfFifty,,15,,1257346369960488519;
-<chainOfFifty,,16,,1257346369960498684;
-<chainOfFifty,,17,,1257346369960508864;
-<chainOfFifty,,18,,1257346369960519126;
-<chainOfFifty,,19,,1257346369960529372;
-<chainOfFifty,,20,,1257346369960539380;
-<chainOfFifty,,21,,1257346369960549564;
-<chainOfFifty,,22,,1257346369960559606;
-<chainOfFifty,,23,,1257346369960569473;
-<chainOfFifty,,24,,1257346369960579545;
-<chainOfFifty,,25,,1257346369960589592;
-<chainOfFifty,,26,,1257346369960599571;
-<chainOfFifty,,27,,1257346369960609655;
-<chainOfFifty,,28,,1257346369960619598;
-<chainOfFifty,,29,,1257346369960629639;
-<chainOfFifty,,30,,1257346369960639886;
-<chainOfFifty,,31,,1257346369960650075;
-<chainOfFifty,,32,,1257346369960660309;
-<chainOfFifty,,33,,1257346369960670372;
-<chainOfFifty,,34,,1257346369960680471;
-<chainOfFifty,,35,,1257346369960690522;
-<chainOfFifty,,36,,1257346369960700485;
-<chainOfFifty,,37,,1257346369960710774;
-<chainOfFifty,,38,,1257346369960720840;
-<chainOfFifty,,39,,1257346369960738234;
-<chainOfFifty,,40,,1257346369960749102;
-<chainOfFifty,,41,,1257346369960759523;
-<chainOfFifty,,42,,1257346369960769766;
-<chainOfFifty,,43,,1257346369960780043;
-<chainOfFifty,,44,,1257346369960790024;
-<chainOfFifty,,45,,1257346369960800048;
-<chainOfFifty,,46,,1257346369960810105;
-<chainOfFifty,,47,,1257346369960820252;
-<chainOfFifty,,48,,1257346369960830489;
-<chainOfFifty,,49,,1257346369960840724;
-<chainOfFifty,,50,,1257346369960850760;
-<chainOfFifty,,51,,1257346369960860861;
-<chainOfFifty,,52,,1257346369960870861;
-<chainOfFifty,,53,,1257346369960881023;
-<chainOfFifty,,54,,1257346369960891173;
-<chainOfFifty,,55,,1257346369960901122;
-<chainOfFifty,,56,,1257346369960912749;
-<chainOfFifty,,57,,1257346369960922751;
-<chainOfFifty,,58,,1257346369960932664;
-<chainOfFifty,,59,,1257346369960942649;
-<chainOfFifty,,60,,1257346369960952558;
-<chainOfFifty,,61,,1257346369960962512;
-<chainOfFifty,,62,,1257346369960972479;
-<chainOfFifty,,63,,1257346369960982341;
->chainOfFifty,,1257346369960989597;
->chainOfFifty,,1257346369960994936;
->chainOfFifty,,1257346369961000175;
->chainOfFifty,,1257346369961005389;
->chainOfFifty,,1257346369961010475;
->chainOfFifty,,1257346369961015723;
->chainOfFifty,,1257346369961020812;
->chainOfFifty,,1257346369961025930;
->chainOfFifty,,1257346369961031016;
->chainOfFifty,,1257346369961036267;
->chainOfFifty,,1257346369961041485;
->chainOfFifty,,1257346369961046624;
->chainOfFifty,,1257346369961051842;
->chainOfFifty,,1257346369961056973;
->chainOfFifty,,1257346369961062203;
->chainOfFifty,,1257346369961067409;
->chainOfFifty,,1257346369961072795;
->chainOfFifty,,1257346369961077938;
->chainOfFifty,,1257346369961083162;
->chainOfFifty,,1257346369961088361;
->chainOfFifty,,1257346369961093543;
->chainOfFifty,,1257346369961098683;
->chainOfFifty,,1257346369961103913;
->chainOfFifty,,1257346369961109176;
->chainOfFifty,,1257346369961114382;
->chainOfFifty,,1257346369961119714;
->chainOfFifty,,1257346369961124857;
->chainOfFifty,,1257346369961129969;
->chainOfFifty,,1257346369961135235;
->chainOfFifty,,1257346369961140342;
->chainOfFifty,,1257346369961145647;
->chainOfFifty,,1257346369961150801;
->chainOfFifty,,1257346369961156001;
->chainOfFifty,,1257346369961161237;
->chainOfFifty,,1257346369961166566;
->chainOfFifty,,1257346369961171965;
->chainOfFifty,,1257346369961177084;
->chainOfFifty,,1257346369961182295;
->chainOfFifty,,1257346369961187399;
->chainOfFifty,,1257346369961192539;
->chainOfFifty,,1257346369961197721;
->chainOfFifty,,1257346369961202917;
->chainOfFifty,,1257346369961208084;
->chainOfFifty,,1257346369961213185;
->chainOfFifty,,1257346369961218324;
->chainOfFifty,,1257346369961223527;
->chainOfFifty,,1257346369961228898;
->chainOfFifty,,1257346369961234140;
->chainOfFifty,,1257346369961239280;
->chainOfFifty,,1257346369961244384;
->chainOfFifty,,1257346369961249683;
-<callThisThirtyTimes,,64,,1257346369961260101;
->callThisThirtyTimes,,1257346369961268879;
-<callThisThirtyTimes,,65,,1257346369961277610;
->callThisThirtyTimes,,1257346369961285140;
-<callThisThirtyTimes,,66,,1257346369961293651;
->callThisThirtyTimes,,1257346369961301113;
-<callThisThirtyTimes,,67,,1257346369961309534;
->callThisThirtyTimes,,1257346369961316914;
-<callThisThirtyTimes,,68,,1257346369961325280;
->callThisThirtyTimes,,1257346369961332646;
-<callThisThirtyTimes,,69,,1257346369961341157;
->callThisThirtyTimes,,1257346369961348396;
-<callThisThirtyTimes,,70,,1257346369961356928;
->callThisThirtyTimes,,1257346369961364263;
-<callThisThirtyTimes,,71,,1257346369961372657;
->callThisThirtyTimes,,1257346369961380049;
-<callThisThirtyTimes,,72,,1257346369961388497;
->callThisThirtyTimes,,1257346369961395781;
-<callThisThirtyTimes,,73,,1257346369961404187;
->callThisThirtyTimes,,1257346369961411543;
-<callThisThirtyTimes,,74,,1257346369961420045;
->callThisThirtyTimes,,1257346369961427310;
-<callThisThirtyTimes,,75,,1257346369961435771;
->callThisThirtyTimes,,1257346369961443241;
-<callThisThirtyTimes,,76,,1257346369961451596;
->callThisThirtyTimes,,1257346369961458967;
-<callThisThirtyTimes,,77,,1257346369961467469;
->callThisThirtyTimes,,1257346369961474792;
-<callThisThirtyTimes,,78,,1257346369961483255;
->callThisThirtyTimes,,1257346369961490551;
-<callThisThirtyTimes,,79,,1257346369961498996;
->callThisThirtyTimes,,1257346369961506352;
-<callThisThirtyTimes,,80,,1257346369961514746;
->callThisThirtyTimes,,1257346369961522147;
-<callThisThirtyTimes,,81,,1257346369961530667;
->callThisThirtyTimes,,1257346369961537963;
-<callThisThirtyTimes,,82,,1257346369961546477;
->callThisThirtyTimes,,1257346369961553830;
-<callThisThirtyTimes,,83,,1257346369961562185;
->callThisThirtyTimes,,1257346369961569580;
-<callThisThirtyTimes,,84,,1257346369961578007;
->callThisThirtyTimes,,1257346369961585303;
-<callThisThirtyTimes,,85,,1257346369961593802;
->callThisThirtyTimes,,1257346369961601131;
-<callThisThirtyTimes,,86,,1257346369961609693;
->callThisThirtyTimes,,1257346369961616968;
-<callThisThirtyTimes,,87,,1257346369961625419;
->callThisThirtyTimes,,1257346369961632832;
-<callThisThirtyTimes,,88,,1257346369961641181;
->callThisThirtyTimes,,1257346369961648621;
-<callThisThirtyTimes,,89,,1257346369961657180;
->callThisThirtyTimes,,1257346369961664470;
-<callThisThirtyTimes,,90,,1257346369961672900;
->callThisThirtyTimes,,1257346369961680323;
-<callThisThirtyTimes,,91,,1257346369961688725;
->callThisThirtyTimes,,1257346369961696018;
-<callThisThirtyTimes,,92,,1257346369961704463;
->callThisThirtyTimes,,1257346369961711825;
-<callThisThirtyTimes,,93,,1257346369961720285;
->callThisThirtyTimes,,1257346369961731754;
-<abcdefghijklmnopqrstuvwxyz,,94,,1257346369961742448;
->abcdefghijklmnopqrstuvwxyz,,1257346369961751516;
-<finalCall,,95,,1257346369961761654;
->finalCall,,1257346369961770008;
->main,,1257346369961775263;
--1257346369961811478
-+99098622 \ No newline at end of file
+eag
+<main,,1,,1253642440673012134;<callThisOnce,,2,,1253642440673025906;>callThisOnce,,1253642440673033205;<callThisTwice,,3,,1253642440673041635;>callThisTwice,,1253642440673048612;<callThisTwice,,4,,1253642440673055457;>callThisTwice,,1253642440673060982;<callThisThirtyTimes,,5,,1253642440673069187;>callThisThirtyTimes,,1253642440673076110;<callThisThirtyTimes,,6,,1253642440673082940;>callThisThirtyTimes,,1253642440673088573;<callThisThirtyTimes,,7,,1253642440673095259;>callThisThirtyTimes,,1253642440673100820;<callThisThirtyTimes,,8,,1253642440673109301;>callThisThirtyTimes,,1253642440673114862;<callThisThirtyTimes,,9,,1253642440673121508;>callThisThirtyTimes,,1253642440673127051;<callThisThirtyTimes,,10,,1253642440673133797;>callThisThirtyTimes,,1253642440673139286;<callThisThirtyTimes,,11,,1253642440673146079;>callThisThirtyTimes,,1253642440673151713;<callThisThirtyTimes,,12,,1253642440673158392;>callThisThirtyTimes,,1253642440673163947;<callThisThirtyTimes,,13,,1253642440673170594;>callThisThirtyTimes,,1253642440673176013;<callThisThirtyTimes,,14,,1253642440673182789;>callThisThirtyTimes,,1253642440673188353;<callThisThirtyTimes,,15,,1253642440673194981;>callThisThirtyTimes,,1253642440673200593;<callThisThirtyTimes,,16,,1253642440673207387;>callThisThirtyTimes,,1253642440673212960;<callThisThirtyTimes,,17,,1253642440673219739;>callThisThirtyTimes,,1253642440673246186;<callThisThirtyTimes,,18,,1253642440673254258;>callThisThirtyTimes,,1253642440673259981;<callThisThirtyTimes,,19,,1253642440673266718;>callThisThirtyTimes,,1253642440673272231;<callThisThirtyTimes,,20,,1253642440673278916;>callThisThirtyTimes,,1253642440673284549;<callThisThirtyTimes,,21,,1253642440673291358;>callThisThirtyTimes,,1253642440673296919;<callThisThirtyTimes,,22,,1253642440673303641;>callThisThirtyTimes,,1253642440673309184;<callThisThirtyTimes,,23,,1253642440673315873;>callThisThirtyTimes,,1253642440673321340;<callThisThirtyTimes,,24,,1253642440673328065;>callThisThirtyTimes,,1253642440673333641;<callThisThirtyTimes,,25,,1253642440673340308;>callThisThirtyTimes,,1253642440673345815;<callThisThirtyTimes,,26,,1253642440673352624;>callThisThirtyTimes,,1253642440673358062;<callThisThirtyTimes,,27,,1253642440673364817;>callThisThirtyTimes,,1253642440673370393;<callThisThirtyTimes,,28,,1253642440673377102;>callThisThirtyTimes,,1253642440673382648;<callThisThirtyTimes,,29,,1253642440673389511;>callThisThirtyTimes,,1253642440673395060;<callThisThirtyTimes,,30,,1253642440673401806;>callThisThirtyTimes,,1253642440673407373;<callThisThirtyTimes,,31,,1253642440673414056;>callThisThirtyTimes,,1253642440673419634;<callThisThirtyTimes,,32,,1253642440673426449;>callThisThirtyTimes,,1253642440673431938;<callThisThirtyTimes,,33,,1253642440673438699;>callThisThirtyTimes,,1253642440673444230;<callThisThirtyTimes,,34,,1253642440673450964;>callThisThirtyTimes,,1253642440673456413;<hasOneChild,,35,,1253642440673464843;<callThisOnce,,36,,1253642440673504942;>callThisOnce,,1253642440673510584;>hasOneChild,,1253642440673514133;<hasTwoDifferentChildren,,37,,1253642440673522199;<hasOneChild,,38,,1253642440673563062;<callThisOnce,,39,,1253642440673602797;>callThisOnce,,1253642440673608244;>hasOneChild,,1253642440673611781;<callThisOnce,,40,,1253642440673618364;>callThisOnce,,1253642440673623856;>hasTwoDifferentChildren,,1253642440673627483;<chainOfFifty,,41,,1253642440673635645;<chainOfFifty,,42,,1253642440673645666;<chainOfFifty,,43,,1253642440673654285;<chainOfFifty,,44,,1253642440673662872;<chainOfFifty,,45,,1253642440673671488;<chainOfFifty,,46,,1253642440673680138;<chainOfFifty,,47,,1253642440673688854;<chainOfFifty,,48,,1253642440673697473;<chainOfFifty,,49,,1253642440673706144;<chainOfFifty,,50,,1253642440673714688;<chainOfFifty,,51,,1253642440673723281;<chainOfFifty,,52,,1253642440673731921;<chainOfFifty,,53,,1253642440673740883;<chainOfFifty,,54,,1253642440673749723;<chainOfFifty,,55,,1253642440673758505;<chainOfFifty,,56,,1253642440673767100;<chainOfFifty,,57,,1253642440673775810;<chainOfFifty,,58,,1253642440673784474;<chainOfFifty,,59,,1253642440673792997;<chainOfFifty,,60,,1253642440673801761;<chainOfFifty,,61,,1253642440673810321;<chainOfFifty,,62,,1253642440673818889;<chainOfFifty,,63,,1253642440673827491;<chainOfFifty,,64,,1253642440673835924;<chainOfFifty,,65,,1253642440673844609;<chainOfFifty,,66,,1253642440673853157;<chainOfFifty,,67,,1253642440673861899;<chainOfFifty,,68,,1253642440673870645;<chainOfFifty,,69,,1253642440673879168;<chainOfFifty,,70,,1253642440673887845;<chainOfFifty,,71,,1253642440673896284;<chainOfFifty,,72,,1253642440673904961;<chainOfFifty,,73,,1253642440673913463;<chainOfFifty,,74,,1253642440673921935;<chainOfFifty,,75,,1253642440673930404;<chainOfFifty,,76,,1253642440673938945;<chainOfFifty,,77,,1253642440673947553;<chainOfFifty,,78,,1253642440673956145;<chainOfFifty,,79,,1253642440673964768;<chainOfFifty,,80,,1253642440673973312;<chainOfFifty,,81,,1253642440673981929;<chainOfFifty,,82,,1253642440673990711;<chainOfFifty,,83,,1253642440673999390;<chainOfFifty,,84,,1253642440674007856;<chainOfFifty,,85,,1253642440674016398;<chainOfFifty,,86,,1253642440674024945;<chainOfFifty,,87,,1253642440674033495;<chainOfFifty,,88,,1253642440674042415;<chainOfFifty,,89,,1253642440674051125;<chainOfFifty,,90,,1253642440674059757;<chainOfFifty,,91,,1253642440674068271;>chainOfFifty,,1253642440674074072;>chainOfFifty,,1253642440674077874;>chainOfFifty,,1253642440674081537;>chainOfFifty,,1253642440674085200;>chainOfFifty,,1253642440674088927;>chainOfFifty,,1253642440674092605;>chainOfFifty,,1253642440674096250;>chainOfFifty,,1253642440674099889;>chainOfFifty,,1253642440674103736;>chainOfFifty,,1253642440674107405;>chainOfFifty,,1253642440674111095;>chainOfFifty,,1253642440674114695;>chainOfFifty,,1253642440674118283;>chainOfFifty,,1253642440674121910;>chainOfFifty,,1253642440674125618;>chainOfFifty,,1253642440674129215;>chainOfFifty,,1253642440674132806;>chainOfFifty,,1253642440674136439;>chainOfFifty,,1253642440674140117;>chainOfFifty,,1253642440674143846;>chainOfFifty,,1253642440674147425;>chainOfFifty,,1253642440674151098;>chainOfFifty,,1253642440674154824;>chainOfFifty,,1253642440674158454;>chainOfFifty,,1253642440674162078;>chainOfFifty,,1253642440674165678;>chainOfFifty,,1253642440674169305;>chainOfFifty,,1253642440674172890;>chainOfFifty,,1253642440674176484;>chainOfFifty,,1253642440674180159;>chainOfFifty,,1253642440674183924;>chainOfFifty,,1253642440674187557;>chainOfFifty,,1253642440674191239;>chainOfFifty,,1253642440674194842;>chainOfFifty,,1253642440674198559;>chainOfFifty,,1253642440674202204;>chainOfFifty,,1253642440674205897;>chainOfFifty,,1253642440674209476;>chainOfFifty,,1253642440674213133;>chainOfFifty,,1253642440674216826;>chainOfFifty,,1253642440674220457;>chainOfFifty,,1253642440674224162;>chainOfFifty,,1253642440674232376;>chainOfFifty,,1253642440674236178;>chainOfFifty,,1253642440674239775;>chainOfFifty,,1253642440674243465;>chainOfFifty,,1253642440674247176;>chainOfFifty,,1253642440674250797;>chainOfFifty,,1253642440674254469;>chainOfFifty,,1253642440674258088;>chainOfFifty,,1253642440674261820;<abcdefghijklmnopqrstuvwxyz,,92,,1253642440674270132;>abcdefghijklmnopqrstuvwxyz,,1253642440674277146;<finalCall,,93,,1253642440674285356;>finalCall,,1253642440674292127;>main,,1253642440674295760;
+1253642440674312367
+1300233 \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/heavy.graph b/systemtap/org.eclipse.linuxtools.callgraph.tests/heavy.graph
deleted file mode 100644
index 469ff4dfb1..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/heavy.graph
+++ /dev/null
@@ -1,28129 +0,0 @@
-
-PROBE_BEGIN
-basic
-<main,,1,,1257346704347360199;
-<gdb_main,,2,,1257346704347376348;
-<catch_errors,,3,,1257346704347386920;
-<exceptions_state_mc_init,,4,,1257346704347397969;
-<xzalloc,,5,,1257346704347410504;
-<xcalloc,,6,,1257346704347421478;
->xcalloc,,1257346704347473870;
->xzalloc,,1257346704347479112;
-<save_cleanups,,7,,1257346704347490580;
->save_cleanups,,1257346704347501860;
->exceptions_state_mc_init,,1257346704347508991;
-<exceptions_state_mc_action_iter,,8,,1257346704347517629;
-<exceptions_state_mc,,9,,1257346704347528717;
->exceptions_state_mc,,1257346704347537264;
->exceptions_state_mc_action_iter,,1257346704347541459;
-<exceptions_state_mc_action_iter_1,,10,,1257346704347548331;
-<exceptions_state_mc,,11,,1257346704347558283;
->exceptions_state_mc,,1257346704347565374;
->exceptions_state_mc_action_iter_1,,1257346704347569627;
-<captured_main,,12,,1257346704347578655;
-<get_run_time,,13,,1257346704347587211;
->get_run_time,,1257346704347598279;
-<xmalloc,,14,,1257346704357379386;
->xmalloc,,1257346704357391340;
-<xmalloc,,15,,1257346704357398420;
->xmalloc,,1257346704357405394;
-<xmalloc,,16,,1257346704357413234;
->xmalloc,,1257346704357420052;
-<stdio_fileopen,,17,,1257346704357429285;
-<stdio_file_new,,18,,1257346704357440400;
-<ui_file_new,,19,,1257346704357452620;
-<xmalloc,,20,,1257346704357463266;
->xmalloc,,1257346704357470159;
->ui_file_new,,1257346704357474890;
-<xmalloc,,21,,1257346704357481473;
->xmalloc,,1257346704357488264;
->stdio_file_new,,1257346704357492976;
->stdio_fileopen,,1257346704357496543;
-<stdio_fileopen,,22,,1257346704357505012;
-<stdio_file_new,,23,,1257346704357514434;
-<ui_file_new,,24,,1257346704357524786;
-<xmalloc,,25,,1257346704357534133;
->xmalloc,,1257346704357540870;
->ui_file_new,,1257346704357545462;
-<xmalloc,,26,,1257346704357551958;
->xmalloc,,1257346704357558565;
->stdio_file_new,,1257346704357563143;
->stdio_fileopen,,1257346704357566703;
-<stdio_fileopen,,27,,1257346704357575175;
-<stdio_file_new,,28,,1257346704357584727;
-<ui_file_new,,29,,1257346704357595030;
-<xmalloc,,30,,1257346704357609394;
->xmalloc,,1257346704357616636;
->ui_file_new,,1257346704357621211;
-<xmalloc,,31,,1257346704357627821;
->xmalloc,,1257346704357634452;
->stdio_file_new,,1257346704357639093;
->stdio_fileopen,,1257346704357642663;
-<xstrdup,,32,,1257346704357647204;
-<xmalloc,,33,,1257346704357658533;
->xmalloc,,1257346704357665308;
->xstrdup,,1257346704357670533;
-<relocate_directory,,34,,1257346704357685723;
-<xstrdup,,35,,1257346704357694162;
-<xmalloc,,36,,1257346704357703455;
->xmalloc,,1257346704357710110;
->xstrdup,,1257346704357714588;
-<xfree,,37,,1257346704357724666;
->xfree,,1257346704357733731;
-<xstrdup,,38,,1257346704357738398;
-<xmalloc,,39,,1257346704357747835;
->xmalloc,,1257346704357754629;
->xstrdup,,1257346704357759011;
->relocate_directory,,1257346704357763679;
-<relocate_directory,,40,,1257346704357773284;
-<make_relative_prefix,,41,,1257346704357780743;
-<make_relative_prefix_1,,42,,1257346704357789257;
-<lbasename,,43,,1257346704357797569;
->lbasename,,1257346704357805635;
-<lrealpath,,44,,1257346704357810444;
->lrealpath,,1257346704357835490;
-<split_directories,,45,,1257346704357840780;
-<save_string,,46,,1257346704357849532;
->save_string,,1257346704357857697;
-<save_string,,47,,1257346704357862545;
->save_string,,1257346704357869245;
-<save_string,,48,,1257346704357873937;
->save_string,,1257346704357880595;
-<save_string,,49,,1257346704357885242;
->save_string,,1257346704357891885;
-<save_string,,50,,1257346704357896559;
->save_string,,1257346704357903169;
-<save_string,,51,,1257346704357907795;
->save_string,,1257346704357914486;
-<save_string,,52,,1257346704357919121;
->save_string,,1257346704357925701;
->split_directories,,1257346704357930383;
-<split_directories,,53,,1257346704357935325;
-<save_string,,54,,1257346704357942257;
->save_string,,1257346704357948957;
-<save_string,,55,,1257346704357953574;
->save_string,,1257346704357960268;
-<save_string,,56,,1257346704357964908;
->save_string,,1257346704357971519;
-<save_string,,57,,1257346704357976099;
->save_string,,1257346704357982779;
->split_directories,,1257346704357987434;
-<split_directories,,58,,1257346704357992273;
-<save_string,,59,,1257346704357999269;
->save_string,,1257346704358006029;
-<save_string,,60,,1257346704358010718;
->save_string,,1257346704358017433;
-<save_string,,61,,1257346704358022014;
->save_string,,1257346704358028690;
-<save_string,,62,,1257346704358033219;
->save_string,,1257346704358039923;
-<save_string,,63,,1257346704358044482;
->save_string,,1257346704358051150;
->split_directories,,1257346704358055880;
-<free_split_directories,,64,,1257346704358062692;
->free_split_directories,,1257346704358071257;
-<free_split_directories,,65,,1257346704358076231;
->free_split_directories,,1257346704358083227;
-<free_split_directories,,66,,1257346704358088210;
->free_split_directories,,1257346704358095230;
->make_relative_prefix_1,,1257346704358100165;
->make_relative_prefix,,1257346704358103927;
-<xfree,,67,,1257346704358117966;
->xfree,,1257346704358125045;
-<xstrdup,,68,,1257346704358129481;
-<xmalloc,,69,,1257346704358138711;
->xmalloc,,1257346704358145321;
->xstrdup,,1257346704358149832;
-<lrealpath,,70,,1257346704358154422;
->lrealpath,,1257346704358170241;
-<xfree,,71,,1257346704358177708;
->xfree,,1257346704358184547;
->relocate_directory,,1257346704358189299;
-<relocate_directory,,72,,1257346704358198784;
-<make_relative_prefix,,73,,1257346704358205942;
-<make_relative_prefix_1,,74,,1257346704358212922;
-<lbasename,,75,,1257346704358219659;
->lbasename,,1257346704358226206;
-<lrealpath,,76,,1257346704358230931;
->lrealpath,,1257346704358246650;
-<split_directories,,77,,1257346704358251622;
-<save_string,,78,,1257346704358258903;
->save_string,,1257346704358265673;
-<save_string,,79,,1257346704358270334;
->save_string,,1257346704358276999;
-<save_string,,80,,1257346704358281513;
->save_string,,1257346704358288132;
-<save_string,,81,,1257346704358292712;
->save_string,,1257346704358299356;
-<save_string,,82,,1257346704358304005;
->save_string,,1257346704358310525;
-<save_string,,83,,1257346704358315187;
->save_string,,1257346704358321701;
-<save_string,,84,,1257346704358326314;
->save_string,,1257346704358332877;
->split_directories,,1257346704358337583;
-<split_directories,,85,,1257346704358342482;
-<save_string,,86,,1257346704358349123;
->save_string,,1257346704358355781;
-<save_string,,87,,1257346704358360407;
->save_string,,1257346704358367011;
-<save_string,,88,,1257346704358371678;
->save_string,,1257346704358378277;
-<save_string,,89,,1257346704358382908;
->save_string,,1257346704358389557;
->split_directories,,1257346704358394219;
-<split_directories,,90,,1257346704358398956;
-<save_string,,91,,1257346704358405689;
->save_string,,1257346704358412369;
-<save_string,,92,,1257346704358417054;
->save_string,,1257346704358423575;
-<save_string,,93,,1257346704358428224;
->save_string,,1257346704358434831;
-<save_string,,94,,1257346704358439484;
->save_string,,1257346704358446049;
-<save_string,,95,,1257346704358450702;
->save_string,,1257346704358457258;
->split_directories,,1257346704358461898;
-<free_split_directories,,96,,1257346704358467534;
->free_split_directories,,1257346704358474653;
-<free_split_directories,,97,,1257346704358479534;
->free_split_directories,,1257346704358486466;
-<free_split_directories,,98,,1257346704358491356;
->free_split_directories,,1257346704358498342;
->make_relative_prefix_1,,1257346704358503181;
->make_relative_prefix,,1257346704358506961;
-<xfree,,99,,1257346704358517647;
->xfree,,1257346704358524525;
-<xstrdup,,100,,1257346704358529090;
-<xmalloc,,101,,1257346704358538368;
->xmalloc,,1257346704358545255;
->xstrdup,,1257346704358549679;
-<lrealpath,,102,,1257346704358554250;
->lrealpath,,1257346704358568241;
-<xfree,,103,,1257346704358575621;
->xfree,,1257346704358582391;
->relocate_directory,,1257346704358587103;
-<xstrdup,,104,,1257346704358591566;
-<xmalloc,,105,,1257346704358605225;
->xmalloc,,1257346704358612548;
->xstrdup,,1257346704358617008;
-<gdb_init,,106,,1257346704358631056;
-<init_cmd_lists,,107,,1257346704358642433;
->init_cmd_lists,,1257346704358653495;
-<initialize_targets,,108,,1257346704358660351;
-<push_target,,109,,1257346704358670348;
-<update_current_target,,110,,1257346704358680152;
->update_current_target,,1257346704358690173;
->push_target,,1257346704358695048;
-<add_info,,111,,1257346704358701974;
-<add_cmd,,112,,1257346704358713592;
-<xmalloc,,113,,1257346704358724220;
->xmalloc,,1257346704358731077;
-<delete_cmd,,114,,1257346704358738496;
->delete_cmd,,1257346704358746716;
->add_cmd,,1257346704358751260;
->add_info,,1257346704358755699;
-<add_info,,115,,1257346704358761864;
-<add_cmd,,116,,1257346704358771825;
-<xmalloc,,117,,1257346704358781244;
->xmalloc,,1257346704358787996;
-<delete_cmd,,118,,1257346704358794946;
->delete_cmd,,1257346704385077665;
->add_cmd,,1257346704385083181;
->add_info,,1257346704385087653;
-<add_setshow_zinteger_cmd,,119,,1257346704404721700;
-<add_setshow_cmd_full,,120,,1257346704404743898;
-<xstrprintf,,121,,1257346704404759272;
-<xstrvprintf,,122,,1257346704404773121;
->xstrvprintf,,1257346704439472916;
->xstrprintf,,1257346704439482378;
-<xstrprintf,,123,,1257346704439507983;
-<xstrvprintf,,124,,1257346704439538117;
->xstrvprintf,,1257346704439547612;
->xstrprintf,,1257346704439552252;
-<add_set_or_show_cmd,,125,,1257346704439575485;
-<add_cmd,,126,,1257346704439606407;
-<xmalloc,,127,,1257346704439631790;
->xmalloc,,1257346704439639429;
-<delete_cmd,,128,,1257346704439661813;
->delete_cmd,,1257346704439669391;
->add_cmd,,1257346704439674002;
->add_set_or_show_cmd,,1257346704439678835;
-<add_set_or_show_cmd,,129,,1257346704439700167;
-<add_cmd,,130,,1257346704439721354;
-<xmalloc,,131,,1257346704439745732;
->xmalloc,,1257346704439752748;
-<delete_cmd,,132,,1257346704439773214;
->delete_cmd,,1257346704439780329;
->add_cmd,,1257346704439784780;
->add_set_or_show_cmd,,1257346704439789469;
->add_setshow_cmd_full,,1257346704439794654;
->add_setshow_zinteger_cmd,,1257346704439798708;
-<add_setshow_boolean_cmd,,133,,1257346704439824202;
-<add_setshow_cmd_full,,134,,1257346704439851055;
-<xstrprintf,,135,,1257346704439875436;
-<xstrvprintf,,136,,1257346704439898281;
->xstrvprintf,,1257346704439906837;
->xstrprintf,,1257346704439911447;
-<xstrprintf,,137,,1257346704439941504;
-<xstrvprintf,,138,,1257346704439965428;
->xstrvprintf,,1257346704439977803;
->xstrprintf,,1257346704439982525;
-<add_set_or_show_cmd,,139,,1257346704440003604;
-<add_cmd,,140,,1257346704440024027;
-<xmalloc,,141,,1257346704440046120;
->xmalloc,,1257346704440053034;
-<delete_cmd,,142,,1257346704440073109;
->delete_cmd,,1257346704440080017;
->add_cmd,,1257346704440084468;
->add_set_or_show_cmd,,1257346704440089147;
-<add_set_or_show_cmd,,143,,1257346704440109577;
-<add_cmd,,144,,1257346704440130202;
-<xmalloc,,145,,1257346704440152649;
->xmalloc,,1257346704440159557;
-<delete_cmd,,146,,1257346704440179295;
->delete_cmd,,1257346704440186155;
->add_cmd,,1257346704440190669;
->add_set_or_show_cmd,,1257346704440195385;
->add_setshow_cmd_full,,1257346704440200170;
->add_setshow_boolean_cmd,,1257346704440205255;
-<add_com,,147,,1257346704440225709;
-<add_cmd,,148,,1257346704440247922;
-<xmalloc,,149,,1257346704440270171;
->xmalloc,,1257346704440276991;
-<delete_cmd,,150,,1257346704440297072;
->delete_cmd,,1257346704440304019;
->add_cmd,,1257346704440308434;
->add_com,,1257346704440312912;
-<add_cmd,,151,,1257346704440332442;
-<xmalloc,,152,,1257346704440355154;
->xmalloc,,1257346704440362050;
-<delete_cmd,,153,,1257346704440382077;
->delete_cmd,,1257346704440388970;
->add_cmd,,1257346704440393433;
-<add_setshow_boolean_cmd,,154,,1257346704440412701;
-<add_setshow_cmd_full,,155,,1257346704440436286;
-<xstrprintf,,156,,1257346704440459067;
-<xstrvprintf,,157,,1257346704440481223;
->xstrvprintf,,1257346704440489415;
->xstrprintf,,1257346704440494022;
-<xstrprintf,,158,,1257346704440514801;
-<xstrvprintf,,159,,1257346704440536749;
->xstrvprintf,,1257346704440544794;
->xstrprintf,,1257346704440549407;
-<add_set_or_show_cmd,,160,,1257346704440569494;
-<add_cmd,,161,,1257346704440589674;
-<xmalloc,,162,,1257346704440616983;
->xmalloc,,1257346704440624394;
-<delete_cmd,,163,,1257346704440644360;
->delete_cmd,,1257346704440651518;
->add_cmd,,1257346704440656011;
->add_set_or_show_cmd,,1257346704440660690;
-<add_set_or_show_cmd,,164,,1257346704440681297;
-<add_cmd,,165,,1257346704440702124;
-<xmalloc,,166,,1257346704440724225;
->xmalloc,,1257346704440731118;
-<delete_cmd,,167,,1257346704440750603;
->delete_cmd,,1257346704440757692;
->add_cmd,,1257346704440762203;
->add_set_or_show_cmd,,1257346704440766982;
->add_setshow_cmd_full,,1257346704440771755;
->add_setshow_boolean_cmd,,1257346704440776581;
-<add_setshow_boolean_cmd,,168,,1257346704440796214;
-<add_setshow_cmd_full,,169,,1257346704440819687;
-<xstrprintf,,170,,1257346704440842757;
-<xstrvprintf,,171,,1257346704440864600;
->xstrvprintf,,1257346704440873156;
->xstrprintf,,1257346704440877775;
-<xstrprintf,,172,,1257346704440898728;
-<xstrvprintf,,173,,1257346704440921082;
->xstrvprintf,,1257346704440929284;
->xstrprintf,,1257346704440933858;
-<add_set_or_show_cmd,,174,,1257346704440954158;
-<add_cmd,,175,,1257346704440974615;
-<xmalloc,,176,,1257346704440996298;
->xmalloc,,1257346704441003119;
-<delete_cmd,,177,,1257346704441022752;
->delete_cmd,,1257346704441029753;
->add_cmd,,1257346704441034261;
->add_set_or_show_cmd,,1257346704441038953;
-<add_set_or_show_cmd,,178,,1257346704441059048;
-<add_cmd,,179,,1257346704441079445;
-<xmalloc,,180,,1257346704441101838;
->xmalloc,,1257346704441108848;
-<delete_cmd,,181,,1257346704441129224;
->delete_cmd,,1257346704441136168;
->add_cmd,,1257346704441140625;
->add_set_or_show_cmd,,1257346704441145325;
->add_setshow_cmd_full,,1257346704441150116;
->add_setshow_boolean_cmd,,1257346704441154955;
-<dcache_init,,182,,1257346704441175252;
-<xmalloc,,183,,1257346704441198310;
->xmalloc,,1257346704441205260;
-<splay_tree_new,,184,,1257346704441211194;
-<splay_tree_new_with_allocator,,185,,1257346704441221305;
-<splay_tree_xmalloc_allocate,,186,,1257346704441230833;
-<xmalloc,,187,,1257346704441251415;
->xmalloc,,1257346704441258299;
->splay_tree_xmalloc_allocate,,1257346704441262711;
->splay_tree_new_with_allocator,,1257346704441267923;
->splay_tree_new,,1257346704441272699;
->dcache_init,,1257346704441280199;
->initialize_targets,,1257346704441285565;
-<initialize_utils,,188,,1257346704441306382;
-<add_setshow_uinteger_cmd,,189,,1257346704441331203;
-<add_setshow_cmd_full,,190,,1257346704441355593;
-<xstrdup,,191,,1257346704441362904;
-<xmalloc,,192,,1257346704441385766;
->xmalloc,,1257346704441392632;
->xstrdup,,1257346704441397312;
-<xstrdup,,193,,1257346704441401889;
-<xmalloc,,194,,1257346704441420183;
->xmalloc,,1257346704441427049;
->xstrdup,,1257346704441431461;
-<add_set_or_show_cmd,,195,,1257346704441450375;
-<add_cmd,,196,,1257346704441469574;
-<xmalloc,,197,,1257346704441491029;
->xmalloc,,1257346704441497847;
-<delete_cmd,,198,,1257346704441517726;
->delete_cmd,,1257346704441524727;
->add_cmd,,1257346704441529172;
->add_set_or_show_cmd,,1257346704441533783;
-<add_set_or_show_cmd,,199,,1257346704441552739;
-<add_cmd,,200,,1257346704441571818;
-<xmalloc,,201,,1257346704441592737;
->xmalloc,,1257346704441599546;
-<delete_cmd,,202,,1257346704441623152;
->delete_cmd,,1257346704441630352;
->add_cmd,,1257346704441634809;
->add_set_or_show_cmd,,1257346704441639552;
->add_setshow_cmd_full,,1257346704441644345;
->add_setshow_uinteger_cmd,,1257346704441648393;
-<add_setshow_uinteger_cmd,,203,,1257346704441667533;
-<add_setshow_cmd_full,,204,,1257346704441690774;
-<xstrdup,,205,,1257346704441697619;
-<xmalloc,,206,,1257346704441718497;
->xmalloc,,1257346704441725167;
->xstrdup,,1257346704441729648;
-<xstrdup,,207,,1257346704441734223;
-<xmalloc,,208,,1257346704441752574;
->xmalloc,,1257346704441759437;
->xstrdup,,1257346704441763873;
-<add_set_or_show_cmd,,209,,1257346704441782495;
-<add_cmd,,210,,1257346704441802398;
-<xmalloc,,211,,1257346704441823555;
->xmalloc,,1257346704441830265;
-<delete_cmd,,212,,1257346704441849217;
->delete_cmd,,1257346704441857395;
->add_cmd,,1257346704441861873;
->add_set_or_show_cmd,,1257346704441866492;
-<add_set_or_show_cmd,,213,,1257346704441885207;
-<add_cmd,,214,,1257346704441905014;
-<xmalloc,,215,,1257346704441926334;
->xmalloc,,1257346704441933044;
-<delete_cmd,,216,,1257346704441952039;
->delete_cmd,,1257346704441958944;
->add_cmd,,1257346704441963355;
->add_set_or_show_cmd,,1257346704441967996;
->add_setshow_cmd_full,,1257346704441972700;
->add_setshow_uinteger_cmd,,1257346704441976549;
-<init_page_info,,217,,1257346704441998753;
-<tui_get_command_dimension,,218,,1257346704442022148;
->tui_get_command_dimension,,1257346704442033871;
-<rl_reset_terminal,,219,,1257346704442043136;
-<_rl_init_terminal_io,,220,,1257346704442055804;
-<sh_get_env_value,,221,,1257346704442067785;
->sh_get_env_value,,1257346704442084146;
-<xmalloc,,222,,1257346704442106735;
->xmalloc,,1257346704442116560;
-<xmalloc,,223,,1257346704442133131;
->xmalloc,,1257346704442142261;
-<_rl_get_screen_size,,224,,1257346704473213108;
-<sh_get_env_value,,225,,1257346704473232758;
->sh_get_env_value,,1257346704473241326;
-<sh_get_env_value,,226,,1257346704473248421;
->sh_get_env_value,,1257346704473255533;
-<sh_set_lines_and_columns,,227,,1257346704473263957;
-<xmalloc,,228,,1257346704473287548;
->xmalloc,,1257346704473294852;
-<xmalloc,,229,,1257346704473325056;
->xmalloc,,1257346704473332433;
->sh_set_lines_and_columns,,1257346704473339191;
->_rl_get_screen_size,,1257346704473344270;
-<bind_termcap_arrow_keys,,230,,1257346704473352427;
-<rl_bind_keyseq_if_unbound,,231,,1257346704473372408;
-<rl_bind_keyseq_if_unbound_in_map,,232,,1257346704473385635;
-<rl_function_of_keyseq,,233,,1257346704473397541;
->rl_function_of_keyseq,,1257346704473406287;
-<rl_bind_keyseq_in_map,,234,,1257346704473414732;
-<rl_generic_bind,,235,,1257346704473426187;
-<xmalloc,,236,,1257346704473448776;
->xmalloc,,1257346704473455573;
-<rl_translate_keyseq,,237,,1257346704473464162;
->rl_translate_keyseq,,1257346704473472510;
-<rl_make_bare_keymap,,238,,1257346704473481445;
-<xmalloc,,239,,1257346704473503132;
->xmalloc,,1257346704473510296;
->rl_make_bare_keymap,,1257346704473515565;
->rl_generic_bind,,1257346704473520416;
->rl_bind_keyseq_in_map,,1257346704473525366;
->rl_bind_keyseq_if_unbound_in_map,,1257346704473529670;
->rl_bind_keyseq_if_unbound,,1257346704473534794;
-<rl_bind_keyseq_if_unbound,,240,,1257346704473542863;
-<rl_bind_keyseq_if_unbound_in_map,,241,,1257346704473553182;
-<rl_function_of_keyseq,,242,,1257346704473562631;
->rl_function_of_keyseq,,1257346704473569662;
-<rl_bind_keyseq_in_map,,243,,1257346704473577752;
-<rl_generic_bind,,244,,1257346704473587379;
-<xmalloc,,245,,1257346704473613478;
->xmalloc,,1257346704473620732;
-<rl_translate_keyseq,,246,,1257346704473628353;
->rl_translate_keyseq,,1257346704473635282;
->rl_generic_bind,,1257346704473640085;
->rl_bind_keyseq_in_map,,1257346704473644839;
->rl_bind_keyseq_if_unbound_in_map,,1257346704473648941;
->rl_bind_keyseq_if_unbound,,1257346704473653973;
-<rl_bind_keyseq_if_unbound,,247,,1257346704473662078;
-<rl_bind_keyseq_if_unbound_in_map,,248,,1257346704473672379;
-<rl_function_of_keyseq,,249,,1257346704473682258;
->rl_function_of_keyseq,,1257346704473689133;
-<rl_bind_keyseq_in_map,,250,,1257346704473697542;
-<rl_generic_bind,,251,,1257346704473707171;
-<xmalloc,,252,,1257346704473727811;
->xmalloc,,1257346704473734572;
-<rl_translate_keyseq,,253,,1257346704473742088;
->rl_translate_keyseq,,1257346704473748896;
->rl_generic_bind,,1257346704473753585;
->rl_bind_keyseq_in_map,,1257346704473758340;
->rl_bind_keyseq_if_unbound_in_map,,1257346704473762430;
->rl_bind_keyseq_if_unbound,,1257346704473767329;
-<rl_bind_keyseq_if_unbound,,254,,1257346704473775269;
-<rl_bind_keyseq_if_unbound_in_map,,255,,1257346704473785338;
-<rl_function_of_keyseq,,256,,1257346704473794661;
->rl_function_of_keyseq,,1257346704473801590;
-<rl_bind_keyseq_in_map,,257,,1257346704473809607;
-<rl_generic_bind,,258,,1257346704473819135;
-<xmalloc,,259,,1257346704473840061;
->xmalloc,,1257346704473846695;
-<rl_translate_keyseq,,260,,1257346704473854253;
->rl_translate_keyseq,,1257346704473861083;
->rl_generic_bind,,1257346704473865768;
->rl_bind_keyseq_in_map,,1257346704473870481;
->rl_bind_keyseq_if_unbound_in_map,,1257346704473874589;
->rl_bind_keyseq_if_unbound,,1257346704473879557;
-<rl_bind_keyseq_if_unbound,,261,,1257346704473887707;
-<rl_bind_keyseq_if_unbound_in_map,,262,,1257346704473897788;
-<rl_function_of_keyseq,,263,,1257346704473907084;
->rl_function_of_keyseq,,1257346704473914004;
-<rl_bind_keyseq_in_map,,264,,1257346704473921899;
-<rl_generic_bind,,265,,1257346704473931453;
-<xmalloc,,266,,1257346704473952006;
->xmalloc,,1257346704473958646;
-<rl_translate_keyseq,,267,,1257346704473966631;
->rl_translate_keyseq,,1257346704473973798;
->rl_generic_bind,,1257346704473978595;
->rl_bind_keyseq_in_map,,1257346704473983488;
->rl_bind_keyseq_if_unbound_in_map,,1257346704473987572;
->rl_bind_keyseq_if_unbound,,1257346704473992459;
-<rl_bind_keyseq_if_unbound,,268,,1257346704474000423;
-<rl_bind_keyseq_if_unbound_in_map,,269,,1257346704474010853;
-<rl_function_of_keyseq,,270,,1257346704474020233;
->rl_function_of_keyseq,,1257346704474027162;
-<rl_bind_keyseq_in_map,,271,,1257346704474035222;
-<rl_generic_bind,,272,,1257346704474044773;
-<xmalloc,,273,,1257346704474065603;
->xmalloc,,1257346704474072336;
-<rl_translate_keyseq,,274,,1257346704474079882;
->rl_translate_keyseq,,1257346704474086694;
->rl_generic_bind,,1257346704474091379;
->rl_bind_keyseq_in_map,,1257346704474096104;
->rl_bind_keyseq_if_unbound_in_map,,1257346704474100284;
->rl_bind_keyseq_if_unbound,,1257346704474105292;
-<rl_bind_keyseq_if_unbound,,275,,1257346704474113225;
-<rl_bind_keyseq_if_unbound_in_map,,276,,1257346704474123204;
-<rl_function_of_keyseq,,277,,1257346704474132470;
->rl_function_of_keyseq,,1257346704474139402;
-<rl_bind_keyseq_in_map,,278,,1257346704474147375;
-<rl_generic_bind,,279,,1257346704474156884;
-<xmalloc,,280,,1257346704474177500;
->xmalloc,,1257346704474184183;
-<rl_translate_keyseq,,281,,1257346704474191710;
->rl_translate_keyseq,,1257346704474198606;
-<rl_make_bare_keymap,,282,,1257346704474206609;
-<xmalloc,,283,,1257346704474226016;
->xmalloc,,1257346704474235564;
->rl_make_bare_keymap,,1257346704474240722;
-<rl_make_bare_keymap,,284,,1257346704474248542;
-<xmalloc,,285,,1257346704474268803;
->xmalloc,,1257346704474275645;
->rl_make_bare_keymap,,1257346704474280736;
->rl_generic_bind,,1257346704474285524;
->rl_bind_keyseq_in_map,,1257346704474290285;
->rl_bind_keyseq_if_unbound_in_map,,1257346704474294492;
->rl_bind_keyseq_if_unbound,,1257346704474299502;
->bind_termcap_arrow_keys,,1257346704474304555;
-<bind_termcap_arrow_keys,,286,,1257346704474311598;
-<rl_bind_keyseq_if_unbound,,287,,1257346704474321947;
-<rl_bind_keyseq_if_unbound_in_map,,288,,1257346704474332175;
-<rl_function_of_keyseq,,289,,1257346704474341598;
->rl_function_of_keyseq,,1257346704474349895;
-<rl_bind_keyseq_in_map,,290,,1257346704474357958;
-<rl_generic_bind,,291,,1257346704474367522;
-<xmalloc,,292,,1257346704474388336;
->xmalloc,,1257346704474395042;
-<rl_translate_keyseq,,293,,1257346704474402745;
->rl_translate_keyseq,,1257346704474409650;
-<rl_make_bare_keymap,,294,,1257346704474421180;
-<xmalloc,,295,,1257346704474442415;
->xmalloc,,1257346704474451811;
->rl_make_bare_keymap,,1257346704474456878;
-<rl_make_bare_keymap,,296,,1257346704474464779;
-<xmalloc,,297,,1257346704474485837;
->xmalloc,,1257346704474492712;
->rl_make_bare_keymap,,1257346704474497782;
->rl_generic_bind,,1257346704474502498;
->rl_bind_keyseq_in_map,,1257346704474507322;
->rl_bind_keyseq_if_unbound_in_map,,1257346704474511481;
->rl_bind_keyseq_if_unbound,,1257346704474516353;
-<rl_bind_keyseq_if_unbound,,298,,1257346704474524407;
-<rl_bind_keyseq_if_unbound_in_map,,299,,1257346704474534698;
-<rl_function_of_keyseq,,300,,1257346704474544178;
->rl_function_of_keyseq,,1257346704474551266;
-<rl_bind_keyseq_in_map,,301,,1257346704474559194;
-<rl_generic_bind,,302,,1257346704474568613;
-<xmalloc,,303,,1257346704474589076;
->xmalloc,,1257346704474595866;
-<rl_translate_keyseq,,304,,1257346704474608046;
->rl_translate_keyseq,,1257346704474615463;
->rl_generic_bind,,1257346704474620269;
->rl_bind_keyseq_in_map,,1257346704474625080;
->rl_bind_keyseq_if_unbound_in_map,,1257346704474629261;
->rl_bind_keyseq_if_unbound,,1257346704474634268;
-<rl_bind_keyseq_if_unbound,,305,,1257346704474642241;
-<rl_bind_keyseq_if_unbound_in_map,,306,,1257346704474652689;
-<rl_function_of_keyseq,,307,,1257346704474661954;
->rl_function_of_keyseq,,1257346704474668911;
-<rl_bind_keyseq_in_map,,308,,1257346704474676826;
-<rl_generic_bind,,309,,1257346704474686194;
-<xmalloc,,310,,1257346704474706702;
->xmalloc,,1257346704474713439;
-<rl_translate_keyseq,,311,,1257346704474720972;
->rl_translate_keyseq,,1257346704474727745;
->rl_generic_bind,,1257346704474732428;
->rl_bind_keyseq_in_map,,1257346704474737176;
->rl_bind_keyseq_if_unbound_in_map,,1257346704474741402;
->rl_bind_keyseq_if_unbound,,1257346704474746466;
-<rl_bind_keyseq_if_unbound,,312,,1257346704474754430;
-<rl_bind_keyseq_if_unbound_in_map,,313,,1257346704474764490;
-<rl_function_of_keyseq,,314,,1257346704474773795;
->rl_function_of_keyseq,,1257346704474780757;
-<rl_bind_keyseq_in_map,,315,,1257346704474788673;
-<rl_generic_bind,,316,,1257346704474798071;
-<xmalloc,,317,,1257346704474818954;
->xmalloc,,1257346704474825619;
-<rl_translate_keyseq,,318,,1257346704474833152;
->rl_translate_keyseq,,1257346704474840078;
->rl_generic_bind,,1257346704474844740;
->rl_bind_keyseq_in_map,,1257346704474849525;
->rl_bind_keyseq_if_unbound_in_map,,1257346704474853612;
->rl_bind_keyseq_if_unbound,,1257346704474858547;
-<rl_bind_keyseq_if_unbound,,319,,1257346704474866598;
-<rl_bind_keyseq_if_unbound_in_map,,320,,1257346704474876715;
-<rl_function_of_keyseq,,321,,1257346704474886176;
->rl_function_of_keyseq,,1257346704474893066;
-<rl_bind_keyseq_in_map,,322,,1257346704474900931;
-<rl_generic_bind,,323,,1257346704474910278;
-<xmalloc,,324,,1257346704474930653;
->xmalloc,,1257346704474937354;
-<rl_translate_keyseq,,325,,1257346704474944926;
->rl_translate_keyseq,,1257346704474951702;
->rl_generic_bind,,1257346704474956490;
->rl_bind_keyseq_in_map,,1257346704474961362;
->rl_bind_keyseq_if_unbound_in_map,,1257346704474965452;
->rl_bind_keyseq_if_unbound,,1257346704474970399;
-<rl_bind_keyseq_if_unbound,,326,,1257346704474978387;
-<rl_bind_keyseq_if_unbound_in_map,,327,,1257346704474988441;
-<rl_function_of_keyseq,,328,,1257346704474997770;
->rl_function_of_keyseq,,1257346704475004675;
-<rl_bind_keyseq_in_map,,329,,1257346704475013096;
-<rl_generic_bind,,330,,1257346704475022410;
-<xmalloc,,331,,1257346704475043233;
->xmalloc,,1257346704475049864;
-<rl_translate_keyseq,,332,,1257346704475057476;
->rl_translate_keyseq,,1257346704475064222;
->rl_generic_bind,,1257346704475068908;
->rl_bind_keyseq_in_map,,1257346704475073723;
->rl_bind_keyseq_if_unbound_in_map,,1257346704475077789;
->rl_bind_keyseq_if_unbound,,1257346704475082757;
-<rl_bind_keyseq_if_unbound,,333,,1257346704475091156;
-<rl_bind_keyseq_if_unbound_in_map,,334,,1257346704475101235;
-<rl_function_of_keyseq,,335,,1257346704475110639;
->rl_function_of_keyseq,,1257346704475117694;
-<rl_bind_keyseq_in_map,,336,,1257346704475125580;
-<rl_generic_bind,,337,,1257346704475135044;
-<xmalloc,,338,,1257346704475156144;
->xmalloc,,1257346704475162803;
-<rl_translate_keyseq,,339,,1257346704475170378;
->rl_translate_keyseq,,1257346704475177298;
-<rl_make_bare_keymap,,340,,1257346704475185271;
-<xmalloc,,341,,1257346704475205186;
->xmalloc,,1257346704475214437;
->rl_make_bare_keymap,,1257346704475219520;
-<rl_make_bare_keymap,,342,,1257346704475227303;
-<xmalloc,,343,,1257346704475248066;
->xmalloc,,1257346704475254851;
->rl_make_bare_keymap,,1257346704475259900;
->rl_generic_bind,,1257346704475264610;
->rl_bind_keyseq_in_map,,1257346704475269377;
->rl_bind_keyseq_if_unbound_in_map,,1257346704475273464;
->rl_bind_keyseq_if_unbound,,1257346704475278435;
->bind_termcap_arrow_keys,,1257346704475283259;
-<bind_termcap_arrow_keys,,344,,1257346704475290369;
-<rl_bind_keyseq_if_unbound,,345,,1257346704475300567;
-<rl_bind_keyseq_if_unbound_in_map,,346,,1257346704475310720;
-<rl_function_of_keyseq,,347,,1257346704475320031;
->rl_function_of_keyseq,,1257346704475327167;
-<rl_bind_keyseq_in_map,,348,,1257346704475335122;
-<rl_generic_bind,,349,,1257346704475344520;
-<xmalloc,,350,,1257346704475365981;
->xmalloc,,1257346704475372595;
-<rl_translate_keyseq,,351,,1257346704475380137;
->rl_translate_keyseq,,1257346704475386934;
-<rl_make_bare_keymap,,352,,1257346704475394886;
-<xmalloc,,353,,1257346704475414557;
->xmalloc,,1257346704475423775;
->rl_make_bare_keymap,,1257346704475428930;
-<rl_make_bare_keymap,,354,,1257346704475436680;
-<xmalloc,,355,,1257346704475457227;
->xmalloc,,1257346704475463927;
->rl_make_bare_keymap,,1257346704475468823;
->rl_generic_bind,,1257346704475473533;
->rl_bind_keyseq_in_map,,1257346704475478243;
->rl_bind_keyseq_if_unbound_in_map,,1257346704475482291;
->rl_bind_keyseq_if_unbound,,1257346704475487193;
-<rl_bind_keyseq_if_unbound,,356,,1257346704475495328;
-<rl_bind_keyseq_if_unbound_in_map,,357,,1257346704475505412;
-<rl_function_of_keyseq,,358,,1257346704475514705;
->rl_function_of_keyseq,,1257346704475521628;
-<rl_bind_keyseq_in_map,,359,,1257346704475529474;
-<rl_generic_bind,,360,,1257346704475538860;
-<xmalloc,,361,,1257346704475559774;
->xmalloc,,1257346704475566456;
-<rl_translate_keyseq,,362,,1257346704475574405;
->rl_translate_keyseq,,1257346704475581199;
->rl_generic_bind,,1257346704475586047;
->rl_bind_keyseq_in_map,,1257346704475590862;
->rl_bind_keyseq_if_unbound_in_map,,1257346704475594913;
->rl_bind_keyseq_if_unbound,,1257346704475599872;
-<rl_bind_keyseq_if_unbound,,363,,1257346704475617704;
-<rl_bind_keyseq_if_unbound_in_map,,364,,1257346704475628287;
-<rl_function_of_keyseq,,365,,1257346704475637893;
->rl_function_of_keyseq,,1257346704475644969;
-<rl_bind_keyseq_in_map,,366,,1257346704475653327;
-<rl_generic_bind,,367,,1257346704475662773;
-<xmalloc,,368,,1257346704475683437;
->xmalloc,,1257346704475690123;
-<rl_translate_keyseq,,369,,1257346704475697825;
->rl_translate_keyseq,,1257346704475704754;
->rl_generic_bind,,1257346704475709581;
->rl_bind_keyseq_in_map,,1257346704475714396;
->rl_bind_keyseq_if_unbound_in_map,,1257346704475718480;
->rl_bind_keyseq_if_unbound,,1257346704475723580;
-<rl_bind_keyseq_if_unbound,,370,,1257346704475732091;
-<rl_bind_keyseq_if_unbound_in_map,,371,,1257346704475742389;
-<rl_function_of_keyseq,,372,,1257346704475751718;
->rl_function_of_keyseq,,1257346704475758575;
-<rl_bind_keyseq_in_map,,373,,1257346704475766379;
-<rl_generic_bind,,374,,1257346704475775777;
-<xmalloc,,375,,1257346704475796270;
->xmalloc,,1257346704475802874;
-<rl_translate_keyseq,,376,,1257346704475810540;
->rl_translate_keyseq,,1257346704475817430;
->rl_generic_bind,,1257346704475822149;
->rl_bind_keyseq_in_map,,1257346704475826946;
->rl_bind_keyseq_if_unbound_in_map,,1257346704475831075;
->rl_bind_keyseq_if_unbound,,1257346704475836043;
-<rl_bind_keyseq_if_unbound,,377,,1257346704475843944;
-<rl_bind_keyseq_if_unbound_in_map,,378,,1257346704475853946;
-<rl_function_of_keyseq,,379,,1257346704475863245;
->rl_function_of_keyseq,,1257346704475870159;
-<rl_bind_keyseq_in_map,,380,,1257346704475877979;
-<rl_generic_bind,,381,,1257346704475887290;
-<xmalloc,,382,,1257346704475907686;
->xmalloc,,1257346704475914338;
-<rl_translate_keyseq,,383,,1257346704475921953;
->rl_translate_keyseq,,1257346704475928723;
->rl_generic_bind,,1257346704475933451;
->rl_bind_keyseq_in_map,,1257346704475938199;
->rl_bind_keyseq_if_unbound_in_map,,1257346704475942250;
->rl_bind_keyseq_if_unbound,,1257346704475947201;
-<rl_bind_keyseq_if_unbound,,384,,1257346704475955113;
-<rl_bind_keyseq_if_unbound_in_map,,385,,1257346704475965089;
-<rl_function_of_keyseq,,386,,1257346704475974433;
->rl_function_of_keyseq,,1257346704475981392;
-<rl_bind_keyseq_in_map,,387,,1257346704475989398;
-<rl_generic_bind,,388,,1257346704475998853;
-<xmalloc,,389,,1257346704476019887;
->xmalloc,,1257346704476026603;
-<rl_translate_keyseq,,390,,1257346704476034232;
->rl_translate_keyseq,,1257346704476041099;
->rl_generic_bind,,1257346704476045898;
->rl_bind_keyseq_in_map,,1257346704476050647;
->rl_bind_keyseq_if_unbound_in_map,,1257346704476054782;
->rl_bind_keyseq_if_unbound,,1257346704476059772;
-<rl_bind_keyseq_if_unbound,,391,,1257346704476067901;
-<rl_bind_keyseq_if_unbound_in_map,,392,,1257346704476077876;
-<rl_function_of_keyseq,,393,,1257346704476087217;
->rl_function_of_keyseq,,1257346704476094264;
-<rl_bind_keyseq_in_map,,394,,1257346704476102200;
-<rl_generic_bind,,395,,1257346704476111629;
-<xmalloc,,396,,1257346704476132458;
->xmalloc,,1257346704476139132;
-<rl_translate_keyseq,,397,,1257346704476146650;
->rl_translate_keyseq,,1257346704476153549;
-<rl_make_bare_keymap,,398,,1257346704476161453;
-<xmalloc,,399,,1257346704476181239;
->xmalloc,,1257346704476190607;
->rl_make_bare_keymap,,1257346704476195662;
-<rl_make_bare_keymap,,400,,1257346704476203316;
-<xmalloc,,401,,1257346704476223971;
->xmalloc,,1257346704476230873;
->rl_make_bare_keymap,,1257346704476235862;
->rl_generic_bind,,1257346704476240539;
->rl_bind_keyseq_in_map,,1257346704476245267;
->rl_bind_keyseq_if_unbound_in_map,,1257346704476249498;
->rl_bind_keyseq_if_unbound,,1257346704476254478;
->bind_termcap_arrow_keys,,1257346704476259381;
->_rl_init_terminal_io,,1257346704476264382;
->rl_reset_terminal,,1257346704476269275;
-<rl_get_screen_size,,402,,1257346704476276848;
->rl_get_screen_size,,1257346704476285413;
-<ui_file_isatty,,403,,1257346704476304979;
-<stdio_file_isatty,,404,,1257346704476330260;
-<ui_file_data,,405,,1257346704476353375;
->ui_file_data,,1257346704476362042;
->stdio_file_isatty,,1257346704476372493;
->ui_file_isatty,,1257346704476376367;
-<set_screen_size,,406,,1257346704476395214;
-<rl_set_screen_size,,407,,1257346704476406438;
-<_rl_set_screen_size,,408,,1257346704476417325;
->_rl_set_screen_size,,1257346704476425565;
->rl_set_screen_size,,1257346704476429469;
->set_screen_size,,1257346704476434374;
-<set_width,,409,,1257346704476452566;
-<xmalloc,,410,,1257346704476474234;
->xmalloc,,1257346704476481124;
->set_width,,1257346704476485735;
->init_page_info,,1257346704476490393;
-<add_setshow_boolean_cmd,,411,,1257346704476509851;
-<add_setshow_cmd_full,,412,,1257346704476531412;
-<xstrdup,,413,,1257346704476538461;
-<xmalloc,,414,,1257346704476558024;
->xmalloc,,1257346704476564689;
->xstrdup,,1257346704476569326;
-<xstrdup,,415,,1257346704476573946;
-<xmalloc,,416,,1257346704476591503;
->xmalloc,,1257346704476598209;
->xstrdup,,1257346704476608617;
-<add_set_or_show_cmd,,417,,1257346704476628893;
-<add_cmd,,418,,1257346704476647097;
-<xmalloc,,419,,1257346704476666856;
->xmalloc,,1257346704476673548;
-<delete_cmd,,420,,1257346704476692548;
->delete_cmd,,1257346704476699607;
->add_cmd,,1257346704476704025;
->add_set_or_show_cmd,,1257346704476708659;
-<add_set_or_show_cmd,,421,,1257346704476726313;
-<add_cmd,,422,,1257346704476743407;
-<xmalloc,,423,,1257346704476763385;
->xmalloc,,1257346704476769990;
-<delete_cmd,,424,,1257346704476788221;
->delete_cmd,,1257346704476795024;
->add_cmd,,1257346704476799574;
->add_set_or_show_cmd,,1257346704476804235;
->add_setshow_cmd_full,,1257346704476809225;
->add_setshow_boolean_cmd,,1257346704476814082;
-<add_setshow_boolean_cmd,,425,,1257346704476830959;
-<add_setshow_cmd_full,,426,,1257346704476851605;
-<xstrdup,,427,,1257346704476858279;
-<xmalloc,,428,,1257346704476878107;
->xmalloc,,1257346704476884816;
->xstrdup,,1257346704476889249;
-<xstrdup,,429,,1257346704476893739;
-<xmalloc,,430,,1257346704476910792;
->xmalloc,,1257346704476917447;
->xstrdup,,1257346704476921925;
-<add_set_or_show_cmd,,431,,1257346704476939320;
-<add_cmd,,432,,1257346704476956958;
-<xmalloc,,433,,1257346704476976934;
->xmalloc,,1257346704476983532;
-<delete_cmd,,434,,1257346704477001384;
->delete_cmd,,1257346704477008488;
->add_cmd,,1257346704477012912;
->add_set_or_show_cmd,,1257346704477017513;
-<add_set_or_show_cmd,,435,,1257346704477034851;
-<add_cmd,,436,,1257346704477052026;
-<xmalloc,,437,,1257346704477071656;
->xmalloc,,1257346704477078371;
-<delete_cmd,,438,,1257346704477096169;
->delete_cmd,,1257346704477103107;
->add_cmd,,1257346704477107570;
->add_set_or_show_cmd,,1257346704477112316;
->add_setshow_cmd_full,,1257346704477117086;
->add_setshow_boolean_cmd,,1257346704477122060;
-<add_setshow_boolean_cmd,,439,,1257346704477139146;
-<add_setshow_cmd_full,,440,,1257346704477160143;
-<xstrdup,,441,,1257346704477166817;
-<xmalloc,,442,,1257346704477188582;
->xmalloc,,1257346704477195439;
->xstrdup,,1257346704477199860;
-<xstrdup,,443,,1257346704477204325;
-<xmalloc,,444,,1257346704477221384;
->xmalloc,,1257346704477230370;
->xstrdup,,1257346704477234857;
-<add_set_or_show_cmd,,445,,1257346704477251990;
-<add_cmd,,446,,1257346704477269490;
-<xmalloc,,447,,1257346704477289430;
->xmalloc,,1257346704477295992;
-<delete_cmd,,448,,1257346704477313721;
->delete_cmd,,1257346704477320575;
->add_cmd,,1257346704477324989;
->add_set_or_show_cmd,,1257346704477329591;
-<add_set_or_show_cmd,,449,,1257346704477346658;
-<add_cmd,,450,,1257346704477364140;
-<xmalloc,,451,,1257346704477383773;
->xmalloc,,1257346704477390398;
-<delete_cmd,,452,,1257346704477408049;
->delete_cmd,,1257346704477414863;
->add_cmd,,1257346704477419282;
->add_set_or_show_cmd,,1257346704477423940;
->add_setshow_cmd_full,,1257346704477428746;
->add_setshow_boolean_cmd,,1257346704477433600;
-<add_setshow_boolean_cmd,,453,,1257346704477450441;
-<add_setshow_cmd_full,,454,,1257346704477471268;
-<xstrdup,,455,,1257346704477478023;
-<xmalloc,,456,,1257346704477498356;
->xmalloc,,1257346704477504951;
->xstrdup,,1257346704477509390;
-<xstrdup,,457,,1257346704477513862;
-<xmalloc,,458,,1257346704477530869;
->xmalloc,,1257346704477537458;
->xstrdup,,1257346704477541867;
-<add_set_or_show_cmd,,459,,1257346704477558940;
-<add_cmd,,460,,1257346704477576254;
-<xmalloc,,461,,1257346704477596118;
->xmalloc,,1257346704477607116;
-<delete_cmd,,462,,1257346704477625558;
->delete_cmd,,1257346704477632538;
->add_cmd,,1257346704477636941;
->add_set_or_show_cmd,,1257346704477641581;
-<add_set_or_show_cmd,,463,,1257346704477658796;
-<add_cmd,,464,,1257346704477676332;
-<xmalloc,,465,,1257346704477696277;
->xmalloc,,1257346704477703047;
-<delete_cmd,,466,,1257346704477720797;
->delete_cmd,,1257346704477727723;
->add_cmd,,1257346704477732159;
->add_set_or_show_cmd,,1257346704477736827;
->add_setshow_cmd_full,,1257346704477741647;
->add_setshow_boolean_cmd,,1257346704477746429;
-<add_setshow_boolean_cmd,,467,,1257346704477764092;
-<add_setshow_cmd_full,,468,,1257346704477785297;
-<xstrprintf,,469,,1257346704477807288;
-<xstrvprintf,,470,,1257346704477827404;
->xstrvprintf,,1257346704477836391;
->xstrprintf,,1257346704477841130;
-<xstrprintf,,471,,1257346704477859791;
-<xstrvprintf,,472,,1257346704477879658;
->xstrvprintf,,1257346704477887794;
->xstrprintf,,1257346704477892380;
-<add_set_or_show_cmd,,473,,1257346704477909799;
-<add_cmd,,474,,1257346704477927392;
-<xmalloc,,475,,1257346704477947106;
->xmalloc,,1257346704477953927;
-<delete_cmd,,476,,1257346704477974717;
->delete_cmd,,1257346704478002361;
->add_cmd,,1257346704478007011;
->add_set_or_show_cmd,,1257346704478011676;
-<add_set_or_show_cmd,,477,,1257346704478029299;
-<add_cmd,,478,,1257346704478046844;
-<xmalloc,,479,,1257346704478066495;
->xmalloc,,1257346704478073280;
-<delete_cmd,,480,,1257346704478090936;
->delete_cmd,,1257346704478097847;
->add_cmd,,1257346704478102265;
->add_set_or_show_cmd,,1257346704478106912;
->add_setshow_cmd_full,,1257346704478111663;
->add_setshow_boolean_cmd,,1257346704478116551;
->initialize_utils,,1257346704478121519;
-<initialize_all_files,,481,,1257346704478137930;
-<_initialize_gdbtypes,,482,,1257346704478154077;
-<gdbarch_data_register_post_init,,483,,1257346704478168784;
-<gdbarch_data_register,,484,,1257346704478183944;
-<xmalloc,,485,,1257346704478204554;
->xmalloc,,1257346704478211261;
-<xmalloc,,486,,1257346704478225146;
->xmalloc,,1257346704478231771;
->gdbarch_data_register,,1257346704478236821;
->gdbarch_data_register_post_init,,1257346704478241076;
-<register_objfile_data,,487,,1257346704478258128;
-<register_objfile_data_with_cleanup,,488,,1257346704478280073;
-<xmalloc,,489,,1257346704478301306;
->xmalloc,,1257346704478308034;
-<xmalloc,,490,,1257346704478321883;
->xmalloc,,1257346704478328469;
->register_objfile_data_with_cleanup,,1257346704478333994;
->register_objfile_data,,1257346704478339193;
-<add_setshow_zinteger_cmd,,491,,1257346704478356582;
-<add_setshow_cmd_full,,492,,1257346704478376531;
-<xstrprintf,,493,,1257346704478396993;
-<xstrvprintf,,494,,1257346704478416220;
->xstrvprintf,,1257346704478425693;
->xstrprintf,,1257346704478430294;
-<xstrprintf,,495,,1257346704478448102;
-<xstrvprintf,,496,,1257346704478467265;
->xstrvprintf,,1257346704478474832;
->xstrprintf,,1257346704478479391;
-<add_set_or_show_cmd,,497,,1257346704478495649;
-<add_cmd,,498,,1257346704478512060;
-<xmalloc,,499,,1257346704478531260;
->xmalloc,,1257346704478537867;
-<delete_cmd,,500,,1257346704478554417;
->delete_cmd,,1257346704478561310;
->add_cmd,,1257346704478565725;
->add_set_or_show_cmd,,1257346704478570362;
-<add_set_or_show_cmd,,501,,1257346704478586699;
-<add_cmd,,502,,1257346704478607911;
-<xmalloc,,503,,1257346704478627931;
->xmalloc,,1257346704478634746;
-<delete_cmd,,504,,1257346704478651287;
->delete_cmd,,1257346704478658174;
->add_cmd,,1257346704478662616;
->add_set_or_show_cmd,,1257346704478667274;
->add_setshow_cmd_full,,1257346704478672041;
->add_setshow_zinteger_cmd,,1257346704478676158;
-<add_setshow_boolean_cmd,,505,,1257346704478692383;
-<add_setshow_cmd_full,,506,,1257346704478712452;
-<xstrdup,,507,,1257346704478719357;
-<xmalloc,,508,,1257346704478738626;
->xmalloc,,1257346704478745362;
->xstrdup,,1257346704478749783;
-<xstrdup,,509,,1257346704478754240;
-<xmalloc,,510,,1257346704478770336;
->xmalloc,,1257346704478776985;
->xstrdup,,1257346704478781385;
-<add_set_or_show_cmd,,511,,1257346704478797863;
-<add_cmd,,512,,1257346704478814124;
-<xmalloc,,513,,1257346704478833609;
->xmalloc,,1257346704478840202;
-<delete_cmd,,514,,1257346704478856896;
->delete_cmd,,1257346704478863918;
->add_cmd,,1257346704478868414;
->add_set_or_show_cmd,,1257346704478873058;
-<add_set_or_show_cmd,,515,,1257346704478889436;
-<add_cmd,,516,,1257346704478906263;
-<xmalloc,,517,,1257346704478926046;
->xmalloc,,1257346704478932683;
-<delete_cmd,,518,,1257346704478949049;
->delete_cmd,,1257346704478955876;
->add_cmd,,1257346704478960294;
->add_set_or_show_cmd,,1257346704478964926;
->add_setshow_cmd_full,,1257346704478969810;
->add_setshow_boolean_cmd,,1257346704478974718;
->_initialize_gdbtypes,,1257346704478979605;
-<_initialize_i386_tdep,,519,,1257346704478996837;
-<register_gdbarch_init,,520,,1257346704479011613;
-<gdbarch_register,,521,,1257346704479022807;
-<bfd_lookup_arch,,522,,1257346704479033227;
->bfd_lookup_arch,,1257346704479042905;
-<xmalloc,,523,,1257346704479059867;
->xmalloc,,1257346704479066655;
->gdbarch_register,,1257346704479071768;
->register_gdbarch_init,,1257346704479076817;
-<add_setshow_enum_cmd,,524,,1257346704479094347;
-<add_setshow_cmd_full,,525,,1257346704479115522;
-<xstrprintf,,526,,1257346704479135910;
-<xstrvprintf,,527,,1257346704479155248;
->xstrvprintf,,1257346704479165356;
->xstrprintf,,1257346704479169972;
-<xstrprintf,,528,,1257346704479188038;
-<xstrvprintf,,529,,1257346704479207661;
->xstrvprintf,,1257346704479215243;
->xstrprintf,,1257346704479219799;
-<add_set_or_show_cmd,,530,,1257346704479236842;
-<add_cmd,,531,,1257346704479252800;
-<xmalloc,,532,,1257346704479271978;
->xmalloc,,1257346704479278612;
-<delete_cmd,,533,,1257346704479294828;
->delete_cmd,,1257346704479301667;
->add_cmd,,1257346704479306085;
->add_set_or_show_cmd,,1257346704479310735;
-<add_set_or_show_cmd,,534,,1257346704479326900;
-<add_cmd,,535,,1257346704479343131;
-<xmalloc,,536,,1257346704479361960;
->xmalloc,,1257346704479368709;
-<delete_cmd,,537,,1257346704479384946;
->delete_cmd,,1257346704479391839;
->add_cmd,,1257346704479396299;
->add_set_or_show_cmd,,1257346704479400963;
->add_setshow_cmd_full,,1257346704479405715;
->add_setshow_enum_cmd,,1257346704479410485;
-<add_setshow_enum_cmd,,538,,1257346704479427107;
-<add_setshow_cmd_full,,539,,1257346704479446740;
-<xstrprintf,,540,,1257346704479466962;
-<xstrvprintf,,541,,1257346704479486257;
->xstrvprintf,,1257346704479494311;
->xstrprintf,,1257346704479498933;
-<xstrprintf,,542,,1257346704479516774;
-<xstrvprintf,,543,,1257346704479536051;
->xstrvprintf,,1257346704479544126;
->xstrprintf,,1257346704479548716;
-<add_set_or_show_cmd,,544,,1257346704479565052;
-<add_cmd,,545,,1257346704479581584;
-<xmalloc,,546,,1257346704479604793;
->xmalloc,,1257346704479612116;
-<delete_cmd,,547,,1257346704479628353;
->delete_cmd,,1257346704479635246;
->add_cmd,,1257346704479639727;
->add_set_or_show_cmd,,1257346704479644350;
-<add_set_or_show_cmd,,548,,1257346704479660716;
-<add_cmd,,549,,1257346704479677272;
-<xmalloc,,550,,1257346704479696212;
->xmalloc,,1257346704479702880;
-<delete_cmd,,551,,1257346704479719869;
->delete_cmd,,1257346704479726789;
->add_cmd,,1257346704479731282;
->add_set_or_show_cmd,,1257346704479735920;
->add_setshow_cmd_full,,1257346704479740644;
->add_setshow_enum_cmd,,1257346704479745405;
-<gdbarch_register_osabi_sniffer,,552,,1257346704479756743;
-<xmalloc,,553,,1257346704479777368;
->xmalloc,,1257346704479784120;
->gdbarch_register_osabi_sniffer,,1257346704479789328;
-<gdbarch_register_osabi,,554,,1257346704479800173;
-<bfd_lookup_arch,,555,,1257346704479810161;
->bfd_lookup_arch,,1257346704479816874;
-<xmalloc,,556,,1257346704479833478;
->xmalloc,,1257346704479840184;
->gdbarch_register_osabi,,1257346704479846629;
-<gdbarch_register_osabi,,557,,1257346704479856012;
-<bfd_lookup_arch,,558,,1257346704479864614;
->bfd_lookup_arch,,1257346704479871293;
-<xmalloc,,559,,1257346704479887350;
->xmalloc,,1257346704479893945;
->gdbarch_register_osabi,,1257346704479898718;
-<reggroup_new,,560,,1257346704479908859;
-<xmalloc,,561,,1257346704479928293;
->xmalloc,,1257346704479934966;
->reggroup_new,,1257346704479939916;
-<reggroup_new,,562,,1257346704479948794;
-<xmalloc,,563,,1257346704479965645;
->xmalloc,,1257346704479972445;
->reggroup_new,,1257346704479977088;
->_initialize_i386_tdep,,1257346704479982108;
-<_initialize_i386_linux_tdep,,564,,1257346704479997241;
-<gdbarch_register_osabi,,565,,1257346704480010266;
-<bfd_lookup_arch,,566,,1257346704480018897;
->bfd_lookup_arch,,1257346704480025706;
-<xmalloc,,567,,1257346704480041838;
->xmalloc,,1257346704480048650;
->gdbarch_register_osabi,,1257346704480053465;
->_initialize_i386_linux_tdep,,1257346704480058475;
-<_initialize_solib,,568,,1257346704480076351;
-<gdbarch_data_register_pre_init,,569,,1257346704480092970;
-<gdbarch_data_register,,570,,1257346704480107512;
-<xmalloc,,571,,1257346704480125803;
->xmalloc,,1257346704480132449;
-<xmalloc,,572,,1257346704480145841;
->xmalloc,,1257346704480152439;
->gdbarch_data_register,,1257346704480157293;
->gdbarch_data_register_pre_init,,1257346704480161420;
-<add_com,,573,,1257346704480177581;
-<add_cmd,,574,,1257346704480193007;
-<xmalloc,,575,,1257346704480211223;
->xmalloc,,1257346704480217917;
-<delete_cmd,,576,,1257346704480233108;
->delete_cmd,,1257346704480241062;
->add_cmd,,1257346704480245591;
->add_com,,1257346704480249937;
-<add_info,,577,,1257346704480264331;
-<add_cmd,,578,,1257346704480279948;
-<xmalloc,,579,,1257346704480307842;
->xmalloc,,1257346704480315608;
-<delete_cmd,,580,,1257346704480331002;
->delete_cmd,,1257346704480338052;
->add_cmd,,1257346704480342581;
->add_info,,1257346704480347071;
-<add_com,,581,,1257346704480363302;
-<add_cmd,,582,,1257346704480379058;
-<xmalloc,,583,,1257346704480397611;
->xmalloc,,1257346704480404242;
-<delete_cmd,,584,,1257346704480419328;
->delete_cmd,,1257346704480426194;
->add_cmd,,1257346704480430620;
->add_com,,1257346704480434945;
-<add_setshow_boolean_cmd,,585,,1257346704480449814;
-<add_setshow_cmd_full,,586,,1257346704480469200;
-<xstrprintf,,587,,1257346704480488216;
-<xstrvprintf,,588,,1257346704480506284;
->xstrvprintf,,1257346704480518134;
->xstrprintf,,1257346704480522849;
-<xstrprintf,,589,,1257346704480539456;
-<xstrvprintf,,590,,1257346704480558105;
->xstrvprintf,,1257346704480566589;
->xstrprintf,,1257346704480571176;
-<add_set_or_show_cmd,,591,,1257346704480586986;
-<add_cmd,,592,,1257346704480607234;
-<xmalloc,,593,,1257346704480625534;
->xmalloc,,1257346704480632348;
-<delete_cmd,,594,,1257346704480647858;
->delete_cmd,,1257346704480654805;
->add_cmd,,1257346704480659253;
->add_set_or_show_cmd,,1257346704480663936;
-<add_set_or_show_cmd,,595,,1257346704480679484;
-<add_cmd,,596,,1257346704480695228;
-<xmalloc,,597,,1257346704480713489;
->xmalloc,,1257346704480720295;
-<delete_cmd,,598,,1257346704480735687;
->delete_cmd,,1257346704480742610;
->add_cmd,,1257346704480746992;
->add_set_or_show_cmd,,1257346704480751617;
->add_setshow_cmd_full,,1257346704480756393;
->add_setshow_boolean_cmd,,1257346704480761292;
-<add_setshow_filename_cmd,,599,,1257346704480777616;
-<add_setshow_cmd_full,,600,,1257346704480797998;
-<xstrprintf,,601,,1257346704480816884;
-<xstrvprintf,,602,,1257346704480835269;
->xstrvprintf,,1257346704480843623;
->xstrprintf,,1257346704480848186;
-<xstrprintf,,603,,1257346704480864381;
-<xstrvprintf,,604,,1257346704480882449;
->xstrvprintf,,1257346704480890392;
->xstrprintf,,1257346704480894936;
-<add_set_or_show_cmd,,605,,1257346704480910163;
-<add_cmd,,606,,1257346704480925816;
-<xmalloc,,607,,1257346704480943530;
->xmalloc,,1257346704480950143;
-<delete_cmd,,608,,1257346704480965051;
->delete_cmd,,1257346704480972059;
->add_cmd,,1257346704480976591;
->add_set_or_show_cmd,,1257346704480981228;
-<add_set_or_show_cmd,,609,,1257346704480997029;
-<add_cmd,,610,,1257346704481012322;
-<xmalloc,,611,,1257346704481030057;
->xmalloc,,1257346704481036908;
-<delete_cmd,,612,,1257346704481052173;
->delete_cmd,,1257346704481059115;
->add_cmd,,1257346704481063596;
->add_set_or_show_cmd,,1257346704481068257;
->add_setshow_cmd_full,,1257346704481072955;
->add_setshow_filename_cmd,,1257346704481077989;
-<add_alias_cmd,,613,,1257346704481090699;
-<lookup_cmd,,614,,1257346704481109227;
-<lookup_cmd_1,,615,,1257346704481126051;
-<find_command_name_length,,616,,1257346704481144697;
->find_command_name_length,,1257346704481154549;
-<find_cmd,,617,,1257346704481168059;
->find_cmd,,1257346704481177658;
->lookup_cmd_1,,1257346704481182356;
->lookup_cmd,,1257346704481186897;
-<add_cmd,,618,,1257346704481199348;
-<xmalloc,,619,,1257346704481216920;
->xmalloc,,1257346704481223690;
-<delete_cmd,,620,,1257346704481238935;
->delete_cmd,,1257346704481245897;
->add_cmd,,1257346704481250339;
->add_alias_cmd,,1257346704481255024;
-<add_alias_cmd,,621,,1257346704481267204;
-<lookup_cmd,,622,,1257346704481283111;
-<lookup_cmd_1,,623,,1257346704481298355;
-<find_command_name_length,,624,,1257346704481314984;
->find_command_name_length,,1257346704481322234;
-<find_cmd,,625,,1257346704481335497;
->find_cmd,,1257346704481342411;
->lookup_cmd_1,,1257346704481347046;
->lookup_cmd,,1257346704481351503;
-<add_cmd,,626,,1257346704481363987;
-<xmalloc,,627,,1257346704481381021;
->xmalloc,,1257346704481387818;
-<delete_cmd,,628,,1257346704481402241;
->delete_cmd,,1257346704481409275;
->add_cmd,,1257346704481413687;
->add_alias_cmd,,1257346704481418250;
-<add_setshow_optional_filename_cmd,,629,,1257346704481434348;
-<add_setshow_cmd_full,,630,,1257346704481454736;
-<xstrprintf,,631,,1257346704481473650;
-<xstrvprintf,,632,,1257346704481492154;
->xstrvprintf,,1257346704481500443;
->xstrprintf,,1257346704481505014;
-<xstrprintf,,633,,1257346704481521245;
-<xstrvprintf,,634,,1257346704481539419;
->xstrvprintf,,1257346704481547274;
->xstrprintf,,1257346704481551825;
-<add_set_or_show_cmd,,635,,1257346704481566645;
-<add_cmd,,636,,1257346704481582046;
-<xmalloc,,637,,1257346704481599390;
->xmalloc,,1257346704481610593;
-<delete_cmd,,638,,1257346704481625398;
->delete_cmd,,1257346704481632348;
->add_cmd,,1257346704481636823;
->add_set_or_show_cmd,,1257346704481641407;
-<add_set_or_show_cmd,,639,,1257346704481656275;
-<add_cmd,,640,,1257346704481670973;
-<xmalloc,,641,,1257346704481688626;
->xmalloc,,1257346704481695242;
-<delete_cmd,,642,,1257346704481709784;
->delete_cmd,,1257346704481716695;
->add_cmd,,1257346704481721179;
->add_set_or_show_cmd,,1257346704481725810;
->add_setshow_cmd_full,,1257346704481730622;
->add_setshow_optional_filename_cmd,,1257346704481735879;
->_initialize_solib,,1257346704481740959;
-<_initialize_svr4_solib,,643,,1257346704481754564;
-<gdbarch_data_register_pre_init,,644,,1257346704481767962;
-<gdbarch_data_register,,645,,1257346704481779871;
-<xmalloc,,646,,1257346704481797306;
->xmalloc,,1257346704481804060;
-<xmalloc,,647,,1257346704481816794;
->xmalloc,,1257346704481823467;
->gdbarch_data_register,,1257346704481828306;
->gdbarch_data_register_pre_init,,1257346704481832339;
-<register_program_space_data_with_cleanup,,648,,1257346704481848417;
-<xmalloc,,649,,1257346704481868422;
->xmalloc,,1257346704481875114;
-<xmalloc,,650,,1257346704481887727;
->xmalloc,,1257346704481894398;
->register_program_space_data_with_cleanup,,1257346704481899976;
->_initialize_svr4_solib,,1257346704481905059;
-<_initialize_symfile_mem,,651,,1257346704481919263;
-<add_cmd,,652,,1257346704481936631;
-<xmalloc,,653,,1257346704481954757;
->xmalloc,,1257346704481961430;
-<delete_cmd,,654,,1257346704481975881;
->delete_cmd,,1257346704481982846;
->add_cmd,,1257346704481987240;
-<observer_attach_inferior_created,,655,,1257346704482003537;
-<generic_observer_attach,,656,,1257346704482024225;
-<xmalloc,,657,,1257346704482042829;
->xmalloc,,1257346704482049731;
-<xmalloc,,658,,1257346704482061830;
->xmalloc,,1257346704482068452;
->generic_observer_attach,,1257346704482073496;
->observer_attach_inferior_created,,1257346704482077829;
->_initialize_symfile_mem,,1257346704482082867;
-<_initialize_corelow,,659,,1257346704482097817;
-<add_target,,660,,1257346704482111197;
-<xmalloc,,661,,1257346704482130336;
->xmalloc,,1257346704482137368;
-<add_prefix_cmd,,662,,1257346704482150546;
-<add_cmd,,663,,1257346704482166973;
-<xmalloc,,664,,1257346704482183881;
->xmalloc,,1257346704482190593;
-<delete_cmd,,665,,1257346704482204929;
->delete_cmd,,1257346704482211856;
->add_cmd,,1257346704482216297;
->add_prefix_cmd,,1257346704482220884;
-<add_cmd,,666,,1257346704482232866;
-<xmalloc,,667,,1257346704482249632;
->xmalloc,,1257346704482256450;
-<delete_cmd,,668,,1257346704482270870;
->delete_cmd,,1257346704482277724;
->add_cmd,,1257346704482282076;
->add_target,,1257346704482286894;
->_initialize_corelow,,1257346704482291814;
-<_initialize_linux_tdep,,669,,1257346704482304415;
-<observer_attach_executable_changed,,670,,1257346704482324114;
-<generic_observer_attach,,671,,1257346704482342501;
-<xmalloc,,672,,1257346704482360089;
->xmalloc,,1257346704482366940;
-<xmalloc,,673,,1257346704482379556;
->xmalloc,,1257346704482386145;
->generic_observer_attach,,1257346704482390942;
->observer_attach_executable_changed,,1257346704482395239;
->_initialize_linux_tdep,,1257346704482400319;
-<_initialize_ser_hardwire,,674,,1257346704482413483;
-<xmalloc,,675,,1257346704482431569;
->xmalloc,,1257346704482438351;
-<serial_add_interface,,676,,1257346704482446772;
->serial_add_interface,,1257346704482457968;
-<add_setshow_boolean_cmd,,677,,1257346704482472546;
-<add_setshow_cmd_full,,678,,1257346704482490025;
-<xstrprintf,,679,,1257346704482507964;
-<xstrvprintf,,680,,1257346704482524748;
->xstrvprintf,,1257346704482534595;
->xstrprintf,,1257346704482539238;
-<xstrprintf,,681,,1257346704482555166;
-<xstrvprintf,,682,,1257346704482571667;
->xstrvprintf,,1257346704482579586;
->xstrprintf,,1257346704482584145;
-<add_set_or_show_cmd,,683,,1257346704482597573;
-<add_cmd,,684,,1257346704482616500;
-<xmalloc,,685,,1257346704482633354;
->xmalloc,,1257346704482640172;
-<delete_cmd,,686,,1257346704482653576;
->delete_cmd,,1257346704482660568;
->add_cmd,,1257346704482665016;
->add_set_or_show_cmd,,1257346704482669699;
-<add_set_or_show_cmd,,687,,1257346704482683052;
-<add_cmd,,688,,1257346704482696985;
-<xmalloc,,689,,1257346704482713135;
->xmalloc,,1257346704482719818;
-<delete_cmd,,690,,1257346704482734226;
->delete_cmd,,1257346704482741180;
->add_cmd,,1257346704482745673;
->add_set_or_show_cmd,,1257346704482750301;
->add_setshow_cmd_full,,1257346704482755053;
->add_setshow_boolean_cmd,,1257346704482760024;
->_initialize_ser_hardwire,,1257346704482765041;
-<_initialize_ser_pipe,,691,,1257346704482779019;
-<xmalloc,,692,,1257346704482796700;
->xmalloc,,1257346704482803494;
-<serial_add_interface,,693,,1257346704482810618;
->serial_add_interface,,1257346704482817487;
->_initialize_ser_pipe,,1257346704482822377;
-<_initialize_ser_tcp,,694,,1257346704482835441;
-<xmalloc,,695,,1257346704482852743;
->xmalloc,,1257346704482859516;
-<serial_add_interface,,696,,1257346704482866646;
->serial_add_interface,,1257346704482873612;
-<add_prefix_cmd,,697,,1257346704482885557;
-<add_cmd,,698,,1257346704482898721;
-<xmalloc,,699,,1257346704482914708;
->xmalloc,,1257346704482921409;
-<delete_cmd,,700,,1257346704482934061;
->delete_cmd,,1257346704482941089;
->add_cmd,,1257346704482945601;
->add_prefix_cmd,,1257346704482950108;
-<add_prefix_cmd,,701,,1257346704482961849;
-<add_cmd,,702,,1257346704482975172;
-<xmalloc,,703,,1257346704482991509;
->xmalloc,,1257346704482998303;
-<delete_cmd,,704,,1257346704483011069;
->delete_cmd,,1257346704483018076;
->add_cmd,,1257346704483022575;
->add_prefix_cmd,,1257346704483027096;
-<add_setshow_boolean_cmd,,705,,1257346704483040043;
-<add_setshow_cmd_full,,706,,1257346704483056680;
-<xstrdup,,707,,1257346704483063510;
-<xmalloc,,708,,1257346704483079034;
->xmalloc,,1257346704483085707;
->xstrdup,,1257346704483090182;
-<xstrdup,,709,,1257346704483094652;
-<xmalloc,,710,,1257346704483108161;
->xmalloc,,1257346704483114765;
->xstrdup,,1257346704483119298;
-<add_set_or_show_cmd,,711,,1257346704483132473;
-<add_cmd,,712,,1257346704483145853;
-<xmalloc,,713,,1257346704483161859;
->xmalloc,,1257346704483168508;
-<delete_cmd,,714,,1257346704483181533;
->delete_cmd,,1257346704483188513;
->add_cmd,,1257346704483192937;
->add_set_or_show_cmd,,1257346704483197557;
-<add_set_or_show_cmd,,715,,1257346704483210618;
-<add_cmd,,716,,1257346704483223959;
-<xmalloc,,717,,1257346704483240037;
->xmalloc,,1257346704483246716;
-<delete_cmd,,718,,1257346704483259648;
->delete_cmd,,1257346704483266529;
->add_cmd,,1257346704483270944;
->add_set_or_show_cmd,,1257346704483275618;
->add_setshow_cmd_full,,1257346704483280375;
->add_setshow_boolean_cmd,,1257346704483285262;
-<add_setshow_uinteger_cmd,,719,,1257346704483298351;
-<add_setshow_cmd_full,,720,,1257346704483315460;
-<xstrdup,,721,,1257346704483322209;
-<xmalloc,,722,,1257346704483337595;
->xmalloc,,1257346704483344283;
->xstrdup,,1257346704483348713;
-<xstrdup,,723,,1257346704483353170;
-<xmalloc,,724,,1257346704483366469;
->xmalloc,,1257346704483373073;
->xstrdup,,1257346704483377461;
-<add_set_or_show_cmd,,725,,1257346704483390191;
-<add_cmd,,726,,1257346704483403097;
-<xmalloc,,727,,1257346704483418540;
->xmalloc,,1257346704483425216;
-<delete_cmd,,728,,1257346704483437883;
->delete_cmd,,1257346704483444749;
->add_cmd,,1257346704483449212;
->add_set_or_show_cmd,,1257346704483453835;
-<add_set_or_show_cmd,,729,,1257346704483466553;
-<add_cmd,,730,,1257346704483479632;
-<xmalloc,,731,,1257346704483495346;
->xmalloc,,1257346704483504453;
-<delete_cmd,,732,,1257346704483517219;
->delete_cmd,,1257346704483524094;
->add_cmd,,1257346704483528587;
->add_set_or_show_cmd,,1257346704483533258;
->add_setshow_cmd_full,,1257346704483538019;
->add_setshow_uinteger_cmd,,1257346704483541986;
->_initialize_ser_tcp,,1257346704483546846;
-<_initialize_fork_child,,733,,1257346704483558274;
-<add_setshow_filename_cmd,,734,,1257346704483576538;
-<add_setshow_cmd_full,,735,,1257346704483593163;
-<xstrdup,,736,,1257346704483599857;
-<xmalloc,,737,,1257346704483621375;
->xmalloc,,1257346704483628232;
->xstrdup,,1257346704483632698;
-<xstrdup,,738,,1257346704483637167;
-<xmalloc,,739,,1257346704483650445;
->xmalloc,,1257346704483657079;
->xstrdup,,1257346704483661470;
-<add_set_or_show_cmd,,740,,1257346704483674273;
-<add_cmd,,741,,1257346704483687292;
-<xmalloc,,742,,1257346704483702777;
->xmalloc,,1257346704483709424;
-<delete_cmd,,743,,1257346704483722364;
->delete_cmd,,1257346704483729273;
->add_cmd,,1257346704483733793;
->add_set_or_show_cmd,,1257346704483738427;
-<add_set_or_show_cmd,,744,,1257346704483751272;
-<add_cmd,,745,,1257346704483764327;
-<xmalloc,,746,,1257346704483779767;
->xmalloc,,1257346704483786405;
-<delete_cmd,,747,,1257346704483799111;
->delete_cmd,,1257346704483805986;
->add_cmd,,1257346704483810455;
->add_set_or_show_cmd,,1257346704483815081;
->add_setshow_cmd_full,,1257346704483819814;
->add_setshow_filename_cmd,,1257346704483824777;
-<add_cmd,,748,,1257346704483836695;
-<xmalloc,,749,,1257346704483852797;
->xmalloc,,1257346704483859497;
-<delete_cmd,,750,,1257346704483872492;
->delete_cmd,,1257346704483879292;
->add_cmd,,1257346704483883686;
->_initialize_fork_child,,1257346704483888702;
-<_initialize_i386_linux_nat,,751,,1257346704483900437;
-<linux_target,,752,,1257346704483917490;
-<inf_ptrace_target,,753,,1257346704483928854;
-<inf_child_target,,754,,1257346704483939838;
-<xzalloc,,755,,1257346704483958595;
-<xcalloc,,756,,1257346704483972871;
->xcalloc,,1257346704483980231;
->xzalloc,,1257346704483984949;
->inf_child_target,,1257346704483989749;
->inf_ptrace_target,,1257346704483994714;
->linux_target,,1257346704483999460;
-<i386_use_watchpoints,,757,,1257346704484007237;
->i386_use_watchpoints,,1257346704484015977;
-<i386_set_debug_register_length,,758,,1257346704484023519;
-<add_setshow_boolean_cmd,,759,,1257346704484040839;
-<add_setshow_cmd_full,,760,,1257346704484057618;
-<xstrprintf,,761,,1257346704484075103;
-<xstrvprintf,,762,,1257346704484090369;
->xstrvprintf,,1257346704484100260;
->xstrprintf,,1257346704484104894;
-<xstrprintf,,763,,1257346704484120160;
-<xstrvprintf,,764,,1257346704484135751;
->xstrvprintf,,1257346704484143847;
->xstrprintf,,1257346704484148394;
-<add_set_or_show_cmd,,765,,1257346704484161464;
-<add_cmd,,766,,1257346704484174754;
-<xmalloc,,767,,1257346704484190639;
->xmalloc,,1257346704484197319;
-<delete_cmd,,768,,1257346704484210151;
->delete_cmd,,1257346704484216978;
->add_cmd,,1257346704484221381;
->add_set_or_show_cmd,,1257346704484226151;
-<add_set_or_show_cmd,,769,,1257346704484238968;
-<add_cmd,,770,,1257346704484252015;
-<xmalloc,,771,,1257346704484266995;
->xmalloc,,1257346704484273662;
-<delete_cmd,,772,,1257346704484286432;
->delete_cmd,,1257346704484293178;
->add_cmd,,1257346704484297637;
->add_set_or_show_cmd,,1257346704484302254;
->add_setshow_cmd_full,,1257346704484307036;
->add_setshow_boolean_cmd,,1257346704484311872;
->i386_set_debug_register_length,,1257346704484316981;
-<linux_nat_add_target,,773,,1257346704484329796;
-<add_target,,774,,1257346704484340734;
-<add_cmd,,775,,1257346704484353684;
-<xmalloc,,776,,1257346704484368790;
->xmalloc,,1257346704484375554;
-<delete_cmd,,777,,1257346704484388182;
->delete_cmd,,1257346704484395093;
->add_cmd,,1257346704484399502;
->add_target,,1257346704484403869;
->linux_nat_add_target,,1257346704484407803;
-<linux_nat_set_new_thread,,778,,1257346704484420572;
->linux_nat_set_new_thread,,1257346704484429685;
->_initialize_i386_linux_nat,,1257346704484434782;
-<_initialize_proc_service,,779,,1257346704484447275;
->_initialize_proc_service,,1257346704484456105;
-<_initialize_thread_db,,780,,1257346704484468273;
-<add_target,,781,,1257346704484479051;
-<add_cmd,,782,,1257346704484493180;
-<xmalloc,,783,,1257346704484508392;
->xmalloc,,1257346704484515068;
-<delete_cmd,,784,,1257346704484527645;
->delete_cmd,,1257346704484534611;
->add_cmd,,1257346704484539038;
->add_target,,1257346704484543447;
-<xstrdup,,785,,1257346704484547982;
-<xmalloc,,786,,1257346704484562769;
->xmalloc,,1257346704484569413;
->xstrdup,,1257346704484573885;
-<add_setshow_optional_filename_cmd,,787,,1257346704484586035;
-<add_setshow_cmd_full,,788,,1257346704484607114;
-<xstrprintf,,789,,1257346704484624341;
-<xstrvprintf,,790,,1257346704484639735;
->xstrvprintf,,1257346704484649269;
->xstrprintf,,1257346704484653900;
-<xstrprintf,,791,,1257346704484668601;
-<xstrvprintf,,792,,1257346704484684032;
->xstrvprintf,,1257346704484691968;
->xstrprintf,,1257346704484696534;
-<add_set_or_show_cmd,,793,,1257346704484709550;
-<add_cmd,,794,,1257346704484722864;
-<xmalloc,,795,,1257346704484737958;
->xmalloc,,1257346704484744704;
-<delete_cmd,,796,,1257346704484757579;
->delete_cmd,,1257346704484764598;
->add_cmd,,1257346704484769085;
->add_set_or_show_cmd,,1257346704484773756;
-<add_set_or_show_cmd,,797,,1257346704484786886;
-<add_cmd,,798,,1257346704484800110;
-<xmalloc,,799,,1257346704484815168;
->xmalloc,,1257346704484821899;
-<delete_cmd,,800,,1257346704484834969;
->delete_cmd,,1257346704484841865;
->add_cmd,,1257346704484846367;
->add_set_or_show_cmd,,1257346704484851085;
->add_setshow_cmd_full,,1257346704484855931;
->add_setshow_optional_filename_cmd,,1257346704484861085;
-<observer_attach_new_objfile,,801,,1257346704484875298;
-<generic_observer_attach,,802,,1257346704484893069;
-<xmalloc,,803,,1257346704484908152;
->xmalloc,,1257346704484914927;
-<xmalloc,,804,,1257346704484925724;
->xmalloc,,1257346704484932422;
->generic_observer_attach,,1257346704484937306;
->observer_attach_new_objfile,,1257346704484941615;
->_initialize_thread_db,,1257346704484946635;
-<_initialize_linux_nat,,805,,1257346704484959088;
-<add_info,,806,,1257346704484975112;
-<add_cmd,,807,,1257346704484988808;
-<xmalloc,,808,,1257346704485004019;
->xmalloc,,1257346704485010964;
-<delete_cmd,,809,,1257346704485023595;
->delete_cmd,,1257346704485030557;
->add_cmd,,1257346704485035131;
->add_info,,1257346704485039495;
-<add_setshow_zinteger_cmd,,810,,1257346704485052863;
-<add_setshow_cmd_full,,811,,1257346704485069966;
-<xstrprintf,,812,,1257346704485087102;
-<xstrvprintf,,813,,1257346704485102359;
->xstrvprintf,,1257346704485109962;
->xstrprintf,,1257346704485114506;
-<xstrprintf,,814,,1257346704485129300;
-<xstrvprintf,,815,,1257346704485144590;
->xstrvprintf,,1257346704485152036;
->xstrprintf,,1257346704485156559;
-<add_set_or_show_cmd,,816,,1257346704485169217;
-<add_cmd,,817,,1257346704485182291;
-<xmalloc,,818,,1257346704485197593;
->xmalloc,,1257346704485204209;
-<delete_cmd,,819,,1257346704485216656;
->delete_cmd,,1257346704485223571;
->add_cmd,,1257346704485228052;
->add_set_or_show_cmd,,1257346704485232680;
-<add_set_or_show_cmd,,820,,1257346704485245816;
-<add_cmd,,821,,1257346704485259386;
-<xmalloc,,822,,1257346704485274805;
->xmalloc,,1257346704485281467;
-<delete_cmd,,823,,1257346704485293872;
->delete_cmd,,1257346704485300654;
->add_cmd,,1257346704485305129;
->add_set_or_show_cmd,,1257346704485309791;
->add_setshow_cmd_full,,1257346704485314545;
->add_setshow_zinteger_cmd,,1257346704485318479;
-<add_setshow_zinteger_cmd,,824,,1257346704485331282;
-<add_setshow_cmd_full,,825,,1257346704485348147;
-<xstrprintf,,826,,1257346704485366315;
-<xstrvprintf,,827,,1257346704485382399;
->xstrvprintf,,1257346704485389926;
->xstrprintf,,1257346704485394483;
-<xstrprintf,,828,,1257346704485408834;
-<xstrvprintf,,829,,1257346704485424019;
->xstrvprintf,,1257346704485431399;
->xstrprintf,,1257346704485435925;
-<add_set_or_show_cmd,,830,,1257346704485448791;
-<add_cmd,,831,,1257346704485462201;
-<xmalloc,,832,,1257346704485477010;
->xmalloc,,1257346704485483776;
-<delete_cmd,,833,,1257346704485496377;
->delete_cmd,,1257346704485503294;
->add_cmd,,1257346704485507824;
->add_set_or_show_cmd,,1257346704485512476;
-<add_set_or_show_cmd,,834,,1257346704485525312;
-<add_cmd,,835,,1257346704485538505;
-<xmalloc,,836,,1257346704485553609;
->xmalloc,,1257346704485560261;
-<delete_cmd,,837,,1257346704485572992;
->delete_cmd,,1257346704485579870;
->add_cmd,,1257346704485584272;
->add_set_or_show_cmd,,1257346704485588889;
->add_setshow_cmd_full,,1257346704485593593;
->add_setshow_zinteger_cmd,,1257346704485597493;
-<add_setshow_boolean_cmd,,838,,1257346704485623135;
-<add_setshow_cmd_full,,839,,1257346704485640229;
-<xstrprintf,,840,,1257346704485656917;
-<xstrvprintf,,841,,1257346704485672297;
->xstrvprintf,,1257346704485680643;
->xstrprintf,,1257346704485685262;
-<xstrprintf,,842,,1257346704485700059;
-<xstrvprintf,,843,,1257346704485715739;
->xstrvprintf,,1257346704485726356;
->xstrprintf,,1257346704485731005;
-<add_set_or_show_cmd,,844,,1257346704485743826;
-<add_cmd,,845,,1257346704485757254;
-<xmalloc,,846,,1257346704485772628;
->xmalloc,,1257346704485779356;
-<delete_cmd,,847,,1257346704485792290;
->delete_cmd,,1257346704485799286;
->add_cmd,,1257346704485803764;
->add_set_or_show_cmd,,1257346704485808494;
-<add_set_or_show_cmd,,848,,1257346704485821466;
-<add_cmd,,849,,1257346704485835198;
-<xmalloc,,850,,1257346704485850683;
->xmalloc,,1257346704485857368;
-<delete_cmd,,851,,1257346704485870189;
->delete_cmd,,1257346704485877196;
->add_cmd,,1257346704485881689;
->add_set_or_show_cmd,,1257346704485886450;
->add_setshow_cmd_full,,1257346704485891202;
->add_setshow_boolean_cmd,,1257346704485896128;
->_initialize_linux_nat,,1257346704485901135;
-<_initialize_linux_fork,,852,,1257346704485912383;
-<add_com,,853,,1257346704485929381;
-<add_cmd,,854,,1257346704485943281;
-<xmalloc,,855,,1257346704485958719;
->xmalloc,,1257346704485965395;
-<delete_cmd,,856,,1257346704485978279;
->delete_cmd,,1257346704485986393;
->add_cmd,,1257346704485990883;
->add_com,,1257346704485995244;
-<add_com,,857,,1257346704486007036;
-<add_cmd,,858,,1257346704486020278;
-<xmalloc,,859,,1257346704486035164;
->xmalloc,,1257346704486041775;
-<delete_cmd,,860,,1257346704486054622;
->delete_cmd,,1257346704486061597;
->add_cmd,,1257346704486066072;
->add_com,,1257346704486070351;
-<add_cmd,,861,,1257346704486081918;
-<xmalloc,,862,,1257346704486096976;
->xmalloc,,1257346704486103836;
-<delete_cmd,,863,,1257346704486116843;
->delete_cmd,,1257346704486123604;
->add_cmd,,1257346704486127965;
-<add_cmd,,864,,1257346704486139429;
-<xmalloc,,865,,1257346704486154547;
->xmalloc,,1257346704486161230;
-<delete_cmd,,866,,1257346704486173684;
->delete_cmd,,1257346704486180507;
->add_cmd,,1257346704486184913;
-<add_info,,867,,1257346704486196498;
-<add_cmd,,868,,1257346704486210086;
-<xmalloc,,869,,1257346704486225408;
->xmalloc,,1257346704486232031;
-<delete_cmd,,870,,1257346704486246439;
->delete_cmd,,1257346704486253308;
->add_cmd,,1257346704486257783;
->add_info,,1257346704486262153;
->_initialize_linux_fork,,1257346704486267049;
-<_initialize_remote,,871,,1257346704486277822;
-<gdbarch_data_register_post_init,,872,,1257346704486290685;
-<gdbarch_data_register,,873,,1257346704486302245;
-<xmalloc,,874,,1257346704486317649;
->xmalloc,,1257346704486324332;
-<xmalloc,,875,,1257346704486334891;
->xmalloc,,1257346704486341363;
->gdbarch_data_register,,1257346704486346048;
->gdbarch_data_register_post_init,,1257346704486350069;
-<gdbarch_data_register_pre_init,,876,,1257346704486358343;
-<gdbarch_data_register,,877,,1257346704486369482;
-<xmalloc,,878,,1257346704486384414;
->xmalloc,,1257346704486391112;
-<xmalloc,,879,,1257346704486401701;
->xmalloc,,1257346704486408221;
->gdbarch_data_register,,1257346704486413006;
->gdbarch_data_register_pre_init,,1257346704486417042;
-<xmalloc,,880,,1257346704486428121;
->xmalloc,,1257346704486434731;
-<add_target,,881,,1257346704486441736;
-<add_cmd,,882,,1257346704486454622;
-<xmalloc,,883,,1257346704486469422;
->xmalloc,,1257346704486476083;
-<delete_cmd,,884,,1257346704486488588;
->delete_cmd,,1257346704486495523;
->add_cmd,,1257346704486500008;
->add_target,,1257346704486504449;
-<add_target,,885,,1257346704486511222;
-<add_cmd,,886,,1257346704486524214;
-<xmalloc,,887,,1257346704486539660;
->xmalloc,,1257346704486546397;
-<delete_cmd,,888,,1257346704486559013;
->delete_cmd,,1257346704486565852;
->add_cmd,,1257346704486570276;
->add_target,,1257346704486574622;
-<observer_attach_new_objfile,,889,,1257346704486588315;
-<generic_observer_attach,,890,,1257346704486610834;
-<xmalloc,,891,,1257346704486628648;
->xmalloc,,1257346704486635865;
-<xmalloc,,892,,1257346704486646599;
->xmalloc,,1257346704486653221;
->generic_observer_attach,,1257346704486658018;
->observer_attach_new_objfile,,1257346704486661979;
-<create_async_signal_handler,,893,,1257346704486670237;
-<xmalloc,,894,,1257346704486686682;
->xmalloc,,1257346704486693581;
->create_async_signal_handler,,1257346704486698808;
-<create_async_signal_handler,,895,,1257346704486706372;
-<xmalloc,,896,,1257346704486721321;
->xmalloc,,1257346704486728214;
->create_async_signal_handler,,1257346704486733180;
-<add_prefix_cmd,,897,,1257346704486745276;
-<add_cmd,,898,,1257346704486759095;
-<xmalloc,,899,,1257346704486774120;
->xmalloc,,1257346704486780968;
-<delete_cmd,,900,,1257346704486793870;
->delete_cmd,,1257346704486800925;
->add_cmd,,1257346704486805415;
->add_prefix_cmd,,1257346704486809908;
-<add_prefix_cmd,,901,,1257346704486822353;
-<add_cmd,,902,,1257346704486836241;
-<xmalloc,,903,,1257346704486851438;
->xmalloc,,1257346704486858090;
-<delete_cmd,,904,,1257346704486870926;
->delete_cmd,,1257346704486878000;
->add_cmd,,1257346704486882450;
->add_prefix_cmd,,1257346704486887004;
-<add_cmd,,905,,1257346704486898880;
-<xmalloc,,906,,1257346704486914059;
->xmalloc,,1257346704486920765;
-<delete_cmd,,907,,1257346704486933511;
->delete_cmd,,1257346704486940398;
->add_cmd,,1257346704486944894;
-<add_cmd,,908,,1257346704486956205;
-<xmalloc,,909,,1257346704486971284;
->xmalloc,,1257346704486977969;
-<delete_cmd,,910,,1257346704486990742;
->delete_cmd,,1257346704486997611;
->add_cmd,,1257346704487001975;
-<add_setshow_boolean_cmd,,911,,1257346704487015135;
-<add_setshow_cmd_full,,912,,1257346704487031616;
-<xstrprintf,,913,,1257346704487048235;
-<xstrvprintf,,914,,1257346704487063362;
->xstrvprintf,,1257346704487072773;
->xstrprintf,,1257346704487077401;
-<xstrprintf,,915,,1257346704487092179;
-<xstrvprintf,,916,,1257346704487107376;
->xstrvprintf,,1257346704487115424;
->xstrprintf,,1257346704487120007;
-<add_set_or_show_cmd,,917,,1257346704487133405;
-<add_cmd,,918,,1257346704487146596;
-<xmalloc,,919,,1257346704487161444;
->xmalloc,,1257346704487168129;
-<delete_cmd,,920,,1257346704487180992;
->delete_cmd,,1257346704487187972;
->add_cmd,,1257346704487192465;
->add_set_or_show_cmd,,1257346704487197072;
-<add_set_or_show_cmd,,921,,1257346704487209692;
-<add_cmd,,922,,1257346704487222783;
-<xmalloc,,923,,1257346704487237634;
->xmalloc,,1257346704487244280;
-<delete_cmd,,924,,1257346704487256869;
->delete_cmd,,1257346704487263901;
->add_cmd,,1257346704487268385;
->add_set_or_show_cmd,,1257346704487273043;
->add_setshow_cmd_full,,1257346704487277795;
->add_setshow_boolean_cmd,,1257346704487282562;
-<lookup_cmd,,925,,1257346704487293966;
-<lookup_cmd_1,,926,,1257346704487307370;
-<find_command_name_length,,927,,1257346704487321141;
->find_command_name_length,,1257346704487328714;
-<find_cmd,,928,,1257346704487340019;
->find_cmd,,1257346704487346996;
->lookup_cmd_1,,1257346704487351609;
->lookup_cmd,,1257346704487356045;
-<deprecate_cmd,,929,,1257346704487366595;
->deprecate_cmd,,1257346704487375317;
-<lookup_cmd,,930,,1257346704487387163;
-<lookup_cmd_1,,931,,1257346704487400197;
-<find_command_name_length,,932,,1257346704487414040;
->find_command_name_length,,1257346704487421472;
-<find_cmd,,933,,1257346704487432798;
->find_cmd,,1257346704487439573;
->lookup_cmd_1,,1257346704487444121;
->lookup_cmd,,1257346704487448584;
-<deprecate_cmd,,934,,1257346704487458550;
->deprecate_cmd,,1257346704487465341;
-<add_setshow_enum_cmd,,935,,1257346704487480243;
-<add_setshow_cmd_full,,936,,1257346704487496937;
-<xstrprintf,,937,,1257346704487513986;
-<xstrvprintf,,938,,1257346704487529066;
->xstrvprintf,,1257346704487537504;
->xstrprintf,,1257346704487542076;
-<xstrprintf,,939,,1257346704487556617;
-<xstrvprintf,,940,,1257346704487572403;
->xstrvprintf,,1257346704487580369;
->xstrprintf,,1257346704487584980;
-<add_set_or_show_cmd,,941,,1257346704487597719;
-<add_cmd,,942,,1257346704487615236;
-<xmalloc,,943,,1257346704487630712;
->xmalloc,,1257346704487637590;
-<delete_cmd,,944,,1257346704487650516;
->delete_cmd,,1257346704487657322;
->add_cmd,,1257346704487661773;
->add_set_or_show_cmd,,1257346704487666512;
-<add_set_or_show_cmd,,945,,1257346704487679228;
-<add_cmd,,946,,1257346704487692836;
-<xmalloc,,947,,1257346704487707823;
->xmalloc,,1257346704487714517;
-<delete_cmd,,948,,1257346704487727142;
->delete_cmd,,1257346704487733960;
->add_cmd,,1257346704487738363;
->add_set_or_show_cmd,,1257346704487742982;
->add_setshow_cmd_full,,1257346704487747812;
->add_setshow_enum_cmd,,1257346704487752552;
-<add_setshow_boolean_cmd,,949,,1257346704487766046;
-<add_setshow_cmd_full,,950,,1257346704487782647;
-<xstrprintf,,951,,1257346704487799041;
-<xstrvprintf,,952,,1257346704487814153;
->xstrvprintf,,1257346704487822457;
->xstrprintf,,1257346704487827070;
-<xstrprintf,,953,,1257346704487841500;
-<xstrvprintf,,954,,1257346704487856837;
->xstrvprintf,,1257346704487864789;
->xstrprintf,,1257346704487869339;
-<add_set_or_show_cmd,,955,,1257346704487882358;
-<add_cmd,,956,,1257346704487895447;
-<xmalloc,,957,,1257346704487910279;
->xmalloc,,1257346704487916908;
-<delete_cmd,,958,,1257346704487929422;
->delete_cmd,,1257346704487936231;
->add_cmd,,1257346704487940721;
->add_set_or_show_cmd,,1257346704487945316;
-<add_set_or_show_cmd,,959,,1257346704487958017;
-<add_cmd,,960,,1257346704487971201;
-<xmalloc,,961,,1257346704487986034;
->xmalloc,,1257346704487992659;
-<delete_cmd,,962,,1257346704488005946;
->delete_cmd,,1257346704488012718;
->add_cmd,,1257346704488017112;
->add_set_or_show_cmd,,1257346704488021753;
->add_setshow_cmd_full,,1257346704488026508;
->add_setshow_boolean_cmd,,1257346704488031277;
-<add_cmd,,963,,1257346704488043433;
-<xmalloc,,964,,1257346704488058895;
->xmalloc,,1257346704488065652;
-<delete_cmd,,965,,1257346704488078244;
->delete_cmd,,1257346704488085312;
->add_cmd,,1257346704488089916;
-<add_cmd,,966,,1257346704488101708;
-<xmalloc,,967,,1257346704488117191;
->xmalloc,,1257346704488126426;
-<delete_cmd,,968,,1257346704488139010;
->delete_cmd,,1257346704488146182;
->add_cmd,,1257346704488150699;
-<add_cmd,,969,,1257346704488162215;
-<xmalloc,,970,,1257346704488177153;
->xmalloc,,1257346704488183790;
-<delete_cmd,,971,,1257346704488196298;
->delete_cmd,,1257346704488203134;
->add_cmd,,1257346704488207540;
-<add_cmd,,972,,1257346704488218992;
-<xmalloc,,973,,1257346704488233912;
->xmalloc,,1257346704488240579;
-<delete_cmd,,974,,1257346704488253166;
->delete_cmd,,1257346704488260037;
->add_cmd,,1257346704488264464;
-<add_cmd,,975,,1257346704488276019;
-<xmalloc,,976,,1257346704488291552;
->xmalloc,,1257346704488298253;
-<delete_cmd,,977,,1257346704488311200;
->delete_cmd,,1257346704488318090;
->add_cmd,,1257346704488322505;
-<add_cmd,,978,,1257346704488334026;
-<xmalloc,,979,,1257346704488349078;
->xmalloc,,1257346704488355854;
-<delete_cmd,,980,,1257346704488368822;
->delete_cmd,,1257346704488375667;
->add_cmd,,1257346704488380139;
-<add_setshow_zinteger_cmd,,981,,1257346704488392839;
-<add_setshow_cmd_full,,982,,1257346704488409516;
-<xstrprintf,,983,,1257346704488426108;
-<xstrvprintf,,984,,1257346704488441397;
->xstrvprintf,,1257346704488450381;
->xstrprintf,,1257346704488455039;
-<xstrprintf,,985,,1257346704488469869;
-<xstrvprintf,,986,,1257346704488485261;
->xstrvprintf,,1257346704488492846;
->xstrprintf,,1257346704488497408;
-<add_set_or_show_cmd,,987,,1257346704488510412;
-<add_cmd,,988,,1257346704488523630;
-<xmalloc,,989,,1257346704488538537;
->xmalloc,,1257346704488545250;
-<delete_cmd,,990,,1257346704488557962;
->delete_cmd,,1257346704488564834;
->add_cmd,,1257346704488569397;
->add_set_or_show_cmd,,1257346704488574133;
-<add_set_or_show_cmd,,991,,1257346704488587189;
-<add_cmd,,992,,1257346704488604834;
-<xmalloc,,993,,1257346704488620541;
->xmalloc,,1257346704488627371;
-<delete_cmd,,994,,1257346704488639816;
->delete_cmd,,1257346704488646664;
->add_cmd,,1257346704488651178;
->add_set_or_show_cmd,,1257346704488655840;
->add_setshow_cmd_full,,1257346704488660751;
->add_setshow_zinteger_cmd,,1257346704488664696;
-<add_setshow_zinteger_cmd,,995,,1257346704488677484;
-<add_setshow_cmd_full,,996,,1257346704488694049;
-<xstrprintf,,997,,1257346704488710539;
-<xstrvprintf,,998,,1257346704488725889;
->xstrvprintf,,1257346704488733524;
->xstrprintf,,1257346704488738084;
-<xstrprintf,,999,,1257346704488752288;
-<xstrvprintf,,1000,,1257346704488767466;
->xstrvprintf,,1257346704488774970;
->xstrprintf,,1257346704488779580;
-<add_set_or_show_cmd,,1001,,1257346704488792239;
-<add_cmd,,1002,,1257346704488805390;
-<xmalloc,,1003,,1257346704488820373;
->xmalloc,,1257346704488827028;
-<delete_cmd,,1004,,1257346704488839521;
->delete_cmd,,1257346704488846444;
->add_cmd,,1257346704488850889;
->add_set_or_show_cmd,,1257346704488855521;
-<add_set_or_show_cmd,,1005,,1257346704488868176;
-<add_cmd,,1006,,1257346704488882756;
-<xmalloc,,1007,,1257346704488898136;
->xmalloc,,1257346704488904789;
-<delete_cmd,,1008,,1257346704488917330;
->delete_cmd,,1257346704488924183;
->add_cmd,,1257346704488928682;
->add_set_or_show_cmd,,1257346704488933311;
->add_setshow_cmd_full,,1257346704488938108;
->add_setshow_zinteger_cmd,,1257346704488942011;
-<add_setshow_integer_cmd,,1009,,1257346704488953653;
-<add_setshow_cmd_full,,1010,,1257346704488971995;
-<xstrdup,,1011,,1257346704488978837;
-<xmalloc,,1012,,1257346704488993601;
->xmalloc,,1257346704489000431;
->xstrdup,,1257346704489004888;
-<xstrdup,,1013,,1257346704489009348;
-<xmalloc,,1014,,1257346704489022307;
->xmalloc,,1257346704489029007;
->xstrdup,,1257346704489033485;
-<add_set_or_show_cmd,,1015,,1257346704489046102;
-<add_cmd,,1016,,1257346704489059409;
-<xmalloc,,1017,,1257346704489074332;
->xmalloc,,1257346704489081027;
-<delete_cmd,,1018,,1257346704489093499;
->delete_cmd,,1257346704489100611;
->add_cmd,,1257346704489105210;
->add_set_or_show_cmd,,1257346704489109850;
-<add_set_or_show_cmd,,1019,,1257346704489122878;
-<add_cmd,,1020,,1257346704489136454;
-<xmalloc,,1021,,1257346704489151617;
->xmalloc,,1257346704489158414;
-<delete_cmd,,1022,,1257346704489171090;
->delete_cmd,,1257346704489178170;
->add_cmd,,1257346704489182681;
->add_set_or_show_cmd,,1257346704489187303;
->add_setshow_cmd_full,,1257346704489192064;
->add_setshow_integer_cmd,,1257346704489195910;
-<add_packet_config_cmd,,1023,,1257346704489209167;
-<xstrprintf,,1024,,1257346704489225666;
-<xstrvprintf,,1025,,1257346704489240905;
->xstrvprintf,,1257346704489248947;
->xstrprintf,,1257346704489253575;
-<xstrprintf,,1026,,1257346704489267930;
-<xstrvprintf,,1027,,1257346704489283144;
->xstrvprintf,,1257346704489290618;
->xstrprintf,,1257346704489295195;
-<xstrprintf,,1028,,1257346704489309826;
-<xstrvprintf,,1029,,1257346704489325095;
->xstrvprintf,,1257346704489332875;
->xstrprintf,,1257346704489337437;
-<add_setshow_auto_boolean_cmd,,1030,,1257346704489346715;
-<add_setshow_cmd_full,,1031,,1257346704489364805;
-<xstrdup,,1032,,1257346704489371773;
-<xmalloc,,1033,,1257346704489386894;
->xmalloc,,1257346704489393703;
->xstrdup,,1257346704489398154;
-<xstrdup,,1034,,1257346704489402641;
-<xmalloc,,1035,,1257346704489415838;
->xmalloc,,1257346704489422598;
->xstrdup,,1257346704489427035;
-<add_set_or_show_cmd,,1036,,1257346704489439684;
-<add_cmd,,1037,,1257346704489453145;
-<xmalloc,,1038,,1257346704489468176;
->xmalloc,,1257346704489474880;
-<delete_cmd,,1039,,1257346704489487279;
->delete_cmd,,1257346704489494211;
->add_cmd,,1257346704489498635;
->add_set_or_show_cmd,,1257346704489503261;
-<add_set_or_show_cmd,,1040,,1257346704489515700;
-<add_cmd,,1041,,1257346704489528710;
-<xmalloc,,1042,,1257346704489543659;
->xmalloc,,1257346704489550459;
-<delete_cmd,,1043,,1257346704489562811;
->delete_cmd,,1257346704489569764;
->add_cmd,,1257346704489574188;
->add_set_or_show_cmd,,1257346704489578828;
->add_setshow_cmd_full,,1257346704489583592;
->add_setshow_auto_boolean_cmd,,1257346704489588608;
-<xfree,,1044,,1257346704489605227;
->xfree,,1257346704489612821;
-<xfree,,1045,,1257346704489624117;
->xfree,,1257346704489630781;
-<xstrprintf,,1046,,1257346704489644826;
-<xstrvprintf,,1047,,1257346704489660020;
->xstrvprintf,,1257346704489668079;
->xstrprintf,,1257346704489672723;
-<add_alias_cmd,,1048,,1257346704489682825;
-<lookup_cmd,,1049,,1257346704489697050;
-<lookup_cmd_1,,1050,,1257346704489709642;
-<find_command_name_length,,1051,,1257346704489723113;
->find_command_name_length,,1257346704489730505;
-<find_cmd,,1052,,1257346704489741422;
->find_cmd,,1257346704489748221;
->lookup_cmd_1,,1257346704489752814;
->lookup_cmd,,1257346704489757310;
-<add_cmd,,1053,,1257346704489768507;
-<xmalloc,,1054,,1257346704489782756;
->xmalloc,,1257346704489789607;
-<delete_cmd,,1055,,1257346704489801934;
->delete_cmd,,1257346704489808788;
->add_cmd,,1257346704489813284;
->add_alias_cmd,,1257346704489817792;
-<add_alias_cmd,,1056,,1257346704489827813;
-<lookup_cmd,,1057,,1257346704489841722;
-<lookup_cmd_1,,1058,,1257346704489854266;
-<find_command_name_length,,1059,,1257346704489867719;
->find_command_name_length,,1257346704489874991;
-<find_cmd,,1060,,1257346704489885875;
->find_cmd,,1257346704489892701;
->lookup_cmd_1,,1257346704489897221;
->lookup_cmd,,1257346704489901642;
-<add_cmd,,1061,,1257346704489912253;
-<xmalloc,,1062,,1257346704489926592;
->xmalloc,,1257346704489933383;
-<delete_cmd,,1063,,1257346704489946149;
->delete_cmd,,1257346704489953027;
->add_cmd,,1257346704489957508;
->add_alias_cmd,,1257346704489962029;
->add_packet_config_cmd,,1257346704489966943;
-<add_packet_config_cmd,,1064,,1257346704489979676;
-<xstrprintf,,1065,,1257346704489993964;
-<xstrvprintf,,1066,,1257346704490009083;
->xstrvprintf,,1257346704490016755;
->xstrprintf,,1257346704490021299;
-<xstrprintf,,1067,,1257346704490035368;
-<xstrvprintf,,1068,,1257346704490050588;
->xstrvprintf,,1257346704490058071;
->xstrprintf,,1257346704490062687;
-<xstrprintf,,1069,,1257346704490077045;
-<xstrvprintf,,1070,,1257346704490092313;
->xstrvprintf,,1257346704490100078;
->xstrprintf,,1257346704490104638;
-<add_setshow_auto_boolean_cmd,,1071,,1257346704490113447;
-<add_setshow_cmd_full,,1072,,1257346704490129939;
-<xstrdup,,1073,,1257346704490136649;
-<xmalloc,,1074,,1257346704490151548;
->xmalloc,,1257346704490158366;
->xstrdup,,1257346704490162844;
-<xstrdup,,1075,,1257346704490167418;
-<xmalloc,,1076,,1257346704490180232;
->xmalloc,,1257346704490186993;
->xstrdup,,1257346704490191417;
-<add_set_or_show_cmd,,1077,,1257346704490203724;
-<add_cmd,,1078,,1257346704490216797;
-<xmalloc,,1079,,1257346704490231720;
->xmalloc,,1257346704490238526;
-<delete_cmd,,1080,,1257346704490250961;
->delete_cmd,,1257346704490257930;
->add_cmd,,1257346704490262401;
->add_set_or_show_cmd,,1257346704490267084;
-<add_set_or_show_cmd,,1081,,1257346704490279760;
-<add_cmd,,1082,,1257346704490293165;
-<xmalloc,,1083,,1257346704490308054;
->xmalloc,,1257346704490314833;
-<delete_cmd,,1084,,1257346704490327678;
->delete_cmd,,1257346704490334616;
->add_cmd,,1257346704490339169;
->add_set_or_show_cmd,,1257346704490343843;
->add_setshow_cmd_full,,1257346704490348597;
->add_setshow_auto_boolean_cmd,,1257346704490353557;
-<xfree,,1085,,1257346704490365292;
->xfree,,1257346704490372070;
-<xfree,,1086,,1257346704490382831;
->xfree,,1257346704490389474;
->add_packet_config_cmd,,1257346704490394283;
-<add_packet_config_cmd,,1087,,1257346704490406966;
-<xstrprintf,,1088,,1257346704490421170;
-<xstrvprintf,,1089,,1257346704490436306;
->xstrvprintf,,1257346704490443924;
->xstrprintf,,1257346704490448477;
-<xstrprintf,,1090,,1257346704490462816;
-<xstrvprintf,,1091,,1257346704490478040;
->xstrvprintf,,1257346704490485589;
->xstrprintf,,1257346704490490115;
-<xstrprintf,,1092,,1257346704490504088;
-<xstrvprintf,,1093,,1257346704490519182;
->xstrvprintf,,1257346704490526860;
->xstrprintf,,1257346704490531404;
-<add_setshow_auto_boolean_cmd,,1094,,1257346704490540129;
-<add_setshow_cmd_full,,1095,,1257346704490556708;
-<xstrdup,,1096,,1257346704490563382;
-<xmalloc,,1097,,1257346704490578464;
->xmalloc,,1257346704490585288;
->xstrdup,,1257346704490589865;
-<xstrdup,,1098,,1257346704490594349;
-<xmalloc,,1099,,1257346704490611771;
->xmalloc,,1257346704490618923;
->xstrdup,,1257346704490623461;
-<add_set_or_show_cmd,,1100,,1257346704490635866;
-<add_cmd,,1101,,1257346704490649749;
-<xmalloc,,1102,,1257346704490664849;
->xmalloc,,1257346704490671652;
-<delete_cmd,,1103,,1257346704490684379;
->delete_cmd,,1257346704490691299;
->add_cmd,,1257346704490695925;
->add_set_or_show_cmd,,1257346704490700547;
-<add_set_or_show_cmd,,1104,,1257346704490712857;
-<add_cmd,,1105,,1257346704490726056;
-<xmalloc,,1106,,1257346704490740856;
->xmalloc,,1257346704490747613;
-<delete_cmd,,1107,,1257346704490760046;
->delete_cmd,,1257346704490767083;
->add_cmd,,1257346704490771540;
->add_set_or_show_cmd,,1257346704490776262;
->add_setshow_cmd_full,,1257346704490781035;
->add_setshow_auto_boolean_cmd,,1257346704490785922;
-<xfree,,1108,,1257346704490797609;
->xfree,,1257346704490804451;
-<xfree,,1109,,1257346704490815094;
->xfree,,1257346704490821770;
->add_packet_config_cmd,,1257346704490826465;
-<add_packet_config_cmd,,1110,,1257346704490839033;
-<xstrprintf,,1111,,1257346704490853592;
-<xstrvprintf,,1112,,1257346704490868623;
->xstrvprintf,,1257346704490876421;
->xstrprintf,,1257346704490881068;
-<xstrprintf,,1113,,1257346704490895134;
-<xstrvprintf,,1114,,1257346704490910396;
->xstrvprintf,,1257346704490917957;
->xstrprintf,,1257346704490922495;
-<xstrprintf,,1115,,1257346704490936865;
-<xstrvprintf,,1116,,1257346704490952173;
->xstrvprintf,,1257346704490959971;
->xstrprintf,,1257346704490964533;
-<add_setshow_auto_boolean_cmd,,1117,,1257346704490973327;
-<add_setshow_cmd_full,,1118,,1257346704490989934;
-<xstrdup,,1119,,1257346704490996628;
-<xmalloc,,1120,,1257346704491011440;
->xmalloc,,1257346704491018240;
->xstrdup,,1257346704491022688;
-<xstrdup,,1121,,1257346704491027175;
-<xmalloc,,1122,,1257346704491039963;
->xmalloc,,1257346704491046714;
->xstrdup,,1257346704491051129;
-<add_set_or_show_cmd,,1123,,1257346704491063739;
-<add_cmd,,1124,,1257346704491077282;
-<xmalloc,,1125,,1257346704491092415;
->xmalloc,,1257346704491099215;
-<delete_cmd,,1126,,1257346704491111536;
->delete_cmd,,1257346704491118529;
->add_cmd,,1257346704491123046;
->add_set_or_show_cmd,,1257346704491127695;
-<add_set_or_show_cmd,,1127,,1257346704491139941;
-<add_cmd,,1128,,1257346704491153123;
-<xmalloc,,1129,,1257346704491168413;
->xmalloc,,1257346704491175170;
-<delete_cmd,,1130,,1257346704491187474;
->delete_cmd,,1257346704491194475;
->add_cmd,,1257346704491199013;
->add_set_or_show_cmd,,1257346704491203723;
->add_setshow_cmd_full,,1257346704491208526;
->add_setshow_auto_boolean_cmd,,1257346704491213581;
-<xfree,,1131,,1257346704491225304;
->xfree,,1257346704491232035;
-<xfree,,1132,,1257346704491242877;
->xfree,,1257346704491249574;
->add_packet_config_cmd,,1257346704491254323;
-<add_packet_config_cmd,,1133,,1257346704491266780;
-<xstrprintf,,1134,,1257346704491281041;
-<xstrvprintf,,1135,,1257346704491296114;
->xstrvprintf,,1257346704491303717;
->xstrprintf,,1257346704491308276;
-<xstrprintf,,1136,,1257346704491322724;
-<xstrvprintf,,1137,,1257346704491337773;
->xstrvprintf,,1257346704491345210;
->xstrprintf,,1257346704491349761;
-<xstrprintf,,1138,,1257346704491363751;
-<xstrvprintf,,1139,,1257346704491378686;
->xstrvprintf,,1257346704491386313;
->xstrprintf,,1257346704491390869;
-<add_setshow_auto_boolean_cmd,,1140,,1257346704491399546;
-<add_setshow_cmd_full,,1141,,1257346704491416384;
-<xstrdup,,1142,,1257346704491423121;
-<xmalloc,,1143,,1257346704491437908;
->xmalloc,,1257346704491444819;
->xstrdup,,1257346704491449246;
-<xstrdup,,1144,,1257346704491453794;
-<xmalloc,,1145,,1257346704491466777;
->xmalloc,,1257346704491473507;
->xstrdup,,1257346704491477955;
-<add_set_or_show_cmd,,1146,,1257346704491490096;
-<add_cmd,,1147,,1257346704491503182;
-<xmalloc,,1148,,1257346704491518607;
->xmalloc,,1257346704491525343;
-<delete_cmd,,1149,,1257346704491538125;
->delete_cmd,,1257346704491545045;
->add_cmd,,1257346704491549508;
->add_set_or_show_cmd,,1257346704491554151;
-<add_set_or_show_cmd,,1150,,1257346704491566350;
-<add_cmd,,1151,,1257346704491579435;
-<xmalloc,,1152,,1257346704491594358;
->xmalloc,,1257346704491607678;
-<delete_cmd,,1153,,1257346704491620247;
->delete_cmd,,1257346704491627576;
->add_cmd,,1257346704491632138;
->add_set_or_show_cmd,,1257346704491636769;
->add_setshow_cmd_full,,1257346704491641542;
->add_setshow_auto_boolean_cmd,,1257346704491646471;
-<xfree,,1154,,1257346704491658170;
->xfree,,1257346704491665102;
-<xfree,,1155,,1257346704491675710;
->xfree,,1257346704491682290;
-<xstrprintf,,1156,,1257346704491696208;
-<xstrvprintf,,1157,,1257346704491711215;
->xstrvprintf,,1257346704491719131;
->xstrprintf,,1257346704491723663;
-<add_alias_cmd,,1158,,1257346704491733894;
-<lookup_cmd,,1159,,1257346704491747861;
-<lookup_cmd_1,,1160,,1257346704491760504;
-<find_command_name_length,,1161,,1257346704491773965;
->find_command_name_length,,1257346704491781339;
-<find_cmd,,1162,,1257346704491792735;
->find_cmd,,1257346704491799655;
->lookup_cmd_1,,1257346704491804205;
->lookup_cmd,,1257346704491808794;
-<add_cmd,,1163,,1257346704491819477;
-<xmalloc,,1164,,1257346704491834147;
->xmalloc,,1257346704491840965;
-<delete_cmd,,1165,,1257346704491853431;
->delete_cmd,,1257346704491860441;
->add_cmd,,1257346704491864865;
->add_alias_cmd,,1257346704491869325;
-<add_alias_cmd,,1166,,1257346704491879478;
-<lookup_cmd,,1167,,1257346704491893192;
-<lookup_cmd_1,,1168,,1257346704491905808;
-<find_command_name_length,,1169,,1257346704491919152;
->find_command_name_length,,1257346704491926475;
-<find_cmd,,1170,,1257346704491937401;
->find_cmd,,1257346704491944309;
->lookup_cmd_1,,1257346704491948862;
->lookup_cmd,,1257346704491953400;
-<add_cmd,,1171,,1257346704491964188;
-<xmalloc,,1172,,1257346704491978864;
->xmalloc,,1257346704491985721;
-<delete_cmd,,1173,,1257346704491998359;
->delete_cmd,,1257346704492005405;
->add_cmd,,1257346704492009865;
->add_alias_cmd,,1257346704492014361;
->add_packet_config_cmd,,1257346704492019080;
-<add_packet_config_cmd,,1174,,1257346704492032093;
-<xstrprintf,,1175,,1257346704492046372;
-<xstrvprintf,,1176,,1257346704492061984;
->xstrvprintf,,1257346704492069740;
->xstrprintf,,1257346704492074362;
-<xstrprintf,,1177,,1257346704492088566;
-<xstrvprintf,,1178,,1257346704492104121;
->xstrvprintf,,1257346704492111660;
->xstrprintf,,1257346704492116184;
-<xstrprintf,,1179,,1257346704492130177;
-<xstrvprintf,,1180,,1257346704492145169;
->xstrvprintf,,1257346704492152949;
->xstrprintf,,1257346704492157484;
-<add_setshow_auto_boolean_cmd,,1181,,1257346704492166329;
-<add_setshow_cmd_full,,1182,,1257346704492183117;
-<xstrdup,,1183,,1257346704492189824;
-<xmalloc,,1184,,1257346704492204761;
->xmalloc,,1257346704492211498;
->xstrdup,,1257346704492215940;
-<xstrdup,,1185,,1257346704492220412;
-<xmalloc,,1186,,1257346704492233353;
->xmalloc,,1257346704492240074;
->xstrdup,,1257346704492244556;
-<add_set_or_show_cmd,,1187,,1257346704492256892;
-<add_cmd,,1188,,1257346704492269806;
-<xmalloc,,1189,,1257346704492284449;
->xmalloc,,1257346704492291080;
-<delete_cmd,,1190,,1257346704492303318;
->delete_cmd,,1257346704492310241;
->add_cmd,,1257346704492314695;
->add_set_or_show_cmd,,1257346704492319380;
-<add_set_or_show_cmd,,1191,,1257346704492331717;
-<add_cmd,,1192,,1257346704492344727;
-<xmalloc,,1193,,1257346704492359999;
->xmalloc,,1257346704492366699;
-<delete_cmd,,1194,,1257346704492378901;
->delete_cmd,,1257346704492385878;
->add_cmd,,1257346704492390293;
->add_set_or_show_cmd,,1257346704492395026;
->add_setshow_cmd_full,,1257346704492399796;
->add_setshow_auto_boolean_cmd,,1257346704492404737;
-<xfree,,1195,,1257346704492417101;
->xfree,,1257346704492423901;
-<xfree,,1196,,1257346704492434998;
->xfree,,1257346704492441581;
-<xstrprintf,,1197,,1257346704492455629;
-<xstrvprintf,,1198,,1257346704492470600;
->xstrvprintf,,1257346704492478407;
->xstrprintf,,1257346704492482942;
-<add_alias_cmd,,1199,,1257346704492492999;
-<lookup_cmd,,1200,,1257346704492506671;
-<lookup_cmd_1,,1201,,1257346704492519140;
-<find_command_name_length,,1202,,1257346704492532646;
->find_command_name_length,,1257346704492540065;
-<find_cmd,,1203,,1257346704492550922;
->find_cmd,,1257346704492557791;
->lookup_cmd_1,,1257346704492562378;
->lookup_cmd,,1257346704492566817;
-<add_cmd,,1204,,1257346704492577430;
-<xmalloc,,1205,,1257346704492591709;
->xmalloc,,1257346704492598581;
-<delete_cmd,,1206,,1257346704492614932;
->delete_cmd,,1257346704492622331;
->add_cmd,,1257346704492626953;
->add_alias_cmd,,1257346704492631452;
-<add_alias_cmd,,1207,,1257346704492641620;
-<lookup_cmd,,1208,,1257346704492655208;
-<lookup_cmd_1,,1209,,1257346704492668182;
-<find_command_name_length,,1210,,1257346704492681857;
->find_command_name_length,,1257346704492689207;
-<find_cmd,,1211,,1257346704492700238;
->find_cmd,,1257346704492707104;
->lookup_cmd_1,,1257346704492711630;
->lookup_cmd,,1257346704492716105;
-<add_cmd,,1212,,1257346704492726803;
-<xmalloc,,1213,,1257346704492741353;
->xmalloc,,1257346704492748435;
-<delete_cmd,,1214,,1257346704492761108;
->delete_cmd,,1257346704492768170;
->add_cmd,,1257346704492772636;
->add_alias_cmd,,1257346704492777177;
->add_packet_config_cmd,,1257346704492781902;
-<add_packet_config_cmd,,1215,,1257346704492794611;
-<xstrprintf,,1216,,1257346704492809056;
-<xstrvprintf,,1217,,1257346704492824045;
->xstrvprintf,,1257346704492831798;
->xstrprintf,,1257346704492836363;
-<xstrprintf,,1218,,1257346704492850300;
-<xstrvprintf,,1219,,1257346704492865472;
->xstrvprintf,,1257346704492873045;
->xstrprintf,,1257346704492877586;
-<xstrprintf,,1220,,1257346704492891634;
-<xstrvprintf,,1221,,1257346704492907143;
->xstrvprintf,,1257346704492914932;
->xstrprintf,,1257346704492919516;
-<add_setshow_auto_boolean_cmd,,1222,,1257346704492928330;
-<add_setshow_cmd_full,,1223,,1257346704492944868;
-<xstrdup,,1224,,1257346704492951605;
-<xmalloc,,1225,,1257346704492966573;
->xmalloc,,1257346704492973303;
->xstrdup,,1257346704492977760;
-<xstrdup,,1226,,1257346704492982235;
-<xmalloc,,1227,,1257346704492995047;
->xmalloc,,1257346704493001673;
->xstrdup,,1257346704493006151;
-<add_set_or_show_cmd,,1228,,1257346704493018499;
-<add_cmd,,1229,,1257346704493031669;
-<xmalloc,,1230,,1257346704493046348;
->xmalloc,,1257346704493053003;
-<delete_cmd,,1231,,1257346704493065607;
->delete_cmd,,1257346704493072579;
->add_cmd,,1257346704493077117;
->add_set_or_show_cmd,,1257346704493081775;
-<add_set_or_show_cmd,,1232,,1257346704493094575;
-<add_cmd,,1233,,1257346704493107546;
-<xmalloc,,1234,,1257346704493122490;
->xmalloc,,1257346704493129227;
-<delete_cmd,,1235,,1257346704493141473;
->delete_cmd,,1257346704493148486;
->add_cmd,,1257346704493152958;
->add_set_or_show_cmd,,1257346704493157701;
->add_setshow_cmd_full,,1257346704493162447;
->add_setshow_auto_boolean_cmd,,1257346704493167463;
-<xfree,,1236,,1257346704493179093;
->xfree,,1257346704493185899;
-<xfree,,1237,,1257346704493196608;
->xfree,,1257346704493203287;
->add_packet_config_cmd,,1257346704493208093;
-<add_packet_config_cmd,,1238,,1257346704493220851;
-<xstrprintf,,1239,,1257346704493234541;
-<xstrvprintf,,1240,,1257346704493250017;
->xstrvprintf,,1257346704493257563;
->xstrprintf,,1257346704493262119;
-<xstrprintf,,1241,,1257346704493276416;
-<xstrvprintf,,1242,,1257346704493292268;
->xstrvprintf,,1257346704493299772;
->xstrprintf,,1257346704493304319;
-<xstrprintf,,1243,,1257346704493318174;
-<xstrvprintf,,1244,,1257346704493333139;
->xstrvprintf,,1257346704493340793;
->xstrprintf,,1257346704493345352;
-<add_setshow_auto_boolean_cmd,,1245,,1257346704493354041;
-<add_setshow_cmd_full,,1246,,1257346704493370458;
-<xstrdup,,1247,,1257346704493377198;
-<xmalloc,,1248,,1257346704493392181;
->xmalloc,,1257346704493398861;
->xstrdup,,1257346704493403369;
-<xstrdup,,1249,,1257346704493407862;
-<xmalloc,,1250,,1257346704493420535;
->xmalloc,,1257346704493427200;
->xstrdup,,1257346704493431783;
-<add_set_or_show_cmd,,1251,,1257346704493444126;
-<add_cmd,,1252,,1257346704493457403;
-<xmalloc,,1253,,1257346704493472332;
->xmalloc,,1257346704493479021;
-<delete_cmd,,1254,,1257346704493491279;
->delete_cmd,,1257346704493498340;
->add_cmd,,1257346704493502861;
->add_set_or_show_cmd,,1257346704493507474;
-<add_set_or_show_cmd,,1255,,1257346704493519859;
-<add_cmd,,1256,,1257346704493533194;
-<xmalloc,,1257,,1257346704493548447;
->xmalloc,,1257346704493555241;
-<delete_cmd,,1258,,1257346704493567613;
->delete_cmd,,1257346704493574879;
->add_cmd,,1257346704493579487;
->add_set_or_show_cmd,,1257346704493584127;
->add_setshow_cmd_full,,1257346704493588903;
->add_setshow_auto_boolean_cmd,,1257346704493593814;
-<xfree,,1259,,1257346704493609624;
->xfree,,1257346704493616914;
-<xfree,,1260,,1257346704493627840;
->xfree,,1257346704493634589;
->add_packet_config_cmd,,1257346704493639394;
-<add_packet_config_cmd,,1261,,1257346704493651749;
-<xstrprintf,,1262,,1257346704493665917;
-<xstrvprintf,,1263,,1257346704493680927;
->xstrvprintf,,1257346704493688647;
->xstrprintf,,1257346704493693251;
-<xstrprintf,,1264,,1257346704493707113;
-<xstrvprintf,,1265,,1257346704493722442;
->xstrvprintf,,1257346704493730029;
->xstrprintf,,1257346704493734592;
-<xstrprintf,,1266,,1257346704493748537;
-<xstrvprintf,,1267,,1257346704493764088;
->xstrvprintf,,1257346704493771866;
->xstrprintf,,1257346704493776497;
-<add_setshow_auto_boolean_cmd,,1268,,1257346704493785408;
-<add_setshow_cmd_full,,1269,,1257346704493802015;
-<xstrdup,,1270,,1257346704493808728;
-<xmalloc,,1271,,1257346704493823422;
->xmalloc,,1257346704493830345;
->xstrdup,,1257346704493834802;
-<xstrdup,,1272,,1257346704493839286;
-<xmalloc,,1273,,1257346704493851939;
->xmalloc,,1257346704493858636;
->xstrdup,,1257346704493863051;
-<add_set_or_show_cmd,,1274,,1257346704493875562;
-<add_cmd,,1275,,1257346704493888728;
-<xmalloc,,1276,,1257346704493903657;
->xmalloc,,1257346704493910304;
-<delete_cmd,,1277,,1257346704493922992;
->delete_cmd,,1257346704493929933;
->add_cmd,,1257346704493934450;
->add_set_or_show_cmd,,1257346704493939103;
-<add_set_or_show_cmd,,1278,,1257346704493951478;
-<add_cmd,,1279,,1257346704493964576;
-<xmalloc,,1280,,1257346704493979369;
->xmalloc,,1257346704493986109;
-<delete_cmd,,1281,,1257346704493998554;
->delete_cmd,,1257346704494005540;
->add_cmd,,1257346704494010033;
->add_set_or_show_cmd,,1257346704494014673;
->add_setshow_cmd_full,,1257346704494019362;
->add_setshow_auto_boolean_cmd,,1257346704494024384;
-<xfree,,1282,,1257346704494035909;
->xfree,,1257346704494042715;
-<xfree,,1283,,1257346704494053394;
->xfree,,1257346704494060016;
->add_packet_config_cmd,,1257346704494064738;
-<add_packet_config_cmd,,1284,,1257346704494077387;
-<xstrprintf,,1285,,1257346704494091613;
-<xstrvprintf,,1286,,1257346704494106671;
->xstrvprintf,,1257346704494114204;
->xstrprintf,,1257346704494118766;
-<xstrprintf,,1287,,1257346704494132610;
-<xstrvprintf,,1288,,1257346704494147918;
->xstrvprintf,,1257346704494155544;
->xstrprintf,,1257346704494160082;
-<xstrprintf,,1289,,1257346704494174359;
-<xstrvprintf,,1290,,1257346704494189534;
->xstrvprintf,,1257346704494197278;
->xstrprintf,,1257346704494201817;
-<add_setshow_auto_boolean_cmd,,1291,,1257346704494210565;
-<add_setshow_cmd_full,,1292,,1257346704494227046;
-<xstrdup,,1293,,1257346704494233722;
-<xmalloc,,1294,,1257346704494248294;
->xmalloc,,1257346704494255093;
->xstrdup,,1257346704494259529;
-<xstrdup,,1295,,1257346704494264013;
-<xmalloc,,1296,,1257346704494276650;
->xmalloc,,1257346704494283321;
->xstrdup,,1257346704494287736;
-<add_set_or_show_cmd,,1297,,1257346704494300391;
-<add_cmd,,1298,,1257346704494313849;
-<xmalloc,,1299,,1257346704494328583;
->xmalloc,,1257346704494335341;
-<delete_cmd,,1300,,1257346704494348014;
->delete_cmd,,1257346704494354955;
->add_cmd,,1257346704494359505;
->add_set_or_show_cmd,,1257346704494364112;
-<add_set_or_show_cmd,,1301,,1257346704494376500;
-<add_cmd,,1302,,1257346704494389751;
-<xmalloc,,1303,,1257346704494405089;
->xmalloc,,1257346704494411864;
-<delete_cmd,,1304,,1257346704494424378;
->delete_cmd,,1257346704494431494;
->add_cmd,,1257346704494435975;
->add_set_or_show_cmd,,1257346704494440790;
->add_setshow_cmd_full,,1257346704494445572;
->add_setshow_auto_boolean_cmd,,1257346704494450477;
-<xfree,,1305,,1257346704494462185;
->xfree,,1257346704494469168;
-<xfree,,1306,,1257346704494479784;
->xfree,,1257346704494486533;
->add_packet_config_cmd,,1257346704494491230;
-<add_packet_config_cmd,,1307,,1257346704494503916;
-<xstrprintf,,1308,,1257346704494517876;
-<xstrvprintf,,1309,,1257346704494533413;
->xstrvprintf,,1257346704494540964;
->xstrprintf,,1257346704494545536;
-<xstrprintf,,1310,,1257346704494559385;
-<xstrvprintf,,1311,,1257346704494574560;
->xstrvprintf,,1257346704494582079;
->xstrprintf,,1257346704494586677;
-<xstrprintf,,1312,,1257346704494604598;
-<xstrvprintf,,1313,,1257346704494620254;
->xstrvprintf,,1257346704494628215;
->xstrprintf,,1257346704494632856;
-<add_setshow_auto_boolean_cmd,,1314,,1257346704494642022;
-<add_setshow_cmd_full,,1315,,1257346704494658641;
-<xstrdup,,1316,,1257346704494665459;
-<xmalloc,,1317,,1257346704494680162;
->xmalloc,,1257346704494686989;
->xstrdup,,1257346704494691521;
-<xstrdup,,1318,,1257346704494696014;
-<xmalloc,,1319,,1257346704494708847;
->xmalloc,,1257346704494715635;
->xstrdup,,1257346704494720062;
-<add_set_or_show_cmd,,1320,,1257346704494732913;
-<add_cmd,,1321,,1257346704494746010;
-<xmalloc,,1322,,1257346704494760713;
->xmalloc,,1257346704494767411;
-<delete_cmd,,1323,,1257346704494779744;
->delete_cmd,,1257346704494786770;
->add_cmd,,1257346704494791221;
->add_set_or_show_cmd,,1257346704494795834;
-<add_set_or_show_cmd,,1324,,1257346704494808204;
-<add_cmd,,1325,,1257346704494821340;
-<xmalloc,,1326,,1257346704494836088;
->xmalloc,,1257346704494842828;
-<delete_cmd,,1327,,1257346704494855141;
->delete_cmd,,1257346704494862073;
->add_cmd,,1257346704494866469;
->add_set_or_show_cmd,,1257346704494871119;
->add_setshow_cmd_full,,1257346704494875883;
->add_setshow_auto_boolean_cmd,,1257346704494880920;
-<xfree,,1328,,1257346704494892484;
->xfree,,1257346704494899284;
-<xfree,,1329,,1257346704494909858;
->xfree,,1257346704494916564;
->add_packet_config_cmd,,1257346704494921241;
-<add_packet_config_cmd,,1330,,1257346704494933493;
-<xstrprintf,,1331,,1257346704494947057;
-<xstrvprintf,,1332,,1257346704494962070;
->xstrvprintf,,1257346704494969612;
->xstrprintf,,1257346704494974229;
-<xstrprintf,,1333,,1257346704494988249;
-<xstrvprintf,,1334,,1257346704495003563;
->xstrvprintf,,1257346704495011118;
->xstrprintf,,1257346704495015677;
-<xstrprintf,,1335,,1257346704495030305;
-<xstrvprintf,,1336,,1257346704495045577;
->xstrvprintf,,1257346704495053231;
->xstrprintf,,1257346704495057784;
-<add_setshow_auto_boolean_cmd,,1337,,1257346704495066488;
-<add_setshow_cmd_full,,1338,,1257346704495082929;
-<xstrdup,,1339,,1257346704495089645;
-<xmalloc,,1340,,1257346704495104186;
->xmalloc,,1257346704495111025;
->xstrdup,,1257346704495115485;
-<xstrdup,,1341,,1257346704495119969;
-<xmalloc,,1342,,1257346704495132916;
->xmalloc,,1257346704495139574;
->xstrdup,,1257346704495143980;
-<add_set_or_show_cmd,,1343,,1257346704495156771;
-<add_cmd,,1344,,1257346704495170355;
-<xmalloc,,1345,,1257346704495185501;
->xmalloc,,1257346704495192267;
-<delete_cmd,,1346,,1257346704495205025;
->delete_cmd,,1257346704495212017;
->add_cmd,,1257346704495216543;
->add_set_or_show_cmd,,1257346704495221196;
-<add_set_or_show_cmd,,1347,,1257346704495233839;
-<add_cmd,,1348,,1257346704495246924;
-<xmalloc,,1349,,1257346704495261787;
->xmalloc,,1257346704495268484;
-<delete_cmd,,1350,,1257346704495281380;
->delete_cmd,,1257346704495288505;
->add_cmd,,1257346704495293040;
->add_set_or_show_cmd,,1257346704495297735;
->add_setshow_cmd_full,,1257346704495302486;
->add_setshow_auto_boolean_cmd,,1257346704495307437;
-<xfree,,1351,,1257346704495319057;
->xfree,,1257346704495325954;
-<xfree,,1352,,1257346704495336684;
->xfree,,1257346704495343451;
->add_packet_config_cmd,,1257346704495348205;
-<add_packet_config_cmd,,1353,,1257346704495360683;
-<xstrprintf,,1354,,1257346704495374475;
-<xstrvprintf,,1355,,1257346704495390195;
->xstrvprintf,,1257346704495399271;
->xstrprintf,,1257346704495403921;
-<xstrprintf,,1356,,1257346704495417912;
-<xstrvprintf,,1357,,1257346704495433021;
->xstrvprintf,,1257346704495440906;
->xstrprintf,,1257346704495445586;
-<xstrprintf,,1358,,1257346704495459676;
-<xstrvprintf,,1359,,1257346704495474800;
->xstrvprintf,,1257346704495482595;
->xstrprintf,,1257346704495487179;
-<add_setshow_auto_boolean_cmd,,1360,,1257346704495495966;
-<add_setshow_cmd_full,,1361,,1257346704495512627;
-<xstrdup,,1362,,1257346704495519382;
-<xmalloc,,1363,,1257346704495534326;
->xmalloc,,1257346704495541207;
->xstrdup,,1257346704495545727;
-<xstrdup,,1364,,1257346704495550196;
-<xmalloc,,1365,,1257346704495563432;
->xmalloc,,1257346704495570265;
->xstrdup,,1257346704495574776;
-<add_set_or_show_cmd,,1366,,1257346704495587356;
-<add_cmd,,1367,,1257346704495606018;
-<xmalloc,,1368,,1257346704495626580;
->xmalloc,,1257346704495633596;
-<delete_cmd,,1369,,1257346704495645990;
->delete_cmd,,1257346704495653036;
->add_cmd,,1257346704495657566;
->add_set_or_show_cmd,,1257346704495662215;
-<add_set_or_show_cmd,,1370,,1257346704495674891;
-<add_cmd,,1371,,1257346704495688398;
-<xmalloc,,1372,,1257346704495703597;
->xmalloc,,1257346704495714337;
-<delete_cmd,,1373,,1257346704495726799;
->delete_cmd,,1257346704495733960;
->add_cmd,,1257346704495738468;
->add_set_or_show_cmd,,1257346704495743175;
->add_setshow_cmd_full,,1257346704495747921;
->add_setshow_auto_boolean_cmd,,1257346704495752817;
-<xfree,,1374,,1257346704495764564;
->xfree,,1257346704495771577;
-<xfree,,1375,,1257346704495782317;
->xfree,,1257346704495788987;
->add_packet_config_cmd,,1257346704495793703;
-<add_packet_config_cmd,,1376,,1257346704495806024;
-<xstrprintf,,1377,,1257346704495819690;
-<xstrvprintf,,1378,,1257346704495834811;
->xstrvprintf,,1257346704495842603;
->xstrprintf,,1257346704495847160;
-<xstrprintf,,1379,,1257346704495861439;
-<xstrvprintf,,1380,,1257346704495877014;
->xstrvprintf,,1257346704495884539;
->xstrprintf,,1257346704495889234;
-<xstrprintf,,1381,,1257346704495903762;
-<xstrvprintf,,1382,,1257346704495919040;
->xstrvprintf,,1257346704495926451;
->xstrprintf,,1257346704495930992;
-<add_setshow_auto_boolean_cmd,,1383,,1257346704495939665;
-<add_setshow_cmd_full,,1384,,1257346704495956308;
-<xstrdup,,1385,,1257346704495962958;
-<xmalloc,,1386,,1257346704495977634;
->xmalloc,,1257346704495984356;
->xstrdup,,1257346704495988795;
-<xstrdup,,1387,,1257346704495993264;
-<xmalloc,,1388,,1257346704496006021;
->xmalloc,,1257346704496012677;
->xstrdup,,1257346704496017068;
-<add_set_or_show_cmd,,1389,,1257346704496029365;
-<add_cmd,,1390,,1257346704496042429;
-<xmalloc,,1391,,1257346704496057241;
->xmalloc,,1257346704496063965;
-<delete_cmd,,1392,,1257346704496076681;
->delete_cmd,,1257346704496083664;
->add_cmd,,1257346704496088124;
->add_set_or_show_cmd,,1257346704496092722;
-<add_set_or_show_cmd,,1393,,1257346704496105071;
-<add_cmd,,1394,,1257346704496118267;
-<xmalloc,,1395,,1257346704496133112;
->xmalloc,,1257346704496139807;
-<delete_cmd,,1396,,1257346704496152492;
->delete_cmd,,1257346704496159602;
->add_cmd,,1257346704496164089;
->add_set_or_show_cmd,,1257346704496168810;
->add_setshow_cmd_full,,1257346704496173541;
->add_setshow_auto_boolean_cmd,,1257346704496178479;
-<xfree,,1397,,1257346704496190289;
->xfree,,1257346704496197107;
-<xfree,,1398,,1257346704496207763;
->xfree,,1257346704496214454;
->add_packet_config_cmd,,1257346704496219368;
-<add_packet_config_cmd,,1399,,1257346704496231702;
-<xstrprintf,,1400,,1257346704496245584;
-<xstrvprintf,,1401,,1257346704496260726;
->xstrvprintf,,1257346704496268362;
->xstrprintf,,1257346704496272942;
-<xstrprintf,,1402,,1257346704496286873;
-<xstrvprintf,,1403,,1257346704496302223;
->xstrvprintf,,1257346704496309787;
->xstrprintf,,1257346704496314346;
-<xstrprintf,,1404,,1257346704496328628;
-<xstrvprintf,,1405,,1257346704496343921;
->xstrvprintf,,1257346704496351400;
->xstrprintf,,1257346704496356077;
-<add_setshow_auto_boolean_cmd,,1406,,1257346704496364813;
-<add_setshow_cmd_full,,1407,,1257346704496381505;
-<xstrdup,,1408,,1257346704496388341;
-<xmalloc,,1409,,1257346704496403411;
->xmalloc,,1257346704496410159;
->xstrdup,,1257346704496414571;
-<xstrdup,,1410,,1257346704496419010;
-<xmalloc,,1411,,1257346704496431864;
->xmalloc,,1257346704496438567;
->xstrdup,,1257346704496443076;
-<add_set_or_show_cmd,,1412,,1257346704496455436;
-<add_cmd,,1413,,1257346704496468798;
-<xmalloc,,1414,,1257346704496483844;
->xmalloc,,1257346704496490524;
-<delete_cmd,,1415,,1257346704496502866;
->delete_cmd,,1257346704496509991;
->add_cmd,,1257346704496514481;
->add_set_or_show_cmd,,1257346704496519082;
-<add_set_or_show_cmd,,1416,,1257346704496531383;
-<add_cmd,,1417,,1257346704496544613;
-<xmalloc,,1418,,1257346704496559499;
->xmalloc,,1257346704496566272;
-<delete_cmd,,1419,,1257346704496578906;
->delete_cmd,,1257346704496586052;
->add_cmd,,1257346704496590563;
->add_set_or_show_cmd,,1257346704496595312;
->add_setshow_cmd_full,,1257346704496600082;
->add_setshow_auto_boolean_cmd,,1257346704496612483;
-<xfree,,1420,,1257346704496624633;
->xfree,,1257346704496631818;
-<xfree,,1421,,1257346704496642894;
->xfree,,1257346704496649598;
->add_packet_config_cmd,,1257346704496654329;
-<add_packet_config_cmd,,1422,,1257346704496666545;
-<xstrprintf,,1423,,1257346704496680156;
-<xstrvprintf,,1424,,1257346704496695221;
->xstrvprintf,,1257346704496703055;
->xstrprintf,,1257346704496707620;
-<xstrprintf,,1425,,1257346704496721466;
-<xstrvprintf,,1426,,1257346704496736919;
->xstrvprintf,,1257346704496744449;
->xstrprintf,,1257346704496748960;
-<xstrprintf,,1427,,1257346704496762792;
-<xstrvprintf,,1428,,1257346704496778571;
->xstrvprintf,,1257346704496786033;
->xstrprintf,,1257346704496790535;
-<add_setshow_auto_boolean_cmd,,1429,,1257346704496799251;
-<add_setshow_cmd_full,,1430,,1257346704496815918;
-<xstrdup,,1431,,1257346704496822618;
-<xmalloc,,1432,,1257346704496837304;
->xmalloc,,1257346704496843914;
->xstrdup,,1257346704496848455;
-<xstrdup,,1433,,1257346704496852903;
-<xmalloc,,1434,,1257346704496865736;
->xmalloc,,1257346704496872400;
->xstrdup,,1257346704496876764;
-<add_set_or_show_cmd,,1435,,1257346704496889106;
-<add_cmd,,1436,,1257346704496902198;
-<xmalloc,,1437,,1257346704496917064;
->xmalloc,,1257346704496923794;
-<delete_cmd,,1438,,1257346704496936022;
->delete_cmd,,1257346704496943093;
->add_cmd,,1257346704496947616;
->add_set_or_show_cmd,,1257346704496952356;
-<add_set_or_show_cmd,,1439,,1257346704496964623;
-<add_cmd,,1440,,1257346704496977808;
-<xmalloc,,1441,,1257346704496992679;
->xmalloc,,1257346704496999380;
-<delete_cmd,,1442,,1257346704497011599;
->delete_cmd,,1257346704497018658;
->add_cmd,,1257346704497023145;
->add_set_or_show_cmd,,1257346704497027824;
->add_setshow_cmd_full,,1257346704497032570;
->add_setshow_auto_boolean_cmd,,1257346704497037562;
-<xfree,,1443,,1257346704497049123;
->xfree,,1257346704497056073;
-<xfree,,1444,,1257346704497067333;
->xfree,,1257346704497074117;
->add_packet_config_cmd,,1257346704497078845;
-<add_packet_config_cmd,,1445,,1257346704497091290;
-<xstrprintf,,1446,,1257346704497105304;
-<xstrvprintf,,1447,,1257346704497120573;
->xstrvprintf,,1257346704497128158;
->xstrprintf,,1257346704497132747;
-<xstrprintf,,1448,,1257346704497147063;
-<xstrvprintf,,1449,,1257346704497162373;
->xstrvprintf,,1257346704497169904;
->xstrprintf,,1257346704497174454;
-<xstrprintf,,1450,,1257346704497188255;
-<xstrvprintf,,1451,,1257346704497203569;
->xstrvprintf,,1257346704497211160;
->xstrprintf,,1257346704497215758;
-<add_setshow_auto_boolean_cmd,,1452,,1257346704497224549;
-<add_setshow_cmd_full,,1453,,1257346704497241051;
-<xstrdup,,1454,,1257346704497247782;
-<xmalloc,,1455,,1257346704497262548;
->xmalloc,,1257346704497269269;
->xstrdup,,1257346704497273657;
-<xstrdup,,1456,,1257346704497278187;
-<xmalloc,,1457,,1257346704497291028;
->xmalloc,,1257346704497297669;
->xstrdup,,1257346704497302062;
-<add_set_or_show_cmd,,1458,,1257346704497314688;
-<add_cmd,,1459,,1257346704497327954;
-<xmalloc,,1460,,1257346704497342846;
->xmalloc,,1257346704497349571;
-<delete_cmd,,1461,,1257346704497362004;
->delete_cmd,,1257346704497368999;
->add_cmd,,1257346704497373543;
->add_set_or_show_cmd,,1257346704497378142;
-<add_set_or_show_cmd,,1462,,1257346704497390860;
-<add_cmd,,1463,,1257346704497403942;
-<xmalloc,,1464,,1257346704497418790;
->xmalloc,,1257346704497425484;
-<delete_cmd,,1465,,1257346704497437983;
->delete_cmd,,1257346704497445054;
->add_cmd,,1257346704497449625;
->add_set_or_show_cmd,,1257346704497454380;
->add_setshow_cmd_full,,1257346704497459050;
->add_setshow_auto_boolean_cmd,,1257346704497464016;
-<xfree,,1466,,1257346704497475567;
->xfree,,1257346704497482364;
-<xfree,,1467,,1257346704497493082;
->xfree,,1257346704497499735;
->add_packet_config_cmd,,1257346704497504429;
-<add_packet_config_cmd,,1468,,1257346704497516862;
-<xstrprintf,,1469,,1257346704497530567;
-<xstrvprintf,,1470,,1257346704497545688;
->xstrvprintf,,1257346704497553279;
->xstrprintf,,1257346704497557838;
-<xstrprintf,,1471,,1257346704497571639;
-<xstrvprintf,,1472,,1257346704497586752;
->xstrvprintf,,1257346704497594192;
->xstrprintf,,1257346704497598703;
-<xstrprintf,,1473,,1257346704497616694;
-<xstrvprintf,,1474,,1257346704497632486;
->xstrvprintf,,1257346704497640197;
->xstrprintf,,1257346704497644763;
-<add_setshow_auto_boolean_cmd,,1475,,1257346704497653683;
-<add_setshow_cmd_full,,1476,,1257346704497670127;
-<xstrdup,,1477,,1257346704497676831;
-<xmalloc,,1478,,1257346704497691862;
->xmalloc,,1257346704497698611;
->xstrdup,,1257346704497703128;
-<xstrdup,,1479,,1257346704497707573;
-<xmalloc,,1480,,1257346704497720321;
->xmalloc,,1257346704497727049;
->xstrdup,,1257346704497731581;
-<add_set_or_show_cmd,,1481,,1257346704497743827;
-<add_cmd,,1482,,1257346704497756853;
-<xmalloc,,1483,,1257346704497771523;
->xmalloc,,1257346704497778265;
-<delete_cmd,,1484,,1257346704497790530;
->delete_cmd,,1257346704497797549;
->add_cmd,,1257346704497802111;
->add_set_or_show_cmd,,1257346704497806701;
-<add_set_or_show_cmd,,1485,,1257346704497819452;
-<add_cmd,,1486,,1257346704497832715;
-<xmalloc,,1487,,1257346704497847812;
->xmalloc,,1257346704497854582;
-<delete_cmd,,1488,,1257346704497866813;
->delete_cmd,,1257346704497873826;
->add_cmd,,1257346704497878347;
->add_set_or_show_cmd,,1257346704497883002;
->add_setshow_cmd_full,,1257346704497887820;
->add_setshow_auto_boolean_cmd,,1257346704497892710;
-<xfree,,1489,,1257346704497904307;
->xfree,,1257346704497911146;
-<xfree,,1490,,1257346704497922047;
->xfree,,1257346704497928793;
->add_packet_config_cmd,,1257346704497933593;
-<add_packet_config_cmd,,1491,,1257346704497945945;
-<xstrprintf,,1492,,1257346704497959716;
-<xstrvprintf,,1493,,1257346704497975099;
->xstrvprintf,,1257346704497982786;
->xstrprintf,,1257346704497987366;
-<xstrprintf,,1494,,1257346704498001480;
-<xstrvprintf,,1495,,1257346704498017022;
->xstrvprintf,,1257346704498024508;
->xstrprintf,,1257346704498029043;
-<xstrprintf,,1496,,1257346704498042946;
-<xstrvprintf,,1497,,1257346704498058059;
->xstrvprintf,,1257346704498065466;
->xstrprintf,,1257346704498070019;
-<add_setshow_auto_boolean_cmd,,1498,,1257346704498079077;
-<add_setshow_cmd_full,,1499,,1257346704498095808;
-<xstrdup,,1500,,1257346704498102593;
-<xmalloc,,1501,,1257346704498117257;
->xmalloc,,1257346704498124018;
->xstrdup,,1257346704498128517;
-<xstrdup,,1502,,1257346704498133004;
-<xmalloc,,1503,,1257346704498146158;
->xmalloc,,1257346704498152841;
->xstrdup,,1257346704498157234;
-<add_set_or_show_cmd,,1504,,1257346704498169715;
-<add_cmd,,1505,,1257346704498182846;
-<xmalloc,,1506,,1257346704498197693;
->xmalloc,,1257346704498204403;
-<delete_cmd,,1507,,1257346704498216806;
->delete_cmd,,1257346704498223942;
->add_cmd,,1257346704498228468;
->add_set_or_show_cmd,,1257346704498233109;
-<add_set_or_show_cmd,,1508,,1257346704498245506;
-<add_cmd,,1509,,1257346704498258564;
-<xmalloc,,1510,,1257346704498273417;
->xmalloc,,1257346704498280103;
-<delete_cmd,,1511,,1257346704498292334;
->delete_cmd,,1257346704498299540;
->add_cmd,,1257346704498304051;
->add_set_or_show_cmd,,1257346704498308710;
->add_setshow_cmd_full,,1257346704498313431;
->add_setshow_auto_boolean_cmd,,1257346704498318306;
-<xfree,,1512,,1257346704498330267;
->xfree,,1257346704498337058;
-<xfree,,1513,,1257346704498347984;
->xfree,,1257346704498354672;
->add_packet_config_cmd,,1257346704498359439;
-<add_packet_config_cmd,,1514,,1257346704498371652;
-<xstrprintf,,1515,,1257346704498385390;
-<xstrvprintf,,1516,,1257346704498400457;
->xstrvprintf,,1257346704498408024;
->xstrprintf,,1257346704498412568;
-<xstrprintf,,1517,,1257346704498426802;
-<xstrvprintf,,1518,,1257346704498442242;
->xstrvprintf,,1257346704498449794;
->xstrprintf,,1257346704498454326;
-<xstrprintf,,1519,,1257346704498468200;
-<xstrvprintf,,1520,,1257346704498483185;
->xstrvprintf,,1257346704498490653;
->xstrprintf,,1257346704498495200;
-<add_setshow_auto_boolean_cmd,,1521,,1257346704498504217;
-<add_setshow_cmd_full,,1522,,1257346704498521308;
-<xstrdup,,1523,,1257346704498528156;
-<xmalloc,,1524,,1257346704498543154;
->xmalloc,,1257346704498549875;
->xstrdup,,1257346704498554281;
-<xstrdup,,1525,,1257346704498558735;
-<xmalloc,,1526,,1257346704498571520;
->xmalloc,,1257346704498578190;
->xstrdup,,1257346704498582668;
-<add_set_or_show_cmd,,1527,,1257346704498594996;
-<add_cmd,,1528,,1257346704498612035;
-<xmalloc,,1529,,1257346704498627226;
->xmalloc,,1257346704498634059;
-<delete_cmd,,1530,,1257346704498646371;
->delete_cmd,,1257346704498653481;
->add_cmd,,1257346704498658052;
->add_set_or_show_cmd,,1257346704498662680;
-<add_set_or_show_cmd,,1531,,1257346704498675083;
-<add_cmd,,1532,,1257346704498688676;
-<xmalloc,,1533,,1257346704498703623;
->xmalloc,,1257346704498710354;
-<delete_cmd,,1534,,1257346704498723042;
->delete_cmd,,1257346704498730071;
->add_cmd,,1257346704498734636;
->add_set_or_show_cmd,,1257346704498739255;
->add_setshow_cmd_full,,1257346704498743932;
->add_setshow_auto_boolean_cmd,,1257346704498748876;
-<xfree,,1535,,1257346704498760509;
->xfree,,1257346704498767429;
-<xfree,,1536,,1257346704498778135;
->xfree,,1257346704498784839;
->add_packet_config_cmd,,1257346704498789543;
-<add_packet_config_cmd,,1537,,1257346704498801888;
-<xstrprintf,,1538,,1257346704498815942;
-<xstrvprintf,,1539,,1257346704498831409;
->xstrvprintf,,1257346704498839171;
->xstrprintf,,1257346704498843737;
-<xstrprintf,,1540,,1257346704498857670;
-<xstrvprintf,,1541,,1257346704498873002;
->xstrvprintf,,1257346704498880590;
->xstrprintf,,1257346704498885188;
-<xstrprintf,,1542,,1257346704498899194;
-<xstrvprintf,,1543,,1257346704498914543;
->xstrvprintf,,1257346704498922059;
->xstrprintf,,1257346704498926615;
-<add_setshow_auto_boolean_cmd,,1544,,1257346704498935373;
-<add_setshow_cmd_full,,1545,,1257346704498951806;
-<xstrdup,,1546,,1257346704498958500;
-<xmalloc,,1547,,1257346704498973585;
->xmalloc,,1257346704498980304;
->xstrdup,,1257346704498984803;
-<xstrdup,,1548,,1257346704498989290;
-<xmalloc,,1549,,1257346704499002294;
->xmalloc,,1257346704499009091;
->xstrdup,,1257346704499013545;
-<add_set_or_show_cmd,,1550,,1257346704499025953;
-<add_cmd,,1551,,1257346704499039138;
-<xmalloc,,1552,,1257346704499054019;
->xmalloc,,1257346704499060656;
-<delete_cmd,,1553,,1257346704499073026;
->delete_cmd,,1257346704499080226;
->add_cmd,,1257346704499084671;
->add_set_or_show_cmd,,1257346704499089305;
-<add_set_or_show_cmd,,1554,,1257346704499102420;
-<add_cmd,,1555,,1257346704499116089;
-<xmalloc,,1556,,1257346704499131183;
->xmalloc,,1257346704499137806;
-<delete_cmd,,1557,,1257346704499150022;
->delete_cmd,,1257346704499157032;
->add_cmd,,1257346704499161441;
->add_set_or_show_cmd,,1257346704499166049;
->add_setshow_cmd_full,,1257346704499170767;
->add_setshow_auto_boolean_cmd,,1257346704499175721;
-<xfree,,1558,,1257346704499187272;
->xfree,,1257346704499194018;
-<xfree,,1559,,1257346704499204655;
->xfree,,1257346704499211271;
->add_packet_config_cmd,,1257346704499216050;
-<add_packet_config_cmd,,1560,,1257346704499228314;
-<xstrprintf,,1561,,1257346704499242095;
-<xstrvprintf,,1562,,1257346704499257072;
->xstrvprintf,,1257346704499264758;
->xstrprintf,,1257346704499269327;
-<xstrprintf,,1563,,1257346704499283576;
-<xstrvprintf,,1564,,1257346704499298637;
->xstrvprintf,,1257346704499306095;
->xstrprintf,,1257346704499310634;
-<xstrprintf,,1565,,1257346704499324444;
-<xstrvprintf,,1566,,1257346704499339613;
->xstrvprintf,,1257346704499347072;
->xstrprintf,,1257346704499351622;
-<add_setshow_auto_boolean_cmd,,1567,,1257346704499360425;
-<add_setshow_cmd_full,,1568,,1257346704499377167;
-<xstrdup,,1569,,1257346704499383898;
-<xmalloc,,1570,,1257346704499399401;
->xmalloc,,1257346704499406153;
->xstrdup,,1257346704499410541;
-<xstrdup,,1571,,1257346704499414961;
-<xmalloc,,1572,,1257346704499427908;
->xmalloc,,1257346704499434561;
->xstrdup,,1257346704499439033;
-<add_set_or_show_cmd,,1573,,1257346704499451300;
-<add_cmd,,1574,,1257346704499464349;
-<xmalloc,,1575,,1257346704499479152;
->xmalloc,,1257346704499485892;
-<delete_cmd,,1576,,1257346704499498162;
->delete_cmd,,1257346704499505257;
->add_cmd,,1257346704499509774;
->add_set_or_show_cmd,,1257346704499514429;
-<add_set_or_show_cmd,,1577,,1257346704499526706;
-<add_cmd,,1578,,1257346704499539773;
-<xmalloc,,1579,,1257346704499554738;
->xmalloc,,1257346704499563913;
-<delete_cmd,,1580,,1257346704499576310;
->delete_cmd,,1257346704499583477;
->add_cmd,,1257346704499587982;
->add_set_or_show_cmd,,1257346704499592667;
->add_setshow_cmd_full,,1257346704499597401;
->add_setshow_auto_boolean_cmd,,1257346704499606313;
-<xfree,,1581,,1257346704499618226;
->xfree,,1257346704499625224;
-<xfree,,1582,,1257346704499635924;
->xfree,,1257346704499642517;
->add_packet_config_cmd,,1257346704499647281;
-<add_packet_config_cmd,,1583,,1257346704499659930;
-<xstrprintf,,1584,,1257346704499674086;
-<xstrvprintf,,1585,,1257346704499689697;
->xstrvprintf,,1257346704499697484;
->xstrprintf,,1257346704499702058;
-<xstrprintf,,1586,,1257346704499716154;
-<xstrvprintf,,1587,,1257346704499731272;
->xstrvprintf,,1257346704499738854;
->xstrprintf,,1257346704499743410;
-<xstrprintf,,1588,,1257346704499757713;
-<xstrvprintf,,1589,,1257346704499773310;
->xstrvprintf,,1257346704499780832;
->xstrprintf,,1257346704499785406;
-<add_setshow_auto_boolean_cmd,,1590,,1257346704499794323;
-<add_setshow_cmd_full,,1591,,1257346704499810942;
-<xstrdup,,1592,,1257346704499817655;
-<xmalloc,,1593,,1257346704499832698;
->xmalloc,,1257346704499839470;
->xstrdup,,1257346704499843879;
-<xstrdup,,1594,,1257346704499848360;
-<xmalloc,,1595,,1257346704499861265;
->xmalloc,,1257346704499867951;
->xstrdup,,1257346704499872369;
-<add_set_or_show_cmd,,1596,,1257346704499884849;
-<add_cmd,,1597,,1257346704499898224;
-<xmalloc,,1598,,1257346704499913598;
->xmalloc,,1257346704499920340;
-<delete_cmd,,1599,,1257346704499932701;
->delete_cmd,,1257346704499939807;
->add_cmd,,1257346704499944414;
->add_set_or_show_cmd,,1257346704499949001;
-<add_set_or_show_cmd,,1600,,1257346704499961930;
-<add_cmd,,1601,,1257346704499975481;
-<xmalloc,,1602,,1257346704499990536;
->xmalloc,,1257346704499997312;
-<delete_cmd,,1603,,1257346704500009565;
->delete_cmd,,1257346704500016638;
->add_cmd,,1257346704500021158;
->add_set_or_show_cmd,,1257346704500025880;
->add_setshow_cmd_full,,1257346704500030598;
->add_setshow_auto_boolean_cmd,,1257346704500035546;
-<xfree,,1604,,1257346704500047106;
->xfree,,1257346704500053855;
-<xfree,,1605,,1257346704500064943;
->xfree,,1257346704500071638;
->add_packet_config_cmd,,1257346704500076368;
-<add_packet_config_cmd,,1606,,1257346704500088552;
-<xstrprintf,,1607,,1257346704500102497;
-<xstrvprintf,,1608,,1257346704500117630;
->xstrvprintf,,1257346704500125167;
->xstrprintf,,1257346704500129820;
-<xstrprintf,,1609,,1257346704500143717;
-<xstrvprintf,,1610,,1257346704500159301;
->xstrvprintf,,1257346704500166769;
->xstrprintf,,1257346704500171304;
-<xstrprintf,,1611,,1257346704500185051;
-<xstrvprintf,,1612,,1257346704500200136;
->xstrvprintf,,1257346704500207637;
->xstrprintf,,1257346704500212157;
-<add_setshow_auto_boolean_cmd,,1613,,1257346704500220978;
-<add_setshow_cmd_full,,1614,,1257346704500237837;
-<xstrdup,,1615,,1257346704500244481;
-<xmalloc,,1616,,1257346704500259157;
->xmalloc,,1257346704500265788;
->xstrdup,,1257346704500270233;
-<xstrdup,,1617,,1257346704500274693;
-<xmalloc,,1618,,1257346704500288079;
->xmalloc,,1257346704500294798;
->xstrdup,,1257346704500299183;
-<add_set_or_show_cmd,,1619,,1257346704500311513;
-<add_cmd,,1620,,1257346704500324587;
-<xmalloc,,1621,,1257346704500339392;
->xmalloc,,1257346704500346044;
-<delete_cmd,,1622,,1257346704500358456;
->delete_cmd,,1257346704500365542;
->add_cmd,,1257346704500370068;
->add_set_or_show_cmd,,1257346704500374669;
-<add_set_or_show_cmd,,1623,,1257346704500387108;
-<add_cmd,,1624,,1257346704500400205;
-<xmalloc,,1625,,1257346704500415098;
->xmalloc,,1257346704500421769;
-<delete_cmd,,1626,,1257346704500434081;
->delete_cmd,,1257346704500441221;
->add_cmd,,1257346704500445765;
->add_set_or_show_cmd,,1257346704500450568;
->add_setshow_cmd_full,,1257346704500455250;
->add_setshow_auto_boolean_cmd,,1257346704500460210;
-<xfree,,1627,,1257346704500472086;
->xfree,,1257346704500478814;
-<xfree,,1628,,1257346704500489920;
->xfree,,1257346704500496527;
->add_packet_config_cmd,,1257346704500501225;
-<add_packet_config_cmd,,1629,,1257346704500513459;
-<xstrprintf,,1630,,1257346704500527074;
-<xstrvprintf,,1631,,1257346704500542502;
->xstrvprintf,,1257346704500550186;
->xstrprintf,,1257346704500554742;
-<xstrprintf,,1632,,1257346704500568708;
-<xstrvprintf,,1633,,1257346704500584236;
->xstrvprintf,,1257346704500591727;
->xstrprintf,,1257346704500596254;
-<xstrprintf,,1634,,1257346704500614596;
-<xstrvprintf,,1635,,1257346704500630277;
->xstrvprintf,,1257346704500638000;
->xstrprintf,,1257346704500642568;
-<add_setshow_auto_boolean_cmd,,1636,,1257346704500651440;
-<add_setshow_cmd_full,,1637,,1257346704500668047;
-<xstrdup,,1638,,1257346704500674823;
-<xmalloc,,1639,,1257346704500689614;
->xmalloc,,1257346704500696278;
->xstrdup,,1257346704500700777;
-<xstrdup,,1640,,1257346704500705264;
-<xmalloc,,1641,,1257346704500718223;
->xmalloc,,1257346704500724906;
->xstrdup,,1257346704500729384;
-<add_set_or_show_cmd,,1642,,1257346704500742096;
-<add_cmd,,1643,,1257346704500755591;
-<xmalloc,,1644,,1257346704500771055;
->xmalloc,,1257346704500777861;
-<delete_cmd,,1645,,1257346704500790760;
->delete_cmd,,1257346704500797851;
->add_cmd,,1257346704500802479;
->add_set_or_show_cmd,,1257346704500807216;
-<add_set_or_show_cmd,,1646,,1257346704500819679;
-<add_cmd,,1647,,1257346704500832927;
-<xmalloc,,1648,,1257346704500847789;
->xmalloc,,1257346704500854661;
-<delete_cmd,,1649,,1257346704500867145;
->delete_cmd,,1257346704500874201;
->add_cmd,,1257346704500878778;
->add_set_or_show_cmd,,1257346704500883403;
->add_setshow_cmd_full,,1257346704500888248;
->add_setshow_auto_boolean_cmd,,1257346704500893163;
-<xfree,,1650,,1257346704500904924;
->xfree,,1257346704500911827;
-<xfree,,1651,,1257346704500922530;
->xfree,,1257346704500929264;
->add_packet_config_cmd,,1257346704500933976;
-<add_packet_config_cmd,,1652,,1257346704500946568;
-<xstrprintf,,1653,,1257346704500960288;
-<xstrvprintf,,1654,,1257346704500975791;
->xstrvprintf,,1257346704500983376;
->xstrprintf,,1257346704500987923;
-<xstrprintf,,1655,,1257346704501001740;
-<xstrvprintf,,1656,,1257346704501016831;
->xstrvprintf,,1257346704501024365;
->xstrprintf,,1257346704501028867;
-<xstrprintf,,1657,,1257346704501042975;
-<xstrvprintf,,1658,,1257346704501058051;
->xstrvprintf,,1257346704501065446;
->xstrprintf,,1257346704501069972;
-<add_setshow_auto_boolean_cmd,,1659,,1257346704501078817;
-<add_setshow_cmd_full,,1660,,1257346704501095292;
-<xstrdup,,1661,,1257346704501101998;
-<xmalloc,,1662,,1257346704501116659;
->xmalloc,,1257346704501123429;
->xstrdup,,1257346704501127820;
-<xstrdup,,1663,,1257346704501132271;
-<xmalloc,,1664,,1257346704501145528;
->xmalloc,,1257346704501152289;
->xstrdup,,1257346704501156730;
-<add_set_or_show_cmd,,1665,,1257346704501169542;
-<add_cmd,,1666,,1257346704501182606;
-<xmalloc,,1667,,1257346704501197607;
->xmalloc,,1257346704501204314;
-<delete_cmd,,1668,,1257346704501216626;
->delete_cmd,,1257346704501223736;
->add_cmd,,1257346704501228202;
->add_set_or_show_cmd,,1257346704501232779;
-<add_set_or_show_cmd,,1669,,1257346704501245146;
-<add_cmd,,1670,,1257346704501258331;
-<xmalloc,,1671,,1257346704501273190;
->xmalloc,,1257346704501279830;
-<delete_cmd,,1672,,1257346704501292128;
->delete_cmd,,1257346704501299165;
->add_cmd,,1257346704501303737;
->add_set_or_show_cmd,,1257346704501308401;
->add_setshow_cmd_full,,1257346704501313084;
->add_setshow_auto_boolean_cmd,,1257346704501317971;
-<xfree,,1673,,1257346704501329697;
->xfree,,1257346704501336415;
-<xfree,,1674,,1257346704501347648;
->xfree,,1257346704501354261;
->add_packet_config_cmd,,1257346704501359034;
-<add_packet_config_cmd,,1675,,1257346704501371232;
-<xstrprintf,,1676,,1257346704501385006;
-<xstrvprintf,,1677,,1257346704501400152;
->xstrvprintf,,1257346704501407682;
->xstrprintf,,1257346704501412242;
-<xstrprintf,,1678,,1257346704501426837;
-<xstrvprintf,,1679,,1257346704501442129;
->xstrvprintf,,1257346704501449892;
->xstrprintf,,1257346704501454430;
-<xstrprintf,,1680,,1257346704501468583;
-<xstrvprintf,,1681,,1257346704501483836;
->xstrvprintf,,1257346704501491334;
->xstrprintf,,1257346704501495902;
-<add_setshow_auto_boolean_cmd,,1682,,1257346704501505114;
-<add_setshow_cmd_full,,1683,,1257346704501521658;
-<xstrdup,,1684,,1257346704501528497;
-<xmalloc,,1685,,1257346704501543215;
->xmalloc,,1257346704501549910;
->xstrdup,,1257346704501554306;
-<xstrdup,,1686,,1257346704501558800;
-<xmalloc,,1687,,1257346704501571677;
->xmalloc,,1257346704501578264;
->xstrdup,,1257346704501582739;
-<add_set_or_show_cmd,,1688,,1257346704501595108;
-<add_cmd,,1689,,1257346704501612448;
-<xmalloc,,1690,,1257346704501627955;
->xmalloc,,1257346704501634854;
-<delete_cmd,,1691,,1257346704501647331;
->delete_cmd,,1257346704501654537;
->add_cmd,,1257346704501659051;
->add_set_or_show_cmd,,1257346704501663713;
-<add_set_or_show_cmd,,1692,,1257346704501676705;
-<add_cmd,,1693,,1257346704501690106;
-<xmalloc,,1694,,1257346704501705005;
->xmalloc,,1257346704501711856;
-<delete_cmd,,1695,,1257346704501724610;
->delete_cmd,,1257346704501731771;
->add_cmd,,1257346704501736258;
->add_set_or_show_cmd,,1257346704501740932;
->add_setshow_cmd_full,,1257346704501745668;
->add_setshow_auto_boolean_cmd,,1257346704501750606;
-<xfree,,1696,,1257346704501762311;
->xfree,,1257346704501769102;
-<xfree,,1697,,1257346704501779923;
->xfree,,1257346704501786593;
->add_packet_config_cmd,,1257346704501791381;
-<add_packet_config_cmd,,1698,,1257346704501803603;
-<xstrprintf,,1699,,1257346704501817447;
-<xstrvprintf,,1700,,1257346704501832511;
->xstrvprintf,,1257346704501840149;
->xstrprintf,,1257346704501844691;
-<xstrprintf,,1701,,1257346704501858534;
-<xstrvprintf,,1702,,1257346704501873622;
->xstrvprintf,,1257346704501881063;
->xstrprintf,,1257346704501885736;
-<xstrprintf,,1703,,1257346704501899579;
-<xstrvprintf,,1704,,1257346704501915185;
->xstrvprintf,,1257346704501922601;
->xstrprintf,,1257346704501927136;
-<add_setshow_auto_boolean_cmd,,1705,,1257346704501935951;
-<add_setshow_cmd_full,,1706,,1257346704501952435;
-<xstrdup,,1707,,1257346704501959274;
-<xmalloc,,1708,,1257346704501973833;
->xmalloc,,1257346704501980563;
->xstrdup,,1257346704501984972;
-<xstrdup,,1709,,1257346704501989414;
-<xmalloc,,1710,,1257346704502002169;
->xmalloc,,1257346704502008767;
->xstrdup,,1257346704502013236;
-<add_set_or_show_cmd,,1711,,1257346704502025828;
-<add_cmd,,1712,,1257346704502040258;
-<xmalloc,,1713,,1257346704502055833;
->xmalloc,,1257346704502062573;
-<delete_cmd,,1714,,1257346704502074855;
->delete_cmd,,1257346704502082055;
->add_cmd,,1257346704502086584;
->add_set_or_show_cmd,,1257346704502091180;
-<add_set_or_show_cmd,,1715,,1257346704502103639;
-<add_cmd,,1716,,1257346704502117158;
-<xmalloc,,1717,,1257346704502132234;
->xmalloc,,1257346704502138950;
-<delete_cmd,,1718,,1257346704502151364;
->delete_cmd,,1257346704502158462;
->add_cmd,,1257346704502162982;
->add_set_or_show_cmd,,1257346704502167646;
->add_setshow_cmd_full,,1257346704502172452;
->add_setshow_auto_boolean_cmd,,1257346704502177421;
-<xfree,,1719,,1257346704502189047;
->xfree,,1257346704502195919;
-<xfree,,1720,,1257346704502207047;
->xfree,,1257346704502213810;
->add_packet_config_cmd,,1257346704502218502;
-<add_packet_config_cmd,,1721,,1257346704502230830;
-<xstrprintf,,1722,,1257346704502244661;
-<xstrvprintf,,1723,,1257346704502259821;
->xstrvprintf,,1257346704502267403;
->xstrprintf,,1257346704502271950;
-<xstrprintf,,1724,,1257346704502286251;
-<xstrvprintf,,1725,,1257346704502302027;
->xstrvprintf,,1257346704502309498;
->xstrprintf,,1257346704502314009;
-<xstrprintf,,1726,,1257346704502327918;
-<xstrvprintf,,1727,,1257346704502343187;
->xstrvprintf,,1257346704502350609;
->xstrprintf,,1257346704502355169;
-<add_setshow_auto_boolean_cmd,,1728,,1257346704502364380;
-<add_setshow_cmd_full,,1729,,1257346704502381448;
-<xstrdup,,1730,,1257346704502388253;
-<xmalloc,,1731,,1257346704502402957;
->xmalloc,,1257346704502409684;
->xstrdup,,1257346704502414084;
-<xstrdup,,1732,,1257346704502418544;
-<xmalloc,,1733,,1257346704502431690;
->xmalloc,,1257346704502438357;
->xstrdup,,1257346704502442733;
-<add_set_or_show_cmd,,1734,,1257346704502455148;
-<add_cmd,,1735,,1257346704502468326;
-<xmalloc,,1736,,1257346704502483300;
->xmalloc,,1257346704502490055;
-<delete_cmd,,1737,,1257346704502502433;
->delete_cmd,,1257346704502509609;
->add_cmd,,1257346704502514099;
->add_set_or_show_cmd,,1257346704502518755;
-<add_set_or_show_cmd,,1738,,1257346704502531160;
-<add_cmd,,1739,,1257346704502544453;
-<xmalloc,,1740,,1257346704502559554;
->xmalloc,,1257346704502566236;
-<delete_cmd,,1741,,1257346704502578744;
->delete_cmd,,1257346704502586064;
->add_cmd,,1257346704502590551;
->add_set_or_show_cmd,,1257346704502595342;
->add_setshow_cmd_full,,1257346704502600070;
->add_setshow_auto_boolean_cmd,,1257346704502609339;
-<xfree,,1742,,1257346704502621332;
->xfree,,1257346704502628267;
-<xfree,,1743,,1257346704502639067;
->xfree,,1257346704502645771;
->add_packet_config_cmd,,1257346704502650676;
-<add_packet_config_cmd,,1744,,1257346704502662949;
-<xstrprintf,,1745,,1257346704502676943;
-<xstrvprintf,,1746,,1257346704502692413;
->xstrvprintf,,1257346704502700061;
->xstrprintf,,1257346704502704614;
-<xstrprintf,,1747,,1257346704502718508;
-<xstrvprintf,,1748,,1257346704502733762;
->xstrvprintf,,1257346704502741278;
->xstrprintf,,1257346704502745765;
-<xstrprintf,,1749,,1257346704502760047;
-<xstrvprintf,,1750,,1257346704502775228;
->xstrvprintf,,1257346704502782594;
->xstrprintf,,1257346704502787096;
-<add_setshow_auto_boolean_cmd,,1751,,1257346704502795943;
-<add_setshow_cmd_full,,1752,,1257346704502812451;
-<xstrdup,,1753,,1257346704502819185;
-<xmalloc,,1754,,1257346704502834234;
->xmalloc,,1257346704502840974;
->xstrdup,,1257346704502845368;
-<xstrdup,,1755,,1257346704502849831;
-<xmalloc,,1756,,1257346704502862600;
->xmalloc,,1257346704502869310;
->xstrdup,,1257346704502873794;
-<add_set_or_show_cmd,,1757,,1257346704502886251;
-<add_cmd,,1758,,1257346704502899450;
-<xmalloc,,1759,,1257346704502915017;
->xmalloc,,1257346704502921711;
-<delete_cmd,,1760,,1257346704502934282;
->delete_cmd,,1257346704502941491;
->add_cmd,,1257346704502946020;
->add_set_or_show_cmd,,1257346704502950613;
-<add_set_or_show_cmd,,1761,,1257346704502963036;
-<add_cmd,,1762,,1257346704502976380;
-<xmalloc,,1763,,1257346704502993718;
->xmalloc,,1257346704503212081;
-<delete_cmd,,1764,,1257346704503225185;
->delete_cmd,,1257346704503232709;
->add_cmd,,1257346704503237269;
->add_set_or_show_cmd,,1257346704503242051;
->add_setshow_cmd_full,,1257346704503246796;
->add_setshow_auto_boolean_cmd,,1257346704503251713;
-<xfree,,1765,,1257346704503263566;
->xfree,,1257346704503270759;
-<xfree,,1766,,1257346704503281721;
->xfree,,1257346704503288446;
->add_packet_config_cmd,,1257346704503293210;
-<add_packet_config_cmd,,1767,,1257346704503305540;
-<xstrprintf,,1768,,1257346704503319681;
-<xstrvprintf,,1769,,1257346704503335121;
->xstrvprintf,,1257346704503344883;
->xstrprintf,,1257346704503349533;
-<xstrprintf,,1770,,1257346704503363635;
-<xstrvprintf,,1771,,1257346704503378949;
->xstrvprintf,,1257346704503386533;
->xstrprintf,,1257346704503391087;
-<xstrprintf,,1772,,1257346704503405200;
-<xstrvprintf,,1773,,1257346704503420412;
->xstrvprintf,,1257346704503427930;
->xstrprintf,,1257346704503432487;
-<add_setshow_auto_boolean_cmd,,1774,,1257346704503441371;
-<add_setshow_cmd_full,,1775,,1257346704503458191;
-<xstrdup,,1776,,1257346704503465006;
-<xmalloc,,1777,,1257346704503479968;
->xmalloc,,1257346704503486672;
->xstrdup,,1257346704503491099;
-<xstrdup,,1778,,1257346704503495577;
-<xmalloc,,1779,,1257346704503508797;
->xmalloc,,1257346704503515456;
->xstrdup,,1257346704503519825;
-<add_set_or_show_cmd,,1780,,1257346704503532132;
-<add_cmd,,1781,,1257346704503545202;
-<xmalloc,,1782,,1257346704503559878;
->xmalloc,,1257346704503566558;
-<delete_cmd,,1783,,1257346704503578837;
->delete_cmd,,1257346704503586043;
->add_cmd,,1257346704503590503;
->add_set_or_show_cmd,,1257346704503595144;
-<add_set_or_show_cmd,,1784,,1257346704503612274;
-<add_cmd,,1785,,1257346704503626051;
-<xmalloc,,1786,,1257346704503640797;
->xmalloc,,1257346704503647545;
-<delete_cmd,,1787,,1257346704503659854;
->delete_cmd,,1257346704503667006;
->add_cmd,,1257346704503671454;
->add_set_or_show_cmd,,1257346704503676086;
->add_setshow_cmd_full,,1257346704503680940;
->add_setshow_auto_boolean_cmd,,1257346704503685887;
-<xfree,,1788,,1257346704503697854;
->xfree,,1257346704503704605;
-<xfree,,1789,,1257346704503715354;
->xfree,,1257346704503721904;
->add_packet_config_cmd,,1257346704503726655;
-<add_packet_config_cmd,,1790,,1257346704503739001;
-<xstrprintf,,1791,,1257346704503752733;
-<xstrvprintf,,1792,,1257346704503767722;
->xstrvprintf,,1257346704503778371;
->xstrprintf,,1257346704503783096;
-<xstrprintf,,1793,,1257346704503798284;
-<xstrvprintf,,1794,,1257346704503814036;
->xstrvprintf,,1257346704503821597;
->xstrprintf,,1257346704503826171;
-<xstrprintf,,1795,,1257346704503840427;
-<xstrvprintf,,1796,,1257346704503855734;
->xstrvprintf,,1257346704503863196;
->xstrprintf,,1257346704503867752;
-<add_setshow_auto_boolean_cmd,,1797,,1257346704503876609;
-<add_setshow_cmd_full,,1798,,1257346704503893066;
-<xstrdup,,1799,,1257346704503899865;
-<xmalloc,,1800,,1257346704503914370;
->xmalloc,,1257346704503921134;
->xstrdup,,1257346704503925543;
-<xstrdup,,1801,,1257346704503930015;
-<xmalloc,,1802,,1257346704503943115;
->xmalloc,,1257346704503949678;
->xstrdup,,1257346704503954167;
-<add_set_or_show_cmd,,1803,,1257346704503966429;
-<add_cmd,,1804,,1257346704503979752;
-<xmalloc,,1805,,1257346704503994443;
->xmalloc,,1257346704504001149;
-<delete_cmd,,1806,,1257346704504013447;
->delete_cmd,,1257346704504020671;
->add_cmd,,1257346704504025254;
->add_set_or_show_cmd,,1257346704504029904;
-<add_set_or_show_cmd,,1807,,1257346704504042598;
-<add_cmd,,1808,,1257346704504056556;
-<xmalloc,,1809,,1257346704504071836;
->xmalloc,,1257346704504078651;
-<delete_cmd,,1810,,1257346704504091237;
->delete_cmd,,1257346704504098419;
->add_cmd,,1257346704504102972;
->add_set_or_show_cmd,,1257346704504107637;
->add_setshow_cmd_full,,1257346704504112340;
->add_setshow_auto_boolean_cmd,,1257346704504117296;
-<xfree,,1811,,1257346704504129110;
->xfree,,1257346704504136060;
-<xfree,,1812,,1257346704504147052;
->xfree,,1257346704504153750;
->add_packet_config_cmd,,1257346704504158420;
-<add_packet_config_cmd,,1813,,1257346704504170756;
-<xstrprintf,,1814,,1257346704504184473;
-<xstrvprintf,,1815,,1257346704504199853;
->xstrvprintf,,1257346704504207589;
->xstrprintf,,1257346704504212124;
-<xstrprintf,,1816,,1257346704504226069;
-<xstrvprintf,,1817,,1257346704504241720;
->xstrvprintf,,1257346704504249284;
->xstrprintf,,1257346704504253825;
-<xstrprintf,,1818,,1257346704504267803;
-<xstrvprintf,,1819,,1257346704504283021;
->xstrvprintf,,1257346704504290503;
->xstrprintf,,1257346704504295071;
-<add_setshow_auto_boolean_cmd,,1820,,1257346704504304022;
-<add_setshow_cmd_full,,1821,,1257346704504321047;
-<xstrdup,,1822,,1257346704504327789;
-<xmalloc,,1823,,1257346704504342396;
->xmalloc,,1257346704504349094;
->xstrdup,,1257346704504353506;
-<xstrdup,,1824,,1257346704504357987;
-<xmalloc,,1825,,1257346704504371039;
->xmalloc,,1257346704504377665;
->xstrdup,,1257346704504382167;
-<add_set_or_show_cmd,,1826,,1257346704504394464;
-<add_cmd,,1827,,1257346704504407567;
-<xmalloc,,1828,,1257346704504422280;
->xmalloc,,1257346704504428944;
-<delete_cmd,,1829,,1257346704504441224;
->delete_cmd,,1257346704504448327;
->add_cmd,,1257346704504452778;
->add_set_or_show_cmd,,1257346704504457473;
-<add_set_or_show_cmd,,1830,,1257346704504469758;
-<add_cmd,,1831,,1257346704504482994;
-<xmalloc,,1832,,1257346704504497721;
->xmalloc,,1257346704504504449;
-<delete_cmd,,1833,,1257346704504516695;
->delete_cmd,,1257346704504523865;
->add_cmd,,1257346704504528328;
->add_set_or_show_cmd,,1257346704504533007;
->add_setshow_cmd_full,,1257346704504537732;
->add_setshow_auto_boolean_cmd,,1257346704504542712;
-<xfree,,1834,,1257346704504554760;
->xfree,,1257346704504561518;
-<xfree,,1835,,1257346704504572438;
->xfree,,1257346704504579141;
->add_packet_config_cmd,,1257346704504583872;
-<add_packet_config_cmd,,1836,,1257346704504596082;
-<xstrprintf,,1837,,1257346704504614701;
-<xstrvprintf,,1838,,1257346704504630196;
->xstrvprintf,,1257346704504638033;
->xstrprintf,,1257346704504642613;
-<xstrprintf,,1839,,1257346704504656505;
-<xstrvprintf,,1840,,1257346704504672423;
->xstrvprintf,,1257346704504680119;
->xstrprintf,,1257346704504684639;
-<xstrprintf,,1841,,1257346704504699207;
-<xstrvprintf,,1842,,1257346704504714241;
->xstrvprintf,,1257346704504721634;
->xstrprintf,,1257346704504726160;
-<add_setshow_auto_boolean_cmd,,1843,,1257346704504735077;
-<add_setshow_cmd_full,,1844,,1257346704504751464;
-<xstrdup,,1845,,1257346704504758063;
-<xmalloc,,1846,,1257346704504772910;
->xmalloc,,1257346704504779563;
->xstrdup,,1257346704504783971;
-<xstrdup,,1847,,1257346704504788444;
-<xmalloc,,1848,,1257346704504801382;
->xmalloc,,1257346704504808025;
->xstrdup,,1257346704504812413;
-<add_set_or_show_cmd,,1849,,1257346704504824906;
-<add_cmd,,1850,,1257346704504838313;
-<xmalloc,,1851,,1257346704504852992;
->xmalloc,,1257346704504859614;
-<delete_cmd,,1852,,1257346704504872360;
->delete_cmd,,1257346704504879457;
->add_cmd,,1257346704504883938;
->add_set_or_show_cmd,,1257346704504888579;
-<add_set_or_show_cmd,,1853,,1257346704504901177;
-<add_cmd,,1854,,1257346704504914722;
-<xmalloc,,1855,,1257346704504930009;
->xmalloc,,1257346704504936848;
-<delete_cmd,,1856,,1257346704504949684;
->delete_cmd,,1257346704504956842;
->add_cmd,,1257346704504961320;
->add_set_or_show_cmd,,1257346704504966071;
->add_setshow_cmd_full,,1257346704504970811;
->add_setshow_auto_boolean_cmd,,1257346704504975731;
-<xfree,,1857,,1257346704504987478;
->xfree,,1257346704504994254;
-<xfree,,1858,,1257346704505005042;
->xfree,,1257346704505011715;
->add_packet_config_cmd,,1257346704505016536;
-<add_packet_config_cmd,,1859,,1257346704505029197;
-<xstrprintf,,1860,,1257346704505043185;
-<xstrvprintf,,1861,,1257346704505058339;
->xstrvprintf,,1257346704505065999;
->xstrprintf,,1257346704505070561;
-<xstrprintf,,1862,,1257346704505084750;
-<xstrvprintf,,1863,,1257346704505099875;
->xstrvprintf,,1257346704505107390;
->xstrprintf,,1257346704505111947;
-<xstrprintf,,1864,,1257346704505125934;
-<xstrvprintf,,1865,,1257346704505141269;
->xstrvprintf,,1257346704505148724;
->xstrprintf,,1257346704505153308;
-<add_setshow_auto_boolean_cmd,,1866,,1257346704505162216;
-<add_setshow_cmd_full,,1867,,1257346704505179097;
-<xstrdup,,1868,,1257346704505185842;
-<xmalloc,,1869,,1257346704505200621;
->xmalloc,,1257346704505207219;
->xstrdup,,1257346704505211631;
-<xstrdup,,1870,,1257346704505216076;
-<xmalloc,,1871,,1257346704505229387;
->xmalloc,,1257346704505236069;
->xstrdup,,1257346704505240595;
-<add_set_or_show_cmd,,1872,,1257346704505253103;
-<add_cmd,,1873,,1257346704505266237;
-<xmalloc,,1874,,1257346704505280979;
->xmalloc,,1257346704505287692;
-<delete_cmd,,1875,,1257346704505299971;
->delete_cmd,,1257346704505307105;
->add_cmd,,1257346704505311610;
->add_set_or_show_cmd,,1257346704505316211;
-<add_set_or_show_cmd,,1876,,1257346704505328623;
-<add_cmd,,1877,,1257346704505341792;
-<xmalloc,,1878,,1257346704505356812;
->xmalloc,,1257346704505363584;
-<delete_cmd,,1879,,1257346704505375845;
->delete_cmd,,1257346704505383075;
->add_cmd,,1257346704505387547;
->add_set_or_show_cmd,,1257346704505392293;
->add_setshow_cmd_full,,1257346704505397015;
->add_setshow_auto_boolean_cmd,,1257346704505401926;
-<xfree,,1880,,1257346704505413911;
->xfree,,1257346704505420746;
-<xfree,,1881,,1257346704505431705;
->xfree,,1257346704505438463;
->add_packet_config_cmd,,1257346704505443206;
-<add_packet_config_cmd,,1882,,1257346704505455512;
-<xstrprintf,,1883,,1257346704505469310;
-<xstrvprintf,,1884,,1257346704505484329;
->xstrvprintf,,1257346704505491941;
->xstrprintf,,1257346704505496495;
-<xstrprintf,,1885,,1257346704505510371;
-<xstrvprintf,,1886,,1257346704505525802;
->xstrvprintf,,1257346704505533348;
->xstrprintf,,1257346704505537892;
-<xstrprintf,,1887,,1257346704505552821;
-<xstrvprintf,,1888,,1257346704505568547;
->xstrvprintf,,1257346704505575942;
->xstrprintf,,1257346704505580486;
-<add_setshow_auto_boolean_cmd,,1889,,1257346704505589355;
-<add_setshow_cmd_full,,1890,,1257346704505610074;
-<xstrdup,,1891,,1257346704505617165;
-<xmalloc,,1892,,1257346704505632170;
->xmalloc,,1257346704505639032;
->xstrdup,,1257346704505643456;
-<xstrdup,,1893,,1257346704505647919;
-<xmalloc,,1894,,1257346704505660719;
->xmalloc,,1257346704505667395;
->xstrdup,,1257346704505671777;
-<add_set_or_show_cmd,,1895,,1257346704505684258;
-<add_cmd,,1896,,1257346704505697524;
-<xmalloc,,1897,,1257346704505712735;
->xmalloc,,1257346704505719430;
-<delete_cmd,,1898,,1257346704505731764;
->delete_cmd,,1257346704505738945;
->add_cmd,,1257346704505743399;
->add_set_or_show_cmd,,1257346704505748031;
-<add_set_or_show_cmd,,1899,,1257346704505760770;
-<add_cmd,,1900,,1257346704505774285;
-<xmalloc,,1901,,1257346704505789262;
->xmalloc,,1257346704505795906;
-<delete_cmd,,1902,,1257346704505808651;
->delete_cmd,,1257346704505815776;
->add_cmd,,1257346704505820308;
->add_set_or_show_cmd,,1257346704505825006;
->add_setshow_cmd_full,,1257346704505829881;
->add_setshow_auto_boolean_cmd,,1257346704505834948;
-<xfree,,1903,,1257346704505846716;
->xfree,,1257346704505853645;
-<xfree,,1904,,1257346704505864472;
->xfree,,1257346704505871155;
->add_packet_config_cmd,,1257346704505875942;
-<add_setshow_auto_boolean_cmd,,1905,,1257346704505888977;
-<add_setshow_cmd_full,,1906,,1257346704505905833;
-<xstrprintf,,1907,,1257346704505922206;
-<xstrvprintf,,1908,,1257346704505937333;
->xstrvprintf,,1257346704505946238;
->xstrprintf,,1257346704505950845;
-<xstrprintf,,1909,,1257346704505964914;
-<xstrvprintf,,1910,,1257346704505980451;
->xstrvprintf,,1257346704505988438;
->xstrprintf,,1257346704505993025;
-<add_set_or_show_cmd,,1911,,1257346704506005452;
-<add_cmd,,1912,,1257346704506018714;
-<xmalloc,,1913,,1257346704506033568;
->xmalloc,,1257346704506040407;
-<delete_cmd,,1914,,1257346704506052869;
->delete_cmd,,1257346704506060045;
->add_cmd,,1257346704506064511;
->add_set_or_show_cmd,,1257346704506069161;
-<add_set_or_show_cmd,,1915,,1257346704506081572;
-<add_cmd,,1916,,1257346704506094781;
-<xmalloc,,1917,,1257346704506109647;
->xmalloc,,1257346704506116398;
-<delete_cmd,,1918,,1257346704506129102;
->delete_cmd,,1257346704506136431;
->add_cmd,,1257346704506140843;
->add_set_or_show_cmd,,1257346704506145516;
->add_setshow_cmd_full,,1257346704506150256;
->add_setshow_auto_boolean_cmd,,1257346704506155284;
-<add_prefix_cmd,,1919,,1257346704506167711;
-<add_cmd,,1920,,1257346704506181076;
-<xmalloc,,1921,,1257346704506195936;
->xmalloc,,1257346704506202627;
-<delete_cmd,,1922,,1257346704506215268;
->delete_cmd,,1257346704506222540;
->add_cmd,,1257346704506226973;
->add_prefix_cmd,,1257346704506231484;
-<add_cmd,,1923,,1257346704506243291;
-<xmalloc,,1924,,1257346704506258451;
->xmalloc,,1257346704506265206;
-<delete_cmd,,1925,,1257346704506277837;
->delete_cmd,,1257346704506284619;
->add_cmd,,1257346704506289082;
-<add_cmd,,1926,,1257346704506300402;
-<xmalloc,,1927,,1257346704506315175;
->xmalloc,,1257346704506321971;
-<delete_cmd,,1928,,1257346704506334232;
->delete_cmd,,1257346704506341117;
->add_cmd,,1257346704506345504;
-<add_cmd,,1929,,1257346704506357011;
-<xmalloc,,1930,,1257346704506371873;
->xmalloc,,1257346704506378646;
-<delete_cmd,,1931,,1257346704506390904;
->delete_cmd,,1257346704506397843;
->add_cmd,,1257346704506402224;
-<xstrdup,,1932,,1257346704506406651;
-<xmalloc,,1933,,1257346704506421460;
->xmalloc,,1257346704506428182;
->xstrdup,,1257346704506432545;
-<add_setshow_string_noescape_cmd,,1934,,1257346704506450704;
-<add_setshow_cmd_full,,1935,,1257346704506469994;
-<xstrdup,,1936,,1257346704506476734;
-<xmalloc,,1937,,1257346704506491175;
->xmalloc,,1257346704506497933;
->xstrdup,,1257346704506502333;
-<xstrdup,,1938,,1257346704506506760;
-<xmalloc,,1939,,1257346704506519544;
->xmalloc,,1257346704506526185;
->xstrdup,,1257346704506530549;
-<add_set_or_show_cmd,,1940,,1257346704506543222;
-<add_cmd,,1941,,1257346704506556403;
-<xmalloc,,1942,,1257346704506571254;
->xmalloc,,1257346704506577964;
-<delete_cmd,,1943,,1257346704506590619;
->delete_cmd,,1257346704506597783;
->add_cmd,,1257346704506608145;
->add_set_or_show_cmd,,1257346704506615481;
-<add_set_or_show_cmd,,1944,,1257346704506628022;
-<add_cmd,,1945,,1257346704506641393;
-<xmalloc,,1946,,1257346704506656120;
->xmalloc,,1257346704506662917;
-<delete_cmd,,1947,,1257346704506675190;
->delete_cmd,,1257346704506682441;
->add_cmd,,1257346704506686892;
->add_set_or_show_cmd,,1257346704506691547;
->add_setshow_cmd_full,,1257346704506696380;
->add_setshow_string_noescape_cmd,,1257346704506700440;
-<initialize_remote_fileio,,1948,,1257346704506712374;
-<create_async_signal_handler,,1949,,1257346704506724386;
-<xmalloc,,1950,,1257346704506739125;
->xmalloc,,1257346704506745883;
->create_async_signal_handler,,1257346704506751116;
-<add_cmd,,1951,,1257346704506763154;
-<xmalloc,,1952,,1257346704506777632;
->xmalloc,,1257346704506784369;
-<delete_cmd,,1953,,1257346704506796705;
->delete_cmd,,1257346704506805303;
->add_cmd,,1257346704506809998;
-<add_cmd,,1954,,1257346704506821489;
-<xmalloc,,1955,,1257346704506836325;
->xmalloc,,1257346704506843092;
-<delete_cmd,,1956,,1257346704506855371;
->delete_cmd,,1257346704506862652;
->add_cmd,,1257346704506867329;
->initialize_remote_fileio,,1257346704506872336;
-<ptid_build,,1957,,1257346704506881851;
->ptid_build,,1257346704506890825;
-<ptid_build,,1958,,1257346704506897400;
->ptid_build,,1257346704506904142;
-<ptid_build,,1959,,1257346704506910151;
->ptid_build,,1257346704506916804;
->_initialize_remote,,1257346704506921730;
-<_initialize_dcache,,1960,,1257346704506933215;
-<add_setshow_boolean_cmd,,1961,,1257346704506951615;
-<add_setshow_cmd_full,,1962,,1257346704506968330;
-<xstrprintf,,1963,,1257346704506984865;
-<xstrvprintf,,1964,,1257346704506999752;
->xstrvprintf,,1257346704507008245;
->xstrprintf,,1257346704507012831;
-<xstrprintf,,1965,,1257346704507026954;
-<xstrvprintf,,1966,,1257346704507041826;
->xstrvprintf,,1257346704507052550;
->xstrprintf,,1257346704507057269;
-<add_set_or_show_cmd,,1967,,1257346704507069434;
-<add_cmd,,1968,,1257346704507082636;
-<xmalloc,,1969,,1257346704507097033;
->xmalloc,,1257346704507135101;
-<delete_cmd,,1970,,1257346704507147380;
->delete_cmd,,1257346704507155786;
->add_cmd,,1257346704507160351;
->add_set_or_show_cmd,,1257346704507165010;
-<add_set_or_show_cmd,,1971,,1257346704507177187;
-<add_cmd,,1972,,1257346704507190185;
-<xmalloc,,1973,,1257346704507204530;
->xmalloc,,1257346704507211345;
-<delete_cmd,,1974,,1257346704507223273;
->delete_cmd,,1257346704507231050;
->add_cmd,,1257346704507235588;
->add_set_or_show_cmd,,1257346704507240250;
->add_setshow_cmd_full,,1257346704507245038;
->add_setshow_boolean_cmd,,1257346704507249786;
-<add_info,,1975,,1257346704507262237;
-<add_cmd,,1976,,1257346704507275710;
-<xmalloc,,1977,,1257346704507290501;
->xmalloc,,1257346704507297346;
-<delete_cmd,,1978,,1257346704507310425;
->delete_cmd,,1257346704507317549;
->add_cmd,,1257346704507321974;
->add_info,,1257346704507326331;
->_initialize_dcache,,1257346704507331146;
-<_initialize_tracepoint,,1979,,1257346704507343693;
-<xmalloc,,1980,,1257346704507359990;
->xmalloc,,1257346704507367749;
-<xmalloc,,1981,,1257346704507378814;
->xmalloc,,1257346704507385523;
-<xmalloc,,1982,,1257346704507395782;
->xmalloc,,1257346704507404843;
-<xmalloc,,1983,,1257346704507416112;
->xmalloc,,1257346704507422933;
-<add_info,,1984,,1257346704507434746;
-<add_cmd,,1985,,1257346704507448168;
-<xmalloc,,1986,,1257346704507462808;
->xmalloc,,1257346704507469581;
-<delete_cmd,,1987,,1257346704507481554;
->delete_cmd,,1257346704507489977;
->add_cmd,,1257346704507494564;
->add_info,,1257346704507498952;
-<add_cmd,,1988,,1257346704507510804;
-<xmalloc,,1989,,1257346704507525832;
->xmalloc,,1257346704507532596;
-<delete_cmd,,1990,,1257346704507544992;
->delete_cmd,,1257346704507552081;
->add_cmd,,1257346704507556505;
-<add_com,,1991,,1257346704507569786;
-<add_cmd,,1992,,1257346704507582868;
-<xmalloc,,1993,,1257346704507597343;
->xmalloc,,1257346704507608873;
-<delete_cmd,,1994,,1257346704507620978;
->delete_cmd,,1257346704507629291;
->add_cmd,,1257346704507633838;
->add_com,,1257346704507638223;
-<add_prefix_cmd,,1995,,1257346704507650499;
-<add_cmd,,1996,,1257346704507663669;
-<xmalloc,,1997,,1257346704507678182;
->xmalloc,,1257346704507684949;
-<delete_cmd,,1998,,1257346704507697325;
->delete_cmd,,1257346704507704293;
->add_cmd,,1257346704507708831;
->add_prefix_cmd,,1257346704507713336;
-<add_cmd,,1999,,1257346704507724804;
-<xmalloc,,2000,,1257346704507739486;
->xmalloc,,1257346704507746280;
-<delete_cmd,,2001,,1257346704507758237;
->delete_cmd,,1257346704507765040;
->add_cmd,,1257346704507769482;
-<add_cmd,,2002,,1257346704507780808;
-<xmalloc,,2003,,1257346704507795701;
->xmalloc,,1257346704507802455;
-<delete_cmd,,2004,,1257346704507814672;
->delete_cmd,,1257346704507821631;
->add_cmd,,1257346704507826103;
-<add_cmd,,2005,,1257346704507837708;
-<xmalloc,,2006,,1257346704507852264;
->xmalloc,,1257346704507858953;
-<delete_cmd,,2007,,1257346704507871031;
->delete_cmd,,1257346704507877957;
->add_cmd,,1257346704507882318;
-<add_cmd,,2008,,1257346704507893761;
-<xmalloc,,2009,,1257346704507908302;
->xmalloc,,1257346704507915069;
-<delete_cmd,,2010,,1257346704507927173;
->delete_cmd,,1257346704507934109;
->add_cmd,,1257346704507938457;
-<add_cmd,,2011,,1257346704507949901;
-<xmalloc,,2012,,1257346704507964745;
->xmalloc,,1257346704507971494;
-<delete_cmd,,2013,,1257346704507983446;
->delete_cmd,,1257346704507990359;
->add_cmd,,1257346704507994768;
-<add_cmd,,2014,,1257346704508006034;
-<xmalloc,,2015,,1257346704508020464;
->xmalloc,,1257346704508027186;
-<delete_cmd,,2016,,1257346704508039128;
->delete_cmd,,1257346704508046015;
->add_cmd,,1257346704508050415;
-<add_cmd,,2017,,1257346704508061669;
-<xmalloc,,2018,,1257346704508076447;
->xmalloc,,1257346704508083145;
-<delete_cmd,,2019,,1257346704508095081;
->delete_cmd,,1257346704508102031;
->add_cmd,,1257346704508106437;
-<add_cmd,,2020,,1257346704508117691;
-<xmalloc,,2021,,1257346704508132103;
->xmalloc,,1257346704508138803;
-<delete_cmd,,2022,,1257346704508151122;
->delete_cmd,,1257346704508158015;
->add_cmd,,1257346704508162439;
-<add_com,,2023,,1257346704508175097;
-<add_cmd,,2024,,1257346704508188477;
-<xmalloc,,2025,,1257346704508203303;
->xmalloc,,1257346704508209914;
-<delete_cmd,,2026,,1257346704508221871;
->delete_cmd,,1257346704508228800;
->add_cmd,,1257346704508233348;
->add_com,,1257346704508237682;
-<add_com,,2027,,1257346704508250156;
-<add_cmd,,2028,,1257346704508263308;
-<xmalloc,,2029,,1257346704508278035;
->xmalloc,,1257346704508284666;
-<delete_cmd,,2030,,1257346704508296684;
->delete_cmd,,1257346704508303749;
->add_cmd,,1257346704508308344;
->add_com,,1257346704508312593;
-<add_com,,2031,,1257346704508325435;
-<add_cmd,,2032,,1257346704508338788;
-<xmalloc,,2033,,1257346704508353729;
->xmalloc,,1257346704508360405;
-<delete_cmd,,2034,,1257346704508372802;
->delete_cmd,,1257346704508381034;
->add_cmd,,1257346704508385596;
->add_com,,1257346704508389930;
-<add_com,,2035,,1257346704508402467;
-<add_cmd,,2036,,1257346704508415556;
-<xmalloc,,2037,,1257346704508429952;
->xmalloc,,1257346704508436683;
-<delete_cmd,,2038,,1257346704508449026;
->delete_cmd,,1257346704508456063;
->add_cmd,,1257346704508460535;
->add_com,,1257346704508464884;
-<add_com,,2039,,1257346704508477554;
-<add_cmd,,2040,,1257346704508490651;
-<xmalloc,,2041,,1257346704508505213;
->xmalloc,,1257346704508511926;
-<delete_cmd,,2042,,1257346704508523961;
->delete_cmd,,1257346704508530993;
->add_cmd,,1257346704508535480;
->add_com,,1257346704508539832;
-<add_com_alias,,2043,,1257346704508551347;
-<add_alias_cmd,,2044,,1257346704508566252;
-<lookup_cmd,,2045,,1257346704508580573;
-<lookup_cmd_1,,2046,,1257346704508593896;
-<find_command_name_length,,2047,,1257346704508612480;
->find_command_name_length,,1257346704508620684;
-<find_cmd,,2048,,1257346704508631547;
->find_cmd,,1257346704508638648;
->lookup_cmd_1,,1257346704508643234;
->lookup_cmd,,1257346704508647781;
-<add_cmd,,2049,,1257346704508658352;
-<xmalloc,,2050,,1257346704508672752;
->xmalloc,,1257346704508679534;
-<delete_cmd,,2051,,1257346704508691573;
->delete_cmd,,1257346704508698679;
->add_cmd,,1257346704508703139;
->add_alias_cmd,,1257346704508707644;
->add_com_alias,,1257346704508712354;
-<add_com_alias,,2052,,1257346704508723457;
-<add_alias_cmd,,2053,,1257346704508736416;
-<lookup_cmd,,2054,,1257346704508750632;
-<lookup_cmd_1,,2055,,1257346704508764166;
-<find_command_name_length,,2056,,1257346704508778614;
->find_command_name_length,,1257346704508785954;
-<find_cmd,,2057,,1257346704508796853;
->find_cmd,,1257346704508803777;
->lookup_cmd_1,,1257346704508808279;
->lookup_cmd,,1257346704508812706;
-<add_cmd,,2058,,1257346704508823186;
-<xmalloc,,2059,,1257346704508837120;
->xmalloc,,1257346704508843811;
-<delete_cmd,,2060,,1257346704508856226;
->delete_cmd,,1257346704514881525;
->add_cmd,,1257346704514887189;
->add_alias_cmd,,1257346704514891760;
->add_com_alias,,1257346704514896376;
-<add_com,,2061,,1257346704514910589;
-<add_cmd,,2062,,1257346704514924610;
-<xmalloc,,2063,,1257346704514939325;
->xmalloc,,1257346704514946188;
-<delete_cmd,,2064,,1257346704514958374;
->delete_cmd,,1257346704514965490;
->add_cmd,,1257346704514970028;
->add_com,,1257346704514974341;
-<add_com,,2065,,1257346704514987258;
-<add_cmd,,2066,,1257346704515000674;
-<xmalloc,,2067,,1257346704515020427;
->xmalloc,,1257346704515028138;
-<delete_cmd,,2068,,1257346704515040137;
->delete_cmd,,1257346704515047328;
->add_cmd,,1257346704515051764;
->add_com,,1257346704515056107;
-<xmalloc,,2069,,1257346704515067884;
->xmalloc,,1257346704515077493;
->_initialize_tracepoint,,1257346704515082533;
-<_initialize_ax_gdb,,2070,,1257346704515095967;
-<add_cmd,,2071,,1257346704515112307;
-<xmalloc,,2072,,1257346704515127127;
->xmalloc,,1257346704515134032;
-<delete_cmd,,2073,,1257346704515146065;
->delete_cmd,,1257346704515153051;
->add_cmd,,1257346704515157457;
-<add_cmd,,2074,,1257346704515168925;
-<xmalloc,,2075,,1257346704515183450;
->xmalloc,,1257346704515190172;
-<delete_cmd,,2076,,1257346704515208391;
->delete_cmd,,1257346704515216240;
->add_cmd,,1257346704515220775;
->_initialize_ax_gdb,,1257346704515225596;
-<_initialize_elfread,,2077,,1257346704515238053;
-<add_symtab_fns,,2078,,1257346704515253159;
->add_symtab_fns,,1257346704515265863;
->_initialize_elfread,,1257346704515271117;
-<_initialize_ada_exp,,2079,,1257346704515281646;
-<xmalloc,,2080,,1257346704515301603;
->xmalloc,,1257346704515311371;
->_initialize_ada_exp,,1257346704515316424;
-<_initialize_annotate,,2081,,1257346704515326393;
->_initialize_annotate,,1257346704515335437;
-<_initialize_addrmap,,2082,,1257346704515345421;
->_initialize_addrmap,,1257346704515354176;
-<_initialize_auxv,,2083,,1257346704515365126;
-<add_info,,2084,,1257346704515379273;
-<add_cmd,,2085,,1257346704515392479;
-<xmalloc,,2086,,1257346704515406818;
->xmalloc,,1257346704515413558;
-<delete_cmd,,2087,,1257346704515425452;
->delete_cmd,,1257346704515432438;
->add_cmd,,1257346704515436835;
->add_info,,1257346704515441187;
->_initialize_auxv,,1257346704515445893;
-<_initialize_breakpoint,,2088,,1257346704515458660;
-<observer_attach_solib_unloaded,,2089,,1257346704515478705;
-<generic_observer_attach,,2090,,1257346704515498358;
-<xmalloc,,2091,,1257346704515512887;
->xmalloc,,1257346704515519771;
-<xmalloc,,2092,,1257346704515529951;
->xmalloc,,1257346704515536763;
->generic_observer_attach,,1257346704515541599;
->observer_attach_solib_unloaded,,1257346704515545888;
-<observer_attach_inferior_exit,,2093,,1257346704515559890;
-<generic_observer_attach,,2094,,1257346704515579032;
-<xmalloc,,2095,,1257346704515593459;
->xmalloc,,1257346704515606490;
-<xmalloc,,2096,,1257346704515622733;
->xmalloc,,1257346704515629972;
->generic_observer_attach,,1257346704515634889;
->observer_attach_inferior_exit,,1257346704515639265;
-<add_com,,2097,,1257346704515651378;
-<add_cmd,,2098,,1257346704515664407;
-<xmalloc,,2099,,1257346704515678785;
->xmalloc,,1257346704515685615;
-<delete_cmd,,2100,,1257346704515697380;
->delete_cmd,,1257346704515704562;
->add_cmd,,1257346704515709043;
->add_com,,1257346704515713388;
-<add_com,,2101,,1257346704515725141;
-<add_cmd,,2102,,1257346704515738067;
-<xmalloc,,2103,,1257346704515752596;
->xmalloc,,1257346704515759381;
-<delete_cmd,,2104,,1257346704515771387;
->delete_cmd,,1257346704515778517;
->add_cmd,,1257346704515782990;
->add_com,,1257346704515787314;
-<add_com,,2105,,1257346704515799380;
-<add_cmd,,2106,,1257346704515812186;
-<xmalloc,,2107,,1257346704515826369;
->xmalloc,,1257346704515833045;
-<delete_cmd,,2108,,1257346704515844840;
->delete_cmd,,1257346704515851923;
->add_cmd,,1257346704515856356;
->add_com,,1257346704515860626;
-<add_com,,2109,,1257346704515872376;
-<add_cmd,,2110,,1257346704515885173;
-<xmalloc,,2111,,1257346704515899356;
->xmalloc,,1257346704515906032;
-<delete_cmd,,2112,,1257346704515917668;
->delete_cmd,,1257346704515924811;
->add_cmd,,1257346704515929295;
->add_com,,1257346704515933559;
-<set_cmd_completer,,2113,,1257346704515944287;
->set_cmd_completer,,1257346704515952876;
-<add_com,,2114,,1257346704515964903;
-<add_cmd,,2115,,1257346704515977841;
-<xmalloc,,2116,,1257346704515992352;
->xmalloc,,1257346704515999097;
-<delete_cmd,,2117,,1257346704516010796;
->delete_cmd,,1257346704516017792;
->add_cmd,,1257346704516022212;
->add_com,,1257346704516026618;
-<set_cmd_completer,,2118,,1257346704516037484;
->set_cmd_completer,,1257346704516044455;
-<add_com,,2119,,1257346704516056235;
-<add_cmd,,2120,,1257346704516069071;
-<xmalloc,,2121,,1257346704516084490;
->xmalloc,,1257346704516091257;
-<delete_cmd,,2122,,1257346704516103154;
->delete_cmd,,1257346704516110198;
->add_cmd,,1257346704516114706;
->add_com,,1257346704516119024;
-<set_cmd_completer,,2123,,1257346704516129899;
->set_cmd_completer,,1257346704516136928;
-<add_prefix_cmd,,2124,,1257346704516148218;
-<add_cmd,,2125,,1257346704516161050;
-<xmalloc,,2126,,1257346704516175351;
->xmalloc,,1257346704516182123;
-<delete_cmd,,2127,,1257346704516194162;
->delete_cmd,,1257346704516201290;
->add_cmd,,1257346704516205735;
->add_prefix_cmd,,1257346704516210264;
-<add_com_alias,,2128,,1257346704516221009;
-<add_alias_cmd,,2129,,1257346704516233686;
-<lookup_cmd,,2130,,1257346704516247487;
-<lookup_cmd_1,,2131,,1257346704516259962;
-<find_command_name_length,,2132,,1257346704516273257;
->find_command_name_length,,1257346704516280541;
-<find_cmd,,2133,,1257346704516291037;
->find_cmd,,1257346704516297891;
-<lookup_cmd_1,,2134,,1257346704516308119;
-<find_command_name_length,,2135,,1257346704516321484;
->find_command_name_length,,1257346704516328654;
->lookup_cmd_1,,1257346704516333346;
->lookup_cmd_1,,1257346704516337761;
->lookup_cmd,,1257346704516342302;
-<add_cmd,,2136,,1257346704516352659;
-<xmalloc,,2137,,1257346704516367375;
->xmalloc,,1257346704516374136;
-<delete_cmd,,2138,,1257346704516385865;
->delete_cmd,,1257346704516394180;
->add_cmd,,1257346704516398760;
->add_alias_cmd,,1257346704516403220;
->add_com_alias,,1257346704516407789;
-<add_abbrev_prefix_cmd,,2139,,1257346704516419349;
-<add_cmd,,2140,,1257346704516434056;
-<xmalloc,,2141,,1257346704516448458;
->xmalloc,,1257346704516455252;
-<delete_cmd,,2142,,1257346704516466990;
->delete_cmd,,1257346704516473892;
->add_cmd,,1257346704516478292;
->add_abbrev_prefix_cmd,,1257346704516483007;
-<add_cmd,,2143,,1257346704516494195;
-<xmalloc,,2144,,1257346704516508730;
->xmalloc,,1257346704516515611;
-<delete_cmd,,2145,,1257346704516527367;
->delete_cmd,,1257346704516534350;
->add_cmd,,1257346704516538717;
-<add_cmd,,2146,,1257346704516550425;
-<xmalloc,,2147,,1257346704516565492;
->xmalloc,,1257346704516572289;
-<delete_cmd,,2148,,1257346704516584457;
->delete_cmd,,1257346704516592568;
->add_cmd,,1257346704516597061;
-<add_cmd,,2149,,1257346704516614058;
-<xmalloc,,2150,,1257346704516631627;
->xmalloc,,1257346704516638671;
-<delete_cmd,,2151,,1257346704516650745;
->delete_cmd,,1257346704516658847;
->add_cmd,,1257346704516663422;
-<add_cmd,,2152,,1257346704516674790;
-<xmalloc,,2153,,1257346704516689331;
->xmalloc,,1257346704516696212;
-<delete_cmd,,2154,,1257346704516708025;
->delete_cmd,,1257346704516714897;
->add_cmd,,1257346704516719330;
-<add_prefix_cmd,,2155,,1257346704516730376;
-<add_cmd,,2156,,1257346704516743329;
-<xmalloc,,2157,,1257346704516758057;
->xmalloc,,1257346704516764974;
-<delete_cmd,,2158,,1257346704516776697;
->delete_cmd,,1257346704516783854;
->add_cmd,,1257346704516788278;
->add_prefix_cmd,,1257346704516792838;
-<add_com_alias,,2159,,1257346704516803400;
-<add_alias_cmd,,2160,,1257346704516816121;
-<lookup_cmd,,2161,,1257346704516829865;
-<lookup_cmd_1,,2162,,1257346704516842337;
-<find_command_name_length,,2163,,1257346704516855693;
->find_command_name_length,,1257346704516863106;
-<find_cmd,,2164,,1257346704516873659;
->find_cmd,,1257346704516880468;
-<lookup_cmd_1,,2165,,1257346704516890690;
-<find_command_name_length,,2166,,1257346704516904013;
->find_command_name_length,,1257346704516911177;
->lookup_cmd_1,,1257346704516915751;
->lookup_cmd_1,,1257346704516920208;
->lookup_cmd,,1257346704516924614;
-<add_cmd,,2167,,1257346704516934978;
-<xmalloc,,2168,,1257346704516949380;
->xmalloc,,1257346704516956180;
-<delete_cmd,,2169,,1257346704516968754;
->delete_cmd,,1257346704516975972;
->add_cmd,,1257346704516980387;
->add_alias_cmd,,1257346704516984916;
->add_com_alias,,1257346704516989337;
-<add_com_alias,,2170,,1257346704516999935;
-<add_alias_cmd,,2171,,1257346704517012626;
-<lookup_cmd,,2172,,1257346704517026431;
-<lookup_cmd_1,,2173,,1257346704517039167;
-<find_command_name_length,,2174,,1257346704517052514;
->find_command_name_length,,1257346704517059684;
-<find_cmd,,2175,,1257346704517070294;
->find_cmd,,1257346704517077145;
-<lookup_cmd_1,,2176,,1257346704517087352;
-<find_command_name_length,,2177,,1257346704517101105;
->find_command_name_length,,1257346704517108245;
->lookup_cmd_1,,1257346704517112783;
->lookup_cmd_1,,1257346704517117192;
->lookup_cmd,,1257346704517121556;
-<add_cmd,,2178,,1257346704517132205;
-<xmalloc,,2179,,1257346704517146941;
->xmalloc,,1257346704517153681;
-<delete_cmd,,2180,,1257346704517165599;
->delete_cmd,,1257346704517172763;
->add_cmd,,1257346704517177298;
->add_alias_cmd,,1257346704517181725;
->add_com_alias,,1257346704517186236;
-<add_cmd,,2181,,1257346704517197646;
-<xmalloc,,2182,,1257346704517212380;
->xmalloc,,1257346704517219279;
-<delete_cmd,,2183,,1257346704517231119;
->delete_cmd,,1257346704517238060;
->add_cmd,,1257346704517242460;
-<add_prefix_cmd,,2184,,1257346704517253645;
-<add_cmd,,2185,,1257346704517266667;
-<xmalloc,,2186,,1257346704517281114;
->xmalloc,,1257346704517287914;
-<delete_cmd,,2187,,1257346704517299752;
->delete_cmd,,1257346704517306909;
->add_cmd,,1257346704517311375;
->add_prefix_cmd,,1257346704517315950;
-<add_com_alias,,2188,,1257346704517326605;
-<add_alias_cmd,,2189,,1257346704517339366;
-<lookup_cmd,,2190,,1257346704517353221;
-<lookup_cmd_1,,2191,,1257346704517365731;
-<find_command_name_length,,2192,,1257346704517379088;
->find_command_name_length,,1257346704517386366;
-<find_cmd,,2193,,1257346704517397213;
->find_cmd,,1257346704517404118;
-<lookup_cmd_1,,2194,,1257346704517414488;
-<find_command_name_length,,2195,,1257346704517427922;
->find_command_name_length,,1257346704517435293;
->lookup_cmd_1,,1257346704517439892;
->lookup_cmd_1,,1257346704517444394;
->lookup_cmd,,1257346704517448812;
-<add_cmd,,2196,,1257346704517459635;
-<xmalloc,,2197,,1257346704517474315;
->xmalloc,,1257346704517481114;
-<delete_cmd,,2198,,1257346704517493337;
->delete_cmd,,1257346704517500536;
->add_cmd,,1257346704517504999;
->add_alias_cmd,,1257346704517509456;
->add_com_alias,,1257346704517513901;
-<add_com_alias,,2199,,1257346704517524608;
-<add_alias_cmd,,2200,,1257346704517537756;
-<lookup_cmd,,2201,,1257346704517551967;
-<lookup_cmd_1,,2202,,1257346704517564895;
-<find_command_name_length,,2203,,1257346704517578228;
->find_command_name_length,,1257346704517585472;
-<find_cmd,,2204,,1257346704517596353;
->find_cmd,,1257346704517607354;
-<lookup_cmd_1,,2205,,1257346704517617811;
-<find_command_name_length,,2206,,1257346704517631712;
->find_command_name_length,,1257346704517639002;
->lookup_cmd_1,,1257346704517643594;
->lookup_cmd_1,,1257346704517648060;
->lookup_cmd,,1257346704517652469;
-<add_cmd,,2207,,1257346704517662875;
-<xmalloc,,2208,,1257346704517677181;
->xmalloc,,1257346704517683981;
-<delete_cmd,,2209,,1257346704517696059;
->delete_cmd,,1257346704517703174;
->add_cmd,,1257346704517707625;
->add_alias_cmd,,1257346704517712133;
->add_com_alias,,1257346704517716563;
-<add_cmd,,2210,,1257346704517727889;
-<xmalloc,,2211,,1257346704517742734;
->xmalloc,,1257346704517749515;
-<delete_cmd,,2212,,1257346704517761274;
->delete_cmd,,1257346704517768219;
->add_cmd,,1257346704517772634;
-<add_com,,2213,,1257346704517784633;
-<add_cmd,,2214,,1257346704517797490;
-<xmalloc,,2215,,1257346704517811826;
->xmalloc,,1257346704517818518;
-<delete_cmd,,2216,,1257346704517830235;
->delete_cmd,,1257346704517837483;
->add_cmd,,1257346704517841925;
->add_com,,1257346704517846243;
-<add_com,,2217,,1257346704517858015;
-<add_cmd,,2218,,1257346704517870901;
-<xmalloc,,2219,,1257346704517885181;
->xmalloc,,1257346704517894242;
-<delete_cmd,,2220,,1257346704517906172;
->delete_cmd,,1257346704517913342;
->add_cmd,,1257346704517917739;
->add_com,,1257346704517922001;
-<set_cmd_completer,,2221,,1257346704517932614;
->set_cmd_completer,,1257346704517939639;
-<add_com_alias,,2222,,1257346704517950484;
-<add_alias_cmd,,2223,,1257346704517963269;
-<lookup_cmd,,2224,,1257346704517977319;
-<lookup_cmd_1,,2225,,1257346704517989824;
-<find_command_name_length,,2226,,1257346704518003252;
->find_command_name_length,,1257346704518010524;
-<find_cmd,,2227,,1257346704518021363;
->find_cmd,,1257346704518028124;
->lookup_cmd_1,,1257346704518032614;
->lookup_cmd,,1257346704518037083;
-<add_cmd,,2228,,1257346704518047501;
-<xmalloc,,2229,,1257346704518061193;
->xmalloc,,1257346704518067942;
-<delete_cmd,,2230,,1257346704518079725;
->delete_cmd,,1257346704518086916;
->add_cmd,,1257346704518091373;
->add_alias_cmd,,1257346704518095836;
->add_com_alias,,1257346704518100302;
-<add_com_alias,,2231,,1257346704518111024;
-<add_alias_cmd,,2232,,1257346704518123961;
-<lookup_cmd,,2233,,1257346704518137859;
-<lookup_cmd_1,,2234,,1257346704518150520;
-<find_command_name_length,,2235,,1257346704518164168;
->find_command_name_length,,1257346704518171391;
-<find_cmd,,2236,,1257346704518181927;
->find_cmd,,1257346704518188877;
->lookup_cmd_1,,1257346704518193385;
->lookup_cmd,,1257346704518197824;
-<add_cmd,,2237,,1257346704518208990;
-<xmalloc,,2238,,1257346704518223116;
->xmalloc,,1257346704518229799;
-<delete_cmd,,2239,,1257346704518242018;
->delete_cmd,,1257346704518249139;
->add_cmd,,1257346704518253582;
->add_alias_cmd,,1257346704518258033;
->add_com_alias,,1257346704518262559;
-<add_com_alias,,2240,,1257346704518273280;
-<add_alias_cmd,,2241,,1257346704518285917;
-<lookup_cmd,,2242,,1257346704518299592;
-<lookup_cmd_1,,2243,,1257346704518312277;
-<find_command_name_length,,2244,,1257346704518325751;
->find_command_name_length,,1257346704518333098;
-<find_cmd,,2245,,1257346704518343630;
->find_cmd,,1257346704518350475;
->lookup_cmd_1,,1257346704518355004;
->lookup_cmd,,1257346704518359539;
-<add_cmd,,2246,,1257346704518370032;
-<xmalloc,,2247,,1257346704518384167;
->xmalloc,,1257346704518390970;
-<delete_cmd,,2248,,1257346704518402801;
->delete_cmd,,1257346704518409965;
->add_cmd,,1257346704518414398;
->add_alias_cmd,,1257346704518418894;
->add_com_alias,,1257346704518423453;
-<add_com_alias,,2249,,1257346704518434148;
-<add_alias_cmd,,2250,,1257346704518447068;
-<lookup_cmd,,2251,,1257346704518461271;
-<lookup_cmd_1,,2252,,1257346704518473942;
-<find_command_name_length,,2253,,1257346704518487301;
->find_command_name_length,,1257346704518494516;
-<find_cmd,,2254,,1257346704518504985;
->find_cmd,,1257346704518511784;
->lookup_cmd_1,,1257346704518516350;
->lookup_cmd,,1257346704518520849;
-<add_cmd,,2255,,1257346704518531308;
-<xmalloc,,2256,,1257346704518545001;
->xmalloc,,1257346704518551717;
-<delete_cmd,,2257,,1257346704518563458;
->delete_cmd,,1257346704518570613;
->add_cmd,,1257346704518575042;
->add_alias_cmd,,1257346704518579512;
->add_com_alias,,1257346704518583956;
-<add_info,,2258,,1257346704518595150;
-<add_cmd,,2259,,1257346704518612174;
-<xmalloc,,2260,,1257346704518627007;
->xmalloc,,1257346704518633843;
-<delete_cmd,,2261,,1257346704518645890;
->delete_cmd,,1257346704518652859;
->add_cmd,,1257346704518657385;
->add_info,,1257346704518661743;
-<add_cmd,,2262,,1257346704518673162;
-<xmalloc,,2263,,1257346704518687559;
->xmalloc,,1257346704518694358;
-<delete_cmd,,2264,,1257346704518706111;
->delete_cmd,,1257346704518713016;
->add_cmd,,1257346704518717383;
-<add_prefix_cmd,,2265,,1257346704518729034;
-<add_cmd,,2266,,1257346704518742240;
-<xmalloc,,2267,,1257346704518756633;
->xmalloc,,1257346704518763361;
-<delete_cmd,,2268,,1257346704518775432;
->delete_cmd,,1257346704518782741;
->add_cmd,,1257346704518787237;
->add_prefix_cmd,,1257346704518791772;
-<add_prefix_cmd,,2269,,1257346704518802950;
-<add_cmd,,2270,,1257346704518816147;
-<xmalloc,,2271,,1257346704518830330;
->xmalloc,,1257346704518837016;
-<delete_cmd,,2272,,1257346704518849021;
->delete_cmd,,1257346704518856203;
->add_cmd,,1257346704518860792;
->add_prefix_cmd,,1257346704518865294;
-<add_catch_command,,2273,,1257346704518876690;
-<add_cmd,,2274,,1257346704518891561;
-<xmalloc,,2275,,1257346704518905847;
->xmalloc,,1257346704518912595;
-<delete_cmd,,2276,,1257346704518924345;
->delete_cmd,,1257346704518931257;
->add_cmd,,1257346704518935849;
-<set_cmd_sfunc,,2277,,1257346704518945885;
->set_cmd_sfunc,,1257346704518954549;
-<set_cmd_context,,2278,,1257346704518964825;
->set_cmd_context,,1257346704518973381;
-<set_cmd_completer,,2279,,1257346704518984365;
->set_cmd_completer,,1257346704518991504;
-<add_cmd,,2280,,1257346704519001958;
-<xmalloc,,2281,,1257346704519015461;
->xmalloc,,1257346704519022270;
-<delete_cmd,,2282,,1257346704519034068;
->delete_cmd,,1257346704519040937;
->add_cmd,,1257346704519045355;
-<set_cmd_sfunc,,2283,,1257346704519055286;
->set_cmd_sfunc,,1257346704519062320;
-<set_cmd_context,,2284,,1257346704519072218;
->set_cmd_context,,1257346704519079261;
-<set_cmd_completer,,2285,,1257346704519090079;
->set_cmd_completer,,1257346704519097191;
->add_catch_command,,1257346704519101089;
-<add_catch_command,,2286,,1257346704519112226;
-<add_cmd,,2287,,1257346704519125320;
-<xmalloc,,2288,,1257346704519139527;
->xmalloc,,1257346704519146315;
-<delete_cmd,,2289,,1257346704519158095;
->delete_cmd,,1257346704519165027;
->add_cmd,,1257346704519169478;
-<set_cmd_sfunc,,2290,,1257346704519179378;
->set_cmd_sfunc,,1257346704519186335;
-<set_cmd_context,,2291,,1257346704519196265;
->set_cmd_context,,1257346704519203251;
-<set_cmd_completer,,2292,,1257346704519213922;
->set_cmd_completer,,1257346704519220914;
-<add_cmd,,2293,,1257346704519231398;
-<xmalloc,,2294,,1257346704519244826;
->xmalloc,,1257346704519251544;
-<delete_cmd,,2295,,1257346704519263265;
->delete_cmd,,1257346704519270158;
->add_cmd,,1257346704519274603;
-<set_cmd_sfunc,,2296,,1257346704519284211;
->set_cmd_sfunc,,1257346704519291243;
-<set_cmd_context,,2297,,1257346704519301408;
->set_cmd_context,,1257346704519308430;
-<set_cmd_completer,,2298,,1257346704519319088;
->set_cmd_completer,,1257346704519326090;
->add_catch_command,,1257346704519329735;
-<add_catch_command,,2299,,1257346704519340784;
-<add_cmd,,2300,,1257346704519353698;
-<xmalloc,,2301,,1257346704519367980;
->xmalloc,,1257346704519374813;
-<delete_cmd,,2302,,1257346704519386467;
->delete_cmd,,1257346704519393459;
->add_cmd,,1257346704519397850;
-<set_cmd_sfunc,,2303,,1257346704519407377;
->set_cmd_sfunc,,1257346704519414204;
-<set_cmd_context,,2304,,1257346704519423891;
->set_cmd_context,,1257346704519430929;
-<set_cmd_completer,,2305,,1257346704519441918;
->set_cmd_completer,,1257346704519448805;
-<add_cmd,,2306,,1257346704519459704;
-<xmalloc,,2307,,1257346704519473108;
->xmalloc,,1257346704519479832;
-<delete_cmd,,2308,,1257346704519491697;
->delete_cmd,,1257346704519498581;
->add_cmd,,1257346704519502951;
-<set_cmd_sfunc,,2309,,1257346704519512394;
->set_cmd_sfunc,,1257346704519519284;
-<set_cmd_context,,2310,,1257346704519528974;
->set_cmd_context,,1257346704519535960;
-<set_cmd_completer,,2311,,1257346704519546555;
->set_cmd_completer,,1257346704519553481;
->add_catch_command,,1257346704519557099;
-<add_catch_command,,2312,,1257346704519568116;
-<add_cmd,,2313,,1257346704519581005;
-<xmalloc,,2314,,1257346704519596169;
->xmalloc,,1257346704519607074;
-<delete_cmd,,2315,,1257346704519618938;
->delete_cmd,,1257346704519626081;
->add_cmd,,1257346704519630508;
-<set_cmd_sfunc,,2316,,1257346704519640054;
->set_cmd_sfunc,,1257346704519646959;
-<set_cmd_context,,2317,,1257346704519656661;
->set_cmd_context,,1257346704519663710;
-<set_cmd_completer,,2318,,1257346704519674317;
->set_cmd_completer,,1257346704519681403;
-<add_cmd,,2319,,1257346704519692019;
-<xmalloc,,2320,,1257346704519705483;
->xmalloc,,1257346704519712235;
-<delete_cmd,,2321,,1257346704519724316;
->delete_cmd,,1257346704519731248;
->add_cmd,,1257346704519735657;
-<set_cmd_sfunc,,2322,,1257346704519745160;
->set_cmd_sfunc,,1257346704519752005;
-<set_cmd_context,,2323,,1257346704519761710;
->set_cmd_context,,1257346704519768681;
-<set_cmd_completer,,2324,,1257346704519779282;
->set_cmd_completer,,1257346704519786223;
->add_catch_command,,1257346704519789866;
-<add_catch_command,,2325,,1257346704519800927;
-<add_cmd,,2326,,1257346704519813814;
-<xmalloc,,2327,,1257346704519828048;
->xmalloc,,1257346704519834824;
-<delete_cmd,,2328,,1257346704519846474;
->delete_cmd,,1257346704519853608;
->add_cmd,,1257346704519858038;
-<set_cmd_sfunc,,2329,,1257346704519867592;
->set_cmd_sfunc,,1257346704519874612;
-<set_cmd_context,,2330,,1257346704519884476;
->set_cmd_context,,1257346704519891526;
-<set_cmd_completer,,2331,,1257346704519902271;
->set_cmd_completer,,1257346704519909230;
-<add_cmd,,2332,,1257346704519919723;
-<xmalloc,,2333,,1257346704519933224;
->xmalloc,,1257346704519939987;
-<delete_cmd,,2334,,1257346704519951713;
->delete_cmd,,1257346704519958691;
->add_cmd,,1257346704519963142;
-<set_cmd_sfunc,,2335,,1257346704519972663;
->set_cmd_sfunc,,1257346704519979613;
-<set_cmd_context,,2336,,1257346704519989562;
->set_cmd_context,,1257346704519996515;
-<set_cmd_completer,,2337,,1257346704520007134;
->set_cmd_completer,,1257346704520014154;
->add_catch_command,,1257346704520017826;
-<add_catch_command,,2338,,1257346704520028872;
-<add_cmd,,2339,,1257346704520041828;
-<xmalloc,,2340,,1257346704520056254;
->xmalloc,,1257346704520063103;
-<delete_cmd,,2341,,1257346704520074825;
->delete_cmd,,1257346704520081845;
->add_cmd,,1257346704520086302;
-<set_cmd_sfunc,,2342,,1257346704520095916;
->set_cmd_sfunc,,1257346704520102885;
-<set_cmd_context,,2343,,1257346704520112725;
->set_cmd_context,,1257346704520119732;
-<set_cmd_completer,,2344,,1257346704520130803;
->set_cmd_completer,,1257346704520137810;
-<add_cmd,,2345,,1257346704520148285;
-<xmalloc,,2346,,1257346704520162143;
->xmalloc,,1257346704520168934;
-<delete_cmd,,2347,,1257346704520180870;
->delete_cmd,,1257346704520187827;
->add_cmd,,1257346704520192290;
-<set_cmd_sfunc,,2348,,1257346704520201757;
->set_cmd_sfunc,,1257346704520208602;
-<set_cmd_context,,2349,,1257346704520218274;
->set_cmd_context,,1257346704520225218;
-<set_cmd_completer,,2350,,1257346704520235828;
->set_cmd_completer,,1257346704520242751;
->add_catch_command,,1257346704520246396;
-<add_catch_command,,2351,,1257346704520257455;
-<add_cmd,,2352,,1257346704520270522;
-<xmalloc,,2353,,1257346704520284717;
->xmalloc,,1257346704520291417;
-<delete_cmd,,2354,,1257346704520303137;
->delete_cmd,,1257346704520310196;
->add_cmd,,1257346704520314638;
-<set_cmd_sfunc,,2355,,1257346704520324129;
->set_cmd_sfunc,,1257346704520330968;
-<set_cmd_context,,2356,,1257346704520340766;
->set_cmd_context,,1257346704520347710;
-<set_cmd_completer,,2357,,1257346704520358384;
->set_cmd_completer,,1257346704520365325;
-<add_cmd,,2358,,1257346704520375776;
-<xmalloc,,2359,,1257346704520389264;
->xmalloc,,1257346704520395998;
-<delete_cmd,,2360,,1257346704520407646;
->delete_cmd,,1257346704520414569;
->add_cmd,,1257346704520418998;
-<set_cmd_sfunc,,2361,,1257346704520428824;
->set_cmd_sfunc,,1257346704520435678;
-<set_cmd_context,,2362,,1257346704520445395;
->set_cmd_context,,1257346704520452369;
-<set_cmd_completer,,2363,,1257346704520463006;
->set_cmd_completer,,1257346704520469905;
->add_catch_command,,1257346704520473541;
-<add_catch_command,,2364,,1257346704520484924;
-<add_cmd,,2365,,1257346704520497832;
-<xmalloc,,2366,,1257346704520512057;
->xmalloc,,1257346704520518806;
-<delete_cmd,,2367,,1257346704520530499;
->delete_cmd,,1257346704520537404;
->add_cmd,,1257346704520541798;
-<set_cmd_sfunc,,2368,,1257346704520551337;
->set_cmd_sfunc,,1257346704520558294;
-<set_cmd_context,,2369,,1257346704520568302;
->set_cmd_context,,1257346704520575358;
-<set_cmd_completer,,2370,,1257346704520586395;
->set_cmd_completer,,1257346704520593414;
-<add_cmd,,2371,,1257346704520607955;
-<xmalloc,,2372,,1257346704520621988;
->xmalloc,,1257346704520628914;
-<delete_cmd,,2373,,1257346704520640619;
->delete_cmd,,1257346704520647509;
->add_cmd,,1257346704520651942;
-<set_cmd_sfunc,,2374,,1257346704520661668;
->set_cmd_sfunc,,1257346704520668555;
-<set_cmd_context,,2375,,1257346704520678588;
->set_cmd_context,,1257346704520685520;
-<set_cmd_completer,,2376,,1257346704520696413;
->set_cmd_completer,,1257346704520703348;
->add_catch_command,,1257346704520707005;
-<add_com,,2377,,1257346704520718340;
-<add_cmd,,2378,,1257346704520731220;
-<xmalloc,,2379,,1257346704520745518;
->xmalloc,,1257346704520752309;
-<delete_cmd,,2380,,1257346704520764098;
->delete_cmd,,1257346704520771355;
->add_cmd,,1257346704520775962;
->add_com,,1257346704520780254;
-<set_cmd_completer,,2381,,1257346704520790993;
->set_cmd_completer,,1257346704520798094;
-<add_com,,2382,,1257346704520809489;
-<add_cmd,,2383,,1257346704520822857;
-<xmalloc,,2384,,1257346704520837500;
->xmalloc,,1257346704520844276;
-<delete_cmd,,2385,,1257346704520855981;
->delete_cmd,,1257346704520863340;
->add_cmd,,1257346704520867869;
->add_com,,1257346704520872314;
-<set_cmd_completer,,2386,,1257346704520882675;
->set_cmd_completer,,1257346704520889745;
-<add_com,,2387,,1257346704520901513;
-<add_cmd,,2388,,1257346704520914905;
-<xmalloc,,2389,,1257346704520929338;
->xmalloc,,1257346704520936108;
-<delete_cmd,,2390,,1257346704520948011;
->delete_cmd,,1257346704520955268;
->add_cmd,,1257346704520959746;
->add_com,,1257346704520964131;
-<set_cmd_completer,,2391,,1257346704520974798;
->set_cmd_completer,,1257346704520981851;
-<add_info,,2392,,1257346704520993309;
-<add_cmd,,2393,,1257346704521006722;
-<xmalloc,,2394,,1257346704521021555;
->xmalloc,,1257346704521028312;
-<delete_cmd,,2395,,1257346704521040550;
->delete_cmd,,1257346704521047521;
->add_cmd,,1257346704521051936;
->add_info,,1257346704521056387;
-<add_setshow_zinteger_cmd,,2396,,1257346704521069084;
-<add_setshow_cmd_full,,2397,,1257346704521085781;
-<xstrprintf,,2398,,1257346704521102217;
-<xstrvprintf,,2399,,1257346704521116622;
->xstrvprintf,,1257346704521126953;
->xstrprintf,,1257346704521131651;
-<xstrprintf,,2400,,1257346704521145304;
-<xstrvprintf,,2401,,1257346704521159875;
->xstrvprintf,,1257346704521167977;
->xstrprintf,,1257346704521172498;
-<add_set_or_show_cmd,,2402,,1257346704521184798;
-<add_cmd,,2403,,1257346704521198027;
-<xmalloc,,2404,,1257346704521212599;
->xmalloc,,1257346704521221630;
-<delete_cmd,,2405,,1257346704521233479;
->delete_cmd,,1257346704521240640;
->add_cmd,,1257346704521245031;
->add_set_or_show_cmd,,1257346704521249698;
-<add_set_or_show_cmd,,2406,,1257346704521262134;
-<add_cmd,,2407,,1257346704521275391;
-<xmalloc,,2408,,1257346704521289908;
->xmalloc,,1257346704521296671;
-<delete_cmd,,2409,,1257346704521308292;
->delete_cmd,,1257346704521315395;
->add_cmd,,1257346704521319771;
->add_set_or_show_cmd,,1257346704521324391;
->add_setshow_cmd_full,,1257346704521329260;
->add_setshow_zinteger_cmd,,1257346704521333233;
-<add_com,,2410,,1257346704521344751;
-<add_cmd,,2411,,1257346704521358681;
-<xmalloc,,2412,,1257346704521373469;
->xmalloc,,1257346704521380215;
-<delete_cmd,,2413,,1257346704521391862;
->delete_cmd,,1257346704521399186;
->add_cmd,,1257346704521403757;
->add_com,,1257346704521408021;
-<set_cmd_completer,,2414,,1257346704521418514;
->set_cmd_completer,,1257346704521425603;
-<add_com_alias,,2415,,1257346704521435867;
-<add_alias_cmd,,2416,,1257346704521448640;
-<lookup_cmd,,2417,,1257346704521462218;
-<lookup_cmd_1,,2418,,1257346704521474897;
-<find_command_name_length,,2419,,1257346704521488025;
->find_command_name_length,,1257346704521495387;
-<find_cmd,,2420,,1257346704521506057;
->find_cmd,,1257346704521513122;
->lookup_cmd_1,,1257346704521517633;
->lookup_cmd,,1257346704521522102;
-<add_cmd,,2421,,1257346704521532598;
-<xmalloc,,2422,,1257346704521546228;
->xmalloc,,1257346704521552952;
-<delete_cmd,,2423,,1257346704521564606;
->delete_cmd,,1257346704521571842;
->add_cmd,,1257346704521576380;
->add_alias_cmd,,1257346704521580825;
->add_com_alias,,1257346704521585351;
-<add_com_alias,,2424,,1257346704521595601;
-<add_alias_cmd,,2425,,1257346704521613119;
-<lookup_cmd,,2426,,1257346704521627212;
-<lookup_cmd_1,,2427,,1257346704521639879;
-<find_command_name_length,,2428,,1257346704521653136;
->find_command_name_length,,1257346704521660405;
-<find_cmd,,2429,,1257346704521670825;
->find_cmd,,1257346704521677929;
->lookup_cmd_1,,1257346704521682443;
->lookup_cmd,,1257346704521686861;
-<add_cmd,,2430,,1257346704521697300;
-<xmalloc,,2431,,1257346704521711197;
->xmalloc,,1257346704521717931;
-<delete_cmd,,2432,,1257346704521729639;
->delete_cmd,,1257346704521736887;
->add_cmd,,1257346704521741500;
->add_alias_cmd,,1257346704521745984;
->add_com_alias,,1257346704521750498;
-<add_com_alias,,2433,,1257346704521761226;
-<add_alias_cmd,,2434,,1257346704521774185;
-<lookup_cmd,,2435,,1257346704521787935;
-<lookup_cmd_1,,2436,,1257346704521800530;
-<find_command_name_length,,2437,,1257346704521813889;
->find_command_name_length,,1257346704521821383;
-<find_cmd,,2438,,1257346704521831913;
->find_cmd,,1257346704521839103;
->lookup_cmd_1,,1257346704521843626;
->lookup_cmd,,1257346704521848050;
-<add_cmd,,2439,,1257346704521858483;
-<xmalloc,,2440,,1257346704521872194;
->xmalloc,,1257346704521878879;
-<delete_cmd,,2441,,1257346704521890554;
->delete_cmd,,1257346704521897835;
->add_cmd,,1257346704521902359;
->add_alias_cmd,,1257346704521906816;
->add_com_alias,,1257346704521911275;
-<add_com_alias,,2442,,1257346704521921573;
-<add_alias_cmd,,2443,,1257346704521934412;
-<lookup_cmd,,2444,,1257346704521947993;
-<lookup_cmd_1,,2445,,1257346704521960793;
-<find_command_name_length,,2446,,1257346704521973905;
->find_command_name_length,,1257346704521981102;
-<find_cmd,,2447,,1257346704521991490;
->find_cmd,,1257346704521998680;
->lookup_cmd_1,,1257346704522003182;
->lookup_cmd,,1257346704522007709;
-<add_cmd,,2448,,1257346704522017955;
-<xmalloc,,2449,,1257346704522031759;
->xmalloc,,1257346704522038460;
-<delete_cmd,,2450,,1257346704522050110;
->delete_cmd,,1257346704522057418;
->add_cmd,,1257346704522062014;
->add_alias_cmd,,1257346704522066543;
->add_com_alias,,1257346704522071081;
-<add_info,,2451,,1257346704522082082;
-<add_cmd,,2452,,1257346704522094894;
-<xmalloc,,2453,,1257346704522109098;
->xmalloc,,1257346704522115781;
-<delete_cmd,,2454,,1257346704522127477;
->delete_cmd,,1257346704522134366;
->add_cmd,,1257346704522138926;
->add_info,,1257346704522143323;
-<add_info_alias,,2455,,1257346704522153115;
-<add_alias_cmd,,2456,,1257346704522167953;
-<lookup_cmd,,2457,,1257346704522181604;
-<lookup_cmd_1,,2458,,1257346704522194274;
-<find_command_name_length,,2459,,1257346704522207327;
->find_command_name_length,,1257346704522214617;
-<find_cmd,,2460,,1257346704522225269;
->find_cmd,,1257346704522232360;
->lookup_cmd_1,,1257346704522236866;
->lookup_cmd,,1257346704522241458;
-<add_cmd,,2461,,1257346704522251719;
-<xmalloc,,2462,,1257346704522265454;
->xmalloc,,1257346704522272137;
-<delete_cmd,,2463,,1257346704522283739;
->delete_cmd,,1257346704522290723;
->add_cmd,,1257346704522295150;
->add_alias_cmd,,1257346704522299664;
->add_info_alias,,1257346704522304310;
-<add_cmd,,2464,,1257346704522315576;
-<xmalloc,,2465,,1257346704522329876;
->xmalloc,,1257346704522336694;
-<delete_cmd,,2466,,1257346704522348315;
->delete_cmd,,1257346704522355178;
->add_cmd,,1257346704522359587;
-<add_cmd,,2467,,1257346704522370594;
-<xmalloc,,2468,,1257346704522384963;
->xmalloc,,1257346704522391733;
-<delete_cmd,,2469,,1257346704522403937;
->delete_cmd,,1257346704522410797;
->add_cmd,,1257346704522415263;
-<deprecate_cmd,,2470,,1257346704522424893;
->deprecate_cmd,,1257346704522431819;
-<add_cmd,,2471,,1257346704522443013;
-<xmalloc,,2472,,1257346704522457292;
->xmalloc,,1257346704522464044;
-<delete_cmd,,2473,,1257346704522475830;
->delete_cmd,,1257346704522482813;
->add_cmd,,1257346704522487249;
-<deprecate_cmd,,2474,,1257346704522497134;
->deprecate_cmd,,1257346704522503883;
-<add_com,,2475,,1257346704522515185;
-<add_cmd,,2476,,1257346704522528081;
-<xmalloc,,2477,,1257346704522542517;
->xmalloc,,1257346704522549241;
-<delete_cmd,,2478,,1257346704522560904;
->delete_cmd,,1257346704522568236;
->add_cmd,,1257346704522572780;
->add_com,,1257346704522577141;
-<add_com,,2479,,1257346704522588852;
-<add_cmd,,2480,,1257346704522606667;
-<xmalloc,,2481,,1257346704522621415;
->xmalloc,,1257346704522628270;
-<delete_cmd,,2482,,1257346704522639911;
->delete_cmd,,1257346704522647165;
->add_cmd,,1257346704522651718;
->add_com,,1257346704522656052;
-<set_cmd_completer,,2483,,1257346704522666876;
->set_cmd_completer,,1257346704522674013;
-<add_prefix_cmd,,2484,,1257346704522685263;
-<add_cmd,,2485,,1257346704522698216;
-<xmalloc,,2486,,1257346704522712420;
->xmalloc,,1257346704522719265;
-<delete_cmd,,2487,,1257346704522731361;
->delete_cmd,,1257346704522738540;
->add_cmd,,1257346704522742970;
->add_prefix_cmd,,1257346704522747499;
-<add_prefix_cmd,,2488,,1257346704522758551;
-<add_cmd,,2489,,1257346704522771435;
-<xmalloc,,2490,,1257346704522785793;
->xmalloc,,1257346704522792674;
-<delete_cmd,,2491,,1257346704522804661;
->delete_cmd,,1257346704522811936;
->add_cmd,,1257346704522816435;
->add_prefix_cmd,,1257346704522821097;
-<add_setshow_auto_boolean_cmd,,2492,,1257346704522831605;
-<add_setshow_cmd_full,,2493,,1257346704522847857;
-<xstrprintf,,2494,,1257346704522863745;
-<xstrvprintf,,2495,,1257346704522878160;
->xstrvprintf,,1257346704522887456;
->xstrprintf,,1257346704522892006;
-<xstrprintf,,2496,,1257346704522905575;
-<xstrvprintf,,2497,,1257346704522920213;
->xstrvprintf,,1257346704522928700;
->xstrprintf,,1257346704522933229;
-<add_set_or_show_cmd,,2498,,1257346704522945487;
-<add_cmd,,2499,,1257346704522958190;
-<xmalloc,,2500,,1257346704522972256;
->xmalloc,,1257346704522979104;
-<delete_cmd,,2501,,1257346704522990758;
->delete_cmd,,1257346704522997693;
->add_cmd,,1257346704523002069;
->add_set_or_show_cmd,,1257346704523006706;
-<add_set_or_show_cmd,,2502,,1257346704523018558;
-<add_cmd,,2503,,1257346704523031247;
-<xmalloc,,2504,,1257346704523045457;
->xmalloc,,1257346704523052133;
-<delete_cmd,,2505,,1257346704523063808;
->delete_cmd,,1257346704523070620;
->add_cmd,,1257346704523075149;
->add_set_or_show_cmd,,1257346704523079814;
->add_setshow_cmd_full,,1257346704523084602;
->add_setshow_auto_boolean_cmd,,1257346704523089558;
-<add_setshow_boolean_cmd,,2506,,1257346704523103199;
-<add_setshow_cmd_full,,2507,,1257346704523119903;
-<xstrprintf,,2508,,1257346704523136287;
-<xstrvprintf,,2509,,1257346704523150786;
->xstrvprintf,,1257346704523158888;
->xstrprintf,,1257346704523163432;
-<xstrprintf,,2510,,1257346704523177035;
-<xstrvprintf,,2511,,1257346704523191477;
->xstrvprintf,,1257346704523199537;
->xstrprintf,,1257346704523204069;
-<add_set_or_show_cmd,,2512,,1257346704523216204;
-<add_cmd,,2513,,1257346704523229319;
-<xmalloc,,2514,,1257346704523243646;
->xmalloc,,1257346704523250395;
-<delete_cmd,,2515,,1257346704523262088;
->delete_cmd,,1257346704523269017;
->add_cmd,,1257346704523273432;
->add_set_or_show_cmd,,1257346704523278151;
-<add_set_or_show_cmd,,2516,,1257346704523290520;
-<add_cmd,,2517,,1257346704523303284;
-<xmalloc,,2518,,1257346704523317524;
->xmalloc,,1257346704523324342;
-<delete_cmd,,2519,,1257346704523336371;
->delete_cmd,,1257346704523343204;
->add_cmd,,1257346704523347631;
->add_set_or_show_cmd,,1257346704523352299;
->add_setshow_cmd_full,,1257346704523357072;
->add_setshow_boolean_cmd,,1257346704523361872;
-<add_setshow_enum_cmd,,2520,,1257346704523376776;
-<add_setshow_cmd_full,,2521,,1257346704523393206;
-<xstrprintf,,2522,,1257346704523409127;
-<xstrvprintf,,2523,,1257346704523423803;
->xstrvprintf,,1257346704523436771;
->xstrprintf,,1257346704523441502;
-<xstrprintf,,2524,,1257346704523455093;
-<xstrvprintf,,2525,,1257346704523469775;
->xstrvprintf,,1257346704523478605;
->xstrprintf,,1257346704523483140;
-<add_set_or_show_cmd,,2526,,1257346704523495437;
-<add_cmd,,2527,,1257346704523508730;
-<xmalloc,,2528,,1257346704523523042;
->xmalloc,,1257346704523529812;
-<delete_cmd,,2529,,1257346704523541550;
->delete_cmd,,1257346704523548485;
->add_cmd,,1257346704523553008;
->add_set_or_show_cmd,,1257346704523557661;
-<add_set_or_show_cmd,,2530,,1257346704523569679;
-<add_cmd,,2531,,1257346704523582569;
-<xmalloc,,2532,,1257346704523596794;
->xmalloc,,1257346704523608053;
-<delete_cmd,,2533,,1257346704523620657;
->delete_cmd,,1257346704523627814;
->add_cmd,,1257346704523632251;
->add_set_or_show_cmd,,1257346704523636939;
->add_setshow_cmd_full,,1257346704523641664;
->add_setshow_enum_cmd,,1257346704523646298;
-<observer_attach_about_to_proceed,,2534,,1257346704523660953;
-<generic_observer_attach,,2535,,1257346704523678445;
-<xmalloc,,2536,,1257346704523693040;
->xmalloc,,1257346704523699900;
-<xmalloc,,2537,,1257346704523709941;
->xmalloc,,1257346704523716609;
->generic_observer_attach,,1257346704523721382;
->observer_attach_about_to_proceed,,1257346704523725676;
->_initialize_breakpoint,,1257346704523730684;
-<_initialize_regcache,,2538,,1257346704523741432;
-<gdbarch_data_register_post_init,,2539,,1257346704523754175;
-<gdbarch_data_register,,2540,,1257346704523765464;
-<xmalloc,,2541,,1257346704523779831;
->xmalloc,,1257346704523786514;
-<xmalloc,,2542,,1257346704523796315;
->xmalloc,,1257346704523803057;
->gdbarch_data_register,,1257346704523808206;
->gdbarch_data_register_post_init,,1257346704523812386;
-<observer_attach_target_changed,,2543,,1257346704523825905;
-<generic_observer_attach,,2544,,1257346704523843844;
-<xmalloc,,2545,,1257346704523858205;
->xmalloc,,1257346704523865040;
-<xmalloc,,2546,,1257346704523874848;
->xmalloc,,1257346704523881485;
->generic_observer_attach,,1257346704523886279;
->observer_attach_target_changed,,1257346704523890501;
-<observer_attach_thread_ptid_changed,,2547,,1257346704523905929;
-<generic_observer_attach,,2548,,1257346704523924034;
-<xmalloc,,2549,,1257346704523938299;
->xmalloc,,1257346704523945158;
-<xmalloc,,2550,,1257346704523955191;
->xmalloc,,1257346704523961829;
->generic_observer_attach,,1257346704523966710;
->observer_attach_thread_ptid_changed,,1257346704523971130;
-<add_com,,2551,,1257346704523982808;
-<add_cmd,,2552,,1257346704523996459;
-<xmalloc,,2553,,1257346704524011156;
->xmalloc,,1257346704524017857;
-<delete_cmd,,2554,,1257346704524029724;
->delete_cmd,,1257346704524038235;
->add_cmd,,1257346704524042993;
->add_com,,1257346704524047315;
-<add_cmd,,2555,,1257346704524058460;
-<xmalloc,,2556,,1257346704524073203;
->xmalloc,,1257346704524079957;
-<delete_cmd,,2557,,1257346704524091602;
->delete_cmd,,1257346704524098495;
->add_cmd,,1257346704524102997;
-<add_cmd,,2558,,1257346704524113902;
-<xmalloc,,2559,,1257346704524128190;
->xmalloc,,1257346704524134870;
-<delete_cmd,,2560,,1257346704524146533;
->delete_cmd,,1257346704524153405;
->add_cmd,,1257346704524157832;
-<add_cmd,,2561,,1257346704524169073;
-<xmalloc,,2562,,1257346704524183711;
->xmalloc,,1257346704524190432;
-<delete_cmd,,2563,,1257346704524202050;
->delete_cmd,,1257346704524208868;
->add_cmd,,1257346704524213328;
-<add_cmd,,2564,,1257346704524224326;
-<xmalloc,,2565,,1257346704524238593;
->xmalloc,,1257346704524245324;
-<delete_cmd,,2566,,1257346704524256999;
->delete_cmd,,1257346704524263946;
->add_cmd,,1257346704524268445;
->_initialize_regcache,,1257346704524273705;
-<_initialize_charset,,2567,,1257346704524283013;
-<xstrdup,,2568,,1257346704524291921;
-<xmalloc,,2569,,1257346704524307379;
->xmalloc,,1257346704524314444;
->xstrdup,,1257346704524319114;
-<vec_p_reserve,,2570,,1257346704524327565;
-<vec_o_reserve,,2571,,1257346704524338506;
-<xrealloc,,2572,,1257346704524353333;
->xrealloc,,1257346704524362009;
->vec_o_reserve,,1257346704524366986;
->vec_p_reserve,,1257346704524371503;
-<find_charset_names,,2573,,1257346704524380405;
-<pex_init,,2574,,1257346704524389996;
-<pex_init_common,,2575,,1257346704524399184;
-<xmalloc,,2576,,1257346704524414750;
->xmalloc,,1257346704524421745;
->pex_init_common,,1257346704524426630;
->pex_init,,1257346704524431177;
-<pex_run,,2577,,1257346704524436145;
-<pex_run_in_environment,,2578,,1257346704524445261;
-<temp_file,,2579,,1257346704524453946;
-<make_temp_file,,2580,,1257346704524463059;
-<choose_tmpdir,,2581,,1257346704524472264;
-<xmalloc,,2582,,1257346704534506310;
->xmalloc,,1257346704534515867;
->choose_tmpdir,,1257346704534520797;
-<xmalloc,,2583,,1257346704534531455;
->xmalloc,,1257346704534538525;
-<mkstemps,,2584,,1257346704534543379;
->mkstemps,,1257346704534631019;
->make_temp_file,,1257346704534639924;
->temp_file,,1257346704534644528;
-<xrealloc,,2585,,1257346704534655725;
->xrealloc,,1257346704534663430;
-<pex_unix_open_write,,2586,,1257346704534669381;
->pex_unix_open_write,,1257346704534684816;
-<pex_unix_exec_child,,2587,,1257346704534690500;
->pex_unix_exec_child,,1257346704906829743;
-<xrealloc,,2588,,1257346704906855258;
->xrealloc,,1257346704906865817;
->pex_run_in_environment,,1257346704906870956;
->pex_run,,1257346704906875489;
-<pex_read_output,,2589,,1257346704906881591;
-<pex_get_status_and_time,,2590,,1257346704906893187;
-<xrealloc,,2591,,1257346704906916008;
->xrealloc,,1257346704906923322;
-<pex_unix_wait,,2592,,1257346704906928940;
-<sigchld_handler,,2593,,1257346704914575030;
->sigchld_handler,,1257346704914593063;
->pex_unix_wait,,1257346704914599721;
->pex_get_status_and_time,,1257346704914610535;
->pex_read_output,,1257346704914623383;
-<xstrdup,,2594,,1257346704914639840;
-<xmalloc,,2595,,1257346704914665655;
->xmalloc,,1257346704914672915;
->xstrdup,,1257346704914677574;
-<xstrdup,,2596,,1257346704914682843;
-<xmalloc,,2597,,1257346704914703173;
->xmalloc,,1257346704914710045;
->xstrdup,,1257346704914714478;
-<xstrdup,,2598,,1257346704914719494;
-<xmalloc,,2599,,1257346704914740664;
->xmalloc,,1257346704914747343;
->xstrdup,,1257346704914751740;
-<xstrdup,,2600,,1257346704914756681;
-<xmalloc,,2601,,1257346704914776305;
->xmalloc,,1257346704914783164;
->xstrdup,,1257346704914787555;
-<vec_p_reserve,,2602,,1257346704914801561;
-<vec_o_reserve,,2603,,1257346704914810755;
-<xrealloc,,2604,,1257346704914836249;
->xrealloc,,1257346704914846955;
->vec_o_reserve,,1257346704914852002;
->vec_p_reserve,,1257346704914856654;
-<xstrdup,,2605,,1257346704914861830;
-<xmalloc,,2606,,1257346704914885579;
->xmalloc,,1257346704914892391;
->xstrdup,,1257346704914896824;
-<xstrdup,,2607,,1257346704914901892;
-<xmalloc,,2608,,1257346704914921548;
->xmalloc,,1257346704914928577;
->xstrdup,,1257346704914932992;
-<xstrdup,,2609,,1257346704914937999;
-<xmalloc,,2610,,1257346704914957493;
->xmalloc,,1257346704914964353;
->xstrdup,,1257346704914968753;
-<xstrdup,,2611,,1257346704914973733;
-<xmalloc,,2612,,1257346704914993483;
->xmalloc,,1257346704915000304;
->xstrdup,,1257346704915004710;
-<vec_p_reserve,,2613,,1257346704915017052;
-<vec_o_reserve,,2614,,1257346704915025873;
-<xrealloc,,2615,,1257346704915047809;
->xrealloc,,1257346704915054913;
->vec_o_reserve,,1257346704915059514;
->vec_p_reserve,,1257346704915064094;
-<xstrdup,,2616,,1257346704915069114;
-<xmalloc,,2617,,1257346704915092776;
->xmalloc,,1257346704915099630;
->xstrdup,,1257346704915104033;
-<xstrdup,,2618,,1257346704915108923;
-<xmalloc,,2619,,1257346704915128649;
->xmalloc,,1257346704915135539;
->xstrdup,,1257346704915139939;
-<xstrdup,,2620,,1257346704915144946;
-<xmalloc,,2621,,1257346704915164753;
->xmalloc,,1257346704915171423;
->xstrdup,,1257346704915175799;
-<xstrdup,,2622,,1257346704915180744;
-<xmalloc,,2623,,1257346704915200322;
->xmalloc,,1257346704915207152;
->xstrdup,,1257346704915211543;
-<xstrdup,,2624,,1257346704915216478;
-<xmalloc,,2625,,1257346704915236594;
->xmalloc,,1257346704915243193;
->xstrdup,,1257346704915247521;
-<xstrdup,,2626,,1257346704915252402;
-<xmalloc,,2627,,1257346704915272476;
->xmalloc,,1257346704915279342;
->xstrdup,,1257346704915283805;
-<xstrdup,,2628,,1257346704915288719;
-<xmalloc,,2629,,1257346704915308860;
->xmalloc,,1257346704915315603;
->xstrdup,,1257346704915320075;
-<xstrdup,,2630,,1257346704915324980;
-<xmalloc,,2631,,1257346704915344754;
->xmalloc,,1257346704915351568;
->xstrdup,,1257346704915355926;
-<vec_p_reserve,,2632,,1257346704915368588;
-<vec_o_reserve,,2633,,1257346704915377321;
-<xrealloc,,2634,,1257346704915399759;
->xrealloc,,1257346704915406911;
->vec_o_reserve,,1257346704915411621;
->vec_p_reserve,,1257346704915416228;
-<xstrdup,,2635,,1257346704915421284;
-<xmalloc,,2636,,1257346704915445235;
->xmalloc,,1257346704915452008;
->xstrdup,,1257346704915456498;
-<xstrdup,,2637,,1257346704915461445;
-<xmalloc,,2638,,1257346704915481553;
->xmalloc,,1257346704915488298;
->xstrdup,,1257346704915492767;
-<xstrdup,,2639,,1257346704915497754;
-<xmalloc,,2640,,1257346704915517831;
->xmalloc,,1257346704915524649;
->xstrdup,,1257346704915529028;
-<xstrdup,,2641,,1257346704915533960;
-<xmalloc,,2642,,1257346704915554086;
->xmalloc,,1257346704915560919;
->xstrdup,,1257346704915565310;
-<xstrdup,,2643,,1257346704915570239;
-<xmalloc,,2644,,1257346704915589904;
->xmalloc,,1257346704915596620;
->xstrdup,,1257346704915609547;
-<xstrdup,,2645,,1257346704915615126;
-<xmalloc,,2646,,1257346704915637249;
->xmalloc,,1257346704915644343;
->xstrdup,,1257346704915648800;
-<xstrdup,,2647,,1257346704915653748;
-<xmalloc,,2648,,1257346704915673693;
->xmalloc,,1257346704915680378;
->xstrdup,,1257346704915684769;
-<xstrdup,,2649,,1257346704915689689;
-<xmalloc,,2650,,1257346704915710149;
->xmalloc,,1257346704915716979;
->xstrdup,,1257346704915721394;
-<vec_p_reserve,,2651,,1257346704915734106;
-<vec_o_reserve,,2652,,1257346704915742990;
-<xrealloc,,2653,,1257346704915764935;
->xrealloc,,1257346704915771801;
->vec_o_reserve,,1257346704915776411;
->vec_p_reserve,,1257346704915780968;
-<xstrdup,,2654,,1257346704915786207;
-<xmalloc,,2655,,1257346704915809601;
->xmalloc,,1257346704915816618;
->xstrdup,,1257346704915821036;
-<xstrdup,,2656,,1257346704915825992;
-<xmalloc,,2657,,1257346704915845724;
->xmalloc,,1257346704915852478;
->xstrdup,,1257346704915856866;
-<xstrdup,,2658,,1257346704915861808;
-<xmalloc,,2659,,1257346704915881371;
->xmalloc,,1257346704915888080;
->xstrdup,,1257346704915892549;
-<xstrdup,,2660,,1257346704915897536;
-<xmalloc,,2661,,1257346704915917114;
->xmalloc,,1257346704915923830;
->xstrdup,,1257346704915928419;
-<xstrdup,,2662,,1257346704915933363;
-<xmalloc,,2663,,1257346704915953832;
->xmalloc,,1257346704915960538;
->xstrdup,,1257346704915965083;
-<xstrdup,,2664,,1257346704915970087;
-<xmalloc,,2665,,1257346704915990104;
->xmalloc,,1257346704915996832;
->xstrdup,,1257346704916001304;
-<xstrdup,,2666,,1257346704916006272;
-<xmalloc,,2667,,1257346704916027008;
->xmalloc,,1257346704916034034;
->xstrdup,,1257346704916038434;
-<xstrdup,,2668,,1257346704916043787;
-<xmalloc,,2669,,1257346704916063257;
->xmalloc,,1257346704916069994;
->xstrdup,,1257346704916074369;
-<xstrdup,,2670,,1257346704916079422;
-<xmalloc,,2671,,1257346704916098874;
->xmalloc,,1257346704916105532;
->xstrdup,,1257346704916109908;
-<xstrdup,,2672,,1257346704916114949;
-<xmalloc,,2673,,1257346704916134834;
->xmalloc,,1257346704916141591;
->xstrdup,,1257346704916145985;
-<xstrdup,,2674,,1257346704916150972;
-<xmalloc,,2675,,1257346704916170577;
->xmalloc,,1257346704916177290;
->xstrdup,,1257346704916181765;
-<xstrdup,,2676,,1257346704916186766;
-<xmalloc,,2677,,1257346704916206802;
->xmalloc,,1257346704916213451;
->xstrdup,,1257346704916217920;
-<vec_p_reserve,,2678,,1257346704916230079;
-<vec_o_reserve,,2679,,1257346704916239023;
-<xrealloc,,2680,,1257346704916260643;
->xrealloc,,1257346704916267440;
->vec_o_reserve,,1257346704916272114;
->vec_p_reserve,,1257346704916276640;
-<xstrdup,,2681,,1257346704916281747;
-<xmalloc,,2682,,1257346704916305123;
->xmalloc,,1257346704916311923;
->xstrdup,,1257346704916316311;
-<xstrdup,,2683,,1257346704916321319;
-<xmalloc,,2684,,1257346704916342190;
->xmalloc,,1257346704916349053;
->xstrdup,,1257346704916353453;
-<xstrdup,,2685,,1257346704916358415;
-<xmalloc,,2686,,1257346704916377873;
->xmalloc,,1257346704916384477;
->xstrdup,,1257346704916388880;
-<xstrdup,,2687,,1257346704916393773;
-<xmalloc,,2688,,1257346704916413376;
->xmalloc,,1257346704916419983;
->xstrdup,,1257346704916424458;
-<xstrdup,,2689,,1257346704916429426;
-<xmalloc,,2690,,1257346704916449089;
->xmalloc,,1257346704916455648;
->xstrdup,,1257346704916460162;
-<xstrdup,,2691,,1257346704916465203;
-<xmalloc,,2692,,1257346704916485028;
->xmalloc,,1257346704916491852;
->xstrdup,,1257346704916496231;
-<xstrdup,,2693,,1257346704916501214;
-<xmalloc,,2694,,1257346704916520795;
->xmalloc,,1257346704916527508;
->xstrdup,,1257346704916531901;
-<xstrdup,,2695,,1257346704916536984;
-<xmalloc,,2696,,1257346704916556743;
->xmalloc,,1257346704916563555;
->xstrdup,,1257346704916567940;
-<xstrdup,,2697,,1257346704916573007;
-<xmalloc,,2698,,1257346704916592766;
->xmalloc,,1257346704916599653;
->xstrdup,,1257346704916618305;
-<xstrdup,,2699,,1257346704916623667;
-<xmalloc,,2700,,1257346704916646293;
->xmalloc,,1257346704916653204;
->xstrdup,,1257346704916657721;
-<xstrdup,,2701,,1257346704916662740;
-<xmalloc,,2702,,1257346704916682673;
->xmalloc,,1257346704916689452;
->xstrdup,,1257346704916693957;
-<xstrdup,,2703,,1257346704916698931;
-<xmalloc,,2704,,1257346704916718889;
->xmalloc,,1257346704916725628;
->xstrdup,,1257346704916730116;
-<xstrdup,,2705,,1257346704916735111;
-<xmalloc,,2706,,1257346704916754758;
->xmalloc,,1257346704916761513;
->xstrdup,,1257346704916766003;
-<xstrdup,,2707,,1257346704916771007;
-<xmalloc,,2708,,1257346704916790899;
->xmalloc,,1257346704916797713;
->xstrdup,,1257346704916802095;
-<xstrdup,,2709,,1257346704916807058;
-<xmalloc,,2710,,1257346704916826865;
->xmalloc,,1257346704916833652;
->xstrdup,,1257346704916838067;
-<xstrdup,,2711,,1257346704916843081;
-<xmalloc,,2712,,1257346704916863206;
->xmalloc,,1257346704916869916;
->xstrdup,,1257346704916874376;
-<xstrdup,,2713,,1257346704916879359;
-<xmalloc,,2714,,1257346704916899527;
->xmalloc,,1257346704916906399;
->xstrdup,,1257346704916910847;
-<xstrdup,,2715,,1257346704916915890;
-<xmalloc,,2716,,1257346704916935700;
->xmalloc,,1257346704916942377;
->xstrdup,,1257346704916946719;
-<vec_p_reserve,,2717,,1257346704916959309;
-<vec_o_reserve,,2718,,1257346704916968211;
-<xrealloc,,2719,,1257346704916990327;
->xrealloc,,1257346704916997476;
->vec_o_reserve,,1257346704917002089;
->vec_p_reserve,,1257346704917006607;
-<xstrdup,,2720,,1257346704917011623;
-<xmalloc,,2721,,1257346704917035120;
->xmalloc,,1257346704917041977;
->xstrdup,,1257346704917046368;
-<xstrdup,,2722,,1257346704917051312;
-<xmalloc,,2723,,1257346704917070984;
->xmalloc,,1257346704917077669;
->xstrdup,,1257346704917082045;
-<xstrdup,,2724,,1257346704917087028;
-<xmalloc,,2725,,1257346704917106456;
->xmalloc,,1257346704917113082;
->xstrdup,,1257346704917117535;
-<xstrdup,,2726,,1257346704917122447;
-<xmalloc,,2727,,1257346704917142034;
->xmalloc,,1257346704917148746;
->xstrdup,,1257346704917153219;
-<xstrdup,,2728,,1257346704917158154;
-<xmalloc,,2729,,1257346704917177702;
->xmalloc,,1257346704917184382;
->xstrdup,,1257346704917188841;
-<xstrdup,,2730,,1257346704917193747;
-<xmalloc,,2731,,1257346704917215154;
->xmalloc,,1257346704917221785;
->xstrdup,,1257346704917226194;
-<xstrdup,,2732,,1257346704917231063;
-<xmalloc,,2733,,1257346704917251252;
->xmalloc,,1257346704917258118;
->xstrdup,,1257346704917262487;
-<xstrdup,,2734,,1257346704917267396;
-<xmalloc,,2735,,1257346704917286848;
->xmalloc,,1257346704917293512;
->xstrdup,,1257346704917297888;
-<xstrdup,,2736,,1257346704917302751;
-<xmalloc,,2737,,1257346704917322380;
->xmalloc,,1257346704917329009;
->xstrdup,,1257346704917333342;
-<xstrdup,,2738,,1257346704917338202;
-<xmalloc,,2739,,1257346704917358091;
->xmalloc,,1257346704917364854;
->xstrdup,,1257346704917369230;
-<xstrdup,,2740,,1257346704917374186;
-<xmalloc,,2741,,1257346704917394029;
->xmalloc,,1257346704917400820;
->xstrdup,,1257346704917405193;
-<xstrdup,,2742,,1257346704917410098;
-<xmalloc,,2743,,1257346704917430627;
->xmalloc,,1257346704917437288;
->xstrdup,,1257346704917441748;
-<xstrdup,,2744,,1257346704917446653;
-<xmalloc,,2745,,1257346704917466608;
->xmalloc,,1257346704917473386;
->xstrdup,,1257346704917477871;
-<xstrdup,,2746,,1257346704917482788;
-<xmalloc,,2747,,1257346704917502904;
->xmalloc,,1257346704917509677;
->xstrdup,,1257346704917514263;
-<xstrdup,,2748,,1257346704917519169;
-<xmalloc,,2749,,1257346704917539069;
->xmalloc,,1257346704917545989;
->xstrdup,,1257346704917550440;
-<xstrdup,,2750,,1257346704917555438;
-<xmalloc,,2751,,1257346704917575606;
->xmalloc,,1257346704917582385;
->xstrdup,,1257346704917586778;
-<xstrdup,,2752,,1257346704917591726;
-<xmalloc,,2753,,1257346704917617144;
->xmalloc,,1257346704917624410;
->xstrdup,,1257346704917628861;
-<xstrdup,,2754,,1257346704917633848;
-<xmalloc,,2755,,1257346704917654130;
->xmalloc,,1257346704917660875;
->xstrdup,,1257346704917665302;
-<xstrdup,,2756,,1257346704917670331;
-<xmalloc,,2757,,1257346704917690023;
->xmalloc,,1257346704917696799;
->xstrdup,,1257346704917701256;
-<xstrdup,,2758,,1257346704917706221;
-<xmalloc,,2759,,1257346704917726082;
->xmalloc,,1257346704917732822;
->xstrdup,,1257346704917737327;
-<xstrdup,,2760,,1257346704917742265;
-<xmalloc,,2761,,1257346704917762135;
->xmalloc,,1257346704917768944;
->xstrdup,,1257346704917773446;
-<xstrdup,,2762,,1257346704917778418;
-<xmalloc,,2763,,1257346704917798601;
->xmalloc,,1257346704917805211;
->xstrdup,,1257346704917809746;
-<xstrdup,,2764,,1257346704917814642;
-<xmalloc,,2765,,1257346704917834533;
->xmalloc,,1257346704917841240;
->xstrdup,,1257346704917845691;
-<xstrdup,,2766,,1257346704917850620;
-<xmalloc,,2767,,1257346704917870647;
->xmalloc,,1257346704917877326;
->xstrdup,,1257346704917881714;
-<xstrdup,,2768,,1257346704917886637;
-<xmalloc,,2769,,1257346704917906600;
->xmalloc,,1257346704917913277;
->xstrdup,,1257346704917917674;
-<xstrdup,,2770,,1257346704917922564;
-<xmalloc,,2771,,1257346704917942175;
->xmalloc,,1257346704917948810;
->xstrdup,,1257346704917953269;
-<xstrdup,,2772,,1257346704917958289;
-<xmalloc,,2773,,1257346704917977918;
->xmalloc,,1257346704917984658;
->xstrdup,,1257346704917989145;
-<vec_p_reserve,,2774,,1257346704918001295;
-<vec_o_reserve,,2775,,1257346704918010152;
-<xrealloc,,2776,,1257346704918032305;
->xrealloc,,1257346704918039357;
->vec_o_reserve,,1257346704918043977;
->vec_p_reserve,,1257346704918048500;
-<xstrdup,,2777,,1257346704918053447;
-<xmalloc,,2778,,1257346704918076661;
->xmalloc,,1257346704918083542;
->xstrdup,,1257346704918087933;
-<xstrdup,,2779,,1257346704918092938;
-<xmalloc,,2780,,1257346704918113178;
->xmalloc,,1257346704918119851;
->xstrdup,,1257346704918124227;
-<xstrdup,,2781,,1257346704918129183;
-<xmalloc,,2782,,1257346704918149622;
->xmalloc,,1257346704918156280;
->xstrdup,,1257346704918160656;
-<xstrdup,,2783,,1257346704918165573;
-<xmalloc,,2784,,1257346704918185100;
->xmalloc,,1257346704918191810;
->xstrdup,,1257346704918196267;
-<xstrdup,,2785,,1257346704918201139;
-<xmalloc,,2786,,1257346704918221367;
->xmalloc,,1257346704918228091;
->xstrdup,,1257346704918232551;
-<xstrdup,,2787,,1257346704918237495;
-<xmalloc,,2788,,1257346704918257414;
->xmalloc,,1257346704918264111;
->xstrdup,,1257346704918268568;
-<xstrdup,,2789,,1257346704918273458;
-<xmalloc,,2790,,1257346704918293142;
->xmalloc,,1257346704918299876;
->xstrdup,,1257346704918304246;
-<xstrdup,,2791,,1257346704918309154;
-<xmalloc,,2792,,1257346704918328985;
->xmalloc,,1257346704918335640;
->xstrdup,,1257346704918340019;
-<xstrdup,,2793,,1257346704918344933;
-<xmalloc,,2794,,1257346704918365179;
->xmalloc,,1257346704918371991;
->xstrdup,,1257346704918376391;
-<xstrdup,,2795,,1257346704918381338;
-<xmalloc,,2796,,1257346704918401731;
->xmalloc,,1257346704918408402;
->xstrdup,,1257346704918412778;
-<xstrdup,,2797,,1257346704918417677;
-<xmalloc,,2798,,1257346704918437902;
->xmalloc,,1257346704918444614;
->xstrdup,,1257346704918448999;
-<xstrdup,,2799,,1257346704918453946;
-<xmalloc,,2800,,1257346704918473723;
->xmalloc,,1257346704918480466;
->xstrdup,,1257346704918484862;
-<xstrdup,,2801,,1257346704918489840;
-<xmalloc,,2802,,1257346704918509533;
->xmalloc,,1257346704918516266;
->xstrdup,,1257346704918520783;
-<xstrdup,,2803,,1257346704918525767;
-<xmalloc,,2804,,1257346704918545995;
->xmalloc,,1257346704918552764;
->xstrdup,,1257346704918557233;
-<xstrdup,,2805,,1257346704918562159;
-<xmalloc,,2806,,1257346704918582502;
->xmalloc,,1257346704918589365;
->xstrdup,,1257346704918593767;
-<xstrdup,,2807,,1257346704918598715;
-<xmalloc,,2808,,1257346704918626271;
->xmalloc,,1257346704918633453;
->xstrdup,,1257346704918637928;
-<xstrdup,,2809,,1257346704918642951;
-<xmalloc,,2810,,1257346704918663359;
->xmalloc,,1257346704918670201;
->xstrdup,,1257346704918674610;
-<xstrdup,,2811,,1257346704918679512;
-<xmalloc,,2812,,1257346704918699211;
->xmalloc,,1257346704918705908;
->xstrdup,,1257346704918710290;
-<xstrdup,,2813,,1257346704918715204;
-<xmalloc,,2814,,1257346704918734864;
->xmalloc,,1257346704918741522;
->xstrdup,,1257346704918746000;
-<xstrdup,,2815,,1257346704918750836;
-<xmalloc,,2816,,1257346704918770700;
->xmalloc,,1257346704918777380;
->xstrdup,,1257346704918781870;
-<xstrdup,,2817,,1257346704918786790;
-<xmalloc,,2818,,1257346704918806916;
->xmalloc,,1257346704918813571;
->xstrdup,,1257346704918818088;
-<xstrdup,,2819,,1257346704918822963;
-<xmalloc,,2820,,1257346704918842659;
->xmalloc,,1257346704918849414;
->xstrdup,,1257346704918853892;
-<xstrdup,,2821,,1257346704918858743;
-<xmalloc,,2822,,1257346704918878856;
->xmalloc,,1257346704918885626;
->xstrdup,,1257346704918890014;
-<xstrdup,,2823,,1257346704918894865;
-<xmalloc,,2824,,1257346704918914506;
->xmalloc,,1257346704918921300;
->xstrdup,,1257346704918925697;
-<xstrdup,,2825,,1257346704918930572;
-<xmalloc,,2826,,1257346704918950084;
->xmalloc,,1257346704918956740;
->xstrdup,,1257346704918961136;
-<xstrdup,,2827,,1257346704918966039;
-<xmalloc,,2828,,1257346704918986549;
->xmalloc,,1257346704918993223;
->xstrdup,,1257346704918997605;
-<xstrdup,,2829,,1257346704919002446;
-<xmalloc,,2830,,1257346704919022617;
->xmalloc,,1257346704919029435;
->xstrdup,,1257346704919033835;
-<xstrdup,,2831,,1257346704919038704;
-<xmalloc,,2832,,1257346704919058947;
->xmalloc,,1257346704919065663;
->xstrdup,,1257346704919070051;
-<xstrdup,,2833,,1257346704919074968;
-<xmalloc,,2834,,1257346704919094769;
->xmalloc,,1257346704919101439;
->xstrdup,,1257346704919105908;
-<xstrdup,,2835,,1257346704919110759;
-<xmalloc,,2836,,1257346704919130304;
->xmalloc,,1257346704919136978;
->xstrdup,,1257346704919141369;
-<xstrdup,,2837,,1257346704919146244;
-<xmalloc,,2838,,1257346704919165840;
->xmalloc,,1257346704919172607;
->xstrdup,,1257346704919177001;
-<xstrdup,,2839,,1257346704919181837;
-<xmalloc,,2840,,1257346704919201325;
->xmalloc,,1257346704919208001;
->xstrdup,,1257346704919212383;
-<xstrdup,,2841,,1257346704919217270;
-<xmalloc,,2842,,1257346704919237321;
->xmalloc,,1257346704919244066;
->xstrdup,,1257346704919248472;
-<xstrdup,,2843,,1257346704919253377;
-<xmalloc,,2844,,1257346704919273413;
->xmalloc,,1257346704919280144;
->xstrdup,,1257346704919284555;
-<xstrdup,,2845,,1257346704919289475;
-<xmalloc,,2846,,1257346704919309412;
->xmalloc,,1257346704919316181;
->xstrdup,,1257346704919320678;
-<xstrdup,,2847,,1257346704919325574;
-<xmalloc,,2848,,1257346704919345687;
->xmalloc,,1257346704919352403;
->xstrdup,,1257346704919356899;
-<xstrdup,,2849,,1257346704919361753;
-<xmalloc,,2850,,1257346704919381500;
->xmalloc,,1257346704919388176;
->xstrdup,,1257346704919392726;
-<xstrdup,,2851,,1257346704919397620;
-<xmalloc,,2852,,1257346704919417538;
->xmalloc,,1257346704919424205;
->xstrdup,,1257346704919428705;
-<xstrdup,,2853,,1257346704919433615;
-<xmalloc,,2854,,1257346704919453726;
->xmalloc,,1257346704919460586;
->xstrdup,,1257346704919465013;
-<xstrdup,,2855,,1257346704919469882;
-<xmalloc,,2856,,1257346704919490095;
->xmalloc,,1257346704919496853;
->xstrdup,,1257346704919501265;
-<vec_p_reserve,,2857,,1257346704919513556;
-<vec_o_reserve,,2858,,1257346704919522383;
-<xrealloc,,2859,,1257346704919544066;
->xrealloc,,1257346704919554027;
->vec_o_reserve,,1257346704919558785;
->vec_p_reserve,,1257346704919563401;
-<xstrdup,,2860,,1257346704919568363;
-<xmalloc,,2861,,1257346704919592387;
->xmalloc,,1257346704919599196;
->xstrdup,,1257346704919608037;
-<xstrdup,,2862,,1257346704919613059;
-<xmalloc,,2863,,1257346704919633323;
->xmalloc,,1257346704919640126;
->xstrdup,,1257346704919644601;
-<xstrdup,,2864,,1257346704919649485;
-<xmalloc,,2865,,1257346704919669145;
->xmalloc,,1257346704919675960;
->xstrdup,,1257346704919680354;
-<xstrdup,,2866,,1257346704919685238;
-<xmalloc,,2867,,1257346704919704888;
->xmalloc,,1257346704919711631;
->xstrdup,,1257346704919716019;
-<xstrdup,,2868,,1257346704919720864;
-<xmalloc,,2869,,1257346704919740773;
->xmalloc,,1257346704919747479;
->xstrdup,,1257346704919751861;
-<xstrdup,,2870,,1257346704919756736;
-<xmalloc,,2871,,1257346704919776922;
->xmalloc,,1257346704919783752;
->xstrdup,,1257346704919788146;
-<xstrdup,,2872,,1257346704919793030;
-<xmalloc,,2873,,1257346704919813261;
->xmalloc,,1257346704919819986;
->xstrdup,,1257346704919824370;
-<xstrdup,,2874,,1257346704919829305;
-<xmalloc,,2875,,1257346704919850436;
->xmalloc,,1257346704919857154;
->xstrdup,,1257346704919861629;
-<xstrdup,,2876,,1257346704919866483;
-<xmalloc,,2877,,1257346704919886236;
->xmalloc,,1257346704919892955;
->xstrdup,,1257346704919897424;
-<xstrdup,,2878,,1257346704919902317;
-<xmalloc,,2879,,1257346704919922629;
->xmalloc,,1257346704919929438;
->xstrdup,,1257346704919933913;
-<xstrdup,,2880,,1257346704919938782;
-<xmalloc,,2881,,1257346704919958977;
->xmalloc,,1257346704919965801;
->xstrdup,,1257346704919970179;
-<xstrdup,,2882,,1257346704919975067;
-<xmalloc,,2883,,1257346704919995532;
->xmalloc,,1257346704920002260;
->xstrdup,,1257346704920006642;
-<xstrdup,,2884,,1257346704920011511;
-<xmalloc,,2885,,1257346704920031164;
->xmalloc,,1257346704920037880;
->xstrdup,,1257346704920042265;
-<xstrdup,,2886,,1257346704920047326;
-<xmalloc,,2887,,1257346704920066965;
->xmalloc,,1257346704920073665;
->xstrdup,,1257346704920078044;
-<xstrdup,,2888,,1257346704920082916;
-<xmalloc,,2889,,1257346704920102696;
->xmalloc,,1257346704920109463;
->xstrdup,,1257346704920113856;
-<xstrdup,,2890,,1257346704920118758;
-<xmalloc,,2891,,1257346704920138553;
->xmalloc,,1257346704920145275;
->xstrdup,,1257346704920149678;
-<xstrdup,,2892,,1257346704920154574;
-<xmalloc,,2893,,1257346704920174453;
->xmalloc,,1257346704920181187;
->xstrdup,,1257346704920185674;
-<xstrdup,,2894,,1257346704920190540;
-<xmalloc,,2895,,1257346704920211423;
->xmalloc,,1257346704920218196;
->xstrdup,,1257346704920222590;
-<xstrdup,,2896,,1257346704920227480;
-<xmalloc,,2897,,1257346704920247645;
->xmalloc,,1257346704920254466;
->xstrdup,,1257346704920258850;
-<xstrdup,,2898,,1257346704920263704;
-<xmalloc,,2899,,1257346704920283737;
->xmalloc,,1257346704920290474;
->xstrdup,,1257346704920294871;
-<xstrdup,,2900,,1257346704920299755;
-<xmalloc,,2901,,1257346704920319757;
->xmalloc,,1257346704920326488;
->xstrdup,,1257346704920330890;
-<xstrdup,,2902,,1257346704920335780;
-<xmalloc,,2903,,1257346704920355900;
->xmalloc,,1257346704920362643;
->xstrdup,,1257346704920367043;
-<xstrdup,,2904,,1257346704920371948;
-<xmalloc,,2905,,1257346704920392456;
->xmalloc,,1257346704920399180;
->xstrdup,,1257346704920403586;
-<xstrdup,,2906,,1257346704920408488;
-<xmalloc,,2907,,1257346704920428840;
->xmalloc,,1257346704920435549;
->xstrdup,,1257346704920440021;
-<xstrdup,,2908,,1257346704920444851;
-<xmalloc,,2909,,1257346704920464835;
->xmalloc,,1257346704920471554;
->xstrdup,,1257346704920476017;
-<xstrdup,,2910,,1257346704920480916;
-<xmalloc,,2911,,1257346704920500894;
->xmalloc,,1257346704920507571;
->xstrdup,,1257346704920512040;
-<xstrdup,,2912,,1257346704920516906;
-<xmalloc,,2913,,1257346704920536779;
->xmalloc,,1257346704920543579;
->xstrdup,,1257346704920547958;
-<xstrdup,,2914,,1257346704920552782;
-<xmalloc,,2915,,1257346704920572369;
->xmalloc,,1257346704920579087;
->xstrdup,,1257346704920583460;
-<xstrdup,,2916,,1257346704920588323;
-<xmalloc,,2917,,1257346704920612609;
->xmalloc,,1257346704920619754;
->xstrdup,,1257346704920624179;
-<xstrdup,,2918,,1257346704920629093;
-<xmalloc,,2919,,1257346704920649576;
->xmalloc,,1257346704920656289;
->xstrdup,,1257346704920660661;
-<xstrdup,,2920,,1257346704920665654;
-<xmalloc,,2921,,1257346704920685485;
->xmalloc,,1257346704920692195;
->xstrdup,,1257346704920696660;
-<xstrdup,,2922,,1257346704920701524;
-<xmalloc,,2923,,1257346704920721688;
->xmalloc,,1257346704920728476;
->xstrdup,,1257346704920732960;
-<xstrdup,,2924,,1257346704920737805;
-<xmalloc,,2925,,1257346704920757191;
->xmalloc,,1257346704920763846;
->xstrdup,,1257346704920768319;
-<xstrdup,,2926,,1257346704920773248;
-<xmalloc,,2927,,1257346704920792715;
->xmalloc,,1257346704920799397;
->xstrdup,,1257346704920803866;
-<xstrdup,,2928,,1257346704920808732;
-<xmalloc,,2929,,1257346704920828031;
->xmalloc,,1257346704920834804;
->xstrdup,,1257346704920839182;
-<xstrdup,,2930,,1257346704920844172;
-<xmalloc,,2931,,1257346704920863885;
->xmalloc,,1257346704920870607;
->xstrdup,,1257346704920874986;
-<xstrdup,,2932,,1257346704920879867;
-<xmalloc,,2933,,1257346704920899803;
->xmalloc,,1257346704920906459;
->xstrdup,,1257346704920910841;
-<xstrdup,,2934,,1257346704920915661;
-<xmalloc,,2935,,1257346704920935628;
->xmalloc,,1257346704920942292;
->xstrdup,,1257346704920946671;
-<xstrdup,,2936,,1257346704920951489;
-<xmalloc,,2937,,1257346704920971470;
->xmalloc,,1257346704920978159;
->xstrdup,,1257346704920982583;
-<xstrdup,,2938,,1257346704920987473;
-<xmalloc,,2939,,1257346704921006982;
->xmalloc,,1257346704921013779;
->xstrdup,,1257346704921018269;
-<xstrdup,,2940,,1257346704921023147;
-<xmalloc,,2941,,1257346704921043236;
->xmalloc,,1257346704921050109;
->xstrdup,,1257346704921054605;
-<xstrdup,,2942,,1257346704921059486;
-<xmalloc,,2943,,1257346704921080102;
->xmalloc,,1257346704921086847;
->xstrdup,,1257346704921091361;
-<xstrdup,,2944,,1257346704921096212;
-<xmalloc,,2945,,1257346704921116356;
->xmalloc,,1257346704921123168;
->xstrdup,,1257346704921127655;
-<xstrdup,,2946,,1257346704921132536;
-<xmalloc,,2947,,1257346704921152887;
->xmalloc,,1257346704921159612;
->xstrdup,,1257346704921164030;
-<xstrdup,,2948,,1257346704921168932;
-<xmalloc,,2949,,1257346704921188291;
->xmalloc,,1257346704921195055;
->xstrdup,,1257346704921199482;
-<xstrdup,,2950,,1257346704921204537;
-<xmalloc,,2951,,1257346704921224356;
->xmalloc,,1257346704921231114;
->xstrdup,,1257346704921235537;
-<xstrdup,,2952,,1257346704921240455;
-<xmalloc,,2953,,1257346704921260250;
->xmalloc,,1257346704921266893;
->xstrdup,,1257346704921271401;
-<xstrdup,,2954,,1257346704921276300;
-<xmalloc,,2955,,1257346704921296077;
->xmalloc,,1257346704921302790;
->xstrdup,,1257346704921307208;
-<xstrdup,,2956,,1257346704921312113;
-<xmalloc,,2957,,1257346704921331541;
->xmalloc,,1257346704921338205;
->xstrdup,,1257346704921342638;
-<xstrdup,,2958,,1257346704921347453;
-<xmalloc,,2959,,1257346704921367353;
->xmalloc,,1257346704921374063;
->xstrdup,,1257346704921378499;
-<xstrdup,,2960,,1257346704921383374;
-<xmalloc,,2961,,1257346704921403171;
->xmalloc,,1257346704921409968;
->xstrdup,,1257346704921414365;
-<xstrdup,,2962,,1257346704921419240;
-<xmalloc,,2963,,1257346704921438689;
->xmalloc,,1257346704921445390;
->xstrdup,,1257346704921449796;
-<xstrdup,,2964,,1257346704921454893;
-<xmalloc,,2965,,1257346704921474423;
->xmalloc,,1257346704921481055;
->xstrdup,,1257346704921485455;
-<xstrdup,,2966,,1257346704921490327;
-<xmalloc,,2967,,1257346704921510025;
->xmalloc,,1257346704921516738;
->xstrdup,,1257346704921521141;
-<xstrdup,,2968,,1257346704921526058;
-<xmalloc,,2969,,1257346704921545570;
->xmalloc,,1257346704921552277;
->xstrdup,,1257346704921556758;
-<xstrdup,,2970,,1257346704921561630;
-<xmalloc,,2971,,1257346704921581232;
->xmalloc,,1257346704921587873;
->xstrdup,,1257346704921592360;
-<xstrdup,,2972,,1257346704921597232;
-<xmalloc,,2973,,1257346704921623863;
->xmalloc,,1257346704921630865;
->xstrdup,,1257346704921635418;
-<xstrdup,,2974,,1257346704921640332;
-<xmalloc,,2975,,1257346704921660244;
->xmalloc,,1257346704921666945;
->xstrdup,,1257346704921671426;
-<xstrdup,,2976,,1257346704921676358;
-<xmalloc,,2977,,1257346704921695852;
->xmalloc,,1257346704921702616;
->xstrdup,,1257346704921707010;
-<xstrdup,,2978,,1257346704921711894;
-<xmalloc,,2979,,1257346704921731159;
->xmalloc,,1257346704921737836;
->xstrdup,,1257346704921742220;
-<vec_p_reserve,,2980,,1257346704921754545;
-<vec_o_reserve,,2981,,1257346704921763258;
-<xrealloc,,2982,,1257346704921785461;
->xrealloc,,1257346704921792631;
->vec_o_reserve,,1257346704921797254;
->vec_p_reserve,,1257346704921801855;
-<xstrdup,,2983,,1257346704921806781;
-<xmalloc,,2984,,1257346704921829815;
->xmalloc,,1257346704921836651;
->xstrdup,,1257346704921841132;
-<xstrdup,,2985,,1257346704921846052;
-<xmalloc,,2986,,1257346704921865982;
->xmalloc,,1257346704921872785;
->xstrdup,,1257346704921877188;
-<xstrdup,,2987,,1257346704921882084;
-<xmalloc,,2988,,1257346704921902207;
->xmalloc,,1257346704921908913;
->xstrdup,,1257346704921913310;
-<xstrdup,,2989,,1257346704921918275;
-<xmalloc,,2990,,1257346704921938136;
->xmalloc,,1257346704921944963;
->xstrdup,,1257346704921949348;
-<xstrdup,,2991,,1257346704921954232;
-<xmalloc,,2992,,1257346704921974346;
->xmalloc,,1257346704921980980;
->xstrdup,,1257346704921985452;
-<xstrdup,,2993,,1257346704921990300;
-<xmalloc,,2994,,1257346704922009843;
->xmalloc,,1257346704922016489;
->xstrdup,,1257346704922020943;
-<xstrdup,,2995,,1257346704922025818;
-<xmalloc,,2996,,1257346704922045673;
->xmalloc,,1257346704922052374;
->xstrdup,,1257346704922056900;
-<xstrdup,,2997,,1257346704922061790;
-<xmalloc,,2998,,1257346704922081684;
->xmalloc,,1257346704922088397;
->xstrdup,,1257346704922092851;
-<xstrdup,,2999,,1257346704922097674;
-<xmalloc,,3000,,1257346704922118335;
->xmalloc,,1257346704922125078;
->xstrdup,,1257346704922129547;
-<xstrdup,,3001,,1257346704922134419;
-<xmalloc,,3002,,1257346704922154755;
->xmalloc,,1257346704922161489;
->xstrdup,,1257346704922165835;
-<xstrdup,,3003,,1257346704922170797;
-<xmalloc,,3004,,1257346704922190893;
->xmalloc,,1257346704922197635;
->xstrdup,,1257346704922202002;
-<xstrdup,,3005,,1257346704922206925;
-<xmalloc,,3006,,1257346704922226152;
->xmalloc,,1257346704922232862;
->xstrdup,,1257346704922237240;
-<xstrdup,,3007,,1257346704922242109;
-<xmalloc,,3008,,1257346704922261531;
->xmalloc,,1257346704922268232;
->xstrdup,,1257346704922272611;
-<xstrdup,,3009,,1257346704922277522;
-<xmalloc,,3010,,1257346704922296838;
->xmalloc,,1257346704922303497;
->xstrdup,,1257346704922307870;
-<xstrdup,,3011,,1257346704922312733;
-<xmalloc,,3012,,1257346704922332287;
->xmalloc,,1257346704922338982;
->xstrdup,,1257346704922343441;
-<xstrdup,,3013,,1257346704922348269;
-<xmalloc,,3014,,1257346704922368325;
->xmalloc,,1257346704922374959;
->xstrdup,,1257346704922379420;
-<xstrdup,,3015,,1257346704922384324;
-<xmalloc,,3016,,1257346704922404065;
->xmalloc,,1257346704922410751;
->xstrdup,,1257346704922415127;
-<xstrdup,,3017,,1257346704922419999;
-<xmalloc,,3018,,1257346704922439556;
->xmalloc,,1257346704922446344;
->xstrdup,,1257346704922450722;
-<xstrdup,,3019,,1257346704922455745;
-<xmalloc,,3020,,1257346704922475979;
->xmalloc,,1257346704922482607;
->xstrdup,,1257346704922486977;
-<xstrdup,,3021,,1257346704922491915;
-<xmalloc,,3022,,1257346704922511298;
->xmalloc,,1257346704922517951;
->xstrdup,,1257346704922522320;
-<xstrdup,,3023,,1257346704922527156;
-<xmalloc,,3024,,1257346704922546590;
->xmalloc,,1257346704922553297;
->xstrdup,,1257346704922557679;
-<xstrdup,,3025,,1257346704922562656;
-<xmalloc,,3026,,1257346704922582409;
->xmalloc,,1257346704922589019;
->xstrdup,,1257346704922593479;
-<xstrdup,,3027,,1257346704922598336;
-<xmalloc,,3028,,1257346704922623866;
->xmalloc,,1257346704922630889;
->xstrdup,,1257346704922635421;
-<xstrdup,,3029,,1257346704922640392;
-<xmalloc,,3030,,1257346704922660632;
->xmalloc,,1257346704922667303;
->xstrdup,,1257346704922671790;
-<xstrdup,,3031,,1257346704922676716;
-<xmalloc,,3032,,1257346704922696421;
->xmalloc,,1257346704922703085;
->xstrdup,,1257346704922707566;
-<xstrdup,,3033,,1257346704922712501;
-<xmalloc,,3034,,1257346704922731866;
->xmalloc,,1257346704922738678;
->xstrdup,,1257346704922743135;
-<xstrdup,,3035,,1257346704922748109;
-<xmalloc,,3036,,1257346704922767693;
->xmalloc,,1257346704922774466;
->xstrdup,,1257346704922778869;
-<xstrdup,,3037,,1257346704922783816;
-<xmalloc,,3038,,1257346704922803575;
->xmalloc,,1257346704922810351;
->xstrdup,,1257346704922814757;
-<xstrdup,,3039,,1257346704922819698;
-<xmalloc,,3040,,1257346704922839165;
->xmalloc,,1257346704922845917;
->xstrdup,,1257346704922850344;
-<xstrdup,,3041,,1257346704922855225;
-<xmalloc,,3042,,1257346704922875044;
->xmalloc,,1257346704922881786;
->xstrdup,,1257346704922886264;
-<xstrdup,,3043,,1257346704922891251;
-<xmalloc,,3044,,1257346704922911037;
->xmalloc,,1257346704922917728;
->xstrdup,,1257346704922922215;
-<xstrdup,,3045,,1257346704922927159;
-<xmalloc,,3046,,1257346704922946879;
->xmalloc,,1257346704922953610;
->xstrdup,,1257346704922958088;
-<xstrdup,,3047,,1257346704922963005;
-<xmalloc,,3048,,1257346704922982965;
->xmalloc,,1257346704922989717;
->xstrdup,,1257346704922994195;
-<xstrdup,,3049,,1257346704922999145;
-<xmalloc,,3050,,1257346704923019448;
->xmalloc,,1257346704923026254;
->xstrdup,,1257346704923030645;
-<xstrdup,,3051,,1257346704923035562;
-<xmalloc,,3052,,1257346704923056542;
->xmalloc,,1257346704923063303;
->xstrdup,,1257346704923067684;
-<xstrdup,,3053,,1257346704923072572;
-<xmalloc,,3054,,1257346704923092324;
->xmalloc,,1257346704923099004;
->xstrdup,,1257346704923103380;
-<xstrdup,,3055,,1257346704923108393;
-<xmalloc,,3056,,1257346704923127890;
->xmalloc,,1257346704923134648;
->xstrdup,,1257346704923139027;
-<xstrdup,,3057,,1257346704923143971;
-<xmalloc,,3058,,1257346704923163279;
->xmalloc,,1257346704923169922;
->xstrdup,,1257346704923174385;
-<xstrdup,,3059,,1257346704923179284;
-<xmalloc,,3060,,1257346704923199007;
->xmalloc,,1257346704923205713;
->xstrdup,,1257346704923210182;
-<xstrdup,,3061,,1257346704923215052;
-<xmalloc,,3062,,1257346704923234714;
->xmalloc,,1257346704923241418;
->xstrdup,,1257346704923245887;
-<xstrdup,,3063,,1257346704923250837;
-<xmalloc,,3064,,1257346704923270322;
->xmalloc,,1257346704923277025;
->xstrdup,,1257346704923281501;
-<xstrdup,,3065,,1257346704923286391;
-<xmalloc,,3066,,1257346704923306336;
->xmalloc,,1257346704923313060;
->xstrdup,,1257346704923317439;
-<xstrdup,,3067,,1257346704923322396;
-<xmalloc,,3068,,1257346704923342233;
->xmalloc,,1257346704923348942;
->xstrdup,,1257346704923353327;
-<xstrdup,,3069,,1257346704923358301;
-<xmalloc,,3070,,1257346704923378671;
->xmalloc,,1257346704923385329;
->xstrdup,,1257346704923389705;
-<xstrdup,,3071,,1257346704923394583;
-<xmalloc,,3072,,1257346704923414092;
->xmalloc,,1257346704923420805;
->xstrdup,,1257346704923425187;
-<xstrdup,,3073,,1257346704923430059;
-<xmalloc,,3074,,1257346704923449763;
->xmalloc,,1257346704923515003;
->xstrdup,,1257346704923519860;
-<xstrdup,,3075,,1257346704923525036;
-<xmalloc,,3076,,1257346704923548019;
->xmalloc,,1257346704923554825;
->xstrdup,,1257346704923559234;
-<xstrdup,,3077,,1257346704923564136;
-<xmalloc,,3078,,1257346704923583756;
->xmalloc,,1257346704923590535;
->xstrdup,,1257346704923595016;
-<xstrdup,,3079,,1257346704923599933;
-<xmalloc,,3080,,1257346704923629398;
->xmalloc,,1257346704923636366;
->xstrdup,,1257346704923640883;
-<xstrdup,,3081,,1257346704923645854;
-<xmalloc,,3082,,1257346704923666452;
->xmalloc,,1257346704923673294;
->xstrdup,,1257346704923677703;
-<xstrdup,,3083,,1257346704923682629;
-<xmalloc,,3084,,1257346704923703158;
->xmalloc,,1257346704923709846;
->xstrdup,,1257346704923714237;
-<xstrdup,,3085,,1257346704923719320;
-<xmalloc,,3086,,1257346704923739364;
->xmalloc,,1257346704923746191;
->xstrdup,,1257346704923750591;
-<xstrdup,,3087,,1257346704923755496;
-<xmalloc,,3088,,1257346704923775700;
->xmalloc,,1257346704923782440;
->xstrdup,,1257346704923786861;
-<xstrdup,,3089,,1257346704923791739;
-<xmalloc,,3090,,1257346704923811621;
->xmalloc,,1257346704923818384;
->xstrdup,,1257346704923822893;
-<xstrdup,,3091,,1257346704923827792;
-<xmalloc,,3092,,1257346704923848143;
->xmalloc,,1257346704923854925;
->xstrdup,,1257346704923859412;
-<xstrdup,,3093,,1257346704923864290;
-<xmalloc,,3094,,1257346704923884121;
->xmalloc,,1257346704923890851;
->xstrdup,,1257346704923895348;
-<xstrdup,,3095,,1257346704923900217;
-<xmalloc,,3096,,1257346704923919858;
->xmalloc,,1257346704923926616;
->xstrdup,,1257346704923931091;
-<xstrdup,,3097,,1257346704923935981;
-<xmalloc,,3098,,1257346704923955719;
->xmalloc,,1257346704923962555;
->xstrdup,,1257346704923966961;
-<xstrdup,,3099,,1257346704923971869;
-<xmalloc,,3100,,1257346704923991570;
->xmalloc,,1257346704923998319;
->xstrdup,,1257346704924002722;
-<xstrdup,,3101,,1257346704924007591;
-<xmalloc,,3102,,1257346704924027647;
->xmalloc,,1257346704924034522;
->xstrdup,,1257346704924039033;
-<xstrdup,,3103,,1257346704924043945;
-<xmalloc,,3104,,1257346704924063767;
->xmalloc,,1257346704924070506;
->xstrdup,,1257346704924074915;
-<xstrdup,,3105,,1257346704924079802;
-<xmalloc,,3106,,1257346704924100463;
->xmalloc,,1257346704924107242;
->xstrdup,,1257346704924111663;
-<xstrdup,,3107,,1257346704924116517;
-<xmalloc,,3108,,1257346704924136089;
->xmalloc,,1257346704924142706;
->xstrdup,,1257346704924147084;
-<xstrdup,,3109,,1257346704924151914;
-<xmalloc,,3110,,1257346704924171685;
->xmalloc,,1257346704924178389;
->xstrdup,,1257346704924182909;
-<xstrdup,,3111,,1257346704924187769;
-<xmalloc,,3112,,1257346704924208195;
->xmalloc,,1257346704924214815;
->xstrdup,,1257346704924219245;
-<xstrdup,,3113,,1257346704924224087;
-<xmalloc,,3114,,1257346704924245764;
->xmalloc,,1257346704924252555;
->xstrdup,,1257346704924256946;
-<xstrdup,,3115,,1257346704924261878;
-<xmalloc,,3116,,1257346704924282241;
->xmalloc,,1257346704924289023;
->xstrdup,,1257346704924293405;
-<xstrdup,,3117,,1257346704924298337;
-<xmalloc,,3118,,1257346704924318535;
->xmalloc,,1257346704924325296;
->xstrdup,,1257346704924329677;
-<xstrdup,,3119,,1257346704924334559;
-<xmalloc,,3120,,1257346704924354095;
->xmalloc,,1257346704924360735;
->xstrdup,,1257346704924365117;
-<xstrdup,,3121,,1257346704924370085;
-<xmalloc,,3122,,1257346704924389952;
->xmalloc,,1257346704924396698;
->xstrdup,,1257346704924401182;
-<xstrdup,,3123,,1257346704924406030;
-<xmalloc,,3124,,1257346704924425642;
->xmalloc,,1257346704924432336;
->xstrdup,,1257346704924436811;
-<xstrdup,,3125,,1257346704924441677;
-<xmalloc,,3126,,1257346704924461325;
->xmalloc,,1257346704924467971;
->xstrdup,,1257346704924472434;
-<xstrdup,,3127,,1257346704924477303;
-<xmalloc,,3128,,1257346704924497588;
->xmalloc,,1257346704924504364;
->xstrdup,,1257346704924508857;
-<xstrdup,,3129,,1257346704924513756;
-<xmalloc,,3130,,1257346704924533617;
->xmalloc,,1257346704924540255;
->xstrdup,,1257346704924544694;
-<xstrdup,,3131,,1257346704924549556;
-<xmalloc,,3132,,1257346704924569324;
->xmalloc,,1257346704924576091;
->xstrdup,,1257346704924580491;
-<xstrdup,,3133,,1257346704924585336;
-<xmalloc,,3134,,1257346704924610156;
->xmalloc,,1257346704924617678;
->xstrdup,,1257346704924622138;
-<xstrdup,,3135,,1257346704924627157;
-<xmalloc,,3136,,1257346704924647184;
->xmalloc,,1257346704924653900;
->xstrdup,,1257346704924658393;
-<xstrdup,,3137,,1257346704924663295;
-<xmalloc,,3138,,1257346704924683327;
->xmalloc,,1257346704924690130;
->xstrdup,,1257346704924694533;
-<xstrdup,,3139,,1257346704924699426;
-<xmalloc,,3140,,1257346704924719927;
->xmalloc,,1257346704924726748;
->xstrdup,,1257346704924731233;
-<xstrdup,,3141,,1257346704924736123;
-<xmalloc,,3142,,1257346704924756405;
->xmalloc,,1257346704924763144;
->xstrdup,,1257346704924767689;
-<xstrdup,,3143,,1257346704924772585;
-<xmalloc,,3144,,1257346704924792789;
->xmalloc,,1257346704924799564;
->xstrdup,,1257346704924804048;
-<xstrdup,,3145,,1257346704924808908;
-<xmalloc,,3146,,1257346704924829181;
->xmalloc,,1257346704924836090;
->xstrdup,,1257346704924840474;
-<xstrdup,,3147,,1257346704924845439;
-<xmalloc,,3148,,1257346704924865469;
->xmalloc,,1257346704924872281;
->xstrdup,,1257346704924876672;
-<xstrdup,,3149,,1257346704924881535;
-<xmalloc,,3150,,1257346704924901384;
->xmalloc,,1257346704924908129;
->xstrdup,,1257346704924912568;
-<xstrdup,,3151,,1257346704924917455;
-<xmalloc,,3152,,1257346704924937701;
->xmalloc,,1257346704924944423;
->xstrdup,,1257346704924948814;
-<xstrdup,,3153,,1257346704924953776;
-<xmalloc,,3154,,1257346704924973818;
->xmalloc,,1257346704924980557;
->xstrdup,,1257346704924985035;
-<xstrdup,,3155,,1257346704924989913;
-<xmalloc,,3156,,1257346704925009416;
->xmalloc,,1257346704925016198;
->xstrdup,,1257346704925020676;
-<xstrdup,,3157,,1257346704925025558;
-<xmalloc,,3158,,1257346704925045250;
->xmalloc,,1257346704925051978;
->xstrdup,,1257346704925056462;
-<xstrdup,,3159,,1257346704925061343;
-<xmalloc,,3160,,1257346704925080882;
->xmalloc,,1257346704925087646;
->xstrdup,,1257346704925092127;
-<xstrdup,,3161,,1257346704925097002;
-<xmalloc,,3162,,1257346704925118039;
->xmalloc,,1257346704925124884;
->xstrdup,,1257346704925129275;
-<vec_p_reserve,,3163,,1257346704925141608;
-<vec_o_reserve,,3164,,1257346704925150330;
-<xrealloc,,3165,,1257346704925172266;
->xrealloc,,1257346704925181935;
->vec_o_reserve,,1257346704925186852;
->vec_p_reserve,,1257346704925191420;
-<xstrdup,,3166,,1257346704925196325;
-<xmalloc,,3167,,1257346704925219660;
->xmalloc,,1257346704925226556;
->xstrdup,,1257346704925231004;
-<xstrdup,,3168,,1257346704925235858;
-<xmalloc,,3169,,1257346704925255945;
->xmalloc,,1257346704925262654;
->xstrdup,,1257346704925267117;
-<xstrdup,,3170,,1257346704925271989;
-<xmalloc,,3171,,1257346704925291988;
->xmalloc,,1257346704925298773;
->xstrdup,,1257346704925303161;
-<xstrdup,,3172,,1257346704925308042;
-<xmalloc,,3173,,1257346704925327789;
->xmalloc,,1257346704925334396;
->xstrdup,,1257346704925338733;
-<xstrdup,,3174,,1257346704925343548;
-<xmalloc,,3175,,1257346704925363331;
->xmalloc,,1257346704925370019;
->xstrdup,,1257346704925374404;
-<xstrdup,,3176,,1257346704925379285;
-<xmalloc,,3177,,1257346704925399402;
->xmalloc,,1257346704925406162;
->xstrdup,,1257346704925410559;
-<xstrdup,,3178,,1257346704925415467;
-<xmalloc,,3179,,1257346704925435575;
->xmalloc,,1257346704925442426;
->xstrdup,,1257346704925446814;
-<xstrdup,,3180,,1257346704925451686;
-<xmalloc,,3181,,1257346704925471643;
->xmalloc,,1257346704925478440;
->xstrdup,,1257346704925482828;
-<xstrdup,,3182,,1257346704925487691;
-<xmalloc,,3183,,1257346704925507769;
->xmalloc,,1257346704925514505;
->xstrdup,,1257346704925518971;
-<xstrdup,,3184,,1257346704925523798;
-<xmalloc,,3185,,1257346704925543265;
->xmalloc,,1257346704925549942;
->xstrdup,,1257346704925554408;
-<xstrdup,,3186,,1257346704925559334;
-<xmalloc,,3187,,1257346704925578828;
->xmalloc,,1257346704925585586;
->xstrdup,,1257346704925589926;
-<xstrdup,,3188,,1257346704925594834;
-<xmalloc,,3189,,1257346704925627806;
->xmalloc,,1257346704925635237;
->xstrdup,,1257346704925639712;
-<xstrdup,,3190,,1257346704925644639;
-<xmalloc,,3191,,1257346704925664909;
->xmalloc,,1257346704925671685;
->xstrdup,,1257346704925676093;
-<xstrdup,,3192,,1257346704925681032;
-<xmalloc,,3193,,1257346704925700865;
->xmalloc,,1257346704925707596;
->xstrdup,,1257346704925712026;
-<xstrdup,,3194,,1257346704925717039;
-<xmalloc,,3195,,1257346704925736534;
->xmalloc,,1257346704925743285;
->xstrdup,,1257346704925747661;
-<xstrdup,,3196,,1257346704925752512;
-<xmalloc,,3197,,1257346704925772454;
->xmalloc,,1257346704925779128;
->xstrdup,,1257346704925783621;
-<xstrdup,,3198,,1257346704925788472;
-<xmalloc,,3199,,1257346704925808547;
->xmalloc,,1257346704925815229;
->xstrdup,,1257346704925819659;
-<xstrdup,,3200,,1257346704925824531;
-<xmalloc,,3201,,1257346704925844687;
->xmalloc,,1257346704925851336;
->xstrdup,,1257346704925855751;
-<xstrdup,,3202,,1257346704925860620;
-<xmalloc,,3203,,1257346704925880216;
->xmalloc,,1257346704925887007;
->xstrdup,,1257346704925891392;
-<xstrdup,,3204,,1257346704925896402;
-<xmalloc,,3205,,1257346704925915836;
->xmalloc,,1257346704925922462;
->xstrdup,,1257346704925926787;
-<xstrdup,,3206,,1257346704925931619;
-<xmalloc,,3207,,1257346704925951339;
->xmalloc,,1257346704925958037;
->xstrdup,,1257346704925962419;
-<xstrdup,,3208,,1257346704925967285;
-<xmalloc,,3209,,1257346704925986809;
->xmalloc,,1257346704925993582;
->xstrdup,,1257346704925997981;
-<xstrdup,,3210,,1257346704926002787;
-<xmalloc,,3211,,1257346704926022696;
->xmalloc,,1257346704926029394;
->xstrdup,,1257346704926033731;
-<xstrdup,,3212,,1257346704926038606;
-<xmalloc,,3213,,1257346704926058828;
->xmalloc,,1257346704926065543;
->xstrdup,,1257346704926069922;
-<xstrdup,,3214,,1257346704926074770;
-<xmalloc,,3215,,1257346704926094899;
->xmalloc,,1257346704926101593;
->xstrdup,,1257346704926106002;
-<xstrdup,,3216,,1257346704926110838;
-<xmalloc,,3217,,1257346704926130453;
->xmalloc,,1257346704926137084;
->xstrdup,,1257346704926141628;
-<xstrdup,,3218,,1257346704926146618;
-<xmalloc,,3219,,1257346704926166340;
->xmalloc,,1257346704926173092;
->xstrdup,,1257346704926177462;
-<xstrdup,,3220,,1257346704926182409;
-<xmalloc,,3221,,1257346704926202177;
->xmalloc,,1257346704926208904;
->xstrdup,,1257346704926213322;
-<xstrdup,,3222,,1257346704926218164;
-<xmalloc,,3223,,1257346704926238068;
->xmalloc,,1257346704926244777;
->xstrdup,,1257346704926249150;
-<xstrdup,,3224,,1257346704926254067;
-<xmalloc,,3225,,1257346704926274015;
->xmalloc,,1257346704926280758;
->xstrdup,,1257346704926285143;
-<xstrdup,,3226,,1257346704926290021;
-<xmalloc,,3227,,1257346704926310892;
->xmalloc,,1257346704926317584;
->xstrdup,,1257346704926321930;
-<xstrdup,,3228,,1257346704926326823;
-<xmalloc,,3229,,1257346704926347150;
->xmalloc,,1257346704926353878;
->xstrdup,,1257346704926358359;
-<xstrdup,,3230,,1257346704926363191;
-<xmalloc,,3231,,1257346704926383004;
->xmalloc,,1257346704926389729;
->xstrdup,,1257346704926394198;
-<xstrdup,,3232,,1257346704926399049;
-<xmalloc,,3233,,1257346704926418724;
->xmalloc,,1257346704926425466;
->xstrdup,,1257346704926429998;
-<xstrdup,,3234,,1257346704926434810;
-<xmalloc,,3235,,1257346704926454332;
->xmalloc,,1257346704926461189;
->xstrdup,,1257346704926465549;
-<xstrdup,,3236,,1257346704926470488;
-<xmalloc,,3237,,1257346704926490243;
->xmalloc,,1257346704926497118;
->xstrdup,,1257346704926501521;
-<xstrdup,,3238,,1257346704926506517;
-<xmalloc,,3239,,1257346704926526122;
->xmalloc,,1257346704926532955;
->xstrdup,,1257346704926537349;
-<xstrdup,,3240,,1257346704926542230;
-<xmalloc,,3241,,1257346704926561940;
->xmalloc,,1257346704926568737;
->xstrdup,,1257346704926573089;
-<xstrdup,,3242,,1257346704926577958;
-<xmalloc,,3243,,1257346704926597699;
->xmalloc,,1257346704926612697;
->xstrdup,,1257346704926617353;
-<xstrdup,,3244,,1257346704926622303;
-<xmalloc,,3245,,1257346704926643145;
->xmalloc,,1257346704926649842;
->xstrdup,,1257346704926654341;
-<xstrdup,,3246,,1257346704926659159;
-<xmalloc,,3247,,1257346704926679065;
->xmalloc,,1257346704926685793;
->xstrdup,,1257346704926690187;
-<xstrdup,,3248,,1257346704926695053;
-<xmalloc,,3249,,1257346704926715205;
->xmalloc,,1257346704926721855;
->xstrdup,,1257346704926726333;
-<xstrdup,,3250,,1257346704926731160;
-<xmalloc,,3251,,1257346704926751671;
->xmalloc,,1257346704926758431;
->xstrdup,,1257346704926762909;
-<xstrdup,,3252,,1257346704926767871;
-<xmalloc,,3253,,1257346704926787459;
->xmalloc,,1257346704926794253;
->xstrdup,,1257346704926798625;
-<xstrdup,,3254,,1257346704926803624;
-<xmalloc,,3255,,1257346704926823187;
->xmalloc,,1257346704926830020;
->xstrdup,,1257346704926834408;
-<xstrdup,,3256,,1257346704926839268;
-<xmalloc,,3257,,1257346704926858870;
->xmalloc,,1257346704926865472;
->xstrdup,,1257346704926869845;
-<xstrdup,,3258,,1257346704926874701;
-<xmalloc,,3259,,1257346704926894824;
->xmalloc,,1257346704926901453;
->xstrdup,,1257346704926905888;
-<xstrdup,,3260,,1257346704926910706;
-<xmalloc,,3261,,1257346704926930462;
->xmalloc,,1257346704926937079;
->xstrdup,,1257346704926941668;
-<xstrdup,,3262,,1257346704926946531;
-<xmalloc,,3263,,1257346704926966717;
->xmalloc,,1257346704926973387;
->xstrdup,,1257346704926977862;
-<xstrdup,,3264,,1257346704926982686;
-<xmalloc,,3265,,1257346704927002791;
->xmalloc,,1257346704927009383;
->xstrdup,,1257346704927013876;
-<xstrdup,,3266,,1257346704927018694;
-<xmalloc,,3267,,1257346704927039271;
->xmalloc,,1257346704927046035;
->xstrdup,,1257346704927050417;
-<xstrdup,,3268,,1257346704927055337;
-<xmalloc,,3269,,1257346704927074939;
->xmalloc,,1257346704927081718;
->xstrdup,,1257346704927086091;
-<xstrdup,,3270,,1257346704927090903;
-<xmalloc,,3271,,1257346704927110343;
->xmalloc,,1257346704927117073;
->xstrdup,,1257346704927121449;
-<xstrdup,,3272,,1257346704927126312;
-<xmalloc,,3273,,1257346704927146591;
->xmalloc,,1257346704927153316;
->xstrdup,,1257346704927157716;
-<xstrdup,,3274,,1257346704927162552;
-<xmalloc,,3275,,1257346704927182389;
->xmalloc,,1257346704927189284;
->xstrdup,,1257346704927193721;
-<xstrdup,,3276,,1257346704927198613;
-<xmalloc,,3277,,1257346704927218381;
->xmalloc,,1257346704927225028;
->xstrdup,,1257346704927229377;
-<xstrdup,,3278,,1257346704927234321;
-<xmalloc,,3279,,1257346704927254221;
->xmalloc,,1257346704927260961;
->xstrdup,,1257346704927265382;
-<xstrdup,,3280,,1257346704927270335;
-<xmalloc,,3281,,1257346704927289799;
->xmalloc,,1257346704927296358;
->xstrdup,,1257346704927300860;
-<xstrdup,,3282,,1257346704927305789;
-<xmalloc,,3283,,1257346704927325506;
->xmalloc,,1257346704927332282;
->xstrdup,,1257346704927336718;
-<xstrdup,,3284,,1257346704927341638;
-<xmalloc,,3285,,1257346704927361343;
->xmalloc,,1257346704927368085;
->xstrdup,,1257346704927372488;
-<xstrdup,,3286,,1257346704927377525;
-<xmalloc,,3287,,1257346704927397200;
->xmalloc,,1257346704927403907;
->xstrdup,,1257346704927408343;
-<xstrdup,,3288,,1257346704927413221;
-<xmalloc,,3289,,1257346704927432877;
->xmalloc,,1257346704927439484;
->xstrdup,,1257346704927443914;
-<xstrdup,,3290,,1257346704927448961;
-<xmalloc,,3291,,1257346704927468837;
->xmalloc,,1257346704927475580;
->xstrdup,,1257346704927479964;
-<xstrdup,,3292,,1257346704927484854;
-<xmalloc,,3293,,1257346704927504610;
->xmalloc,,1257346704927511236;
->xstrdup,,1257346704927515675;
-<xstrdup,,3294,,1257346704927520709;
-<xmalloc,,3295,,1257346704927540257;
->xmalloc,,1257346704927546979;
->xstrdup,,1257346704927551454;
-<xstrdup,,3296,,1257346704927556329;
-<xmalloc,,3297,,1257346704927575895;
->xmalloc,,1257346704927582590;
->xstrdup,,1257346704927587056;
-<xstrdup,,3298,,1257346704927591967;
-<xmalloc,,3299,,1257346704927616196;
->xmalloc,,1257346704927623483;
->xstrdup,,1257346704927627949;
-<xstrdup,,3300,,1257346704927632902;
-<xmalloc,,3301,,1257346704927653037;
->xmalloc,,1257346704927659852;
->xstrdup,,1257346704927664245;
-<xstrdup,,3302,,1257346704927669150;
-<xmalloc,,3303,,1257346704927689703;
->xmalloc,,1257346704927696356;
->xstrdup,,1257346704927700743;
-<xstrdup,,3304,,1257346704927705643;
-<xmalloc,,3305,,1257346704927725140;
->xmalloc,,1257346704927731982;
->xstrdup,,1257346704927736375;
-<xstrdup,,3306,,1257346704927741482;
-<xmalloc,,3307,,1257346704927762489;
->xmalloc,,1257346704927769126;
->xstrdup,,1257346704927773511;
-<xstrdup,,3308,,1257346704927778389;
-<xmalloc,,3309,,1257346704927797925;
->xmalloc,,1257346704927804533;
->xstrdup,,1257346704927808987;
-<xstrdup,,3310,,1257346704927813940;
-<xmalloc,,3311,,1257346704927833543;
->xmalloc,,1257346704927840138;
->xstrdup,,1257346704927844589;
-<xstrdup,,3312,,1257346704927849455;
-<xmalloc,,3313,,1257346704927868982;
->xmalloc,,1257346704927875631;
->xstrdup,,1257346704927880098;
-<xstrdup,,3314,,1257346704927885036;
-<xmalloc,,3315,,1257346704927905492;
->xmalloc,,1257346704927912223;
->xstrdup,,1257346704927916596;
-<xstrdup,,3316,,1257346704927921513;
-<xmalloc,,3317,,1257346704927941680;
->xmalloc,,1257346704927948333;
->xstrdup,,1257346704927952700;
-<xstrdup,,3318,,1257346704927957653;
-<xmalloc,,3319,,1257346704927977499;
->xmalloc,,1257346704927984175;
->xstrdup,,1257346704927988566;
-<xstrdup,,3320,,1257346704927993462;
-<xmalloc,,3321,,1257346704928013495;
->xmalloc,,1257346704928020196;
->xstrdup,,1257346704928024577;
-<xstrdup,,3322,,1257346704928029501;
-<xmalloc,,3323,,1257346704928049473;
->xmalloc,,1257346704928056134;
->xstrdup,,1257346704928060552;
-<xstrdup,,3324,,1257346704928065502;
-<xmalloc,,3325,,1257346704928085069;
->xmalloc,,1257346704928091772;
->xstrdup,,1257346704928096256;
-<xstrdup,,3326,,1257346704928101164;
-<xmalloc,,3327,,1257346704928121197;
->xmalloc,,1257346704928127940;
->xstrdup,,1257346704928132406;
-<xstrdup,,3328,,1257346704928137335;
-<xmalloc,,3329,,1257346704928157199;
->xmalloc,,1257346704928163887;
->xstrdup,,1257346704928168320;
-<xstrdup,,3330,,1257346704928173216;
-<xmalloc,,3331,,1257346704928192801;
->xmalloc,,1257346704928199649;
->xstrdup,,1257346704928204024;
-<xstrdup,,3332,,1257346704928208906;
-<xmalloc,,3333,,1257346704928228944;
->xmalloc,,1257346704928235621;
->xstrdup,,1257346704928240041;
-<xstrdup,,3334,,1257346704928245010;
-<xmalloc,,3335,,1257346704928264853;
->xmalloc,,1257346704928271565;
->xstrdup,,1257346704928276031;
-<xstrdup,,3336,,1257346704928280936;
-<xmalloc,,3337,,1257346704928300530;
->xmalloc,,1257346704928307233;
->xstrdup,,1257346704928311630;
-<xstrdup,,3338,,1257346704928316562;
-<xmalloc,,3339,,1257346704928336806;
->xmalloc,,1257346704928343491;
->xstrdup,,1257346704928347876;
-<xstrdup,,3340,,1257346704928352802;
-<xmalloc,,3341,,1257346704928372799;
->xmalloc,,1257346704928379424;
->xstrdup,,1257346704928383790;
-<xstrdup,,3342,,1257346704928388756;
-<xmalloc,,3343,,1257346704928409255;
->xmalloc,,1257346704928415907;
->xstrdup,,1257346704928420358;
-<xstrdup,,3344,,1257346704928425218;
-<xmalloc,,3345,,1257346704928444953;
->xmalloc,,1257346704928451671;
->xstrdup,,1257346704928456146;
-<xstrdup,,3346,,1257346704928461184;
-<xmalloc,,3347,,1257346704928480898;
->xmalloc,,1257346704928487625;
->xstrdup,,1257346704928491992;
-<xstrdup,,3348,,1257346704928496864;
-<xmalloc,,3349,,1257346704928516487;
->xmalloc,,1257346704928523125;
->xstrdup,,1257346704928527495;
-<xstrdup,,3350,,1257346704928532469;
-<xmalloc,,3351,,1257346704928552228;
->xmalloc,,1257346704928558973;
->xstrdup,,1257346704928563334;
-<xstrdup,,3352,,1257346704928568236;
-<xmalloc,,3353,,1257346704928587848;
->xmalloc,,1257346704928594515;
->xstrdup,,1257346704928598882;
-<xstrdup,,3354,,1257346704928608569;
-<xmalloc,,3355,,1257346704928630508;
->xmalloc,,1257346704928637344;
->xstrdup,,1257346704928641849;
-<xstrdup,,3356,,1257346704928646754;
-<xmalloc,,3357,,1257346704928666434;
->xmalloc,,1257346704928673141;
->xstrdup,,1257346704928677619;
-<xstrdup,,3358,,1257346704928682536;
-<xmalloc,,3359,,1257346704928702130;
->xmalloc,,1257346704928708815;
->xstrdup,,1257346704928713287;
-<xstrdup,,3360,,1257346704928718198;
-<xmalloc,,3361,,1257346704928737572;
->xmalloc,,1257346704928744252;
->xstrdup,,1257346704928748775;
-<xstrdup,,3362,,1257346704928753713;
-<xmalloc,,3363,,1257346704928773072;
->xmalloc,,1257346704928779920;
->xstrdup,,1257346704928784295;
-<xstrdup,,3364,,1257346704928789303;
-<xmalloc,,3365,,1257346704928808758;
->xmalloc,,1257346704928815482;
->xstrdup,,1257346704928819819;
-<xstrdup,,3366,,1257346704928824703;
-<xmalloc,,3367,,1257346704928844411;
->xmalloc,,1257346704928851114;
->xstrdup,,1257346704928855496;
-<xstrdup,,3368,,1257346704928864248;
-<xmalloc,,3369,,1257346704928886551;
->xmalloc,,1257346704928893516;
->xstrdup,,1257346704928897946;
-<xstrdup,,3370,,1257346704928902954;
-<xmalloc,,3371,,1257346704928922833;
->xmalloc,,1257346704928929524;
->xstrdup,,1257346704928933945;
-<xstrdup,,3372,,1257346704928938865;
-<xmalloc,,3373,,1257346704928958594;
->xmalloc,,1257346704928965394;
->xstrdup,,1257346704928969803;
-<xstrdup,,3374,,1257346704928974777;
-<xmalloc,,3375,,1257346704928994542;
->xmalloc,,1257346704929001273;
->xstrdup,,1257346704929005744;
-<xstrdup,,3376,,1257346704929010634;
-<xmalloc,,3377,,1257346704929030327;
->xmalloc,,1257346704929037106;
->xstrdup,,1257346704929041542;
-<xstrdup,,3378,,1257346704929046489;
-<xmalloc,,3379,,1257346704929066955;
->xmalloc,,1257346704929073742;
->xstrdup,,1257346704929078133;
-<xstrdup,,3380,,1257346704929083053;
-<xmalloc,,3381,,1257346704929103528;
->xmalloc,,1257346704929110292;
->xstrdup,,1257346704929114692;
-<xstrdup,,3382,,1257346704929119591;
-<xmalloc,,3383,,1257346704929139181;
->xmalloc,,1257346704929145891;
->xstrdup,,1257346704929150291;
-<xstrdup,,3384,,1257346704929155223;
-<xmalloc,,3385,,1257346704929175102;
->xmalloc,,1257346704929181781;
->xstrdup,,1257346704929186190;
-<xstrdup,,3386,,1257346704929191198;
-<xmalloc,,3387,,1257346704929210929;
->xmalloc,,1257346704929217690;
->xstrdup,,1257346704929222126;
-<xstrdup,,3388,,1257346704929226974;
-<xmalloc,,3389,,1257346704929246760;
->xmalloc,,1257346704929253430;
->xstrdup,,1257346704929257911;
-<xstrdup,,3390,,1257346704929262901;
-<xmalloc,,3391,,1257346704929282563;
->xmalloc,,1257346704929289213;
->xstrdup,,1257346704929293673;
-<xstrdup,,3392,,1257346704929298593;
-<xmalloc,,3393,,1257346704929318520;
->xmalloc,,1257346704929325191;
->xstrdup,,1257346704929329648;
-<xstrdup,,3394,,1257346704929334595;
-<xmalloc,,3395,,1257346704929354212;
->xmalloc,,1257346704929360946;
->xstrdup,,1257346704929365319;
-<xstrdup,,3396,,1257346704929370215;
-<xmalloc,,3397,,1257346704929389504;
->xmalloc,,1257346704929396226;
->xstrdup,,1257346704929400602;
-<xstrdup,,3398,,1257346704929405495;
-<xmalloc,,3399,,1257346704929424992;
->xmalloc,,1257346704929431632;
->xstrdup,,1257346704929436005;
-<xstrdup,,3400,,1257346704929440931;
-<xmalloc,,3401,,1257346704929460438;
->xmalloc,,1257346704929467072;
->xstrdup,,1257346704929471436;
-<xstrdup,,3402,,1257346704929476323;
-<xmalloc,,3403,,1257346704929496509;
->xmalloc,,1257346704929503323;
->xstrdup,,1257346704929507714;
-<xstrdup,,3404,,1257346704929512622;
-<xmalloc,,3405,,1257346704929532541;
->xmalloc,,1257346704929539169;
->xstrdup,,1257346704929543536;
-<xstrdup,,3406,,1257346704929548423;
-<xmalloc,,3407,,1257346704929568377;
->xmalloc,,1257346704929575099;
->xstrdup,,1257346704929579508;
-<xstrdup,,3408,,1257346704929584383;
-<xmalloc,,3409,,1257346704929608895;
->xmalloc,,1257346704929616104;
->xstrdup,,1257346704929620564;
-<xstrdup,,3410,,1257346704929625517;
-<xmalloc,,3411,,1257346704929645781;
->xmalloc,,1257346704929652644;
->xstrdup,,1257346704929657050;
-<xstrdup,,3412,,1257346704929661970;
-<xmalloc,,3413,,1257346704929682099;
->xmalloc,,1257346704929688781;
->xstrdup,,1257346704929693184;
-<xstrdup,,3414,,1257346704929698095;
-<xmalloc,,3415,,1257346704929718043;
->xmalloc,,1257346704929724711;
->xstrdup,,1257346704929729105;
-<xstrdup,,3416,,1257346704929734154;
-<xmalloc,,3417,,1257346704929754605;
->xmalloc,,1257346704929761423;
->xstrdup,,1257346704929765841;
-<xstrdup,,3418,,1257346704929770860;
-<xmalloc,,3419,,1257346704929791067;
->xmalloc,,1257346704929797861;
->xstrdup,,1257346704929802257;
-<xstrdup,,3420,,1257346704929807175;
-<xmalloc,,3421,,1257346704929826852;
->xmalloc,,1257346704929833562;
->xstrdup,,1257346704929838073;
-<xstrdup,,3422,,1257346704929842990;
-<xmalloc,,3423,,1257346704929862695;
->xmalloc,,1257346704929869383;
->xstrdup,,1257346704929873876;
-<xstrdup,,3424,,1257346704929878746;
-<xmalloc,,3425,,1257346704929898339;
->xmalloc,,1257346704929905055;
->xstrdup,,1257346704929909544;
-<xstrdup,,3426,,1257346704929914483;
-<xmalloc,,3427,,1257346704929934359;
->xmalloc,,1257346704929941122;
->xstrdup,,1257346704929945573;
-<xstrdup,,3428,,1257346704929950512;
-<xmalloc,,3429,,1257346704929970520;
->xmalloc,,1257346704929977236;
->xstrdup,,1257346704929981642;
-<xstrdup,,3430,,1257346704929986589;
-<xmalloc,,3431,,1257346704930006670;
->xmalloc,,1257346704930013475;
->xstrdup,,1257346704930017896;
-<xstrdup,,3432,,1257346704930022819;
-<xmalloc,,3433,,1257346704930042467;
->xmalloc,,1257346704930049197;
->xstrdup,,1257346704930053588;
-<xstrdup,,3434,,1257346704930058524;
-<xmalloc,,3435,,1257346704930077991;
->xmalloc,,1257346704930084899;
->xstrdup,,1257346704930089413;
-<vec_p_reserve,,3436,,1257346704930102089;
-<vec_o_reserve,,3437,,1257346704930110979;
-<xrealloc,,3438,,1257346704930133393;
->xrealloc,,1257346704930142716;
->vec_o_reserve,,1257346704930147462;
->vec_p_reserve,,1257346704930151994;
-<xstrdup,,3439,,1257346704930156969;
-<xmalloc,,3440,,1257346704930179768;
->xmalloc,,1257346704930186673;
->xstrdup,,1257346704930191100;
-<xstrdup,,3441,,1257346704930196002;
-<xmalloc,,3442,,1257346704930215596;
->xmalloc,,1257346704930222329;
->xstrdup,,1257346704930226735;
-<xstrdup,,3443,,1257346704930231616;
-<xmalloc,,3444,,1257346704930251925;
->xmalloc,,1257346704930258626;
->xstrdup,,1257346704930263029;
-<xstrdup,,3445,,1257346704930267865;
-<xmalloc,,3446,,1257346704930288005;
->xmalloc,,1257346704930294748;
->xstrdup,,1257346704930299145;
-<xstrdup,,3447,,1257346704930304029;
-<xmalloc,,3448,,1257346704930323905;
->xmalloc,,1257346704930330602;
->xstrdup,,1257346704930335084;
-<xstrdup,,3449,,1257346704930339974;
-<xmalloc,,3450,,1257346704930359898;
->xmalloc,,1257346704930366704;
->xstrdup,,1257346704930371182;
-<xstrdup,,3451,,1257346704930376114;
-<xmalloc,,3452,,1257346704930395972;
->xmalloc,,1257346704930402769;
->xstrdup,,1257346704930407172;
-<xstrdup,,3453,,1257346704930412068;
-<xmalloc,,3454,,1257346704930432359;
->xmalloc,,1257346704930439144;
->xstrdup,,1257346704930443531;
-<xstrdup,,3455,,1257346704930448385;
-<xmalloc,,3456,,1257346704930468487;
->xmalloc,,1257346704930475179;
->xstrdup,,1257346704930479566;
-<xstrdup,,3457,,1257346704930484541;
-<xmalloc,,3458,,1257346704930504751;
->xmalloc,,1257346704930511382;
->xstrdup,,1257346704930515836;
-<xstrdup,,3459,,1257346704930520792;
-<xmalloc,,3460,,1257346704930540392;
->xmalloc,,1257346704930547050;
->xstrdup,,1257346704930551525;
-<xstrdup,,3461,,1257346704930556668;
-<xmalloc,,3462,,1257346704930576559;
->xmalloc,,1257346704930583220;
->xstrdup,,1257346704930587777;
-<xstrdup,,3463,,1257346704930592652;
-<xmalloc,,3464,,1257346704930617314;
->xmalloc,,1257346704930624481;
->xstrdup,,1257346704930629007;
-<xstrdup,,3465,,1257346704930633960;
-<xmalloc,,3466,,1257346704930653842;
->xmalloc,,1257346704930660597;
->xstrdup,,1257346704930665078;
-<xstrdup,,3467,,1257346704930669980;
-<xmalloc,,3468,,1257346704930690082;
->xmalloc,,1257346704930696936;
->xstrdup,,1257346704930701339;
-<xstrdup,,3469,,1257346704930706232;
-<xmalloc,,3470,,1257346704930726093;
->xmalloc,,1257346704930732851;
->xstrdup,,1257346704930737244;
-<xstrdup,,3471,,1257346704930742116;
-<xmalloc,,3472,,1257346704930762104;
->xmalloc,,1257346704930768937;
->xstrdup,,1257346704930773316;
-<xstrdup,,3473,,1257346704930778167;
-<xmalloc,,3474,,1257346704930797934;
->xmalloc,,1257346704930804677;
->xstrdup,,1257346704930809083;
-<xstrdup,,3475,,1257346704930813985;
-<xmalloc,,3476,,1257346704930833789;
->xmalloc,,1257346704930840495;
->xstrdup,,1257346704930844946;
-<xstrdup,,3477,,1257346704930849819;
-<xmalloc,,3478,,1257346704930870260;
->xmalloc,,1257346704930877006;
->xstrdup,,1257346704930881418;
-<xstrdup,,3479,,1257346704930886293;
-<xmalloc,,3480,,1257346704930906851;
->xmalloc,,1257346704930913624;
->xstrdup,,1257346704930918102;
-<xstrdup,,3481,,1257346704930922965;
-<xmalloc,,3482,,1257346704930944210;
->xmalloc,,1257346704930951082;
->xstrdup,,1257346704930955557;
-<xstrdup,,3483,,1257346704930960423;
-<xmalloc,,3484,,1257346704930980918;
->xmalloc,,1257346704930987661;
->xstrdup,,1257346704930992028;
-<xstrdup,,3485,,1257346704930996852;
-<xmalloc,,3486,,1257346704931016767;
->xmalloc,,1257346704931023489;
->xstrdup,,1257346704931027864;
-<xstrdup,,3487,,1257346704931032718;
-<xmalloc,,3488,,1257346704931052450;
->xmalloc,,1257346704931059079;
->xstrdup,,1257346704931063430;
-<xstrdup,,3489,,1257346704931068290;
-<xmalloc,,3490,,1257346704931088040;
->xmalloc,,1257346704931094768;
->xstrdup,,1257346704931099140;
-<xstrdup,,3491,,1257346704931104016;
-<xmalloc,,3492,,1257346704931123591;
->xmalloc,,1257346704931130294;
->xstrdup,,1257346704931134673;
-<xstrdup,,3493,,1257346704931139476;
-<xmalloc,,3494,,1257346704931159214;
->xmalloc,,1257346704931165860;
->xstrdup,,1257346704931170717;
-<xstrdup,,3495,,1257346704931175565;
-<xmalloc,,3496,,1257346704931195742;
->xmalloc,,1257346704931202413;
->xstrdup,,1257346704931206785;
-<xstrdup,,3497,,1257346704931211636;
-<xmalloc,,3498,,1257346704931231467;
->xmalloc,,1257346704931238165;
->xstrdup,,1257346704931242556;
-<xstrdup,,3499,,1257346704931247545;
-<xmalloc,,3500,,1257346704931267692;
->xmalloc,,1257346704931274422;
->xstrdup,,1257346704931278807;
-<xstrdup,,3501,,1257346704931283652;
-<xmalloc,,3502,,1257346704931303531;
->xmalloc,,1257346704931310259;
->xstrdup,,1257346704931314638;
-<xstrdup,,3503,,1257346704931319428;
-<xmalloc,,3504,,1257346704931339614;
->xmalloc,,1257346704931346321;
->xstrdup,,1257346704931350703;
-<xstrdup,,3505,,1257346704931355518;
-<xmalloc,,3506,,1257346704931375779;
->xmalloc,,1257346704931382479;
->xstrdup,,1257346704931386948;
-<xstrdup,,3507,,1257346704931391829;
-<xmalloc,,3508,,1257346704931412349;
->xmalloc,,1257346704931419056;
->xstrdup,,1257346704931423519;
-<xstrdup,,3509,,1257346704931428370;
-<xmalloc,,3510,,1257346704931448122;
->xmalloc,,1257346704931454868;
->xstrdup,,1257346704931459331;
-<xstrdup,,3511,,1257346704931464155;
-<xmalloc,,3512,,1257346704931484211;
->xmalloc,,1257346704931491020;
->xstrdup,,1257346704931495405;
-<xstrdup,,3513,,1257346704931500367;
-<xmalloc,,3514,,1257346704931520487;
->xmalloc,,1257346704931527323;
->xstrdup,,1257346704931531714;
-<xstrdup,,3515,,1257346704931536613;
-<xmalloc,,3516,,1257346704931556432;
->xmalloc,,1257346704931563154;
->xstrdup,,1257346704931567532;
-<xstrdup,,3517,,1257346704931572368;
-<xmalloc,,3518,,1257346704931592133;
->xmalloc,,1257346704931598822;
->xstrdup,,1257346704931607269;
-<xstrdup,,3519,,1257346704931612415;
-<xmalloc,,3520,,1257346704931633214;
->xmalloc,,1257346704931640086;
->xstrdup,,1257346704931644582;
-<xstrdup,,3521,,1257346704931649485;
-<xmalloc,,3522,,1257346704931669583;
->xmalloc,,1257346704931676362;
->xstrdup,,1257346704931680840;
-<xstrdup,,3523,,1257346704931685733;
-<xmalloc,,3524,,1257346704931706042;
->xmalloc,,1257346704931712827;
->xstrdup,,1257346704931717401;
-<xstrdup,,3525,,1257346704931722297;
-<xmalloc,,3526,,1257346704931742222;
->xmalloc,,1257346704931748952;
->xstrdup,,1257346704931753406;
-<xstrdup,,3527,,1257346704931758350;
-<xmalloc,,3528,,1257346704931778404;
->xmalloc,,1257346704931785237;
->xstrdup,,1257346704931789622;
-<xstrdup,,3529,,1257346704931794524;
-<xmalloc,,3530,,1257346704931815055;
->xmalloc,,1257346704931821831;
->xstrdup,,1257346704931826264;
-<xstrdup,,3531,,1257346704931831160;
-<xmalloc,,3532,,1257346704931852179;
->xmalloc,,1257346704931858865;
->xstrdup,,1257346704931863307;
-<xstrdup,,3533,,1257346704931868194;
-<xmalloc,,3534,,1257346704931888319;
->xmalloc,,1257346704931894951;
->xstrdup,,1257346704931899369;
-<xstrdup,,3535,,1257346704931904256;
-<xmalloc,,3536,,1257346704931924147;
->xmalloc,,1257346704931930838;
->xstrdup,,1257346704931935256;
-<xstrdup,,3537,,1257346704931940140;
-<xmalloc,,3538,,1257346704931960008;
->xmalloc,,1257346704931966663;
->xstrdup,,1257346704931971063;
-<xstrdup,,3539,,1257346704931975905;
-<xmalloc,,3540,,1257346704931996421;
->xmalloc,,1257346704932003134;
->xstrdup,,1257346704932007603;
-<xstrdup,,3541,,1257346704932012535;
-<xmalloc,,3542,,1257346704932033094;
->xmalloc,,1257346704932039867;
->xstrdup,,1257346704932044402;
-<xstrdup,,3543,,1257346704932049304;
-<xmalloc,,3544,,1257346704932070085;
->xmalloc,,1257346704932076939;
->xstrdup,,1257346704932081276;
-<xstrdup,,3545,,1257346704932086175;
-<xmalloc,,3546,,1257346704932106598;
->xmalloc,,1257346704932113311;
->xstrdup,,1257346704932117690;
-<xstrdup,,3547,,1257346704932122652;
-<xmalloc,,3548,,1257346704932143764;
->xmalloc,,1257346704932150477;
->xstrdup,,1257346704932154862;
-<xstrdup,,3549,,1257346704932159683;
-<xmalloc,,3550,,1257346704932179237;
->xmalloc,,1257346704932185922;
->xstrdup,,1257346704932190367;
-<xstrdup,,3551,,1257346704932195206;
-<xmalloc,,3552,,1257346704932215221;
->xmalloc,,1257346704932221894;
->xstrdup,,1257346704932226267;
-<xstrdup,,3553,,1257346704932231196;
-<xmalloc,,3554,,1257346704932251361;
->xmalloc,,1257346704932258080;
->xstrdup,,1257346704932262552;
-<xstrdup,,3555,,1257346704932267388;
-<xmalloc,,3556,,1257346704932287982;
->xmalloc,,1257346704932294635;
->xstrdup,,1257346704932299002;
-<xstrdup,,3557,,1257346704932303871;
-<xmalloc,,3558,,1257346704932323705;
->xmalloc,,1257346704932330393;
->xstrdup,,1257346704932334796;
-<xstrdup,,3559,,1257346704932339692;
-<xmalloc,,3560,,1257346704932359448;
->xmalloc,,1257346704932366194;
->xstrdup,,1257346704932370570;
-<xstrdup,,3561,,1257346704932375472;
-<xmalloc,,3562,,1257346704932395384;
->xmalloc,,1257346704932402093;
->xstrdup,,1257346704932406472;
-<xstrdup,,3563,,1257346704932411401;
-<xmalloc,,3564,,1257346704932431446;
->xmalloc,,1257346704932438137;
->xstrdup,,1257346704932442474;
-<xstrdup,,3565,,1257346704932447424;
-<xmalloc,,3566,,1257346704932467033;
->xmalloc,,1257346704932473730;
->xstrdup,,1257346704932478136;
-<xstrdup,,3567,,1257346704932482996;
-<xmalloc,,3568,,1257346704932503218;
->xmalloc,,1257346704932510000;
->xstrdup,,1257346704932514481;
-<xstrdup,,3569,,1257346704932519371;
-<xmalloc,,3570,,1257346704932539969;
->xmalloc,,1257346704932546687;
->xstrdup,,1257346704932551283;
-<xstrdup,,3571,,1257346704932556164;
-<xmalloc,,3572,,1257346704932576335;
->xmalloc,,1257346704932583002;
->xstrdup,,1257346704932587534;
-<xstrdup,,3573,,1257346704932592440;
-<xmalloc,,3574,,1257346704932616809;
->xmalloc,,1257346704932624003;
->xstrdup,,1257346704932628550;
-<xstrdup,,3575,,1257346704932633533;
-<xmalloc,,3576,,1257346704932653668;
->xmalloc,,1257346704932660522;
->xstrdup,,1257346704932664922;
-<xstrdup,,3577,,1257346704932669821;
-<xmalloc,,3578,,1257346704932689856;
->xmalloc,,1257346704932696569;
->xstrdup,,1257346704932700984;
-<xstrdup,,3579,,1257346704932705826;
-<xmalloc,,3580,,1257346704932726012;
->xmalloc,,1257346704932732733;
->xstrdup,,1257346704932737109;
-<xstrdup,,3581,,1257346704932742062;
-<xmalloc,,3582,,1257346704932761575;
->xmalloc,,1257346704932768326;
->xstrdup,,1257346704932772705;
-<xstrdup,,3583,,1257346704932777673;
-<xmalloc,,3584,,1257346704932797552;
->xmalloc,,1257346704932804208;
->xstrdup,,1257346704932808668;
-<xstrdup,,3585,,1257346704932813516;
-<xmalloc,,3586,,1257346704932833136;
->xmalloc,,1257346704932839855;
->xstrdup,,1257346704932844333;
-<xstrdup,,3587,,1257346704932849121;
-<xmalloc,,3588,,1257346704932868774;
->xmalloc,,1257346704932875430;
->xstrdup,,1257346704932879929;
-<xstrdup,,3589,,1257346704932884834;
-<xmalloc,,3590,,1257346704932904662;
->xmalloc,,1257346704932911353;
->xstrdup,,1257346704932915822;
-<xstrdup,,3591,,1257346704932920706;
-<xmalloc,,3592,,1257346704932940952;
->xmalloc,,1257346704932947737;
->xstrdup,,1257346704932952131;
-<xstrdup,,3593,,1257346704932956982;
-<xmalloc,,3594,,1257346704932976963;
->xmalloc,,1257346704932983622;
->xstrdup,,1257346704932988007;
-<xstrdup,,3595,,1257346704932992882;
-<xmalloc,,3596,,1257346704933014725;
->xmalloc,,1257346704933021425;
->xstrdup,,1257346704933025816;
-<xstrdup,,3597,,1257346704933030742;
-<xmalloc,,3598,,1257346704933050197;
->xmalloc,,1257346704933056952;
->xstrdup,,1257346704933061328;
-<xstrdup,,3599,,1257346704933066275;
-<xmalloc,,3600,,1257346704933085953;
->xmalloc,,1257346704933092548;
->xstrdup,,1257346704933096963;
-<xstrdup,,3601,,1257346704933101808;
-<xmalloc,,3602,,1257346704933122361;
->xmalloc,,1257346704933129145;
->xstrdup,,1257346704933133606;
-<xstrdup,,3603,,1257346704933138498;
-<xmalloc,,3604,,1257346704933158850;
->xmalloc,,1257346704933165607;
->xstrdup,,1257346704933170098;
-<xstrdup,,3605,,1257346704933174979;
-<xmalloc,,3606,,1257346704933195156;
->xmalloc,,1257346704933201850;
->xstrdup,,1257346704933206310;
-<xstrdup,,3607,,1257346704933211230;
-<xmalloc,,3608,,1257346704933231070;
->xmalloc,,1257346704933237990;
->xstrdup,,1257346704933242387;
-<xstrdup,,3609,,1257346704933247229;
-<xmalloc,,3610,,1257346704933267301;
->xmalloc,,1257346704933274061;
->xstrdup,,1257346704933278461;
-<xstrdup,,3611,,1257346704933283327;
-<xmalloc,,3612,,1257346704933303107;
->xmalloc,,1257346704933309820;
->xstrdup,,1257346704933314253;
-<xstrdup,,3613,,1257346704933319188;
-<xmalloc,,3614,,1257346704933339070;
->xmalloc,,1257346704933345786;
->xstrdup,,1257346704933350164;
-<xstrdup,,3615,,1257346704933355250;
-<xmalloc,,3616,,1257346704933375099;
->xmalloc,,1257346704933381823;
->xstrdup,,1257346704933386229;
-<xstrdup,,3617,,1257346704933391065;
-<xmalloc,,3618,,1257346704933411140;
->xmalloc,,1257346704933417774;
->xstrdup,,1257346704933422141;
-<xstrdup,,3619,,1257346704933427001;
-<xmalloc,,3620,,1257346704933447148;
->xmalloc,,1257346704933453893;
->xstrdup,,1257346704933458375;
-<xstrdup,,3621,,1257346704933463253;
-<xmalloc,,3622,,1257346704933482936;
->xmalloc,,1257346704933489679;
->xstrdup,,1257346704933494148;
-<xstrdup,,3623,,1257346704933499011;
-<xmalloc,,3624,,1257346704933519227;
->xmalloc,,1257346704933526021;
->xstrdup,,1257346704933530412;
-<xstrdup,,3625,,1257346704933535302;
-<xmalloc,,3626,,1257346704933554943;
->xmalloc,,1257346704933561674;
->xstrdup,,1257346704933566062;
-<xstrdup,,3627,,1257346704933570925;
-<xmalloc,,3628,,1257346704933591279;
->xmalloc,,1257346704933598067;
->xstrdup,,1257346704933606301;
-<xstrdup,,3629,,1257346704933611573;
-<xmalloc,,3630,,1257346704933632830;
->xmalloc,,1257346704933639696;
->xstrdup,,1257346704933644078;
-<xstrdup,,3631,,1257346704933648968;
-<xmalloc,,3632,,1257346704933668985;
->xmalloc,,1257346704933675743;
->xstrdup,,1257346704933680128;
-<xstrdup,,3633,,1257346704933685015;
-<xmalloc,,3634,,1257346704933704864;
->xmalloc,,1257346704933711609;
->xstrdup,,1257346704933716027;
-<xstrdup,,3635,,1257346704933720890;
-<xmalloc,,3636,,1257346704933740499;
->xmalloc,,1257346704933747178;
->xstrdup,,1257346704933751578;
-<xstrdup,,3637,,1257346704933756438;
-<xmalloc,,3638,,1257346704933776381;
->xmalloc,,1257346704933783132;
->xstrdup,,1257346704933787607;
-<xstrdup,,3639,,1257346704933792449;
-<xmalloc,,3640,,1257346704933812238;
->xmalloc,,1257346704933819050;
->xstrdup,,1257346704933823429;
-<xstrdup,,3641,,1257346704933828379;
-<xmalloc,,3642,,1257346704933849001;
->xmalloc,,1257346704933855773;
->xstrdup,,1257346704933860155;
-<xstrdup,,3643,,1257346704933865091;
-<xmalloc,,3644,,1257346704933886798;
->xmalloc,,1257346704933893547;
->xstrdup,,1257346704933897935;
-<xstrdup,,3645,,1257346704933902831;
-<xmalloc,,3646,,1257346704933923167;
->xmalloc,,1257346704933929895;
->xstrdup,,1257346704933934285;
-<xstrdup,,3647,,1257346704933939182;
-<xmalloc,,3648,,1257346704933958928;
->xmalloc,,1257346704933965608;
->xstrdup,,1257346704933970083;
-<xstrdup,,3649,,1257346704933974940;
-<xmalloc,,3650,,1257346704933994951;
->xmalloc,,1257346704934001709;
->xstrdup,,1257346704934006214;
-<xstrdup,,3651,,1257346704934011098;
-<xmalloc,,3652,,1257346704934031143;
->xmalloc,,1257346704934037861;
->xstrdup,,1257346704934042333;
-<xstrdup,,3653,,1257346704934047178;
-<xmalloc,,3654,,1257346704934067948;
->xmalloc,,1257346704934074636;
->xstrdup,,1257346704934079099;
-<xstrdup,,3655,,1257346704934083986;
-<xmalloc,,3656,,1257346704934104353;
->xmalloc,,1257346704934111170;
->xstrdup,,1257346704934115555;
-<xstrdup,,3657,,1257346704934120503;
-<xmalloc,,3658,,1257346704934140378;
->xmalloc,,1257346704934147241;
->xstrdup,,1257346704934151644;
-<xstrdup,,3659,,1257346704934156664;
-<xmalloc,,3660,,1257346704934178191;
->xmalloc,,1257346704934185018;
->xstrdup,,1257346704934189394;
-<xstrdup,,3661,,1257346704934194305;
-<xmalloc,,3662,,1257346704934215988;
->xmalloc,,1257346704934222842;
->xstrdup,,1257346704934227278;
-<xstrdup,,3663,,1257346704934232156;
-<xmalloc,,3664,,1257346704934255653;
->xmalloc,,1257346704934262417;
->xstrdup,,1257346704934266895;
-<xstrdup,,3665,,1257346704934271782;
-<xmalloc,,3666,,1257346704934293520;
->xmalloc,,1257346704934300226;
->xstrdup,,1257346704934304698;
-<xstrdup,,3667,,1257346704934309537;
-<xmalloc,,3668,,1257346704934330213;
->xmalloc,,1257346704934336959;
->xstrdup,,1257346704934341359;
-<xstrdup,,3669,,1257346704934346255;
-<xmalloc,,3670,,1257346704934369157;
->xmalloc,,1257346704934375899;
->xstrdup,,1257346704934380368;
-<xstrdup,,3671,,1257346704934385234;
-<xmalloc,,3672,,1257346704934405814;
->xmalloc,,1257346704934412593;
->xstrdup,,1257346704934416969;
-<xstrdup,,3673,,1257346704934421790;
-<xmalloc,,3674,,1257346704934445804;
->xmalloc,,1257346704934452583;
->xstrdup,,1257346704934456974;
-<xstrdup,,3675,,1257346704934462083;
-<xmalloc,,3676,,1257346704934483914;
->xmalloc,,1257346704934490789;
->xstrdup,,1257346704934495189;
-<xstrdup,,3677,,1257346704934500121;
-<xmalloc,,3678,,1257346704934522012;
->xmalloc,,1257346704934528809;
->xstrdup,,1257346704934533224;
-<xstrdup,,3679,,1257346704934538177;
-<xmalloc,,3680,,1257346704934558252;
->xmalloc,,1257346704934564955;
->xstrdup,,1257346704934569430;
-<xstrdup,,3681,,1257346704934574356;
-<xmalloc,,3682,,1257346704934594741;
->xmalloc,,1257346704934605354;
->xstrdup,,1257346704934610103;
-<xstrdup,,3683,,1257346704934615038;
-<xmalloc,,3684,,1257346704934636309;
->xmalloc,,1257346704934643145;
->xstrdup,,1257346704934647653;
-<xstrdup,,3685,,1257346704934652580;
-<xmalloc,,3686,,1257346704934673112;
->xmalloc,,1257346704934679896;
->xstrdup,,1257346704934684377;
-<xstrdup,,3687,,1257346704934689258;
-<xmalloc,,3688,,1257346704934709246;
->xmalloc,,1257346704934716040;
->xstrdup,,1257346704934720478;
-<xstrdup,,3689,,1257346704934725480;
-<xmalloc,,3690,,1257346704934745437;
->xmalloc,,1257346704934752315;
->xstrdup,,1257346704934756718;
-<xstrdup,,3691,,1257346704934761635;
-<xmalloc,,3692,,1257346704934781992;
->xmalloc,,1257346704934788702;
->xstrdup,,1257346704934793054;
-<xstrdup,,3693,,1257346704934797932;
-<xmalloc,,3694,,1257346704934818668;
->xmalloc,,1257346704934825423;
->xstrdup,,1257346704934829868;
-<xstrdup,,3695,,1257346704934834728;
-<xmalloc,,3696,,1257346704934856980;
->xmalloc,,1257346704934863710;
->xstrdup,,1257346704934868185;
-<xstrdup,,3697,,1257346704934873184;
-<xmalloc,,3698,,1257346704934897351;
->xmalloc,,1257346704934904076;
->xstrdup,,1257346704934908554;
-<xstrdup,,3699,,1257346704934913549;
-<xmalloc,,3700,,1257346704934937043;
->xmalloc,,1257346704934943702;
->xstrdup,,1257346704934948138;
-<xstrdup,,3701,,1257346704934953100;
-<xmalloc,,3702,,1257346704934975319;
->xmalloc,,1257346704934982061;
->xstrdup,,1257346704934986540;
-<xstrdup,,3703,,1257346704934991378;
-<xmalloc,,3704,,1257346704935012160;
->xmalloc,,1257346704935019050;
->xstrdup,,1257346704935023426;
-<xstrdup,,3705,,1257346704935028280;
-<xmalloc,,3706,,1257346704935049332;
->xmalloc,,1257346704935056026;
->xstrdup,,1257346704935060369;
-<xstrdup,,3707,,1257346704935065298;
-<xmalloc,,3708,,1257346704935085306;
->xmalloc,,1257346704935092034;
->xstrdup,,1257346704935096446;
-<xstrdup,,3709,,1257346704935101297;
-<xmalloc,,3710,,1257346704935121272;
->xmalloc,,1257346704935127988;
->xstrdup,,1257346704935132325;
-<xstrdup,,3711,,1257346704935137311;
-<xmalloc,,3712,,1257346704935157521;
->xmalloc,,1257346704935164300;
->xstrdup,,1257346704935168778;
-<xstrdup,,3713,,1257346704935173587;
-<xmalloc,,3714,,1257346704935194061;
->xmalloc,,1257346704935200774;
->xstrdup,,1257346704935205243;
-<xstrdup,,3715,,1257346704935210097;
-<xmalloc,,3716,,1257346704935230607;
->xmalloc,,1257346704935237323;
->xstrdup,,1257346704935241807;
-<xstrdup,,3717,,1257346704935246724;
-<xmalloc,,3718,,1257346704935267139;
->xmalloc,,1257346704935273908;
->xstrdup,,1257346704935278387;
-<xstrdup,,3719,,1257346704935283261;
-<xmalloc,,3720,,1257346704935303144;
->xmalloc,,1257346704935309995;
->xstrdup,,1257346704935314373;
-<xstrdup,,3721,,1257346704935319282;
-<xmalloc,,3722,,1257346704935338929;
->xmalloc,,1257346704935345720;
->xstrdup,,1257346704935350108;
-<xstrdup,,3723,,1257346704935354916;
-<xmalloc,,3724,,1257346704935375144;
->xmalloc,,1257346704935382035;
->xstrdup,,1257346704935386464;
-<xstrdup,,3725,,1257346704935391330;
-<xmalloc,,3726,,1257346704935411667;
->xmalloc,,1257346704935418412;
->xstrdup,,1257346704935422806;
-<xstrdup,,3727,,1257346704935427678;
-<xmalloc,,3728,,1257346704935447903;
->xmalloc,,1257346704935454646;
->xstrdup,,1257346704935459040;
-<xstrdup,,3729,,1257346704935463945;
-<xmalloc,,3730,,1257346704935484407;
->xmalloc,,1257346704935491099;
->xstrdup,,1257346704935495526;
-<xstrdup,,3731,,1257346704935500428;
-<xmalloc,,3732,,1257346704935520433;
->xmalloc,,1257346704935527125;
->xstrdup,,1257346704935531612;
-<xstrdup,,3733,,1257346704935536487;
-<xmalloc,,3734,,1257346704935556426;
->xmalloc,,1257346704935563208;
->xstrdup,,1257346704935567686;
-<xstrdup,,3735,,1257346704935572540;
-<xmalloc,,3736,,1257346704935592455;
->xmalloc,,1257346704935599213;
->xstrdup,,1257346704935715930;
-<xstrdup,,3737,,1257346704935721758;
-<xmalloc,,3738,,1257346704935745766;
->xmalloc,,1257346704935752807;
->xstrdup,,1257346704935757285;
-<xstrdup,,3739,,1257346704935762175;
-<xmalloc,,3740,,1257346704935781747;
->xmalloc,,1257346704935788487;
->xstrdup,,1257346704935792890;
-<xstrdup,,3741,,1257346704935797744;
-<xmalloc,,3742,,1257346704935818071;
->xmalloc,,1257346704935824817;
->xstrdup,,1257346704935829228;
-<xstrdup,,3743,,1257346704935834088;
-<xmalloc,,3744,,1257346704935854512;
->xmalloc,,1257346704935861221;
->xstrdup,,1257346704935865702;
-<xstrdup,,3745,,1257346704935870548;
-<xmalloc,,3746,,1257346704935891058;
->xmalloc,,1257346704935897777;
->xstrdup,,1257346704935902252;
-<xstrdup,,3747,,1257346704935907094;
-<xmalloc,,3748,,1257346704935927656;
->xmalloc,,1257346704935934425;
->xstrdup,,1257346704935938918;
-<xstrdup,,3749,,1257346704935943778;
-<xmalloc,,3750,,1257346704935963964;
->xmalloc,,1257346704935970689;
->xstrdup,,1257346704935975173;
-<xstrdup,,3751,,1257346704935980000;
-<xmalloc,,3752,,1257346704936000529;
->xmalloc,,1257346704936007380;
->xstrdup,,1257346704936011779;
-<xstrdup,,3753,,1257346704936016630;
-<xmalloc,,3754,,1257346704936037045;
->xmalloc,,1257346704936043742;
->xstrdup,,1257346704936048148;
-<xstrdup,,3755,,1257346704936053038;
-<xmalloc,,3756,,1257346704936073059;
->xmalloc,,1257346704936079835;
->xstrdup,,1257346704936084222;
-<xstrdup,,3757,,1257346704936089073;
-<xmalloc,,3758,,1257346704936109376;
->xmalloc,,1257346704936116134;
->xstrdup,,1257346704936120531;
-<xstrdup,,3759,,1257346704936125367;
-<xmalloc,,3760,,1257346704936145291;
->xmalloc,,1257346704936152046;
->xstrdup,,1257346704936156437;
-<xstrdup,,3761,,1257346704936161261;
-<xmalloc,,3762,,1257346704936181296;
->xmalloc,,1257346704936188030;
->xstrdup,,1257346704936192505;
-<xstrdup,,3763,,1257346704936197395;
-<xmalloc,,3764,,1257346704936219827;
->xmalloc,,1257346704937139761;
->xstrdup,,1257346704937145280;
-<xstrdup,,3765,,1257346704937150682;
-<xmalloc,,3766,,1257346704937175108;
->xmalloc,,1257346704937181992;
->xstrdup,,1257346704937186458;
-<xstrdup,,3767,,1257346704937191423;
-<xmalloc,,3768,,1257346704937211230;
->xmalloc,,1257346704937218114;
->xstrdup,,1257346704937222532;
-<xstrdup,,3769,,1257346704937227482;
-<xmalloc,,3770,,1257346704937247406;
->xmalloc,,1257346704937254119;
->xstrdup,,1257346704937258510;
-<xstrdup,,3771,,1257346704937263532;
-<xmalloc,,3772,,1257346704937283408;
->xmalloc,,1257346704937290241;
->xstrdup,,1257346704937294656;
-<xstrdup,,3773,,1257346704937299549;
-<xmalloc,,3774,,1257346704937320042;
->xmalloc,,1257346704937326754;
->xstrdup,,1257346704937331202;
-<xstrdup,,3775,,1257346704937336108;
-<xmalloc,,3776,,1257346704937356429;
->xmalloc,,1257346704937363147;
->xstrdup,,1257346704937367640;
-<xstrdup,,3777,,1257346704937372506;
-<xmalloc,,3778,,1257346704937392767;
->xmalloc,,1257346704937399486;
->xstrdup,,1257346704937403946;
-<xstrdup,,3779,,1257346704937408794;
-<xmalloc,,3780,,1257346704937428628;
->xmalloc,,1257346704937435319;
->xstrdup,,1257346704937439810;
-<xstrdup,,3781,,1257346704937444709;
-<xmalloc,,3782,,1257346704937464534;
->xmalloc,,1257346704937471246;
->xstrdup,,1257346704937475712;
-<xstrdup,,3783,,1257346704937480533;
-<xmalloc,,3784,,1257346704937500927;
->xmalloc,,1257346704937507699;
->xstrdup,,1257346704937512099;
-<xstrdup,,3785,,1257346704937517077;
-<xmalloc,,3786,,1257346704937537202;
->xmalloc,,1257346704937544008;
->xstrdup,,1257346704937548441;
-<xstrdup,,3787,,1257346704937553313;
-<xmalloc,,3788,,1257346704937573920;
->xmalloc,,1257346704937580623;
->xstrdup,,1257346704937585035;
-<xstrdup,,3789,,1257346704937589862;
-<xmalloc,,3790,,1257346704937615869;
->xmalloc,,1257346704937623189;
->xstrdup,,1257346704937627637;
-<xstrdup,,3791,,1257346704937632581;
-<xmalloc,,3792,,1257346704937653028;
->xmalloc,,1257346704937659816;
->xstrdup,,1257346704937664234;
-<xstrdup,,3793,,1257346704937669127;
-<xmalloc,,3794,,1257346704937689214;
->xmalloc,,1257346704937696023;
->xstrdup,,1257346704937700567;
-<xstrdup,,3795,,1257346704937705457;
-<xmalloc,,3796,,1257346704937726016;
->xmalloc,,1257346704937732755;
->xstrdup,,1257346704937737236;
-<xstrdup,,3797,,1257346704937742111;
-<xmalloc,,3798,,1257346704937762282;
->xmalloc,,1257346704937769016;
->xstrdup,,1257346704937773419;
-<xstrdup,,3799,,1257346704937778285;
-<xmalloc,,3800,,1257346704937798895;
->xmalloc,,1257346704937805734;
->xstrdup,,1257346704937810130;
-<xstrdup,,3801,,1257346704937814984;
-<xmalloc,,3802,,1257346704937834674;
->xmalloc,,1257346704937841386;
->xstrdup,,1257346704937845829;
-<xstrdup,,3803,,1257346704937850731;
-<xmalloc,,3804,,1257346704937870306;
->xmalloc,,1257346704937877040;
->xstrdup,,1257346704937881445;
-<xstrdup,,3805,,1257346704937886335;
-<xmalloc,,3806,,1257346704937905971;
->xmalloc,,1257346704937912699;
->xstrdup,,1257346704937917083;
-<xstrdup,,3807,,1257346704937922064;
-<xmalloc,,3808,,1257346704937942451;
->xmalloc,,1257346704937949215;
->xstrdup,,1257346704937953705;
-<xstrdup,,3809,,1257346704937958550;
-<xmalloc,,3810,,1257346704937978273;
->xmalloc,,1257346704937985003;
->xstrdup,,1257346704937989496;
-<xstrdup,,3811,,1257346704937994386;
-<xmalloc,,3812,,1257346704938014320;
->xmalloc,,1257346704938021080;
->xstrdup,,1257346704938025559;
-<xstrdup,,3813,,1257346704938030431;
-<xmalloc,,3814,,1257346704938050679;
->xmalloc,,1257346704938057416;
->xstrdup,,1257346704938061897;
-<xstrdup,,3815,,1257346704938066823;
-<xmalloc,,3816,,1257346704938086666;
->xmalloc,,1257346704938093508;
->xstrdup,,1257346704938097899;
-<xstrdup,,3817,,1257346704938102855;
-<xmalloc,,3818,,1257346704938122783;
->xmalloc,,1257346704938129504;
->xstrdup,,1257346704938133904;
-<xstrdup,,3819,,1257346704938138812;
-<xmalloc,,3820,,1257346704938158694;
->xmalloc,,1257346704938165455;
->xstrdup,,1257346704938169846;
-<xstrdup,,3821,,1257346704938174787;
-<xmalloc,,3822,,1257346704938195120;
->xmalloc,,1257346704938201836;
->xstrdup,,1257346704938206224;
-<xstrdup,,3823,,1257346704938211126;
-<xmalloc,,3824,,1257346704938231363;
->xmalloc,,1257346704938238090;
->xstrdup,,1257346704938242569;
-<xstrdup,,3825,,1257346704938247423;
-<xmalloc,,3826,,1257346704938267945;
->xmalloc,,1257346704938274712;
->xstrdup,,1257346704938279199;
-<xstrdup,,3827,,1257346704938284125;
-<xmalloc,,3828,,1257346704938304115;
->xmalloc,,1257346704938310825;
->xstrdup,,1257346704938315288;
-<xstrdup,,3829,,1257346704938320136;
-<xmalloc,,3830,,1257346704938340187;
->xmalloc,,1257346704938346914;
->xstrdup,,1257346704938351386;
-<xstrdup,,3831,,1257346704938356279;
-<xmalloc,,3832,,1257346704938377148;
->xmalloc,,1257346704938383990;
->xstrdup,,1257346704938388375;
-<xstrdup,,3833,,1257346704938393280;
-<xmalloc,,3834,,1257346704938413884;
->xmalloc,,1257346704938420662;
->xstrdup,,1257346704938425053;
-<xstrdup,,3835,,1257346704938430006;
-<xmalloc,,3836,,1257346704938450286;
->xmalloc,,1257346704938457034;
->xstrdup,,1257346704938461401;
-<xstrdup,,3837,,1257346704938466354;
-<xmalloc,,3838,,1257346704938487196;
->xmalloc,,1257346704938493956;
->xstrdup,,1257346704938498374;
-<xstrdup,,3839,,1257346704938503267;
-<xmalloc,,3840,,1257346704938523306;
->xmalloc,,1257346704938530027;
->xstrdup,,1257346704938534500;
-<xstrdup,,3841,,1257346704938539372;
-<xmalloc,,3842,,1257346704938559320;
->xmalloc,,1257346704938566014;
->xstrdup,,1257346704938570489;
-<xstrdup,,3843,,1257346704938575389;
-<xmalloc,,3844,,1257346704938596768;
->xmalloc,,1257346704938608442;
->xstrdup,,1257346704938613074;
-<vec_p_reserve,,3845,,1257346704938625825;
-<vec_o_reserve,,3846,,1257346704938635286;
-<xrealloc,,3847,,1257346704938657893;
->xrealloc,,1257346704938669478;
->vec_o_reserve,,1257346704938674461;
->vec_p_reserve,,1257346704938679012;
-<xstrdup,,3848,,1257346704938684007;
-<xmalloc,,3849,,1257346704938707979;
->xmalloc,,1257346704938714890;
->xstrdup,,1257346704938719470;
-<xstrdup,,3850,,1257346704938724366;
-<xmalloc,,3851,,1257346704938744191;
->xmalloc,,1257346704938750829;
->xstrdup,,1257346704938755328;
-<xstrdup,,3852,,1257346704938760221;
-<xmalloc,,3853,,1257346704938779811;
->xmalloc,,1257346704938786494;
->xstrdup,,1257346704938790975;
-<xstrdup,,3854,,1257346704938795844;
-<xmalloc,,3855,,1257346704938815807;
->xmalloc,,1257346704938822517;
->xstrdup,,1257346704938827136;
-<xstrdup,,3856,,1257346704938832069;
-<xmalloc,,3857,,1257346704938852378;
->xmalloc,,1257346704938859123;
->xstrdup,,1257346704938863526;
-<xstrdup,,3858,,1257346704938868407;
-<xmalloc,,3859,,1257346704938888599;
->xmalloc,,1257346704938895315;
->xstrdup,,1257346704938899721;
-<xstrdup,,3860,,1257346704938904563;
-<xmalloc,,3861,,1257346704938924911;
->xmalloc,,1257346704938931596;
->xstrdup,,1257346704938936005;
-<xstrdup,,3862,,1257346704938940919;
-<xmalloc,,3863,,1257346704938960654;
->xmalloc,,1257346704938967376;
->xstrdup,,1257346704938971785;
-<xstrdup,,3864,,1257346704938976651;
-<xmalloc,,3865,,1257346704938996307;
->xmalloc,,1257346704939002978;
->xstrdup,,1257346704939007365;
-<xstrdup,,3866,,1257346704939012241;
-<xmalloc,,3867,,1257346704939032402;
->xmalloc,,1257346704939039082;
->xstrdup,,1257346704939043560;
-<xstrdup,,3868,,1257346704939048483;
-<xmalloc,,3869,,1257346704939068747;
->xmalloc,,1257346704939075448;
->xstrdup,,1257346704939079929;
-<xstrdup,,3870,,1257346704939084831;
-<xmalloc,,3871,,1257346704939104930;
->xmalloc,,1257346704939111660;
->xstrdup,,1257346704939116135;
-<xstrdup,,3872,,1257346704939120974;
-<xmalloc,,3873,,1257346704939141374;
->xmalloc,,1257346704939148185;
->xstrdup,,1257346704939152585;
-<xstrdup,,3874,,1257346704939157536;
-<xmalloc,,3875,,1257346704939178287;
->xmalloc,,1257346704939185056;
->xstrdup,,1257346704939189444;
-<xstrdup,,3876,,1257346704939194334;
-<xmalloc,,3877,,1257346704939213889;
->xmalloc,,1257346704939220562;
->xstrdup,,1257346704939224971;
-<xstrdup,,3878,,1257346704939229822;
-<xmalloc,,3879,,1257346704939249800;
->xmalloc,,1257346704939256483;
->xstrdup,,1257346704939260865;
-<xstrdup,,3880,,1257346704939265740;
-<xmalloc,,3881,,1257346704939285480;
->xmalloc,,1257346704939292127;
->xstrdup,,1257346704939296623;
-<xstrdup,,3882,,1257346704939301477;
-<xmalloc,,3883,,1257346704939321846;
->xmalloc,,1257346704939328499;
->xstrdup,,1257346704939332974;
-<xstrdup,,3884,,1257346704939337885;
-<xmalloc,,3885,,1257346704939358757;
->xmalloc,,1257346704939365454;
->xstrdup,,1257346704939369935;
-<xstrdup,,3886,,1257346704939374804;
-<xmalloc,,3887,,1257346704939394479;
->xmalloc,,1257346704939401170;
->xstrdup,,1257346704939405651;
-<xstrdup,,3888,,1257346704939410571;
-<xmalloc,,3889,,1257346704939430400;
->xmalloc,,1257346704939437196;
->xstrdup,,1257346704939441590;
-<xstrdup,,3890,,1257346704939446462;
-<xmalloc,,3891,,1257346704939466251;
->xmalloc,,1257346704939472861;
->xstrdup,,1257346704939477225;
-<xstrdup,,3892,,1257346704939482082;
-<xmalloc,,3893,,1257346704939502313;
->xmalloc,,1257346704939509041;
->xstrdup,,1257346704939513429;
-<xstrdup,,3894,,1257346704939518310;
-<xmalloc,,3895,,1257346704939538104;
->xmalloc,,1257346704939544808;
->xstrdup,,1257346704939549187;
-<xstrdup,,3896,,1257346704939554029;
-<xmalloc,,3897,,1257346704939574188;
->xmalloc,,1257346704939580825;
->xstrdup,,1257346704939585252;
-<xstrdup,,3898,,1257346704939590181;
-<xmalloc,,3899,,1257346704939614773;
->xmalloc,,1257346704939622023;
->xstrdup,,1257346704939626580;
-<xstrdup,,3900,,1257346704939631545;
-<xmalloc,,3901,,1257346704939651920;
->xmalloc,,1257346704939658609;
->xstrdup,,1257346704939663099;
-<xstrdup,,3902,,1257346704939667995;
-<xmalloc,,3903,,1257346704939688262;
->xmalloc,,1257346704939694990;
->xstrdup,,1257346704939699444;
-<xstrdup,,3904,,1257346704939704295;
-<xmalloc,,3905,,1257346704939724787;
->xmalloc,,1257346704939731614;
->xstrdup,,1257346704939736011;
-<xstrdup,,3906,,1257346704939740889;
-<xmalloc,,3907,,1257346704939760967;
->xmalloc,,1257346704939767649;
->xstrdup,,1257346704939772055;
-<xstrdup,,3908,,1257346704939776966;
-<xmalloc,,3909,,1257346704939797312;
->xmalloc,,1257346704939804057;
->xstrdup,,1257346704939808454;
-<xstrdup,,3910,,1257346704939813323;
-<xmalloc,,3911,,1257346704939833353;
->xmalloc,,1257346704939840110;
->xstrdup,,1257346704939844504;
-<xstrdup,,3912,,1257346704939849364;
-<xmalloc,,3913,,1257346704939869324;
->xmalloc,,1257346704939876061;
->xstrdup,,1257346704939880563;
-<xstrdup,,3914,,1257346704939885489;
-<xmalloc,,3915,,1257346704939905850;
->xmalloc,,1257346704939912514;
->xstrdup,,1257346704939917164;
-<xstrdup,,3916,,1257346704939922018;
-<xmalloc,,3917,,1257346704939941794;
->xmalloc,,1257346704939948522;
->xstrdup,,1257346704939952913;
-<xstrdup,,3918,,1257346704939957803;
-<xmalloc,,3919,,1257346704939978323;
->xmalloc,,1257346704939985053;
->xstrdup,,1257346704939989483;
-<xstrdup,,3920,,1257346704939994358;
-<xmalloc,,3921,,1257346704940014649;
->xmalloc,,1257346704940021395;
->xstrdup,,1257346704940025792;
-<xstrdup,,3922,,1257346704940030628;
-<xmalloc,,3923,,1257346704940052206;
->xmalloc,,1257346704940058940;
->xstrdup,,1257346704940063337;
-<xstrdup,,3924,,1257346704940068167;
-<xmalloc,,3925,,1257346704940088485;
->xmalloc,,1257346704940095215;
->xstrdup,,1257346704940099621;
-<xstrdup,,3926,,1257346704940104505;
-<xmalloc,,3927,,1257346704940124959;
->xmalloc,,1257346704940131752;
->xstrdup,,1257346704940136146;
-<xstrdup,,3928,,1257346704940141019;
-<xmalloc,,3929,,1257346704940161295;
->xmalloc,,1257346704940167998;
->xstrdup,,1257346704940172482;
-<xstrdup,,3930,,1257346704940177363;
-<xmalloc,,3931,,1257346704940198496;
->xmalloc,,1257346704940205233;
->xstrdup,,1257346704940209717;
-<xstrdup,,3932,,1257346704940214592;
-<xmalloc,,3933,,1257346704940235440;
->xmalloc,,1257346704940242140;
->xstrdup,,1257346704940246618;
-<xstrdup,,3934,,1257346704940251566;
-<xmalloc,,3935,,1257346704940272608;
->xmalloc,,1257346704940279342;
->xstrdup,,1257346704940283817;
-<xstrdup,,3936,,1257346704940288692;
-<xmalloc,,3937,,1257346704940309068;
->xmalloc,,1257346704940315882;
->xstrdup,,1257346704940320285;
-<xstrdup,,3938,,1257346704940325193;
-<xmalloc,,3939,,1257346704940345376;
->xmalloc,,1257346704940352119;
->xstrdup,,1257346704940356519;
-<xstrdup,,3940,,1257346704940361370;
-<xmalloc,,3941,,1257346704940381649;
->xmalloc,,1257346704940388388;
->xstrdup,,1257346704940392791;
-<xstrdup,,3942,,1257346704940397751;
-<xmalloc,,3943,,1257346704940417888;
->xmalloc,,1257346704940424676;
->xstrdup,,1257346704940429070;
-<xstrdup,,3944,,1257346704940433975;
-<xmalloc,,3945,,1257346704940454028;
->xmalloc,,1257346704940460762;
->xstrdup,,1257346704940465267;
-<xstrdup,,3946,,1257346704940470154;
-<xmalloc,,3947,,1257346704940490358;
->xmalloc,,1257346704940496975;
->xstrdup,,1257346704940501411;
-<xstrdup,,3948,,1257346704940506283;
-<xmalloc,,3949,,1257346704940526384;
->xmalloc,,1257346704940533223;
->xstrdup,,1257346704940537749;
-<xstrdup,,3950,,1257346704940542649;
-<xmalloc,,3951,,1257346704940562488;
->xmalloc,,1257346704940569246;
->xstrdup,,1257346704940573730;
-<xstrdup,,3952,,1257346704940578596;
-<xmalloc,,3953,,1257346704940598626;
->xmalloc,,1257346704940609890;
->xstrdup,,1257346704940614413;
-<xstrdup,,3954,,1257346704940619324;
-<xmalloc,,3955,,1257346704940640106;
->xmalloc,,1257346704940646830;
->xstrdup,,1257346704940651248;
-<xstrdup,,3956,,1257346704940656210;
-<xmalloc,,3957,,1257346704940676480;
->xmalloc,,1257346704940683199;
->xstrdup,,1257346704940687617;
-<xstrdup,,3958,,1257346704940692513;
-<xmalloc,,3959,,1257346704940712353;
->xmalloc,,1257346704940719108;
->xstrdup,,1257346704940723516;
-<xstrdup,,3960,,1257346704940728464;
-<xmalloc,,3961,,1257346704940748421;
->xmalloc,,1257346704940755122;
->xstrdup,,1257346704940759633;
-<xstrdup,,3962,,1257346704940764526;
-<xmalloc,,3963,,1257346704940784751;
->xmalloc,,1257346704940791563;
->xstrdup,,1257346704940796056;
-<xstrdup,,3964,,1257346704940800961;
-<xmalloc,,3965,,1257346704940821889;
->xmalloc,,1257346704940828608;
->xstrdup,,1257346704940833101;
-<xstrdup,,3966,,1257346704940837973;
-<xmalloc,,3967,,1257346704940858481;
->xmalloc,,1257346704940865178;
->xstrdup,,1257346704940869659;
-<xstrdup,,3968,,1257346704940874553;
-<xmalloc,,3969,,1257346704940894675;
->xmalloc,,1257346704940901379;
->xstrdup,,1257346704940905776;
-<xstrdup,,3970,,1257346704940910729;
-<xmalloc,,3971,,1257346704940931522;
->xmalloc,,1257346704940938223;
->xstrdup,,1257346704940942590;
-<xstrdup,,3972,,1257346704940947540;
-<xmalloc,,3973,,1257346704940967515;
->xmalloc,,1257346704940974198;
->xstrdup,,1257346704940978589;
-<xstrdup,,3974,,1257346704940983470;
-<xmalloc,,3975,,1257346704941003568;
->xmalloc,,1257346704941010293;
->xstrdup,,1257346704941014696;
-<xstrdup,,3976,,1257346704941019754;
-<xmalloc,,3977,,1257346704941039979;
->xmalloc,,1257346704941046737;
->xstrdup,,1257346704941051140;
-<xstrdup,,3978,,1257346704941056003;
-<xmalloc,,3979,,1257346704941076565;
->xmalloc,,1257346704941083274;
->xstrdup,,1257346704941087785;
-<xstrdup,,3980,,1257346704941092720;
-<xmalloc,,3981,,1257346704941112783;
->xmalloc,,1257346704941119468;
->xstrdup,,1257346704941123998;
-<xstrdup,,3982,,1257346704941128987;
-<xmalloc,,3983,,1257346704941148975;
->xmalloc,,1257346704941155675;
->xstrdup,,1257346704941160237;
-<xstrdup,,3984,,1257346704941165091;
-<xmalloc,,3985,,1257346704941185139;
->xmalloc,,1257346704941191872;
->xstrdup,,1257346704941196269;
-<xstrdup,,3986,,1257346704941201150;
-<xmalloc,,3987,,1257346704941221399;
->xmalloc,,1257346704941228124;
->xstrdup,,1257346704941232527;
-<xstrdup,,3988,,1257346704941237411;
-<xmalloc,,3989,,1257346704941257483;
->xmalloc,,1257346704941264228;
->xstrdup,,1257346704941268631;
-<xstrdup,,3990,,1257346704941273545;
-<xmalloc,,3991,,1257346704941293466;
->xmalloc,,1257346704941300233;
->xstrdup,,1257346704941304633;
-<xstrdup,,3992,,1257346704941309481;
-<xmalloc,,3993,,1257346704941329748;
->xmalloc,,1257346704941336436;
->xstrdup,,1257346704941340824;
-<xstrdup,,3994,,1257346704941345705;
-<xmalloc,,3995,,1257346704941365870;
->xmalloc,,1257346704941372589;
->xstrdup,,1257346704941377085;
-<xstrdup,,3996,,1257346704941382005;
-<xmalloc,,3997,,1257346704941401932;
->xmalloc,,1257346704941408588;
->xstrdup,,1257346704941413084;
-<xstrdup,,3998,,1257346704941417968;
-<xmalloc,,3999,,1257346704941438024;
->xmalloc,,1257346704941444728;
->xstrdup,,1257346704941449212;
-<xstrdup,,4000,,1257346704941454063;
-<xmalloc,,4001,,1257346704941474267;
->xmalloc,,1257346704941481001;
->xstrdup,,1257346704941485428;
-<xstrdup,,4002,,1257346704941490360;
-<xmalloc,,4003,,1257346704941510756;
->xmalloc,,1257346704941517580;
->xstrdup,,1257346704941521977;
-<xstrdup,,4004,,1257346704941526885;
-<xmalloc,,4005,,1257346704941547486;
->xmalloc,,1257346704941554186;
->xstrdup,,1257346704941558595;
-<xstrdup,,4006,,1257346704941563506;
-<xmalloc,,4007,,1257346704941583963;
->xmalloc,,1257346704941590724;
->xstrdup,,1257346704941595121;
-<xstrdup,,4008,,1257346704941599947;
-<xmalloc,,4009,,1257346704941624745;
->xmalloc,,1257346704941631653;
->xstrdup,,1257346704941636152;
-<xstrdup,,4010,,1257346704941641072;
-<xmalloc,,4011,,1257346704941661788;
->xmalloc,,1257346704941668521;
->xstrdup,,1257346704941673017;
-<xstrdup,,4012,,1257346704941677898;
-<xmalloc,,4013,,1257346704941698484;
->xmalloc,,1257346704941705242;
->xstrdup,,1257346704941709744;
-<xstrdup,,4014,,1257346704941714637;
-<xmalloc,,4015,,1257346704941735208;
->xmalloc,,1257346704941741942;
->xstrdup,,1257346704941746453;
-<xstrdup,,4016,,1257346704941751337;
-<xmalloc,,4017,,1257346704941771342;
->xmalloc,,1257346704941778112;
->xstrdup,,1257346704941782506;
-<xstrdup,,4018,,1257346704941787525;
-<xmalloc,,4019,,1257346704941808108;
->xmalloc,,1257346704941814947;
->xstrdup,,1257346704941819347;
-<xstrdup,,4020,,1257346704941824333;
-<xmalloc,,4021,,1257346704941844182;
->xmalloc,,1257346704941851093;
->xstrdup,,1257346704941855499;
-<xstrdup,,4022,,1257346704941860386;
-<xmalloc,,4023,,1257346704941880734;
->xmalloc,,1257346704941887549;
->xstrdup,,1257346704941891961;
-<xstrdup,,4024,,1257346704941896866;
-<xmalloc,,4025,,1257346704941917482;
->xmalloc,,1257346704941924170;
->xstrdup,,1257346704941928621;
-<xstrdup,,4026,,1257346704941933475;
-<xmalloc,,4027,,1257346704941954149;
->xmalloc,,1257346704941960873;
->xstrdup,,1257346704941965312;
-<xstrdup,,4028,,1257346704941970163;
-<xmalloc,,4029,,1257346704941990508;
->xmalloc,,1257346704941997200;
->xstrdup,,1257346704942001615;
-<xstrdup,,4030,,1257346704942006502;
-<xmalloc,,4031,,1257346704942026571;
->xmalloc,,1257346704942033346;
->xstrdup,,1257346704942037833;
-<xstrdup,,4032,,1257346704942042723;
-<xmalloc,,4033,,1257346704942062732;
->xmalloc,,1257346704942069529;
->xstrdup,,1257346704942073920;
-<xstrdup,,4034,,1257346704942078918;
-<xmalloc,,4035,,1257346704942099167;
->xmalloc,,1257346704942105997;
->xstrdup,,1257346704942110396;
-<xstrdup,,4036,,1257346704942115407;
-<xmalloc,,4037,,1257346704942135942;
->xmalloc,,1257346704942142750;
->xstrdup,,1257346704942147156;
-<xstrdup,,4038,,1257346704942152101;
-<xmalloc,,4039,,1257346704942172518;
->xmalloc,,1257346704942179224;
->xstrdup,,1257346704942183624;
-<xstrdup,,4040,,1257346704942188509;
-<xmalloc,,4041,,1257346704942208866;
->xmalloc,,1257346704942215530;
->xstrdup,,1257346704942220105;
-<xstrdup,,4042,,1257346704942225007;
-<xmalloc,,4043,,1257346704942245126;
->xmalloc,,1257346704942251833;
->xstrdup,,1257346704942256362;
-<xstrdup,,4044,,1257346704942261291;
-<xmalloc,,4045,,1257346704942281339;
->xmalloc,,1257346704942288051;
->xstrdup,,1257346704942292544;
-<xstrdup,,4046,,1257346704942297468;
-<xmalloc,,4047,,1257346704942317566;
->xmalloc,,1257346704942324285;
->xstrdup,,1257346704942328790;
-<xstrdup,,4048,,1257346704942333683;
-<xmalloc,,4049,,1257346704942354197;
->xmalloc,,1257346704942360999;
->xstrdup,,1257346704942365448;
-<xstrdup,,4050,,1257346704942370434;
-<xmalloc,,4051,,1257346704942391134;
->xmalloc,,1257346704942397934;
->xstrdup,,1257346704942402322;
-<xstrdup,,4052,,1257346704942407167;
-<xmalloc,,4053,,1257346704942427385;
->xmalloc,,1257346704942434137;
->xstrdup,,1257346704942438552;
-<xstrdup,,4054,,1257346704942443445;
-<xmalloc,,4055,,1257346704942463655;
->xmalloc,,1257346704942470392;
->xstrdup,,1257346704942474792;
-<xstrdup,,4056,,1257346704942479724;
-<xmalloc,,4057,,1257346704942499471;
->xmalloc,,1257346704942506192;
->xstrdup,,1257346704942510631;
-<xstrdup,,4058,,1257346704942515524;
-<xmalloc,,4059,,1257346704942535668;
->xmalloc,,1257346704942542399;
->xstrdup,,1257346704942546883;
-<xstrdup,,4060,,1257346704942551779;
-<xmalloc,,4061,,1257346704942571754;
->xmalloc,,1257346704942578482;
->xstrdup,,1257346704942582990;
-<xstrdup,,4062,,1257346704942587916;
-<xmalloc,,4063,,1257346704942611869;
->xmalloc,,1257346704942619123;
->xstrdup,,1257346704942623664;
-<xstrdup,,4064,,1257346704942628611;
-<xmalloc,,4065,,1257346704942648918;
->xmalloc,,1257346704942655811;
->xstrdup,,1257346704942660216;
-<xstrdup,,4066,,1257346704942665158;
-<xmalloc,,4067,,1257346704942686237;
->xmalloc,,1257346704942692940;
->xstrdup,,1257346704942697340;
-<xstrdup,,4068,,1257346704942702263;
-<xmalloc,,4069,,1257346704942722151;
->xmalloc,,1257346704942728918;
->xstrdup,,1257346704942733315;
-<xstrdup,,4070,,1257346704942738304;
-<xmalloc,,4071,,1257346704942758478;
->xmalloc,,1257346704942765227;
->xstrdup,,1257346704942769621;
-<xstrdup,,4072,,1257346704942774688;
-<xmalloc,,4073,,1257346704942794916;
->xmalloc,,1257346704942801632;
->xstrdup,,1257346704942806134;
-<xstrdup,,4074,,1257346704942811078;
-<xmalloc,,4075,,1257346704942831038;
->xmalloc,,1257346704942837775;
->xstrdup,,1257346704942842253;
-<xstrdup,,4076,,1257346704942847158;
-<xmalloc,,4077,,1257346704942866953;
->xmalloc,,1257346704942873723;
->xstrdup,,1257346704942878210;
-<xstrdup,,4078,,1257346704942883175;
-<xmalloc,,4079,,1257346704942903493;
->xmalloc,,1257346704942910215;
->xstrdup,,1257346704942914693;
-<xstrdup,,4080,,1257346704942919598;
-<xmalloc,,4081,,1257346704942939709;
->xmalloc,,1257346704942946545;
->xstrdup,,1257346704942950954;
-<xstrdup,,4082,,1257346704942955877;
-<xmalloc,,4083,,1257346704942975693;
->xmalloc,,1257346704942982496;
->xstrdup,,1257346704942986892;
-<xstrdup,,4084,,1257346704942991846;
-<xmalloc,,4085,,1257346704943012341;
->xmalloc,,1257346704943019216;
->xstrdup,,1257346704943023616;
-<xstrdup,,4086,,1257346704943028575;
-<xmalloc,,4087,,1257346704943049351;
->xmalloc,,1257346704943056135;
->xstrdup,,1257346704943060529;
-<xstrdup,,4088,,1257346704943065477;
-<xmalloc,,4089,,1257346704943085719;
->xmalloc,,1257346704943092456;
->xstrdup,,1257346704943096850;
-<xstrdup,,4090,,1257346704943101725;
-<xmalloc,,4091,,1257346704943122013;
->xmalloc,,1257346704943128774;
->xstrdup,,1257346704943133192;
-<xstrdup,,4092,,1257346704943138142;
-<xmalloc,,4093,,1257346704943158238;
->xmalloc,,1257346704943164953;
->xstrdup,,1257346704943169377;
-<xstrdup,,4094,,1257346704943174297;
-<xmalloc,,4095,,1257346704943194462;
->xmalloc,,1257346704943201172;
->xstrdup,,1257346704943205659;
-<xstrdup,,4096,,1257346704943210630;
-<xmalloc,,4097,,1257346704943231228;
->xmalloc,,1257346704943238052;
->xstrdup,,1257346704943242449;
-<xstrdup,,4098,,1257346704943252162;
-<xmalloc,,4099,,1257346704943274854;
->xmalloc,,1257346704943281726;
->xstrdup,,1257346704943286164;
-<xstrdup,,4100,,1257346704943291088;
-<xmalloc,,4101,,1257346704943310735;
->xmalloc,,1257346704943317475;
->xstrdup,,1257346704943321878;
-<xstrdup,,4102,,1257346704943326810;
-<xmalloc,,4103,,1257346704943346878;
->xmalloc,,1257346704943353606;
->xstrdup,,1257346704943358048;
-<xstrdup,,4104,,1257346704943362953;
-<xmalloc,,4105,,1257346704943382616;
->xmalloc,,1257346704943389334;
->xstrdup,,1257346704943393834;
-<xstrdup,,4106,,1257346704943398778;
-<xmalloc,,4107,,1257346704943419111;
->xmalloc,,1257346704943425896;
->xstrdup,,1257346704943430401;
-<xstrdup,,4108,,1257346704943435303;
-<xmalloc,,4109,,1257346704943456036;
->xmalloc,,1257346704943462776;
->xstrdup,,1257346704943467269;
-<xstrdup,,4110,,1257346704943472114;
-<xmalloc,,4111,,1257346704943492170;
->xmalloc,,1257346704943498886;
->xstrdup,,1257346704943503379;
-<xstrdup,,4112,,1257346704943508242;
-<xmalloc,,4113,,1257346704943528127;
->xmalloc,,1257346704943534969;
->xstrdup,,1257346704943539384;
-<xstrdup,,4114,,1257346704943544283;
-<xmalloc,,4115,,1257346704943564084;
->xmalloc,,1257346704943570781;
->xstrdup,,1257346704943575188;
-<xstrdup,,4116,,1257346704943580108;
-<xmalloc,,4117,,1257346704943600300;
->xmalloc,,1257346704943611965;
->xstrdup,,1257346704943616374;
-<xstrdup,,4118,,1257346704943621315;
-<xmalloc,,4119,,1257346704943642003;
->xmalloc,,1257346704943648758;
->xstrdup,,1257346704943653152;
-<xstrdup,,4120,,1257346704943658075;
-<xmalloc,,4121,,1257346704943677903;
->xmalloc,,1257346704943684663;
->xstrdup,,1257346704943689057;
-<xstrdup,,4122,,1257346704943693968;
-<xmalloc,,4123,,1257346704943713724;
->xmalloc,,1257346704943720515;
->xstrdup,,1257346704943724936;
-<xstrdup,,4124,,1257346704943729841;
-<xmalloc,,4125,,1257346704943749952;
->xmalloc,,1257346704943756664;
->xstrdup,,1257346704943761139;
-<xstrdup,,4126,,1257346704943766059;
-<xmalloc,,4127,,1257346704943785999;
->xmalloc,,1257346704943792732;
->xstrdup,,1257346704943797234;
-<xstrdup,,4128,,1257346704943802118;
-<xmalloc,,4129,,1257346704943822079;
->xmalloc,,1257346704943828909;
->xstrdup,,1257346704943833305;
-<xstrdup,,4130,,1257346704943838208;
-<xmalloc,,4131,,1257346704943858321;
->xmalloc,,1257346704943865034;
->xstrdup,,1257346704943869461;
-<xstrdup,,4132,,1257346704943874441;
-<xmalloc,,4133,,1257346704943894768;
->xmalloc,,1257346704943901535;
->xstrdup,,1257346704943905929;
-<xstrdup,,4134,,1257346704943910801;
-<xmalloc,,4135,,1257346704943931026;
->xmalloc,,1257346704943937769;
->xstrdup,,1257346704943942159;
-<xstrdup,,4136,,1257346704943947062;
-<xmalloc,,4137,,1257346704943966853;
->xmalloc,,1257346704943973575;
->xstrdup,,1257346704943978053;
-<xstrdup,,4138,,1257346704943982988;
-<xmalloc,,4139,,1257346704944002882;
->xmalloc,,1257346704944009619;
->xstrdup,,1257346704944014118;
-<xstrdup,,4140,,1257346704944018972;
-<xmalloc,,4141,,1257346704944039095;
->xmalloc,,1257346704944045882;
->xstrdup,,1257346704944050412;
-<xstrdup,,4142,,1257346704944055311;
-<xmalloc,,4143,,1257346704944075427;
->xmalloc,,1257346704944082236;
->xstrdup,,1257346704944086729;
-<xstrdup,,4144,,1257346704944091625;
-<xmalloc,,4145,,1257346704944112344;
->xmalloc,,1257346704944119279;
->xstrdup,,1257346704944123676;
-<xstrdup,,4146,,1257346704944128713;
-<xmalloc,,4147,,1257346704944148854;
->xmalloc,,1257346704944155699;
->xstrdup,,1257346704944160099;
-<xstrdup,,4148,,1257346704944164983;
-<xmalloc,,4149,,1257346704944184859;
->xmalloc,,1257346704944191584;
->xstrdup,,1257346704944195980;
-<xstrdup,,4150,,1257346704944200867;
-<xmalloc,,4151,,1257346704944220593;
->xmalloc,,1257346704944227324;
->xstrdup,,1257346704944231730;
-<xstrdup,,4152,,1257346704944236617;
-<xmalloc,,4153,,1257346704944256352;
->xmalloc,,1257346704944263079;
->xstrdup,,1257346704944267467;
-<xstrdup,,4154,,1257346704944272357;
-<xmalloc,,4155,,1257346704944292251;
->xmalloc,,1257346704944298991;
->xstrdup,,1257346704944303496;
-<xstrdup,,4156,,1257346704944308380;
-<xmalloc,,4157,,1257346704944328831;
->xmalloc,,1257346704944335561;
->xstrdup,,1257346704944340048;
-<xstrdup,,4158,,1257346704944344929;
-<xmalloc,,4159,,1257346704944364757;
->xmalloc,,1257346704944371509;
->xstrdup,,1257346704944375918;
-<xstrdup,,4160,,1257346704944380814;
-<xmalloc,,4161,,1257346704944401207;
->xmalloc,,1257346704944408013;
->xstrdup,,1257346704944412398;
-<xstrdup,,4162,,1257346704944417285;
-<xmalloc,,4163,,1257346704944436902;
->xmalloc,,1257346704944443654;
->xstrdup,,1257346704944448060;
-<xstrdup,,4164,,1257346704944452950;
-<xmalloc,,4165,,1257346704944472697;
->xmalloc,,1257346704944479412;
->xstrdup,,1257346704944483809;
-<xstrdup,,4166,,1257346704944488666;
-<xmalloc,,4167,,1257346704944510356;
->xmalloc,,1257346704944517098;
->xstrdup,,1257346704944521477;
-<xstrdup,,4168,,1257346704944526415;
-<xmalloc,,4169,,1257346704944547068;
->xmalloc,,1257346704944553834;
->xstrdup,,1257346704944558315;
-<xstrdup,,4170,,1257346704944563296;
-<xmalloc,,4171,,1257346704944584077;
->xmalloc,,1257346704944590822;
->xstrdup,,1257346704944595319;
-<xstrdup,,4172,,1257346704944600251;
-<xmalloc,,4173,,1257346704944626315;
->xmalloc,,1257346704944633220;
->xstrdup,,1257346704944637722;
-<xstrdup,,4174,,1257346704944642648;
-<xmalloc,,4175,,1257346704944662563;
->xmalloc,,1257346704944669267;
->xstrdup,,1257346704944673751;
-<xstrdup,,4176,,1257346704944678650;
-<xmalloc,,4177,,1257346704944698808;
->xmalloc,,1257346704944705744;
->xstrdup,,1257346704944710138;
-<xstrdup,,4178,,1257346704944715058;
-<xmalloc,,4179,,1257346704944735469;
->xmalloc,,1257346704944742233;
->xstrdup,,1257346704944746636;
-<xstrdup,,4180,,1257346704944751541;
-<xmalloc,,4181,,1257346704944771931;
->xmalloc,,1257346704944778650;
->xstrdup,,1257346704944783050;
-<xstrdup,,4182,,1257346704944787973;
-<xmalloc,,4183,,1257346704944808285;
->xmalloc,,1257346704944815088;
->xstrdup,,1257346704944819478;
-<xstrdup,,4184,,1257346704944824423;
-<xmalloc,,4185,,1257346704944844858;
->xmalloc,,1257346704944851646;
->xstrdup,,1257346704944856142;
-<xstrdup,,4186,,1257346704944861020;
-<xmalloc,,4187,,1257346704944881047;
->xmalloc,,1257346704944887789;
->xstrdup,,1257346704944892276;
-<xstrdup,,4188,,1257346704944897194;
-<xmalloc,,4189,,1257346704944918865;
->xmalloc,,1257346704944925623;
->xstrdup,,1257346704944930116;
-<xstrdup,,4190,,1257346704944935012;
-<xmalloc,,4191,,1257346704944955718;
->xmalloc,,1257346704944962319;
->xstrdup,,1257346704944966761;
-<xstrdup,,4192,,1257346704944971633;
-<xmalloc,,4193,,1257346704944992045;
->xmalloc,,1257346704944998899;
->xstrdup,,1257346704945003299;
-<xstrdup,,4194,,1257346704945008204;
-<xmalloc,,4195,,1257346704945028534;
->xmalloc,,1257346704945035298;
->xstrdup,,1257346704945039686;
-<xstrdup,,4196,,1257346704945044572;
-<xmalloc,,4197,,1257346704945064319;
->xmalloc,,1257346704945071095;
->xstrdup,,1257346704945075495;
-<xstrdup,,4198,,1257346704945080439;
-<xmalloc,,4199,,1257346704945100502;
->xmalloc,,1257346704945107323;
->xstrdup,,1257346704945111704;
-<xstrdup,,4200,,1257346704945116724;
-<xmalloc,,4201,,1257346704945136852;
->xmalloc,,1257346704945143556;
->xstrdup,,1257346704945148043;
-<xstrdup,,4202,,1257346704945152945;
-<xmalloc,,4203,,1257346704945173489;
->xmalloc,,1257346704945180193;
->xstrdup,,1257346704945184677;
-<xstrdup,,4204,,1257346704945189582;
-<xmalloc,,4205,,1257346704945210480;
->xmalloc,,1257346704945217235;
->xstrdup,,1257346704945221707;
-<xstrdup,,4206,,1257346704945226612;
-<xmalloc,,4207,,1257346704945247072;
->xmalloc,,1257346704945253790;
->xstrdup,,1257346704945258271;
-<xstrdup,,4208,,1257346704945263273;
-<xmalloc,,4209,,1257346704945283594;
->xmalloc,,1257346704945290415;
->xstrdup,,1257346704945294830;
-<xstrdup,,4210,,1257346704945299693;
-<xmalloc,,4211,,1257346704945320098;
->xmalloc,,1257346704945326907;
->xstrdup,,1257346704945331304;
-<xstrdup,,4212,,1257346704945336233;
-<xmalloc,,4213,,1257346704945356344;
->xmalloc,,1257346704945363053;
->xstrdup,,1257346704945367435;
-<xstrdup,,4214,,1257346704945372346;
-<xmalloc,,4215,,1257346704945392505;
->xmalloc,,1257346704945399178;
->xstrdup,,1257346704945403557;
-<xstrdup,,4216,,1257346704945408471;
-<xmalloc,,4217,,1257346704945428883;
->xmalloc,,1257346704945435650;
->xstrdup,,1257346704945440146;
-<xstrdup,,4218,,1257346704945445291;
-<xmalloc,,4219,,1257346704945465324;
->xmalloc,,1257346704945472000;
->xstrdup,,1257346704945476385;
-<xstrdup,,4220,,1257346704945481284;
-<xmalloc,,4221,,1257346704945501440;
->xmalloc,,1257346704945508201;
->xstrdup,,1257346704945512694;
-<xstrdup,,4222,,1257346704945517590;
-<xmalloc,,4223,,1257346704945537589;
->xmalloc,,1257346704945544296;
->xstrdup,,1257346704945548777;
-<xstrdup,,4224,,1257346704945553673;
-<xmalloc,,4225,,1257346704945574078;
->xmalloc,,1257346704945580875;
->xstrdup,,1257346704945585266;
-<xstrdup,,4226,,1257346704945590126;
-<xmalloc,,4227,,1257346704945614909;
->xmalloc,,1257346704945622154;
->xstrdup,,1257346704945626653;
-<xstrdup,,4228,,1257346704945631600;
-<xmalloc,,4229,,1257346704945652616;
->xmalloc,,1257346704945659335;
->xstrdup,,1257346704945663747;
-<xstrdup,,4230,,1257346704945668829;
-<xmalloc,,4231,,1257346704945688964;
->xmalloc,,1257346704945695686;
->xstrdup,,1257346704945700088;
-<xstrdup,,4232,,1257346704945705015;
-<xmalloc,,4233,,1257346704945724876;
->xmalloc,,1257346704945731486;
->xstrdup,,1257346704945736120;
-<xstrdup,,4234,,1257346704945740998;
-<xmalloc,,4235,,1257346704945761028;
->xmalloc,,1257346704945767734;
->xstrdup,,1257346704945772249;
-<xstrdup,,4236,,1257346704945777091;
-<xmalloc,,4237,,1257346704945797415;
->xmalloc,,1257346704945804121;
->xstrdup,,1257346704945808599;
-<xstrdup,,4238,,1257346704945813519;
-<xmalloc,,4239,,1257346704945833639;
->xmalloc,,1257346704945840343;
->xstrdup,,1257346704945844926;
-<xstrdup,,4240,,1257346704945849813;
-<xmalloc,,4241,,1257346704945870411;
->xmalloc,,1257346704945877208;
->xstrdup,,1257346704945881602;
-<xstrdup,,4242,,1257346704945886462;
-<xmalloc,,4243,,1257346704945906275;
->xmalloc,,1257346704945912981;
->xstrdup,,1257346704945917387;
-<xstrdup,,4244,,1257346704945922220;
-<xmalloc,,4245,,1257346704945942150;
->xmalloc,,1257346704945948890;
->xstrdup,,1257346704945953278;
-<xstrdup,,4246,,1257346704945958177;
-<xmalloc,,4247,,1257346704945978820;
->xmalloc,,1257346704945985493;
->xstrdup,,1257346704945989878;
-<xstrdup,,4248,,1257346704945994750;
-<xmalloc,,4249,,1257346704946015141;
->xmalloc,,1257346704946021820;
->xstrdup,,1257346704946026298;
-<xstrdup,,4250,,1257346704946031155;
-<xmalloc,,4251,,1257346704946051509;
->xmalloc,,1257346704946058180;
->xstrdup,,1257346704946062736;
-<xstrdup,,4252,,1257346704946067647;
-<xmalloc,,4253,,1257346704946088371;
->xmalloc,,1257346704946095111;
->xstrdup,,1257346704946099595;
-<xstrdup,,4254,,1257346704946104491;
-<xmalloc,,4255,,1257346704946124852;
->xmalloc,,1257346704946131558;
->xstrdup,,1257346704946136036;
-<xstrdup,,4256,,1257346704946140917;
-<xmalloc,,4257,,1257346704946161028;
->xmalloc,,1257346704946167909;
->xstrdup,,1257346704946172312;
-<xstrdup,,4258,,1257346704946177283;
-<xmalloc,,4259,,1257346704946197634;
->xmalloc,,1257346704946204431;
->xstrdup,,1257346704946208834;
-<xstrdup,,4260,,1257346704946213817;
-<xmalloc,,4261,,1257346704946234836;
->xmalloc,,1257346704946241633;
->xstrdup,,1257346704946246024;
-<xstrdup,,4262,,1257346704946250914;
-<xmalloc,,4263,,1257346704946271746;
->xmalloc,,1257346704946278504;
->xstrdup,,1257346704946282913;
-<xstrdup,,4264,,1257346704946287893;
-<xmalloc,,4265,,1257346704946308503;
->xmalloc,,1257346704946315201;
->xstrdup,,1257346704946319682;
-<xstrdup,,4266,,1257346704946324551;
-<xmalloc,,4267,,1257346704946344782;
->xmalloc,,1257346704946351464;
->xstrdup,,1257346704946355960;
-<xstrdup,,4268,,1257346704946360883;
-<xmalloc,,4269,,1257346704946381319;
->xmalloc,,1257346704946388038;
->xstrdup,,1257346704946392522;
-<xstrdup,,4270,,1257346704946397496;
-<xmalloc,,4271,,1257346704946418341;
->xmalloc,,1257346704946425062;
->xstrdup,,1257346704946429570;
-<xstrdup,,4272,,1257346704946434451;
-<xmalloc,,4273,,1257346704946455151;
->xmalloc,,1257346704946461837;
->xstrdup,,1257346704946466243;
-<xstrdup,,4274,,1257346704946471190;
-<xmalloc,,4275,,1257346704946491514;
->xmalloc,,1257346704946498245;
->xstrdup,,1257346704946502651;
-<xstrdup,,4276,,1257346704946507538;
-<xmalloc,,4277,,1257346704946528253;
->xmalloc,,1257346704946535140;
->xstrdup,,1257346704946539531;
-<xstrdup,,4278,,1257346704946544454;
-<xmalloc,,4279,,1257346704946564646;
->xmalloc,,1257346704946571373;
->xstrdup,,1257346704946575776;
-<xstrdup,,4280,,1257346704946580672;
-<xmalloc,,4281,,1257346704946605105;
->xmalloc,,1257346704946612356;
->xstrdup,,1257346704946616780;
-<xstrdup,,4282,,1257346704946621694;
-<xmalloc,,4283,,1257346704946642439;
->xmalloc,,1257346704946649194;
->xstrdup,,1257346704946653687;
-<xstrdup,,4284,,1257346704946658574;
-<xmalloc,,4285,,1257346704946678847;
->xmalloc,,1257346704946685578;
->xstrdup,,1257346704946690086;
-<xstrdup,,4286,,1257346704946694961;
-<xmalloc,,4287,,1257346704946716007;
->xmalloc,,1257346704946722657;
->xstrdup,,1257346704946727231;
-<xstrdup,,4288,,1257346704946732073;
-<xmalloc,,4289,,1257346704946752779;
->xmalloc,,1257346704946759492;
->xstrdup,,1257346704946763867;
-<xstrdup,,4290,,1257346704946768775;
-<xmalloc,,4291,,1257346704946788955;
->xmalloc,,1257346704946795812;
->xstrdup,,1257346704946800206;
-<xstrdup,,4292,,1257346704946805144;
-<xmalloc,,4293,,1257346704946825174;
->xmalloc,,1257346704946831965;
->xstrdup,,1257346704946836362;
-<xstrdup,,4294,,1257346704946841210;
-<xmalloc,,4295,,1257346704946861525;
->xmalloc,,1257346704946868300;
->xstrdup,,1257346704946872709;
-<xstrdup,,4296,,1257346704946877650;
-<xmalloc,,4297,,1257346704946898023;
->xmalloc,,1257346704946904763;
->xstrdup,,1257346704946909258;
-<xstrdup,,4298,,1257346704946914155;
-<xmalloc,,4299,,1257346704946935276;
->xmalloc,,1257346704946942057;
->xstrdup,,1257346704946946578;
-<xstrdup,,4300,,1257346704946951423;
-<xmalloc,,4301,,1257346704946971651;
->xmalloc,,1257346704946978390;
->xstrdup,,1257346704946982908;
-<xstrdup,,4302,,1257346704946987774;
-<xmalloc,,4303,,1257346704947007749;
->xmalloc,,1257346704947014486;
->xstrdup,,1257346704947018985;
-<xstrdup,,4304,,1257346704947023872;
-<xmalloc,,4305,,1257346704947044229;
->xmalloc,,1257346704947051137;
->xstrdup,,1257346704947055540;
-<xstrdup,,4306,,1257346704947060469;
-<xmalloc,,4307,,1257346704947080396;
->xmalloc,,1257346704947087160;
->xstrdup,,1257346704947091566;
-<xstrdup,,4308,,1257346704947096414;
-<xmalloc,,4309,,1257346704947116419;
->xmalloc,,1257346704947123198;
->xstrdup,,1257346704947127589;
-<xstrdup,,4310,,1257346704947132479;
-<xmalloc,,4311,,1257346704947153035;
->xmalloc,,1257346704947159819;
->xstrdup,,1257346704947164234;
-<xstrdup,,4312,,1257346704947169128;
-<xmalloc,,4313,,1257346704947189265;
->xmalloc,,1257346704947195912;
->xstrdup,,1257346704947200272;
-<xstrdup,,4314,,1257346704947205175;
-<xmalloc,,4315,,1257346704947225712;
->xmalloc,,1257346704947232443;
->xstrdup,,1257346704947236948;
-<xstrdup,,4316,,1257346704947241859;
-<xmalloc,,4317,,1257346704947261841;
->xmalloc,,1257346704947268571;
->xstrdup,,1257346704947273061;
-<xstrdup,,4318,,1257346704947277930;
-<xmalloc,,4319,,1257346704947298657;
->xmalloc,,1257346704947305364;
->xstrdup,,1257346704947309872;
-<xstrdup,,4320,,1257346704947314702;
-<xmalloc,,4321,,1257346704947335261;
->xmalloc,,1257346704947342190;
->xstrdup,,1257346704947346602;
-<xstrdup,,4322,,1257346704947351519;
-<xmalloc,,4323,,1257346704947371380;
->xmalloc,,1257346704947378105;
->xstrdup,,1257346704947382501;
-<xstrdup,,4324,,1257346704947387491;
-<xmalloc,,4325,,1257346704947407674;
->xmalloc,,1257346704947414633;
->xstrdup,,1257346704947419039;
-<xstrdup,,4326,,1257346704947423905;
-<xmalloc,,4327,,1257346704947443748;
->xmalloc,,1257346704947450478;
->xstrdup,,1257346704947454869;
-<xstrdup,,4328,,1257346704947459750;
-<xmalloc,,4329,,1257346704947479675;
->xmalloc,,1257346704947486486;
->xstrdup,,1257346704947490979;
-<xstrdup,,4330,,1257346704947495873;
-<xmalloc,,4331,,1257346704947516500;
->xmalloc,,1257346704947523267;
->xstrdup,,1257346704947527748;
-<xstrdup,,4332,,1257346704947532602;
-<xmalloc,,4333,,1257346704947552782;
->xmalloc,,1257346704947559513;
->xstrdup,,1257346704947563913;
-<xstrdup,,4334,,1257346704947568818;
-<xmalloc,,4335,,1257346704947589524;
->xmalloc,,1257346704947596236;
->xstrdup,,1257346704947606697;
-<xstrdup,,4336,,1257346704947614696;
-<xmalloc,,4337,,1257346704947636509;
->xmalloc,,1257346704947643492;
->xstrdup,,1257346704947647949;
-<xstrdup,,4338,,1257346704947652966;
-<xmalloc,,4339,,1257346704947673437;
->xmalloc,,1257346704947680210;
->xstrdup,,1257346704947684637;
-<xstrdup,,4340,,1257346704947689506;
-<xmalloc,,4341,,1257346704947710095;
->xmalloc,,1257346704947716877;
->xstrdup,,1257346704947721280;
-<xstrdup,,4342,,1257346704947726164;
-<xmalloc,,4343,,1257346704947746040;
->xmalloc,,1257346704947752794;
->xstrdup,,1257346704947757185;
-<xstrdup,,4344,,1257346704947762087;
-<xmalloc,,4345,,1257346704947782008;
->xmalloc,,1257346704947788769;
->xstrdup,,1257346704947793160;
-<xstrdup,,4346,,1257346704947798032;
-<xmalloc,,4347,,1257346704947817950;
->xmalloc,,1257346704947824705;
->xstrdup,,1257346704947829189;
-<xstrdup,,4348,,1257346704947834058;
-<xmalloc,,4349,,1257346704947854878;
->xmalloc,,1257346704947861630;
->xstrdup,,1257346704947866132;
-<xstrdup,,4350,,1257346704947871031;
-<xmalloc,,4351,,1257346704947891861;
->xmalloc,,1257346704947898570;
->xstrdup,,1257346704947903055;
-<xstrdup,,4352,,1257346704947907923;
-<xmalloc,,4353,,1257346704947928729;
->xmalloc,,1257346704947935583;
->xstrdup,,1257346704947939989;
-<xstrdup,,4354,,1257346704947944849;
-<xmalloc,,4355,,1257346704947965516;
->xmalloc,,1257346704947972273;
->xstrdup,,1257346704947976721;
-<xstrdup,,4356,,1257346704947981720;
-<xmalloc,,4357,,1257346704948002092;
->xmalloc,,1257346704948008913;
->xstrdup,,1257346704948013310;
-<xstrdup,,4358,,1257346704948018245;
-<xmalloc,,4359,,1257346704948038265;
->xmalloc,,1257346704948044987;
->xstrdup,,1257346704948049387;
-<xstrdup,,4360,,1257346704948054202;
-<xmalloc,,4361,,1257346704948074006;
->xmalloc,,1257346704948080709;
->xstrdup,,1257346704948085193;
-<xstrdup,,4362,,1257346704948090062;
-<xmalloc,,4363,,1257346704948110702;
->xmalloc,,1257346704948117406;
->xstrdup,,1257346704948121893;
-<xstrdup,,4364,,1257346704948126795;
-<xmalloc,,4365,,1257346704948147173;
->xmalloc,,1257346704948153910;
->xstrdup,,1257346704948158406;
-<xstrdup,,4366,,1257346704948163308;
-<xmalloc,,4367,,1257346704948184180;
->xmalloc,,1257346704948190877;
->xstrdup,,1257346704948195349;
-<xstrdup,,4368,,1257346704948200263;
-<xmalloc,,4369,,1257346704948220332;
->xmalloc,,1257346704948227141;
->xstrdup,,1257346704948231538;
-<xstrdup,,4370,,1257346704948236443;
-<xmalloc,,4371,,1257346704948256295;
->xmalloc,,1257346704948263010;
->xstrdup,,1257346704948267425;
-<xstrdup,,4372,,1257346704948272267;
-<xmalloc,,4373,,1257346704948292655;
->xmalloc,,1257346704948299385;
->xstrdup,,1257346704948303782;
-<xstrdup,,4374,,1257346704948308603;
-<xmalloc,,4375,,1257346704948329222;
->xmalloc,,1257346704948335892;
->xstrdup,,1257346704948340413;
-<xstrdup,,4376,,1257346704948345300;
-<xmalloc,,4377,,1257346704948365474;
->xmalloc,,1257346704948372225;
->xstrdup,,1257346704948376646;
-<xstrdup,,4378,,1257346704948381494;
-<xmalloc,,4379,,1257346704948402104;
->xmalloc,,1257346704948408871;
->xstrdup,,1257346704948413349;
-<xstrdup,,4380,,1257346704948418218;
-<xmalloc,,4381,,1257346704948438226;
->xmalloc,,1257346704948444966;
->xstrdup,,1257346704948449471;
-<xstrdup,,4382,,1257346704948454331;
-<xmalloc,,4383,,1257346704948476030;
->xmalloc,,1257346704948482757;
->xstrdup,,1257346704948487232;
-<xstrdup,,4384,,1257346704948492110;
-<xmalloc,,4385,,1257346704948512985;
->xmalloc,,1257346704948519962;
->xstrdup,,1257346704948524374;
-<xstrdup,,4386,,1257346704948529225;
-<xmalloc,,4387,,1257346704948549838;
->xmalloc,,1257346704948556581;
->xstrdup,,1257346704948560990;
-<xstrdup,,4388,,1257346704948565883;
-<xmalloc,,4389,,1257346704948585981;
->xmalloc,,1257346704948592706;
->xstrdup,,1257346704948597109;
-<xstrdup,,4390,,1257346704948606428;
-<xmalloc,,4391,,1257346704948627200;
->xmalloc,,1257346704948634093;
->xstrdup,,1257346704948638583;
-<xstrdup,,4392,,1257346704948643473;
-<xmalloc,,4393,,1257346704948663566;
->xmalloc,,1257346704948670357;
->xstrdup,,1257346704948674748;
-<xstrdup,,4394,,1257346704948679604;
-<xmalloc,,4395,,1257346704948699655;
->xmalloc,,1257346704948706377;
->xstrdup,,1257346704948710797;
-<xstrdup,,4396,,1257346704948715667;
-<xmalloc,,4397,,1257346704948736282;
->xmalloc,,1257346704948743019;
->xstrdup,,1257346704948747581;
-<xstrdup,,4398,,1257346704948752604;
-<xmalloc,,4399,,1257346704948772694;
->xmalloc,,1257346704948779415;
->xstrdup,,1257346704948783806;
-<xstrdup,,4400,,1257346704948788666;
-<xmalloc,,4401,,1257346704948809140;
->xmalloc,,1257346704948815901;
->xstrdup,,1257346704948820274;
-<xstrdup,,4402,,1257346704948825116;
-<xmalloc,,4403,,1257346704948845236;
->xmalloc,,1257346704948851975;
->xstrdup,,1257346704948856393;
-<xstrdup,,4404,,1257346704948861316;
-<xmalloc,,4405,,1257346704948881472;
->xmalloc,,1257346704948888218;
->xstrdup,,1257346704948892606;
-<xstrdup,,4406,,1257346704948897469;
-<xmalloc,,4407,,1257346704948917877;
->xmalloc,,1257346704948924614;
->xstrdup,,1257346704948929008;
-<xstrdup,,4408,,1257346704948933889;
-<xmalloc,,4409,,1257346704948954592;
->xmalloc,,1257346704948961337;
->xstrdup,,1257346704948965725;
-<xstrdup,,4410,,1257346704948970621;
-<xmalloc,,4411,,1257346704948991721;
->xmalloc,,1257346704948998428;
->xstrdup,,1257346704949002894;
-<xstrdup,,4412,,1257346704949007775;
-<xmalloc,,4413,,1257346704949028313;
->xmalloc,,1257346704949035050;
->xstrdup,,1257346704949039519;
-<xstrdup,,4414,,1257346704949044430;
-<xmalloc,,4415,,1257346704949064483;
->xmalloc,,1257346704949071196;
->xstrdup,,1257346704949075671;
-<xstrdup,,4416,,1257346704949080558;
-<xmalloc,,4417,,1257346704949100876;
->xmalloc,,1257346704949107691;
->xstrdup,,1257346704949112079;
-<xstrdup,,4418,,1257346704949116939;
-<xmalloc,,4419,,1257346704949137359;
->xmalloc,,1257346704949144054;
->xstrdup,,1257346704949148430;
-<xstrdup,,4420,,1257346704949153298;
-<xmalloc,,4421,,1257346704949173794;
->xmalloc,,1257346704949180516;
->xstrdup,,1257346704949184910;
-<xstrdup,,4422,,1257346704949189785;
-<xmalloc,,4423,,1257346704949210049;
->xmalloc,,1257346704949216812;
->xstrdup,,1257346704949221203;
-<xstrdup,,4424,,1257346704949226174;
-<xmalloc,,4425,,1257346704949247326;
->xmalloc,,1257346704949254101;
->xstrdup,,1257346704949258586;
-<xstrdup,,4426,,1257346704949263494;
-<xmalloc,,4427,,1257346704949283568;
->xmalloc,,1257346704949290320;
->xstrdup,,1257346704949294804;
-<xstrdup,,4428,,1257346704949299670;
-<xmalloc,,4429,,1257346704949320114;
->xmalloc,,1257346704949326878;
->xstrdup,,1257346704949331356;
-<xstrdup,,4430,,1257346704949336436;
-<xmalloc,,4431,,1257346704949356652;
->xmalloc,,1257346704949363367;
->xstrdup,,1257346704949367854;
-<xstrdup,,4432,,1257346704949372718;
-<xmalloc,,4433,,1257346704949393192;
->xmalloc,,1257346704949400076;
->xstrdup,,1257346704949404452;
-<xstrdup,,4434,,1257346704949409435;
-<xmalloc,,4435,,1257346704949430084;
->xmalloc,,1257346704949436938;
->xstrdup,,1257346704949441347;
-<xstrdup,,4436,,1257346704949446234;
-<xmalloc,,4437,,1257346704949466691;
->xmalloc,,1257346704949473433;
->xstrdup,,1257346704949477839;
-<xstrdup,,4438,,1257346704949482753;
-<xmalloc,,4439,,1257346704949502638;
->xmalloc,,1257346704949509414;
->xstrdup,,1257346704949513817;
-<xstrdup,,4440,,1257346704949518686;
-<xmalloc,,4441,,1257346704949539061;
->xmalloc,,1257346704949545855;
->xstrdup,,1257346704949550339;
-<xstrdup,,4442,,1257346704949555187;
-<xmalloc,,4443,,1257346704949575319;
->xmalloc,,1257346704949582086;
->xstrdup,,1257346704949586582;
-<xstrdup,,4444,,1257346704949591451;
-<xmalloc,,4445,,1257346704949619203;
->xmalloc,,1257346704949626739;
->xstrdup,,1257346704949631304;
-<xstrdup,,4446,,1257346704949636495;
-<xmalloc,,4447,,1257346704949657400;
->xmalloc,,1257346704949667682;
->xstrdup,,1257346704949672296;
-<xstrdup,,4448,,1257346704949677210;
-<xmalloc,,4449,,1257346704949699579;
->xmalloc,,1257346704949706454;
->xstrdup,,1257346704949710869;
-<xstrdup,,4450,,1257346704949715750;
-<xmalloc,,4451,,1257346704949736107;
->xmalloc,,1257346704949742811;
->xstrdup,,1257346704949747223;
-<xstrdup,,4452,,1257346704949752113;
-<xmalloc,,4453,,1257346704949772807;
->xmalloc,,1257346704949779474;
->xstrdup,,1257346704949783974;
-<xstrdup,,4454,,1257346704949788867;
-<xmalloc,,4455,,1257346704949809131;
->xmalloc,,1257346704949815846;
->xstrdup,,1257346704949820246;
-<vec_p_reserve,,4456,,1257346704949833870;
-<vec_o_reserve,,4457,,1257346704949843064;
-<xrealloc,,4458,,1257346704949866221;
->xrealloc,,1257346704949877853;
->vec_o_reserve,,1257346704949882593;
->vec_p_reserve,,1257346704949887222;
-<xstrdup,,4459,,1257346704949892286;
-<xmalloc,,4460,,1257346704949916075;
->xmalloc,,1257346704949923040;
->xstrdup,,1257346704949927476;
-<xstrdup,,4461,,1257346704949932330;
-<xmalloc,,4462,,1257346704949952633;
->xmalloc,,1257346704949959364;
->xstrdup,,1257346704949963767;
-<xstrdup,,4463,,1257346704949968651;
-<xmalloc,,4464,,1257346704949989020;
->xmalloc,,1257346704949995709;
->xstrdup,,1257346704950000091;
-<xstrdup,,4465,,1257346704950004965;
-<xmalloc,,4466,,1257346704950024824;
->xmalloc,,1257346704950031539;
->xstrdup,,1257346704950035933;
-<xstrdup,,4467,,1257346704950040784;
-<xmalloc,,4468,,1257346704950061334;
->xmalloc,,1257346704950068010;
->xstrdup,,1257346704950072494;
-<xstrdup,,4469,,1257346704950077442;
-<xmalloc,,4470,,1257346704950097498;
->xmalloc,,1257346704950104220;
->xstrdup,,1257346704950108704;
-<xstrdup,,4471,,1257346704950113612;
-<xmalloc,,4472,,1257346704950133596;
->xmalloc,,1257346704950140291;
->xstrdup,,1257346704950144769;
-<xstrdup,,4473,,1257346704950149620;
-<xmalloc,,4474,,1257346704950169502;
->xmalloc,,1257346704950176287;
->xstrdup,,1257346704950180677;
-<xstrdup,,4475,,1257346704950185577;
-<xmalloc,,4476,,1257346704950206015;
->xmalloc,,1257346704950212773;
->xstrdup,,1257346704950217164;
-<xstrdup,,4477,,1257346704950222075;
-<xmalloc,,4478,,1257346704950242456;
->xmalloc,,1257346704950249196;
->xstrdup,,1257346704950253581;
-<xstrdup,,4479,,1257346704950258429;
-<xmalloc,,4480,,1257346704950278771;
->xmalloc,,1257346704950285405;
->xstrdup,,1257346704950289793;
-<xstrdup,,4481,,1257346704950294659;
-<xmalloc,,4482,,1257346704950314637;
->xmalloc,,1257346704950321404;
->xstrdup,,1257346704950325804;
-<xstrdup,,4483,,1257346704950330676;
-<xmalloc,,4484,,1257346704950350477;
->xmalloc,,1257346704950357195;
->xstrdup,,1257346704950361586;
-<xstrdup,,4485,,1257346704950366498;
-<xmalloc,,4486,,1257346704950386319;
->xmalloc,,1257346704950393017;
->xstrdup,,1257346704950397492;
-<xstrdup,,4487,,1257346704950402403;
-<xmalloc,,4488,,1257346704950422126;
->xmalloc,,1257346704950428856;
->xstrdup,,1257346704950433329;
-<xstrdup,,4489,,1257346704950438249;
-<xmalloc,,4490,,1257346704950458083;
->xmalloc,,1257346704950464907;
->xstrdup,,1257346704950469300;
-<xstrdup,,4491,,1257346704950474176;
-<xmalloc,,4492,,1257346704950494223;
->xmalloc,,1257346704950500890;
->xstrdup,,1257346704950505281;
-<xstrdup,,4493,,1257346704950510283;
-<xmalloc,,4494,,1257346704950530348;
->xmalloc,,1257346704950537133;
->xstrdup,,1257346704950541554;
-<xstrdup,,4495,,1257346704950546477;
-<xmalloc,,4496,,1257346704950566807;
->xmalloc,,1257346704950573535;
->xstrdup,,1257346704950577938;
-<xstrdup,,4497,,1257346704950582816;
-<xmalloc,,4498,,1257346704950607095;
->xmalloc,,1257346704950614289;
->xstrdup,,1257346704950618812;
-<xstrdup,,4499,,1257346704950623751;
-<xmalloc,,4500,,1257346704950644613;
->xmalloc,,1257346704950651362;
->xstrdup,,1257346704950655834;
-<xstrdup,,4501,,1257346704950660742;
-<xmalloc,,4502,,1257346704950681448;
->xmalloc,,1257346704950688167;
->xstrdup,,1257346704950692645;
-<xstrdup,,4503,,1257346704950697535;
-<xmalloc,,4504,,1257346704950717757;
->xmalloc,,1257346704950724499;
->xstrdup,,1257346704950728974;
-<xstrdup,,4505,,1257346704950733822;
-<xmalloc,,4506,,1257346704950753915;
->xmalloc,,1257346704950760694;
->xstrdup,,1257346704950765067;
-<xstrdup,,4507,,1257346704950770062;
-<xmalloc,,4508,,1257346704950789959;
->xmalloc,,1257346704950796735;
->xstrdup,,1257346704950801123;
-<xstrdup,,4509,,1257346704950805947;
-<xmalloc,,4510,,1257346704950826030;
->xmalloc,,1257346704950832719;
->xstrdup,,1257346704950837101;
-<xstrdup,,4511,,1257346704950841967;
-<xmalloc,,4512,,1257346704950862095;
->xmalloc,,1257346704950868751;
->xstrdup,,1257346704950873142;
-<xstrdup,,4513,,1257346704950878014;
-<xmalloc,,4514,,1257346704950898587;
->xmalloc,,1257346704950905315;
->xstrdup,,1257346704950909706;
-<xstrdup,,4515,,1257346704950914506;
-<xmalloc,,4516,,1257346704950934126;
->xmalloc,,1257346704950940818;
->xstrdup,,1257346704950945209;
-<xstrdup,,4517,,1257346704950950324;
-<xmalloc,,4518,,1257346704950970032;
->xmalloc,,1257346704950976730;
->xstrdup,,1257346704950981195;
-<xstrdup,,4519,,1257346704950986073;
-<xmalloc,,4520,,1257346704951005619;
->xmalloc,,1257346704951012370;
->xstrdup,,1257346704951016755;
-<xstrdup,,4521,,1257346704951021606;
-<xmalloc,,4522,,1257346704951041407;
->xmalloc,,1257346704951048183;
->xstrdup,,1257346704951052559;
-<xstrdup,,4523,,1257346704951057422;
-<xmalloc,,4524,,1257346704951077168;
->xmalloc,,1257346704951083884;
->xstrdup,,1257346704951088269;
-<xstrdup,,4525,,1257346704951093147;
-<xmalloc,,4526,,1257346704951113083;
->xmalloc,,1257346704951119760;
->xstrdup,,1257346704951124136;
-<xstrdup,,4527,,1257346704951129026;
-<xmalloc,,4528,,1257346704951148860;
->xmalloc,,1257346704951155602;
->xstrdup,,1257346704951159984;
-<xstrdup,,4529,,1257346704951164925;
-<xmalloc,,4530,,1257346704951184783;
->xmalloc,,1257346704951191538;
->xstrdup,,1257346704951196010;
-<xstrdup,,4531,,1257346704951200915;
-<xmalloc,,4532,,1257346704951220899;
->xmalloc,,1257346704951227621;
->xstrdup,,1257346704951232099;
-<xstrdup,,4533,,1257346704951236968;
-<xmalloc,,4534,,1257346704951256589;
->xmalloc,,1257346704951263274;
->xstrdup,,1257346704951267749;
-<xstrdup,,4535,,1257346704951272579;
-<xmalloc,,4536,,1257346704951292512;
->xmalloc,,1257346704951299237;
->xstrdup,,1257346704951303709;
-<xstrdup,,4537,,1257346704951308548;
-<xmalloc,,4538,,1257346704951328581;
->xmalloc,,1257346704951335377;
->xstrdup,,1257346704951339756;
-<xstrdup,,4539,,1257346704951344640;
-<xmalloc,,4540,,1257346704951364919;
->xmalloc,,1257346704951371644;
->xstrdup,,1257346704951376023;
-<xstrdup,,4541,,1257346704951380925;
-<xmalloc,,4542,,1257346704951401062;
->xmalloc,,1257346704951407754;
->xstrdup,,1257346704951412139;
-<xstrdup,,4543,,1257346704951416939;
-<xmalloc,,4544,,1257346704951437059;
->xmalloc,,1257346704951443801;
->xstrdup,,1257346704951448189;
-<xstrdup,,4545,,1257346704951452998;
-<xmalloc,,4546,,1257346704951472717;
->xmalloc,,1257346704951479626;
->xstrdup,,1257346704951484005;
-<xstrdup,,4547,,1257346704951488861;
-<xmalloc,,4548,,1257346704951508677;
->xmalloc,,1257346704951515369;
->xstrdup,,1257346704951519754;
-<xstrdup,,4549,,1257346704951524680;
-<xmalloc,,4550,,1257346704951544971;
->xmalloc,,1257346704951551696;
->xstrdup,,1257346704951556113;
-<xstrdup,,4551,,1257346704951560983;
-<xmalloc,,4552,,1257346704951581478;
->xmalloc,,1257346704951588194;
->xstrdup,,1257346704951592618;
-<xstrdup,,4553,,1257346704951597580;
-<xmalloc,,4554,,1257346704951673891;
->xmalloc,,1257346704951681825;
->xstrdup,,1257346704951686342;
-<xstrdup,,4555,,1257346704951691389;
-<xmalloc,,4556,,1257346704951712717;
->xmalloc,,1257346704951719451;
->xstrdup,,1257346704951723905;
-<xstrdup,,4557,,1257346704951728879;
-<xmalloc,,4558,,1257346704951749312;
->xmalloc,,1257346704951756030;
->xstrdup,,1257346704951760439;
-<xstrdup,,4559,,1257346704951765441;
-<xmalloc,,4560,,1257346704951785250;
->xmalloc,,1257346704951792071;
->xstrdup,,1257346704951796453;
-<xstrdup,,4561,,1257346704951801458;
-<xmalloc,,4562,,1257346704951821186;
->xmalloc,,1257346704951827947;
->xstrdup,,1257346704951832344;
-<xstrdup,,4563,,1257346704951837222;
-<xmalloc,,4564,,1257346704951857038;
->xmalloc,,1257346704951863778;
->xstrdup,,1257346704951868277;
-<xstrdup,,4565,,1257346704951873095;
-<xmalloc,,4566,,1257346704951893055;
->xmalloc,,1257346704951899758;
->xstrdup,,1257346704951904251;
-<xstrdup,,4567,,1257346704951909144;
-<xmalloc,,4568,,1257346704951929412;
->xmalloc,,1257346704951936133;
->xstrdup,,1257346704951940626;
-<xstrdup,,4569,,1257346704951945468;
-<xmalloc,,4570,,1257346704951965215;
->xmalloc,,1257346704951972036;
->xstrdup,,1257346704951976448;
-<xstrdup,,4571,,1257346704951981284;
-<xmalloc,,4572,,1257346704952001536;
->xmalloc,,1257346704952008236;
->xstrdup,,1257346704952012642;
-<xstrdup,,4573,,1257346704952017514;
-<xmalloc,,4574,,1257346704952037324;
->xmalloc,,1257346704952044100;
->xstrdup,,1257346704952048503;
-<xstrdup,,4575,,1257346704952053396;
-<xmalloc,,4576,,1257346704952072983;
->xmalloc,,1257346704952079750;
->xstrdup,,1257346704952084156;
-<xstrdup,,4577,,1257346704952089016;
-<xmalloc,,4578,,1257346704952108871;
->xmalloc,,1257346704952115806;
->xstrdup,,1257346704952120314;
-<xstrdup,,4579,,1257346704952125177;
-<xmalloc,,4580,,1257346704952145411;
->xmalloc,,1257346704952152103;
->xstrdup,,1257346704952156511;
-<xstrdup,,4581,,1257346704952161426;
-<xmalloc,,4582,,1257346704952181750;
->xmalloc,,1257346704952188462;
->xstrdup,,1257346704952192880;
-<xstrdup,,4583,,1257346704952197776;
-<xmalloc,,4584,,1257346704952218037;
->xmalloc,,1257346704952224687;
->xstrdup,,1257346704952229093;
-<xstrdup,,4585,,1257346704952233956;
-<xmalloc,,4586,,1257346704952253859;
->xmalloc,,1257346704952260620;
->xstrdup,,1257346704952265019;
-<xstrdup,,4587,,1257346704952269925;
-<xmalloc,,4588,,1257346704952291557;
->xmalloc,,1257346704952298312;
->xstrdup,,1257346704952302709;
-<xstrdup,,4589,,1257346704952307659;
-<xmalloc,,4590,,1257346704952327845;
->xmalloc,,1257346704952334659;
->xstrdup,,1257346704952339035;
-<xstrdup,,4591,,1257346704952344019;
-<xmalloc,,4592,,1257346704952364439;
->xmalloc,,1257346704952371218;
->xstrdup,,1257346704952375612;
-<xstrdup,,4593,,1257346704952380505;
-<xmalloc,,4594,,1257346704952400543;
->xmalloc,,1257346704952407181;
->xstrdup,,1257346704952411662;
-<xstrdup,,4595,,1257346704952416525;
-<xmalloc,,4596,,1257346704952436900;
->xmalloc,,1257346704952443576;
->xstrdup,,1257346704952448052;
-<xstrdup,,4597,,1257346704952452930;
-<xmalloc,,4598,,1257346704952473095;
->xmalloc,,1257346704952479759;
->xstrdup,,1257346704952484276;
-<xstrdup,,4599,,1257346704952489106;
-<xmalloc,,4600,,1257346704952509193;
->xmalloc,,1257346704952515806;
->xstrdup,,1257346704952520239;
-<xstrdup,,4601,,1257346704952525087;
-<xmalloc,,4602,,1257346704952546948;
->xmalloc,,1257346704952553742;
->xstrdup,,1257346704952558127;
-<xstrdup,,4603,,1257346704952563032;
-<xmalloc,,4604,,1257346704952583253;
->xmalloc,,1257346704952589906;
->xstrdup,,1257346704952594336;
-<xstrdup,,4605,,1257346704952599241;
-<xmalloc,,4606,,1257346704952624963;
->xmalloc,,1257346704952632018;
->xstrdup,,1257346704952636436;
-<xstrdup,,4607,,1257346704952641353;
-<xmalloc,,4608,,1257346704952661374;
->xmalloc,,1257346704952668035;
->xstrdup,,1257346704952672426;
-<xstrdup,,4609,,1257346704952677304;
-<xmalloc,,4610,,1257346704952696943;
->xmalloc,,1257346704952703673;
->xstrdup,,1257346704952708025;
-<xstrdup,,4611,,1257346704952713051;
-<xmalloc,,4612,,1257346704952734421;
->xmalloc,,1257346704952741176;
->xstrdup,,1257346704952745564;
-<xstrdup,,4613,,1257346704952750538;
-<xmalloc,,4614,,1257346704952773491;
->xmalloc,,1257346704952780261;
->xstrdup,,1257346704952784811;
-<xstrdup,,4615,,1257346704952789912;
-<xmalloc,,4616,,1257346704952812732;
->xmalloc,,1257346704952819487;
->xstrdup,,1257346704952823968;
-<xstrdup,,4617,,1257346704952828924;
-<xmalloc,,4618,,1257346704952848890;
->xmalloc,,1257346704952855702;
->xstrdup,,1257346704952860093;
-<xstrdup,,4619,,1257346704952865085;
-<xmalloc,,4620,,1257346704952884832;
->xmalloc,,1257346704952891659;
->xstrdup,,1257346704952896038;
-<xstrdup,,4621,,1257346704952900946;
-<xmalloc,,4622,,1257346704952921153;
->xmalloc,,1257346704952927886;
->xstrdup,,1257346704952932304;
-<xstrdup,,4623,,1257346704952937167;
-<xmalloc,,4624,,1257346704952957497;
->xmalloc,,1257346704952964261;
->xstrdup,,1257346704952968646;
-<xstrdup,,4625,,1257346704952973560;
-<xmalloc,,4626,,1257346704952995592;
->xmalloc,,1257346704953002497;
->xstrdup,,1257346704953006894;
-<xstrdup,,4627,,1257346704953011806;
-<xmalloc,,4628,,1257346704953032136;
->xmalloc,,1257346704953038791;
->xstrdup,,1257346704953043354;
-<xstrdup,,4629,,1257346704953048258;
-<xmalloc,,4630,,1257346704953068339;
->xmalloc,,1257346704953074944;
->xstrdup,,1257346704953079488;
-<xstrdup,,4631,,1257346704953084372;
-<xmalloc,,4632,,1257346704953104239;
->xmalloc,,1257346704953110891;
->xstrdup,,1257346704953115354;
-<xstrdup,,4633,,1257346704953120238;
-<xmalloc,,4634,,1257346704953140469;
->xmalloc,,1257346704953147152;
->xstrdup,,1257346704953151537;
-<xstrdup,,4635,,1257346704953156430;
-<xmalloc,,4636,,1257346704953176679;
->xmalloc,,1257346704953183367;
->xstrdup,,1257346704953187749;
-<xstrdup,,4637,,1257346704953192654;
-<xmalloc,,4638,,1257346704953213198;
->xmalloc,,1257346704953220019;
->xstrdup,,1257346704953224359;
-<xstrdup,,4639,,1257346704953229363;
-<xmalloc,,4640,,1257346704953249056;
->xmalloc,,1257346704953255693;
->xstrdup,,1257346704953260120;
-<xstrdup,,4641,,1257346704953265022;
-<xmalloc,,4642,,1257346704953284745;
->xmalloc,,1257346704953291439;
->xstrdup,,1257346704953295800;
-<xstrdup,,4643,,1257346704953300732;
-<xmalloc,,4644,,1257346704953320389;
->xmalloc,,1257346704953327086;
->xstrdup,,1257346704953331477;
-<xstrdup,,4645,,1257346704953336382;
-<xmalloc,,4646,,1257346704953356147;
->xmalloc,,1257346704953362833;
->xstrdup,,1257346704953367299;
-<xstrdup,,4647,,1257346704953372201;
-<xmalloc,,4648,,1257346704953392753;
->xmalloc,,1257346704953399418;
->xstrdup,,1257346704953403977;
-<xstrdup,,4649,,1257346704953408915;
-<xmalloc,,4650,,1257346704953429586;
->xmalloc,,1257346704953436346;
->xstrdup,,1257346704953440686;
-<xstrdup,,4651,,1257346704953445729;
-<xmalloc,,4652,,1257346704953465930;
->xmalloc,,1257346704953472697;
->xstrdup,,1257346704953477082;
-<xstrdup,,4653,,1257346704953482056;
-<xmalloc,,4654,,1257346704953501680;
->xmalloc,,1257346704953508317;
->xstrdup,,1257346704953512657;
-<xstrdup,,4655,,1257346704953517571;
-<xmalloc,,4656,,1257346704953537651;
->xmalloc,,1257346704953544403;
->xstrdup,,1257346704953548833;
-<xstrdup,,4657,,1257346704953553903;
-<xmalloc,,4658,,1257346704953574201;
->xmalloc,,1257346704953581042;
->xstrdup,,1257346704953585436;
-<xstrdup,,4659,,1257346704953590341;
-<xmalloc,,4660,,1257346704953615567;
->xmalloc,,1257346704953622890;
->xstrdup,,1257346704953627395;
-<xstrdup,,4661,,1257346704953632351;
-<xmalloc,,4662,,1257346704953653123;
->xmalloc,,1257346704953659845;
->xstrdup,,1257346704953664314;
-<xstrdup,,4663,,1257346704953669225;
-<xmalloc,,4664,,1257346704953688927;
->xmalloc,,1257346704953695627;
->xstrdup,,1257346704953700093;
-<xstrdup,,4665,,1257346704953705020;
-<xmalloc,,4666,,1257346704953724820;
->xmalloc,,1257346704953731741;
->xstrdup,,1257346704953736122;
-<xstrdup,,4667,,1257346704953740982;
-<xmalloc,,4668,,1257346704953760829;
->xmalloc,,1257346704953767580;
->xstrdup,,1257346704953771959;
-<xstrdup,,4669,,1257346704953776813;
-<xmalloc,,4670,,1257346704953796830;
->xmalloc,,1257346704953803558;
->xstrdup,,1257346704953807925;
-<xstrdup,,4671,,1257346704953812785;
-<xmalloc,,4672,,1257346704953832667;
->xmalloc,,1257346704953839319;
->xstrdup,,1257346704953843728;
-<xstrdup,,4673,,1257346704953848606;
-<xmalloc,,4674,,1257346704953868801;
->xmalloc,,1257346704953875583;
->xstrdup,,1257346704953880073;
-<xstrdup,,4675,,1257346704953884987;
-<xmalloc,,4676,,1257346704953904959;
->xmalloc,,1257346704953911651;
->xstrdup,,1257346704953916051;
-<xstrdup,,4677,,1257346704953920941;
-<xmalloc,,4678,,1257346704953941094;
->xmalloc,,1257346704953947830;
->xstrdup,,1257346704953952296;
-<xstrdup,,4679,,1257346704953957180;
-<xmalloc,,4680,,1257346704953976933;
->xmalloc,,1257346704953983592;
->xstrdup,,1257346704953988070;
-<xstrdup,,4681,,1257346704953992912;
-<xmalloc,,4682,,1257346704954012673;
->xmalloc,,1257346704954019470;
->xstrdup,,1257346704954023831;
-<xstrdup,,4683,,1257346704954028688;
-<xmalloc,,4684,,1257346704954048696;
->xmalloc,,1257346704954055358;
->xstrdup,,1257346704954059755;
-<xstrdup,,4685,,1257346704954064729;
-<xmalloc,,4686,,1257346704954086118;
->xmalloc,,1257346704954093017;
->xstrdup,,1257346704954097396;
-<xstrdup,,4687,,1257346704954102253;
-<xmalloc,,4688,,1257346704954122649;
->xmalloc,,1257346704954129329;
->xstrdup,,1257346704954133702;
-<xstrdup,,4689,,1257346704954138568;
-<xmalloc,,4690,,1257346704954158281;
->xmalloc,,1257346704954165054;
->xstrdup,,1257346704954169436;
-<xstrdup,,4691,,1257346704954174296;
-<xmalloc,,4692,,1257346704954194061;
->xmalloc,,1257346704954200710;
->xstrdup,,1257346704954205170;
-<xstrdup,,4693,,1257346704954210033;
-<xmalloc,,4694,,1257346704954229825;
->xmalloc,,1257346704954236483;
->xstrdup,,1257346704954240931;
-<xstrdup,,4695,,1257346704954245785;
-<xmalloc,,4696,,1257346704954265517;
->xmalloc,,1257346704954272220;
->xstrdup,,1257346704954276621;
-<xstrdup,,4697,,1257346704954281477;
-<xmalloc,,4698,,1257346704954301071;
->xmalloc,,1257346704954308066;
->xstrdup,,1257346704954312436;
-<xstrdup,,4699,,1257346704954317389;
-<xmalloc,,4700,,1257346704954336886;
->xmalloc,,1257346704954343602;
->xstrdup,,1257346704954347996;
-<xstrdup,,4701,,1257346704954352856;
-<xmalloc,,4702,,1257346704954372792;
->xmalloc,,1257346704954379463;
->xstrdup,,1257346704954383841;
-<xstrdup,,4703,,1257346704954388701;
-<xmalloc,,4704,,1257346704954408499;
->xmalloc,,1257346704954415218;
->xstrdup,,1257346704954419633;
-<xstrdup,,4705,,1257346704954424481;
-<xmalloc,,4706,,1257346704954444107;
->xmalloc,,1257346704954450781;
->xstrdup,,1257346704954455178;
-<xstrdup,,4707,,1257346704954459992;
-<xmalloc,,4708,,1257346704954479751;
->xmalloc,,1257346704954486461;
->xstrdup,,1257346704954490842;
-<xstrdup,,4709,,1257346704954495724;
-<xmalloc,,4710,,1257346704954515600;
->xmalloc,,1257346704954522222;
->xstrdup,,1257346704954526682;
-<xstrdup,,4711,,1257346704954531557;
-<xmalloc,,4712,,1257346704954551478;
->xmalloc,,1257346704954558248;
->xstrdup,,1257346704954562720;
-<xstrdup,,4713,,1257346704954567556;
-<xmalloc,,4714,,1257346704954587583;
->xmalloc,,1257346704954594370;
->xstrdup,,1257346704954598761;
-<xstrdup,,4715,,1257346704954607568;
-<xmalloc,,4716,,1257346704954628403;
->xmalloc,,1257346704954635203;
->xstrdup,,1257346704954639630;
-<xstrdup,,4717,,1257346704954644632;
-<xmalloc,,4718,,1257346704954664745;
->xmalloc,,1257346704954671545;
->xstrdup,,1257346704954675891;
-<xstrdup,,4719,,1257346704954680766;
-<xmalloc,,4720,,1257346704954700660;
->xmalloc,,1257346704954707304;
->xstrdup,,1257346704954711730;
-<xstrdup,,4721,,1257346704954716587;
-<xmalloc,,4722,,1257346704954736560;
->xmalloc,,1257346704954743254;
->xstrdup,,1257346704954747648;
-<xstrdup,,4723,,1257346704954752499;
-<xmalloc,,4724,,1257346704954772577;
->xmalloc,,1257346704954779280;
->xstrdup,,1257346704954783752;
-<xstrdup,,4725,,1257346704954788609;
-<xmalloc,,4726,,1257346704954808723;
->xmalloc,,1257346704954815429;
->xstrdup,,1257346704954819904;
-<xstrdup,,4727,,1257346704954824750;
-<xmalloc,,4728,,1257346704954844986;
->xmalloc,,1257346704954851729;
->xstrdup,,1257346704954856204;
-<xstrdup,,4729,,1257346704954861067;
-<xmalloc,,4730,,1257346704954880880;
->xmalloc,,1257346704954887692;
->xstrdup,,1257346704954892119;
-<xstrdup,,4731,,1257346704954896991;
-<xmalloc,,4732,,1257346704954916639;
->xmalloc,,1257346704954923306;
->xstrdup,,1257346704954927733;
-<xstrdup,,4733,,1257346704954932599;
-<xmalloc,,4734,,1257346704954952180;
->xmalloc,,1257346704954958872;
->xstrdup,,1257346704954963208;
-<xstrdup,,4735,,1257346704954968020;
-<xmalloc,,4736,,1257346704954987927;
->xmalloc,,1257346704954994756;
->xstrdup,,1257346704954999183;
-<xstrdup,,4737,,1257346704955004049;
-<xmalloc,,4738,,1257346704955024458;
->xmalloc,,1257346704955031068;
->xstrdup,,1257346704955035414;
-<xstrdup,,4739,,1257346704955040223;
-<xmalloc,,4740,,1257346704955060547;
->xmalloc,,1257346704955067227;
->xstrdup,,1257346704955071647;
-<xstrdup,,4741,,1257346704955076510;
-<xmalloc,,4742,,1257346704955096377;
->xmalloc,,1257346704955103036;
->xstrdup,,1257346704955107487;
-<xstrdup,,4743,,1257346704955112338;
-<xmalloc,,4744,,1257346704955131973;
->xmalloc,,1257346704955138701;
->xstrdup,,1257346704955143176;
-<xstrdup,,4745,,1257346704955148033;
-<xmalloc,,4746,,1257346704955167939;
->xmalloc,,1257346704955174835;
->xstrdup,,1257346704955179175;
-<xstrdup,,4747,,1257346704955184008;
-<xmalloc,,4748,,1257346704955203878;
->xmalloc,,1257346704955210569;
->xstrdup,,1257346704955215054;
-<xstrdup,,4749,,1257346704955219926;
-<xmalloc,,4750,,1257346704955239675;
->xmalloc,,1257346704955246394;
->xstrdup,,1257346704955250863;
-<xstrdup,,4751,,1257346704955255744;
-<xmalloc,,4752,,1257346704955275313;
->xmalloc,,1257346704955281984;
->xstrdup,,1257346704955286378;
-<xstrdup,,4753,,1257346704955291271;
-<xmalloc,,4754,,1257346704955310937;
->xmalloc,,1257346704955317598;
->xstrdup,,1257346704955321935;
-<xstrdup,,4755,,1257346704955332019;
-<xmalloc,,4756,,1257346704955353428;
->xmalloc,,1257346704955360093;
->xstrdup,,1257346704955364574;
-<xstrdup,,4757,,1257346704955369443;
-<xmalloc,,4758,,1257346704955389295;
->xmalloc,,1257346704955395969;
->xstrdup,,1257346704955400477;
-<xstrdup,,4759,,1257346704955405328;
-<xmalloc,,4760,,1257346704955425104;
->xmalloc,,1257346704955431808;
->xstrdup,,1257346704955436226;
-<xstrdup,,4761,,1257346704955441143;
-<xmalloc,,4762,,1257346704955462965;
->xmalloc,,1257346704955469801;
->xstrdup,,1257346704955474186;
-<xstrdup,,4763,,1257346704955479172;
-<xmalloc,,4764,,1257346704955498717;
->xmalloc,,1257346704955505385;
->xstrdup,,1257346704955509797;
-<xstrdup,,4765,,1257346704955514675;
-<xmalloc,,4766,,1257346704955534259;
->xmalloc,,1257346704955540911;
->xstrdup,,1257346704955545260;
-<xstrdup,,4767,,1257346704955550078;
-<xmalloc,,4768,,1257346704955569768;
->xmalloc,,1257346704955576453;
->xstrdup,,1257346704955580814;
-<xstrdup,,4769,,1257346704955585638;
-<xmalloc,,4770,,1257346704955612253;
->xmalloc,,1257346704955623323;
->xstrdup,,1257346704955627891;
-<xstrdup,,4771,,1257346704955632874;
-<xmalloc,,4772,,1257346704955657996;
->xmalloc,,1257346704955664771;
->xstrdup,,1257346704955669304;
-<xstrdup,,4773,,1257346704955674281;
-<xmalloc,,4774,,1257346704955696659;
->xmalloc,,1257346704955703426;
->xstrdup,,1257346704955707922;
-<xstrdup,,4775,,1257346704955712830;
-<xmalloc,,4776,,1257346704955734447;
->xmalloc,,1257346704955741166;
->xstrdup,,1257346704955745692;
-<xstrdup,,4777,,1257346704955750579;
-<xmalloc,,4778,,1257346704955773042;
->xmalloc,,1257346704955779841;
->xstrdup,,1257346704955784302;
-<xstrdup,,4779,,1257346704955789176;
-<xmalloc,,4780,,1257346704955809537;
->xmalloc,,1257346704955816258;
->xstrdup,,1257346704955820640;
-<xstrdup,,4781,,1257346704955825458;
-<xmalloc,,4782,,1257346704955845325;
->xmalloc,,1257346704955852053;
->xstrdup,,1257346704955856444;
-<xstrdup,,4783,,1257346704955861258;
-<xmalloc,,4784,,1257346704955880819;
->xmalloc,,1257346704955887565;
->xstrdup,,1257346704955891955;
-<xstrdup,,4785,,1257346704955896906;
-<xmalloc,,4786,,1257346704955916526;
->xmalloc,,1257346704955923374;
->xstrdup,,1257346704955927759;
-<xstrdup,,4787,,1257346704955932652;
-<xmalloc,,4788,,1257346704955952507;
->xmalloc,,1257346704955959253;
->xstrdup,,1257346704955963725;
-<xstrdup,,4789,,1257346704955968549;
-<xmalloc,,4790,,1257346704955988313;
->xmalloc,,1257346704955994996;
->xstrdup,,1257346704955999462;
-<xstrdup,,4791,,1257346704956004349;
-<xmalloc,,4792,,1257346704956024493;
->xmalloc,,1257346704956031229;
->xstrdup,,1257346704956035707;
-<xstrdup,,4793,,1257346704956040577;
-<xmalloc,,4794,,1257346704956060708;
->xmalloc,,1257346704956067520;
->xstrdup,,1257346704956071908;
-<xstrdup,,4795,,1257346704956076843;
-<xmalloc,,4796,,1257346704956097354;
->xmalloc,,1257346704956104148;
->xstrdup,,1257346704956108529;
-<xstrdup,,4797,,1257346704956113404;
-<xmalloc,,4798,,1257346704956133139;
->xmalloc,,1257346704956139873;
->xstrdup,,1257346704956144291;
-<xstrdup,,4799,,1257346704956149121;
-<xmalloc,,4800,,1257346704956169006;
->xmalloc,,1257346704956175721;
->xstrdup,,1257346704956180112;
-<xstrdup,,4801,,1257346704956184990;
-<xmalloc,,4802,,1257346704956204971;
->xmalloc,,1257346704956211684;
->xstrdup,,1257346704956216105;
-<xstrdup,,4803,,1257346704956220938;
-<xmalloc,,4804,,1257346704956241151;
->xmalloc,,1257346704956247824;
->xstrdup,,1257346704956252332;
-<xstrdup,,4805,,1257346704956257196;
-<xmalloc,,4806,,1257346704956278220;
->xmalloc,,1257346704956285038;
->xstrdup,,1257346704956289513;
-<xstrdup,,4807,,1257346704956294376;
-<xmalloc,,4808,,1257346704956314622;
->xmalloc,,1257346704956321347;
->xstrdup,,1257346704956325840;
-<xstrdup,,4809,,1257346704956330748;
-<xmalloc,,4810,,1257346704956351920;
->xmalloc,,1257346704956358759;
->xstrdup,,1257346704956363147;
-<xstrdup,,4811,,1257346704956368010;
-<xmalloc,,4812,,1257346704956388713;
->xmalloc,,1257346704956395483;
->xstrdup,,1257346704956399889;
-<xstrdup,,4813,,1257346704956404782;
-<xmalloc,,4814,,1257346704956424941;
->xmalloc,,1257346704956431705;
->xstrdup,,1257346704956436089;
-<xstrdup,,4815,,1257346704956440937;
-<xmalloc,,4816,,1257346704956461186;
->xmalloc,,1257346704956467926;
->xstrdup,,1257346704956472320;
-<xstrdup,,4817,,1257346704956477222;
-<xmalloc,,4818,,1257346704956497546;
->xmalloc,,1257346704956504247;
->xstrdup,,1257346704956508740;
-<xstrdup,,4819,,1257346704956513630;
-<xmalloc,,4820,,1257346704956533503;
->xmalloc,,1257346704956540201;
->xstrdup,,1257346704956544618;
-<xstrdup,,4821,,1257346704956549520;
-<xmalloc,,4822,,1257346704956569219;
->xmalloc,,1257346704956575887;
->xstrdup,,1257346704956580308;
-<xstrdup,,4823,,1257346704956585204;
-<xmalloc,,4824,,1257346704956609569;
->xmalloc,,1257346704956616868;
->xstrdup,,1257346704956621376;
-<xstrdup,,4825,,1257346704956626302;
-<xmalloc,,4826,,1257346704956647047;
->xmalloc,,1257346704956653931;
->xstrdup,,1257346704956658322;
-<xstrdup,,4827,,1257346704956663218;
-<xmalloc,,4828,,1257346704956682734;
->xmalloc,,1257346704956689410;
->xstrdup,,1257346704956693798;
-<xstrdup,,4829,,1257346704956698640;
-<xmalloc,,4830,,1257346704956718456;
->xmalloc,,1257346704956725075;
->xstrdup,,1257346704956729445;
-<xstrdup,,4831,,1257346704956734347;
-<xmalloc,,4832,,1257346704956754409;
->xmalloc,,1257346704956761173;
->xstrdup,,1257346704956765561;
-<xstrdup,,4833,,1257346704956770427;
-<xmalloc,,4834,,1257346704956789942;
->xmalloc,,1257346704956796745;
->xstrdup,,1257346704956801133;
-<xstrdup,,4835,,1257346704956805945;
-<xmalloc,,4836,,1257346704956825917;
->xmalloc,,1257346704956832672;
->xstrdup,,1257346704956837057;
-<xstrdup,,4837,,1257346704956841917;
-<xmalloc,,4838,,1257346704956862439;
->xmalloc,,1257346704956869143;
->xstrdup,,1257346704956873615;
-<xstrdup,,4839,,1257346704956878469;
-<xmalloc,,4840,,1257346704956899945;
->xmalloc,,1257346704956906700;
->xstrdup,,1257346704956911193;
-<xstrdup,,4841,,1257346704956916026;
-<xmalloc,,4842,,1257346704956936621;
->xmalloc,,1257346704956943399;
->xstrdup,,1257346704956947796;
-<xstrdup,,4843,,1257346704956952626;
-<xmalloc,,4844,,1257346704956973080;
->xmalloc,,1257346704956979687;
->xstrdup,,1257346704956984063;
-<xstrdup,,4845,,1257346704956988998;
-<xmalloc,,4846,,1257346704957009193;
->xmalloc,,1257346704957015927;
->xstrdup,,1257346704957020390;
-<xstrdup,,4847,,1257346704957025264;
-<xmalloc,,4848,,1257346704957045697;
->xmalloc,,1257346704957052434;
->xstrdup,,1257346704957056848;
-<xstrdup,,4849,,1257346704957061696;
-<xmalloc,,4850,,1257346704957082150;
->xmalloc,,1257346704957088797;
->xstrdup,,1257346704957093220;
-<xstrdup,,4851,,1257346704957098110;
-<xmalloc,,4852,,1257346704957118356;
->xmalloc,,1257346704957124976;
->xstrdup,,1257346704957129484;
-<xstrdup,,4853,,1257346704957134368;
-<xmalloc,,4854,,1257346704957154861;
->xmalloc,,1257346704957161564;
->xstrdup,,1257346704957166009;
-<xstrdup,,4855,,1257346704957170881;
-<xmalloc,,4856,,1257346704957191274;
->xmalloc,,1257346704957197939;
->xstrdup,,1257346704957202438;
-<xstrdup,,4857,,1257346704957207289;
-<xmalloc,,4858,,1257346704957227012;
->xmalloc,,1257346704957233737;
->xstrdup,,1257346704957238166;
-<xstrdup,,4859,,1257346704957243029;
-<xmalloc,,4860,,1257346704957262514;
->xmalloc,,1257346704957269251;
->xstrdup,,1257346704957273603;
-<xstrdup,,4861,,1257346704957278427;
-<xmalloc,,4862,,1257346704957298098;
->xmalloc,,1257346704957304787;
->xstrdup,,1257346704957309160;
-<xstrdup,,4863,,1257346704957314032;
-<xmalloc,,4864,,1257346704957333827;
->xmalloc,,1257346704957340497;
->xstrdup,,1257346704957344873;
-<xstrdup,,4865,,1257346704957349739;
-<xmalloc,,4866,,1257346704957369579;
->xmalloc,,1257346704957376271;
->xstrdup,,1257346704957380694;
-<xstrdup,,4867,,1257346704957385560;
-<xmalloc,,4868,,1257346704957406131;
->xmalloc,,1257346704957412784;
->xstrdup,,1257346704957417247;
-<xstrdup,,4869,,1257346704957422074;
-<xmalloc,,4870,,1257346704957442485;
->xmalloc,,1257346704957449173;
->xstrdup,,1257346704957453640;
-<xstrdup,,4871,,1257346704957458452;
-<xmalloc,,4872,,1257346704957478315;
->xmalloc,,1257346704957485052;
->xstrdup,,1257346704957489425;
-<xstrdup,,4873,,1257346704957494264;
-<xmalloc,,4874,,1257346704957514188;
->xmalloc,,1257346704957520958;
->xstrdup,,1257346704957525337;
-<xstrdup,,4875,,1257346704957530191;
-<xmalloc,,4876,,1257346704957550728;
->xmalloc,,1257346704957557399;
->xstrdup,,1257346704957561730;
-<xstrdup,,4877,,1257346704957566533;
-<xmalloc,,4878,,1257346704957586565;
->xmalloc,,1257346704957593257;
->xstrdup,,1257346704957597689;
-<xstrdup,,4879,,1257346704957608063;
-<xmalloc,,4880,,1257346704957632011;
->xmalloc,,1257346704957639241;
->xstrdup,,1257346704957643834;
-<xstrdup,,4881,,1257346704957648817;
-<xmalloc,,4882,,1257346704957669325;
->xmalloc,,1257346704957676022;
->xstrdup,,1257346704957680428;
-<xstrdup,,4883,,1257346704957685321;
-<xmalloc,,4884,,1257346704957705053;
->xmalloc,,1257346704957711838;
->xstrdup,,1257346704957716334;
-<xstrdup,,4885,,1257346704957721182;
-<xmalloc,,4886,,1257346704957740901;
->xmalloc,,1257346704957747752;
->xstrdup,,1257346704957752242;
-<xstrdup,,4887,,1257346704957757156;
-<xmalloc,,4888,,1257346704957777364;
->xmalloc,,1257346704957784100;
->xstrdup,,1257346704957788590;
-<xstrdup,,4889,,1257346704957793462;
-<xmalloc,,4890,,1257346704957813389;
->xmalloc,,1257346704957820237;
->xstrdup,,1257346704957824637;
-<xstrdup,,4891,,1257346704957829663;
-<xmalloc,,4892,,1257346704957850411;
->xmalloc,,1257346704957857247;
->xstrdup,,1257346704957861662;
-<xstrdup,,4893,,1257346704957866768;
-<xmalloc,,4894,,1257346704957889529;
->xmalloc,,1257346704957896452;
->xstrdup,,1257346704957900869;
-<xstrdup,,4895,,1257346704957905850;
-<xmalloc,,4896,,1257346704957928466;
->xmalloc,,1257346704957935229;
->xstrdup,,1257346704957939647;
-<xstrdup,,4897,,1257346704957944616;
-<xmalloc,,4898,,1257346704957967622;
->xmalloc,,1257346704957974329;
->xstrdup,,1257346704957978738;
-<xstrdup,,4899,,1257346704957983769;
-<xmalloc,,4900,,1257346704958004770;
->xmalloc,,1257346704958011504;
->xstrdup,,1257346704958015982;
-<xstrdup,,4901,,1257346704958020833;
-<xmalloc,,4902,,1257346704958040853;
->xmalloc,,1257346704958047581;
->xstrdup,,1257346704958052074;
-<xstrdup,,4903,,1257346704958056961;
-<xmalloc,,4904,,1257346704958076729;
->xmalloc,,1257346704958083436;
->xstrdup,,1257346704958087905;
-<xstrdup,,4905,,1257346704958092777;
-<xmalloc,,4906,,1257346704958112592;
->xmalloc,,1257346704958119416;
->xstrdup,,1257346704958123804;
-<xstrdup,,4907,,1257346704958128715;
-<xmalloc,,4908,,1257346704958148639;
->xmalloc,,1257346704958155388;
->xstrdup,,1257346704958159794;
-<xstrdup,,4909,,1257346704958164675;
-<xmalloc,,4910,,1257346704958186485;
->xmalloc,,1257346704958193315;
->xstrdup,,1257346704958197727;
-<xstrdup,,4911,,1257346704958202626;
-<xmalloc,,4912,,1257346704958222890;
->xmalloc,,1257346704958229617;
->xstrdup,,1257346704958234017;
-<xstrdup,,4913,,1257346704958238908;
-<xmalloc,,4914,,1257346704958258606;
->xmalloc,,1257346704958265262;
->xstrdup,,1257346704958269737;
-<xstrdup,,4915,,1257346704958274591;
-<xmalloc,,4916,,1257346704958294536;
->xmalloc,,1257346704958301161;
->xstrdup,,1257346704958305603;
-<xstrdup,,4917,,1257346704958310469;
-<xmalloc,,4918,,1257346704958330279;
->xmalloc,,1257346704958336956;
->xstrdup,,1257346704958341431;
-<xstrdup,,4919,,1257346704958346294;
-<xmalloc,,4920,,1257346704958366206;
->xmalloc,,1257346704958372907;
->xstrdup,,1257346704958377390;
-<xstrdup,,4921,,1257346704958382320;
-<xmalloc,,4922,,1257346704958402524;
->xmalloc,,1257346704958409263;
->xstrdup,,1257346704958413660;
-<xstrdup,,4923,,1257346704958418646;
-<xmalloc,,4924,,1257346704958438571;
->xmalloc,,1257346704958445322;
->xstrdup,,1257346704958449725;
-<xstrdup,,4925,,1257346704958454549;
-<xmalloc,,4926,,1257346704958474494;
->xmalloc,,1257346704958481258;
->xstrdup,,1257346704958485649;
-<xstrdup,,4927,,1257346704958490530;
-<xmalloc,,4928,,1257346704958510442;
->xmalloc,,1257346704958517203;
->xstrdup,,1257346704958521603;
-<xstrdup,,4929,,1257346704958526523;
-<xmalloc,,4930,,1257346704958546131;
->xmalloc,,1257346704958552910;
->xstrdup,,1257346704958557307;
-<xstrdup,,4931,,1257346704958562155;
-<xmalloc,,4932,,1257346704958581769;
->xmalloc,,1257346704958588437;
->xstrdup,,1257346704958592831;
-<xstrdup,,4933,,1257346704958597703;
-<xmalloc,,4934,,1257346704958623786;
->xmalloc,,1257346704958630871;
->xstrdup,,1257346704958635382;
-<xstrdup,,4935,,1257346704958640396;
-<xmalloc,,4936,,1257346704958660693;
->xmalloc,,1257346704958667375;
->xstrdup,,1257346704958671829;
-<xstrdup,,4937,,1257346704958676749;
-<xmalloc,,4938,,1257346704958696484;
->xmalloc,,1257346704958703299;
->xstrdup,,1257346704958707723;
-<xstrdup,,4939,,1257346704958712740;
-<xmalloc,,4940,,1257346704958732519;
->xmalloc,,1257346704958739328;
->xstrdup,,1257346704958743770;
-<xstrdup,,4941,,1257346704958748657;
-<xmalloc,,4942,,1257346704958768380;
->xmalloc,,1257346704958775074;
->xstrdup,,1257346704958779486;
-<xstrdup,,4943,,1257346704958784367;
-<xmalloc,,4944,,1257346704958804514;
->xmalloc,,1257346704958811236;
->xstrdup,,1257346704958815630;
-<xstrdup,,4945,,1257346704958820523;
-<xmalloc,,4946,,1257346704958840567;
->xmalloc,,1257346704958847313;
->xstrdup,,1257346704958851719;
-<xstrdup,,4947,,1257346704958856639;
-<xmalloc,,4948,,1257346704958877017;
->xmalloc,,1257346704958883721;
->xstrdup,,1257346704958888205;
-<xstrdup,,4949,,1257346704958893104;
-<xmalloc,,4950,,1257346704958913209;
->xmalloc,,1257346704958919945;
->xstrdup,,1257346704958924453;
-<xstrdup,,4951,,1257346704958929331;
-<xmalloc,,4952,,1257346704958949611;
->xmalloc,,1257346704958956308;
->xstrdup,,1257346704958960786;
-<xstrdup,,4953,,1257346704958965679;
-<xmalloc,,4954,,1257346704958985498;
->xmalloc,,1257346704958992304;
->xstrdup,,1257346704958996695;
-<xstrdup,,4955,,1257346704959001585;
-<xmalloc,,4956,,1257346704959021476;
->xmalloc,,1257346704959028222;
->xstrdup,,1257346704959032628;
-<xstrdup,,4957,,1257346704959037491;
-<xmalloc,,4958,,1257346704959057983;
->xmalloc,,1257346704959064630;
->xstrdup,,1257346704959069020;
-<xstrdup,,4959,,1257346704959073938;
-<xmalloc,,4960,,1257346704959094418;
->xmalloc,,1257346704959101164;
->xstrdup,,1257346704959105567;
-<xstrdup,,4961,,1257346704959110442;
-<xmalloc,,4962,,1257346704959130916;
->xmalloc,,1257346704959137656;
->xstrdup,,1257346704959142071;
-<xstrdup,,4963,,1257346704959146991;
-<xmalloc,,4964,,1257346704959167120;
->xmalloc,,1257346704959173796;
->xstrdup,,1257346704959178196;
-<xstrdup,,4965,,1257346704959183186;
-<xmalloc,,4966,,1257346704959205392;
->xmalloc,,1257346704959212156;
->xstrdup,,1257346704959216676;
-<xstrdup,,4967,,1257346704959221569;
-<xmalloc,,4968,,1257346704959241773;
->xmalloc,,1257346704959248465;
->xstrdup,,1257346704959252958;
-<pex_get_status,,4969,,1257346704959261072;
->pex_get_status,,1257346704959272578;
-<pex_free,,4970,,1257346704959278542;
-<pex_unix_cleanup,,4971,,1257346704959408998;
->pex_unix_cleanup,,1257346704959419750;
->pex_free,,1257346704959424823;
->find_charset_names,,1257346704959430026;
-<set_be_le_names,,4972,,1257346704959451316;
->set_be_le_names,,1257346704959471375;
-<add_setshow_enum_cmd,,4973,,1257346704959501889;
-<add_setshow_cmd_full,,4974,,1257346704959529792;
-<xstrprintf,,4975,,1257346704959555508;
-<xstrvprintf,,4976,,1257346704959578632;
->xstrvprintf,,1257346704959590905;
->xstrprintf,,1257346704959595727;
-<xstrprintf,,4977,,1257346704959623698;
-<xstrvprintf,,4978,,1257346704959647240;
->xstrvprintf,,1257346704959656151;
->xstrprintf,,1257346704959660819;
-<add_set_or_show_cmd,,4979,,1257346704959682887;
-<add_cmd,,4980,,1257346704959704222;
-<xmalloc,,4981,,1257346704959726531;
->xmalloc,,1257346704959733433;
-<delete_cmd,,4982,,1257346704959754524;
->delete_cmd,,1257346704959764803;
->add_cmd,,1257346704959769459;
->add_set_or_show_cmd,,1257346704959774265;
-<add_set_or_show_cmd,,4983,,1257346704959794403;
-<add_cmd,,4984,,1257346704959815042;
-<xmalloc,,4985,,1257346704959836886;
->xmalloc,,1257346704959843785;
-<delete_cmd,,4986,,1257346704959863579;
->delete_cmd,,1257346704959872701;
->add_cmd,,1257346704959877197;
->add_set_or_show_cmd,,1257346704959881895;
->add_setshow_cmd_full,,1257346704959886836;
->add_setshow_enum_cmd,,1257346704959891645;
-<add_setshow_enum_cmd,,4987,,1257346704959915124;
-<add_setshow_cmd_full,,4988,,1257346704959939460;
-<xstrprintf,,4989,,1257346704959963254;
-<xstrvprintf,,4990,,1257346704959984878;
->xstrvprintf,,1257346704959993188;
->xstrprintf,,1257346704959997798;
-<xstrprintf,,4991,,1257346704960018534;
-<xstrvprintf,,4992,,1257346704960040371;
->xstrvprintf,,1257346704960048503;
->xstrprintf,,1257346704960053078;
-<add_set_or_show_cmd,,4993,,1257346704960073366;
-<add_cmd,,4994,,1257346704960094216;
-<xmalloc,,4995,,1257346704960116116;
->xmalloc,,1257346704960122913;
-<delete_cmd,,4996,,1257346704960142542;
->delete_cmd,,1257346704960149706;
->add_cmd,,1257346704960154380;
->add_set_or_show_cmd,,1257346704960159032;
-<add_set_or_show_cmd,,4997,,1257346704960179179;
-<add_cmd,,4998,,1257346704960199220;
-<xmalloc,,4999,,1257346704960221012;
->xmalloc,,1257346704960227767;
-<delete_cmd,,5000,,1257346704960247246;
->delete_cmd,,1257346704960254337;
->add_cmd,,1257346704960258924;
->add_set_or_show_cmd,,1257346704960263628;
->add_setshow_cmd_full,,1257346704960268376;
->add_setshow_enum_cmd,,1257346704960273062;
-<add_setshow_enum_cmd,,5001,,1257346704960294330;
-<add_setshow_cmd_full,,5002,,1257346704960318381;
-<xstrprintf,,5003,,1257346704960342347;
-<xstrvprintf,,5004,,1257346704960364030;
->xstrvprintf,,1257346704960379446;
->xstrprintf,,1257346704960384234;
-<xstrprintf,,5005,,1257346704960405350;
-<xstrvprintf,,5006,,1257346704960427250;
->xstrvprintf,,1257346704960435595;
->xstrprintf,,1257346704960440164;
-<add_set_or_show_cmd,,5007,,1257346704960459965;
-<add_cmd,,5008,,1257346704960479862;
-<xmalloc,,5009,,1257346704960502159;
->xmalloc,,1257346704960508892;
-<delete_cmd,,5010,,1257346704960528681;
->delete_cmd,,1257346704960535920;
->add_cmd,,1257346704960540473;
->add_set_or_show_cmd,,1257346704960545267;
-<add_set_or_show_cmd,,5011,,1257346704960564999;
-<add_cmd,,5012,,1257346704960585046;
-<xmalloc,,5013,,1257346704960610818;
->xmalloc,,1257346704960618171;
-<delete_cmd,,5014,,1257346704960637738;
->delete_cmd,,1257346704960645046;
->add_cmd,,1257346704960649695;
->add_set_or_show_cmd,,1257346704960654372;
->add_setshow_cmd_full,,1257346704960659295;
->add_setshow_enum_cmd,,1257346704960664095;
-<add_setshow_enum_cmd,,5015,,1257346704960686488;
-<add_setshow_cmd_full,,5016,,1257346704960710364;
-<xstrprintf,,5017,,1257346704960733223;
-<xstrvprintf,,5018,,1257346704960755103;
->xstrvprintf,,1257346704960764428;
->xstrprintf,,1257346704960769063;
-<xstrprintf,,5019,,1257346704960789423;
-<xstrvprintf,,5020,,1257346704960811648;
->xstrvprintf,,1257346704960820228;
->xstrprintf,,1257346704960824818;
-<add_set_or_show_cmd,,5021,,1257346704960846489;
-<add_cmd,,5022,,1257346704960866531;
-<xmalloc,,5023,,1257346704960887907;
->xmalloc,,1257346704960894635;
-<delete_cmd,,5024,,1257346704960914180;
->delete_cmd,,1257346704960921398;
->add_cmd,,1257346704960926012;
->add_set_or_show_cmd,,1257346704960930682;
-<add_set_or_show_cmd,,5025,,1257346704960950348;
-<add_cmd,,5026,,1257346704960970281;
-<xmalloc,,5027,,1257346704960991962;
->xmalloc,,1257346704960998689;
-<delete_cmd,,5028,,1257346704961018135;
->delete_cmd,,1257346704961025368;
->add_cmd,,1257346704961029915;
->add_set_or_show_cmd,,1257346704961034619;
->add_setshow_cmd_full,,1257346704961039461;
->add_setshow_enum_cmd,,1257346704961044294;
->_initialize_charset,,1257346704961049115;
-<_initialize_dummy_frame,,5029,,1257346704961065199;
-<add_cmd,,5030,,1257346704961088741;
-<xmalloc,,5031,,1257346704961110361;
->xmalloc,,1257346704961117254;
-<delete_cmd,,5032,,1257346704961137079;
->delete_cmd,,1257346704961144736;
->add_cmd,,1257346704961149334;
-<observer_attach_inferior_created,,5033,,1257346704961171283;
-<generic_observer_attach,,5034,,1257346704961196467;
-<xmalloc,,5035,,1257346704961218099;
->xmalloc,,1257346704961224923;
-<xmalloc,,5036,,1257346704961239996;
->xmalloc,,1257346704961246661;
->generic_observer_attach,,1257346704961251933;
->observer_attach_inferior_created,,1257346704961256345;
->_initialize_dummy_frame,,1257346704961261554;
-<_initialize_source,,5037,,1257346704961276786;
-<init_source_path,,5038,,1257346704961296088;
-<xstrdup,,5039,,1257346704961307351;
-<xmalloc,,5040,,1257346704961328373;
->xmalloc,,1257346704961335106;
->xstrdup,,1257346704961339560;
-<forget_cached_source_info,,5041,,1257346704961354817;
->forget_cached_source_info,,1257346704961364029;
->init_source_path,,1257346704961369120;
-<add_cmd,,5042,,1257346704961390115;
-<xmalloc,,5043,,1257346704961411453;
->xmalloc,,1257346704961418361;
-<delete_cmd,,5044,,1257346704961437431;
->delete_cmd,,1257346704961449740;
->add_cmd,,1257346704961454272;
-<set_cmd_completer,,5045,,1257346704961471445;
->set_cmd_completer,,1257346704961478831;
-<add_cmd,,5046,,1257346704961496933;
-<xmalloc,,5047,,1257346704961517567;
->xmalloc,,1257346704961524712;
-<delete_cmd,,5048,,1257346704961543422;
->delete_cmd,,1257346704961550769;
->add_cmd,,1257346704961555244;
-<add_info,,5049,,1257346704961573201;
-<add_cmd,,5050,,1257346704961593456;
-<xmalloc,,5051,,1257346704961618311;
->xmalloc,,1257346704961625570;
-<delete_cmd,,5052,,1257346704961643711;
->delete_cmd,,1257346704961651624;
->add_cmd,,1257346704961656195;
->add_info,,1257346704961660761;
-<add_info,,5053,,1257346704961678727;
-<add_cmd,,5054,,1257346704961698242;
-<xmalloc,,5055,,1257346704961718831;
->xmalloc,,1257346704961725565;
-<delete_cmd,,5056,,1257346704961747272;
->delete_cmd,,1257346704961754568;
->add_cmd,,1257346704961759172;
->add_info,,1257346704961763542;
-<add_com,,5057,,1257346704961785391;
-<add_cmd,,5058,,1257346704961808449;
-<xmalloc,,5059,,1257346704961829327;
->xmalloc,,1257346704961836277;
-<delete_cmd,,5060,,1257346704961855091;
->delete_cmd,,1257346704961862619;
->add_cmd,,1257346704961867178;
->add_com,,1257346704961871647;
-<add_com_alias,,5061,,1257346704961890823;
-<add_alias_cmd,,5062,,1257346704961911791;
-<lookup_cmd,,5063,,1257346704961931294;
-<lookup_cmd_1,,5064,,1257346704961948586;
-<find_command_name_length,,5065,,1257346704961969747;
->find_command_name_length,,1257346704961977506;
-<find_cmd,,5066,,1257346704961992985;
->find_cmd,,1257346704962000320;
->lookup_cmd_1,,1257346704962004952;
->lookup_cmd,,1257346704962009391;
-<add_cmd,,5067,,1257346704962025300;
-<xmalloc,,5068,,1257346704962044424;
->xmalloc,,1257346704962051233;
-<delete_cmd,,5069,,1257346704962068808;
->delete_cmd,,1257346704962076141;
->add_cmd,,1257346704962080733;
->add_alias_cmd,,1257346704962085292;
->add_com_alias,,1257346704962089923;
-<add_com,,5070,,1257346704962105758;
-<add_cmd,,5071,,1257346704962124795;
-<xmalloc,,5072,,1257346704962144247;
->xmalloc,,1257346704962150956;
-<delete_cmd,,5073,,1257346704962168024;
->delete_cmd,,1257346704962175581;
->add_cmd,,1257346704962180200;
->add_com,,1257346704962184612;
-<add_setshow_integer_cmd,,5074,,1257346704962200973;
-<add_setshow_cmd_full,,5075,,1257346704962222416;
-<xstrdup,,5076,,1257346704962229297;
-<xmalloc,,5077,,1257346704962248680;
->xmalloc,,1257346704962255431;
->xstrdup,,1257346704962259897;
-<xstrdup,,5078,,1257346704962264502;
-<xmalloc,,5079,,1257346704962281031;
->xmalloc,,1257346704962287785;
->xstrdup,,1257346704962292296;
-<add_set_or_show_cmd,,5080,,1257346704962309309;
-<add_cmd,,5081,,1257346704962327074;
-<xmalloc,,5082,,1257346704962346589;
->xmalloc,,1257346704962353368;
-<delete_cmd,,5083,,1257346704962370342;
->delete_cmd,,1257346704962377698;
->add_cmd,,1257346704962382219;
->add_set_or_show_cmd,,1257346704962386907;
-<add_set_or_show_cmd,,5084,,1257346704962404019;
-<add_cmd,,5085,,1257346704962421893;
-<xmalloc,,5086,,1257346704962441720;
->xmalloc,,1257346704962448358;
-<delete_cmd,,5087,,1257346704962465127;
->delete_cmd,,1257346704962472345;
->add_cmd,,1257346704962476901;
->add_set_or_show_cmd,,1257346704962481590;
->add_setshow_cmd_full,,1257346704962486321;
->add_setshow_integer_cmd,,1257346704962490414;
-<add_cmd,,5088,,1257346704962506681;
-<xmalloc,,5089,,1257346704962526455;
->xmalloc,,1257346704962533321;
-<delete_cmd,,5090,,1257346704962549877;
->delete_cmd,,1257346704962557191;
->add_cmd,,1257346704962561735;
-<add_cmd,,5091,,1257346704962577800;
-<xmalloc,,5092,,1257346704962597836;
->xmalloc,,1257346704962609316;
-<delete_cmd,,5093,,1257346704962626380;
->delete_cmd,,1257346704962633568;
->add_cmd,,1257346704962638037;
-<add_cmd,,5094,,1257346704962654042;
-<xmalloc,,5095,,1257346704962673161;
->xmalloc,,1257346704962680072;
-<delete_cmd,,5096,,1257346704962696988;
->delete_cmd,,1257346704962704296;
->add_cmd,,1257346704962708853;
->_initialize_source,,1257346704962713737;
-<_initialize_values,,5097,,1257346704962726765;
-<add_cmd,,5098,,1257346704962747321;
-<xmalloc,,5099,,1257346704962766544;
->xmalloc,,1257346704962773389;
-<delete_cmd,,5100,,1257346704962789930;
->delete_cmd,,1257346704962798408;
->add_cmd,,1257346704962802976;
-<add_cmd,,5101,,1257346704962819072;
-<xmalloc,,5102,,1257346704962838509;
->xmalloc,,1257346704962845381;
-<delete_cmd,,5103,,1257346704962861723;
->delete_cmd,,1257346704962869173;
->add_cmd,,1257346704962873747;
-<add_com,,5104,,1257346704962888974;
-<add_cmd,,5105,,1257346704962907602;
-<xmalloc,,5106,,1257346704962926497;
->xmalloc,,1257346704962933252;
-<delete_cmd,,5107,,1257346704962949456;
->delete_cmd,,1257346704962956845;
->add_cmd,,1257346704962961468;
->add_com,,1257346704962965834;
-<add_prefix_cmd,,5108,,1257346704962980330;
-<add_cmd,,5109,,1257346704962998194;
-<xmalloc,,5110,,1257346704963017153;
->xmalloc,,1257346704963023977;
-<delete_cmd,,5111,,1257346704963040710;
->delete_cmd,,1257346704963049411;
->add_cmd,,1257346704963054162;
->add_prefix_cmd,,1257346704963058680;
->_initialize_values,,1257346704963063663;
-<_initialize_valops,,5112,,1257346704963076583;
-<add_setshow_boolean_cmd,,5113,,1257346704963097644;
-<add_setshow_cmd_full,,5114,,1257346704963118822;
-<xstrdup,,5115,,1257346704963125703;
-<xmalloc,,5116,,1257346704963144794;
->xmalloc,,1257346704963151540;
->xstrdup,,1257346704963155937;
-<xstrdup,,5117,,1257346704963160589;
-<xmalloc,,5118,,1257346704963176472;
->xmalloc,,1257346704963183175;
->xstrdup,,1257346704963187587;
-<add_set_or_show_cmd,,5119,,1257346704963203900;
-<add_cmd,,5120,,1257346704963222341;
-<xmalloc,,5121,,1257346704963241402;
->xmalloc,,1257346704963248214;
-<delete_cmd,,5122,,1257346704963264436;
->delete_cmd,,1257346704963272926;
->add_cmd,,1257346704963277590;
->add_set_or_show_cmd,,1257346704963282249;
-<add_set_or_show_cmd,,5123,,1257346704963298648;
-<add_cmd,,5124,,1257346704963316206;
-<xmalloc,,5125,,1257346704963335405;
->xmalloc,,1257346704963342298;
-<delete_cmd,,5126,,1257346704963358544;
->delete_cmd,,1257346704963365756;
->add_cmd,,1257346704963370288;
->add_set_or_show_cmd,,1257346704963374953;
->add_setshow_cmd_full,,1257346704963379656;
->add_setshow_boolean_cmd,,1257346704963384516;
->_initialize_valops,,1257346704963389368;
-<_initialize_valarith,,5127,,1257346704963402179;
->_initialize_valarith,,1257346704963411418;
-<_initialize_valprint,,5128,,1257346704963426308;
-<add_prefix_cmd,,5129,,1257346704963445525;
-<add_cmd,,5130,,1257346704963463461;
-<xmalloc,,5131,,1257346704963482381;
->xmalloc,,1257346704963489160;
-<delete_cmd,,5132,,1257346704963505304;
->delete_cmd,,1257346704963512723;
->add_cmd,,1257346704963517216;
->add_prefix_cmd,,1257346704963521767;
-<add_alias_cmd,,5133,,1257346704963534771;
-<lookup_cmd,,5134,,1257346704963551486;
-<lookup_cmd_1,,5135,,1257346704963567786;
-<find_command_name_length,,5136,,1257346704963585407;
->find_command_name_length,,1257346704963592736;
-<find_cmd,,5137,,1257346704963611407;
->find_cmd,,1257346704963618761;
-<lookup_cmd_1,,5138,,1257346704963632637;
-<find_command_name_length,,5139,,1257346704963650618;
->find_command_name_length,,1257346704963657866;
->lookup_cmd_1,,1257346704963662483;
->lookup_cmd_1,,1257346704963666982;
->lookup_cmd,,1257346704963671439;
-<add_cmd,,5140,,1257346704963686437;
-<xmalloc,,5141,,1257346704963705456;
->xmalloc,,1257346704963714746;
-<delete_cmd,,5142,,1257346704963731061;
->delete_cmd,,1257346704963738561;
->add_cmd,,1257346704963743175;
->add_alias_cmd,,1257346704963747671;
-<add_alias_cmd,,5143,,1257346704963760723;
-<lookup_cmd,,5144,,1257346704963777742;
-<lookup_cmd_1,,5145,,1257346704963793576;
-<find_command_name_length,,5146,,1257346704963811489;
->find_command_name_length,,1257346704963818842;
-<find_cmd,,5147,,1257346704963833295;
->find_cmd,,1257346704963840218;
-<lookup_cmd_1,,5148,,1257346704963853710;
-<find_command_name_length,,5149,,1257346704963871770;
->find_command_name_length,,1257346704963879044;
->lookup_cmd_1,,1257346704963883622;
->lookup_cmd_1,,1257346704963888085;
->lookup_cmd,,1257346704963892485;
-<add_cmd,,5150,,1257346704963907928;
-<xmalloc,,5151,,1257346704963926872;
->xmalloc,,1257346704963933638;
-<delete_cmd,,5152,,1257346704963949632;
->delete_cmd,,1257346704963958233;
->add_cmd,,1257346704963962852;
->add_alias_cmd,,1257346704963967352;
-<add_prefix_cmd,,5153,,1257346704963981835;
-<add_cmd,,5154,,1257346704964000211;
-<xmalloc,,5155,,1257346704964018971;
->xmalloc,,1257346704964025768;
-<delete_cmd,,5156,,1257346704964044657;
->delete_cmd,,1257346704964051911;
->add_cmd,,1257346704964056606;
->add_prefix_cmd,,1257346704964061192;
-<add_alias_cmd,,5157,,1257346704964075225;
-<lookup_cmd,,5158,,1257346704972290871;
-<lookup_cmd_1,,5159,,1257346704972310859;
-<find_command_name_length,,5160,,1257346704972331466;
->find_command_name_length,,1257346704972339736;
-<find_cmd,,5161,,1257346704972356223;
->find_cmd,,1257346704972364806;
-<lookup_cmd_1,,5162,,1257346704972380667;
-<find_command_name_length,,5163,,1257346704972399794;
->find_command_name_length,,1257346704972407106;
->lookup_cmd_1,,1257346704972411917;
->lookup_cmd_1,,1257346704972416525;
->lookup_cmd,,1257346704972421150;
-<add_cmd,,5164,,1257346704972438031;
-<xmalloc,,5165,,1257346704972458692;
->xmalloc,,1257346704972466009;
-<delete_cmd,,5166,,1257346704972483990;
->delete_cmd,,1257346704972492162;
->add_cmd,,1257346704972496853;
->add_alias_cmd,,1257346704972501451;
-<add_alias_cmd,,5167,,1257346704972515863;
-<lookup_cmd,,5168,,1257346704972534284;
-<lookup_cmd_1,,5169,,1257346704972551742;
-<find_command_name_length,,5170,,1257346704972570598;
->find_command_name_length,,1257346704972577946;
-<find_cmd,,5171,,1257346704972593328;
->find_cmd,,1257346704972605608;
-<lookup_cmd_1,,5172,,1257346704972621000;
-<find_command_name_length,,5173,,1257346704972640085;
->find_command_name_length,,1257346704972647342;
->lookup_cmd_1,,1257346704972652070;
->lookup_cmd_1,,1257346704972656665;
->lookup_cmd,,1257346704972661089;
-<add_cmd,,5174,,1257346704972677290;
-<xmalloc,,5175,,1257346704972697067;
->xmalloc,,1257346704972703987;
-<delete_cmd,,5176,,1257346704972721554;
->delete_cmd,,1257346704972729075;
->add_cmd,,1257346704972733658;
->add_alias_cmd,,1257346704972738127;
-<add_setshow_uinteger_cmd,,5177,,1257346704972762118;
-<add_setshow_cmd_full,,5178,,1257346704972784406;
-<xstrprintf,,5179,,1257346704972806105;
-<xstrvprintf,,5180,,1257346704972826820;
->xstrvprintf,,1257346704972838507;
->xstrprintf,,1257346704972843303;
-<xstrprintf,,5181,,1257346704972862412;
-<xstrvprintf,,5182,,1257346704972882836;
->xstrvprintf,,1257346704972891082;
->xstrprintf,,1257346704972895714;
-<add_set_or_show_cmd,,5183,,1257346704972913903;
-<add_cmd,,5184,,1257346704972931953;
-<xmalloc,,5185,,1257346704972951601;
->xmalloc,,1257346704972958446;
-<delete_cmd,,5186,,1257346704972975699;
->delete_cmd,,1257346704972983104;
->add_cmd,,1257346704972987597;
->add_set_or_show_cmd,,1257346704972992240;
-<add_set_or_show_cmd,,5187,,1257346704973010312;
-<add_cmd,,5188,,1257346704973028182;
-<xmalloc,,5189,,1257346704973047691;
->xmalloc,,1257346704973054425;
-<delete_cmd,,5190,,1257346704973071227;
->delete_cmd,,1257346704973078457;
->add_cmd,,1257346704973082917;
->add_set_or_show_cmd,,1257346704973087588;
->add_setshow_cmd_full,,1257346704973092436;
->add_setshow_uinteger_cmd,,1257346704973096487;
-<add_setshow_boolean_cmd,,5191,,1257346704973113262;
-<add_setshow_cmd_full,,5192,,1257346704973135667;
-<xstrdup,,5193,,1257346704973142981;
-<xmalloc,,5194,,1257346704973162103;
->xmalloc,,1257346704973168893;
->xstrdup,,1257346704973173447;
-<xstrdup,,5195,,1257346704973178072;
-<xmalloc,,5196,,1257346704973194751;
->xmalloc,,1257346704973201575;
->xstrdup,,1257346704973205990;
-<add_set_or_show_cmd,,5197,,1257346704973223373;
-<add_cmd,,5198,,1257346704973241204;
-<xmalloc,,5199,,1257346704973261237;
->xmalloc,,1257346704973268136;
-<delete_cmd,,5200,,1257346704973285056;
->delete_cmd,,1257346704973293446;
->add_cmd,,1257346704973297957;
->add_set_or_show_cmd,,1257346704973302622;
-<add_set_or_show_cmd,,5201,,1257346704973320158;
-<add_cmd,,5202,,1257346704973338115;
-<xmalloc,,5203,,1257346704973358112;
->xmalloc,,1257346704973364755;
-<delete_cmd,,5204,,1257346704973382150;
->delete_cmd,,1257346704973389200;
->add_cmd,,1257346704973393621;
->add_set_or_show_cmd,,1257346704973398276;
->add_setshow_cmd_full,,1257346704973403076;
->add_setshow_boolean_cmd,,1257346704973408005;
-<add_setshow_uinteger_cmd,,5205,,1257346704973426332;
-<add_setshow_cmd_full,,5206,,1257346704973448350;
-<xstrprintf,,5207,,1257346704973469113;
-<xstrvprintf,,5208,,1257346704973489191;
->xstrvprintf,,1257346704973497353;
->xstrprintf,,1257346704973501930;
-<xstrprintf,,5209,,1257346704973522850;
-<xstrvprintf,,5210,,1257346704973543364;
->xstrvprintf,,1257346704973551520;
->xstrprintf,,1257346704973556121;
-<add_set_or_show_cmd,,5211,,1257346704973573937;
-<add_cmd,,5212,,1257346704973591759;
-<xmalloc,,5213,,1257346704973615400;
->xmalloc,,1257346704973622624;
-<delete_cmd,,5214,,1257346704973639469;
->delete_cmd,,1257346704973646542;
->add_cmd,,1257346704973651005;
->add_set_or_show_cmd,,1257346704973655709;
-<add_set_or_show_cmd,,5215,,1257346704973673110;
-<add_cmd,,5216,,1257346704973690688;
-<xmalloc,,5217,,1257346704973709890;
->xmalloc,,1257346704973716636;
-<delete_cmd,,5218,,1257346704973733415;
->delete_cmd,,1257346704973740437;
->add_cmd,,1257346704973744900;
->add_set_or_show_cmd,,1257346704973749595;
->add_setshow_cmd_full,,1257346704973754298;
->add_setshow_uinteger_cmd,,1257346704973758118;
-<add_setshow_boolean_cmd,,5219,,1257346704973773840;
-<add_setshow_cmd_full,,5220,,1257346704973795470;
-<xstrdup,,5221,,1257346704973802390;
-<xmalloc,,5222,,1257346704973821671;
->xmalloc,,1257346704973828675;
->xstrdup,,1257346704973833111;
-<xstrdup,,5223,,1257346704973837688;
-<xmalloc,,5224,,1257346704973854133;
->xmalloc,,1257346704973860981;
->xstrdup,,1257346704973865393;
-<add_set_or_show_cmd,,5225,,1257346704973882514;
-<add_cmd,,5226,,1257346704973900083;
-<xmalloc,,5227,,1257346704973919538;
->xmalloc,,1257346704973926272;
-<delete_cmd,,5228,,1257346704973943475;
->delete_cmd,,1257346704973950479;
->add_cmd,,1257346704973954999;
->add_set_or_show_cmd,,1257346704973959661;
-<add_set_or_show_cmd,,5229,,1257346704973976815;
-<add_cmd,,5230,,1257346704973994483;
-<xmalloc,,5231,,1257346704974014537;
->xmalloc,,1257346704974021382;
-<delete_cmd,,5232,,1257346704974038527;
->delete_cmd,,1257346704974045537;
->add_cmd,,1257346704974050061;
->add_set_or_show_cmd,,1257346704974054752;
->add_setshow_cmd_full,,1257346704974059552;
->add_setshow_boolean_cmd,,1257346704974064439;
-<add_setshow_boolean_cmd,,5233,,1257346704974080177;
-<add_setshow_cmd_full,,5234,,1257346704974101990;
-<xstrdup,,5235,,1257346704974108868;
-<xmalloc,,5236,,1257346704974128161;
->xmalloc,,1257346704974134990;
->xstrdup,,1257346704974139435;
-<xstrdup,,5237,,1257346704974144031;
-<xmalloc,,5238,,1257346704974160238;
->xmalloc,,1257346704974167077;
->xstrdup,,1257346704974171579;
-<add_set_or_show_cmd,,5239,,1257346704974188120;
-<add_cmd,,5240,,1257346704974205906;
-<xmalloc,,5241,,1257346704974224988;
->xmalloc,,1257346704974231697;
-<delete_cmd,,5242,,1257346704974248605;
->delete_cmd,,1257346704974255709;
->add_cmd,,1257346704974260262;
->add_set_or_show_cmd,,1257346704974264933;
-<add_set_or_show_cmd,,5243,,1257346704974281642;
-<add_cmd,,5244,,1257346704974299250;
-<xmalloc,,5245,,1257346704974318762;
->xmalloc,,1257346704974325445;
-<delete_cmd,,5246,,1257346704974342103;
->delete_cmd,,1257346704974349077;
->add_cmd,,1257346704974353513;
->add_set_or_show_cmd,,1257346704974358181;
->add_setshow_cmd_full,,1257346704974362969;
->add_setshow_boolean_cmd,,1257346704974367747;
-<add_setshow_boolean_cmd,,5247,,1257346704974383961;
-<add_setshow_cmd_full,,5248,,1257346704974405416;
-<xstrdup,,5249,,1257346704974412333;
-<xmalloc,,5250,,1257346704974431348;
->xmalloc,,1257346704974438121;
->xstrdup,,1257346704974442539;
-<xstrdup,,5251,,1257346704974447095;
-<xmalloc,,5252,,1257346704974463170;
->xmalloc,,1257346704974469877;
->xstrdup,,1257346704974474370;
-<add_set_or_show_cmd,,5253,,1257346704974490950;
-<add_cmd,,5254,,1257346704974508591;
-<xmalloc,,5255,,1257346704974527694;
->xmalloc,,1257346704974534323;
-<delete_cmd,,5256,,1257346704974551252;
->delete_cmd,,1257346704974558379;
->add_cmd,,1257346704974562878;
->add_set_or_show_cmd,,1257346704974567540;
-<add_set_or_show_cmd,,5257,,1257346704974584324;
-<add_cmd,,5258,,1257346704974606203;
-<xmalloc,,5259,,1257346704974625800;
->xmalloc,,1257346704974632621;
-<delete_cmd,,5260,,1257346704974649198;
->delete_cmd,,1257346704974656271;
->add_cmd,,1257346704974660716;
->add_set_or_show_cmd,,1257346704974665378;
->add_setshow_cmd_full,,1257346704974670177;
->add_setshow_boolean_cmd,,1257346704974675082;
-<add_setshow_boolean_cmd,,5261,,1257346704974690808;
-<add_setshow_cmd_full,,5262,,1257346704974712380;
-<xstrdup,,5263,,1257346704974719382;
-<xmalloc,,5264,,1257346704974738927;
->xmalloc,,1257346704974745751;
->xstrdup,,1257346704974750208;
-<xstrdup,,5265,,1257346704974754785;
-<xmalloc,,5266,,1257346704974771801;
->xmalloc,,1257346704974778484;
->xstrdup,,1257346704974782899;
-<add_set_or_show_cmd,,5267,,1257346704974801452;
-<add_cmd,,5268,,1257346704974820723;
-<xmalloc,,5269,,1257346704974840852;
->xmalloc,,1257346704974847588;
-<delete_cmd,,5270,,1257346704974865687;
->delete_cmd,,1257346704974874228;
->add_cmd,,1257346704974878769;
->add_set_or_show_cmd,,1257346704974883437;
-<add_set_or_show_cmd,,5271,,1257346704974900700;
-<add_cmd,,5272,,1257346704974919701;
-<xmalloc,,5273,,1257346704974939414;
->xmalloc,,1257346704974946151;
-<delete_cmd,,5274,,1257346704974963116;
->delete_cmd,,1257346704974970337;
->add_cmd,,1257346704974974788;
->add_set_or_show_cmd,,1257346704974979428;
->add_setshow_cmd_full,,1257346704974984213;
->add_setshow_boolean_cmd,,1257346704974989007;
-<add_setshow_zuinteger_cmd,,5275,,1257346704975007870;
-<add_setshow_cmd_full,,5276,,1257346704975032070;
-<xstrdup,,5277,,1257346704975039135;
-<xmalloc,,5278,,1257346704975058196;
->xmalloc,,1257346704975064983;
->xstrdup,,1257346704975069516;
-<xstrdup,,5279,,1257346704975074066;
-<xmalloc,,5280,,1257346704975090869;
->xmalloc,,1257346704975097650;
->xstrdup,,1257346704975102116;
-<add_set_or_show_cmd,,5281,,1257346704975120693;
-<add_cmd,,5282,,1257346704975139637;
-<xmalloc,,5283,,1257346704975159041;
->xmalloc,,1257346704975165627;
-<delete_cmd,,5284,,1257346704975182478;
->delete_cmd,,1257346704975190640;
->add_cmd,,1257346704975195154;
->add_set_or_show_cmd,,1257346704975199873;
-<add_set_or_show_cmd,,5285,,1257346704975216555;
-<add_cmd,,5286,,1257346704975234545;
-<xmalloc,,5287,,1257346704975253823;
->xmalloc,,1257346704975260490;
-<delete_cmd,,5288,,1257346704975277037;
->delete_cmd,,1257346704975284255;
->add_cmd,,1257346704975288808;
->add_set_or_show_cmd,,1257346704975293458;
->add_setshow_cmd_full,,1257346704975298264;
->add_setshow_zuinteger_cmd,,1257346704975302303;
-<add_setshow_zuinteger_cmd,,5289,,1257346704975319782;
-<add_setshow_cmd_full,,5290,,1257346704975342220;
-<xstrdup,,5291,,1257346704975349113;
-<xmalloc,,5292,,1257346704975372944;
->xmalloc,,1257346704975379783;
->xstrdup,,1257346704975384255;
-<xstrdup,,5293,,1257346704975388829;
-<xmalloc,,5294,,1257346704975408805;
->xmalloc,,1257346704975415547;
->xstrdup,,1257346704975420128;
-<add_set_or_show_cmd,,5295,,1257346704975436629;
-<add_cmd,,5296,,1257346704975454830;
-<xmalloc,,5297,,1257346704975474216;
->xmalloc,,1257346704975480911;
-<delete_cmd,,5298,,1257346704975497644;
->delete_cmd,,1257346704975504955;
->add_cmd,,1257346704975509515;
->add_set_or_show_cmd,,1257346704975514176;
-<add_set_or_show_cmd,,5299,,1257346704975530521;
-<add_cmd,,5300,,1257346704975548620;
-<xmalloc,,5301,,1257346704975567904;
->xmalloc,,1257346704975574562;
-<delete_cmd,,5302,,1257346704975591019;
->delete_cmd,,1257346704975598330;
->add_cmd,,1257346704975610561;
->add_set_or_show_cmd,,1257346704975619848;
->add_setshow_cmd_full,,1257346704975624804;
->add_setshow_zuinteger_cmd,,1257346704975628732;
-<add_cmd,,5303,,1257346704975645550;
-<xmalloc,,5304,,1257346704975665513;
->xmalloc,,1257346704975672400;
-<delete_cmd,,5305,,1257346704975688929;
->delete_cmd,,1257346704975696219;
->add_cmd,,1257346704975700748;
-<add_cmd,,5306,,1257346704975716751;
-<xmalloc,,5307,,1257346704975736043;
->xmalloc,,1257346704975742864;
-<delete_cmd,,5308,,1257346704975759955;
->delete_cmd,,1257346704975767236;
->add_cmd,,1257346704975771841;
-<add_setshow_boolean_cmd,,5309,,1257346704975787365;
-<add_setshow_cmd_full,,5310,,1257346704975808604;
-<xstrdup,,5311,,1257346704975815505;
-<xmalloc,,5312,,1257346704975834915;
->xmalloc,,1257346704975841646;
->xstrdup,,1257346704975846100;
-<xstrdup,,5313,,1257346704975850656;
-<xmalloc,,5314,,1257346704975866472;
->xmalloc,,1257346704975876598;
->xstrdup,,1257346704975881097;
-<add_set_or_show_cmd,,5315,,1257346704975897729;
-<add_cmd,,5316,,1257346704975915602;
-<xmalloc,,5317,,1257346704975934497;
->xmalloc,,1257346704975941432;
-<delete_cmd,,5318,,1257346704975957862;
->delete_cmd,,1257346704975964948;
->add_cmd,,1257346704975969450;
->add_set_or_show_cmd,,1257346704975974114;
-<add_set_or_show_cmd,,5319,,1257346704975991049;
-<add_cmd,,5320,,1257346704976008859;
-<xmalloc,,5321,,1257346704976027917;
->xmalloc,,1257346704976034633;
-<delete_cmd,,5322,,1257346704976052356;
->delete_cmd,,1257346704976059435;
->add_cmd,,1257346704976063892;
->add_set_or_show_cmd,,1257346704976068538;
->add_setshow_cmd_full,,1257346704976073254;
->add_setshow_boolean_cmd,,1257346704976078126;
->_initialize_valprint,,1257346704976083022;
-<_initialize_printcmd,,5323,,1257346704976096453;
-<observer_attach_solib_unloaded,,5324,,1257346704976121337;
-<generic_observer_attach,,5325,,1257346704976144882;
-<xmalloc,,5326,,1257346704976164223;
->xmalloc,,1257346704976171140;
-<xmalloc,,5327,,1257346704976184776;
->xmalloc,,1257346704976191458;
->generic_observer_attach,,1257346704976196529;
->observer_attach_solib_unloaded,,1257346704976200799;
-<add_info,,5328,,1257346704976215800;
-<add_cmd,,5329,,1257346704976233508;
-<xmalloc,,5330,,1257346704976252377;
->xmalloc,,1257346704976259101;
-<delete_cmd,,5331,,1257346704976275218;
->delete_cmd,,1257346704976283467;
->add_cmd,,1257346704976287888;
->add_info,,1257346704976292472;
-<add_info,,5332,,1257346704976306841;
-<add_cmd,,5333,,1257346704976324290;
-<xmalloc,,5334,,1257346704976343264;
->xmalloc,,1257346704976350127;
-<delete_cmd,,5335,,1257346704976366836;
->delete_cmd,,1257346704976375558;
->add_cmd,,1257346704976380162;
->add_info,,1257346704976384538;
-<add_com,,5336,,1257346704976401247;
-<add_cmd,,5337,,1257346704976418735;
-<xmalloc,,5338,,1257346704976437484;
->xmalloc,,1257346704976444287;
-<delete_cmd,,5339,,1257346704976460677;
->delete_cmd,,1257346704976472442;
->add_cmd,,1257346704976477167;
->add_com,,1257346704976481564;
-<add_info,,5340,,1257346704976495822;
-<add_cmd,,5341,,1257346704976513076;
-<xmalloc,,5342,,1257346704976531968;
->xmalloc,,1257346704976538705;
-<delete_cmd,,5343,,1257346704976554593;
->delete_cmd,,1257346704976561814;
->add_cmd,,1257346704976566274;
->add_info,,1257346704976570614;
-<add_cmd,,5344,,1257346704976585657;
-<xmalloc,,5345,,1257346704976609501;
->xmalloc,,1257346704976617052;
-<delete_cmd,,5346,,1257346704976633296;
->delete_cmd,,1257346704976642068;
->add_cmd,,1257346704976646757;
-<add_com,,5347,,1257346704976662994;
-<add_cmd,,5348,,1257346704976680082;
-<xmalloc,,5349,,1257346704976699179;
->xmalloc,,1257346704976705874;
-<delete_cmd,,5350,,1257346704976721684;
->delete_cmd,,1257346704976729163;
->add_cmd,,1257346704976733909;
->add_com,,1257346704976738270;
-<add_cmd,,5351,,1257346704976753331;
-<xmalloc,,5352,,1257346704976772786;
->xmalloc,,1257346704976779676;
-<delete_cmd,,5353,,1257346704976796016;
->delete_cmd,,1257346704976803290;
->add_cmd,,1257346704976807705;
-<add_cmd,,5354,,1257346704976822803;
-<xmalloc,,5355,,1257346704976841647;
->xmalloc,,1257346704976848429;
-<delete_cmd,,5356,,1257346704976864284;
->delete_cmd,,1257346704976871505;
->add_cmd,,1257346704976876001;
-<add_cmd,,5357,,1257346704976890930;
-<xmalloc,,5358,,1257346704976910108;
->xmalloc,,1257346704976916968;
-<delete_cmd,,5359,,1257346704976932832;
->delete_cmd,,1257346704976939993;
->add_cmd,,1257346704976944435;
-<add_com,,5360,,1257346704976960086;
-<add_cmd,,5361,,1257346704976977168;
-<xmalloc,,5362,,1257346704976995793;
->xmalloc,,1257346704977002494;
-<delete_cmd,,5363,,1257346704977018463;
->delete_cmd,,1257346704977025876;
->add_cmd,,1257346704977030520;
->add_com,,1257346704977034878;
-<add_com,,5364,,1257346704977050552;
-<add_cmd,,5365,,1257346704977067264;
-<xmalloc,,5366,,1257346704977086238;
->xmalloc,,1257346704977092924;
-<delete_cmd,,5367,,1257346704977109314;
->delete_cmd,,1257346704977116893;
->add_cmd,,1257346704977121473;
->add_com,,1257346704977125777;
-<add_prefix_cmd,,5368,,1257346704977140032;
-<add_cmd,,5369,,1257346704977156907;
-<xmalloc,,5370,,1257346704977175682;
->xmalloc,,1257346704977182416;
-<delete_cmd,,5371,,1257346704977198590;
->delete_cmd,,1257346704977206181;
->add_cmd,,1257346704977210824;
->add_prefix_cmd,,1257346704977215576;
-<add_com,,5372,,1257346704977232474;
-<add_cmd,,5373,,1257346704977249247;
-<xmalloc,,5374,,1257346704977268134;
->xmalloc,,1257346704977274891;
-<delete_cmd,,5375,,1257346704977291252;
->delete_cmd,,1257346704977298713;
->add_cmd,,1257346704977303299;
->add_com,,1257346704977307636;
-<set_cmd_completer,,5376,,1257346704977322523;
->set_cmd_completer,,1257346704977329822;
-<add_cmd,,5377,,1257346704977344949;
-<xmalloc,,5378,,1257346704977363559;
->xmalloc,,1257346704977370386;
-<delete_cmd,,5379,,1257346704977386326;
->delete_cmd,,1257346704977393724;
->add_cmd,,1257346704977398307;
-<add_com,,5380,,1257346704977414132;
-<add_cmd,,5381,,1257346704977431675;
-<xmalloc,,5382,,1257346704977451725;
->xmalloc,,1257346704977458459;
-<delete_cmd,,5383,,1257346704977474506;
->delete_cmd,,1257346704977482097;
->add_cmd,,1257346704977486810;
->add_com,,1257346704977491125;
-<set_cmd_completer,,5384,,1257346704977505465;
->set_cmd_completer,,1257346704977512641;
-<add_com_alias,,5385,,1257346704977528036;
-<add_alias_cmd,,5386,,1257346704977544038;
-<lookup_cmd,,5387,,1257346704977560949;
-<lookup_cmd_1,,5388,,1257346704977577376;
-<find_command_name_length,,5389,,1257346704977595062;
->find_command_name_length,,1257346704977608819;
-<find_cmd,,5390,,1257346704977625877;
->find_cmd,,1257346704977633706;
->lookup_cmd_1,,1257346704977638343;
->lookup_cmd,,1257346704977642836;
-<add_cmd,,5391,,1257346704977656872;
-<xmalloc,,5392,,1257346704977675410;
->xmalloc,,1257346704977682236;
-<delete_cmd,,5393,,1257346704977698347;
->delete_cmd,,1257346704977705845;
->add_cmd,,1257346704977710416;
->add_alias_cmd,,1257346704977714885;
->add_com_alias,,1257346704977719508;
-<add_com,,5394,,1257346704977735143;
-<add_cmd,,5395,,1257346704977751702;
-<xmalloc,,5396,,1257346704977770414;
->xmalloc,,1257346704977777184;
-<delete_cmd,,5397,,1257346704977792970;
->delete_cmd,,1257346704977800543;
->add_cmd,,1257346704977805171;
->add_com,,1257346704977809475;
-<set_cmd_completer,,5398,,1257346704977823844;
->set_cmd_completer,,1257346704977830942;
-<add_setshow_uinteger_cmd,,5399,,1257346704977847426;
-<add_setshow_cmd_full,,5400,,1257346704977867425;
-<xstrdup,,5401,,1257346704977874438;
-<xmalloc,,5402,,1257346704977894456;
->xmalloc,,1257346704977901469;
->xstrdup,,1257346704977905938;
-<xstrdup,,5403,,1257346704977910425;
-<xmalloc,,5404,,1257346704977926882;
->xmalloc,,1257346704977933546;
->xstrdup,,1257346704977937967;
-<add_set_or_show_cmd,,5405,,1257346704977954189;
-<add_cmd,,5406,,1257346704977970429;
-<xmalloc,,5407,,1257346704977989208;
->xmalloc,,1257346704977995917;
-<delete_cmd,,5408,,1257346704978011754;
->delete_cmd,,1257346704978018825;
->add_cmd,,1257346704978023348;
->add_set_or_show_cmd,,1257346704978027988;
-<add_set_or_show_cmd,,5409,,1257346704978043859;
-<add_cmd,,5410,,1257346704978061816;
-<xmalloc,,5411,,1257346704978081055;
->xmalloc,,1257346704978087779;
-<delete_cmd,,5412,,1257346704978103908;
->delete_cmd,,1257346704978110999;
->add_cmd,,1257346704978115426;
->add_set_or_show_cmd,,1257346704978120100;
->add_setshow_cmd_full,,1257346704978124819;
->add_setshow_uinteger_cmd,,1257346704978128671;
-<add_setshow_boolean_cmd,,5413,,1257346704978144102;
-<add_setshow_cmd_full,,5414,,1257346704978164189;
-<xstrdup,,5415,,1257346704978171025;
-<xmalloc,,5416,,1257346704978189800;
->xmalloc,,1257346704978196678;
->xstrdup,,1257346704978201222;
-<xstrdup,,5417,,1257346704978205709;
-<xmalloc,,5418,,1257346704978221727;
->xmalloc,,1257346704978228470;
->xstrdup,,1257346704978232876;
-<add_set_or_show_cmd,,5419,,1257346704978248623;
-<add_cmd,,5420,,1257346704978265807;
-<xmalloc,,5421,,1257346704978284540;
->xmalloc,,1257346704978291337;
-<delete_cmd,,5422,,1257346704978307099;
->delete_cmd,,1257346704978314181;
->add_cmd,,1257346704978318735;
->add_set_or_show_cmd,,1257346704978323363;
-<add_set_or_show_cmd,,5423,,1257346704978339128;
-<add_cmd,,5424,,1257346704978355798;
-<xmalloc,,5425,,1257346704978374601;
->xmalloc,,1257346704978381361;
-<delete_cmd,,5426,,1257346704978396952;
->delete_cmd,,1257346704978404040;
->add_cmd,,1257346704978408542;
->add_set_or_show_cmd,,1257346704978413231;
->add_setshow_cmd_full,,1257346704978417977;
->add_setshow_boolean_cmd,,1257346704978422897;
->_initialize_printcmd,,1257346704978427883;
-<_initialize_symtab,,5427,,1257346704978441486;
-<add_info,,5428,,1257346704978459693;
-<add_cmd,,5429,,1257346704978475960;
-<xmalloc,,5430,,1257346704978494576;
->xmalloc,,1257346704978501340;
-<delete_cmd,,5431,,1257346704978517288;
->delete_cmd,,1257346704978524656;
->add_cmd,,1257346704978529170;
->add_info,,1257346704978533546;
-<add_info,,5432,,1257346704978547450;
-<add_cmd,,5433,,1257346704978563545;
-<xmalloc,,5434,,1257346704978582249;
->xmalloc,,1257346704978588946;
-<delete_cmd,,5435,,1257346704978609304;
->delete_cmd,,1257346704978616916;
->add_cmd,,1257346704978621442;
->add_info,,1257346704978625866;
-<add_info,,5436,,1257346704978640671;
-<add_cmd,,5437,,1257346704978656716;
-<xmalloc,,5438,,1257346704978675615;
->xmalloc,,1257346704978682315;
-<delete_cmd,,5439,,1257346704978698312;
->delete_cmd,,1257346704978705500;
->add_cmd,,1257346704978710125;
->add_info,,1257346704978714537;
-<add_info,,5440,,1257346704978728876;
-<add_cmd,,5441,,1257346704978745053;
-<xmalloc,,5442,,1257346704978764195;
->xmalloc,,1257346704978770917;
-<delete_cmd,,5443,,1257346704978786324;
->delete_cmd,,1257346704978793581;
->add_cmd,,1257346704978798122;
->add_info,,1257346704978802534;
-<add_com,,5444,,1257346704978817704;
-<add_cmd,,5445,,1257346704978833730;
-<xmalloc,,5446,,1257346704978852319;
->xmalloc,,1257346704978859023;
-<delete_cmd,,5447,,1257346704978874553;
->delete_cmd,,1257346704978882018;
->add_cmd,,1257346704978886595;
->add_com,,1257346704978890889;
-<add_setshow_enum_cmd,,5448,,1257346704978908438;
-<add_setshow_cmd_full,,5449,,1257346704978928085;
-<xstrprintf,,5450,,1257346704978947697;
-<xstrvprintf,,5451,,1257346704978966571;
->xstrvprintf,,1257346704978976207;
->xstrprintf,,1257346704978980839;
-<xstrprintf,,5452,,1257346704978997701;
-<xstrvprintf,,5453,,1257346704979017289;
->xstrvprintf,,1257346704979028151;
->xstrprintf,,1257346704979032813;
-<add_set_or_show_cmd,,5454,,1257346704979048804;
-<add_cmd,,5455,,1257346704979064851;
-<xmalloc,,5456,,1257346704979083296;
->xmalloc,,1257346704979090084;
-<delete_cmd,,5457,,1257346704979106107;
->delete_cmd,,1257346704979113493;
->add_cmd,,1257346704979117989;
->add_set_or_show_cmd,,1257346704979122624;
-<add_set_or_show_cmd,,5458,,1257346704979139273;
-<add_cmd,,5459,,1257346704979156755;
-<xmalloc,,5460,,1257346704979177224;
->xmalloc,,1257346704979184008;
-<delete_cmd,,5461,,1257346704979199807;
->delete_cmd,,1257346704979207103;
->add_cmd,,1257346704979211623;
->add_set_or_show_cmd,,1257346704979216287;
->add_setshow_cmd_full,,1257346704979221009;
->add_setshow_enum_cmd,,1257346704979225773;
-<observer_attach_executable_changed,,5462,,1257346704979244861;
-<generic_observer_attach,,5463,,1257346704979264394;
-<xmalloc,,5464,,1257346704979285184;
->xmalloc,,1257346704979292107;
-<xmalloc,,5465,,1257346704979305310;
->xmalloc,,1257346704979311986;
->generic_observer_attach,,1257346704979316795;
->observer_attach_executable_changed,,1257346704979321207;
->_initialize_symtab,,1257346704979326287;
-<_initialize_symfile,,5466,,1257346704979338969;
-<add_cmd,,5467,,1257346704979358012;
-<xmalloc,,5468,,1257346704979376839;
->xmalloc,,1257346704979383822;
-<delete_cmd,,5469,,1257346704979399476;
->delete_cmd,,1257346704979408336;
->add_cmd,,1257346704979413114;
-<set_cmd_completer,,5470,,1257346704979427487;
->set_cmd_completer,,1257346704979434645;
-<add_cmd,,5471,,1257346704979449227;
-<xmalloc,,5472,,1257346704979467480;
->xmalloc,,1257346704979474301;
-<delete_cmd,,5473,,1257346704979492318;
->delete_cmd,,1257346704979499969;
->add_cmd,,1257346704979504495;
-<set_cmd_completer,,5474,,1257346704979520684;
->set_cmd_completer,,1257346704979527848;
-<add_cmd,,5475,,1257346704979544671;
-<xmalloc,,5476,,1257346704979565558;
->xmalloc,,1257346704979572475;
-<delete_cmd,,5477,,1257346704979591148;
->delete_cmd,,1257346704979599031;
->add_cmd,,1257346704979609095;
-<set_cmd_completer,,5478,,1257346704979625480;
->set_cmd_completer,,1257346704979633052;
-<add_setshow_boolean_cmd,,5479,,1257346704979650131;
-<add_setshow_cmd_full,,5480,,1257346704979670383;
-<xstrdup,,5481,,1257346704979677334;
-<xmalloc,,5482,,1257346704979697249;
->xmalloc,,1257346704979704413;
->xstrdup,,1257346704979708966;
-<xstrdup,,5483,,1257346704979713453;
-<xmalloc,,5484,,1257346704979729317;
->xmalloc,,1257346704979736153;
->xstrdup,,1257346704979740571;
-<add_set_or_show_cmd,,5485,,1257346704979756020;
-<add_cmd,,5486,,1257346704979771881;
-<xmalloc,,5487,,1257346704979790506;
->xmalloc,,1257346704979797198;
-<delete_cmd,,5488,,1257346704979812520;
->delete_cmd,,1257346704979819919;
->add_cmd,,1257346704979824556;
->add_set_or_show_cmd,,1257346704979829269;
-<add_set_or_show_cmd,,5489,,1257346704979847133;
-<add_cmd,,5490,,1257346704979863214;
-<xmalloc,,5491,,1257346704979881938;
->xmalloc,,1257346704979888545;
-<delete_cmd,,5492,,1257346704979903796;
->delete_cmd,,1257346704979911320;
->add_cmd,,1257346704979915964;
->add_set_or_show_cmd,,1257346704979920689;
->add_setshow_cmd_full,,1257346704979925515;
->add_setshow_boolean_cmd,,1257346704979930427;
-<add_prefix_cmd,,5493,,1257346704979944859;
-<add_cmd,,5494,,1257346704979961099;
-<xmalloc,,5495,,1257346704979980088;
->xmalloc,,1257346704979986855;
-<delete_cmd,,5496,,1257346704980002112;
->delete_cmd,,1257346704980009645;
->add_cmd,,1257346704980014328;
->add_prefix_cmd,,1257346704980018833;
-<add_com_alias,,5497,,1257346704980033157;
-<add_alias_cmd,,5498,,1257346704980049391;
-<lookup_cmd,,5499,,1257346704980066351;
-<lookup_cmd_1,,5500,,1257346704980082055;
-<find_command_name_length,,5501,,1257346704980099865;
->find_command_name_length,,1257346704980107179;
-<find_cmd,,5502,,1257346704980121308;
->find_cmd,,1257346704980128568;
-<lookup_cmd_1,,5503,,1257346704980142345;
-<find_command_name_length,,5504,,1257346704980160248;
->find_command_name_length,,1257346704980167526;
->lookup_cmd_1,,1257346704980172125;
->lookup_cmd_1,,1257346704980176600;
->lookup_cmd,,1257346704980181021;
-<add_cmd,,5505,,1257346704980194299;
-<xmalloc,,5506,,1257346704980213510;
->xmalloc,,1257346704980220205;
-<delete_cmd,,5507,,1257346704980235705;
->delete_cmd,,1257346704980243163;
->add_cmd,,1257346704980247743;
->add_alias_cmd,,1257346704980252194;
->add_com_alias,,1257346704980256651;
-<add_com_alias,,5508,,1257346704980272140;
-<add_alias_cmd,,5509,,1257346704980287878;
-<lookup_cmd,,5510,,1257346704980305038;
-<lookup_cmd_1,,5511,,1257346704980321197;
-<find_command_name_length,,5512,,1257346704980339034;
->find_command_name_length,,1257346704980346303;
-<find_cmd,,5513,,1257346704980361400;
->find_cmd,,1257346704980368549;
-<lookup_cmd_1,,5514,,1257346704980381935;
-<find_command_name_length,,5515,,1257346704980400346;
->find_command_name_length,,1257346704980407570;
->lookup_cmd_1,,1257346704980412184;
->lookup_cmd_1,,1257346704980416680;
->lookup_cmd,,1257346704980421080;
-<add_cmd,,5516,,1257346704980434893;
-<xmalloc,,5517,,1257346704980453764;
->xmalloc,,1257346704980460582;
-<delete_cmd,,5518,,1257346704980475872;
->delete_cmd,,1257346704980483583;
->add_cmd,,1257346704980488130;
->add_alias_cmd,,1257346704980492602;
->add_com_alias,,1257346704980497050;
-<add_cmd,,5519,,1257346704980511715;
-<xmalloc,,5520,,1257346704980530649;
->xmalloc,,1257346704980537491;
-<delete_cmd,,5521,,1257346704980553076;
->delete_cmd,,1257346704980560107;
->add_cmd,,1257346704980564522;
-<add_cmd,,5522,,1257346704980579670;
-<xmalloc,,5523,,1257346704980598677;
->xmalloc,,1257346704980610099;
-<delete_cmd,,5524,,1257346704980625455;
->delete_cmd,,1257346704980632552;
->add_cmd,,1257346704980637015;
-<add_cmd,,5525,,1257346704980651238;
-<xmalloc,,5526,,1257346704980670596;
->xmalloc,,1257346704980677459;
-<delete_cmd,,5527,,1257346704980692581;
->delete_cmd,,1257346704980699579;
->add_cmd,,1257346704980703976;
-<add_cmd,,5528,,1257346704980718114;
-<xmalloc,,5529,,1257346704980737554;
->xmalloc,,1257346704980744444;
-<delete_cmd,,5530,,1257346704980759869;
->delete_cmd,,1257346704980766885;
->add_cmd,,1257346704980771354;
-<add_cmd,,5531,,1257346704980785450;
-<xmalloc,,5532,,1257346704980804289;
->xmalloc,,1257346704980811145;
-<delete_cmd,,5533,,1257346704980826447;
->delete_cmd,,1257346704980834919;
->add_cmd,,1257346704980839443;
-<add_cmd,,5534,,1257346704980853677;
-<xmalloc,,5535,,1257346704980872524;
->xmalloc,,1257346704980879519;
-<delete_cmd,,5536,,1257346704980894608;
->delete_cmd,,1257346704980901871;
->add_cmd,,1257346704980906240;
-<add_cmd,,5537,,1257346704980920811;
-<xmalloc,,5538,,1257346704980939665;
->xmalloc,,1257346704980946507;
-<delete_cmd,,5539,,1257346704980962067;
->delete_cmd,,1257346704980969159;
->add_cmd,,1257346704980973586;
-<xmalloc,,5540,,1257346704980990160;
->xmalloc,,1257346704980997023;
-<add_filename_language,,5541,,1257346704981010087;
-<xstrdup,,5542,,1257346704981019046;
-<xmalloc,,5543,,1257346704981037515;
->xmalloc,,1257346704981044347;
->xstrdup,,1257346704981048868;
->add_filename_language,,1257346704981053893;
-<add_filename_language,,5544,,1257346704981065887;
-<xstrdup,,5545,,1257346704981073129;
-<xmalloc,,5546,,1257346704981091311;
->xmalloc,,1257346704981098036;
->xstrdup,,1257346704981102469;
->add_filename_language,,1257346704981107182;
-<add_filename_language,,5547,,1257346704981119019;
-<xstrdup,,5548,,1257346704981126014;
-<xmalloc,,5549,,1257346704981144880;
->xmalloc,,1257346704981151626;
->xstrdup,,1257346704981156059;
->add_filename_language,,1257346704981160795;
-<add_filename_language,,5550,,1257346704981172635;
-<xstrdup,,5551,,1257346704981179688;
-<xmalloc,,5552,,1257346704981198069;
->xmalloc,,1257346704981204779;
->xstrdup,,1257346704981209275;
->add_filename_language,,1257346704981213954;
-<add_filename_language,,5553,,1257346704981225918;
-<xstrdup,,5554,,1257346704981233097;
-<xmalloc,,5555,,1257346704981251340;
->xmalloc,,1257346704981258176;
->xstrdup,,1257346704981262603;
->add_filename_language,,1257346704981267279;
-<add_filename_language,,5556,,1257346704981279041;
-<xstrdup,,5557,,1257346704981285997;
-<xmalloc,,5558,,1257346704981304207;
->xmalloc,,1257346704981310926;
->xstrdup,,1257346704981315425;
->add_filename_language,,1257346704981320174;
-<add_filename_language,,5559,,1257346704981332534;
-<xstrdup,,5560,,1257346704981339936;
-<xmalloc,,5561,,1257346704981358527;
->xmalloc,,1257346704981365243;
->xstrdup,,1257346704981369664;
->add_filename_language,,1257346704981374344;
-<add_filename_language,,5562,,1257346704981387390;
-<xstrdup,,5563,,1257346704981394490;
-<xmalloc,,5564,,1257346704981414469;
->xmalloc,,1257346704981421160;
->xstrdup,,1257346704981425557;
->add_filename_language,,1257346704981430222;
-<add_filename_language,,5565,,1257346704981441951;
-<xstrdup,,5566,,1257346704981449114;
-<xmalloc,,5567,,1257346704981467372;
->xmalloc,,1257346704981474145;
->xstrdup,,1257346704981478720;
->add_filename_language,,1257346704981483429;
-<add_filename_language,,5568,,1257346704981495269;
-<xstrdup,,5569,,1257346704981502406;
-<xmalloc,,5570,,1257346704981521151;
->xmalloc,,1257346704981527858;
->xstrdup,,1257346704981532288;
->add_filename_language,,1257346704981536970;
-<add_filename_language,,5571,,1257346704981549108;
-<xstrdup,,5572,,1257346704981556079;
-<xmalloc,,5573,,1257346704981574494;
->xmalloc,,1257346704981581321;
->xstrdup,,1257346704981585739;
->add_filename_language,,1257346704981590445;
-<add_filename_language,,5574,,1257346704981606407;
-<xstrdup,,5575,,1257346704981614006;
-<xmalloc,,5576,,1257346704981632264;
->xmalloc,,1257346704981639139;
->xstrdup,,1257346704981643563;
->add_filename_language,,1257346704981648279;
-<add_filename_language,,5577,,1257346704981660158;
-<xstrdup,,5578,,1257346704981667322;
-<xmalloc,,5579,,1257346704981685712;
->xmalloc,,1257346704981692389;
->xstrdup,,1257346704981696831;
->add_filename_language,,1257346704981701562;
-<add_filename_language,,5580,,1257346704981714731;
-<xstrdup,,5581,,1257346704981721780;
-<xmalloc,,5582,,1257346704981742333;
->xmalloc,,1257346704981749031;
->xstrdup,,1257346704981753401;
->add_filename_language,,1257346704981758083;
-<add_filename_language,,5583,,1257346704981771271;
-<xstrdup,,5584,,1257346704981778482;
-<xmalloc,,5585,,1257346704981797138;
->xmalloc,,1257346704981803898;
->xstrdup,,1257346704981808310;
->add_filename_language,,1257346704981813035;
-<add_filename_language,,5586,,1257346704981824989;
-<xstrdup,,5587,,1257346704981832072;
-<xmalloc,,5588,,1257346704981850754;
->xmalloc,,1257346704981857527;
->xstrdup,,1257346704981861933;
->add_filename_language,,1257346704981866757;
-<add_filename_language,,5589,,1257346704981878690;
-<xstrdup,,5590,,1257346704981885803;
-<xmalloc,,5591,,1257346704981904070;
->xmalloc,,1257346704981910779;
->xstrdup,,1257346704981915173;
->add_filename_language,,1257346704981919859;
-<add_filename_language,,5592,,1257346704981931840;
-<xstrdup,,5593,,1257346704981939061;
-<xmalloc,,5594,,1257346704981957713;
->xmalloc,,1257346704981964441;
->xstrdup,,1257346704981968844;
->add_filename_language,,1257346704981973532;
-<add_filename_language,,5595,,1257346704981985631;
-<xstrdup,,5596,,1257346704981992641;
-<xmalloc,,5597,,1257346704982011318;
->xmalloc,,1257346704982018078;
->xstrdup,,1257346704982022520;
->add_filename_language,,1257346704982027218;
-<add_filename_language,,5598,,1257346704982039124;
-<xstrdup,,5599,,1257346704982046180;
-<xmalloc,,5600,,1257346704982064357;
->xmalloc,,1257346704982070976;
->xstrdup,,1257346704982075460;
->add_filename_language,,1257346704982080167;
-<add_filename_language,,5601,,1257346704982092181;
-<xrealloc,,5602,,1257346704982112415;
->xrealloc,,1257346704982120328;
-<xstrdup,,5603,,1257346704982125022;
-<xmalloc,,5604,,1257346704982143933;
->xmalloc,,1257346704982150733;
->xstrdup,,1257346704982155166;
->add_filename_language,,1257346704982159870;
-<add_filename_language,,5605,,1257346704982172236;
-<xstrdup,,5606,,1257346704982179225;
-<xmalloc,,5607,,1257346704982197532;
->xmalloc,,1257346704982204280;
->xstrdup,,1257346704982208797;
->add_filename_language,,1257346704982213510;
-<add_setshow_string_noescape_cmd,,5608,,1257346704982230767;
-<add_setshow_cmd_full,,5609,,1257346704982250754;
-<xstrprintf,,5610,,1257346704982270546;
-<xstrvprintf,,5611,,1257346704982289036;
->xstrvprintf,,1257346704982297420;
->xstrprintf,,1257346704982302019;
-<xstrprintf,,5612,,1257346704982319119;
-<xstrvprintf,,5613,,1257346704982338306;
->xstrvprintf,,1257346704982345981;
->xstrprintf,,1257346704982350559;
-<add_set_or_show_cmd,,5614,,1257346704982365779;
-<add_cmd,,5615,,1257346704982381761;
-<xmalloc,,5616,,1257346704982400506;
->xmalloc,,1257346704982407183;
-<delete_cmd,,5617,,1257346704982422223;
->delete_cmd,,1257346704982430030;
->add_cmd,,1257346704982434646;
->add_set_or_show_cmd,,1257346704982439296;
-<add_set_or_show_cmd,,5618,,1257346704982454895;
-<add_cmd,,5619,,1257346704982470871;
-<xmalloc,,5620,,1257346704982489833;
->xmalloc,,1257346704982496608;
-<delete_cmd,,5621,,1257346704982513621;
->delete_cmd,,1257346704982521131;
->add_cmd,,1257346704982525639;
->add_set_or_show_cmd,,1257346704982530307;
->add_setshow_cmd_full,,1257346704982535121;
->add_setshow_string_noescape_cmd,,1257346704982539299;
-<add_info,,5622,,1257346704982553858;
-<add_cmd,,5623,,1257346704982569920;
-<xmalloc,,5624,,1257346704982588569;
->xmalloc,,1257346704982595372;
-<delete_cmd,,5625,,1257346704982618645;
->delete_cmd,,1257346704982626686;
->add_cmd,,1257346704982631216;
->add_info,,1257346704982635624;
-<add_setshow_optional_filename_cmd,,5626,,1257346704982652451;
-<add_setshow_cmd_full,,5627,,1257346704982672899;
-<xstrprintf,,5628,,1257346704982693623;
-<xstrvprintf,,5629,,1257346704982712266;
->xstrvprintf,,1257346704982720813;
->xstrprintf,,1257346704982725402;
-<xstrprintf,,5630,,1257346704982742722;
-<xstrvprintf,,5631,,1257346704982761873;
->xstrvprintf,,1257346704982770159;
->xstrprintf,,1257346704982774739;
-<add_set_or_show_cmd,,5632,,1257346704982789869;
-<add_cmd,,5633,,1257346704982806007;
-<xmalloc,,5634,,1257346704982824443;
->xmalloc,,1257346704982833817;
-<delete_cmd,,5635,,1257346704982848638;
->delete_cmd,,1257346704982856201;
->add_cmd,,1257346704982860724;
->add_set_or_show_cmd,,1257346704982865413;
-<add_set_or_show_cmd,,5636,,1257346704982880468;
-<add_cmd,,5637,,1257346704982896468;
-<xmalloc,,5638,,1257346704982914798;
->xmalloc,,1257346704982921565;
-<delete_cmd,,5639,,1257346704982936470;
->delete_cmd,,1257346704982943796;
->add_cmd,,1257346704982948355;
->add_set_or_show_cmd,,1257346704982953059;
->add_setshow_cmd_full,,1257346704982957792;
->add_setshow_optional_filename_cmd,,1257346704982963125;
->_initialize_symfile,,1257346704982968165;
-<_initialize_symmisc,,5640,,1257346704982981112;
->_initialize_symmisc,,1257346704982990943;
-<_initialize_infcall,,5641,,1257346704983002281;
-<add_setshow_boolean_cmd,,5642,,1257346704983021652;
-<add_setshow_cmd_full,,5643,,1257346704983041345;
-<xstrprintf,,5644,,1257346704983061028;
-<xstrvprintf,,5645,,1257346704983079825;
->xstrvprintf,,1257346704983089127;
->xstrprintf,,1257346704983093713;
-<xstrprintf,,5646,,1257346704983110991;
-<xstrvprintf,,5647,,1257346704983129456;
->xstrvprintf,,1257346704983138100;
->xstrprintf,,1257346704983142677;
-<add_set_or_show_cmd,,5648,,1257346704983157856;
-<add_cmd,,5649,,1257346704983173906;
-<xmalloc,,5650,,1257346704983192146;
->xmalloc,,1257346704983198940;
-<delete_cmd,,5651,,1257346704983214299;
->delete_cmd,,1257346704983222882;
->add_cmd,,1257346704983227471;
->add_set_or_show_cmd,,1257346704983232265;
-<add_set_or_show_cmd,,5652,,1257346704983247513;
-<add_cmd,,5653,,1257346704983264114;
-<xmalloc,,5654,,1257346704983282534;
->xmalloc,,1257346704983289265;
-<delete_cmd,,5655,,1257346704983304107;
->delete_cmd,,1257346704983311478;
->add_cmd,,1257346704983316067;
->add_set_or_show_cmd,,1257346704983320774;
->add_setshow_cmd_full,,1257346704983325622;
->add_setshow_boolean_cmd,,1257346704983330551;
-<add_setshow_boolean_cmd,,5656,,1257346704983345591;
-<add_setshow_cmd_full,,5657,,1257346704983365290;
-<xstrprintf,,5658,,1257346704983384540;
-<xstrvprintf,,5659,,1257346704983403262;
->xstrvprintf,,1257346704983412130;
->xstrprintf,,1257346704983416738;
-<xstrprintf,,5660,,1257346704983433940;
-<xstrvprintf,,5661,,1257346704983455046;
->xstrvprintf,,1257346704985171150;
->xstrprintf,,1257346704985176789;
-<add_set_or_show_cmd,,5662,,1257346704985192641;
-<add_cmd,,5663,,1257346704985209979;
-<xmalloc,,5664,,1257346704985228700;
->xmalloc,,1257346704985235692;
-<delete_cmd,,5665,,1257346704985250690;
->delete_cmd,,1257346704985258648;
->add_cmd,,1257346704985263384;
->add_set_or_show_cmd,,1257346704985268169;
-<add_set_or_show_cmd,,5666,,1257346704985283402;
-<add_cmd,,5667,,1257346704985299961;
-<xmalloc,,5668,,1257346704985318487;
->xmalloc,,1257346704985325223;
-<delete_cmd,,5669,,1257346704985339963;
->delete_cmd,,1257346704985347349;
->add_cmd,,1257346704985351983;
->add_set_or_show_cmd,,1257346704985356678;
->add_setshow_cmd_full,,1257346704985361508;
->add_setshow_boolean_cmd,,1257346704985366470;
-<add_setshow_boolean_cmd,,5670,,1257346704985382620;
-<add_setshow_cmd_full,,5671,,1257346704985402265;
-<xstrprintf,,5672,,1257346704985421675;
-<xstrvprintf,,5673,,1257346704985440447;
->xstrvprintf,,1257346704985449523;
->xstrprintf,,1257346704985454173;
-<xstrprintf,,5674,,1257346704985471035;
-<xstrvprintf,,5675,,1257346704985490436;
->xstrvprintf,,1257346704985499047;
->xstrprintf,,1257346704985503642;
-<add_set_or_show_cmd,,5676,,1257346704985518860;
-<add_cmd,,5677,,1257346704985534745;
-<xmalloc,,5678,,1257346704985554176;
->xmalloc,,1257346704985560970;
-<delete_cmd,,5679,,1257346704985575920;
->delete_cmd,,1257346704985583363;
->add_cmd,,1257346704985587961;
->add_set_or_show_cmd,,1257346704985592773;
-<add_set_or_show_cmd,,5680,,1257346704985613545;
-<add_cmd,,5681,,1257346704985629977;
-<xmalloc,,5682,,1257346704985649721;
->xmalloc,,1257346704985656596;
-<delete_cmd,,5683,,1257346704985671384;
->delete_cmd,,1257346704985678776;
->add_cmd,,1257346704985683440;
->add_set_or_show_cmd,,1257346704985688138;
->add_setshow_cmd_full,,1257346704985692941;
->add_setshow_boolean_cmd,,1257346704985697786;
->_initialize_infcall,,1257346704985702799;
-<_initialize_infcmd,,5684,,1257346704985715199;
-<add_setshow_filename_cmd,,5685,,1257346704985738299;
-<add_setshow_cmd_full,,5686,,1257346704985757973;
-<xstrprintf,,5687,,1257346704985777013;
-<xstrvprintf,,5688,,1257346704985796042;
->xstrvprintf,,1257346704985803753;
->xstrprintf,,1257346704985808348;
-<xstrprintf,,5689,,1257346704985825096;
-<xstrvprintf,,5690,,1257346704985844079;
->xstrvprintf,,1257346704985851700;
->xstrprintf,,1257346704985856283;
-<add_set_or_show_cmd,,5691,,1257346704985871904;
-<add_cmd,,5692,,1257346704985887627;
-<xmalloc,,5693,,1257346704985906649;
->xmalloc,,1257346704985913427;
-<delete_cmd,,5694,,1257346704985928473;
->delete_cmd,,1257346704985936188;
->add_cmd,,1257346704985940714;
->add_set_or_show_cmd,,1257346704985945477;
-<add_set_or_show_cmd,,5695,,1257346704985961179;
-<add_cmd,,5696,,1257346704985977041;
-<xmalloc,,5697,,1257346704985995659;
->xmalloc,,1257346704986002417;
-<delete_cmd,,5698,,1257346704986017355;
->delete_cmd,,1257346704986024663;
->add_cmd,,1257346704986029177;
->add_set_or_show_cmd,,1257346704986033860;
->add_setshow_cmd_full,,1257346704986038621;
->add_setshow_filename_cmd,,1257346704986043493;
-<add_com_alias,,5699,,1257346704986058653;
-<add_alias_cmd,,5700,,1257346704986074740;
-<lookup_cmd,,5701,,1257346704986091759;
-<lookup_cmd_1,,5702,,1257346704986107518;
-<find_command_name_length,,5703,,1257346704986125962;
->find_command_name_length,,1257346704986133315;
-<find_cmd,,5704,,1257346704986147911;
->find_cmd,,1257346704986156355;
-<lookup_cmd_1,,5705,,1257346704986169420;
-<find_command_name_length,,5706,,1257346704986187720;
->find_command_name_length,,1257346704986195016;
-<find_cmd,,5707,,1257346704986209388;
->find_cmd,,1257346704986216357;
->lookup_cmd_1,,1257346704986220958;
->lookup_cmd_1,,1257346704986225466;
->lookup_cmd,,1257346704986229956;
-<add_cmd,,5708,,1257346704986243339;
-<xmalloc,,5709,,1257346704986261164;
->xmalloc,,1257346704986267928;
-<delete_cmd,,5710,,1257346704986282520;
->delete_cmd,,1257346704986290962;
->add_cmd,,1257346704986295702;
->add_alias_cmd,,1257346704986300240;
->add_com_alias,,1257346704986304983;
-<add_setshow_optional_filename_cmd,,5711,,1257346704986321376;
-<add_setshow_cmd_full,,5712,,1257346704986341002;
-<xstrprintf,,5713,,1257346704986359913;
-<xstrvprintf,,5714,,1257346704986378523;
->xstrvprintf,,1257346704986390090;
->xstrprintf,,1257346704986394784;
-<xstrprintf,,5715,,1257346704986411662;
-<xstrvprintf,,5716,,1257346704986431192;
->xstrvprintf,,1257346704986439433;
->xstrprintf,,1257346704986444124;
-<add_set_or_show_cmd,,5717,,1257346704986459976;
-<add_cmd,,5718,,1257346704986475792;
-<xmalloc,,5719,,1257346704986494562;
->xmalloc,,1257346704986501377;
-<delete_cmd,,5720,,1257346704986515993;
->delete_cmd,,1257346704986523451;
->add_cmd,,1257346704986527929;
->add_set_or_show_cmd,,1257346704986532624;
-<add_set_or_show_cmd,,5721,,1257346704986547907;
-<add_cmd,,5722,,1257346704986563751;
-<xmalloc,,5723,,1257346704986582613;
->xmalloc,,1257346704986589389;
-<delete_cmd,,5724,,1257346704986609193;
->delete_cmd,,1257346704986617019;
->add_cmd,,1257346704986621545;
->add_set_or_show_cmd,,1257346704986626257;
->add_setshow_cmd_full,,1257346704986631129;
->add_setshow_optional_filename_cmd,,1257346704986636320;
-<add_cmd,,5725,,1257346704986651081;
-<xmalloc,,5726,,1257346704986669661;
->xmalloc,,1257346704986676641;
-<delete_cmd,,5727,,1257346704986691100;
->delete_cmd,,1257346704986698481;
->add_cmd,,1257346704986703001;
-<set_cmd_completer,,5728,,1257346704986717214;
->set_cmd_completer,,1257346704986724387;
-<add_prefix_cmd,,5729,,1257346704986738669;
-<add_cmd,,5730,,1257346704986754644;
-<xmalloc,,5731,,1257346704986773949;
->xmalloc,,1257346704986780875;
-<delete_cmd,,5732,,1257346704986795311;
->delete_cmd,,1257346704986802896;
->add_cmd,,1257346704986807780;
->add_prefix_cmd,,1257346704986812357;
-<add_cmd,,5733,,1257346704986826525;
-<xmalloc,,5734,,1257346704986845207;
->xmalloc,,1257346704986852187;
-<delete_cmd,,5735,,1257346704986867092;
->delete_cmd,,1257346704986874394;
->add_cmd,,1257346704986878782;
-<set_cmd_completer,,5736,,1257346704986892908;
->set_cmd_completer,,1257346704986899945;
-<add_cmd,,5737,,1257346704986914177;
-<xmalloc,,5738,,1257346704986932450;
->xmalloc,,1257346704986939291;
-<delete_cmd,,5739,,1257346704986953760;
->delete_cmd,,1257346704986961204;
->add_cmd,,1257346704986965655;
-<set_cmd_completer,,5740,,1257346704986979528;
->set_cmd_completer,,1257346704986986568;
-<add_com,,5741,,1257346704987002754;
-<add_cmd,,5742,,1257346704987018778;
-<xmalloc,,5743,,1257346704987037045;
->xmalloc,,1257346704987043797;
-<delete_cmd,,5744,,1257346704987058241;
->delete_cmd,,1257346704987065886;
->add_cmd,,1257346704987070533;
->add_com,,1257346704987074932;
-<set_cmd_completer,,5745,,1257346704987088803;
->set_cmd_completer,,1257346704987096012;
-<add_cmd,,5746,,1257346704987110456;
-<xmalloc,,5747,,1257346704987128435;
->xmalloc,,1257346704987135481;
-<delete_cmd,,5748,,1257346704987150034;
->delete_cmd,,1257346704987157426;
->add_cmd,,1257346704987162064;
-<set_cmd_completer,,5749,,1257346704987175820;
->set_cmd_completer,,1257346704987182971;
-<add_prefix_cmd,,5750,,1257346704987196839;
-<add_cmd,,5751,,1257346704987212811;
-<xmalloc,,5752,,1257346704987231030;
->xmalloc,,1257346704987237848;
-<delete_cmd,,5753,,1257346704987252124;
->delete_cmd,,1257346704987259748;
->add_cmd,,1257346704987264440;
->add_prefix_cmd,,1257346704987268936;
-<add_com,,5754,,1257346704987284523;
-<add_cmd,,5755,,1257346704987300387;
-<xmalloc,,5756,,1257346704987318733;
->xmalloc,,1257346704987325553;
-<delete_cmd,,5757,,1257346704987340091;
->delete_cmd,,1257346704987347902;
->add_cmd,,1257346704987352401;
->add_com,,1257346704987356801;
-<add_prefix_cmd,,5758,,1257346704987370764;
-<add_cmd,,5759,,1257346704987386616;
-<xmalloc,,5760,,1257346704988147949;
->xmalloc,,1257346704988157362;
-<delete_cmd,,5761,,1257346704988171942;
->delete_cmd,,1257346704988180249;
->add_cmd,,1257346704988184910;
->add_prefix_cmd,,1257346704988189488;
-<add_com,,5762,,1257346704988206465;
-<add_cmd,,5763,,1257346704988222365;
-<xmalloc,,5764,,1257346704988241171;
->xmalloc,,1257346704988248036;
-<delete_cmd,,5765,,1257346704988262265;
->delete_cmd,,1257346704988269991;
->add_cmd,,1257346704988274664;
->add_com,,1257346704988279013;
-<add_com,,5766,,1257346704988294576;
-<add_cmd,,5767,,1257346704988310486;
-<xmalloc,,5768,,1257346704988329273;
->xmalloc,,1257346704988336076;
-<delete_cmd,,5769,,1257346704988350379;
->delete_cmd,,1257346704988358090;
->add_cmd,,1257346704988362860;
->add_com,,1257346704988367224;
-<add_com,,5770,,1257346704988382556;
-<add_cmd,,5771,,1257346704988399166;
-<xmalloc,,5772,,1257346704988417685;
->xmalloc,,1257346704988424500;
-<delete_cmd,,5773,,1257346704988438861;
->delete_cmd,,1257346704988448379;
->add_cmd,,1257346704988453284;
->add_com,,1257346704988457630;
-<add_com_alias,,5774,,1257346704988471816;
-<add_alias_cmd,,5775,,1257346704988488171;
-<lookup_cmd,,5776,,1257346704988504513;
-<lookup_cmd_1,,5777,,1257346704988519887;
-<find_command_name_length,,5778,,1257346704988537537;
->find_command_name_length,,1257346704988544863;
-<find_cmd,,5779,,1257346704988558613;
->find_cmd,,1257346704988565994;
->lookup_cmd_1,,1257346704988570679;
->lookup_cmd,,1257346704988575230;
-<add_cmd,,5780,,1257346704988588330;
-<xmalloc,,5781,,1257346704988611630;
->xmalloc,,1257346704988619097;
-<delete_cmd,,5782,,1257346704988633539;
->delete_cmd,,1257346704988641373;
->add_cmd,,1257346704988646068;
->add_alias_cmd,,1257346704988650609;
->add_com_alias,,1257346704988655114;
-<add_com,,5783,,1257346704988670765;
-<add_cmd,,5784,,1257346704988687044;
-<xmalloc,,5785,,1257346704988705404;
->xmalloc,,1257346704988712129;
-<delete_cmd,,5786,,1257346704988726357;
->delete_cmd,,1257346704988733933;
->add_cmd,,1257346704988738567;
->add_com,,1257346704988743109;
-<add_com_alias,,5787,,1257346704988757051;
-<add_alias_cmd,,5788,,1257346704988772930;
-<lookup_cmd,,5789,,1257346704988789264;
-<lookup_cmd_1,,5790,,1257346704988805326;
-<find_command_name_length,,5791,,1257346704988822860;
->find_command_name_length,,1257346704988830135;
-<find_cmd,,5792,,1257346704988844170;
->find_cmd,,1257346704988851406;
->lookup_cmd_1,,1257346704988855971;
->lookup_cmd,,1257346704988860435;
-<add_cmd,,5793,,1257346704988873625;
-<xmalloc,,5794,,1257346704988892039;
->xmalloc,,1257346704988898944;
-<delete_cmd,,5795,,1257346704988913191;
->delete_cmd,,1257346704988922213;
->add_cmd,,1257346704988926871;
->add_alias_cmd,,1257346704988931377;
->add_com_alias,,1257346704988935879;
-<add_com,,5796,,1257346704988951385;
-<add_cmd,,5797,,1257346704988967294;
-<xmalloc,,5798,,1257346704988985877;
->xmalloc,,1257346704988992614;
-<delete_cmd,,5799,,1257346704989006947;
->delete_cmd,,1257346704989014562;
->add_cmd,,1257346704989019193;
->add_com,,1257346704989023575;
-<add_com_alias,,5800,,1257346704989037623;
-<add_alias_cmd,,5801,,1257346704989053677;
-<lookup_cmd,,5802,,1257346704989069986;
-<lookup_cmd_1,,5803,,1257346704989085450;
-<find_command_name_length,,5804,,1257346704989103020;
->find_command_name_length,,1257346704989110469;
-<find_cmd,,5805,,1257346704989124105;
->find_cmd,,1257346704989131160;
->lookup_cmd_1,,1257346704989135698;
->lookup_cmd,,1257346704989140149;
-<add_cmd,,5806,,1257346704989153367;
-<xmalloc,,5807,,1257346704989171120;
->xmalloc,,1257346704989177923;
-<delete_cmd,,5808,,1257346704989192169;
->delete_cmd,,1257346704989199769;
->add_cmd,,1257346704989204346;
->add_alias_cmd,,1257346704989208992;
->add_com_alias,,1257346704989213443;
-<add_com,,5809,,1257346704989229154;
-<add_cmd,,5810,,1257346704989245169;
-<xmalloc,,5811,,1257346704989263334;
->xmalloc,,1257346704989270157;
-<delete_cmd,,5812,,1257346704989284326;
->delete_cmd,,1257346704989292069;
->add_cmd,,1257346704989296731;
->add_com,,1257346704989301101;
-<add_com_alias,,5813,,1257346704989314968;
-<add_alias_cmd,,5814,,1257346704989330649;
-<lookup_cmd,,5815,,1257346704989347073;
-<lookup_cmd_1,,5816,,1257346704989362874;
-<find_command_name_length,,5817,,1257346704989380395;
->find_command_name_length,,1257346704989387706;
-<find_cmd,,5818,,1257346704989401672;
->find_cmd,,1257346704989408836;
->lookup_cmd_1,,1257346704989413446;
->lookup_cmd,,1257346704989417897;
-<add_cmd,,5819,,1257346704989431593;
-<xmalloc,,5820,,1257346704989449532;
->xmalloc,,1257346704989456311;
-<delete_cmd,,5821,,1257346704989471045;
->delete_cmd,,1257346704989478765;
->add_cmd,,1257346704989483456;
->add_alias_cmd,,1257346704989487937;
->add_com_alias,,1257346704989492539;
-<add_com,,5822,,1257346704989508078;
-<add_cmd,,5823,,1257346704989524078;
-<xmalloc,,5824,,1257346704989542219;
->xmalloc,,1257346704989548946;
-<delete_cmd,,5825,,1257346704989563710;
->delete_cmd,,1257346704989571445;
->add_cmd,,1257346704989576169;
->add_com,,1257346704989580524;
-<add_com_alias,,5826,,1257346704989594849;
-<add_alias_cmd,,5827,,1257346704989615005;
-<lookup_cmd,,5828,,1257346704989631850;
-<lookup_cmd_1,,5829,,1257346704989647582;
-<find_command_name_length,,5830,,1257346704989665025;
->find_command_name_length,,1257346704989672321;
-<find_cmd,,5831,,1257346704989686101;
->find_cmd,,1257346704989693541;
->lookup_cmd_1,,1257346704989698092;
->lookup_cmd,,1257346704989702552;
-<add_cmd,,5832,,1257346704989715712;
-<xmalloc,,5833,,1257346704989733492;
->xmalloc,,1257346704989740340;
-<delete_cmd,,5834,,1257346704989754746;
->delete_cmd,,1257346704989762553;
->add_cmd,,1257346704989767223;
->add_alias_cmd,,1257346704989771768;
->add_com_alias,,1257346704989776369;
-<add_com,,5835,,1257346704989791944;
-<add_cmd,,5836,,1257346704989808248;
-<xmalloc,,5837,,1257346704989826322;
->xmalloc,,1257346704989833044;
-<delete_cmd,,5838,,1257346704989847245;
->delete_cmd,,1257346704989855031;
->add_cmd,,1257346704989859810;
->add_com,,1257346704989864159;
-<set_cmd_completer,,5839,,1257346704989877575;
->set_cmd_completer,,1257346704989884856;
-<add_com_alias,,5840,,1257346704989899027;
-<add_alias_cmd,,5841,,1257346704989914458;
-<lookup_cmd,,5842,,1257346704989931008;
-<lookup_cmd_1,,5843,,1257346704989946376;
-<find_command_name_length,,5844,,1257346704989964246;
->find_command_name_length,,1257346704989971530;
-<find_cmd,,5845,,1257346704989985049;
->find_cmd,,1257346704989992585;
->lookup_cmd_1,,1257346704989997132;
->lookup_cmd,,1257346704990001586;
-<add_cmd,,5846,,1257346704990014602;
-<xmalloc,,5847,,1257346704990032569;
->xmalloc,,1257346704990039414;
-<delete_cmd,,5848,,1257346704990053612;
->delete_cmd,,1257346704990061407;
->add_cmd,,1257346704990066153;
->add_alias_cmd,,1257346704990070679;
->add_com_alias,,1257346704990075208;
-<add_com,,5849,,1257346704990090435;
-<add_cmd,,5850,,1257346704990106485;
-<xmalloc,,5851,,1257346704990124353;
->xmalloc,,1257346704990131125;
-<delete_cmd,,5852,,1257346704990145808;
->delete_cmd,,1257346704990153534;
->add_cmd,,1257346704990158054;
->add_com,,1257346704990162430;
-<set_cmd_completer,,5853,,1257346704990176249;
->set_cmd_completer,,1257346704990183512;
-<add_com,,5854,,1257346704990198811;
-<add_cmd,,5855,,1257346704990214927;
-<xmalloc,,5856,,1257346704990232978;
->xmalloc,,1257346704990239751;
-<delete_cmd,,5857,,1257346704990253901;
->delete_cmd,,1257346704990261801;
->add_cmd,,1257346704990266432;
->add_com,,1257346704990270856;
-<set_cmd_completer,,5858,,1257346704990284444;
->set_cmd_completer,,1257346704990291554;
-<add_com,,5859,,1257346704990307376;
-<add_cmd,,5860,,1257346704990323140;
-<xmalloc,,5861,,1257346704990341615;
->xmalloc,,1257346704990348376;
-<delete_cmd,,5862,,1257346704990362613;
->delete_cmd,,1257346704990370333;
->add_cmd,,1257346704990374968;
->add_com,,1257346704990379331;
-<add_com_alias,,5863,,1257346704990393469;
-<add_alias_cmd,,5864,,1257346704990409030;
-<lookup_cmd,,5865,,1257346704990425495;
-<lookup_cmd_1,,5866,,1257346704990440839;
-<find_command_name_length,,5867,,1257346704990458583;
->find_command_name_length,,1257346704990465894;
-<find_cmd,,5868,,1257346704990479412;
->find_cmd,,1257346704990487085;
->lookup_cmd_1,,1257346704990491629;
->lookup_cmd,,1257346704990496128;
-<add_cmd,,5869,,1257346704990509207;
-<xmalloc,,5870,,1257346704990527937;
->xmalloc,,1257346704990534737;
-<delete_cmd,,5871,,1257346704990548929;
->delete_cmd,,1257346705002749581;
->add_cmd,,1257346705002757163;
->add_alias_cmd,,1257346705002762315;
->add_com_alias,,1257346705002767187;
-<add_com_alias,,5872,,1257346705002788840;
-<add_alias_cmd,,5873,,1257346705002813537;
-<lookup_cmd,,5874,,1257346705002836833;
-<lookup_cmd_1,,5875,,1257346705002858105;
-<find_command_name_length,,5876,,1257346705002881538;
->find_command_name_length,,1257346705002890094;
-<find_cmd,,5877,,1257346705002909011;
->find_cmd,,1257346705002917411;
->lookup_cmd_1,,1257346705002922160;
->lookup_cmd,,1257346705002926963;
-<add_cmd,,5878,,1257346705002946294;
-<xmalloc,,5879,,1257346705002968805;
->xmalloc,,1257346705002976708;
-<delete_cmd,,5880,,1257346705002996536;
->delete_cmd,,1257346705003004467;
->add_cmd,,1257346705003009053;
->add_alias_cmd,,1257346705003013567;
->add_com_alias,,1257346705003018169;
-<add_com,,5881,,1257346705003041552;
-<add_cmd,,5882,,1257346705003061930;
-<xmalloc,,5883,,1257346705003083198;
->xmalloc,,1257346705003090122;
-<delete_cmd,,5884,,1257346705003108148;
->delete_cmd,,1257346705003116006;
->add_cmd,,1257346705003120752;
->add_com,,1257346705003125158;
-<set_cmd_completer,,5885,,1257346705003141840;
->set_cmd_completer,,1257346705003149350;
-<add_com_alias,,5886,,1257346705003166709;
-<add_alias_cmd,,5887,,1257346705003184741;
-<lookup_cmd,,5888,,1257346705003955644;
-<lookup_cmd_1,,5889,,1257346705003978405;
-<find_command_name_length,,5890,,1257346705003999243;
->find_command_name_length,,1257346705004006903;
-<find_cmd,,5891,,1257346705004023793;
->find_cmd,,1257346705004031919;
->lookup_cmd_1,,1257346705004036646;
->lookup_cmd,,1257346705004041281;
-<add_cmd,,5892,,1257346705004058119;
-<xmalloc,,5893,,1257346705004079015;
->xmalloc,,1257346705004091018;
-<delete_cmd,,5894,,1257346705004108969;
->delete_cmd,,1257346705004117441;
->add_cmd,,1257346705004122156;
->add_alias_cmd,,1257346705004126716;
->add_com_alias,,1257346705004131413;
-<add_com,,5895,,1257346705004150083;
-<add_cmd,,5896,,1257346705004170101;
-<xmalloc,,5897,,1257346705004191153;
->xmalloc,,1257346705004198046;
-<delete_cmd,,5898,,1257346705004215886;
->delete_cmd,,1257346705004223859;
->add_cmd,,1257346705004228647;
->add_com,,1257346705004232962;
-<set_cmd_completer,,5899,,1257346705004249232;
->set_cmd_completer,,1257346705004256544;
-<add_com,,5900,,1257346705004274332;
-<add_cmd,,5901,,1257346705004294296;
-<xmalloc,,5902,,1257346705004315281;
->xmalloc,,1257346705004322156;
-<delete_cmd,,5903,,1257346705004339750;
->delete_cmd,,1257346705004347639;
->add_cmd,,1257346705004352306;
->add_com,,1257346705004356676;
-<add_info,,5904,,1257346705004373827;
-<add_cmd,,5905,,1257346705004393369;
-<xmalloc,,5906,,1257346705004414939;
->xmalloc,,1257346705004421780;
-<delete_cmd,,5907,,1257346705004439350;
->delete_cmd,,1257346705004448288;
->add_cmd,,1257346705004452841;
->add_info,,1257346705004457238;
-<add_info_alias,,5908,,1257346705004474579;
-<add_alias_cmd,,5909,,1257346705004492476;
-<lookup_cmd,,5910,,1257346705004512430;
-<lookup_cmd_1,,5911,,1257346705004531239;
-<find_command_name_length,,5912,,1257346705004550595;
->find_command_name_length,,1257346705004557963;
-<find_cmd,,5913,,1257346705004573956;
->find_cmd,,1257346705004581114;
->lookup_cmd_1,,1257346705004585739;
->lookup_cmd,,1257346705004590218;
-<add_cmd,,5914,,1257346705004611760;
-<xmalloc,,5915,,1257346705004636908;
->xmalloc,,1257346705004650357;
-<delete_cmd,,5916,,1257346705004667710;
->delete_cmd,,1257346705004675135;
->add_cmd,,1257346705004679734;
->add_alias_cmd,,1257346705004684254;
->add_info_alias,,1257346705004688976;
-<add_info,,5917,,1257346705004705983;
-<add_cmd,,5918,,1257346705004725077;
-<xmalloc,,5919,,1257346705004745567;
->xmalloc,,1257346705004752387;
-<delete_cmd,,5920,,1257346705004769277;
->delete_cmd,,1257346705004776618;
->add_cmd,,1257346705004781253;
->add_info,,1257346705004785686;
-<add_info,,5921,,1257346705004802365;
-<add_cmd,,5922,,1257346705004821687;
-<xmalloc,,5923,,1257346705004842310;
->xmalloc,,1257346705004849121;
-<delete_cmd,,5924,,1257346705004866062;
->delete_cmd,,1257346705004873587;
->add_cmd,,1257346705004878134;
->add_info,,1257346705004882537;
-<add_info,,5925,,1257346705004899117;
-<add_cmd,,5926,,1257346705004918009;
-<xmalloc,,5927,,1257346705004938571;
->xmalloc,,1257346705004945392;
-<delete_cmd,,5928,,1257346705004962176;
->delete_cmd,,1257346705004969608;
->add_cmd,,1257346705004974185;
->add_info,,1257346705004978582;
-<add_info,,5929,,1257346705004995147;
-<add_cmd,,5930,,1257346705005014401;
-<xmalloc,,5931,,1257346705005035104;
->xmalloc,,1257346705005041933;
-<delete_cmd,,5932,,1257346705005058829;
->delete_cmd,,1257346705005066213;
->add_cmd,,1257346705005070859;
->add_info,,1257346705005075226;
-<make_environ,,5933,,1257346705005088633;
-<xmalloc,,5934,,1257346705005113381;
->xmalloc,,1257346705005120445;
-<xmalloc,,5935,,1257346705005136048;
->xmalloc,,1257346705015621016;
->make_environ,,1257346705015627861;
-<init_environ,,5936,,1257346705015643090;
-<xrealloc,,5937,,1257346705015671206;
->xrealloc,,1257346705015680301;
-<xmalloc,,5938,,1257346705015700478;
->xmalloc,,1257346705015707575;
-<xmalloc,,5939,,1257346705015723295;
->xmalloc,,1257346705015730245;
-<xmalloc,,5940,,1257346705015745592;
->xmalloc,,1257346705015752449;
-<xmalloc,,5941,,1257346705015768370;
->xmalloc,,1257346705015775173;
-<xmalloc,,5942,,1257346705015791002;
->xmalloc,,1257346705015797937;
-<xmalloc,,5943,,1257346705015813569;
->xmalloc,,1257346705015820429;
-<xmalloc,,5944,,1257346705015836414;
->xmalloc,,1257346705015843111;
-<xmalloc,,5945,,1257346705015859252;
->xmalloc,,1257346705015866079;
-<xmalloc,,5946,,1257346705015881778;
->xmalloc,,1257346705015888517;
-<xmalloc,,5947,,1257346705015904132;
->xmalloc,,1257346705015910995;
-<xmalloc,,5948,,1257346705015927024;
->xmalloc,,1257346705015933737;
-<xmalloc,,5949,,1257346705015949258;
->xmalloc,,1257346705015956031;
-<xmalloc,,5950,,1257346705015971297;
->xmalloc,,1257346705015978106;
-<xmalloc,,5951,,1257346705015993627;
->xmalloc,,1257346705016000457;
-<xmalloc,,5952,,1257346705016015999;
->xmalloc,,1257346705016022802;
-<xmalloc,,5953,,1257346705016038275;
->xmalloc,,1257346705016045165;
-<xmalloc,,5954,,1257346705016060509;
->xmalloc,,1257346705016067333;
-<xmalloc,,5955,,1257346705016083272;
->xmalloc,,1257346705016090057;
-<xmalloc,,5956,,1257346705016106014;
->xmalloc,,1257346705016112838;
-<xmalloc,,5957,,1257346705016128149;
->xmalloc,,1257346705016134907;
-<xmalloc,,5958,,1257346705016150305;
->xmalloc,,1257346705016157228;
-<xmalloc,,5959,,1257346705016172563;
->xmalloc,,1257346705016179369;
-<xmalloc,,5960,,1257346705016194911;
->xmalloc,,1257346705016201783;
-<xmalloc,,5961,,1257346705016217259;
->xmalloc,,1257346705016223972;
-<xmalloc,,5962,,1257346705016240155;
->xmalloc,,1257346705016246928;
-<xmalloc,,5963,,1257346705016262298;
->xmalloc,,1257346705016269038;
-<xmalloc,,5964,,1257346705016284493;
->xmalloc,,1257346705016291302;
-<xmalloc,,5965,,1257346705016306802;
->xmalloc,,1257346705016313659;
-<xmalloc,,5966,,1257346705016330047;
->xmalloc,,1257346705016336976;
-<xmalloc,,5967,,1257346705016352593;
->xmalloc,,1257346705016359438;
-<xmalloc,,5968,,1257346705016375071;
->xmalloc,,1257346705016381928;
-<xmalloc,,5969,,1257346705016397431;
->xmalloc,,1257346705016404288;
-<xmalloc,,5970,,1257346705016420477;
->xmalloc,,1257346705016427391;
-<xmalloc,,5971,,1257346705016443676;
->xmalloc,,1257346705016450976;
-<xmalloc,,5972,,1257346705016467158;
->xmalloc,,1257346705016474100;
-<xmalloc,,5973,,1257346705016490054;
->xmalloc,,1257346705016496818;
-<xmalloc,,5974,,1257346705016512673;
->xmalloc,,1257346705016519383;
-<xmalloc,,5975,,1257346705016534916;
->xmalloc,,1257346705016541658;
-<xmalloc,,5976,,1257346705016557117;
->xmalloc,,1257346705016563814;
-<xmalloc,,5977,,1257346705016579158;
->xmalloc,,1257346705016585913;
-<xmalloc,,5978,,1257346705016606230;
->xmalloc,,1257346705016613662;
-<xmalloc,,5979,,1257346705016630542;
->xmalloc,,1257346705016637345;
-<xmalloc,,5980,,1257346705016653104;
->xmalloc,,1257346705016659870;
-<xmalloc,,5981,,1257346705016676318;
->xmalloc,,1257346705016683109;
-<xmalloc,,5982,,1257346705016698898;
->xmalloc,,1257346705016705656;
-<xmalloc,,5983,,1257346705016721433;
->xmalloc,,1257346705016728169;
-<xmalloc,,5984,,1257346705016743625;
->xmalloc,,1257346705016750439;
-<xmalloc,,5985,,1257346705016766800;
->xmalloc,,1257346705016773542;
->init_environ,,1257346705016778237;
->_initialize_infcmd,,1257346705016783392;
-<_initialize_infrun,,5986,,1257346705016797563;
-<add_info,,5987,,1257346705016821968;
-<add_cmd,,5988,,1257346705016842840;
-<xmalloc,,5989,,1257346705016865061;
->xmalloc,,1257346705016876484;
-<delete_cmd,,5990,,1257346705016895328;
->delete_cmd,,1257346705016904621;
->add_cmd,,1257346705016909183;
->add_info,,1257346705016913586;
-<add_info_alias,,5991,,1257346705016930485;
-<add_alias_cmd,,5992,,1257346705016949227;
-<lookup_cmd,,5993,,1257346705016969615;
-<lookup_cmd_1,,5994,,1257346705016988492;
-<find_command_name_length,,5995,,1257346705017008864;
->find_command_name_length,,1257346705017016615;
-<find_cmd,,5996,,1257346705017032723;
->find_cmd,,1257346705017040202;
->lookup_cmd_1,,1257346705017044824;
->lookup_cmd,,1257346705017049468;
-<add_cmd,,5997,,1257346705017065943;
-<xmalloc,,5998,,1257346705017086348;
->xmalloc,,1257346705017093364;
-<delete_cmd,,5999,,1257346705017110994;
->delete_cmd,,1257346705017118392;
->add_cmd,,1257346705017122918;
->add_alias_cmd,,1257346705017127517;
->add_info_alias,,1257346705017132055;
-<add_com,,6000,,1257346705017150289;
-<add_cmd,,6001,,1257346705017169690;
-<xmalloc,,6002,,1257346705017190438;
->xmalloc,,1257346705017197310;
-<delete_cmd,,6003,,1257346705017214152;
->delete_cmd,,1257346705017226521;
->add_cmd,,1257346705017231119;
->add_com,,1257346705017235507;
-<add_cmd,,6004,,1257346705017252926;
-<xmalloc,,6005,,1257346705017274072;
->xmalloc,,1257346705017281073;
-<delete_cmd,,6006,,1257346705017297888;
->delete_cmd,,1257346705017305878;
->add_cmd,,1257346705017310648;
-<add_setshow_zinteger_cmd,,6007,,1257346705017329366;
-<add_setshow_cmd_full,,6008,,1257346705017351835;
-<xstrprintf,,6009,,1257346705017375112;
-<xstrvprintf,,6010,,1257346705017396841;
->xstrvprintf,,1257346705017408738;
->xstrprintf,,1257346705017413553;
-<xstrprintf,,6011,,1257346705017433198;
-<xstrvprintf,,6012,,1257346705017454514;
->xstrvprintf,,1257346705017462385;
->xstrprintf,,1257346705017466974;
-<add_set_or_show_cmd,,6013,,1257346705017484643;
-<add_cmd,,6014,,1257346705017502573;
-<xmalloc,,6015,,1257346705017523273;
->xmalloc,,1257346705017530103;
-<delete_cmd,,6016,,1257346705017546650;
->delete_cmd,,1257346705017554427;
->add_cmd,,1257346705017558890;
->add_set_or_show_cmd,,1257346705017563558;
-<add_set_or_show_cmd,,6017,,1257346705017579948;
-<add_cmd,,6018,,1257346705017597713;
-<xmalloc,,6019,,1257346705017622165;
->xmalloc,,1257346705017629476;
-<delete_cmd,,6020,,1257346705017646113;
->delete_cmd,,1257346705017653671;
->add_cmd,,1257346705017658170;
->add_set_or_show_cmd,,1257346705017662841;
->add_setshow_cmd_full,,1257346705017667782;
->add_setshow_zinteger_cmd,,1257346705017671704;
-<add_setshow_boolean_cmd,,6021,,1257346705017690224;
-<add_setshow_cmd_full,,6022,,1257346705017712349;
-<xstrprintf,,6023,,1257346705017734039;
-<xstrvprintf,,6024,,1257346705017753996;
->xstrvprintf,,1257346705017761833;
->xstrprintf,,1257346705017766398;
-<xstrprintf,,6025,,1257346705017785339;
-<xstrvprintf,,6026,,1257346705017805546;
->xstrvprintf,,1257346705017813146;
->xstrprintf,,1257346705017817889;
-<add_set_or_show_cmd,,6027,,1257346705017834451;
-<add_cmd,,6028,,1257346705017852387;
-<xmalloc,,6029,,1257346705017872035;
->xmalloc,,1257346705017878858;
-<delete_cmd,,6030,,1257346705017895267;
->delete_cmd,,1257346705017902370;
->add_cmd,,1257346705017906791;
->add_set_or_show_cmd,,1257346705017911465;
-<add_set_or_show_cmd,,6031,,1257346705017927873;
-<add_cmd,,6032,,1257346705017945737;
-<xmalloc,,6033,,1257346705017965475;
->xmalloc,,1257346705017972419;
-<delete_cmd,,6034,,1257346705017989096;
->delete_cmd,,1257346705017996214;
->add_cmd,,1257346705018000743;
->add_set_or_show_cmd,,1257346705018005432;
->add_setshow_cmd_full,,1257346705018010280;
->add_setshow_boolean_cmd,,1257346705018015242;
-<add_setshow_boolean_cmd,,6035,,1257346705018032111;
-<add_setshow_cmd_full,,6036,,1257346705018053716;
-<xstrprintf,,6037,,1257346705018075478;
-<xstrvprintf,,6038,,1257346705018095420;
->xstrvprintf,,1257346705018105339;
->xstrprintf,,1257346705018109940;
-<xstrprintf,,6039,,1257346705018128986;
-<xstrvprintf,,6040,,1257346705018149358;
->xstrvprintf,,1257346705018158874;
->xstrprintf,,1257346705018163436;
-<add_set_or_show_cmd,,6041,,1257346705018179547;
-<add_cmd,,6042,,1257346705018197357;
-<xmalloc,,6043,,1257346705018217441;
->xmalloc,,1257346705018224361;
-<delete_cmd,,6044,,1257346705018240874;
->delete_cmd,,1257346705018252754;
->add_cmd,,1257346705018257322;
->add_set_or_show_cmd,,1257346705018261999;
-<add_set_or_show_cmd,,6045,,1257346705018278356;
-<add_cmd,,6046,,1257346705018296515;
-<xmalloc,,6047,,1257346705018316241;
->xmalloc,,1257346705018323077;
-<delete_cmd,,6048,,1257346705018339079;
->delete_cmd,,1257346705018350390;
->add_cmd,,1257346705018354988;
->add_set_or_show_cmd,,1257346705018359683;
->add_setshow_cmd_full,,1257346705018364468;
->add_setshow_boolean_cmd,,1257346705018369307;
-<xmalloc,,6049,,1257346705018386997;
->xmalloc,,1257346705018394283;
-<xmalloc,,6050,,1257346705018408599;
->xmalloc,,1257346705018415585;
-<xmalloc,,6051,,1257346705018429846;
->xmalloc,,1257346705018436724;
-<add_setshow_zinteger_cmd,,6052,,1257346705018454273;
-<add_setshow_cmd_full,,6053,,1257346705018475547;
-<xstrprintf,,6054,,1257346705018496942;
-<xstrvprintf,,6055,,1257346705018517462;
->xstrvprintf,,1257346705018525702;
->xstrprintf,,1257346705018530279;
-<xstrprintf,,6056,,1257346705018549945;
-<xstrvprintf,,6057,,1257346705018570122;
->xstrvprintf,,1257346705018584082;
->xstrprintf,,1257346705018588867;
-<add_set_or_show_cmd,,6058,,1257346705018611152;
-<add_cmd,,6059,,1257346705018632120;
-<xmalloc,,6060,,1257346705018652183;
->xmalloc,,1257346705018659187;
-<delete_cmd,,6061,,1257346705018675490;
->delete_cmd,,1257346705018683063;
->add_cmd,,1257346705018687728;
->add_set_or_show_cmd,,1257346705018692371;
-<add_set_or_show_cmd,,6062,,1257346705018708765;
-<add_cmd,,6063,,1257346705018726403;
-<xmalloc,,6064,,1257346705018746568;
->xmalloc,,1257346705018753341;
-<delete_cmd,,6065,,1257346705018770146;
->delete_cmd,,1257346705018777662;
->add_cmd,,1257346705018782401;
->add_set_or_show_cmd,,1257346705018787135;
->add_setshow_cmd_full,,1257346705018791896;
->add_setshow_zinteger_cmd,,1257346705018795790;
-<add_setshow_enum_cmd,,6066,,1257346705018815140;
-<add_setshow_cmd_full,,6067,,1257346705018836105;
-<xstrprintf,,6068,,1257346705018858486;
-<xstrvprintf,,6069,,1257346705018878287;
->xstrvprintf,,1257346705018887523;
->xstrprintf,,1257346705018892154;
-<xstrprintf,,6070,,1257346705018910467;
-<xstrvprintf,,6071,,1257346705018930956;
->xstrvprintf,,1257346705018939636;
->xstrprintf,,1257346705018944228;
-<add_set_or_show_cmd,,6072,,1257346705018960793;
-<add_cmd,,6073,,1257346705018978173;
-<xmalloc,,6074,,1257346705018997384;
->xmalloc,,1257346705019004344;
-<delete_cmd,,6075,,1257346705019020641;
->delete_cmd,,1257346705019028178;
->add_cmd,,1257346705019032704;
->add_set_or_show_cmd,,1257346705019037392;
-<add_set_or_show_cmd,,6076,,1257346705019053804;
-<add_cmd,,6077,,1257346705019071084;
-<xmalloc,,6078,,1257346705019090621;
->xmalloc,,1257346705019097460;
-<delete_cmd,,6079,,1257346705019113628;
->delete_cmd,,1257346705019121089;
->add_cmd,,1257346705019125648;
->add_set_or_show_cmd,,1257346705019130526;
->add_setshow_cmd_full,,1257346705019135293;
->add_setshow_enum_cmd,,1257346705019140081;
-<add_setshow_enum_cmd,,6080,,1257346705019158186;
-<add_setshow_cmd_full,,6081,,1257346705019179175;
-<xstrprintf,,6082,,1257346705019200043;
-<xstrvprintf,,6083,,1257346705019219697;
->xstrvprintf,,1257346705019229206;
->xstrprintf,,1257346705019233802;
-<xstrprintf,,6084,,1257346705019252270;
-<xstrvprintf,,6085,,1257346705019272796;
->xstrvprintf,,1257346705019282146;
->xstrprintf,,1257346705019286765;
-<add_set_or_show_cmd,,6086,,1257346705019303108;
-<add_cmd,,6087,,1257346705019320211;
-<xmalloc,,6088,,1257346705019339413;
->xmalloc,,1257346705019346418;
-<delete_cmd,,6089,,1257346705019362053;
->delete_cmd,,1257346705019369659;
->add_cmd,,1257346705019374200;
->add_set_or_show_cmd,,1257346705019378895;
-<add_set_or_show_cmd,,6090,,1257346705019395676;
-<add_cmd,,6091,,1257346705019412764;
-<xmalloc,,6092,,1257346705019432006;
->xmalloc,,1257346705019438887;
-<delete_cmd,,6093,,1257346705019454850;
->delete_cmd,,1257346705019462438;
->add_cmd,,1257346705019466991;
->add_set_or_show_cmd,,1257346705019471638;
->add_setshow_cmd_full,,1257346705019476417;
->add_setshow_enum_cmd,,1257346705019481162;
-<add_setshow_enum_cmd,,6094,,1257346705019500762;
-<add_setshow_cmd_full,,6095,,1257346705019522451;
-<xstrprintf,,6096,,1257346705019543239;
-<xstrvprintf,,6097,,1257346705019563271;
->xstrvprintf,,1257346705019572294;
->xstrprintf,,1257346705019576874;
-<xstrprintf,,6098,,1257346705019595601;
-<xstrvprintf,,6099,,1257346705019619780;
->xstrvprintf,,1257346705019631957;
->xstrprintf,,1257346705019636667;
-<add_set_or_show_cmd,,6100,,1257346705019652687;
-<add_cmd,,6101,,1257346705019669944;
-<xmalloc,,6102,,1257346705019689101;
->xmalloc,,1257346705019696075;
-<delete_cmd,,6103,,1257346705019711765;
->delete_cmd,,1257346705019719338;
->add_cmd,,1257346705019724041;
->add_set_or_show_cmd,,1257346705019728721;
-<add_set_or_show_cmd,,6104,,1257346705019744973;
-<add_cmd,,6105,,1257346705019762221;
-<xmalloc,,6106,,1257346705019781736;
->xmalloc,,1257346705019788659;
-<delete_cmd,,6107,,1257346705019804638;
->delete_cmd,,1257346705019812225;
->add_cmd,,1257346705019816851;
->add_set_or_show_cmd,,1257346705019821569;
->add_setshow_cmd_full,,1257346705019826348;
->add_setshow_enum_cmd,,1257346705019831034;
-<add_setshow_boolean_cmd,,6108,,1257346705019847349;
-<add_setshow_cmd_full,,6109,,1257346705019868218;
-<xstrprintf,,6110,,1257346705019889267;
-<xstrvprintf,,6111,,1257346705019908647;
->xstrvprintf,,1257346705019917579;
->xstrprintf,,1257346705019922165;
-<xstrprintf,,6112,,1257346705019940459;
-<xstrvprintf,,6113,,1257346705019960973;
->xstrvprintf,,1257346705019969658;
->xstrprintf,,1257346705019974314;
-<add_set_or_show_cmd,,6114,,1257346705019990617;
-<add_cmd,,6115,,1257346705020007735;
-<xmalloc,,6116,,1257346705020026835;
->xmalloc,,1257346705020033731;
-<delete_cmd,,6117,,1257346705020049553;
->delete_cmd,,1257346705020057108;
->add_cmd,,1257346705020061719;
->add_set_or_show_cmd,,1257346705020066362;
-<add_set_or_show_cmd,,6118,,1257346705020082449;
-<add_cmd,,6119,,1257346705020099537;
-<xmalloc,,6120,,1257346705020119317;
->xmalloc,,1257346705020126255;
-<delete_cmd,,6121,,1257346705020142303;
->delete_cmd,,1257346705020149845;
->add_cmd,,1257346705020154434;
->add_set_or_show_cmd,,1257346705020159162;
->add_setshow_cmd_full,,1257346705020163935;
->add_setshow_boolean_cmd,,1257346705020168810;
-<add_setshow_boolean_cmd,,6122,,1257346705020185537;
-<add_setshow_cmd_full,,6123,,1257346705020206240;
-<xstrprintf,,6124,,1257346705020226953;
-<xstrvprintf,,6125,,1257346705020246390;
->xstrvprintf,,1257346705020254546;
->xstrprintf,,1257346705020259120;
-<xstrprintf,,6126,,1257346705020277288;
-<xstrvprintf,,6127,,1257346705020296854;
->xstrvprintf,,1257346705020305077;
->xstrprintf,,1257346705020309648;
-<add_set_or_show_cmd,,6128,,1257346705020325371;
-<add_cmd,,6129,,1257346705020342636;
-<xmalloc,,6130,,1257346705020362167;
->xmalloc,,1257346705020369030;
-<delete_cmd,,6131,,1257346705020384569;
->delete_cmd,,1257346705020392199;
->add_cmd,,1257346705020396863;
->add_set_or_show_cmd,,1257346705020401546;
-<add_set_or_show_cmd,,6132,,1257346705020417612;
-<add_cmd,,6133,,1257346705020434739;
-<xmalloc,,6134,,1257346705020454296;
->xmalloc,,1257346705020461129;
-<delete_cmd,,6135,,1257346705020476660;
->delete_cmd,,1257346705020484304;
->add_cmd,,1257346705020489044;
->add_set_or_show_cmd,,1257346705020493694;
->add_setshow_cmd_full,,1257346705020498493;
->add_setshow_boolean_cmd,,1257346705020503353;
-<add_setshow_enum_cmd,,6136,,1257346705020522168;
-<add_setshow_cmd_full,,6137,,1257346705020543018;
-<xstrprintf,,6138,,1257346705020563685;
-<xstrvprintf,,6139,,1257346705020583991;
->xstrvprintf,,1257346705020593197;
->xstrprintf,,1257346705020597799;
-<xstrprintf,,6140,,1257346705020620778;
-<xstrvprintf,,6141,,1257346705020640906;
->xstrvprintf,,1257346705020649895;
->xstrprintf,,1257346705020654491;
-<add_set_or_show_cmd,,6142,,1257346705020670253;
-<add_cmd,,6143,,1257346705020687272;
-<xmalloc,,6144,,1257346705020707100;
->xmalloc,,1257346705020714011;
-<delete_cmd,,6145,,1257346705020729719;
->delete_cmd,,1257346705020737412;
->add_cmd,,1257346705020741944;
->add_set_or_show_cmd,,1257346705020746581;
-<add_set_or_show_cmd,,6146,,1257346705020762325;
-<add_cmd,,6147,,1257346705020779606;
-<xmalloc,,6148,,1257346705020798877;
->xmalloc,,1257346705020805638;
-<delete_cmd,,6149,,1257346705020821289;
->delete_cmd,,1257346705020828870;
->add_cmd,,1257346705020833478;
->add_set_or_show_cmd,,1257346705020838175;
->add_setshow_cmd_full,,1257346705020842960;
->add_setshow_enum_cmd,,1257346705020847685;
-<add_setshow_enum_cmd,,6150,,1257346705020866484;
-<add_setshow_cmd_full,,6151,,1257346705020887251;
-<xstrprintf,,6152,,1257346705020908074;
-<xstrvprintf,,6153,,1257346705020928085;
->xstrvprintf,,1257346705020937803;
->xstrprintf,,1257346705020942458;
-<xstrprintf,,6154,,1257346705020960990;
-<xstrvprintf,,6155,,1257346705020980556;
->xstrvprintf,,1257346705020988243;
->xstrprintf,,1257346705020992805;
-<add_set_or_show_cmd,,6156,,1257346705021008715;
-<add_cmd,,6157,,1257346705021025580;
-<xmalloc,,6158,,1257346705021044693;
->xmalloc,,1257346705021051562;
-<delete_cmd,,6159,,1257346705021067191;
->delete_cmd,,1257346705021074806;
->add_cmd,,1257346705021079413;
->add_set_or_show_cmd,,1257346705021084102;
-<add_set_or_show_cmd,,6160,,1257346705021099906;
-<add_cmd,,6161,,1257346705021117734;
-<xmalloc,,6162,,1257346705021136993;
->xmalloc,,1257346705021143856;
-<delete_cmd,,6163,,1257346705021159351;
->delete_cmd,,1257346705021166941;
->add_cmd,,1257346705021171477;
->add_set_or_show_cmd,,1257346705021176174;
->add_setshow_cmd_full,,1257346705021180941;
->add_setshow_enum_cmd,,1257346705021185723;
-<add_setshow_boolean_cmd,,6164,,1257346705021202050;
-<add_setshow_cmd_full,,6165,,1257346705021222837;
-<xstrprintf,,6166,,1257346705021244389;
-<xstrvprintf,,6167,,1257346705021263919;
->xstrvprintf,,1257346705021271705;
->xstrprintf,,1257346705021276261;
-<xstrprintf,,6168,,1257346705021294357;
-<xstrvprintf,,6169,,1257346705021314456;
->xstrvprintf,,1257346705021322119;
->xstrprintf,,1257346705021326678;
-<add_set_or_show_cmd,,6170,,1257346705021342542;
-<add_cmd,,6171,,1257346705021359393;
-<xmalloc,,6172,,1257346705021378662;
->xmalloc,,1257346705021385518;
-<delete_cmd,,6173,,1257346705021401124;
->delete_cmd,,1257346705021408736;
->add_cmd,,1257346705021413253;
->add_set_or_show_cmd,,1257346705021417899;
-<add_set_or_show_cmd,,6174,,1257346705021433800;
-<add_cmd,,6175,,1257346705021450695;
-<xmalloc,,6176,,1257346705021470256;
->xmalloc,,1257346705021477107;
-<delete_cmd,,6177,,1257346705021493049;
->delete_cmd,,1257346705021500565;
->add_cmd,,1257346705021505046;
->add_set_or_show_cmd,,1257346705021509806;
->add_setshow_cmd_full,,1257346705021514714;
->add_setshow_boolean_cmd,,1257346705021519623;
-<observer_attach_thread_ptid_changed,,6178,,1257346705021540987;
-<generic_observer_attach,,6179,,1257346705021562930;
-<xmalloc,,6180,,1257346705021582728;
->xmalloc,,1257346705021589690;
-<xmalloc,,6181,,1257346705021607406;
->xmalloc,,1257346705021614672;
->generic_observer_attach,,1257346705021619902;
->observer_attach_thread_ptid_changed,,1257346705021624359;
-<observer_attach_thread_stop_requested,,6182,,1257346705021643336;
-<generic_observer_attach,,6183,,1257346705021665753;
-<xmalloc,,6184,,1257346705021684739;
->xmalloc,,1257346705021691759;
-<xmalloc,,6185,,1257346705021704967;
->xmalloc,,1257346705021711743;
->generic_observer_attach,,1257346705021716585;
->observer_attach_thread_stop_requested,,1257346705021720997;
-<observer_attach_thread_exit,,6186,,1257346705021739541;
-<generic_observer_attach,,6187,,1257346705021760647;
-<xmalloc,,6188,,1257346705021779912;
->xmalloc,,1257346705021786956;
-<xmalloc,,6189,,1257346705021800405;
->xmalloc,,1257346705021807193;
->generic_observer_attach,,1257346705021812041;
->observer_attach_thread_exit,,1257346705021816185;
-<create_internalvar_type_lazy,,6190,,1257346705021830097;
-<create_internalvar,,6191,,1257346705021846581;
-<xmalloc,,6192,,1257346705021867004;
->xmalloc,,1257346705021873933;
-<concat,,6193,,1257346705021879542;
-<xmalloc,,6194,,1257346705021898820;
->xmalloc,,1257346705021905842;
->concat,,1257346705021910651;
->create_internalvar,,1257346705021915677;
->create_internalvar_type_lazy,,1257346705021920891;
->_initialize_infrun,,1257346705021926034;
-<_initialize_stack,,6195,,1257346705021937125;
-<add_com,,6196,,1257346705021956902;
-<add_cmd,,6197,,1257346705021973431;
-<xmalloc,,6198,,1257346705021992135;
->xmalloc,,1257346705021999030;
-<delete_cmd,,6199,,1257346705022013421;
->delete_cmd,,1257346705022022510;
->add_cmd,,1257346705022027297;
->add_com,,1257346705022031646;
-<add_com,,6200,,1257346705022046175;
-<add_cmd,,6201,,1257346705022062370;
-<xmalloc,,6202,,1257346705022080589;
->xmalloc,,1257346705022087347;
-<delete_cmd,,6203,,1257346705022101731;
->delete_cmd,,1257346705022109746;
->add_cmd,,1257346705022114624;
->add_com,,1257346705022118943;
-<add_com,,6204,,1257346705022133643;
-<add_cmd,,6205,,1257346705022149961;
-<xmalloc,,6206,,1257346705022168316;
->xmalloc,,1257346705022177672;
-<delete_cmd,,6207,,1257346705022192279;
->delete_cmd,,1257346705022201788;
->add_cmd,,1257346705022206859;
->add_com,,1257346705022211223;
-<add_com,,6208,,1257346705022226106;
-<add_cmd,,6209,,1257346705022243189;
-<xmalloc,,6210,,1257346705022261498;
->xmalloc,,1257346705022268406;
-<delete_cmd,,6211,,1257346705022282751;
->delete_cmd,,1257346705022290793;
->add_cmd,,1257346705022295370;
->add_com,,1257346705022299761;
-<add_com_alias,,6212,,1257346705022313872;
-<add_alias_cmd,,6213,,1257346705022329757;
-<lookup_cmd,,6214,,1257346705022346124;
-<lookup_cmd_1,,6215,,1257346705022361564;
-<find_command_name_length,,6216,,1257346705022379130;
->find_command_name_length,,1257346705022386544;
-<find_cmd,,6217,,1257346705022400255;
->find_cmd,,1257346705022407587;
->lookup_cmd_1,,1257346705022412131;
->lookup_cmd,,1257346705022416642;
-<add_cmd,,6218,,1257346705022430648;
-<xmalloc,,6219,,1257346705022448379;
->xmalloc,,1257346705022455315;
-<delete_cmd,,6220,,1257346705022469534;
->delete_cmd,,1257346705022477663;
->add_cmd,,1257346705022482297;
->add_alias_cmd,,1257346705022486905;
->add_com_alias,,1257346705022491425;
-<add_com_alias,,6221,,1257346705022504465;
-<add_alias_cmd,,6222,,1257346705022519947;
-<lookup_cmd,,6223,,1257346705022536338;
-<lookup_cmd_1,,6224,,1257346705022551471;
-<find_command_name_length,,6225,,1257346705022568890;
->find_command_name_length,,1257346705022576282;
-<find_cmd,,6226,,1257346705022590201;
->find_cmd,,1257346705022597518;
->lookup_cmd_1,,1257346705022606309;
->lookup_cmd,,1257346705022611085;
-<add_cmd,,6227,,1257346705022625027;
-<xmalloc,,6228,,1257346705022643396;
->xmalloc,,1257346705022650509;
-<delete_cmd,,6229,,1257346705022664737;
->delete_cmd,,1257346705022672679;
->add_cmd,,1257346705022677380;
->add_alias_cmd,,1257346705022681909;
->add_com_alias,,1257346705022686439;
-<add_com,,6230,,1257346705022701064;
-<add_cmd,,6231,,1257346705022717271;
-<xmalloc,,6232,,1257346705022735541;
->xmalloc,,1257346705022742416;
-<delete_cmd,,6233,,1257346705022756698;
->delete_cmd,,1257346705022764635;
->add_cmd,,1257346705022769299;
->add_com,,1257346705022773669;
-<add_com,,6234,,1257346705022788084;
-<add_cmd,,6235,,1257346705022804264;
-<xmalloc,,6236,,1257346705022822275;
->xmalloc,,1257346705022829066;
-<delete_cmd,,6237,,1257346705022844040;
->delete_cmd,,1257346705022851967;
->add_cmd,,1257346705022856704;
->add_com,,1257346705022861047;
-<add_com_alias,,6238,,1257346705022874514;
-<add_alias_cmd,,6239,,1257346705022890030;
-<lookup_cmd,,6240,,1257346705022906982;
-<lookup_cmd_1,,6241,,1257346705022921899;
-<find_command_name_length,,6242,,1257346705022939219;
->find_command_name_length,,1257346705022946590;
-<find_cmd,,6243,,1257346705022960286;
->find_cmd,,1257346705022967540;
->lookup_cmd_1,,1257346705022972063;
->lookup_cmd,,1257346705022976619;
-<add_cmd,,6244,,1257346705022990198;
-<xmalloc,,6245,,1257346705023008005;
->xmalloc,,1257346705023014892;
-<delete_cmd,,6246,,1257346705023029532;
->delete_cmd,,1257346705023037520;
->add_cmd,,1257346705023042169;
->add_alias_cmd,,1257346705023046686;
->add_com_alias,,1257346705023051300;
-<add_com,,6247,,1257346705023065940;
-<add_cmd,,6248,,1257346705023082505;
-<xmalloc,,6249,,1257346705023100661;
->xmalloc,,1257346705023107512;
-<delete_cmd,,6250,,1257346705023122191;
->delete_cmd,,1257346705023130121;
->add_cmd,,1257346705023134936;
->add_com,,1257346705023139330;
-<add_com,,6251,,1257346705023154085;
-<add_cmd,,6252,,1257346705023170220;
-<xmalloc,,6253,,1257346705023188384;
->xmalloc,,1257346705023195232;
-<delete_cmd,,6254,,1257346705023209581;
->delete_cmd,,1257346705023217577;
->add_cmd,,1257346705023222070;
->add_com,,1257346705023226465;
-<add_com_alias,,6255,,1257346705023239345;
-<add_alias_cmd,,6256,,1257346705023254716;
-<lookup_cmd,,6257,,1257346705023271326;
-<lookup_cmd_1,,6258,,1257346705023286303;
-<find_command_name_length,,6259,,1257346705023303590;
->find_command_name_length,,1257346705023311138;
-<find_cmd,,6260,,1257346705023324735;
->find_cmd,,1257346705023331923;
->lookup_cmd_1,,1257346705023336473;
->lookup_cmd,,1257346705023340945;
-<add_cmd,,6261,,1257346705023354358;
-<xmalloc,,6262,,1257346705023371985;
->xmalloc,,1257346705023378890;
-<delete_cmd,,6263,,1257346705023393121;
->delete_cmd,,1257346705023401043;
->add_cmd,,1257346705023405545;
->add_alias_cmd,,1257346705023410125;
->add_com_alias,,1257346705023414630;
-<add_com_alias,,6264,,1257346705023427740;
-<add_alias_cmd,,6265,,1257346705023442975;
-<lookup_cmd,,6266,,1257346705023459654;
-<lookup_cmd_1,,6267,,1257346705023474580;
-<find_command_name_length,,6268,,1257346705023492183;
->find_command_name_length,,1257346705023499587;
-<find_cmd,,6269,,1257346705023513147;
->find_cmd,,1257346705023520050;
->lookup_cmd_1,,1257346705023524714;
->lookup_cmd,,1257346705023529303;
-<add_cmd,,6270,,1257346705023542690;
-<xmalloc,,6271,,1257346705023560391;
->xmalloc,,1257346705023567299;
-<delete_cmd,,6272,,1257346705023581807;
->delete_cmd,,1257346705023589846;
->add_cmd,,1257346705023594718;
->add_alias_cmd,,1257346705023599172;
->add_com_alias,,1257346705023607871;
-<add_info,,6273,,1257346705023621372;
-<add_cmd,,6274,,1257346705023637813;
-<xmalloc,,6275,,1257346705023656300;
->xmalloc,,1257346705023663229;
-<delete_cmd,,6276,,1257346705023677565;
->delete_cmd,,1257346705023685412;
->add_cmd,,1257346705023689980;
->add_info,,1257346705023694440;
-<add_info_alias,,6277,,1257346705023707968;
-<add_alias_cmd,,6278,,1257346705023723450;
-<lookup_cmd,,6279,,1257346705023740033;
-<lookup_cmd_1,,6280,,1257346705023755004;
-<find_command_name_length,,6281,,1257346705023772585;
->find_command_name_length,,1257346705023780020;
-<find_cmd,,6282,,1257346705023794780;
->find_cmd,,1257346705023801844;
->lookup_cmd_1,,1257346705023806446;
->lookup_cmd,,1257346705023810918;
-<add_cmd,,6283,,1257346705023825444;
-<xmalloc,,6284,,1257346705023845103;
->xmalloc,,1257346705023852132;
-<delete_cmd,,6285,,1257346705023868862;
->delete_cmd,,1257346705023876239;
->add_cmd,,1257346705023880753;
->add_alias_cmd,,1257346705023885250;
->add_info_alias,,1257346705023889842;
-<add_info,,6286,,1257346705023904563;
-<add_cmd,,6287,,1257346705023920776;
-<xmalloc,,6288,,1257346705023939512;
->xmalloc,,1257346705023946361;
-<delete_cmd,,6289,,1257346705023961584;
->delete_cmd,,1257346705023969061;
->add_cmd,,1257346705023973560;
->add_info,,1257346705023977993;
-<add_info_alias,,6290,,1257346705023991691;
-<add_alias_cmd,,6291,,1257346705024007201;
-<lookup_cmd,,6292,,1257346705024024166;
-<lookup_cmd_1,,6293,,1257346705024040382;
-<find_command_name_length,,6294,,1257346705024059046;
->find_command_name_length,,1257346705024066652;
-<find_cmd,,6295,,1257346705024080311;
->find_cmd,,1257346705024087307;
->lookup_cmd_1,,1257346705024091920;
->lookup_cmd,,1257346705024096395;
-<add_cmd,,6296,,1257346705024109883;
-<xmalloc,,6297,,1257346705024127793;
->xmalloc,,1257346705024134664;
-<delete_cmd,,6298,,1257346705024149281;
->delete_cmd,,1257346705024156577;
->add_cmd,,1257346705024161130;
->add_alias_cmd,,1257346705024165662;
->add_info_alias,,1257346705024170302;
-<add_info,,6299,,1257346705024183719;
-<add_cmd,,6300,,1257346705024200175;
-<xmalloc,,6301,,1257346705024218352;
->xmalloc,,1257346705024225260;
-<delete_cmd,,6302,,1257346705024239892;
->delete_cmd,,1257346705024247227;
->add_cmd,,1257346705024251840;
->add_info,,1257346705024256255;
-<add_info,,6303,,1257346705024269906;
-<add_cmd,,6304,,1257346705024286022;
-<xmalloc,,6305,,1257346705024304870;
->xmalloc,,1257346705024311685;
-<delete_cmd,,6306,,1257346705024326322;
->delete_cmd,,1257346705024333684;
->add_cmd,,1257346705024338177;
->add_info,,1257346705024342520;
-<add_info,,6307,,1257346705024356047;
-<add_cmd,,6308,,1257346705024372832;
-<xmalloc,,6309,,1257346705024391057;
->xmalloc,,1257346705024397989;
-<delete_cmd,,6310,,1257346705024412668;
->delete_cmd,,1257346705024420142;
->add_cmd,,1257346705024424605;
->add_info,,1257346705024428993;
-<add_setshow_enum_cmd,,6311,,1257346705024445425;
-<add_setshow_cmd_full,,6312,,1257346705024465229;
-<xstrdup,,6313,,1257346705024472633;
-<xmalloc,,6314,,1257346705024491436;
->xmalloc,,1257346705024498284;
->xstrdup,,1257346705024502867;
-<xstrdup,,6315,,1257346705024507333;
-<xmalloc,,6316,,1257346705024523308;
->xmalloc,,1257346705024530114;
->xstrdup,,1257346705024534616;
-<add_set_or_show_cmd,,6317,,1257346705024548394;
-<add_cmd,,6318,,1257346705024564372;
-<xmalloc,,6319,,1257346705024582624;
->xmalloc,,1257346705024589424;
-<delete_cmd,,6320,,1257346705024607760;
->delete_cmd,,1257346705024616544;
->add_cmd,,1257346705024621040;
->add_set_or_show_cmd,,1257346705024625711;
-<add_set_or_show_cmd,,6321,,1257346705024639539;
-<add_cmd,,6322,,1257346705024655788;
-<xmalloc,,6323,,1257346705024674904;
->xmalloc,,1257346705024681899;
-<delete_cmd,,6324,,1257346705024695974;
->delete_cmd,,1257346705024704157;
->add_cmd,,1257346705024708614;
->add_set_or_show_cmd,,1257346705024713287;
->add_setshow_cmd_full,,1257346705024718096;
->add_setshow_enum_cmd,,1257346705024722737;
-<add_setshow_auto_boolean_cmd,,6325,,1257346705024738814;
-<add_setshow_cmd_full,,6326,,1257346705024758907;
-<xstrprintf,,6327,,1257346705024778975;
-<xstrvprintf,,6328,,1257346705024797176;
->xstrvprintf,,1257346705024807083;
->xstrprintf,,1257346705024811687;
-<xstrprintf,,6329,,1257346705024828502;
-<xstrvprintf,,6330,,1257346705024847250;
->xstrvprintf,,1257346705024856158;
->xstrprintf,,1257346705024860723;
-<add_set_or_show_cmd,,6331,,1257346705024874906;
-<add_cmd,,6332,,1257346705024890846;
-<xmalloc,,6333,,1257346705024908689;
->xmalloc,,1257346705024915516;
-<delete_cmd,,6334,,1257346705024929609;
->delete_cmd,,1257346705024937563;
->add_cmd,,1257346705024942104;
->add_set_or_show_cmd,,1257346705024946772;
-<add_set_or_show_cmd,,6335,,1257346705024960693;
-<add_cmd,,6336,,1257346705024976551;
-<xmalloc,,6337,,1257346705024995035;
->xmalloc,,1257346705025001847;
-<delete_cmd,,6338,,1257346705025016550;
->delete_cmd,,1257346705025024478;
->add_cmd,,1257346705025029052;
->add_set_or_show_cmd,,1257346705025033687;
->add_setshow_cmd_full,,1257346705025038474;
->add_setshow_auto_boolean_cmd,,1257346705025043428;
->_initialize_stack,,1257346705025048303;
-<_initialize_thread,,6339,,1257346705025059785;
-<add_info,,6340,,1257346705025078073;
-<add_cmd,,6341,,1257346705025094115;
-<xmalloc,,6342,,1257346705025112397;
->xmalloc,,1257346705025119161;
-<delete_cmd,,6343,,1257346705025133190;
->delete_cmd,,1257346705025140604;
->add_cmd,,1257346705025145157;
->add_info,,1257346705025149512;
-<add_prefix_cmd,,6344,,1257346705025162783;
-<add_cmd,,6345,,1257346705025178840;
-<xmalloc,,6346,,1257346705025196635;
->xmalloc,,1257346705025203636;
-<delete_cmd,,6347,,1257346705025218123;
->delete_cmd,,1257346705025226794;
->add_cmd,,1257346705025231684;
->add_prefix_cmd,,1257346705025236372;
-<add_prefix_cmd,,6348,,1257346705025249401;
-<add_cmd,,6349,,1257346705025265511;
-<xmalloc,,6350,,1257346705025283595;
->xmalloc,,1257346705025290494;
-<delete_cmd,,6351,,1257346705025305573;
->delete_cmd,,1257346705025312653;
->add_cmd,,1257346705025317071;
->add_prefix_cmd,,1257346705025321597;
-<add_cmd,,6352,,1257346705025337046;
-<xmalloc,,6353,,1257346705025356621;
->xmalloc,,1257346705025366380;
-<delete_cmd,,6354,,1257346705025381700;
->delete_cmd,,1257346705025388987;
->add_cmd,,1257346705025393411;
-<add_com_alias,,6355,,1257346705025406674;
-<add_alias_cmd,,6356,,1257346705025421940;
-<lookup_cmd,,6357,,1257346705025438267;
-<lookup_cmd_1,,6358,,1257346705025453088;
-<find_command_name_length,,6359,,1257346705025470197;
->find_command_name_length,,1257346705025477577;
-<find_cmd,,6360,,1257346705025491258;
->find_cmd,,1257346705025498900;
-<lookup_cmd_1,,6361,,1257346705025511423;
-<find_command_name_length,,6362,,1257346705025528761;
->find_command_name_length,,1257346705025536234;
->lookup_cmd_1,,1257346705025540835;
->lookup_cmd_1,,1257346705025545319;
->lookup_cmd,,1257346705025549746;
-<add_cmd,,6363,,1257346705025563057;
-<xmalloc,,6364,,1257346705025581442;
->xmalloc,,1257346705025588434;
-<delete_cmd,,6365,,1257346705025606957;
->delete_cmd,,1257346705025615480;
->add_cmd,,1257346705025620330;
->add_alias_cmd,,1257346705025624866;
->add_com_alias,,1257346705025629527;
-<add_setshow_boolean_cmd,,6366,,1257346705025644679;
-<add_setshow_cmd_full,,6367,,1257346705025664389;
-<xstrdup,,6368,,1257346705025671294;
-<xmalloc,,6369,,1257346705025689489;
->xmalloc,,1257346705025696527;
->xstrdup,,1257346705025700978;
-<xstrdup,,6370,,1257346705025705501;
-<xmalloc,,6371,,1257346705025721254;
->xmalloc,,1257346705025728174;
->xstrdup,,1257346705025732664;
-<add_set_or_show_cmd,,6372,,1257346705025746573;
-<add_cmd,,6373,,1257346705025762425;
-<xmalloc,,6374,,1257346705025780458;
->xmalloc,,1257346705025787279;
-<delete_cmd,,6375,,1257346705025801417;
->delete_cmd,,1257346705025808710;
->add_cmd,,1257346705025813308;
->add_set_or_show_cmd,,1257346705025818024;
-<add_set_or_show_cmd,,6376,,1257346705025831674;
-<add_cmd,,6377,,1257346705025847545;
-<xmalloc,,6378,,1257346705025865511;
->xmalloc,,1257346705025872341;
-<delete_cmd,,6379,,1257346705025886425;
->delete_cmd,,1257346705025893640;
->add_cmd,,1257346705025898175;
->add_set_or_show_cmd,,1257346705025902836;
->add_setshow_cmd_full,,1257346705025907561;
->add_setshow_boolean_cmd,,1257346705025912388;
->_initialize_thread,,1257346705025917212;
-<_initialize_interpreter,,6380,,1257346705025928983;
-<add_cmd,,6381,,1257346705025947698;
-<xmalloc,,6382,,1257346705025966979;
->xmalloc,,1257346705025974146;
-<delete_cmd,,6383,,1257346705025988274;
->delete_cmd,,1257346705025996437;
->add_cmd,,1257346705026001113;
-<set_cmd_completer,,6384,,1257346705026015122;
->set_cmd_completer,,1257346705026022559;
->_initialize_interpreter,,1257346705026027638;
-<_initialize_macrocmd,,6385,,1257346705026038240;
-<add_prefix_cmd,,6386,,1257346705026055656;
-<add_cmd,,6387,,1257346705026071622;
-<xmalloc,,6388,,1257346705026089474;
->xmalloc,,1257346705026096479;
-<delete_cmd,,6389,,1257346705026110322;
->delete_cmd,,1257346705026118337;
->add_cmd,,1257346705026123013;
->add_prefix_cmd,,1257346705026127533;
-<add_cmd,,6390,,1257346705026141512;
-<xmalloc,,6391,,1257346705026159647;
->xmalloc,,1257346705026166639;
-<delete_cmd,,6392,,1257346705026180437;
->delete_cmd,,1257346705026187517;
->add_cmd,,1257346705026191913;
-<add_alias_cmd,,6393,,1257346705026204271;
-<lookup_cmd,,6394,,1257346705026220583;
-<lookup_cmd_1,,6395,,1257346705026235205;
-<find_command_name_length,,6396,,1257346705026251698;
->find_command_name_length,,1257346705026259150;
-<find_cmd,,6397,,1257346705026272924;
->find_cmd,,1257346705026279821;
->lookup_cmd_1,,1257346705026284395;
->lookup_cmd,,1257346705026288861;
-<add_cmd,,6398,,1257346705026302406;
-<xmalloc,,6399,,1257346705026319792;
->xmalloc,,1257346705026326613;
-<delete_cmd,,6400,,1257346705026340952;
->delete_cmd,,1257346705026348173;
->add_cmd,,1257346705026352603;
->add_alias_cmd,,1257346705026357063;
-<add_cmd,,6401,,1257346705026371427;
-<xmalloc,,6402,,1257346705026389477;
->xmalloc,,1257346705026396427;
-<delete_cmd,,6403,,1257346705026410183;
->delete_cmd,,1257346705026417389;
->add_cmd,,1257346705026421825;
-<add_alias_cmd,,6404,,1257346705026434688;
-<lookup_cmd,,6405,,1257346705026450654;
-<lookup_cmd_1,,6406,,1257346705026465568;
-<find_command_name_length,,6407,,1257346705026482148;
->find_command_name_length,,1257346705026489622;
-<find_cmd,,6408,,1257346705026503200;
->find_cmd,,1257346705026510292;
->lookup_cmd_1,,1257346705026514806;
->lookup_cmd,,1257346705026519254;
-<add_cmd,,6409,,1257346705026532330;
-<xmalloc,,6410,,1257346705026549590;
->xmalloc,,1257346705026556414;
-<delete_cmd,,6411,,1257346705026570206;
->delete_cmd,,1257346705026577382;
->add_cmd,,1257346705026581820;
->add_alias_cmd,,1257346705026586320;
-<add_cmd,,6412,,1257346705026600202;
-<xmalloc,,6413,,1257346705026623280;
->xmalloc,,1257346705026630251;
-<delete_cmd,,6414,,1257346705026644097;
->delete_cmd,,1257346705026651523;
->add_cmd,,1257346705026656043;
-<add_cmd,,6415,,1257346705026670027;
-<xmalloc,,6416,,1257346705026688021;
->xmalloc,,1257346705026694950;
-<delete_cmd,,6417,,1257346705026708775;
->delete_cmd,,1257346705026716059;
->add_cmd,,1257346705026720519;
-<add_cmd,,6418,,1257346705026734419;
-<xmalloc,,6419,,1257346705026752885;
->xmalloc,,1257346705026759874;
-<delete_cmd,,6420,,1257346705026773651;
->delete_cmd,,1257346705026780785;
->add_cmd,,1257346705026785236;
-<add_cmd,,6421,,1257346705026799380;
-<xmalloc,,6422,,1257346705026817827;
->xmalloc,,1257346705026824868;
-<delete_cmd,,6423,,1257346705026838777;
->delete_cmd,,1257346705026846007;
->add_cmd,,1257346705026850443;
->_initialize_macrocmd,,1257346705026855306;
-<_initialize_macroscope,,6424,,1257346705026866978;
-<new_macro_table,,6425,,1257346705026881609;
-<xmalloc,,6426,,1257346705026901326;
->xmalloc,,1257346705026908357;
-<splay_tree_new_with_allocator,,6427,,1257346705026914432;
-<macro_alloc,,6428,,1257346705026927960;
-<xmalloc,,6429,,1257346705026947138;
->xmalloc,,1257346705026954133;
->macro_alloc,,1257346705026957802;
->splay_tree_new_with_allocator,,1257346705026962945;
->new_macro_table,,1257346705026967757;
-<macro_set_main,,6430,,1257346705026978409;
-<new_source_file,,6431,,1257346705026994390;
-<macro_alloc,,6432,,1257346705027009175;
-<xmalloc,,6433,,1257346705027027298;
->xmalloc,,1257346705027034251;
->macro_alloc,,1257346705027037767;
-<macro_bcache_str,,6434,,1257346705027047766;
-<macro_bcache,,6435,,1257346705027063886;
-<xmalloc,,6436,,1257346705027083206;
->xmalloc,,1257346705027090108;
->macro_bcache,,1257346705027094757;
->macro_bcache_str,,1257346705027098619;
->new_source_file,,1257346705027103269;
->macro_set_main,,1257346705027107975;
-<macro_allow_redefinitions,,6437,,1257346705027119469;
->macro_allow_redefinitions,,1257346705027128756;
->_initialize_macroscope,,1257346705027133845;
-<_initialize_gdbarch,,6438,,1257346705027145201;
-<add_setshow_zinteger_cmd,,6439,,1257346705027164175;
-<add_setshow_cmd_full,,6440,,1257346705027184054;
-<xstrprintf,,6441,,1257346705027202895;
-<xstrvprintf,,6442,,1257346705027221181;
->xstrvprintf,,1257346705027230684;
->xstrprintf,,1257346705027235334;
-<xstrprintf,,6443,,1257346705027251544;
-<xstrvprintf,,6444,,1257346705027269769;
->xstrvprintf,,1257346705027277453;
->xstrprintf,,1257346705027282021;
-<add_set_or_show_cmd,,6445,,1257346705027294989;
-<add_cmd,,6446,,1257346705027310760;
-<xmalloc,,6447,,1257346705027328377;
->xmalloc,,1257346705027335256;
-<delete_cmd,,6448,,1257346705027348978;
->delete_cmd,,1257346705027356217;
->add_cmd,,1257346705027360662;
->add_set_or_show_cmd,,1257346705027365321;
-<add_set_or_show_cmd,,6449,,1257346705027378686;
-<add_cmd,,6450,,1257346705027394358;
-<xmalloc,,6451,,1257346705027412279;
->xmalloc,,1257346705027419069;
-<delete_cmd,,6452,,1257346705027433048;
->delete_cmd,,1257346705027440200;
->add_cmd,,1257346705027444620;
->add_set_or_show_cmd,,1257346705027449303;
->add_setshow_cmd_full,,1257346705027454055;
->add_setshow_zinteger_cmd,,1257346705027458007;
->_initialize_gdbarch,,1257346705027463080;
-<_initialize_gdbarch_utils,,6453,,1257346705027473576;
-<add_setshow_enum_cmd,,6454,,1257346705027494042;
-<add_setshow_cmd_full,,6455,,1257346705027513942;
-<xstrdup,,6456,,1257346705027520802;
-<xmalloc,,6457,,1257346705027539872;
->xmalloc,,1257346705027547003;
->xstrdup,,1257346705027551450;
-<xstrdup,,6458,,1257346705027555925;
-<xmalloc,,6459,,1257346705027570999;
->xmalloc,,1257346705027577928;
->xstrdup,,1257346705027582421;
-<add_set_or_show_cmd,,6460,,1257346705027595903;
-<add_cmd,,6461,,1257346705027616520;
-<xmalloc,,6462,,1257346705027634519;
->xmalloc,,1257346705027641473;
-<delete_cmd,,6463,,1257346705027655394;
->delete_cmd,,1257346705027663430;
->add_cmd,,1257346705027667941;
->add_set_or_show_cmd,,1257346705027672569;
-<add_set_or_show_cmd,,6464,,1257346705027686202;
-<add_cmd,,6465,,1257346705027701750;
-<xmalloc,,6466,,1257346705027719530;
->xmalloc,,1257346705027726511;
-<delete_cmd,,6467,,1257346705027740179;
->delete_cmd,,1257346705027747767;
->add_cmd,,1257346705027752335;
->add_set_or_show_cmd,,1257346705027756967;
->add_setshow_cmd_full,,1257346705027761670;
->add_setshow_enum_cmd,,1257346705027766302;
->_initialize_gdbarch_utils,,1257346705027771360;
-<_initialize_gdb_osabi,,6468,,1257346705027781946;
-<gdbarch_register_osabi_sniffer,,6469,,1257346705027797101;
-<xmalloc,,6470,,1257346705027814769;
->xmalloc,,1257346705027821684;
->gdbarch_register_osabi_sniffer,,1257346705027826992;
-<add_setshow_enum_cmd,,6471,,1257346705027843012;
-<add_setshow_cmd_full,,6472,,1257346705027861851;
-<xstrdup,,6473,,1257346705027868639;
-<xmalloc,,6474,,1257346705027885805;
->xmalloc,,1257346705027892590;
->xstrdup,,1257346705027897047;
-<xstrdup,,6475,,1257346705027901516;
-<xmalloc,,6476,,1257346705027916348;
->xmalloc,,1257346705027923169;
->xstrdup,,1257346705027927563;
-<add_set_or_show_cmd,,6477,,1257346705027940402;
-<add_cmd,,6478,,1257346705027955445;
-<xmalloc,,6479,,1257346705027972846;
->xmalloc,,1257346705027979649;
-<delete_cmd,,6480,,1257346705027993366;
->delete_cmd,,1257346705028000926;
->add_cmd,,1257346705028005474;
->add_set_or_show_cmd,,1257346705028010183;
-<add_set_or_show_cmd,,6481,,1257346705028023542;
-<add_cmd,,6482,,1257346705028038555;
-<xmalloc,,6483,,1257346705028056359;
->xmalloc,,1257346705028063183;
-<delete_cmd,,6484,,1257346705028076602;
->delete_cmd,,1257346705028084199;
->add_cmd,,1257346705028088764;
->add_set_or_show_cmd,,1257346705028093492;
->add_setshow_cmd_full,,1257346705028098183;
->add_setshow_enum_cmd,,1257346705028102890;
->_initialize_gdb_osabi,,1257346705028107708;
-<_initialize_copying,,6485,,1257346705028117828;
-<add_cmd,,6486,,1257346705028135482;
-<xmalloc,,6487,,1257346705028153740;
->xmalloc,,1257346705028160600;
-<delete_cmd,,6488,,1257346705028174088;
->delete_cmd,,1257346705028182933;
->add_cmd,,1257346705028187507;
-<add_cmd,,6489,,1257346705028200803;
-<xmalloc,,6490,,1257346705028218929;
->xmalloc,,1257346705028226014;
-<delete_cmd,,6491,,1257346705028239472;
->delete_cmd,,1257346705028246946;
->add_cmd,,1257346705028251647;
-<add_info,,6492,,1257346705028264125;
-<add_cmd,,6493,,1257346705028280049;
-<xmalloc,,6494,,1257346705028297699;
->xmalloc,,1257346705028304508;
-<delete_cmd,,6495,,1257346705028318177;
->delete_cmd,,1257346705028325735;
->add_cmd,,1257346705028330189;
->add_info,,1257346705028334619;
-<add_info,,6496,,1257346705028349063;
-<add_cmd,,6497,,1257346705028366377;
-<xmalloc,,6498,,1257346705028385745;
->xmalloc,,1257346705028392668;
-<delete_cmd,,6499,,1257346705028407570;
->delete_cmd,,1257346705028414887;
->add_cmd,,1257346705028419470;
->add_info,,1257346705028423888;
->_initialize_copying,,1257346705028428799;
-<_initialize_mem,,6500,,1257346705028438742;
-<add_com,,6501,,1257346705028457625;
-<add_cmd,,6502,,1257346705028473535;
-<xmalloc,,6503,,1257346705028491128;
->xmalloc,,1257346705028497976;
-<delete_cmd,,6504,,1257346705028511669;
->delete_cmd,,1257346705028521527;
->add_cmd,,1257346705028526261;
->add_com,,1257346705028530573;
-<add_cmd,,6505,,1257346705028544233;
-<xmalloc,,6506,,1257346705028562810;
->xmalloc,,1257346705028570094;
-<delete_cmd,,6507,,1257346705028583961;
->delete_cmd,,1257346705028591570;
->add_cmd,,1257346705028596066;
-<add_cmd,,6508,,1257346705028615456;
-<xmalloc,,6509,,1257346705028636150;
->xmalloc,,1257346705028643281;
-<delete_cmd,,6510,,1257346705028656899;
->delete_cmd,,1257346705028664414;
->add_cmd,,1257346705028668856;
-<add_cmd,,6511,,1257346705028682898;
-<xmalloc,,6512,,1257346705028700834;
->xmalloc,,1257346705028707787;
-<delete_cmd,,6513,,1257346705028721838;
->delete_cmd,,1257346705028729185;
->add_cmd,,1257346705028733582;
-<add_info,,6514,,1257346705028746403;
-<add_cmd,,6515,,1257346705028761840;
-<xmalloc,,6516,,1257346705028779981;
->xmalloc,,1257346705028786946;
-<delete_cmd,,6517,,1257346705028800624;
->delete_cmd,,1257346705028808067;
->add_cmd,,1257346705028812602;
->add_info,,1257346705028817014;
-<add_prefix_cmd,,6518,,1257346705028829741;
-<add_cmd,,6519,,1257346705028845332;
-<xmalloc,,6520,,1257346705028863244;
->xmalloc,,1257346705028870017;
-<delete_cmd,,6521,,1257346705028883857;
->delete_cmd,,1257346705028891433;
->add_cmd,,1257346705028896055;
->add_prefix_cmd,,1257346705028900554;
-<add_prefix_cmd,,6522,,1257346705028913186;
-<add_cmd,,6523,,1257346705028928641;
-<xmalloc,,6524,,1257346705028946315;
->xmalloc,,1257346705028953118;
-<delete_cmd,,6525,,1257346705028967142;
->delete_cmd,,1257346705028974675;
->add_cmd,,1257346705028979271;
->add_prefix_cmd,,1257346705028983827;
-<add_setshow_boolean_cmd,,6526,,1257346705028999577;
-<add_setshow_cmd_full,,6527,,1257346705029018635;
-<xstrprintf,,6528,,1257346705029037958;
-<xstrvprintf,,6529,,1257346705029055861;
->xstrvprintf,,1257346705029067701;
->xstrprintf,,1257346705029072378;
-<xstrprintf,,6530,,1257346705029088552;
-<xstrvprintf,,6531,,1257346705029106702;
->xstrvprintf,,1257346705029114945;
->xstrprintf,,1257346705029119621;
-<add_set_or_show_cmd,,6532,,1257346705029132617;
-<add_cmd,,6533,,1257346705029147931;
-<xmalloc,,6534,,1257346705029165437;
->xmalloc,,1257346705029172300;
-<delete_cmd,,6535,,1257346705029186474;
->delete_cmd,,1257346705029193613;
->add_cmd,,1257346705029198046;
->add_set_or_show_cmd,,1257346705029202687;
-<add_set_or_show_cmd,,6536,,1257346705029215739;
-<add_cmd,,6537,,1257346705029230809;
-<xmalloc,,6538,,1257346705029248688;
->xmalloc,,1257346705029255672;
-<delete_cmd,,6539,,1257346705029269211;
->delete_cmd,,1257346705029276254;
->add_cmd,,1257346705029280666;
->add_set_or_show_cmd,,1257346705029285295;
->add_setshow_cmd_full,,1257346705029290224;
->add_setshow_boolean_cmd,,1257346705029295099;
->_initialize_mem,,1257346705029299917;
-<_initialize_parse,,6540,,1257346705029309351;
-<xmalloc,,6541,,1257346705029328815;
->xmalloc,,1257346705029335829;
-<add_setshow_zinteger_cmd,,6542,,1257346705029350505;
-<add_setshow_cmd_full,,6543,,1257346705029369593;
-<xstrprintf,,6544,,1257346705029388239;
-<xstrvprintf,,6545,,1257346705029406912;
->xstrvprintf,,1257346705029414903;
->xstrprintf,,1257346705029419489;
-<xstrprintf,,6546,,1257346705029436346;
-<xstrvprintf,,6547,,1257346705029454330;
->xstrvprintf,,1257346705029462396;
->xstrprintf,,1257346705029466961;
-<add_set_or_show_cmd,,6548,,1257346705029479990;
-<add_cmd,,6549,,1257346705029495153;
-<xmalloc,,6550,,1257346705029512801;
->xmalloc,,1257346705029519856;
-<delete_cmd,,6551,,1257346705029533363;
->delete_cmd,,1257346705029540635;
->add_cmd,,1257346705029545116;
->add_set_or_show_cmd,,1257346705029549786;
-<add_set_or_show_cmd,,6552,,1257346705029562950;
-<add_cmd,,6553,,1257346705029578008;
-<xmalloc,,6554,,1257346705029595959;
->xmalloc,,1257346705029606976;
-<delete_cmd,,6555,,1257346705029620790;
->delete_cmd,,1257346705029628182;
->add_cmd,,1257346705029632636;
->add_set_or_show_cmd,,1257346705029637325;
->add_setshow_cmd_full,,1257346705029642061;
->add_setshow_zinteger_cmd,,1257346705029646019;
->_initialize_parse,,1257346705029650975;
-<_initialize_language,,6556,,1257346705029660915;
-<gdbarch_data_register_post_init,,6557,,1257346705029675772;
-<gdbarch_data_register,,6558,,1257346705029689987;
-<xmalloc,,6559,,1257346705029707894;
->xmalloc,,1257346705029714796;
-<xmalloc,,6560,,1257346705029727126;
->xmalloc,,1257346705029733977;
->gdbarch_data_register,,1257346705029739186;
->gdbarch_data_register_post_init,,1257346705029743499;
-<add_prefix_cmd,,6561,,1257346705029756473;
-<add_cmd,,6562,,1257346705029771510;
-<xmalloc,,6563,,1257346705029789127;
->xmalloc,,1257346705029796132;
-<delete_cmd,,6564,,1257346705029809930;
->delete_cmd,,1257346705029817656;
->add_cmd,,1257346705029822167;
->add_prefix_cmd,,1257346705029826681;
-<add_alias_cmd,,6565,,1257346705029838717;
-<lookup_cmd,,6566,,1257346705029854542;
-<lookup_cmd_1,,6567,,1257346705029869281;
-<find_command_name_length,,6568,,1257346705029885455;
->find_command_name_length,,1257346705029892832;
-<find_cmd,,6569,,1257346705029906267;
->find_cmd,,1257346705029913295;
-<lookup_cmd_1,,6570,,1257346705029924922;
-<find_command_name_length,,6571,,1257346705029941460;
->find_command_name_length,,1257346705029948969;
->lookup_cmd_1,,1257346705029953751;
->lookup_cmd_1,,1257346705029958214;
->lookup_cmd,,1257346705029962746;
-<add_cmd,,6572,,1257346705029974975;
-<xmalloc,,6573,,1257346705029992475;
->xmalloc,,1257346705029999455;
-<delete_cmd,,6574,,1257346705030012946;
->delete_cmd,,1257346705030020543;
->add_cmd,,1257346705030025072;
->add_alias_cmd,,1257346705030029571;
-<add_alias_cmd,,6575,,1257346705030041556;
-<lookup_cmd,,6576,,1257346705030057838;
-<lookup_cmd_1,,6577,,1257346705030072111;
-<find_command_name_length,,6578,,1257346705030088652;
->find_command_name_length,,1257346705030095969;
-<find_cmd,,6579,,1257346705030109018;
->find_cmd,,1257346705030115972;
-<lookup_cmd_1,,6580,,1257346705030128128;
-<find_command_name_length,,6581,,1257346705030144251;
->find_command_name_length,,1257346705030151616;
->lookup_cmd_1,,1257346705030156289;
->lookup_cmd_1,,1257346705030160852;
->lookup_cmd,,1257346705030165285;
-<add_cmd,,6582,,1257346705030177669;
-<xmalloc,,6583,,1257346705030195596;
->xmalloc,,1257346705030202537;
-<delete_cmd,,6584,,1257346705030216465;
->delete_cmd,,1257346705030224068;
->add_cmd,,1257346705030228600;
->add_alias_cmd,,1257346705030233108;
-<add_prefix_cmd,,6585,,1257346705030246287;
-<add_cmd,,6586,,1257346705030261336;
-<xmalloc,,6587,,1257346705030278661;
->xmalloc,,1257346705030285504;
-<delete_cmd,,6588,,1257346705030299097;
->delete_cmd,,1257346705030306739;
->add_cmd,,1257346705030311292;
->add_prefix_cmd,,1257346705030315845;
-<add_alias_cmd,,6589,,1257346705030327845;
-<lookup_cmd,,6590,,1257346705030343784;
-<lookup_cmd_1,,6591,,1257346705030357977;
-<find_command_name_length,,6592,,1257346705030374445;
->find_command_name_length,,1257346705030381795;
-<find_cmd,,6593,,1257346705030394806;
->find_cmd,,1257346705030401729;
-<lookup_cmd_1,,6594,,1257346705030413331;
-<find_command_name_length,,6595,,1257346705030429725;
->find_command_name_length,,1257346705030437015;
->lookup_cmd_1,,1257346705030441670;
->lookup_cmd_1,,1257346705030446175;
->lookup_cmd,,1257346705030450560;
-<add_cmd,,6596,,1257346705030463420;
-<xmalloc,,6597,,1257346705030480695;
->xmalloc,,1257346705030487639;
-<delete_cmd,,6598,,1257346705030501593;
->delete_cmd,,1257346705030509157;
->add_cmd,,1257346705030513701;
->add_alias_cmd,,1257346705030518209;
-<add_alias_cmd,,6599,,1257346705030530621;
-<lookup_cmd,,6600,,1257346705030546260;
-<lookup_cmd_1,,6601,,1257346705030560593;
-<find_command_name_length,,6602,,1257346705030576637;
->find_command_name_length,,1257346705030583964;
-<find_cmd,,6603,,1257346705030597278;
->find_cmd,,1257346705030608496;
-<lookup_cmd_1,,6604,,1257346705030620351;
-<find_command_name_length,,6605,,1257346705030636691;
->find_command_name_length,,1257346705030644167;
->lookup_cmd_1,,1257346705030648802;
->lookup_cmd_1,,1257346705030653295;
->lookup_cmd,,1257346705030657734;
-<add_cmd,,6606,,1257346705030669938;
-<xmalloc,,6607,,1257346705030687444;
->xmalloc,,1257346705030694358;
-<delete_cmd,,6608,,1257346705030707817;
->delete_cmd,,1257346705030715500;
->add_cmd,,1257346705030719981;
->add_alias_cmd,,1257346705030724502;
-<add_setshow_enum_cmd,,6609,,1257346705030739397;
-<add_setshow_cmd_full,,6610,,1257346705030757992;
-<xstrdup,,6611,,1257346705030764918;
-<xmalloc,,6612,,1257346705030783643;
->xmalloc,,1257346705030790990;
->xstrdup,,1257346705030795438;
-<xstrdup,,6613,,1257346705030800105;
-<xmalloc,,6614,,1257346705030815245;
->xmalloc,,1257346705030822327;
->xstrdup,,1257346705030826775;
-<add_set_or_show_cmd,,6615,,1257346705030839617;
-<add_cmd,,6616,,1257346705030854399;
-<xmalloc,,6617,,1257346705030872145;
->xmalloc,,1257346705030879029;
-<delete_cmd,,6618,,1257346705030892509;
->delete_cmd,,1257346705030899573;
->add_cmd,,1257346705030904024;
->add_set_or_show_cmd,,1257346705030908673;
-<add_set_or_show_cmd,,6619,,1257346705030921458;
-<add_cmd,,6620,,1257346705030936965;
-<xmalloc,,6621,,1257346705030954495;
->xmalloc,,1257346705030961442;
-<delete_cmd,,6622,,1257346705030975033;
->delete_cmd,,1257346705030982070;
->add_cmd,,1257346705030986551;
->add_set_or_show_cmd,,1257346705030991243;
->add_setshow_cmd_full,,1257346705030995991;
->add_setshow_enum_cmd,,1257346705031000686;
-<add_setshow_enum_cmd,,6623,,1257346705031015543;
-<add_setshow_cmd_full,,6624,,1257346705031034179;
-<xstrdup,,6625,,1257346705031041106;
-<xmalloc,,6626,,1257346705031058040;
->xmalloc,,1257346705031064925;
->xstrdup,,1257346705031069348;
-<xstrdup,,6627,,1257346705031073817;
-<xmalloc,,6628,,1257346705031088506;
->xmalloc,,1257346705031095435;
->xstrdup,,1257346705031099826;
-<add_set_or_show_cmd,,6629,,1257346705031112559;
-<add_cmd,,6630,,1257346705031127362;
-<xmalloc,,6631,,1257346705031144609;
->xmalloc,,1257346705031151403;
-<delete_cmd,,6632,,1257346705031164849;
->delete_cmd,,1257346705031172103;
->add_cmd,,1257346705031176569;
->add_set_or_show_cmd,,1257346705031181198;
-<add_set_or_show_cmd,,6633,,1257346705031194403;
-<add_cmd,,6634,,1257346705031209368;
-<xmalloc,,6635,,1257346705031226811;
->xmalloc,,1257346705031233614;
-<delete_cmd,,6636,,1257346705031247184;
->delete_cmd,,1257346705031254293;
->add_cmd,,1257346705031258774;
->add_set_or_show_cmd,,1257346705031263469;
->add_setshow_cmd_full,,1257346705031268311;
->add_setshow_enum_cmd,,1257346705031273096;
-<add_setshow_enum_cmd,,6637,,1257346705031288743;
-<add_setshow_cmd_full,,6638,,1257346705031307994;
-<xstrprintf,,6639,,1257346705031326640;
-<xstrvprintf,,6640,,1257346705031344558;
->xstrvprintf,,1257346705031352744;
->xstrprintf,,1257346705031357337;
-<xstrprintf,,6641,,1257346705031373986;
-<xstrvprintf,,6642,,1257346705031391889;
->xstrvprintf,,1257346705031400012;
->xstrprintf,,1257346705031404620;
-<add_set_or_show_cmd,,6643,,1257346705031417506;
-<add_cmd,,6644,,1257346705031433064;
-<xmalloc,,6645,,1257346705031450579;
->xmalloc,,1257346705031457487;
-<delete_cmd,,6646,,1257346705031471222;
->delete_cmd,,1257346705031478780;
->add_cmd,,1257346705031483219;
->add_set_or_show_cmd,,1257346705031487998;
-<add_set_or_show_cmd,,6647,,1257346705031501242;
-<add_cmd,,6648,,1257346705031516114;
-<xmalloc,,6649,,1257346705031533888;
->xmalloc,,1257346705031540703;
-<delete_cmd,,6650,,1257346705031554128;
->delete_cmd,,1257346705031561791;
->add_cmd,,1257346705031566302;
->add_set_or_show_cmd,,1257346705031571039;
->add_setshow_cmd_full,,1257346705031575808;
->add_setshow_enum_cmd,,1257346705031580590;
-<add_language,,6651,,1257346705031589889;
-<xmalloc,,6652,,1257346705031613732;
->xmalloc,,1257346705031621226;
-<xrealloc,,6653,,1257346705031635984;
->xrealloc,,1257346705031643178;
-<mem_fileopen,,6654,,1257346705031659977;
-<xmalloc,,6655,,1257346705031679309;
->xmalloc,,1257346705031686307;
-<ui_file_new,,6656,,1257346705031703359;
-<xmalloc,,6657,,1257346705031721572;
->xmalloc,,1257346705031728435;
->ui_file_new,,1257346705031733127;
->mem_fileopen,,1257346705031737890;
-<fprintf_unfiltered,,6658,,1257346705031755932;
-<vfprintf_unfiltered,,6659,,1257346705031776458;
-<xstrvprintf,,6660,,1257346705031795817;
->xstrvprintf,,1257346705031808911;
-<make_cleanup,,6661,,1257346705031823368;
-<make_my_cleanup,,6662,,1257346705031843337;
-<make_my_cleanup2,,6663,,1257346705031860323;
-<xmalloc,,6664,,1257346705031879330;
->xmalloc,,1257346705031886427;
->make_my_cleanup2,,1257346705031891468;
->make_my_cleanup,,1257346705031896238;
->make_cleanup,,1257346705031900893;
-<fputs_unfiltered,,6665,,1257346705031915921;
-<null_file_fputs,,6666,,1257346705031932619;
-<mem_file_write,,6667,,1257346705031951201;
-<ui_file_data,,6668,,1257346705031972386;
->ui_file_data,,1257346705031980031;
-<xmalloc,,6669,,1257346705031994316;
->xmalloc,,1257346705032001417;
->mem_file_write,,1257346705032006144;
->null_file_fputs,,1257346705032011010;
->fputs_unfiltered,,1257346705032014808;
-<do_cleanups,,6670,,1257346705032030802;
-<do_my_cleanups,,6671,,1257346705032049132;
-<xfree,,6672,,1257346705032067303;
->xfree,,1257346705032074969;
-<xfree,,6673,,1257346705032086692;
->xfree,,1257346705032093549;
->do_my_cleanups,,1257346705032098352;
->do_cleanups,,1257346705032102105;
->vfprintf_unfiltered,,1257346705032106911;
->fprintf_unfiltered,,1257346705032111642;
-<ui_file_xstrdup,,6674,,1257346705032122745;
-<ui_file_put,,6675,,1257346705032139749;
-<mem_file_put,,6676,,1257346705032158723;
-<ui_file_data,,6677,,1257346705032176181;
->ui_file_data,,1257346705032183396;
-<do_ui_file_xstrdup,,6678,,1257346705032195982;
-<xmalloc,,6679,,1257346705032212409;
->xmalloc,,1257346705032219446;
->do_ui_file_xstrdup,,1257346705032224396;
->mem_file_put,,1257346705032228246;
->ui_file_put,,1257346705032231764;
->ui_file_xstrdup,,1257346705032236528;
-<ui_file_delete,,6680,,1257346705032249177;
-<mem_file_delete,,6681,,1257346705032265177;
-<ui_file_data,,6682,,1257346705032282963;
->ui_file_data,,1257346705032290157;
-<xfree,,6683,,1257346705032301471;
->xfree,,1257346705032308589;
-<xfree,,6684,,1257346705032318775;
->xfree,,1257346705032325509;
->mem_file_delete,,1257346705032329061;
-<xfree,,6685,,1257346705032339833;
->xfree,,1257346705032346639;
->ui_file_delete,,1257346705032350293;
-<add_setshow_enum_cmd,,6686,,1257346705032362422;
-<add_setshow_cmd_full,,6687,,1257346705032379113;
-<xstrdup,,6688,,1257346705032386154;
-<xmalloc,,6689,,1257346705032400277;
->xmalloc,,1257346705032407049;
->xstrdup,,1257346705032411542;
-<xstrdup,,6690,,1257346705032416011;
-<xmalloc,,6691,,1257346705032428480;
->xmalloc,,1257346705032435415;
->xstrdup,,1257346705032439848;
-<add_set_or_show_cmd,,6692,,1257346705032450281;
-<add_cmd,,6693,,1257346705032463006;
-<xmalloc,,6694,,1257346705032477237;
->xmalloc,,1257346705032484085;
-<delete_cmd,,6695,,1257346705032495705;
->delete_cmd,,1257346705032503579;
->add_cmd,,1257346705032508171;
->add_set_or_show_cmd,,1257346705032512794;
-<add_set_or_show_cmd,,6696,,1257346705032523338;
-<add_cmd,,6697,,1257346705032536068;
-<xmalloc,,6698,,1257346705032550296;
->xmalloc,,1257346705032557087;
-<delete_cmd,,6699,,1257346705032568374;
->delete_cmd,,1257346705032575995;
->add_cmd,,1257346705032580527;
->add_set_or_show_cmd,,1257346705032585173;
->add_setshow_cmd_full,,1257346705032589994;
->add_setshow_enum_cmd,,1257346705032594770;
-<xfree,,6700,,1257346705032610454;
->xfree,,1257346705032618135;
->add_language,,1257346705032621891;
-<add_language,,6701,,1257346705032629373;
-<xrealloc,,6702,,1257346705032644194;
->xrealloc,,1257346705032651295;
-<mem_fileopen,,6703,,1257346705032664672;
-<xmalloc,,6704,,1257346705032679152;
->xmalloc,,1257346705032686163;
-<ui_file_new,,6705,,1257346705032699317;
-<xmalloc,,6706,,1257346705032713970;
->xmalloc,,1257346705032720956;
->ui_file_new,,1257346705032725482;
->mem_fileopen,,1257346705032730023;
-<fprintf_unfiltered,,6707,,1257346705032744726;
-<vfprintf_unfiltered,,6708,,1257346705032759752;
-<xstrvprintf,,6709,,1257346705032774620;
->xstrvprintf,,1257346705032782996;
-<make_cleanup,,6710,,1257346705032793350;
-<make_my_cleanup,,6711,,1257346705032808424;
-<make_my_cleanup2,,6712,,1257346705032821362;
-<xmalloc,,6713,,1257346705032835984;
->xmalloc,,1257346705032842919;
->make_my_cleanup2,,1257346705032847692;
->make_my_cleanup,,1257346705032852320;
->make_cleanup,,1257346705032856801;
-<fputs_unfiltered,,6714,,1257346705032868133;
-<null_file_fputs,,6715,,1257346705032881119;
-<mem_file_write,,6716,,1257346705032895645;
-<ui_file_data,,6717,,1257346705032911570;
->ui_file_data,,1257346705032918664;
-<xmalloc,,6718,,1257346705032930790;
->xmalloc,,1257346705032937831;
->mem_file_write,,1257346705032942507;
->null_file_fputs,,1257346705032947099;
->fputs_unfiltered,,1257346705032950732;
-<do_cleanups,,6719,,1257346705032963785;
-<do_my_cleanups,,6720,,1257346705032977489;
-<xfree,,6721,,1257346705032991194;
->xfree,,1257346705032998379;
-<xfree,,6722,,1257346705033008845;
->xfree,,1257346705033015672;
->do_my_cleanups,,1257346705033020240;
->do_cleanups,,1257346705033023813;
->vfprintf_unfiltered,,1257346705033028507;
->fprintf_unfiltered,,1257346705033033106;
-<ui_file_xstrdup,,6723,,1257346705033043400;
-<ui_file_put,,6724,,1257346705033056952;
-<mem_file_put,,6725,,1257346705033071423;
-<ui_file_data,,6726,,1257346705033087173;
->ui_file_data,,1257346705033094271;
-<do_ui_file_xstrdup,,6727,,1257346705033106267;
-<xmalloc,,6728,,1257346705033120835;
->xmalloc,,1257346705033127825;
->do_ui_file_xstrdup,,1257346705033132703;
->mem_file_put,,1257346705033136237;
->ui_file_put,,1257346705033139776;
->ui_file_xstrdup,,1257346705033144426;
-<ui_file_delete,,6729,,1257346705033156218;
-<mem_file_delete,,6730,,1257346705033170290;
-<ui_file_data,,6731,,1257346705033186488;
->ui_file_data,,1257346705033193585;
-<xfree,,6732,,1257346705033204815;
->xfree,,1257346705033212075;
-<xfree,,6733,,1257346705033222405;
->xfree,,1257346705033229181;
->mem_file_delete,,1257346705033232868;
-<xfree,,6734,,1257346705033243307;
->xfree,,1257346705033250014;
->ui_file_delete,,1257346705033253541;
-<add_setshow_enum_cmd,,6735,,1257346705033265463;
-<add_setshow_cmd_full,,6736,,1257346705033281700;
-<xstrdup,,6737,,1257346705033288457;
-<xmalloc,,6738,,1257346705033302622;
->xmalloc,,1257346705033309501;
->xstrdup,,1257346705033313972;
-<xstrdup,,6739,,1257346705033318463;
-<xmalloc,,6740,,1257346705033330835;
->xmalloc,,1257346705033337626;
->xstrdup,,1257346705033342026;
-<add_set_or_show_cmd,,6741,,1257346705033352504;
-<add_cmd,,6742,,1257346705033364912;
-<xmalloc,,6743,,1257346705033379598;
->xmalloc,,1257346705033386542;
-<delete_cmd,,6744,,1257346705033397720;
-<xfree,,6745,,1257346705033412183;
->xfree,,1257346705033419127;
->delete_cmd,,1257346705033423644;
->add_cmd,,1257346705033428246;
->add_set_or_show_cmd,,1257346705033432847;
-<add_set_or_show_cmd,,6746,,1257346705033443385;
-<add_cmd,,6747,,1257346705033456019;
-<xmalloc,,6748,,1257346705033470428;
->xmalloc,,1257346705033477276;
-<delete_cmd,,6749,,1257346705033488394;
-<xfree,,6750,,1257346705033502616;
->xfree,,1257346705033509531;
->delete_cmd,,1257346705033514042;
->add_cmd,,1257346705033518661;
->add_set_or_show_cmd,,1257346705033523257;
->add_setshow_cmd_full,,1257346705033527954;
->add_setshow_enum_cmd,,1257346705033532751;
-<xfree,,6751,,1257346705033543545;
->xfree,,1257346705033550428;
->add_language,,1257346705033554037;
-<add_language,,6752,,1257346705033561427;
-<xrealloc,,6753,,1257346705033575748;
->xrealloc,,1257346705033582837;
-<mem_fileopen,,6754,,1257346705033596361;
-<xmalloc,,6755,,1257346705033615169;
->xmalloc,,1257346705033622450;
-<ui_file_new,,6756,,1257346705033635659;
-<xmalloc,,6757,,1257346705033650137;
->xmalloc,,1257346705033657066;
->ui_file_new,,1257346705033661595;
->mem_fileopen,,1257346705033666224;
-<fprintf_unfiltered,,6758,,1257346705033680716;
-<vfprintf_unfiltered,,6759,,1257346705033695666;
-<xstrvprintf,,6760,,1257346705033710270;
->xstrvprintf,,1257346705033718562;
-<make_cleanup,,6761,,1257346705033728853;
-<make_my_cleanup,,6762,,1257346705033743731;
-<make_my_cleanup2,,6763,,1257346705033756543;
-<xmalloc,,6764,,1257346705033771077;
->xmalloc,,1257346705033778103;
->make_my_cleanup2,,1257346705033782816;
->make_my_cleanup,,1257346705033787420;
->make_cleanup,,1257346705033792075;
-<fputs_unfiltered,,6765,,1257346705033803341;
-<null_file_fputs,,6766,,1257346705033816481;
-<mem_file_write,,6767,,1257346705033830961;
-<ui_file_data,,6768,,1257346705033847120;
->ui_file_data,,1257346705033854152;
-<xmalloc,,6769,,1257346705033866112;
->xmalloc,,1257346705033873143;
->mem_file_write,,1257346705033877745;
->null_file_fputs,,1257346705033882364;
->fputs_unfiltered,,1257346705033886006;
-<do_cleanups,,6770,,1257346705033899049;
-<do_my_cleanups,,6771,,1257346705033912742;
-<xfree,,6772,,1257346705033926390;
->xfree,,1257346705033933385;
-<xfree,,6773,,1257346705033943644;
->xfree,,1257346705033950374;
->do_my_cleanups,,1257346705033954879;
->do_cleanups,,1257346705033958443;
->vfprintf_unfiltered,,1257346705033963117;
->fprintf_unfiltered,,1257346705033967727;
-<ui_file_xstrdup,,6774,,1257346705033978172;
-<ui_file_put,,6775,,1257346705033991603;
-<mem_file_put,,6776,,1257346705034006072;
-<ui_file_data,,6777,,1257346705034021623;
->ui_file_data,,1257346705034028676;
-<do_ui_file_xstrdup,,6778,,1257346705034040687;
-<xmalloc,,6779,,1257346705034055093;
->xmalloc,,1257346705034061977;
->do_ui_file_xstrdup,,1257346705034066735;
->mem_file_put,,1257346705034070262;
->ui_file_put,,1257346705034073715;
->ui_file_xstrdup,,1257346705034078349;
-<ui_file_delete,,6780,,1257346705034090614;
-<mem_file_delete,,6781,,1257346705034104409;
-<ui_file_data,,6782,,1257346705034122219;
->ui_file_data,,1257346705034129313;
-<xfree,,6783,,1257346705034140712;
->xfree,,1257346705034147857;
-<xfree,,6784,,1257346705034159243;
->xfree,,1257346705034166034;
->mem_file_delete,,1257346705034169622;
-<xfree,,6785,,1257346705034181173;
->xfree,,1257346705034187871;
->ui_file_delete,,1257346705034191543;
-<add_setshow_enum_cmd,,6786,,1257346705034204583;
-<add_setshow_cmd_full,,6787,,1257346705034222799;
-<xstrdup,,6788,,1257346705034229695;
-<xmalloc,,6789,,1257346705034246044;
->xmalloc,,1257346705034252837;
->xstrdup,,1257346705034257454;
-<xstrdup,,6790,,1257346705034261983;
-<xmalloc,,6791,,1257346705034276262;
->xmalloc,,1257346705034283158;
->xstrdup,,1257346705034287673;
-<add_set_or_show_cmd,,6792,,1257346705034298920;
-<add_cmd,,6793,,1257346705034312225;
-<xmalloc,,6794,,1257346705034327819;
->xmalloc,,1257346705034334697;
-<delete_cmd,,6795,,1257346705034347349;
-<xfree,,6796,,1257346705034361778;
->xfree,,1257346705034368816;
->delete_cmd,,1257346705034373315;
->add_cmd,,1257346705034378006;
->add_set_or_show_cmd,,1257346705034382599;
-<add_set_or_show_cmd,,6797,,1257346705034393203;
-<add_cmd,,6798,,1257346705034405967;
-<xmalloc,,6799,,1257346705034420177;
->xmalloc,,1257346705034427028;
-<delete_cmd,,6800,,1257346705034439121;
-<xfree,,6801,,1257346705034453607;
->xfree,,1257346705034460546;
->delete_cmd,,1257346705034465249;
->add_cmd,,1257346705034469895;
->add_set_or_show_cmd,,1257346705034474584;
->add_setshow_cmd_full,,1257346705034479375;
->add_setshow_enum_cmd,,1257346705034484003;
-<xfree,,6802,,1257346705034495645;
->xfree,,1257346705034502668;
->add_language,,1257346705034506174;
-<xstrdup,,6803,,1257346705034510854;
-<xmalloc,,6804,,1257346705034525900;
->xmalloc,,1257346705034532769;
->xstrdup,,1257346705034537160;
-<xstrdup,,6805,,1257346705034541725;
-<xmalloc,,6806,,1257346705034554997;
->xmalloc,,1257346705034561923;
->xstrdup,,1257346705034566314;
-<xstrdup,,6807,,1257346705034570828;
-<xmalloc,,6808,,1257346705034584668;
->xmalloc,,1257346705034591600;
->xstrdup,,1257346705034595976;
-<xstrdup,,6809,,1257346705034605574;
-<xmalloc,,6810,,1257346705034619402;
->xmalloc,,1257346705034626322;
->xstrdup,,1257346705034630731;
-<set_language,,6811,,1257346705034638463;
->set_language,,1257346705034648427;
->_initialize_language,,1257346705034653605;
-<_initialize_mem_search,,6812,,1257346705034663292;
-<add_cmd,,6813,,1257346705034681920;
-<xmalloc,,6814,,1257346705034697782;
->xmalloc,,1257346705034704819;
-<delete_cmd,,6815,,1257346705034716960;
->delete_cmd,,1257346705034727311;
->add_cmd,,1257346705034732012;
->_initialize_mem_search,,1257346705034736938;
-<_initialize_frame_reg,,6816,,1257346705034746887;
-<user_reg_add_builtin,,6817,,1257346705034759713;
-<xmalloc,,6818,,1257346705034775954;
->xmalloc,,1257346705034782931;
-<append_user_reg,,6819,,1257346705034789731;
->append_user_reg,,1257346705034798666;
->user_reg_add_builtin,,1257346705034802470;
-<user_reg_add_builtin,,6820,,1257346705034810259;
-<xmalloc,,6821,,1257346705034824048;
->xmalloc,,1257346705034830957;
-<append_user_reg,,6822,,1257346705034837335;
->append_user_reg,,1257346705034844225;
->user_reg_add_builtin,,1257346705034847979;
-<user_reg_add_builtin,,6823,,1257346705034855524;
-<xmalloc,,6824,,1257346705034869253;
->xmalloc,,1257346705034876125;
-<append_user_reg,,6825,,1257346705034882507;
->append_user_reg,,1257346705034889271;
->user_reg_add_builtin,,1257346705034892997;
-<user_reg_add_builtin,,6826,,1257346705034900669;
-<xmalloc,,6827,,1257346705034914873;
->xmalloc,,1257346705034921715;
-<append_user_reg,,6828,,1257346705034928289;
->append_user_reg,,1257346705034935152;
->user_reg_add_builtin,,1257346705034938875;
->_initialize_frame_reg,,1257346705034943843;
-<_initialize_signals,,6829,,1257346705034952643;
->_initialize_signals,,1257346705034962032;
-<_initialize_exec,,6830,,1257346705034977975;
-<add_cmd,,6831,,1257346705034993758;
-<xmalloc,,6832,,1257346705035008581;
->xmalloc,,1257346705035015706;
-<delete_cmd,,6833,,1257346705035027375;
->delete_cmd,,1257346705035035657;
->add_cmd,,1257346705035040370;
-<set_cmd_completer,,6834,,1257346705035051025;
->set_cmd_completer,,1257346705035058414;
-<add_cmd,,6835,,1257346705035069710;
-<xmalloc,,6836,,1257346705035084008;
->xmalloc,,1257346705035090937;
-<delete_cmd,,6837,,1257346705035102398;
->delete_cmd,,1257346705035110416;
->add_cmd,,1257346705035115038;
-<set_cmd_completer,,6838,,1257346705035125868;
->set_cmd_completer,,1257346705035133059;
-<add_com,,6839,,1257346705035145663;
-<add_cmd,,6840,,1257346705035158327;
-<xmalloc,,6841,,1257346705035172501;
->xmalloc,,1257346705035179454;
-<delete_cmd,,6842,,1257346705035190666;
->delete_cmd,,1257346705035198819;
->add_cmd,,1257346705035203649;
->add_com,,1257346705035208094;
-<add_setshow_boolean_cmd,,6843,,1257346705035220214;
-<add_setshow_cmd_full,,6844,,1257346705035236472;
-<xstrdup,,6845,,1257346705035243461;
-<xmalloc,,6846,,1257346705035257533;
->xmalloc,,1257346705035264390;
->xstrdup,,1257346705035268925;
-<xstrdup,,6847,,1257346705035273412;
-<xmalloc,,6848,,1257346705035286251;
->xmalloc,,1257346705035293078;
->xstrdup,,1257346705035297580;
-<add_set_or_show_cmd,,6849,,1257346705035307986;
-<add_cmd,,6850,,1257346705035320710;
-<xmalloc,,6851,,1257346705035334959;
->xmalloc,,1257346705035341774;
-<delete_cmd,,6852,,1257346705035353082;
->delete_cmd,,1257346705035361082;
->add_cmd,,1257346705035365758;
->add_set_or_show_cmd,,1257346705035370492;
-<add_set_or_show_cmd,,6853,,1257346705035380934;
-<add_cmd,,6854,,1257346705035393427;
-<xmalloc,,6855,,1257346705035407658;
->xmalloc,,1257346705035414566;
-<delete_cmd,,6856,,1257346705035425546;
->delete_cmd,,1257346705035433495;
->add_cmd,,1257346705035438249;
->add_set_or_show_cmd,,1257346705035442896;
->add_setshow_cmd_full,,1257346705035447822;
->add_setshow_boolean_cmd,,1257346705035452637;
-<add_target,,6857,,1257346705035460546;
-<add_cmd,,6858,,1257346705035473578;
-<xmalloc,,6859,,1257346705035487607;
->xmalloc,,1257346705035494452;
-<delete_cmd,,6860,,1257346705035505426;
->delete_cmd,,1257346705035512912;
->add_cmd,,1257346705035517378;
->add_target,,1257346705035521961;
->_initialize_exec,,1257346705035526854;
-<_initialize_reverse,,6861,,1257346705035536237;
-<add_com,,6862,,1257346705035553100;
-<add_cmd,,6863,,1257346705035565930;
-<xmalloc,,6864,,1257346705035580065;
->xmalloc,,1257346705035586904;
-<delete_cmd,,6865,,1257346705035598142;
->delete_cmd,,1257346705055634659;
->add_cmd,,1257346705055642277;
->add_com,,1257346705055646851;
-<add_com_alias,,6866,,1257346705055666619;
-<add_alias_cmd,,6867,,1257346705055689463;
-<lookup_cmd,,6868,,1257346705055712154;
-<lookup_cmd_1,,6869,,1257346705055732087;
-<find_command_name_length,,6870,,1257346705055753121;
->find_command_name_length,,1257346705055761656;
-<find_cmd,,6871,,1257346705055778769;
->find_cmd,,1257346705055786997;
->lookup_cmd_1,,1257346705055791845;
->lookup_cmd,,1257346705055796488;
-<add_cmd,,6872,,1257346705055813315;
-<xmalloc,,6873,,1257346705055833702;
->xmalloc,,1257346705055841660;
-<delete_cmd,,6874,,1257346705055858415;
->delete_cmd,,1257346705055866673;
->add_cmd,,1257346705055871518;
->add_alias_cmd,,1257346705055876122;
->add_com_alias,,1257346705055880829;
-<add_com,,6875,,1257346705055902215;
-<add_cmd,,6876,,1257346705055919643;
-<xmalloc,,6877,,1257346705055939347;
->xmalloc,,1257346705055946171;
-<delete_cmd,,6878,,1257346705055961296;
->delete_cmd,,1257346705055969536;
->add_cmd,,1257346705055974333;
->add_com,,1257346705055978670;
-<add_com_alias,,6879,,1257346705055994621;
-<add_alias_cmd,,6880,,1257346705056011646;
-<lookup_cmd,,6881,,1257346705056031224;
-<lookup_cmd_1,,6882,,1257346705056048788;
-<find_command_name_length,,6883,,1257346705056067789;
->find_command_name_length,,1257346705056075340;
-<find_cmd,,6884,,1257346705056090501;
->find_cmd,,1257346705056098197;
->lookup_cmd_1,,1257346705056102753;
->lookup_cmd,,1257346705056107189;
-<add_cmd,,6885,,1257346705056121871;
-<xmalloc,,6886,,1257346705056141428;
->xmalloc,,1257346705056148415;
-<delete_cmd,,6887,,1257346705056163927;
->delete_cmd,,1257346705056172047;
->add_cmd,,1257346705056176880;
->add_alias_cmd,,1257346705056181373;
->add_com_alias,,1257346705056185860;
-<add_com,,6888,,1257346705056202082;
-<add_cmd,,6889,,1257346705056220392;
-<xmalloc,,6890,,1257346705056239789;
->xmalloc,,1257346705056246656;
-<delete_cmd,,6891,,1257346705056261825;
->delete_cmd,,1257346705056270008;
->add_cmd,,1257346705056274892;
->add_com,,1257346705056279289;
-<add_com_alias,,6892,,1257346705056294804;
-<add_alias_cmd,,6893,,1257346705056312127;
-<lookup_cmd,,6894,,1257346705056331173;
-<lookup_cmd_1,,6895,,1257346705056349119;
-<find_command_name_length,,6896,,1257346705056367984;
->find_command_name_length,,1257346705056375388;
-<find_cmd,,6897,,1257346705056390501;
->find_cmd,,1257346705056398230;
->lookup_cmd_1,,1257346705056402801;
->lookup_cmd,,1257346705056407276;
-<add_cmd,,6898,,1257346705056422085;
-<xmalloc,,6899,,1257346705056441450;
->xmalloc,,1257346705056448415;
-<delete_cmd,,6900,,1257346705056463969;
->delete_cmd,,1257346705056472140;
->add_cmd,,1257346705056476943;
->add_alias_cmd,,1257346705056481508;
->add_com_alias,,1257346705056486146;
-<add_com,,6901,,1257346705056502347;
-<add_cmd,,6902,,1257346705056519760;
-<xmalloc,,6903,,1257346705056539053;
->xmalloc,,1257346705056545883;
-<delete_cmd,,6904,,1257346705056561476;
->delete_cmd,,1257346705056569683;
->add_cmd,,1257346705056574606;
->add_com,,1257346705056578931;
-<add_com_alias,,6905,,1257346705056594747;
-<add_alias_cmd,,6906,,1257346705056616653;
-<lookup_cmd,,6907,,1257346705056635930;
-<lookup_cmd_1,,6908,,1257346705056653397;
-<find_command_name_length,,6909,,1257346705056672275;
->find_command_name_length,,1257346705056679709;
-<find_cmd,,6910,,1257346705056695179;
->find_cmd,,1257346705056702908;
->lookup_cmd_1,,1257346705056707534;
->lookup_cmd,,1257346705056712084;
-<add_cmd,,6911,,1257346705056727233;
-<xmalloc,,6912,,1257346705056747049;
->xmalloc,,1257346705056753951;
-<delete_cmd,,6913,,1257346705056768928;
->delete_cmd,,1257346705056777045;
->add_cmd,,1257346705056781787;
->add_alias_cmd,,1257346705056786304;
->add_com_alias,,1257346705056790954;
-<add_com,,6914,,1257346705056807615;
-<add_cmd,,6915,,1257346705056825001;
-<xmalloc,,6916,,1257346705056845136;
->xmalloc,,1257346705056852011;
-<delete_cmd,,6917,,1257346705056867066;
->delete_cmd,,1257346705056875390;
->add_cmd,,1257346705056880151;
->add_com,,1257346705056884644;
-<add_com_alias,,6918,,1257346705056900033;
-<add_alias_cmd,,6919,,1257346705056917013;
-<lookup_cmd,,6920,,1257346705056935701;
-<lookup_cmd_1,,6921,,1257346705056953124;
-<find_command_name_length,,6922,,1257346705056972254;
->find_command_name_length,,1257346705056979649;
-<find_cmd,,6923,,1257346705056994755;
->find_cmd,,1257346705057002608;
->lookup_cmd_1,,1257346705057007152;
->lookup_cmd,,1257346705057011573;
-<add_cmd,,6924,,1257346705057026640;
-<xmalloc,,6925,,1257346705057046032;
->xmalloc,,1257346705057053018;
-<delete_cmd,,6926,,1257346705057068479;
->delete_cmd,,1257346705057076696;
->add_cmd,,1257346705057081496;
->add_alias_cmd,,1257346705057086001;
->add_com_alias,,1257346705057090515;
-<add_com,,6927,,1257346705057106403;
-<add_cmd,,6928,,1257346705057124571;
-<xmalloc,,6929,,1257346705057143930;
->xmalloc,,1257346705057150811;
-<delete_cmd,,6930,,1257346705057165803;
->delete_cmd,,1257346705057174058;
->add_cmd,,1257346705057178894;
->add_com,,1257346705057183267;
->_initialize_reverse,,1257346705057188283;
-<_initialize_objfiles,,6931,,1257346705057209802;
-<register_program_space_data_with_cleanup,,6932,,1257346705057237446;
-<xmalloc,,6933,,1257346705057257000;
->xmalloc,,1257346705057263959;
-<xmalloc,,6934,,1257346705057278533;
->xmalloc,,1257346705057285447;
->register_program_space_data_with_cleanup,,1257346705057291029;
->_initialize_objfiles,,1257346705057296145;
-<_initialize_observer,,6935,,1257346705057315056;
-<add_setshow_zinteger_cmd,,6936,,1257346705057336739;
-<add_setshow_cmd_full,,6937,,1257346705057356865;
-<xstrprintf,,6938,,1257346705057378675;
-<xstrvprintf,,6939,,1257346705057397913;
->xstrvprintf,,1257346705057408030;
->xstrprintf,,1257346705057412806;
-<xstrprintf,,6940,,1257346705057430505;
-<xstrvprintf,,6941,,1257346705057449346;
->xstrvprintf,,1257346705057457075;
->xstrprintf,,1257346705057461698;
-<add_set_or_show_cmd,,6942,,1257346705057477424;
-<add_cmd,,6943,,1257346705057493107;
-<xmalloc,,6944,,1257346705057511293;
->xmalloc,,1257346705057518168;
-<delete_cmd,,6945,,1257346705057533043;
->delete_cmd,,1257346705057541070;
->add_cmd,,1257346705057545605;
->add_set_or_show_cmd,,1257346705057550279;
-<add_set_or_show_cmd,,6946,,1257346705057565012;
-<add_cmd,,6947,,1257346705057580542;
-<xmalloc,,6948,,1257346705057598472;
->xmalloc,,1257346705057610095;
-<delete_cmd,,6949,,1257346705057624500;
->delete_cmd,,1257346705057632653;
->add_cmd,,1257346705057637210;
->add_set_or_show_cmd,,1257346705057641943;
->add_setshow_cmd_full,,1257346705057646818;
->add_setshow_zinteger_cmd,,1257346705057650773;
->_initialize_observer,,1257346705057655916;
-<_initialize_maint_cmds,,6950,,1257346705057666496;
-<add_prefix_cmd,,6951,,1257346705057686516;
-<add_cmd,,6952,,1257346705057702657;
-<xmalloc,,6953,,1257346705057721153;
->xmalloc,,1257346705057728079;
-<delete_cmd,,6954,,1257346705057742133;
->delete_cmd,,1257346705057750532;
->add_cmd,,1257346705057755263;
->add_prefix_cmd,,1257346705057759843;
-<add_com_alias,,6955,,1257346705057773353;
-<add_alias_cmd,,6956,,1257346705057789764;
-<lookup_cmd,,6957,,1257346705057808034;
-<lookup_cmd_1,,6958,,1257346705057824344;
-<find_command_name_length,,6959,,1257346705057841892;
->find_command_name_length,,1257346705057849372;
-<find_cmd,,6960,,1257346705057863305;
->find_cmd,,1257346705057870772;
-<lookup_cmd_1,,6961,,1257346705057884291;
-<find_command_name_length,,6962,,1257346705057902119;
->find_command_name_length,,1257346705057909556;
->lookup_cmd_1,,1257346705057914263;
->lookup_cmd_1,,1257346705057918855;
->lookup_cmd,,1257346705057923261;
-<add_cmd,,6963,,1257346705057936873;
-<xmalloc,,6964,,1257346705057954962;
->xmalloc,,1257346705057961892;
-<delete_cmd,,6965,,1257346705057975855;
->delete_cmd,,1257346705057984044;
->add_cmd,,1257346705057988805;
->add_alias_cmd,,1257346705057993298;
->add_com_alias,,1257346705057997965;
-<add_prefix_cmd,,6966,,1257346705058012332;
-<add_cmd,,6967,,1257346705058028341;
-<xmalloc,,6968,,1257346705058046409;
->xmalloc,,1257346705058053287;
-<delete_cmd,,6969,,1257346705058067152;
->delete_cmd,,1257346705058074592;
->add_cmd,,1257346705058079046;
->add_prefix_cmd,,1257346705058083620;
-<add_alias_cmd,,6970,,1257346705058096955;
-<lookup_cmd,,6971,,1257346705058114780;
-<lookup_cmd_1,,6972,,1257346705058131228;
-<find_command_name_length,,6973,,1257346705058148514;
->find_command_name_length,,1257346705058155883;
-<find_cmd,,6974,,1257346705058169726;
->find_cmd,,1257346705058176628;
-<lookup_cmd_1,,6975,,1257346705058190459;
-<find_command_name_length,,6976,,1257346705058207815;
->find_command_name_length,,1257346705058215141;
->lookup_cmd_1,,1257346705058219763;
->lookup_cmd_1,,1257346705058224199;
->lookup_cmd,,1257346705058228711;
-<add_cmd,,6977,,1257346705058241667;
-<xmalloc,,6978,,1257346705058260144;
->xmalloc,,1257346705058267007;
-<delete_cmd,,6979,,1257346705058281226;
->delete_cmd,,1257346705058288444;
->add_cmd,,1257346705058292934;
->add_alias_cmd,,1257346705058297454;
-<add_cmd,,6980,,1257346705058311878;
-<xmalloc,,6981,,1257346705058330199;
->xmalloc,,1257346705058337134;
-<delete_cmd,,6982,,1257346705058351050;
->delete_cmd,,1257346705058358418;
->add_cmd,,1257346705058362854;
-<add_prefix_cmd,,6983,,1257346705058377392;
-<add_cmd,,6984,,1257346705058393139;
-<xmalloc,,6985,,1257346705058411406;
->xmalloc,,1257346705058418257;
-<delete_cmd,,6986,,1257346705058432247;
->delete_cmd,,1257346705058439396;
->add_cmd,,1257346705058443877;
->add_prefix_cmd,,1257346705058448415;
-<add_prefix_cmd,,6987,,1257346705058462956;
-<add_cmd,,6988,,1257346705058478733;
-<xmalloc,,6989,,1257346705058496627;
->xmalloc,,1257346705058503628;
-<delete_cmd,,6990,,1257346705058517559;
->delete_cmd,,1257346705058524879;
->add_cmd,,1257346705058529354;
->add_prefix_cmd,,1257346705058533862;
-<add_prefix_cmd,,6991,,1257346705058548199;
-<add_cmd,,6992,,1257346705058564448;
-<xmalloc,,6993,,1257346705058582438;
->xmalloc,,1257346705058589328;
-<delete_cmd,,6994,,1257346705058608854;
->delete_cmd,,1257346705058618993;
->add_cmd,,1257346705058623636;
->add_prefix_cmd,,1257346705058628186;
-<add_cmd,,6995,,1257346705058642309;
-<xmalloc,,6996,,1257346705058661061;
->xmalloc,,1257346705058674462;
-<delete_cmd,,6997,,1257346705058688624;
->delete_cmd,,1257346705058696151;
->add_cmd,,1257346705058700647;
-<add_cmd,,6998,,1257346705058714851;
-<xmalloc,,6999,,1257346705058733085;
->xmalloc,,1257346705058740084;
-<delete_cmd,,7000,,1257346705058753885;
->delete_cmd,,1257346705058761196;
->add_cmd,,1257346705058765665;
-<add_cmd,,7001,,1257346705058779523;
-<xmalloc,,7002,,1257346705058797685;
->xmalloc,,1257346705058804674;
-<delete_cmd,,7003,,1257346705058818927;
->delete_cmd,,1257346705058826126;
->add_cmd,,1257346705058830607;
-<add_cmd,,7004,,1257346705058844390;
-<xmalloc,,7005,,1257346705058862624;
->xmalloc,,1257346705058869635;
-<delete_cmd,,7006,,1257346705058883749;
->delete_cmd,,1257346705058890852;
->add_cmd,,1257346705058895255;
-<add_cmd,,7007,,1257346705058909694;
-<xmalloc,,7008,,1257346705058927868;
->xmalloc,,1257346705058934896;
-<delete_cmd,,7009,,1257346705058948688;
->delete_cmd,,1257346705058955912;
->add_cmd,,1257346705058960399;
-<add_cmd,,7010,,1257346705058974425;
-<xmalloc,,7011,,1257346705058992605;
->xmalloc,,1257346705058999574;
-<delete_cmd,,7012,,1257346705059013450;
->delete_cmd,,1257346705059020671;
->add_cmd,,1257346705059025176;
-<add_cmd,,7013,,1257346705059039100;
-<xmalloc,,7014,,1257346705059057551;
->xmalloc,,1257346705059064480;
-<delete_cmd,,7015,,1257346705059078350;
->delete_cmd,,1257346705059086143;
->add_cmd,,1257346705059090614;
-<add_cmd,,7016,,1257346705059104443;
-<xmalloc,,7017,,1257346705059122565;
->xmalloc,,1257346705059129558;
-<delete_cmd,,7018,,1257346705059143428;
->delete_cmd,,1257346705059150673;
->add_cmd,,1257346705059155118;
-<add_cmd,,7019,,1257346705059170347;
-<xmalloc,,7020,,1257346705059188627;
->xmalloc,,1257346705059195664;
-<delete_cmd,,7021,,1257346705059209459;
->delete_cmd,,1257346705059216644;
->add_cmd,,1257346705059221143;
-<add_cmd,,7022,,1257346705059234944;
-<xmalloc,,7023,,1257346705059253551;
->xmalloc,,1257346705059260597;
-<delete_cmd,,7024,,1257346705059274422;
->delete_cmd,,1257346705059281706;
->add_cmd,,1257346705059286266;
-<add_cmd,,7025,,1257346705059300127;
-<xmalloc,,7026,,1257346705059318659;
->xmalloc,,1257346705059325606;
-<delete_cmd,,7027,,1257346705059339383;
->delete_cmd,,1257346705059346514;
->add_cmd,,1257346705059351013;
-<add_cmd,,7028,,1257346705059364817;
-<xmalloc,,7029,,1257346705059383189;
->xmalloc,,1257346705059390202;
-<delete_cmd,,7030,,1257346705059404527;
->delete_cmd,,1257346705059411745;
->add_cmd,,1257346705059416205;
-<add_cmd,,7031,,1257346705059430195;
-<xmalloc,,7032,,1257346705059448847;
->xmalloc,,1257346705059455909;
-<delete_cmd,,7033,,1257346705059469899;
->delete_cmd,,1257346705059477039;
->add_cmd,,1257346705059481517;
-<add_cmd,,7034,,1257346705059495270;
-<xmalloc,,7035,,1257346705059513498;
->xmalloc,,1257346705059520508;
-<delete_cmd,,7036,,1257346705059534971;
->delete_cmd,,1257346705059542132;
->add_cmd,,1257346705059546655;
-<add_cmd,,7037,,1257346705059560988;
-<xmalloc,,7038,,1257346705059579228;
->xmalloc,,1257346705059586176;
-<delete_cmd,,7039,,1257346705059600289;
->delete_cmd,,1257346705059612239;
->add_cmd,,1257346705059616708;
-<add_cmd,,7040,,1257346705059630642;
-<xmalloc,,7041,,1257346705059648825;
->xmalloc,,1257346705059655802;
-<delete_cmd,,7042,,1257346705059669669;
->delete_cmd,,1257346705059676947;
->add_cmd,,1257346705059681395;
-<add_cmd,,7043,,1257346705059695416;
-<xmalloc,,7044,,1257346705059714065;
->xmalloc,,1257346705059721114;
-<delete_cmd,,7045,,1257346705059734960;
->delete_cmd,,1257346705059742250;
->add_cmd,,1257346705059746744;
-<add_cmd,,7046,,1257346705059760554;
-<xmalloc,,7047,,1257346705059779001;
->xmalloc,,1257346705059785988;
-<delete_cmd,,7048,,1257346705059799891;
->delete_cmd,,1257346705059807139;
->add_cmd,,1257346705059811578;
-<add_cmd,,7049,,1257346705059825532;
-<xmalloc,,7050,,1257346705059844115;
->xmalloc,,1257346705059851135;
-<delete_cmd,,7051,,1257346705059864899;
->delete_cmd,,1257346705059872090;
->add_cmd,,1257346705059876541;
-<add_setshow_zinteger_cmd,,7052,,1257346705059891897;
-<add_setshow_cmd_full,,7053,,1257346705059911415;
-<xstrprintf,,7054,,1257346705059931297;
-<xstrvprintf,,7055,,1257346705059949937;
->xstrvprintf,,1257346705059961531;
->xstrprintf,,1257346705059966214;
-<xstrprintf,,7056,,1257346705059983347;
-<xstrvprintf,,7057,,1257346705060001825;
->xstrvprintf,,1257346705060010095;
->xstrprintf,,1257346705060014663;
-<add_set_or_show_cmd,,7058,,1257346705060029553;
-<add_cmd,,7059,,1257346705060045156;
-<xmalloc,,7060,,1257346705060063666;
->xmalloc,,1257346705060070671;
-<delete_cmd,,7061,,1257346705060084658;
->delete_cmd,,1257346705060097247;
->add_cmd,,1257346705060101990;
->add_set_or_show_cmd,,1257346705060106688;
-<add_set_or_show_cmd,,7062,,1257346705060120970;
-<add_cmd,,7063,,1257346705060136624;
-<xmalloc,,7064,,1257346705060154704;
->xmalloc,,1257346705060161573;
-<delete_cmd,,7065,,1257346705060175446;
->delete_cmd,,1257346705060186980;
->add_cmd,,1257346705060191747;
->add_set_or_show_cmd,,1257346705060196480;
->add_setshow_cmd_full,,1257346705060201328;
->add_setshow_zinteger_cmd,,1257346705060205277;
-<add_setshow_boolean_cmd,,7066,,1257346705060221271;
-<add_setshow_cmd_full,,7067,,1257346705060240539;
-<xstrprintf,,7068,,1257346705060259967;
-<xstrvprintf,,7069,,1257346705060278126;
->xstrvprintf,,1257346705060285726;
->xstrprintf,,1257346705060290285;
-<xstrprintf,,7070,,1257346705060307262;
-<xstrvprintf,,7071,,1257346705060325412;
->xstrvprintf,,1257346705060333048;
->xstrprintf,,1257346705060337592;
-<add_set_or_show_cmd,,7072,,1257346705060352127;
-<add_cmd,,7073,,1257346705060367759;
-<xmalloc,,7074,,1257346705060385573;
->xmalloc,,1257346705060392462;
-<delete_cmd,,7075,,1257346705060406188;
->delete_cmd,,1257346705060413448;
->add_cmd,,1257346705060417881;
->add_set_or_show_cmd,,1257346705060422528;
-<add_set_or_show_cmd,,7076,,1257346705060437297;
-<add_cmd,,7077,,1257346705060452963;
-<xmalloc,,7078,,1257346705060470752;
->xmalloc,,1257346705060477624;
-<delete_cmd,,7079,,1257346705060491139;
->delete_cmd,,1257346705060498312;
->add_cmd,,1257346705060502787;
->add_set_or_show_cmd,,1257346705060507497;
->add_setshow_cmd_full,,1257346705060512230;
->add_setshow_boolean_cmd,,1257346705060517096;
->_initialize_maint_cmds,,1257346705060522164;
-<_initialize_demangler,,7080,,1257346705060532717;
-<xcalloc,,7081,,1257346705060555116;
->xcalloc,,1257346705060563414;
-<xstrdup,,7082,,1257346705060568761;
-<xmalloc,,7083,,1257346705060586381;
->xmalloc,,1257346705060593314;
->xstrdup,,1257346705060597945;
-<xstrdup,,7084,,1257346705060606664;
-<xmalloc,,7085,,1257346705060622844;
->xmalloc,,1257346705060629848;
->xstrdup,,1257346705060634284;
-<xstrdup,,7086,,1257346705060638916;
-<xmalloc,,7087,,1257346705060655926;
->xmalloc,,1257346705060662999;
->xstrdup,,1257346705060667411;
-<xstrdup,,7088,,1257346705060672009;
-<xmalloc,,7089,,1257346705060687795;
->xmalloc,,1257346705060694658;
->xstrdup,,1257346705060699034;
-<xstrdup,,7090,,1257346705060703614;
-<xmalloc,,7091,,1257346705060719274;
->xmalloc,,1257346705060726041;
->xstrdup,,1257346705060730516;
-<xstrdup,,7092,,1257346705060735102;
-<xmalloc,,7093,,1257346705060750374;
->xmalloc,,1257346705060757095;
->xstrdup,,1257346705060761561;
-<xstrdup,,7094,,1257346705060766160;
-<xmalloc,,7095,,1257346705060781395;
->xmalloc,,1257346705060788102;
->xstrdup,,1257346705060792547;
-<xstrdup,,7096,,1257346705060797115;
-<xmalloc,,7097,,1257346705060812429;
->xmalloc,,1257346705060819292;
->xstrdup,,1257346705060823695;
-<xstrdup,,7098,,1257346705060828332;
-<xmalloc,,7099,,1257346705060843851;
->xmalloc,,1257346705060850605;
->xstrdup,,1257346705060855104;
-<xstrdup,,7100,,1257346705060859709;
-<xmalloc,,7101,,1257346705060875098;
->xmalloc,,1257346705060881904;
->xstrdup,,1257346705060886283;
-<add_setshow_enum_cmd,,7102,,1257346705060904089;
-<add_setshow_cmd_full,,7103,,1257346705060923499;
-<xstrprintf,,7104,,1257346705060943370;
-<xstrvprintf,,7105,,1257346705060961212;
->xstrvprintf,,1257346705060972502;
->xstrprintf,,1257346705060977167;
-<xstrprintf,,7106,,1257346705060993870;
-<xstrvprintf,,7107,,1257346705061012369;
->xstrvprintf,,1257346705061020754;
->xstrprintf,,1257346705061025343;
-<add_set_or_show_cmd,,7108,,1257346705061039839;
-<add_cmd,,7109,,1257346705061055297;
-<xmalloc,,7110,,1257346705061073044;
->xmalloc,,1257346705061079910;
-<delete_cmd,,7111,,1257346705061093603;
->delete_cmd,,1257346705061101374;
->add_cmd,,1257346705061106044;
->add_set_or_show_cmd,,1257346705061110697;
-<add_set_or_show_cmd,,7112,,1257346705061125223;
-<add_cmd,,7113,,1257346705061140843;
-<xmalloc,,7114,,1257346705061158485;
->xmalloc,,1257346705061165291;
-<delete_cmd,,7115,,1257346705061178502;
->delete_cmd,,1257346705061186153;
->add_cmd,,1257346705061190664;
->add_set_or_show_cmd,,1257346705061195311;
->add_setshow_cmd_full,,1257346705061200111;
->add_setshow_enum_cmd,,1257346705061204799;
-<set_demangling_style,,7116,,1257346705061214420;
-<xstrdup,,7117,,1257346705061223725;
-<xmalloc,,7118,,1257346705061241066;
->xmalloc,,1257346705061247968;
->xstrdup,,1257346705061252374;
-<set_demangling_command,,7119,,1257346705061261898;
->set_demangling_command,,1257346705061271263;
->set_demangling_style,,1257346705061276180;
->_initialize_demangler,,1257346705061281083;
-<_initialize_dbxread,,7120,,1257346705061290899;
-<add_symtab_fns,,7121,,1257346705061307996;
->add_symtab_fns,,1257346705061315824;
->_initialize_dbxread,,1257346705061320904;
-<_initialize_coffread,,7122,,1257346705061329947;
-<add_symtab_fns,,7123,,1257346705061343556;
->add_symtab_fns,,1257346705061350720;
->_initialize_coffread,,1257346705061355841;
-<_initialize_dwarf2_read,,7124,,1257346705061365062;
-<register_objfile_data_with_cleanup,,7125,,1257346705061385687;
-<xmalloc,,7126,,1257346705061403717;
->xmalloc,,1257346705061410643;
-<xmalloc,,7127,,1257346705061422970;
->xmalloc,,1257346705061429686;
->register_objfile_data_with_cleanup,,1257346705061435081;
-<add_prefix_cmd,,7128,,1257346705061451297;
-<add_cmd,,7129,,1257346705061466614;
-<xmalloc,,7130,,1257346705061483913;
->xmalloc,,1257346705061490791;
-<delete_cmd,,7131,,1257346705061504411;
->delete_cmd,,1257346705061511581;
->add_cmd,,1257346705061516008;
->add_prefix_cmd,,1257346705061520570;
-<add_prefix_cmd,,7132,,1257346705061534140;
-<add_cmd,,7133,,1257346705061549174;
-<xmalloc,,7134,,1257346705061566788;
->xmalloc,,1257346705061573820;
-<delete_cmd,,7135,,1257346705061586707;
->delete_cmd,,1257346705061593762;
->add_cmd,,1257346705061598165;
->add_prefix_cmd,,1257346705061607150;
-<add_setshow_zinteger_cmd,,7136,,1257346705061622353;
-<add_setshow_cmd_full,,7137,,1257346705061641089;
-<xstrprintf,,7138,,1257346705061659753;
-<xstrvprintf,,7139,,1257346705061677250;
->xstrvprintf,,1257346705061687235;
->xstrprintf,,1257346705061691863;
-<xstrprintf,,7140,,1257346705061707752;
-<xstrvprintf,,7141,,1257346705061725604;
->xstrvprintf,,1257346705061733808;
->xstrprintf,,1257346705061738394;
-<add_set_or_show_cmd,,7142,,1257346705061752213;
-<add_cmd,,7143,,1257346705061767220;
-<xmalloc,,7144,,1257346705061784498;
->xmalloc,,1257346705061791514;
-<delete_cmd,,7145,,1257346705061804242;
->delete_cmd,,1257346705061811336;
->add_cmd,,1257346705061815745;
->add_set_or_show_cmd,,1257346705061820422;
-<add_set_or_show_cmd,,7146,,1257346705061833979;
-<add_cmd,,7147,,1257346705061849152;
-<xmalloc,,7148,,1257346705061866297;
->xmalloc,,1257346705061873148;
-<delete_cmd,,7149,,1257346705061886269;
->delete_cmd,,1257346705061893352;
->add_cmd,,1257346705061897737;
->add_set_or_show_cmd,,1257346705061902479;
->add_setshow_cmd_full,,1257346705061907333;
->add_setshow_zinteger_cmd,,1257346705061911276;
-<add_setshow_zinteger_cmd,,7150,,1257346705061926004;
-<add_setshow_cmd_full,,7151,,1257346705061944677;
-<xstrprintf,,7152,,1257346705061962908;
-<xstrvprintf,,7153,,1257346705061980498;
->xstrvprintf,,1257346705061988621;
->xstrprintf,,1257346705061993177;
-<xstrprintf,,7154,,1257346705062009550;
-<xstrvprintf,,7155,,1257346705062027658;
->xstrvprintf,,1257346705062035739;
->xstrprintf,,1257346705062040319;
-<add_set_or_show_cmd,,7156,,1257346705062053976;
-<add_cmd,,7157,,1257346705062069313;
-<xmalloc,,7158,,1257346705062086513;
->xmalloc,,1257346705062093412;
-<delete_cmd,,7159,,1257346705062106094;
->delete_cmd,,1257346705062113430;
->add_cmd,,1257346705062117902;
->add_set_or_show_cmd,,1257346705062122578;
-<add_set_or_show_cmd,,7160,,1257346705062136235;
-<add_cmd,,7161,,1257346705062151016;
-<xmalloc,,7162,,1257346705062169058;
->xmalloc,,1257346705062175870;
-<delete_cmd,,7163,,1257346705062189367;
->delete_cmd,,1257346705062196621;
->add_cmd,,1257346705062201069;
->add_set_or_show_cmd,,1257346705062205742;
->add_setshow_cmd_full,,1257346705062210494;
->add_setshow_zinteger_cmd,,1257346705062214344;
->_initialize_dwarf2_read,,1257346705062219462;
-<_initialize_mipsread,,7164,,1257346705062230178;
-<add_symtab_fns,,7165,,1257346705062245128;
->add_symtab_fns,,1257346705062252198;
->_initialize_mipsread,,1257346705062257157;
-<_initialize_stabsread,,7166,,1257346705062266114;
-<register_objfile_data,,7167,,1257346705062287629;
-<register_objfile_data_with_cleanup,,7168,,1257346705062306064;
-<xmalloc,,7169,,1257346705062324912;
->xmalloc,,1257346705062331748;
-<xmalloc,,7170,,1257346705062344196;
->xmalloc,,1257346705062350920;
->register_objfile_data_with_cleanup,,1257346705062356024;
->register_objfile_data,,1257346705062361055;
-<xmalloc,,7171,,1257346705062373755;
->xmalloc,,1257346705062380582;
-<xmalloc,,7172,,1257346705062392690;
->xmalloc,,1257346705062399469;
->_initialize_stabsread,,1257346705062404437;
-<_initialize_core,,7173,,1257346705062419514;
-<add_cmd,,7174,,1257346705062437778;
-<xmalloc,,7175,,1257346705062455161;
->xmalloc,,1257346705062462108;
-<delete_cmd,,7176,,1257346705062475380;
->delete_cmd,,1257346705062485635;
->add_cmd,,1257346705062490329;
-<set_cmd_completer,,7177,,1257346705062503869;
->set_cmd_completer,,1257346705062511405;
-<add_setshow_string_noescape_cmd,,7178,,1257346705062527176;
-<add_setshow_cmd_full,,7179,,1257346705062545534;
-<xstrprintf,,7180,,1257346705062563434;
-<xstrvprintf,,7181,,1257346705062580540;
->xstrvprintf,,1257346705062588417;
->xstrprintf,,1257346705062592982;
-<xstrprintf,,7182,,1257346705062612973;
-<xstrvprintf,,7183,,1257346705062630537;
->xstrvprintf,,1257346705062638347;
->xstrprintf,,1257346705062642918;
-<add_set_or_show_cmd,,7184,,1257346705062656951;
-<add_cmd,,7185,,1257346705062671459;
-<xmalloc,,7186,,1257346705062688703;
->xmalloc,,1257346705062695515;
-<delete_cmd,,7187,,1257346705062708624;
->delete_cmd,,1257346705062716660;
->add_cmd,,1257346705062721168;
->add_set_or_show_cmd,,1257346705062725794;
-<add_set_or_show_cmd,,7188,,1257346705062739303;
-<add_cmd,,7189,,1257346705062753931;
-<xmalloc,,7190,,1257346705062770815;
->xmalloc,,1257346705062777543;
-<delete_cmd,,7191,,1257346705062790691;
->delete_cmd,,1257346705062798610;
->add_cmd,,1257346705062803145;
->add_set_or_show_cmd,,1257346705062807863;
->add_setshow_cmd_full,,1257346705062812723;
->add_setshow_string_noescape_cmd,,1257346705062816874;
-<set_gnutarget,,7192,,1257346705062833793;
-<xstrdup,,7193,,1257346705062842966;
-<xmalloc,,7194,,1257346705062859540;
->xmalloc,,1257346705062866439;
->xstrdup,,1257346705062870845;
-<set_gnutarget_command,,7195,,1257346705062887657;
->set_gnutarget_command,,1257346705062896613;
->set_gnutarget,,1257346705062901434;
->_initialize_core,,1257346705062906068;
-<_initialize_dwarf2_frame,,7196,,1257346705062914684;
-<gdbarch_data_register_pre_init,,7197,,1257346705062928118;
-<gdbarch_data_register,,7198,,1257346705062940590;
-<xmalloc,,7199,,1257346705062959438;
->xmalloc,,1257346705062966298;
-<xmalloc,,7200,,1257346705062978105;
->xmalloc,,1257346705062984764;
->gdbarch_data_register,,1257346705062989855;
->gdbarch_data_register_pre_init,,1257346705062993942;
-<register_objfile_data,,7201,,1257346705063008952;
-<register_objfile_data_with_cleanup,,7202,,1257346705063025896;
-<xmalloc,,7203,,1257346705063043114;
->xmalloc,,1257346705063049983;
-<xmalloc,,7204,,1257346705063061645;
->xmalloc,,1257346705063068421;
->register_objfile_data_with_cleanup,,1257346705063073696;
->register_objfile_data,,1257346705063078634;
->_initialize_dwarf2_frame,,1257346705063083666;
-<_initialize_ada_language,,7205,,1257346705063092399;
-<add_language,,7206,,1257346705063105861;
-<xrealloc,,7207,,1257346705063124615;
->xrealloc,,1257346705063132284;
-<mem_fileopen,,7208,,1257346705063148328;
-<xmalloc,,7209,,1257346705063165411;
->xmalloc,,1257346705063172280;
-<ui_file_new,,7210,,1257346705063187332;
-<xmalloc,,7211,,1257346705063203825;
->xmalloc,,1257346705063210670;
->ui_file_new,,1257346705063215376;
->mem_fileopen,,1257346705063220047;
-<fprintf_unfiltered,,7212,,1257346705063236347;
-<vfprintf_unfiltered,,7213,,1257346705063252804;
-<xstrvprintf,,7214,,1257346705063269561;
->xstrvprintf,,1257346705063277645;
-<make_cleanup,,7215,,1257346705063293663;
-<make_my_cleanup,,7216,,1257346705063311066;
-<make_my_cleanup2,,7217,,1257346705063326025;
-<xmalloc,,7218,,1257346705063342425;
->xmalloc,,1257346705063349453;
->make_my_cleanup2,,1257346705063354464;
->make_my_cleanup,,1257346705063359242;
->make_cleanup,,1257346705063363892;
-<fputs_unfiltered,,7219,,1257346705063376568;
-<null_file_fputs,,7220,,1257346705063391584;
-<mem_file_write,,7221,,1257346705063406925;
-<ui_file_data,,7222,,1257346705063423391;
->ui_file_data,,1257346705063430918;
-<xmalloc,,7223,,1257346705063444602;
->xmalloc,,1257346705063451595;
->mem_file_write,,1257346705063456271;
->null_file_fputs,,1257346705063461107;
->fputs_unfiltered,,1257346705063464800;
-<do_cleanups,,7224,,1257346705063482529;
-<do_my_cleanups,,7225,,1257346705063497620;
-<xfree,,7226,,1257346705063512784;
->xfree,,1257346705063520654;
-<xfree,,7227,,1257346705063531727;
->xfree,,1257346705063538606;
->do_my_cleanups,,1257346705063543309;
->do_cleanups,,1257346705063546969;
->vfprintf_unfiltered,,1257346705063551582;
->fprintf_unfiltered,,1257346705063556247;
-<fprintf_unfiltered,,7228,,1257346705063576024;
-<vfprintf_unfiltered,,7229,,1257346705063591037;
-<xstrvprintf,,7230,,1257346705063610550;
->xstrvprintf,,1257346705063622697;
-<make_cleanup,,7231,,1257346705063633845;
-<make_my_cleanup,,7232,,1257346705063649809;
-<make_my_cleanup2,,7233,,1257346705063663899;
-<xmalloc,,7234,,1257346705063678536;
->xmalloc,,1257346705063685444;
->make_my_cleanup2,,1257346705063690126;
->make_my_cleanup,,1257346705063694740;
->make_cleanup,,1257346705063699263;
-<fputs_unfiltered,,7235,,1257346705063709744;
-<null_file_fputs,,7236,,1257346705063723295;
-<mem_file_write,,7237,,1257346705063736874;
-<ui_file_data,,7238,,1257346705063752221;
->ui_file_data,,1257346705063759267;
-<xrealloc,,7239,,1257346705063770154;
->xrealloc,,1257346705063777116;
->mem_file_write,,1257346705063781706;
->null_file_fputs,,1257346705063786394;
->fputs_unfiltered,,1257346705063789997;
-<do_cleanups,,7240,,1257346705063802962;
-<do_my_cleanups,,7241,,1257346705063817614;
-<xfree,,7242,,1257346705063831617;
->xfree,,1257346705063838510;
-<xfree,,7243,,1257346705063849189;
->xfree,,1257346705063855827;
->do_my_cleanups,,1257346705063860446;
->do_cleanups,,1257346705063863911;
->vfprintf_unfiltered,,1257346705063868524;
->fprintf_unfiltered,,1257346705063873101;
-<ui_file_xstrdup,,7244,,1257346705063884361;
-<ui_file_put,,7245,,1257346705063897949;
-<mem_file_put,,7246,,1257346705063914312;
-<ui_file_data,,7247,,1257346705063929214;
->ui_file_data,,1257346705063936254;
-<do_ui_file_xstrdup,,7248,,1257346705063948934;
-<xmalloc,,7249,,1257346705063964314;
->xmalloc,,1257346705063971225;
->do_ui_file_xstrdup,,1257346705063976031;
->mem_file_put,,1257346705063979727;
->ui_file_put,,1257346705063983245;
->ui_file_xstrdup,,1257346705063988018;
-<ui_file_delete,,7250,,1257346705064001146;
-<mem_file_delete,,7251,,1257346705064016405;
-<ui_file_data,,7252,,1257346705064031214;
->ui_file_data,,1257346705064038305;
-<xfree,,7253,,1257346705064049833;
->xfree,,1257346705064056717;
-<xfree,,7254,,1257346705064066744;
->xfree,,1257346705064073465;
->mem_file_delete,,1257346705064077050;
-<xfree,,7255,,1257346705064087179;
->xfree,,1257346705064093898;
->ui_file_delete,,1257346705064097416;
-<add_setshow_enum_cmd,,7256,,1257346705064110153;
-<add_setshow_cmd_full,,7257,,1257346705064126880;
-<xstrdup,,7258,,1257346705064133845;
-<xmalloc,,7259,,1257346705064148149;
->xmalloc,,1257346705064155171;
->xstrdup,,1257346705064159691;
-<xstrdup,,7260,,1257346705064164286;
-<xmalloc,,7261,,1257346705064176689;
->xmalloc,,1257346705064183456;
->xstrdup,,1257346705064187862;
-<add_set_or_show_cmd,,7262,,1257346705064200334;
-<add_cmd,,7263,,1257346705064213160;
-<xmalloc,,7264,,1257346705064228258;
->xmalloc,,1257346705064235045;
-<delete_cmd,,7265,,1257346705064246296;
-<xfree,,7266,,1257346705064260380;
->xfree,,1257346705064267559;
->delete_cmd,,1257346705064272103;
->add_cmd,,1257346705064276722;
->add_set_or_show_cmd,,1257346705064281381;
-<add_set_or_show_cmd,,7267,,1257346705064293474;
-<add_cmd,,7268,,1257346705064306508;
-<xmalloc,,7269,,1257346705064321590;
->xmalloc,,1257346705064328420;
-<delete_cmd,,7270,,1257346705064339942;
-<xfree,,7271,,1257346705064354067;
->xfree,,1257346705064361099;
->delete_cmd,,1257346705064365682;
->add_cmd,,1257346705064370335;
->add_set_or_show_cmd,,1257346705064374948;
->add_setshow_cmd_full,,1257346705064379742;
->add_setshow_enum_cmd,,1257346705064384502;
-<xfree,,7272,,1257346705064395026;
->xfree,,1257346705064401949;
->add_language,,1257346705064405696;
-<xmalloc,,7273,,1257346705064418321;
->xmalloc,,1257346705064428697;
-<htab_create_alloc,,7274,,1257346705064434868;
-<higher_prime_index,,7275,,1257346705064444621;
->higher_prime_index,,1257346705064454988;
-<xcalloc,,7276,,1257346705064467228;
->xcalloc,,1257346705064474572;
-<xcalloc,,7277,,1257346705064484259;
->xcalloc,,1257346705064493976;
->htab_create_alloc,,1257346705064498941;
-<observer_attach_executable_changed,,7278,,1257346705064513169;
-<generic_observer_attach,,7279,,1257346705064527635;
-<xmalloc,,7280,,1257346705064542486;
->xmalloc,,1257346705064549385;
-<xmalloc,,7281,,1257346705064559457;
->xmalloc,,1257346705064566223;
->generic_observer_attach,,1257346705064571357;
->observer_attach_executable_changed,,1257346705064575769;
->_initialize_ada_language,,1257346705064580963;
-<_initialize_c_language,,7282,,1257346705064589639;
-<add_language,,7283,,1257346705064606277;
-<xrealloc,,7284,,1257346705064620277;
->xrealloc,,1257346705064627407;
-<xrealloc,,7285,,1257346705064636270;
->xrealloc,,1257346705064643304;
-<mem_fileopen,,7286,,1257346705064657292;
-<xmalloc,,7287,,1257346705064671998;
->xmalloc,,1257346705064678885;
-<ui_file_new,,7288,,1257346705064691171;
-<xmalloc,,7289,,1257346705064705480;
->xmalloc,,1257346705064712358;
->ui_file_new,,1257346705064716881;
->mem_fileopen,,1257346705064721410;
-<fprintf_unfiltered,,7290,,1257346705064735813;
-<vfprintf_unfiltered,,7291,,1257346705064749779;
-<xstrvprintf,,7292,,1257346705064764287;
->xstrvprintf,,1257346705064772507;
-<make_cleanup,,7293,,1257346705064784019;
-<make_my_cleanup,,7294,,1257346705064799056;
-<make_my_cleanup2,,7295,,1257346705064812433;
-<xmalloc,,7296,,1257346705064826719;
->xmalloc,,1257346705064833584;
->make_my_cleanup2,,1257346705064838309;
->make_my_cleanup,,1257346705064842923;
->make_cleanup,,1257346705064847419;
-<fputs_unfiltered,,7297,,1257346705064857602;
-<null_file_fputs,,7298,,1257346705064871114;
-<mem_file_write,,7299,,1257346705064884130;
-<ui_file_data,,7300,,1257346705064898656;
->ui_file_data,,1257346705064905754;
-<xmalloc,,7301,,1257346705064917786;
->xmalloc,,1257346705064924815;
->mem_file_write,,1257346705064929437;
->null_file_fputs,,1257346705064934038;
->fputs_unfiltered,,1257346705064937681;
-<do_cleanups,,7302,,1257346705064950528;
-<do_my_cleanups,,7303,,1257346705064964293;
-<xfree,,7304,,1257346705064977484;
->xfree,,1257346705064984518;
-<xfree,,7305,,1257346705064994825;
->xfree,,1257346705065001607;
->do_my_cleanups,,1257346705065006202;
->do_cleanups,,1257346705065009672;
->vfprintf_unfiltered,,1257346705065014295;
->fprintf_unfiltered,,1257346705065018923;
-<fprintf_unfiltered,,7306,,1257346705065031660;
-<vfprintf_unfiltered,,7307,,1257346705065044992;
-<xstrvprintf,,7308,,1257346705065059454;
->xstrvprintf,,1257346705065067638;
-<make_cleanup,,7309,,1257346705065078882;
-<make_my_cleanup,,7310,,1257346705065094262;
-<make_my_cleanup2,,7311,,1257346705065107687;
-<xmalloc,,7312,,1257346705065122102;
->xmalloc,,1257346705065129055;
->make_my_cleanup2,,1257346705065133741;
->make_my_cleanup,,1257346705065138354;
->make_cleanup,,1257346705065142877;
-<fputs_unfiltered,,7313,,1257346705065153051;
-<null_file_fputs,,7314,,1257346705065166365;
-<mem_file_write,,7315,,1257346705065178804;
-<ui_file_data,,7316,,1257346705065193152;
->ui_file_data,,1257346705065200277;
-<xrealloc,,7317,,1257346705065210196;
->xrealloc,,1257346705065217104;
->mem_file_write,,1257346705065221699;
->null_file_fputs,,1257346705065226288;
->fputs_unfiltered,,1257346705065229891;
-<do_cleanups,,7318,,1257346705065242438;
-<do_my_cleanups,,7319,,1257346705065256561;
-<xfree,,7320,,1257346705065269635;
->xfree,,1257346705065276633;
-<xfree,,7321,,1257346705065286687;
->xfree,,1257346705065293453;
->do_my_cleanups,,1257346705065298064;
->do_cleanups,,1257346705065301561;
->vfprintf_unfiltered,,1257346705065306298;
->fprintf_unfiltered,,1257346705065310893;
-<fprintf_unfiltered,,7322,,1257346705065323705;
-<vfprintf_unfiltered,,7323,,1257346705065337148;
-<xstrvprintf,,7324,,1257346705065351425;
->xstrvprintf,,1257346705065359466;
-<make_cleanup,,7325,,1257346705065370401;
-<make_my_cleanup,,7326,,1257346705065385580;
-<make_my_cleanup2,,7327,,1257346705065399023;
-<xmalloc,,7328,,1257346705065413402;
->xmalloc,,1257346705065420313;
->make_my_cleanup2,,1257346705065424986;
->make_my_cleanup,,1257346705065429594;
->make_cleanup,,1257346705065434084;
-<fputs_unfiltered,,7329,,1257346705065444279;
-<null_file_fputs,,7330,,1257346705065457572;
-<mem_file_write,,7331,,1257346705065470110;
-<ui_file_data,,7332,,1257346705065484368;
->ui_file_data,,1257346705065491487;
-<xrealloc,,7333,,1257346705065501552;
->xrealloc,,1257346705065508493;
->mem_file_write,,1257346705065513113;
->null_file_fputs,,1257346705065517765;
->fputs_unfiltered,,1257346705065521362;
-<do_cleanups,,7334,,1257346705065534126;
-<do_my_cleanups,,7335,,1257346705065548002;
-<xfree,,7336,,1257346705065561163;
->xfree,,1257346705065568173;
-<xfree,,7337,,1257346705065578287;
->xfree,,1257346705065585020;
->do_my_cleanups,,1257346705065589535;
->do_cleanups,,1257346705065592999;
->vfprintf_unfiltered,,1257346705065597609;
->fprintf_unfiltered,,1257346705065608439;
-<ui_file_xstrdup,,7338,,1257346705065923966;
-<ui_file_put,,7339,,1257346705065938236;
-<mem_file_put,,7340,,1257346705065953123;
-<ui_file_data,,7341,,1257346705065967574;
->ui_file_data,,1257346705065974722;
-<do_ui_file_xstrdup,,7342,,1257346705065987002;
-<xmalloc,,7343,,1257346705066001522;
->xmalloc,,1257346705066008613;
->do_ui_file_xstrdup,,1257346705066013479;
->mem_file_put,,1257346705066017043;
->ui_file_put,,1257346705066020535;
->ui_file_xstrdup,,1257346705066025097;
-<ui_file_delete,,7344,,1257346705066038107;
-<mem_file_delete,,7345,,1257346705066052940;
-<ui_file_data,,7346,,1257346705066067466;
->ui_file_data,,1257346705066074518;
-<xfree,,7347,,1257346705066085459;
->xfree,,1257346705066092725;
-<xfree,,7348,,1257346705066103615;
->xfree,,1257346705066110409;
->mem_file_delete,,1257346705066114057;
-<xfree,,7349,,1257346705066124598;
->xfree,,1257346705066131359;
->ui_file_delete,,1257346705066134913;
-<add_setshow_enum_cmd,,7350,,1257346705066148934;
-<add_setshow_cmd_full,,7351,,1257346705066166281;
-<xstrdup,,7352,,1257346705066173255;
-<xmalloc,,7353,,1257346705066187691;
->xmalloc,,1257346705066194505;
->xstrdup,,1257346705066198998;
-<xstrdup,,7354,,1257346705066203579;
-<xmalloc,,7355,,1257346705066216018;
->xmalloc,,1257346705066222995;
->xstrdup,,1257346705066227413;
-<add_set_or_show_cmd,,7356,,1257346705066239593;
-<add_cmd,,7357,,1257346705066253743;
-<xmalloc,,7358,,1257346705066268828;
->xmalloc,,1257346705066275730;
-<delete_cmd,,7359,,1257346705066289020;
-<xfree,,7360,,1257346705066303543;
->xfree,,1257346705066310710;
->delete_cmd,,1257346705066315245;
->add_cmd,,1257346705066319984;
->add_set_or_show_cmd,,1257346705066324823;
-<add_set_or_show_cmd,,7361,,1257346705066336796;
-<add_cmd,,7362,,1257346705066350853;
-<xmalloc,,7363,,1257346705066365529;
->xmalloc,,1257346705066372401;
-<delete_cmd,,7364,,1257346705066384827;
-<xfree,,7365,,1257346705066398280;
->xfree,,1257346705066405582;
->delete_cmd,,1257346705066410096;
->add_cmd,,1257346705066414799;
->add_set_or_show_cmd,,1257346705066419389;
->add_setshow_cmd_full,,1257346705066424086;
->add_setshow_enum_cmd,,1257346705066428790;
-<xfree,,7366,,1257346705066439824;
->xfree,,1257346705066446796;
->add_language,,1257346705066450419;
-<add_language,,7367,,1257346705066458795;
-<xrealloc,,7368,,1257346705066472338;
->xrealloc,,1257346705066479688;
-<mem_fileopen,,7369,,1257346705066494081;
-<xmalloc,,7370,,1257346705066508683;
->xmalloc,,1257346705066515618;
-<ui_file_new,,7371,,1257346705066527635;
-<xmalloc,,7372,,1257346705066542537;
->xmalloc,,1257346705066549376;
->ui_file_new,,1257346705066553899;
->mem_fileopen,,1257346705066558464;
-<fprintf_unfiltered,,7373,,1257346705066573520;
-<vfprintf_unfiltered,,7374,,1257346705066588572;
-<xstrvprintf,,7375,,1257346705066608421;
->xstrvprintf,,1257346705066617302;
-<make_cleanup,,7376,,1257346705066628941;
-<make_my_cleanup,,7377,,1257346705066644299;
-<make_my_cleanup2,,7378,,1257346705066657878;
-<xmalloc,,7379,,1257346705066672310;
->xmalloc,,1257346705066679225;
->make_my_cleanup2,,1257346705066683934;
->make_my_cleanup,,1257346705066688641;
->make_cleanup,,1257346705066693140;
-<fputs_unfiltered,,7380,,1257346705066703377;
-<null_file_fputs,,7381,,1257346705066717013;
-<mem_file_write,,7382,,1257346705066730065;
-<ui_file_data,,7383,,1257346705066744474;
->ui_file_data,,1257346705066751592;
-<xmalloc,,7384,,1257346705066763842;
->xmalloc,,1257346705066770882;
->mem_file_write,,1257346705066775495;
->null_file_fputs,,1257346705066780094;
->fputs_unfiltered,,1257346705066783703;
-<do_cleanups,,7385,,1257346705066797023;
-<do_my_cleanups,,7386,,1257346705066811191;
-<xfree,,7387,,1257346705066824787;
->xfree,,1257346705066831930;
-<xfree,,7388,,1257346705066841951;
->xfree,,1257346705066848772;
->do_my_cleanups,,1257346705066853319;
->do_cleanups,,1257346705066856807;
->vfprintf_unfiltered,,1257346705066861406;
->fprintf_unfiltered,,1257346705066866061;
-<fprintf_unfiltered,,7389,,1257346705066879600;
-<vfprintf_unfiltered,,7390,,1257346705066893489;
-<xstrvprintf,,7391,,1257346705066908337;
->xstrvprintf,,1257346705066916836;
-<make_cleanup,,7392,,1257346705066927906;
-<make_my_cleanup,,7393,,1257346705066943671;
-<make_my_cleanup2,,7394,,1257346705066957126;
-<xmalloc,,7395,,1257346705066971682;
->xmalloc,,1257346705066978575;
->make_my_cleanup2,,1257346705066983279;
->make_my_cleanup,,1257346705066987931;
->make_cleanup,,1257346705066992515;
-<fputs_unfiltered,,7396,,1257346705067002965;
-<null_file_fputs,,7397,,1257346705067016607;
-<mem_file_write,,7398,,1257346705067029599;
-<ui_file_data,,7399,,1257346705067043839;
->ui_file_data,,1257346705067050973;
-<xrealloc,,7400,,1257346705067061246;
->xrealloc,,1257346705067068434;
->mem_file_write,,1257346705067073050;
->null_file_fputs,,1257346705067077682;
->fputs_unfiltered,,1257346705067081339;
-<do_cleanups,,7401,,1257346705067094259;
-<do_my_cleanups,,7402,,1257346705067108180;
-<xfree,,7403,,1257346705067121389;
->xfree,,1257346705067128495;
-<xfree,,7404,,1257346705067138639;
->xfree,,1257346705067145533;
->do_my_cleanups,,1257346705067150068;
->do_cleanups,,1257346705067153541;
->vfprintf_unfiltered,,1257346705067158284;
->fprintf_unfiltered,,1257346705067162954;
-<fprintf_unfiltered,,7405,,1257346705067176277;
-<vfprintf_unfiltered,,7406,,1257346705067190244;
-<xstrvprintf,,7407,,1257346705067204649;
->xstrvprintf,,1257346705067212643;
-<make_cleanup,,7408,,1257346705067223858;
-<make_my_cleanup,,7409,,1257346705067239082;
-<make_my_cleanup2,,7410,,1257346705067253138;
-<xmalloc,,7411,,1257346705067267532;
->xmalloc,,1257346705067274356;
->make_my_cleanup2,,1257346705067279044;
->make_my_cleanup,,1257346705067283673;
->make_cleanup,,1257346705067288136;
-<fputs_unfiltered,,7412,,1257346705067298310;
-<null_file_fputs,,7413,,1257346705067311852;
-<mem_file_write,,7414,,1257346705067324706;
-<ui_file_data,,7415,,1257346705067338928;
->ui_file_data,,1257346705067345942;
-<xrealloc,,7416,,1257346705067356245;
->xrealloc,,1257346705067363255;
->mem_file_write,,1257346705067367856;
->null_file_fputs,,1257346705067372437;
->fputs_unfiltered,,1257346705067376130;
-<do_cleanups,,7417,,1257346705067388999;
-<do_my_cleanups,,7418,,1257346705067403188;
-<xfree,,7419,,1257346705067416601;
->xfree,,1257346705067423560;
-<xfree,,7420,,1257346705067433626;
->xfree,,1257346705067440483;
->do_my_cleanups,,1257346705067445021;
->do_cleanups,,1257346705067448495;
->vfprintf_unfiltered,,1257346705067453189;
->fprintf_unfiltered,,1257346705067457947;
-<fprintf_unfiltered,,7421,,1257346705067471237;
-<vfprintf_unfiltered,,7422,,1257346705067484972;
-<xstrvprintf,,7423,,1257346705067499612;
->xstrvprintf,,1257346705067507570;
-<make_cleanup,,7424,,1257346705067518736;
-<make_my_cleanup,,7425,,1257346705067534026;
-<make_my_cleanup2,,7426,,1257346705067547331;
-<xmalloc,,7427,,1257346705067561800;
->xmalloc,,1257346705067568572;
->make_my_cleanup2,,1257346705067573330;
->make_my_cleanup,,1257346705067577925;
->make_cleanup,,1257346705067582386;
-<fputs_unfiltered,,7428,,1257346705067592746;
-<null_file_fputs,,7429,,1257346705067610500;
-<mem_file_write,,7430,,1257346705067623736;
-<ui_file_data,,7431,,1257346705067638214;
->ui_file_data,,1257346705067645278;
-<xrealloc,,7432,,1257346705067655572;
->xrealloc,,1257346705067662550;
->mem_file_write,,1257346705067667154;
->null_file_fputs,,1257346705067671780;
->fputs_unfiltered,,1257346705067675445;
-<do_cleanups,,7433,,1257346705067688275;
-<do_my_cleanups,,7434,,1257346705067702404;
-<xfree,,7435,,1257346705067715502;
->xfree,,1257346705067722431;
-<xfree,,7436,,1257346705067732785;
->xfree,,1257346705067739594;
->do_my_cleanups,,1257346705067744102;
->do_cleanups,,1257346705067747663;
->vfprintf_unfiltered,,1257346705067752345;
->fprintf_unfiltered,,1257346705067757016;
-<ui_file_xstrdup,,7437,,1257346705067767906;
-<ui_file_put,,7438,,1257346705067780895;
-<mem_file_put,,7439,,1257346705067795737;
-<ui_file_data,,7440,,1257346705067810256;
->ui_file_data,,1257346705067817351;
-<do_ui_file_xstrdup,,7441,,1257346705067829429;
-<xmalloc,,7442,,1257346705067843949;
->xmalloc,,1257346705067850785;
->do_ui_file_xstrdup,,1257346705067855651;
->mem_file_put,,1257346705067859223;
->ui_file_put,,1257346705067862697;
->ui_file_xstrdup,,1257346705067867265;
-<ui_file_delete,,7443,,1257346705067879445;
-<mem_file_delete,,7444,,1257346705067893704;
-<ui_file_data,,7445,,1257346705067908437;
->ui_file_data,,1257346705067915510;
-<xfree,,7446,,1257346705067927194;
->xfree,,1257346705067934430;
-<xfree,,7447,,1257346705067945290;
->xfree,,1257346705067952123;
->mem_file_delete,,1257346705067955705;
-<xfree,,7448,,1257346705067966354;
->xfree,,1257346705067973160;
->ui_file_delete,,1257346705067976679;
-<add_setshow_enum_cmd,,7449,,1257346705067990516;
-<add_setshow_cmd_full,,7450,,1257346705068007832;
-<xstrdup,,7451,,1257346705068014807;
-<xmalloc,,7452,,1257346705068029492;
->xmalloc,,1257346705068036322;
->xstrdup,,1257346705068040797;
-<xstrdup,,7453,,1257346705068045347;
-<xmalloc,,7454,,1257346705068058261;
->xmalloc,,1257346705068065115;
->xstrdup,,1257346705068069629;
-<add_set_or_show_cmd,,7455,,1257346705068081923;
-<add_cmd,,7456,,1257346705068095433;
-<xmalloc,,7457,,1257346705068110735;
->xmalloc,,1257346705068117523;
-<delete_cmd,,7458,,1257346705068130096;
-<xfree,,7459,,1257346705068144072;
->xfree,,1257346705068151122;
->delete_cmd,,1257346705068155702;
->add_cmd,,1257346705068160342;
->add_set_or_show_cmd,,1257346705068164962;
-<add_set_or_show_cmd,,7460,,1257346705068176465;
-<add_cmd,,7461,,1257346705068189728;
-<xmalloc,,7462,,1257346705068204137;
->xmalloc,,1257346705068210951;
-<delete_cmd,,7463,,1257346705068223354;
-<xfree,,7464,,1257346705068236824;
->xfree,,1257346705068243871;
->delete_cmd,,1257346705068248427;
->add_cmd,,1257346705068253064;
->add_set_or_show_cmd,,1257346705068257678;
->add_setshow_cmd_full,,1257346705068262489;
->add_setshow_enum_cmd,,1257346705068267256;
-<xfree,,7465,,1257346705068277542;
->xfree,,1257346705068284357;
->add_language,,1257346705068287992;
-<add_language,,7466,,1257346705068296088;
-<xrealloc,,7467,,1257346705068308981;
->xrealloc,,1257346705068316124;
-<mem_fileopen,,7468,,1257346705068330136;
-<xmalloc,,7469,,1257346705068344719;
->xmalloc,,1257346705068351446;
-<ui_file_new,,7470,,1257346705068363515;
-<xmalloc,,7471,,1257346705068378191;
->xmalloc,,1257346705068384994;
->ui_file_new,,1257346705068389511;
->mem_fileopen,,1257346705068394083;
-<fprintf_unfiltered,,7472,,1257346705068408257;
-<vfprintf_unfiltered,,7473,,1257346705068422873;
-<xstrvprintf,,7474,,1257346705068437456;
->xstrvprintf,,1257346705068445696;
-<make_cleanup,,7475,,1257346705068456598;
-<make_my_cleanup,,7476,,1257346705068472059;
-<make_my_cleanup2,,7477,,1257346705068485316;
-<xmalloc,,7478,,1257346705068499773;
->xmalloc,,1257346705068506732;
->make_my_cleanup2,,1257346705068511418;
->make_my_cleanup,,1257346705068516124;
->make_cleanup,,1257346705068520704;
-<fputs_unfiltered,,7479,,1257346705068531011;
-<null_file_fputs,,7480,,1257346705068544532;
-<mem_file_write,,7481,,1257346705068557305;
-<ui_file_data,,7482,,1257346705068571803;
->ui_file_data,,1257346705068578814;
-<xmalloc,,7483,,1257346705068590792;
->xmalloc,,1257346705068597842;
->mem_file_write,,1257346705068610713;
->null_file_fputs,,1257346705068618473;
->fputs_unfiltered,,1257346705068622319;
-<do_cleanups,,7484,,1257346705068635931;
-<do_my_cleanups,,7485,,1257346705068650165;
-<xfree,,7486,,1257346705068663431;
->xfree,,1257346705068670633;
-<xfree,,7487,,1257346705068680760;
->xfree,,1257346705068687586;
->do_my_cleanups,,1257346705068692308;
->do_cleanups,,1257346705068695818;
->vfprintf_unfiltered,,1257346705068700563;
->fprintf_unfiltered,,1257346705068705294;
-<fprintf_unfiltered,,7488,,1257346705068718301;
-<vfprintf_unfiltered,,7489,,1257346705068732584;
-<xstrvprintf,,7490,,1257346705068747082;
->xstrvprintf,,1257346705068755440;
-<make_cleanup,,7491,,1257346705068766333;
-<make_my_cleanup,,7492,,1257346705068781629;
-<make_my_cleanup2,,7493,,1257346705068794849;
-<xmalloc,,7494,,1257346705068809159;
->xmalloc,,1257346705068816040;
->make_my_cleanup2,,1257346705068820749;
->make_my_cleanup,,1257346705068825393;
->make_cleanup,,1257346705068829895;
-<fputs_unfiltered,,7495,,1257346705068840147;
-<null_file_fputs,,7496,,1257346705068853479;
-<mem_file_write,,7497,,1257346705068866285;
-<ui_file_data,,7498,,1257346705068880585;
->ui_file_data,,1257346705068887914;
-<xrealloc,,7499,,1257346705068898137;
->xrealloc,,1257346705068905192;
->mem_file_write,,1257346705068909802;
->null_file_fputs,,1257346705068914440;
->fputs_unfiltered,,1257346705068918169;
-<do_cleanups,,7500,,1257346705068931161;
-<do_my_cleanups,,7501,,1257346705068945254;
-<xfree,,7502,,1257346705068958303;
->xfree,,1257346705068965377;
-<xfree,,7503,,1257346705068975713;
->xfree,,1257346705068982585;
->do_my_cleanups,,1257346705068987241;
->do_cleanups,,1257346705068990759;
->vfprintf_unfiltered,,1257346705068995424;
->fprintf_unfiltered,,1257346705069000076;
-<fprintf_unfiltered,,7504,,1257346705069013480;
-<vfprintf_unfiltered,,7505,,1257346705069027549;
-<xstrvprintf,,7506,,1257346705069042174;
->xstrvprintf,,1257346705069050207;
-<make_cleanup,,7507,,1257346705069061166;
-<make_my_cleanup,,7508,,1257346705069076456;
-<make_my_cleanup2,,7509,,1257346705069089683;
-<xmalloc,,7510,,1257346705069104139;
->xmalloc,,1257346705069110924;
->make_my_cleanup2,,1257346705069115646;
->make_my_cleanup,,1257346705069120340;
->make_cleanup,,1257346705069124849;
-<fputs_unfiltered,,7511,,1257346705069134996;
-<null_file_fputs,,7512,,1257346705069148246;
-<mem_file_write,,7513,,1257346705069161073;
-<ui_file_data,,7514,,1257346705069175148;
->ui_file_data,,1257346705069182284;
-<xrealloc,,7515,,1257346705069192645;
->xrealloc,,1257346705069199592;
->mem_file_write,,1257346705069204197;
->null_file_fputs,,1257346705069208819;
->fputs_unfiltered,,1257346705069212455;
-<do_cleanups,,7516,,1257346705069225293;
-<do_my_cleanups,,7517,,1257346705069239185;
-<xfree,,7518,,1257346705069252306;
->xfree,,1257346705069259301;
-<xfree,,7519,,1257346705069269467;
->xfree,,1257346705069276188;
->do_my_cleanups,,1257346705069280772;
->do_cleanups,,1257346705069284275;
->vfprintf_unfiltered,,1257346705069288988;
->fprintf_unfiltered,,1257346705069293634;
-<fprintf_unfiltered,,7520,,1257346705069306792;
-<vfprintf_unfiltered,,7521,,1257346705069321164;
-<xstrvprintf,,7522,,1257346705069335738;
->xstrvprintf,,1257346705069343886;
-<make_cleanup,,7523,,1257346705069354769;
-<make_my_cleanup,,7524,,1257346705069370119;
-<make_my_cleanup2,,7525,,1257346705069383328;
-<xmalloc,,7526,,1257346705069397812;
->xmalloc,,1257346705069404602;
->make_my_cleanup2,,1257346705069409375;
->make_my_cleanup,,1257346705069413995;
->make_cleanup,,1257346705069418500;
-<fputs_unfiltered,,7527,,1257346705069428587;
-<null_file_fputs,,7528,,1257346705069441846;
-<mem_file_write,,7529,,1257346705069454517;
-<ui_file_data,,7530,,1257346705069468576;
->ui_file_data,,1257346705069475716;
-<xrealloc,,7531,,1257346705069485989;
->xrealloc,,1257346705069492979;
->mem_file_write,,1257346705069497646;
->null_file_fputs,,1257346705069502233;
->fputs_unfiltered,,1257346705069505920;
-<do_cleanups,,7532,,1257346705069518849;
-<do_my_cleanups,,7533,,1257346705069532794;
-<xfree,,7534,,1257346705069546180;
->xfree,,1257346705069553121;
-<xfree,,7535,,1257346705069563743;
->xfree,,1257346705069570495;
->do_my_cleanups,,1257346705069575139;
->do_cleanups,,1257346705069578603;
->vfprintf_unfiltered,,1257346705069583274;
->fprintf_unfiltered,,1257346705069587974;
-<fprintf_unfiltered,,7536,,1257346705069605648;
-<vfprintf_unfiltered,,7537,,1257346705069621792;
-<xstrvprintf,,7538,,1257346705069636447;
->xstrvprintf,,1257346705069644594;
-<make_cleanup,,7539,,1257346705069655346;
-<make_my_cleanup,,7540,,1257346705069670804;
-<make_my_cleanup2,,7541,,1257346705069683919;
-<xmalloc,,7542,,1257346705069698319;
->xmalloc,,1257346705069705116;
->make_my_cleanup2,,1257346705069709804;
->make_my_cleanup,,1257346705069714439;
->make_cleanup,,1257346705069718914;
-<fputs_unfiltered,,7543,,1257346705069729076;
-<null_file_fputs,,7544,,1257346705069742309;
-<mem_file_write,,7545,,1257346705069755180;
-<ui_file_data,,7546,,1257346705069769285;
->ui_file_data,,1257346705069776425;
-<xrealloc,,7547,,1257346705069786810;
->xrealloc,,1257346705069793715;
->mem_file_write,,1257346705069798322;
->null_file_fputs,,1257346705069803010;
->fputs_unfiltered,,1257346705069806653;
-<do_cleanups,,7548,,1257346705069819630;
-<do_my_cleanups,,7549,,1257346705069833587;
-<xfree,,7550,,1257346705069847045;
->xfree,,1257346705069854041;
-<xfree,,7551,,1257346705069864377;
->xfree,,1257346705069871117;
->do_my_cleanups,,1257346705069875802;
->do_cleanups,,1257346705069879303;
->vfprintf_unfiltered,,1257346705069884043;
->fprintf_unfiltered,,1257346705069888674;
-<ui_file_xstrdup,,7552,,1257346705069899826;
-<ui_file_put,,7553,,1257346705069913672;
-<mem_file_put,,7554,,1257346705069928447;
-<ui_file_data,,7555,,1257346705069943337;
->ui_file_data,,1257346705069950338;
-<do_ui_file_xstrdup,,7556,,1257346705069963298;
-<xmalloc,,7557,,1257346705069978852;
->xmalloc,,1257346705069985724;
->do_ui_file_xstrdup,,1257346705069990512;
->mem_file_put,,1257346705069994106;
->ui_file_put,,1257346705069997573;
->ui_file_xstrdup,,1257346705070002204;
-<ui_file_delete,,7558,,1257346705070014655;
-<mem_file_delete,,7559,,1257346705070029434;
-<ui_file_data,,7560,,1257346705070044675;
->ui_file_data,,1257346705070051674;
-<xfree,,7561,,1257346705070062278;
->xfree,,1257346705070069358;
-<xfree,,7562,,1257346705070079423;
->xfree,,1257346705070086142;
->mem_file_delete,,1257346705070089703;
-<xfree,,7563,,1257346705070100120;
->xfree,,1257346705070106755;
->ui_file_delete,,1257346705070110388;
-<add_setshow_enum_cmd,,7564,,1257346705070124138;
-<add_setshow_cmd_full,,7565,,1257346705070141088;
-<xstrdup,,7566,,1257346705070147966;
-<xmalloc,,7567,,1257346705070162212;
->xmalloc,,1257346705070169078;
->xstrdup,,1257346705070173589;
-<xstrdup,,7568,,1257346705070178121;
-<xmalloc,,7569,,1257346705070190334;
->xmalloc,,1257346705070197128;
->xstrdup,,1257346705070201543;
-<add_set_or_show_cmd,,7570,,1257346705070213311;
-<add_cmd,,7571,,1257346705070226393;
-<xmalloc,,7572,,1257346705070240615;
->xmalloc,,1257346705070247364;
-<delete_cmd,,7573,,1257346705070259670;
-<xfree,,7574,,1257346705070273210;
->xfree,,1257346705070280181;
->delete_cmd,,1257346705070284707;
->add_cmd,,1257346705070289327;
->add_set_or_show_cmd,,1257346705070293913;
-<add_set_or_show_cmd,,7575,,1257346705070305468;
-<add_cmd,,7576,,1257346705070319040;
-<xmalloc,,7577,,1257346705070333449;
->xmalloc,,1257346705070340477;
-<delete_cmd,,7578,,1257346705070352756;
-<xfree,,7579,,1257346705070366389;
->xfree,,1257346705070373457;
->delete_cmd,,1257346705070377953;
->add_cmd,,1257346705070382641;
->add_set_or_show_cmd,,1257346705070387219;
->add_setshow_cmd_full,,1257346705070392043;
->add_setshow_enum_cmd,,1257346705070396674;
-<xfree,,7580,,1257346705070406893;
->xfree,,1257346705070413711;
->add_language,,1257346705070417368;
-<add_language,,7581,,1257346705070425530;
-<xrealloc,,7582,,1257346705070438504;
->xrealloc,,1257346705070445515;
-<mem_fileopen,,7583,,1257346705070459442;
-<xmalloc,,7584,,1257346705070474010;
->xmalloc,,1257346705070480807;
-<ui_file_new,,7585,,1257346705070492397;
-<xmalloc,,7586,,1257346705070507341;
->xmalloc,,1257346705070514240;
->ui_file_new,,1257346705070518742;
->mem_fileopen,,1257346705070523311;
-<fprintf_unfiltered,,7587,,1257346705070537494;
-<vfprintf_unfiltered,,7588,,1257346705070551575;
-<xstrvprintf,,7589,,1257346705070566131;
->xstrvprintf,,1257346705070574160;
-<make_cleanup,,7590,,1257346705070584755;
-<make_my_cleanup,,7591,,1257346705070599946;
-<make_my_cleanup2,,7592,,1257346705070617670;
-<xmalloc,,7593,,1257346705070632229;
->xmalloc,,1257346705070639281;
->make_my_cleanup2,,1257346705070643970;
->make_my_cleanup,,1257346705070648604;
->make_cleanup,,1257346705070653097;
-<fputs_unfiltered,,7594,,1257346705070663476;
-<null_file_fputs,,7595,,1257346705070677139;
-<mem_file_write,,7596,,1257346705070690080;
-<ui_file_data,,7597,,1257346705070704332;
->ui_file_data,,1257346705070711487;
-<xmalloc,,7598,,1257346705070723913;
->xmalloc,,1257346705070730981;
->mem_file_write,,1257346705070735657;
->null_file_fputs,,1257346705070740250;
->fputs_unfiltered,,1257346705070743967;
-<do_cleanups,,7599,,1257346705070756971;
-<do_my_cleanups,,7600,,1257346705070770832;
-<xfree,,7601,,1257346705070783950;
->xfree,,1257346705070791030;
-<xfree,,7602,,1257346705070801177;
->xfree,,1257346705070807859;
->do_my_cleanups,,1257346705070812572;
->do_cleanups,,1257346705070816172;
->vfprintf_unfiltered,,1257346705070820771;
->fprintf_unfiltered,,1257346705070825441;
-<fprintf_unfiltered,,7603,,1257346705070838430;
-<vfprintf_unfiltered,,7604,,1257346705070852315;
-<xstrvprintf,,7605,,1257346705070866727;
->xstrvprintf,,1257346705070874727;
-<make_cleanup,,7606,,1257346705070885415;
-<make_my_cleanup,,7607,,1257346705070900572;
-<make_my_cleanup2,,7608,,1257346705070914010;
-<xmalloc,,7609,,1257346705070928608;
->xmalloc,,1257346705070935435;
->make_my_cleanup2,,1257346705070940132;
->make_my_cleanup,,1257346705070944722;
->make_cleanup,,1257346705070949299;
-<fputs_unfiltered,,7610,,1257346705070959380;
-<null_file_fputs,,7611,,1257346705070972489;
-<mem_file_write,,7612,,1257346705070985740;
-<ui_file_data,,7613,,1257346705070999956;
->ui_file_data,,1257346705071006957;
-<xrealloc,,7614,,1257346705071017318;
->xrealloc,,1257346705071024596;
->mem_file_write,,1257346705071029239;
->null_file_fputs,,1257346705071033853;
->fputs_unfiltered,,1257346705071037486;
-<do_cleanups,,7615,,1257346705071050788;
-<do_my_cleanups,,7616,,1257346705071064946;
-<xfree,,7617,,1257346705071078267;
->xfree,,1257346705071085192;
-<xfree,,7618,,1257346705071095261;
->xfree,,1257346705071102130;
->do_my_cleanups,,1257346705071106684;
->do_cleanups,,1257346705071110196;
->vfprintf_unfiltered,,1257346705071114906;
->fprintf_unfiltered,,1257346705071119534;
-<fprintf_unfiltered,,7619,,1257346705071132845;
-<vfprintf_unfiltered,,7620,,1257346705071146586;
-<xstrvprintf,,7621,,1257346705071161404;
->xstrvprintf,,1257346705071169368;
-<make_cleanup,,7622,,1257346705071180077;
-<make_my_cleanup,,7623,,1257346705071195168;
-<make_my_cleanup2,,7624,,1257346705071208413;
-<xmalloc,,7625,,1257346705071222629;
->xmalloc,,1257346705071229552;
->make_my_cleanup2,,1257346705071234220;
->make_my_cleanup,,1257346705071238953;
->make_cleanup,,1257346705071243443;
-<fputs_unfiltered,,7626,,1257346705071253678;
-<null_file_fputs,,7627,,1257346705071266781;
-<mem_file_write,,7628,,1257346705071279683;
-<ui_file_data,,7629,,1257346705071293989;
->ui_file_data,,1257346705071301129;
-<xrealloc,,7630,,1257346705071311526;
->xrealloc,,1257346705071318515;
->mem_file_write,,1257346705071323104;
->null_file_fputs,,1257346705071327669;
->fputs_unfiltered,,1257346705071331263;
-<do_cleanups,,7631,,1257346705071344102;
-<do_my_cleanups,,7632,,1257346705071358451;
-<xfree,,7633,,1257346705071371614;
->xfree,,1257346705071378480;
-<xfree,,7634,,1257346705071388862;
->xfree,,1257346705071395601;
->do_my_cleanups,,1257346705071400248;
->do_cleanups,,1257346705071403754;
->vfprintf_unfiltered,,1257346705071408353;
->fprintf_unfiltered,,1257346705071412966;
-<fprintf_unfiltered,,7635,,1257346705071426048;
-<vfprintf_unfiltered,,7636,,1257346705071439603;
-<xstrvprintf,,7637,,1257346705071453987;
->xstrvprintf,,1257346705071461897;
-<make_cleanup,,7638,,1257346705071472492;
-<make_my_cleanup,,7639,,1257346705071487638;
-<make_my_cleanup2,,7640,,1257346705071500618;
-<xmalloc,,7641,,1257346705071515441;
->xmalloc,,1257346705071522250;
->make_my_cleanup2,,1257346705071526924;
->make_my_cleanup,,1257346705071531549;
->make_cleanup,,1257346705071536072;
-<fputs_unfiltered,,7642,,1257346705071546616;
-<null_file_fputs,,7643,,1257346705071559656;
-<mem_file_write,,7644,,1257346705071572817;
-<ui_file_data,,7645,,1257346705071586832;
->ui_file_data,,1257346705071593881;
-<xrealloc,,7646,,1257346705071608509;
->xrealloc,,1257346705071615926;
->mem_file_write,,1257346705071620677;
->null_file_fputs,,1257346705071625285;
->fputs_unfiltered,,1257346705071628999;
-<do_cleanups,,7647,,1257346705071642105;
-<do_my_cleanups,,7648,,1257346705071656033;
-<xfree,,7649,,1257346705071669244;
->xfree,,1257346705071676318;
-<xfree,,7650,,1257346705071686351;
->xfree,,1257346705071693084;
->do_my_cleanups,,1257346705071697655;
->do_cleanups,,1257346705071701120;
->vfprintf_unfiltered,,1257346705071705701;
->fprintf_unfiltered,,1257346705071710296;
-<fprintf_unfiltered,,7651,,1257346705071723309;
-<vfprintf_unfiltered,,7652,,1257346705071737200;
-<xstrvprintf,,7653,,1257346705071751561;
->xstrvprintf,,1257346705071759624;
-<make_cleanup,,7654,,1257346705071770372;
-<make_my_cleanup,,7655,,1257346705071785515;
-<make_my_cleanup2,,7656,,1257346705071798573;
-<xmalloc,,7657,,1257346705071812933;
->xmalloc,,1257346705071819742;
->make_my_cleanup2,,1257346705071824419;
->make_my_cleanup,,1257346705071829092;
->make_cleanup,,1257346705071833588;
-<fputs_unfiltered,,7658,,1257346705071843711;
-<null_file_fputs,,7659,,1257346705071856800;
-<mem_file_write,,7660,,1257346705071869852;
-<ui_file_data,,7661,,1257346705071884143;
->ui_file_data,,1257346705071891181;
-<xrealloc,,7662,,1257346705071901451;
->xrealloc,,1257346705071908377;
->mem_file_write,,1257346705071912981;
->null_file_fputs,,1257346705071917562;
->fputs_unfiltered,,1257346705071921156;
-<do_cleanups,,7663,,1257346705071934178;
-<do_my_cleanups,,7664,,1257346705071948379;
-<xfree,,7665,,1257346705071961512;
->xfree,,1257346705071968432;
-<xfree,,7666,,1257346705071978577;
->xfree,,1257346705071985349;
->do_my_cleanups,,1257346705071989933;
->do_cleanups,,1257346705071993433;
->vfprintf_unfiltered,,1257346705071998143;
->fprintf_unfiltered,,1257346705072002765;
-<fprintf_unfiltered,,7667,,1257346705072015983;
-<vfprintf_unfiltered,,7668,,1257346705072029685;
-<xstrvprintf,,7669,,1257346705072044737;
->xstrvprintf,,1257346705072052839;
-<make_cleanup,,7670,,1257346705072063621;
-<make_my_cleanup,,7671,,1257346705072079352;
-<make_my_cleanup2,,7672,,1257346705072092380;
-<xmalloc,,7673,,1257346705072107018;
->xmalloc,,1257346705072113893;
->make_my_cleanup2,,1257346705072118560;
->make_my_cleanup,,1257346705072123183;
->make_cleanup,,1257346705072127615;
-<fputs_unfiltered,,7674,,1257346705072137967;
-<null_file_fputs,,7675,,1257346705072151257;
-<mem_file_write,,7676,,1257346705072164550;
-<ui_file_data,,7677,,1257346705072178712;
->ui_file_data,,1257346705072185758;
-<xrealloc,,7678,,1257346705072196717;
->xrealloc,,1257346705072203673;
->mem_file_write,,1257346705072208290;
->null_file_fputs,,1257346705072212864;
->fputs_unfiltered,,1257346705072216461;
-<do_cleanups,,7679,,1257346705072229621;
-<do_my_cleanups,,7680,,1257346705072243522;
-<xfree,,7681,,1257346705072256652;
->xfree,,1257346705072263623;
-<xfree,,7682,,1257346705072273635;
->xfree,,1257346705072280597;
->do_my_cleanups,,1257346705072285211;
->do_cleanups,,1257346705072288715;
->vfprintf_unfiltered,,1257346705072293322;
->fprintf_unfiltered,,1257346705072297911;
-<ui_file_xstrdup,,7683,,1257346705072308554;
-<ui_file_put,,7684,,1257346705072321874;
-<mem_file_put,,7685,,1257346705072336515;
-<ui_file_data,,7686,,1257346705072350803;
->ui_file_data,,1257346705072357744;
-<do_ui_file_xstrdup,,7687,,1257346705072370153;
-<xmalloc,,7688,,1257346705072384808;
->xmalloc,,1257346705072391656;
->do_ui_file_xstrdup,,1257346705072396495;
->mem_file_put,,1257346705072400122;
->ui_file_put,,1257346705072403586;
->ui_file_xstrdup,,1257346705072408188;
-<ui_file_delete,,7689,,1257346705072421237;
-<mem_file_delete,,7690,,1257346705072436003;
-<ui_file_data,,7691,,1257346705072450216;
->ui_file_data,,1257346705072457305;
-<xfree,,7692,,1257346705072468135;
->xfree,,1257346705072475124;
-<xfree,,7693,,1257346705072485451;
->xfree,,1257346705072492176;
->mem_file_delete,,1257346705072495839;
-<xfree,,7694,,1257346705072506209;
->xfree,,1257346705072512972;
->ui_file_delete,,1257346705072516506;
-<add_setshow_enum_cmd,,7695,,1257346705072529664;
-<add_setshow_cmd_full,,7696,,1257346705072547086;
-<xstrdup,,7697,,1257346705072554033;
-<xmalloc,,7698,,1257346705072568565;
->xmalloc,,1257346705072575539;
->xstrdup,,1257346705072580056;
-<xstrdup,,7699,,1257346705072584630;
-<xmalloc,,7700,,1257346705072596642;
->xmalloc,,1257346705072607978;
->xstrdup,,1257346705072612537;
-<add_set_or_show_cmd,,7701,,1257346705072624218;
-<add_cmd,,7702,,1257346705072637495;
-<xmalloc,,7703,,1257346705072651775;
->xmalloc,,1257346705072658701;
-<delete_cmd,,7704,,1257346705072670773;
-<xfree,,7705,,1257346705072684261;
->xfree,,1257346705072691262;
->delete_cmd,,1257346705072695852;
->add_cmd,,1257346705072700459;
->add_set_or_show_cmd,,1257346705072705069;
-<add_set_or_show_cmd,,7706,,1257346705072716804;
-<add_cmd,,7707,,1257346705072730049;
-<xmalloc,,7708,,1257346705072744413;
->xmalloc,,1257346705072751396;
-<delete_cmd,,7709,,1257346705072763696;
-<xfree,,7710,,1257346705072777506;
->xfree,,1257346705072784490;
->delete_cmd,,1257346705072789007;
->add_cmd,,1257346705072793656;
->add_set_or_show_cmd,,1257346705072798282;
->add_setshow_cmd_full,,1257346705072802961;
->add_setshow_enum_cmd,,1257346705072807680;
-<xfree,,7711,,1257346705072817881;
->xfree,,1257346705072824711;
->add_language,,1257346705072828311;
->_initialize_c_language,,1257346705072833469;
-<_initialize_f_language,,7712,,1257346705072841074;
-<gdbarch_data_register_post_init,,7713,,1257346705072854539;
-<gdbarch_data_register,,7714,,1257346705072865609;
-<xmalloc,,7715,,1257346705072880102;
->xmalloc,,1257346705072886850;
-<xmalloc,,7716,,1257346705072896712;
->xmalloc,,1257346705072903508;
->gdbarch_data_register,,1257346705072908543;
->gdbarch_data_register_post_init,,1257346705072912783;
-<add_language,,7717,,1257346705072921189;
-<xrealloc,,7718,,1257346705072936383;
->xrealloc,,1257346705072943739;
-<xrealloc,,7719,,1257346705072953453;
->xrealloc,,1257346705072960421;
-<mem_fileopen,,7720,,1257346705072974015;
-<xmalloc,,7721,,1257346705072988516;
->xmalloc,,1257346705072995253;
-<ui_file_new,,7722,,1257346705073007081;
-<xmalloc,,7723,,1257346705073021370;
->xmalloc,,1257346705073028245;
->ui_file_new,,1257346705073032810;
->mem_fileopen,,1257346705073037336;
-<fprintf_unfiltered,,7724,,1257346705073051450;
-<vfprintf_unfiltered,,7725,,1257346705073065480;
-<xstrvprintf,,7726,,1257346705073080038;
->xstrvprintf,,1257346705073088140;
-<make_cleanup,,7727,,1257346705073098685;
-<make_my_cleanup,,7728,,1257346705073114263;
-<make_my_cleanup2,,7729,,1257346705073127403;
-<xmalloc,,7730,,1257346705073142013;
->xmalloc,,1257346705073148936;
->make_my_cleanup2,,1257346705073153609;
->make_my_cleanup,,1257346705073158181;
->make_cleanup,,1257346705073162701;
-<fputs_unfiltered,,7731,,1257346705073173116;
-<null_file_fputs,,7732,,1257346705073186165;
-<mem_file_write,,7733,,1257346705073199473;
-<ui_file_data,,7734,,1257346705073213433;
->ui_file_data,,1257346705073220483;
-<xmalloc,,7735,,1257346705073232476;
->xmalloc,,1257346705073239489;
->mem_file_write,,1257346705073244205;
->null_file_fputs,,1257346705073248851;
->fputs_unfiltered,,1257346705073252496;
-<do_cleanups,,7736,,1257346705073265218;
-<do_my_cleanups,,7737,,1257346705073278995;
-<xfree,,7738,,1257346705073292318;
->xfree,,1257346705073299196;
-<xfree,,7739,,1257346705073309316;
->xfree,,1257346705073316004;
->do_my_cleanups,,1257346705073320510;
->do_cleanups,,1257346705073323974;
->vfprintf_unfiltered,,1257346705073328636;
->fprintf_unfiltered,,1257346705073333318;
-<fprintf_unfiltered,,7740,,1257346705073346235;
-<vfprintf_unfiltered,,7741,,1257346705073360280;
-<xstrvprintf,,7742,,1257346705073374782;
->xstrvprintf,,1257346705073382893;
-<make_cleanup,,7743,,1257346705073393659;
-<make_my_cleanup,,7744,,1257346705073408829;
-<make_my_cleanup2,,7745,,1257346705073422206;
-<xmalloc,,7746,,1257346705073436500;
->xmalloc,,1257346705073443435;
->make_my_cleanup2,,1257346705073448151;
->make_my_cleanup,,1257346705073452764;
->make_cleanup,,1257346705073457218;
-<fputs_unfiltered,,7747,,1257346705073467311;
-<null_file_fputs,,7748,,1257346705073480312;
-<mem_file_write,,7749,,1257346705073493052;
-<ui_file_data,,7750,,1257346705073507400;
->ui_file_data,,1257346705073514437;
-<xrealloc,,7751,,1257346705073524639;
->xrealloc,,1257346705073531950;
->mem_file_write,,1257346705073536614;
->null_file_fputs,,1257346705073541306;
->fputs_unfiltered,,1257346705073545002;
-<do_cleanups,,7752,,1257346705073557612;
-<do_my_cleanups,,7753,,1257346705073571951;
-<xfree,,7754,,1257346705073584935;
->xfree,,1257346705073591969;
-<xfree,,7755,,1257346705073606152;
->xfree,,1257346705073613484;
->do_my_cleanups,,1257346705073618071;
->do_cleanups,,1257346705073621526;
->vfprintf_unfiltered,,1257346705073626203;
->fprintf_unfiltered,,1257346705073630849;
-<fprintf_unfiltered,,7756,,1257346705073643893;
-<vfprintf_unfiltered,,7757,,1257346705073657877;
-<xstrvprintf,,7758,,1257346705073672695;
->xstrvprintf,,1257346705073680694;
-<make_cleanup,,7759,,1257346705073691284;
-<make_my_cleanup,,7760,,1257346705073706327;
-<make_my_cleanup2,,7761,,1257346705073719286;
-<xmalloc,,7762,,1257346705073733773;
->xmalloc,,1257346705073740581;
->make_my_cleanup2,,1257346705073745258;
->make_my_cleanup,,1257346705073749844;
->make_cleanup,,1257346705073754346;
-<fputs_unfiltered,,7763,,1257346705073764551;
-<null_file_fputs,,7764,,1257346705073777588;
-<mem_file_write,,7765,,1257346705073790646;
-<ui_file_data,,7766,,1257346705073804612;
->ui_file_data,,1257346705073811638;
-<xrealloc,,7767,,1257346705073822314;
->xrealloc,,1257346705073829343;
->mem_file_write,,1257346705073833932;
->null_file_fputs,,1257346705073838491;
->fputs_unfiltered,,1257346705073842082;
-<do_cleanups,,7768,,1257346705073855017;
-<do_my_cleanups,,7769,,1257346705073868803;
-<xfree,,7770,,1257346705073881828;
->xfree,,1257346705073888806;
-<xfree,,7771,,1257346705073898775;
->xfree,,1257346705073905725;
->do_my_cleanups,,1257346705073910263;
->do_cleanups,,1257346705073913725;
->vfprintf_unfiltered,,1257346705073918432;
->fprintf_unfiltered,,1257346705073923057;
-<fprintf_unfiltered,,7772,,1257346705073936043;
-<vfprintf_unfiltered,,7773,,1257346705073950046;
-<xstrvprintf,,7774,,1257346705073964569;
->xstrvprintf,,1257346705073972508;
-<make_cleanup,,7775,,1257346705073983115;
-<make_my_cleanup,,7776,,1257346705073998258;
-<make_my_cleanup2,,7777,,1257346705074011406;
-<xmalloc,,7778,,1257346705074025598;
->xmalloc,,1257346705074032377;
->make_my_cleanup2,,1257346705074037032;
->make_my_cleanup,,1257346705074041649;
->make_cleanup,,1257346705074046091;
-<fputs_unfiltered,,7779,,1257346705074056148;
-<null_file_fputs,,7780,,1257346705074069233;
-<mem_file_write,,7781,,1257346705074082279;
-<ui_file_data,,7782,,1257346705074096291;
->ui_file_data,,1257346705074103325;
-<xrealloc,,7783,,1257346705074113605;
->xrealloc,,1257346705074120561;
->mem_file_write,,1257346705074125159;
->null_file_fputs,,1257346705074129725;
->fputs_unfiltered,,1257346705074133318;
-<do_cleanups,,7784,,1257346705074146064;
-<do_my_cleanups,,7785,,1257346705074159886;
-<xfree,,7786,,1257346705074173058;
->xfree,,1257346705074179909;
-<xfree,,7787,,1257346705074189963;
->xfree,,1257346705074196552;
->do_my_cleanups,,1257346705074201241;
->do_cleanups,,1257346705074204742;
->vfprintf_unfiltered,,1257346705074209385;
->fprintf_unfiltered,,1257346705074214005;
-<fprintf_unfiltered,,7788,,1257346705074227246;
-<vfprintf_unfiltered,,7789,,1257346705074240843;
-<xstrvprintf,,7790,,1257346705074255251;
->xstrvprintf,,1257346705074263029;
-<make_cleanup,,7791,,1257346705074273579;
-<make_my_cleanup,,7792,,1257346705074288628;
-<make_my_cleanup2,,7793,,1257346705074301963;
-<xmalloc,,7794,,1257346705074316245;
->xmalloc,,1257346705074323024;
->make_my_cleanup2,,1257346705074327692;
->make_my_cleanup,,1257346705074332272;
->make_cleanup,,1257346705074336792;
-<fputs_unfiltered,,7795,,1257346705074346855;
-<null_file_fputs,,7796,,1257346705074360343;
-<mem_file_write,,7797,,1257346705074373076;
-<ui_file_data,,7798,,1257346705074387263;
->ui_file_data,,1257346705074394276;
-<xrealloc,,7799,,1257346705074404628;
->xrealloc,,1257346705074411557;
->mem_file_write,,1257346705074416176;
->null_file_fputs,,1257346705074420862;
->fputs_unfiltered,,1257346705074424579;
-<do_cleanups,,7800,,1257346705074437210;
-<do_my_cleanups,,7801,,1257346705074451333;
-<xfree,,7802,,1257346705074464280;
->xfree,,1257346705074471209;
-<xfree,,7803,,1257346705074481615;
->xfree,,1257346705074488393;
->do_my_cleanups,,1257346705074492926;
->do_cleanups,,1257346705074496390;
->vfprintf_unfiltered,,1257346705074501016;
->fprintf_unfiltered,,1257346705074505668;
-<fprintf_unfiltered,,7804,,1257346705074518889;
-<vfprintf_unfiltered,,7805,,1257346705074532380;
-<xstrvprintf,,7806,,1257346705074547053;
->xstrvprintf,,1257346705074554879;
-<make_cleanup,,7807,,1257346705074565405;
-<make_my_cleanup,,7808,,1257346705074580881;
-<make_my_cleanup2,,7809,,1257346705074593849;
-<xmalloc,,7810,,1257346705074612587;
->xmalloc,,1257346705074619922;
->make_my_cleanup2,,1257346705074624602;
->make_my_cleanup,,1257346705074629243;
->make_cleanup,,1257346705074633736;
-<fputs_unfiltered,,7811,,1257346705074643831;
-<null_file_fputs,,7812,,1257346705074656860;
-<mem_file_write,,7813,,1257346705074669753;
-<ui_file_data,,7814,,1257346705074683770;
->ui_file_data,,1257346705074690783;
-<xrealloc,,7815,,1257346705074701030;
->xrealloc,,1257346705074707983;
->mem_file_write,,1257346705074712533;
->null_file_fputs,,1257346705074717084;
->fputs_unfiltered,,1257346705074720677;
-<do_cleanups,,7816,,1257346705074733396;
-<do_my_cleanups,,7817,,1257346705074747594;
-<xfree,,7818,,1257346705074760824;
->xfree,,1257346705074768198;
-<xfree,,7819,,1257346705074778215;
->xfree,,1257346705074784958;
->do_my_cleanups,,1257346705074789466;
->do_cleanups,,1257346705074792961;
->vfprintf_unfiltered,,1257346705074797550;
->fprintf_unfiltered,,1257346705074802200;
-<fprintf_unfiltered,,7820,,1257346705074815117;
-<vfprintf_unfiltered,,7821,,1257346705074829182;
-<xstrvprintf,,7822,,1257346705074843717;
->xstrvprintf,,1257346705074851750;
-<make_cleanup,,7823,,1257346705074862300;
-<make_my_cleanup,,7824,,1257346705074877406;
-<make_my_cleanup2,,7825,,1257346705074890378;
-<xmalloc,,7826,,1257346705074904525;
->xmalloc,,1257346705074911273;
->make_my_cleanup2,,1257346705074916010;
->make_my_cleanup,,1257346705074920623;
->make_cleanup,,1257346705074925110;
-<fputs_unfiltered,,7827,,1257346705074935206;
-<null_file_fputs,,7828,,1257346705074948580;
-<mem_file_write,,7829,,1257346705074961560;
-<ui_file_data,,7830,,1257346705074975515;
->ui_file_data,,1257346705074982579;
-<xrealloc,,7831,,1257346705074992799;
->xrealloc,,1257346705074999698;
->mem_file_write,,1257346705075004248;
->null_file_fputs,,1257346705075008798;
->fputs_unfiltered,,1257346705075012389;
-<do_cleanups,,7832,,1257346705075025032;
-<do_my_cleanups,,7833,,1257346705075038797;
-<xfree,,7834,,1257346705075052075;
->xfree,,1257346705075058971;
-<xfree,,7835,,1257346705075069010;
->xfree,,1257346705075075794;
->do_my_cleanups,,1257346705075080363;
->do_cleanups,,1257346705075083833;
->vfprintf_unfiltered,,1257346705075088495;
->fprintf_unfiltered,,1257346705075093153;
-<ui_file_xstrdup,,7836,,1257346705075103745;
-<ui_file_put,,7837,,1257346705075116843;
-<mem_file_put,,7838,,1257346705075131585;
-<ui_file_data,,7839,,1257346705075145464;
->ui_file_data,,1257346705075152640;
-<do_ui_file_xstrdup,,7840,,1257346705075165419;
-<xmalloc,,7841,,1257346705075179704;
->xmalloc,,1257346705075186585;
->do_ui_file_xstrdup,,1257346705075191391;
->mem_file_put,,1257346705075194973;
->ui_file_put,,1257346705075198437;
->ui_file_xstrdup,,1257346705075202964;
-<ui_file_delete,,7842,,1257346705075215240;
-<mem_file_delete,,7843,,1257346705075230100;
-<ui_file_data,,7844,,1257346705075244746;
->ui_file_data,,1257346705075251762;
-<xfree,,7845,,1257346705075262799;
->xfree,,1257346705075269870;
-<xfree,,7846,,1257346705075279638;
->xfree,,1257346705075286278;
->mem_file_delete,,1257346705075289863;
-<xfree,,7847,,1257346705075299890;
->xfree,,1257346705075306566;
->ui_file_delete,,1257346705075310115;
-<add_setshow_enum_cmd,,7848,,1257346705075323315;
-<add_setshow_cmd_full,,7849,,1257346705075340195;
-<xstrdup,,7850,,1257346705075347116;
-<xmalloc,,7851,,1257346705075362448;
->xmalloc,,1257346705075369395;
->xstrdup,,1257346705075373978;
-<xstrdup,,7852,,1257346705075378432;
-<xmalloc,,7853,,1257346705075390630;
->xmalloc,,1257346705075397370;
->xstrdup,,1257346705075401821;
-<add_set_or_show_cmd,,7854,,1257346705075413520;
-<add_cmd,,7855,,1257346705075426827;
-<xmalloc,,7856,,1257346705075441050;
->xmalloc,,1257346705075447795;
-<delete_cmd,,7857,,1257346705075460147;
-<xfree,,7858,,1257346705075473560;
->xfree,,1257346705075480763;
->delete_cmd,,1257346705075485334;
->add_cmd,,1257346705075490014;
->add_set_or_show_cmd,,1257346705075494594;
-<add_set_or_show_cmd,,7859,,1257346705075506338;
-<add_cmd,,7860,,1257346705075519270;
-<xmalloc,,7861,,1257346705075533546;
->xmalloc,,1257346705075540421;
-<delete_cmd,,7862,,1257346705075552664;
-<xfree,,7863,,1257346705075566661;
->xfree,,1257346705075573798;
->delete_cmd,,1257346705075578303;
->add_cmd,,1257346705075583033;
->add_set_or_show_cmd,,1257346705075587626;
->add_setshow_cmd_full,,1257346705075592341;
->add_setshow_enum_cmd,,1257346705075597081;
-<xfree,,7864,,1257346705075614640;
->xfree,,1257346705079326342;
->add_language,,1257346705079331328;
->_initialize_f_language,,1257346705079336739;
-<_initialize_objc_language,,7865,,1257346705079347030;
-<add_language,,7866,,1257346705079360756;
-<xrealloc,,7867,,1257346705079376927;
->xrealloc,,1257346705079384629;
-<mem_fileopen,,7868,,1257346705079401900;
-<xmalloc,,7869,,1257346705079418838;
->xmalloc,,1257346705079426174;
-<ui_file_new,,7870,,1257346705079440507;
-<xmalloc,,7871,,1257346705079457216;
->xmalloc,,1257346705080338326;
->ui_file_new,,1257346705080343911;
->mem_fileopen,,1257346705080348783;
-<fprintf_unfiltered,,7872,,1257346705080368768;
-<vfprintf_unfiltered,,7873,,1257346705080385835;
-<xstrvprintf,,7874,,1257346705080402448;
->xstrvprintf,,1257346705080411524;
-<make_cleanup,,7875,,1257346705080426597;
-<make_my_cleanup,,7876,,1257346705080445637;
-<make_my_cleanup2,,7877,,1257346705080462259;
-<xmalloc,,7878,,1257346705080477985;
->xmalloc,,1257346705080484899;
->make_my_cleanup2,,1257346705080489829;
->make_my_cleanup,,1257346705080494547;
->make_cleanup,,1257346705080499161;
-<fputs_unfiltered,,7879,,1257346705080513103;
-<null_file_fputs,,7880,,1257346705080529310;
-<mem_file_write,,7881,,1257346705080544687;
-<ui_file_data,,7882,,1257346705080560587;
->ui_file_data,,1257346705080567919;
-<xmalloc,,7883,,1257346705080581074;
->xmalloc,,1257346705080588138;
->mem_file_write,,1257346705080592884;
->null_file_fputs,,1257346705080597521;
->fputs_unfiltered,,1257346705080606471;
-<do_cleanups,,7884,,1257346705080623346;
-<do_my_cleanups,,7885,,1257346705080640443;
-<xfree,,7886,,1257346705080657354;
->xfree,,1257346705080664530;
-<xfree,,7887,,1257346705080678304;
->xfree,,1257346705080685209;
->do_my_cleanups,,1257346705080689750;
->do_cleanups,,1257346705080693311;
->vfprintf_unfiltered,,1257346705080697954;
->fprintf_unfiltered,,1257346705080702835;
-<fprintf_unfiltered,,7888,,1257346705080717764;
-<vfprintf_unfiltered,,7889,,1257346705080732681;
-<xstrvprintf,,7890,,1257346705080748518;
->xstrvprintf,,1257346705080757691;
-<make_cleanup,,7891,,1257346705080771047;
-<make_my_cleanup,,7892,,1257346705080789401;
-<make_my_cleanup2,,7893,,1257346705080805620;
-<xmalloc,,7894,,1257346705080821214;
->xmalloc,,1257346705080828149;
->make_my_cleanup2,,1257346705080832841;
->make_my_cleanup,,1257346705080837451;
->make_cleanup,,1257346705080842007;
-<fputs_unfiltered,,7895,,1257346705080854521;
-<null_file_fputs,,7896,,1257346705080870304;
-<mem_file_write,,7897,,1257346705080884824;
-<ui_file_data,,7898,,1257346705080900321;
->ui_file_data,,1257346705080907440;
-<xrealloc,,7899,,1257346705080919503;
->xrealloc,,1257346705080926829;
->mem_file_write,,1257346705080931448;
->null_file_fputs,,1257346705080936022;
->fputs_unfiltered,,1257346705080939625;
-<do_cleanups,,7900,,1257346705080954728;
-<do_my_cleanups,,7901,,1257346705080970776;
-<xfree,,7902,,1257346705080986980;
->xfree,,1257346705080993979;
-<xfree,,7903,,1257346705081006883;
->xfree,,1257346705081013810;
->do_my_cleanups,,1257346705081018471;
->do_cleanups,,1257346705081021975;
->vfprintf_unfiltered,,1257346705081026742;
->fprintf_unfiltered,,1257346705081031391;
-<fprintf_unfiltered,,7904,,1257346705081045965;
-<vfprintf_unfiltered,,7905,,1257346705081060704;
-<xstrvprintf,,7906,,1257346705081076812;
->xstrvprintf,,1257346705081084881;
-<make_cleanup,,7907,,1257346705081097581;
-<make_my_cleanup,,7908,,1257346705081116035;
-<make_my_cleanup2,,7909,,1257346705081131337;
-<xmalloc,,7910,,1257346705081147029;
->xmalloc,,1257346705081153971;
->make_my_cleanup2,,1257346705081158768;
->make_my_cleanup,,1257346705081163408;
->make_cleanup,,1257346705081167919;
-<fputs_unfiltered,,7911,,1257346705081180830;
-<null_file_fputs,,7912,,1257346705081195984;
-<mem_file_write,,7913,,1257346705081211076;
-<ui_file_data,,7914,,1257346705081226660;
->ui_file_data,,1257346705081233782;
-<xrealloc,,7915,,1257346705081246182;
->xrealloc,,1257346705081253411;
->mem_file_write,,1257346705081258040;
->null_file_fputs,,1257346705081262719;
->fputs_unfiltered,,1257346705081266364;
-<do_cleanups,,7916,,1257346705081281188;
-<do_my_cleanups,,7917,,1257346705081297437;
-<xfree,,7918,,1257346705081313494;
->xfree,,1257346705081320597;
-<xfree,,7919,,1257346705081333556;
->xfree,,1257346705081340470;
->do_my_cleanups,,1257346705081345042;
->do_cleanups,,1257346705081348515;
->vfprintf_unfiltered,,1257346705081353204;
->fprintf_unfiltered,,1257346705081357835;
-<fprintf_unfiltered,,7920,,1257346705081372626;
-<vfprintf_unfiltered,,7921,,1257346705081387353;
-<xstrvprintf,,7922,,1257346705081402998;
->xstrvprintf,,1257346705081410971;
-<make_cleanup,,7923,,1257346705081424197;
-<make_my_cleanup,,7924,,1257346705081442112;
-<make_my_cleanup2,,7925,,1257346705081457721;
-<xmalloc,,7926,,1257346705081473257;
->xmalloc,,1257346705081480162;
->make_my_cleanup2,,1257346705081484836;
->make_my_cleanup,,1257346705081489449;
->make_cleanup,,1257346705081493921;
-<fputs_unfiltered,,7927,,1257346705081506168;
-<null_file_fputs,,7928,,1257346705081521857;
-<mem_file_write,,7929,,1257346705081536350;
-<ui_file_data,,7930,,1257346705081552193;
->ui_file_data,,1257346705081559267;
-<xrealloc,,7931,,1257346705081571098;
->xrealloc,,1257346705081577997;
->mem_file_write,,1257346705081582758;
->null_file_fputs,,1257346705081587347;
->fputs_unfiltered,,1257346705081591034;
-<do_cleanups,,7932,,1257346705081610102;
-<do_my_cleanups,,7933,,1257346705081626387;
-<xfree,,7934,,1257346705081642925;
->xfree,,1257346705081649923;
-<xfree,,7935,,1257346705081662741;
->xfree,,1257346705081669550;
->do_my_cleanups,,1257346705081674142;
->do_cleanups,,1257346705081677642;
->vfprintf_unfiltered,,1257346705081682400;
->fprintf_unfiltered,,1257346705081687122;
-<fprintf_unfiltered,,7936,,1257346705081701302;
-<vfprintf_unfiltered,,7937,,1257346705081716231;
-<xstrvprintf,,7938,,1257346705081731689;
->xstrvprintf,,1257346705081739680;
-<make_cleanup,,7939,,1257346705081752464;
-<make_my_cleanup,,7940,,1257346705081772849;
-<make_my_cleanup2,,7941,,1257346705081787997;
-<xmalloc,,7942,,1257346705081803681;
->xmalloc,,1257346705081810520;
->make_my_cleanup2,,1257346705081815220;
->make_my_cleanup,,1257346705081819846;
->make_cleanup,,1257346705081824351;
-<fputs_unfiltered,,7943,,1257346705081837286;
-<null_file_fputs,,7944,,1257346705081852504;
-<mem_file_write,,7945,,1257346705081867297;
-<ui_file_data,,7946,,1257346705081882785;
->ui_file_data,,1257346705081889847;
-<xrealloc,,7947,,1257346705081901615;
->xrealloc,,1257346705081908583;
->mem_file_write,,1257346705081913175;
->null_file_fputs,,1257346705081917759;
->fputs_unfiltered,,1257346705081921401;
-<do_cleanups,,7948,,1257346705081935981;
-<do_my_cleanups,,7949,,1257346705081951770;
-<xfree,,7950,,1257346705081967911;
->xfree,,1257346705081974867;
-<xfree,,7951,,1257346705081987835;
->xfree,,1257346705081994574;
->do_my_cleanups,,1257346705081999290;
->do_cleanups,,1257346705082002794;
->vfprintf_unfiltered,,1257346705082007542;
->fprintf_unfiltered,,1257346705082012171;
-<fprintf_unfiltered,,7952,,1257346705082026715;
-<vfprintf_unfiltered,,7953,,1257346705082041668;
-<xstrvprintf,,7954,,1257346705082057836;
->xstrvprintf,,1257346705082065745;
-<make_cleanup,,7955,,1257346705082078436;
-<make_my_cleanup,,7956,,1257346705082096132;
-<make_my_cleanup2,,7957,,1257346705082111314;
-<xmalloc,,7958,,1257346705082126850;
->xmalloc,,1257346705082133848;
->make_my_cleanup2,,1257346705082138519;
->make_my_cleanup,,1257346705082143129;
->make_cleanup,,1257346705082147673;
-<fputs_unfiltered,,7959,,1257346705082159902;
-<null_file_fputs,,7960,,1257346705082175441;
-<mem_file_write,,7961,,1257346705082189976;
-<ui_file_data,,7962,,1257346705082207383;
->ui_file_data,,1257346705082214369;
-<xrealloc,,7963,,1257346705082226155;
->xrealloc,,1257346705082233084;
->mem_file_write,,1257346705082237728;
->null_file_fputs,,1257346705082242504;
->fputs_unfiltered,,1257346705082246140;
-<do_cleanups,,7964,,1257346705082260888;
-<do_my_cleanups,,7965,,1257346705082277050;
-<xfree,,7966,,1257346705082292978;
->xfree,,1257346705082300051;
-<xfree,,7967,,1257346705082312754;
->xfree,,1257346705082319611;
->do_my_cleanups,,1257346705082324159;
->do_cleanups,,1257346705082327653;
->vfprintf_unfiltered,,1257346705082332318;
->fprintf_unfiltered,,1257346705082337021;
-<fprintf_unfiltered,,7968,,1257346705082351388;
-<vfprintf_unfiltered,,7969,,1257346705082366247;
-<xstrvprintf,,7970,,1257346705082381742;
->xstrvprintf,,1257346705082389588;
-<make_cleanup,,7971,,1257346705082402565;
-<make_my_cleanup,,7972,,1257346705082420264;
-<make_my_cleanup2,,7973,,1257346705082435891;
-<xmalloc,,7974,,1257346705082451370;
->xmalloc,,1257346705082458214;
->make_my_cleanup2,,1257346705082462981;
->make_my_cleanup,,1257346705082467598;
->make_cleanup,,1257346705082472157;
-<fputs_unfiltered,,7975,,1257346705082484830;
-<null_file_fputs,,7976,,1257346705082500433;
-<mem_file_write,,7977,,1257346705082514866;
-<ui_file_data,,7978,,1257346705082530663;
->ui_file_data,,1257346705082537821;
-<xrealloc,,7979,,1257346705082550025;
->xrealloc,,1257346705082557018;
->mem_file_write,,1257346705082561625;
->null_file_fputs,,1257346705082566211;
->fputs_unfiltered,,1257346705082569847;
-<do_cleanups,,7980,,1257346705082584764;
-<do_my_cleanups,,7981,,1257346705082604697;
-<xfree,,7982,,1257346705082621686;
->xfree,,1257346705082628717;
-<xfree,,7983,,1257346705082641845;
->xfree,,1257346705082648648;
->do_my_cleanups,,1257346705082653153;
->do_cleanups,,1257346705082656623;
->vfprintf_unfiltered,,1257346705082661354;
->fprintf_unfiltered,,1257346705082666031;
-<fprintf_unfiltered,,7984,,1257346705082680857;
-<vfprintf_unfiltered,,7985,,1257346705082695404;
-<xstrvprintf,,7986,,1257346705082711103;
->xstrvprintf,,1257346705082719106;
-<make_cleanup,,7987,,1257346705082732058;
-<make_my_cleanup,,7988,,1257346705082750061;
-<make_my_cleanup2,,7989,,1257346705082765279;
-<xmalloc,,7990,,1257346705082780773;
->xmalloc,,1257346705082787606;
->make_my_cleanup2,,1257346705082792345;
->make_my_cleanup,,1257346705082796938;
->make_cleanup,,1257346705082801464;
-<fputs_unfiltered,,7991,,1257346705082813677;
-<null_file_fputs,,7992,,1257346705082828795;
-<mem_file_write,,7993,,1257346705082843216;
-<ui_file_data,,7994,,1257346705082858831;
->ui_file_data,,1257346705082865910;
-<xrealloc,,7995,,1257346705082877675;
->xrealloc,,1257346705082884679;
->mem_file_write,,1257346705082889272;
->null_file_fputs,,1257346705082893867;
->fputs_unfiltered,,1257346705082897657;
-<do_cleanups,,7996,,1257346705082912155;
-<do_my_cleanups,,7997,,1257346705082928431;
-<xfree,,7998,,1257346705082944473;
->xfree,,1257346705082951448;
-<xfree,,7999,,1257346705082964244;
->xfree,,1257346705082971131;
->do_my_cleanups,,1257346705082975678;
->do_cleanups,,1257346705082979143;
->vfprintf_unfiltered,,1257346705082983747;
->fprintf_unfiltered,,1257346705082988337;
-<ui_file_xstrdup,,8000,,1257346705083002342;
-<ui_file_put,,8001,,1257346705083019581;
-<mem_file_put,,8002,,1257346705083036696;
-<ui_file_data,,8003,,1257346705083052452;
->ui_file_data,,1257346705083059634;
-<do_ui_file_xstrdup,,8004,,1257346705083074851;
-<xmalloc,,8005,,1257346705083090207;
->xmalloc,,1257346705083097082;
->do_ui_file_xstrdup,,1257346705083102014;
->mem_file_put,,1257346705083105749;
->ui_file_put,,1257346705083109217;
->ui_file_xstrdup,,1257346705083113855;
-<ui_file_delete,,8006,,1257346705083128290;
-<mem_file_delete,,8007,,1257346705083145508;
-<ui_file_data,,8008,,1257346705083160840;
->ui_file_data,,1257346705083167895;
-<xfree,,8009,,1257346705083180884;
->xfree,,1257346705083187846;
-<xfree,,8010,,1257346705083199885;
->xfree,,1257346705083206718;
->mem_file_delete,,1257346705083210297;
-<xfree,,8011,,1257346705083222155;
->xfree,,1257346705083228841;
->ui_file_delete,,1257346705083232531;
-<add_setshow_enum_cmd,,8012,,1257346705083247409;
-<add_setshow_cmd_full,,8013,,1257346705083266927;
-<xstrdup,,8014,,1257346705083274397;
-<xmalloc,,8015,,1257346705083289449;
->xmalloc,,1257346705083296228;
->xstrdup,,1257346705083300935;
-<xstrdup,,8016,,1257346705083305530;
-<xmalloc,,8017,,1257346705083318561;
->xmalloc,,1257346705083325301;
->xstrdup,,1257346705083329893;
-<add_set_or_show_cmd,,8018,,1257346705083343643;
-<add_cmd,,8019,,1257346705083357868;
-<xmalloc,,8020,,1257346705083373305;
->xmalloc,,1257346705083380207;
-<delete_cmd,,8021,,1257346705083393181;
-<xfree,,8022,,1257346705083410285;
->xfree,,1257346705083417445;
->delete_cmd,,1257346705083422065;
->add_cmd,,1257346705083426880;
->add_set_or_show_cmd,,1257346705083431592;
-<add_set_or_show_cmd,,8023,,1257346705083444786;
-<add_cmd,,8024,,1257346705083459104;
-<xmalloc,,8025,,1257346705083474165;
->xmalloc,,1257346705083481077;
-<delete_cmd,,8026,,1257346705083493732;
-<xfree,,8027,,1257346705083510408;
->xfree,,1257346705083517313;
->delete_cmd,,1257346705083521809;
->add_cmd,,1257346705083526456;
->add_set_or_show_cmd,,1257346705083531129;
->add_setshow_cmd_full,,1257346705083535902;
->add_setshow_enum_cmd,,1257346705083540630;
-<xfree,,8028,,1257346705083552831;
->xfree,,1257346705083559781;
->add_language,,1257346705083563366;
-<add_info,,8029,,1257346705083576201;
-<add_cmd,,8030,,1257346705083590691;
-<xmalloc,,8031,,1257346705083610044;
->xmalloc,,1257346705083617431;
-<delete_cmd,,8032,,1257346705083629713;
->delete_cmd,,1257346705083640753;
->add_cmd,,1257346705083645351;
->add_info,,1257346705083649908;
-<add_info,,8033,,1257346705083662193;
-<add_cmd,,8034,,1257346705083676488;
-<xmalloc,,8035,,1257346705083691672;
->xmalloc,,1257346705083698544;
-<delete_cmd,,8036,,1257346705083711506;
->delete_cmd,,1257346705083718928;
->add_cmd,,1257346705083723433;
->add_info,,1257346705083727809;
-<add_com,,8037,,1257346705083743592;
-<add_cmd,,8038,,1257346705083757893;
-<xmalloc,,8039,,1257346705083772878;
->xmalloc,,1257346705083779898;
-<delete_cmd,,8040,,1257346705083792048;
->delete_cmd,,1257346705083810517;
->add_cmd,,1257346705083815313;
->add_com,,1257346705083819818;
-<add_com_alias,,8041,,1257346705083831950;
-<add_alias_cmd,,8042,,1257346705083847872;
-<lookup_cmd,,8043,,1257346705083864482;
-<lookup_cmd_1,,8044,,1257346705083878445;
-<find_command_name_length,,8045,,1257346705083894532;
->find_command_name_length,,1257346705083902381;
-<find_cmd,,8046,,1257346705083913713;
->find_cmd,,1257346705083921641;
->lookup_cmd_1,,1257346705083926348;
->lookup_cmd,,1257346705083930832;
-<add_cmd,,8047,,1257346705083941875;
-<xmalloc,,8048,,1257346705083956654;
->xmalloc,,1257346705083963586;
-<delete_cmd,,8049,,1257346705083975597;
->delete_cmd,,1257346705083983711;
->add_cmd,,1257346705083988406;
->add_alias_cmd,,1257346705083993074;
->add_com_alias,,1257346705083997843;
->_initialize_objc_language,,1257346705084002854;
-<_initialize_objc_lang,,8050,,1257346705084012664;
-<register_objfile_data,,8051,,1257346705084031138;
-<register_objfile_data_with_cleanup,,8052,,1257346705084047493;
-<xmalloc,,8053,,1257346705084062999;
->xmalloc,,1257346705084069859;
-<xmalloc,,8054,,1257346705084080021;
->xmalloc,,1257346705084086734;
->register_objfile_data_with_cleanup,,1257346705084092129;
->register_objfile_data,,1257346705084097185;
->_initialize_objc_lang,,1257346705084102150;
-<_initialize_tasks,,8055,,1257346705084111443;
-<observer_attach_normal_stop,,8056,,1257346705084129502;
-<generic_observer_attach,,8057,,1257346705084149827;
-<xmalloc,,8058,,1257346705084165008;
->xmalloc,,1257346705084171964;
-<xmalloc,,8059,,1257346705084182560;
->xmalloc,,1257346705084189416;
->generic_observer_attach,,1257346705084194622;
->observer_attach_normal_stop,,1257346705084198718;
-<observer_attach_new_objfile,,8060,,1257346705084213632;
-<generic_observer_attach,,8061,,1257346705084231767;
-<xmalloc,,8062,,1257346705084246801;
->xmalloc,,1257346705084253700;
-<xmalloc,,8063,,1257346705084263643;
->xmalloc,,1257346705084270419;
->generic_observer_attach,,1257346705084275257;
->observer_attach_new_objfile,,1257346705084279396;
-<add_info,,8064,,1257346705084291365;
-<add_cmd,,8065,,1257346705084304923;
-<xmalloc,,8066,,1257346705084319680;
->xmalloc,,1257346705084326522;
-<delete_cmd,,8067,,1257346705084338928;
->delete_cmd,,1257346705084346561;
->add_cmd,,1257346705084351156;
->add_info,,1257346705084355598;
-<add_cmd,,8068,,1257346705084367357;
-<xmalloc,,8069,,1257346705084382550;
->xmalloc,,1257346705084395107;
-<delete_cmd,,8070,,1257346705084407073;
->delete_cmd,,1257346705084415377;
->add_cmd,,1257346705084420297;
->_initialize_tasks,,1257346705084425256;
-<_initialize_ui_out,,8071,,1257346705084433598;
->_initialize_ui_out,,1257346705084442759;
-<_initialize_cli_out,,8072,,1257346705084450085;
->_initialize_cli_out,,1257346705084458623;
-<_initialize_varobj,,8073,,1257346705084467339;
-<xmalloc,,8074,,1257346705084483329;
->xmalloc,,1257346705084491509;
-<add_setshow_zinteger_cmd,,8075,,1257346705084506553;
-<add_setshow_cmd_full,,8076,,1257346705084523247;
-<xstrprintf,,8077,,1257346705084538850;
-<xstrvprintf,,8078,,1257346705084553941;
->xstrvprintf,,1257346705084562007;
->xstrprintf,,1257346705084566803;
-<xstrprintf,,8079,,1257346705084579979;
-<xstrvprintf,,8080,,1257346705084595115;
->xstrvprintf,,1257346705084606951;
->xstrprintf,,1257346705084611796;
-<add_set_or_show_cmd,,8081,,1257346705084623621;
-<add_cmd,,8082,,1257346705084636674;
-<xmalloc,,8083,,1257346705084651714;
->xmalloc,,1257346705084658480;
-<delete_cmd,,8084,,1257346705084670221;
->delete_cmd,,1257346705084680838;
->add_cmd,,1257346705084685397;
->add_set_or_show_cmd,,1257346705084690044;
-<add_set_or_show_cmd,,8085,,1257346705084701673;
-<add_cmd,,8086,,1257346705084714449;
-<xmalloc,,8087,,1257346705084729071;
->xmalloc,,1257346705084735955;
-<delete_cmd,,8088,,1257346705084747870;
->delete_cmd,,1257346705084758507;
->add_cmd,,1257346705084763025;
->add_set_or_show_cmd,,1257346705084767716;
->add_setshow_cmd_full,,1257346705084772468;
->add_setshow_zinteger_cmd,,1257346705084776285;
->_initialize_varobj,,1257346705084781379;
-<_initialize_java_language,,8089,,1257346705084789030;
-<gdbarch_data_register_post_init,,8090,,1257346705084802197;
-<gdbarch_data_register,,8091,,1257346705084812695;
-<xmalloc,,8092,,1257346705084827561;
->xmalloc,,1257346705084834520;
-<xmalloc,,8093,,1257346705084844619;
->xmalloc,,1257346705084851308;
->gdbarch_data_register,,1257346705084856342;
->gdbarch_data_register_post_init,,1257346705084860553;
-<add_language,,8094,,1257346705084868988;
-<xrealloc,,8095,,1257346705084882420;
->xrealloc,,1257346705084889616;
-<mem_fileopen,,8096,,1257346705084903854;
-<xmalloc,,8097,,1257346705084918554;
->xmalloc,,1257346705084925360;
-<ui_file_new,,8098,,1257346705084937558;
-<xmalloc,,8099,,1257346705084952378;
->xmalloc,,1257346705084959208;
->ui_file_new,,1257346705084963726;
->mem_fileopen,,1257346705084968294;
-<fprintf_unfiltered,,8100,,1257346705084982329;
-<vfprintf_unfiltered,,8101,,1257346705084997424;
-<xstrvprintf,,8102,,1257346705085012259;
->xstrvprintf,,1257346705085020361;
-<make_cleanup,,8103,,1257346705085031847;
-<make_my_cleanup,,8104,,1257346705085047903;
-<make_my_cleanup2,,8105,,1257346705085062228;
-<xmalloc,,8106,,1257346705085076949;
->xmalloc,,1257346705085083797;
->make_my_cleanup2,,1257346705085088558;
->make_my_cleanup,,1257346705085093174;
->make_cleanup,,1257346705085097673;
-<fputs_unfiltered,,8107,,1257346705085108383;
-<null_file_fputs,,8108,,1257346705085122271;
-<mem_file_write,,8109,,1257346705085135699;
-<ui_file_data,,8110,,1257346705085150367;
->ui_file_data,,1257346705085157548;
-<xmalloc,,8111,,1257346705085169845;
->xmalloc,,1257346705085176799;
->mem_file_write,,1257346705085181433;
->null_file_fputs,,1257346705085186019;
->fputs_unfiltered,,1257346705085189656;
-<do_cleanups,,8112,,1257346705085202897;
-<do_my_cleanups,,8113,,1257346705085217492;
-<xfree,,8114,,1257346705085231185;
->xfree,,1257346705085238096;
-<xfree,,8115,,1257346705085249209;
->xfree,,1257346705085255933;
->do_my_cleanups,,1257346705085260456;
->do_cleanups,,1257346705085263948;
->vfprintf_unfiltered,,1257346705085268621;
->fprintf_unfiltered,,1257346705085273205;
-<fprintf_unfiltered,,8116,,1257346705085286275;
-<vfprintf_unfiltered,,8117,,1257346705085299833;
-<xstrvprintf,,8118,,1257346705085314644;
->xstrvprintf,,1257346705085322803;
-<make_cleanup,,8119,,1257346705085334343;
-<make_my_cleanup,,8120,,1257346705085350039;
-<make_my_cleanup2,,8121,,1257346705085364092;
-<xmalloc,,8122,,1257346705085378793;
->xmalloc,,1257346705085385644;
->make_my_cleanup2,,1257346705085390293;
->make_my_cleanup,,1257346705085394909;
->make_cleanup,,1257346705085399463;
-<fputs_unfiltered,,8123,,1257346705085410091;
-<null_file_fputs,,8124,,1257346705085424430;
-<mem_file_write,,8125,,1257346705085437705;
-<ui_file_data,,8126,,1257346705085452084;
->ui_file_data,,1257346705085459211;
-<xrealloc,,8127,,1257346705085469885;
->xrealloc,,1257346705085476826;
->mem_file_write,,1257346705085481424;
->null_file_fputs,,1257346705085486028;
->fputs_unfiltered,,1257346705085489695;
-<do_cleanups,,8128,,1257346705085502933;
-<do_my_cleanups,,8129,,1257346705085517474;
-<xfree,,8130,,1257346705085531342;
->xfree,,1257346705085538211;
-<xfree,,8131,,1257346705085549323;
->xfree,,1257346705085556057;
->do_my_cleanups,,1257346705085560568;
->do_cleanups,,1257346705085564035;
->vfprintf_unfiltered,,1257346705085568727;
->fprintf_unfiltered,,1257346705085573313;
-<fprintf_unfiltered,,8132,,1257346705085586432;
-<vfprintf_unfiltered,,8133,,1257346705085599830;
-<xstrvprintf,,8134,,1257346705085619676;
->xstrvprintf,,1257346705085627935;
-<make_cleanup,,8135,,1257346705085639444;
-<make_my_cleanup,,8136,,1257346705085655185;
-<make_my_cleanup2,,8137,,1257346705085669137;
-<xmalloc,,8138,,1257346705085684321;
->xmalloc,,1257346705085691220;
->make_my_cleanup2,,1257346705085696002;
->make_my_cleanup,,1257346705085700660;
->make_cleanup,,1257346705085705247;
-<fputs_unfiltered,,8139,,1257346705085716218;
-<null_file_fputs,,8140,,1257346705085730326;
-<mem_file_write,,8141,,1257346705085745231;
-<ui_file_data,,8142,,1257346705085760153;
->ui_file_data,,1257346705085767416;
-<xrealloc,,8143,,1257346705085778935;
->xrealloc,,1257346705085786011;
->mem_file_write,,1257346705085790631;
->null_file_fputs,,1257346705085795232;
->fputs_unfiltered,,1257346705085798871;
-<do_cleanups,,8144,,1257346705085812044;
-<do_my_cleanups,,8145,,1257346705085826650;
-<xfree,,8146,,1257346705085840419;
->xfree,,1257346705085847303;
-<xfree,,8147,,1257346705085858204;
->xfree,,1257346705085864950;
->do_my_cleanups,,1257346705085869582;
->do_cleanups,,1257346705085873088;
->vfprintf_unfiltered,,1257346705085877708;
->fprintf_unfiltered,,1257346705085882291;
-<fprintf_unfiltered,,8148,,1257346705085895767;
-<vfprintf_unfiltered,,8149,,1257346705085909232;
-<xstrvprintf,,8150,,1257346705085924064;
->xstrvprintf,,1257346705085932046;
-<make_cleanup,,8151,,1257346705085943477;
-<make_my_cleanup,,8152,,1257346705085959498;
-<make_my_cleanup2,,8153,,1257346705085973431;
-<xmalloc,,8154,,1257346705085988240;
->xmalloc,,1257346705085995022;
->make_my_cleanup2,,1257346705085999761;
->make_my_cleanup,,1257346705086004468;
->make_cleanup,,1257346705086009030;
-<fputs_unfiltered,,8155,,1257346705086019649;
-<null_file_fputs,,8156,,1257346705086033525;
-<mem_file_write,,8157,,1257346705086046740;
-<ui_file_data,,8158,,1257346705086061152;
->ui_file_data,,1257346705086068255;
-<xrealloc,,8159,,1257346705086078935;
->xrealloc,,1257346705086085930;
->mem_file_write,,1257346705086090516;
->null_file_fputs,,1257346705086095103;
->fputs_unfiltered,,1257346705086098739;
-<do_cleanups,,8160,,1257346705086111926;
-<do_my_cleanups,,8161,,1257346705086126699;
-<xfree,,8162,,1257346705086140500;
->xfree,,1257346705086147378;
-<xfree,,8163,,1257346705086158244;
->xfree,,1257346705086165007;
->do_my_cleanups,,1257346705086169519;
->do_cleanups,,1257346705086172986;
->vfprintf_unfiltered,,1257346705086177596;
->fprintf_unfiltered,,1257346705086182270;
-<fprintf_unfiltered,,8164,,1257346705086195394;
-<vfprintf_unfiltered,,8165,,1257346705086208931;
-<xstrvprintf,,8166,,1257346705086223881;
->xstrvprintf,,1257346705086231826;
-<make_cleanup,,8167,,1257346705086243648;
-<make_my_cleanup,,8168,,1257346705086259251;
-<make_my_cleanup2,,8169,,1257346705086273518;
-<xmalloc,,8170,,1257346705086288216;
->xmalloc,,1257346705086295082;
->make_my_cleanup2,,1257346705086299737;
->make_my_cleanup,,1257346705086304348;
->make_cleanup,,1257346705086308837;
-<fputs_unfiltered,,8171,,1257346705086319382;
-<null_file_fputs,,8172,,1257346705086333426;
-<mem_file_write,,8173,,1257346705086346758;
-<ui_file_data,,8174,,1257346705086361134;
->ui_file_data,,1257346705086368162;
-<xrealloc,,8175,,1257346705086378932;
->xrealloc,,1257346705086385837;
->mem_file_write,,1257346705086390565;
->null_file_fputs,,1257346705086395160;
->fputs_unfiltered,,1257346705086398889;
-<do_cleanups,,8176,,1257346705086412435;
-<do_my_cleanups,,8177,,1257346705086427360;
-<xfree,,8178,,1257346705086441174;
->xfree,,1257346705086448142;
-<xfree,,8179,,1257346705086459125;
->xfree,,1257346705086465988;
->do_my_cleanups,,1257346705086470559;
->do_cleanups,,1257346705086474060;
->vfprintf_unfiltered,,1257346705086478790;
->fprintf_unfiltered,,1257346705086483410;
-<fprintf_unfiltered,,8180,,1257346705086497163;
-<vfprintf_unfiltered,,8181,,1257346705086510480;
-<xstrvprintf,,8182,,1257346705086525436;
->xstrvprintf,,1257346705086533375;
-<make_cleanup,,8183,,1257346705086544906;
-<make_my_cleanup,,8184,,1257346705086560893;
-<make_my_cleanup2,,8185,,1257346705086574709;
-<xmalloc,,8186,,1257346705086589587;
->xmalloc,,1257346705086596453;
->make_my_cleanup2,,1257346705086605106;
->make_my_cleanup,,1257346705086610023;
->make_cleanup,,1257346705086614549;
-<fputs_unfiltered,,8187,,1257346705086625328;
-<null_file_fputs,,8188,,1257346705086639562;
-<mem_file_write,,8189,,1257346705086653243;
-<ui_file_data,,8190,,1257346705086667631;
->ui_file_data,,1257346705086674749;
-<xrealloc,,8191,,1257346705086685588;
->xrealloc,,1257346705086692547;
->mem_file_write,,1257346705086697239;
->null_file_fputs,,1257346705086701819;
->fputs_unfiltered,,1257346705086705461;
-<do_cleanups,,8192,,1257346705086718808;
-<do_my_cleanups,,8193,,1257346705086733517;
-<xfree,,8194,,1257346705086747402;
->xfree,,1257346705086754335;
-<xfree,,8195,,1257346705086765146;
->xfree,,1257346705086771850;
->do_my_cleanups,,1257346705086776394;
->do_cleanups,,1257346705086779889;
->vfprintf_unfiltered,,1257346705086784622;
->fprintf_unfiltered,,1257346705086789290;
-<fprintf_unfiltered,,8196,,1257346705086802478;
-<vfprintf_unfiltered,,8197,,1257346705086816068;
-<xstrvprintf,,8198,,1257346705086831117;
->xstrvprintf,,1257346705086839126;
-<make_cleanup,,8199,,1257346705086850603;
-<make_my_cleanup,,8200,,1257346705086866563;
-<make_my_cleanup2,,8201,,1257346705086880484;
-<xmalloc,,8202,,1257346705086895260;
->xmalloc,,1257346705086902135;
->make_my_cleanup2,,1257346705086906811;
->make_my_cleanup,,1257346705086911419;
->make_cleanup,,1257346705086915852;
-<fputs_unfiltered,,8203,,1257346705086926356;
-<null_file_fputs,,8204,,1257346705086940353;
-<mem_file_write,,8205,,1257346705086953532;
-<ui_file_data,,8206,,1257346705086967964;
->ui_file_data,,1257346705086975278;
-<xrealloc,,8207,,1257346705086986042;
->xrealloc,,1257346705086993034;
->mem_file_write,,1257346705086997651;
->null_file_fputs,,1257346705087002216;
->fputs_unfiltered,,1257346705087005816;
-<do_cleanups,,8208,,1257346705087019361;
-<do_my_cleanups,,8209,,1257346705087035162;
-<xfree,,8210,,1257346705087049177;
->xfree,,1257346705087056097;
-<xfree,,8211,,1257346705087067008;
->xfree,,1257346705087073793;
->do_my_cleanups,,1257346705087078340;
->do_cleanups,,1257346705087081844;
->vfprintf_unfiltered,,1257346705087086559;
->fprintf_unfiltered,,1257346705087091143;
-<fprintf_unfiltered,,8212,,1257346705087104345;
-<vfprintf_unfiltered,,8213,,1257346705087118216;
-<xstrvprintf,,8214,,1257346705087133123;
->xstrvprintf,,1257346705087141171;
-<make_cleanup,,8215,,1257346705087153050;
-<make_my_cleanup,,8216,,1257346705087168647;
-<make_my_cleanup2,,8217,,1257346705087182589;
-<xmalloc,,8218,,1257346705087197350;
->xmalloc,,1257346705087204237;
->make_my_cleanup2,,1257346705087208914;
->make_my_cleanup,,1257346705087213503;
->make_cleanup,,1257346705087218110;
-<fputs_unfiltered,,8219,,1257346705087228651;
-<null_file_fputs,,8220,,1257346705087242861;
-<mem_file_write,,8221,,1257346705087256211;
-<ui_file_data,,8222,,1257346705087270749;
->ui_file_data,,1257346705087277838;
-<xrealloc,,8223,,1257346705087288634;
->xrealloc,,1257346705087295536;
->mem_file_write,,1257346705087300270;
->null_file_fputs,,1257346705087304947;
->fputs_unfiltered,,1257346705087308583;
-<do_cleanups,,8224,,1257346705087321836;
-<do_my_cleanups,,8225,,1257346705087336768;
-<xfree,,8226,,1257346705087350663;
->xfree,,1257346705087357646;
-<xfree,,8227,,1257346705087368671;
->xfree,,1257346705087375402;
->do_my_cleanups,,1257346705087380006;
->do_cleanups,,1257346705087383510;
->vfprintf_unfiltered,,1257346705087388174;
->fprintf_unfiltered,,1257346705087392803;
-<fprintf_unfiltered,,8228,,1257346705087406204;
-<vfprintf_unfiltered,,8229,,1257346705087419915;
-<xstrvprintf,,8230,,1257346705087435385;
->xstrvprintf,,1257346705087443291;
-<make_cleanup,,8231,,1257346705087454735;
-<make_my_cleanup,,8232,,1257346705087470608;
-<make_my_cleanup2,,8233,,1257346705087484577;
-<xmalloc,,8234,,1257346705087499425;
->xmalloc,,1257346705087506303;
->make_my_cleanup2,,1257346705087510980;
->make_my_cleanup,,1257346705087515584;
->make_cleanup,,1257346705087520077;
-<fputs_unfiltered,,8235,,1257346705087530600;
-<null_file_fputs,,8236,,1257346705087544476;
-<mem_file_write,,8237,,1257346705087557700;
-<ui_file_data,,8238,,1257346705087572202;
->ui_file_data,,1257346705087579230;
-<xrealloc,,8239,,1257346705087590316;
->xrealloc,,1257346705087597239;
->mem_file_write,,1257346705087605871;
->null_file_fputs,,1257346705087610686;
->fputs_unfiltered,,1257346705087614422;
-<do_cleanups,,8240,,1257346705087627588;
-<do_my_cleanups,,8241,,1257346705087642367;
-<xfree,,8242,,1257346705087656556;
->xfree,,1257346705087663461;
-<xfree,,8243,,1257346705087674342;
->xfree,,1257346705087681012;
->do_my_cleanups,,1257346705087685526;
->do_cleanups,,1257346705087688985;
->vfprintf_unfiltered,,1257346705087693667;
->fprintf_unfiltered,,1257346705087698323;
-<ui_file_xstrdup,,8244,,1257346705087709913;
-<ui_file_put,,8245,,1257346705087723865;
-<mem_file_put,,8246,,1257346705087739344;
-<ui_file_data,,8247,,1257346705087753795;
->ui_file_data,,1257346705087761016;
-<do_ui_file_xstrdup,,8248,,1257346705087773728;
-<xmalloc,,8249,,1257346705087788564;
->xmalloc,,1257346705087795490;
->do_ui_file_xstrdup,,1257346705087800301;
->mem_file_put,,1257346705087803874;
->ui_file_put,,1257346705087807360;
->ui_file_xstrdup,,1257346705087811925;
-<ui_file_delete,,8250,,1257346705087824502;
-<mem_file_delete,,8251,,1257346705087839792;
-<ui_file_data,,8252,,1257346705087854507;
->ui_file_data,,1257346705087861569;
-<xfree,,8253,,1257346705087873147;
->xfree,,1257346705087880071;
-<xfree,,8254,,1257346705087890669;
->xfree,,1257346705087897318;
->mem_file_delete,,1257346705087900924;
-<xfree,,8255,,1257346705087911528;
->xfree,,1257346705087918172;
->ui_file_delete,,1257346705087921699;
-<add_setshow_enum_cmd,,8256,,1257346705087934746;
-<add_setshow_cmd_full,,8257,,1257346705087951317;
-<xstrdup,,8258,,1257346705087958417;
-<xmalloc,,8259,,1257346705087972949;
->xmalloc,,1257346705087979767;
->xstrdup,,1257346705087984269;
-<xstrdup,,8260,,1257346705087988753;
-<xmalloc,,8261,,1257346705088001240;
->xmalloc,,1257346705088008025;
->xstrdup,,1257346705088012533;
-<add_set_or_show_cmd,,8262,,1257346705088024490;
-<add_cmd,,8263,,1257346705088037507;
-<xmalloc,,8264,,1257346705088052390;
->xmalloc,,1257346705088059139;
-<delete_cmd,,8265,,1257346705088070880;
-<xfree,,8266,,1257346705088085472;
->xfree,,1257346705088092726;
->delete_cmd,,1257346705088097276;
->add_cmd,,1257346705088101920;
->add_set_or_show_cmd,,1257346705088106575;
-<add_set_or_show_cmd,,8267,,1257346705088118331;
-<add_cmd,,8268,,1257346705088131200;
-<xmalloc,,8269,,1257346705088146105;
->xmalloc,,1257346705088152796;
-<delete_cmd,,8270,,1257346705088164363;
-<xfree,,8271,,1257346705088178828;
->xfree,,1257346705088185709;
->delete_cmd,,1257346705088190263;
->add_cmd,,1257346705088194924;
->add_set_or_show_cmd,,1257346705088199520;
->add_setshow_cmd_full,,1257346705088204217;
->add_setshow_enum_cmd,,1257346705088208897;
-<xfree,,8272,,1257346705088219760;
->xfree,,1257346705088226740;
->add_language,,1257346705088230243;
->_initialize_java_language,,1257346705088235290;
-<_initialize_m2_language,,8273,,1257346705088243121;
-<gdbarch_data_register_post_init,,8274,,1257346705088255407;
-<gdbarch_data_register,,8275,,1257346705088266083;
-<xmalloc,,8276,,1257346705088281159;
->xmalloc,,1257346705088288094;
-<xmalloc,,8277,,1257346705088298239;
->xmalloc,,1257346705088304906;
->gdbarch_data_register,,1257346705088309609;
->gdbarch_data_register_post_init,,1257346705088313643;
-<add_language,,8278,,1257346705088321751;
-<xrealloc,,8279,,1257346705088334965;
->xrealloc,,1257346705088341894;
-<mem_fileopen,,8280,,1257346705088356008;
-<xmalloc,,8281,,1257346705088370871;
->xmalloc,,1257346705088377662;
-<ui_file_new,,8282,,1257346705088389664;
-<xmalloc,,8283,,1257346705088404722;
->xmalloc,,1257346705088411585;
->ui_file_new,,1257346705088416100;
->mem_fileopen,,1257346705088420638;
-<fprintf_unfiltered,,8284,,1257346705088435161;
-<vfprintf_unfiltered,,8285,,1257346705088449079;
-<xstrvprintf,,8286,,1257346705088464387;
->xstrvprintf,,1257346705088472399;
-<make_cleanup,,8287,,1257346705088483839;
-<make_my_cleanup,,8288,,1257346705088499712;
-<make_my_cleanup2,,8289,,1257346705088513712;
-<xmalloc,,8290,,1257346705088528923;
->xmalloc,,1257346705088536015;
->make_my_cleanup2,,1257346705088540706;
->make_my_cleanup,,1257346705088545299;
->make_cleanup,,1257346705088549816;
-<fputs_unfiltered,,8291,,1257346705088560919;
-<null_file_fputs,,8292,,1257346705088576826;
-<mem_file_write,,8293,,1257346705088590663;
-<ui_file_data,,8294,,1257346705088613663;
->ui_file_data,,1257346705088624321;
-<xmalloc,,8295,,1257346705088637578;
->xmalloc,,1257346705088644670;
->mem_file_write,,1257346705088649325;
->null_file_fputs,,1257346705088653926;
->fputs_unfiltered,,1257346705088657532;
-<do_cleanups,,8296,,1257346705088672193;
-<do_my_cleanups,,8297,,1257346705088687856;
-<xfree,,8298,,1257346705088702776;
->xfree,,1257346705088709780;
-<xfree,,8299,,1257346705088721221;
->xfree,,1257346705088727984;
->do_my_cleanups,,1257346705088732532;
->do_cleanups,,1257346705088736062;
->vfprintf_unfiltered,,1257346705088740721;
->fprintf_unfiltered,,1257346705088745358;
-<fprintf_unfiltered,,8300,,1257346705088759174;
-<vfprintf_unfiltered,,8301,,1257346705088773601;
-<xstrvprintf,,8302,,1257346705088789742;
->xstrvprintf,,1257346705088798094;
-<make_cleanup,,8303,,1257346705088810216;
-<make_my_cleanup,,8304,,1257346705088826739;
-<make_my_cleanup2,,8305,,1257346705088841770;
-<xmalloc,,8306,,1257346705088857210;
->xmalloc,,1257346705088864152;
->make_my_cleanup2,,1257346705088868822;
->make_my_cleanup,,1257346705088873433;
->make_cleanup,,1257346705088877890;
-<fputs_unfiltered,,8307,,1257346705088888744;
-<null_file_fputs,,8308,,1257346705088903811;
-<mem_file_write,,8309,,1257346705088917533;
-<ui_file_data,,8310,,1257346705088932980;
->ui_file_data,,1257346705088940068;
-<xrealloc,,8311,,1257346705088951166;
->xrealloc,,1257346705088958603;
->mem_file_write,,1257346705088963409;
->null_file_fputs,,1257346705088968010;
->fputs_unfiltered,,1257346705088971773;
-<do_cleanups,,8312,,1257346705088986187;
-<do_my_cleanups,,8313,,1257346705089001787;
-<xfree,,8314,,1257346705089016343;
->xfree,,1257346705089023308;
-<xfree,,8315,,1257346705089034294;
->xfree,,1257346705089040952;
->do_my_cleanups,,1257346705089045491;
->do_cleanups,,1257346705089048946;
->vfprintf_unfiltered,,1257346705089053650;
->fprintf_unfiltered,,1257346705089058308;
-<fprintf_unfiltered,,8316,,1257346705089071297;
-<vfprintf_unfiltered,,8317,,1257346705089085156;
-<xstrvprintf,,8318,,1257346705089100000;
->xstrvprintf,,1257346705089107982;
-<make_cleanup,,8319,,1257346705089120376;
-<make_my_cleanup,,8320,,1257346705089136008;
-<make_my_cleanup2,,8321,,1257346705089150282;
-<xmalloc,,8322,,1257346705089164961;
->xmalloc,,1257346705089171739;
->make_my_cleanup2,,1257346705089176371;
->make_my_cleanup,,1257346705089180960;
->make_cleanup,,1257346705089185507;
-<fputs_unfiltered,,8323,,1257346705089196031;
-<null_file_fputs,,8324,,1257346705089210126;
-<mem_file_write,,8325,,1257346705089223245;
-<ui_file_data,,8326,,1257346705089237786;
->ui_file_data,,1257346705089244775;
-<xrealloc,,8327,,1257346705089255496;
->xrealloc,,1257346705089262516;
->mem_file_write,,1257346705089267114;
->null_file_fputs,,1257346705089271721;
->fputs_unfiltered,,1257346705089275318;
-<do_cleanups,,8328,,1257346705089288629;
-<do_my_cleanups,,8329,,1257346705089303356;
-<xfree,,8330,,1257346705089317092;
->xfree,,1257346705089323951;
-<xfree,,8331,,1257346705089334926;
->xfree,,1257346705089341584;
->do_my_cleanups,,1257346705089346113;
->do_cleanups,,1257346705089349575;
->vfprintf_unfiltered,,1257346705089354266;
->fprintf_unfiltered,,1257346705089358831;
-<fprintf_unfiltered,,8332,,1257346705089372287;
-<vfprintf_unfiltered,,8333,,1257346705089386016;
-<xstrvprintf,,8334,,1257346705089401197;
->xstrvprintf,,1257346705089409374;
-<make_cleanup,,8335,,1257346705089420833;
-<make_my_cleanup,,8336,,1257346705089436995;
-<make_my_cleanup2,,8337,,1257346705089450973;
-<xmalloc,,8338,,1257346705089466774;
->xmalloc,,1257346705089473628;
->make_my_cleanup2,,1257346705089478299;
->make_my_cleanup,,1257346705089482975;
->make_cleanup,,1257346705089487462;
-<fputs_unfiltered,,8339,,1257346705089498057;
-<null_file_fputs,,8340,,1257346705089512240;
-<mem_file_write,,8341,,1257346705089525657;
-<ui_file_data,,8342,,1257346705089540294;
->ui_file_data,,1257346705089547349;
-<xrealloc,,8343,,1257346705089558489;
->xrealloc,,1257346705089565538;
->mem_file_write,,1257346705089570139;
->null_file_fputs,,1257346705089574705;
->fputs_unfiltered,,1257346705089578299;
-<do_cleanups,,8344,,1257346705089592380;
-<do_my_cleanups,,8345,,1257346705089611229;
-<xfree,,8346,,1257346705089625478;
->xfree,,1257346705089632389;
-<xfree,,8347,,1257346705089643345;
->xfree,,1257346705089650103;
->do_my_cleanups,,1257346705089654650;
->do_cleanups,,1257346705089658157;
->vfprintf_unfiltered,,1257346705089662878;
->fprintf_unfiltered,,1257346705089667510;
-<fprintf_unfiltered,,8348,,1257346705089680746;
-<vfprintf_unfiltered,,8349,,1257346705089694435;
-<xstrvprintf,,8350,,1257346705089709719;
->xstrvprintf,,1257346705089717812;
-<make_cleanup,,8351,,1257346705089729391;
-<make_my_cleanup,,8352,,1257346705089745859;
-<make_my_cleanup2,,8353,,1257346705089760253;
-<xmalloc,,8354,,1257346705089775398;
->xmalloc,,1257346705089782234;
->make_my_cleanup2,,1257346705089786896;
->make_my_cleanup,,1257346705089791500;
->make_cleanup,,1257346705089795951;
-<fputs_unfiltered,,8355,,1257346705089807211;
-<null_file_fputs,,8356,,1257346705089821463;
-<mem_file_write,,8357,,1257346705089835111;
-<ui_file_data,,8358,,1257346705089849634;
->ui_file_data,,1257346705089856824;
-<xrealloc,,8359,,1257346705089867841;
->xrealloc,,1257346705089874878;
->mem_file_write,,1257346705089879521;
->null_file_fputs,,1257346705089884111;
->fputs_unfiltered,,1257346705089887837;
-<do_cleanups,,8360,,1257346705089901749;
-<do_my_cleanups,,8361,,1257346705089916444;
-<xfree,,8362,,1257346705089930756;
->xfree,,1257346705089937652;
-<xfree,,8363,,1257346705089948554;
->xfree,,1257346705089955252;
->do_my_cleanups,,1257346705089960027;
->do_cleanups,,1257346705089963624;
->vfprintf_unfiltered,,1257346705089968244;
->fprintf_unfiltered,,1257346705089972971;
-<fprintf_unfiltered,,8364,,1257346705089986706;
-<vfprintf_unfiltered,,8365,,1257346705090000610;
-<xstrvprintf,,8366,,1257346705090015499;
->xstrvprintf,,1257346705090023454;
-<make_cleanup,,8367,,1257346705090035499;
-<make_my_cleanup,,8368,,1257346705090051146;
-<make_my_cleanup2,,8369,,1257346705090065308;
-<xmalloc,,8370,,1257346705090080072;
->xmalloc,,1257346705090087046;
->make_my_cleanup2,,1257346705090091707;
->make_my_cleanup,,1257346705090096312;
->make_cleanup,,1257346705090100751;
-<fputs_unfiltered,,8371,,1257346705090111418;
-<null_file_fputs,,8372,,1257346705090126164;
-<mem_file_write,,8373,,1257346705090139733;
-<ui_file_data,,8374,,1257346705090154701;
->ui_file_data,,1257346705090161760;
-<xrealloc,,8375,,1257346705090172968;
->xrealloc,,1257346705090180021;
->mem_file_write,,1257346705090184634;
->null_file_fputs,,1257346705090189347;
->fputs_unfiltered,,1257346705090193076;
-<do_cleanups,,8376,,1257346705090207082;
-<do_my_cleanups,,8377,,1257346705090221872;
-<xfree,,8378,,1257346705090235959;
->xfree,,1257346705090242879;
-<xfree,,8379,,1257346705090254187;
->xfree,,1257346705090260909;
->do_my_cleanups,,1257346705090265537;
->do_cleanups,,1257346705090269041;
->vfprintf_unfiltered,,1257346705090273801;
->fprintf_unfiltered,,1257346705090278400;
-<fprintf_unfiltered,,8380,,1257346705090291548;
-<vfprintf_unfiltered,,8381,,1257346705090304976;
-<xstrvprintf,,8382,,1257346705090319788;
->xstrvprintf,,1257346705090327682;
-<make_cleanup,,8383,,1257346705090339619;
-<make_my_cleanup,,8384,,1257346705090355438;
-<make_my_cleanup2,,8385,,1257346705090369889;
-<xmalloc,,8386,,1257346705090384742;
->xmalloc,,1257346705090391738;
->make_my_cleanup2,,1257346705090396393;
->make_my_cleanup,,1257346705090401003;
->make_cleanup,,1257346705090405460;
-<fputs_unfiltered,,8387,,1257346705090416209;
-<null_file_fputs,,8388,,1257346705090430290;
-<mem_file_write,,8389,,1257346705090443586;
-<ui_file_data,,8390,,1257346705090458142;
->ui_file_data,,1257346705090465164;
-<xrealloc,,8391,,1257346705090475789;
->xrealloc,,1257346705090482845;
->mem_file_write,,1257346705090487470;
->null_file_fputs,,1257346705090492150;
->fputs_unfiltered,,1257346705090495786;
-<do_cleanups,,8392,,1257346705090509078;
-<do_my_cleanups,,8393,,1257346705090523986;
-<xfree,,8394,,1257346705090537829;
->xfree,,1257346705090544704;
-<xfree,,8395,,1257346705090556431;
->xfree,,1257346705090563293;
->do_my_cleanups,,1257346705090567874;
->do_cleanups,,1257346705090571380;
->vfprintf_unfiltered,,1257346705090576039;
->fprintf_unfiltered,,1257346705090580655;
-<fprintf_unfiltered,,8396,,1257346705090594231;
-<vfprintf_unfiltered,,8397,,1257346705090613182;
-<xstrvprintf,,8398,,1257346705090628523;
->xstrvprintf,,1257346705090636757;
-<make_cleanup,,8399,,1257346705090648216;
-<make_my_cleanup,,8400,,1257346705090663971;
-<make_my_cleanup2,,8401,,1257346705090677911;
-<xmalloc,,8402,,1257346705090692707;
->xmalloc,,1257346705090699510;
->make_my_cleanup2,,1257346705090704175;
->make_my_cleanup,,1257346705090708776;
->make_cleanup,,1257346705090713263;
-<fputs_unfiltered,,8403,,1257346705090723855;
-<null_file_fputs,,8404,,1257346705090737801;
-<mem_file_write,,8405,,1257346705090751473;
-<ui_file_data,,8406,,1257346705090765950;
->ui_file_data,,1257346705090773003;
-<xrealloc,,8407,,1257346705090783721;
->xrealloc,,1257346705090790635;
->mem_file_write,,1257346705090795197;
->null_file_fputs,,1257346705090799739;
->fputs_unfiltered,,1257346705090803336;
-<do_cleanups,,8408,,1257346705090816746;
-<do_my_cleanups,,8409,,1257346705090831386;
-<xfree,,8410,,1257346705090845181;
->xfree,,1257346705090852065;
-<xfree,,8411,,1257346705090863135;
->xfree,,1257346705090869785;
->do_my_cleanups,,1257346705090874356;
->do_cleanups,,1257346705090877857;
->vfprintf_unfiltered,,1257346705090882485;
->fprintf_unfiltered,,1257346705090887060;
-<fprintf_unfiltered,,8412,,1257346705090900533;
-<vfprintf_unfiltered,,8413,,1257346705090914484;
-<xstrvprintf,,8414,,1257346705090929732;
->xstrvprintf,,1257346705090938047;
-<make_cleanup,,8415,,1257346705090949521;
-<make_my_cleanup,,8416,,1257346705090965704;
-<make_my_cleanup2,,8417,,1257346705090979577;
-<xmalloc,,8418,,1257346705090994232;
->xmalloc,,1257346705091001044;
->make_my_cleanup2,,1257346705091005699;
->make_my_cleanup,,1257346705091010262;
->make_cleanup,,1257346705091014821;
-<fputs_unfiltered,,8419,,1257346705091025603;
-<null_file_fputs,,8420,,1257346705091039879;
-<mem_file_write,,8421,,1257346705091053072;
-<ui_file_data,,8422,,1257346705091067475;
->ui_file_data,,1257346705091074537;
-<xrealloc,,8423,,1257346705091085484;
->xrealloc,,1257346705091092629;
->mem_file_write,,1257346705091097411;
->null_file_fputs,,1257346705091102009;
->fputs_unfiltered,,1257346705091105700;
-<do_cleanups,,8424,,1257346705091119173;
-<do_my_cleanups,,8425,,1257346705091133894;
-<xfree,,8426,,1257346705091148243;
->xfree,,1257346705091155112;
-<xfree,,8427,,1257346705091166095;
->xfree,,1257346705091172861;
->do_my_cleanups,,1257346705091177406;
->do_cleanups,,1257346705091180909;
->vfprintf_unfiltered,,1257346705091185673;
->fprintf_unfiltered,,1257346705091190301;
-<fprintf_unfiltered,,8428,,1257346705091203988;
-<vfprintf_unfiltered,,8429,,1257346705091217591;
-<xstrvprintf,,8430,,1257346705091232490;
->xstrvprintf,,1257346705091240441;
-<make_cleanup,,8431,,1257346705091252246;
-<make_my_cleanup,,8432,,1257346705091267932;
-<make_my_cleanup2,,8433,,1257346705091282386;
-<xmalloc,,8434,,1257346705091297122;
->xmalloc,,1257346705091303967;
->make_my_cleanup2,,1257346705091308626;
->make_my_cleanup,,1257346705091313236;
->make_cleanup,,1257346705091317744;
-<fputs_unfiltered,,8435,,1257346705091328346;
-<null_file_fputs,,8436,,1257346705091342333;
-<mem_file_write,,8437,,1257346705091355530;
-<ui_file_data,,8438,,1257346705091370206;
->ui_file_data,,1257346705091377406;
-<xrealloc,,8439,,1257346705091388088;
->xrealloc,,1257346705091395083;
->mem_file_write,,1257346705091399685;
->null_file_fputs,,1257346705091404244;
->fputs_unfiltered,,1257346705091407841;
-<do_cleanups,,8440,,1257346705091421299;
-<do_my_cleanups,,8441,,1257346705091436099;
-<xfree,,8442,,1257346705091449867;
->xfree,,1257346705091456711;
-<xfree,,8443,,1257346705091467670;
->xfree,,1257346705091474332;
->do_my_cleanups,,1257346705091478840;
->do_cleanups,,1257346705091482302;
->vfprintf_unfiltered,,1257346705091486909;
->fprintf_unfiltered,,1257346705091491555;
-<ui_file_xstrdup,,8444,,1257346705091503023;
-<ui_file_put,,8445,,1257346705091517952;
-<mem_file_put,,8446,,1257346705091534598;
-<ui_file_data,,8447,,1257346705091548979;
->ui_file_data,,1257346705091555963;
-<do_ui_file_xstrdup,,8448,,1257346705091569141;
-<xmalloc,,8449,,1257346705091584094;
->xmalloc,,1257346705091590909;
->do_ui_file_xstrdup,,1257346705091595673;
->mem_file_put,,1257346705091599203;
->ui_file_put,,1257346705091606820;
->ui_file_xstrdup,,1257346705091611683;
-<ui_file_delete,,8450,,1257346705091625135;
-<mem_file_delete,,8451,,1257346705091640984;
-<ui_file_data,,8452,,1257346705091656367;
->ui_file_data,,1257346705091663486;
-<xfree,,8453,,1257346705091675203;
->xfree,,1257346705091682168;
-<xfree,,8454,,1257346705091692968;
->xfree,,1257346705091699816;
->mem_file_delete,,1257346705091703416;
-<xfree,,8455,,1257346705091714284;
->xfree,,1257346705091721174;
->ui_file_delete,,1257346705091724732;
-<add_setshow_enum_cmd,,8456,,1257346705091739429;
-<add_setshow_cmd_full,,8457,,1257346705091757892;
-<xstrdup,,8458,,1257346705091764797;
-<xmalloc,,8459,,1257346705091779615;
->xmalloc,,1257346705091786577;
->xstrdup,,1257346705091791157;
-<xstrdup,,8460,,1257346705091795596;
-<xmalloc,,8461,,1257346705091808257;
->xmalloc,,1257346705091814937;
->xstrdup,,1257346705091819289;
-<add_set_or_show_cmd,,8462,,1257346705091831713;
-<add_cmd,,8463,,1257346705091845865;
-<xmalloc,,8464,,1257346705091860337;
->xmalloc,,1257346705091867116;
-<delete_cmd,,8465,,1257346705091879630;
-<xfree,,8466,,1257346705091894862;
->xfree,,1257346705091901764;
->delete_cmd,,1257346705091906291;
->add_cmd,,1257346705091911024;
->add_set_or_show_cmd,,1257346705091915713;
-<add_set_or_show_cmd,,8467,,1257346705091927995;
-<add_cmd,,8468,,1257346705091942151;
-<xmalloc,,8469,,1257346705091957239;
->xmalloc,,1257346705091964048;
-<delete_cmd,,8470,,1257346705091976240;
-<xfree,,8471,,1257346705091990676;
->xfree,,1257346705091997632;
->delete_cmd,,1257346705092002116;
->add_cmd,,1257346705092006754;
->add_set_or_show_cmd,,1257346705092011346;
->add_setshow_cmd_full,,1257346705092016095;
->add_setshow_enum_cmd,,1257346705092020762;
-<xfree,,8472,,1257346705092031815;
->xfree,,1257346705092038741;
->add_language,,1257346705092042299;
->_initialize_m2_language,,1257346705092047360;
-<_initialize_pascal_language,,8473,,1257346705092055239;
-<add_language,,8474,,1257346705092067540;
-<xrealloc,,8475,,1257346705092080929;
->xrealloc,,1257346705092087963;
-<mem_fileopen,,8476,,1257346705092103867;
-<xmalloc,,8477,,1257346705092118798;
->xmalloc,,1257346705092125695;
-<ui_file_new,,8478,,1257346705092137646;
-<xmalloc,,8479,,1257346705092152704;
->xmalloc,,1257346705092159489;
->ui_file_new,,1257346705092163985;
->mem_fileopen,,1257346705092168508;
-<fprintf_unfiltered,,8480,,1257346705092182953;
-<vfprintf_unfiltered,,8481,,1257346705092197202;
-<xstrvprintf,,8482,,1257346705092212315;
->xstrvprintf,,1257346705092220558;
-<make_cleanup,,8483,,1257346705092231998;
-<make_my_cleanup,,8484,,1257346705092247841;
-<make_my_cleanup2,,8485,,1257346705092261693;
-<xmalloc,,8486,,1257346705092276340;
->xmalloc,,1257346705092283191;
->make_my_cleanup2,,1257346705092287852;
->make_my_cleanup,,1257346705092292426;
->make_cleanup,,1257346705092296877;
-<fputs_unfiltered,,8487,,1257346705092307391;
-<null_file_fputs,,8488,,1257346705092321343;
-<mem_file_write,,8489,,1257346705092334876;
-<ui_file_data,,8490,,1257346705092349646;
->ui_file_data,,1257346705092356767;
-<xmalloc,,8491,,1257346705092368890;
->xmalloc,,1257346705092375885;
->mem_file_write,,1257346705092380481;
->null_file_fputs,,1257346705092385145;
->fputs_unfiltered,,1257346705092388797;
-<do_cleanups,,8492,,1257346705092402396;
-<do_my_cleanups,,8493,,1257346705092417183;
-<xfree,,8494,,1257346705092431036;
->xfree,,1257346705092437866;
-<xfree,,8495,,1257346705092448725;
->xfree,,1257346705092455462;
->do_my_cleanups,,1257346705092460051;
->do_cleanups,,1257346705092463552;
->vfprintf_unfiltered,,1257346705092468207;
->fprintf_unfiltered,,1257346705092472788;
-<fprintf_unfiltered,,8496,,1257346705092485837;
-<vfprintf_unfiltered,,8497,,1257346705092499918;
-<xstrvprintf,,8498,,1257346705092514784;
->xstrvprintf,,1257346705092522949;
-<make_cleanup,,8499,,1257346705092534834;
-<make_my_cleanup,,8500,,1257346705092550431;
-<make_my_cleanup2,,8501,,1257346705092564975;
-<xmalloc,,8502,,1257346705092580406;
->xmalloc,,1257346705092587302;
->make_my_cleanup2,,1257346705092591984;
->make_my_cleanup,,1257346705092596679;
->make_cleanup,,1257346705092605468;
-<fputs_unfiltered,,8503,,1257346705092616559;
-<null_file_fputs,,8504,,1257346705092630967;
-<mem_file_write,,8505,,1257346705092644336;
-<ui_file_data,,8506,,1257346705092659246;
->ui_file_data,,1257346705092666347;
-<xrealloc,,8507,,1257346705092677186;
->xrealloc,,1257346705092684247;
->mem_file_write,,1257346705092688890;
->null_file_fputs,,1257346705092693489;
->fputs_unfiltered,,1257346705092697164;
-<do_cleanups,,8508,,1257346705092710463;
-<do_my_cleanups,,8509,,1257346705092725148;
-<xfree,,8510,,1257346705092739178;
->xfree,,1257346705092746119;
-<xfree,,8511,,1257346705092757120;
->xfree,,1257346705092763793;
->do_my_cleanups,,1257346705092768407;
->do_cleanups,,1257346705092771917;
->vfprintf_unfiltered,,1257346705092776581;
->fprintf_unfiltered,,1257346705092781222;
-<fprintf_unfiltered,,8512,,1257346705092794250;
-<vfprintf_unfiltered,,8513,,1257346705092808114;
-<xstrvprintf,,8514,,1257346705092823310;
->xstrvprintf,,1257346705092831418;
-<make_cleanup,,8515,,1257346705092843307;
-<make_my_cleanup,,8516,,1257346705092858918;
-<make_my_cleanup2,,8517,,1257346705092873069;
-<xmalloc,,8518,,1257346705092887606;
->xmalloc,,1257346705092894502;
->make_my_cleanup2,,1257346705092899263;
->make_my_cleanup,,1257346705092903913;
->make_cleanup,,1257346705092908400;
-<fputs_unfiltered,,8519,,1257346705092919031;
-<null_file_fputs,,8520,,1257346705092933398;
-<mem_file_write,,8521,,1257346705092947105;
-<ui_file_data,,8522,,1257346705092961679;
->ui_file_data,,1257346705092968867;
-<xrealloc,,8523,,1257346705092979534;
->xrealloc,,1257346705092986542;
->mem_file_write,,1257346705092991173;
->null_file_fputs,,1257346705092995826;
->fputs_unfiltered,,1257346705092999468;
-<do_cleanups,,8524,,1257346705093012580;
-<do_my_cleanups,,8525,,1257346705093027440;
-<xfree,,8526,,1257346705093041860;
->xfree,,1257346705093048741;
-<xfree,,8527,,1257346705093059836;
->xfree,,1257346705093066551;
->do_my_cleanups,,1257346705093071096;
->do_cleanups,,1257346705093074560;
->vfprintf_unfiltered,,1257346705093079168;
->fprintf_unfiltered,,1257346705093083937;
-<fprintf_unfiltered,,8528,,1257346705093097432;
-<vfprintf_unfiltered,,8529,,1257346705093111173;
-<xstrvprintf,,8530,,1257346705093126276;
->xstrvprintf,,1257346705093134210;
-<make_cleanup,,8531,,1257346705093145728;
-<make_my_cleanup,,8532,,1257346705093161315;
-<make_my_cleanup2,,8533,,1257346705093175321;
-<xmalloc,,8534,,1257346705093190529;
->xmalloc,,1257346705093197372;
->make_my_cleanup2,,1257346705093202105;
->make_my_cleanup,,1257346705093206731;
->make_cleanup,,1257346705093211203;
-<fputs_unfiltered,,8535,,1257346705093221939;
-<null_file_fputs,,8536,,1257346705093236276;
-<mem_file_write,,8537,,1257346705093249917;
-<ui_file_data,,8538,,1257346705093264999;
->ui_file_data,,1257346705093272241;
-<xrealloc,,8539,,1257346705093283730;
->xrealloc,,1257346705093290830;
->mem_file_write,,1257346705093295444;
->null_file_fputs,,1257346705093300054;
->fputs_unfiltered,,1257346705093303693;
-<do_cleanups,,8540,,1257346705093317696;
-<do_my_cleanups,,8541,,1257346705093333289;
-<xfree,,8542,,1257346705093348155;
->xfree,,1257346705093355180;
-<xfree,,8543,,1257346705093366744;
->xfree,,1257346705093373619;
->do_my_cleanups,,1257346705093378157;
->do_cleanups,,1257346705093381667;
->vfprintf_unfiltered,,1257346705093386298;
->fprintf_unfiltered,,1257346705093390987;
-<fprintf_unfiltered,,8544,,1257346705093405618;
-<vfprintf_unfiltered,,8545,,1257346705093420102;
-<xstrvprintf,,8546,,1257346705093435707;
->xstrvprintf,,1257346705093443758;
-<make_cleanup,,8547,,1257346705093455568;
-<make_my_cleanup,,8548,,1257346705093472533;
-<make_my_cleanup2,,8549,,1257346705093487167;
-<xmalloc,,8550,,1257346705093502295;
->xmalloc,,1257346705093509167;
->make_my_cleanup2,,1257346705093513831;
->make_my_cleanup,,1257346705093518439;
->make_cleanup,,1257346705093522953;
-<fputs_unfiltered,,8551,,1257346705093534182;
-<null_file_fputs,,8552,,1257346705093548296;
-<mem_file_write,,8553,,1257346705093562317;
-<ui_file_data,,8554,,1257346705093577150;
->ui_file_data,,1257346705093584214;
-<xrealloc,,8555,,1257346705093595383;
->xrealloc,,1257346705093607156;
->mem_file_write,,1257346705093612110;
->null_file_fputs,,1257346705093616714;
->fputs_unfiltered,,1257346705093620353;
-<do_cleanups,,8556,,1257346705093634518;
-<do_my_cleanups,,8557,,1257346705093649594;
-<xfree,,8558,,1257346705093663828;
->xfree,,1257346705093670809;
-<xfree,,8559,,1257346705093681951;
->xfree,,1257346705093688715;
->do_my_cleanups,,1257346705093693325;
->do_cleanups,,1257346705093696832;
->vfprintf_unfiltered,,1257346705093701469;
->fprintf_unfiltered,,1257346705093706140;
-<fprintf_unfiltered,,8560,,1257346705093720001;
-<vfprintf_unfiltered,,8561,,1257346705093733971;
-<xstrvprintf,,8562,,1257346705093749279;
->xstrvprintf,,1257346705093757381;
-<make_cleanup,,8563,,1257346705093769043;
-<make_my_cleanup,,8564,,1257346705093785205;
-<make_my_cleanup2,,8565,,1257346705093799199;
-<xmalloc,,8566,,1257346705093814392;
->xmalloc,,1257346705093821273;
->make_my_cleanup2,,1257346705093825929;
->make_my_cleanup,,1257346705093830530;
->make_cleanup,,1257346705093834984;
-<fputs_unfiltered,,8567,,1257346705093845697;
-<null_file_fputs,,8568,,1257346705093859826;
-<mem_file_write,,8569,,1257346705093873422;
-<ui_file_data,,8570,,1257346705093887975;
->ui_file_data,,1257346705093895157;
-<xrealloc,,8571,,1257346705093906417;
->xrealloc,,1257346705093913445;
->mem_file_write,,1257346705093918058;
->null_file_fputs,,1257346705093922645;
->fputs_unfiltered,,1257346705093926332;
-<do_cleanups,,8572,,1257346705093940070;
-<do_my_cleanups,,8573,,1257346705093954824;
-<xfree,,8574,,1257346705093969380;
->xfree,,1257346705093976336;
-<xfree,,8575,,1257346705093987307;
->xfree,,1257346705093993975;
->do_my_cleanups,,1257346705093998540;
->do_cleanups,,1257346705094002044;
->vfprintf_unfiltered,,1257346705094006763;
->fprintf_unfiltered,,1257346705094011547;
-<fprintf_unfiltered,,8576,,1257346705094024831;
-<vfprintf_unfiltered,,8577,,1257346705094038401;
-<xstrvprintf,,8578,,1257346705094053152;
->xstrvprintf,,1257346705094061266;
-<make_cleanup,,8579,,1257346705094073124;
-<make_my_cleanup,,8580,,1257346705094089419;
-<make_my_cleanup2,,8581,,1257346705094103524;
-<xmalloc,,8582,,1257346705094118290;
->xmalloc,,1257346705094125180;
->make_my_cleanup2,,1257346705094129941;
->make_my_cleanup,,1257346705094134665;
->make_cleanup,,1257346705094139156;
-<fputs_unfiltered,,8583,,1257346705094149868;
-<null_file_fputs,,8584,,1257346705094164538;
-<mem_file_write,,8585,,1257346705094177855;
-<ui_file_data,,8586,,1257346705094192787;
->ui_file_data,,1257346705094199902;
-<xrealloc,,8587,,1257346705094211033;
->xrealloc,,1257346705094218010;
->mem_file_write,,1257346705094222612;
->null_file_fputs,,1257346705094227201;
->fputs_unfiltered,,1257346705094230837;
-<do_cleanups,,8588,,1257346705094244070;
-<do_my_cleanups,,8589,,1257346705094259008;
-<xfree,,8590,,1257346705094272881;
->xfree,,1257346705094279774;
-<xfree,,8591,,1257346705094290700;
->xfree,,1257346705094297349;
->do_my_cleanups,,1257346705094301888;
->do_cleanups,,1257346705094305352;
->vfprintf_unfiltered,,1257346705094310032;
->fprintf_unfiltered,,1257346705094314600;
-<fprintf_unfiltered,,8592,,1257346705094327818;
-<vfprintf_unfiltered,,8593,,1257346705094341871;
-<xstrvprintf,,8594,,1257346705094356665;
->xstrvprintf,,1257346705094364655;
-<make_cleanup,,8595,,1257346705094376426;
-<make_my_cleanup,,8596,,1257346705094392107;
-<make_my_cleanup2,,8597,,1257346705094406293;
-<xmalloc,,8598,,1257346705094421150;
->xmalloc,,1257346705094427986;
->make_my_cleanup2,,1257346705094432744;
->make_my_cleanup,,1257346705094437348;
->make_cleanup,,1257346705094441922;
-<fputs_unfiltered,,8599,,1257346705094452881;
-<null_file_fputs,,8600,,1257346705094467221;
-<mem_file_write,,8601,,1257346705094480793;
-<ui_file_data,,8602,,1257346705094495530;
->ui_file_data,,1257346705094502615;
-<xrealloc,,8603,,1257346705094513430;
->xrealloc,,1257346705094520573;
->mem_file_write,,1257346705094525216;
->null_file_fputs,,1257346705094529899;
->fputs_unfiltered,,1257346705094533532;
-<do_cleanups,,8604,,1257346705094546779;
-<do_my_cleanups,,8605,,1257346705094561798;
-<xfree,,8606,,1257346705094575795;
->xfree,,1257346705094582697;
-<xfree,,8607,,1257346705094593710;
->xfree,,1257346705094600384;
->do_my_cleanups,,1257346705094609313;
->do_cleanups,,1257346705094612832;
->vfprintf_unfiltered,,1257346705094617511;
->fprintf_unfiltered,,1257346705094622137;
-<fprintf_unfiltered,,8608,,1257346705094635793;
-<vfprintf_unfiltered,,8609,,1257346705094650009;
-<xstrvprintf,,8610,,1257346705094664803;
->xstrvprintf,,1257346705094672950;
-<make_cleanup,,8611,,1257346705094684471;
-<make_my_cleanup,,8612,,1257346705094700050;
-<make_my_cleanup2,,8613,,1257346705094714290;
-<xmalloc,,8614,,1257346705094728909;
->xmalloc,,1257346705094735754;
->make_my_cleanup2,,1257346705094740449;
->make_my_cleanup,,1257346705094745074;
->make_cleanup,,1257346705094749642;
-<fputs_unfiltered,,8615,,1257346705094760223;
-<null_file_fputs,,8616,,1257346705094774267;
-<mem_file_write,,8617,,1257346705094787702;
-<ui_file_data,,8618,,1257346705094802155;
->ui_file_data,,1257346705094809238;
-<xrealloc,,8619,,1257346705094820386;
->xrealloc,,1257346705094827424;
->mem_file_write,,1257346705094832058;
->null_file_fputs,,1257346705094836650;
->fputs_unfiltered,,1257346705094840374;
-<do_cleanups,,8620,,1257346705094854018;
-<do_my_cleanups,,8621,,1257346705094868842;
-<xfree,,8622,,1257346705094882995;
->xfree,,1257346705094889837;
-<xfree,,8623,,1257346705094900895;
->xfree,,1257346705094907580;
->do_my_cleanups,,1257346705094912161;
->do_cleanups,,1257346705094915664;
->vfprintf_unfiltered,,1257346705094920278;
->fprintf_unfiltered,,1257346705094925036;
-<fprintf_unfiltered,,8624,,1257346705094938780;
-<vfprintf_unfiltered,,8625,,1257346705094952890;
-<xstrvprintf,,8626,,1257346705094968298;
->xstrvprintf,,1257346705094976264;
-<make_cleanup,,8627,,1257346705094987819;
-<make_my_cleanup,,8628,,1257346705095003587;
-<make_my_cleanup2,,8629,,1257346705095017719;
-<xmalloc,,8630,,1257346705095032762;
->xmalloc,,1257346705095039610;
->make_my_cleanup2,,1257346705095044271;
->make_my_cleanup,,1257346705095048839;
->make_cleanup,,1257346705095053320;
-<fputs_unfiltered,,8631,,1257346705095064102;
-<null_file_fputs,,8632,,1257346705095078192;
-<mem_file_write,,8633,,1257346705095091729;
-<ui_file_data,,8634,,1257346705095106257;
->ui_file_data,,1257346705095113313;
-<xrealloc,,8635,,1257346705095124497;
->xrealloc,,1257346705095131435;
->mem_file_write,,1257346705095136100;
->null_file_fputs,,1257346705095140720;
->fputs_unfiltered,,1257346705095144473;
-<do_cleanups,,8636,,1257346705095158087;
-<do_my_cleanups,,8637,,1257346705095172833;
-<xfree,,8638,,1257346705095187223;
->xfree,,1257346705095194116;
-<xfree,,8639,,1257346705095205103;
->xfree,,1257346705095211881;
->do_my_cleanups,,1257346705095216401;
->do_cleanups,,1257346705095219869;
->vfprintf_unfiltered,,1257346705095224479;
->fprintf_unfiltered,,1257346705095229066;
-<fprintf_unfiltered,,8640,,1257346705095242331;
-<vfprintf_unfiltered,,8641,,1257346705095256169;
-<xstrvprintf,,8642,,1257346705095270983;
->xstrvprintf,,1257346705095278953;
-<make_cleanup,,8643,,1257346705095290625;
-<make_my_cleanup,,8644,,1257346705095306233;
-<make_my_cleanup2,,8645,,1257346705095320437;
-<xmalloc,,8646,,1257346705095335156;
->xmalloc,,1257346705095342022;
->make_my_cleanup2,,1257346705095346749;
->make_my_cleanup,,1257346705095351354;
->make_cleanup,,1257346705095355913;
-<fputs_unfiltered,,8647,,1257346705095366562;
-<null_file_fputs,,8648,,1257346705095380950;
-<mem_file_write,,8649,,1257346705095394315;
-<ui_file_data,,8650,,1257346705095409081;
->ui_file_data,,1257346705095416116;
-<xrealloc,,8651,,1257346705095426967;
->xrealloc,,1257346705095434013;
->mem_file_write,,1257346705095438623;
->null_file_fputs,,1257346705095443333;
->fputs_unfiltered,,1257346705095446933;
-<do_cleanups,,8652,,1257346705095460232;
-<do_my_cleanups,,8653,,1257346705095475386;
-<xfree,,8654,,1257346705095489289;
->xfree,,1257346705095496204;
-<xfree,,8655,,1257346705095507629;
->xfree,,1257346705095514374;
->do_my_cleanups,,1257346705095518882;
->do_cleanups,,1257346705095522404;
->vfprintf_unfiltered,,1257346705095527060;
->fprintf_unfiltered,,1257346705095531694;
-<ui_file_xstrdup,,8656,,1257346705095543345;
-<ui_file_put,,8657,,1257346705095558340;
-<mem_file_put,,8658,,1257346705095574718;
-<ui_file_data,,8659,,1257346705095589358;
->ui_file_data,,1257346705095596411;
-<do_ui_file_xstrdup,,8660,,1257346705095616081;
-<xmalloc,,8661,,1257346705095635699;
->xmalloc,,1257346705095643620;
->do_ui_file_xstrdup,,1257346705095648462;
->mem_file_put,,1257346705095652032;
->ui_file_put,,1257346705095655521;
->ui_file_xstrdup,,1257346705095660146;
-<ui_file_delete,,8662,,1257346705095672708;
-<mem_file_delete,,8663,,1257346705095687983;
-<ui_file_data,,8664,,1257346705095702710;
->ui_file_data,,1257346705095709892;
-<xfree,,8665,,1257346705095721272;
->xfree,,1257346705095728313;
-<xfree,,8666,,1257346705095738935;
->xfree,,1257346705095745696;
->mem_file_delete,,1257346705095749371;
-<xfree,,8667,,1257346705095760071;
->xfree,,1257346705095766744;
->ui_file_delete,,1257346705095770359;
-<add_setshow_enum_cmd,,8668,,1257346705095784696;
-<add_setshow_cmd_full,,8669,,1257346705095802656;
-<xstrdup,,8670,,1257346705095809582;
-<xmalloc,,8671,,1257346705095824012;
->xmalloc,,1257346705095836517;
->xstrdup,,1257346705095841220;
-<xstrdup,,8672,,1257346705095845695;
-<xmalloc,,8673,,1257346705095859142;
->xmalloc,,1257346705095865981;
->xstrdup,,1257346705095870396;
-<add_set_or_show_cmd,,8674,,1257346705095883183;
-<add_cmd,,8675,,1257346705095897029;
-<xmalloc,,8676,,1257346705095911979;
->xmalloc,,1257346705095918710;
-<delete_cmd,,8677,,1257346705095931299;
-<xfree,,8678,,1257346705095946171;
->xfree,,1257346705095953277;
->delete_cmd,,1257346705095957966;
->add_cmd,,1257346705095962558;
->add_set_or_show_cmd,,1257346705095967259;
-<add_set_or_show_cmd,,8679,,1257346705095979905;
-<add_cmd,,8680,,1257346705095993959;
-<xmalloc,,8681,,1257346705096009101;
->xmalloc,,1257346705096016015;
-<delete_cmd,,8682,,1257346705096028421;
-<xfree,,8683,,1257346705096043079;
->xfree,,1257346705096050095;
->delete_cmd,,1257346705096054613;
->add_cmd,,1257346705096059247;
->add_set_or_show_cmd,,1257346705096063842;
->add_setshow_cmd_full,,1257346705096068555;
->add_setshow_enum_cmd,,1257346705096073433;
-<xfree,,8684,,1257346705096084741;
->xfree,,1257346705096091754;
->add_language,,1257346705096095477;
->_initialize_pascal_language,,1257346705096100539;
-<_initialize_pascal_valprint,,8685,,1257346705096109272;
-<add_setshow_boolean_cmd,,8686,,1257346705096127419;
-<add_setshow_cmd_full,,8687,,1257346705096145389;
-<xstrdup,,8688,,1257346705096152303;
-<xmalloc,,8689,,1257346705096167193;
->xmalloc,,1257346705096174040;
->xstrdup,,1257346705096178539;
-<xstrdup,,8690,,1257346705096183009;
-<xmalloc,,8691,,1257346705096195926;
->xmalloc,,1257346705096202668;
->xstrdup,,1257346705096207104;
-<add_set_or_show_cmd,,8692,,1257346705096219543;
-<add_cmd,,8693,,1257346705096233398;
-<xmalloc,,8694,,1257346705096248192;
->xmalloc,,1257346705096255247;
-<delete_cmd,,8695,,1257346705096267641;
->delete_cmd,,1257346705096276594;
->add_cmd,,1257346705096281114;
->add_set_or_show_cmd,,1257346705096285748;
-<add_set_or_show_cmd,,8696,,1257346705096298019;
-<add_cmd,,8697,,1257346705096311967;
-<xmalloc,,8698,,1257346705096326941;
->xmalloc,,1257346705096333735;
-<delete_cmd,,8699,,1257346705096346312;
->delete_cmd,,1257346705096354628;
->add_cmd,,1257346705096359067;
->add_set_or_show_cmd,,1257346705096363797;
->add_setshow_cmd_full,,1257346705096368528;
->add_setshow_boolean_cmd,,1257346705096373412;
->_initialize_pascal_valprint,,1257346705096378527;
-<_initialize_scheme_language,,8700,,1257346705096385968;
-<gdbarch_data_register_post_init,,8701,,1257346705096398584;
-<gdbarch_data_register,,8702,,1257346705096411113;
-<xmalloc,,8703,,1257346705096426000;
->xmalloc,,1257346705096432781;
-<xmalloc,,8704,,1257346705096443142;
->xmalloc,,1257346705096449924;
->gdbarch_data_register,,1257346705096454697;
->gdbarch_data_register_post_init,,1257346705096458847;
-<add_language,,8705,,1257346705096467569;
-<xrealloc,,8706,,1257346705096480979;
->xrealloc,,1257346705096488121;
-<mem_fileopen,,8707,,1257346705096503390;
-<xmalloc,,8708,,1257346705096518436;
->xmalloc,,1257346705096525287;
-<ui_file_new,,8709,,1257346705096537774;
-<xmalloc,,8710,,1257346705096552633;
->xmalloc,,1257346705096559460;
->ui_file_new,,1257346705096564059;
->mem_fileopen,,1257346705096568597;
-<fprintf_unfiltered,,8711,,1257346705096582711;
-<vfprintf_unfiltered,,8712,,1257346705096597204;
-<xstrvprintf,,8713,,1257346705096616498;
->xstrvprintf,,1257346705096625127;
-<make_cleanup,,8714,,1257346705096636964;
-<make_my_cleanup,,8715,,1257346705096652563;
-<make_my_cleanup2,,8716,,1257346705096667038;
-<xmalloc,,8717,,1257346705096681802;
->xmalloc,,1257346705096688857;
->make_my_cleanup2,,1257346705096693543;
->make_my_cleanup,,1257346705096698159;
->make_cleanup,,1257346705096702721;
-<fputs_unfiltered,,8718,,1257346705096713596;
-<null_file_fputs,,8719,,1257346705096727803;
-<mem_file_write,,8720,,1257346705096741424;
-<ui_file_data,,8721,,1257346705096756642;
->ui_file_data,,1257346705096763784;
-<xmalloc,,8722,,1257346705096775991;
->xmalloc,,1257346705096782951;
->mem_file_write,,1257346705096787558;
->null_file_fputs,,1257346705096792189;
->fputs_unfiltered,,1257346705096795825;
-<do_cleanups,,8723,,1257346705096809007;
-<do_my_cleanups,,8724,,1257346705096823888;
-<xfree,,8725,,1257346705096837881;
->xfree,,1257346705096844991;
-<xfree,,8726,,1257346705096856010;
->xfree,,1257346705096862771;
->do_my_cleanups,,1257346705096867387;
->do_cleanups,,1257346705096870888;
->vfprintf_unfiltered,,1257346705096875528;
->fprintf_unfiltered,,1257346705096880238;
-<fprintf_unfiltered,,8727,,1257346705096893326;
-<vfprintf_unfiltered,,8728,,1257346705096907509;
-<xstrvprintf,,8729,,1257346705096922483;
->xstrvprintf,,1257346705096930754;
-<make_cleanup,,8730,,1257346705096942323;
-<make_my_cleanup,,8731,,1257346705096957971;
-<make_my_cleanup2,,8732,,1257346705096972476;
-<xmalloc,,8733,,1257346705096987092;
->xmalloc,,1257346705096994090;
->make_my_cleanup2,,1257346705096998776;
->make_my_cleanup,,1257346705097003389;
->make_cleanup,,1257346705097007843;
-<fputs_unfiltered,,8734,,1257346705097018621;
-<null_file_fputs,,8735,,1257346705097033102;
-<mem_file_write,,8736,,1257346705097046518;
-<ui_file_data,,8737,,1257346705097061171;
->ui_file_data,,1257346705097068295;
-<xrealloc,,8738,,1257346705097079363;
->xrealloc,,1257346705097086683;
->mem_file_write,,1257346705097091344;
->null_file_fputs,,1257346705097095930;
->fputs_unfiltered,,1257346705097099557;
-<do_cleanups,,8739,,1257346705097112763;
-<do_my_cleanups,,8740,,1257346705097127915;
-<xfree,,8741,,1257346705097141866;
->xfree,,1257346705097148786;
-<xfree,,8742,,1257346705097159784;
->xfree,,1257346705097166485;
->do_my_cleanups,,1257346705097171017;
->do_cleanups,,1257346705097174484;
->vfprintf_unfiltered,,1257346705097179330;
->fprintf_unfiltered,,1257346705097184063;
-<fprintf_unfiltered,,8743,,1257346705097197082;
-<vfprintf_unfiltered,,8744,,1257346705097210682;
-<xstrvprintf,,8745,,1257346705097225863;
->xstrvprintf,,1257346705097233785;
-<make_cleanup,,8746,,1257346705097245327;
-<make_my_cleanup,,8747,,1257346705097261216;
-<make_my_cleanup2,,8748,,1257346705097275249;
-<xmalloc,,8749,,1257346705097290159;
->xmalloc,,1257346705097297169;
->make_my_cleanup2,,1257346705097301840;
->make_my_cleanup,,1257346705097306420;
->make_cleanup,,1257346705097310883;
-<fputs_unfiltered,,8750,,1257346705097322020;
-<null_file_fputs,,8751,,1257346705097336158;
-<mem_file_write,,8752,,1257346705097350028;
-<ui_file_data,,8753,,1257346705097364692;
->ui_file_data,,1257346705097371898;
-<xrealloc,,8754,,1257346705097382788;
->xrealloc,,1257346705097389846;
->mem_file_write,,1257346705097394466;
->null_file_fputs,,1257346705097399034;
->fputs_unfiltered,,1257346705097402646;
-<do_cleanups,,8755,,1257346705097415807;
-<do_my_cleanups,,8756,,1257346705097430588;
-<xfree,,8757,,1257346705097444624;
->xfree,,1257346705097451448;
-<xfree,,8758,,1257346705097463345;
->xfree,,1257346705097470061;
->do_my_cleanups,,1257346705097474557;
->do_cleanups,,1257346705097478021;
->vfprintf_unfiltered,,1257346705097482782;
->fprintf_unfiltered,,1257346705097487377;
-<fprintf_unfiltered,,8759,,1257346705097500391;
-<vfprintf_unfiltered,,8760,,1257346705097514240;
-<xstrvprintf,,8761,,1257346705097529614;
->xstrvprintf,,1257346705097537562;
-<make_cleanup,,8762,,1257346705097549406;
-<make_my_cleanup,,8763,,1257346705097565240;
-<make_my_cleanup2,,8764,,1257346705097579236;
-<xmalloc,,8765,,1257346705097593880;
->xmalloc,,1257346705097604894;
->make_my_cleanup2,,1257346705097609850;
->make_my_cleanup,,1257346705097614457;
->make_cleanup,,1257346705097618977;
-<fputs_unfiltered,,8766,,1257346705097629747;
-<null_file_fputs,,8767,,1257346705097644216;
-<mem_file_write,,8768,,1257346705097658080;
-<ui_file_data,,8769,,1257346705097672747;
->ui_file_data,,1257346705097679845;
-<xrealloc,,8770,,1257346705097690786;
->xrealloc,,1257346705097697974;
->mem_file_write,,1257346705097702590;
->null_file_fputs,,1257346705097707285;
->fputs_unfiltered,,1257346705097710932;
-<do_cleanups,,8771,,1257346705097724827;
-<do_my_cleanups,,8772,,1257346705097739446;
-<xfree,,8773,,1257346705097753683;
->xfree,,1257346705097760696;
-<xfree,,8774,,1257346705097771613;
->xfree,,1257346705097778320;
->do_my_cleanups,,1257346705097782894;
->do_cleanups,,1257346705097786362;
->vfprintf_unfiltered,,1257346705097791062;
->fprintf_unfiltered,,1257346705097795646;
-<fprintf_unfiltered,,8775,,1257346705097808644;
-<vfprintf_unfiltered,,8776,,1257346705097822309;
-<xstrvprintf,,8777,,1257346705097837317;
->xstrvprintf,,1257346705097845521;
-<make_cleanup,,8778,,1257346705097857079;
-<make_my_cleanup,,8779,,1257346705097872717;
-<make_my_cleanup2,,8780,,1257346705097887095;
-<xmalloc,,8781,,1257346705097901673;
->xmalloc,,1257346705097908611;
->make_my_cleanup2,,1257346705097913284;
->make_my_cleanup,,1257346705097917907;
->make_cleanup,,1257346705097922550;
-<fputs_unfiltered,,8782,,1257346705097933320;
-<null_file_fputs,,8783,,1257346705097947545;
-<mem_file_write,,8784,,1257346705097960973;
-<ui_file_data,,8785,,1257346705097975998;
->ui_file_data,,1257346705097983096;
-<xrealloc,,8786,,1257346705097993811;
->xrealloc,,1257346705098000867;
->mem_file_write,,1257346705098005483;
->null_file_fputs,,1257346705098010054;
->fputs_unfiltered,,1257346705098013648;
-<do_cleanups,,8787,,1257346705098026947;
-<do_my_cleanups,,8788,,1257346705098041695;
-<xfree,,8789,,1257346705098055545;
->xfree,,1257346705098062402;
-<xfree,,8790,,1257346705098073487;
->xfree,,1257346705098080227;
->do_my_cleanups,,1257346705098084843;
->do_cleanups,,1257346705098088350;
->vfprintf_unfiltered,,1257346705098092993;
->fprintf_unfiltered,,1257346705098097670;
-<fprintf_unfiltered,,8791,,1257346705098110740;
-<vfprintf_unfiltered,,8792,,1257346705098124301;
-<xstrvprintf,,8793,,1257346705098139196;
->xstrvprintf,,1257346705098147178;
-<make_cleanup,,8794,,1257346705098159163;
-<make_my_cleanup,,8795,,1257346705098174840;
-<make_my_cleanup2,,8796,,1257346705098189264;
-<xmalloc,,8797,,1257346705098203961;
->xmalloc,,1257346705098210878;
->make_my_cleanup2,,1257346705098215537;
->make_my_cleanup,,1257346705098220189;
->make_cleanup,,1257346705098224679;
-<fputs_unfiltered,,8798,,1257346705098235527;
-<null_file_fputs,,8799,,1257346705098249849;
-<mem_file_write,,8800,,1257346705098263184;
-<ui_file_data,,8801,,1257346705098277974;
->ui_file_data,,1257346705098285072;
-<xrealloc,,8802,,1257346705098295793;
->xrealloc,,1257346705098302794;
->mem_file_write,,1257346705098307402;
->null_file_fputs,,1257346705098312003;
->fputs_unfiltered,,1257346705098315726;
-<do_cleanups,,8803,,1257346705098328956;
-<do_my_cleanups,,8804,,1257346705098343786;
-<xfree,,8805,,1257346705098358179;
->xfree,,1257346705098365111;
-<xfree,,8806,,1257346705098376251;
->xfree,,1257346705098383129;
->do_my_cleanups,,1257346705098387715;
->do_cleanups,,1257346705098391216;
->vfprintf_unfiltered,,1257346705098395952;
->fprintf_unfiltered,,1257346705098400599;
-<fprintf_unfiltered,,8807,,1257346705098414072;
-<vfprintf_unfiltered,,8808,,1257346705098427615;
-<xstrvprintf,,8809,,1257346705098442336;
->xstrvprintf,,1257346705098450228;
-<make_cleanup,,8810,,1257346705098461791;
-<make_my_cleanup,,8811,,1257346705098477863;
-<make_my_cleanup2,,8812,,1257346705098492052;
-<xmalloc,,8813,,1257346705098506918;
->xmalloc,,1257346705098513787;
->make_my_cleanup2,,1257346705098518481;
->make_my_cleanup,,1257346705098523061;
->make_cleanup,,1257346705098527531;
-<fputs_unfiltered,,8814,,1257346705098538748;
-<null_file_fputs,,8815,,1257346705098552760;
-<mem_file_write,,8816,,1257346705098566504;
-<ui_file_data,,8817,,1257346705098581063;
->ui_file_data,,1257346705098588118;
-<xrealloc,,8818,,1257346705098598795;
->xrealloc,,1257346705098614364;
->mem_file_write,,1257346705098619176;
->null_file_fputs,,1257346705098623783;
->fputs_unfiltered,,1257346705098627419;
-<do_cleanups,,8819,,1257346705098640778;
-<do_my_cleanups,,8820,,1257346705098655758;
-<xfree,,8821,,1257346705098669734;
->xfree,,1257346705098676666;
-<xfree,,8822,,1257346705098687854;
->xfree,,1257346705098694861;
->do_my_cleanups,,1257346705098699405;
->do_cleanups,,1257346705098702903;
->vfprintf_unfiltered,,1257346705098707594;
->fprintf_unfiltered,,1257346705098712241;
-<fprintf_unfiltered,,8823,,1257346705098725720;
-<vfprintf_unfiltered,,8824,,1257346705098739449;
-<xstrvprintf,,8825,,1257346705098754772;
->xstrvprintf,,1257346705098762835;
-<make_cleanup,,8826,,1257346705098774762;
-<make_my_cleanup,,8827,,1257346705098790711;
-<make_my_cleanup2,,8828,,1257346705098804891;
-<xmalloc,,8829,,1257346705098819753;
->xmalloc,,1257346705098826638;
->make_my_cleanup2,,1257346705098831302;
->make_my_cleanup,,1257346705098835885;
->make_cleanup,,1257346705098840430;
-<fputs_unfiltered,,8830,,1257346705098851575;
-<null_file_fputs,,8831,,1257346705098865656;
-<mem_file_write,,8832,,1257346705098879300;
-<ui_file_data,,8833,,1257346705098893829;
->ui_file_data,,1257346705098900924;
-<xrealloc,,8834,,1257346705098911682;
->xrealloc,,1257346705098918710;
->mem_file_write,,1257346705098923462;
->null_file_fputs,,1257346705098928078;
->fputs_unfiltered,,1257346705098931765;
-<do_cleanups,,8835,,1257346705098944950;
-<do_my_cleanups,,8836,,1257346705098959611;
-<xfree,,8837,,1257346705098974113;
->xfree,,1257346705098981048;
-<xfree,,8838,,1257346705098992211;
->xfree,,1257346705098998957;
->do_my_cleanups,,1257346705099003577;
->do_cleanups,,1257346705099007083;
->vfprintf_unfiltered,,1257346705099011784;
->fprintf_unfiltered,,1257346705099016454;
-<fprintf_unfiltered,,8839,,1257346705099029434;
-<vfprintf_unfiltered,,8840,,1257346705099043085;
-<xstrvprintf,,8841,,1257346705099057813;
->xstrvprintf,,1257346705099065698;
-<make_cleanup,,8842,,1257346705099077361;
-<make_my_cleanup,,8843,,1257346705099093093;
-<make_my_cleanup2,,8844,,1257346705099107188;
-<xmalloc,,8845,,1257346705099122033;
->xmalloc,,1257346705099128929;
->make_my_cleanup2,,1257346705099133603;
->make_my_cleanup,,1257346705099138192;
->make_cleanup,,1257346705099142649;
-<fputs_unfiltered,,8846,,1257346705099153461;
-<null_file_fputs,,8847,,1257346705099167728;
-<mem_file_write,,8848,,1257346705099181063;
-<ui_file_data,,8849,,1257346705099196133;
->ui_file_data,,1257346705099203234;
-<xrealloc,,8850,,1257346705099214151;
->xrealloc,,1257346705099221287;
->mem_file_write,,1257346705099225919;
->null_file_fputs,,1257346705099230478;
->fputs_unfiltered,,1257346705099234075;
-<do_cleanups,,8851,,1257346705099247229;
-<do_my_cleanups,,8852,,1257346705099262465;
-<xfree,,8853,,1257346705099276386;
->xfree,,1257346705099283306;
-<xfree,,8854,,1257346705099294350;
->xfree,,1257346705099301174;
->do_my_cleanups,,1257346705099305727;
->do_cleanups,,1257346705099309242;
->vfprintf_unfiltered,,1257346705099313940;
->fprintf_unfiltered,,1257346705099318593;
-<fprintf_unfiltered,,8855,,1257346705099331549;
-<vfprintf_unfiltered,,8856,,1257346705099345464;
-<xstrvprintf,,8857,,1257346705099360248;
->xstrvprintf,,1257346705099368146;
-<make_cleanup,,8858,,1257346705099379839;
-<make_my_cleanup,,8859,,1257346705099398205;
-<make_my_cleanup2,,8860,,1257346705099444213;
-<xmalloc,,8861,,1257346705099459295;
->xmalloc,,1257346705099466486;
->make_my_cleanup2,,1257346705099471244;
->make_my_cleanup,,1257346705099475875;
->make_cleanup,,1257346705099480380;
-<fputs_unfiltered,,8862,,1257346705099491168;
-<null_file_fputs,,8863,,1257346705099505465;
-<mem_file_write,,8864,,1257346705099519086;
-<ui_file_data,,8865,,1257346705099534000;
->ui_file_data,,1257346705099541049;
-<xrealloc,,8866,,1257346705099552071;
->xrealloc,,1257346705099559247;
->mem_file_write,,1257346705099563881;
->null_file_fputs,,1257346705099568492;
->fputs_unfiltered,,1257346705099572128;
-<do_cleanups,,8867,,1257346705099585330;
-<do_my_cleanups,,8868,,1257346705099604739;
-<xfree,,8869,,1257346705099619352;
->xfree,,1257346705099626336;
-<xfree,,8870,,1257346705099637610;
->xfree,,1257346705099644371;
->do_my_cleanups,,1257346705099648930;
->do_cleanups,,1257346705099652380;
->vfprintf_unfiltered,,1257346705099657086;
->fprintf_unfiltered,,1257346705099661727;
-<fprintf_unfiltered,,8871,,1257346705099675032;
-<vfprintf_unfiltered,,8872,,1257346705099689224;
-<xstrvprintf,,8873,,1257346705099704180;
->xstrvprintf,,1257346705099712456;
-<make_cleanup,,8874,,1257346705099724218;
-<make_my_cleanup,,8875,,1257346705099739917;
-<make_my_cleanup2,,8876,,1257346705099754380;
-<xmalloc,,8877,,1257346705099768852;
->xmalloc,,1257346705099775832;
->make_my_cleanup2,,1257346705099780526;
->make_my_cleanup,,1257346705099785110;
->make_cleanup,,1257346705099789636;
-<fputs_unfiltered,,8878,,1257346705099800330;
-<null_file_fputs,,8879,,1257346705099814541;
-<mem_file_write,,8880,,1257346705099827821;
-<ui_file_data,,8881,,1257346705099842591;
->ui_file_data,,1257346705099849697;
-<xrealloc,,8882,,1257346705099860413;
->xrealloc,,1257346705099867444;
->mem_file_write,,1257346705099872057;
->null_file_fputs,,1257346705099876644;
->fputs_unfiltered,,1257346705099880331;
-<do_cleanups,,8883,,1257346705099893606;
-<do_my_cleanups,,8884,,1257346705099908655;
-<xfree,,8885,,1257346705099922955;
->xfree,,1257346705099929851;
-<xfree,,8886,,1257346705099940855;
->xfree,,1257346705099947631;
->do_my_cleanups,,1257346705099952296;
->do_cleanups,,1257346705099955860;
->vfprintf_unfiltered,,1257346705099960485;
->fprintf_unfiltered,,1257346705099965159;
-<fprintf_unfiltered,,8887,,1257346705099978641;
-<vfprintf_unfiltered,,8888,,1257346705099992430;
-<xstrvprintf,,8889,,1257346705100007422;
->xstrvprintf,,1257346705100015503;
-<make_cleanup,,8890,,1257346705100027114;
-<make_my_cleanup,,8891,,1257346705100042729;
-<make_my_cleanup2,,8892,,1257346705100056834;
-<xmalloc,,8893,,1257346705100071778;
->xmalloc,,1257346705100078758;
->make_my_cleanup2,,1257346705100083441;
->make_my_cleanup,,1257346705100088057;
->make_cleanup,,1257346705100092526;
-<fputs_unfiltered,,8894,,1257346705100103702;
-<null_file_fputs,,8895,,1257346705100117638;
-<mem_file_write,,8896,,1257346705100131102;
-<ui_file_data,,8897,,1257346705100145824;
->ui_file_data,,1257346705100152855;
-<xrealloc,,8898,,1257346705100164055;
->xrealloc,,1257346705100171110;
->mem_file_write,,1257346705100175705;
->null_file_fputs,,1257346705100180316;
->fputs_unfiltered,,1257346705100184048;
-<do_cleanups,,8899,,1257346705100197621;
-<do_my_cleanups,,8900,,1257346705100212465;
-<xfree,,8901,,1257346705100226612;
->xfree,,1257346705100233496;
-<xfree,,8902,,1257346705100244476;
->xfree,,1257346705100251150;
->do_my_cleanups,,1257346705100255829;
->do_cleanups,,1257346705100259294;
->vfprintf_unfiltered,,1257346705100264007;
->fprintf_unfiltered,,1257346705100268620;
-<ui_file_xstrdup,,8903,,1257346705100280337;
-<ui_file_put,,8904,,1257346705100295705;
-<mem_file_put,,8905,,1257346705100312480;
-<ui_file_data,,8906,,1257346705100327196;
->ui_file_data,,1257346705100334338;
-<do_ui_file_xstrdup,,8907,,1257346705100348236;
-<xmalloc,,8908,,1257346705100363140;
->xmalloc,,1257346705100370614;
->do_ui_file_xstrdup,,1257346705100375441;
->mem_file_put,,1257346705100379101;
->ui_file_put,,1257346705100382580;
->ui_file_xstrdup,,1257346705100387134;
-<ui_file_delete,,8909,,1257346705100399741;
-<mem_file_delete,,8910,,1257346705100415575;
-<ui_file_data,,8911,,1257346705100430444;
->ui_file_data,,1257346705100437571;
-<xfree,,8912,,1257346705100449409;
->xfree,,1257346705100456383;
-<xfree,,8913,,1257346705100467137;
->xfree,,1257346705100473898;
->mem_file_delete,,1257346705100477480;
-<xfree,,8914,,1257346705100488253;
->xfree,,1257346705100494941;
->ui_file_delete,,1257346705100498475;
-<add_setshow_enum_cmd,,8915,,1257346705100512772;
-<add_setshow_cmd_full,,8916,,1257346705100530411;
-<xstrdup,,8917,,1257346705100537421;
-<xmalloc,,8918,,1257346705100551911;
->xmalloc,,1257346705100559120;
->xstrdup,,1257346705100563703;
-<xstrdup,,8919,,1257346705100568169;
-<xmalloc,,8920,,1257346705100580683;
->xmalloc,,1257346705100587621;
->xstrdup,,1257346705100592075;
-<add_set_or_show_cmd,,8921,,1257346705100608839;
-<add_cmd,,8922,,1257346705100623317;
-<xmalloc,,8923,,1257346705100638348;
->xmalloc,,1257346705100645211;
-<delete_cmd,,8924,,1257346705100657707;
-<xfree,,8925,,1257346705100672578;
->xfree,,1257346705100679661;
->delete_cmd,,1257346705100684283;
->add_cmd,,1257346705100688933;
->add_set_or_show_cmd,,1257346705100693540;
-<add_set_or_show_cmd,,8926,,1257346705100706328;
-<add_cmd,,8927,,1257346705100720312;
-<xmalloc,,8928,,1257346705100734757;
->xmalloc,,1257346705100741911;
-<delete_cmd,,8929,,1257346705100754233;
-<xfree,,8930,,1257346705100768678;
->xfree,,1257346705100775688;
->delete_cmd,,1257346705100780163;
->add_cmd,,1257346705100784795;
->add_set_or_show_cmd,,1257346705100789471;
->add_setshow_cmd_full,,1257346705100794247;
->add_setshow_enum_cmd,,1257346705100798890;
-<xfree,,8931,,1257346705100809897;
->xfree,,1257346705100816727;
->add_language,,1257346705100820318;
->_initialize_scheme_language,,1257346705100825464;
-<_initialize_complaints,,8932,,1257346705100843319;
-<add_setshow_zinteger_cmd,,8933,,1257346705100862621;
-<add_setshow_cmd_full,,8934,,1257346705100880470;
-<xstrdup,,8935,,1257346705100887384;
-<xmalloc,,8936,,1257346705100901663;
->xmalloc,,1257346705100908523;
->xstrdup,,1257346705100912986;
-<xstrdup,,8937,,1257346705100917482;
-<xmalloc,,8938,,1257346705100930050;
->xmalloc,,1257346705100936955;
->xstrdup,,1257346705100941466;
-<add_set_or_show_cmd,,8939,,1257346705100954007;
-<add_cmd,,8940,,1257346705100967733;
-<xmalloc,,8941,,1257346705100982587;
->xmalloc,,1257346705100989519;
-<delete_cmd,,8942,,1257346705101001762;
->delete_cmd,,1257346705101011687;
->add_cmd,,1257346705101016222;
->add_set_or_show_cmd,,1257346705101020899;
-<add_set_or_show_cmd,,8943,,1257346705101033343;
-<add_cmd,,8944,,1257346705101047165;
-<xmalloc,,8945,,1257346705101061884;
->xmalloc,,1257346705101068822;
-<delete_cmd,,8946,,1257346705101080939;
->delete_cmd,,1257346705101090629;
->add_cmd,,1257346705101095155;
->add_set_or_show_cmd,,1257346705101099934;
->add_setshow_cmd_full,,1257346705101104689;
->add_setshow_zinteger_cmd,,1257346705101108628;
->_initialize_complaints,,1257346705101113627;
-<_initialize_typeprint,,8947,,1257346705101121467;
-<add_com,,8948,,1257346705101140955;
-<add_cmd,,8949,,1257346705101155063;
-<xmalloc,,8950,,1257346705101169832;
->xmalloc,,1257346705101176626;
-<delete_cmd,,8951,,1257346705101189041;
->delete_cmd,,1257346705101207489;
->add_cmd,,1257346705101212580;
->add_com,,1257346705101216983;
-<add_com,,8952,,1257346705101231620;
-<add_cmd,,8953,,1257346705101245509;
-<xmalloc,,8954,,1257346705101260498;
->xmalloc,,1257346705101267478;
-<delete_cmd,,8955,,1257346705101279456;
->delete_cmd,,1257346705101287615;
->add_cmd,,1257346705101292716;
->add_com,,1257346705101297044;
->_initialize_typeprint,,1257346705101302057;
-<_initialize_cp_valprint,,8956,,1257346705101310339;
-<add_setshow_boolean_cmd,,8957,,1257346705101327740;
-<add_setshow_cmd_full,,8958,,1257346705101345653;
-<xstrdup,,8959,,1257346705101352654;
-<xmalloc,,8960,,1257346705101367060;
->xmalloc,,1257346705101374013;
->xstrdup,,1257346705101378455;
-<xstrdup,,8961,,1257346705101382936;
-<xmalloc,,8962,,1257346705101395441;
->xmalloc,,1257346705101402325;
->xstrdup,,1257346705101406827;
-<add_set_or_show_cmd,,8963,,1257346705101419464;
-<add_cmd,,8964,,1257346705101433265;
-<xmalloc,,8965,,1257346705101448299;
->xmalloc,,1257346705101455138;
-<delete_cmd,,8966,,1257346705101467162;
->delete_cmd,,1257346705101474599;
->add_cmd,,1257346705101479101;
->add_set_or_show_cmd,,1257346705101483733;
-<add_set_or_show_cmd,,8967,,1257346705101495970;
-<add_cmd,,8968,,1257346705101510126;
-<xmalloc,,8969,,1257346705101524700;
->xmalloc,,1257346705101531527;
-<delete_cmd,,8970,,1257346705101543545;
->delete_cmd,,1257346705101550865;
->add_cmd,,1257346705101555313;
->add_set_or_show_cmd,,1257346705101559974;
->add_setshow_cmd_full,,1257346705101564885;
->add_setshow_boolean_cmd,,1257346705101569806;
-<add_setshow_boolean_cmd,,8971,,1257346705101582816;
-<add_setshow_cmd_full,,8972,,1257346705101605000;
-<xstrdup,,8973,,1257346705101612396;
-<xmalloc,,8974,,1257346705101627150;
->xmalloc,,1257346705101634016;
->xstrdup,,1257346705101638446;
-<xstrdup,,8975,,1257346705101642924;
-<xmalloc,,8976,,1257346705101655191;
->xmalloc,,1257346705101661994;
->xstrdup,,1257346705101666463;
-<add_set_or_show_cmd,,8977,,1257346705101678682;
-<add_cmd,,8978,,1257346705101692474;
-<xmalloc,,8979,,1257346705101706964;
->xmalloc,,1257346705101713818;
-<delete_cmd,,8980,,1257346705101725778;
->delete_cmd,,1257346705101733005;
->add_cmd,,1257346705101737517;
->add_set_or_show_cmd,,1257346705101742151;
-<add_set_or_show_cmd,,8981,,1257346705101754806;
-<add_cmd,,8982,,1257346705101768577;
-<xmalloc,,8983,,1257346705101783533;
->xmalloc,,1257346705101790375;
-<delete_cmd,,8984,,1257346705101802273;
->delete_cmd,,1257346705101809430;
->add_cmd,,1257346705101813917;
->add_set_or_show_cmd,,1257346705101818597;
->add_setshow_cmd_full,,1257346705101823379;
->add_setshow_boolean_cmd,,1257346705101828215;
-<add_setshow_boolean_cmd,,8985,,1257346705101841480;
-<add_setshow_cmd_full,,8986,,1257346705101859498;
-<xstrdup,,8987,,1257346705101866376;
-<xmalloc,,8988,,1257346705101881019;
->xmalloc,,1257346705101887825;
->xstrdup,,1257346705101892243;
-<xstrdup,,8989,,1257346705101896739;
-<xmalloc,,8990,,1257346705101909012;
->xmalloc,,1257346705101915761;
->xstrdup,,1257346705101920200;
-<add_set_or_show_cmd,,8991,,1257346705101932500;
-<add_cmd,,8992,,1257346705101946145;
-<xmalloc,,8993,,1257346705101960535;
->xmalloc,,1257346705101967407;
-<delete_cmd,,8994,,1257346705101979768;
->delete_cmd,,1257346705101987154;
->add_cmd,,1257346705101991605;
->add_set_or_show_cmd,,1257346705101996267;
-<add_set_or_show_cmd,,8995,,1257346705102009066;
-<add_cmd,,8996,,1257346705102022591;
-<xmalloc,,8997,,1257346705102037646;
->xmalloc,,1257346705102044464;
-<delete_cmd,,8998,,1257346705102056481;
->delete_cmd,,1257346705102063675;
->add_cmd,,1257346705102068138;
->add_set_or_show_cmd,,1257346705102072815;
->add_setshow_cmd_full,,1257346705102077557;
->add_setshow_boolean_cmd,,1257346705102082330;
-<xmalloc,,8999,,1257346705102095088;
->xmalloc,,1257346705102102149;
-<xmalloc,,9000,,1257346705102112356;
->xmalloc,,1257346705102119207;
->_initialize_cp_valprint,,1257346705102124209;
-<_initialize_f_valprint,,9001,,1257346705102132545;
-<add_info,,9002,,1257346705102148776;
-<add_cmd,,9003,,1257346705102164382;
-<xmalloc,,9004,,1257346705102178908;
->xmalloc,,1257346705102185888;
-<delete_cmd,,9005,,1257346705102197966;
->delete_cmd,,1257346705102207530;
->add_cmd,,1257346705102212056;
->add_info,,1257346705102216495;
->_initialize_f_valprint,,1257346705102221505;
-<_initialize_serial,,9006,,1257346705102229559;
-<add_prefix_cmd,,9007,,1257346705102245730;
-<add_cmd,,9008,,1257346705102260108;
-<xmalloc,,9009,,1257346705102274667;
->xmalloc,,1257346705102281563;
-<delete_cmd,,9010,,1257346705102293545;
->delete_cmd,,1257346705102301283;
->add_cmd,,1257346705102306008;
->add_prefix_cmd,,1257346705102310729;
-<add_prefix_cmd,,9011,,1257346705102322895;
-<add_cmd,,9012,,1257346705102336840;
-<xmalloc,,9013,,1257346705102351703;
->xmalloc,,1257346705102358647;
-<delete_cmd,,9014,,1257346705102370508;
->delete_cmd,,1257346705102378153;
->add_cmd,,1257346705102382847;
->add_prefix_cmd,,1257346705102387530;
-<add_setshow_filename_cmd,,9015,,1257346705102401842;
-<add_setshow_cmd_full,,9016,,1257346705102419782;
-<xstrprintf,,9017,,1257346705102435020;
-<xstrvprintf,,9018,,1257346705102451179;
->xstrvprintf,,1257346705102459955;
->xstrprintf,,1257346705102464619;
-<xstrprintf,,9019,,1257346705102477897;
-<xstrvprintf,,9020,,1257346705102493025;
->xstrvprintf,,1257346705102501166;
->xstrprintf,,1257346705102505728;
-<add_set_or_show_cmd,,9021,,1257346705102518019;
-<add_cmd,,9022,,1257346705102531712;
-<xmalloc,,9023,,1257346705102546536;
->xmalloc,,1257346705102553399;
-<delete_cmd,,9024,,1257346705102565495;
->delete_cmd,,1257346705102573269;
->add_cmd,,1257346705102577981;
->add_set_or_show_cmd,,1257346705102582685;
-<add_set_or_show_cmd,,9025,,1257346705102594895;
-<add_cmd,,9026,,1257346705102612704;
-<xmalloc,,9027,,1257346705102628108;
->xmalloc,,1257346705102635065;
-<delete_cmd,,9028,,1257346705102646905;
->delete_cmd,,1257346705102654712;
->add_cmd,,1257346705102659407;
->add_set_or_show_cmd,,1257346705102664026;
->add_setshow_cmd_full,,1257346705102668730;
->add_setshow_filename_cmd,,1257346705102673698;
-<add_setshow_enum_cmd,,9029,,1257346705102687589;
-<add_setshow_cmd_full,,9030,,1257346705102705023;
-<xstrdup,,9031,,1257346705102712031;
-<xmalloc,,9032,,1257346705102726602;
->xmalloc,,1257346705102733522;
->xstrdup,,1257346705102738036;
-<xstrdup,,9033,,1257346705102742484;
-<xmalloc,,9034,,1257346705102755527;
->xmalloc,,1257346705102762417;
->xstrdup,,1257346705102766919;
-<add_set_or_show_cmd,,9035,,1257346705102779232;
-<add_cmd,,9036,,1257346705102793171;
-<xmalloc,,9037,,1257346705102807679;
->xmalloc,,1257346705102814542;
-<delete_cmd,,9038,,1257346705102826827;
->delete_cmd,,1257346705102834604;
->add_cmd,,1257346705102839302;
->add_set_or_show_cmd,,1257346705102843993;
-<add_set_or_show_cmd,,9039,,1257346705102856339;
-<add_cmd,,9040,,1257346705102870143;
-<xmalloc,,9041,,1257346705102884768;
->xmalloc,,1257346705102891598;
-<delete_cmd,,9042,,1257346705102903535;
->delete_cmd,,1257346705102911282;
->add_cmd,,1257346705102916049;
->add_set_or_show_cmd,,1257346705102920692;
->add_setshow_cmd_full,,1257346705102925411;
->add_setshow_enum_cmd,,1257346705102930210;
-<add_setshow_zinteger_cmd,,9043,,1257346705102944800;
-<add_setshow_cmd_full,,9044,,1257346705102961975;
-<xstrprintf,,9045,,1257346705102977108;
-<xstrvprintf,,9046,,1257346705102991803;
->xstrvprintf,,1257346705102999724;
->xstrprintf,,1257346705103004289;
-<xstrprintf,,9047,,1257346705103016888;
-<xstrvprintf,,9048,,1257346705103031726;
->xstrvprintf,,1257346705103039314;
->xstrprintf,,1257346705103043864;
-<add_set_or_show_cmd,,9049,,1257346705103055987;
-<add_cmd,,9050,,1257346705103069954;
-<xmalloc,,9051,,1257346705103084531;
->xmalloc,,1257346705103091403;
-<delete_cmd,,9052,,1257346705103103504;
->delete_cmd,,1257346705103111522;
->add_cmd,,1257346705103116003;
->add_set_or_show_cmd,,1257346705103120716;
-<add_set_or_show_cmd,,9053,,1257346705103133086;
-<add_cmd,,9054,,1257346705103146661;
-<xmalloc,,9055,,1257346705103161262;
->xmalloc,,1257346705103168083;
-<delete_cmd,,9056,,1257346705103179926;
->delete_cmd,,1257346705103187929;
->add_cmd,,1257346705103192470;
->add_set_or_show_cmd,,1257346705103197156;
->add_setshow_cmd_full,,1257346705103201971;
->add_setshow_zinteger_cmd,,1257346705103205874;
->_initialize_serial,,1257346705103210680;
-<_initialize_mdebugread,,9057,,1257346705103219348;
-<register_objfile_data,,9058,,1257346705103236731;
-<register_objfile_data_with_cleanup,,9059,,1257346705103252763;
-<xmalloc,,9060,,1257346705103267698;
->xmalloc,,1257346705103274507;
-<xmalloc,,9061,,1257346705103284471;
->xmalloc,,1257346705103291276;
->register_objfile_data_with_cleanup,,1257346705103296476;
->register_objfile_data,,1257346705103301511;
->_initialize_mdebugread,,1257346705103306389;
-<_initialize_utils,,9062,,1257346705103322235;
-<add_internal_problem_command,,9063,,1257346705103338953;
-<xmalloc,,9064,,1257346705103355181;
->xmalloc,,1257346705103362225;
-<xmalloc,,9065,,1257346705103372110;
->xmalloc,,1257346705103378922;
-<xstrprintf,,9066,,1257346705103393282;
-<xstrvprintf,,9067,,1257346705103408674;
->xstrvprintf,,1257346705103416767;
->xstrprintf,,1257346705103421336;
-<xstrprintf,,9068,,1257346705103435016;
-<xstrvprintf,,9069,,1257346705103450505;
->xstrvprintf,,1257346705103460961;
->xstrprintf,,1257346705103698821;
-<concat,,9070,,1257346705103705275;
-<xmalloc,,9071,,1257346705103722583;
->xmalloc,,1257346705103729797;
->concat,,1257346705103734769;
-<add_prefix_cmd,,9072,,1257346705103746062;
-<add_cmd,,9073,,1257346705103760028;
-<xmalloc,,9074,,1257346705103774545;
->xmalloc,,1257346705103781435;
-<delete_cmd,,9075,,1257346705103794277;
->delete_cmd,,1257346705103801735;
->add_cmd,,1257346705103806282;
->add_prefix_cmd,,1257346705103810842;
-<concat,,9076,,1257346705103816090;
-<xmalloc,,9077,,1257346705103830763;
->xmalloc,,1257346705103837803;
->concat,,1257346705103842387;
-<add_prefix_cmd,,9078,,1257346705103853965;
-<add_cmd,,9079,,1257346705103867550;
-<xmalloc,,9080,,1257346705103882623;
->xmalloc,,1257346705103889441;
-<delete_cmd,,9081,,1257346705103901888;
->delete_cmd,,1257346705103909266;
->add_cmd,,1257346705103913672;
->add_prefix_cmd,,1257346705103918315;
-<xstrprintf,,9082,,1257346705103933097;
-<xstrvprintf,,9083,,1257346705103948808;
->xstrvprintf,,1257346705103957003;
->xstrprintf,,1257346705103961595;
-<xstrprintf,,9084,,1257346705103975528;
-<xstrvprintf,,9085,,1257346705103990614;
->xstrvprintf,,1257346705103998367;
->xstrprintf,,1257346705104002938;
-<add_setshow_enum_cmd,,9086,,1257346705104015287;
-<add_setshow_cmd_full,,9087,,1257346705104032606;
-<xstrdup,,9088,,1257346705104039584;
-<xmalloc,,9089,,1257346705104054019;
->xmalloc,,1257346705104060915;
->xstrdup,,1257346705104065541;
-<xstrdup,,9090,,1257346705104070025;
-<xmalloc,,9091,,1257346705104082626;
->xmalloc,,1257346705104089411;
->xstrdup,,1257346705104093907;
-<add_set_or_show_cmd,,9092,,1257346705104106364;
-<add_cmd,,9093,,1257346705104120119;
-<xmalloc,,9094,,1257346705104134817;
->xmalloc,,1257346705104145848;
-<delete_cmd,,9095,,1257346705104158061;
->delete_cmd,,1257346705104165321;
->add_cmd,,1257346705104169754;
->add_set_or_show_cmd,,1257346705104174422;
-<add_set_or_show_cmd,,9096,,1257346705104186530;
-<add_cmd,,9097,,1257346705104200613;
-<xmalloc,,9098,,1257346705104215124;
->xmalloc,,1257346705104221987;
-<delete_cmd,,9099,,1257346705104234546;
->delete_cmd,,1257346705104241505;
->add_cmd,,1257346705104245974;
->add_set_or_show_cmd,,1257346705104250639;
->add_setshow_cmd_full,,1257346705104255655;
->add_setshow_enum_cmd,,1257346705104260449;
-<xfree,,9100,,1257346705104272789;
->xfree,,1257346705104279856;
-<xfree,,9101,,1257346705104292006;
->xfree,,1257346705104298893;
-<xstrprintf,,9102,,1257346705104312884;
-<xstrvprintf,,9103,,1257346705104328014;
->xstrvprintf,,1257346705104335815;
->xstrprintf,,1257346705104340357;
-<xstrprintf,,9104,,1257346705104354362;
-<xstrvprintf,,9105,,1257346705104369538;
->xstrvprintf,,1257346705104377240;
->xstrprintf,,1257346705104381796;
-<add_setshow_enum_cmd,,9106,,1257346705104394102;
-<add_setshow_cmd_full,,9107,,1257346705104411242;
-<xstrdup,,9108,,1257346705104418162;
-<xmalloc,,9109,,1257346705104432522;
->xmalloc,,1257346705104439436;
->xstrdup,,1257346705104443917;
-<xstrdup,,9110,,1257346705104448404;
-<xmalloc,,9111,,1257346705104460831;
->xmalloc,,1257346705104467718;
->xstrdup,,1257346705104472154;
-<add_set_or_show_cmd,,9112,,1257346705104484623;
-<add_cmd,,9113,,1257346705104498219;
-<xmalloc,,9114,,1257346705104513163;
->xmalloc,,1257346705104519990;
-<delete_cmd,,9115,,1257346705104531999;
->delete_cmd,,1257346705104539114;
->add_cmd,,1257346705104543547;
->add_set_or_show_cmd,,1257346705104548200;
-<add_set_or_show_cmd,,9116,,1257346705104560239;
-<add_cmd,,9117,,1257346705104574136;
-<xmalloc,,9118,,1257346705104588608;
->xmalloc,,1257346705104595459;
-<delete_cmd,,9119,,1257346705104612772;
->delete_cmd,,1257346705104620300;
->add_cmd,,1257346705104624889;
->add_set_or_show_cmd,,1257346705104629596;
->add_setshow_cmd_full,,1257346705104634468;
->add_setshow_enum_cmd,,1257346705104639210;
-<xfree,,9120,,1257346705104651613;
->xfree,,1257346705104658774;
-<xfree,,9121,,1257346705104670749;
->xfree,,1257346705104677633;
->add_internal_problem_command,,1257346705104682896;
-<add_internal_problem_command,,9122,,1257346705104695320;
-<xmalloc,,9123,,1257346705104710153;
->xmalloc,,1257346705104717190;
-<xmalloc,,9124,,1257346705104727364;
->xmalloc,,1257346705104734089;
-<xstrprintf,,9125,,1257346705104747748;
-<xstrvprintf,,9126,,1257346705104762984;
->xstrvprintf,,1257346705104770785;
->xstrprintf,,1257346705104775351;
-<xstrprintf,,9127,,1257346705104789218;
-<xstrvprintf,,9128,,1257346705104804312;
->xstrvprintf,,1257346705104811924;
->xstrprintf,,1257346705104816550;
-<concat,,9129,,1257346705104821430;
-<xmalloc,,9130,,1257346705104834477;
->xmalloc,,1257346705104841343;
->concat,,1257346705104845893;
-<add_prefix_cmd,,9131,,1257346705104857201;
-<add_cmd,,9132,,1257346705104870858;
-<xmalloc,,9133,,1257346705104885519;
->xmalloc,,1257346705104892439;
-<delete_cmd,,9134,,1257346705104904559;
->delete_cmd,,1257346705104911689;
->add_cmd,,1257346705104916158;
->add_prefix_cmd,,1257346705104920733;
-<concat,,9135,,1257346705104925674;
-<xmalloc,,9136,,1257346705104940104;
->xmalloc,,1257346705104947000;
->concat,,1257346705104951409;
-<add_prefix_cmd,,9137,,1257346705104962837;
-<add_cmd,,9138,,1257346705104976692;
-<xmalloc,,9139,,1257346705104992048;
->xmalloc,,1257346705104998998;
-<delete_cmd,,9140,,1257346705105012520;
->delete_cmd,,1257346705105019731;
->add_cmd,,1257346705105024170;
->add_prefix_cmd,,1257346705105028706;
-<xstrprintf,,9141,,1257346705105043941;
-<xstrvprintf,,9142,,1257346705105059466;
->xstrvprintf,,1257346705105067267;
->xstrprintf,,1257346705105071778;
-<xstrprintf,,9143,,1257346705105086595;
-<xstrvprintf,,9144,,1257346705105102854;
->xstrvprintf,,1257346705105110655;
->xstrprintf,,1257346705105115202;
-<add_setshow_enum_cmd,,9145,,1257346705105127400;
-<add_setshow_cmd_full,,9146,,1257346705105144561;
-<xstrdup,,9147,,1257346705105151409;
-<xmalloc,,9148,,1257346705105165715;
->xmalloc,,1257346705105172479;
->xstrdup,,1257346705105176942;
-<xstrdup,,9149,,1257346705105181420;
-<xmalloc,,9150,,1257346705105193726;
->xmalloc,,1257346705105200505;
->xstrdup,,1257346705105204917;
-<add_set_or_show_cmd,,9151,,1257346705105217295;
-<add_cmd,,9152,,1257346705105231184;
-<xmalloc,,9153,,1257346705105245634;
->xmalloc,,1257346705105252401;
-<delete_cmd,,9154,,1257346705105264482;
->delete_cmd,,1257346705105271654;
->add_cmd,,1257346705105276073;
->add_set_or_show_cmd,,1257346705105280707;
-<add_set_or_show_cmd,,9155,,1257346705105293097;
-<add_cmd,,9156,,1257346705105306619;
-<xmalloc,,9157,,1257346705105321548;
->xmalloc,,1257346705105328269;
-<delete_cmd,,9158,,1257346705105340603;
->delete_cmd,,1257346705105347655;
->add_cmd,,1257346705105352067;
->add_set_or_show_cmd,,1257346705105356732;
->add_setshow_cmd_full,,1257346705105361522;
->add_setshow_enum_cmd,,1257346705105366292;
-<xfree,,9159,,1257346705105378638;
->xfree,,1257346705105385576;
-<xfree,,9160,,1257346705105397116;
->xfree,,1257346705105403843;
-<xstrprintf,,9161,,1257346705105417846;
-<xstrvprintf,,9162,,1257346705105432808;
->xstrvprintf,,1257346705105440651;
->xstrprintf,,1257346705105445174;
-<xstrprintf,,9163,,1257346705105458506;
-<xstrvprintf,,9164,,1257346705105473964;
->xstrvprintf,,1257346705105481639;
->xstrprintf,,1257346705105486186;
-<add_setshow_enum_cmd,,9165,,1257346705105498288;
-<add_setshow_cmd_full,,9166,,1257346705105515313;
-<xstrdup,,9167,,1257346705105522089;
-<xmalloc,,9168,,1257346705105536883;
->xmalloc,,1257346705105543664;
->xstrdup,,1257346705105548169;
-<xstrdup,,9169,,1257346705105552645;
-<xmalloc,,9170,,1257346705105565095;
->xmalloc,,1257346705105571895;
->xstrdup,,1257346705105576394;
-<add_set_or_show_cmd,,9171,,1257346705105588580;
-<add_cmd,,9172,,1257346705105606531;
-<xmalloc,,9173,,1257346705105621610;
->xmalloc,,1257346705105628599;
-<delete_cmd,,9174,,1257346705105640638;
->delete_cmd,,1257346705105647774;
->add_cmd,,1257346705105652316;
->add_set_or_show_cmd,,1257346705105656953;
-<add_set_or_show_cmd,,9175,,1257346705105669488;
-<add_cmd,,9176,,1257346705105683085;
-<xmalloc,,9177,,1257346705105697956;
->xmalloc,,1257346705105704883;
-<delete_cmd,,9178,,1257346705105716903;
->delete_cmd,,1257346705105724025;
->add_cmd,,1257346705105728449;
->add_set_or_show_cmd,,1257346705105733137;
->add_setshow_cmd_full,,1257346705105737886;
->add_setshow_enum_cmd,,1257346705105742581;
-<xfree,,9179,,1257346705105755278;
->xfree,,1257346705105762490;
-<xfree,,9180,,1257346705105773966;
->xfree,,1257346705105780805;
->add_internal_problem_command,,1257346705105785731;
->_initialize_utils,,1257346705105789602;
-<_initialize_user_regs,,9181,,1257346705105797611;
-<gdbarch_data_register_post_init,,9182,,1257346705105810876;
-<gdbarch_data_register,,9183,,1257346705105822726;
-<xmalloc,,9184,,1257346705105837895;
->xmalloc,,1257346705105844845;
-<xmalloc,,9185,,1257346705105854932;
->xmalloc,,1257346705105861648;
->gdbarch_data_register,,1257346705105866481;
->gdbarch_data_register_post_init,,1257346705105870553;
->_initialize_user_regs,,1257346705105875638;
-<_initialize_frame,,9186,,1257346705105888432;
-<xmalloc,,9187,,1257346705105905385;
->xmalloc,,1257346705105915658;
-<observer_attach_target_changed,,9188,,1257346705105932241;
-<generic_observer_attach,,9189,,1257346705105952087;
-<xmalloc,,9190,,1257346705105966869;
->xmalloc,,1257346705105973948;
-<xmalloc,,9191,,1257346705105983858;
->xmalloc,,1257346705105990703;
->generic_observer_attach,,1257346705105995815;
->observer_attach_target_changed,,1257346705106000107;
-<add_prefix_cmd,,9192,,1257346705106012798;
-<add_cmd,,9193,,1257346705106026446;
-<xmalloc,,9194,,1257346705106041290;
->xmalloc,,1257346705106048175;
-<delete_cmd,,9195,,1257346705106060126;
->delete_cmd,,1257346705106069714;
->add_cmd,,1257346705106074177;
->add_prefix_cmd,,1257346705106078724;
-<add_prefix_cmd,,9196,,1257346705106091190;
-<add_cmd,,9197,,1257346705106105186;
-<xmalloc,,9198,,1257346705106119688;
->xmalloc,,1257346705106126659;
-<delete_cmd,,9199,,1257346705106138942;
->delete_cmd,,1257346705106147922;
->add_cmd,,1257346705106152427;
->add_prefix_cmd,,1257346705106156959;
-<add_setshow_boolean_cmd,,9200,,1257346705106171602;
-<add_setshow_cmd_full,,9201,,1257346705106188814;
-<xstrprintf,,9202,,1257346705106204182;
-<xstrvprintf,,9203,,1257346705106218795;
->xstrvprintf,,1257346705106227640;
->xstrprintf,,1257346705106232217;
-<xstrprintf,,9204,,1257346705106244620;
-<xstrvprintf,,9205,,1257346705106259930;
->xstrvprintf,,1257346705106268060;
->xstrprintf,,1257346705106272658;
-<add_set_or_show_cmd,,9206,,1257346705106284679;
-<add_cmd,,9207,,1257346705106298612;
-<xmalloc,,9208,,1257346705106312979;
->xmalloc,,1257346705106319989;
-<delete_cmd,,9209,,1257346705106332118;
->delete_cmd,,1257346705106339197;
->add_cmd,,1257346705106343594;
->add_set_or_show_cmd,,1257346705106348235;
-<add_set_or_show_cmd,,9210,,1257346705106360237;
-<add_cmd,,9211,,1257346705106373590;
-<xmalloc,,9212,,1257346705106388053;
->xmalloc,,1257346705106394898;
-<delete_cmd,,9213,,1257346705106406735;
->delete_cmd,,1257346705106413709;
->add_cmd,,1257346705106418094;
->add_set_or_show_cmd,,1257346705106422750;
->add_setshow_cmd_full,,1257346705106427471;
->add_setshow_boolean_cmd,,1257346705106432313;
-<add_setshow_boolean_cmd,,9214,,1257346705106446710;
-<add_setshow_cmd_full,,9215,,1257346705106463732;
-<xstrprintf,,9216,,1257346705106478947;
-<xstrvprintf,,9217,,1257346705106493722;
->xstrvprintf,,1257346705106501878;
->xstrprintf,,1257346705106506459;
-<xstrprintf,,9218,,1257346705106519417;
-<xstrvprintf,,9219,,1257346705106534256;
->xstrvprintf,,1257346705106542376;
->xstrprintf,,1257346705106546971;
-<add_set_or_show_cmd,,9220,,1257346705106558908;
-<add_cmd,,9221,,1257346705106572968;
-<xmalloc,,9222,,1257346705106587346;
->xmalloc,,1257346705106594161;
-<delete_cmd,,9223,,1257346705106610867;
->delete_cmd,,1257346705106618376;
->add_cmd,,1257346705106622839;
->add_set_or_show_cmd,,1257346705106627498;
-<add_set_or_show_cmd,,9224,,1257346705106639945;
-<add_cmd,,9225,,1257346705106653301;
-<xmalloc,,9226,,1257346705106668197;
->xmalloc,,1257346705106675147;
-<delete_cmd,,9227,,1257346705106686991;
->delete_cmd,,1257346705106694058;
->add_cmd,,1257346705106698497;
->add_set_or_show_cmd,,1257346705106703173;
->add_setshow_cmd_full,,1257346705106707928;
->add_setshow_boolean_cmd,,1257346705106712701;
-<add_setshow_integer_cmd,,9228,,1257346705106725705;
-<add_setshow_cmd_full,,9229,,1257346705106742869;
-<xstrprintf,,9230,,1257346705106757755;
-<xstrvprintf,,9231,,1257346705106772290;
->xstrvprintf,,1257346705106783096;
->xstrprintf,,1257346705106787733;
-<xstrprintf,,9232,,1257346705106800187;
-<xstrvprintf,,9233,,1257346705106815101;
->xstrvprintf,,1257346705106823131;
->xstrprintf,,1257346705106827672;
-<add_set_or_show_cmd,,9234,,1257346705106839527;
-<add_cmd,,9235,,1257346705106853004;
-<xmalloc,,9236,,1257346705106867481;
->xmalloc,,1257346705106874317;
-<delete_cmd,,9237,,1257346705106886494;
->delete_cmd,,1257346705106895342;
->add_cmd,,1257346705106899814;
->add_set_or_show_cmd,,1257346705106904491;
-<add_set_or_show_cmd,,9238,,1257346705106916439;
-<add_cmd,,9239,,1257346705106930162;
-<xmalloc,,9240,,1257346705106944667;
->xmalloc,,1257346705106951479;
-<delete_cmd,,9241,,1257346705106963292;
->delete_cmd,,1257346705106970308;
->add_cmd,,1257346705106974717;
->add_set_or_show_cmd,,1257346705106979358;
->add_setshow_cmd_full,,1257346705106984176;
->add_setshow_integer_cmd,,1257346705106987992;
-<add_setshow_zinteger_cmd,,9242,,1257346705107003435;
-<add_setshow_cmd_full,,9243,,1257346705107020761;
-<xstrprintf,,9244,,1257346705107035606;
-<xstrvprintf,,9245,,1257346705107050778;
->xstrvprintf,,1257346705107058552;
->xstrprintf,,1257346705107063096;
-<xstrprintf,,9246,,1257346705107075890;
-<xstrvprintf,,9247,,1257346705107090717;
->xstrvprintf,,1257346705107098407;
->xstrprintf,,1257346705107102969;
-<add_set_or_show_cmd,,9248,,1257346705107114866;
-<add_cmd,,9249,,1257346705107128454;
-<xmalloc,,9250,,1257346705107142959;
->xmalloc,,1257346705107149801;
-<delete_cmd,,9251,,1257346705107161683;
->delete_cmd,,1257346705107168985;
->add_cmd,,1257346705107173415;
->add_set_or_show_cmd,,1257346705107178028;
-<add_set_or_show_cmd,,9252,,1257346705107189842;
-<add_cmd,,9253,,1257346705107203441;
-<xmalloc,,9254,,1257346705107218159;
->xmalloc,,1257346705107225010;
-<delete_cmd,,9255,,1257346705107237196;
->delete_cmd,,1257346705107244562;
->add_cmd,,1257346705107249037;
->add_set_or_show_cmd,,1257346705107253662;
->add_setshow_cmd_full,,1257346705107258381;
->add_setshow_zinteger_cmd,,1257346705107262366;
->_initialize_frame,,1257346705107267547;
-<_initialize_frame_unwind,,9256,,1257346705107280678;
-<gdbarch_data_register_pre_init,,9257,,1257346705107294894;
-<gdbarch_data_register,,9258,,1257346705107307408;
-<xmalloc,,9259,,1257346705107322569;
->xmalloc,,1257346705107329462;
-<xmalloc,,9260,,1257346705107339593;
->xmalloc,,1257346705107346414;
->gdbarch_data_register,,1257346705107351160;
->gdbarch_data_register_pre_init,,1257346705107355349;
->_initialize_frame_unwind,,1257346705107360405;
-<_initialize_doublest,,9261,,1257346705107369527;
->_initialize_doublest,,1257346705107378260;
-<_initialize_frame_base,,9262,,1257346705107392542;
-<gdbarch_data_register_pre_init,,9263,,1257346705107406352;
-<gdbarch_data_register,,9264,,1257346705107418397;
-<xmalloc,,9265,,1257346705107433272;
->xmalloc,,1257346705107440174;
-<xmalloc,,9266,,1257346705107450071;
->xmalloc,,1257346705107456877;
->gdbarch_data_register,,1257346705107461605;
->gdbarch_data_register_pre_init,,1257346705107465611;
->_initialize_frame_base,,1257346705107470594;
-<_initialize_gnu_v2_abi,,9267,,1257346705107477496;
-<register_cp_abi,,9268,,1257346705107497261;
->register_cp_abi,,1257346705107506425;
-<set_cp_abi_as_auto_default,,9269,,1257346705107520611;
-<xstrprintf,,9270,,1257346705107543082;
-<xstrvprintf,,9271,,1257346705107558354;
->xstrvprintf,,1257346705107567692;
->xstrprintf,,1257346705107572335;
-<xstrprintf,,9272,,1257346705107584831;
-<xstrvprintf,,9273,,1257346705107599574;
->xstrvprintf,,1257346705107612272;
->xstrprintf,,1257346705107616928;
->set_cp_abi_as_auto_default,,1257346705107622080;
->_initialize_gnu_v2_abi,,1257346705107626976;
-<_initialize_gnu_v3_abi,,9274,,1257346705107635923;
-<gdbarch_data_register_post_init,,9275,,1257346705107648909;
-<gdbarch_data_register,,9276,,1257346705107660921;
-<xmalloc,,9277,,1257346705107675696;
->xmalloc,,1257346705107682745;
-<xmalloc,,9278,,1257346705107692565;
->xmalloc,,1257346705107699316;
->gdbarch_data_register,,1257346705107704074;
->gdbarch_data_register_post_init,,1257346705107708149;
-<register_cp_abi,,9279,,1257346705107723090;
->register_cp_abi,,1257346705107730269;
->_initialize_gnu_v3_abi,,1257346705107735288;
-<_initialize_cp_abi,,9280,,1257346705107748596;
-<register_cp_abi,,9281,,1257346705107766941;
->register_cp_abi,,1257346705107774132;
-<switch_to_cp_abi,,9282,,1257346705107788977;
->switch_to_cp_abi,,1257346705107797903;
-<add_cmd,,9283,,1257346705107809824;
-<xmalloc,,9284,,1257346705107824152;
->xmalloc,,1257346705107831138;
-<delete_cmd,,9285,,1257346705107842380;
->delete_cmd,,1257346705107850229;
->add_cmd,,1257346705107854864;
-<add_cmd,,9286,,1257346705107866120;
-<xmalloc,,9287,,1257346705107880276;
->xmalloc,,1257346705107887368;
-<delete_cmd,,9288,,1257346705107898574;
->delete_cmd,,1257346705107906339;
->add_cmd,,1257346705107910913;
->_initialize_cp_abi,,1257346705107915731;
-<_initialize_cp_support,,9289,,1257346705107928552;
-<add_prefix_cmd,,9290,,1257346705107944957;
-<add_cmd,,9291,,1257346705107958310;
-<xmalloc,,9292,,1257346705107972328;
->xmalloc,,1257346705107979278;
-<delete_cmd,,9293,,1257346705107990447;
->delete_cmd,,1257346705107999160;
->add_cmd,,1257346705108003614;
->add_prefix_cmd,,1257346705108008125;
-<add_alias_cmd,,9294,,1257346705108019496;
-<lookup_cmd,,9295,,1257346705108034735;
-<lookup_cmd_1,,9296,,1257346705108048656;
-<find_command_name_length,,9297,,1257346705108064364;
->find_command_name_length,,1257346705108072352;
-<find_cmd,,9298,,1257346705108082884;
->find_cmd,,1257346705108090069;
-<lookup_cmd_1,,9299,,1257346705108101365;
-<find_command_name_length,,9300,,1257346705108116666;
->find_command_name_length,,1257346705108124128;
->lookup_cmd_1,,1257346705108128873;
->lookup_cmd_1,,1257346705108133352;
->lookup_cmd,,1257346705108137790;
-<add_cmd,,9301,,1257346705108148262;
-<xmalloc,,9302,,1257346705108162190;
->xmalloc,,1257346705108169041;
-<delete_cmd,,9303,,1257346705108180330;
->delete_cmd,,1257346705108187557;
->add_cmd,,1257346705108191981;
->add_alias_cmd,,1257346705108196604;
-<add_cmd,,9304,,1257346705108208209;
-<xmalloc,,9305,,1257346705108222281;
->xmalloc,,1257346705108229219;
-<delete_cmd,,9306,,1257346705108240392;
->delete_cmd,,1257346705108247507;
->add_cmd,,1257346705108251907;
->_initialize_cp_support,,1257346705108256921;
-<_initialize_cp_namespace,,9307,,1257346705108265047;
-<add_cmd,,9308,,1257346705108280385;
-<xmalloc,,9309,,1257346705108295298;
->xmalloc,,1257346705108302237;
-<delete_cmd,,9310,,1257346705108313656;
->delete_cmd,,1257346705108320847;
->add_cmd,,1257346705108325282;
->_initialize_cp_namespace,,1257346705108330284;
-<_initialize_reggroup,,9311,,1257346705108337637;
-<gdbarch_data_register_post_init,,9312,,1257346705108350172;
-<gdbarch_data_register,,9313,,1257346705108361757;
-<xmalloc,,9314,,1257346705108375735;
->xmalloc,,1257346705108382770;
-<xmalloc,,9315,,1257346705108392486;
->xmalloc,,1257346705108399313;
->gdbarch_data_register,,1257346705108404158;
->gdbarch_data_register_post_init,,1257346705108408348;
-<xmalloc,,9316,,1257346705108418011;
->xmalloc,,1257346705108424870;
-<add_group,,9317,,1257346705108432708;
->add_group,,1257346705108441180;
-<xmalloc,,9318,,1257346705108452199;
->xmalloc,,1257346705108459083;
-<add_group,,9319,,1257346705108466541;
->add_group,,1257346705108473266;
-<xmalloc,,9320,,1257346705108484153;
->xmalloc,,1257346705108490941;
-<add_group,,9321,,1257346705108498501;
->add_group,,1257346705108505292;
-<xmalloc,,9322,,1257346705108516606;
->xmalloc,,1257346705108523568;
-<add_group,,9323,,1257346705108531027;
->add_group,,1257346705108537799;
-<xmalloc,,9324,,1257346705108548981;
->xmalloc,,1257346705108555838;
-<add_group,,9325,,1257346705108563314;
->add_group,,1257346705108570081;
-<xmalloc,,9326,,1257346705108580751;
->xmalloc,,1257346705108587759;
-<add_group,,9327,,1257346705108595413;
->add_group,,1257346705108608968;
-<xmalloc,,9328,,1257346705108623199;
->xmalloc,,1257346705108630712;
-<add_group,,9329,,1257346705108638465;
->add_group,,1257346705108645171;
-<add_cmd,,9330,,1257346705108656954;
-<xmalloc,,9331,,1257346705108671122;
->xmalloc,,1257346705108678229;
-<delete_cmd,,9332,,1257346705108689432;
->delete_cmd,,1257346705108697870;
->add_cmd,,1257346705108702382;
->_initialize_reggroup,,1257346705108707088;
-<_initialize_null_solib,,9333,,1257346705108713675;
->_initialize_null_solib,,1257346705108722573;
-<_initialize_xml_support,,9334,,1257346705108729954;
-<add_setshow_boolean_cmd,,9335,,1257346705108745644;
-<add_setshow_cmd_full,,9336,,1257346705108762629;
-<xstrprintf,,9337,,1257346705108777405;
-<xstrvprintf,,9338,,1257346705108792000;
->xstrvprintf,,1257346705108800108;
->xstrprintf,,1257346705108804676;
-<xstrprintf,,9339,,1257346705108816898;
-<xstrvprintf,,9340,,1257346705108831160;
->xstrvprintf,,1257346705108838850;
->xstrprintf,,1257346705108843421;
-<add_set_or_show_cmd,,9341,,1257346705108855093;
-<add_cmd,,9342,,1257346705108868115;
-<xmalloc,,9343,,1257346705108882283;
->xmalloc,,1257346705108889131;
-<delete_cmd,,9344,,1257346705108900565;
->delete_cmd,,1257346705108909094;
->add_cmd,,1257346705108913711;
->add_set_or_show_cmd,,1257346705108918378;
-<add_set_or_show_cmd,,9345,,1257346705108929698;
-<add_cmd,,9346,,1257346705108943120;
-<xmalloc,,9347,,1257346705108956978;
->xmalloc,,1257346705108963887;
-<delete_cmd,,9348,,1257346705108975047;
->delete_cmd,,1257346705108982157;
->add_cmd,,1257346705108986719;
->add_set_or_show_cmd,,1257346705108991513;
->add_setshow_cmd_full,,1257346705108996367;
->add_setshow_boolean_cmd,,1257346705109001194;
->_initialize_xml_support,,1257346705109006291;
-<_initialize_target_descriptions,,9349,,1257346705109014228;
-<gdbarch_data_register_pre_init,,9350,,1257346705109027175;
-<gdbarch_data_register,,9351,,1257346705109038338;
-<xmalloc,,9352,,1257346705109052536;
->xmalloc,,1257346705109059484;
-<xmalloc,,9353,,1257346705109069123;
->xmalloc,,1257346705109075847;
->gdbarch_data_register,,1257346705109080647;
->gdbarch_data_register_pre_init,,1257346705109084689;
-<add_prefix_cmd,,9354,,1257346705109096691;
-<add_cmd,,9355,,1257346705109110318;
-<xmalloc,,9356,,1257346705109124161;
->xmalloc,,1257346705109130988;
-<delete_cmd,,9357,,1257346705109142654;
->delete_cmd,,1257346705109150500;
->add_cmd,,1257346705109155249;
->add_prefix_cmd,,1257346705109159851;
-<add_prefix_cmd,,9358,,1257346705109171556;
-<add_cmd,,9359,,1257346705109184827;
-<xmalloc,,9360,,1257346705109199146;
->xmalloc,,1257346705109206015;
-<delete_cmd,,9361,,1257346705109217374;
->delete_cmd,,1257346705109225088;
->add_cmd,,1257346705109229776;
->add_prefix_cmd,,1257346705109234347;
-<add_prefix_cmd,,9362,,1257346705109246224;
-<add_cmd,,9363,,1257346705109259887;
-<xmalloc,,9364,,1257346705109273859;
->xmalloc,,1257346705109280770;
-<delete_cmd,,9365,,1257346705109292240;
->delete_cmd,,1257346705109299774;
->add_cmd,,1257346705109304264;
->add_prefix_cmd,,1257346705109308811;
-<add_setshow_filename_cmd,,9366,,1257346705109322781;
-<add_setshow_cmd_full,,9367,,1257346705109339565;
-<xstrprintf,,9368,,1257346705109354431;
-<xstrvprintf,,9369,,1257346705109368485;
->xstrvprintf,,1257346705109376924;
->xstrprintf,,1257346705109381513;
-<xstrprintf,,9370,,1257346705109394111;
-<xstrvprintf,,9371,,1257346705109408360;
->xstrvprintf,,1257346705109416435;
->xstrprintf,,1257346705109421022;
-<add_set_or_show_cmd,,9372,,1257346705109432519;
-<add_cmd,,9373,,1257346705109445701;
-<xmalloc,,9374,,1257346705109459947;
->xmalloc,,1257346705109466774;
-<delete_cmd,,9375,,1257346705109478124;
->delete_cmd,,1257346705109485197;
->add_cmd,,1257346705109489690;
->add_set_or_show_cmd,,1257346705109494358;
-<add_set_or_show_cmd,,9376,,1257346705109505711;
-<add_cmd,,9377,,1257346705109518989;
-<xmalloc,,9378,,1257346705109533214;
->xmalloc,,1257346705109540137;
-<delete_cmd,,9379,,1257346705109551586;
->delete_cmd,,1257346705109558714;
->add_cmd,,1257346705109563135;
->add_set_or_show_cmd,,1257346705109567784;
->add_setshow_cmd_full,,1257346705109572491;
->add_setshow_filename_cmd,,1257346705109577254;
-<add_cmd,,9380,,1257346705109588845;
-<xmalloc,,9381,,1257346705109607492;
->xmalloc,,1257346705109615029;
-<delete_cmd,,9382,,1257346705109626315;
->delete_cmd,,1257346705109633395;
->add_cmd,,1257346705109637855;
-<add_cmd,,9383,,1257346705109649328;
-<xmalloc,,9384,,1257346705109663514;
->xmalloc,,1257346705109670576;
-<delete_cmd,,9385,,1257346705109681950;
->delete_cmd,,1257346705109689156;
->add_cmd,,1257346705109693628;
->_initialize_target_descriptions,,1257346705109698816;
-<_initialize_osdata,,9386,,1257346705109707140;
-<add_info,,9387,,1257346705109722899;
-<add_cmd,,9388,,1257346705109736649;
-<xmalloc,,9389,,1257346705109750525;
->xmalloc,,1257346705109757397;
-<delete_cmd,,9390,,1257346705109768591;
->delete_cmd,,1257346705109777845;
->add_cmd,,1257346705109782401;
->add_info,,1257346705109786786;
->_initialize_osdata,,1257346705109791613;
-<_initialize_record,,9391,,1257346705109799017;
-<add_target,,9392,,1257346705109811161;
-<add_cmd,,9393,,1257346705109824998;
-<xmalloc,,9394,,1257346705109838932;
->xmalloc,,1257346705109845900;
-<delete_cmd,,9395,,1257346705109857488;
->delete_cmd,,1257346705109865207;
->add_cmd,,1257346705109869770;
->add_target,,1257346705109874422;
-<add_target,,9396,,1257346705109881878;
-<add_cmd,,9397,,1257346705109895345;
-<xmalloc,,9398,,1257346705109909296;
->xmalloc,,1257346705109916078;
-<delete_cmd,,9399,,1257346705109927446;
->delete_cmd,,1257346705109934610;
->add_cmd,,1257346705109939133;
->add_target,,1257346705109943554;
-<add_setshow_zinteger_cmd,,9400,,1257346705109957094;
-<add_setshow_cmd_full,,9401,,1257346705109973902;
-<xstrprintf,,9402,,1257346705109988765;
-<xstrvprintf,,9403,,1257346705110002851;
->xstrvprintf,,1257346705110011200;
->xstrprintf,,1257346705110015813;
-<xstrprintf,,9404,,1257346705110027804;
-<xstrvprintf,,9405,,1257346705110042174;
->xstrvprintf,,1257346705110053049;
->xstrprintf,,1257346705110057695;
-<add_set_or_show_cmd,,9406,,1257346705110069054;
-<add_cmd,,9407,,1257346705110082846;
-<xmalloc,,9408,,1257346705110096797;
->xmalloc,,1257346705110103696;
-<delete_cmd,,9409,,1257346705110114950;
->delete_cmd,,1257346705110122198;
->add_cmd,,1257346705110126731;
->add_set_or_show_cmd,,1257346705110131392;
-<add_set_or_show_cmd,,9410,,1257346705110143070;
-<add_cmd,,9411,,1257346705110156212;
-<xmalloc,,9412,,1257346705110170516;
->xmalloc,,1257346705110177324;
-<delete_cmd,,9413,,1257346705110188680;
->delete_cmd,,1257346705110195994;
->add_cmd,,1257346705110200485;
->add_set_or_show_cmd,,1257346705110205131;
->add_setshow_cmd_full,,1257346705110209856;
->add_setshow_zinteger_cmd,,1257346705110213675;
-<add_prefix_cmd,,9414,,1257346705110225543;
-<add_cmd,,9415,,1257346705110239263;
-<xmalloc,,9416,,1257346705110253202;
->xmalloc,,1257346705110260293;
-<delete_cmd,,9417,,1257346705110271695;
->delete_cmd,,1257346705110286650;
->add_cmd,,1257346705110291528;
->add_prefix_cmd,,1257346705110296070;
-<set_cmd_completer,,9418,,1257346705110306659;
->set_cmd_completer,,1257346705110314135;
-<add_com_alias,,9419,,1257346705110325464;
-<add_alias_cmd,,9420,,1257346705110339383;
-<lookup_cmd,,9421,,1257346705110354519;
-<lookup_cmd_1,,9422,,1257346705110367704;
-<find_command_name_length,,9423,,1257346705110382981;
->find_command_name_length,,1257346705110390500;
-<find_cmd,,9424,,1257346705110400906;
->find_cmd,,1257346705110408563;
-<lookup_cmd_1,,9425,,1257346705110419711;
-<find_command_name_length,,9426,,1257346705110435235;
->find_command_name_length,,1257346705110442607;
->lookup_cmd_1,,1257346705110447205;
->lookup_cmd_1,,1257346705110451650;
->lookup_cmd,,1257346705110456146;
-<add_cmd,,9427,,1257346705110466510;
-<xmalloc,,9428,,1257346705110481048;
->xmalloc,,1257346705110488052;
-<delete_cmd,,9429,,1257346705110499444;
->delete_cmd,,1257346705110507702;
->add_cmd,,1257346705110512532;
->add_alias_cmd,,1257346705110517007;
->add_com_alias,,1257346705110521537;
-<add_prefix_cmd,,9430,,1257346705110533211;
-<add_cmd,,9431,,1257346705110546342;
-<xmalloc,,9432,,1257346705110560362;
->xmalloc,,1257346705110567310;
-<delete_cmd,,9433,,1257346705110578587;
->delete_cmd,,1257346705110586581;
->add_cmd,,1257346705110591285;
->add_prefix_cmd,,1257346705110595796;
-<add_alias_cmd,,9434,,1257346705110611388;
-<lookup_cmd,,9435,,1257346705110626450;
-<lookup_cmd_1,,9436,,1257346705110640214;
-<find_command_name_length,,9437,,1257346705110655592;
->find_command_name_length,,1257346705110662990;
-<find_cmd,,9438,,1257346705110673853;
->find_cmd,,1257346705110681296;
-<lookup_cmd_1,,9439,,1257346705110691969;
-<find_command_name_length,,9440,,1257346705110707584;
->find_command_name_length,,1257346705110714949;
->lookup_cmd_1,,1257346705110719584;
->lookup_cmd_1,,1257346705110724083;
->lookup_cmd,,1257346705110728480;
-<add_cmd,,9441,,1257346705110739300;
-<xmalloc,,9442,,1257346705110753327;
->xmalloc,,1257346705110760322;
-<delete_cmd,,9443,,1257346705110771606;
->delete_cmd,,1257346705110779368;
->add_cmd,,1257346705110784093;
->add_alias_cmd,,1257346705110788646;
-<add_prefix_cmd,,9444,,1257346705110800408;
-<add_cmd,,9445,,1257346705110813551;
-<xmalloc,,9446,,1257346705110827776;
->xmalloc,,1257346705110834687;
-<delete_cmd,,9447,,1257346705110845862;
->delete_cmd,,1257346705110853715;
->add_cmd,,1257346705110858382;
->add_prefix_cmd,,1257346705110862933;
-<add_alias_cmd,,9448,,1257346705110873799;
-<lookup_cmd,,9449,,1257346705110888469;
-<lookup_cmd_1,,9450,,1257346705110901807;
-<find_command_name_length,,9451,,1257346705110917124;
->find_command_name_length,,1257346705110924552;
-<find_cmd,,9452,,1257346705110934928;
->find_cmd,,1257346705110942232;
-<lookup_cmd_1,,9453,,1257346705110953119;
-<find_command_name_length,,9454,,1257346705110968638;
->find_command_name_length,,1257346705110976015;
->lookup_cmd_1,,1257346705110980580;
->lookup_cmd_1,,1257346705110985007;
->lookup_cmd,,1257346705110989395;
-<add_cmd,,9455,,1257346705110999864;
-<xmalloc,,9456,,1257346705111013800;
->xmalloc,,1257346705111020696;
-<delete_cmd,,9457,,1257346705111031899;
->delete_cmd,,1257346705111039607;
->add_cmd,,1257346705111044338;
->add_alias_cmd,,1257346705111048789;
-<add_prefix_cmd,,9458,,1257346705111060755;
-<add_cmd,,9459,,1257346705111074256;
-<xmalloc,,9460,,1257346705111088162;
->xmalloc,,1257346705111095028;
-<delete_cmd,,9461,,1257346705111106462;
->delete_cmd,,1257346705111114131;
->add_cmd,,1257346705111118736;
->add_prefix_cmd,,1257346705111123349;
-<add_alias_cmd,,9462,,1257346705111134206;
-<lookup_cmd,,9463,,1257346705111149426;
-<lookup_cmd_1,,9464,,1257346705111162614;
-<find_command_name_length,,9465,,1257346705111177705;
->find_command_name_length,,1257346705111185040;
-<find_cmd,,9466,,1257346705111195386;
->find_cmd,,1257346705111202583;
-<lookup_cmd_1,,9467,,1257346705111213286;
-<find_command_name_length,,9468,,1257346705111228654;
->find_command_name_length,,1257346705111235947;
->lookup_cmd_1,,1257346705111240617;
->lookup_cmd_1,,1257346705111245255;
->lookup_cmd,,1257346705111249649;
-<add_cmd,,9469,,1257346705111260349;
-<xmalloc,,9470,,1257346705111274210;
->xmalloc,,1257346705111281043;
-<delete_cmd,,9471,,1257346705111292207;
->delete_cmd,,1257346705111299653;
->add_cmd,,1257346705111304270;
->add_alias_cmd,,1257346705111308727;
-<add_cmd,,9472,,1257346705111319965;
-<xmalloc,,9473,,1257346705111334040;
->xmalloc,,1257346705111341021;
-<delete_cmd,,9474,,1257346705111352226;
->delete_cmd,,1257346705111359363;
->add_cmd,,1257346705111363817;
-<set_cmd_completer,,9475,,1257346705111374231;
->set_cmd_completer,,1257346705111381470;
-<add_cmd,,9476,,1257346705111393238;
-<xmalloc,,9477,,1257346705111407199;
->xmalloc,,1257346705111414188;
-<delete_cmd,,9478,,1257346705111425923;
->delete_cmd,,1257346705111433075;
->add_cmd,,1257346705111437463;
-<set_cmd_completer,,9479,,1257346705111448292;
->set_cmd_completer,,1257346705111455339;
-<add_cmd,,9480,,1257346705111466812;
-<xmalloc,,9481,,1257346705111480770;
->xmalloc,,1257346705111487726;
-<delete_cmd,,9482,,1257346705111498919;
->delete_cmd,,1257346705111505975;
->add_cmd,,1257346705111510447;
-<add_alias_cmd,,9483,,1257346705111521830;
-<lookup_cmd,,9484,,1257346705111536350;
-<lookup_cmd_1,,9485,,1257346705111550106;
-<find_command_name_length,,9486,,1257346705111565266;
->find_command_name_length,,1257346705111572683;
-<find_cmd,,9487,,1257346705111583082;
->find_cmd,,1257346705111589957;
->lookup_cmd_1,,1257346705111594634;
->lookup_cmd,,1257346705111599184;
-<add_cmd,,9488,,1257346705111613683;
-<xmalloc,,9489,,1257346705111627731;
->xmalloc,,1257346705111634636;
-<delete_cmd,,9490,,1257346705111645893;
->delete_cmd,,1257346705111652981;
->add_cmd,,1257346705111657471;
->add_alias_cmd,,1257346705111662067;
-<add_alias_cmd,,9491,,1257346705111672897;
-<lookup_cmd,,9492,,1257346705111687392;
-<lookup_cmd_1,,9493,,1257346705111700706;
-<find_command_name_length,,9494,,1257346705111716119;
->find_command_name_length,,1257346705111723490;
-<find_cmd,,9495,,1257346705111734098;
->find_cmd,,1257346705111741117;
->lookup_cmd_1,,1257346705111745664;
->lookup_cmd,,1257346705111750136;
-<add_cmd,,9496,,1257346705111761098;
-<xmalloc,,9497,,1257346705111774797;
->xmalloc,,1257346705111781639;
-<delete_cmd,,9498,,1257346705111792793;
->delete_cmd,,1257346705111799960;
->add_cmd,,1257346705111804414;
->add_alias_cmd,,1257346705111808919;
-<add_cmd,,9499,,1257346705111820242;
-<xmalloc,,9500,,1257346705111834314;
->xmalloc,,1257346705111841345;
-<delete_cmd,,9501,,1257346705111852647;
->delete_cmd,,1257346705111859841;
->add_cmd,,1257346705111864292;
-<add_alias_cmd,,9502,,1257346705111875137;
-<lookup_cmd,,9503,,1257346705111889500;
-<lookup_cmd_1,,9504,,1257346705111902778;
-<find_command_name_length,,9505,,1257346705111918089;
->find_command_name_length,,1257346705111925517;
-<find_cmd,,9506,,1257346705111935890;
->find_cmd,,1257346705111942888;
->lookup_cmd_1,,1257346705111947397;
->lookup_cmd,,1257346705111951811;
-<add_cmd,,9507,,1257346705111962214;
-<xmalloc,,9508,,1257346705111975814;
->xmalloc,,1257346705111982731;
-<delete_cmd,,9509,,1257346705111994021;
->delete_cmd,,1257346705112001169;
->add_cmd,,1257346705112005599;
->add_alias_cmd,,1257346705112010107;
-<add_setshow_boolean_cmd,,9510,,1257346705112023211;
-<add_setshow_cmd_full,,9511,,1257346705112040016;
-<xstrprintf,,9512,,1257346705112054972;
-<xstrvprintf,,9513,,1257346705112069071;
->xstrvprintf,,1257346705112078024;
->xstrprintf,,1257346705112082665;
-<xstrprintf,,9514,,1257346705112095200;
-<xstrvprintf,,9515,,1257346705112109692;
->xstrvprintf,,1257346705112117978;
->xstrprintf,,1257346705112122528;
-<add_set_or_show_cmd,,9516,,1257346705112133959;
-<add_cmd,,9517,,1257346705112147360;
-<xmalloc,,9518,,1257346705112161366;
->xmalloc,,1257346705112168211;
-<delete_cmd,,9519,,1257346705112179426;
->delete_cmd,,1257346705112186508;
->add_cmd,,1257346705112190911;
->add_set_or_show_cmd,,1257346705112195530;
-<add_set_or_show_cmd,,9520,,1257346705112207241;
-<add_cmd,,9521,,1257346705112220218;
-<xmalloc,,9522,,1257346705112234158;
->xmalloc,,1257346705112241003;
-<delete_cmd,,9523,,1257346705112252296;
->delete_cmd,,1257346705112259288;
->add_cmd,,1257346705112263862;
->add_set_or_show_cmd,,1257346705112268581;
->add_setshow_cmd_full,,1257346705112273381;
->add_setshow_boolean_cmd,,1257346705112278168;
-<add_setshow_uinteger_cmd,,9524,,1257346705112293025;
-<add_setshow_cmd_full,,9525,,1257346705112309566;
-<xstrprintf,,9526,,1257346705112324543;
-<xstrvprintf,,9527,,1257346705112338503;
->xstrvprintf,,1257346705112346593;
->xstrprintf,,1257346705112351165;
-<xstrprintf,,9528,,1257346705112363745;
-<xstrvprintf,,9529,,1257346705112378000;
->xstrvprintf,,1257346705112386138;
->xstrprintf,,1257346705112390697;
-<add_set_or_show_cmd,,9530,,1257346705112402138;
-<add_cmd,,9531,,1257346705112415334;
-<xmalloc,,9532,,1257346705112429454;
->xmalloc,,1257346705112436269;
-<delete_cmd,,9533,,1257346705112447426;
->delete_cmd,,1257346705112454524;
->add_cmd,,1257346705112458942;
->add_set_or_show_cmd,,1257346705112463579;
-<add_set_or_show_cmd,,9534,,1257346705112475032;
-<add_cmd,,9535,,1257346705112488093;
-<xmalloc,,9536,,1257346705112501945;
->xmalloc,,1257346705112508781;
-<delete_cmd,,9537,,1257346705112520513;
->delete_cmd,,1257346705112527686;
->add_cmd,,1257346705112532080;
->add_set_or_show_cmd,,1257346705112536741;
->add_setshow_cmd_full,,1257346705112541541;
->add_setshow_uinteger_cmd,,1257346705112545550;
->_initialize_record,,1257346705112550639;
-<_initialize_gcore,,9538,,1257346705112558590;
-<add_com,,9539,,1257346705112577266;
-<add_cmd,,9540,,1257346705112590697;
-<xmalloc,,9541,,1257346705112608615;
->xmalloc,,1257346705112616106;
-<delete_cmd,,9542,,1257346705112627387;
->delete_cmd,,1257346705112636713;
->add_cmd,,1257346705112641396;
->add_com,,1257346705112645780;
-<add_com_alias,,9543,,1257346705112656162;
-<add_alias_cmd,,9544,,1257346705112669912;
-<lookup_cmd,,9545,,1257346705112684182;
-<lookup_cmd_1,,9546,,1257346705112697234;
-<find_command_name_length,,9547,,1257346705112712536;
->find_command_name_length,,1257346705112719950;
-<find_cmd,,9548,,1257346705112730379;
->find_cmd,,1257346705112737726;
->lookup_cmd_1,,1257346705112742262;
->lookup_cmd,,1257346705112746722;
-<add_cmd,,9549,,1257346705112757208;
-<xmalloc,,9550,,1257346705112771229;
->xmalloc,,1257346705112778140;
-<delete_cmd,,9551,,1257346705112789223;
->delete_cmd,,1257346705112797325;
->add_cmd,,1257346705112802013;
->add_alias_cmd,,1257346705112806518;
->add_com_alias,,1257346705112811063;
-<exec_set_find_memory_regions,,9552,,1257346705112825248;
->exec_set_find_memory_regions,,1257346705112834566;
->_initialize_gcore,,1257346705112839591;
-<_initialize_jit,,9553,,1257346705112847362;
-<observer_attach_inferior_created,,9554,,1257346705112866429;
-<generic_observer_attach,,9555,,1257346705112884306;
-<xmalloc,,9556,,1257346705112898422;
->xmalloc,,1257346705112905439;
-<xmalloc,,9557,,1257346705112914960;
->xmalloc,,1257346705112921649;
->generic_observer_attach,,1257346705112926418;
->observer_attach_inferior_created,,1257346705112930746;
-<observer_attach_inferior_exit,,9558,,1257346705112945098;
-<generic_observer_attach,,9559,,1257346705112962222;
-<xmalloc,,9560,,1257346705112975978;
->xmalloc,,1257346705112982856;
-<xmalloc,,9561,,1257346705112992666;
->xmalloc,,1257346705112999454;
->generic_observer_attach,,1257346705113004347;
->observer_attach_inferior_exit,,1257346705113008771;
-<register_objfile_data,,9562,,1257346705113023131;
-<register_objfile_data_with_cleanup,,9563,,1257346705113038698;
-<xmalloc,,9564,,1257346705113053181;
->xmalloc,,1257346705113060153;
-<xmalloc,,9565,,1257346705113069500;
->xmalloc,,1257346705113076204;
->register_objfile_data_with_cleanup,,1257346705113081485;
->register_objfile_data,,1257346705113086387;
->_initialize_jit,,1257346705113091087;
-<_initialize_inflow,,9566,,1257346705113105129;
-<add_info,,9567,,1257346705113120804;
-<add_cmd,,9568,,1257346705113134051;
-<xmalloc,,9569,,1257346705113147675;
->xmalloc,,1257346705113154565;
-<delete_cmd,,9570,,1257346705113165605;
->delete_cmd,,1257346705113173418;
->add_cmd,,1257346705113178044;
->add_info,,1257346705113182378;
-<observer_attach_inferior_exit,,9571,,1257346705113196428;
-<generic_observer_attach,,9572,,1257346705113213826;
-<xmalloc,,9573,,1257346705113227622;
->xmalloc,,1257346705113234722;
-<xmalloc,,9574,,1257346705113244217;
->xmalloc,,1257346705113251058;
->generic_observer_attach,,1257346705113255924;
->observer_attach_inferior_exit,,1257346705113259957;
-<register_inferior_data_with_cleanup,,9575,,1257346705113273397;
-<xmalloc,,9576,,1257346705113288477;
->xmalloc,,1257346705113295433;
-<xmalloc,,9577,,1257346705113305078;
->xmalloc,,1257346705113311899;
->register_inferior_data_with_cleanup,,1257346705113317276;
->_initialize_inflow,,1257346705113322193;
-<_initialize_cli_dump,,9578,,1257346705113333570;
-<add_prefix_cmd,,9579,,1257346705113349227;
-<add_cmd,,9580,,1257346705113362366;
-<xmalloc,,9581,,1257346705113376128;
->xmalloc,,1257346705113383009;
-<delete_cmd,,9582,,1257346705113394080;
->delete_cmd,,1257346705113402284;
->add_cmd,,1257346705113407084;
->add_prefix_cmd,,1257346705113411613;
-<add_prefix_cmd,,9583,,1257346705113422990;
-<add_cmd,,9584,,1257346705113436247;
-<xmalloc,,9585,,1257346705113450099;
->xmalloc,,1257346705113456962;
-<delete_cmd,,9586,,1257346705113468017;
->delete_cmd,,1257346705113477852;
->add_cmd,,1257346705113482459;
->add_prefix_cmd,,1257346705113487027;
-<add_dump_command,,9587,,1257346705113497938;
-<add_cmd,,9588,,1257346705113512708;
-<xmalloc,,9589,,1257346705113526340;
->xmalloc,,1257346705113533266;
-<delete_cmd,,9590,,1257346705113544319;
->delete_cmd,,1257346705113551392;
->add_cmd,,1257346705113555846;
-<xmalloc,,9591,,1257346705113567031;
->xmalloc,,1257346705113574077;
-<set_cmd_context,,9592,,1257346705113586380;
->set_cmd_context,,1257346705113593827;
-<add_cmd,,9593,,1257346705113608469;
-<xmalloc,,9594,,1257346705113622622;
->xmalloc,,1257346705113629608;
-<delete_cmd,,9595,,1257346705113640655;
->delete_cmd,,1257346705113647782;
->add_cmd,,1257346705113652251;
-<xmalloc,,9596,,1257346705113663358;
->xmalloc,,1257346705113670476;
-<set_cmd_context,,9597,,1257346705113682037;
->set_cmd_context,,1257346705113689246;
-<concat,,9598,,1257346705113694406;
-<xmalloc,,9599,,1257346705113707717;
->xmalloc,,1257346705113717552;
->concat,,1257346705113722330;
->add_dump_command,,1257346705113727187;
-<add_dump_command,,9600,,1257346705113737470;
-<add_cmd,,9601,,1257346705113750522;
-<xmalloc,,9602,,1257346705113763962;
->xmalloc,,1257346705113770759;
-<delete_cmd,,9603,,1257346705113781667;
->delete_cmd,,1257346705113788849;
->add_cmd,,1257346705113793306;
-<xmalloc,,9604,,1257346705113804415;
->xmalloc,,1257346705113811389;
-<set_cmd_context,,9605,,1257346705113822616;
->set_cmd_context,,1257346705113829993;
-<add_cmd,,9606,,1257346705113840444;
-<xmalloc,,9607,,1257346705113853869;
->xmalloc,,1257346705113860732;
-<delete_cmd,,9608,,1257346705113871718;
->delete_cmd,,1257346705113878717;
->add_cmd,,1257346705113883092;
-<xmalloc,,9609,,1257346705113894091;
->xmalloc,,1257346705113901059;
-<set_cmd_context,,9610,,1257346705113912195;
->set_cmd_context,,1257346705113919356;
-<concat,,9611,,1257346705113924309;
-<xmalloc,,9612,,1257346705113937710;
->xmalloc,,1257346705113944706;
->concat,,1257346705113949313;
->add_dump_command,,1257346705113953923;
-<add_prefix_cmd,,9613,,1257346705113965574;
-<add_cmd,,9614,,1257346705113978732;
-<xmalloc,,9615,,1257346705113992250;
->xmalloc,,1257346705113999104;
-<delete_cmd,,9616,,1257346705114010226;
->delete_cmd,,1257346705114017302;
->add_cmd,,1257346705114021729;
->add_prefix_cmd,,1257346705114026246;
-<add_prefix_cmd,,9617,,1257346705114037665;
-<add_cmd,,9618,,1257346705114050678;
-<xmalloc,,9619,,1257346705114064251;
->xmalloc,,1257346705114071054;
-<delete_cmd,,9620,,1257346705114081917;
->delete_cmd,,1257346705114089041;
->add_cmd,,1257346705114093444;
->add_prefix_cmd,,1257346705114097964;
-<add_prefix_cmd,,9621,,1257346705114109450;
-<add_cmd,,9622,,1257346705114122556;
-<xmalloc,,9623,,1257346705114136077;
->xmalloc,,1257346705114142892;
-<delete_cmd,,9624,,1257346705114153779;
->delete_cmd,,1257346705114160880;
->add_cmd,,1257346705114165373;
->add_prefix_cmd,,1257346705114169869;
-<add_prefix_cmd,,9625,,1257346705114181465;
-<add_cmd,,9626,,1257346705114194695;
-<xmalloc,,9627,,1257346705114208325;
->xmalloc,,1257346705114215200;
-<delete_cmd,,9628,,1257346705114226156;
->delete_cmd,,1257346705114233425;
->add_cmd,,1257346705114237834;
->add_prefix_cmd,,1257346705114242474;
-<add_prefix_cmd,,9629,,1257346705114253668;
-<add_cmd,,9630,,1257346705114267000;
-<xmalloc,,9631,,1257346705114280557;
->xmalloc,,1257346705114287414;
-<delete_cmd,,9632,,1257346705114298599;
->delete_cmd,,1257346705114305669;
->add_cmd,,1257346705114310081;
->add_prefix_cmd,,1257346705114314604;
-<add_cmd,,9633,,1257346705114325861;
-<xmalloc,,9634,,1257346705114339608;
->xmalloc,,1257346705114346528;
-<delete_cmd,,9635,,1257346705114357574;
->delete_cmd,,1257346705114364567;
->add_cmd,,1257346705114369033;
-<add_cmd,,9636,,1257346705114380308;
-<xmalloc,,9637,,1257346705114394127;
->xmalloc,,1257346705114401038;
-<delete_cmd,,9638,,1257346705114412126;
->delete_cmd,,1257346705114419293;
->add_cmd,,1257346705114423708;
-<add_cmd,,9639,,1257346705114434880;
-<xmalloc,,9640,,1257346705114448591;
->xmalloc,,1257346705114455592;
-<delete_cmd,,9641,,1257346705114466521;
->delete_cmd,,1257346705114473688;
->add_cmd,,1257346705114478043;
-<add_cmd,,9642,,1257346705114489613;
-<xmalloc,,9643,,1257346705114503423;
->xmalloc,,1257346705114510355;
-<delete_cmd,,9644,,1257346705114521455;
->delete_cmd,,1257346705114528568;
->add_cmd,,1257346705114532971;
-<add_cmd,,9645,,1257346705114544294;
-<xmalloc,,9646,,1257346705114557975;
->xmalloc,,1257346705114564876;
-<delete_cmd,,9647,,1257346705114576124;
->delete_cmd,,1257346705114583159;
->add_cmd,,1257346705114587673;
-<add_cmd,,9648,,1257346705114598957;
-<xmalloc,,9649,,1257346705114617204;
->xmalloc,,1257346705114624368;
-<delete_cmd,,9650,,1257346705114635339;
->delete_cmd,,1257346705114642430;
->add_cmd,,1257346705114646839;
-<add_cmd,,9651,,1257346705114658147;
-<xmalloc,,9652,,1257346705114672375;
->xmalloc,,1257346705114679410;
-<delete_cmd,,9653,,1257346705114690327;
->delete_cmd,,1257346705114697409;
->add_cmd,,1257346705114701767;
-<add_cmd,,9654,,1257346705114713634;
-<xmalloc,,9655,,1257346705114727393;
->xmalloc,,1257346705114734346;
-<delete_cmd,,9656,,1257346705114745567;
->delete_cmd,,1257346705114752673;
->add_cmd,,1257346705114757092;
-<add_cmd,,9657,,1257346705114768261;
-<xmalloc,,9658,,1257346705114781966;
->xmalloc,,1257346705114788814;
-<delete_cmd,,9659,,1257346705114799794;
->delete_cmd,,1257346705114806915;
->add_cmd,,1257346705114811309;
-<add_cmd,,9660,,1257346705114822404;
-<xmalloc,,9661,,1257346705114836091;
->xmalloc,,1257346705114843119;
-<delete_cmd,,9662,,1257346705114854066;
->delete_cmd,,1257346705114861157;
->add_cmd,,1257346705114865539;
-<add_com,,9663,,1257346705114878279;
-<add_cmd,,9664,,1257346705114891115;
-<xmalloc,,9665,,1257346705114904822;
->xmalloc,,1257346705114911628;
-<delete_cmd,,9666,,1257346705114922548;
->delete_cmd,,1257346705114931282;
->add_cmd,,1257346705114936211;
->add_com,,1257346705114940575;
->_initialize_cli_dump,,1257346705114945432;
-<_initialize_cli_logging,,9667,,1257346705114956316;
-<add_prefix_cmd,,9668,,1257346705114971954;
-<add_cmd,,9669,,1257346705114985039;
-<xmalloc,,9670,,1257346705114999196;
->xmalloc,,1257346705115006085;
-<delete_cmd,,9671,,1257346705115017427;
->delete_cmd,,1257346705115026286;
->add_cmd,,1257346705115030888;
->add_prefix_cmd,,1257346705115035468;
-<add_prefix_cmd,,9672,,1257346705115047308;
-<add_cmd,,9673,,1257346705115060833;
-<xmalloc,,9674,,1257346705115074309;
->xmalloc,,1257346705115081259;
-<delete_cmd,,9675,,1257346705115092167;
->delete_cmd,,1257346705115100801;
->add_cmd,,1257346705115105412;
->add_prefix_cmd,,1257346705115109974;
-<add_setshow_boolean_cmd,,9676,,1257346705115122482;
-<add_setshow_cmd_full,,9677,,1257346705115139116;
-<xstrprintf,,9678,,1257346705115153600;
-<xstrvprintf,,9679,,1257346705115167257;
->xstrvprintf,,1257346705115175211;
->xstrprintf,,1257346705115179800;
-<xstrprintf,,9680,,1257346705115191578;
-<xstrvprintf,,9681,,1257346705115205490;
->xstrvprintf,,1257346705115213120;
->xstrprintf,,1257346705115217679;
-<add_set_or_show_cmd,,9682,,1257346705115229140;
-<add_cmd,,9683,,1257346705115241922;
-<xmalloc,,9684,,1257346705115255471;
->xmalloc,,1257346705115262258;
-<delete_cmd,,9685,,1257346705115273109;
->delete_cmd,,1257346705115280282;
->add_cmd,,1257346705115284853;
->add_set_or_show_cmd,,1257346705115289536;
-<add_set_or_show_cmd,,9686,,1257346705115301508;
-<add_cmd,,9687,,1257346705115314245;
-<xmalloc,,9688,,1257346705115327865;
->xmalloc,,1257346705115334668;
-<delete_cmd,,9689,,1257346705115345492;
->delete_cmd,,1257346705115352544;
->add_cmd,,1257346705115357004;
->add_set_or_show_cmd,,1257346705115361702;
->add_setshow_cmd_full,,1257346705115366475;
->add_setshow_boolean_cmd,,1257346705115371295;
-<add_setshow_boolean_cmd,,9690,,1257346705115383764;
-<add_setshow_cmd_full,,9691,,1257346705115400585;
-<xstrprintf,,9692,,1257346705115414981;
-<xstrvprintf,,9693,,1257346705115429038;
->xstrvprintf,,1257346705115437246;
->xstrprintf,,1257346705115441829;
-<xstrprintf,,9694,,1257346705115453651;
-<xstrvprintf,,9695,,1257346705115467437;
->xstrvprintf,,1257346705115475485;
->xstrprintf,,1257346705115480068;
-<add_set_or_show_cmd,,9696,,1257346705115491903;
-<add_cmd,,9697,,1257346705115504847;
-<xmalloc,,9698,,1257346705115518798;
->xmalloc,,1257346705115525709;
-<delete_cmd,,9699,,1257346705115536590;
->delete_cmd,,1257346705115543699;
->add_cmd,,1257346705115548132;
->add_set_or_show_cmd,,1257346705115552815;
-<add_set_or_show_cmd,,9700,,1257346705115564412;
-<add_cmd,,9701,,1257346705115577247;
-<xmalloc,,9702,,1257346705115590727;
->xmalloc,,1257346705115597560;
-<delete_cmd,,9703,,1257346705115615122;
->delete_cmd,,1257346705115626472;
->add_cmd,,1257346705115631064;
->add_set_or_show_cmd,,1257346705115635753;
->add_setshow_cmd_full,,1257346705115640528;
->add_setshow_boolean_cmd,,1257346705115645370;
-<add_setshow_filename_cmd,,9704,,1257346705115659785;
-<add_setshow_cmd_full,,9705,,1257346705115676293;
-<xstrprintf,,9706,,1257346705115690500;
-<xstrvprintf,,9707,,1257346705115704539;
->xstrvprintf,,1257346705115712394;
->xstrprintf,,1257346705115716974;
-<xstrprintf,,9708,,1257346705115728592;
-<xstrvprintf,,9709,,1257346705115742968;
->xstrvprintf,,1257346705115750612;
->xstrprintf,,1257346705115755187;
-<add_set_or_show_cmd,,9710,,1257346705115766937;
-<add_cmd,,9711,,1257346705115779974;
-<xmalloc,,9712,,1257346705115793408;
->xmalloc,,1257346705115804686;
-<delete_cmd,,9713,,1257346705115815883;
->delete_cmd,,1257346705115823089;
->add_cmd,,1257346705115827594;
->add_set_or_show_cmd,,1257346705115832258;
-<add_set_or_show_cmd,,9714,,1257346705115843825;
-<add_cmd,,9715,,1257346705115856588;
-<xmalloc,,9716,,1257346705115870155;
->xmalloc,,1257346705115876964;
-<delete_cmd,,9717,,1257346705115887751;
->delete_cmd,,1257346705115894855;
->add_cmd,,1257346705115899279;
->add_set_or_show_cmd,,1257346705115903979;
->add_setshow_cmd_full,,1257346705115908770;
->add_setshow_filename_cmd,,1257346705115913624;
-<add_cmd,,9718,,1257346705115925034;
-<xmalloc,,9719,,1257346705115938805;
->xmalloc,,1257346705115945786;
-<delete_cmd,,9720,,1257346705115956742;
->delete_cmd,,1257346705115963926;
->add_cmd,,1257346705115968326;
-<add_cmd,,9721,,1257346705115979484;
-<xmalloc,,9722,,1257346705115993348;
->xmalloc,,1257346705116000283;
-<delete_cmd,,9723,,1257346705116011251;
->delete_cmd,,1257346705116018523;
->add_cmd,,1257346705116022956;
-<xstrdup,,9724,,1257346705116027582;
-<xmalloc,,9725,,1257346705116040881;
->xmalloc,,1257346705116047758;
->xstrdup,,1257346705116052288;
->_initialize_cli_logging,,1257346705116057409;
-<_initialize_cli_interp,,9726,,1257346705116068612;
-<cli_out_new,,9727,,1257346705116079517;
-<xmalloc,,9728,,1257346705116094563;
->xmalloc,,1257346705116101651;
-<ui_out_new,,9729,,1257346705116110650;
-<xmalloc,,9730,,1257346705116124592;
->xmalloc,,1257346705116131567;
->ui_out_new,,1257346705116136348;
->cli_out_new,,1257346705116141037;
-<interp_new,,9731,,1257346705116149656;
-<xmalloc,,9732,,1257346705116164338;
->xmalloc,,1257346705116171370;
-<xstrdup,,9733,,1257346705116176125;
-<xmalloc,,9734,,1257346705116188148;
->xmalloc,,1257346705116195086;
->xstrdup,,1257346705116199561;
->interp_new,,1257346705116204220;
-<interp_add,,9735,,1257346705116212412;
-<interp_lookup,,9736,,1257346705116225997;
->interp_lookup,,1257346705116234628;
->interp_add,,1257346705116239347;
->_initialize_cli_interp,,1257346705116244270;
-<_initialize_mi_out,,9737,,1257346705116255145;
->_initialize_mi_out,,1257346705116263848;
-<_initialize_mi_cmds,,9738,,1257346705116274425;
-<xmalloc,,9739,,1257346705116287448;
->xmalloc,,1257346705116294882;
-<lookup_table,,9740,,1257346705116305630;
->lookup_table,,1257346705116314430;
-<lookup_table,,9741,,1257346705116322204;
->lookup_table,,1257346705116329242;
-<lookup_table,,9742,,1257346705116337178;
->lookup_table,,1257346705116344168;
-<lookup_table,,9743,,1257346705116351821;
->lookup_table,,1257346705116358696;
-<lookup_table,,9744,,1257346705116366669;
->lookup_table,,1257346705116373634;
-<lookup_table,,9745,,1257346705116381141;
->lookup_table,,1257346705116388064;
-<lookup_table,,9746,,1257346705116395709;
->lookup_table,,1257346705116402674;
-<lookup_table,,9747,,1257346705116410343;
->lookup_table,,1257346705116417435;
-<lookup_table,,9748,,1257346705116425076;
->lookup_table,,1257346705116431966;
-<lookup_table,,9749,,1257346705116439479;
->lookup_table,,1257346705116446480;
-<lookup_table,,9750,,1257346705116454423;
->lookup_table,,1257346705116461463;
-<lookup_table,,9751,,1257346705116468940;
->lookup_table,,1257346705116475956;
-<lookup_table,,9752,,1257346705116483721;
->lookup_table,,1257346705116490753;
-<lookup_table,,9753,,1257346705116498331;
->lookup_table,,1257346705116505284;
-<lookup_table,,9754,,1257346705116512872;
->lookup_table,,1257346705116519832;
-<lookup_table,,9755,,1257346705116527272;
->lookup_table,,1257346705116534312;
-<lookup_table,,9756,,1257346705116541945;
->lookup_table,,1257346705116548964;
-<lookup_table,,9757,,1257346705116556561;
->lookup_table,,1257346705116563701;
-<lookup_table,,9758,,1257346705116571225;
->lookup_table,,1257346705116578109;
-<lookup_table,,9759,,1257346705116585691;
->lookup_table,,1257346705116592704;
-<lookup_table,,9760,,1257346705116604640;
->lookup_table,,1257346705116612327;
-<lookup_table,,9761,,1257346705116620309;
->lookup_table,,1257346705116627371;
-<lookup_table,,9762,,1257346705116634907;
->lookup_table,,1257346705116641957;
-<lookup_table,,9763,,1257346705116649638;
->lookup_table,,1257346705116656672;
-<lookup_table,,9764,,1257346705116664344;
->lookup_table,,1257346705116671420;
-<lookup_table,,9765,,1257346705116679267;
->lookup_table,,1257346705116686223;
-<lookup_table,,9766,,1257346705116693805;
->lookup_table,,1257346705116700761;
-<lookup_table,,9767,,1257346705116708370;
->lookup_table,,1257346705116715269;
-<lookup_table,,9768,,1257346705116723091;
->lookup_table,,1257346705116730029;
-<lookup_table,,9769,,1257346705116737626;
->lookup_table,,1257346705116744654;
-<lookup_table,,9770,,1257346705116752065;
->lookup_table,,1257346705116759129;
-<lookup_table,,9771,,1257346705116766687;
->lookup_table,,1257346705116773706;
-<lookup_table,,9772,,1257346705116781077;
->lookup_table,,1257346705116787922;
-<lookup_table,,9773,,1257346705116795396;
->lookup_table,,1257346705116802397;
-<lookup_table,,9774,,1257346705116809858;
->lookup_table,,1257346705116816893;
-<lookup_table,,9775,,1257346705116824405;
->lookup_table,,1257346705116831358;
-<lookup_table,,9776,,1257346705116838796;
->lookup_table,,1257346705116845773;
-<lookup_table,,9777,,1257346705116853379;
->lookup_table,,1257346705116860272;
-<lookup_table,,9778,,1257346705116867878;
->lookup_table,,1257346705116874966;
-<lookup_table,,9779,,1257346705116882410;
->lookup_table,,1257346705116889573;
-<lookup_table,,9780,,1257346705116897029;
->lookup_table,,1257346705116904000;
-<lookup_table,,9781,,1257346705116911494;
->lookup_table,,1257346705116918433;
-<lookup_table,,9782,,1257346705116926138;
->lookup_table,,1257346705116933037;
-<lookup_table,,9783,,1257346705116940441;
->lookup_table,,1257346705116947304;
-<lookup_table,,9784,,1257346705116955021;
->lookup_table,,1257346705116961923;
-<lookup_table,,9785,,1257346705116969459;
->lookup_table,,1257346705116976455;
-<lookup_table,,9786,,1257346705116983817;
->lookup_table,,1257346705116990761;
-<lookup_table,,9787,,1257346705116998662;
->lookup_table,,1257346705117005717;
-<lookup_table,,9788,,1257346705117013073;
->lookup_table,,1257346705117020123;
-<lookup_table,,9789,,1257346705117027725;
->lookup_table,,1257346705117034799;
-<lookup_table,,9790,,1257346705117042769;
->lookup_table,,1257346705117049725;
-<lookup_table,,9791,,1257346705117057225;
->lookup_table,,1257346705117064149;
-<lookup_table,,9792,,1257346705117071631;
->lookup_table,,1257346705117078524;
-<lookup_table,,9793,,1257346705117086677;
->lookup_table,,1257346705117093639;
-<lookup_table,,9794,,1257346705117101062;
->lookup_table,,1257346705117108009;
-<lookup_table,,9795,,1257346705117115723;
->lookup_table,,1257346705117122697;
-<lookup_table,,9796,,1257346705117130456;
->lookup_table,,1257346705117137539;
-<lookup_table,,9797,,1257346705117145063;
->lookup_table,,1257346705117152089;
-<lookup_table,,9798,,1257346705117159842;
->lookup_table,,1257346705117166867;
-<lookup_table,,9799,,1257346705117174632;
->lookup_table,,1257346705117181607;
-<lookup_table,,9800,,1257346705117189149;
->lookup_table,,1257346705117196123;
-<lookup_table,,9801,,1257346705117203955;
->lookup_table,,1257346705117211067;
-<lookup_table,,9802,,1257346705117218673;
->lookup_table,,1257346705117225632;
-<lookup_table,,9803,,1257346705117233193;
->lookup_table,,1257346705117240194;
-<lookup_table,,9804,,1257346705117247538;
->lookup_table,,1257346705117254416;
-<lookup_table,,9805,,1257346705117261968;
->lookup_table,,1257346705117268957;
-<lookup_table,,9806,,1257346705117276533;
->lookup_table,,1257346705117283489;
-<lookup_table,,9807,,1257346705117290915;
->lookup_table,,1257346705117297919;
-<lookup_table,,9808,,1257346705117305603;
->lookup_table,,1257346705117312499;
-<lookup_table,,9809,,1257346705117320035;
->lookup_table,,1257346705117326914;
-<lookup_table,,9810,,1257346705117334583;
->lookup_table,,1257346705117341620;
-<lookup_table,,9811,,1257346705117348997;
->lookup_table,,1257346705117356034;
-<lookup_table,,9812,,1257346705117363445;
->lookup_table,,1257346705117370443;
-<lookup_table,,9813,,1257346705117377895;
->lookup_table,,1257346705117385068;
-<lookup_table,,9814,,1257346705117392734;
->lookup_table,,1257346705117399804;
-<lookup_table,,9815,,1257346705117407287;
->lookup_table,,1257346705117414376;
-<lookup_table,,9816,,1257346705117422532;
->lookup_table,,1257346705117429413;
-<lookup_table,,9817,,1257346705117436904;
->lookup_table,,1257346705117443875;
-<lookup_table,,9818,,1257346705117451289;
->lookup_table,,1257346705117458227;
-<lookup_table,,9819,,1257346705117465706;
->lookup_table,,1257346705117472765;
-<lookup_table,,9820,,1257346705117480184;
->lookup_table,,1257346705117487125;
-<lookup_table,,9821,,1257346705117494773;
->lookup_table,,1257346705117501804;
-<lookup_table,,9822,,1257346705117509359;
->lookup_table,,1257346705117516376;
-<lookup_table,,9823,,1257346705117523831;
->lookup_table,,1257346705117530835;
-<lookup_table,,9824,,1257346705117538624;
->lookup_table,,1257346705117545662;
-<lookup_table,,9825,,1257346705117553349;
->lookup_table,,1257346705117560314;
->_initialize_mi_cmds,,1257346705117565063;
-<_initialize_mi_cmd_env,,9826,,1257346705117575953;
-<get_in_environ,,9827,,1257346705117589252;
->get_in_environ,,1257346705117598960;
-<xstrdup,,9828,,1257346705117607851;
-<xmalloc,,9829,,1257346705117622055;
->xmalloc,,1257346705117628936;
->xstrdup,,1257346705117633492;
->_initialize_mi_cmd_env,,1257346705117638415;
-<_initialize_mi_interp,,9830,,1257346705117650216;
-<mi_out_new,,9831,,1257346705117665693;
-<xmalloc,,9832,,1257346705117681464;
->xmalloc,,1257346705117688408;
-<mem_fileopen,,9833,,1257346705117703884;
-<xmalloc,,9834,,1257346705117717682;
->xmalloc,,1257346705117724518;
-<ui_file_new,,9835,,1257346705117737868;
-<xmalloc,,9836,,1257346705117751799;
->xmalloc,,1257346705117758586;
->ui_file_new,,1257346705117763365;
->mem_fileopen,,1257346705117767979;
-<ui_out_new,,9837,,1257346705117776026;
-<xmalloc,,9838,,1257346705117789061;
->xmalloc,,1257346705117796002;
->ui_out_new,,1257346705117800621;
->mi_out_new,,1257346705117805138;
-<interp_new,,9839,,1257346705117813331;
-<xmalloc,,9840,,1257346705117826530;
->xmalloc,,1257346705117833555;
-<xstrdup,,9841,,1257346705117838169;
-<xmalloc,,9842,,1257346705117850147;
->xmalloc,,1257346705117856950;
->xstrdup,,1257346705117861338;
->interp_new,,1257346705117865738;
-<interp_add,,9843,,1257346705117873443;
-<interp_lookup,,9844,,1257346705117885175;
->interp_lookup,,1257346705117892218;
->interp_add,,1257346705117896835;
-<mi_out_new,,9845,,1257346705117907980;
-<xmalloc,,9846,,1257346705117921598;
->xmalloc,,1257346705117928569;
-<mem_fileopen,,9847,,1257346705117943080;
-<xmalloc,,9848,,1257346705117957149;
->xmalloc,,1257346705117963988;
-<ui_file_new,,9849,,1257346705117976766;
-<xmalloc,,9850,,1257346705117990907;
->xmalloc,,1257346705117997710;
->ui_file_new,,1257346705118002227;
->mem_fileopen,,1257346705118006741;
-<ui_out_new,,9851,,1257346705118014374;
-<xmalloc,,9852,,1257346705118027580;
->xmalloc,,1257346705118034449;
->ui_out_new,,1257346705118038984;
->mi_out_new,,1257346705118043426;
-<interp_new,,9853,,1257346705118051444;
-<xmalloc,,9854,,1257346705118065016;
->xmalloc,,1257346705118072044;
-<xstrdup,,9855,,1257346705118076610;
-<xmalloc,,9856,,1257346705118088669;
->xmalloc,,1257346705118095532;
->xstrdup,,1257346705118100035;
->interp_new,,1257346705118104458;
-<interp_add,,9857,,1257346705118112440;
-<interp_lookup,,9858,,1257346705118124052;
->interp_lookup,,1257346705118131062;
->interp_add,,1257346705118135646;
-<mi_out_new,,9859,,1257346705118146971;
-<xmalloc,,9860,,1257346705118160731;
->xmalloc,,1257346705118167747;
-<mem_fileopen,,9861,,1257346705118182706;
-<xmalloc,,9862,,1257346705118196486;
->xmalloc,,1257346705118203370;
-<ui_file_new,,9863,,1257346705118216182;
-<xmalloc,,9864,,1257346705118229820;
->xmalloc,,1257346705118236725;
->ui_file_new,,1257346705118241233;
->mem_fileopen,,1257346705118245757;
-<ui_out_new,,9865,,1257346705118253414;
-<xmalloc,,9866,,1257346705118266670;
->xmalloc,,1257346705118273449;
->ui_out_new,,1257346705118277969;
->mi_out_new,,1257346705118282405;
-<interp_new,,9867,,1257346705118290420;
-<xmalloc,,9868,,1257346705118303592;
->xmalloc,,1257346705118310564;
-<xstrdup,,9869,,1257346705118315225;
-<xmalloc,,9870,,1257346705118326924;
->xmalloc,,1257346705118333796;
->xstrdup,,1257346705118338298;
->interp_new,,1257346705118342692;
-<interp_add,,9871,,1257346705118350529;
-<interp_lookup,,9872,,1257346705118362093;
->interp_lookup,,1257346705118369184;
->interp_add,,1257346705118373759;
-<mi_out_new,,9873,,1257346705118384832;
-<xmalloc,,9874,,1257346705118398474;
->xmalloc,,1257346705118405379;
-<mem_fileopen,,9875,,1257346705118420001;
-<xmalloc,,9876,,1257346705118433615;
->xmalloc,,1257346705118440518;
-<ui_file_new,,9877,,1257346705118453049;
-<xmalloc,,9878,,1257346705118466956;
->xmalloc,,1257346705118473756;
->ui_file_new,,1257346705118478291;
->mem_fileopen,,1257346705118482817;
-<ui_out_new,,9879,,1257346705118490468;
-<xmalloc,,9880,,1257346705118503535;
->xmalloc,,1257346705118510419;
->ui_out_new,,1257346705118515009;
->mi_out_new,,1257346705118519469;
-<interp_new,,9881,,1257346705118527829;
-<xmalloc,,9882,,1257346705118541333;
->xmalloc,,1257346705118548220;
-<xstrdup,,9883,,1257346705118552860;
-<xmalloc,,9884,,1257346705118564637;
->xmalloc,,1257346705118571446;
->xstrdup,,1257346705118575933;
->interp_new,,1257346705118580417;
-<interp_add,,9885,,1257346705118588173;
-<interp_lookup,,9886,,1257346705118599914;
->interp_lookup,,1257346705118615372;
->interp_add,,1257346705118619997;
->_initialize_mi_interp,,1257346705118624896;
-<_initialize_gdb_mi_common,,9887,,1257346705118637007;
->_initialize_gdb_mi_common,,1257346705118646096;
-<_initialize_tui_hooks,,9888,,1257346705118657533;
-<observer_attach_new_objfile,,9889,,1257346705118677316;
-<generic_observer_attach,,9890,,1257346705118694386;
-<xmalloc,,9891,,1257346705118708304;
->xmalloc,,1257346705118715360;
-<xmalloc,,9892,,1257346705118724614;
->xmalloc,,1257346705118731428;
->generic_observer_attach,,1257346705118736319;
->observer_attach_new_objfile,,1257346705118740363;
->_initialize_tui_hooks,,1257346705118745338;
-<_initialize_tui_interp,,9893,,1257346705118756083;
-<tui_out_new,,9894,,1257346705118771009;
-<xmalloc,,9895,,1257346705118785881;
->xmalloc,,1257346705118792855;
-<ui_out_new,,9896,,1257346705118801011;
-<xmalloc,,9897,,1257346705118813874;
->xmalloc,,1257346705118820662;
->ui_out_new,,1257346705118825134;
->tui_out_new,,1257346705118829801;
-<interp_new,,9898,,1257346705118837976;
-<xmalloc,,9899,,1257346705118851067;
->xmalloc,,1257346705118857930;
-<xstrdup,,9900,,1257346705118862591;
-<xmalloc,,9901,,1257346705118874161;
->xmalloc,,1257346705118881036;
->xstrdup,,1257346705118885439;
->interp_new,,1257346705118889830;
-<interp_add,,9902,,1257346705118897550;
-<interp_lookup,,9903,,1257346705118909068;
->interp_lookup,,1257346705118916208;
->interp_add,,1257346705118920695;
-<xfree,,9904,,1257346705118934400;
->xfree,,1257346705118941570;
-<xstrdup,,9905,,1257346705118946180;
-<xmalloc,,9906,,1257346705118959563;
->xmalloc,,1257346705118966351;
->xstrdup,,1257346705118970718;
->_initialize_tui_interp,,1257346705118975592;
-<_initialize_tui_layout,,9907,,1257346705118986521;
-<add_com,,9908,,1257346705119003817;
-<add_cmd,,9909,,1257346705119016914;
-<xmalloc,,9910,,1257346705119030626;
->xmalloc,,1257346705119037437;
-<delete_cmd,,9911,,1257346705119048523;
->delete_cmd,,1257346705119058324;
->add_cmd,,1257346705119063112;
->add_com,,1257346705119067584;
->_initialize_tui_layout,,1257346705119072768;
-<_initialize_tui_out,,9912,,1257346705119083610;
->_initialize_tui_out,,1257346705119092639;
-<_initialize_tui_regs,,9913,,1257346705119102677;
-<tui_get_cmd_list,,9914,,1257346705119118063;
-<add_prefix_cmd,,9915,,1257346705119134129;
-<add_cmd,,9916,,1257346705119146472;
-<xmalloc,,9917,,1257346705119160026;
->xmalloc,,1257346705119166889;
-<delete_cmd,,9918,,1257346705119178065;
->delete_cmd,,1257346705119186558;
->add_cmd,,1257346705119191580;
->add_prefix_cmd,,1257346705119196058;
->tui_get_cmd_list,,1257346705119200906;
-<add_prefix_cmd,,9919,,1257346705119212617;
-<add_cmd,,9920,,1257346705119224944;
-<xmalloc,,9921,,1257346705119238673;
->xmalloc,,1257346705119245599;
-<delete_cmd,,9922,,1257346705119256556;
->delete_cmd,,1257346705119263638;
->add_cmd,,1257346705119268041;
->add_prefix_cmd,,1257346705119272567;
-<add_cmd,,9923,,1257346705119282903;
-<xmalloc,,9924,,1257346705119296539;
->xmalloc,,1257346705119303417;
-<delete_cmd,,9925,,1257346705119314133;
->delete_cmd,,1257346705119321296;
->add_cmd,,1257346705119325771;
-<add_cmd,,9926,,1257346705119336291;
-<xmalloc,,9927,,1257346705119350038;
->xmalloc,,1257346705119356976;
-<delete_cmd,,9928,,1257346705119367725;
->delete_cmd,,1257346705119374949;
->add_cmd,,1257346705119379385;
-<add_cmd,,9929,,1257346705119389757;
-<xmalloc,,9930,,1257346705119403348;
->xmalloc,,1257346705119410244;
-<delete_cmd,,9931,,1257346705119420999;
->delete_cmd,,1257346705119428117;
->add_cmd,,1257346705119432556;
-<add_cmd,,9932,,1257346705119443115;
-<xmalloc,,9933,,1257346705119456967;
->xmalloc,,1257346705119463990;
-<delete_cmd,,9934,,1257346705119475186;
->delete_cmd,,1257346705119482380;
->add_cmd,,1257346705119486798;
->_initialize_tui_regs,,1257346705119491857;
-<_initialize_tui_stack,,9935,,1257346705119502882;
-<add_com,,9936,,1257346705119519844;
-<add_cmd,,9937,,1257346705119532141;
-<xmalloc,,9938,,1257346705119545482;
->xmalloc,,1257346705119552489;
-<delete_cmd,,9939,,1257346705119563277;
->delete_cmd,,1257346705119571608;
->add_cmd,,1257346705119576699;
->add_com,,1257346705119581123;
->_initialize_tui_stack,,1257346705119586046;
-<_initialize_tui_win,,9940,,1257346705119596572;
-<add_prefix_cmd,,9941,,1257346705119616789;
-<add_cmd,,9942,,1257346705119629384;
-<xmalloc,,9943,,1257346705119643113;
->xmalloc,,1257346705119650141;
-<delete_cmd,,9944,,1257346705119660881;
->delete_cmd,,1257346705119669256;
->add_cmd,,1257346705119673984;
->add_prefix_cmd,,1257346705119678450;
-<add_prefix_cmd,,9945,,1257346705119689758;
-<add_cmd,,9946,,1257346705119701965;
-<xmalloc,,9947,,1257346705119715375;
->xmalloc,,1257346705119722175;
-<delete_cmd,,9948,,1257346705119733011;
->delete_cmd,,1257346705119741414;
->add_cmd,,1257346705119746196;
->add_prefix_cmd,,1257346705119750794;
-<add_com,,9949,,1257346705119762956;
-<add_cmd,,9950,,1257346705119775485;
-<xmalloc,,9951,,1257346705119788793;
->xmalloc,,1257346705119795623;
-<delete_cmd,,9952,,1257346705119806612;
->delete_cmd,,1257346705119814969;
->add_cmd,,1257346705119819781;
->add_com,,1257346705119824169;
-<add_com,,9953,,1257346705119836821;
-<add_cmd,,9954,,1257346705119849095;
-<xmalloc,,9955,,1257346705119862466;
->xmalloc,,1257346705119872282;
-<delete_cmd,,9956,,1257346705119883247;
->delete_cmd,,1257346705119891659;
->add_cmd,,1257346705119896603;
->add_com,,1257346705119900916;
-<add_com,,9957,,1257346705119913225;
-<add_cmd,,9958,,1257346705119925904;
-<xmalloc,,9959,,1257346705119939291;
->xmalloc,,1257346705119946156;
-<delete_cmd,,9960,,1257346705119957359;
->delete_cmd,,1257346705119965620;
->add_cmd,,1257346705119970718;
->add_com,,1257346705119975013;
-<add_com_alias,,9961,,1257346705119984516;
-<add_alias_cmd,,9962,,1257346705119998206;
-<lookup_cmd,,9963,,1257346705120012350;
-<lookup_cmd_1,,9964,,1257346705120025935;
-<find_command_name_length,,9965,,1257346705120040406;
->find_command_name_length,,1257346705120047844;
-<find_cmd,,9966,,1257346705120058321;
->find_cmd,,1257346705120066478;
->lookup_cmd_1,,1257346705120071163;
->lookup_cmd,,1257346705120075644;
-<add_cmd,,9967,,1257346705120085265;
-<xmalloc,,9968,,1257346705120098934;
->xmalloc,,1257346705120105953;
-<delete_cmd,,9969,,1257346705120116714;
->delete_cmd,,1257346705120124993;
->add_cmd,,1257346705120130010;
->add_alias_cmd,,1257346705120134587;
->add_com_alias,,1257346705120139053;
-<add_info,,9970,,1257346705120150367;
-<add_cmd,,9971,,1257346705120162655;
-<xmalloc,,9972,,1257346705120175969;
->xmalloc,,1257346705120182967;
-<delete_cmd,,9973,,1257346705120193647;
->delete_cmd,,1257346705120202046;
->add_cmd,,1257346705120206687;
->add_info,,1257346705120211060;
-<add_com,,9974,,1257346705120223195;
-<add_cmd,,9975,,1257346705120235351;
-<xmalloc,,9976,,1257346705120248923;
->xmalloc,,1257346705120255705;
-<delete_cmd,,9977,,1257346705120266441;
->delete_cmd,,1257346705120274859;
->add_cmd,,1257346705120279521;
->add_com,,1257346705120283810;
-<add_com_alias,,9978,,1257346705120293286;
-<add_alias_cmd,,9979,,1257346705120306536;
-<lookup_cmd,,9980,,1257346705120320741;
-<lookup_cmd_1,,9981,,1257346705120333570;
-<find_command_name_length,,9982,,1257346705120348277;
->find_command_name_length,,1257346705120355711;
-<find_cmd,,9983,,1257346705120365891;
->find_cmd,,1257346705120373256;
->lookup_cmd_1,,1257346705120377788;
->lookup_cmd,,1257346705120382243;
-<add_cmd,,9984,,1257346705120391677;
-<xmalloc,,9985,,1257346705120405306;
->xmalloc,,1257346705120412118;
-<delete_cmd,,9986,,1257346705120422852;
->delete_cmd,,1257346705120431083;
->add_cmd,,1257346705120435826;
->add_alias_cmd,,1257346705120440313;
->add_com_alias,,1257346705120444788;
-<add_com,,9987,,1257346705120456923;
-<add_cmd,,9988,,1257346705120469124;
-<xmalloc,,9989,,1257346705120482709;
->xmalloc,,1257346705120489536;
-<delete_cmd,,9990,,1257346705120500615;
->delete_cmd,,1257346705120508966;
->add_cmd,,1257346705120513538;
->add_com,,1257346705120517905;
-<add_com,,9991,,1257346705120530313;
-<add_cmd,,9992,,1257346705120542505;
-<xmalloc,,9993,,1257346705120555943;
->xmalloc,,1257346705120562785;
-<delete_cmd,,9994,,1257346705120573572;
->delete_cmd,,1257346705120581885;
->add_cmd,,1257346705120586363;
->add_com,,1257346705120590751;
-<add_com,,9995,,1257346705120606974;
-<add_cmd,,9996,,1257346705120619948;
-<xmalloc,,9997,,1257346705120633232;
->xmalloc,,1257346705120640128;
-<delete_cmd,,9998,,1257346705120651087;
->delete_cmd,,1257346705120659457;
->add_cmd,,1257346705120664001;
->add_com,,1257346705120668380;
-<add_com,,9999,,1257346705120680879;
-<add_cmd,,10000,,1257346705120693203;
-<xmalloc,,10001,,1257346705120706719;
->xmalloc,,1257346705120713630;
-<delete_cmd,,10002,,1257346705120724399;
->delete_cmd,,1257346705120732778;
->add_cmd,,1257346705120737235;
->add_com,,1257346705120741557;
-<add_setshow_enum_cmd,,10003,,1257346705120755033;
-<add_setshow_cmd_full,,10004,,1257346705120771102;
-<xstrprintf,,10005,,1257346705120785450;
-<xstrvprintf,,10006,,1257346705120799071;
->xstrvprintf,,1257346705120810228;
->xstrprintf,,1257346705120814881;
-<xstrprintf,,10007,,1257346705120826532;
-<xstrvprintf,,10008,,1257346705120840600;
->xstrvprintf,,1257346705120848765;
->xstrprintf,,1257346705120853340;
-<add_set_or_show_cmd,,10009,,1257346705120865024;
-<add_cmd,,10010,,1257346705120877306;
-<xmalloc,,10011,,1257346705120890596;
->xmalloc,,1257346705120897519;
-<delete_cmd,,10012,,1257346705120908364;
->delete_cmd,,1257346705120915422;
->add_cmd,,1257346705120919985;
->add_set_or_show_cmd,,1257346705120924613;
-<add_set_or_show_cmd,,10013,,1257346705120935993;
-<add_cmd,,10014,,1257346705120948047;
-<xmalloc,,10015,,1257346705120961427;
->xmalloc,,1257346705120968320;
-<delete_cmd,,10016,,1257346705120979053;
->delete_cmd,,1257346705120986148;
->add_cmd,,1257346705120990563;
->add_set_or_show_cmd,,1257346705120995245;
->add_setshow_cmd_full,,1257346705120999955;
->add_setshow_enum_cmd,,1257346705121004692;
-<add_setshow_enum_cmd,,10017,,1257346705121018063;
-<add_setshow_cmd_full,,10018,,1257346705121033870;
-<xstrprintf,,10019,,1257346705121048020;
-<xstrvprintf,,10020,,1257346705121061550;
->xstrvprintf,,1257346705121070726;
->xstrprintf,,1257346705121075312;
-<xstrprintf,,10021,,1257346705121087378;
-<xstrvprintf,,10022,,1257346705121100984;
->xstrvprintf,,1257346705121109678;
->xstrprintf,,1257346705121114240;
-<add_set_or_show_cmd,,10023,,1257346705121125548;
-<add_cmd,,10024,,1257346705121137572;
-<xmalloc,,10025,,1257346705121150877;
->xmalloc,,1257346705121157809;
-<delete_cmd,,10026,,1257346705121168678;
->delete_cmd,,1257346705121175908;
->add_cmd,,1257346705121180374;
->add_set_or_show_cmd,,1257346705121185071;
-<add_set_or_show_cmd,,10027,,1257346705121196421;
-<add_cmd,,10028,,1257346705121208785;
-<xmalloc,,10029,,1257346705121222087;
->xmalloc,,1257346705121228935;
-<delete_cmd,,10030,,1257346705121239999;
->delete_cmd,,1257346705121247075;
->add_cmd,,1257346705121251626;
->add_set_or_show_cmd,,1257346705121256275;
->add_setshow_cmd_full,,1257346705121261015;
->add_setshow_enum_cmd,,1257346705121265703;
-<add_setshow_enum_cmd,,10031,,1257346705121279126;
-<add_setshow_cmd_full,,10032,,1257346705121294806;
-<xstrprintf,,10033,,1257346705121309281;
-<xstrvprintf,,10034,,1257346705121322718;
->xstrvprintf,,1257346705121334246;
->xstrprintf,,1257346705121338928;
-<xstrprintf,,10035,,1257346705121350588;
-<xstrvprintf,,10036,,1257346705121364513;
->xstrvprintf,,1257346705121373219;
->xstrprintf,,1257346705121377823;
-<add_set_or_show_cmd,,10037,,1257346705121389294;
-<add_cmd,,10038,,1257346705121401666;
-<xmalloc,,10039,,1257346705121414986;
->xmalloc,,1257346705121422015;
-<delete_cmd,,10040,,1257346705121433010;
->delete_cmd,,1257346705121440167;
->add_cmd,,1257346705121444621;
->add_set_or_show_cmd,,1257346705121449298;
-<add_set_or_show_cmd,,10041,,1257346705121460552;
-<add_cmd,,10042,,1257346705121472446;
-<xmalloc,,10043,,1257346705121485841;
->xmalloc,,1257346705121492704;
-<delete_cmd,,10044,,1257346705121503579;
->delete_cmd,,1257346705121510740;
->add_cmd,,1257346705121515248;
->add_set_or_show_cmd,,1257346705121519933;
->add_setshow_cmd_full,,1257346705121524691;
->add_setshow_enum_cmd,,1257346705121529440;
->_initialize_tui_win,,1257346705121534387;
-<_initialize_python,,10045,,1257346705121544041;
-<add_com,,10046,,1257346705121560663;
-<add_cmd,,10047,,1257346705121572957;
-<xmalloc,,10048,,1257346705121586563;
->xmalloc,,1257346705121593582;
-<delete_cmd,,10049,,1257346705121609522;
->delete_cmd,,1257346705121618674;
->add_cmd,,1257346705121623639;
->add_com,,1257346705121627985;
-<add_prefix_cmd,,10050,,1257346705121639151;
-<add_cmd,,10051,,1257346705121651485;
-<xmalloc,,10052,,1257346705121664808;
->xmalloc,,1257346705121671806;
-<delete_cmd,,10053,,1257346705121682606;
->delete_cmd,,1257346705121690091;
->add_cmd,,1257346705121694596;
->add_prefix_cmd,,1257346705121699149;
-<add_prefix_cmd,,10054,,1257346705121710364;
-<add_cmd,,10055,,1257346705121722701;
-<xmalloc,,10056,,1257346705121735966;
->xmalloc,,1257346705121742887;
-<delete_cmd,,10057,,1257346705121753713;
->delete_cmd,,1257346705121761148;
->add_cmd,,1257346705121765659;
->add_prefix_cmd,,1257346705121770218;
-<add_setshow_boolean_cmd,,10058,,1257346705121782801;
-<add_setshow_cmd_full,,10059,,1257346705121798650;
-<xstrprintf,,10060,,1257346705121812884;
-<xstrvprintf,,10061,,1257346705121826313;
->xstrvprintf,,1257346705121834664;
->xstrprintf,,1257346705121839239;
-<xstrprintf,,10062,,1257346705121850995;
-<xstrvprintf,,10063,,1257346705121864570;
->xstrvprintf,,1257346705121872639;
->xstrprintf,,1257346705121877304;
-<add_set_or_show_cmd,,10064,,1257346705121888834;
-<add_cmd,,10065,,1257346705121900981;
-<xmalloc,,10066,,1257346705121914184;
->xmalloc,,1257346705121921047;
-<delete_cmd,,10067,,1257346705121932036;
->delete_cmd,,1257346705121939106;
->add_cmd,,1257346705121943509;
->add_set_or_show_cmd,,1257346705121948249;
-<add_set_or_show_cmd,,10068,,1257346705121959831;
-<add_cmd,,10069,,1257346705121972155;
-<xmalloc,,10070,,1257346705121985348;
->xmalloc,,1257346705121992233;
-<delete_cmd,,10071,,1257346705122003005;
->delete_cmd,,1257346705122010172;
->add_cmd,,1257346705122014572;
->add_set_or_show_cmd,,1257346705122019278;
->add_setshow_cmd_full,,1257346705122024093;
->add_setshow_boolean_cmd,,1257346705122028911;
-<add_setshow_boolean_cmd,,10072,,1257346705122041052;
-<add_setshow_cmd_full,,10073,,1257346705122056772;
-<xstrprintf,,10074,,1257346705122070946;
-<xstrvprintf,,10075,,1257346705122084371;
->xstrvprintf,,1257346705122092554;
->xstrprintf,,1257346705122097120;
-<xstrprintf,,10076,,1257346705122108788;
-<xstrvprintf,,10077,,1257346705122122935;
->xstrvprintf,,1257346705122131022;
->xstrprintf,,1257346705122135587;
-<add_set_or_show_cmd,,10078,,1257346705122147314;
-<add_cmd,,10079,,1257346705122159524;
-<xmalloc,,10080,,1257346705122172787;
->xmalloc,,1257346705122179553;
-<delete_cmd,,10081,,1257346705122190368;
->delete_cmd,,1257346705122197574;
->add_cmd,,1257346705122201983;
->add_set_or_show_cmd,,1257346705122206629;
-<add_set_or_show_cmd,,10082,,1257346705122217925;
-<add_cmd,,10083,,1257346705122229874;
-<xmalloc,,10084,,1257346705122243536;
->xmalloc,,1257346705122250387;
-<delete_cmd,,10085,,1257346705122261042;
->delete_cmd,,1257346705122268176;
->add_cmd,,1257346705122272600;
->add_set_or_show_cmd,,1257346705122277289;
->add_setshow_cmd_full,,1257346705122282010;
->add_setshow_boolean_cmd,,1257346705122286909;
->_initialize_python,,1257346705122291865;
->initialize_all_files,,1257346705122296013;
-<initialize_progspace,,10086,,1257346705122308208;
-<add_cmd,,10087,,1257346705122322953;
-<xmalloc,,10088,,1257346705122336718;
->xmalloc,,1257346705122343768;
-<delete_cmd,,10089,,1257346705122354543;
->delete_cmd,,1257346705122362182;
->add_cmd,,1257346705122366660;
-<new_address_space,,10090,,1257346705122378350;
-<xzalloc,,10091,,1257346705122394927;
-<xcalloc,,10092,,1257346705122410271;
->xcalloc,,1257346705122417949;
->xzalloc,,1257346705122422586;
->new_address_space,,1257346705122427356;
-<add_program_space,,10093,,1257346705122440078;
-<xzalloc,,10094,,1257346705122456179;
-<xcalloc,,10095,,1257346705122470862;
->xcalloc,,1257346705122478053;
->xzalloc,,1257346705122482560;
-<xcalloc,,10096,,1257346705122493303;
->xcalloc,,1257346705122500410;
->add_program_space,,1257346705122505230;
->initialize_progspace,,1257346705122510106;
-<initialize_inferiors,,10097,,1257346705122523046;
-<add_inferior,,10098,,1257346705122539112;
-<add_inferior_silent,,10099,,1257346705122553247;
-<xmalloc,,10100,,1257346705122567836;
->xmalloc,,1257346705122574864;
-<xcalloc,,10101,,1257346705122587367;
->xcalloc,,1257346705122594452;
->add_inferior_silent,,1257346705122599312;
->add_inferior,,1257346705122608303;
-<add_info,,10102,,1257346705122619515;
-<add_cmd,,10103,,1257346705122631933;
-<xmalloc,,10104,,1257346705122645421;
->xmalloc,,1257346705122652425;
-<delete_cmd,,10105,,1257346705122663264;
->delete_cmd,,1257346705122671234;
->add_cmd,,1257346705122675904;
->add_info,,1257346705122680307;
-<add_com,,10106,,1257346705122692319;
-<add_cmd,,10107,,1257346705122704511;
-<xmalloc,,10108,,1257346705122717783;
->xmalloc,,1257346705122724691;
-<delete_cmd,,10109,,1257346705122735527;
->delete_cmd,,1257346705122744170;
->add_cmd,,1257346705122748663;
->add_com,,1257346705122753072;
-<add_com,,10110,,1257346705122765505;
-<add_cmd,,10111,,1257346705122778024;
-<xmalloc,,10112,,1257346705122791074;
->xmalloc,,1257346705122797913;
-<delete_cmd,,10113,,1257346705122808815;
->delete_cmd,,1257346705122817289;
->add_cmd,,1257346705122822312;
->add_com,,1257346705122826700;
-<add_com,,10114,,1257346705122839190;
-<add_cmd,,10115,,1257346705122851370;
-<xmalloc,,10116,,1257346705122864831;
->xmalloc,,1257346705122871760;
-<delete_cmd,,10117,,1257346705122882758;
->delete_cmd,,1257346705122891332;
->add_cmd,,1257346705122895919;
->add_com,,1257346705122900258;
-<add_cmd,,10118,,1257346705122910577;
-<xmalloc,,10119,,1257346705122924014;
->xmalloc,,1257346705122930967;
-<delete_cmd,,10120,,1257346705122941704;
->delete_cmd,,1257346705122948844;
->add_cmd,,1257346705122953240;
-<add_cmd,,10121,,1257346705122963568;
-<xmalloc,,10122,,1257346705122977264;
->xmalloc,,1257346705122984214;
-<delete_cmd,,10123,,1257346705122995417;
->delete_cmd,,1257346705123002502;
->add_cmd,,1257346705123006878;
-<add_cmd,,10124,,1257346705123017214;
-<xmalloc,,10125,,1257346705123030712;
->xmalloc,,1257346705123037710;
-<delete_cmd,,10126,,1257346705123048531;
->delete_cmd,,1257346705123056969;
->add_cmd,,1257346705123061691;
-<add_setshow_boolean_cmd,,10127,,1257346705123073285;
-<add_setshow_cmd_full,,10128,,1257346705123088938;
-<xstrdup,,10129,,1257346705123096054;
-<xmalloc,,10130,,1257346705123109058;
->xmalloc,,1257346705123116075;
->xstrdup,,1257346705123120619;
-<xstrdup,,10131,,1257346705123125091;
-<xmalloc,,10132,,1257346705123136468;
->xmalloc,,1257346705123143457;
->xstrdup,,1257346705123147938;
-<add_set_or_show_cmd,,10133,,1257346705123159421;
-<add_cmd,,10134,,1257346705123171556;
-<xmalloc,,10135,,1257346705123184647;
->xmalloc,,1257346705123191507;
-<delete_cmd,,10136,,1257346705123202288;
->delete_cmd,,1257346705123210541;
->add_cmd,,1257346705123215094;
->add_set_or_show_cmd,,1257346705123219774;
-<add_set_or_show_cmd,,10137,,1257346705123231127;
-<add_cmd,,10138,,1257346705123243517;
-<xmalloc,,10139,,1257346705123256576;
->xmalloc,,1257346705123263604;
-<delete_cmd,,10140,,1257346705123274446;
->delete_cmd,,1257346705123282782;
->add_cmd,,1257346705123287209;
->add_set_or_show_cmd,,1257346705123291928;
->add_setshow_cmd_full,,1257346705123296698;
->add_setshow_boolean_cmd,,1257346705123301509;
->initialize_inferiors,,1257346705123306246;
-<initialize_current_architecture,,10141,,1257346705123314850;
-<gdbarch_printable_names,,10142,,1257346705123329190;
-<bfd_lookup_arch,,10143,,1257346705123339857;
->bfd_lookup_arch,,1257346705123348609;
-<xrealloc,,10144,,1257346705123360443;
->xrealloc,,1257346705123367718;
-<xrealloc,,10145,,1257346705123377218;
->xrealloc,,1257346705123384385;
-<xrealloc,,10146,,1257346705123393480;
->xrealloc,,1257346705123400460;
-<xrealloc,,10147,,1257346705123409497;
->xrealloc,,1257346705123416330;
-<xrealloc,,10148,,1257346705123425328;
->xrealloc,,1257346705123432188;
-<xrealloc,,10149,,1257346705123441271;
->xrealloc,,1257346705123448134;
->gdbarch_printable_names,,1257346705123453213;
-<gdbarch_info_init,,10150,,1257346705123463012;
->gdbarch_info_init,,1257346705123471739;
-<gdbarch_update_p,,10151,,1257346705123480232;
-<target_current_description,,10152,,1257346705123491666;
->target_current_description,,1257346705123500677;
-<gdbarch_find_by_info,,10153,,1257346705123509485;
-<gdbarch_info_fill,,10154,,1257346705123523166;
-<gdbarch_lookup_osabi,,10155,,1257346705123535388;
->gdbarch_lookup_osabi,,1257346705123544684;
->gdbarch_info_fill,,1257346705123549704;
-<i386_gdbarch_init,,10156,,1257346705123561718;
-<gdbarch_list_lookup_by_info,,10157,,1257346705123575718;
->gdbarch_list_lookup_by_info,,1257346705123584590;
-<xcalloc,,10158,,1257346705123597152;
->xcalloc,,1257346705123608980;
-<gdbarch_alloc,,10159,,1257346705123618450;
-<xmalloc,,10160,,1257346705123633054;
->xmalloc,,1257346705123640134;
-<xmalloc,,10161,,1257346705123649520;
->xmalloc,,1257346705123659412;
-<gdbarch_obstack_zalloc,,10162,,1257346705123668849;
->gdbarch_obstack_zalloc,,1257346705123684121;
->gdbarch_alloc,,1257346705123689014;
-<set_gdbarch_long_double_format,,10163,,1257346705123698902;
->set_gdbarch_long_double_format,,1257346705123708234;
-<set_gdbarch_long_double_bit,,10164,,1257346705123717801;
->set_gdbarch_long_double_bit,,1257346705123726763;
-<set_gdbarch_num_regs,,10165,,1257346705123734913;
->set_gdbarch_num_regs,,1257346705123743587;
-<set_gdbarch_register_name,,10166,,1257346705123752582;
->set_gdbarch_register_name,,1257346705123761664;
-<set_gdbarch_register_type,,10167,,1257346705123770584;
->set_gdbarch_register_type,,1257346705123779634;
-<set_gdbarch_sp_regnum,,10168,,1257346705123785934;
->set_gdbarch_sp_regnum,,1257346705123794553;
-<set_gdbarch_pc_regnum,,10169,,1257346705123803870;
->set_gdbarch_pc_regnum,,1257346705123812514;
-<set_gdbarch_ps_regnum,,10170,,1257346705123821690;
->set_gdbarch_ps_regnum,,1257346705123830396;
-<set_gdbarch_fp0_regnum,,10171,,1257346705123839259;
->set_gdbarch_fp0_regnum,,1257346705123848158;
-<set_gdbarch_stab_reg_to_regnum,,10172,,1257346705123857634;
->set_gdbarch_stab_reg_to_regnum,,1257346705123866687;
-<set_gdbarch_sdb_reg_to_regnum,,10173,,1257346705123877426;
->set_gdbarch_sdb_reg_to_regnum,,1257346705123886175;
-<set_gdbarch_dwarf2_reg_to_regnum,,10174,,1257346705123895263;
->set_gdbarch_dwarf2_reg_to_regnum,,1257346705123904403;
-<set_gdbarch_print_float_info,,10175,,1257346705123911251;
->set_gdbarch_print_float_info,,1257346705123920186;
-<set_gdbarch_get_longjmp_target,,10176,,1257346705123930390;
->set_gdbarch_get_longjmp_target,,1257346705123939587;
-<set_gdbarch_push_dummy_call,,10177,,1257346705123948392;
->set_gdbarch_push_dummy_call,,1257346705123956918;
-<set_gdbarch_convert_register_p,,10178,,1257346705123965881;
->set_gdbarch_convert_register_p,,1257346705123974542;
-<set_gdbarch_register_to_value,,10179,,1257346705123985050;
->set_gdbarch_register_to_value,,1257346705123993835;
-<set_gdbarch_value_to_register,,10180,,1257346705124002340;
->set_gdbarch_value_to_register,,1257346705124011374;
-<set_gdbarch_return_value,,10181,,1257346705124021172;
->set_gdbarch_return_value,,1257346705124029969;
-<set_gdbarch_skip_prologue,,10182,,1257346705124039310;
->set_gdbarch_skip_prologue,,1257346705124047911;
-<set_gdbarch_inner_than,,10183,,1257346705124057619;
->set_gdbarch_inner_than,,1257346705124066118;
-<set_gdbarch_breakpoint_from_pc,,10184,,1257346705124074731;
->set_gdbarch_breakpoint_from_pc,,1257346705124083633;
-<set_gdbarch_decr_pc_after_break,,10185,,1257346705124092150;
->set_gdbarch_decr_pc_after_break,,1257346705124101284;
-<set_gdbarch_max_insn_length,,10186,,1257346705124110168;
->set_gdbarch_max_insn_length,,1257346705124118944;
-<set_gdbarch_frame_args_skip,,10187,,1257346705124127346;
->set_gdbarch_frame_args_skip,,1257346705124136065;
-<set_gdbarch_num_pseudo_regs,,10188,,1257346705124145030;
->set_gdbarch_num_pseudo_regs,,1257346705124153758;
-<set_gdbarch_pseudo_register_read,,10189,,1257346705124162991;
->set_gdbarch_pseudo_register_read,,1257346705124172007;
-<set_gdbarch_pseudo_register_write,,10190,,1257346705124181651;
->set_gdbarch_pseudo_register_write,,1257346705124190902;
-<set_gdbarch_print_insn,,10191,,1257346705124199675;
->set_gdbarch_print_insn,,1257346705124208312;
-<set_gdbarch_dummy_id,,10192,,1257346705124217320;
->set_gdbarch_dummy_id,,1257346705124226122;
-<set_gdbarch_unwind_pc,,10193,,1257346705124234486;
->set_gdbarch_unwind_pc,,1257346705124243169;
-<reggroup_add,,10194,,1257346705124250531;
-<gdbarch_data,,10195,,1257346705124262046;
->gdbarch_data,,1257346705124270476;
-<reggroups_init,,10196,,1257346705124277234;
-<gdbarch_obstack_zalloc,,10197,,1257346705124289489;
->gdbarch_obstack_zalloc,,1257346705124296860;
->reggroups_init,,1257346705124301681;
-<deprecated_set_gdbarch_data,,10198,,1257346705124310385;
->deprecated_set_gdbarch_data,,1257346705124319031;
-<gdbarch_obstack_zalloc,,10199,,1257346705124327106;
->gdbarch_obstack_zalloc,,1257346705124334381;
-<add_group,,10200,,1257346705124342236;
->add_group,,1257346705124349150;
->reggroup_add,,1257346705124352708;
-<reggroup_add,,10201,,1257346705124359469;
-<gdbarch_data,,10202,,1257346705124369183;
->gdbarch_data,,1257346705124376193;
-<gdbarch_obstack_zalloc,,10203,,1257346705124384719;
->gdbarch_obstack_zalloc,,1257346705124391925;
-<add_group,,10204,,1257346705124399338;
->add_group,,1257346705124406018;
->reggroup_add,,1257346705124409572;
-<reggroup_add,,10205,,1257346705124416396;
-<gdbarch_data,,10206,,1257346705124426104;
->gdbarch_data,,1257346705124433313;
-<gdbarch_obstack_zalloc,,10207,,1257346705124441872;
->gdbarch_obstack_zalloc,,1257346705124449048;
-<add_group,,10208,,1257346705124456251;
->add_group,,1257346705124462921;
->reggroup_add,,1257346705124466645;
-<reggroup_add,,10209,,1257346705124473357;
-<gdbarch_data,,10210,,1257346705124483221;
->gdbarch_data,,1257346705124490165;
-<gdbarch_obstack_zalloc,,10211,,1257346705124498626;
->gdbarch_obstack_zalloc,,1257346705124505765;
-<add_group,,10212,,1257346705124513019;
->add_group,,1257346705124519650;
->reggroup_add,,1257346705124523133;
-<reggroup_add,,10213,,1257346705124529839;
-<gdbarch_data,,10214,,1257346705124539379;
->gdbarch_data,,1257346705124546326;
-<gdbarch_obstack_zalloc,,10215,,1257346705124555234;
->gdbarch_obstack_zalloc,,1257346705124562488;
-<add_group,,10216,,1257346705124569805;
->add_group,,1257346705124576590;
->reggroup_add,,1257346705124580118;
-<reggroup_add,,10217,,1257346705124586764;
-<gdbarch_data,,10218,,1257346705124596289;
->gdbarch_data,,1257346705124607505;
-<gdbarch_obstack_zalloc,,10219,,1257346705124616587;
->gdbarch_obstack_zalloc,,1257346705124624049;
-<add_group,,10220,,1257346705124631365;
->add_group,,1257346705124638123;
->reggroup_add,,1257346705124641651;
-<reggroup_add,,10221,,1257346705124648466;
-<gdbarch_data,,10222,,1257346705124658083;
->gdbarch_data,,1257346705124665133;
-<gdbarch_obstack_zalloc,,10223,,1257346705124673581;
->gdbarch_obstack_zalloc,,1257346705124680835;
-<add_group,,10224,,1257346705124688290;
->add_group,,1257346705124694982;
->reggroup_add,,1257346705124698561;
-<reggroup_add,,10225,,1257346705124705234;
-<gdbarch_data,,10226,,1257346705124714852;
->gdbarch_data,,1257346705124721757;
-<gdbarch_obstack_zalloc,,10227,,1257346705124730409;
->gdbarch_obstack_zalloc,,1257346705124737714;
-<add_group,,10228,,1257346705124745016;
->add_group,,1257346705124751780;
->reggroup_add,,1257346705124755392;
-<reggroup_add,,10229,,1257346705124761936;
-<gdbarch_data,,10230,,1257346705124771569;
->gdbarch_data,,1257346705124778564;
-<gdbarch_obstack_zalloc,,10231,,1257346705124787045;
->gdbarch_obstack_zalloc,,1257346705124794115;
-<add_group,,10232,,1257346705124801303;
->add_group,,1257346705124807917;
->reggroup_add,,1257346705124811465;
-<set_gdbarch_register_reggroup_p,,10233,,1257346705124820055;
->set_gdbarch_register_reggroup_p,,1257346705124829152;
-<set_gdbarch_fetch_pointer_argument,,10234,,1257346705124837780;
->set_gdbarch_fetch_pointer_argument,,1257346705124846866;
-<frame_unwind_append_unwinder,,10235,,1257346705124858778;
-<gdbarch_data,,10236,,1257346705124870002;
-<frame_unwind_init,,10237,,1257346705124882736;
->frame_unwind_init,,1257346705124891719;
->gdbarch_data,,1257346705124896356;
-<gdbarch_obstack_zalloc,,10238,,1257346705124904939;
->gdbarch_obstack_zalloc,,1257346705124912028;
->frame_unwind_append_unwinder,,1257346705124917179;
-<dwarf2_append_unwinders,,10239,,1257346705124925281;
-<frame_unwind_append_unwinder,,10240,,1257346705124940457;
-<gdbarch_data,,10241,,1257346705124950192;
->gdbarch_data,,1257346705124957199;
-<gdbarch_obstack_zalloc,,10242,,1257346705124965852;
->gdbarch_obstack_zalloc,,1257346705124973148;
->frame_unwind_append_unwinder,,1257346705124978263;
-<frame_unwind_append_unwinder,,10243,,1257346705124989487;
-<gdbarch_data,,10244,,1257346705124999718;
->gdbarch_data,,1257346705125006674;
-<gdbarch_obstack_zalloc,,10245,,1257346705125015261;
->gdbarch_obstack_zalloc,,1257346705125022656;
->frame_unwind_append_unwinder,,1257346705125027748;
->dwarf2_append_unwinders,,1257346705125032963;
-<frame_base_set_default,,10246,,1257346705125045654;
-<gdbarch_data,,10247,,1257346705125057058;
-<frame_base_init,,10248,,1257346705125073060;
->frame_base_init,,1257346705125081896;
->gdbarch_data,,1257346705125086558;
->frame_base_set_default,,1257346705125091391;
-<gdbarch_init_osabi,,10249,,1257346705125098723;
-<i386_linux_init_abi,,10250,,1257346705125115706;
-<gdbarch_tdep,,10251,,1257346705125128217;
->gdbarch_tdep,,1257346705125136746;
-<i386_elf_init_abi,,10252,,1257346705125149452;
-<set_gdbarch_stab_reg_to_regnum,,10253,,1257346705125162300;
->set_gdbarch_stab_reg_to_regnum,,1257346705125169939;
->i386_elf_init_abi,,1257346705125173984;
-<set_gdbarch_write_pc,,10254,,1257346705125182763;
->set_gdbarch_write_pc,,1257346705125191430;
-<set_gdbarch_num_regs,,10255,,1257346705125200037;
->set_gdbarch_num_regs,,1257346705125207231;
-<set_gdbarch_register_name,,10256,,1257346705125215492;
->set_gdbarch_register_name,,1257346705125222854;
-<set_gdbarch_register_reggroup_p,,10257,,1257346705125230966;
->set_gdbarch_register_reggroup_p,,1257346705125238469;
-<set_gdbarch_process_record,,10258,,1257346705125247509;
->set_gdbarch_process_record,,1257346705125256532;
-<set_gdbarch_process_record_signal,,10259,,1257346705125265879;
->set_gdbarch_process_record_signal,,1257346705125275093;
-<gdbarch_ptr_bit,,10260,,1257346705125285087;
->gdbarch_ptr_bit,,1257346705125293665;
-<gdbarch_int_bit,,10261,,1257346705125301761;
->gdbarch_int_bit,,1257346705125310223;
-<gdbarch_long_bit,,10262,,1257346705125318542;
->gdbarch_long_bit,,1257346705125327098;
-<gdbarch_long_bit,,10263,,1257346705125332896;
->gdbarch_long_bit,,1257346705125339786;
-<set_gdbarch_sofun_address_maybe_missing,,10264,,1257346705125348493;
->set_gdbarch_sofun_address_maybe_missing,,1257346705125357693;
-<set_gdbarch_skip_trampoline_code,,10265,,1257346705125366098;
->set_gdbarch_skip_trampoline_code,,1257346705125374988;
-<set_solib_svr4_fetch_link_map_offsets,,10266,,1257346705125388552;
-<gdbarch_data,,10267,,1257346705125400140;
-<solib_svr4_init,,10268,,1257346705125415129;
->solib_svr4_init,,1257346705125423931;
->gdbarch_data,,1257346705125428629;
-<set_solib_ops,,10269,,1257346705125440604;
-<gdbarch_data,,10270,,1257346705125451930;
-<solib_init,,10271,,1257346705125466877;
->solib_init,,1257346705125475611;
->gdbarch_data,,1257346705125480287;
->set_solib_ops,,1257346705125484787;
->set_solib_svr4_fetch_link_map_offsets,,1257346705125489132;
-<set_gdbarch_skip_solib_resolver,,10272,,1257346705125497872;
->set_gdbarch_skip_solib_resolver,,1257346705125507108;
-<dwarf2_frame_set_signal_frame_p,,10273,,1257346705125514873;
-<gdbarch_data,,10274,,1257346705125526067;
-<dwarf2_frame_init,,10275,,1257346705125536587;
->dwarf2_frame_init,,1257346705125545146;
->gdbarch_data,,1257346705125549915;
->dwarf2_frame_set_signal_frame_p,,1257346705125555061;
-<set_gdbarch_fetch_tls_load_module_address,,10276,,1257346705125564378;
->set_gdbarch_fetch_tls_load_module_address,,1257346705125573617;
-<set_gdbarch_core_regset_sections,,10277,,1257346705125582726;
->set_gdbarch_core_regset_sections,,1257346705125591340;
-<set_gdbarch_displaced_step_copy_insn,,10278,,1257346705125604599;
->set_gdbarch_displaced_step_copy_insn,,1257346705125614392;
-<set_gdbarch_displaced_step_fixup,,10279,,1257346705125623179;
->set_gdbarch_displaced_step_fixup,,1257346705125631949;
-<set_gdbarch_displaced_step_free_closure,,10280,,1257346705125640598;
->set_gdbarch_displaced_step_free_closure,,1257346705125649606;
-<set_gdbarch_displaced_step_location,,10281,,1257346705125658796;
->set_gdbarch_displaced_step_location,,1257346705125667521;
-<set_xml_syscall_file_name,,10282,,1257346705125675442;
->set_xml_syscall_file_name,,1257346705125684152;
-<set_gdbarch_get_syscall_number,,10283,,1257346705125692053;
->set_gdbarch_get_syscall_number,,1257346705125700879;
-<set_gdbarch_get_siginfo_type,,10284,,1257346705125709138;
->set_gdbarch_get_siginfo_type,,1257346705125717679;
->i386_linux_init_abi,,1257346705125721778;
->gdbarch_init_osabi,,1257346705125725555;
-<frame_unwind_append_unwinder,,10285,,1257346705125736316;
-<gdbarch_data,,10286,,1257346705125746289;
->gdbarch_data,,1257346705125753242;
-<gdbarch_obstack_zalloc,,10287,,1257346705125761924;
->gdbarch_obstack_zalloc,,1257346705125769223;
->frame_unwind_append_unwinder,,1257346705125774224;
-<frame_unwind_append_unwinder,,10288,,1257346705125785878;
-<gdbarch_data,,10289,,1257346705125795589;
->gdbarch_data,,1257346705125802558;
-<gdbarch_obstack_zalloc,,10290,,1257346705125811177;
->gdbarch_obstack_zalloc,,1257346705125818428;
->frame_unwind_append_unwinder,,1257346705125823534;
-<gdbarch_regset_from_core_section_p,,10291,,1257346705125832271;
->gdbarch_regset_from_core_section_p,,1257346705125841176;
-<set_gdbarch_regset_from_core_section,,10292,,1257346705125850228;
->set_gdbarch_regset_from_core_section,,1257346705125859431;
-<gdbarch_num_regs,,10293,,1257346705125867797;
->gdbarch_num_regs,,1257346705125876258;
-<set_gdbarch_skip_permanent_breakpoint,,10294,,1257346705125884528;
->set_gdbarch_skip_permanent_breakpoint,,1257346705125893815;
->i386_gdbarch_init,,1257346705125898934;
-<xmalloc,,10295,,1257346705125909511;
->xmalloc,,1257346705125916527;
-<mem_fileopen,,10296,,1257346705125929269;
-<xmalloc,,10297,,1257346705125942544;
->xmalloc,,1257346705125949585;
-<ui_file_new,,10298,,1257346705125961202;
-<xmalloc,,10299,,1257346705125974110;
->xmalloc,,1257346705125980973;
->ui_file_new,,1257346705125985590;
->mem_fileopen,,1257346705125990179;
-<make_cleanup_ui_file_delete,,10300,,1257346705126002389;
-<make_my_cleanup,,10301,,1257346705126018304;
-<make_my_cleanup2,,10302,,1257346705126033805;
-<xmalloc,,10303,,1257346705126048042;
->xmalloc,,1257346705126054986;
->make_my_cleanup2,,1257346705126060026;
->make_my_cleanup,,1257346705126064796;
->make_cleanup_ui_file_delete,,1257346705126069828;
-<gdbarch_ptr_bit,,10304,,1257346705126079036;
->gdbarch_ptr_bit,,1257346705126086179;
-<ui_file_xstrdup,,10305,,1257346705126097382;
-<ui_file_put,,10306,,1257346705126111084;
-<mem_file_put,,10307,,1257346705126127014;
-<ui_file_data,,10308,,1257346705126140731;
->ui_file_data,,1257346705126148114;
->mem_file_put,,1257346705126152971;
->ui_file_put,,1257346705126156628;
-<xstrdup,,10309,,1257346705126161190;
-<xmalloc,,10310,,1257346705126173731;
->xmalloc,,1257346705126180633;
->xstrdup,,1257346705126185036;
->ui_file_xstrdup,,1257346705126189698;
-<make_cleanup,,10311,,1257346705126200591;
-<make_my_cleanup,,10312,,1257346705126216247;
-<make_my_cleanup2,,10313,,1257346705126229699;
-<xmalloc,,10314,,1257346705126242968;
->xmalloc,,1257346705126249882;
->make_my_cleanup2,,1257346705126254637;
->make_my_cleanup,,1257346705126259244;
->make_cleanup,,1257346705126264053;
-<do_cleanups,,10315,,1257346705126277286;
-<do_my_cleanups,,10316,,1257346705126293782;
-<xfree,,10317,,1257346705126308765;
->xfree,,1257346705126316163;
-<xfree,,10318,,1257346705126327799;
->xfree,,1257346705126334544;
-<do_ui_file_delete,,10319,,1257346705126346520;
-<ui_file_delete,,10320,,1257346705126361458;
-<mem_file_delete,,10321,,1257346705126375355;
-<ui_file_data,,10322,,1257346705126388723;
->ui_file_data,,1257346705126395944;
-<xfree,,10323,,1257346705126407814;
->xfree,,1257346705126414714;
->mem_file_delete,,1257346705126418395;
-<xfree,,10324,,1257346705126429498;
->xfree,,1257346705126436283;
->ui_file_delete,,1257346705126439844;
->do_ui_file_delete,,1257346705126443618;
-<xfree,,10325,,1257346705126454586;
->xfree,,1257346705126461374;
->do_my_cleanups,,1257346705126466080;
->do_cleanups,,1257346705126469843;
->gdbarch_find_by_info,,1257346705126474697;
-<deprecated_target_gdbarch_select_hack,,10326,,1257346705126484077;
-<observer_notify_architecture_changed,,10327,,1257346705126502290;
-<generic_observer_notify,,10328,,1257346705126519549;
->generic_observer_notify,,1257346705126528578;
->observer_notify_architecture_changed,,1257346705126534132;
-<registers_changed,,10329,,1257346705126543504;
-<reinit_frame_cache,,10330,,1257346705126556875;
-<xfree,,10331,,1257346705126576676;
->xfree,,1257346705126584206;
-<xmalloc,,10332,,1257346705126595021;
->xmalloc,,1257346705126606863;
-<select_frame,,10333,,1257346705126618757;
->select_frame,,1257346705126627653;
->reinit_frame_cache,,1257346705126632615;
->registers_changed,,1257346705126637484;
->deprecated_target_gdbarch_select_hack,,1257346705126641797;
->gdbarch_update_p,,1257346705126646864;
-<xrealloc,,10334,,1257346705126656831;
->xrealloc,,1257346705126664211;
-<add_setshow_enum_cmd,,10335,,1257346705126676957;
-<add_setshow_cmd_full,,10336,,1257346705126692295;
-<xstrdup,,10337,,1257346705126699290;
-<xmalloc,,10338,,1257346705126712171;
->xmalloc,,1257346705126719142;
->xstrdup,,1257346705126723590;
-<xstrdup,,10339,,1257346705126728092;
-<xmalloc,,10340,,1257346705126739108;
->xmalloc,,1257346705126745971;
->xstrdup,,1257346705126750395;
-<add_set_or_show_cmd,,10341,,1257346705126760930;
-<add_cmd,,10342,,1257346705126772394;
-<xmalloc,,10343,,1257346705126785348;
->xmalloc,,1257346705126792285;
-<delete_cmd,,10344,,1257346705126802908;
->delete_cmd,,1257346705126812745;
->add_cmd,,1257346705126817476;
->add_set_or_show_cmd,,1257346705126822113;
-<add_set_or_show_cmd,,10345,,1257346705126832678;
-<add_cmd,,10346,,1257346705126844567;
-<xmalloc,,10347,,1257346705126857327;
->xmalloc,,1257346705126864202;
-<delete_cmd,,10348,,1257346705126874737;
->delete_cmd,,1257346705126883573;
->add_cmd,,1257346705126888120;
->add_set_or_show_cmd,,1257346705126892779;
->add_setshow_cmd_full,,1257346705126897476;
->add_setshow_enum_cmd,,1257346705126902180;
-<add_alias_cmd,,10349,,1257346705126912111;
-<lookup_cmd,,10350,,1257346705126925578;
-<lookup_cmd_1,,10351,,1257346705126937827;
-<find_command_name_length,,10352,,1257346705126951231;
->find_command_name_length,,1257346705126958915;
-<find_cmd,,10353,,1257346705126968416;
->find_cmd,,1257346705126975372;
->lookup_cmd_1,,1257346705126979946;
->lookup_cmd,,1257346705126984454;
-<add_cmd,,10354,,1257346705126993440;
-<xmalloc,,10355,,1257346705127006060;
->xmalloc,,1257346705127013007;
-<delete_cmd,,10356,,1257346705127023548;
->delete_cmd,,1257346705127031340;
->add_cmd,,1257346705127036032;
->add_alias_cmd,,1257346705127040594;
->initialize_current_architecture,,1257346705127045854;
-<init_cli_cmds,,10357,,1257346705127056133;
-<add_cmd,,10358,,1257346705127070223;
-<xmalloc,,10359,,1257346705127083251;
->xmalloc,,1257346705127090207;
-<delete_cmd,,10360,,1257346705127100688;
->delete_cmd,,1257346705127111575;
->add_cmd,,1257346705127116351;
-<add_cmd,,10361,,1257346705127126399;
-<xmalloc,,10362,,1257346705127139346;
->xmalloc,,1257346705127146353;
-<delete_cmd,,10363,,1257346705127157207;
->delete_cmd,,1257346705127165604;
->add_cmd,,1257346705127170476;
-<add_cmd,,10364,,1257346705127180274;
-<xmalloc,,10365,,1257346705127193476;
->xmalloc,,1257346705127200502;
-<delete_cmd,,10366,,1257346705127210983;
->delete_cmd,,1257346705127219337;
->add_cmd,,1257346705127223851;
-<add_cmd,,10367,,1257346705127233635;
-<xmalloc,,10368,,1257346705127246603;
->xmalloc,,1257346705127253613;
-<delete_cmd,,10369,,1257346705127264163;
->delete_cmd,,1257346705127272656;
->add_cmd,,1257346705127277751;
-<add_cmd,,10370,,1257346705127287432;
-<xmalloc,,10371,,1257346705127300454;
->xmalloc,,1257346705127310475;
-<delete_cmd,,10372,,1257346705127321031;
->delete_cmd,,1257346705127329683;
->add_cmd,,1257346705127334696;
-<add_cmd,,10373,,1257346705127344967;
-<xmalloc,,10374,,1257346705127358046;
->xmalloc,,1257346705127365059;
-<delete_cmd,,10375,,1257346705127375528;
->delete_cmd,,1257346705127384163;
->add_cmd,,1257346705127389245;
-<add_cmd,,10376,,1257346705127398923;
-<xmalloc,,10377,,1257346705127412324;
->xmalloc,,1257346705127419343;
-<delete_cmd,,10378,,1257346705127429888;
->delete_cmd,,1257346705127438462;
->add_cmd,,1257346705127443183;
-<add_cmd,,10379,,1257346705127452921;
-<xmalloc,,10380,,1257346705127466446;
->xmalloc,,1257346705127473390;
-<delete_cmd,,10381,,1257346705127484154;
->delete_cmd,,1257346705127492704;
->add_cmd,,1257346705127497422;
-<add_cmd,,10382,,1257346705127507076;
-<xmalloc,,10383,,1257346705127520131;
->xmalloc,,1257346705127527106;
-<delete_cmd,,10384,,1257346705127538901;
->delete_cmd,,1257346705127547439;
->add_cmd,,1257346705127552040;
-<add_cmd,,10385,,1257346705127562301;
-<xmalloc,,10386,,1257346705127575946;
->xmalloc,,1257346705127583080;
-<delete_cmd,,10387,,1257346705127594863;
->delete_cmd,,1257346705127608412;
->add_cmd,,1257346705127613744;
-<add_cmd,,10388,,1257346705127623711;
-<xmalloc,,10389,,1257346705127636965;
->xmalloc,,1257346705127644002;
-<delete_cmd,,10390,,1257346705127654802;
->delete_cmd,,1257346705127663346;
->add_cmd,,1257346705127668401;
-<add_com,,10391,,1257346705127680221;
-<add_cmd,,10392,,1257346705127691920;
-<xmalloc,,10393,,1257346705127704731;
->xmalloc,,1257346705127711612;
-<delete_cmd,,10394,,1257346705127722108;
->delete_cmd,,1257346705127730640;
->add_cmd,,1257346705127735557;
->add_com,,1257346705127739948;
-<add_cmd,,10395,,1257346705127749864;
-<xmalloc,,10396,,1257346705127762928;
->xmalloc,,1257346705127769953;
-<delete_cmd,,10397,,1257346705127780702;
->delete_cmd,,1257346705127789195;
->add_cmd,,1257346705127793763;
-<set_cmd_completer,,10398,,1257346705127803348;
->set_cmd_completer,,1257346705127811098;
-<add_com,,10399,,1257346705127823071;
-<add_cmd,,10400,,1257346705127834752;
-<xmalloc,,10401,,1257346705127847656;
->xmalloc,,1257346705127854558;
-<delete_cmd,,10402,,1257346705127865066;
->delete_cmd,,1257346705127873592;
->add_cmd,,1257346705127878374;
->add_com,,1257346705127882696;
-<add_com,,10403,,1257346705127894326;
-<add_cmd,,10404,,1257346705127905952;
-<xmalloc,,10405,,1257346705127918818;
->xmalloc,,1257346705127925645;
-<delete_cmd,,10406,,1257346705127936361;
->delete_cmd,,1257346705127944938;
->add_cmd,,1257346705127949710;
->add_com,,1257346705127954092;
-<add_com,,10407,,1257346705127965818;
-<add_cmd,,10408,,1257346705127977505;
-<xmalloc,,10409,,1257346705127990284;
->xmalloc,,1257346705127997174;
-<delete_cmd,,10410,,1257346705128007679;
->delete_cmd,,1257346705128016174;
->add_cmd,,1257346705128020785;
->add_com,,1257346705128025164;
-<xstrprintf,,10411,,1257346705128038123;
-<xstrvprintf,,10412,,1257346705128051587;
->xstrvprintf,,1257346705128062381;
->xstrprintf,,1257346705128066994;
-<add_cmd,,10413,,1257346705128075902;
-<xmalloc,,10414,,1257346705128088978;
->xmalloc,,1257346705128095962;
-<delete_cmd,,10415,,1257346705128106548;
->delete_cmd,,1257346705128115047;
->add_cmd,,1257346705128120256;
-<set_cmd_completer,,10416,,1257346705128129876;
->set_cmd_completer,,1257346705128137320;
-<add_com,,10417,,1257346705128149313;
-<add_cmd,,10418,,1257346705128161030;
-<xmalloc,,10419,,1257346705128173902;
->xmalloc,,1257346705128180759;
-<delete_cmd,,10420,,1257346705128191363;
->delete_cmd,,1257346705128200022;
->add_cmd,,1257346705128204990;
->add_com,,1257346705128209426;
-<add_com,,10421,,1257346705128221660;
-<add_cmd,,10422,,1257346705128233374;
-<xmalloc,,10423,,1257346705128246438;
->xmalloc,,1257346705128253473;
-<delete_cmd,,10424,,1257346705128263932;
->delete_cmd,,1257346705128272750;
->add_cmd,,1257346705128277604;
->add_com,,1257346705128282058;
-<set_cmd_completer,,10425,,1257346705128291520;
->set_cmd_completer,,1257346705128298764;
-<add_com_alias,,10426,,1257346705128308857;
-<add_alias_cmd,,10427,,1257346705128321170;
-<lookup_cmd,,10428,,1257346705128334583;
-<lookup_cmd_1,,10429,,1257346705128347022;
-<find_command_name_length,,10430,,1257346705128360495;
->find_command_name_length,,1257346705128367953;
-<find_cmd,,10431,,1257346705128377740;
->find_cmd,,1257346705128385745;
->lookup_cmd_1,,1257346705128390302;
->lookup_cmd,,1257346705128394864;
-<add_cmd,,10432,,1257346705128403865;
-<xmalloc,,10433,,1257346705128416948;
->xmalloc,,1257346705128424018;
-<delete_cmd,,10434,,1257346705128434484;
->delete_cmd,,1257346705128443440;
->add_cmd,,1257346705128448423;
->add_alias_cmd,,1257346705128452949;
->add_com_alias,,1257346705128457515;
-<add_com_alias,,10435,,1257346705128467096;
-<add_alias_cmd,,10436,,1257346705128479334;
-<lookup_cmd,,10437,,1257346705128492885;
-<lookup_cmd_1,,10438,,1257346705128505423;
-<find_command_name_length,,10439,,1257346705128518770;
->find_command_name_length,,1257346705128526159;
-<find_cmd,,10440,,1257346705128535783;
->find_cmd,,1257346705128543268;
->lookup_cmd_1,,1257346705128547903;
->lookup_cmd,,1257346705128552381;
-<add_cmd,,10441,,1257346705128561214;
-<xmalloc,,10442,,1257346705128573839;
->xmalloc,,1257346705128580735;
-<delete_cmd,,10443,,1257346705128591249;
->delete_cmd,,1257346705128608252;
->add_cmd,,1257346705128616083;
->add_alias_cmd,,1257346705128620652;
->add_com_alias,,1257346705128625196;
-<add_setshow_boolean_cmd,,10444,,1257346705128637033;
-<add_setshow_cmd_full,,10445,,1257346705128652804;
-<xstrdup,,10446,,1257346705128659793;
-<xmalloc,,10447,,1257346705128672382;
->xmalloc,,1257346705128679269;
->xstrdup,,1257346705128683705;
-<xstrdup,,10448,,1257346705128688189;
-<xmalloc,,10449,,1257346705128699173;
->xmalloc,,1257346705128706219;
->xstrdup,,1257346705128710646;
-<add_set_or_show_cmd,,10450,,1257346705128721458;
-<add_cmd,,10451,,1257346705128732847;
-<xmalloc,,10452,,1257346705128745758;
->xmalloc,,1257346705128752539;
-<delete_cmd,,10453,,1257346705128763026;
->delete_cmd,,1257346705128771080;
->add_cmd,,1257346705128775904;
->add_set_or_show_cmd,,1257346705128780560;
-<add_set_or_show_cmd,,10454,,1257346705128791531;
-<add_cmd,,10455,,1257346705128803371;
-<xmalloc,,10456,,1257346705128816546;
->xmalloc,,1257346705128823373;
-<delete_cmd,,10457,,1257346705128833833;
->delete_cmd,,1257346705128841662;
->add_cmd,,1257346705128846431;
->add_set_or_show_cmd,,1257346705128851108;
->add_setshow_cmd_full,,1257346705128855863;
->add_setshow_boolean_cmd,,1257346705128860726;
-<add_prefix_cmd,,10458,,1257346705128871934;
-<add_cmd,,10459,,1257346705128883787;
-<xmalloc,,10460,,1257346705128896565;
->xmalloc,,1257346705128903467;
-<delete_cmd,,10461,,1257346705128914023;
->delete_cmd,,1257346705128921849;
->add_cmd,,1257346705128926513;
->add_prefix_cmd,,1257346705128931135;
-<add_prefix_cmd,,10462,,1257346705128941758;
-<add_cmd,,10463,,1257346705128953439;
-<xmalloc,,10464,,1257346705128966644;
->xmalloc,,1257346705128973616;
-<delete_cmd,,10465,,1257346705128984054;
->delete_cmd,,1257346705128991919;
->add_cmd,,1257346705128996544;
->add_prefix_cmd,,1257346705129001103;
-<add_setshow_boolean_cmd,,10466,,1257346705129013124;
-<add_setshow_cmd_full,,10467,,1257346705129028664;
-<xstrprintf,,10468,,1257346705129042600;
-<xstrvprintf,,10469,,1257346705129055586;
->xstrvprintf,,1257346705129063508;
->xstrprintf,,1257346705129068076;
-<xstrprintf,,10470,,1257346705129079444;
-<xstrvprintf,,10471,,1257346705129092794;
->xstrvprintf,,1257346705129100490;
->xstrprintf,,1257346705129105052;
-<add_set_or_show_cmd,,10472,,1257346705129115539;
-<add_cmd,,10473,,1257346705129127043;
-<xmalloc,,10474,,1257346705129139827;
->xmalloc,,1257346705129146813;
-<delete_cmd,,10475,,1257346705129157333;
->delete_cmd,,1257346705129164410;
->add_cmd,,1257346705129168831;
->add_set_or_show_cmd,,1257346705129173456;
-<add_set_or_show_cmd,,10476,,1257346705129183928;
-<add_cmd,,10477,,1257346705129195428;
-<xmalloc,,10478,,1257346705129208580;
->xmalloc,,1257346705129215419;
-<delete_cmd,,10479,,1257346705129226522;
->delete_cmd,,1257346705129233692;
->add_cmd,,1257346705129238125;
->add_set_or_show_cmd,,1257346705129242822;
->add_setshow_cmd_full,,1257346705129247709;
->add_setshow_boolean_cmd,,1257346705129252512;
-<add_prefix_cmd,,10480,,1257346705129263339;
-<add_cmd,,10481,,1257346705129274969;
-<xmalloc,,10482,,1257346705129287982;
->xmalloc,,1257346705129294869;
-<delete_cmd,,10483,,1257346705129305762;
->delete_cmd,,1257346705129314477;
->add_cmd,,1257346705129319368;
->add_prefix_cmd,,1257346705129323879;
-<add_com_alias,,10484,,1257346705129333433;
-<add_alias_cmd,,10485,,1257346705129345703;
-<lookup_cmd,,10486,,1257346705129359508;
-<lookup_cmd_1,,10487,,1257346705129372211;
-<find_command_name_length,,10488,,1257346705129385633;
->find_command_name_length,,1257346705129392977;
-<find_cmd,,10489,,1257346705129402556;
->find_cmd,,1257346705129410183;
-<lookup_cmd_1,,10490,,1257346705129419987;
-<find_command_name_length,,10491,,1257346705129433848;
->find_command_name_length,,1257346705129441201;
->lookup_cmd_1,,1257346705129445800;
->lookup_cmd_1,,1257346705129450230;
->lookup_cmd,,1257346705129454681;
-<add_cmd,,10492,,1257346705129463468;
-<xmalloc,,10493,,1257346705129476855;
->xmalloc,,1257346705129483856;
-<delete_cmd,,10494,,1257346705129494502;
->delete_cmd,,1257346705129503100;
->add_cmd,,1257346705129507948;
->add_alias_cmd,,1257346705129512408;
->add_com_alias,,1257346705129516944;
-<add_com_alias,,10495,,1257346705129526396;
-<add_alias_cmd,,10496,,1257346705129538961;
-<lookup_cmd,,10497,,1257346705129552338;
-<lookup_cmd_1,,10498,,1257346705129564632;
-<find_command_name_length,,10499,,1257346705129578006;
->find_command_name_length,,1257346705129585401;
-<find_cmd,,10500,,1257346705129594830;
->find_cmd,,1257346705129606960;
-<lookup_cmd_1,,10501,,1257346705129617071;
-<find_command_name_length,,10502,,1257346705129630915;
->find_command_name_length,,1257346705129638349;
->lookup_cmd_1,,1257346705129642944;
->lookup_cmd_1,,1257346705129647428;
->lookup_cmd,,1257346705129651843;
-<add_cmd,,10503,,1257346705129660754;
-<xmalloc,,10504,,1257346705129673575;
->xmalloc,,1257346705129680591;
-<delete_cmd,,10505,,1257346705129691445;
->delete_cmd,,1257346705129700227;
->add_cmd,,1257346705129705222;
->add_alias_cmd,,1257346705129709730;
->add_com_alias,,1257346705129714275;
-<add_com,,10506,,1257346705129725940;
-<add_cmd,,10507,,1257346705129737534;
-<xmalloc,,10508,,1257346705129750520;
->xmalloc,,1257346705129757407;
-<delete_cmd,,10509,,1257346705129767945;
->delete_cmd,,1257346705129776697;
->add_cmd,,1257346705129781445;
->add_com,,1257346705129785812;
-<add_prefix_cmd,,10510,,1257346705129796233;
-<add_cmd,,10511,,1257346705129807772;
-<xmalloc,,10512,,1257346705129820819;
->xmalloc,,1257346705129827814;
-<delete_cmd,,10513,,1257346705129838337;
->delete_cmd,,1257346705129846926;
->add_cmd,,1257346705129852063;
->add_prefix_cmd,,1257346705129856640;
-<add_info,,10514,,1257346705129867007;
-<add_cmd,,10515,,1257346705129878673;
-<xmalloc,,10516,,1257346705129891502;
->xmalloc,,1257346705129898395;
-<delete_cmd,,10517,,1257346705129908915;
->delete_cmd,,1257346705129917393;
->add_cmd,,1257346705129922022;
->add_info,,1257346705129926509;
-<add_cmd,,10518,,1257346705129936436;
-<xmalloc,,10519,,1257346705129949552;
->xmalloc,,1257346705129959323;
-<delete_cmd,,10520,,1257346705129970252;
->delete_cmd,,1257346705129978263;
->add_cmd,,1257346705129982802;
-<add_cmd,,10521,,1257346705129992489;
-<xmalloc,,10522,,1257346705130005718;
->xmalloc,,1257346705130012690;
-<delete_cmd,,10523,,1257346705130023212;
->delete_cmd,,1257346705130031020;
->add_cmd,,1257346705130035802;
-<add_com,,10524,,1257346705130047446;
-<add_cmd,,10525,,1257346705130059079;
-<xmalloc,,10526,,1257346705130071873;
->xmalloc,,1257346705130078778;
-<delete_cmd,,10527,,1257346705130089358;
->delete_cmd,,1257346705130097974;
->add_cmd,,1257346705130103415;
->add_com,,1257346705130107809;
-<add_com,,10528,,1257346705130119492;
-<add_cmd,,10529,,1257346705130131423;
-<xmalloc,,10530,,1257346705130144229;
->xmalloc,,1257346705130151154;
-<delete_cmd,,10531,,1257346705130161668;
->delete_cmd,,1257346705130170336;
->add_cmd,,1257346705130175151;
->add_com,,1257346705130179605;
-<add_setshow_zinteger_cmd,,10532,,1257346705130192901;
-<add_setshow_cmd_full,,10533,,1257346705130207917;
-<xstrprintf,,10534,,1257346705130222028;
-<xstrvprintf,,10535,,1257346705130234996;
->xstrvprintf,,1257346705130243368;
->xstrprintf,,1257346705130247934;
-<xstrprintf,,10536,,1257346705130259566;
-<xstrvprintf,,10537,,1257346705130272799;
->xstrvprintf,,1257346705130281051;
->xstrprintf,,1257346705130285605;
-<add_set_or_show_cmd,,10538,,1257346705130296113;
-<add_cmd,,10539,,1257346705130307484;
-<xmalloc,,10540,,1257346705130320271;
->xmalloc,,1257346705130327215;
-<delete_cmd,,10541,,1257346705130337805;
->delete_cmd,,1257346705130345801;
->add_cmd,,1257346705130350526;
->add_set_or_show_cmd,,1257346705130355224;
-<add_set_or_show_cmd,,10542,,1257346705130365671;
-<add_cmd,,10543,,1257346705130377205;
-<xmalloc,,10544,,1257346705130390047;
->xmalloc,,1257346705130396903;
-<delete_cmd,,10545,,1257346705130407775;
->delete_cmd,,1257346705130415646;
->add_cmd,,1257346705130420458;
->add_set_or_show_cmd,,1257346705130425188;
->add_setshow_cmd_full,,1257346705130429940;
->add_setshow_zinteger_cmd,,1257346705130433889;
-<add_setshow_zinteger_cmd,,10546,,1257346705130446845;
-<add_setshow_cmd_full,,10547,,1257346705130461732;
-<xstrprintf,,10548,,1257346705130475942;
-<xstrvprintf,,10549,,1257346705130489018;
->xstrvprintf,,1257346705130497373;
->xstrprintf,,1257346705130501947;
-<xstrprintf,,10550,,1257346705130513902;
-<xstrvprintf,,10551,,1257346705130527215;
->xstrvprintf,,1257346705130535254;
->xstrprintf,,1257346705130539804;
-<add_set_or_show_cmd,,10552,,1257346705130550409;
-<add_cmd,,10553,,1257346705130562023;
-<xmalloc,,10554,,1257346705130574844;
->xmalloc,,1257346705130581692;
-<delete_cmd,,10555,,1257346705130592579;
->delete_cmd,,1257346705130605084;
->add_cmd,,1257346705130609941;
->add_set_or_show_cmd,,1257346705130614626;
-<add_set_or_show_cmd,,10556,,1257346705130625486;
-<add_cmd,,10557,,1257346705130637233;
-<xmalloc,,10558,,1257346705130650039;
->xmalloc,,1257346705130657058;
-<delete_cmd,,10559,,1257346705130667530;
->delete_cmd,,1257346705130675725;
->add_cmd,,1257346705130680299;
->add_set_or_show_cmd,,1257346705130684967;
->add_setshow_cmd_full,,1257346705130689893;
->add_setshow_zinteger_cmd,,1257346705130693743;
-<add_setshow_integer_cmd,,10560,,1257346705130706476;
-<add_setshow_cmd_full,,10561,,1257346705130721549;
-<xstrprintf,,10562,,1257346705130735663;
-<xstrvprintf,,10563,,1257346705130748878;
->xstrvprintf,,1257346705130757253;
->xstrprintf,,1257346705130761837;
-<xstrprintf,,10564,,1257346705130773433;
-<xstrvprintf,,10565,,1257346705130787009;
->xstrvprintf,,1257346705130795123;
->xstrprintf,,1257346705130799772;
-<add_set_or_show_cmd,,10566,,1257346705130810232;
-<add_cmd,,10567,,1257346705130821691;
-<xmalloc,,10568,,1257346705130834442;
->xmalloc,,1257346705130841365;
-<delete_cmd,,10569,,1257346705130851870;
->delete_cmd,,1257346705130859768;
->add_cmd,,1257346705130864544;
->add_set_or_show_cmd,,1257346705130869334;
-<add_set_or_show_cmd,,10570,,1257346705130880131;
-<add_cmd,,10571,,1257346705130891634;
-<xmalloc,,10572,,1257346705130904353;
->xmalloc,,1257346705130911219;
-<delete_cmd,,10573,,1257346705130921667;
->delete_cmd,,1257346705130929627;
->add_cmd,,1257346705130934557;
->add_set_or_show_cmd,,1257346705130939209;
->add_setshow_cmd_full,,1257346705130944009;
->add_setshow_integer_cmd,,1257346705130947849;
-<add_prefix_cmd,,10574,,1257346705130958526;
-<add_cmd,,10575,,1257346705130970089;
-<xmalloc,,10576,,1257346705130982856;
->xmalloc,,1257346705130989695;
-<delete_cmd,,10577,,1257346705131000624;
->delete_cmd,,1257346705131008581;
->add_cmd,,1257346705131013162;
->add_prefix_cmd,,1257346705131017703;
-<add_prefix_cmd,,10578,,1257346705131028578;
-<add_cmd,,10579,,1257346705131040207;
-<xmalloc,,10580,,1257346705131052968;
->xmalloc,,1257346705131060002;
-<delete_cmd,,10581,,1257346705131070763;
->delete_cmd,,1257346705131078739;
->add_cmd,,1257346705131083241;
->add_prefix_cmd,,1257346705131087839;
-<add_com,,10582,,1257346705131099809;
-<add_cmd,,10583,,1257346705131111369;
-<xmalloc,,10584,,1257346705131124569;
->xmalloc,,1257346705131131371;
-<delete_cmd,,10585,,1257346705131142045;
->delete_cmd,,1257346705131150761;
->add_cmd,,1257346705131155924;
->add_com,,1257346705131160375;
-<set_cmd_completer,,10586,,1257346705131170074;
->set_cmd_completer,,1257346705131177394;
-<add_com,,10587,,1257346705131189382;
-<add_cmd,,10588,,1257346705131201060;
-<xmalloc,,10589,,1257346705131213760;
->xmalloc,,1257346705131220509;
-<delete_cmd,,10590,,1257346705131231035;
->delete_cmd,,1257346705131239624;
->add_cmd,,1257346705131244280;
->add_com,,1257346705131248619;
-<add_com,,10591,,1257346705131260198;
-<add_cmd,,10592,,1257346705131271653;
-<xmalloc,,10593,,1257346705131284663;
->xmalloc,,1257346705131291523;
-<delete_cmd,,10594,,1257346705131303129;
->delete_cmd,,1257346705131311859;
->add_cmd,,1257346705131316801;
->add_com,,1257346705131321161;
-<add_com_alias,,10595,,1257346705131330752;
-<add_alias_cmd,,10596,,1257346705131343200;
-<lookup_cmd,,10597,,1257346705131357187;
-<lookup_cmd_1,,10598,,1257346705131369421;
-<find_command_name_length,,10599,,1257346705131383114;
->find_command_name_length,,1257346705131390492;
-<find_cmd,,10600,,1257346705131400118;
->find_cmd,,1257346705131407763;
->lookup_cmd_1,,1257346705131412386;
->lookup_cmd,,1257346705131416885;
-<add_cmd,,10601,,1257346705131425694;
-<xmalloc,,10602,,1257346705131438809;
->xmalloc,,1257346705131445958;
-<delete_cmd,,10603,,1257346705131456646;
->delete_cmd,,1257346705131465374;
->add_cmd,,1257346705131470143;
->add_alias_cmd,,1257346705131474591;
->add_com_alias,,1257346705131479051;
-<add_com,,10604,,1257346705131490813;
-<add_cmd,,10605,,1257346705131502545;
-<xmalloc,,10606,,1257346705131515285;
->xmalloc,,1257346705131522130;
-<delete_cmd,,10607,,1257346705131532791;
->delete_cmd,,1257346705131541501;
->add_cmd,,1257346705131546183;
->add_com,,1257346705131550505;
-<set_cmd_completer,,10608,,1257346705131560020;
->set_cmd_completer,,1257346705131567241;
-<add_com,,10609,,1257346705131578880;
-<add_cmd,,10610,,1257346705131590422;
-<xmalloc,,10611,,1257346705131608268;
->xmalloc,,1257346705131615711;
-<delete_cmd,,10612,,1257346705131626577;
->delete_cmd,,1257346705131635274;
->add_cmd,,1257346705131640237;
->add_com,,1257346705131644543;
-<set_cmd_completer,,10613,,1257346705131654573;
->set_cmd_completer,,1257346705131662089;
-<add_cmd,,10614,,1257346705131671980;
-<xmalloc,,10615,,1257346705131685300;
->xmalloc,,1257346705131692334;
-<delete_cmd,,10616,,1257346705131702936;
->delete_cmd,,1257346705131711032;
->add_cmd,,1257346705131715834;
-<add_com,,10617,,1257346705131727849;
-<add_cmd,,10618,,1257346705131739443;
-<xmalloc,,10619,,1257346705131752531;
->xmalloc,,1257346705131759517;
-<delete_cmd,,10620,,1257346705131770061;
->delete_cmd,,1257346705131778870;
->add_cmd,,1257346705131783619;
->add_com,,1257346705131787968;
-<add_setshow_integer_cmd,,10621,,1257346705131799636;
-<add_setshow_cmd_full,,10622,,1257346705131814607;
-<xstrdup,,10623,,1257346705131821744;
-<xmalloc,,10624,,1257346705131834607;
->xmalloc,,1257346705131841506;
->xstrdup,,1257346705131846032;
-<xstrdup,,10625,,1257346705131850639;
-<xmalloc,,10626,,1257346705131861737;
->xmalloc,,1257346705131868651;
->xstrdup,,1257346705131873042;
-<add_set_or_show_cmd,,10627,,1257346705131884205;
-<add_cmd,,10628,,1257346705131895477;
-<xmalloc,,10629,,1257346705131908328;
->xmalloc,,1257346705131915056;
-<delete_cmd,,10630,,1257346705131925738;
->delete_cmd,,1257346705131933680;
->add_cmd,,1257346705131938357;
->add_set_or_show_cmd,,1257346705131942976;
-<add_set_or_show_cmd,,10631,,1257346705131953662;
-<add_cmd,,10632,,1257346705131965268;
-<xmalloc,,10633,,1257346705131978230;
->xmalloc,,1257346705131985050;
-<delete_cmd,,10634,,1257346705131995498;
->delete_cmd,,1257346705132003489;
->add_cmd,,1257346705132008090;
->add_set_or_show_cmd,,1257346705132012791;
->add_setshow_cmd_full,,1257346705132017537;
->add_setshow_integer_cmd,,1257346705132021380;
-<add_setshow_boolean_cmd,,10635,,1257346705132033563;
-<add_setshow_cmd_full,,10636,,1257346705132048531;
-<xstrprintf,,10637,,1257346705132062807;
-<xstrvprintf,,10638,,1257346705132076347;
->xstrvprintf,,1257346705132084265;
->xstrprintf,,1257346705132088846;
-<xstrprintf,,10639,,1257346705132101092;
-<xstrvprintf,,10640,,1257346705132114204;
->xstrvprintf,,1257346705132121897;
->xstrprintf,,1257346705132126432;
-<add_set_or_show_cmd,,10641,,1257346705132137232;
-<add_cmd,,10642,,1257346705132148681;
-<xmalloc,,10643,,1257346705132161752;
->xmalloc,,1257346705132168657;
-<delete_cmd,,10644,,1257346705132179267;
->delete_cmd,,1257346705132187122;
->add_cmd,,1257346705132191883;
->add_set_or_show_cmd,,1257346705132196509;
-<add_set_or_show_cmd,,10645,,1257346705132207158;
-<add_cmd,,10646,,1257346705132218652;
-<xmalloc,,10647,,1257346705132231509;
->xmalloc,,1257346705132238243;
-<delete_cmd,,10648,,1257346705132248895;
->delete_cmd,,1257346705132256768;
->add_cmd,,1257346705132261616;
->add_set_or_show_cmd,,1257346705132266275;
->add_setshow_cmd_full,,1257346705132270973;
->add_setshow_boolean_cmd,,1257346705132275823;
->init_cli_cmds,,1257346705132280641;
-<xstrdup,,10649,,1257346705132285291;
-<xmalloc,,10650,,1257346705132297970;
->xmalloc,,1257346705132305023;
->xstrdup,,1257346705132309386;
-<xstrdup,,10651,,1257346705132314195;
-<xmalloc,,10652,,1257346705132325458;
->xmalloc,,1257346705132332499;
->xstrdup,,1257346705132336983;
-<default_word_break_characters,,10653,,1257346705132346297;
->default_word_break_characters,,1257346705132355713;
-<get_gdb_completer_quote_characters,,10654,,1257346705132365725;
->get_gdb_completer_quote_characters,,1257346705132374945;
-<rl_add_defun,,10655,,1257346705132382175;
-<rl_bind_key,,10656,,1257346705132392942;
->rl_bind_key,,1257346705132401597;
-<rl_add_funmap_entry,,10657,,1257346705132408535;
-<xrealloc,,10658,,1257346705132423485;
->xrealloc,,1257346705132433575;
-<xmalloc,,10659,,1257346705132444486;
->xmalloc,,1257346705132451731;
->rl_add_funmap_entry,,1257346705132456636;
->rl_add_defun,,1257346705132461424;
-<add_setshow_string_cmd,,10660,,1257346705132472494;
-<add_setshow_cmd_full,,10661,,1257346705132488903;
-<xstrdup,,10662,,1257346705132496055;
-<xmalloc,,10663,,1257346705132508578;
->xmalloc,,1257346705132515519;
->xstrdup,,1257346705132519946;
-<xstrdup,,10664,,1257346705132524604;
-<xmalloc,,10665,,1257346705132536050;
->xmalloc,,1257346705132543021;
->xstrdup,,1257346705132547430;
-<add_set_or_show_cmd,,10666,,1257346705132558161;
-<add_cmd,,10667,,1257346705132569673;
-<xmalloc,,10668,,1257346705132582512;
->xmalloc,,1257346705132589387;
-<delete_cmd,,10669,,1257346705132600033;
->delete_cmd,,1257346705132612703;
->add_cmd,,1257346705132617470;
->add_set_or_show_cmd,,1257346705132622092;
-<add_set_or_show_cmd,,10670,,1257346705132632895;
-<add_cmd,,10671,,1257346705132644302;
-<xmalloc,,10672,,1257346705132657408;
->xmalloc,,1257346705132664356;
-<delete_cmd,,10673,,1257346705132674809;
->delete_cmd,,1257346705132682686;
->add_cmd,,1257346705132687525;
->add_set_or_show_cmd,,1257346705132692165;
->add_setshow_cmd_full,,1257346705132696956;
->add_setshow_string_cmd,,1257346705132701061;
-<add_com,,10674,,1257346705132712706;
-<add_cmd,,10675,,1257346705132724447;
-<xmalloc,,10676,,1257346705132737340;
->xmalloc,,1257346705132744155;
-<delete_cmd,,10677,,1257346705132754732;
->delete_cmd,,1257346705132763577;
->add_cmd,,1257346705132768413;
->add_com,,1257346705132772692;
-<add_setshow_boolean_cmd,,10678,,1257346705132784725;
-<add_setshow_cmd_full,,10679,,1257346705132799894;
-<xstrprintf,,10680,,1257346705132814661;
-<xstrvprintf,,10681,,1257346705132827632;
->xstrvprintf,,1257346705132836107;
->xstrprintf,,1257346705132840672;
-<xstrprintf,,10682,,1257346705132852852;
-<xstrvprintf,,10683,,1257346705132866031;
->xstrvprintf,,1257346705132874121;
->xstrprintf,,1257346705132878668;
-<add_set_or_show_cmd,,10684,,1257346705132889444;
-<add_cmd,,10685,,1257346705132900857;
-<xmalloc,,10686,,1257346705132913951;
->xmalloc,,1257346705132920883;
-<delete_cmd,,10687,,1257346705132931457;
->delete_cmd,,1257346705132939301;
->add_cmd,,1257346705132943848;
->add_set_or_show_cmd,,1257346705132948516;
-<add_set_or_show_cmd,,10688,,1257346705132959390;
-<add_cmd,,10689,,1257346705132970915;
-<xmalloc,,10690,,1257346705132983690;
->xmalloc,,1257346705132990664;
-<delete_cmd,,10691,,1257346705133001206;
->delete_cmd,,1257346705133009473;
->add_cmd,,1257346705133014146;
->add_set_or_show_cmd,,1257346705133018832;
->add_setshow_cmd_full,,1257346705133023716;
->add_setshow_boolean_cmd,,1257346705133028492;
-<add_setshow_boolean_cmd,,10692,,1257346705133040570;
-<add_setshow_cmd_full,,10693,,1257346705133055673;
-<xstrprintf,,10694,,1257346705133070322;
-<xstrvprintf,,10695,,1257346705133083239;
->xstrvprintf,,1257346705133091308;
->xstrprintf,,1257346705133095834;
-<xstrprintf,,10696,,1257346705133107702;
-<xstrvprintf,,10697,,1257346705133120757;
->xstrvprintf,,1257346705133128820;
->xstrprintf,,1257346705133133394;
-<add_set_or_show_cmd,,10698,,1257346705133144131;
-<add_cmd,,10699,,1257346705133155685;
-<xmalloc,,10700,,1257346705133168590;
->xmalloc,,1257346705133175531;
-<delete_cmd,,10701,,1257346705133186175;
->delete_cmd,,1257346705133193356;
->add_cmd,,1257346705133197837;
->add_set_or_show_cmd,,1257346705133202469;
-<add_set_or_show_cmd,,10702,,1257346705133213250;
-<add_cmd,,10703,,1257346705133224664;
-<xmalloc,,10704,,1257346705133237406;
->xmalloc,,1257346705133244248;
-<delete_cmd,,10705,,1257346705133254756;
->delete_cmd,,1257346705133261862;
->add_cmd,,1257346705133266256;
->add_set_or_show_cmd,,1257346705133270966;
->add_setshow_cmd_full,,1257346705133275739;
->add_setshow_boolean_cmd,,1257346705133280638;
-<add_setshow_integer_cmd,,10706,,1257346705133293119;
-<add_setshow_cmd_full,,10707,,1257346705133308102;
-<xstrprintf,,10708,,1257346705133322471;
-<xstrvprintf,,10709,,1257346705133335520;
->xstrvprintf,,1257346705133343204;
->xstrprintf,,1257346705133347740;
-<xstrprintf,,10710,,1257346705133359469;
-<xstrvprintf,,10711,,1257346705133372668;
->xstrvprintf,,1257346705133380373;
->xstrprintf,,1257346705133384917;
-<add_set_or_show_cmd,,10712,,1257346705133395669;
-<add_cmd,,10713,,1257346705133407217;
-<xmalloc,,10714,,1257346705133420038;
->xmalloc,,1257346705133426808;
-<delete_cmd,,10715,,1257346705133437343;
->delete_cmd,,1257346705133444597;
->add_cmd,,1257346705133449075;
->add_set_or_show_cmd,,1257346705133453709;
-<add_set_or_show_cmd,,10716,,1257346705133464464;
-<add_cmd,,10717,,1257346705133476133;
-<xmalloc,,10718,,1257346705133488947;
->xmalloc,,1257346705133495906;
-<delete_cmd,,10719,,1257346705133506718;
->delete_cmd,,1257346705133514005;
->add_cmd,,1257346705133518456;
->add_set_or_show_cmd,,1257346705133523283;
->add_setshow_cmd_full,,1257346705133528038;
->add_setshow_integer_cmd,,1257346705133531884;
-<add_setshow_filename_cmd,,10720,,1257346705133546061;
-<add_setshow_cmd_full,,10721,,1257346705133561063;
-<xstrprintf,,10722,,1257346705133575228;
-<xstrvprintf,,10723,,1257346705133588120;
->xstrvprintf,,1257346705133596255;
->xstrprintf,,1257346705133604864;
-<xstrprintf,,10724,,1257346705133616741;
-<xstrvprintf,,10725,,1257346705133629919;
->xstrvprintf,,1257346705133638214;
->xstrprintf,,1257346705133642806;
-<add_set_or_show_cmd,,10726,,1257346705133653515;
-<add_cmd,,10727,,1257346705133664920;
-<xmalloc,,10728,,1257346705133677698;
->xmalloc,,1257346705133684606;
-<delete_cmd,,10729,,1257346705133695526;
->delete_cmd,,1257346705133702654;
->add_cmd,,1257346705133707099;
->add_set_or_show_cmd,,1257346705133711748;
-<add_set_or_show_cmd,,10730,,1257346705133722942;
-<add_cmd,,10731,,1257346705133734268;
-<xmalloc,,10732,,1257346705133747179;
->xmalloc,,1257346705133754009;
-<delete_cmd,,10733,,1257346705133764547;
->delete_cmd,,1257346705133771632;
->add_cmd,,1257346705133776225;
->add_set_or_show_cmd,,1257346705133780883;
->add_setshow_cmd_full,,1257346705133785752;
->add_setshow_filename_cmd,,1257346705133790699;
-<add_setshow_boolean_cmd,,10734,,1257346705133802104;
-<add_setshow_cmd_full,,10735,,1257346705133817053;
-<xstrdup,,10736,,1257346705133824157;
-<xmalloc,,10737,,1257346705133836596;
->xmalloc,,1257346705133843447;
->xstrdup,,1257346705133847928;
-<xstrdup,,10738,,1257346705133852571;
-<xmalloc,,10739,,1257346705133863527;
->xmalloc,,1257346705133870345;
->xstrdup,,1257346705133874832;
-<add_set_or_show_cmd,,10740,,1257346705133888838;
-<add_cmd,,10741,,1257346705133924346;
-<xmalloc,,10742,,1257346705133937474;
->xmalloc,,1257346705133944469;
-<delete_cmd,,10743,,1257346705133955155;
->delete_cmd,,1257346705133963166;
->add_cmd,,1257346705133967840;
->add_set_or_show_cmd,,1257346705133972511;
-<add_set_or_show_cmd,,10744,,1257346705133983304;
-<add_cmd,,10745,,1257346705133994750;
-<xmalloc,,10746,,1257346705134007631;
->xmalloc,,1257346705134014533;
-<delete_cmd,,10747,,1257346705134025035;
->delete_cmd,,1257346705134032966;
->add_cmd,,1257346705134037516;
->add_set_or_show_cmd,,1257346705134042223;
->add_setshow_cmd_full,,1257346705134047005;
->add_setshow_boolean_cmd,,1257346705134051879;
-<add_setshow_zinteger_cmd,,10748,,1257346705134065671;
-<add_setshow_cmd_full,,10749,,1257346705134080760;
-<xstrprintf,,10750,,1257346705134095138;
-<xstrvprintf,,10751,,1257346705134108200;
->xstrvprintf,,1257346705134116614;
->xstrprintf,,1257346705134121276;
-<xstrprintf,,10752,,1257346705134133197;
-<xstrvprintf,,10753,,1257346705134146412;
->xstrvprintf,,1257346705134154445;
->xstrprintf,,1257346705134159001;
-<add_set_or_show_cmd,,10754,,1257346705134170625;
-<add_cmd,,10755,,1257346705134182282;
-<xmalloc,,10756,,1257346705134195758;
->xmalloc,,1257346705134202669;
-<delete_cmd,,10757,,1257346705134214515;
->delete_cmd,,1257346705134222346;
->add_cmd,,1257346705134226785;
->add_set_or_show_cmd,,1257346705134231396;
-<add_set_or_show_cmd,,10758,,1257346705134243251;
-<add_cmd,,10759,,1257346705134254794;
-<xmalloc,,10760,,1257346705134268694;
->xmalloc,,1257346705134275897;
-<delete_cmd,,10761,,1257346705134287572;
->delete_cmd,,1257346705134295607;
->add_cmd,,1257346705134300101;
->add_set_or_show_cmd,,1257346705134304765;
->add_setshow_cmd_full,,1257346705134309520;
->add_setshow_zinteger_cmd,,1257346705134313381;
-<add_setshow_boolean_cmd,,10762,,1257346705134326443;
-<add_setshow_cmd_full,,10763,,1257346705134341892;
-<xstrprintf,,10764,,1257346705134357167;
-<xstrvprintf,,10765,,1257346705134371314;
->xstrvprintf,,1257346705134382567;
->xstrprintf,,1257346705134387226;
-<xstrprintf,,10766,,1257346705134399613;
-<xstrvprintf,,10767,,1257346705134414136;
->xstrvprintf,,1257346705134422302;
->xstrprintf,,1257346705134426861;
-<add_set_or_show_cmd,,10768,,1257346705134437952;
-<add_cmd,,10769,,1257346705134449290;
-<xmalloc,,10770,,1257346705134462105;
->xmalloc,,1257346705134469007;
-<delete_cmd,,10771,,1257346705134479963;
->delete_cmd,,1257346705134487936;
->add_cmd,,1257346705134492636;
->add_set_or_show_cmd,,1257346705134497255;
-<add_set_or_show_cmd,,10772,,1257346705134508527;
-<add_cmd,,10773,,1257346705134520058;
-<xmalloc,,10774,,1257346705134533080;
->xmalloc,,1257346705134539958;
-<delete_cmd,,10775,,1257346705134550580;
->delete_cmd,,1257346705134558622;
->add_cmd,,1257346705134563287;
->add_set_or_show_cmd,,1257346705134567987;
->add_setshow_cmd_full,,1257346705134572754;
->add_setshow_boolean_cmd,,1257346705134577572;
-<add_setshow_auto_boolean_cmd,,10776,,1257346705134590525;
-<add_setshow_cmd_full,,10777,,1257346705134611159;
-<xstrprintf,,10778,,1257346705134626121;
-<xstrvprintf,,10779,,1257346705134639420;
->xstrvprintf,,1257346705134648710;
->xstrprintf,,1257346705134653312;
-<xstrprintf,,10780,,1257346705134666424;
-<xstrvprintf,,10781,,1257346705134680799;
->xstrvprintf,,1257346705134689656;
->xstrprintf,,1257346705134694207;
-<add_set_or_show_cmd,,10782,,1257346705134706287;
-<add_cmd,,10783,,1257346705134718257;
-<xmalloc,,10784,,1257346705134731562;
->xmalloc,,1257346705134738569;
-<delete_cmd,,10785,,1257346705134749432;
->delete_cmd,,1257346705134757347;
->add_cmd,,1257346705134761985;
->add_set_or_show_cmd,,1257346705134766670;
-<add_set_or_show_cmd,,10786,,1257346705134778457;
-<add_cmd,,10787,,1257346705134790658;
-<xmalloc,,10788,,1257346705134804708;
->xmalloc,,1257346705134811860;
-<delete_cmd,,10789,,1257346705134822834;
->delete_cmd,,1257346705134830756;
->add_cmd,,1257346705134835387;
->add_set_or_show_cmd,,1257346705134840106;
->add_setshow_cmd_full,,1257346705134844870;
->add_setshow_auto_boolean_cmd,,1257346705134849787;
-<add_setshow_filename_cmd,,10790,,1257346705134865570;
-<add_setshow_cmd_full,,10791,,1257346705134880547;
-<xstrprintf,,10792,,1257346705134895316;
-<xstrvprintf,,10793,,1257346705134908311;
->xstrvprintf,,1257346705134916079;
->xstrprintf,,1257346705134920600;
-<xstrprintf,,10794,,1257346705134932061;
-<xstrvprintf,,10795,,1257346705134945342;
->xstrvprintf,,1257346705134952978;
->xstrprintf,,1257346705134957510;
-<add_set_or_show_cmd,,10796,,1257346705134968421;
-<add_cmd,,10797,,1257346705134979650;
-<xmalloc,,10798,,1257346705134992588;
->xmalloc,,1257346705134999533;
-<delete_cmd,,10799,,1257346705135010311;
->delete_cmd,,1257346705135018224;
->add_cmd,,1257346705135022738;
->add_set_or_show_cmd,,1257346705135027366;
-<add_set_or_show_cmd,,10800,,1257346705135038347;
-<add_cmd,,10801,,1257346705135049651;
-<xmalloc,,10802,,1257346705135062785;
->xmalloc,,1257346705135069654;
-<delete_cmd,,10803,,1257346705135080240;
->delete_cmd,,1257346705135088114;
->add_cmd,,1257346705135092607;
->add_set_or_show_cmd,,1257346705135097238;
->add_setshow_cmd_full,,1257346705135102059;
->add_setshow_filename_cmd,,1257346705135106859;
-<initialize_stdin_serial,,10804,,1257346705135121589;
-<serial_fdopen,,10805,,1257346705135134139;
-<serial_interface_lookup,,10806,,1257346705135146313;
->serial_interface_lookup,,1257346705135155504;
-<serial_interface_lookup,,10807,,1257346705135160980;
->serial_interface_lookup,,1257346705135168358;
-<xcalloc,,10808,,1257346705135183476;
->xcalloc,,1257346705135200444;
->serial_fdopen,,1257346705135205584;
->initialize_stdin_serial,,1257346705135210639;
-<async_init_signals,,10809,,1257346705135220786;
-<create_async_signal_handler,,10810,,1257346705135240897;
-<xmalloc,,10811,,1257346705135254689;
->xmalloc,,1257346705135261636;
->create_async_signal_handler,,1257346705135267056;
-<create_async_signal_handler,,10812,,1257346705135276932;
-<xmalloc,,10813,,1257346705135289545;
->xmalloc,,1257346705135296570;
->create_async_signal_handler,,1257346705135301536;
-<create_async_signal_handler,,10814,,1257346705135310224;
-<xmalloc,,10815,,1257346705135322891;
->xmalloc,,1257346705135329748;
->create_async_signal_handler,,1257346705135334693;
-<create_async_signal_handler,,10816,,1257346705135343333;
-<xmalloc,,10817,,1257346705135355838;
->xmalloc,,1257346705135362710;
->create_async_signal_handler,,1257346705135367651;
-<create_async_signal_handler,,10818,,1257346705135375636;
-<xmalloc,,10819,,1257346705135388014;
->xmalloc,,1257346705135394904;
->create_async_signal_handler,,1257346705135399975;
->async_init_signals,,1257346705135404952;
-<set_language,,10820,,1257346705135412239;
->set_language,,1257346705135421270;
->gdb_init,,1257346705135426185;
-<get_init_files,,10821,,1257346705135443053;
-<xstrprintf,,10822,,1257346705135459248;
-<xstrvprintf,,10823,,1257346705135472730;
->xstrvprintf,,1257346705135480947;
->xstrprintf,,1257346705135485506;
-<xfree,,10824,,1257346705149769886;
->xfree,,1257346705149784616;
->get_init_files,,1257346705149800847;
-<interp_lookup,,10825,,1257346705149821090;
->interp_lookup,,1257346705149831096;
-<interp_set,,10826,,1257346705149848353;
-<tui_init,,10827,,1257346705149873023;
-<tui_initialize_static_data,,10828,,1257346705149894445;
->tui_initialize_static_data,,1257346705149903855;
-<tui_initialize_io,,10829,,1257346705149919671;
-<tui_fileopen,,10830,,1257346705149942293;
-<tui_file_new,,10831,,1257346705149964442;
-<xmalloc,,10832,,1257346705149986622;
->xmalloc,,1257346705149994610;
-<ui_file_new,,10833,,1257346705150016955;
-<xmalloc,,10834,,1257346705150036326;
->xmalloc,,1257346705150043655;
->ui_file_new,,1257346705150048307;
-<set_ui_file_data,,10835,,1257346705150069991;
->set_ui_file_data,,1257346705150078851;
-<set_ui_file_flush,,10836,,1257346705150099765;
->set_ui_file_flush,,1257346705150108637;
-<set_ui_file_fputs,,10837,,1257346705150130374;
->set_ui_file_fputs,,1257346705150139015;
-<set_ui_file_isatty,,10838,,1257346705150157676;
->set_ui_file_isatty,,1257346705150166133;
-<set_ui_file_rewind,,10839,,1257346705150184971;
->set_ui_file_rewind,,1257346705150193687;
-<set_ui_file_put,,10840,,1257346705150210937;
->set_ui_file_put,,1257346705150219536;
->tui_file_new,,1257346705150224501;
-<ui_file_data,,10841,,1257346705150244085;
->ui_file_data,,1257346705150251487;
->tui_fileopen,,1257346705150256208;
-<tui_fileopen,,10842,,1257346705150270391;
-<tui_file_new,,10843,,1257346705150288198;
-<xmalloc,,10844,,1257346705150306231;
->xmalloc,,1257346705150313235;
-<ui_file_new,,10845,,1257346705150332633;
-<xmalloc,,10846,,1257346705150350157;
->xmalloc,,1257346705150357261;
->ui_file_new,,1257346705150361766;
-<set_ui_file_data,,10847,,1257346705150380640;
->set_ui_file_data,,1257346705150387982;
-<set_ui_file_flush,,10848,,1257346705150407208;
->set_ui_file_flush,,1257346705150414513;
-<set_ui_file_fputs,,10849,,1257346705150434061;
->set_ui_file_fputs,,1257346705150441273;
-<set_ui_file_isatty,,10850,,1257346705150458349;
->set_ui_file_isatty,,1257346705150465712;
-<set_ui_file_rewind,,10851,,1257346705150483864;
->set_ui_file_rewind,,1257346705150491260;
-<set_ui_file_put,,10852,,1257346705150507403;
->set_ui_file_put,,1257346705150514585;
->tui_file_new,,1257346705150519150;
-<ui_file_data,,10853,,1257346705150537715;
->ui_file_data,,1257346705150544798;
->tui_fileopen,,1257346705150549279;
-<tui_out_new,,10854,,1257346705150563378;
-<xmalloc,,10855,,1257346705150581335;
->xmalloc,,1257346705150588312;
-<ui_out_new,,10856,,1257346705150599157;
-<xmalloc,,10857,,1257346705150618606;
->xmalloc,,1257346705150625776;
->ui_out_new,,1257346705150630570;
->tui_out_new,,1257346705150635204;
-<cli_out_new,,10858,,1257346705150643012;
-<xmalloc,,10859,,1257346705150658909;
->xmalloc,,1257346705150665937;
-<ui_out_new,,10860,,1257346705150675591;
-<xmalloc,,10861,,1257346705150691783;
->xmalloc,,1257346705150698868;
->ui_out_new,,1257346705150703386;
->cli_out_new,,1257346705150708059;
-<add_file_handler,,10862,,1257346705150749022;
-<create_file_handler,,10863,,1257346705150771529;
-<xmalloc,,10864,,1257346705150790645;
->xmalloc,,1257346705150797817;
-<xmalloc,,10865,,1257346705150810761;
->xmalloc,,1257346705150817624;
->create_file_handler,,1257346705150822460;
->add_file_handler,,1257346705150827248;
->tui_initialize_io,,1257346705150832084;
-<tui_initialize_win,,10866,,1257346705150848571;
->tui_initialize_win,,1257346705150858501;
-<tui_initialize_readline,,10867,,1257346705150873039;
-<rl_initialize,,10868,,1257346705150885508;
-<xmalloc,,10869,,1257346705150904323;
->xmalloc,,1257346705150911633;
-<_rl_init_terminal_io,,10870,,1257346705150920436;
-<bind_termcap_arrow_keys,,10871,,1257346705150974020;
-<rl_bind_keyseq_if_unbound,,10872,,1257346705150987499;
-<rl_bind_keyseq_if_unbound_in_map,,10873,,1257346705150998738;
-<rl_function_of_keyseq,,10874,,1257346705151009982;
->rl_function_of_keyseq,,1257346705151019315;
->rl_bind_keyseq_if_unbound_in_map,,1257346705151024791;
->rl_bind_keyseq_if_unbound,,1257346705151029919;
-<rl_bind_keyseq_if_unbound,,10875,,1257346705151036827;
-<rl_bind_keyseq_if_unbound_in_map,,10876,,1257346705151045569;
-<rl_function_of_keyseq,,10877,,1257346705151054733;
->rl_function_of_keyseq,,1257346705151061939;
->rl_bind_keyseq_if_unbound_in_map,,1257346705151067193;
->rl_bind_keyseq_if_unbound,,1257346705151072164;
-<rl_bind_keyseq_if_unbound,,10878,,1257346705151078636;
-<rl_bind_keyseq_if_unbound_in_map,,10879,,1257346705151087087;
-<rl_function_of_keyseq,,10880,,1257346705151095709;
->rl_function_of_keyseq,,1257346705151102984;
->rl_bind_keyseq_if_unbound_in_map,,1257346705151108133;
->rl_bind_keyseq_if_unbound,,1257346705151113200;
-<rl_bind_keyseq_if_unbound,,10881,,1257346705151119600;
-<rl_bind_keyseq_if_unbound_in_map,,10882,,1257346705151128015;
-<rl_function_of_keyseq,,10883,,1257346705151136658;
->rl_function_of_keyseq,,1257346705151143819;
->rl_bind_keyseq_if_unbound_in_map,,1257346705151148929;
->rl_bind_keyseq_if_unbound,,1257346705151153855;
-<rl_bind_keyseq_if_unbound,,10884,,1257346705151160378;
-<rl_bind_keyseq_if_unbound_in_map,,10885,,1257346705151168796;
-<rl_function_of_keyseq,,10886,,1257346705151177481;
->rl_function_of_keyseq,,1257346705151184741;
->rl_bind_keyseq_if_unbound_in_map,,1257346705151189914;
->rl_bind_keyseq_if_unbound,,1257346705151194912;
-<rl_bind_keyseq_if_unbound,,10887,,1257346705151201423;
-<rl_bind_keyseq_if_unbound_in_map,,10888,,1257346705151209883;
-<rl_function_of_keyseq,,10889,,1257346705151218542;
->rl_function_of_keyseq,,1257346705151225723;
->rl_bind_keyseq_if_unbound_in_map,,1257346705151230950;
->rl_bind_keyseq_if_unbound,,1257346705151235964;
-<rl_bind_keyseq_if_unbound,,10890,,1257346705151242745;
-<rl_bind_keyseq_if_unbound_in_map,,10891,,1257346705151251178;
-<rl_function_of_keyseq,,10892,,1257346705151259846;
->rl_function_of_keyseq,,1257346705151267253;
->rl_bind_keyseq_if_unbound_in_map,,1257346705151272393;
->rl_bind_keyseq_if_unbound,,1257346705151277370;
->bind_termcap_arrow_keys,,1257346705151282434;
-<bind_termcap_arrow_keys,,10893,,1257346705151289000;
-<rl_bind_keyseq_if_unbound,,10894,,1257346705151298479;
-<rl_bind_keyseq_if_unbound_in_map,,10895,,1257346705151306945;
-<rl_function_of_keyseq,,10896,,1257346705151315651;
->rl_function_of_keyseq,,1257346705151323155;
->rl_bind_keyseq_if_unbound_in_map,,1257346705151328373;
->rl_bind_keyseq_if_unbound,,1257346705151333347;
-<rl_bind_keyseq_if_unbound,,10897,,1257346705151339843;
-<rl_bind_keyseq_if_unbound_in_map,,10898,,1257346705151348150;
-<rl_function_of_keyseq,,10899,,1257346705151356601;
->rl_function_of_keyseq,,1257346705151363752;
->rl_bind_keyseq_if_unbound_in_map,,1257346705151368994;
->rl_bind_keyseq_if_unbound,,1257346705151374023;
-<rl_bind_keyseq_if_unbound,,10900,,1257346705151380461;
-<rl_bind_keyseq_if_unbound_in_map,,10901,,1257346705151388795;
-<rl_function_of_keyseq,,10902,,1257346705151397231;
->rl_function_of_keyseq,,1257346705151404443;
->rl_bind_keyseq_if_unbound_in_map,,1257346705151409700;
->rl_bind_keyseq_if_unbound,,1257346705151414686;
-<rl_bind_keyseq_if_unbound,,10903,,1257346705151421158;
-<rl_bind_keyseq_if_unbound_in_map,,10904,,1257346705151429504;
-<rl_function_of_keyseq,,10905,,1257346705151437828;
->rl_function_of_keyseq,,1257346705151445001;
->rl_bind_keyseq_if_unbound_in_map,,1257346705151450168;
->rl_bind_keyseq_if_unbound,,1257346705151455250;
-<rl_bind_keyseq_if_unbound,,10906,,1257346705151462140;
-<rl_bind_keyseq_if_unbound_in_map,,10907,,1257346705151470588;
-<rl_function_of_keyseq,,10908,,1257346705151479030;
->rl_function_of_keyseq,,1257346705151486188;
->rl_bind_keyseq_if_unbound_in_map,,1257346705151491336;
->rl_bind_keyseq_if_unbound,,1257346705151496287;
-<rl_bind_keyseq_if_unbound,,10909,,1257346705151502587;
-<rl_bind_keyseq_if_unbound_in_map,,10910,,1257346705151510972;
-<rl_function_of_keyseq,,10911,,1257346705151519492;
->rl_function_of_keyseq,,1257346705151526493;
->rl_bind_keyseq_if_unbound_in_map,,1257346705151531789;
->rl_bind_keyseq_if_unbound,,1257346705151536782;
-<rl_bind_keyseq_if_unbound,,10912,,1257346705151543127;
-<rl_bind_keyseq_if_unbound_in_map,,10913,,1257346705151551425;
-<rl_function_of_keyseq,,10914,,1257346705151559749;
->rl_function_of_keyseq,,1257346705151567090;
->rl_bind_keyseq_if_unbound_in_map,,1257346705151572257;
->rl_bind_keyseq_if_unbound,,1257346705151577277;
->bind_termcap_arrow_keys,,1257346705151582194;
-<bind_termcap_arrow_keys,,10915,,1257346705151588521;
-<rl_bind_keyseq_if_unbound,,10916,,1257346705151597772;
-<rl_bind_keyseq_if_unbound_in_map,,10917,,1257346705151606139;
-<rl_function_of_keyseq,,10918,,1257346705151614797;
->rl_function_of_keyseq,,1257346705151622138;
->rl_bind_keyseq_if_unbound_in_map,,1257346705151627320;
->rl_bind_keyseq_if_unbound,,1257346705151632337;
-<rl_bind_keyseq_if_unbound,,10919,,1257346705151638881;
-<rl_bind_keyseq_if_unbound_in_map,,10920,,1257346705151647115;
-<rl_function_of_keyseq,,10921,,1257346705151655560;
->rl_function_of_keyseq,,1257346705151662628;
->rl_bind_keyseq_if_unbound_in_map,,1257346705151667767;
->rl_bind_keyseq_if_unbound,,1257346705151672735;
-<rl_bind_keyseq_if_unbound,,10922,,1257346705151679015;
-<rl_bind_keyseq_if_unbound_in_map,,10923,,1257346705151687231;
-<rl_function_of_keyseq,,10924,,1257346705151695631;
->rl_function_of_keyseq,,1257346705151702729;
->rl_bind_keyseq_if_unbound_in_map,,1257346705151707886;
->rl_bind_keyseq_if_unbound,,1257346705151712957;
-<rl_bind_keyseq_if_unbound,,10925,,1257346705151719200;
-<rl_bind_keyseq_if_unbound_in_map,,10926,,1257346705151732865;
-<rl_function_of_keyseq,,10927,,1257346705151742101;
->rl_function_of_keyseq,,1257346705151749340;
->rl_bind_keyseq_if_unbound_in_map,,1257346705151754530;
->rl_bind_keyseq_if_unbound,,1257346705151759547;
-<rl_bind_keyseq_if_unbound,,10928,,1257346705151766551;
-<rl_bind_keyseq_if_unbound_in_map,,10929,,1257346705151775050;
-<rl_function_of_keyseq,,10930,,1257346705151783480;
->rl_function_of_keyseq,,1257346705151790911;
->rl_bind_keyseq_if_unbound_in_map,,1257346705151796141;
->rl_bind_keyseq_if_unbound,,1257346705151801149;
-<rl_bind_keyseq_if_unbound,,10931,,1257346705151807431;
-<rl_bind_keyseq_if_unbound_in_map,,10932,,1257346705151815690;
-<rl_function_of_keyseq,,10933,,1257346705151824068;
->rl_function_of_keyseq,,1257346705151831304;
->rl_bind_keyseq_if_unbound_in_map,,1257346705151836471;
->rl_bind_keyseq_if_unbound,,1257346705151841475;
-<rl_bind_keyseq_if_unbound,,10934,,1257346705151847746;
-<rl_bind_keyseq_if_unbound_in_map,,10935,,1257346705151856151;
-<rl_function_of_keyseq,,10936,,1257346705151864563;
->rl_function_of_keyseq,,1257346705151871971;
->rl_bind_keyseq_if_unbound_in_map,,1257346705151877107;
->rl_bind_keyseq_if_unbound,,1257346705151882073;
->bind_termcap_arrow_keys,,1257346705151886978;
->_rl_init_terminal_io,,1257346705151891934;
-<rl_tty_set_default_bindings,,10937,,1257346705151899558;
-<rltty_set_default_bindings,,10938,,1257346705151910851;
-<get_tty_settings,,10939,,1257346705151920459;
-<_get_tty_settings,,10940,,1257346705151934086;
->_get_tty_settings,,1257346705151945277;
->get_tty_settings,,1257346705151950320;
->rltty_set_default_bindings,,1257346705151955505;
->rl_tty_set_default_bindings,,1257346705151959757;
-<rl_initialize_funmap,,10941,,1257346705151967216;
-<rl_add_funmap_entry,,10942,,1257346705151976364;
-<xmalloc,,10943,,1257346705151990830;
->xmalloc,,1257346705151997883;
->rl_add_funmap_entry,,1257346705152002821;
-<rl_add_funmap_entry,,10944,,1257346705152009248;
-<xmalloc,,10945,,1257346705152021963;
->xmalloc,,1257346705152028835;
->rl_add_funmap_entry,,1257346705152033581;
-<rl_add_funmap_entry,,10946,,1257346705152039899;
-<xmalloc,,10947,,1257346705152052750;
->xmalloc,,1257346705152059685;
->rl_add_funmap_entry,,1257346705152064443;
-<rl_add_funmap_entry,,10948,,1257346705152070771;
-<xmalloc,,10949,,1257346705152083889;
->xmalloc,,1257346705152091017;
->rl_add_funmap_entry,,1257346705152095765;
-<rl_add_funmap_entry,,10950,,1257346705152102283;
-<xmalloc,,10951,,1257346705152115611;
->xmalloc,,1257346705152122640;
->rl_add_funmap_entry,,1257346705152127476;
-<rl_add_funmap_entry,,10952,,1257346705152133857;
-<xmalloc,,10953,,1257346705152146849;
->xmalloc,,1257346705152153767;
->rl_add_funmap_entry,,1257346705152158600;
-<rl_add_funmap_entry,,10954,,1257346705152165002;
-<xmalloc,,10955,,1257346705152178030;
->xmalloc,,1257346705152184933;
->rl_add_funmap_entry,,1257346705152189745;
-<rl_add_funmap_entry,,10956,,1257346705152196126;
-<xmalloc,,10957,,1257346705152209299;
->xmalloc,,1257346705152216291;
->rl_add_funmap_entry,,1257346705152221019;
-<rl_add_funmap_entry,,10958,,1257346705152227304;
-<xmalloc,,10959,,1257346705152240314;
->xmalloc,,1257346705152247247;
->rl_add_funmap_entry,,1257346705152252025;
-<rl_add_funmap_entry,,10960,,1257346705152258440;
-<xmalloc,,10961,,1257346705152271625;
->xmalloc,,1257346705152278638;
->rl_add_funmap_entry,,1257346705152283381;
-<rl_add_funmap_entry,,10962,,1257346705152289736;
-<xmalloc,,10963,,1257346705152302875;
->xmalloc,,1257346705152309777;
->rl_add_funmap_entry,,1257346705152314589;
-<rl_add_funmap_entry,,10964,,1257346705152320986;
-<xmalloc,,10965,,1257346705152334023;
->xmalloc,,1257346705152341051;
->rl_add_funmap_entry,,1257346705152345830;
-<rl_add_funmap_entry,,10966,,1257346705152352182;
-<xmalloc,,10967,,1257346705152365300;
->xmalloc,,1257346705152372199;
->rl_add_funmap_entry,,1257346705152376927;
-<rl_add_funmap_entry,,10968,,1257346705152383330;
-<xmalloc,,10969,,1257346705152396340;
->xmalloc,,1257346705152403419;
->rl_add_funmap_entry,,1257346705152408135;
-<rl_add_funmap_entry,,10970,,1257346705152414456;
-<xmalloc,,10971,,1257346705152427458;
->xmalloc,,1257346705152434489;
->rl_add_funmap_entry,,1257346705152439232;
-<rl_add_funmap_entry,,10972,,1257346705152445529;
-<xmalloc,,10973,,1257346705152458567;
->xmalloc,,1257346705152465538;
->rl_add_funmap_entry,,1257346705152470274;
-<rl_add_funmap_entry,,10974,,1257346705152476605;
-<xmalloc,,10975,,1257346705152489808;
->xmalloc,,1257346705152496950;
->rl_add_funmap_entry,,1257346705152501693;
-<rl_add_funmap_entry,,10976,,1257346705152508000;
-<xmalloc,,10977,,1257346705152521067;
->xmalloc,,1257346705152528053;
->rl_add_funmap_entry,,1257346705152532883;
-<rl_add_funmap_entry,,10978,,1257346705152539184;
-<xmalloc,,10979,,1257346705152552395;
->xmalloc,,1257346705152559384;
->rl_add_funmap_entry,,1257346705152564133;
-<rl_add_funmap_entry,,10980,,1257346705152570560;
-<xmalloc,,10981,,1257346705152583682;
->xmalloc,,1257346705152590614;
->rl_add_funmap_entry,,1257346705152595450;
-<rl_add_funmap_entry,,10982,,1257346705152603245;
-<xmalloc,,10983,,1257346705152617094;
->xmalloc,,1257346705152624164;
->rl_add_funmap_entry,,1257346705152628925;
-<rl_add_funmap_entry,,10984,,1257346705152635265;
-<xmalloc,,10985,,1257346705152648278;
->xmalloc,,1257346705152655180;
->rl_add_funmap_entry,,1257346705152660019;
-<rl_add_funmap_entry,,10986,,1257346705152666341;
-<xmalloc,,10987,,1257346705152679399;
->xmalloc,,1257346705152686448;
->rl_add_funmap_entry,,1257346705152691203;
-<rl_add_funmap_entry,,10988,,1257346705152697630;
-<xmalloc,,10989,,1257346705152710776;
->xmalloc,,1257346705152717677;
->rl_add_funmap_entry,,1257346705152722504;
-<rl_add_funmap_entry,,10990,,1257346705152733881;
-<xmalloc,,10991,,1257346705152748013;
->xmalloc,,1257346705152755216;
->rl_add_funmap_entry,,1257346705152759971;
-<rl_add_funmap_entry,,10992,,1257346705152766999;
-<xmalloc,,10993,,1257346705152780012;
->xmalloc,,1257346705152786986;
->rl_add_funmap_entry,,1257346705152791822;
-<rl_add_funmap_entry,,10994,,1257346705152798339;
-<xmalloc,,10995,,1257346705152811362;
->xmalloc,,1257346705152818345;
->rl_add_funmap_entry,,1257346705152823084;
-<rl_add_funmap_entry,,10996,,1257346705152829520;
-<xmalloc,,10997,,1257346705152842633;
->xmalloc,,1257346705152849610;
->rl_add_funmap_entry,,1257346705152854350;
-<rl_add_funmap_entry,,10998,,1257346705152860870;
-<xmalloc,,10999,,1257346705152874036;
->xmalloc,,1257346705152881104;
->rl_add_funmap_entry,,1257346705152885847;
-<rl_add_funmap_entry,,11000,,1257346705152892255;
-<xmalloc,,11001,,1257346705152905419;
->xmalloc,,1257346705152912456;
->rl_add_funmap_entry,,1257346705152917199;
-<rl_add_funmap_entry,,11002,,1257346705152923803;
-<xmalloc,,11003,,1257346705152936768;
->xmalloc,,1257346705152943734;
->rl_add_funmap_entry,,1257346705152948464;
-<rl_add_funmap_entry,,11004,,1257346705152954891;
-<xmalloc,,11005,,1257346705152967883;
->xmalloc,,1257346705152974803;
->rl_add_funmap_entry,,1257346705152979549;
-<rl_add_funmap_entry,,11006,,1257346705152986060;
-<xmalloc,,11007,,1257346705152999088;
->xmalloc,,1257346705153005990;
->rl_add_funmap_entry,,1257346705153010850;
-<rl_add_funmap_entry,,11008,,1257346705153017232;
-<xmalloc,,11009,,1257346705153030384;
->xmalloc,,1257346705153037361;
->rl_add_funmap_entry,,1257346705153042103;
-<rl_add_funmap_entry,,11010,,1257346705153048618;
-<xmalloc,,11011,,1257346705153061844;
->xmalloc,,1257346705153068789;
->rl_add_funmap_entry,,1257346705153073531;
-<rl_add_funmap_entry,,11012,,1257346705153079946;
-<xmalloc,,11013,,1257346705153093103;
->xmalloc,,1257346705153100090;
->rl_add_funmap_entry,,1257346705153104836;
-<rl_add_funmap_entry,,11014,,1257346705153111536;
-<xmalloc,,11015,,1257346705153124555;
->xmalloc,,1257346705153131508;
->rl_add_funmap_entry,,1257346705153136350;
-<rl_add_funmap_entry,,11016,,1257346705153143123;
-<xmalloc,,11017,,1257346705153156184;
->xmalloc,,1257346705153163210;
->rl_add_funmap_entry,,1257346705153167986;
-<rl_add_funmap_entry,,11018,,1257346705153174728;
-<xmalloc,,11019,,1257346705153187865;
->xmalloc,,1257346705153194770;
->rl_add_funmap_entry,,1257346705153199615;
-<rl_add_funmap_entry,,11020,,1257346705153206105;
-<xmalloc,,11021,,1257346705153219265;
->xmalloc,,1257346705153226248;
->rl_add_funmap_entry,,1257346705153230994;
-<rl_add_funmap_entry,,11022,,1257346705153237493;
-<xmalloc,,11023,,1257346705153250467;
->xmalloc,,1257346705153257381;
->rl_add_funmap_entry,,1257346705153262214;
-<rl_add_funmap_entry,,11024,,1257346705153268785;
-<xmalloc,,11025,,1257346705153281757;
->xmalloc,,1257346705153288821;
->rl_add_funmap_entry,,1257346705153293567;
-<rl_add_funmap_entry,,11026,,1257346705153300159;
-<xmalloc,,11027,,1257346705153313265;
->xmalloc,,1257346705153320206;
->rl_add_funmap_entry,,1257346705153325027;
-<rl_add_funmap_entry,,11028,,1257346705153331617;
-<xmalloc,,11029,,1257346705153344672;
->xmalloc,,1257346705153351700;
->rl_add_funmap_entry,,1257346705153356440;
-<rl_add_funmap_entry,,11030,,1257346705153362951;
-<xmalloc,,11031,,1257346705153376012;
->xmalloc,,1257346705153382917;
->rl_add_funmap_entry,,1257346705153387759;
-<rl_add_funmap_entry,,11032,,1257346705153394279;
-<xmalloc,,11033,,1257346705153407308;
->xmalloc,,1257346705153414345;
->rl_add_funmap_entry,,1257346705153419091;
-<rl_add_funmap_entry,,11034,,1257346705153425599;
-<xmalloc,,11035,,1257346705153438750;
->xmalloc,,1257346705153445785;
->rl_add_funmap_entry,,1257346705153450521;
-<rl_add_funmap_entry,,11036,,1257346705153456927;
-<xmalloc,,11037,,1257346705153469961;
->xmalloc,,1257346705153476863;
->rl_add_funmap_entry,,1257346705153481708;
-<rl_add_funmap_entry,,11038,,1257346705153488123;
-<xmalloc,,11039,,1257346705153501203;
->xmalloc,,1257346705153508237;
->rl_add_funmap_entry,,1257346705153512989;
-<rl_add_funmap_entry,,11040,,1257346705153519400;
-<xmalloc,,11041,,1257346705153532386;
->xmalloc,,1257346705153539367;
->rl_add_funmap_entry,,1257346705153544107;
-<rl_add_funmap_entry,,11042,,1257346705153550518;
-<xmalloc,,11043,,1257346705153563553;
->xmalloc,,1257346705153570454;
->rl_add_funmap_entry,,1257346705153575206;
-<rl_add_funmap_entry,,11044,,1257346705153581600;
-<xmalloc,,11045,,1257346705153594568;
->xmalloc,,1257346705153601500;
->rl_add_funmap_entry,,1257346705153606363;
-<rl_add_funmap_entry,,11046,,1257346705153612925;
-<xmalloc,,11047,,1257346705153625996;
->xmalloc,,1257346705153632991;
->rl_add_funmap_entry,,1257346705153637704;
-<rl_add_funmap_entry,,11048,,1257346705153644140;
-<xmalloc,,11049,,1257346705153657285;
->xmalloc,,1257346705153664160;
->rl_add_funmap_entry,,1257346705153668906;
-<rl_add_funmap_entry,,11050,,1257346705153675339;
-<xmalloc,,11051,,1257346705153688514;
->xmalloc,,1257346705153695507;
->rl_add_funmap_entry,,1257346705153700207;
-<rl_add_funmap_entry,,11052,,1257346705153706802;
-<xmalloc,,11053,,1257346705153719903;
->xmalloc,,1257346705153731461;
->rl_add_funmap_entry,,1257346705153736546;
-<rl_add_funmap_entry,,11054,,1257346705153743184;
-<xmalloc,,11055,,1257346705153756648;
->xmalloc,,1257346705153763755;
->rl_add_funmap_entry,,1257346705153768495;
-<rl_add_funmap_entry,,11056,,1257346705153775015;
-<xmalloc,,11057,,1257346705153788079;
->xmalloc,,1257346705153795008;
->rl_add_funmap_entry,,1257346705153799790;
-<rl_add_funmap_entry,,11058,,1257346705153806271;
-<xmalloc,,11059,,1257346705153819269;
->xmalloc,,1257346705153826222;
->rl_add_funmap_entry,,1257346705153830938;
-<rl_add_funmap_entry,,11060,,1257346705153837509;
-<xmalloc,,11061,,1257346705153850733;
->xmalloc,,1257346705153857641;
->rl_add_funmap_entry,,1257346705153862459;
-<rl_add_funmap_entry,,11062,,1257346705153868973;
-<xmalloc,,11063,,1257346705153882130;
->xmalloc,,1257346705153889179;
->rl_add_funmap_entry,,1257346705153893922;
-<rl_add_funmap_entry,,11064,,1257346705153900563;
-<xrealloc,,11065,,1257346705153917792;
->xrealloc,,1257346705153925828;
-<xmalloc,,11066,,1257346705153939819;
->xmalloc,,1257346705153946859;
->rl_add_funmap_entry,,1257346705153951590;
-<rl_add_funmap_entry,,11067,,1257346705153958143;
-<xmalloc,,11068,,1257346705153971360;
->xmalloc,,1257346705153978263;
->rl_add_funmap_entry,,1257346705153982963;
-<rl_add_funmap_entry,,11069,,1257346705153989294;
-<xmalloc,,11070,,1257346705154002379;
->xmalloc,,1257346705154009374;
->rl_add_funmap_entry,,1257346705154014132;
-<rl_add_funmap_entry,,11071,,1257346705154020430;
-<xmalloc,,11072,,1257346705154033434;
->xmalloc,,1257346705154040339;
->rl_add_funmap_entry,,1257346705154045160;
-<rl_add_funmap_entry,,11073,,1257346705154051442;
-<xmalloc,,11074,,1257346705154064347;
->xmalloc,,1257346705154071412;
->rl_add_funmap_entry,,1257346705154076160;
-<rl_add_funmap_entry,,11075,,1257346705154082539;
-<xmalloc,,11076,,1257346705154095498;
->xmalloc,,1257346705154102406;
->rl_add_funmap_entry,,1257346705154107224;
-<rl_add_funmap_entry,,11077,,1257346705154113513;
-<xmalloc,,11078,,1257346705154126454;
->xmalloc,,1257346705154133449;
->rl_add_funmap_entry,,1257346705154138180;
-<rl_add_funmap_entry,,11079,,1257346705154144564;
-<xmalloc,,11080,,1257346705154157364;
->xmalloc,,1257346705154164332;
->rl_add_funmap_entry,,1257346705154169171;
-<rl_add_funmap_entry,,11081,,1257346705154175550;
-<xmalloc,,11082,,1257346705154188563;
->xmalloc,,1257346705154195534;
->rl_add_funmap_entry,,1257346705154200259;
-<rl_add_funmap_entry,,11083,,1257346705154206758;
-<xmalloc,,11084,,1257346705154219705;
->xmalloc,,1257346705154226604;
->rl_add_funmap_entry,,1257346705154231425;
-<rl_add_funmap_entry,,11085,,1257346705154237999;
-<xmalloc,,11086,,1257346705154250805;
->xmalloc,,1257346705154257869;
->rl_add_funmap_entry,,1257346705154262618;
-<rl_add_funmap_entry,,11087,,1257346705154269288;
-<xmalloc,,11088,,1257346705154282193;
->xmalloc,,1257346705154289177;
->rl_add_funmap_entry,,1257346705154294013;
-<rl_add_funmap_entry,,11089,,1257346705154300617;
-<xmalloc,,11090,,1257346705154313492;
->xmalloc,,1257346705154320475;
->rl_add_funmap_entry,,1257346705154325208;
-<rl_add_funmap_entry,,11091,,1257346705154331900;
-<xmalloc,,11092,,1257346705154344703;
->xmalloc,,1257346705154351671;
->rl_add_funmap_entry,,1257346705154356420;
-<rl_add_funmap_entry,,11093,,1257346705154363087;
-<xmalloc,,11094,,1257346705154375932;
->xmalloc,,1257346705154382888;
->rl_add_funmap_entry,,1257346705154387637;
-<rl_add_funmap_entry,,11095,,1257346705154394220;
-<xmalloc,,11096,,1257346705154407089;
->xmalloc,,1257346705154414096;
->rl_add_funmap_entry,,1257346705154418842;
-<rl_add_funmap_entry,,11097,,1257346705154425443;
-<xmalloc,,11098,,1257346705154438330;
->xmalloc,,1257346705154445352;
->rl_add_funmap_entry,,1257346705154450122;
-<rl_add_funmap_entry,,11099,,1257346705154456826;
-<xmalloc,,11100,,1257346705154469878;
->xmalloc,,1257346705154476888;
->rl_add_funmap_entry,,1257346705154481628;
-<rl_add_funmap_entry,,11101,,1257346705154488259;
-<xmalloc,,11102,,1257346705154501221;
->xmalloc,,1257346705154508129;
->rl_add_funmap_entry,,1257346705154512986;
-<rl_add_funmap_entry,,11103,,1257346705154519552;
-<xmalloc,,11104,,1257346705154532492;
->xmalloc,,1257346705154539452;
->rl_add_funmap_entry,,1257346705154544213;
-<rl_add_funmap_entry,,11105,,1257346705154550811;
-<xmalloc,,11106,,1257346705154563671;
->xmalloc,,1257346705154570612;
->rl_add_funmap_entry,,1257346705154575372;
-<rl_add_funmap_entry,,11107,,1257346705154582097;
-<xmalloc,,11108,,1257346705154595026;
->xmalloc,,1257346705154603176;
->rl_add_funmap_entry,,1257346705154608030;
-<rl_add_funmap_entry,,11109,,1257346705154614905;
-<xmalloc,,11110,,1257346705154628342;
->xmalloc,,1257346705154635308;
->rl_add_funmap_entry,,1257346705154640156;
-<rl_add_funmap_entry,,11111,,1257346705154646712;
-<xmalloc,,11112,,1257346705154659878;
->xmalloc,,1257346705154666916;
->rl_add_funmap_entry,,1257346705154671685;
-<rl_add_funmap_entry,,11113,,1257346705154678088;
-<xmalloc,,11114,,1257346705154691026;
->xmalloc,,1257346705154697934;
->rl_add_funmap_entry,,1257346705154702689;
-<rl_add_funmap_entry,,11115,,1257346705154709212;
-<xmalloc,,11116,,1257346705154722195;
->xmalloc,,1257346705154748379;
->rl_add_funmap_entry,,1257346705154753426;
-<rl_add_funmap_entry,,11117,,1257346705154760559;
-<xmalloc,,11118,,1257346705154774800;
->xmalloc,,1257346705154781771;
->rl_add_funmap_entry,,1257346705154786631;
-<rl_add_funmap_entry,,11119,,1257346705154793148;
-<xmalloc,,11120,,1257346705154806236;
->xmalloc,,1257346705154813237;
->rl_add_funmap_entry,,1257346705154817995;
-<rl_add_funmap_entry,,11121,,1257346705154824494;
-<xmalloc,,11122,,1257346705154837640;
->xmalloc,,1257346705154844551;
->rl_add_funmap_entry,,1257346705154849387;
-<rl_add_funmap_entry,,11123,,1257346705154855853;
-<xmalloc,,11124,,1257346705154868914;
->xmalloc,,1257346705154875951;
->rl_add_funmap_entry,,1257346705154880796;
-<rl_add_funmap_entry,,11125,,1257346705154887226;
-<xmalloc,,11126,,1257346705154900387;
->xmalloc,,1257346705154907388;
->rl_add_funmap_entry,,1257346705154912134;
-<rl_add_funmap_entry,,11127,,1257346705154918570;
-<xmalloc,,11128,,1257346705154931447;
->xmalloc,,1257346705154938461;
->rl_add_funmap_entry,,1257346705154943303;
-<rl_add_funmap_entry,,11129,,1257346705154949663;
-<xmalloc,,11130,,1257346705154962598;
->xmalloc,,1257346705154969591;
->rl_add_funmap_entry,,1257346705154974369;
-<rl_add_funmap_entry,,11131,,1257346705154980778;
-<xmalloc,,11132,,1257346705154993713;
->xmalloc,,1257346705155000660;
->rl_add_funmap_entry,,1257346705155005496;
-<rl_add_funmap_entry,,11133,,1257346705155011803;
-<xmalloc,,11134,,1257346705155024810;
->xmalloc,,1257346705155031847;
->rl_add_funmap_entry,,1257346705155036575;
-<rl_add_funmap_entry,,11135,,1257346705155043008;
-<xmalloc,,11136,,1257346705155055967;
->xmalloc,,1257346705155062896;
->rl_add_funmap_entry,,1257346705155067729;
-<rl_add_funmap_entry,,11137,,1257346705155074042;
-<xmalloc,,11138,,1257346705155087046;
->xmalloc,,1257346705155094047;
->rl_add_funmap_entry,,1257346705155098781;
-<rl_add_funmap_entry,,11139,,1257346705155105150;
-<xmalloc,,11140,,1257346705155118128;
->xmalloc,,1257346705155125039;
->rl_add_funmap_entry,,1257346705155129871;
-<rl_add_funmap_entry,,11141,,1257346705155136307;
-<xmalloc,,11142,,1257346705155149366;
->xmalloc,,1257346705155156394;
->rl_add_funmap_entry,,1257346705155161128;
-<rl_add_funmap_entry,,11143,,1257346705155167642;
-<xmalloc,,11144,,1257346705155180724;
->xmalloc,,1257346705155187635;
->rl_add_funmap_entry,,1257346705155192462;
-<rl_add_funmap_entry,,11145,,1257346705155198814;
-<xmalloc,,11146,,1257346705155212007;
->xmalloc,,1257346705155219024;
->rl_add_funmap_entry,,1257346705155223763;
-<rl_add_funmap_entry,,11147,,1257346705155230133;
-<xmalloc,,11148,,1257346705155243149;
->xmalloc,,1257346705155250072;
->rl_add_funmap_entry,,1257346705155254893;
-<rl_add_funmap_entry,,11149,,1257346705155261305;
-<xmalloc,,11150,,1257346705155274517;
->xmalloc,,1257346705155281503;
->rl_add_funmap_entry,,1257346705155286231;
-<rl_add_funmap_entry,,11151,,1257346705155292664;
-<xmalloc,,11152,,1257346705155305938;
->xmalloc,,1257346705155312883;
->rl_add_funmap_entry,,1257346705155317703;
-<rl_add_funmap_entry,,11153,,1257346705155324254;
-<xmalloc,,11154,,1257346705155337294;
->xmalloc,,1257346705155344295;
->rl_add_funmap_entry,,1257346705155349071;
-<rl_add_funmap_entry,,11155,,1257346705155355396;
-<xmalloc,,11156,,1257346705155368490;
->xmalloc,,1257346705155375488;
->rl_add_funmap_entry,,1257346705155380219;
-<rl_add_funmap_entry,,11157,,1257346705155386616;
-<xmalloc,,11158,,1257346705155399743;
->xmalloc,,1257346705155406663;
->rl_add_funmap_entry,,1257346705155411406;
-<rl_add_funmap_entry,,11159,,1257346705155417682;
-<xmalloc,,11160,,1257346705155430807;
->xmalloc,,1257346705155437766;
->rl_add_funmap_entry,,1257346705155442509;
-<rl_add_funmap_entry,,11161,,1257346705155448921;
-<xmalloc,,11162,,1257346705155462099;
->xmalloc,,1257346705155469031;
->rl_add_funmap_entry,,1257346705155473858;
-<rl_add_funmap_entry,,11163,,1257346705155480162;
-<xmalloc,,11164,,1257346705155493464;
->xmalloc,,1257346705155500489;
->rl_add_funmap_entry,,1257346705155505223;
-<rl_add_funmap_entry,,11165,,1257346705155511493;
-<xmalloc,,11166,,1257346705155524512;
->xmalloc,,1257346705155531435;
->rl_add_funmap_entry,,1257346705155536175;
-<rl_add_funmap_entry,,11167,,1257346705155542503;
-<xmalloc,,11168,,1257346705155555582;
->xmalloc,,1257346705155562460;
->rl_add_funmap_entry,,1257346705155567194;
-<rl_add_funmap_entry,,11169,,1257346705155573554;
-<xmalloc,,11170,,1257346705155586553;
->xmalloc,,1257346705155593494;
->rl_add_funmap_entry,,1257346705155598318;
-<rl_add_funmap_entry,,11171,,1257346705155604654;
-<xmalloc,,11172,,1257346705155618359;
->xmalloc,,1257346705155625403;
->rl_add_funmap_entry,,1257346705155630133;
-<rl_add_funmap_entry,,11173,,1257346705155636428;
-<xmalloc,,11174,,1257346705155649414;
->xmalloc,,1257346705155656325;
->rl_add_funmap_entry,,1257346705155661065;
-<rl_add_funmap_entry,,11175,,1257346705155667509;
-<xmalloc,,11176,,1257346705155680432;
->xmalloc,,1257346705155687370;
->rl_add_funmap_entry,,1257346705155692113;
-<rl_add_funmap_entry,,11177,,1257346705155698417;
-<xmalloc,,11178,,1257346705155711454;
->xmalloc,,1257346705155718392;
->rl_add_funmap_entry,,1257346705155723219;
-<rl_add_funmap_entry,,11179,,1257346705155734676;
-<xmalloc,,11180,,1257346705155748754;
->xmalloc,,1257346705155755890;
->rl_add_funmap_entry,,1257346705155760651;
-<rl_add_funmap_entry,,11181,,1257346705155766994;
-<xmalloc,,11182,,1257346705155779965;
->xmalloc,,1257346705155786840;
->rl_add_funmap_entry,,1257346705155791592;
-<rl_add_funmap_entry,,11183,,1257346705155797968;
-<xmalloc,,11184,,1257346705155811044;
->xmalloc,,1257346705155817952;
->rl_add_funmap_entry,,1257346705155822709;
-<rl_add_funmap_entry,,11185,,1257346705155829076;
-<xmalloc,,11186,,1257346705155842228;
->xmalloc,,1257346705155849073;
->rl_add_funmap_entry,,1257346705155853930;
->rl_initialize_funmap,,1257346705155858895;
-<_rl_init_eightbit,,11187,,1257346705155866071;
-<sh_get_env_value,,11188,,1257346705155877207;
->sh_get_env_value,,1257346705155886314;
-<sh_get_env_value,,11189,,1257346705155891616;
->sh_get_env_value,,1257346705155898807;
-<sh_get_env_value,,11190,,1257346705155904082;
->sh_get_env_value,,1257346705155911212;
->_rl_init_eightbit,,1257346705155916776;
-<rl_read_init_file,,11191,,1257346705155924427;
-<sh_get_env_value,,11192,,1257346705155934014;
->sh_get_env_value,,1257346705155941262;
-<_rl_read_init_file,,11193,,1257346705155948997;
-<tilde_expand,,11194,,1257346705155958098;
-<xmalloc,,11195,,1257346705155977090;
->xmalloc,,1257346705155984323;
-<xmalloc,,11196,,1257346705155998933;
->xmalloc,,1257346705156005883;
-<tilde_expand_word,,11197,,1257346705156012644;
-<sh_get_env_value,,11198,,1257346705156022755;
->sh_get_env_value,,1257346705156029942;
-<glue_prefix_and_suffix,,11199,,1257346705156036303;
-<xmalloc,,11200,,1257346705156053298;
->xmalloc,,1257346705156060672;
->glue_prefix_and_suffix,,1257346705156065740;
->tilde_expand_word,,1257346705156069505;
-<xrealloc,,11201,,1257346705156083550;
->xrealloc,,1257346705156090750;
-<xmalloc,,11202,,1257346705156104337;
->xmalloc,,1257346705156111350;
-<tilde_expand_word,,11203,,1257346705156118063;
-<xmalloc,,11204,,1257346705156132580;
->xmalloc,,1257346705156139500;
->tilde_expand_word,,1257346705156144327;
->tilde_expand,,1257346705156149181;
->_rl_read_init_file,,1257346705163744218;
->rl_read_init_file,,1257346705163749069;
-<rl_set_keymap_from_edit_mode,,11205,,1257346705163757484;
->rl_set_keymap_from_edit_mode,,1257346705163768735;
-<bind_arrow_keys_internal,,11206,,1257346705163777318;
-<rl_bind_keyseq_if_unbound,,11207,,1257346705163788400;
-<rl_bind_keyseq_if_unbound_in_map,,11208,,1257346705163797709;
-<rl_function_of_keyseq,,11209,,1257346705163806574;
->rl_function_of_keyseq,,1257346705163814288;
-<rl_bind_keyseq_in_map,,11210,,1257346705163821804;
-<rl_generic_bind,,11211,,1257346705163832288;
-<xmalloc,,11212,,1257346705163850907;
->xmalloc,,1257346705163858050;
-<rl_translate_keyseq,,11213,,1257346705163865703;
->rl_translate_keyseq,,1257346705163874212;
->rl_generic_bind,,1257346705163879153;
->rl_bind_keyseq_in_map,,1257346705163884073;
->rl_bind_keyseq_if_unbound_in_map,,1257346705163888217;
->rl_bind_keyseq_if_unbound,,1257346705163893179;
-<rl_bind_keyseq_if_unbound,,11214,,1257346705163900220;
-<rl_bind_keyseq_if_unbound_in_map,,11215,,1257346705163909197;
-<rl_function_of_keyseq,,11216,,1257346705163917792;
->rl_function_of_keyseq,,1257346705163924911;
-<rl_bind_keyseq_in_map,,11217,,1257346705163932123;
-<rl_generic_bind,,11218,,1257346705163941100;
-<xmalloc,,11219,,1257346705163957451;
->xmalloc,,1257346705163964317;
-<rl_translate_keyseq,,11220,,1257346705163971817;
->rl_translate_keyseq,,1257346705163978729;
->rl_generic_bind,,1257346705163983414;
->rl_bind_keyseq_in_map,,1257346705163988232;
->rl_bind_keyseq_if_unbound_in_map,,1257346705163992376;
->rl_bind_keyseq_if_unbound,,1257346705163997342;
-<rl_bind_keyseq_if_unbound,,11221,,1257346705164004824;
-<rl_bind_keyseq_if_unbound_in_map,,11222,,1257346705164013597;
-<rl_function_of_keyseq,,11223,,1257346705164022330;
->rl_function_of_keyseq,,1257346705164029410;
-<rl_bind_keyseq_in_map,,11224,,1257346705164036676;
-<rl_generic_bind,,11225,,1257346705164045551;
-<xmalloc,,11226,,1257346705164062422;
->xmalloc,,1257346705164069165;
-<rl_translate_keyseq,,11227,,1257346705164076732;
->rl_translate_keyseq,,1257346705164083658;
->rl_generic_bind,,1257346705164088371;
->rl_bind_keyseq_in_map,,1257346705164093152;
->rl_bind_keyseq_if_unbound_in_map,,1257346705164097266;
->rl_bind_keyseq_if_unbound,,1257346705164102223;
-<rl_bind_keyseq_if_unbound,,11228,,1257346705164109332;
-<rl_bind_keyseq_if_unbound_in_map,,11229,,1257346705164118198;
-<rl_function_of_keyseq,,11230,,1257346705164126763;
->rl_function_of_keyseq,,1257346705164133915;
-<rl_bind_keyseq_in_map,,11231,,1257346705164141229;
-<rl_generic_bind,,11232,,1257346705164150053;
-<xmalloc,,11233,,1257346705164166666;
->xmalloc,,1257346705164173553;
-<rl_translate_keyseq,,11234,,1257346705164180933;
->rl_translate_keyseq,,1257346705164187889;
->rl_generic_bind,,1257346705164192611;
->rl_bind_keyseq_in_map,,1257346705164197456;
->rl_bind_keyseq_if_unbound_in_map,,1257346705164201546;
->rl_bind_keyseq_if_unbound,,1257346705164206502;
-<rl_bind_keyseq_if_unbound,,11235,,1257346705164213609;
-<rl_bind_keyseq_if_unbound_in_map,,11236,,1257346705164222424;
-<rl_function_of_keyseq,,11237,,1257346705164231046;
->rl_function_of_keyseq,,1257346705164238189;
-<rl_bind_keyseq_in_map,,11238,,1257346705164245635;
-<rl_generic_bind,,11239,,1257346705164254835;
-<xmalloc,,11240,,1257346705164271255;
->xmalloc,,1257346705164278106;
-<rl_translate_keyseq,,11241,,1257346705164285883;
->rl_translate_keyseq,,1257346705164292864;
->rl_generic_bind,,1257346705164297570;
->rl_bind_keyseq_in_map,,1257346705164302313;
->rl_bind_keyseq_if_unbound_in_map,,1257346705164306394;
->rl_bind_keyseq_if_unbound,,1257346705164311428;
-<rl_bind_keyseq_if_unbound,,11242,,1257346705164318592;
-<rl_bind_keyseq_if_unbound_in_map,,11243,,1257346705164327425;
-<rl_function_of_keyseq,,11244,,1257346705164335975;
->rl_function_of_keyseq,,1257346705164343060;
-<rl_bind_keyseq_in_map,,11245,,1257346705164350305;
-<rl_generic_bind,,11246,,1257346705164359057;
-<xmalloc,,11247,,1257346705164375890;
->xmalloc,,1257346705164382677;
-<rl_translate_keyseq,,11248,,1257346705164390166;
->rl_translate_keyseq,,1257346705164397188;
->rl_generic_bind,,1257346705164401889;
->rl_bind_keyseq_in_map,,1257346705164406770;
->rl_bind_keyseq_if_unbound_in_map,,1257346705164410848;
->rl_bind_keyseq_if_unbound,,1257346705164415720;
-<rl_bind_keyseq_if_unbound,,11249,,1257346705164422733;
-<rl_bind_keyseq_if_unbound_in_map,,11250,,1257346705164431557;
-<rl_function_of_keyseq,,11251,,1257346705164440137;
->rl_function_of_keyseq,,1257346705164447262;
->rl_bind_keyseq_if_unbound_in_map,,1257346705164452462;
->rl_bind_keyseq_if_unbound,,1257346705164457478;
-<rl_bind_keyseq_if_unbound,,11252,,1257346705164463782;
-<rl_bind_keyseq_if_unbound_in_map,,11253,,1257346705164472506;
-<rl_function_of_keyseq,,11254,,1257346705164480762;
->rl_function_of_keyseq,,1257346705164487868;
->rl_bind_keyseq_if_unbound_in_map,,1257346705164493047;
->rl_bind_keyseq_if_unbound,,1257346705164498117;
-<rl_bind_keyseq_if_unbound,,11255,,1257346705164504701;
-<rl_bind_keyseq_if_unbound_in_map,,11256,,1257346705164513251;
-<rl_function_of_keyseq,,11257,,1257346705164521479;
->rl_function_of_keyseq,,1257346705164528607;
->rl_bind_keyseq_if_unbound_in_map,,1257346705164533747;
->rl_bind_keyseq_if_unbound,,1257346705164538700;
-<rl_bind_keyseq_if_unbound,,11258,,1257346705164544823;
-<rl_bind_keyseq_if_unbound_in_map,,11259,,1257346705164553433;
-<rl_function_of_keyseq,,11260,,1257346705164561704;
->rl_function_of_keyseq,,1257346705164568777;
->rl_bind_keyseq_if_unbound_in_map,,1257346705164573920;
->rl_bind_keyseq_if_unbound,,1257346705164578864;
-<rl_bind_keyseq_if_unbound,,11261,,1257346705164584987;
-<rl_bind_keyseq_if_unbound_in_map,,11262,,1257346705164593582;
-<rl_function_of_keyseq,,11263,,1257346705164601925;
->rl_function_of_keyseq,,1257346705164608995;
->rl_bind_keyseq_if_unbound_in_map,,1257346705164614147;
->rl_bind_keyseq_if_unbound,,1257346705164619091;
-<rl_bind_keyseq_if_unbound,,11264,,1257346705164625305;
-<rl_bind_keyseq_if_unbound_in_map,,11265,,1257346705164633897;
-<rl_function_of_keyseq,,11266,,1257346705164642110;
->rl_function_of_keyseq,,1257346705164649259;
->rl_bind_keyseq_if_unbound_in_map,,1257346705164654486;
->rl_bind_keyseq_if_unbound,,1257346705164659532;
->bind_arrow_keys_internal,,1257346705164664561;
-<bind_arrow_keys_internal,,11267,,1257346705164672058;
-<rl_bind_keyseq_if_unbound,,11268,,1257346705164681144;
-<rl_bind_keyseq_if_unbound_in_map,,11269,,1257346705164689805;
-<rl_function_of_keyseq,,11270,,1257346705164698265;
->rl_function_of_keyseq,,1257346705164705504;
-<rl_bind_keyseq_in_map,,11271,,1257346705164712737;
-<rl_generic_bind,,11272,,1257346705164721503;
-<xmalloc,,11273,,1257346705164743493;
->xmalloc,,1257346705164750897;
-<rl_translate_keyseq,,11274,,1257346705164758358;
->rl_translate_keyseq,,1257346705164765303;
->rl_generic_bind,,1257346705164770048;
->rl_bind_keyseq_in_map,,1257346705164774791;
->rl_bind_keyseq_if_unbound_in_map,,1257346705164778911;
->rl_bind_keyseq_if_unbound,,1257346705164783855;
-<rl_bind_keyseq_if_unbound,,11275,,1257346705164790929;
-<rl_bind_keyseq_if_unbound_in_map,,11276,,1257346705164799756;
-<rl_function_of_keyseq,,11277,,1257346705164808387;
->rl_function_of_keyseq,,1257346705164815518;
-<rl_bind_keyseq_in_map,,11278,,1257346705164822889;
-<rl_generic_bind,,11279,,1257346705164831683;
-<xmalloc,,11280,,1257346705164848085;
->xmalloc,,1257346705164854867;
-<rl_translate_keyseq,,11281,,1257346705164862232;
->rl_translate_keyseq,,1257346705164869236;
->rl_generic_bind,,1257346705164873955;
->rl_bind_keyseq_in_map,,1257346705164878713;
->rl_bind_keyseq_if_unbound_in_map,,1257346705164882824;
->rl_bind_keyseq_if_unbound,,1257346705164887768;
-<rl_bind_keyseq_if_unbound,,11282,,1257346705164894914;
-<rl_bind_keyseq_if_unbound_in_map,,11283,,1257346705164903816;
-<rl_function_of_keyseq,,11284,,1257346705164912396;
->rl_function_of_keyseq,,1257346705164919466;
-<rl_bind_keyseq_in_map,,11285,,1257346705164926711;
-<rl_generic_bind,,11286,,1257346705164935643;
-<xmalloc,,11287,,1257346705164952022;
->xmalloc,,1257346705164958813;
-<rl_translate_keyseq,,11288,,1257346705164966292;
->rl_translate_keyseq,,1257346705164973290;
->rl_generic_bind,,1257346705164978003;
->rl_bind_keyseq_in_map,,1257346705164982977;
->rl_bind_keyseq_if_unbound_in_map,,1257346705164987143;
->rl_bind_keyseq_if_unbound,,1257346705164992042;
-<rl_bind_keyseq_if_unbound,,11289,,1257346705164999070;
-<rl_bind_keyseq_if_unbound_in_map,,11290,,1257346705165007885;
-<rl_function_of_keyseq,,11291,,1257346705165016480;
->rl_function_of_keyseq,,1257346705165023620;
-<rl_bind_keyseq_in_map,,11292,,1257346705165030868;
-<rl_generic_bind,,11293,,1257346705165039655;
-<xmalloc,,11294,,1257346705165056025;
->xmalloc,,1257346705165062824;
-<rl_translate_keyseq,,11295,,1257346705165070151;
->rl_translate_keyseq,,1257346705165077080;
->rl_generic_bind,,1257346705165081895;
->rl_bind_keyseq_in_map,,1257346705165086683;
->rl_bind_keyseq_if_unbound_in_map,,1257346705165090761;
->rl_bind_keyseq_if_unbound,,1257346705165095762;
-<rl_bind_keyseq_if_unbound,,11296,,1257346705165102802;
-<rl_bind_keyseq_if_unbound_in_map,,11297,,1257346705165111581;
-<rl_function_of_keyseq,,11298,,1257346705165120191;
->rl_function_of_keyseq,,1257346705165127187;
-<rl_bind_keyseq_in_map,,11299,,1257346705165134540;
-<rl_generic_bind,,11300,,1257346705165143397;
-<xmalloc,,11301,,1257346705165160578;
->xmalloc,,1257346705165167327;
-<rl_translate_keyseq,,11302,,1257346705165174839;
->rl_translate_keyseq,,1257346705165181723;
->rl_generic_bind,,1257346705165186538;
->rl_bind_keyseq_in_map,,1257346705165191371;
->rl_bind_keyseq_if_unbound_in_map,,1257346705165195404;
->rl_bind_keyseq_if_unbound,,1257346705165200360;
-<rl_bind_keyseq_if_unbound,,11303,,1257346705165207554;
-<rl_bind_keyseq_if_unbound_in_map,,11304,,1257346705165216564;
-<rl_function_of_keyseq,,11305,,1257346705165225277;
->rl_function_of_keyseq,,1257346705165232443;
-<rl_bind_keyseq_in_map,,11306,,1257346705165239643;
-<rl_generic_bind,,11307,,1257346705165248473;
-<xmalloc,,11308,,1257346705165264948;
->xmalloc,,1257346705165271760;
-<rl_translate_keyseq,,11309,,1257346705165279233;
->rl_translate_keyseq,,1257346705165286237;
->rl_generic_bind,,1257346705165290932;
->rl_bind_keyseq_in_map,,1257346705165295792;
->rl_bind_keyseq_if_unbound_in_map,,1257346705165299960;
->rl_bind_keyseq_if_unbound,,1257346705165305004;
-<rl_bind_keyseq_if_unbound,,11310,,1257346705165312056;
-<rl_bind_keyseq_if_unbound_in_map,,11311,,1257346705165320988;
-<rl_function_of_keyseq,,11312,,1257346705165329571;
->rl_function_of_keyseq,,1257346705165336681;
->rl_bind_keyseq_if_unbound_in_map,,1257346705165341869;
->rl_bind_keyseq_if_unbound,,1257346705165346825;
-<rl_bind_keyseq_if_unbound,,11313,,1257346705165353276;
-<rl_bind_keyseq_if_unbound_in_map,,11314,,1257346705165361877;
-<rl_function_of_keyseq,,11315,,1257346705165370042;
->rl_function_of_keyseq,,1257346705165377185;
->rl_bind_keyseq_if_unbound_in_map,,1257346705165382430;
->rl_bind_keyseq_if_unbound,,1257346705165387467;
-<rl_bind_keyseq_if_unbound,,11316,,1257346705165393756;
-<rl_bind_keyseq_if_unbound_in_map,,11317,,1257346705165402348;
-<rl_function_of_keyseq,,11318,,1257346705165410607;
->rl_function_of_keyseq,,1257346705165417665;
->rl_bind_keyseq_if_unbound_in_map,,1257346705165422886;
->rl_bind_keyseq_if_unbound,,1257346705165427863;
-<rl_bind_keyseq_if_unbound,,11319,,1257346705165434041;
-<rl_bind_keyseq_if_unbound_in_map,,11320,,1257346705165442612;
-<rl_function_of_keyseq,,11321,,1257346705165450984;
->rl_function_of_keyseq,,1257346705165458157;
->rl_bind_keyseq_if_unbound_in_map,,1257346705165463339;
->rl_bind_keyseq_if_unbound,,1257346705165468295;
-<rl_bind_keyseq_if_unbound,,11322,,1257346705165474545;
-<rl_bind_keyseq_if_unbound_in_map,,11323,,1257346705165483089;
-<rl_function_of_keyseq,,11324,,1257346705165491344;
->rl_function_of_keyseq,,1257346705165498460;
->rl_bind_keyseq_if_unbound_in_map,,1257346705165503608;
->rl_bind_keyseq_if_unbound,,1257346705165508619;
-<rl_bind_keyseq_if_unbound,,11325,,1257346705165514889;
-<rl_bind_keyseq_if_unbound_in_map,,11326,,1257346705165523566;
-<rl_function_of_keyseq,,11327,,1257346705165531821;
->rl_function_of_keyseq,,1257346705165538861;
->rl_bind_keyseq_if_unbound_in_map,,1257346705165544100;
->rl_bind_keyseq_if_unbound,,1257346705165549093;
->bind_arrow_keys_internal,,1257346705165553938;
-<bind_arrow_keys_internal,,11328,,1257346705165561871;
-<rl_bind_keyseq_if_unbound,,11329,,1257346705165571182;
-<rl_bind_keyseq_if_unbound_in_map,,11330,,1257346705165579813;
-<rl_function_of_keyseq,,11331,,1257346705165588267;
->rl_function_of_keyseq,,1257346705165595548;
-<rl_bind_keyseq_in_map,,11332,,1257346705165604162;
-<rl_generic_bind,,11333,,1257346705165613286;
-<xmalloc,,11334,,1257346705165629809;
->xmalloc,,1257346705165636696;
-<rl_translate_keyseq,,11335,,1257346705165644124;
->rl_translate_keyseq,,1257346705165651108;
->rl_generic_bind,,1257346705165655790;
->rl_bind_keyseq_in_map,,1257346705165660539;
->rl_bind_keyseq_if_unbound_in_map,,1257346705165664587;
->rl_bind_keyseq_if_unbound,,1257346705165669450;
-<rl_bind_keyseq_if_unbound,,11336,,1257346705165676463;
-<rl_bind_keyseq_if_unbound_in_map,,11337,,1257346705165685260;
-<rl_function_of_keyseq,,11338,,1257346705165693894;
->rl_function_of_keyseq,,1257346705165701007;
-<rl_bind_keyseq_in_map,,11339,,1257346705165708249;
-<rl_generic_bind,,11340,,1257346705165717322;
-<xmalloc,,11341,,1257346705165738459;
->xmalloc,,1257346705165745860;
-<rl_translate_keyseq,,11342,,1257346705165753324;
->rl_translate_keyseq,,1257346705165760311;
->rl_generic_bind,,1257346705165765053;
->rl_bind_keyseq_in_map,,1257346705165769949;
->rl_bind_keyseq_if_unbound_in_map,,1257346705165774037;
->rl_bind_keyseq_if_unbound,,1257346705165779035;
-<rl_bind_keyseq_if_unbound,,11343,,1257346705165786133;
-<rl_bind_keyseq_if_unbound_in_map,,11344,,1257346705165794968;
-<rl_function_of_keyseq,,11345,,1257346705165803528;
->rl_function_of_keyseq,,1257346705165810661;
-<rl_bind_keyseq_in_map,,11346,,1257346705165817897;
-<rl_generic_bind,,11347,,1257346705165826736;
-<xmalloc,,11348,,1257346705165843439;
->xmalloc,,1257346705165850287;
-<rl_translate_keyseq,,11349,,1257346705165857790;
->rl_translate_keyseq,,1257346705165864819;
->rl_generic_bind,,1257346705165869531;
->rl_bind_keyseq_in_map,,1257346705165874307;
->rl_bind_keyseq_if_unbound_in_map,,1257346705165878379;
->rl_bind_keyseq_if_unbound,,1257346705165883327;
-<rl_bind_keyseq_if_unbound,,11350,,1257346705165890400;
-<rl_bind_keyseq_if_unbound_in_map,,11351,,1257346705165899251;
-<rl_function_of_keyseq,,11352,,1257346705165907861;
->rl_function_of_keyseq,,1257346705165914971;
-<rl_bind_keyseq_in_map,,11353,,1257346705165922173;
-<rl_generic_bind,,11354,,1257346705165931051;
-<xmalloc,,11355,,1257346705165947439;
->xmalloc,,1257346705165954284;
-<rl_translate_keyseq,,11356,,1257346705165961670;
->rl_translate_keyseq,,1257346705165968629;
->rl_generic_bind,,1257346705165973354;
->rl_bind_keyseq_in_map,,1257346705165978088;
->rl_bind_keyseq_if_unbound_in_map,,1257346705165982148;
->rl_bind_keyseq_if_unbound,,1257346705165987113;
-<rl_bind_keyseq_if_unbound,,11357,,1257346705165994235;
-<rl_bind_keyseq_if_unbound_in_map,,11358,,1257346705166003037;
-<rl_function_of_keyseq,,11359,,1257346705166011578;
->rl_function_of_keyseq,,1257346705166018715;
-<rl_bind_keyseq_in_map,,11360,,1257346705166026026;
-<rl_generic_bind,,11361,,1257346705166034826;
-<xmalloc,,11362,,1257346705166051318;
->xmalloc,,1257346705166058106;
-<rl_translate_keyseq,,11363,,1257346705166065550;
->rl_translate_keyseq,,1257346705166072479;
->rl_generic_bind,,1257346705166077285;
->rl_bind_keyseq_in_map,,1257346705166082064;
->rl_bind_keyseq_if_unbound_in_map,,1257346705166086096;
->rl_bind_keyseq_if_unbound,,1257346705166091062;
-<rl_bind_keyseq_if_unbound,,11364,,1257346705166098234;
-<rl_bind_keyseq_if_unbound_in_map,,11365,,1257346705166107164;
-<rl_function_of_keyseq,,11366,,1257346705166115741;
->rl_function_of_keyseq,,1257346705166122826;
-<rl_bind_keyseq_in_map,,11367,,1257346705166130032;
-<rl_generic_bind,,11368,,1257346705166138772;
-<xmalloc,,11369,,1257346705166155204;
->xmalloc,,1257346705166162028;
-<rl_translate_keyseq,,11370,,1257346705166169291;
->rl_translate_keyseq,,1257346705166176199;
->rl_generic_bind,,1257346705166180954;
->rl_bind_keyseq_in_map,,1257346705166185744;
->rl_bind_keyseq_if_unbound_in_map,,1257346705166189786;
->rl_bind_keyseq_if_unbound,,1257346705166194674;
-<rl_bind_keyseq_if_unbound,,11371,,1257346705166201660;
-<rl_bind_keyseq_if_unbound_in_map,,11372,,1257346705166210493;
-<rl_function_of_keyseq,,11373,,1257346705166219154;
->rl_function_of_keyseq,,1257346705166226393;
->rl_bind_keyseq_if_unbound_in_map,,1257346705166231557;
->rl_bind_keyseq_if_unbound,,1257346705166236579;
-<rl_bind_keyseq_if_unbound,,11374,,1257346705166242877;
-<rl_bind_keyseq_if_unbound_in_map,,11375,,1257346705166251553;
-<rl_function_of_keyseq,,11376,,1257346705166259799;
->rl_function_of_keyseq,,1257346705166266879;
->rl_bind_keyseq_if_unbound_in_map,,1257346705166272031;
->rl_bind_keyseq_if_unbound,,1257346705166277092;
-<rl_bind_keyseq_if_unbound,,11377,,1257346705166283218;
-<rl_bind_keyseq_if_unbound_in_map,,11378,,1257346705166291723;
-<rl_function_of_keyseq,,11379,,1257346705166299997;
->rl_function_of_keyseq,,1257346705166307085;
->rl_bind_keyseq_if_unbound_in_map,,1257346705166312240;
->rl_bind_keyseq_if_unbound,,1257346705166317199;
-<rl_bind_keyseq_if_unbound,,11380,,1257346705166323370;
-<rl_bind_keyseq_if_unbound_in_map,,11381,,1257346705166332002;
-<rl_function_of_keyseq,,11382,,1257346705166340212;
->rl_function_of_keyseq,,1257346705166347259;
->rl_bind_keyseq_if_unbound_in_map,,1257346705166352374;
->rl_bind_keyseq_if_unbound,,1257346705166357288;
-<rl_bind_keyseq_if_unbound,,11383,,1257346705166363411;
-<rl_bind_keyseq_if_unbound_in_map,,11384,,1257346705166372007;
-<rl_function_of_keyseq,,11385,,1257346705166380406;
->rl_function_of_keyseq,,1257346705166387510;
->rl_bind_keyseq_if_unbound_in_map,,1257346705166392692;
->rl_bind_keyseq_if_unbound,,1257346705166397663;
-<rl_bind_keyseq_if_unbound,,11386,,1257346705166403970;
-<rl_bind_keyseq_if_unbound_in_map,,11387,,1257346705166412827;
-<rl_function_of_keyseq,,11388,,1257346705166421007;
->rl_function_of_keyseq,,1257346705166428185;
->rl_bind_keyseq_if_unbound_in_map,,1257346705166433439;
->rl_bind_keyseq_if_unbound,,1257346705166438435;
->bind_arrow_keys_internal,,1257346705166443295;
-<_rl_enable_meta_key,,11389,,1257346705166449523;
-<_rl_output_character_function,,11390,,1257346705166463053;
->_rl_output_character_function,,1257346705166482653;
-<_rl_output_character_function,,11391,,1257346705166489396;
->_rl_output_character_function,,1257346705166497128;
-<_rl_output_character_function,,11392,,1257346705166502490;
->_rl_output_character_function,,1257346705166509897;
-<_rl_output_character_function,,11393,,1257346705166515115;
->_rl_output_character_function,,1257346705166522444;
-<_rl_output_character_function,,11394,,1257346705166527827;
->_rl_output_character_function,,1257346705166535145;
-<_rl_output_character_function,,11395,,1257346705166540480;
->_rl_output_character_function,,1257346705166547842;
-<_rl_output_character_function,,11396,,1257346705166553048;
->_rl_output_character_function,,1257346705166560317;
-<_rl_output_character_function,,11397,,1257346705166565556;
->_rl_output_character_function,,1257346705166572840;
->_rl_enable_meta_key,,1257346705166577727;
-<_rl_start_using_history,,11398,,1257346705166584710;
-<using_history,,11399,,1257346705166594989;
->using_history,,1257346705166603579;
->_rl_start_using_history,,1257346705166608709;
-<rl_reset_line_state,,11400,,1257346705166615563;
-<rl_on_new_line,,11401,,1257346705166626279;
->rl_on_new_line,,1257346705166635142;
->rl_reset_line_state,,1257346705166640317;
-<_rl_set_insert_mode,,11402,,1257346705166646702;
->_rl_set_insert_mode,,1257346705166655057;
->rl_initialize,,1257346705166659914;
-<rl_add_defun,,11403,,1257346705166666620;
-<rl_add_funmap_entry,,11404,,1257346705166676265;
-<xmalloc,,11405,,1257346705166691140;
->xmalloc,,1257346705166698081;
->rl_add_funmap_entry,,1257346705166702932;
->rl_add_defun,,1257346705166707621;
-<rl_add_defun,,11406,,1257346705166713858;
-<rl_add_funmap_entry,,11407,,1257346705166722685;
-<xmalloc,,11408,,1257346705166741798;
->xmalloc,,1257346705166748998;
->rl_add_funmap_entry,,1257346705166753809;
->rl_add_defun,,1257346705166758399;
-<rl_add_defun,,11409,,1257346705166764609;
-<rl_add_funmap_entry,,11410,,1257346705166773385;
-<xmalloc,,11411,,1257346705166787183;
->xmalloc,,1257346705166794160;
->rl_add_funmap_entry,,1257346705166799023;
->rl_add_defun,,1257346705166803564;
-<rl_make_bare_keymap,,11412,,1257346705166811471;
-<xmalloc,,11413,,1257346705166828397;
->xmalloc,,1257346705166835813;
->rl_make_bare_keymap,,1257346705166841067;
-<rl_make_bare_keymap,,11414,,1257346705166848080;
-<xmalloc,,11415,,1257346705166863442;
->xmalloc,,1257346705166872768;
->rl_make_bare_keymap,,1257346705166877785;
-<rl_get_keymap,,11416,,1257346705166885345;
->rl_get_keymap,,1257346705166893823;
-<rl_bind_key_in_map,,11417,,1257346705166899991;
-<rl_bind_key,,11418,,1257346705166910587;
->rl_bind_key,,1257346705166917522;
->rl_bind_key_in_map,,1257346705166922207;
-<rl_bind_key_in_map,,11419,,1257346705166927573;
-<rl_bind_key,,11420,,1257346705166934920;
->rl_bind_key,,1257346705166941671;
->rl_bind_key_in_map,,1257346705166946480;
-<rl_bind_key_in_map,,11421,,1257346705166951713;
-<rl_bind_key,,11422,,1257346705166959229;
->rl_bind_key,,1257346705166965980;
->rl_bind_key_in_map,,1257346705166970621;
-<rl_bind_key_in_map,,11423,,1257346705166975848;
-<rl_bind_key,,11424,,1257346705166983312;
->rl_bind_key,,1257346705166990061;
->rl_bind_key_in_map,,1257346705166994789;
-<rl_bind_key_in_map,,11425,,1257346705167000130;
-<rl_bind_key,,11426,,1257346705167007561;
->rl_bind_key,,1257346705167014256;
->rl_bind_key_in_map,,1257346705167018935;
-<rl_bind_key_in_map,,11427,,1257346705167024201;
-<rl_bind_key,,11428,,1257346705167031693;
->rl_bind_key,,1257346705167038366;
->rl_bind_key_in_map,,1257346705167043013;
-<rl_bind_key_in_map,,11429,,1257346705167048249;
-<rl_bind_key,,11430,,1257346705167055716;
->rl_bind_key,,1257346705167062492;
->rl_bind_key_in_map,,1257346705167067259;
-<rl_bind_key_in_map,,11431,,1257346705167072497;
-<rl_bind_key,,11432,,1257346705167080010;
->rl_bind_key,,1257346705167086708;
->rl_bind_key_in_map,,1257346705167091496;
-<rl_bind_key_in_map,,11433,,1257346705167096858;
-<rl_bind_key,,11434,,1257346705167104382;
->rl_bind_key,,1257346705167111071;
->rl_bind_key_in_map,,1257346705167115714;
-<rl_generic_bind,,11435,,1257346705167122111;
-<xmalloc,,11436,,1257346705167138333;
->xmalloc,,1257346705167145428;
-<rl_translate_keyseq,,11437,,1257346705167152706;
->rl_translate_keyseq,,1257346705167160188;
->rl_generic_bind,,1257346705167164952;
-<rl_bind_key_in_map,,11438,,1257346705167170838;
-<rl_bind_key,,11439,,1257346705167179926;
->rl_bind_key,,1257346705167186738;
->rl_bind_key_in_map,,1257346705167191501;
-<rl_bind_key_in_map,,11440,,1257346705167196659;
-<rl_bind_key,,11441,,1257346705167204214;
->rl_bind_key,,1257346705167211050;
->rl_bind_key_in_map,,1257346705167215744;
-<rl_bind_key_in_map,,11442,,1257346705167221007;
-<rl_bind_key,,11443,,1257346705167228634;
->rl_bind_key,,1257346705167235350;
->rl_bind_key_in_map,,1257346705167240087;
-<rl_bind_key_in_map,,11444,,1257346705167245250;
-<rl_bind_key,,11445,,1257346705167252760;
->rl_bind_key,,1257346705167259478;
->rl_bind_key_in_map,,1257346705167264209;
-<rl_bind_key_in_map,,11446,,1257346705167269427;
-<rl_bind_key,,11447,,1257346705167276964;
->rl_bind_key,,1257346705167283679;
->rl_bind_key_in_map,,1257346705167288410;
-<rl_bind_key_in_map,,11448,,1257346705167293685;
-<rl_bind_key,,11449,,1257346705167301185;
->rl_bind_key,,1257346705167307922;
->rl_bind_key_in_map,,1257346705167312650;
-<rl_bind_key_in_map,,11450,,1257346705167317829;
-<rl_bind_key,,11451,,1257346705167325323;
->rl_bind_key,,1257346705167332114;
->rl_bind_key_in_map,,1257346705167336817;
-<rl_bind_key_in_map,,11452,,1257346705167342071;
-<rl_bind_key,,11453,,1257346705167349602;
->rl_bind_key,,1257346705167356282;
->rl_bind_key_in_map,,1257346705167361039;
-<rl_bind_key_in_map,,11454,,1257346705167366203;
-<rl_bind_key,,11455,,1257346705167373983;
->rl_bind_key,,1257346705167380723;
->rl_bind_key_in_map,,1257346705167385424;
-<rl_bind_key_in_map,,11456,,1257346705167390605;
-<rl_bind_key,,11457,,1257346705167398073;
->rl_bind_key,,1257346705167404827;
->rl_bind_key_in_map,,1257346705167409519;
-<rl_bind_key_in_map,,11458,,1257346705167414689;
-<rl_bind_key,,11459,,1257346705167422279;
->rl_bind_key,,1257346705167428971;
->rl_bind_key_in_map,,1257346705167433720;
-<rl_bind_key_in_map,,11460,,1257346705167438878;
-<rl_bind_key,,11461,,1257346705167446549;
->rl_bind_key,,1257346705167453367;
->rl_bind_key_in_map,,1257346705167458062;
-<rl_bind_key_in_map,,11462,,1257346705167463202;
-<rl_bind_key,,11463,,1257346705167470768;
->rl_bind_key,,1257346705167477746;
->rl_bind_key_in_map,,1257346705167482443;
-<rl_bind_key_in_map,,11464,,1257346705167487679;
-<rl_bind_key,,11465,,1257346705167495155;
->rl_bind_key,,1257346705167501829;
->rl_bind_key_in_map,,1257346705167506545;
-<rl_bind_key_in_map,,11466,,1257346705167511705;
-<rl_bind_key,,11467,,1257346705167519149;
->rl_bind_key,,1257346705167525939;
->rl_bind_key_in_map,,1257346705167530631;
-<rl_bind_key_in_map,,11468,,1257346705167535900;
-<rl_bind_key,,11469,,1257346705167543392;
->rl_bind_key,,1257346705167550149;
->rl_bind_key_in_map,,1257346705167554901;
-<rl_bind_key_in_map,,11470,,1257346705167560101;
-<rl_bind_key,,11471,,1257346705167567523;
->rl_bind_key,,1257346705167574368;
->rl_bind_key_in_map,,1257346705167579168;
-<rl_bind_key_in_map,,11472,,1257346705167584347;
-<rl_bind_key,,11473,,1257346705167591787;
->rl_bind_key,,1257346705167598575;
->rl_bind_key_in_map,,1257346705167604602;
-<rl_bind_key_in_map,,11474,,1257346705167610015;
-<rl_bind_key,,11475,,1257346705167617696;
->rl_bind_key,,1257346705167624502;
->rl_bind_key_in_map,,1257346705167629221;
-<rl_bind_key_in_map,,11476,,1257346705167634384;
-<rl_bind_key,,11477,,1257346705167641858;
->rl_bind_key,,1257346705167648685;
->rl_bind_key_in_map,,1257346705167653376;
-<rl_bind_key_in_map,,11478,,1257346705167658624;
-<rl_bind_key,,11479,,1257346705167666260;
->rl_bind_key,,1257346705167673045;
->rl_bind_key_in_map,,1257346705167677736;
-<rl_bind_key_in_map,,11480,,1257346705167682912;
-<rl_bind_key,,11481,,1257346705167690287;
->rl_bind_key,,1257346705167697104;
->rl_bind_key_in_map,,1257346705167701823;
-<rl_bind_key_in_map,,11482,,1257346705167706960;
-<rl_bind_key,,11483,,1257346705167714448;
->rl_bind_key,,1257346705167721236;
->rl_bind_key_in_map,,1257346705167730623;
-<rl_bind_key_in_map,,11484,,1257346705167736521;
-<rl_bind_key,,11485,,1257346705167744653;
->rl_bind_key,,1257346705167751393;
->rl_bind_key_in_map,,1257346705167756132;
-<rl_bind_key_in_map,,11486,,1257346705167761423;
-<rl_bind_key,,11487,,1257346705167768866;
->rl_bind_key,,1257346705167775602;
->rl_bind_key_in_map,,1257346705167780324;
-<rl_bind_key_in_map,,11488,,1257346705167785563;
-<rl_bind_key,,11489,,1257346705167793003;
->rl_bind_key,,1257346705167799797;
->rl_bind_key_in_map,,1257346705167804540;
-<rl_bind_key_in_map,,11490,,1257346705167809842;
-<rl_bind_key,,11491,,1257346705167817201;
->rl_bind_key,,1257346705167823989;
->rl_bind_key_in_map,,1257346705167828711;
-<rl_bind_key_in_map,,11492,,1257346705167833938;
-<rl_bind_key,,11493,,1257346705167841384;
->rl_bind_key,,1257346705167848169;
->rl_bind_key_in_map,,1257346705167852921;
-<rl_bind_key_in_map,,11494,,1257346705167858174;
-<rl_bind_key,,11495,,1257346705167865642;
->rl_bind_key,,1257346705167872508;
->rl_bind_key_in_map,,1257346705167877209;
-<rl_bind_key_in_map,,11496,,1257346705167882523;
-<rl_bind_key,,11497,,1257346705167889936;
->rl_bind_key,,1257346705167896685;
->rl_bind_key_in_map,,1257346705167901409;
-<rl_bind_key_in_map,,11498,,1257346705167906648;
-<rl_bind_key,,11499,,1257346705167914026;
->rl_bind_key,,1257346705167920901;
->rl_bind_key_in_map,,1257346705167925598;
-<rl_bind_key_in_map,,11500,,1257346705167930816;
-<rl_bind_key,,11501,,1257346705167938223;
->rl_bind_key,,1257346705167944984;
->rl_bind_key_in_map,,1257346705167949772;
-<rl_bind_key_in_map,,11502,,1257346705167955104;
-<rl_bind_key,,11503,,1257346705167962451;
->rl_bind_key,,1257346705167969227;
->rl_bind_key_in_map,,1257346705167973958;
-<rl_bind_key_in_map,,11504,,1257346705167979175;
-<rl_bind_key,,11505,,1257346705167986519;
->rl_bind_key,,1257346705167993289;
->rl_bind_key_in_map,,1257346705167998032;
-<rl_bind_key_in_map,,11506,,1257346705168003274;
-<rl_bind_key,,11507,,1257346705168010805;
->rl_bind_key,,1257346705168017508;
->rl_bind_key_in_map,,1257346705168022293;
-<rl_bind_key_in_map,,11508,,1257346705168027520;
-<rl_bind_key,,11509,,1257346705168034990;
->rl_bind_key,,1257346705168041862;
->rl_bind_key_in_map,,1257346705168046557;
-<rl_bind_key_in_map,,11510,,1257346705168051883;
-<rl_bind_key,,11511,,1257346705168059383;
->rl_bind_key,,1257346705168066129;
->rl_bind_key_in_map,,1257346705168070824;
-<rl_bind_key_in_map,,11512,,1257346705168076075;
-<rl_bind_key,,11513,,1257346705168083512;
->rl_bind_key,,1257346705168090264;
->rl_bind_key_in_map,,1257346705168094985;
-<rl_bind_key_in_map,,11514,,1257346705168100230;
-<rl_bind_key,,11515,,1257346705168107626;
->rl_bind_key,,1257346705168114441;
->rl_bind_key_in_map,,1257346705168119138;
-<rl_bind_key_in_map,,11516,,1257346705168124630;
-<rl_bind_key,,11517,,1257346705168132251;
->rl_bind_key,,1257346705168139032;
->rl_bind_key_in_map,,1257346705168143802;
-<rl_bind_key_in_map,,11518,,1257346705168149131;
-<rl_bind_key,,11519,,1257346705168156584;
->rl_bind_key,,1257346705168163414;
->rl_bind_key_in_map,,1257346705168168144;
-<rl_bind_key_in_map,,11520,,1257346705168173305;
-<rl_bind_key,,11521,,1257346705168180809;
->rl_bind_key,,1257346705168187539;
->rl_bind_key_in_map,,1257346705168192237;
-<rl_bind_key_in_map,,11522,,1257346705168197422;
-<rl_bind_key,,11523,,1257346705168204874;
->rl_bind_key,,1257346705168211629;
->rl_bind_key_in_map,,1257346705168216347;
-<rl_bind_key_in_map,,11524,,1257346705168221472;
-<rl_bind_key,,11525,,1257346705168229030;
->rl_bind_key,,1257346705168235844;
->rl_bind_key_in_map,,1257346705168240539;
-<rl_bind_key_in_map,,11526,,1257346705168245724;
-<rl_bind_key,,11527,,1257346705168253224;
->rl_bind_key,,1257346705168259955;
->rl_bind_key_in_map,,1257346705168264646;
-<rl_bind_key_in_map,,11528,,1257346705168269801;
-<rl_bind_key,,11529,,1257346705168277181;
->rl_bind_key,,1257346705168283954;
->rl_bind_key_in_map,,1257346705168288724;
-<rl_bind_key_in_map,,11530,,1257346705168293849;
-<rl_bind_key,,11531,,1257346705168301328;
->rl_bind_key,,1257346705168308194;
->rl_bind_key_in_map,,1257346705168312886;
-<rl_bind_key_in_map,,11532,,1257346705168318092;
-<rl_bind_key,,11533,,1257346705168325577;
->rl_bind_key,,1257346705168332277;
->rl_bind_key_in_map,,1257346705168336996;
-<rl_bind_key_in_map,,11534,,1257346705168342274;
-<rl_bind_key,,11535,,1257346705168349700;
->rl_bind_key,,1257346705168356481;
->rl_bind_key_in_map,,1257346705168361212;
-<rl_bind_key_in_map,,11536,,1257346705168366364;
-<rl_bind_key,,11537,,1257346705168374144;
->rl_bind_key,,1257346705168380971;
->rl_bind_key_in_map,,1257346705168385707;
-<rl_bind_key_in_map,,11538,,1257346705168390886;
-<rl_bind_key,,11539,,1257346705168398390;
->rl_bind_key,,1257346705168405093;
->rl_bind_key_in_map,,1257346705168409821;
-<rl_bind_key_in_map,,11540,,1257346705168414961;
-<rl_bind_key,,11541,,1257346705168422380;
->rl_bind_key,,1257346705168429153;
->rl_bind_key_in_map,,1257346705168433892;
-<rl_bind_key_in_map,,11542,,1257346705168439068;
-<rl_bind_key,,11543,,1257346705168446566;
->rl_bind_key,,1257346705168453378;
->rl_bind_key_in_map,,1257346705168458075;
-<rl_bind_key_in_map,,11544,,1257346705168463245;
-<rl_bind_key,,11545,,1257346705168470713;
->rl_bind_key,,1257346705168477467;
->rl_bind_key_in_map,,1257346705168482186;
-<rl_bind_key_in_map,,11546,,1257346705168487302;
-<rl_bind_key,,11547,,1257346705168494811;
->rl_bind_key,,1257346705168501608;
->rl_bind_key_in_map,,1257346705168506329;
-<rl_bind_key_in_map,,11548,,1257346705168511502;
-<rl_bind_key,,11549,,1257346705168519033;
->rl_bind_key,,1257346705168525763;
->rl_bind_key_in_map,,1257346705168530593;
-<rl_bind_key_in_map,,11550,,1257346705168535757;
-<rl_bind_key,,11551,,1257346705168543200;
->rl_bind_key,,1257346705168549946;
->rl_bind_key_in_map,,1257346705168554647;
-<rl_bind_key_in_map,,11552,,1257346705168559805;
-<rl_bind_key,,11553,,1257346705168567200;
->rl_bind_key,,1257346705168574012;
->rl_bind_key_in_map,,1257346705168578751;
-<rl_bind_key_in_map,,11554,,1257346705168583936;
-<rl_bind_key,,11555,,1257346705168591605;
->rl_bind_key,,1257346705168598303;
->rl_bind_key_in_map,,1257346705168603102;
-<rl_bind_key_in_map,,11556,,1257346705168608230;
-<rl_bind_key,,11557,,1257346705168615806;
->rl_bind_key,,1257346705168622585;
->rl_bind_key_in_map,,1257346705168627276;
-<rl_bind_key_in_map,,11558,,1257346705168632608;
-<rl_bind_key,,11559,,1257346705168640163;
->rl_bind_key,,1257346705168646933;
->rl_bind_key_in_map,,1257346705168651627;
-<rl_bind_key_in_map,,11560,,1257346705168656788;
-<rl_bind_key,,11561,,1257346705168664271;
->rl_bind_key,,1257346705168670968;
->rl_bind_key_in_map,,1257346705168675660;
-<rl_bind_key_in_map,,11562,,1257346705168680856;
-<rl_bind_key,,11563,,1257346705168688363;
->rl_bind_key,,1257346705168695097;
->rl_bind_key_in_map,,1257346705168699794;
-<rl_bind_key_in_map,,11564,,1257346705168705042;
-<rl_bind_key,,11565,,1257346705168712440;
->rl_bind_key,,1257346705168719189;
->rl_bind_key_in_map,,1257346705168723962;
-<rl_bind_key_in_map,,11566,,1257346705168733914;
-<rl_bind_key,,11567,,1257346705168741989;
->rl_bind_key,,1257346705168748825;
->rl_bind_key_in_map,,1257346705168753685;
-<rl_bind_key_in_map,,11568,,1257346705168758942;
-<rl_bind_key,,11569,,1257346705168766469;
->rl_bind_key,,1257346705168773197;
->rl_bind_key_in_map,,1257346705168777888;
-<rl_bind_key_in_map,,11570,,1257346705168783151;
-<rl_bind_key,,11571,,1257346705168790655;
->rl_bind_key,,1257346705168797347;
->rl_bind_key_in_map,,1257346705168802155;
-<rl_bind_key_in_map,,11572,,1257346705168807430;
-<rl_bind_key,,11573,,1257346705168814937;
->rl_bind_key,,1257346705168821725;
->rl_bind_key_in_map,,1257346705168826458;
-<rl_bind_key_in_map,,11574,,1257346705168831794;
-<rl_bind_key,,11575,,1257346705168839225;
->rl_bind_key,,1257346705168845983;
->rl_bind_key_in_map,,1257346705168850629;
-<rl_bind_key_in_map,,11576,,1257346705168855937;
-<rl_bind_key,,11577,,1257346705168863411;
->rl_bind_key,,1257346705168870132;
->rl_bind_key_in_map,,1257346705168874851;
-<rl_bind_key_in_map,,11578,,1257346705168880096;
-<rl_bind_key,,11579,,1257346705168887660;
->rl_bind_key,,1257346705168894414;
->rl_bind_key_in_map,,1257346705168899190;
-<rl_bind_key_in_map,,11580,,1257346705168904546;
-<rl_bind_key,,11581,,1257346705168912080;
->rl_bind_key,,1257346705168918780;
->rl_bind_key_in_map,,1257346705168923499;
-<rl_bind_key_in_map,,11582,,1257346705168928867;
-<rl_bind_key,,11583,,1257346705168936332;
->rl_bind_key,,1257346705168943032;
->rl_bind_key_in_map,,1257346705168947715;
-<rl_bind_key_in_map,,11584,,1257346705168953059;
-<rl_bind_key,,11585,,1257346705168960560;
->rl_bind_key,,1257346705168967335;
->rl_bind_key_in_map,,1257346705168972075;
-<rl_bind_key_in_map,,11586,,1257346705168977404;
-<rl_bind_key,,11587,,1257346705168984953;
->rl_bind_key,,1257346705168991653;
->rl_bind_key_in_map,,1257346705168996336;
-<rl_bind_key_in_map,,11588,,1257346705169001575;
-<rl_bind_key,,11589,,1257346705169009003;
->rl_bind_key,,1257346705169015749;
->rl_bind_key_in_map,,1257346705169020492;
-<rl_bind_key_in_map,,11590,,1257346705169025764;
-<rl_bind_key,,11591,,1257346705169033312;
->rl_bind_key,,1257346705169040073;
->rl_bind_key_in_map,,1257346705169044726;
-<rl_bind_key_in_map,,11592,,1257346705169050082;
-<rl_bind_key,,11593,,1257346705169057558;
->rl_bind_key,,1257346705169064283;
->rl_bind_key_in_map,,1257346705169069004;
-<rl_bind_key_in_map,,11594,,1257346705169074249;
-<rl_bind_key,,11595,,1257346705169081798;
->rl_bind_key,,1257346705169088514;
->rl_bind_key_in_map,,1257346705169093175;
-<rl_bind_key_in_map,,11596,,1257346705169098477;
-<rl_bind_key,,11597,,1257346705169105945;
->rl_bind_key,,1257346705169112651;
->rl_bind_key_in_map,,1257346705169117478;
-<rl_bind_key_in_map,,11598,,1257346705169122765;
-<rl_bind_key,,11599,,1257346705169130257;
->rl_bind_key,,1257346705169137024;
->rl_bind_key_in_map,,1257346705169141721;
-<rl_bind_key_in_map,,11600,,1257346705169146981;
-<rl_bind_key,,11601,,1257346705169154469;
->rl_bind_key,,1257346705169161167;
->rl_bind_key_in_map,,1257346705169165907;
-<rl_bind_key_in_map,,11602,,1257346705169171149;
-<rl_bind_key,,11603,,1257346705169178571;
->rl_bind_key,,1257346705169185227;
->rl_bind_key_in_map,,1257346705169189882;
-<rl_bind_key_in_map,,11604,,1257346705169195277;
-<rl_bind_key,,11605,,1257346705169202763;
->rl_bind_key,,1257346705169209515;
->rl_bind_key_in_map,,1257346705169214230;
-<rl_bind_key_in_map,,11606,,1257346705169219460;
-<rl_bind_key,,11607,,1257346705169227147;
->rl_bind_key,,1257346705169233911;
->rl_bind_key_in_map,,1257346705169238563;
-<rl_bind_key_in_map,,11608,,1257346705169243841;
-<rl_bind_key,,11609,,1257346705169251399;
->rl_bind_key,,1257346705169258103;
->rl_bind_key_in_map,,1257346705169262884;
-<rl_bind_key_in_map,,11610,,1257346705169268120;
-<rl_bind_key,,11611,,1257346705169275732;
->rl_bind_key,,1257346705169282421;
->rl_bind_key_in_map,,1257346705169287151;
-<rl_bind_key_in_map,,11612,,1257346705169292414;
-<rl_bind_key,,11613,,1257346705169300113;
->rl_bind_key,,1257346705169306841;
->rl_bind_key_in_map,,1257346705169311608;
-<rl_bind_key_in_map,,11614,,1257346705169316871;
-<rl_bind_key,,11615,,1257346705169324344;
->rl_bind_key,,1257346705169331153;
->rl_bind_key_in_map,,1257346705169335896;
-<rl_bind_key_in_map,,11616,,1257346705169341014;
-<rl_bind_key,,11617,,1257346705169348539;
->rl_bind_key,,1257346705169355294;
->rl_bind_key_in_map,,1257346705169360030;
-<rl_bind_key_in_map,,11618,,1257346705169365203;
-<rl_bind_key,,11619,,1257346705169372770;
->rl_bind_key,,1257346705169379425;
->rl_bind_key_in_map,,1257346705169384234;
-<rl_bind_key_in_map,,11620,,1257346705169389401;
-<rl_bind_key,,11621,,1257346705169396950;
->rl_bind_key,,1257346705169403761;
->rl_bind_key_in_map,,1257346705169408456;
-<rl_bind_key_in_map,,11622,,1257346705169413677;
-<rl_bind_key,,11623,,1257346705169421204;
->rl_bind_key,,1257346705169427959;
->rl_bind_key_in_map,,1257346705169432657;
-<rl_bind_key_in_map,,11624,,1257346705169437920;
-<rl_bind_key,,11625,,1257346705169445580;
->rl_bind_key,,1257346705169452295;
->rl_bind_key_in_map,,1257346705169457062;
-<rl_bind_key_in_map,,11626,,1257346705169462208;
-<rl_bind_key,,11627,,1257346705169469708;
->rl_bind_key,,1257346705169476520;
->rl_bind_key_in_map,,1257346705169481172;
-<rl_bind_key_in_map,,11628,,1257346705169486384;
-<rl_bind_key,,11629,,1257346705169493993;
->rl_bind_key,,1257346705169500697;
->rl_bind_key_in_map,,1257346705169505418;
-<rl_bind_key_in_map,,11630,,1257346705169510558;
-<rl_bind_key,,11631,,1257346705169518041;
->rl_bind_key,,1257346705169524774;
->rl_bind_key_in_map,,1257346705169529463;
-<rl_bind_key_in_map,,11632,,1257346705169534557;
-<rl_bind_key,,11633,,1257346705169541992;
->rl_bind_key,,1257346705169548803;
->rl_bind_key_in_map,,1257346705169553504;
-<rl_bind_key_in_map,,11634,,1257346705169558734;
-<rl_bind_key,,11635,,1257346705169566250;
->rl_bind_key,,1257346705169572926;
->rl_bind_key_in_map,,1257346705169577609;
-<rl_bind_key_in_map,,11636,,1257346705169582697;
-<rl_bind_key,,11637,,1257346705169590147;
->rl_bind_key,,1257346705169596880;
->rl_bind_key_in_map,,1257346705169601584;
-<rl_bind_key_in_map,,11638,,1257346705169608167;
-<rl_bind_key,,11639,,1257346705169615987;
->rl_bind_key,,1257346705169622801;
->rl_bind_key_in_map,,1257346705169627499;
->tui_initialize_readline,,1257346705169632732;
->tui_init,,1257346705169637357;
-<clear_interpreter_hooks,,11640,,1257346705169648175;
->clear_interpreter_hooks,,1257346705169657285;
-<tui_resume,,11641,,1257346705169672671;
-<cli_out_set_stream,,11642,,1257346705169684646;
-<ui_out_data,,11643,,1257346705169693711;
->ui_out_data,,1257346705169702092;
->cli_out_set_stream,,1257346705169707072;
-<gdb_setup_readline,,11644,,1257346705169717484;
-<stdio_fileopen,,11645,,1257346705169743179;
-<stdio_file_new,,11646,,1257346705169764216;
-<ui_file_new,,11647,,1257346705169785181;
-<xmalloc,,11648,,1257346705169801292;
->xmalloc,,1257346705169808422;
->ui_file_new,,1257346705169813009;
-<xmalloc,,11649,,1257346705169824696;
->xmalloc,,1257346705169831499;
->stdio_file_new,,1257346705169836061;
->stdio_fileopen,,1257346705169839637;
-<stdio_fileopen,,11650,,1257346705169856099;
-<stdio_file_new,,11651,,1257346705169874583;
-<ui_file_new,,11652,,1257346705169893635;
-<xmalloc,,11653,,1257346705169909604;
->xmalloc,,1257346705169916561;
->ui_file_new,,1257346705169921087;
-<xmalloc,,11654,,1257346705169932855;
->xmalloc,,1257346705169939649;
->stdio_file_new,,1257346705169944205;
->stdio_fileopen,,1257346705169947775;
-<add_file_handler,,11655,,1257346705169960457;
-<create_file_handler,,11656,,1257346705169976775;
-<xmalloc,,11657,,1257346705169993018;
->xmalloc,,1257346705170000023;
-<xrealloc,,11658,,1257346705170013767;
->xrealloc,,1257346705170021171;
->create_file_handler,,1257346705170025950;
->add_file_handler,,1257346705170030593;
->gdb_setup_readline,,1257346705170035513;
-<cli_out_set_stream,,11659,,1257346705170042584;
-<ui_out_data,,11660,,1257346705170049748;
->ui_out_data,,1257346705170056550;
->cli_out_set_stream,,1257346705170061257;
->tui_resume,,1257346705170065916;
->interp_set,,1257346705170070622;
-<current_interp_named_p,,11661,,1257346705170081759;
->current_interp_named_p,,1257346705170090537;
-<print_gdb_version,,11662,,1257346705170105842;
-<fprintf_filtered,,11663,,1257346705170126245;
-<vfprintf_filtered,,11664,,1257346705170146842;
-<vfprintf_maybe_filtered,,11665,,1257346705170171227;
-<xstrvprintf,,11666,,1257346705170188565;
->xstrvprintf,,1257346705170199316;
-<make_cleanup,,11667,,1257346705170214320;
-<make_my_cleanup,,11668,,1257346705170233207;
-<make_my_cleanup2,,11669,,1257346705170250641;
-<xmalloc,,11670,,1257346705170266433;
->xmalloc,,1257346705170273362;
->make_my_cleanup2,,1257346705170278375;
->make_my_cleanup,,1257346705170283139;
->make_cleanup,,1257346705170287918;
-<fputs_maybe_filtered,,11671,,1257346705170308913;
-<fputc_unfiltered,,11672,,1257346705170328639;
-<ui_file_write,,11673,,1257346705170348915;
-<stdio_file_write,,11674,,1257346705170367110;
-<ui_file_data,,11675,,1257346705170386053;
->ui_file_data,,1257346705170393064;
->stdio_file_write,,1257346705170399969;
->ui_file_write,,1257346705170403647;
->fputc_unfiltered,,1257346705170408621;
-<fputc_unfiltered,,11676,,1257346705170423417;
-<ui_file_write,,11677,,1257346705170441790;
-<stdio_file_write,,11678,,1257346705170458776;
-<ui_file_data,,11679,,1257346705170475939;
->ui_file_data,,1257346705170482989;
->stdio_file_write,,1257346705170487828;
->ui_file_write,,1257346705170491421;
->fputc_unfiltered,,1257346705170496056;
-<fputc_unfiltered,,11680,,1257346705170511544;
-<ui_file_write,,11681,,1257346705170529463;
-<stdio_file_write,,11682,,1257346705170546220;
-<ui_file_data,,11683,,1257346705170562974;
->ui_file_data,,1257346705170569945;
->stdio_file_write,,1257346705170574736;
->ui_file_write,,1257346705170578318;
->fputc_unfiltered,,1257346705170582944;
-<fputc_unfiltered,,11684,,1257346705170597641;
-<ui_file_write,,11685,,1257346705170615658;
-<stdio_file_write,,11686,,1257346705170632873;
-<ui_file_data,,11687,,1257346705170649726;
->ui_file_data,,1257346705170656689;
->stdio_file_write,,1257346705170661380;
->ui_file_write,,1257346705170664965;
->fputc_unfiltered,,1257346705170669630;
-<fputc_unfiltered,,11688,,1257346705170684165;
-<ui_file_write,,11689,,1257346705170702137;
-<stdio_file_write,,11690,,1257346705170718888;
-<ui_file_data,,11691,,1257346705170740738;
->ui_file_data,,1257346705192762881;
->stdio_file_write,,1257346705192773050;
->ui_file_write,,1257346705192776929;
->fputc_unfiltered,,1257346705192782147;
-<fputc_unfiltered,,11692,,1257346705192811337;
-<ui_file_write,,11693,,1257346705192841029;
-<stdio_file_write,,11694,,1257346705192867889;
-<ui_file_data,,11695,,1257346705192894947;
->ui_file_data,,1257346705192902195;
->stdio_file_write,,1257346705192907031;
->ui_file_write,,1257346705192910636;
->fputc_unfiltered,,1257346705192915286;
-<fputc_unfiltered,,11696,,1257346705192939896;
-<ui_file_write,,11697,,1257346705192968087;
-<stdio_file_write,,11698,,1257346705192994456;
-<ui_file_data,,11699,,1257346705193020284;
->ui_file_data,,1257346705193027364;
->stdio_file_write,,1257346705193032140;
->ui_file_write,,1257346705193035739;
->fputc_unfiltered,,1257346705193040377;
-<fputc_unfiltered,,11700,,1257346705193064277;
-<ui_file_write,,11701,,1257346705193090309;
-<stdio_file_write,,11702,,1257346705193115812;
-<ui_file_data,,11703,,1257346705193141643;
->ui_file_data,,1257346705193148807;
->stdio_file_write,,1257346705193153528;
->ui_file_write,,1257346705193157116;
->fputc_unfiltered,,1257346705193161751;
-<fputc_unfiltered,,11704,,1257346705193186026;
-<ui_file_write,,11705,,1257346705193212609;
-<stdio_file_write,,11706,,1257346705193238112;
-<ui_file_data,,11707,,1257346705193263101;
->ui_file_data,,1257346705193270508;
->stdio_file_write,,1257346705193275299;
->ui_file_write,,1257346705193278890;
->fputc_unfiltered,,1257346705193283533;
-<fputc_unfiltered,,11708,,1257346705193307972;
-<ui_file_write,,11709,,1257346705193334906;
-<stdio_file_write,,11710,,1257346705193360154;
-<ui_file_data,,11711,,1257346705193385371;
->ui_file_data,,1257346705193392535;
->stdio_file_write,,1257346705193397241;
->ui_file_write,,1257346705193400871;
->fputc_unfiltered,,1257346705193405512;
-<fputc_unfiltered,,11712,,1257346705193429881;
-<ui_file_write,,11713,,1257346705193456897;
-<stdio_file_write,,11714,,1257346705193481924;
-<ui_file_data,,11715,,1257346705193507665;
->ui_file_data,,1257346705193514847;
->stdio_file_write,,1257346705193519547;
->ui_file_write,,1257346705193523144;
->fputc_unfiltered,,1257346705193527782;
-<fputc_unfiltered,,11716,,1257346705193552241;
-<ui_file_write,,11717,,1257346705193578884;
-<stdio_file_write,,11718,,1257346705193603722;
-<ui_file_data,,11719,,1257346705193629325;
->ui_file_data,,1257346705193636536;
->stdio_file_write,,1257346705193641252;
->ui_file_write,,1257346705193644849;
->fputc_unfiltered,,1257346705193649477;
-<fputc_unfiltered,,11720,,1257346705193674959;
-<ui_file_write,,11721,,1257346705193702525;
-<stdio_file_write,,11722,,1257346705193734052;
-<ui_file_data,,11723,,1257346705193760505;
->ui_file_data,,1257346705193767711;
->stdio_file_write,,1257346705193772490;
->ui_file_write,,1257346705193776093;
->fputc_unfiltered,,1257346705193780676;
-<fputc_unfiltered,,11724,,1257346705193805698;
-<ui_file_write,,11725,,1257346705193832873;
-<stdio_file_write,,11726,,1257346705193860232;
-<ui_file_data,,11727,,1257346705193887295;
->ui_file_data,,1257346705193894447;
->stdio_file_write,,1257346705193899163;
->ui_file_write,,1257346705193902751;
->fputc_unfiltered,,1257346705193907469;
-<fputc_unfiltered,,11728,,1257346705193931300;
-<ui_file_write,,11729,,1257346705193958334;
-<stdio_file_write,,11730,,1257346705193986345;
-<ui_file_data,,11731,,1257346705194013114;
->ui_file_data,,1257346705194020281;
->stdio_file_write,,1257346705194024994;
->ui_file_write,,1257346705194028588;
->fputc_unfiltered,,1257346705194033183;
-<fputc_unfiltered,,11732,,1257346705194057260;
-<ui_file_write,,11733,,1257346705194084462;
-<stdio_file_write,,11734,,1257346705194110741;
-<ui_file_data,,11735,,1257346705194136659;
->ui_file_data,,1257346705194143781;
->stdio_file_write,,1257346705194148479;
->ui_file_write,,1257346705194152115;
->fputc_unfiltered,,1257346705194156698;
-<fputc_unfiltered,,11736,,1257346705194181160;
-<ui_file_write,,11737,,1257346705194208525;
-<stdio_file_write,,11738,,1257346705194234115;
-<ui_file_data,,11739,,1257346705194260421;
->ui_file_data,,1257346705194267702;
->stdio_file_write,,1257346705194272382;
->ui_file_write,,1257346705194275975;
->fputc_unfiltered,,1257346705194280622;
-<fputc_unfiltered,,11740,,1257346705194305021;
-<ui_file_write,,11741,,1257346705194331508;
-<stdio_file_write,,11742,,1257346705194357320;
-<ui_file_data,,11743,,1257346705194383449;
->ui_file_data,,1257346705194390540;
->stdio_file_write,,1257346705194395313;
->ui_file_write,,1257346705194398865;
->fputc_unfiltered,,1257346705194403445;
-<fputc_unfiltered,,11744,,1257346705194428654;
-<ui_file_write,,11745,,1257346705194456328;
-<stdio_file_write,,11746,,1257346705194481918;
-<ui_file_data,,11747,,1257346705194508185;
->ui_file_data,,1257346705194515286;
->stdio_file_write,,1257346705194520010;
->ui_file_write,,1257346705194523568;
->fputc_unfiltered,,1257346705194528293;
-<fputc_unfiltered,,11748,,1257346705194552936;
-<ui_file_write,,11749,,1257346705194579978;
-<stdio_file_write,,11750,,1257346705194605511;
-<ui_file_data,,11751,,1257346705194631063;
->ui_file_data,,1257346705194638226;
->stdio_file_write,,1257346705194643056;
->ui_file_write,,1257346705194646647;
->fputc_unfiltered,,1257346705194651288;
-<fputc_unfiltered,,11752,,1257346705194676216;
-<ui_file_write,,11753,,1257346705194703782;
-<stdio_file_write,,11754,,1257346705194739765;
-<ui_file_data,,11755,,1257346705194776401;
->ui_file_data,,1257346705194784043;
->stdio_file_write,,1257346705194788840;
->ui_file_write,,1257346705194792611;
->fputc_unfiltered,,1257346705194797240;
-<fputc_unfiltered,,11756,,1257346705194822295;
-<ui_file_write,,11757,,1257346705194848715;
-<stdio_file_write,,11758,,1257346705194874516;
-<ui_file_data,,11759,,1257346705194899995;
->ui_file_data,,1257346705194907131;
->stdio_file_write,,1257346705194911934;
->ui_file_write,,1257346705194915537;
->fputc_unfiltered,,1257346705194920171;
-<fputc_unfiltered,,11760,,1257346705194945301;
-<ui_file_write,,11761,,1257346705194972143;
-<stdio_file_write,,11762,,1257346705194997721;
-<ui_file_data,,11763,,1257346705195023865;
->ui_file_data,,1257346705195031007;
->stdio_file_write,,1257346705195035750;
->ui_file_write,,1257346705195039347;
->fputc_unfiltered,,1257346705195044020;
-<fputc_unfiltered,,11764,,1257346705195068645;
-<ui_file_write,,11765,,1257346705195096244;
-<stdio_file_write,,11766,,1257346705195122156;
-<ui_file_data,,11767,,1257346705195147984;
->ui_file_data,,1257346705195155142;
->stdio_file_write,,1257346705195159881;
->ui_file_write,,1257346705195163454;
->fputc_unfiltered,,1257346705195168071;
-<fputc_unfiltered,,11768,,1257346705195193270;
-<ui_file_write,,11769,,1257346705195220671;
-<stdio_file_write,,11770,,1257346705195246555;
-<ui_file_data,,11771,,1257346705195272561;
->ui_file_data,,1257346705195279724;
->stdio_file_write,,1257346705195284509;
->ui_file_write,,1257346705195288112;
->fputc_unfiltered,,1257346705195292737;
-<fputc_unfiltered,,11772,,1257346705195317843;
-<ui_file_write,,11773,,1257346705195345446;
-<stdio_file_write,,11774,,1257346705195371589;
-<ui_file_data,,11775,,1257346705195398773;
->ui_file_data,,1257346705195405949;
->stdio_file_write,,1257346705195410656;
->ui_file_write,,1257346705195414340;
->fputc_unfiltered,,1257346705195418974;
-<fputc_unfiltered,,11776,,1257346705195443876;
-<ui_file_write,,11777,,1257346705195470753;
-<stdio_file_write,,11778,,1257346705195496145;
-<ui_file_data,,11779,,1257346705195522006;
->ui_file_data,,1257346705195529145;
->stdio_file_write,,1257346705195533906;
->ui_file_write,,1257346705195537476;
->fputc_unfiltered,,1257346705195542162;
-<fputc_unfiltered,,11780,,1257346705195571442;
-<ui_file_write,,11781,,1257346705195601673;
-<stdio_file_write,,11782,,1257346705195629765;
-<ui_file_data,,11783,,1257346705195656591;
->ui_file_data,,1257346705195663740;
->stdio_file_write,,1257346705195668483;
->ui_file_write,,1257346705195672076;
->fputc_unfiltered,,1257346705195676714;
-<fputc_unfiltered,,11784,,1257346705195703925;
-<ui_file_write,,11785,,1257346705195775954;
-<stdio_file_write,,11786,,1257346705195804112;
-<ui_file_data,,11787,,1257346705195831143;
->ui_file_data,,1257346705195838325;
->stdio_file_write,,1257346705195843233;
->ui_file_write,,1257346705195846839;
->fputc_unfiltered,,1257346705195851497;
-<fputc_unfiltered,,11788,,1257346705195878693;
-<ui_file_write,,11789,,1257346705195907977;
-<stdio_file_write,,11790,,1257346705195933029;
-<ui_file_data,,11791,,1257346705195958357;
->ui_file_data,,1257346705195965485;
->stdio_file_write,,1257346705195970224;
->ui_file_write,,1257346705195973830;
->fputc_unfiltered,,1257346705195978465;
-<fputc_unfiltered,,11792,,1257346705196003360;
-<ui_file_write,,11793,,1257346705196030463;
-<stdio_file_write,,11794,,1257346705196058877;
-<ui_file_data,,11795,,1257346705196086221;
->ui_file_data,,1257346705196093505;
->stdio_file_write,,1257346705196098218;
->ui_file_write,,1257346705196101875;
->fputc_unfiltered,,1257346705196106536;
-<fputc_unfiltered,,11796,,1257346705196130490;
-<ui_file_write,,11797,,1257346705196156703;
-<stdio_file_write,,11798,,1257346705196182925;
-<ui_file_data,,11799,,1257346705196208765;
->ui_file_data,,1257346705196215880;
->stdio_file_write,,1257346705196220617;
->ui_file_write,,1257346705196224208;
->fputc_unfiltered,,1257346705196228800;
-<fputc_unfiltered,,11800,,1257346705196253416;
-<ui_file_write,,11801,,1257346705196280089;
-<stdio_file_write,,11802,,1257346705196305002;
-<ui_file_data,,11803,,1257346705196330752;
->ui_file_data,,1257346705196337907;
->stdio_file_write,,1257346705196342616;
->ui_file_write,,1257346705196346225;
->fputc_unfiltered,,1257346705196350857;
-<wrap_here,,11804,,1257346705196374254;
->wrap_here,,1257346705196384624;
-<fputc_unfiltered,,11805,,1257346705196408948;
-<ui_file_write,,11806,,1257346705196435203;
-<stdio_file_write,,11807,,1257346705196459735;
-<ui_file_data,,11808,,1257346705196484365;
->ui_file_data,,1257346705196491508;
->stdio_file_write,,1257346705216704033;
->ui_file_write,,1257346705216710036;
->fputc_unfiltered,,1257346705216716081;
->fputs_maybe_filtered,,1257346705216721521;
-<do_cleanups,,11809,,1257346705216750927;
-<do_my_cleanups,,11810,,1257346705216780442;
-<xfree,,11811,,1257346705216808547;
->xfree,,1257346705216816757;
-<xfree,,11812,,1257346705216837171;
->xfree,,1257346705216843887;
->do_my_cleanups,,1257346705216848636;
->do_cleanups,,1257346705216852431;
->vfprintf_maybe_filtered,,1257346705216857541;
->vfprintf_filtered,,1257346705216861537;
->fprintf_filtered,,1257346705216866154;
-<fprintf_filtered,,11813,,1257346705216889218;
-<vfprintf_filtered,,11814,,1257346705216916462;
-<vfprintf_maybe_filtered,,11815,,1257346705216943616;
-<xstrvprintf,,11816,,1257346705216967059;
->xstrvprintf,,1257346705216978966;
-<make_cleanup,,11817,,1257346705216998451;
-<make_my_cleanup,,11818,,1257346705217021686;
-<make_my_cleanup2,,11819,,1257346705217042260;
-<xmalloc,,11820,,1257346705217063498;
->xmalloc,,1257346705217070948;
->make_my_cleanup2,,1257346705217075865;
->make_my_cleanup,,1257346705217080638;
->make_cleanup,,1257346705217085408;
-<fputs_maybe_filtered,,11821,,1257346705217110351;
-<fputc_unfiltered,,11822,,1257346705217133962;
-<ui_file_write,,11823,,1257346705217156139;
-<stdio_file_write,,11824,,1257346705217177384;
-<ui_file_data,,11825,,1257346705217199612;
->ui_file_data,,1257346705217207037;
->stdio_file_write,,1257346705217212294;
->ui_file_write,,1257346705217216002;
->fputc_unfiltered,,1257346705217220624;
-<fputc_unfiltered,,11826,,1257346705217239923;
-<ui_file_write,,11827,,1257346705217260819;
-<stdio_file_write,,11828,,1257346705217281498;
-<ui_file_data,,11829,,1257346705217302598;
->ui_file_data,,1257346705217309684;
->stdio_file_write,,1257346705217314399;
->ui_file_write,,1257346705217317990;
->fputc_unfiltered,,1257346705217322588;
-<fputc_unfiltered,,11830,,1257346705217341355;
-<ui_file_write,,11831,,1257346705217362304;
-<stdio_file_write,,11832,,1257346705217383438;
-<ui_file_data,,11833,,1257346705217404673;
->ui_file_data,,1257346705217411747;
->stdio_file_write,,1257346705217416444;
->ui_file_write,,1257346705217420035;
->fputc_unfiltered,,1257346705217424754;
-<fputc_unfiltered,,11834,,1257346705217444016;
-<ui_file_write,,11835,,1257346705217465360;
-<stdio_file_write,,11836,,1257346705217486190;
-<ui_file_data,,11837,,1257346705217507524;
->ui_file_data,,1257346705217514607;
->stdio_file_write,,1257346705217519325;
->ui_file_write,,1257346705217522913;
->fputc_unfiltered,,1257346705217527542;
-<fputc_unfiltered,,11838,,1257346705217546335;
-<ui_file_write,,11839,,1257346705217567555;
-<stdio_file_write,,11840,,1257346705217588526;
-<ui_file_data,,11841,,1257346705217609693;
->ui_file_data,,1257346705217616889;
->stdio_file_write,,1257346705217621584;
->ui_file_write,,1257346705217625172;
->fputc_unfiltered,,1257346705217629809;
-<fputc_unfiltered,,11842,,1257346705217648660;
-<ui_file_write,,11843,,1257346705217669895;
-<stdio_file_write,,11844,,1257346705217690526;
-<ui_file_data,,11845,,1257346705217712017;
->ui_file_data,,1257346705217719076;
->stdio_file_write,,1257346705217723791;
->ui_file_write,,1257346705217732521;
->fputc_unfiltered,,1257346705217737468;
-<fputc_unfiltered,,11846,,1257346705217756848;
-<ui_file_write,,11847,,1257346705217778375;
-<stdio_file_write,,11848,,1257346705217799049;
-<ui_file_data,,11849,,1257346705217820377;
->ui_file_data,,1257346705217827493;
->stdio_file_write,,1257346705217832220;
->ui_file_write,,1257346705217835814;
->fputc_unfiltered,,1257346705217840419;
-<fputc_unfiltered,,11850,,1257346705217859227;
-<ui_file_write,,11851,,1257346705217880556;
-<stdio_file_write,,11852,,1257346705217901542;
-<ui_file_data,,11853,,1257346705217922618;
->ui_file_data,,1257346705217929676;
->stdio_file_write,,1257346705217934389;
->ui_file_write,,1257346705217937977;
->fputc_unfiltered,,1257346705217942822;
-<fputc_unfiltered,,11854,,1257346705217961555;
-<ui_file_write,,11855,,1257346705217982769;
-<stdio_file_write,,11856,,1257346705218003298;
-<ui_file_data,,11857,,1257346705218024762;
->ui_file_data,,1257346705218031908;
->stdio_file_write,,1257346705218036651;
->ui_file_write,,1257346705218040238;
->fputc_unfiltered,,1257346705218044834;
-<fputc_unfiltered,,11858,,1257346705218063766;
-<ui_file_write,,11859,,1257346705218084655;
-<stdio_file_write,,11860,,1257346705218105289;
-<ui_file_data,,11861,,1257346705218126512;
->ui_file_data,,1257346705218133586;
->stdio_file_write,,1257346705218138383;
->ui_file_write,,1257346705218141977;
->fputc_unfiltered,,1257346705218146602;
-<fputc_unfiltered,,11862,,1257346705218165804;
-<ui_file_write,,11863,,1257346705218186583;
-<stdio_file_write,,11864,,1257346705218207229;
-<ui_file_data,,11865,,1257346705218228714;
->ui_file_data,,1257346705218235796;
->stdio_file_write,,1257346705218240473;
->ui_file_write,,1257346705218244016;
->fputc_unfiltered,,1257346705218248596;
-<fputc_unfiltered,,11866,,1257346705218267822;
-<ui_file_write,,11867,,1257346705218289133;
-<stdio_file_write,,11868,,1257346705218310113;
-<ui_file_data,,11869,,1257346705218331279;
->ui_file_data,,1257346705218338326;
->stdio_file_write,,1257346705218343041;
->ui_file_write,,1257346705218346629;
->fputc_unfiltered,,1257346705218351264;
-<fputc_unfiltered,,11870,,1257346705218370343;
-<ui_file_write,,11871,,1257346705218391100;
-<stdio_file_write,,11872,,1257346705218411551;
-<ui_file_data,,11873,,1257346705218433002;
->ui_file_data,,1257346705218440040;
->stdio_file_write,,1257346705218444698;
->ui_file_write,,1257346705218448244;
->fputc_unfiltered,,1257346705218452969;
-<fputc_unfiltered,,11874,,1257346705218471918;
-<ui_file_write,,11875,,1257346705218492700;
-<stdio_file_write,,11876,,1257346705218513226;
-<ui_file_data,,11877,,1257346705218534705;
->ui_file_data,,1257346705218541814;
->stdio_file_write,,1257346705218546515;
->ui_file_write,,1257346705218550103;
->fputc_unfiltered,,1257346705218554695;
-<fputc_unfiltered,,11878,,1257346705218573555;
-<ui_file_write,,11879,,1257346705218594793;
-<stdio_file_write,,11880,,1257346705218616958;
-<ui_file_data,,11881,,1257346705218638211;
->ui_file_data,,1257346705218645354;
->stdio_file_write,,1257346705218650115;
->ui_file_write,,1257346705218653718;
->fputc_unfiltered,,1257346705218658352;
-<fputc_unfiltered,,11882,,1257346705218677085;
-<ui_file_write,,11883,,1257346705218698459;
-<stdio_file_write,,11884,,1257346705218719352;
-<ui_file_data,,11885,,1257346705218745184;
->ui_file_data,,1257346705218753004;
->stdio_file_write,,1257346705218757771;
->ui_file_write,,1257346705218761370;
->fputc_unfiltered,,1257346705218766014;
-<fputc_unfiltered,,11886,,1257346705218785273;
-<ui_file_write,,11887,,1257346705218806569;
-<stdio_file_write,,11888,,1257346705218827612;
-<ui_file_data,,11889,,1257346705218848685;
->ui_file_data,,1257346705218855780;
->stdio_file_write,,1257346705218860546;
->ui_file_write,,1257346705218864134;
->fputc_unfiltered,,1257346705218868787;
-<fputc_unfiltered,,11890,,1257346705218887520;
-<ui_file_write,,11891,,1257346705218908341;
-<stdio_file_write,,11892,,1257346705218928860;
-<ui_file_data,,11893,,1257346705218949909;
->ui_file_data,,1257346705218957034;
->stdio_file_write,,1257346705218961855;
->ui_file_write,,1257346705218965400;
->fputc_unfiltered,,1257346705218970104;
-<fputc_unfiltered,,11894,,1257346705218988834;
-<ui_file_write,,11895,,1257346705219009670;
-<stdio_file_write,,11896,,1257346705219030283;
-<ui_file_data,,11897,,1257346705219051434;
->ui_file_data,,1257346705219058495;
->stdio_file_write,,1257346705219063190;
->ui_file_write,,1257346705219066781;
->fputc_unfiltered,,1257346705219071424;
-<fputc_unfiltered,,11898,,1257346705219090732;
-<ui_file_write,,11899,,1257346705219112010;
-<stdio_file_write,,11900,,1257346705219133022;
-<ui_file_data,,11901,,1257346705219154547;
->ui_file_data,,1257346705219161617;
->stdio_file_write,,1257346705219166294;
->ui_file_write,,1257346705219169951;
->fputc_unfiltered,,1257346705219174642;
-<fputc_unfiltered,,11902,,1257346705219193460;
-<ui_file_write,,11903,,1257346705219214394;
-<stdio_file_write,,11904,,1257346705219234887;
-<ui_file_data,,11905,,1257346705219256192;
->ui_file_data,,1257346705219263229;
->stdio_file_write,,1257346705219267945;
->ui_file_write,,1257346705219271493;
->fputc_unfiltered,,1257346705219276215;
-<fputc_unfiltered,,11906,,1257346705219294948;
-<ui_file_write,,11907,,1257346705219316223;
-<stdio_file_write,,11908,,1257346705219337004;
-<ui_file_data,,11909,,1257346705219358125;
->ui_file_data,,1257346705219365169;
->stdio_file_write,,1257346705219369963;
->ui_file_write,,1257346705219373548;
->fputc_unfiltered,,1257346705219378284;
-<fputc_unfiltered,,11910,,1257346705219397198;
-<ui_file_write,,11911,,1257346705219418551;
-<stdio_file_write,,11912,,1257346705219439209;
-<ui_file_data,,11913,,1257346705219460682;
->ui_file_data,,1257346705219467749;
->stdio_file_write,,1257346705219472468;
->ui_file_write,,1257346705219476050;
->fputc_unfiltered,,1257346705219480687;
-<fputc_unfiltered,,11914,,1257346705219499483;
-<ui_file_write,,11915,,1257346705219520376;
-<stdio_file_write,,11916,,1257346705219541476;
-<ui_file_data,,11917,,1257346705219562495;
->ui_file_data,,1257346705219569518;
->stdio_file_write,,1257346705219574260;
->ui_file_write,,1257346705219577803;
->fputc_unfiltered,,1257346705219582374;
-<fputc_unfiltered,,11918,,1257346705219601586;
-<ui_file_write,,11919,,1257346705219623071;
-<stdio_file_write,,11920,,1257346705219644042;
-<ui_file_data,,11921,,1257346705219665644;
->ui_file_data,,1257346705219672808;
->stdio_file_write,,1257346705219677523;
->ui_file_write,,1257346705219681102;
->fputc_unfiltered,,1257346705219685734;
-<fputc_unfiltered,,11922,,1257346705219704461;
-<ui_file_write,,11923,,1257346705219730350;
-<stdio_file_write,,11924,,1257346705219752013;
-<ui_file_data,,11925,,1257346705219773546;
->ui_file_data,,1257346705219780761;
->stdio_file_write,,1257346705219785497;
->ui_file_write,,1257346705219789100;
->fputc_unfiltered,,1257346705219793738;
-<fputc_unfiltered,,11926,,1257346705219812522;
-<ui_file_write,,11927,,1257346705219833424;
-<stdio_file_write,,11928,,1257346705219854446;
-<ui_file_data,,11929,,1257346705219875474;
->ui_file_data,,1257346705219882508;
->stdio_file_write,,1257346705219887187;
->ui_file_write,,1257346705219890754;
->fputc_unfiltered,,1257346705219895452;
-<fputc_unfiltered,,11930,,1257346705219914630;
-<ui_file_write,,11931,,1257346705219935947;
-<stdio_file_write,,11932,,1257346705219957002;
-<ui_file_data,,11933,,1257346705219978457;
->ui_file_data,,1257346705219985552;
->stdio_file_write,,1257346705219990264;
->ui_file_write,,1257346705219993843;
->fputc_unfiltered,,1257346705219998529;
-<fputc_unfiltered,,11934,,1257346705220017388;
-<ui_file_write,,11935,,1257346705220038675;
-<stdio_file_write,,11936,,1257346705220059766;
-<ui_file_data,,11937,,1257346705220080857;
->ui_file_data,,1257346705220087873;
->stdio_file_write,,1257346705220092619;
->ui_file_write,,1257346705220096213;
->fputc_unfiltered,,1257346705220100826;
-<fputc_unfiltered,,11938,,1257346705220119647;
-<ui_file_write,,11939,,1257346705220140705;
-<stdio_file_write,,11940,,1257346705220161230;
-<ui_file_data,,11941,,1257346705220182830;
->ui_file_data,,1257346705220189991;
->stdio_file_write,,1257346705220194697;
->ui_file_write,,1257346705220198279;
->fputc_unfiltered,,1257346705220202925;
-<fputc_unfiltered,,11942,,1257346705220221917;
-<ui_file_write,,11943,,1257346705220242879;
-<stdio_file_write,,11944,,1257346705220263378;
-<ui_file_data,,11945,,1257346705220284691;
->ui_file_data,,1257346705220291765;
->stdio_file_write,,1257346705220296462;
->ui_file_write,,1257346705220300047;
->fputc_unfiltered,,1257346705220304685;
-<fputc_unfiltered,,11946,,1257346705220323902;
-<ui_file_write,,11947,,1257346705220344687;
-<stdio_file_write,,11948,,1257346705220365182;
-<ui_file_data,,11949,,1257346705220386700;
->ui_file_data,,1257346705220393765;
->stdio_file_write,,1257346705220398484;
->ui_file_write,,1257346705220402032;
->fputc_unfiltered,,1257346705220406688;
-<fputc_unfiltered,,11950,,1257346705220425959;
-<ui_file_write,,11951,,1257346705220447213;
-<stdio_file_write,,11952,,1257346705220468349;
-<ui_file_data,,11953,,1257346705220489630;
->ui_file_data,,1257346705220496631;
->stdio_file_write,,1257346705220501488;
->ui_file_write,,1257346705220505040;
->fputc_unfiltered,,1257346705220509650;
-<fputc_unfiltered,,11954,,1257346705220528852;
-<ui_file_write,,11955,,1257346705220549998;
-<stdio_file_write,,11956,,1257346705220570806;
-<ui_file_data,,11957,,1257346705220592318;
->ui_file_data,,1257346705220599353;
->stdio_file_write,,1257346705220605235;
->ui_file_write,,1257346705220608844;
->fputc_unfiltered,,1257346705220613569;
-<fputc_unfiltered,,11958,,1257346705220632413;
-<ui_file_write,,11959,,1257346705220653288;
-<stdio_file_write,,11960,,1257346705220673832;
-<ui_file_data,,11961,,1257346705220695085;
->ui_file_data,,1257346705220702237;
->stdio_file_write,,1257346705220706961;
->ui_file_write,,1257346705220710546;
->fputc_unfiltered,,1257346705220715184;
-<fputc_unfiltered,,11962,,1257346705220738594;
-<ui_file_write,,11963,,1257346705220760256;
-<stdio_file_write,,11964,,1257346705220781305;
-<ui_file_data,,11965,,1257346705220802363;
->ui_file_data,,1257346705220809497;
->stdio_file_write,,1257346705220814249;
->ui_file_write,,1257346705220817842;
->fputc_unfiltered,,1257346705220822567;
-<fputc_unfiltered,,11966,,1257346705220841766;
-<ui_file_write,,11967,,1257346705220863167;
-<stdio_file_write,,11968,,1257346705220884129;
-<ui_file_data,,11969,,1257346705220905605;
->ui_file_data,,1257346705220912691;
->stdio_file_write,,1257346705220917412;
->ui_file_write,,1257346705220920991;
->fputc_unfiltered,,1257346705220925634;
-<fputc_unfiltered,,11970,,1257346705220944455;
-<ui_file_write,,11971,,1257346705220965327;
-<stdio_file_write,,11972,,1257346705220986225;
-<ui_file_data,,11973,,1257346705221007259;
->ui_file_data,,1257346705221014315;
->stdio_file_write,,1257346705221019027;
->ui_file_write,,1257346705221022621;
->fputc_unfiltered,,1257346705221027265;
-<fputc_unfiltered,,11974,,1257346705221045977;
-<ui_file_write,,11975,,1257346705221066899;
-<stdio_file_write,,11976,,1257346705221087440;
-<ui_file_data,,11977,,1257346705221108525;
->ui_file_data,,1257346705221115593;
->stdio_file_write,,1257346705221120299;
->ui_file_write,,1257346705221123887;
->fputc_unfiltered,,1257346705221128594;
-<fputc_unfiltered,,11978,,1257346705221147333;
-<ui_file_write,,11979,,1257346705221168472;
-<stdio_file_write,,11980,,1257346705221189001;
-<ui_file_data,,11981,,1257346705221210101;
->ui_file_data,,1257346705221217169;
->stdio_file_write,,1257346705221221872;
->ui_file_write,,1257346705221225463;
->fputc_unfiltered,,1257346705221230110;
-<fputc_unfiltered,,11982,,1257346705221249309;
-<ui_file_write,,11983,,1257346705221270596;
-<stdio_file_write,,11984,,1257346705221291632;
-<ui_file_data,,11985,,1257346705221313202;
->ui_file_data,,1257346705221320257;
->stdio_file_write,,1257346705221324973;
->ui_file_write,,1257346705221328558;
->fputc_unfiltered,,1257346705221333204;
-<fputc_unfiltered,,11986,,1257346705221351949;
-<ui_file_write,,11987,,1257346705221372770;
-<stdio_file_write,,11988,,1257346705221393416;
-<ui_file_data,,11989,,1257346705221414660;
->ui_file_data,,1257346705221421692;
->stdio_file_write,,1257346705221426468;
->ui_file_write,,1257346705221430056;
->fputc_unfiltered,,1257346705221434699;
-<fputc_unfiltered,,11990,,1257346705221453498;
-<ui_file_write,,11991,,1257346705221474734;
-<stdio_file_write,,11992,,1257346705221495485;
-<ui_file_data,,11993,,1257346705221516706;
->ui_file_data,,1257346705221523773;
->stdio_file_write,,1257346705221528495;
->ui_file_write,,1257346705221532086;
->fputc_unfiltered,,1257346705221536720;
-<fputc_unfiltered,,11994,,1257346705221555943;
-<ui_file_write,,11995,,1257346705221576824;
-<stdio_file_write,,11996,,1257346705221597473;
-<ui_file_data,,11997,,1257346705221619000;
->ui_file_data,,1257346705221626053;
->stdio_file_write,,1257346705221630762;
->ui_file_write,,1257346705221634350;
->fputc_unfiltered,,1257346705221638996;
-<fputc_unfiltered,,11998,,1257346705221657703;
-<ui_file_write,,11999,,1257346705221678550;
-<stdio_file_write,,12000,,1257346705221699590;
-<ui_file_data,,12001,,1257346705221720639;
->ui_file_data,,1257346705221732283;
->stdio_file_write,,1257346705229745246;
->ui_file_write,,1257346705229749664;
->fputc_unfiltered,,1257346705229754876;
-<fputc_unfiltered,,12002,,1257346705229774893;
-<ui_file_write,,12003,,1257346705229798231;
-<stdio_file_write,,12004,,1257346705229819908;
-<ui_file_data,,12005,,1257346705229842244;
->ui_file_data,,1257346705229849444;
->stdio_file_write,,1257346705229854340;
->ui_file_write,,1257346705229857946;
->fputc_unfiltered,,1257346705229862592;
-<fputc_unfiltered,,12006,,1257346705229882144;
-<ui_file_write,,12007,,1257346705229903954;
-<stdio_file_write,,12008,,1257346705229925445;
-<ui_file_data,,12009,,1257346705229947074;
->ui_file_data,,1257346705229954109;
->stdio_file_write,,1257346705229958824;
->ui_file_write,,1257346705229962424;
->fputc_unfiltered,,1257346705229967068;
-<fputc_unfiltered,,12010,,1257346705229986405;
-<ui_file_write,,12011,,1257346705230008119;
-<stdio_file_write,,12012,,1257346705230029168;
-<ui_file_data,,12013,,1257346705230050831;
->ui_file_data,,1257346705230057853;
->stdio_file_write,,1257346705230062556;
->ui_file_write,,1257346705230066193;
->fputc_unfiltered,,1257346705230070803;
-<fputc_unfiltered,,12014,,1257346705230089681;
-<ui_file_write,,12015,,1257346705230111529;
-<stdio_file_write,,12016,,1257346705230132774;
-<ui_file_data,,12017,,1257346705230154960;
->ui_file_data,,1257346705230162144;
->stdio_file_write,,1257346705230166848;
->ui_file_write,,1257346705230170532;
->fputc_unfiltered,,1257346705230175260;
-<wrap_here,,12018,,1257346705230195172;
->wrap_here,,1257346705230202462;
-<fputc_unfiltered,,12019,,1257346705230220702;
-<ui_file_write,,12020,,1257346705230241724;
-<stdio_file_write,,12021,,1257346705230261967;
-<ui_file_data,,12022,,1257346705230283464;
->ui_file_data,,1257346705230290601;
->stdio_file_write,,1257346705230421355;
->ui_file_write,,1257346705230425502;
->fputc_unfiltered,,1257346705230430452;
->fputs_maybe_filtered,,1257346705230435321;
-<do_cleanups,,12023,,1257346705230454869;
-<do_my_cleanups,,12024,,1257346705230477873;
-<xfree,,12025,,1257346705230500128;
->xfree,,1257346705230507310;
-<xfree,,12026,,1257346705230524949;
->xfree,,1257346705230531700;
->do_my_cleanups,,1257346705230536377;
->do_cleanups,,1257346705230539889;
->vfprintf_maybe_filtered,,1257346705230544822;
->vfprintf_filtered,,1257346705230548578;
->fprintf_filtered,,1257346705230553152;
-<fprintf_filtered,,12027,,1257346705230573639;
-<vfprintf_filtered,,12028,,1257346705230597806;
-<vfprintf_maybe_filtered,,12029,,1257346705230623815;
-<xstrvprintf,,12030,,1257346705230644437;
->xstrvprintf,,1257346705230654412;
-<make_cleanup,,12031,,1257346705230671311;
-<make_my_cleanup,,12032,,1257346705230692017;
-<make_my_cleanup2,,12033,,1257346705230711932;
-<xmalloc,,12034,,1257346705230738180;
->xmalloc,,1257346705230745855;
->make_my_cleanup2,,1257346705230750562;
->make_my_cleanup,,1257346705230755188;
->make_cleanup,,1257346705230759762;
-<fputs_maybe_filtered,,12035,,1257346705230782128;
-<fputc_unfiltered,,12036,,1257346705230803153;
-<ui_file_write,,12037,,1257346705230824337;
-<stdio_file_write,,12038,,1257346705230844574;
-<ui_file_data,,12039,,1257346705230865792;
->ui_file_data,,1257346705230872868;
->stdio_file_write,,1257346705230877686;
->ui_file_write,,1257346705230881295;
->fputc_unfiltered,,1257346705230885935;
-<fputc_unfiltered,,12040,,1257346705230904575;
-<ui_file_write,,12041,,1257346705230925519;
-<stdio_file_write,,12042,,1257346705230946150;
-<ui_file_data,,12043,,1257346705230967479;
->ui_file_data,,1257346705230974564;
->stdio_file_write,,1257346705230979346;
->ui_file_write,,1257346705230982937;
->fputc_unfiltered,,1257346705230987574;
-<fputc_unfiltered,,12044,,1257346705231006257;
-<ui_file_write,,12045,,1257346705231027095;
-<stdio_file_write,,12046,,1257346705231047305;
-<ui_file_data,,12047,,1257346705231068198;
->ui_file_data,,1257346705231075247;
->stdio_file_write,,1257346705231079981;
->ui_file_write,,1257346705231083533;
->fputc_unfiltered,,1257346705231088269;
-<fputc_unfiltered,,12048,,1257346705231106470;
-<ui_file_write,,12049,,1257346705231127336;
-<stdio_file_write,,12050,,1257346705231147467;
-<ui_file_data,,12051,,1257346705231168868;
->ui_file_data,,1257346705231176095;
->stdio_file_write,,1257346705231180823;
->ui_file_write,,1257346705231184495;
->fputc_unfiltered,,1257346705231189129;
-<fputc_unfiltered,,12052,,1257346705231207565;
-<ui_file_write,,12053,,1257346705231228680;
-<stdio_file_write,,12054,,1257346705231248881;
-<ui_file_data,,12055,,1257346705231269960;
->ui_file_data,,1257346705231277030;
->stdio_file_write,,1257346705231281740;
->ui_file_write,,1257346705231285325;
->fputc_unfiltered,,1257346705231289983;
-<fputc_unfiltered,,12056,,1257346705231308166;
-<ui_file_write,,12057,,1257346705231328761;
-<stdio_file_write,,12058,,1257346705231348890;
-<ui_file_data,,12059,,1257346705231370288;
->ui_file_data,,1257346705231377334;
->stdio_file_write,,1257346705231382041;
->ui_file_write,,1257346705231385629;
->fputc_unfiltered,,1257346705231390266;
-<fputc_unfiltered,,12060,,1257346705231408885;
-<ui_file_write,,12061,,1257346705231429534;
-<stdio_file_write,,12062,,1257346705231449813;
-<ui_file_data,,12063,,1257346705231471067;
->ui_file_data,,1257346705231478128;
->stdio_file_write,,1257346705231482841;
->ui_file_write,,1257346705231486429;
->fputc_unfiltered,,1257346705231491045;
-<fputc_unfiltered,,12064,,1257346705231509724;
-<ui_file_write,,12065,,1257346705231530331;
-<stdio_file_write,,12066,,1257346705231550944;
-<ui_file_data,,12067,,1257346705231572339;
->ui_file_data,,1257346705231579433;
->stdio_file_write,,1257346705231584128;
->ui_file_write,,1257346705231587719;
->fputc_unfiltered,,1257346705231592347;
-<fputc_unfiltered,,12068,,1257346705231610560;
-<ui_file_write,,12069,,1257346705231631248;
-<stdio_file_write,,12070,,1257346705231651825;
-<ui_file_data,,12071,,1257346705231672874;
->ui_file_data,,1257346705231680020;
->stdio_file_write,,1257346705231684720;
->ui_file_write,,1257346705231688389;
->fputc_unfiltered,,1257346705231693054;
-<fputc_unfiltered,,12072,,1257346705231711294;
-<ui_file_write,,12073,,1257346705231736878;
-<stdio_file_write,,12074,,1257346705231758153;
-<ui_file_data,,12075,,1257346705231779364;
->ui_file_data,,1257346705231786453;
->stdio_file_write,,1257346705231791192;
->ui_file_write,,1257346705231794786;
->fputc_unfiltered,,1257346705231799421;
-<fputc_unfiltered,,12076,,1257346705231817636;
-<ui_file_write,,12077,,1257346705231838442;
-<stdio_file_write,,12078,,1257346705231858835;
-<ui_file_data,,12079,,1257346705231880377;
->ui_file_data,,1257346705231887439;
->stdio_file_write,,1257346705231892178;
->ui_file_write,,1257346705231895763;
->fputc_unfiltered,,1257346705231900425;
-<fputc_unfiltered,,12080,,1257346705231919243;
-<ui_file_write,,12081,,1257346705231940325;
-<stdio_file_write,,12082,,1257346705231960622;
-<ui_file_data,,12083,,1257346705231982095;
->ui_file_data,,1257346705231989171;
->stdio_file_write,,1257346705231993899;
->ui_file_write,,1257346705231997484;
->fputc_unfiltered,,1257346705232002118;
-<fputc_unfiltered,,12084,,1257346705232020656;
-<ui_file_write,,12085,,1257346705232041774;
-<stdio_file_write,,12086,,1257346705232061927;
-<ui_file_data,,12087,,1257346705232083228;
->ui_file_data,,1257346705232090284;
->stdio_file_write,,1257346705232094993;
->ui_file_write,,1257346705232098578;
->fputc_unfiltered,,1257346705232103204;
-<fputc_unfiltered,,12088,,1257346705232121510;
-<ui_file_write,,12089,,1257346705232142231;
-<stdio_file_write,,12090,,1257346705232162519;
-<ui_file_data,,12091,,1257346705232183983;
->ui_file_data,,1257346705232191054;
->stdio_file_write,,1257346705232195757;
->ui_file_write,,1257346705232199345;
->fputc_unfiltered,,1257346705232203977;
-<fputc_unfiltered,,12092,,1257346705232222304;
-<ui_file_write,,12093,,1257346705232242995;
-<stdio_file_write,,12094,,1257346705232263319;
-<ui_file_data,,12095,,1257346705232284798;
->ui_file_data,,1257346705232291833;
->stdio_file_write,,1257346705232296545;
->ui_file_write,,1257346705232300130;
->fputc_unfiltered,,1257346705232304777;
-<fputc_unfiltered,,12096,,1257346705232323101;
-<ui_file_write,,12097,,1257346705232343900;
-<stdio_file_write,,12098,,1257346705232364282;
-<ui_file_data,,12099,,1257346705232385746;
->ui_file_data,,1257346705232392744;
->stdio_file_write,,1257346705232397481;
->ui_file_write,,1257346705232401027;
->fputc_unfiltered,,1257346705232405874;
-<fputc_unfiltered,,12100,,1257346705232424364;
-<ui_file_write,,12101,,1257346705232445070;
-<stdio_file_write,,12102,,1257346705232465301;
-<ui_file_data,,12103,,1257346705232486356;
->ui_file_data,,1257346705232493454;
->stdio_file_write,,1257346705232498163;
->ui_file_write,,1257346705232501745;
->fputc_unfiltered,,1257346705232506431;
-<fputc_unfiltered,,12104,,1257346705232524713;
-<ui_file_write,,12105,,1257346705232545362;
-<stdio_file_write,,12106,,1257346705232565692;
-<ui_file_data,,12107,,1257346705232586657;
->ui_file_data,,1257346705232593691;
->stdio_file_write,,1257346705232598476;
->ui_file_write,,1257346705232603231;
->fputc_unfiltered,,1257346705232607920;
-<fputc_unfiltered,,12108,,1257346705232626211;
-<ui_file_write,,12109,,1257346705232647299;
-<stdio_file_write,,12110,,1257346705232667467;
-<ui_file_data,,12111,,1257346705232688501;
->ui_file_data,,1257346705232695535;
->stdio_file_write,,1257346705232700244;
->ui_file_write,,1257346705232703790;
->fputc_unfiltered,,1257346705232708479;
-<fputc_unfiltered,,12112,,1257346705232731939;
-<ui_file_write,,12113,,1257346705232753614;
-<stdio_file_write,,12114,,1257346705232773775;
-<ui_file_data,,12115,,1257346705232795188;
->ui_file_data,,1257346705232802319;
->stdio_file_write,,1257346705232807095;
->ui_file_write,,1257346705232810685;
->fputc_unfiltered,,1257346705232815317;
-<fputc_unfiltered,,12116,,1257346705232833912;
-<ui_file_write,,12117,,1257346705232855027;
-<stdio_file_write,,12118,,1257346705232875150;
-<ui_file_data,,12119,,1257346705232896433;
->ui_file_data,,1257346705232903471;
->stdio_file_write,,1257346705232908228;
->ui_file_write,,1257346705232911901;
->fputc_unfiltered,,1257346705232916493;
-<fputc_unfiltered,,12120,,1257346705232934763;
-<ui_file_write,,12121,,1257346705232955448;
-<stdio_file_write,,12122,,1257346705232975574;
-<ui_file_data,,12123,,1257346705232996941;
->ui_file_data,,1257346705233003964;
->stdio_file_write,,1257346705233008676;
->ui_file_write,,1257346705233012261;
->fputc_unfiltered,,1257346705233016899;
-<fputc_unfiltered,,12124,,1257346705233035527;
-<ui_file_write,,12125,,1257346705233056137;
-<stdio_file_write,,12126,,1257346705233076301;
-<ui_file_data,,12127,,1257346705233097648;
->ui_file_data,,1257346705233104746;
->stdio_file_write,,1257346705233109431;
->ui_file_write,,1257346705233113016;
->fputc_unfiltered,,1257346705233117648;
-<fputc_unfiltered,,12128,,1257346705233136285;
-<ui_file_write,,12129,,1257346705233156895;
-<stdio_file_write,,12130,,1257346705233177444;
-<ui_file_data,,12131,,1257346705233198821;
->ui_file_data,,1257346705233205871;
->stdio_file_write,,1257346705233210565;
->ui_file_write,,1257346705233214144;
->fputc_unfiltered,,1257346705233218779;
-<fputc_unfiltered,,12132,,1257346705233236982;
-<ui_file_write,,12133,,1257346705233257655;
-<stdio_file_write,,12134,,1257346705233278166;
-<ui_file_data,,12135,,1257346705233299113;
->ui_file_data,,1257346705233306174;
->stdio_file_write,,1257346705233310866;
->ui_file_write,,1257346705233314442;
->fputc_unfiltered,,1257346705233319061;
-<fputc_unfiltered,,12136,,1257346705233337410;
-<ui_file_write,,12137,,1257346705233358359;
-<stdio_file_write,,12138,,1257346705233378509;
-<ui_file_data,,12139,,1257346705233399444;
->ui_file_data,,1257346705233406484;
->stdio_file_write,,1257346705233411179;
->ui_file_write,,1257346705233414857;
->fputc_unfiltered,,1257346705233419488;
-<fputc_unfiltered,,12140,,1257346705233438173;
-<ui_file_write,,12141,,1257346705233459225;
-<stdio_file_write,,12142,,1257346705233479790;
-<ui_file_data,,12143,,1257346705233501092;
->ui_file_data,,1257346705233508156;
->stdio_file_write,,1257346705233512842;
->ui_file_write,,1257346705233516390;
->fputc_unfiltered,,1257346705233520974;
-<fputc_unfiltered,,12144,,1257346705233539139;
-<ui_file_write,,12145,,1257346705233560371;
-<stdio_file_write,,12146,,1257346705233580437;
-<ui_file_data,,12147,,1257346705233601429;
->ui_file_data,,1257346705233608463;
->stdio_file_write,,1257346705233613149;
->ui_file_write,,1257346705233616730;
->fputc_unfiltered,,1257346705233621362;
-<fputc_unfiltered,,12148,,1257346705233639825;
-<ui_file_write,,12149,,1257346705233660885;
-<stdio_file_write,,12150,,1257346705233681047;
-<ui_file_data,,12151,,1257346705233702400;
->ui_file_data,,1257346705233709543;
->stdio_file_write,,1257346705233714231;
->ui_file_write,,1257346705233717810;
->fputc_unfiltered,,1257346705233722439;
-<fputc_unfiltered,,12152,,1257346705233746882;
-<ui_file_write,,12153,,1257346705243302223;
-<stdio_file_write,,12154,,1257346705243327073;
-<ui_file_data,,12155,,1257346705243351196;
->ui_file_data,,1257346705243359030;
->stdio_file_write,,1257346705243364946;
->ui_file_write,,1257346705243368582;
->fputc_unfiltered,,1257346705243373484;
-<fputc_unfiltered,,12156,,1257346705243394599;
-<ui_file_write,,12157,,1257346705243417651;
-<stdio_file_write,,12158,,1257346705243439343;
-<ui_file_data,,12159,,1257346705243462564;
->ui_file_data,,1257346705243469652;
->stdio_file_write,,1257346705243474383;
->ui_file_write,,1257346705243477992;
->fputc_unfiltered,,1257346705243482632;
-<fputc_unfiltered,,12160,,1257346705243502406;
-<ui_file_write,,12161,,1257346705243525052;
-<stdio_file_write,,12162,,1257346705243546667;
-<ui_file_data,,12163,,1257346705243569767;
->ui_file_data,,1257346705243576882;
->stdio_file_write,,1257346705243581583;
->ui_file_write,,1257346705243585195;
->fputc_unfiltered,,1257346705243589817;
-<fputc_unfiltered,,12164,,1257346705243609200;
-<ui_file_write,,12165,,1257346705243632075;
-<stdio_file_write,,12166,,1257346705243653752;
-<ui_file_data,,12167,,1257346705243677189;
->ui_file_data,,1257346705243684308;
->stdio_file_write,,1257346705243689023;
->ui_file_write,,1257346705243692617;
->fputc_unfiltered,,1257346705243697264;
-<fputc_unfiltered,,12168,,1257346705243716701;
-<ui_file_write,,12169,,1257346705243744272;
-<stdio_file_write,,12170,,1257346705243766756;
-<ui_file_data,,12171,,1257346705243789681;
->ui_file_data,,1257346705243796887;
->stdio_file_write,,1257346705243801690;
->ui_file_write,,1257346705243805290;
->fputc_unfiltered,,1257346705243809993;
-<fputc_unfiltered,,12172,,1257346705243829337;
-<ui_file_write,,12173,,1257346705243852371;
-<stdio_file_write,,12174,,1257346705243874326;
-<ui_file_data,,12175,,1257346705243897263;
->ui_file_data,,1257346705243904361;
->stdio_file_write,,1257346705243909109;
->ui_file_write,,1257346705243912709;
->fputc_unfiltered,,1257346705243917353;
-<fputc_unfiltered,,12176,,1257346705243937298;
-<ui_file_write,,12177,,1257346705243960178;
-<stdio_file_write,,12178,,1257346705243981402;
-<ui_file_data,,12179,,1257346705244003828;
->ui_file_data,,1257346705244010875;
->stdio_file_write,,1257346705244015611;
->ui_file_write,,1257346705244019296;
->fputc_unfiltered,,1257346705244023942;
-<fputc_unfiltered,,12180,,1257346705244043568;
-<ui_file_write,,12181,,1257346705244066124;
-<stdio_file_write,,12182,,1257346705244087453;
-<ui_file_data,,12183,,1257346705244110499;
->ui_file_data,,1257346705244117572;
->stdio_file_write,,1257346705244122381;
->ui_file_write,,1257346705244125984;
->fputc_unfiltered,,1257346705244130639;
-<fputc_unfiltered,,12184,,1257346705244150152;
-<ui_file_write,,12185,,1257346705244172945;
-<stdio_file_write,,12186,,1257346705244194725;
-<ui_file_data,,12187,,1257346705244217690;
->ui_file_data,,1257346705244224814;
->stdio_file_write,,1257346705244229629;
->ui_file_write,,1257346705244233220;
->fputc_unfiltered,,1257346705244237882;
-<fputc_unfiltered,,12188,,1257346705244257577;
-<ui_file_write,,12189,,1257346705244279880;
-<stdio_file_write,,12190,,1257346705244301795;
-<ui_file_data,,12191,,1257346705244324534;
->ui_file_data,,1257346705244331587;
->stdio_file_write,,1257346705244336336;
->ui_file_write,,1257346705244339908;
->fputc_unfiltered,,1257346705244344612;
-<fputc_unfiltered,,12192,,1257346705244364133;
-<ui_file_write,,12193,,1257346705244386487;
-<stdio_file_write,,12194,,1257346705244408375;
-<ui_file_data,,12195,,1257346705244431169;
->ui_file_data,,1257346705244438218;
->stdio_file_write,,1257346705244442940;
->ui_file_write,,1257346705244446543;
->fputc_unfiltered,,1257346705244451156;
-<fputc_unfiltered,,12196,,1257346705244470725;
-<ui_file_write,,12197,,1257346705244492779;
-<stdio_file_write,,12198,,1257346705244514243;
-<ui_file_data,,12199,,1257346705244536781;
->ui_file_data,,1257346705244544029;
->stdio_file_write,,1257346705244548759;
->ui_file_write,,1257346705244552362;
->fputc_unfiltered,,1257346705244557009;
-<fputc_unfiltered,,12200,,1257346705244576500;
-<ui_file_write,,12201,,1257346705244598559;
-<stdio_file_write,,12202,,1257346705244619933;
-<ui_file_data,,12203,,1257346705244642621;
->ui_file_data,,1257346705244649716;
->stdio_file_write,,1257346705244654407;
->ui_file_write,,1257346705244657968;
->fputc_unfiltered,,1257346705244662569;
-<fputc_unfiltered,,12204,,1257346705244682003;
-<ui_file_write,,12205,,1257346705244704126;
-<stdio_file_write,,12206,,1257346705244730345;
-<ui_file_data,,12207,,1257346705244753740;
->ui_file_data,,1257346705244760979;
->stdio_file_write,,1257346705244765752;
->ui_file_write,,1257346705244769364;
->fputc_unfiltered,,1257346705244774025;
-<fputc_unfiltered,,12208,,1257346705244793336;
-<ui_file_write,,12209,,1257346705244815837;
-<stdio_file_write,,12210,,1257346705244837545;
-<ui_file_data,,12211,,1257346705244860086;
->ui_file_data,,1257346705244867183;
->stdio_file_write,,1257346705244871917;
->ui_file_write,,1257346705244875514;
->fputc_unfiltered,,1257346705244880172;
-<fputc_unfiltered,,12212,,1257346705244899769;
-<ui_file_write,,12213,,1257346705244922084;
-<stdio_file_write,,12214,,1257346705244943226;
-<ui_file_data,,12215,,1257346705244965794;
->ui_file_data,,1257346705244972888;
->stdio_file_write,,1257346705244977628;
->ui_file_write,,1257346705244981222;
->fputc_unfiltered,,1257346705244985835;
-<fputc_unfiltered,,12216,,1257346705245004860;
-<ui_file_write,,12217,,1257346705245027359;
-<stdio_file_write,,12218,,1257346705245048396;
-<ui_file_data,,12219,,1257346705245071294;
->ui_file_data,,1257346705245078467;
->stdio_file_write,,1257346705245083210;
->ui_file_write,,1257346705245086810;
->fputc_unfiltered,,1257346705245091465;
-<fputc_unfiltered,,12220,,1257346705245111299;
-<ui_file_write,,12221,,1257346705245134092;
-<stdio_file_write,,12222,,1257346705245155304;
-<ui_file_data,,12223,,1257346705245178166;
->ui_file_data,,1257346705245185285;
->stdio_file_write,,1257346705245190010;
->ui_file_write,,1257346705245193621;
->fputc_unfiltered,,1257346705245198277;
-<fputc_unfiltered,,12224,,1257346705245217504;
-<ui_file_write,,12225,,1257346705245239990;
-<stdio_file_write,,12226,,1257346705245261535;
-<ui_file_data,,12227,,1257346705245284265;
->ui_file_data,,1257346705245291342;
->stdio_file_write,,1257346705245296079;
->ui_file_write,,1257346705245299687;
->fputc_unfiltered,,1257346705245304334;
-<fputc_unfiltered,,12228,,1257346705245323942;
-<ui_file_write,,12229,,1257346705245345855;
-<stdio_file_write,,12230,,1257346705245366897;
-<ui_file_data,,12231,,1257346705245389432;
->ui_file_data,,1257346705245396509;
->stdio_file_write,,1257346705245401282;
->ui_file_write,,1257346705245404872;
->fputc_unfiltered,,1257346705245409531;
-<fputc_unfiltered,,12232,,1257346705245429019;
-<ui_file_write,,12233,,1257346705245451277;
-<stdio_file_write,,12234,,1257346705245472311;
-<ui_file_data,,12235,,1257346705245495188;
->ui_file_data,,1257346705245502268;
->stdio_file_write,,1257346705245506981;
->ui_file_write,,1257346705245510580;
->fputc_unfiltered,,1257346705245515242;
-<fputc_unfiltered,,12236,,1257346705245534910;
-<ui_file_write,,12237,,1257346705245557229;
-<stdio_file_write,,12238,,1257346705245578530;
-<ui_file_data,,12239,,1257346705245600957;
->ui_file_data,,1257346705245608006;
->stdio_file_write,,1257346705245612707;
->ui_file_write,,1257346705245616271;
->fputc_unfiltered,,1257346705245620965;
-<fputc_unfiltered,,12240,,1257346705245640534;
-<ui_file_write,,12241,,1257346705245662826;
-<stdio_file_write,,12242,,1257346705245684437;
-<ui_file_data,,12243,,1257346705245706713;
->ui_file_data,,1257346705245713792;
->stdio_file_write,,1257346705245718520;
->ui_file_write,,1257346705245722123;
->fputc_unfiltered,,1257346705245731300;
-<fputc_unfiltered,,12244,,1257346705245751149;
-<ui_file_write,,12245,,1257346705245774023;
-<stdio_file_write,,12246,,1257346705245795075;
-<ui_file_data,,12247,,1257346705245817439;
->ui_file_data,,1257346705245824606;
->stdio_file_write,,1257346705245829559;
->ui_file_write,,1257346705245833243;
->fputc_unfiltered,,1257346705245837895;
-<fputc_unfiltered,,12248,,1257346705245857101;
-<ui_file_write,,12249,,1257346705245879530;
-<stdio_file_write,,12250,,1257346705245901220;
-<ui_file_data,,12251,,1257346705245923450;
->ui_file_data,,1257346705245930539;
->stdio_file_write,,1257346705245935279;
->ui_file_write,,1257346705245938882;
->fputc_unfiltered,,1257346705245943531;
-<fputc_unfiltered,,12252,,1257346705245963110;
-<ui_file_write,,12253,,1257346705245985217;
-<stdio_file_write,,12254,,1257346705246006191;
-<ui_file_data,,12255,,1257346705246028654;
->ui_file_data,,1257346705246035649;
->stdio_file_write,,1257346705246040467;
->ui_file_write,,1257346705246044066;
->fputc_unfiltered,,1257346705246048725;
-<fputc_unfiltered,,12256,,1257346705246067729;
-<ui_file_write,,12257,,1257346705246089773;
-<stdio_file_write,,12258,,1257346705246110885;
-<ui_file_data,,12259,,1257346705246133679;
->ui_file_data,,1257346705246140764;
->stdio_file_write,,1257346705246145483;
->ui_file_write,,1257346705246149083;
->fputc_unfiltered,,1257346705246153757;
-<fputc_unfiltered,,12260,,1257346705246172896;
-<ui_file_write,,12261,,1257346705246194874;
-<stdio_file_write,,12262,,1257346705246216606;
-<ui_file_data,,12263,,1257346705246238755;
->ui_file_data,,1257346705246245889;
->stdio_file_write,,1257346705246250650;
->ui_file_write,,1257346705246254250;
->fputc_unfiltered,,1257346705246258983;
-<fputc_unfiltered,,12264,,1257346705246278026;
-<ui_file_write,,12265,,1257346705246300546;
-<stdio_file_write,,12266,,1257346705246322004;
-<ui_file_data,,12267,,1257346705246344478;
->ui_file_data,,1257346705246351594;
->stdio_file_write,,1257346705246356421;
->ui_file_write,,1257346705246360114;
->fputc_unfiltered,,1257346705246364764;
-<fputc_unfiltered,,12268,,1257346705246384501;
-<ui_file_write,,12269,,1257346705246406582;
-<stdio_file_write,,12270,,1257346705246427965;
-<ui_file_data,,12271,,1257346705246450617;
->ui_file_data,,1257346705246457636;
->stdio_file_write,,1257346705246462334;
->ui_file_write,,1257346705246465922;
->fputc_unfiltered,,1257346705246470559;
-<fputc_unfiltered,,12272,,1257346705246490387;
-<ui_file_write,,12273,,1257346705246512684;
-<stdio_file_write,,12274,,1257346705246534467;
-<ui_file_data,,12275,,1257346705246556653;
->ui_file_data,,1257346705246563747;
->stdio_file_write,,1257346705246568466;
->ui_file_write,,1257346705246572078;
->fputc_unfiltered,,1257346705246576811;
-<fputc_unfiltered,,12276,,1257346705246596197;
-<ui_file_write,,12277,,1257346705246618203;
-<stdio_file_write,,12278,,1257346705246639210;
-<ui_file_data,,12279,,1257346705246661543;
->ui_file_data,,1257346705246668589;
->stdio_file_write,,1257346705246673329;
->ui_file_write,,1257346705246676932;
->fputc_unfiltered,,1257346705246681578;
-<fputc_unfiltered,,12280,,1257346705246701075;
-<ui_file_write,,12281,,1257346705246723402;
-<stdio_file_write,,12282,,1257346705246749395;
-<ui_file_data,,12283,,1257346705246772402;
->ui_file_data,,1257346705246779535;
->stdio_file_write,,1257346705246784305;
->ui_file_write,,1257346705246787914;
->fputc_unfiltered,,1257346705246792597;
-<fputc_unfiltered,,12284,,1257346705246811796;
-<ui_file_write,,12285,,1257346705246833579;
-<stdio_file_write,,12286,,1257346705246855109;
-<ui_file_data,,12287,,1257346705246877788;
->ui_file_data,,1257346705246884883;
->stdio_file_write,,1257346705246889628;
->ui_file_write,,1257346705246893231;
->fputc_unfiltered,,1257346705246897839;
-<fputc_unfiltered,,12288,,1257346705246916758;
-<ui_file_write,,12289,,1257346705246939332;
-<stdio_file_write,,12290,,1257346705246960943;
-<ui_file_data,,12291,,1257346705246983355;
->ui_file_data,,1257346705246990425;
->stdio_file_write,,1257346705246995195;
->ui_file_write,,1257346705246998801;
->fputc_unfiltered,,1257346705247003454;
-<fputc_unfiltered,,12292,,1257346705247022966;
-<ui_file_write,,12293,,1257346705247045182;
-<stdio_file_write,,12294,,1257346705247066706;
-<ui_file_data,,12295,,1257346705247089138;
->ui_file_data,,1257346705247096296;
->stdio_file_write,,1257346705247101047;
->ui_file_write,,1257346705247104648;
->fputc_unfiltered,,1257346705247109510;
-<fputc_unfiltered,,12296,,1257346705247129041;
-<ui_file_write,,12297,,1257346705247150908;
-<stdio_file_write,,12298,,1257346705247172170;
-<ui_file_data,,12299,,1257346705247194434;
->ui_file_data,,1257346705247201523;
->stdio_file_write,,1257346705247206265;
->ui_file_write,,1257346705247209862;
->fputc_unfiltered,,1257346705247214515;
-<fputc_unfiltered,,12300,,1257346705247233579;
-<ui_file_write,,12301,,1257346705247255855;
-<stdio_file_write,,12302,,1257346705247277223;
-<ui_file_data,,12303,,1257346705247299766;
->ui_file_data,,1257346705247306942;
->stdio_file_write,,1257346705247311682;
->ui_file_write,,1257346705247315276;
->fputc_unfiltered,,1257346705247319925;
-<fputc_unfiltered,,12304,,1257346705247339458;
-<ui_file_write,,12305,,1257346705247361398;
-<stdio_file_write,,12306,,1257346705247382759;
-<ui_file_data,,12307,,1257346705247405111;
->ui_file_data,,1257346705247412166;
->stdio_file_write,,1257346705247416930;
->ui_file_write,,1257346705247420533;
->fputc_unfiltered,,1257346705247425173;
-<fputc_unfiltered,,12308,,1257346705247444325;
-<ui_file_write,,12309,,1257346705247466227;
-<stdio_file_write,,12310,,1257346705247487562;
-<ui_file_data,,12311,,1257346705247510055;
->ui_file_data,,1257346705247517098;
->stdio_file_write,,1257346705247521799;
->ui_file_write,,1257346705247525408;
->fputc_unfiltered,,1257346705247530036;
-<fputc_unfiltered,,12312,,1257346705247548926;
-<ui_file_write,,12313,,1257346705247570970;
-<stdio_file_write,,12314,,1257346705247592567;
-<ui_file_data,,12315,,1257346705247614668;
->ui_file_data,,1257346705247621709;
->stdio_file_write,,1257346705247626445;
->ui_file_write,,1257346705247630036;
->fputc_unfiltered,,1257346705247634686;
-<fputc_unfiltered,,12316,,1257346705247653593;
-<ui_file_write,,12317,,1257346705247675656;
-<stdio_file_write,,12318,,1257346705247697135;
-<ui_file_data,,12319,,1257346705247719817;
->ui_file_data,,1257346705247731287;
->stdio_file_write,,1257346705247736361;
->ui_file_write,,1257346705247739964;
->fputc_unfiltered,,1257346705247744601;
-<fputc_unfiltered,,12320,,1257346705247764357;
-<ui_file_write,,12321,,1257346705247786660;
-<stdio_file_write,,12322,,1257346705247808214;
-<ui_file_data,,12323,,1257346705247830277;
->ui_file_data,,1257346705247837356;
->stdio_file_write,,1257346705247842105;
->ui_file_write,,1257346705247845699;
->fputc_unfiltered,,1257346705247850348;
-<fputc_unfiltered,,12324,,1257346705247869214;
-<ui_file_write,,12325,,1257346705247891042;
-<stdio_file_write,,12326,,1257346705247911997;
-<ui_file_data,,12327,,1257346705247934824;
->ui_file_data,,1257346705247941864;
->stdio_file_write,,1257346705247946595;
->ui_file_write,,1257346705247950192;
->fputc_unfiltered,,1257346705247954838;
-<fputc_unfiltered,,12328,,1257346705247974149;
-<ui_file_write,,12329,,1257346705247995874;
-<stdio_file_write,,12330,,1257346705248017137;
-<ui_file_data,,12331,,1257346705248039509;
->ui_file_data,,1257346705248046508;
->stdio_file_write,,1257346705248051386;
->ui_file_write,,1257346705248054976;
->fputc_unfiltered,,1257346705248059701;
-<fputc_unfiltered,,12332,,1257346705248078792;
-<ui_file_write,,12333,,1257346705248100837;
-<stdio_file_write,,12334,,1257346705248122295;
-<ui_file_data,,12335,,1257346705248144315;
->ui_file_data,,1257346705248151356;
->stdio_file_write,,1257346705248156128;
->ui_file_write,,1257346705248159725;
->fputc_unfiltered,,1257346705248164432;
-<fputc_unfiltered,,12336,,1257346705248183842;
-<ui_file_write,,12337,,1257346705248205769;
-<stdio_file_write,,12338,,1257346705248226998;
-<ui_file_data,,12339,,1257346705248249088;
->ui_file_data,,1257346705248256065;
->stdio_file_write,,1257346705248260862;
->ui_file_write,,1257346705248264456;
->fputc_unfiltered,,1257346705248269090;
-<fputc_unfiltered,,12340,,1257346705248288058;
-<ui_file_write,,12341,,1257346705248310527;
-<stdio_file_write,,12342,,1257346705248331431;
-<ui_file_data,,12343,,1257346705248353629;
->ui_file_data,,1257346705248360706;
->stdio_file_write,,1257346705248365415;
->ui_file_write,,1257346705248369105;
->fputc_unfiltered,,1257346705248373749;
-<wrap_here,,12344,,1257346705248394308;
->wrap_here,,1257346705248401832;
-<fputc_unfiltered,,12345,,1257346705248420785;
-<ui_file_write,,12346,,1257346705248442775;
-<stdio_file_write,,12347,,1257346705248463493;
-<ui_file_data,,12348,,1257346705248485688;
->ui_file_data,,1257346705248492750;
->stdio_file_write,,1257346705248692909;
->ui_file_write,,1257346705248697029;
->fputc_unfiltered,,1257346705248702037;
-<fputc_unfiltered,,12349,,1257346705248721194;
-<ui_file_write,,12350,,1257346705248750381;
-<stdio_file_write,,12351,,1257346705248772353;
-<ui_file_data,,12352,,1257346705248794557;
->ui_file_data,,1257346705248801697;
->stdio_file_write,,1257346705248806662;
->ui_file_write,,1257346705248810262;
->fputc_unfiltered,,1257346705248814881;
-<fputc_unfiltered,,12353,,1257346705248833687;
-<ui_file_write,,12354,,1257346705248855800;
-<stdio_file_write,,12355,,1257346705248876723;
-<ui_file_data,,12356,,1257346705248899459;
->ui_file_data,,1257346705248906530;
->stdio_file_write,,1257346705248911251;
->ui_file_write,,1257346705248914857;
->fputc_unfiltered,,1257346705248919450;
-<fputc_unfiltered,,12357,,1257346705248937942;
-<ui_file_write,,12358,,1257346705248959767;
-<stdio_file_write,,12359,,1257346705248980509;
-<ui_file_data,,12360,,1257346705249003291;
->ui_file_data,,1257346705249010382;
->stdio_file_write,,1257346705249015098;
->ui_file_write,,1257346705249018686;
->fputc_unfiltered,,1257346705249023293;
-<fputc_unfiltered,,12361,,1257346705249042273;
-<ui_file_write,,12362,,1257346705249063941;
-<stdio_file_write,,12363,,1257346705249085267;
-<ui_file_data,,12364,,1257346705249107588;
->ui_file_data,,1257346705249114695;
->stdio_file_write,,1257346705249119404;
->ui_file_write,,1257346705249123007;
->fputc_unfiltered,,1257346705249127636;
-<fputc_unfiltered,,12365,,1257346705249146222;
-<ui_file_write,,12366,,1257346705249168377;
-<stdio_file_write,,12367,,1257346705249189240;
-<ui_file_data,,12368,,1257346705249211736;
->ui_file_data,,1257346705249218833;
->stdio_file_write,,1257346705249223534;
->ui_file_write,,1257346705249227140;
->fputc_unfiltered,,1257346705249231780;
-<fputc_unfiltered,,12369,,1257346705249250537;
-<ui_file_write,,12370,,1257346705249272594;
-<stdio_file_write,,12371,,1257346705249293526;
-<ui_file_data,,12372,,1257346705249315567;
->ui_file_data,,1257346705249322628;
->stdio_file_write,,1257346705249327452;
->ui_file_write,,1257346705249331046;
->fputc_unfiltered,,1257346705249335693;
-<fputc_unfiltered,,12373,,1257346705249354645;
-<ui_file_write,,12374,,1257346705249376597;
-<stdio_file_write,,12375,,1257346705249397829;
-<ui_file_data,,12376,,1257346705249420210;
->ui_file_data,,1257346705249427317;
->stdio_file_write,,1257346705249432006;
->ui_file_write,,1257346705249435593;
->fputc_unfiltered,,1257346705249440255;
-<fputc_unfiltered,,12377,,1257346705249459021;
-<ui_file_write,,12378,,1257346705249481240;
-<stdio_file_write,,12379,,1257346705249502013;
-<ui_file_data,,12380,,1257346705249524424;
->ui_file_data,,1257346705249531515;
->stdio_file_write,,1257346705249536243;
->ui_file_write,,1257346705249539801;
->fputc_unfiltered,,1257346705249544393;
-<fputc_unfiltered,,12381,,1257346705249563535;
-<ui_file_write,,12382,,1257346705249585246;
-<stdio_file_write,,12383,,1257346705249607345;
-<ui_file_data,,12384,,1257346705249632535;
->ui_file_data,,1257346705249639882;
->stdio_file_write,,1257346705249644664;
->ui_file_write,,1257346705249648264;
->fputc_unfiltered,,1257346705249652892;
-<fputc_unfiltered,,12385,,1257346705249673538;
-<ui_file_write,,12386,,1257346705249699200;
-<stdio_file_write,,12387,,1257346705249721040;
-<ui_file_data,,12388,,1257346705249750969;
->ui_file_data,,1257346705249758809;
->stdio_file_write,,1257346705249763585;
->ui_file_write,,1257346705249767191;
->fputc_unfiltered,,1257346705249771822;
-<fputc_unfiltered,,12389,,1257346705249791331;
-<ui_file_write,,12390,,1257346705249814440;
-<stdio_file_write,,12391,,1257346705249835998;
-<ui_file_data,,12392,,1257346705249859224;
->ui_file_data,,1257346705249866331;
->stdio_file_write,,1257346705249871034;
->ui_file_write,,1257346705249874709;
->fputc_unfiltered,,1257346705249879326;
-<fputc_unfiltered,,12393,,1257346705249898585;
-<ui_file_write,,12394,,1257346705249920476;
-<stdio_file_write,,12395,,1257346705249942891;
-<ui_file_data,,12396,,1257346705249965852;
->ui_file_data,,1257346705249972914;
->stdio_file_write,,1257346705249977596;
->ui_file_write,,1257346705249981190;
->fputc_unfiltered,,1257346705249985819;
-<fputc_unfiltered,,12397,,1257346705250007653;
-<ui_file_write,,12398,,1257346705250031228;
-<stdio_file_write,,12399,,1257346705250054445;
-<ui_file_data,,12400,,1257346705250078417;
->ui_file_data,,1257346705250085419;
->stdio_file_write,,1257346705250090224;
->ui_file_write,,1257346705250093827;
->fputc_unfiltered,,1257346705250098456;
-<fputc_unfiltered,,12401,,1257346705250118455;
-<ui_file_write,,12402,,1257346705250140996;
-<stdio_file_write,,12403,,1257346705250162328;
-<ui_file_data,,12404,,1257346705250185262;
->ui_file_data,,1257346705250192354;
->stdio_file_write,,1257346705250197145;
->ui_file_write,,1257346705250200735;
->fputc_unfiltered,,1257346705250205370;
-<fputc_unfiltered,,12405,,1257346705250226524;
-<ui_file_write,,12406,,1257346705250250554;
-<stdio_file_write,,12407,,1257346705250274306;
-<ui_file_data,,12408,,1257346705250297671;
->ui_file_data,,1257346705250304790;
->stdio_file_write,,1257346705250309484;
->ui_file_write,,1257346705250313075;
->fputc_unfiltered,,1257346705250317716;
-<fputc_unfiltered,,12409,,1257346705250336942;
-<ui_file_write,,12410,,1257346705250359149;
-<stdio_file_write,,12411,,1257346705250380384;
-<ui_file_data,,12412,,1257346705250402678;
->ui_file_data,,1257346705250409752;
->stdio_file_write,,1257346705250414537;
->ui_file_write,,1257346705250418215;
->fputc_unfiltered,,1257346705250422828;
-<fputc_unfiltered,,12413,,1257346705250441760;
-<ui_file_write,,12414,,1257346705250463991;
-<stdio_file_write,,12415,,1257346705250485094;
-<ui_file_data,,12416,,1257346705250507638;
->ui_file_data,,1257346705250514883;
->stdio_file_write,,1257346705250519580;
->ui_file_write,,1257346705250523174;
->fputc_unfiltered,,1257346705250527821;
-<fputc_unfiltered,,12417,,1257346705250546902;
-<ui_file_write,,12418,,1257346705250569070;
-<stdio_file_write,,12419,,1257346705250590014;
-<ui_file_data,,12420,,1257346705250612218;
->ui_file_data,,1257346705250619279;
->stdio_file_write,,1257346705250623971;
->ui_file_write,,1257346705250627568;
->fputc_unfiltered,,1257346705250632208;
-<fputc_unfiltered,,12421,,1257346705250651137;
-<ui_file_write,,12422,,1257346705250672974;
-<stdio_file_write,,12423,,1257346705250694191;
-<ui_file_data,,12424,,1257346705250716257;
->ui_file_data,,1257346705250723382;
->stdio_file_write,,1257346705250732832;
->ui_file_write,,1257346705250736507;
->fputc_unfiltered,,1257346705250741313;
-<fputc_unfiltered,,12425,,1257346705250760001;
-<ui_file_write,,12426,,1257346705250781793;
-<stdio_file_write,,12427,,1257346705250802944;
-<ui_file_data,,12428,,1257346705250825395;
->ui_file_data,,1257346705250832480;
->stdio_file_write,,1257346705250837352;
->ui_file_write,,1257346705250840946;
->fputc_unfiltered,,1257346705250845562;
-<fputc_unfiltered,,12429,,1257346705250864311;
-<ui_file_write,,12430,,1257346705250886054;
-<stdio_file_write,,12431,,1257346705250907001;
-<ui_file_data,,12432,,1257346705250929425;
->ui_file_data,,1257346705250936576;
->stdio_file_write,,1257346705250941349;
->ui_file_write,,1257346705250944901;
->fputc_unfiltered,,1257346705250949526;
-<fputc_unfiltered,,12433,,1257346705250968557;
-<ui_file_write,,12434,,1257346705250990346;
-<stdio_file_write,,12435,,1257346705251011097;
-<ui_file_data,,12436,,1257346705251033430;
->ui_file_data,,1257346705251040537;
->stdio_file_write,,1257346705251045328;
->ui_file_write,,1257346705251048919;
->fputc_unfiltered,,1257346705251053568;
-<fputc_unfiltered,,12437,,1257346705251072067;
-<ui_file_write,,12438,,1257346705251093958;
-<stdio_file_write,,12439,,1257346705251114884;
-<ui_file_data,,12440,,1257346705251136877;
->ui_file_data,,1257346705251144029;
->stdio_file_write,,1257346705251148720;
->ui_file_write,,1257346705251152302;
->fputc_unfiltered,,1257346705251156946;
-<fputc_unfiltered,,12441,,1257346705251175420;
-<ui_file_write,,12442,,1257346705251197308;
-<stdio_file_write,,12443,,1257346705251218156;
-<ui_file_data,,12444,,1257346705251240522;
->ui_file_data,,1257346705251247629;
->stdio_file_write,,1257346705251252407;
->ui_file_write,,1257346705251255995;
->fputc_unfiltered,,1257346705251260645;
-<fputc_unfiltered,,12445,,1257346705251279402;
-<ui_file_write,,12446,,1257346705251300986;
-<stdio_file_write,,12447,,1257346705251321957;
-<ui_file_data,,12448,,1257346705251344516;
->ui_file_data,,1257346705251351589;
->stdio_file_write,,1257346705251356320;
->ui_file_write,,1257346705251359902;
->fputc_unfiltered,,1257346705251364488;
-<fputc_unfiltered,,12449,,1257346705251383510;
-<ui_file_write,,12450,,1257346705251405278;
-<stdio_file_write,,12451,,1257346705251426062;
-<ui_file_data,,12452,,1257346705251448095;
->ui_file_data,,1257346705251455174;
->stdio_file_write,,1257346705251459872;
->ui_file_write,,1257346705251463454;
->fputc_unfiltered,,1257346705251468052;
-<fputc_unfiltered,,12453,,1257346705251486439;
-<ui_file_write,,12454,,1257346705251508872;
-<stdio_file_write,,12455,,1257346705251530213;
-<ui_file_data,,12456,,1257346705251552501;
->ui_file_data,,1257346705251559643;
->stdio_file_write,,1257346705251564350;
->ui_file_write,,1257346705251567932;
->fputc_unfiltered,,1257346705251572587;
-<fputc_unfiltered,,12457,,1257346705251591089;
-<ui_file_write,,12458,,1257346705251612833;
-<stdio_file_write,,12459,,1257346705251633837;
-<ui_file_data,,12460,,1257346705251656269;
->ui_file_data,,1257346705251663421;
->stdio_file_write,,1257346705251668130;
->ui_file_write,,1257346705251671715;
->fputc_unfiltered,,1257346705251676352;
-<fputc_unfiltered,,12461,,1257346705251695134;
-<ui_file_write,,12462,,1257346705251716697;
-<stdio_file_write,,12463,,1257346705251742554;
-<ui_file_data,,12464,,1257346705251765215;
->ui_file_data,,1257346705251772430;
->stdio_file_write,,1257346705251777176;
->ui_file_write,,1257346705251780769;
->fputc_unfiltered,,1257346705251785386;
-<fputc_unfiltered,,12465,,1257346705251803788;
-<ui_file_write,,12466,,1257346705251825758;
-<stdio_file_write,,12467,,1257346705251846617;
-<ui_file_data,,12468,,1257346705251868692;
->ui_file_data,,1257346705251875762;
->stdio_file_write,,1257346705251880478;
->ui_file_write,,1257346705251884069;
->fputc_unfiltered,,1257346705251888682;
-<fputc_unfiltered,,12469,,1257346705251907361;
-<ui_file_write,,12470,,1257346705251929216;
-<stdio_file_write,,12471,,1257346705251949946;
-<ui_file_data,,12472,,1257346705251972313;
->ui_file_data,,1257346705251979395;
->stdio_file_write,,1257346705251984198;
->ui_file_write,,1257346705251987888;
->fputc_unfiltered,,1257346705251992586;
-<fputc_unfiltered,,12473,,1257346705252011295;
-<ui_file_write,,12474,,1257346705252032970;
-<stdio_file_write,,12475,,1257346705252053847;
-<ui_file_data,,12476,,1257346705252076054;
->ui_file_data,,1257346705252083163;
->stdio_file_write,,1257346705252087948;
->ui_file_write,,1257346705252091539;
->fputc_unfiltered,,1257346705252096201;
-<fputc_unfiltered,,12477,,1257346705252114949;
-<ui_file_write,,12478,,1257346705252136711;
-<stdio_file_write,,12479,,1257346705252157438;
-<ui_file_data,,12480,,1257346705252180135;
->ui_file_data,,1257346705252187229;
->stdio_file_write,,1257346705252191981;
->ui_file_write,,1257346705252195533;
->fputc_unfiltered,,1257346705252200327;
-<fputc_unfiltered,,12481,,1257346705252219307;
-<ui_file_write,,12482,,1257346705252240921;
-<stdio_file_write,,12483,,1257346705252261874;
-<ui_file_data,,12484,,1257346705252283972;
->ui_file_data,,1257346705252291103;
->stdio_file_write,,1257346705252295900;
->ui_file_write,,1257346705252299491;
->fputc_unfiltered,,1257346705252304122;
-<fputc_unfiltered,,12485,,1257346705252322636;
-<ui_file_write,,12486,,1257346705252344843;
-<stdio_file_write,,12487,,1257346705252365804;
-<ui_file_data,,12488,,1257346705252387774;
->ui_file_data,,1257346705252394856;
->stdio_file_write,,1257346705252399596;
->ui_file_write,,1257346705252403166;
->fputc_unfiltered,,1257346705252407800;
-<fputc_unfiltered,,12489,,1257346705252426149;
-<ui_file_write,,12490,,1257346705252448473;
-<stdio_file_write,,12491,,1257346705252469317;
-<ui_file_data,,12492,,1257346705252491353;
->ui_file_data,,1257346705252498426;
->stdio_file_write,,1257346705252503193;
->ui_file_write,,1257346705252506958;
->fputc_unfiltered,,1257346705252511668;
-<fputc_unfiltered,,12493,,1257346705252530242;
-<ui_file_write,,12494,,1257346705252552611;
-<stdio_file_write,,12495,,1257346705252573332;
-<ui_file_data,,12496,,1257346705252595662;
->ui_file_data,,1257346705252602718;
->stdio_file_write,,1257346705252607412;
->ui_file_write,,1257346705252611000;
->fputc_unfiltered,,1257346705252615650;
-<fputc_unfiltered,,12497,,1257346705252634666;
-<ui_file_write,,12498,,1257346705252656400;
-<stdio_file_write,,12499,,1257346705252677149;
-<ui_file_data,,12500,,1257346705252699031;
->ui_file_data,,1257346705252706107;
->stdio_file_write,,1257346705252710820;
->ui_file_write,,1257346705252714417;
->fputc_unfiltered,,1257346705252719060;
-<fputc_unfiltered,,12501,,1257346705252742733;
-<ui_file_write,,12502,,1257346705252765223;
-<stdio_file_write,,12503,,1257346705252786115;
-<ui_file_data,,12504,,1257346705252808818;
->ui_file_data,,1257346705252815928;
->stdio_file_write,,1257346705252820680;
->ui_file_write,,1257346705252824246;
->fputc_unfiltered,,1257346705252828893;
-<fputc_unfiltered,,12505,,1257346705252847398;
-<ui_file_write,,12506,,1257346705252869163;
-<stdio_file_write,,12507,,1257346705252890215;
-<ui_file_data,,12508,,1257346705252912848;
->ui_file_data,,1257346705252920015;
->stdio_file_write,,1257346705252924728;
->ui_file_write,,1257346705252928379;
->fputc_unfiltered,,1257346705252933109;
-<fputc_unfiltered,,12509,,1257346705252952023;
-<ui_file_write,,12510,,1257346705252973701;
-<stdio_file_write,,12511,,1257346705252995060;
-<ui_file_data,,12512,,1257346705253016912;
->ui_file_data,,1257346705253024012;
->stdio_file_write,,1257346705253028797;
->ui_file_write,,1257346705253032348;
->fputc_unfiltered,,1257346705253037127;
-<fputc_unfiltered,,12513,,1257346705253055804;
-<ui_file_write,,12514,,1257346705253078028;
-<stdio_file_write,,12515,,1257346705253098855;
-<ui_file_data,,12516,,1257346705253121236;
->ui_file_data,,1257346705253128283;
->stdio_file_write,,1257346705253132944;
->ui_file_write,,1257346705253136493;
->fputc_unfiltered,,1257346705253141133;
-<fputc_unfiltered,,12517,,1257346705253159993;
-<ui_file_write,,12518,,1257346705253181721;
-<stdio_file_write,,12519,,1257346705253202894;
-<ui_file_data,,12520,,1257346705253225020;
->ui_file_data,,1257346705253232102;
->stdio_file_write,,1257346705253236775;
->ui_file_write,,1257346705253240327;
->fputc_unfiltered,,1257346705253244944;
-<fputc_unfiltered,,12521,,1257346705253263821;
-<ui_file_write,,12522,,1257346705253285953;
-<stdio_file_write,,12523,,1257346705253307119;
-<ui_file_data,,12524,,1257346705253329119;
->ui_file_data,,1257346705253336339;
->stdio_file_write,,1257346705253341166;
->ui_file_write,,1257346705253344721;
->fputc_unfiltered,,1257346705253349434;
-<fputc_unfiltered,,12525,,1257346705253368561;
-<ui_file_write,,12526,,1257346705253390641;
-<stdio_file_write,,12527,,1257346705253411357;
-<ui_file_data,,12528,,1257346705253433879;
->ui_file_data,,1257346705253440953;
->stdio_file_write,,1257346705253445792;
->ui_file_write,,1257346705253449392;
->fputc_unfiltered,,1257346705253454119;
-<fputc_unfiltered,,12529,,1257346705253472874;
-<ui_file_write,,12530,,1257346705253494629;
-<stdio_file_write,,12531,,1257346705253515738;
-<ui_file_data,,12532,,1257346705253540724;
->ui_file_data,,1257346705253547834;
->stdio_file_write,,1257346705253552516;
->ui_file_write,,1257346705253556101;
->fputc_unfiltered,,1257346705253560739;
-<fputc_unfiltered,,12533,,1257346705253581177;
-<ui_file_write,,12534,,1257346705253605360;
-<stdio_file_write,,12535,,1257346705253628379;
-<ui_file_data,,12536,,1257346705253652965;
->ui_file_data,,1257346705253660038;
->stdio_file_write,,1257346705253664726;
->ui_file_write,,1257346705253668314;
->fputc_unfiltered,,1257346705253672946;
-<fputc_unfiltered,,12537,,1257346705253693258;
-<ui_file_write,,12538,,1257346705253718039;
-<stdio_file_write,,12539,,1257346705253747112;
-<ui_file_data,,12540,,1257346705253773346;
->ui_file_data,,1257346705253780491;
->stdio_file_write,,1257346705253785231;
->ui_file_write,,1257346705253788822;
->fputc_unfiltered,,1257346705253793453;
-<fputc_unfiltered,,12541,,1257346705253814267;
-<ui_file_write,,12542,,1257346705253839055;
-<stdio_file_write,,12543,,1257346705253862783;
-<ui_file_data,,12544,,1257346705253887414;
->ui_file_data,,1257346705253894524;
->stdio_file_write,,1257346705253899212;
->ui_file_write,,1257346705253902800;
->fputc_unfiltered,,1257346705253907429;
-<fputc_unfiltered,,12545,,1257346705253928054;
-<ui_file_write,,12546,,1257346705253950658;
-<stdio_file_write,,12547,,1257346705253971917;
-<ui_file_data,,12548,,1257346705253994557;
->ui_file_data,,1257346705254001639;
->stdio_file_write,,1257346705254006337;
->ui_file_write,,1257346705254009928;
->fputc_unfiltered,,1257346705254014607;
-<fputc_unfiltered,,12549,,1257346705254033626;
-<ui_file_write,,12550,,1257346705254055644;
-<stdio_file_write,,12551,,1257346705254076401;
-<ui_file_data,,12552,,1257346705254098653;
->ui_file_data,,1257346705254105723;
->stdio_file_write,,1257346705254110433;
->ui_file_write,,1257346705254114021;
->fputc_unfiltered,,1257346705254118667;
-<fputc_unfiltered,,12553,,1257346705254137437;
-<ui_file_write,,12554,,1257346705254159352;
-<stdio_file_write,,12555,,1257346705254180536;
-<ui_file_data,,12556,,1257346705254202611;
->ui_file_data,,1257346705254209717;
->stdio_file_write,,1257346705254214412;
->ui_file_write,,1257346705254218003;
->fputc_unfiltered,,1257346705254222646;
-<fputc_unfiltered,,12557,,1257346705254241653;
-<ui_file_write,,12558,,1257346705254263268;
-<stdio_file_write,,12559,,1257346705254284142;
-<ui_file_data,,12560,,1257346705254306545;
->ui_file_data,,1257346705254313681;
->stdio_file_write,,1257346705254318466;
->ui_file_write,,1257346705254322060;
->fputc_unfiltered,,1257346705254326703;
-<fputc_unfiltered,,12561,,1257346705254345632;
-<ui_file_write,,12562,,1257346705254367475;
-<stdio_file_write,,12563,,1257346705254388223;
-<ui_file_data,,12564,,1257346705254410529;
->ui_file_data,,1257346705254417672;
->stdio_file_write,,1257346705254422499;
->ui_file_write,,1257346705254426093;
->fputc_unfiltered,,1257346705254430700;
-<fputc_unfiltered,,12565,,1257346705254449346;
-<ui_file_write,,12566,,1257346705254471776;
-<stdio_file_write,,12567,,1257346705254492551;
-<ui_file_data,,12568,,1257346705254514941;
->ui_file_data,,1257346705254522000;
->stdio_file_write,,1257346705254526703;
->ui_file_write,,1257346705254530285;
->fputc_unfiltered,,1257346705254534919;
-<fputc_unfiltered,,12569,,1257346705254553373;
-<ui_file_write,,12570,,1257346705254575418;
-<stdio_file_write,,12571,,1257346705254596455;
-<ui_file_data,,12572,,1257346705254618869;
->ui_file_data,,1257346705254625891;
->stdio_file_write,,1257346705254630625;
->ui_file_write,,1257346705254634177;
->fputc_unfiltered,,1257346705254638787;
-<fputc_unfiltered,,12573,,1257346705254657704;
-<ui_file_write,,12574,,1257346705254679414;
-<stdio_file_write,,12575,,1257346705254700539;
-<ui_file_data,,12576,,1257346705254722863;
->ui_file_data,,1257346705265749378;
->stdio_file_write,,1257346705265759453;
->ui_file_write,,1257346705265763362;
->fputc_unfiltered,,1257346705265768649;
-<fputc_unfiltered,,12577,,1257346705265796284;
-<ui_file_write,,12578,,1257346705265829552;
-<stdio_file_write,,12579,,1257346705265856234;
-<ui_file_data,,12580,,1257346705265882910;
->ui_file_data,,1257346705265890224;
->stdio_file_write,,1257346705265895015;
->ui_file_write,,1257346705265898615;
->fputc_unfiltered,,1257346705265903259;
-<fputc_unfiltered,,12581,,1257346705265927658;
-<ui_file_write,,12582,,1257346705265953218;
-<stdio_file_write,,12583,,1257346705265977338;
-<ui_file_data,,12584,,1257346705266001917;
->ui_file_data,,1257346705266009060;
->stdio_file_write,,1257346705266013788;
->ui_file_write,,1257346705266017396;
->fputc_unfiltered,,1257346705266022040;
-<fputc_unfiltered,,12585,,1257346705266045525;
-<ui_file_write,,12586,,1257346705266070703;
-<stdio_file_write,,12587,,1257346705266094697;
-<ui_file_data,,12588,,1257346705266118602;
->ui_file_data,,1257346705266125691;
->stdio_file_write,,1257346705266130467;
->ui_file_write,,1257346705266134064;
->fputc_unfiltered,,1257346705266138686;
-<fputc_unfiltered,,12589,,1257346705266162057;
-<ui_file_write,,12590,,1257346705266187217;
-<stdio_file_write,,12591,,1257346705266210870;
-<ui_file_data,,12592,,1257346705266235411;
->ui_file_data,,1257346705266242496;
->stdio_file_write,,1257346705266247215;
->ui_file_write,,1257346705266250818;
->fputc_unfiltered,,1257346705266255414;
-<fputc_unfiltered,,12593,,1257346705266278890;
-<ui_file_write,,12594,,1257346705266303577;
-<stdio_file_write,,12595,,1257346705266327919;
-<ui_file_data,,12596,,1257346705266352199;
->ui_file_data,,1257346705266359269;
->stdio_file_write,,1257346705266363982;
->ui_file_write,,1257346705266367536;
->fputc_unfiltered,,1257346705266372228;
-<fputc_unfiltered,,12597,,1257346705266395454;
-<ui_file_write,,12598,,1257346705266420921;
-<stdio_file_write,,12599,,1257346705266444954;
-<ui_file_data,,12600,,1257346705266468932;
->ui_file_data,,1257346705266476069;
->stdio_file_write,,1257346705266480775;
->ui_file_write,,1257346705266484372;
->fputc_unfiltered,,1257346705266489031;
-<fputc_unfiltered,,12601,,1257346705266512224;
-<ui_file_write,,12602,,1257346705266537264;
-<stdio_file_write,,12603,,1257346705266561064;
-<ui_file_data,,12604,,1257346705266584814;
->ui_file_data,,1257346705266591891;
->stdio_file_write,,1257346705266596633;
->ui_file_write,,1257346705266600209;
->fputc_unfiltered,,1257346705266604841;
-<fputc_unfiltered,,12605,,1257346705266627691;
-<ui_file_write,,12606,,1257346705266653068;
-<stdio_file_write,,12607,,1257346705266676384;
-<ui_file_data,,12608,,1257346705266700621;
->ui_file_data,,1257346705266707803;
->stdio_file_write,,1257346705266712576;
->ui_file_write,,1257346705266716170;
->fputc_unfiltered,,1257346705266720855;
-<fputc_unfiltered,,12609,,1257346705266749099;
-<ui_file_write,,12610,,1257346705266774091;
-<stdio_file_write,,12611,,1257346705266797796;
-<ui_file_data,,12612,,1257346705266821894;
->ui_file_data,,1257346705266829055;
->stdio_file_write,,1257346705266833815;
->ui_file_write,,1257346705266837418;
->fputc_unfiltered,,1257346705266842029;
-<wrap_here,,12613,,1257346705266863986;
->wrap_here,,1257346705266871258;
-<fputc_unfiltered,,12614,,1257346705266893582;
-<ui_file_write,,12615,,1257346705266918616;
-<stdio_file_write,,12616,,1257346705266942092;
-<ui_file_data,,12617,,1257346705266966001;
->ui_file_data,,1257346705266973141;
->stdio_file_write,,1257346705267183134;
->ui_file_write,,1257346705267187270;
->fputc_unfiltered,,1257346705267192265;
-<fputc_unfiltered,,12618,,1257346705267214854;
-<ui_file_write,,12619,,1257346705267240543;
-<stdio_file_write,,12620,,1257346705267264055;
-<ui_file_data,,12621,,1257346705267288211;
->ui_file_data,,1257346705267295323;
->stdio_file_write,,1257346705267300274;
->ui_file_write,,1257346705267303865;
->fputc_unfiltered,,1257346705267308508;
-<fputc_unfiltered,,12622,,1257346705267331295;
-<ui_file_write,,12623,,1257346705267356116;
-<stdio_file_write,,12624,,1257346705267379568;
-<ui_file_data,,12625,,1257346705267403206;
->ui_file_data,,1257346705267410367;
->stdio_file_write,,1257346705267415085;
->ui_file_write,,1257346705267418673;
->fputc_unfiltered,,1257346705267423320;
-<fputc_unfiltered,,12626,,1257346705267445653;
-<ui_file_write,,12627,,1257346705267470139;
-<stdio_file_write,,12628,,1257346705267492948;
-<ui_file_data,,12629,,1257346705267517374;
->ui_file_data,,1257346705267524495;
->stdio_file_write,,1257346705267529323;
->ui_file_write,,1257346705267532892;
->fputc_unfiltered,,1257346705267537539;
-<fputc_unfiltered,,12630,,1257346705267559622;
-<ui_file_write,,12631,,1257346705267583877;
-<stdio_file_write,,12632,,1257346705267607504;
-<ui_file_data,,12633,,1257346705267631392;
->ui_file_data,,1257346705267638450;
->stdio_file_write,,1257346705267643226;
->ui_file_write,,1257346705267646778;
->fputc_unfiltered,,1257346705267651454;
-<fputc_unfiltered,,12634,,1257346705267673661;
-<ui_file_write,,12635,,1257346705267698821;
-<stdio_file_write,,12636,,1257346705267721654;
-<ui_file_data,,12637,,1257346705267751134;
->ui_file_data,,1257346705267758775;
->stdio_file_write,,1257346705267763587;
->ui_file_write,,1257346705267767202;
->fputc_unfiltered,,1257346705267771879;
-<fputc_unfiltered,,12638,,1257346705267794510;
-<ui_file_write,,12639,,1257346705267819114;
-<stdio_file_write,,12640,,1257346705267842358;
-<ui_file_data,,12641,,1257346705267865876;
->ui_file_data,,1257346705267873091;
->stdio_file_write,,1257346705267877825;
->ui_file_write,,1257346705267881415;
->fputc_unfiltered,,1257346705267886008;
-<fputc_unfiltered,,12642,,1257346705267907697;
-<ui_file_write,,12643,,1257346705267932154;
-<stdio_file_write,,12644,,1257346705267955491;
-<ui_file_data,,12645,,1257346705267980044;
->ui_file_data,,1257346705267987157;
->stdio_file_write,,1257346705267991896;
->ui_file_write,,1257346705267995496;
->fputc_unfiltered,,1257346705268000119;
-<fputc_unfiltered,,12646,,1257346705268021850;
-<ui_file_write,,12647,,1257346705268046601;
-<stdio_file_write,,12648,,1257346705268070441;
-<ui_file_data,,12649,,1257346705268093884;
->ui_file_data,,1257346705268100997;
->stdio_file_write,,1257346705268105712;
->ui_file_write,,1257346705268109315;
->fputc_unfiltered,,1257346705268113941;
-<fputc_unfiltered,,12650,,1257346705268136075;
-<ui_file_write,,12651,,1257346705268161166;
-<stdio_file_write,,12652,,1257346705268183909;
-<ui_file_data,,12653,,1257346705268208067;
->ui_file_data,,1257346705268215156;
->stdio_file_write,,1257346705268219871;
->ui_file_write,,1257346705268223465;
->fputc_unfiltered,,1257346705268228054;
-<fputc_unfiltered,,12654,,1257346705268250114;
-<ui_file_write,,12655,,1257346705268274306;
-<stdio_file_write,,12656,,1257346705268297842;
-<ui_file_data,,12657,,1257346705268321706;
->ui_file_data,,1257346705268328752;
->stdio_file_write,,1257346705268333561;
->ui_file_write,,1257346705268337161;
->fputc_unfiltered,,1257346705268341744;
-<fputc_unfiltered,,12658,,1257346705268364787;
-<ui_file_write,,12659,,1257346705268389334;
-<stdio_file_write,,12660,,1257346705268412750;
-<ui_file_data,,12661,,1257346705268436484;
->ui_file_data,,1257346705268443672;
->stdio_file_write,,1257346705268448400;
->ui_file_write,,1257346705268452003;
->fputc_unfiltered,,1257346705268456613;
-<fputc_unfiltered,,12662,,1257346705268478787;
-<ui_file_write,,12663,,1257346705268503168;
-<stdio_file_write,,12664,,1257346705268526085;
-<ui_file_data,,12665,,1257346705268550207;
->ui_file_data,,1257346705268557287;
->stdio_file_write,,1257346705268562069;
->ui_file_write,,1257346705268565659;
->fputc_unfiltered,,1257346705268570279;
-<fputc_unfiltered,,12666,,1257346705268592266;
-<ui_file_write,,12667,,1257346705268617562;
-<stdio_file_write,,12668,,1257346705268641095;
-<ui_file_data,,12669,,1257346705268665214;
->ui_file_data,,1257346705268672306;
->stdio_file_write,,1257346705268677037;
->ui_file_write,,1257346705268680630;
->fputc_unfiltered,,1257346705268685292;
-<fputc_unfiltered,,12670,,1257346705268707508;
-<ui_file_write,,12671,,1257346705268737021;
-<stdio_file_write,,12672,,1257346705268760921;
-<ui_file_data,,12673,,1257346705268784602;
->ui_file_data,,1257346705268791738;
->stdio_file_write,,1257346705268796490;
->ui_file_write,,1257346705268800084;
->fputc_unfiltered,,1257346705268804722;
-<fputc_unfiltered,,12674,,1257346705268827325;
-<ui_file_write,,12675,,1257346705268851734;
-<stdio_file_write,,12676,,1257346705268874587;
-<ui_file_data,,12677,,1257346705268898241;
->ui_file_data,,1257346705268905374;
->stdio_file_write,,1257346705268910084;
->ui_file_write,,1257346705268913671;
->fputc_unfiltered,,1257346705268918264;
-<fputc_unfiltered,,12678,,1257346705268940062;
-<ui_file_write,,12679,,1257346705268964178;
-<stdio_file_write,,12680,,1257346705268987360;
-<ui_file_data,,12681,,1257346705269011449;
->ui_file_data,,1257346705269018562;
->stdio_file_write,,1257346705269023304;
->ui_file_write,,1257346705269026892;
->fputc_unfiltered,,1257346705269031545;
-<fputc_unfiltered,,12682,,1257346705269053330;
-<ui_file_write,,12683,,1257346705269077763;
-<stdio_file_write,,12684,,1257346705269101278;
-<ui_file_data,,12685,,1257346705269124931;
->ui_file_data,,1257346705269132191;
->stdio_file_write,,1257346705269136913;
->ui_file_write,,1257346705269140474;
->fputc_unfiltered,,1257346705269145114;
-<fputc_unfiltered,,12686,,1257346705269166990;
-<ui_file_write,,12687,,1257346705269191290;
-<stdio_file_write,,12688,,1257346705269214165;
-<ui_file_data,,12689,,1257346705269238224;
->ui_file_data,,1257346705269245394;
->stdio_file_write,,1257346705269250100;
->ui_file_write,,1257346705269253745;
->fputc_unfiltered,,1257346705269258377;
-<fputc_unfiltered,,12690,,1257346705269280208;
-<ui_file_write,,12691,,1257346705269304373;
-<stdio_file_write,,12692,,1257346705269327515;
-<ui_file_data,,12693,,1257346705269351481;
->ui_file_data,,1257346705269358578;
->stdio_file_write,,1257346705269363318;
->ui_file_write,,1257346705269366903;
->fputc_unfiltered,,1257346705269371546;
-<fputc_unfiltered,,12694,,1257346705269394012;
-<ui_file_write,,12695,,1257346705269418541;
-<stdio_file_write,,12696,,1257346705269441241;
-<ui_file_data,,12697,,1257346705269464873;
->ui_file_data,,1257346705269471986;
->stdio_file_write,,1257346705269476701;
->ui_file_write,,1257346705269480286;
->fputc_unfiltered,,1257346705269484945;
-<fputc_unfiltered,,12698,,1257346705269507061;
-<ui_file_write,,12699,,1257346705269531217;
-<stdio_file_write,,12700,,1257346705269554119;
-<ui_file_data,,12701,,1257346705269578719;
->ui_file_data,,1257346705269585826;
->stdio_file_write,,1257346705269590529;
->ui_file_write,,1257346705269594120;
->fputc_unfiltered,,1257346705269598707;
-<fputc_unfiltered,,12702,,1257346705269620628;
-<ui_file_write,,12703,,1257346705269645165;
-<stdio_file_write,,12704,,1257346705269668710;
-<ui_file_data,,12705,,1257346705269692208;
->ui_file_data,,1257346705269699338;
->stdio_file_write,,1257346705269704072;
->ui_file_write,,1257346705269707669;
->fputc_unfiltered,,1257346705269712303;
-<fputc_unfiltered,,12706,,1257346705269738831;
-<ui_file_write,,12707,,1257346705269764168;
-<stdio_file_write,,12708,,1257346705269787136;
-<ui_file_data,,12709,,1257346705269810913;
->ui_file_data,,1257346705269818143;
->stdio_file_write,,1257346705269822865;
->ui_file_write,,1257346705269826534;
->fputc_unfiltered,,1257346705269831261;
-<fputc_unfiltered,,12710,,1257346705269853531;
-<ui_file_write,,12711,,1257346705269877585;
-<stdio_file_write,,12712,,1257346705269900384;
-<ui_file_data,,12713,,1257346705269924341;
->ui_file_data,,1257346705269931445;
->stdio_file_write,,1257346705269936169;
->ui_file_write,,1257346705269939760;
->fputc_unfiltered,,1257346705269944413;
-<fputc_unfiltered,,12714,,1257346705269965940;
-<ui_file_write,,12715,,1257346705269990703;
-<stdio_file_write,,12716,,1257346705270014044;
-<ui_file_data,,12717,,1257346705270038350;
->ui_file_data,,1257346705270045429;
->stdio_file_write,,1257346705270050151;
->ui_file_write,,1257346705270053742;
->fputc_unfiltered,,1257346705270058467;
-<fputc_unfiltered,,12718,,1257346705270080857;
-<ui_file_write,,12719,,1257346705270105262;
-<stdio_file_write,,12720,,1257346705270128377;
-<ui_file_data,,12721,,1257346705270151733;
->ui_file_data,,1257346705270158848;
->stdio_file_write,,1257346705270163630;
->ui_file_write,,1257346705270167218;
->fputc_unfiltered,,1257346705270171843;
-<fputc_unfiltered,,12722,,1257346705270193677;
-<ui_file_write,,12723,,1257346705270218113;
-<stdio_file_write,,12724,,1257346705270240819;
-<ui_file_data,,12725,,1257346705270264848;
->ui_file_data,,1257346705270271949;
->stdio_file_write,,1257346705270276698;
->ui_file_write,,1257346705270280279;
->fputc_unfiltered,,1257346705270284944;
-<fputc_unfiltered,,12726,,1257346705270307578;
-<ui_file_write,,12727,,1257346705270332368;
-<stdio_file_write,,12728,,1257346705270357609;
-<ui_file_data,,12729,,1257346705270383551;
->ui_file_data,,1257346705270390655;
->stdio_file_write,,1257346705270395361;
->ui_file_write,,1257346705270398950;
->fputc_unfiltered,,1257346705270403581;
-<fputc_unfiltered,,12730,,1257346705270426302;
-<ui_file_write,,12731,,1257346705270451375;
-<stdio_file_write,,12732,,1257346705270474421;
-<ui_file_data,,12733,,1257346705270498246;
->ui_file_data,,1257346705270505367;
->stdio_file_write,,1257346705270510077;
->ui_file_write,,1257346705270513662;
->fputc_unfiltered,,1257346705270518254;
-<fputc_unfiltered,,12734,,1257346705270540993;
-<ui_file_write,,12735,,1257346705270565429;
-<stdio_file_write,,12736,,1257346705270588252;
-<ui_file_data,,12737,,1257346705270612594;
->ui_file_data,,1257346705270619662;
->stdio_file_write,,1257346705270624392;
->ui_file_write,,1257346705270628160;
->fputc_unfiltered,,1257346705270632798;
-<fputc_unfiltered,,12738,,1257346705270654545;
-<ui_file_write,,12739,,1257346705270679347;
-<stdio_file_write,,12740,,1257346705270702634;
-<ui_file_data,,12741,,1257346705270730957;
->ui_file_data,,1257346705270738689;
->stdio_file_write,,1257346705270743453;
->ui_file_write,,1257346705270747059;
->fputc_unfiltered,,1257346705270751681;
-<fputc_unfiltered,,12742,,1257346705270773675;
-<ui_file_write,,12743,,1257346705270798182;
-<stdio_file_write,,12744,,1257346705270821330;
-<ui_file_data,,12745,,1257346705270845158;
->ui_file_data,,1257346705270852496;
->stdio_file_write,,1257346705270857224;
->ui_file_write,,1257346705270860821;
->fputc_unfiltered,,1257346705270865458;
-<fputc_unfiltered,,12746,,1257346705270887244;
-<ui_file_write,,12747,,1257346705270911343;
-<stdio_file_write,,12748,,1257346705270934193;
-<ui_file_data,,12749,,1257346705270958406;
->ui_file_data,,1257346705270965551;
->stdio_file_write,,1257346705270970279;
->ui_file_write,,1257346705270973870;
->fputc_unfiltered,,1257346705270978592;
-<fputc_unfiltered,,12750,,1257346705271000164;
-<ui_file_write,,12751,,1257346705271024338;
-<stdio_file_write,,12752,,1257346705271047645;
-<ui_file_data,,12753,,1257346705271071633;
->ui_file_data,,1257346705271078739;
->stdio_file_write,,1257346705271083473;
->ui_file_write,,1257346705271087061;
->fputc_unfiltered,,1257346705271091692;
-<fputc_unfiltered,,12754,,1257346705271114055;
-<ui_file_write,,12755,,1257346705271138626;
-<stdio_file_write,,12756,,1257346705271161359;
-<ui_file_data,,12757,,1257346705271184796;
->ui_file_data,,1257346705271191852;
->stdio_file_write,,1257346705271196579;
->ui_file_write,,1257346705271200254;
->fputc_unfiltered,,1257346705271204895;
-<fputc_unfiltered,,12758,,1257346705271227450;
-<ui_file_write,,12759,,1257346705271251447;
-<stdio_file_write,,12760,,1257346705271274225;
-<ui_file_data,,12761,,1257346705271298465;
->ui_file_data,,1257346705271305523;
->stdio_file_write,,1257346705271310239;
->ui_file_write,,1257346705271313833;
->fputc_unfiltered,,1257346705271318461;
-<fputc_unfiltered,,12762,,1257346705271339934;
-<ui_file_write,,12763,,1257346705271364487;
-<stdio_file_write,,12764,,1257346705271387656;
-<ui_file_data,,12765,,1257346705271411433;
->ui_file_data,,1257346705271418551;
->stdio_file_write,,1257346705271423267;
->ui_file_write,,1257346705271426858;
->fputc_unfiltered,,1257346705271431498;
-<fputc_unfiltered,,12766,,1257346705271453633;
-<ui_file_write,,12767,,1257346705271478113;
-<stdio_file_write,,12768,,1257346705271501223;
-<ui_file_data,,12769,,1257346705271524692;
->ui_file_data,,1257346705271531778;
->stdio_file_write,,1257346705271536500;
->ui_file_write,,1257346705271540088;
->fputc_unfiltered,,1257346705271544728;
-<fputc_unfiltered,,12770,,1257346705271566267;
-<ui_file_write,,12771,,1257346705271590402;
-<stdio_file_write,,12772,,1257346705271613722;
-<ui_file_data,,12773,,1257346705271637928;
->ui_file_data,,1257346705271645014;
->stdio_file_write,,1257346705271649726;
->ui_file_write,,1257346705271653320;
->fputc_unfiltered,,1257346705271657919;
-<fputc_unfiltered,,12774,,1257346705271680294;
-<ui_file_write,,12775,,1257346705271705048;
-<stdio_file_write,,12776,,1257346705271732905;
-<ui_file_data,,12777,,1257346705271756986;
->ui_file_data,,1257346705271764189;
->stdio_file_write,,1257346705271768944;
->ui_file_write,,1257346705271772537;
->fputc_unfiltered,,1257346705271777157;
-<fputc_unfiltered,,12778,,1257346705271799349;
-<ui_file_write,,12779,,1257346705271824055;
-<stdio_file_write,,12780,,1257346705271846821;
-<ui_file_data,,12781,,1257346705271870781;
->ui_file_data,,1257346705271877894;
->stdio_file_write,,1257346705271882606;
->ui_file_write,,1257346705271886203;
->fputc_unfiltered,,1257346705271890844;
-<fputc_unfiltered,,12782,,1257346705271912515;
-<ui_file_write,,12783,,1257346705271936412;
-<stdio_file_write,,12784,,1257346705271959726;
-<ui_file_data,,12785,,1257346705271983818;
->ui_file_data,,1257346705271990865;
->stdio_file_write,,1257346705271995644;
->ui_file_write,,1257346705271999231;
->fputc_unfiltered,,1257346705272003866;
-<fputc_unfiltered,,12786,,1257346705272025369;
-<ui_file_write,,12787,,1257346705272049949;
-<stdio_file_write,,12788,,1257346705272073527;
-<ui_file_data,,12789,,1257346705272097078;
->ui_file_data,,1257346705272104142;
->stdio_file_write,,1257346705272108864;
->ui_file_write,,1257346705272112461;
->fputc_unfiltered,,1257346705272117096;
-<fputc_unfiltered,,12790,,1257346705272139375;
-<ui_file_write,,12791,,1257346705272163933;
-<stdio_file_write,,12792,,1257346705272186732;
-<ui_file_data,,12793,,1257346705272210669;
->ui_file_data,,1257346705272217754;
->stdio_file_write,,1257346705272222527;
->ui_file_write,,1257346705272226280;
->fputc_unfiltered,,1257346705272230930;
-<fputc_unfiltered,,12794,,1257346705272252827;
-<ui_file_write,,12795,,1257346705272277079;
-<stdio_file_write,,12796,,1257346705272300176;
-<ui_file_data,,12797,,1257346705272324253;
->ui_file_data,,1257346705272331375;
->stdio_file_write,,1257346705272336084;
->ui_file_write,,1257346705272339672;
->fputc_unfiltered,,1257346705272344307;
-<fputc_unfiltered,,12798,,1257346705272366282;
-<ui_file_write,,12799,,1257346705272390747;
-<stdio_file_write,,12800,,1257346705272413883;
-<ui_file_data,,12801,,1257346705272437814;
->ui_file_data,,1257346705272444896;
->stdio_file_write,,1257346705272449603;
->ui_file_write,,1257346705272453194;
->fputc_unfiltered,,1257346705272457828;
-<fputc_unfiltered,,12802,,1257346705272479996;
-<ui_file_write,,12803,,1257346705272503806;
-<stdio_file_write,,12804,,1257346705272526942;
-<ui_file_data,,12805,,1257346705272550752;
->ui_file_data,,1257346705272557897;
->stdio_file_write,,1257346705272562604;
->ui_file_write,,1257346705272566195;
->fputc_unfiltered,,1257346705272570820;
-<fputc_unfiltered,,12806,,1257346705272592374;
-<ui_file_write,,12807,,1257346705272617165;
-<stdio_file_write,,12808,,1257346705272640436;
-<ui_file_data,,12809,,1257346705272664454;
->ui_file_data,,1257346705272671542;
->stdio_file_write,,1257346705272676251;
->ui_file_write,,1257346705272679842;
->fputc_unfiltered,,1257346705272684522;
-<fputc_unfiltered,,12810,,1257346705272707017;
-<ui_file_write,,12811,,1257346705272736009;
-<stdio_file_write,,12812,,1257346705272759891;
-<ui_file_data,,12813,,1257346705272783508;
->ui_file_data,,1257346705272790693;
->stdio_file_write,,1257346705272795442;
->ui_file_write,,1257346705272799033;
->fputc_unfiltered,,1257346705272803661;
-<fputc_unfiltered,,12814,,1257346705272825841;
-<ui_file_write,,12815,,1257346705272849924;
-<stdio_file_write,,12816,,1257346705272872594;
-<ui_file_data,,12817,,1257346705272896858;
->ui_file_data,,1257346705272903944;
->stdio_file_write,,1257346705272913508;
->ui_file_write,,1257346705272917210;
->fputc_unfiltered,,1257346705272975894;
-<fputc_unfiltered,,12818,,1257346705272998106;
-<ui_file_write,,12819,,1257346705273023540;
-<stdio_file_write,,12820,,1257346705273048337;
-<ui_file_data,,12821,,1257346705273072342;
->ui_file_data,,1257346705273079490;
->stdio_file_write,,1257346705273084513;
->ui_file_write,,1257346705273088104;
->fputc_unfiltered,,1257346705273092747;
-<fputc_unfiltered,,12822,,1257346705273114885;
-<ui_file_write,,12823,,1257346705273139786;
-<stdio_file_write,,12824,,1257346705273162586;
-<ui_file_data,,12825,,1257346705273186299;
->ui_file_data,,1257346705273193436;
->stdio_file_write,,1257346705273198194;
->ui_file_write,,1257346705273201800;
->fputc_unfiltered,,1257346705273206425;
-<fputc_unfiltered,,12826,,1257346705273228794;
-<ui_file_write,,12827,,1257346705273252851;
-<stdio_file_write,,12828,,1257346705273275608;
-<ui_file_data,,12829,,1257346705273299568;
->ui_file_data,,1257346705273306687;
->stdio_file_write,,1257346705273311435;
->ui_file_write,,1257346705273315035;
->fputc_unfiltered,,1257346705273319676;
-<fputc_unfiltered,,12830,,1257346705273341383;
-<ui_file_write,,12831,,1257346705273365707;
-<stdio_file_write,,12832,,1257346705273388597;
-<ui_file_data,,12833,,1257346705273412214;
->ui_file_data,,1257346705273419327;
->stdio_file_write,,1257346705273424037;
->ui_file_write,,1257346705273427636;
->fputc_unfiltered,,1257346705273432277;
-<fputc_unfiltered,,12834,,1257346705273454297;
-<ui_file_write,,12835,,1257346705273478573;
-<stdio_file_write,,12836,,1257346705273501288;
-<ui_file_data,,12837,,1257346705273525853;
->ui_file_data,,1257346705273533038;
->stdio_file_write,,1257346705273537750;
->ui_file_write,,1257346705273541350;
->fputc_unfiltered,,1257346705273545979;
-<fputc_unfiltered,,12838,,1257346705273567638;
-<ui_file_write,,12839,,1257346705273591598;
-<stdio_file_write,,12840,,1257346705273614858;
-<ui_file_data,,12841,,1257346705273638932;
->ui_file_data,,1257346705273646030;
->stdio_file_write,,1257346705273650763;
->ui_file_write,,1257346705273654357;
->fputc_unfiltered,,1257346705273659004;
-<fputc_unfiltered,,12842,,1257346705273681075;
-<ui_file_write,,12843,,1257346705273706037;
-<stdio_file_write,,12844,,1257346705273734292;
-<ui_file_data,,12845,,1257346705273758784;
->ui_file_data,,1257346705273765954;
->stdio_file_write,,1257346705273770772;
->ui_file_write,,1257346705273774363;
->fputc_unfiltered,,1257346705273779003;
-<fputc_unfiltered,,12846,,1257346705273801430;
-<ui_file_write,,12847,,1257346705273825718;
-<stdio_file_write,,12848,,1257346705273848697;
-<ui_file_data,,12849,,1257346705273872131;
->ui_file_data,,1257346705273879208;
->stdio_file_write,,1257346705273883920;
->ui_file_write,,1257346705273887523;
->fputc_unfiltered,,1257346705273892119;
-<fputc_unfiltered,,12850,,1257346705273913760;
-<ui_file_write,,12851,,1257346705273937741;
-<stdio_file_write,,12852,,1257346705273960754;
-<ui_file_data,,12853,,1257346705273984994;
->ui_file_data,,1257346705273992091;
->stdio_file_write,,1257346705273996792;
->ui_file_write,,1257346705274000386;
->fputc_unfiltered,,1257346705274005011;
-<fputc_unfiltered,,12854,,1257346705274026629;
-<ui_file_write,,12855,,1257346705274050815;
-<stdio_file_write,,12856,,1257346705274074002;
-<ui_file_data,,12857,,1257346705274097652;
->ui_file_data,,1257346705274104855;
->stdio_file_write,,1257346705274109544;
->ui_file_write,,1257346705274113144;
->fputc_unfiltered,,1257346705274117790;
-<fputc_unfiltered,,12858,,1257346705274139850;
-<ui_file_write,,12859,,1257346705274163846;
-<stdio_file_write,,12860,,1257346705274186808;
-<ui_file_data,,12861,,1257346705274210614;
->ui_file_data,,1257346705274217670;
->stdio_file_write,,1257346705274222343;
->ui_file_write,,1257346705274225907;
->fputc_unfiltered,,1257346705274230677;
-<fputc_unfiltered,,12862,,1257346705274252366;
-<ui_file_write,,12863,,1257346705274276898;
-<stdio_file_write,,12864,,1257346705274300061;
-<ui_file_data,,12865,,1257346705274324088;
->ui_file_data,,1257346705274331164;
->stdio_file_write,,1257346705274335859;
->ui_file_write,,1257346705274339455;
->fputc_unfiltered,,1257346705274344114;
-<fputc_unfiltered,,12866,,1257346705274366757;
-<ui_file_write,,12867,,1257346705274390762;
-<stdio_file_write,,12868,,1257346705274413637;
-<ui_file_data,,12869,,1257346705274436932;
->ui_file_data,,1257346705274444039;
->stdio_file_write,,1257346705274448727;
->ui_file_write,,1257346705274452333;
->fputc_unfiltered,,1257346705274456974;
-<fputc_unfiltered,,12870,,1257346705274478766;
-<ui_file_write,,12871,,1257346705274502792;
-<stdio_file_write,,12872,,1257346705274525444;
-<ui_file_data,,12873,,1257346705274549485;
->ui_file_data,,1257346705274556640;
->stdio_file_write,,1257346705274561338;
->ui_file_write,,1257346705274564940;
->fputc_unfiltered,,1257346705274569569;
-<fputc_unfiltered,,12874,,1257346705274591295;
-<ui_file_write,,12875,,1257346705274615372;
-<stdio_file_write,,12876,,1257346705274638508;
-<ui_file_data,,12877,,1257346705274661822;
->ui_file_data,,1257346705274668892;
->stdio_file_write,,1257346705274673611;
->ui_file_write,,1257346705274677214;
->fputc_unfiltered,,1257346705274681878;
-<fputc_unfiltered,,12878,,1257346705274704076;
-<ui_file_write,,12879,,1257346705274735574;
-<stdio_file_write,,12880,,1257346705274765570;
-<ui_file_data,,12881,,1257346705274789194;
->ui_file_data,,1257346705274796282;
->stdio_file_write,,1257346705274801082;
->ui_file_write,,1257346705274804676;
->fputc_unfiltered,,1257346705274809329;
-<fputc_unfiltered,,12882,,1257346705274831746;
-<ui_file_write,,12883,,1257346705274855947;
-<stdio_file_write,,12884,,1257346705274878836;
-<ui_file_data,,12885,,1257346705274902237;
->ui_file_data,,1257346705274909310;
->stdio_file_write,,1257346705274914182;
->ui_file_write,,1257346705274917861;
->fputc_unfiltered,,1257346705274922480;
-<fputc_unfiltered,,12886,,1257346705274944293;
-<ui_file_write,,12887,,1257346705274968139;
-<stdio_file_write,,12888,,1257346705274991209;
-<ui_file_data,,12889,,1257346705275015319;
->ui_file_data,,1257346705275022387;
->stdio_file_write,,1257346705275027105;
->ui_file_write,,1257346705275030699;
->fputc_unfiltered,,1257346705275035286;
-<fputc_unfiltered,,12890,,1257346705275057378;
-<ui_file_write,,12891,,1257346705275081808;
-<stdio_file_write,,12892,,1257346705275105022;
-<ui_file_data,,12893,,1257346705275128492;
->ui_file_data,,1257346705275135574;
->stdio_file_write,,1257346705275140329;
->ui_file_write,,1257346705275143929;
->fputc_unfiltered,,1257346705275148569;
-<fputc_unfiltered,,12894,,1257346705275170900;
-<ui_file_write,,12895,,1257346705275194712;
-<stdio_file_write,,12896,,1257346705275217755;
-<ui_file_data,,12897,,1257346705275241463;
->ui_file_data,,1257346705275248524;
->stdio_file_write,,1257346705275253246;
->ui_file_write,,1257346705275256831;
->fputc_unfiltered,,1257346705275261456;
-<fputc_unfiltered,,12898,,1257346705275282999;
-<ui_file_write,,12899,,1257346705275307539;
-<stdio_file_write,,12900,,1257346705275330771;
-<ui_file_data,,12901,,1257346705275354482;
->ui_file_data,,1257346705275361607;
->stdio_file_write,,1257346705275366322;
->ui_file_write,,1257346705275370000;
->fputc_unfiltered,,1257346705275374632;
-<fputc_unfiltered,,12902,,1257346705275397076;
-<ui_file_write,,12903,,1257346705275421175;
-<stdio_file_write,,12904,,1257346705275444022;
-<ui_file_data,,12905,,1257346705275467459;
->ui_file_data,,1257346705275474677;
->stdio_file_write,,1257346705275479384;
->ui_file_write,,1257346705275483065;
->fputc_unfiltered,,1257346705275487696;
-<fputc_unfiltered,,12906,,1257346705275510174;
-<ui_file_write,,12907,,1257346705275533941;
-<stdio_file_write,,12908,,1257346705275557177;
-<ui_file_data,,12909,,1257346705275581065;
->ui_file_data,,1257346705275588222;
->stdio_file_write,,1257346705275592956;
->ui_file_write,,1257346705275596529;
->fputc_unfiltered,,1257346705275601169;
-<fputc_unfiltered,,12910,,1257346705275623728;
-<ui_file_write,,12911,,1257346705275648299;
-<stdio_file_write,,12912,,1257346705275671468;
-<ui_file_data,,12913,,1257346705275694923;
->ui_file_data,,1257346705275702066;
->stdio_file_write,,1257346705275706781;
->ui_file_write,,1257346705275710378;
->fputc_unfiltered,,1257346705275715121;
-<wrap_here,,12914,,1257346705275741423;
->wrap_here,,1257346705275749197;
-<fputc_unfiltered,,12915,,1257346705275771317;
-<ui_file_write,,12916,,1257346705275795782;
-<stdio_file_write,,12917,,1257346705275818573;
-<ui_file_data,,12918,,1257346705275844915;
->ui_file_data,,1257346705275852081;
->stdio_file_write,,1257346705275991545;
->ui_file_write,,1257346705275995626;
->fputc_unfiltered,,1257346705276000573;
-<fputc_unfiltered,,12919,,1257346705276023117;
-<ui_file_write,,12920,,1257346705276050214;
-<stdio_file_write,,12921,,1257346705276073157;
-<ui_file_data,,12922,,1257346705276096501;
->ui_file_data,,1257346705276103698;
->stdio_file_write,,1257346705276108543;
->ui_file_write,,1257346705276112149;
->fputc_unfiltered,,1257346705276116789;
-<fputc_unfiltered,,12923,,1257346705276139501;
-<ui_file_write,,12924,,1257346705276163471;
-<stdio_file_write,,12925,,1257346705276186315;
-<ui_file_data,,12926,,1257346705276210185;
->ui_file_data,,1257346705276217267;
->stdio_file_write,,1257346705276221992;
->ui_file_write,,1257346705276225583;
->fputc_unfiltered,,1257346705276230239;
-<fputc_unfiltered,,12927,,1257346705276251940;
-<ui_file_write,,12928,,1257346705276276547;
-<stdio_file_write,,12929,,1257346705276299788;
-<ui_file_data,,12930,,1257346705276323746;
->ui_file_data,,1257346705276330864;
->stdio_file_write,,1257346705276335574;
->ui_file_write,,1257346705276339168;
->fputc_unfiltered,,1257346705276343814;
-<fputc_unfiltered,,12931,,1257346705276366283;
-<ui_file_write,,12932,,1257346705276390694;
-<stdio_file_write,,12933,,1257346705276413608;
-<ui_file_data,,12934,,1257346705276436921;
->ui_file_data,,1257346705276444082;
->stdio_file_write,,1257346705276448990;
->ui_file_write,,1257346705276452566;
->fputc_unfiltered,,1257346705276457293;
-<fputc_unfiltered,,12935,,1257346705276479058;
-<ui_file_write,,12936,,1257346705276503647;
-<stdio_file_write,,12937,,1257346705276526970;
-<ui_file_data,,12938,,1257346705276550806;
->ui_file_data,,1257346705276557922;
->stdio_file_write,,1257346705276562608;
->ui_file_write,,1257346705276566156;
->fputc_unfiltered,,1257346705276570815;
-<fputc_unfiltered,,12939,,1257346705276592763;
-<ui_file_write,,12940,,1257346705276617622;
-<stdio_file_write,,12941,,1257346705276640798;
-<ui_file_data,,12942,,1257346705276664165;
->ui_file_data,,1257346705276671254;
->stdio_file_write,,1257346705276675996;
->ui_file_write,,1257346705276679593;
->fputc_unfiltered,,1257346705276684234;
-<fputc_unfiltered,,12943,,1257346705276707259;
-<ui_file_write,,12944,,1257346705276736649;
-<stdio_file_write,,12945,,1257346705276759984;
-<ui_file_data,,12946,,1257346705276783502;
->ui_file_data,,1257346705276790647;
->stdio_file_write,,1257346705276795423;
->ui_file_write,,1257346705276799020;
->fputc_unfiltered,,1257346705276803630;
-<fputc_unfiltered,,12947,,1257346705276825729;
-<ui_file_write,,12948,,1257346705276849999;
-<stdio_file_write,,12949,,1257346705276872840;
-<ui_file_data,,12950,,1257346705276897059;
->ui_file_data,,1257346705276904166;
->stdio_file_write,,1257346705276908896;
->ui_file_write,,1257346705276912502;
->fputc_unfiltered,,1257346705276917230;
-<fputc_unfiltered,,12951,,1257346705276938898;
-<ui_file_write,,12952,,1257346705276963373;
-<stdio_file_write,,12953,,1257346705276986864;
-<ui_file_data,,12954,,1257346705277010175;
->ui_file_data,,1257346705277017218;
->stdio_file_write,,1257346705277022117;
->ui_file_write,,1257346705277025711;
->fputc_unfiltered,,1257346705277030394;
-<fputc_unfiltered,,12955,,1257346705277052450;
-<ui_file_write,,12956,,1257346705277077168;
-<stdio_file_write,,12957,,1257346705277100250;
-<ui_file_data,,12958,,1257346705277123639;
->ui_file_data,,1257346705277130733;
->stdio_file_write,,1257346705277135482;
->ui_file_write,,1257346705277139064;
->fputc_unfiltered,,1257346705277143692;
-<fputc_unfiltered,,12959,,1257346705277165400;
-<ui_file_write,,12960,,1257346705277190040;
-<stdio_file_write,,12961,,1257346705277213134;
-<ui_file_data,,12962,,1257346705277236818;
->ui_file_data,,1257346705277243909;
->stdio_file_write,,1257346705277248679;
->ui_file_write,,1257346705277252276;
->fputc_unfiltered,,1257346705277256994;
-<fputc_unfiltered,,12963,,1257346705277279294;
-<ui_file_write,,12964,,1257346705277303633;
-<stdio_file_write,,12965,,1257346705277326920;
-<ui_file_data,,12966,,1257346705277350288;
->ui_file_data,,1257346705277357382;
->stdio_file_write,,1257346705277362119;
->ui_file_write,,1257346705277365719;
->fputc_unfiltered,,1257346705277370392;
-<fputc_unfiltered,,12967,,1257346705277392338;
-<ui_file_write,,12968,,1257346705277416496;
-<stdio_file_write,,12969,,1257346705277439214;
-<ui_file_data,,12970,,1257346705277463394;
->ui_file_data,,1257346705277470419;
->stdio_file_write,,1257346705277475114;
->ui_file_write,,1257346705277478666;
->fputc_unfiltered,,1257346705277483318;
-<fputc_unfiltered,,12971,,1257346705277504866;
-<ui_file_write,,12972,,1257346705277529043;
-<stdio_file_write,,12973,,1257346705277552610;
-<ui_file_data,,12974,,1257346705277576158;
->ui_file_data,,1257346705277583234;
->stdio_file_write,,1257346705277587983;
->ui_file_write,,1257346705277591547;
->fputc_unfiltered,,1257346705277596145;
-<fputc_unfiltered,,12975,,1257346705277617907;
-<ui_file_write,,12976,,1257346705277642423;
-<stdio_file_write,,12977,,1257346705277665559;
-<ui_file_data,,12978,,1257346705277688858;
->ui_file_data,,1257346705277695958;
->stdio_file_write,,1257346705277700680;
->ui_file_write,,1257346705277704280;
->fputc_unfiltered,,1257346705277708918;
-<fputc_unfiltered,,12979,,1257346705277734979;
-<ui_file_write,,12980,,1257346705277759815;
-<stdio_file_write,,12981,,1257346705277782617;
-<ui_file_data,,12982,,1257346705277806502;
->ui_file_data,,1257346705277813594;
->stdio_file_write,,1257346705277818373;
->ui_file_write,,1257346705277821963;
->fputc_unfiltered,,1257346705277826769;
-<fputc_unfiltered,,12983,,1257346705277848675;
-<ui_file_write,,12984,,1257346705277873038;
-<stdio_file_write,,12985,,1257346705277896560;
-<ui_file_data,,12986,,1257346705277920267;
->ui_file_data,,1257346705277927356;
->stdio_file_write,,1257346705277932110;
->ui_file_write,,1257346705277935695;
->fputc_unfiltered,,1257346705277940345;
-<fputc_unfiltered,,12987,,1257346705277961947;
-<ui_file_write,,12988,,1257346705277986617;
-<stdio_file_write,,12989,,1257346705278009398;
-<ui_file_data,,12990,,1257346705278033232;
->ui_file_data,,1257346705278040297;
->stdio_file_write,,1257346705278045003;
->ui_file_write,,1257346705278048591;
->fputc_unfiltered,,1257346705278053199;
-<fputc_unfiltered,,12991,,1257346705278074807;
-<ui_file_write,,12992,,1257346705278098623;
-<stdio_file_write,,12993,,1257346705278122186;
-<ui_file_data,,12994,,1257346705278145966;
->ui_file_data,,1257346705278153054;
->stdio_file_write,,1257346705278157806;
->ui_file_write,,1257346705278161391;
->fputc_unfiltered,,1257346705278166043;
-<fputc_unfiltered,,12995,,1257346705278187477;
-<ui_file_write,,12996,,1257346705278211885;
-<stdio_file_write,,12997,,1257346705278235313;
-<ui_file_data,,12998,,1257346705278258552;
->ui_file_data,,1257346705278265772;
->stdio_file_write,,1257346705278270482;
->ui_file_write,,1257346705278274067;
->fputc_unfiltered,,1257346705278278747;
-<fputc_unfiltered,,12999,,1257346705278300695;
-<ui_file_write,,13000,,1257346705278325169;
-<stdio_file_write,,13001,,1257346705278348071;
-<ui_file_data,,13002,,1257346705278371968;
->ui_file_data,,1257346705278379092;
->stdio_file_write,,1257346705278383820;
->ui_file_write,,1257346705278387405;
->fputc_unfiltered,,1257346705278392054;
-<fputc_unfiltered,,13003,,1257346705278413768;
-<ui_file_write,,13004,,1257346705278437551;
-<stdio_file_write,,13005,,1257346705278460991;
-<ui_file_data,,13006,,1257346705278484728;
->ui_file_data,,1257346705278491787;
->stdio_file_write,,1257346705278496496;
->ui_file_write,,1257346705278500081;
->fputc_unfiltered,,1257346705278504773;
-<fputc_unfiltered,,13007,,1257346705278527049;
-<ui_file_write,,13008,,1257346705278551550;
-<stdio_file_write,,13009,,1257346705278574311;
-<ui_file_data,,13010,,1257346705278597738;
->ui_file_data,,1257346705278604734;
->stdio_file_write,,1257346705278609407;
->ui_file_write,,1257346705278612983;
->fputc_unfiltered,,1257346705278617593;
-<fputc_unfiltered,,13011,,1257346705278639427;
-<ui_file_write,,13012,,1257346705278663553;
-<stdio_file_write,,13013,,1257346705278686310;
-<ui_file_data,,13014,,1257346705278710992;
->ui_file_data,,1257346705278718048;
->stdio_file_write,,1257346705278722727;
->ui_file_write,,1257346705278730799;
->fputc_unfiltered,,1257346705278735740;
-<fputc_unfiltered,,13015,,1257346705278757372;
-<ui_file_write,,13016,,1257346705278781474;
-<stdio_file_write,,13017,,1257346705278806129;
-<ui_file_data,,13018,,1257346705278830236;
->ui_file_data,,1257346705278837337;
->stdio_file_write,,1257346705278842071;
->ui_file_write,,1257346705278845658;
->fputc_unfiltered,,1257346705278850305;
-<fputc_unfiltered,,13019,,1257346705278872436;
-<ui_file_write,,13020,,1257346705278896818;
-<stdio_file_write,,13021,,1257346705278920339;
-<ui_file_data,,13022,,1257346705278943607;
->ui_file_data,,1257346705278950795;
->stdio_file_write,,1257346705278955556;
->ui_file_write,,1257346705278959153;
->fputc_unfiltered,,1257346705278963763;
-<fputc_unfiltered,,13023,,1257346705278985489;
-<ui_file_write,,13024,,1257346705279009437;
-<stdio_file_write,,13025,,1257346705279032242;
-<ui_file_data,,13026,,1257346705279056082;
->ui_file_data,,1257346705279063138;
->stdio_file_write,,1257346705279067847;
->ui_file_write,,1257346705279071408;
->fputc_unfiltered,,1257346705279076031;
-<fputc_unfiltered,,13027,,1257346705279097648;
-<ui_file_write,,13028,,1257346705279122176;
-<stdio_file_write,,13029,,1257346705279145457;
-<ui_file_data,,13030,,1257346705279168770;
->ui_file_data,,1257346705279175817;
->stdio_file_write,,1257346705279180517;
->ui_file_write,,1257346705279184196;
->fputc_unfiltered,,1257346705279188839;
-<fputc_unfiltered,,13031,,1257346705279211416;
-<ui_file_write,,13032,,1257346705279235845;
-<stdio_file_write,,13033,,1257346705279258753;
-<ui_file_data,,13034,,1257346705279282054;
->ui_file_data,,1257346705279289113;
->stdio_file_write,,1257346705279293883;
->ui_file_write,,1257346705279297476;
->fputc_unfiltered,,1257346705279302102;
-<fputc_unfiltered,,13035,,1257346705279323379;
-<ui_file_write,,13036,,1257346705279347457;
-<stdio_file_write,,13037,,1257346705279370578;
-<ui_file_data,,13038,,1257346705279394692;
->ui_file_data,,1257346705279401774;
->stdio_file_write,,1257346705279406553;
->ui_file_write,,1257346705279410231;
->fputc_unfiltered,,1257346705279414959;
-<fputc_unfiltered,,13039,,1257346705279436711;
-<ui_file_write,,13040,,1257346705279461123;
-<stdio_file_write,,13041,,1257346705279484626;
-<ui_file_data,,13042,,1257346705279508183;
->ui_file_data,,1257346705279515304;
->stdio_file_write,,1257346705279519978;
->ui_file_write,,1257346705279523542;
->fputc_unfiltered,,1257346705279528185;
-<fputc_unfiltered,,13043,,1257346705279550073;
-<ui_file_write,,13044,,1257346705279574045;
-<stdio_file_write,,13045,,1257346705279597287;
-<ui_file_data,,13046,,1257346705279620991;
->ui_file_data,,1257346705279628077;
->stdio_file_write,,1257346705279632796;
->ui_file_write,,1257346705279636395;
->fputc_unfiltered,,1257346705279641030;
-<wrap_here,,13047,,1257346705279662151;
->wrap_here,,1257346705279669297;
-<fputc_unfiltered,,13048,,1257346705279691101;
-<ui_file_write,,13049,,1257346705279715392;
-<stdio_file_write,,13050,,1257346705279743155;
-<ui_file_data,,13051,,1257346705279767358;
->ui_file_data,,1257346705279774585;
->stdio_file_write,,1257346705294914121;
->ui_file_write,,1257346705294920891;
->fputc_unfiltered,,1257346705294927673;
->fputs_maybe_filtered,,1257346705294933311;
-<do_cleanups,,13052,,1257346705294959861;
-<do_my_cleanups,,13053,,1257346705294993490;
-<xfree,,13054,,1257346705295023411;
->xfree,,1257346705295032003;
-<xfree,,13055,,1257346705295053885;
->xfree,,1257346705295060788;
->do_my_cleanups,,1257346705295065533;
->do_cleanups,,1257346705295069341;
->vfprintf_maybe_filtered,,1257346705295074432;
->vfprintf_filtered,,1257346705295078537;
->fprintf_filtered,,1257346705295083286;
-<fprintf_filtered,,13056,,1257346705295108600;
-<vfprintf_filtered,,13057,,1257346705295138153;
-<vfprintf_maybe_filtered,,13058,,1257346705295166938;
-<xstrvprintf,,13059,,1257346705295192426;
->xstrvprintf,,1257346705295203318;
-<make_cleanup,,13060,,1257346705295224759;
-<make_my_cleanup,,13061,,1257346705295250159;
-<make_my_cleanup2,,13062,,1257346705295272204;
-<xmalloc,,13063,,1257346705295294528;
->xmalloc,,1257346705295301917;
->make_my_cleanup2,,1257346705295306837;
->make_my_cleanup,,1257346705295311598;
->make_cleanup,,1257346705295316485;
-<fputs_maybe_filtered,,13064,,1257346705295343636;
-<fputc_unfiltered,,13065,,1257346705295368381;
-<ui_file_write,,13066,,1257346705295393147;
-<stdio_file_write,,13067,,1257346705295414193;
-<ui_file_data,,13068,,1257346705295438042;
->ui_file_data,,1257346705295445750;
->stdio_file_write,,1257346705295451137;
->ui_file_write,,1257346705295454757;
->fputc_unfiltered,,1257346705295459401;
-<fputc_unfiltered,,13069,,1257346705295479112;
-<ui_file_write,,13070,,1257346705295500452;
-<stdio_file_write,,13071,,1257346705295520822;
-<ui_file_data,,13072,,1257346705295542063;
->ui_file_data,,1257346705295549278;
->stdio_file_write,,1257346705295553994;
->ui_file_write,,1257346705295557605;
->fputc_unfiltered,,1257346705295562225;
-<fputc_unfiltered,,13073,,1257346705295581755;
-<ui_file_write,,13074,,1257346705295602907;
-<stdio_file_write,,13075,,1257346705295624127;
-<ui_file_data,,13076,,1257346705295645693;
->ui_file_data,,1257346705295652758;
->stdio_file_write,,1257346705295657467;
->ui_file_write,,1257346705295661070;
->fputc_unfiltered,,1257346705295665711;
-<fputc_unfiltered,,13077,,1257346705295684206;
-<ui_file_write,,13078,,1257346705295704961;
-<stdio_file_write,,13079,,1257346705295731514;
-<ui_file_data,,13080,,1257346705295752843;
->ui_file_data,,1257346705295759995;
->stdio_file_write,,1257346705295764837;
->ui_file_write,,1257346705295768446;
->fputc_unfiltered,,1257346705295773098;
-<fputc_unfiltered,,13081,,1257346705295792156;
-<ui_file_write,,13082,,1257346705295813094;
-<stdio_file_write,,13083,,1257346705295833779;
-<ui_file_data,,13084,,1257346705295854199;
->ui_file_data,,1257346705295861327;
->stdio_file_write,,1257346705295866064;
->ui_file_write,,1257346705295869667;
->fputc_unfiltered,,1257346705295874262;
-<fputc_unfiltered,,13085,,1257346705295892806;
-<ui_file_write,,13086,,1257346705295913927;
-<stdio_file_write,,13087,,1257346705295934230;
-<ui_file_data,,13088,,1257346705295954759;
->ui_file_data,,1257346705295961974;
->stdio_file_write,,1257346705295966734;
->ui_file_write,,1257346705295970422;
->fputc_unfiltered,,1257346705295975068;
-<fputc_unfiltered,,13089,,1257346705295993816;
-<ui_file_write,,13090,,1257346705296014571;
-<stdio_file_write,,13091,,1257346705296034759;
-<ui_file_data,,13092,,1257346705296055414;
->ui_file_data,,1257346705296062758;
->stdio_file_write,,1257346705296067477;
->ui_file_write,,1257346705296071035;
->fputc_unfiltered,,1257346705296075624;
-<fputc_unfiltered,,13093,,1257346705296094418;
-<ui_file_write,,13094,,1257346705296115671;
-<stdio_file_write,,13095,,1257346705296136504;
-<ui_file_data,,13096,,1257346705296157017;
->ui_file_data,,1257346705296164124;
->stdio_file_write,,1257346705296168885;
->ui_file_write,,1257346705296172487;
->fputc_unfiltered,,1257346705296177092;
-<fputc_unfiltered,,13097,,1257346705296195603;
-<ui_file_write,,13098,,1257346705296215837;
-<stdio_file_write,,13099,,1257346705296235625;
-<ui_file_data,,13100,,1257346705296256076;
->ui_file_data,,1257346705296263204;
->stdio_file_write,,1257346705296267940;
->ui_file_write,,1257346705296271546;
->fputc_unfiltered,,1257346705296276193;
-<fputc_unfiltered,,13101,,1257346705296294968;
-<ui_file_write,,13102,,1257346705296315722;
-<stdio_file_write,,13103,,1257346705296336176;
-<ui_file_data,,13104,,1257346705296356338;
->ui_file_data,,1257346705296363420;
->stdio_file_write,,1257346705296368169;
->ui_file_write,,1257346705296371880;
->fputc_unfiltered,,1257346705296376527;
-<fputc_unfiltered,,13105,,1257346705296395606;
-<ui_file_write,,13106,,1257346705296416450;
-<stdio_file_write,,13107,,1257346705296436810;
-<ui_file_data,,13108,,1257346705296457354;
->ui_file_data,,1257346705296464440;
->stdio_file_write,,1257346705296469210;
->ui_file_write,,1257346705296472812;
->fputc_unfiltered,,1257346705296477450;
-<fputc_unfiltered,,13109,,1257346705296496306;
-<ui_file_write,,13110,,1257346705296516510;
-<stdio_file_write,,13111,,1257346705296536408;
-<ui_file_data,,13112,,1257346705296556584;
->ui_file_data,,1257346705296563700;
->stdio_file_write,,1257346705296568470;
->ui_file_write,,1257346705296572078;
->fputc_unfiltered,,1257346705296576683;
-<fputc_unfiltered,,13113,,1257346705296595723;
-<ui_file_write,,13114,,1257346705296616005;
-<stdio_file_write,,13115,,1257346705296635845;
-<ui_file_data,,13116,,1257346705296656434;
->ui_file_data,,1257346705296663504;
->stdio_file_write,,1257346705296668220;
->ui_file_write,,1257346705296671802;
->fputc_unfiltered,,1257346705296676518;
-<fputc_unfiltered,,13117,,1257346705296695846;
-<ui_file_write,,13118,,1257346705296715948;
-<stdio_file_write,,13119,,1257346705296740754;
-<ui_file_data,,13120,,1257346705296761445;
->ui_file_data,,1257346705296768690;
->stdio_file_write,,1257346705296773439;
->ui_file_write,,1257346705296777039;
->fputc_unfiltered,,1257346705296781697;
-<fputc_unfiltered,,13121,,1257346705296800695;
-<ui_file_write,,13122,,1257346705296820905;
-<stdio_file_write,,13123,,1257346705296840944;
-<ui_file_data,,13124,,1257346705296861517;
->ui_file_data,,1257346705296868555;
->stdio_file_write,,1257346705296873394;
->ui_file_write,,1257346705296876994;
->fputc_unfiltered,,1257346705296881625;
-<fputc_unfiltered,,13125,,1257346705296900855;
-<ui_file_write,,13126,,1257346705296921359;
-<stdio_file_write,,13127,,1257346705296941335;
-<ui_file_data,,13128,,1257346705296961936;
->ui_file_data,,1257346705296968979;
->stdio_file_write,,1257346705296973746;
->ui_file_write,,1257346705296977340;
->fputc_unfiltered,,1257346705296981962;
-<fputc_unfiltered,,13129,,1257346705297001044;
-<ui_file_write,,13130,,1257346705297021663;
-<stdio_file_write,,13131,,1257346705297042168;
-<ui_file_data,,13132,,1257346705297062754;
->ui_file_data,,1257346705297069998;
->stdio_file_write,,1257346705297074780;
->ui_file_write,,1257346705297078377;
->fputc_unfiltered,,1257346705297083033;
-<fputc_unfiltered,,13133,,1257346705297102208;
-<ui_file_write,,13134,,1257346705297122406;
-<stdio_file_write,,13135,,1257346705297142457;
-<ui_file_data,,13136,,1257346705297162594;
->ui_file_data,,1257346705297169683;
->stdio_file_write,,1257346705297174426;
->ui_file_write,,1257346705297178013;
->fputc_unfiltered,,1257346705297182621;
-<fputc_unfiltered,,13137,,1257346705297204503;
-<ui_file_write,,13138,,1257346705297225089;
-<stdio_file_write,,13139,,1257346705297245377;
-<ui_file_data,,13140,,1257346705297265692;
->ui_file_data,,1257346705297272811;
->stdio_file_write,,1257346705297277538;
->ui_file_write,,1257346705297281129;
->fputc_unfiltered,,1257346705297285775;
-<fputc_unfiltered,,13141,,1257346705297304343;
-<ui_file_write,,13142,,1257346705297324667;
-<stdio_file_write,,13143,,1257346705297345025;
-<ui_file_data,,13144,,1257346705297365788;
->ui_file_data,,1257346705297372840;
->stdio_file_write,,1257346705297377662;
->ui_file_write,,1257346705297381255;
->fputc_unfiltered,,1257346705297385887;
-<fputc_unfiltered,,13145,,1257346705297404334;
-<ui_file_write,,13146,,1257346705297425023;
-<stdio_file_write,,13147,,1257346705297445295;
-<ui_file_data,,13148,,1257346705297465563;
->ui_file_data,,1257346705297472642;
->stdio_file_write,,1257346705297477361;
->ui_file_write,,1257346705297480951;
->fputc_unfiltered,,1257346705297485589;
-<fputc_unfiltered,,13149,,1257346705297504139;
-<ui_file_write,,13150,,1257346705297525206;
-<stdio_file_write,,13151,,1257346705297545031;
-<ui_file_data,,13152,,1257346705297565755;
->ui_file_data,,1257346705297572919;
->stdio_file_write,,1257346705297577694;
->ui_file_write,,1257346705297581288;
->fputc_unfiltered,,1257346705297585929;
-<fputc_unfiltered,,13153,,1257346705297604843;
-<ui_file_write,,13154,,1257346705297625762;
-<stdio_file_write,,13155,,1257346705297646065;
-<ui_file_data,,13156,,1257346705297666438;
->ui_file_data,,1257346705297673490;
->stdio_file_write,,1257346705297678185;
->ui_file_write,,1257346705297681733;
->fputc_unfiltered,,1257346705297686374;
-<fputc_unfiltered,,13157,,1257346705297704764;
-<ui_file_write,,13158,,1257346705297724992;
-<stdio_file_write,,13159,,1257346705297751145;
-<ui_file_data,,13160,,1257346705297771788;
->ui_file_data,,1257346705297778871;
->stdio_file_write,,1257346705297783731;
->ui_file_write,,1257346705297787328;
->fputc_unfiltered,,1257346705297791989;
-<fputc_unfiltered,,13161,,1257346705297810383;
-<ui_file_write,,13162,,1257346705297831287;
-<stdio_file_write,,13163,,1257346705297851816;
-<ui_file_data,,13164,,1257346705297872098;
->ui_file_data,,1257346705297879238;
->stdio_file_write,,1257346705297883984;
->ui_file_write,,1257346705297887580;
->fputc_unfiltered,,1257346705297892218;
-<fputc_unfiltered,,13165,,1257346705297910663;
-<ui_file_write,,13166,,1257346705297931396;
-<stdio_file_write,,13167,,1257346705297951157;
-<ui_file_data,,13168,,1257346705297971343;
->ui_file_data,,1257346705297978441;
->stdio_file_write,,1257346705297983217;
->ui_file_write,,1257346705297986811;
->fputc_unfiltered,,1257346705297991403;
-<fputc_unfiltered,,13169,,1257346705298009754;
-<ui_file_write,,13170,,1257346705298029895;
-<stdio_file_write,,13171,,1257346705298049840;
-<ui_file_data,,13172,,1257346705298070119;
->ui_file_data,,1257346705298077187;
->stdio_file_write,,1257346705298081954;
->ui_file_write,,1257346705298085547;
->fputc_unfiltered,,1257346705298090251;
-<fputc_unfiltered,,13173,,1257346705298108708;
-<ui_file_write,,13174,,1257346705298129305;
-<stdio_file_write,,13175,,1257346705298149900;
-<ui_file_data,,13176,,1257346705298169996;
->ui_file_data,,1257346705298177136;
->stdio_file_write,,1257346705298181899;
->ui_file_write,,1257346705298185496;
->fputc_unfiltered,,1257346705298190140;
->fputs_maybe_filtered,,1257346705298194976;
-<do_cleanups,,13177,,1257346705298214891;
-<do_my_cleanups,,13178,,1257346705298235841;
-<xfree,,13179,,1257346705298258835;
->xfree,,1257346705298265849;
-<xfree,,13180,,1257346705298283512;
->xfree,,1257346705298290411;
->do_my_cleanups,,1257346705298295057;
->do_cleanups,,1257346705298298564;
->vfprintf_maybe_filtered,,1257346705298303285;
->vfprintf_filtered,,1257346705298306921;
->fprintf_filtered,,1257346705298311451;
-<fprintf_filtered,,13181,,1257346705298332779;
-<vfprintf_filtered,,13182,,1257346705298356917;
-<vfprintf_maybe_filtered,,13183,,1257346705298380516;
-<xstrvprintf,,13184,,1257346705298400525;
->xstrvprintf,,1257346705298409932;
-<make_cleanup,,13185,,1257346705298427492;
-<make_my_cleanup,,13186,,1257346705298448018;
-<make_my_cleanup2,,13187,,1257346705298467518;
-<xmalloc,,13188,,1257346705298487063;
->xmalloc,,1257346705298494179;
->make_my_cleanup2,,1257346705298498973;
->make_my_cleanup,,1257346705298503598;
->make_cleanup,,1257346705298508196;
-<fputs_maybe_filtered,,13189,,1257346705298530707;
-<fputc_unfiltered,,13190,,1257346705298551795;
-<ui_file_write,,13191,,1257346705298571987;
-<stdio_file_write,,13192,,1257346705298591442;
-<ui_file_data,,13193,,1257346705298611808;
->ui_file_data,,1257346705298618993;
->stdio_file_write,,1257346705298623805;
->ui_file_write,,1257346705298627444;
->fputc_unfiltered,,1257346705298632193;
-<fputc_unfiltered,,13194,,1257346705298651085;
-<ui_file_write,,13195,,1257346705298671247;
-<stdio_file_write,,13196,,1257346705298691361;
-<ui_file_data,,13197,,1257346705298711766;
->ui_file_data,,1257346705298718897;
->stdio_file_write,,1257346705298723652;
->ui_file_write,,1257346705298731937;
->fputc_unfiltered,,1257346705298736860;
-<fputc_unfiltered,,13198,,1257346705298755296;
-<ui_file_write,,13199,,1257346705298775662;
-<stdio_file_write,,13200,,1257346705298795282;
-<ui_file_data,,13201,,1257346705298815706;
->ui_file_data,,1257346705298822960;
->stdio_file_write,,1257346705298827723;
->ui_file_write,,1257346705298831336;
->fputc_unfiltered,,1257346705298835976;
-<fputc_unfiltered,,13202,,1257346705298854342;
-<ui_file_write,,13203,,1257346705298874519;
-<stdio_file_write,,13204,,1257346705298894164;
-<ui_file_data,,13205,,1257346705298914521;
->ui_file_data,,1257346705298921703;
->stdio_file_write,,1257346705298926436;
->ui_file_write,,1257346705298930042;
->fputc_unfiltered,,1257346705298934683;
-<fputc_unfiltered,,13206,,1257346705298953049;
-<ui_file_write,,13207,,1257346705298973590;
-<stdio_file_write,,13208,,1257346705298993237;
-<ui_file_data,,13209,,1257346705299013243;
->ui_file_data,,1257346705299020373;
->stdio_file_write,,1257346705299025125;
->ui_file_write,,1257346705299028731;
->fputc_unfiltered,,1257346705299033377;
-<fputc_unfiltered,,13210,,1257346705299051506;
-<ui_file_write,,13211,,1257346705299072038;
-<stdio_file_write,,13212,,1257346705299091683;
-<ui_file_data,,13213,,1257346705299111661;
->ui_file_data,,1257346705299118704;
->stdio_file_write,,1257346705299123462;
->ui_file_write,,1257346705299127071;
->fputc_unfiltered,,1257346705299131726;
-<fputc_unfiltered,,13214,,1257346705299149870;
-<ui_file_write,,13215,,1257346705299169842;
-<stdio_file_write,,13216,,1257346705299189956;
-<ui_file_data,,13217,,1257346705299210377;
->ui_file_data,,1257346705299217501;
->stdio_file_write,,1257346705299222244;
->ui_file_write,,1257346705299225859;
->fputc_unfiltered,,1257346705299230508;
-<fputc_unfiltered,,13218,,1257346705299248727;
-<ui_file_write,,13219,,1257346705299268883;
-<stdio_file_write,,13220,,1257346705299288744;
-<ui_file_data,,13221,,1257346705299308786;
->ui_file_data,,1257346705299315925;
->stdio_file_write,,1257346705299320659;
->ui_file_write,,1257346705299324271;
->fputc_unfiltered,,1257346705299328927;
-<fputc_unfiltered,,13222,,1257346705299347431;
-<ui_file_write,,13223,,1257346705299367740;
-<stdio_file_write,,13224,,1257346705299387779;
-<ui_file_data,,13225,,1257346705299407844;
->ui_file_data,,1257346705299414972;
->stdio_file_write,,1257346705299419688;
->ui_file_write,,1257346705299423260;
->fputc_unfiltered,,1257346705299427958;
-<fputc_unfiltered,,13226,,1257346705299446108;
-<ui_file_write,,13227,,1257346705299466312;
-<stdio_file_write,,13228,,1257346705299486402;
-<ui_file_data,,13229,,1257346705299506308;
->ui_file_data,,1257346705299513420;
->stdio_file_write,,1257346705299518419;
->ui_file_write,,1257346705299521991;
->fputc_unfiltered,,1257346705299526713;
-<fputc_unfiltered,,13230,,1257346705299545046;
-<ui_file_write,,13231,,1257346705299565371;
-<stdio_file_write,,13232,,1257346705299585929;
-<ui_file_data,,13233,,1257346705299606362;
->ui_file_data,,1257346705299613450;
->stdio_file_write,,1257346705299618184;
->ui_file_write,,1257346705299621769;
->fputc_unfiltered,,1257346705299626397;
-<fputc_unfiltered,,13234,,1257346705299644854;
-<ui_file_write,,13235,,1257346705299664471;
-<stdio_file_write,,13236,,1257346705299684438;
-<ui_file_data,,13237,,1257346705299704765;
->ui_file_data,,1257346705299711859;
->stdio_file_write,,1257346705299716584;
->ui_file_write,,1257346705299720172;
->fputc_unfiltered,,1257346705299724806;
-<fputc_unfiltered,,13238,,1257346705299747758;
-<ui_file_write,,13239,,1257346705299767860;
-<stdio_file_write,,13240,,1257346705299787736;
-<ui_file_data,,13241,,1257346705299808204;
->ui_file_data,,1257346705299815278;
->stdio_file_write,,1257346705299820029;
->ui_file_write,,1257346705299823638;
->fputc_unfiltered,,1257346705299828279;
-<fputc_unfiltered,,13242,,1257346705299847271;
-<ui_file_write,,13243,,1257346705299867505;
-<stdio_file_write,,13244,,1257346705299887961;
-<ui_file_data,,13245,,1257346705299908066;
->ui_file_data,,1257346705299915106;
->stdio_file_write,,1257346705299919906;
->ui_file_write,,1257346705299923500;
->fputc_unfiltered,,1257346705299928216;
-<fputc_unfiltered,,13246,,1257346705299946459;
-<ui_file_write,,13247,,1257346705299966624;
-<stdio_file_write,,13248,,1257346705299986620;
-<ui_file_data,,13249,,1257346705300006794;
->ui_file_data,,1257346705300013846;
->stdio_file_write,,1257346705300018667;
->ui_file_write,,1257346705300022261;
->fputc_unfiltered,,1257346705300026989;
-<fputc_unfiltered,,13250,,1257346705300045635;
-<ui_file_write,,13251,,1257346705300065727;
-<stdio_file_write,,13252,,1257346705300085802;
-<ui_file_data,,13253,,1257346705300105811;
->ui_file_data,,1257346705300112917;
->stdio_file_write,,1257346705300117642;
->ui_file_write,,1257346705300121329;
->fputc_unfiltered,,1257346705300125918;
-<fputc_unfiltered,,13254,,1257346705300144221;
-<ui_file_write,,13255,,1257346705300163893;
-<stdio_file_write,,13256,,1257346705300183396;
-<ui_file_data,,13257,,1257346705300203555;
->ui_file_data,,1257346705300210580;
->stdio_file_write,,1257346705300215302;
->ui_file_write,,1257346705300218884;
->fputc_unfiltered,,1257346705300223497;
->fputs_maybe_filtered,,1257346705300228270;
-<do_cleanups,,13258,,1257346705300247918;
-<do_my_cleanups,,13259,,1257346705300268822;
-<xfree,,13260,,1257346705300291110;
->xfree,,1257346705300298021;
-<xfree,,13261,,1257346705300315115;
->xfree,,1257346705300321843;
->do_my_cleanups,,1257346705300326357;
->do_cleanups,,1257346705300329831;
->vfprintf_maybe_filtered,,1257346705300334598;
->vfprintf_filtered,,1257346705300338219;
->fprintf_filtered,,1257346705300342775;
-<fprintf_filtered,,13262,,1257346705300362885;
-<vfprintf_filtered,,13263,,1257346705300386470;
-<vfprintf_maybe_filtered,,13264,,1257346705300410664;
-<xstrvprintf,,13265,,1257346705300430634;
->xstrvprintf,,1257346705300438793;
-<make_cleanup,,13266,,1257346705300455932;
-<make_my_cleanup,,13267,,1257346705300475757;
-<make_my_cleanup2,,13268,,1257346705300495720;
-<xmalloc,,13269,,1257346705300515326;
->xmalloc,,1257346705300522237;
->make_my_cleanup2,,1257346705300526926;
->make_my_cleanup,,1257346705300531542;
->make_cleanup,,1257346705300536113;
-<fputs_maybe_filtered,,13270,,1257346705300559066;
-<fputc_unfiltered,,13271,,1257346705300579519;
-<ui_file_write,,13272,,1257346705300599702;
-<stdio_file_write,,13273,,1257346705300619560;
-<ui_file_data,,13274,,1257346705300639403;
->ui_file_data,,1257346705300646480;
->stdio_file_write,,1257346705300651226;
->ui_file_write,,1257346705300654835;
->fputc_unfiltered,,1257346705300659478;
-<fputc_unfiltered,,13275,,1257346705300677408;
-<ui_file_write,,13276,,1257346705300697525;
-<stdio_file_write,,13277,,1257346705300717885;
-<ui_file_data,,13278,,1257346705300742733;
->ui_file_data,,1257346705300750435;
->stdio_file_write,,1257346705300755226;
->ui_file_write,,1257346705300759000;
->fputc_unfiltered,,1257346705300763719;
->fputs_maybe_filtered,,1257346705300768546;
-<do_cleanups,,13279,,1257346705300787781;
-<do_my_cleanups,,13280,,1257346705300808108;
-<xfree,,13281,,1257346705300831052;
->xfree,,1257346705300838005;
-<xfree,,13282,,1257346705300854988;
->xfree,,1257346705300861740;
->do_my_cleanups,,1257346705300866299;
->do_cleanups,,1257346705300869893;
->vfprintf_maybe_filtered,,1257346705300874603;
->vfprintf_filtered,,1257346705300878308;
->fprintf_filtered,,1257346705300883011;
-<fprintf_filtered,,13283,,1257346705300909326;
-<vfprintf_filtered,,13284,,1257346705300933292;
-<vfprintf_maybe_filtered,,13285,,1257346705300957081;
-<xstrvprintf,,13286,,1257346705300976879;
->xstrvprintf,,1257346705300984711;
-<make_cleanup,,13287,,1257346705301001564;
-<make_my_cleanup,,13288,,1257346705301021762;
-<make_my_cleanup2,,13289,,1257346705301041737;
-<xmalloc,,13290,,1257346705301061475;
->xmalloc,,1257346705301068386;
->make_my_cleanup2,,1257346705301073045;
->make_my_cleanup,,1257346705301077664;
->make_cleanup,,1257346705301082139;
-<fputs_maybe_filtered,,13291,,1257346705301104517;
-<wrap_here,,13292,,1257346705301126899;
->wrap_here,,1257346705301134020;
-<fputc_unfiltered,,13293,,1257346705301151301;
-<ui_file_write,,13294,,1257346705301170762;
-<stdio_file_write,,13295,,1257346705301189601;
-<ui_file_data,,13296,,1257346705301209332;
->ui_file_data,,1257346705301216454;
->stdio_file_write,,1257346705301358489;
->ui_file_write,,1257346705301362579;
->fputc_unfiltered,,1257346705301367535;
-<fputc_unfiltered,,13297,,1257346705301385168;
-<ui_file_write,,13298,,1257346705301405630;
-<stdio_file_write,,13299,,1257346705301425118;
-<ui_file_data,,13300,,1257346705301446005;
->ui_file_data,,1257346705301453289;
->stdio_file_write,,1257346705301458188;
->ui_file_write,,1257346705301461788;
->fputc_unfiltered,,1257346705301466428;
-<fputc_unfiltered,,13301,,1257346705301483646;
-<ui_file_write,,13302,,1257346705301503269;
-<stdio_file_write,,13303,,1257346705301522607;
-<ui_file_data,,13304,,1257346705301543385;
->ui_file_data,,1257346705301550510;
->stdio_file_write,,1257346705301555253;
->ui_file_write,,1257346705301558823;
->fputc_unfiltered,,1257346705301563472;
-<fputc_unfiltered,,13305,,1257346705301580696;
-<ui_file_write,,13306,,1257346705301600734;
-<stdio_file_write,,13307,,1257346705301619588;
-<ui_file_data,,13308,,1257346705301639722;
->ui_file_data,,1257346705301646775;
->stdio_file_write,,1257346705301651512;
->ui_file_write,,1257346705301655096;
->fputc_unfiltered,,1257346705301659713;
-<fputc_unfiltered,,13309,,1257346705301677544;
-<ui_file_write,,13310,,1257346705301696924;
-<stdio_file_write,,13311,,1257346705301715816;
-<ui_file_data,,13312,,1257346705301741108;
->ui_file_data,,1257346705301748849;
->stdio_file_write,,1257346705301753655;
->ui_file_write,,1257346705301757261;
->fputc_unfiltered,,1257346705301761917;
-<fputc_unfiltered,,13313,,1257346705301779525;
-<ui_file_write,,13314,,1257346705301799305;
-<stdio_file_write,,13315,,1257346705301818679;
-<ui_file_data,,13316,,1257346705301838877;
->ui_file_data,,1257346705301845989;
->stdio_file_write,,1257346705301850720;
->ui_file_write,,1257346705301854317;
->fputc_unfiltered,,1257346705301858957;
-<fputc_unfiltered,,13317,,1257346705301876364;
-<ui_file_write,,13318,,1257346705301895940;
-<stdio_file_write,,13319,,1257346705301914835;
-<ui_file_data,,13320,,1257346705301935253;
->ui_file_data,,1257346705301942329;
->stdio_file_write,,1257346705301947048;
->ui_file_write,,1257346705301950642;
->fputc_unfiltered,,1257346705301955273;
-<fputc_unfiltered,,13321,,1257346705301972590;
-<ui_file_write,,13322,,1257346705301992466;
-<stdio_file_write,,13323,,1257346705302011503;
-<ui_file_data,,13324,,1257346705302031936;
->ui_file_data,,1257346705302038991;
->stdio_file_write,,1257346705302043725;
->ui_file_write,,1257346705302047313;
->fputc_unfiltered,,1257346705302051938;
-<fputc_unfiltered,,13325,,1257346705302069438;
-<ui_file_write,,13326,,1257346705302089465;
-<stdio_file_write,,13327,,1257346705302108315;
-<ui_file_data,,13328,,1257346705302128047;
->ui_file_data,,1257346705302135208;
->stdio_file_write,,1257346705302140152;
->ui_file_write,,1257346705302143743;
->fputc_unfiltered,,1257346705302148476;
-<fputc_unfiltered,,13329,,1257346705302165610;
-<ui_file_write,,13330,,1257346705302185802;
-<stdio_file_write,,13331,,1257346705302205058;
-<ui_file_data,,13332,,1257346705302224958;
->ui_file_data,,1257346705302232119;
->stdio_file_write,,1257346705302236841;
->ui_file_write,,1257346705302240435;
->fputc_unfiltered,,1257346705302245072;
-<fputc_unfiltered,,13333,,1257346705302262473;
-<ui_file_write,,13334,,1257346705302282205;
-<stdio_file_write,,13335,,1257346705302301500;
-<ui_file_data,,13336,,1257346705302321199;
->ui_file_data,,1257346705302328285;
->stdio_file_write,,1257346705302333009;
->ui_file_write,,1257346705302336606;
->fputc_unfiltered,,1257346705302341222;
-<fputc_unfiltered,,13337,,1257346705302358708;
-<ui_file_write,,13338,,1257346705302377979;
-<stdio_file_write,,13339,,1257346705302397197;
-<ui_file_data,,13340,,1257346705302417022;
->ui_file_data,,1257346705302424071;
->stdio_file_write,,1257346705302428934;
->ui_file_write,,1257346705302432531;
->fputc_unfiltered,,1257346705302437171;
-<fputc_unfiltered,,13341,,1257346705302454515;
-<ui_file_write,,13342,,1257346705302474334;
-<stdio_file_write,,13343,,1257346705302494277;
-<ui_file_data,,13344,,1257346705302514222;
->ui_file_data,,1257346705302521319;
->stdio_file_write,,1257346705302526032;
->ui_file_write,,1257346705302529620;
->fputc_unfiltered,,1257346705302534333;
-<fputc_unfiltered,,13345,,1257346705302551761;
-<ui_file_write,,13346,,1257346705302571282;
-<stdio_file_write,,13347,,1257346705302590923;
-<ui_file_data,,13348,,1257346705302611614;
->ui_file_data,,1257346705302618712;
->stdio_file_write,,1257346705302623581;
->ui_file_write,,1257346705302627232;
->fputc_unfiltered,,1257346705302631936;
-<fputc_unfiltered,,13349,,1257346705302649388;
-<ui_file_write,,13350,,1257346705302669219;
-<stdio_file_write,,13351,,1257346705302688199;
-<ui_file_data,,13352,,1257346705302708357;
->ui_file_data,,1257346705302715554;
->stdio_file_write,,1257346705302720270;
->ui_file_write,,1257346705302723864;
->fputc_unfiltered,,1257346705302733263;
-<fputc_unfiltered,,13353,,1257346705302750850;
-<ui_file_write,,13354,,1257346705302770669;
-<stdio_file_write,,13355,,1257346705302789556;
-<ui_file_data,,13356,,1257346705302809513;
->ui_file_data,,1257346705302816719;
->stdio_file_write,,1257346705302821453;
->ui_file_write,,1257346705302825050;
->fputc_unfiltered,,1257346705302829777;
-<fputc_unfiltered,,13357,,1257346705302846779;
-<ui_file_write,,13358,,1257346705302866664;
-<stdio_file_write,,13359,,1257346705302885544;
-<ui_file_data,,13360,,1257346705302905649;
->ui_file_data,,1257346705302912981;
->stdio_file_write,,1257346705302917715;
->ui_file_write,,1257346705302921303;
->fputc_unfiltered,,1257346705302925952;
-<fputc_unfiltered,,13361,,1257346705302943398;
-<ui_file_write,,13362,,1257346705302963157;
-<stdio_file_write,,13363,,1257346705302982368;
-<ui_file_data,,13364,,1257346705303002049;
->ui_file_data,,1257346705303009114;
->stdio_file_write,,1257346705303013913;
->ui_file_write,,1257346705303017507;
->fputc_unfiltered,,1257346705303022145;
-<fputc_unfiltered,,13365,,1257346705303039843;
-<ui_file_write,,13366,,1257346705303059184;
-<stdio_file_write,,13367,,1257346705303078083;
-<ui_file_data,,13368,,1257346705303097881;
->ui_file_data,,1257346705303105020;
->stdio_file_write,,1257346705303109766;
->ui_file_write,,1257346705303113363;
->fputc_unfiltered,,1257346705303118025;
-<fputc_unfiltered,,13369,,1257346705303135480;
-<ui_file_write,,13370,,1257346705303155022;
-<stdio_file_write,,13371,,1257346705303173897;
-<ui_file_data,,13372,,1257346705303199369;
->ui_file_data,,1257346705303206470;
->stdio_file_write,,1257346705303211159;
->ui_file_write,,1257346705303214746;
->fputc_unfiltered,,1257346705303219330;
-<fputc_unfiltered,,13373,,1257346705303240409;
-<ui_file_write,,13374,,1257346705303264180;
-<stdio_file_write,,13375,,1257346705303287370;
-<ui_file_data,,13376,,1257346705303312605;
->ui_file_data,,1257346705303319877;
->stdio_file_write,,1257346705303324584;
->ui_file_write,,1257346705303328166;
->fputc_unfiltered,,1257346705303333059;
-<fputc_unfiltered,,13377,,1257346705303355521;
-<ui_file_write,,13378,,1257346705303378961;
-<stdio_file_write,,13379,,1257346705303402906;
-<ui_file_data,,13380,,1257346705303424211;
->ui_file_data,,1257346705303431284;
->stdio_file_write,,1257346705303435991;
->ui_file_write,,1257346705303439576;
->fputc_unfiltered,,1257346705303444162;
-<fputc_unfiltered,,13381,,1257346705303464414;
-<ui_file_write,,13382,,1257346705303485334;
-<stdio_file_write,,13383,,1257346705303506503;
-<ui_file_data,,13384,,1257346705303528641;
->ui_file_data,,1257346705303535741;
->stdio_file_write,,1257346705303540484;
->ui_file_write,,1257346705303544072;
->fputc_unfiltered,,1257346705303548682;
-<fputc_unfiltered,,13385,,1257346705303566964;
-<ui_file_write,,13386,,1257346705303587270;
-<stdio_file_write,,13387,,1257346705303607601;
-<ui_file_data,,13388,,1257346705303628226;
->ui_file_data,,1257346705303635401;
->stdio_file_write,,1257346705303640108;
->ui_file_write,,1257346705303643690;
->fputc_unfiltered,,1257346705303648318;
-<fputc_unfiltered,,13389,,1257346705303666477;
-<ui_file_write,,13390,,1257346705303687412;
-<stdio_file_write,,13391,,1257346705303708169;
-<ui_file_data,,13392,,1257346705303735581;
->ui_file_data,,1257346705303743268;
->stdio_file_write,,1257346705303748037;
->ui_file_write,,1257346705303751634;
->fputc_unfiltered,,1257346705303756272;
-<fputc_unfiltered,,13393,,1257346705303774822;
-<ui_file_write,,13394,,1257346705303795828;
-<stdio_file_write,,13395,,1257346705303816267;
-<ui_file_data,,13396,,1257346705303837716;
->ui_file_data,,1257346705303844789;
->stdio_file_write,,1257346705303849496;
->ui_file_write,,1257346705303853090;
->fputc_unfiltered,,1257346705303857724;
-<fputc_unfiltered,,13397,,1257346705303875591;
-<ui_file_write,,13398,,1257346705303895807;
-<stdio_file_write,,13399,,1257346705303915325;
-<ui_file_data,,13400,,1257346705303935797;
->ui_file_data,,1257346705303942877;
->stdio_file_write,,1257346705303947613;
->ui_file_write,,1257346705303951210;
->fputc_unfiltered,,1257346705303955860;
-<fputc_unfiltered,,13401,,1257346705303973844;
-<ui_file_write,,13402,,1257346705303994201;
-<stdio_file_write,,13403,,1257346705304014219;
-<ui_file_data,,13404,,1257346705304034925;
->ui_file_data,,1257346705304041947;
->stdio_file_write,,1257346705304046684;
->ui_file_write,,1257346705304050278;
->fputc_unfiltered,,1257346705304054879;
-<fputc_unfiltered,,13405,,1257346705304073176;
-<ui_file_write,,13406,,1257346705304093888;
-<stdio_file_write,,13407,,1257346705304114273;
-<ui_file_data,,13408,,1257346705304135349;
->ui_file_data,,1257346705304142419;
->stdio_file_write,,1257346705304147129;
->ui_file_write,,1257346705304150726;
->fputc_unfiltered,,1257346705304155357;
-<fputc_unfiltered,,13409,,1257346705304174067;
-<ui_file_write,,13410,,1257346705304194860;
-<stdio_file_write,,13411,,1257346705304214721;
-<ui_file_data,,13412,,1257346705304235586;
->ui_file_data,,1257346705304242717;
->stdio_file_write,,1257346705304247421;
->ui_file_write,,1257346705304251021;
->fputc_unfiltered,,1257346705304255652;
-<fputc_unfiltered,,13413,,1257346705304273342;
-<ui_file_write,,13414,,1257346705304293600;
-<stdio_file_write,,13415,,1257346705304313876;
-<ui_file_data,,13416,,1257346705304334068;
->ui_file_data,,1257346705304341171;
->stdio_file_write,,1257346705304345947;
->ui_file_write,,1257346705304349544;
->fputc_unfiltered,,1257346705304354124;
-<fputc_unfiltered,,13417,,1257346705304374103;
-<ui_file_write,,13418,,1257346705304394162;
-<stdio_file_write,,13419,,1257346705304413921;
-<ui_file_data,,13420,,1257346705304434501;
->ui_file_data,,1257346705304441553;
->stdio_file_write,,1257346705304446296;
->ui_file_write,,1257346705304449887;
->fputc_unfiltered,,1257346705304454554;
-<fputc_unfiltered,,13421,,1257346705304472527;
-<ui_file_write,,13422,,1257346705304492328;
-<stdio_file_write,,13423,,1257346705304511497;
-<ui_file_data,,13424,,1257346705304531812;
->ui_file_data,,1257346705304539111;
->stdio_file_write,,1257346705304543806;
->ui_file_write,,1257346705304547484;
->fputc_unfiltered,,1257346705304552115;
-<fputc_unfiltered,,13425,,1257346705304570461;
-<ui_file_write,,13426,,1257346705304590565;
-<stdio_file_write,,13427,,1257346705304610216;
-<ui_file_data,,13428,,1257346705304630188;
->ui_file_data,,1257346705304637174;
->stdio_file_write,,1257346705304641830;
->ui_file_write,,1257346705304645409;
->fputc_unfiltered,,1257346705304650088;
-<fputc_unfiltered,,13429,,1257346705304667330;
-<ui_file_write,,13430,,1257346705304687332;
-<stdio_file_write,,13431,,1257346705304706114;
-<ui_file_data,,13432,,1257346705304731275;
->ui_file_data,,1257346705304738935;
->stdio_file_write,,1257346705304743762;
->ui_file_write,,1257346705304747356;
->fputc_unfiltered,,1257346705304751999;
-<fputc_unfiltered,,13433,,1257346705304769879;
-<ui_file_write,,13434,,1257346705304790053;
-<stdio_file_write,,13435,,1257346705304809462;
-<ui_file_data,,13436,,1257346705304829781;
->ui_file_data,,1257346705304836839;
->stdio_file_write,,1257346705304841555;
->ui_file_write,,1257346705304845139;
->fputc_unfiltered,,1257346705304849765;
-<fputc_unfiltered,,13437,,1257346705304867040;
-<ui_file_write,,13438,,1257346705304886714;
-<stdio_file_write,,13439,,1257346705304905902;
-<ui_file_data,,13440,,1257346705304925684;
->ui_file_data,,1257346705304932719;
->stdio_file_write,,1257346705304937486;
->ui_file_write,,1257346705304941080;
->fputc_unfiltered,,1257346705304945699;
-<fputc_unfiltered,,13441,,1257346705304962986;
-<ui_file_write,,13442,,1257346705304983406;
-<stdio_file_write,,13443,,1257346705305002374;
-<ui_file_data,,13444,,1257346705305022854;
->ui_file_data,,1257346705305030003;
->stdio_file_write,,1257346705305034704;
->ui_file_write,,1257346705305038289;
->fputc_unfiltered,,1257346705305042905;
-<fputc_unfiltered,,13445,,1257346705305060817;
-<ui_file_write,,13446,,1257346705305080654;
-<stdio_file_write,,13447,,1257346705305100169;
-<ui_file_data,,13448,,1257346705305120427;
->ui_file_data,,1257346705305127552;
->stdio_file_write,,1257346705305132262;
->ui_file_write,,1257346705305135850;
->fputc_unfiltered,,1257346705305140499;
-<fputc_unfiltered,,13449,,1257346705305157897;
-<ui_file_write,,13450,,1257346705305177791;
-<stdio_file_write,,13451,,1257346705305197261;
-<ui_file_data,,13452,,1257346705305217255;
->ui_file_data,,1257346705305224292;
->stdio_file_write,,1257346705305229038;
->ui_file_write,,1257346705305232629;
->fputc_unfiltered,,1257346705305237269;
-<fputc_unfiltered,,13453,,1257346705305254676;
-<ui_file_write,,13454,,1257346705305274429;
-<stdio_file_write,,13455,,1257346705305293475;
-<ui_file_data,,13456,,1257346705305313739;
->ui_file_data,,1257346705305320776;
->stdio_file_write,,1257346705305325483;
->ui_file_write,,1257346705305329068;
->fputc_unfiltered,,1257346705305333762;
-<fputc_unfiltered,,13457,,1257346705305351614;
-<ui_file_write,,13458,,1257346705305371587;
-<stdio_file_write,,13459,,1257346705305391030;
-<ui_file_data,,13460,,1257346705305410879;
->ui_file_data,,1257346705305417925;
->stdio_file_write,,1257346705305422626;
->ui_file_write,,1257346705305426214;
->fputc_unfiltered,,1257346705305430845;
-<fputc_unfiltered,,13461,,1257346705305448430;
-<ui_file_write,,13462,,1257346705305468158;
-<stdio_file_write,,13463,,1257346705305487174;
-<ui_file_data,,13464,,1257346705305507342;
->ui_file_data,,1257346705305514548;
->stdio_file_write,,1257346705305519242;
->ui_file_write,,1257346705305522827;
->fputc_unfiltered,,1257346705305527459;
-<fputc_unfiltered,,13465,,1257346705305544685;
-<ui_file_write,,13466,,1257346705305564402;
-<stdio_file_write,,13467,,1257346705305583544;
-<ui_file_data,,13468,,1257346705305603601;
->ui_file_data,,1257346705305610674;
->stdio_file_write,,1257346705305615351;
->ui_file_write,,1257346705305618915;
->fputc_unfiltered,,1257346705305623543;
-<wrap_here,,13469,,1257346705305643013;
->wrap_here,,1257346705305650144;
-<fputc_unfiltered,,13470,,1257346705305667521;
-<ui_file_write,,13471,,1257346705305689710;
-<stdio_file_write,,13472,,1257346705305711020;
-<ui_file_data,,13473,,1257346705305735899;
->ui_file_data,,1257346705305743510;
->stdio_file_write,,1257346705305921755;
->ui_file_write,,1257346705305925845;
->fputc_unfiltered,,1257346705305930843;
->fputs_maybe_filtered,,1257346705305935872;
-<do_cleanups,,13474,,1257346705305956088;
-<do_my_cleanups,,13475,,1257346705305979389;
-<xfree,,13476,,1257346705306002904;
->xfree,,1257346705306010594;
-<xfree,,13477,,1257346705306028726;
->xfree,,1257346705306035445;
->do_my_cleanups,,1257346705306040124;
->do_cleanups,,1257346705306043613;
->vfprintf_maybe_filtered,,1257346705306048422;
->vfprintf_filtered,,1257346705306052151;
->fprintf_filtered,,1257346705306056779;
-<fprintf_filtered,,13478,,1257346705306077916;
-<vfprintf_filtered,,13479,,1257346705306101984;
-<vfprintf_maybe_filtered,,13480,,1257346705306127785;
-<xstrvprintf,,13481,,1257346705306149381;
->xstrvprintf,,1257346705306159230;
-<make_cleanup,,13482,,1257346705306179545;
-<make_my_cleanup,,13483,,1257346705306200649;
-<make_my_cleanup2,,13484,,1257346705306220756;
-<xmalloc,,13485,,1257346705306241402;
->xmalloc,,1257346705306248590;
->make_my_cleanup2,,1257346705306253372;
->make_my_cleanup,,1257346705306258085;
->make_cleanup,,1257346705306262779;
-<fputs_maybe_filtered,,13486,,1257346705306285801;
-<fputc_unfiltered,,13487,,1257346705306306254;
-<ui_file_write,,13488,,1257346705306326218;
-<stdio_file_write,,13489,,1257346705306345321;
-<ui_file_data,,13490,,1257346705306366054;
->ui_file_data,,1257346705306373128;
->stdio_file_write,,1257346705306377985;
->ui_file_write,,1257346705306381588;
->fputc_unfiltered,,1257346705306386228;
-<fputc_unfiltered,,13491,,1257346705306404898;
-<ui_file_write,,13492,,1257346705306425189;
-<stdio_file_write,,13493,,1257346705306444692;
-<ui_file_data,,13494,,1257346705306465218;
->ui_file_data,,1257346705306472280;
->stdio_file_write,,1257346705306476998;
->ui_file_write,,1257346705306480598;
->fputc_unfiltered,,1257346705306485248;
-<fputc_unfiltered,,13495,,1257346705306503151;
-<ui_file_write,,13496,,1257346705306522877;
-<stdio_file_write,,13497,,1257346705306542425;
-<ui_file_data,,13498,,1257346705306564151;
->ui_file_data,,1257346705306571227;
->stdio_file_write,,1257346705306575937;
->ui_file_write,,1257346705306579627;
->fputc_unfiltered,,1257346705306584258;
-<fputc_unfiltered,,13499,,1257346705306601945;
-<ui_file_write,,13500,,1257346705306621595;
-<stdio_file_write,,13501,,1257346705306640720;
-<ui_file_data,,13502,,1257346705306661558;
->ui_file_data,,1257346705306668571;
->stdio_file_write,,1257346705306673368;
->ui_file_write,,1257346705306676956;
->fputc_unfiltered,,1257346705306681591;
-<fputc_unfiltered,,13503,,1257346705306699181;
-<ui_file_write,,13504,,1257346705306718669;
-<stdio_file_write,,13505,,1257346705306742971;
-<ui_file_data,,13506,,1257346705306763346;
->ui_file_data,,1257346705306770437;
->stdio_file_write,,1257346705306775195;
->ui_file_write,,1257346705306778789;
->fputc_unfiltered,,1257346705306783430;
-<fputc_unfiltered,,13507,,1257346705306800758;
-<ui_file_write,,13508,,1257346705306820559;
-<stdio_file_write,,13509,,1257346705306839912;
-<ui_file_data,,13510,,1257346705306860474;
->ui_file_data,,1257346705306867550;
->stdio_file_write,,1257346705306872281;
->ui_file_write,,1257346705306875881;
->fputc_unfiltered,,1257346705306880531;
-<fputc_unfiltered,,13511,,1257346705306897793;
-<ui_file_write,,13512,,1257346705306917188;
-<stdio_file_write,,13513,,1257346705306936631;
-<ui_file_data,,13514,,1257346705306956904;
->ui_file_data,,1257346705306964053;
->stdio_file_write,,1257346705306968747;
->ui_file_write,,1257346705306972335;
->fputc_unfiltered,,1257346705306976958;
-<fputc_unfiltered,,13515,,1257346705306994172;
-<ui_file_write,,13516,,1257346705307013699;
-<stdio_file_write,,13517,,1257346705307032733;
-<ui_file_data,,13518,,1257346705307052604;
->ui_file_data,,1257346705307059662;
->stdio_file_write,,1257346705307064357;
->ui_file_write,,1257346705307067914;
->fputc_unfiltered,,1257346705307072603;
-<fputc_unfiltered,,13519,,1257346705307089763;
-<ui_file_write,,13520,,1257346705307109603;
-<stdio_file_write,,13521,,1257346705307128797;
-<ui_file_data,,13522,,1257346705307148730;
->ui_file_data,,1257346705307155782;
->stdio_file_write,,1257346705307160480;
->ui_file_write,,1257346705307164077;
->fputc_unfiltered,,1257346705307168708;
-<fputc_unfiltered,,13523,,1257346705307186365;
-<ui_file_write,,13524,,1257346705307206160;
-<stdio_file_write,,13525,,1257346705307225119;
-<ui_file_data,,13526,,1257346705307245332;
->ui_file_data,,1257346705307252498;
->stdio_file_write,,1257346705307257178;
->ui_file_write,,1257346705307260730;
->fputc_unfiltered,,1257346705307265391;
-<fputc_unfiltered,,13527,,1257346705307283402;
-<ui_file_write,,13528,,1257346705307303498;
-<stdio_file_write,,13529,,1257346705307322926;
-<ui_file_data,,13530,,1257346705307343638;
->ui_file_data,,1257346705307350697;
->stdio_file_write,,1257346705307355379;
->ui_file_write,,1257346705307358931;
->fputc_unfiltered,,1257346705307363511;
-<fputc_unfiltered,,13531,,1257346705307380747;
-<ui_file_write,,13532,,1257346705307400536;
-<stdio_file_write,,13533,,1257346705307419765;
-<ui_file_data,,13534,,1257346705307440228;
->ui_file_data,,1257346705307447262;
->stdio_file_write,,1257346705307451966;
->ui_file_write,,1257346705307455566;
->fputc_unfiltered,,1257346705307460194;
-<fputc_unfiltered,,13535,,1257346705307477652;
-<ui_file_write,,13536,,1257346705307497387;
-<stdio_file_write,,13537,,1257346705307516358;
-<ui_file_data,,13538,,1257346705307536703;
->ui_file_data,,1257346705307543759;
->stdio_file_write,,1257346705307548492;
->ui_file_write,,1257346705307552089;
->fputc_unfiltered,,1257346705307556718;
-<fputc_unfiltered,,13539,,1257346705307574579;
-<ui_file_write,,13540,,1257346705307594326;
-<stdio_file_write,,13541,,1257346705307613543;
-<ui_file_data,,13542,,1257346705307633942;
->ui_file_data,,1257346705307641016;
->stdio_file_write,,1257346705307645701;
->ui_file_write,,1257346705307649298;
->fputc_unfiltered,,1257346705307653936;
-<fputc_unfiltered,,13543,,1257346705307671797;
-<ui_file_write,,13544,,1257346705307691381;
-<stdio_file_write,,13545,,1257346705307710409;
-<ui_file_data,,13546,,1257346705307735289;
->ui_file_data,,1257346705307742910;
->stdio_file_write,,1257346705307747686;
->ui_file_write,,1257346705307751280;
->fputc_unfiltered,,1257346705307755911;
-<fputc_unfiltered,,13547,,1257346705307773351;
-<ui_file_write,,13548,,1257346705307793014;
-<stdio_file_write,,13549,,1257346705307812715;
-<ui_file_data,,13550,,1257346705307833785;
->ui_file_data,,1257346705307840832;
->stdio_file_write,,1257346705307845602;
->ui_file_write,,1257346705307849205;
->fputc_unfiltered,,1257346705307853830;
-<fputc_unfiltered,,13551,,1257346705307872395;
-<ui_file_write,,13552,,1257346705307893209;
-<stdio_file_write,,13553,,1257346705307914273;
-<ui_file_data,,13554,,1257346705307936143;
->ui_file_data,,1257346705307943352;
->stdio_file_write,,1257346705307948077;
->ui_file_write,,1257346705307951674;
->fputc_unfiltered,,1257346705307956323;
-<fputc_unfiltered,,13555,,1257346705307976801;
-<ui_file_write,,13556,,1257346705307996872;
-<stdio_file_write,,13557,,1257346705308015939;
-<ui_file_data,,13558,,1257346705308036005;
->ui_file_data,,1257346705308043072;
->stdio_file_write,,1257346705308047767;
->ui_file_write,,1257346705308051358;
->fputc_unfiltered,,1257346705308055986;
-<fputc_unfiltered,,13559,,1257346705308073586;
-<ui_file_write,,13560,,1257346705308093648;
-<stdio_file_write,,13561,,1257346705308112812;
-<ui_file_data,,13562,,1257346705308132567;
->ui_file_data,,1257346705308139650;
->stdio_file_write,,1257346705308144362;
->ui_file_write,,1257346705308147956;
->fputc_unfiltered,,1257346705308152558;
-<fputc_unfiltered,,13563,,1257346705308169682;
-<ui_file_write,,13564,,1257346705308189041;
-<stdio_file_write,,13565,,1257346705308207696;
-<ui_file_data,,13566,,1257346705308227377;
->ui_file_data,,1257346705308234447;
->stdio_file_write,,1257346705308239106;
->ui_file_write,,1257346705308242657;
->fputc_unfiltered,,1257346705308247274;
-<fputc_unfiltered,,13567,,1257346705308264488;
-<ui_file_write,,13568,,1257346705308284133;
-<stdio_file_write,,13569,,1257346705308302968;
-<ui_file_data,,13570,,1257346705308323049;
->ui_file_data,,1257346705308330032;
->stdio_file_write,,1257346705308334721;
->ui_file_write,,1257346705308338251;
->fputc_unfiltered,,1257346705308342922;
-<fputc_unfiltered,,13571,,1257346705308360085;
-<ui_file_write,,13572,,1257346705308379859;
-<stdio_file_write,,13573,,1257346705308398674;
-<ui_file_data,,13574,,1257346705308418393;
->ui_file_data,,1257346705308426062;
->stdio_file_write,,1257346705308430880;
->ui_file_write,,1257346705308434456;
->fputc_unfiltered,,1257346705308439048;
-<fputc_unfiltered,,13575,,1257346705308456062;
-<ui_file_write,,13576,,1257346705308475336;
-<stdio_file_write,,13577,,1257346705308494328;
-<ui_file_data,,13578,,1257346705308514009;
->ui_file_data,,1257346705308521070;
->stdio_file_write,,1257346705308525768;
->ui_file_write,,1257346705308529361;
->fputc_unfiltered,,1257346705308533951;
-<fputc_unfiltered,,13579,,1257346705308551499;
-<ui_file_write,,13580,,1257346705308570885;
-<stdio_file_write,,13581,,1257346705308589748;
-<ui_file_data,,13582,,1257346705308609717;
->ui_file_data,,1257346705308616811;
->stdio_file_write,,1257346705308621494;
->ui_file_write,,1257346705308625091;
->fputc_unfiltered,,1257346705308629716;
-<fputc_unfiltered,,13583,,1257346705308646720;
-<ui_file_write,,13584,,1257346705308666260;
-<stdio_file_write,,13585,,1257346705308685465;
-<ui_file_data,,13586,,1257346705308705675;
->ui_file_data,,1257346705308712724;
->stdio_file_write,,1257346705308717446;
->ui_file_write,,1257346705308721046;
->fputc_unfiltered,,1257346705308730113;
-<fputc_unfiltered,,13587,,1257346705308747454;
-<ui_file_write,,13588,,1257346705308767405;
-<stdio_file_write,,13589,,1257346705308786575;
-<ui_file_data,,13590,,1257346705308806240;
->ui_file_data,,1257346705308813317;
->stdio_file_write,,1257346705308818056;
->ui_file_write,,1257346705308821653;
->fputc_unfiltered,,1257346705308826234;
-<fputc_unfiltered,,13591,,1257346705308843833;
-<ui_file_write,,13592,,1257346705308863442;
-<stdio_file_write,,13593,,1257346705308882235;
-<ui_file_data,,13594,,1257346705308901883;
->ui_file_data,,1257346705308908875;
->stdio_file_write,,1257346705308913572;
->ui_file_write,,1257346705308917157;
->fputc_unfiltered,,1257346705308921774;
-<fputc_unfiltered,,13595,,1257346705308939036;
-<ui_file_write,,13596,,1257346705308958311;
-<stdio_file_write,,13597,,1257346705308977083;
-<ui_file_data,,13598,,1257346705308997161;
->ui_file_data,,1257346705309004156;
->stdio_file_write,,1257346705309008815;
->ui_file_write,,1257346705309012366;
->fputc_unfiltered,,1257346705309016998;
-<fputc_unfiltered,,13599,,1257346705309034375;
-<ui_file_write,,13600,,1257346705309053776;
-<stdio_file_write,,13601,,1257346705309072759;
-<ui_file_data,,13602,,1257346705309092644;
->ui_file_data,,1257346705309099654;
->stdio_file_write,,1257346705309104418;
->ui_file_write,,1257346705309108096;
->fputc_unfiltered,,1257346705309112724;
-<fputc_unfiltered,,13603,,1257346705309129828;
-<ui_file_write,,13604,,1257346705309152040;
-<stdio_file_write,,13605,,1257346705309173026;
-<ui_file_data,,13606,,1257346705309197344;
->ui_file_data,,1257346705309204571;
->stdio_file_write,,1257346705309209266;
->ui_file_write,,1257346705309212851;
->fputc_unfiltered,,1257346705309217425;
-<fputc_unfiltered,,13607,,1257346705309236570;
-<ui_file_write,,13608,,1257346705309257445;
-<stdio_file_write,,13609,,1257346705309276659;
-<ui_file_data,,13610,,1257346705309296622;
->ui_file_data,,1257346705309303708;
->stdio_file_write,,1257346705309308415;
->ui_file_write,,1257346705309312012;
->fputc_unfiltered,,1257346705309316607;
-<fputc_unfiltered,,13611,,1257346705309334802;
-<ui_file_write,,13612,,1257346705309355105;
-<stdio_file_write,,13613,,1257346705309374545;
-<ui_file_data,,13614,,1257346705309394698;
->ui_file_data,,1257346705309401744;
->stdio_file_write,,1257346705309406454;
->ui_file_write,,1257346705309410048;
->fputc_unfiltered,,1257346705309414721;
-<fputc_unfiltered,,13615,,1257346705309432411;
-<ui_file_write,,13616,,1257346705309452368;
-<stdio_file_write,,13617,,1257346705309471793;
-<ui_file_data,,13618,,1257346705309491883;
->ui_file_data,,1257346705309498926;
->stdio_file_write,,1257346705309503636;
->ui_file_write,,1257346705309507224;
->fputc_unfiltered,,1257346705309511813;
-<fputc_unfiltered,,13619,,1257346705309530026;
-<ui_file_write,,13620,,1257346705309549983;
-<stdio_file_write,,13621,,1257346705309569029;
-<ui_file_data,,13622,,1257346705309589266;
->ui_file_data,,1257346705309596289;
->stdio_file_write,,1257346705309600995;
->ui_file_write,,1257346705309604715;
->fputc_unfiltered,,1257346705309609461;
-<fputc_unfiltered,,13623,,1257346705309627229;
-<ui_file_write,,13624,,1257346705309646732;
-<stdio_file_write,,13625,,1257346705309665766;
-<ui_file_data,,13626,,1257346705309685994;
->ui_file_data,,1257346705309693062;
->stdio_file_write,,1257346705309697777;
->ui_file_write,,1257346705309701374;
->fputc_unfiltered,,1257346705309706018;
-<fputc_unfiltered,,13627,,1257346705309723930;
-<ui_file_write,,13628,,1257346705309748590;
-<stdio_file_write,,13629,,1257346705309768081;
-<ui_file_data,,13630,,1257346705309788300;
->ui_file_data,,1257346705309795347;
->stdio_file_write,,1257346705309800107;
->ui_file_write,,1257346705309803701;
->fputc_unfiltered,,1257346705309808351;
-<fputc_unfiltered,,13631,,1257346705309826347;
-<ui_file_write,,13632,,1257346705309846073;
-<stdio_file_write,,13633,,1257346705309865206;
-<ui_file_data,,13634,,1257346705309885774;
->ui_file_data,,1257346705309892841;
->stdio_file_write,,1257346705309897545;
->ui_file_write,,1257346705309901142;
->fputc_unfiltered,,1257346705309905734;
-<fputc_unfiltered,,13635,,1257346705309923466;
-<ui_file_write,,13636,,1257346705309943038;
-<stdio_file_write,,13637,,1257346705309962169;
-<ui_file_data,,13638,,1257346705309982183;
->ui_file_data,,1257346705309989326;
->stdio_file_write,,1257346705309994035;
->ui_file_write,,1257346705309997716;
->fputc_unfiltered,,1257346705310002306;
-<fputc_unfiltered,,13639,,1257346705310019770;
-<ui_file_write,,13640,,1257346705310039249;
-<stdio_file_write,,13641,,1257346705310058322;
-<ui_file_data,,13642,,1257346705310078252;
->ui_file_data,,1257346705310085335;
->stdio_file_write,,1257346705310090020;
->ui_file_write,,1257346705310093696;
->fputc_unfiltered,,1257346705310098426;
-<fputc_unfiltered,,13643,,1257346705310116257;
-<ui_file_write,,13644,,1257346705310136034;
-<stdio_file_write,,13645,,1257346705310155360;
-<ui_file_data,,13646,,1257346705310175600;
->ui_file_data,,1257346705310182625;
->stdio_file_write,,1257346705310187308;
->ui_file_write,,1257346705310190868;
->fputc_unfiltered,,1257346705310195503;
->fputs_maybe_filtered,,1257346705310200234;
-<do_cleanups,,13647,,1257346705310219689;
-<do_my_cleanups,,13648,,1257346705310241763;
-<xfree,,13649,,1257346705310265074;
->xfree,,1257346705310272310;
-<xfree,,13650,,1257346705310289882;
->xfree,,1257346705310296601;
->do_my_cleanups,,1257346705310301220;
->do_cleanups,,1257346705310304772;
->vfprintf_maybe_filtered,,1257346705310309863;
->vfprintf_filtered,,1257346705310313602;
->fprintf_filtered,,1257346705310318332;
->print_gdb_version,,1257346705310323382;
-<wrap_here,,13651,,1257346705310342413;
->wrap_here,,1257346705310349564;
-<printf_filtered,,13652,,1257346705310370036;
-<vfprintf_filtered,,13653,,1257346705310396372;
-<vfprintf_maybe_filtered,,13654,,1257346705310421120;
-<xstrvprintf,,13655,,1257346705310440741;
->xstrvprintf,,1257346705310449853;
-<make_cleanup,,13656,,1257346705310466827;
-<make_my_cleanup,,13657,,1257346705310485717;
-<make_my_cleanup2,,13658,,1257346705310504871;
-<xmalloc,,13659,,1257346705310523809;
->xmalloc,,1257346705310530777;
->make_my_cleanup2,,1257346705310535454;
->make_my_cleanup,,1257346705310540229;
->make_cleanup,,1257346705310544948;
-<fputs_maybe_filtered,,13660,,1257346705310567519;
-<wrap_here,,13661,,1257346705310588129;
->wrap_here,,1257346705310595112;
-<fputc_unfiltered,,13662,,1257346705310612657;
-<ui_file_write,,13663,,1257346705310631857;
-<stdio_file_write,,13664,,1257346705310650018;
-<ui_file_data,,13665,,1257346705310669777;
->ui_file_data,,1257346705310676764;
->stdio_file_write,,1257346705310840207;
->ui_file_write,,1257346705310844307;
->fputc_unfiltered,,1257346705310849212;
->fputs_maybe_filtered,,1257346705310854017;
-<do_cleanups,,13666,,1257346705310873012;
-<do_my_cleanups,,13667,,1257346705310894167;
-<xfree,,13668,,1257346705310916106;
->xfree,,1257346705310923288;
-<xfree,,13669,,1257346705310940448;
->xfree,,1257346705310947296;
->do_my_cleanups,,1257346705310951879;
->do_cleanups,,1257346705310955380;
->vfprintf_maybe_filtered,,1257346705310960141;
->vfprintf_filtered,,1257346705310963822;
->printf_filtered,,1257346705310968637;
-<gdb_flush,,13670,,1257346705310988407;
-<stdio_file_flush,,13671,,1257346705311011162;
-<ui_file_data,,13672,,1257346705311031922;
->ui_file_data,,1257346705311039104;
->stdio_file_flush,,1257346705311049497;
->gdb_flush,,1257346705311053079;
-<xfree,,13673,,1257346705311076266;
->xfree,,1257346705311083484;
-<xfree,,13674,,1257346705311102642;
->xfree,,1257346705311109748;
-<init_history,,13675,,1257346705311128145;
-<stifle_history,,13676,,1257346705311143227;
->stifle_history,,1257346705311152556;
-<concat,,13677,,1257346705311158087;
-<xmalloc,,13678,,1257346705311177530;
->xmalloc,,1257346705311184636;
->concat,,1257346705311189668;
-<read_history,,13679,,1257346705311196874;
-<read_history_range,,13680,,1257346705311208142;
-<history_filename,,13681,,1257346705311219544;
-<xmalloc,,13682,,1257346705311239350;
->xmalloc,,1257346705311246394;
->history_filename,,1257346705311251338;
->read_history_range,,1257346705311277202;
->read_history,,1257346705311282158;
->init_history,,1257346705311286868;
-<catch_errors,,13683,,1257346705311299339;
-<exceptions_state_mc_init,,13684,,1257346705311316801;
-<xzalloc,,13685,,1257346705311340629;
-<xcalloc,,13686,,1257346705311360057;
->xcalloc,,1257346705311367819;
->xzalloc,,1257346705311372366;
-<save_cleanups,,13687,,1257346705311390374;
->save_cleanups,,1257346705311399075;
->exceptions_state_mc_init,,1257346705311404338;
-<exceptions_state_mc_action_iter,,13688,,1257346705311417802;
-<exceptions_state_mc,,13689,,1257346705311433582;
->exceptions_state_mc,,1257346705311442258;
->exceptions_state_mc_action_iter,,1257346705311446469;
-<exceptions_state_mc_action_iter_1,,13690,,1257346705311460417;
-<exceptions_state_mc,,13691,,1257346705311475175;
->exceptions_state_mc,,1257346705311482543;
->exceptions_state_mc_action_iter_1,,1257346705311486696;
-<captured_command_loop,,13692,,1257346705311504040;
-<current_interp_command_loop,,13693,,1257346705311520103;
-<tui_command_loop,,13694,,1257346705311537946;
-<get_prompt,,13695,,1257346705311554457;
->get_prompt,,1257346705311563157;
-<rl_callback_handler_install,,13696,,1257346705311571650;
-<rl_set_prompt,,13697,,1257346705311583578;
-<xmalloc,,13698,,1257346705311602368;
->xmalloc,,1257346705311609547;
-<rl_expand_prompt,,13699,,1257346705311617110;
-<expand_prompt,,13700,,1257346705311630352;
-<xmalloc,,13701,,1257346705311654081;
->xmalloc,,1257346705311661557;
-<_rl_find_next_mbchar,,13702,,1257346705311668664;
-<_rl_adjust_point,,13703,,1257346705311679379;
->_rl_adjust_point,,1257346705311688083;
->_rl_find_next_mbchar,,1257346705311740210;
-<_rl_col_width,,13704,,1257346705311748107;
->_rl_col_width,,1257346705311757367;
-<_rl_find_next_mbchar,,13705,,1257346705311763968;
-<_rl_adjust_point,,13706,,1257346705311772970;
->_rl_adjust_point,,1257346705311780088;
->_rl_find_next_mbchar,,1257346705311785080;
-<_rl_col_width,,13707,,1257346705311791622;
->_rl_col_width,,1257346705311798668;
-<_rl_find_next_mbchar,,13708,,1257346705311804776;
-<_rl_adjust_point,,13709,,1257346705311812965;
->_rl_adjust_point,,1257346705311820123;
->_rl_find_next_mbchar,,1257346705311825043;
-<_rl_col_width,,13710,,1257346705311831317;
->_rl_col_width,,1257346705311838360;
-<_rl_find_next_mbchar,,13711,,1257346705311844471;
-<_rl_adjust_point,,13712,,1257346705311852808;
->_rl_adjust_point,,1257346705311859953;
->_rl_find_next_mbchar,,1257346705311864861;
-<_rl_col_width,,13713,,1257346705311870954;
->_rl_col_width,,1257346705311877977;
-<_rl_find_next_mbchar,,13714,,1257346705311884103;
-<_rl_adjust_point,,13715,,1257346705311892337;
->_rl_adjust_point,,1257346705311899558;
->_rl_find_next_mbchar,,1257346705311904505;
-<_rl_col_width,,13716,,1257346705311910590;
->_rl_col_width,,1257346705311917630;
-<_rl_find_next_mbchar,,13717,,1257346705311923879;
-<_rl_adjust_point,,13718,,1257346705311931930;
->_rl_adjust_point,,1257346705311939172;
->_rl_find_next_mbchar,,1257346705311944179;
-<_rl_col_width,,13719,,1257346705311950711;
->_rl_col_width,,1257346705311957914;
->expand_prompt,,1257346705311962618;
->rl_expand_prompt,,1257346705311967346;
->rl_set_prompt,,1257346705311972374;
-<_rl_callback_newline,,13720,,1257346705311978383;
-<rl_initialize,,13721,,1257346705311990707;
-<_rl_start_using_history,,13722,,1257346705312000893;
-<using_history,,13723,,1257346705312010204;
->using_history,,1257346705312017290;
->_rl_start_using_history,,1257346705312022499;
-<rl_reset_line_state,,13724,,1257346705312029581;
-<rl_on_new_line,,13725,,1257346705312039025;
->rl_on_new_line,,1257346705312046330;
->rl_reset_line_state,,1257346705312051343;
-<_rl_set_insert_mode,,13726,,1257346705312058480;
->_rl_set_insert_mode,,1257346705312065613;
->rl_initialize,,1257346705312070428;
-<rl_prep_terminal,,13727,,1257346705312078278;
-<_rl_block_sigint,,13728,,1257346705312089468;
->_rl_block_sigint,,1257346705312100524;
-<get_tty_settings,,13729,,1257346705312107729;
-<_get_tty_settings,,13730,,1257346705312120707;
->_get_tty_settings,,1257346705312129810;
->get_tty_settings,,1257346705312134751;
-<rl_tty_unset_default_bindings,,13731,,1257346705312142525;
->rl_tty_unset_default_bindings,,1257346705312151719;
-<_set_tty_settings,,13732,,1257346705312157963;
->_set_tty_settings,,1257346705312170729;
-<_rl_release_sigint,,13733,,1257346705312179057;
->_rl_release_sigint,,1257346705312188283;
->rl_prep_terminal,,1257346705312193170;
-<rl_set_signals,,13734,,1257346705312201564;
-<rl_maybe_set_sighandler,,13735,,1257346705312213101;
-<rl_set_sighandler,,13736,,1257346705312223551;
->rl_set_sighandler,,1257346705312233786;
->rl_maybe_set_sighandler,,1257346705312239040;
-<rl_maybe_set_sighandler,,13737,,1257346705312245256;
-<rl_set_sighandler,,13738,,1257346705312253084;
->rl_set_sighandler,,1257346705312260973;
->rl_maybe_set_sighandler,,1257346705312265947;
-<rl_maybe_set_sighandler,,13739,,1257346705312271932;
-<rl_set_sighandler,,13740,,1257346705312279808;
->rl_set_sighandler,,1257346705312287607;
->rl_maybe_set_sighandler,,1257346705312292509;
-<rl_set_sighandler,,13741,,1257346705312297718;
->rl_set_sighandler,,1257346705312305411;
-<rl_maybe_set_sighandler,,13742,,1257346705312311783;
-<rl_set_sighandler,,13743,,1257346705312319377;
->rl_set_sighandler,,1257346705312327160;
->rl_maybe_set_sighandler,,1257346705312332135;
-<rl_maybe_set_sighandler,,13744,,1257346705312338288;
-<rl_set_sighandler,,13745,,1257346705312345788;
->rl_set_sighandler,,1257346705312353460;
->rl_maybe_set_sighandler,,1257346705312358423;
-<rl_maybe_set_sighandler,,13746,,1257346705312364419;
-<rl_set_sighandler,,13747,,1257346705312371992;
->rl_set_sighandler,,1257346705312379754;
->rl_maybe_set_sighandler,,1257346705312384759;
-<rl_maybe_set_sighandler,,13748,,1257346705312390972;
-<rl_set_sighandler,,13749,,1257346705312398425;
->rl_set_sighandler,,1257346705312406081;
->rl_maybe_set_sighandler,,1257346705312411014;
->rl_set_signals,,1257346705312415684;
-<readline_internal_setup,,13750,,1257346705312423533;
-<_rl_strip_prompt,,13751,,1257346705312434589;
-<expand_prompt,,13752,,1257346705312445262;
-<xmalloc,,13753,,1257346705312462287;
->xmalloc,,1257346705312469445;
-<_rl_find_next_mbchar,,13754,,1257346705312475827;
-<_rl_adjust_point,,13755,,1257346705312484389;
->_rl_adjust_point,,1257346705312491559;
->_rl_find_next_mbchar,,1257346705312496749;
-<_rl_col_width,,13756,,1257346705312503763;
->_rl_col_width,,1257346705312510863;
-<_rl_find_next_mbchar,,13757,,1257346705312516872;
-<_rl_adjust_point,,13758,,1257346705312525016;
->_rl_adjust_point,,1257346705312532255;
->_rl_find_next_mbchar,,1257346705312537166;
-<_rl_col_width,,13759,,1257346705312543157;
->_rl_col_width,,1257346705312550246;
-<_rl_find_next_mbchar,,13760,,1257346705312556200;
-<_rl_adjust_point,,13761,,1257346705312564338;
->_rl_adjust_point,,1257346705312571562;
->_rl_find_next_mbchar,,1257346705312576476;
-<_rl_col_width,,13762,,1257346705312582398;
->_rl_col_width,,1257346705312589483;
-<_rl_find_next_mbchar,,13763,,1257346705312595414;
-<_rl_adjust_point,,13764,,1257346705312603603;
->_rl_adjust_point,,1257346705312610803;
->_rl_find_next_mbchar,,1257346705312615720;
-<_rl_col_width,,13765,,1257346705312621576;
->_rl_col_width,,1257346705312628712;
-<_rl_find_next_mbchar,,13766,,1257346705312634676;
-<_rl_adjust_point,,13767,,1257346705312642850;
->_rl_adjust_point,,1257346705312650062;
->_rl_find_next_mbchar,,1257346705312655169;
-<_rl_col_width,,13768,,1257346705312661123;
->_rl_col_width,,1257346705312668251;
-<_rl_find_next_mbchar,,13769,,1257346705312674178;
-<_rl_adjust_point,,13770,,1257346705312682395;
->_rl_adjust_point,,1257346705312689700;
->_rl_find_next_mbchar,,1257346705312694692;
-<_rl_col_width,,13771,,1257346705312701167;
->_rl_col_width,,1257346705312708352;
->expand_prompt,,1257346705312713065;
->_rl_strip_prompt,,1257346705312717892;
->readline_internal_setup,,1257346705312797312;
->_rl_callback_newline,,1257346705312801874;
->rl_callback_handler_install,,1257346705312806004;
-<catch_errors,,13772,,1257346705312816581;
-<exceptions_state_mc_init,,13773,,1257346705312830448;
-<xzalloc,,13774,,1257346705312849819;
-<xcalloc,,13775,,1257346705312866299;
->xcalloc,,1257346705312873605;
->xzalloc,,1257346705312878137;
-<save_cleanups,,13776,,1257346705312894635;
->save_cleanups,,1257346705312901959;
->exceptions_state_mc_init,,1257346705312906864;
-<exceptions_state_mc_action_iter,,13777,,1257346705312918337;
-<exceptions_state_mc,,13778,,1257346705312931386;
->exceptions_state_mc,,1257346705312938794;
->exceptions_state_mc_action_iter,,1257346705312942872;
-<exceptions_state_mc_action_iter_1,,13779,,1257346705312955764;
-<exceptions_state_mc,,13780,,1257346705312968492;
->exceptions_state_mc,,1257346705312975668;
->exceptions_state_mc_action_iter_1,,1257346705312979884;
-<gdb_do_one_event,,13781,,1257346705312990296;
-<process_event,,13782,,1257346705313004653;
->process_event,,1257346705313014244;
-<gdb_wait_for_event,,13783,,1257346705313024869;
-<gdb_flush,,13784,,1257346705313043936;
-<stdio_file_flush,,13785,,1257346705313061451;
-<ui_file_data,,13786,,1257346705313079114;
->ui_file_data,,1257346705313086359;
->stdio_file_flush,,1257346705313091192;
->gdb_flush,,1257346705313094768;
-<gdb_flush,,13787,,1257346705313109949;
-<stdio_file_flush,,13788,,1257346705313127847;
-<ui_file_data,,13789,,1257346705313145623;
->ui_file_data,,1257346705313152667;
->stdio_file_flush,,1257346705313157362;
->gdb_flush,,1257346705313160841;
->gdb_wait_for_event,,1257346705313168203;
-<process_event,,13790,,1257346705313178113;
->process_event,,1257346705313185279;
-<gdb_wait_for_event,,13791,,1257346705313195493;
-<gdb_flush,,13792,,1257346705313213035;
-<stdio_file_flush,,13793,,1257346705313230502;
-<ui_file_data,,13794,,1257346705313247936;
->ui_file_data,,1257346705313254989;
->stdio_file_flush,,1257346705313259722;
->gdb_flush,,1257346705313263229;
-<gdb_flush,,13795,,1257346705313278203;
-<stdio_file_flush,,13796,,1257346705313296022;
-<ui_file_data,,13797,,1257346705313313387;
->ui_file_data,,1257346705313320394;
->stdio_file_flush,,1257346705313325158;
->gdb_flush,,1257346705313328647;
-<xmalloc,,13798,,1257346707527431978;
->xmalloc,,1257346707527448500;
->gdb_wait_for_event,,1257346707527454259;
-<process_event,,13799,,1257346707527470512;
-<xfree,,13800,,1257346707527500397;
->xfree,,1257346707527508102;
-<handle_file_event,,13801,,1257346707527525211;
-<stdin_event_handler,,13802,,1257346707527545914;
-<rl_callback_read_char_wrapper,,13803,,1257346707527566337;
-<rl_callback_read_char,,13804,,1257346707527579600;
-<readline_internal_char,,13805,,1257346707527595004;
-<_rl_reset_argument,,13806,,1257346707527609013;
->_rl_reset_argument,,1257346707527618450;
-<rl_read_key,,13807,,1257346707527628095;
-<_rl_next_macro_key,,13808,,1257346707527640314;
->_rl_next_macro_key,,1257346707527649141;
-<rl_getc,,13809,,1257346707527657577;
->rl_getc,,1257346707527677805;
->rl_read_key,,1257346707527682800;
-<_rl_dispatch,,13810,,1257346707527691843;
-<_rl_dispatch_subseq,,13811,,1257346707527705686;
-<rl_insert,,13812,,1257346707527717202;
-<_rl_insert_char,,13813,,1257346707527735693;
-<rl_insert_text,,13814,,1257346707527748962;
-<rl_add_undo,,13815,,1257346707527761290;
-<xmalloc,,13816,,1257346707527785737;
->xmalloc,,1257346707527792853;
->rl_add_undo,,1257346707527797608;
->rl_insert_text,,1257346707527802389;
->_rl_insert_char,,1257346707527807021;
->rl_insert,,1257346707527810596;
->_rl_dispatch_subseq,,1257346707527815574;
->_rl_dispatch,,1257346707527820371;
-<_rl_internal_char_cleanup,,13817,,1257346707527828446;
-<rl_redisplay,,13818,,1257346707527839946;
->rl_redisplay,,1257346707527848304;
->_rl_internal_char_cleanup,,1257346707527853474;
->readline_internal_char,,1257346707527858397;
-<_rl_pushed_input_available,,13819,,1257346707527867124;
->_rl_pushed_input_available,,1257346707527875542;
->rl_callback_read_char,,1257346707527880429;
->rl_callback_read_char_wrapper,,1257346707527885614;
->stdin_event_handler,,1257346707527889502;
->handle_file_event,,1257346707527894263;
->process_event,,1257346707527898937;
->gdb_do_one_event,,1257346707527903610;
-<exceptions_state_mc_action_iter_1,,13820,,1257346707527920223;
-<exceptions_state_mc,,13821,,1257346707527936719;
->exceptions_state_mc,,1257346707527944250;
->exceptions_state_mc_action_iter_1,,1257346707527948535;
-<exceptions_state_mc_action_iter,,13822,,1257346707527963247;
-<exceptions_state_mc,,13823,,1257346707527977539;
-<catcher_pop,,13824,,1257346707527992221;
-<restore_cleanups,,13825,,1257346707528016969;
->restore_cleanups,,1257346707528025474;
-<xfree,,13826,,1257346707528047459;
->xfree,,1257346707528054917;
->catcher_pop,,1257346707528059530;
->exceptions_state_mc,,1257346707528064243;
->exceptions_state_mc_action_iter,,1257346707528068270;
-<print_any_exception,,13827,,1257346707528080637;
->print_any_exception,,1257346707528089048;
->catch_errors,,1257346707528093767;
-<catch_errors,,13828,,1257346707528106997;
-<exceptions_state_mc_init,,13829,,1257346707528122437;
-<xzalloc,,13830,,1257346707528144794;
-<xcalloc,,13831,,1257346707528164174;
->xcalloc,,1257346707528171647;
->xzalloc,,1257346707528176303;
-<save_cleanups,,13832,,1257346707528196447;
->save_cleanups,,1257346707528203418;
->exceptions_state_mc_init,,1257346707528208380;
-<exceptions_state_mc_action_iter,,13833,,1257346707528221724;
-<exceptions_state_mc,,13834,,1257346707528235182;
->exceptions_state_mc,,1257346707528242427;
->exceptions_state_mc_action_iter,,1257346707528246514;
-<exceptions_state_mc_action_iter_1,,13835,,1257346707528259515;
-<exceptions_state_mc,,13836,,1257346707528271825;
->exceptions_state_mc,,1257346707528278877;
->exceptions_state_mc_action_iter_1,,1257346707528283061;
-<gdb_do_one_event,,13837,,1257346707528294002;
-<process_event,,13838,,1257346707528307989;
->process_event,,1257346707528315062;
-<gdb_wait_for_event,,13839,,1257346707528326340;
-<gdb_flush,,13840,,1257346707528346183;
-<stdio_file_flush,,13841,,1257346707528366177;
-<ui_file_data,,13842,,1257346707528387114;
->ui_file_data,,1257346707528394444;
->stdio_file_flush,,1257346707528399968;
->gdb_flush,,1257346707528403541;
-<gdb_flush,,13843,,1257346707528420220;
-<stdio_file_flush,,13844,,1257346707528438848;
-<ui_file_data,,13845,,1257346707528458574;
->ui_file_data,,1257346707528465395;
->stdio_file_flush,,1257346707528470131;
->gdb_flush,,1257346707528473620;
-<xmalloc,,13846,,1257346707528492432;
->xmalloc,,1257346707528499463;
->gdb_wait_for_event,,1257346707528504194;
-<process_event,,13847,,1257346707528515008;
-<xfree,,13848,,1257346707528536286;
->xfree,,1257346707528542995;
-<handle_file_event,,13849,,1257346707528554598;
-<stdin_event_handler,,13850,,1257346707528568697;
-<rl_callback_read_char_wrapper,,13851,,1257346707528582161;
-<rl_callback_read_char,,13852,,1257346707528591223;
-<readline_internal_char,,13853,,1257346707528600985;
-<_rl_reset_argument,,13854,,1257346707528610470;
->_rl_reset_argument,,1257346707528617495;
-<rl_read_key,,13855,,1257346707528624268;
-<_rl_next_macro_key,,13856,,1257346707528632969;
->_rl_next_macro_key,,1257346707528639760;
-<rl_getc,,13857,,1257346707528645877;
->rl_getc,,1257346707528654123;
->rl_read_key,,1257346707528658821;
-<_rl_dispatch,,13858,,1257346707528665765;
-<_rl_dispatch_subseq,,13859,,1257346707528676074;
-<rl_insert,,13860,,1257346707528684979;
-<_rl_insert_char,,13861,,1257346707528693947;
-<rl_insert_text,,13862,,1257346707528702416;
->rl_insert_text,,1257346707528709562;
->_rl_insert_char,,1257346707528714266;
->rl_insert,,1257346707528717826;
->_rl_dispatch_subseq,,1257346707528722587;
->_rl_dispatch,,1257346707528732290;
-<_rl_internal_char_cleanup,,13863,,1257346707528739556;
-<rl_redisplay,,13864,,1257346707528748897;
->rl_redisplay,,1257346707528755678;
->_rl_internal_char_cleanup,,1257346707528760680;
->readline_internal_char,,1257346707528765531;
-<_rl_pushed_input_available,,13865,,1257346707528773037;
->_rl_pushed_input_available,,1257346707528780162;
->rl_callback_read_char,,1257346707528785064;
->rl_callback_read_char_wrapper,,1257346707528790129;
->stdin_event_handler,,1257346707528793942;
->handle_file_event,,1257346707528798513;
->process_event,,1257346707528803093;
->gdb_do_one_event,,1257346707528807794;
-<exceptions_state_mc_action_iter_1,,13866,,1257346707528820049;
-<exceptions_state_mc,,13867,,1257346707528832630;
->exceptions_state_mc,,1257346707528839571;
->exceptions_state_mc_action_iter_1,,1257346707528843667;
-<exceptions_state_mc_action_iter,,13868,,1257346707528855648;
-<exceptions_state_mc,,13869,,1257346707528867648;
-<catcher_pop,,13870,,1257346707528879963;
-<restore_cleanups,,13871,,1257346707528900092;
->restore_cleanups,,1257346707528907021;
-<xfree,,13872,,1257346707528925742;
->xfree,,1257346707528932470;
->catcher_pop,,1257346707528936963;
->exceptions_state_mc,,1257346707528941655;
->exceptions_state_mc_action_iter,,1257346707528945718;
-<print_any_exception,,13873,,1257346707528955997;
->print_any_exception,,1257346707528962992;
->catch_errors,,1257346707528967537;
-<catch_errors,,13874,,1257346707528979010;
-<exceptions_state_mc_init,,13875,,1257346707528991747;
-<xzalloc,,13876,,1257346707529011123;
-<xcalloc,,13877,,1257346707529029054;
->xcalloc,,1257346707529035971;
->xzalloc,,1257346707529040461;
-<save_cleanups,,13878,,1257346707529058656;
->save_cleanups,,1257346707529065543;
->exceptions_state_mc_init,,1257346707529070367;
-<exceptions_state_mc_action_iter,,13879,,1257346707529083031;
-<exceptions_state_mc,,13880,,1257346707529095671;
->exceptions_state_mc,,1257346707529102703;
->exceptions_state_mc_action_iter,,1257346707529106784;
-<exceptions_state_mc_action_iter_1,,13881,,1257346707529119105;
-<exceptions_state_mc,,13882,,1257346707529130669;
->exceptions_state_mc,,1257346707529137745;
->exceptions_state_mc_action_iter_1,,1257346707529141974;
-<gdb_do_one_event,,13883,,1257346707529151859;
-<process_event,,13884,,1257346707529164890;
->process_event,,1257346707529171780;
-<gdb_wait_for_event,,13885,,1257346707529182625;
-<gdb_flush,,13886,,1257346707529201439;
-<stdio_file_flush,,13887,,1257346707529219920;
-<ui_file_data,,13888,,1257346707529239444;
->ui_file_data,,1257346707529246241;
->stdio_file_flush,,1257346707529251059;
->gdb_flush,,1257346707529254560;
-<gdb_flush,,13889,,1257346707529271007;
-<stdio_file_flush,,13890,,1257346707529289052;
-<ui_file_data,,13891,,1257346707529308558;
->ui_file_data,,1257346707529315415;
->stdio_file_flush,,1257346707529320086;
->gdb_flush,,1257346707529323538;
-<xmalloc,,13892,,1257346707529342094;
->xmalloc,,1257346707529349011;
->gdb_wait_for_event,,1257346707529353751;
-<process_event,,13893,,1257346707529364626;
-<xfree,,13894,,1257346707529385359;
->xfree,,1257346707529392140;
-<handle_file_event,,13895,,1257346707529403746;
-<stdin_event_handler,,13896,,1257346707529418052;
-<rl_callback_read_char_wrapper,,13897,,1257346707529431487;
-<rl_callback_read_char,,13898,,1257346707529440299;
-<readline_internal_char,,13899,,1257346707529449955;
-<_rl_reset_argument,,13900,,1257346707529459396;
->_rl_reset_argument,,1257346707529466247;
-<rl_read_key,,13901,,1257346707529473098;
-<_rl_next_macro_key,,13902,,1257346707529481939;
->_rl_next_macro_key,,1257346707529488742;
-<rl_getc,,13903,,1257346707529494751;
->rl_getc,,1257346707529502856;
->rl_read_key,,1257346707529507493;
-<_rl_dispatch,,13904,,1257346707529514444;
-<_rl_dispatch_subseq,,13905,,1257346707529524603;
-<rl_insert,,13906,,1257346707529533472;
-<_rl_insert_char,,13907,,1257346707529542566;
-<rl_insert_text,,13908,,1257346707529550891;
->rl_insert_text,,1257346707529557919;
->_rl_insert_char,,1257346707529562635;
->rl_insert,,1257346707529566099;
->_rl_dispatch_subseq,,1257346707529570779;
->_rl_dispatch,,1257346707529575254;
-<_rl_internal_char_cleanup,,13909,,1257346707529582075;
-<rl_redisplay,,13910,,1257346707529590977;
->rl_redisplay,,1257346707529597800;
->_rl_internal_char_cleanup,,1257346707529602724;
->readline_internal_char,,1257346707529607629;
-<_rl_pushed_input_available,,13911,,1257346707529615123;
->_rl_pushed_input_available,,1257346707529622206;
->rl_callback_read_char,,1257346707529627006;
->rl_callback_read_char_wrapper,,1257346707529632052;
->stdin_event_handler,,1257346707529635866;
->handle_file_event,,1257346707529640518;
->process_event,,1257346707529644975;
->gdb_do_one_event,,1257346707529649642;
-<exceptions_state_mc_action_iter_1,,13912,,1257346707529661748;
-<exceptions_state_mc,,13913,,1257346707529674385;
->exceptions_state_mc,,1257346707529681395;
->exceptions_state_mc_action_iter_1,,1257346707529685563;
-<exceptions_state_mc_action_iter,,13914,,1257346707529697692;
-<exceptions_state_mc,,13915,,1257346707529709632;
-<catcher_pop,,13916,,1257346707529721923;
-<restore_cleanups,,13917,,1257346707529746792;
->restore_cleanups,,1257346707529754091;
-<xfree,,13918,,1257346707529772963;
->xfree,,1257346707529779772;
->catcher_pop,,1257346707529784256;
->exceptions_state_mc,,1257346707529788944;
->exceptions_state_mc_action_iter,,1257346707529793016;
-<print_any_exception,,13919,,1257346707529803395;
->print_any_exception,,1257346707529810411;
->catch_errors,,1257346707529814940;
-<catch_errors,,13920,,1257346707529826579;
-<exceptions_state_mc_init,,13921,,1257346707529839725;
-<xzalloc,,13922,,1257346707529859375;
-<xcalloc,,13923,,1257346707529877351;
->xcalloc,,1257346707529884259;
->xzalloc,,1257346707529888671;
-<save_cleanups,,13924,,1257346707529906559;
->save_cleanups,,1257346707529913428;
->exceptions_state_mc_init,,1257346707529918324;
-<exceptions_state_mc_action_iter,,13925,,1257346707529930874;
-<exceptions_state_mc,,13926,,1257346707529943385;
->exceptions_state_mc,,1257346707529950323;
->exceptions_state_mc_action_iter,,1257346707529954404;
-<exceptions_state_mc_action_iter_1,,13927,,1257346707529966659;
-<exceptions_state_mc,,13928,,1257346707529978232;
->exceptions_state_mc,,1257346707529985146;
->exceptions_state_mc_action_iter_1,,1257346707529989359;
-<gdb_do_one_event,,13929,,1257346707529998989;
-<process_event,,13930,,1257346707530012011;
->process_event,,1257346707530018889;
-<gdb_wait_for_event,,13931,,1257346707530029205;
-<gdb_flush,,13932,,1257346707530047571;
-<stdio_file_flush,,13933,,1257346707530065586;
-<ui_file_data,,13934,,1257346707530085212;
->ui_file_data,,1257346707530092042;
->stdio_file_flush,,1257346707530096767;
->gdb_flush,,1257346707530100249;
-<gdb_flush,,13935,,1257346707530116291;
-<stdio_file_flush,,13936,,1257346707530134260;
-<ui_file_data,,13937,,1257346707530153730;
->ui_file_data,,1257346707530160584;
->stdio_file_flush,,1257346707530165261;
->gdb_flush,,1257346707530168740;
-<xmalloc,,13938,,1257346707530187266;
->xmalloc,,1257346707530194105;
->gdb_wait_for_event,,1257346707530198785;
-<process_event,,13939,,1257346707530209696;
-<xfree,,13940,,1257346707530230387;
->xfree,,1257346707530237111;
-<handle_file_event,,13941,,1257346707530249231;
-<stdin_event_handler,,13942,,1257346707530263625;
-<rl_callback_read_char_wrapper,,13943,,1257346707530277576;
-<rl_callback_read_char,,13944,,1257346707530286418;
-<readline_internal_char,,13945,,1257346707530296150;
-<_rl_reset_argument,,13946,,1257346707530305554;
->_rl_reset_argument,,1257346707530312483;
-<rl_read_key,,13947,,1257346707530319328;
-<_rl_next_macro_key,,13948,,1257346707530328185;
->_rl_next_macro_key,,1257346707530335066;
-<rl_getc,,13949,,1257346707530341078;
->rl_getc,,1257346707530349195;
->rl_read_key,,1257346707530353781;
-<_rl_dispatch,,13950,,1257346707530360822;
-<_rl_dispatch_subseq,,13951,,1257346707530371582;
-<rl_insert,,13952,,1257346707530380301;
-<_rl_insert_char,,13953,,1257346707530389284;
-<rl_insert_text,,13954,,1257346707530397639;
->rl_insert_text,,1257346707530404601;
->_rl_insert_char,,1257346707530409374;
->rl_insert,,1257346707530412928;
->_rl_dispatch_subseq,,1257346707530417623;
->_rl_dispatch,,1257346707530422215;
-<_rl_internal_char_cleanup,,13955,,1257346707530428934;
-<rl_redisplay,,13956,,1257346707530437857;
->rl_redisplay,,1257346707530444708;
->_rl_internal_char_cleanup,,1257346707530449625;
->readline_internal_char,,1257346707530454623;
-<_rl_pushed_input_available,,13957,,1257346707530462232;
->_rl_pushed_input_available,,1257346707530469381;
->rl_callback_read_char,,1257346707530474268;
->rl_callback_read_char_wrapper,,1257346707530479191;
->stdin_event_handler,,1257346707530482962;
->handle_file_event,,1257346707530487711;
->process_event,,1257346707530492207;
->gdb_do_one_event,,1257346707530496869;
-<exceptions_state_mc_action_iter_1,,13958,,1257346707530509079;
-<exceptions_state_mc,,13959,,1257346707530521605;
->exceptions_state_mc,,1257346707530528594;
->exceptions_state_mc_action_iter_1,,1257346707530532753;
-<exceptions_state_mc_action_iter,,13960,,1257346707530545111;
-<exceptions_state_mc,,13961,,1257346707530557171;
-<catcher_pop,,13962,,1257346707530569420;
-<restore_cleanups,,13963,,1257346707530589476;
->restore_cleanups,,1257346707530596439;
-<xfree,,13964,,1257346707530614871;
->xfree,,1257346707530621527;
->catcher_pop,,1257346707530625966;
->exceptions_state_mc,,1257346707530630627;
->exceptions_state_mc_action_iter,,1257346707530634765;
-<print_any_exception,,13965,,1257346707530645117;
->print_any_exception,,1257346707530652073;
->catch_errors,,1257346707530656596;
-<catch_errors,,13966,,1257346707530668016;
-<exceptions_state_mc_init,,13967,,1257346707530680749;
-<xzalloc,,13968,,1257346707530700060;
-<xcalloc,,13969,,1257346707530718038;
->xcalloc,,1257346707530724787;
->xzalloc,,1257346707530734452;
-<save_cleanups,,13970,,1257346707530752617;
->save_cleanups,,1257346707530759609;
->exceptions_state_mc_init,,1257346707530764475;
-<exceptions_state_mc_action_iter,,13971,,1257346707530777019;
-<exceptions_state_mc,,13972,,1257346707530789539;
->exceptions_state_mc,,1257346707530796546;
->exceptions_state_mc_action_iter,,1257346707530800669;
-<exceptions_state_mc_action_iter_1,,13973,,1257346707530813309;
-<exceptions_state_mc,,13974,,1257346707530824795;
->exceptions_state_mc,,1257346707530831787;
->exceptions_state_mc_action_iter_1,,1257346707530835925;
-<gdb_do_one_event,,13975,,1257346707530845537;
-<process_event,,13976,,1257346707530858629;
->process_event,,1257346707530865606;
-<gdb_wait_for_event,,13977,,1257346707530876387;
-<gdb_flush,,13978,,1257346707530895283;
-<stdio_file_flush,,13979,,1257346707530913328;
-<ui_file_data,,13980,,1257346707530932720;
->ui_file_data,,1257346707530939603;
->stdio_file_flush,,1257346707530944313;
->gdb_flush,,1257346707530947823;
-<gdb_flush,,13981,,1257346707530963913;
-<stdio_file_flush,,13982,,1257346707530982369;
-<ui_file_data,,13983,,1257346707531001737;
->ui_file_data,,1257346707531008528;
->stdio_file_flush,,1257346707531013192;
->gdb_flush,,1257346707531016669;
-<xmalloc,,13984,,1257346707531035556;
->xmalloc,,1257346707531042443;
->gdb_wait_for_event,,1257346707531047200;
-<process_event,,13985,,1257346707531058147;
-<xfree,,13986,,1257346707531079217;
->xfree,,1257346707531085915;
-<handle_file_event,,13987,,1257346707531097529;
-<stdin_event_handler,,13988,,1257346707531111758;
-<rl_callback_read_char_wrapper,,13989,,1257346707531125580;
-<rl_callback_read_char,,13990,,1257346707531134551;
-<readline_internal_char,,13991,,1257346707531144217;
-<_rl_reset_argument,,13992,,1257346707531153756;
->_rl_reset_argument,,1257346707531160574;
-<rl_read_key,,13993,,1257346707531167314;
-<_rl_next_macro_key,,13994,,1257346707531176141;
->_rl_next_macro_key,,1257346707531182986;
-<rl_getc,,13995,,1257346707531188958;
->rl_getc,,1257346707531197133;
->rl_read_key,,1257346707531201719;
-<_rl_dispatch,,13996,,1257346707531208741;
-<_rl_dispatch_subseq,,13997,,1257346707531218921;
-<rl_newline,,13998,,1257346707531227408;
->rl_newline,,1257346707531235766;
->_rl_dispatch_subseq,,1257346707531240626;
->_rl_dispatch,,1257346707531245191;
-<_rl_internal_char_cleanup,,13999,,1257346707531251958;
->_rl_internal_char_cleanup,,1257346707531259155;
->readline_internal_char,,1257346707531263994;
-<readline_internal_teardown,,14000,,1257346707531270905;
-<current_history,,14001,,1257346707531281783;
->current_history,,1257346707531290255;
-<rl_free_undo_list,,14002,,1257346707531297190;
->rl_free_undo_list,,1257346707531305625;
-<_rl_set_insert_mode,,14003,,1257346707531312182;
->_rl_set_insert_mode,,1257346707531319349;
-<xmalloc,,14004,,1257346707531336611;
->xmalloc,,1257346707531343363;
->readline_internal_teardown,,1257346707531348481;
-<rl_deprep_terminal,,14005,,1257346707531354983;
-<_rl_block_sigint,,14006,,1257346707531365555;
->_rl_block_sigint,,1257346707531373611;
-<_set_tty_settings,,14007,,1257346707531380141;
->_set_tty_settings,,1257346707531390381;
-<_rl_release_sigint,,14008,,1257346707531398122;
->_rl_release_sigint,,1257346707531405791;
->rl_deprep_terminal,,1257346707531409644;
-<rl_clear_signals,,14009,,1257346707531416194;
->rl_clear_signals,,1257346707531429685;
-<command_line_handler,,14010,,1257346707531440033;
-<xmalloc,,14011,,1257346707531461308;
->xmalloc,,1257346707531468406;
-<wrap_here,,14012,,1257346707531485858;
->wrap_here,,1257346707531493178;
-<gdb_flush,,14013,,1257346707531508786;
-<stdio_file_flush,,14014,,1257346707531526341;
-<ui_file_data,,14015,,1257346707531545928;
->ui_file_data,,1257346707531552809;
->stdio_file_flush,,1257346707531557501;
->gdb_flush,,1257346707531560974;
-<gdb_flush,,14016,,1257346707531576977;
-<stdio_file_flush,,14017,,1257346707531594745;
-<ui_file_data,,14018,,1257346707531613899;
->ui_file_data,,1257346707531620750;
->stdio_file_flush,,1257346707531625409;
->gdb_flush,,1257346707531628885;
-<xfree,,14019,,1257346707531646310;
->xfree,,1257346707531652929;
-<add_history,,14020,,1257346707531661573;
-<xmalloc,,14021,,1257346707531682357;
->xmalloc,,1257346707531689346;
-<xmalloc,,14022,,1257346707531703367;
->xmalloc,,1257346707531710074;
-<xmalloc,,14023,,1257346707531723385;
->xmalloc,,1257346707531735670;
-<xmalloc,,14024,,1257346707531762018;
->xmalloc,,1257346707531769299;
->add_history,,1257346707531774081;
-<command_handler,,14025,,1257346707531784704;
-<reinitialize_more_filter,,14026,,1257346707531806582;
->reinitialize_more_filter,,1257346707531815524;
-<get_run_time,,14027,,1257346707531821114;
->get_run_time,,1257346707531830922;
-<execute_command,,14028,,1257346707531847453;
-<find_default_can_async_p,,14029,,1257346707531860704;
-<find_default_run_target,,14030,,1257346707531874806;
-<inf_child_can_run,,14031,,1257346707531885575;
->inf_child_can_run,,1257346707531894243;
->find_default_run_target,,1257346707531899578;
-<linux_nat_can_async_p,,14032,,1257346707531915650;
->linux_nat_can_async_p,,1257346707531924723;
->find_default_can_async_p,,1257346707531928868;
-<prepare_execute_command,,14033,,1257346707531945405;
-<free_all_values,,14034,,1257346707531962295;
->free_all_values,,1257346707531971020;
->prepare_execute_command,,1257346707531976114;
-<print_command_trace,,14035,,1257346707531988857;
->print_command_trace,,1257346707531997605;
-<lookup_cmd,,14036,,1257346707532010760;
-<lookup_cmd_1,,14037,,1257346707532025824;
-<find_command_name_length,,14038,,1257346707532042627;
->find_command_name_length,,1257346707532050665;
-<find_cmd,,14039,,1257346707532065101;
->find_cmd,,1257346707532084348;
->lookup_cmd_1,,1257346707532089341;
->lookup_cmd,,1257346707532094032;
-<execute_cmd_pre_hook,,14040,,1257346707532107358;
->execute_cmd_pre_hook,,1257346707532116071;
-<cmd_func_p,,14041,,1257346707532129237;
->cmd_func_p,,1257346707532137556;
-<cmd_func,,14042,,1257346707532151068;
-<do_cfunc,,14043,,1257346707532165760;
-<quit_command,,14044,,1257346707532181326;
-<quit_confirm,,14045,,1257346707532201497;
-<have_live_inferiors,,14046,,1257346707532220898;
->have_live_inferiors,,1257346707532229625;
->quit_confirm,,1257346707532234473;
-<quit_force,,14047,,1257346707532249255;
-<catch_errors,,14048,,1257346707532262668;
-<exceptions_state_mc_init,,14049,,1257346707532274475;
-<xzalloc,,14050,,1257346707532292216;
-<xcalloc,,14051,,1257346707532307692;
->xcalloc,,1257346707532314543;
->xzalloc,,1257346707532318988;
-<save_cleanups,,14052,,1257346707532334843;
->save_cleanups,,1257346707532341715;
->exceptions_state_mc_init,,1257346707532346560;
-<exceptions_state_mc_action_iter,,14053,,1257346707532357498;
-<exceptions_state_mc,,14054,,1257346707532369104;
->exceptions_state_mc,,1257346707532376105;
->exceptions_state_mc_action_iter,,1257346707532380265;
-<exceptions_state_mc_action_iter_1,,14055,,1257346707532391530;
-<exceptions_state_mc,,14056,,1257346707532402435;
->exceptions_state_mc,,1257346707532409355;
->exceptions_state_mc_action_iter_1,,1257346707532413467;
-<quit_target,,14057,,1257346707532427689;
-<iterate_over_inferiors,,14058,,1257346707532444834;
-<kill_or_detach,,14059,,1257346707532462512;
->kill_or_detach,,1257346707532470842;
->iterate_over_inferiors,,1257346707532476078;
-<pop_all_targets,,14060,,1257346707532485173;
-<pop_all_targets_above,,14061,,1257346707532497467;
->pop_all_targets_above,,1257346707532506020;
->pop_all_targets,,1257346707532511054;
-<do_final_cleanups,,14062,,1257346707532524973;
-<do_my_cleanups,,14063,,1257346707532541652;
->do_my_cleanups,,1257346707532548843;
->do_final_cleanups,,1257346707532552747;
->quit_target,,1257346707532557450;
-<exceptions_state_mc_action_iter_1,,14064,,1257346707532568129;
-<exceptions_state_mc,,14065,,1257346707532579789;
->exceptions_state_mc,,1257346707532586739;
->exceptions_state_mc_action_iter_1,,1257346707532590827;
-<exceptions_state_mc_action_iter,,14066,,1257346707532601154;
-<exceptions_state_mc,,14067,,1257346707532612131;
-<catcher_pop,,14068,,1257346707532623397;
-<restore_cleanups,,14069,,1257346707532640807;
->restore_cleanups,,1257346707532647733;
-<xfree,,14070,,1257346707532663113;
->xfree,,1257346707532669979;
->catcher_pop,,1257346707532674559;
->exceptions_state_mc,,1257346707532679269;
->exceptions_state_mc_action_iter,,1257346707532683416;
-<print_any_exception,,14071,,1257346707532692357;
->print_any_exception,,1257346707532699425;
->catch_errors,,1257346707532703999;
-<tui_exit,,14072,,1257346707532718026;
-<tui_disable,,14073,,1257346707532738071;
->tui_disable,,1257346707532746976;
->tui_exit,,1257346707532750729;
--1257346707532767514
-+3185407315 \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/main.graph b/systemtap/org.eclipse.linuxtools.callgraph.tests/main.graph
deleted file mode 100644
index de4fb6e883..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/main.graph
+++ /dev/null
@@ -1,6 +0,0 @@
-PROBE_BEGIN
-basic
-<main,,1,,1257346304668588887;
->main,,1257346304668634399;
--1257346304668646035
-+57148 \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/parse_function_nomark.stp b/systemtap/org.eclipse.linuxtools.callgraph.tests/parse_function_nomark.stp
index b56e3d1c87..34b01b6ca1 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/parse_function_nomark.stp
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests/parse_function_nomark.stp
@@ -1,8 +1,6 @@
global serial
global startTime
global finalTime
-global currentDepth
-
probe process(@1).function("*"){
callFunction(probefunc())
@@ -12,31 +10,34 @@ probe process(@1).function("*").return{
returnFunction(probefunc())
}
+probe begin {
+ printf("PROBE_BEGIN\n");
+ printf("testing\n");
+}
function callFunction(probefunc) {
if (startTime == 0) {
startTime = gettimeofday_ns()
- printf("<%s,,%d,,%d;\n", probefunc, serial, startTime)
+ printf("<%s,,%d,,%d;", probefunc, serial, startTime)
} else
- printf("<%s,,%d,,%d;\n", probefunc, serial, gettimeofday_ns())
- currentDepth++
+ printf("<%s,,%d,,%d;", probefunc, serial, gettimeofday_ns())
serial++
}
+
function returnFunction(probefunc) {
finalTime = gettimeofday_ns()
- printf(">%s,,%d;\n", probefunc, finalTime)
- currentDepth--
+ printf(">%s,,%d;", probefunc, finalTime)
}
+probe syscall.exit {
+ if (pid() == target()) {
+ finalTime = gettimeofday_ns()
+ }
+}
probe end {
- printf("-%d\n",finalTime);
- printf("+%d\n",finalTime - startTime);
+ printf("\n%d",finalTime);
+ printf("\n%d",finalTime - startTime);
exit()
-}
-probe syscall.exit {
-if (pid() == target()) {
-finalTime = gettimeofday_ns()
-}
} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/AllTests.java b/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/AllTests.java
index 75d5541834..6bfa8e2ae1 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/AllTests.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/AllTests.java
@@ -25,8 +25,7 @@ public class AllTests {
//$JUnit-BEGIN$
suite.addTestSuite(StapGraphParserTest.class);
suite.addTestSuite(SystemTapGraphViewTest.class);
-// suite.addTestSuite(SystemTapGraphTest.class);
-// suite.addTestSuite(MouseListenerTest.class);
+ suite.addTestSuite(SystemTapGraphTest.class);
//$JUnit-END$
return suite;
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/MouseListenerTest.java b/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/MouseListenerTest.java
index 48982026fc..3dba348a4f 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/MouseListenerTest.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/MouseListenerTest.java
@@ -13,44 +13,46 @@ package org.eclipse.linuxtools.callgraph.tests;
import junit.framework.TestCase;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.linuxtools.callgraph.CallGraphConstants;
import org.eclipse.linuxtools.callgraph.CallgraphView;
+import org.eclipse.linuxtools.callgraph.GraphUIJob;
import org.eclipse.linuxtools.callgraph.StapGraph;
import org.eclipse.linuxtools.callgraph.StapGraphParser;
-import org.eclipse.linuxtools.callgraph.core.StapUIJob;
import org.eclipse.linuxtools.callgraph.graphlisteners.StapGraphMouseListener;
import org.eclipse.zest.core.widgets.GraphItem;
-public class MouseListenerTest extends TestCase {
+
+public class MouseListenerTest extends TestCase{
public void test() {
StapGraphParser parse = new StapGraphParser();
- parse.setSourcePath(Activator.PLUGIN_LOCATION + "eag.graph");
+ parse.setFile(Activator.PLUGIN_LOCATION + "eag.graph");
parse.testRun(new NullProgressMonitor());
- CallgraphView cView = (CallgraphView) TestHelper.makeView("org.eclipse.linuxtools.callgraph.callgraphview");
+ CallgraphView.forceDisplay();
- StapUIJob j = new StapUIJob("Test Graph UI Job", parse,
- CallGraphConstants.viewID);
+ GraphUIJob j = new GraphUIJob("Test Graph UI Job", parse);
j.runInUIThread(new NullProgressMonitor());
-
- StapGraphMouseListener mListener = cView.getGraph().getMouseListener();
- // StapGraphKeyListener kListener =
- // CallgraphView.getGraph().getKeyListener();
- // StapGraphMouseWheelListener mwListener =
- // CallgraphView.getGraph().getMouseWheelListener();
-
- StapGraph g = (StapGraph) cView.getGraph();
+
+
+ StapGraphMouseListener mListener = CallgraphView.getGraph().getMouseListener();
+// StapGraphKeyListener kListener = CallgraphView.getGraph().getKeyListener();
+// StapGraphMouseWheelListener mwListener = CallgraphView.getGraph().getMouseWheelListener();
+
+ StapGraph g = (StapGraph) CallgraphView.getGraph();
g.setProject(parse.project);
-
- GraphItem[] nodes = { g.getNode(g.getFirstUsefulNode()) };
+
+
+ GraphItem[] nodes = {g.getNode(g.getFirstUsefulNode())};
g.setSelection(nodes);
-
+
+
System.out.println(mListener.controlDoubleClick());
mListener.mouseDownEvent(0, 0);
- g.draw(StapGraph.CONSTANT_DRAWMODE_TREE,
- StapGraph.CONSTANT_ANIMATION_FASTEST, g.getFirstUsefulNode());
+ g.draw(StapGraph.CONSTANT_DRAWMODE_TREE, StapGraph.CONSTANT_ANIMATION_FASTEST,
+ g.getFirstUsefulNode());
mListener.mouseUpEvent();
-
+
+ System.out.println("TEST");
+
}
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/StapGraphParserTest.java b/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/StapGraphParserTest.java
index 6411b2a73d..2f14ab8f26 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/StapGraphParserTest.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/StapGraphParserTest.java
@@ -10,10 +10,10 @@
*******************************************************************************/
package org.eclipse.linuxtools.callgraph.tests;
+import java.io.File;
import java.util.ArrayList;
-
import junit.framework.TestCase;
-
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.linuxtools.callgraph.StapGraphParser;
public class StapGraphParserTest extends TestCase {
@@ -21,18 +21,12 @@ public class StapGraphParserTest extends TestCase {
//RENDER THE GRAPH
public static StapGraphParser initializeGraph(String filePath){
StapGraphParser grph = new StapGraphParser();
- grph.setSourcePath(filePath);
- grph.nonRealTimeParsing();
+ grph.setFile(filePath);
+ grph.testRun(new NullProgressMonitor());
return grph;
}
public static void assertSanity(StapGraphParser grph){
- /*if (grph.serialMap.size() == 0 || grph.timeMap.size() == 0
- || grph.outNeighbours.size() == 0 || grph.countMap.size() == 0
- || grph.aggregateTimeMap.size() == 0){
- fail("Parsing Error : One or more data structures were empty.");
- }*/
-
//SAME NUMBER OF NODES ENTRIES
assertEquals(grph.serialMap.size(),grph.timeMap.size());
assertEquals(grph.serialMap.size(),grph.outNeighbours.size());
@@ -41,7 +35,7 @@ public class StapGraphParserTest extends TestCase {
for (int val : grph.serialMap.keySet()){
String fname = grph.serialMap.get(val);
assertTrue(grph.timeMap.get(val) != null);
- assertTrue(grph.aggregateTimeMap.get(fname) != null);
+ assertTrue(grph.cumulativeTimeMap.get(fname) != null);
}
}
@@ -51,7 +45,7 @@ public class StapGraphParserTest extends TestCase {
for (int val : grph.serialMap.keySet()){
String fname = grph.serialMap.get(val);
assertTrue(grph.totalTime >= grph.timeMap.get(val));
- assertTrue(grph.totalTime >= grph.aggregateTimeMap.get(fname));
+ assertTrue(grph.totalTime >= grph.cumulativeTimeMap.get(fname));
}
}
@@ -80,7 +74,8 @@ public class StapGraphParserTest extends TestCase {
}
- public final String currentPath = Activator.PLUGIN_LOCATION;
+ File tmpfile = new File("");
+ public final String currentPath = tmpfile.getAbsolutePath();
public String graphDataPath= "";
//FOR TESTING THE GRAPH PARSING
@@ -92,34 +87,20 @@ public class StapGraphParserTest extends TestCase {
}
- public void testJustMain(){
- graphDataPath = currentPath+"main.graph";
- executeGraphTests();
- }
-
public void testCallGraphRunBasic(){
- graphDataPath = currentPath+"basic.graph";
+ graphDataPath = currentPath+"/basic.graph";
executeGraphTests();
}
public void testCallGraphRunRecursive(){
- graphDataPath = currentPath+"catlan.graph";
+ graphDataPath = currentPath+"/catlan.graph";
executeGraphTests();
}
public void testManyFuncs(){
- graphDataPath = currentPath+"eag.graph";
+ graphDataPath = currentPath+"/eag.graph";
executeGraphTests();
}
- public void testComprehensive(){
- graphDataPath = currentPath+"comprehensive.graph";
- executeGraphTests();
- }
-
- public void testHeavy(){
- graphDataPath = currentPath+"heavy.graph";
- executeGraphTests();
- }
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphTest.java b/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphTest.java
index c32acfb54c..25a591bd64 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphTest.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphTest.java
@@ -18,10 +18,9 @@ import junit.framework.TestCase;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.linuxtools.callgraph.CallGraphConstants;
import org.eclipse.linuxtools.callgraph.CallgraphView;
+import org.eclipse.linuxtools.callgraph.GraphUIJob;
import org.eclipse.linuxtools.callgraph.StapGraphParser;
-import org.eclipse.linuxtools.callgraph.core.StapUIJob;
import org.eclipse.linuxtools.callgraph.core.SystemTapUIErrorMessages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.ScrolledComposite;
@@ -68,14 +67,14 @@ public class SystemTapGraphTest extends TestCase {
public void testGraphLoading() throws InterruptedException {
StapGraphParser parse = new StapGraphParser();
- parse.setSourcePath(Activator.PLUGIN_LOCATION+"eag.graph");
+ parse.setFile(Activator.PLUGIN_LOCATION+"eag.graph");
// parse.setTestMode(true);
parse.testRun(new NullProgressMonitor());
+ CallgraphView.forceDisplay();
- StapUIJob j = new StapUIJob("Test Graph UI Job", parse, CallGraphConstants.viewID);
+ GraphUIJob j = new GraphUIJob("Test Graph UI Job", parse);
j.runInUIThread(new NullProgressMonitor());
- CallgraphView cView = (CallgraphView) TestHelper.makeView("org.eclipse.linuxtools.callgraph.callgraphview");
if (!manual) {
ArrayList<String> tasks = new ArrayList<String>();
@@ -108,44 +107,44 @@ public class SystemTapGraphTest extends TestCase {
case 1:
break;
case 2:
- act = cView.getView_refresh();
+ act = CallgraphView.getView_refresh();
break;
case 3:
- act = cView.getView_treeview();
+ act = CallgraphView.getView_treeview();
break;
case 4:
- act = cView.getView_aggregateview();
+ act = CallgraphView.getView_aggregateview();
break;
case 5:
- act = cView.getView_levelview();
+ act = CallgraphView.getView_boxview();
break;
case 6:
- act = cView.getAnimation_fast();
+ act = CallgraphView.getAnimation_fast();
break;
case 7:
case 8:
- act = cView.getMode_collapsednodes();
+ act = CallgraphView.getMode_collapsednodes();
break;
case 9:
- act = cView.getView_radialview();
+ act = CallgraphView.getView_radialview();
break;
case 10:
- act = cView.getMode_collapsednodes();
+ act = CallgraphView.getMode_collapsednodes();
break;
case 14:
String tempLocation = Activator.PLUGIN_LOCATION+"eag.graph2";
File temp = new File(tempLocation);
temp.delete();
- cView.saveData(tempLocation);
+ parse.saveData(tempLocation);
temp.delete();
break;
case 15:
StapGraphParser new_parser = new StapGraphParser();
- new_parser.setSourcePath(Activator.PLUGIN_LOCATION+"eag.graph");
+ new_parser.setFile(Activator.PLUGIN_LOCATION+"eag.graph");
new_parser.testRun(new NullProgressMonitor());
break;
case 16:
- cView.maximizeIfUnmaximized();
+ CallgraphView.maximizeIfUnmaximized();
break;
default:
break;
@@ -213,38 +212,38 @@ public class SystemTapGraphTest extends TestCase {
case 1:
break;
case 2:
- act = cView.getView_refresh();
+ act = CallgraphView.getView_refresh();
break;
case 3:
- act = cView.getView_treeview();
+ act = CallgraphView.getView_treeview();
break;
case 4:
- act = cView.getView_aggregateview();
+ act = CallgraphView.getView_aggregateview();
break;
case 5:
- act = cView.getView_levelview();
+ act = CallgraphView.getView_boxview();
break;
case 6:
- act = cView.getAnimation_fast();
+ act = CallgraphView.getAnimation_fast();
break;
case 7:
case 8:
- act = cView.getMode_collapsednodes();
+ act = CallgraphView.getMode_collapsednodes();
break;
case 9:
- act = cView.getView_radialview();
+ act = CallgraphView.getView_radialview();
break;
case 10:
- act = cView.getMode_collapsednodes();
+ act = CallgraphView.getMode_collapsednodes();
break;
case 14:
- act = cView.getSave_file();
+ act = CallgraphView.getSave_callgraph();
break;
case 15:
- act = cView.getOpen_file();
+ act = CallgraphView.getOpen_callgraph();
break;
case 16:
- act = cView.getHelp_version();
+ act = CallgraphView.getHelp_version();
break;
default:
break;
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphViewTest.java b/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphViewTest.java
index 2f863cec12..48217426b1 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphViewTest.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphViewTest.java
@@ -13,25 +13,16 @@ package org.eclipse.linuxtools.callgraph.tests;
import junit.framework.TestCase;
-import org.eclipse.linuxtools.callgraph.core.SystemTapTextView;
+import org.eclipse.linuxtools.callgraph.CallgraphView;
public class SystemTapGraphViewTest extends TestCase {
- private SystemTapTextView stapView = new SystemTapTextView();
+ private CallgraphView stapView = new CallgraphView();
private String testText = "blah";
- //TODO: write some better tests here
public void test() {
System.out.println("\n\nLaunching RunSystemTapActionTest\n");
-
- stapView = (SystemTapTextView) TestHelper.makeView("org.eclipse.linuxtools.callgraph.core.staptextview");
- if (stapView == null)
- try {
- throw new Exception("The SystemTapView is null");
- } catch (Exception e) {
- e.printStackTrace();
- return;
- }
+ CallgraphView.forceDisplay();
stapView.println(testText);
assertEquals(stapView.getText(), testText);
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/TestHelper.java b/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/TestHelper.java
deleted file mode 100644
index 9bddab76f3..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/TestHelper.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.eclipse.linuxtools.callgraph.tests;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.linuxtools.callgraph.core.SystemTapView;
-import org.eclipse.linuxtools.callgraph.core.ViewFactory;
-import org.eclipse.ui.IViewPart;
-
-public class TestHelper {
-
- public static SystemTapView makeView(String viewID){
- SystemTapView cView = null;
-// IExtensionRegistry reg = Platform.getExtensionRegistry();
-// IConfigurationElement[] extensions = reg.getConfigurationElementsFor(
-// PluginConstants.VIEW_RESOURCE, PluginConstants.VIEW_NAME,
-// viewID);
-//
-// if (extensions == null || extensions.length < 1) {
-// SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
-// "Couldn't load view", "Could not load view",
-// "Could not load view with id: " + viewID); //$NON-NLS-1$
-// mess.schedule();
-// return null;
-// }
-//
-// IConfigurationElement element = null;
-// for (IConfigurationElement el : extensions) {
-// System.out.println(el.getName());
-// if (el.getName().equals("view")) {
-// element = el;
-// break;
-// }
-// }
-
- try {
-// SystemTapView view;
-//
-// Object o = element.createExecutableExtension(PluginConstants.ATTR_CLASS);
-// if (! (o instanceof SystemTapView)){
-// throw new Exception("The Returned Object was not of type SystemTapView");
-// }
-//
-// view = (SystemTapView)o;
-// view.forceCreate();
- ViewFactory.createView(viewID);
-
- IViewPart vp = ViewFactory.getView();
-
- if (! (vp instanceof SystemTapView))
- throw new Exception("createView did not create a stapview.");
- cView = (SystemTapView) vp;
-// cView.initialize(null, new NullProgressMonitor());
-
- } catch (CoreException e) {
- e.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- }
- return cView;
-
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/ChangeLog b/systemtap/org.eclipse.linuxtools.callgraph/ChangeLog
deleted file mode 100644
index e415b7ff3a..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph/ChangeLog
+++ /dev/null
@@ -1,76 +0,0 @@
-2009-12-17 Roland Grunberg <rgrunber@redhat.com>
-
- * src/org/eclipse/linuxtools/callgraph/StapGraph.java
- (getTotalTime): Fix function times.
-
-2009-11-20 Roland Grunberg <rgrunber@redhat.com>
-
- * src/org/eclipse/linuxtools/callgraph/CallgraphView.java (finishLoad):
- Fix ctrl double click not finding name of specified function.
- Also gain the ability to ctrl double click during real-time parsing.
-
-2009-11-16 Roland Grunberg <rgrunber@redhat.com>
-
- * META-INF/MANIFEST.MF: Add Eclipse to Provider field.
-
-2009-11-10 Charley Wang <chwang@redhat.com>
-
- * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Up/Down.gif now refer to the correct icons.
-
-2009-11-09 Charley Wang <chwang@redhat.com>
-
- * src/org/eclipse/linuxtools/callgraph/StapData.java: Cleanup
- * src/org/eclipse/linuxtools/callgraph/StapGraph.java: Delete unused functions, simplify logic in StapGraph setCollapsedMode.
-
-2009-11-09 Roland Grunberg <rgrunber@redhat.com>
-
- * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Externalize/Fix Strings
- * src/org/eclipse/linuxtools/callgraph/messages.properties:
- * src/org/eclipse/linuxtools/callgraph/StapGraphParser.java:
-
-2009-11-09 Charley Wang <chwang@redhat.com>
-
- * META-INF/MANIFEST.MF: Change reference to Activator to reflect name change
- * src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeLabelProvider.java: Change references to PLUGIN_LOCATION to use getter.
- * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Change references to PLUGIN_LOCATION to use getter.
- * src/org/eclipse/linuxtools/callgraph/CallGraphConstants.java: Change PLUGIN_LOCATION to private, create getter.
- * src/org/eclipse/linuxtools/callgraph/CallgraphPlugin.java: RENAME: Activator --> CallgraphPlugin
-
-2009-11-06 Charley Wang <chwang@redhat.com>
-
- * src/org/eclipse/linuxtools/callgraph/AggregateLayoutAlgorithm.java: Improve javadocs
- * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Add better progress monitor use to updateMethod.
- Remove many unused methods. Remove reference to SystemTapView because we can just use 'this' instead.
-
-
-
-2009-11-05 Charley Wang <chwang@redhat.com>
-
- * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Rename loadView --> initializeView
- * src/org/eclipse/linuxtools/callgraph/StapGraphParser.java: Externalize strings.
- * src/org/eclipse/linuxtools/callgraph/messages.properties: Updated UnknownMarkers error message.
-
-2009-11-04 Roland Grunberg <rgrunber@redhat.com>
-
- * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Make Callgraph draw in space provided regardless of window size or view size.
-
-2009-11-04 Charley Wang <chwang@redhat.com>
-
- * src/org/eclipse/linuxtools/callgraph/StapGraphParser.java: Make nonRealTimeParser work again
- * src/org/eclipse/linuxtools/callgraph/StapGraph.java: Fix problem with marked messages not displaying until the methods have closed.
- * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Remove unused comments. Minor formatting. Make nonRealTimeParser work again.
-
-
-
-2009-11-03 chwang <chwang@toto>
-
- * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Delete unused temporary variable
-
-2009-11-03 Roland Grunberg <rgrunber@redhat.com>
-
- * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Disable Callgraph View from stealing focus when an update has been made.
-
-2009-11-03 chwang <chwang@toto>
-
- * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Fix capability to mark nodes.
- * src/org/eclipse/linuxtools/callgraph/StapGraph.java: Enhance capability for collapse nodes by making collapse nodes take a negative ID. \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.callgraph/META-INF/MANIFEST.MF
index d8f333c709..82b9890c1e 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/META-INF/MANIFEST.MF
+++ b/systemtap/org.eclipse.linuxtools.callgraph/META-INF/MANIFEST.MF
@@ -1,9 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Callgraph Graphing (Incubation)
+Bundle-Name: Graphing Plug-in
Bundle-SymbolicName: org.eclipse.linuxtools.callgraph;singleton:=true
Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.linuxtools.callgraph.CallgraphPlugin
+Bundle-Activator: org.eclipse.linuxtools.callgraph.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.draw2d,
@@ -19,4 +19,3 @@ Import-Package: org.eclipse.cdt.core.model,
org.eclipse.zest.core.widgets,
org.eclipse.zest.layouts,
org.eclipse.zest.layouts.algorithms
-Bundle-Vendor: Eclipse
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/icons/down.gif b/systemtap/org.eclipse.linuxtools.callgraph/icons/down.gif
index f57cd35fa6..f1991391b5 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/icons/down.gif
+++ b/systemtap/org.eclipse.linuxtools.callgraph/icons/down.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/icons/pause.gif b/systemtap/org.eclipse.linuxtools.callgraph/icons/pause.gif
deleted file mode 100644
index d645fa5c3f..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph/icons/pause.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/icons/perform.png b/systemtap/org.eclipse.linuxtools.callgraph/icons/perform.png
deleted file mode 100644
index 93e8f538f0..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph/icons/perform.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/icons/up.gif b/systemtap/org.eclipse.linuxtools.callgraph/icons/up.gif
index 43b621f1d3..57d1de72bb 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/icons/up.gif
+++ b/systemtap/org.eclipse.linuxtools.callgraph/icons/up.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/plugin.xml b/systemtap/org.eclipse.linuxtools.callgraph/plugin.xml
index 259bcac109..ebf9fc9d95 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/plugin.xml
+++ b/systemtap/org.eclipse.linuxtools.callgraph/plugin.xml
@@ -1,6 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
+
+
+ <extension
+ point="org.eclipse.ui.views">
+ <view
+ category="org.eclipse.cdt.ui.views"
+ class="org.eclipse.linuxtools.callgraph.CallgraphView"
+ icon="icons/genericregister_obj.gif"
+ id="org.eclipse.linuxtools.callgraph.callgraphview"
+ name="Call Graph"
+ restorable="true">
+ </view>
+ </extension>
<extension
point="org.eclipse.ui.perspectiveExtensions">
@@ -14,23 +27,8 @@
</perspectiveExtension>
</extension>
-
- <extension
- id="org.eclipse.linuxtools.callgraph.callgraphview"
- name="Callgraph View"
- point="org.eclipse.ui.views">
- <view
- category="org.eclipse.cdt.ui.views"
- class="org.eclipse.linuxtools.callgraph.CallgraphView"
- icon="icons/genericregister_obj.gif"
- id="org.eclipse.linuxtools.callgraph.callgraphview"
- name="Call Graph"
- restorable="true">
- </view>
- </extension>
-<!--
<extension
point="org.eclipse.ui.actionSets">
<actionSet
@@ -81,14 +79,14 @@
id="org.eclipse.linuxtools.callgraph.command4"
name="Remove stap marker function">
</command>
- </extension>-->
+ </extension>
<extension
id="org.eclipse.linuxtools.callgraph.graphparser"
name="GraphParser"
point="org.eclipse.linuxtools.callgraph.core.parser">
<parser
class="org.eclipse.linuxtools.callgraph.StapGraphParser"
- realtime="true">
+ realtime="false">
</parser>
</extension>
</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/Activator.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/Activator.java
new file mode 100644
index 0000000000..80235a019c
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/Activator.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * 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.callgraph;
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.callgraph"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+
+ //TODO: Is this too slow?
+ CallGraphConstants.setPluginLocation(getPluginLocation());
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ 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);
+ }
+
+ public String getPluginLocation() {
+ Bundle bundle = getBundle();
+
+ URL locationUrl = FileLocator.find(bundle,new Path("/"), null); //$NON-NLS-1$
+ URL fileUrl = null;
+ try {
+ fileUrl = FileLocator.toFileURL(locationUrl);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return fileUrl.getFile();
+
+ }
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/AggregateLayoutAlgorithm.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/AggregateLayoutAlgorithm.java
index 2b83572669..d57454706e 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/AggregateLayoutAlgorithm.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/AggregateLayoutAlgorithm.java
@@ -25,32 +25,23 @@ import org.eclipse.zest.layouts.dataStructures.InternalRelationship;
*/
public class AggregateLayoutAlgorithm extends GridLayoutAlgorithm{
- protected ArrayList<Long> list;
+ protected ArrayList<Long> sortedAggregateTimes;
protected Long totalTime;
protected int graphWidth;
-
- /**
- * Layout algorithm for the Aggregate View in Eclipse Callgraph, based on the GridLayoutAlgorithm in Zest.
- * @param styles
- * @param entries
- * @param time
- * @param width
- */
public AggregateLayoutAlgorithm(int styles, TreeSet<Entry<String, Long>> entries, Long time, int width){
super(styles);
- list = new ArrayList<Long>();
- for (Entry<String, Long> ent : entries)
- list.add(ent.getValue());
+ this.sortedAggregateTimes = new ArrayList<Long>();
+ for (Entry<String,Long> val : entries){
+ this.sortedAggregateTimes.add(val.getValue());
+ }
this.totalTime = time;
this.graphWidth = width;
}
-
- /**
- * Make final changes to the appearance of the nodes
- */
+
+ //THIS METHOD OVERRIDES THE PARENT'S IMPLEMENTATION (WHICH IS EMPTY ANYWAYS)
protected void postLayoutAlgorithm(InternalNode[] entitiesToLayout, InternalRelationship[] relationshipsToConsider) {
Long time;
final int minimumSize = 40;
@@ -59,12 +50,11 @@ public class AggregateLayoutAlgorithm extends GridLayoutAlgorithm{
double ycursor = 0.0;
for (InternalNode sn : entitiesToLayout) {
- time = list.remove(0);
+ time = sortedAggregateTimes.remove(0);
percent = (double) time / (double) totalTime;
double snWidth = (sn.getInternalWidth() * percent) + minimumSize;
double snHeight = (sn.getInternalHeight() * percent) + minimumSize;
-
sn.setSize(snWidth, snHeight);
if (xcursor + snWidth > graphWidth) {
//reaching the end of row, move to lower column
@@ -76,6 +66,7 @@ public class AggregateLayoutAlgorithm extends GridLayoutAlgorithm{
xcursor += snWidth;
}
}
+
}
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/CallGraphConstants.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/CallGraphConstants.java
index a44ad95d71..d08fb7f34a 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/CallGraphConstants.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/CallGraphConstants.java
@@ -13,16 +13,11 @@ package org.eclipse.linuxtools.callgraph;
public class CallGraphConstants {
- private static String PLUGIN_LOCATION = ""; //$NON-NLS-1$
- public static final String viewID = "org.eclipse.linuxtools.callgraph.callgraphview"; //$NON-NLS-1$
+ public static String PLUGIN_LOCATION = ""; //$NON-NLS-1$
public static void setPluginLocation(String val) {
PLUGIN_LOCATION = val;
}
-
- public static String getPluginLocation() {
- return PLUGIN_LOCATION;
- }
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/CallgraphPlugin.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/CallgraphPlugin.java
deleted file mode 100644
index 85915f1654..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/CallgraphPlugin.java
+++ /dev/null
@@ -1,95 +0,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
- *******************************************************************************/
-package org.eclipse.linuxtools.callgraph;
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class CallgraphPlugin extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.linuxtools.callgraph"; //$NON-NLS-1$
-
- // The shared instance
- private static CallgraphPlugin plugin;
-
- /**
- * The constructor
- */
- public CallgraphPlugin() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
-
- //TODO: Is this too slow?
- CallGraphConstants.setPluginLocation(getPluginLocation());
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static CallgraphPlugin 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);
- }
-
- public String getPluginLocation() {
- Bundle bundle = getBundle();
-
- URL locationUrl = FileLocator.find(bundle,new Path("/"), null); //$NON-NLS-1$
- URL fileUrl = null;
- try {
- fileUrl = FileLocator.toFileURL(locationUrl);
- } catch (IOException e) {
- e.printStackTrace();
- }
- return fileUrl.getFile();
-
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/CallgraphView.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/CallgraphView.java
index e8577a0f41..f5f954d7b3 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/CallgraphView.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/CallgraphView.java
@@ -11,302 +11,131 @@
package org.eclipse.linuxtools.callgraph;
-import java.util.HashMap;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.draw2d.LightweightSystem;
-import org.eclipse.draw2d.parts.ScrollableThumbnail;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.Vector;
+
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.linuxtools.callgraph.core.PluginConstants;
-import org.eclipse.linuxtools.callgraph.core.SystemTapParser;
+import org.eclipse.linuxtools.callgraph.core.SystemTapErrorHandler;
import org.eclipse.linuxtools.callgraph.core.SystemTapUIErrorMessages;
-import org.eclipse.linuxtools.callgraph.core.SystemTapView;
-import org.eclipse.linuxtools.callgraph.graphlisteners.AutoScrollSelectionListener;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Canvas;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Spinner;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+import org.eclipse.ui.part.ViewPart;
/**
* The SystemTap View for displaying output of the 'stap' command, and acts
* as a container for any graph to be rendered. Any buttons/controls/actions
* necessary to the smooth running of SystemTap could be placed here.
*/
-public class CallgraphView extends SystemTapView {
-
- private StapGraphParser parser;
-
-
- private Action view_treeview;
- private Action view_radialview;
- private Action view_aggregateview;
- private Action view_levelview;
- private Action view_refresh;
- private Action animation_slow;
- private Action animation_fast;
- private Action mode_collapsednodes;
- private Action markers_next;
- private Action markers_previous;
- private Action limits;
- private Action goto_next;
- private Action goto_previous;
- private Action goto_last;
- private Action play;
- ImageDescriptor playImage= CallgraphPlugin.getImageDescriptor("icons/perform.png"); //$NON-NLS-1$
- ImageDescriptor pauseImage= CallgraphPlugin.getImageDescriptor("icons/pause.gif"); //$NON-NLS-1$
+public class CallgraphView extends ViewPart {
+ private static final String NEW_LINE = Messages.getString("CallgraphView.3"); //$NON-NLS-1$
+ private static CallgraphView stapview;
+ private static boolean isInitialized = false;
- private IMenuManager menu;
- private IMenuManager gotoMenu;
- private IMenuManager view;
- private IMenuManager animation;
- private IMenuManager markers; //Unused
- public IToolBarManager mgr;
+ private Display display;
+ private static StyledText viewer;
+ private int previousEnd;
+
+
+ private static Action open_callgraph;
+ private static Action save_callgraph;
+ private static Action open_default;
+ private static Action error_errorLog;
+ private static Action error_deleteError;
+ private static Action view_treeview;
+ private static Action view_radialview;
+ private static Action view_aggregateview;
+ private static Action view_boxview;
+ private static Action view_refresh;
+ private static Action animation_slow;
+ private static Action animation_fast;
+ private static Action mode_collapsednodes;
+ private static Action markers_next;
+ private static Action markers_previous;
+ private static Action limits;
+ private static Action goto_next;
+ private static Action goto_previous;
+ private static Action goto_last;
- private Composite graphComp;
- private Composite treeComp;
+ private static IMenuManager menu;
+ private static IMenuManager gotoMenu;
+ private static IMenuManager file;
+ private static IMenuManager errors;
+ private static IMenuManager view;
+ private static IMenuManager animation;
+ private static IMenuManager markers; //Unused
+ private static IMenuManager help;
+ @SuppressWarnings("unused")
+ private static Action help_about;
+ private static Action help_version;
+ public static IToolBarManager mgr;
- private StapGraph g;
- private int treeSize = 200;
-
-
+ public static Composite masterComposite;
+ private static Composite graphComp;
+ private static Composite treeComp;
+
+ private static StapGraphParser parser;
+ private static StapGraph graph;
+
/**
- * Initializes the view by creating composites (if necessary) and canvases
- * Calls loadData(), and calls finishLoad() if not in realTime mode (otherwise
- * it is up to the user-defined update methods to finish loading).
- *
- * @return status
- *
+ * The constructor.
+ * @return
*/
- public IStatus initializeView(Display targetDisplay, IProgressMonitor monitor) {
-
- Display disp = targetDisplay;
- if (disp == null)
- disp = Display.getCurrent();
- if (disp == null)
- disp = Display.getDefault();
-
- treeSize = 200;
- makeTreeComp(treeSize);
- makeGraphComp();
- graphComp.setBackgroundMode(SWT.INHERIT_FORCE);
-
- //Create papa canvas
- Canvas papaCanvas = new Canvas(graphComp, SWT.BORDER);
- GridLayout papaLayout = new GridLayout(1, true);
- papaLayout.horizontalSpacing=0;
- papaLayout.verticalSpacing=0;
- papaLayout.marginHeight=0;
- papaLayout.marginWidth=0;
- papaCanvas.setLayout(papaLayout);
- GridData papaGD = new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false);
- papaGD.widthHint=160;
- papaCanvas.setLayoutData(papaGD);
-
-
- //Add first button
- Image image = CallgraphPlugin.getImageDescriptor("icons/up.gif").createImage(); //$NON-NLS-1$
- Button up = new Button(papaCanvas, SWT.PUSH);
- GridData buttonData = new GridData(SWT.CENTER, SWT.CENTER, true, false);
- buttonData.widthHint = 150;
- buttonData.heightHint = 20;
- up.setData(buttonData);
- up.setImage(image);
- up.setToolTipText(Messages.getString("CallgraphView.ThumbNailUp")); //$NON-NLS-1$
-
-
- //Add thumb canvas
- Canvas thumbCanvas = new Canvas(papaCanvas, SWT.NONE);
-
-
- //Add second button
- image = CallgraphPlugin.getImageDescriptor("icons/down.gif").createImage(); //$NON-NLS-1$
- Button down = new Button(papaCanvas, SWT.PUSH);
- buttonData = new GridData(SWT.CENTER, SWT.CENTER, true, false);
- buttonData.widthHint = 150;
- buttonData.heightHint = 0;
- down.setData(buttonData);
- down.setImage(image);
- down.setToolTipText(Messages.getString("CallgraphView.ThumbNailDown")); //$NON-NLS-1$
-
-
- //Initialize graph
- g = new StapGraph(graphComp, SWT.BORDER, treeComp, papaCanvas, this);
- g.setLayoutData(new GridData(masterComposite.getBounds().width,Display.getCurrent().getBounds().height - treeSize));
-
- up.addSelectionListener(new AutoScrollSelectionListener(
- AutoScrollSelectionListener.AutoScroll_up, g));
- down.addSelectionListener(new AutoScrollSelectionListener(
- AutoScrollSelectionListener.AutoScroll_down, g));
-
-
- //Initialize thumbnail
- GridData thumbGD = new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false);
- thumbGD.widthHint=160;
- thumbCanvas.setLayoutData(thumbGD);
- LightweightSystem lws = new LightweightSystem(thumbCanvas);
- ScrollableThumbnail thumb = new ScrollableThumbnail(g.getViewport());
- thumb.setSource(g.getContents());
- lws.setContents(thumb);
-
- loadData(monitor);
- if (!parser.isRealTime())
- return finishLoad(monitor);
-
- finishLoad(monitor);
-
-
- return Status.OK_STATUS;
+ public CallgraphView() {
+ isInitialized = true;
}
- /**
- * Load data.
- * @param mon -- Progress monitor.
- * @return
- */
- private IStatus loadData(IProgressMonitor mon) {
- IProgressMonitor monitor = mon;
- //Dummy node, set start time
- if (g.getNodeData(0) == null) {
- g.loadData(SWT.NONE, 0, StapGraph.CONSTANT_TOP_NODE_NAME,
- 1, 1, -1, false, ""); //$NON-NLS-1$
+ public static CallgraphView getSingleInstance(){
+ if (isInitialized){
+ return stapview;
}
- g.setStartTime(parser.startTime);
- g.setEndTime(parser.endingTimeInNS);
-
-
- /*
- * Load graph data
- */
- boolean marked = false;
- String msg = ""; //$NON-NLS-1$
- for (int id_parent : parser.serialMap.keySet()) {
- if (g.getNodeData(id_parent) == null) {
- if (parser.markedMap.get(id_parent) != null) {
- marked = true;
- msg = parser.markedMap.remove(id_parent);
- }
- g.loadData(SWT.NONE, id_parent, parser.serialMap.get(id_parent), parser.timeMap.get(id_parent),
- 1, 0, marked, msg);
- }
-
- for (int id_child : parser.outNeighbours.get(id_parent)) {
- if (g.getNodeData(id_child) != null)
- continue;
- if (monitor.isCanceled()) {
- return Status.CANCEL_STATUS;
- }
-
- marked = false;
- msg = ""; //$NON-NLS-1$
- if (parser.markedMap.get(id_child) != null) {
- marked = true;
- msg = parser.markedMap.remove(id_child);
- }
- if (id_child != -1) {
- if (parser.timeMap.get(id_child) == null){
- g.loadData(SWT.NONE, id_child, parser.serialMap
- .get(id_child), parser.timeMap.get(0),
- 1, id_parent, marked,msg);
- }else{
- g.loadData(SWT.NONE, id_child, parser.serialMap
- .get(id_child), parser.timeMap.get(id_child),
- 1, id_parent, marked,msg);
- }
- }
- }
-
- }
-
- monitor.worked(1);
- if (parser.markedMap.size() > 0) {
- //Still some markers left
- for (int key : parser.markedMap.keySet()) {
- g.insertMessage(key, parser.markedMap.get(key));
- }
-
- //Erase the remaining nodes, just in case
- parser.markedMap.clear();
- }
-
-
- if (g.aggregateTime == null)
- g.aggregateTime = new HashMap<String, Long>();
- if (g.aggregateCount == null)
- g.aggregateCount = new HashMap<String, Integer>();
-
- g.aggregateCount.putAll(parser.countMap);
- g.aggregateTime.putAll(parser.aggregateTimeMap);
- g.setLastFunctionCalled(parser.lastFunctionCalled);
-
-
- //Finish off by collapsing nodes, initializing the tree and setting options
- g.recursivelyCollapseAllChildrenOfNode(g.getTopNode());
- monitor.worked(1);
- setGraphOptions(true);
- g.initializeTree();
- g.setProject(parser.project);
-
-
- return Status.OK_STATUS;
+ return null;
}
- /**
- * Completes the loading process by calculating aggregate data.
- *
- * @param monitor
- * @return
- */
- private IStatus finishLoad(IProgressMonitor monitor) {
-
- if (g.aggregateCount == null)
- g.aggregateCount = new HashMap<String, Integer>();
-
- g.aggregateCount.putAll(parser.countMap);
-
- if (g.aggregateTime == null)
- g.aggregateTime = new HashMap<String, Long>();
- g.aggregateTime.putAll(parser.aggregateTimeMap);
-
- //Set total time
- if (parser.totalTime != -1)
- g.setTotalTime(parser.totalTime);
-
- //-------------Finish initializations
- //Generate data for collapsed nodes
- if (monitor.isCanceled()) {
- return Status.CANCEL_STATUS;
- }
- g.initializeTree();
-
-
- if (monitor.isCanceled()) {
- return Status.CANCEL_STATUS;
- }
- g.setCallOrderList(parser.callOrderList);
- g.setProject(parser.project);
-
-
- this.initializePartControl();
- return Status.OK_STATUS;
+
+ public static void testFunction() {
+ if (masterComposite != null && !masterComposite.isDisposed())
+ masterComposite.dispose();
+ }
+
+ public static void setValues(Composite graphC, Composite treeC, StapGraph g, StapGraphParser p){
+ treeComp = treeC;
+ graphComp = graphC;
+ graph = g;
+ parser = p;
}
@@ -314,13 +143,12 @@ public class CallgraphView extends SystemTapView {
* Enable or Disable the graph options
* @param visible
*/
- public void setGraphOptions (boolean visible){
- play.setEnabled(visible);
- save_file.setEnabled(visible);
+ public static void setGraphOptions (boolean visible){
+ save_callgraph.setEnabled(visible);
view_treeview.setEnabled(visible);
view_radialview.setEnabled(visible);
view_aggregateview.setEnabled(visible);
- view_levelview.setEnabled(visible);
+ view_boxview.setEnabled(visible);
view_refresh.setEnabled(visible);
limits.setEnabled(visible);
@@ -335,26 +163,51 @@ public class CallgraphView extends SystemTapView {
goto_previous.setEnabled(visible);
goto_last.setEnabled(visible);
}
+
+/**
+ * @param doMaximize : true && view minimized will maximize the view,
+ * otherwise it will just 'refresh'
+ */
+ public static void maximizeOrRefresh(boolean doMaximize){
+ IWorkbenchPage page = CallgraphView
+ .getSingleInstance().getViewSite().getWorkbenchWindow().getActivePage();
+
+ if (doMaximize && page.getPartState(page.getActivePartReference()) != IWorkbenchPage.STATE_MAXIMIZED){
+ IWorkbenchAction action = ActionFactory.MAXIMIZE.create(CallgraphView
+ .getSingleInstance().getViewSite().getWorkbenchWindow());
+ action.run();
+ }else{
+ CallgraphView.layout();
+ }
+ }
+
+
+ public static void firstTimeRefresh(){
+ graphComp.setSize(masterComposite.getSize().x ,masterComposite.getSize().y);
+ }
- public void makeTreeComp(int treeSize) {
+ public static Composite makeTreeComp(int treeSize) {
if (treeComp != null && !treeComp.isDisposed()) {
- treeComp.dispose();
+ return treeComp;
}
- treeComp = new Composite(this.masterComposite, SWT.NONE);
+ Composite treeComp = new Composite(CallgraphView.masterComposite, SWT.NONE);
GridData treegd = new GridData(SWT.BEGINNING, SWT.FILL, false, true);
treegd.widthHint = treeSize;
treeComp.setLayout(new FillLayout());
treeComp.setLayoutData(treegd);
+ return treeComp;
}
- public void makeGraphComp() {
- if (graphComp != null && !graphComp.isDisposed()) {
+ public static Composite makeGraphComp() {
+// if (graphComp != null && !graphComp.isDisposed()) {
+// return graphComp;
+// }
+ if (graphComp != null)
graphComp.dispose();
- }
- graphComp = new Composite(this.masterComposite, SWT.NONE);
+ Composite graphComp = new Composite(CallgraphView.masterComposite, SWT.NONE);
GridData graphgd = new GridData(SWT.FILL, SWT.FILL, true, true);
GridLayout gl = new GridLayout(2, false);
gl.horizontalSpacing=0;
@@ -362,25 +215,89 @@ public class CallgraphView extends SystemTapView {
graphComp.setLayout(gl);
graphComp.setLayoutData(graphgd);
+ return graphComp;
}
-
+
+ public static void layout() {
+ masterComposite.layout();
+ }
+
+ /**
+ * If view is not maximized it will be maximized
+ */
+ public static void maximizeIfUnmaximized() {
+ IWorkbenchPage page = CallgraphView
+ .getSingleInstance().getViewSite().getWorkbenchWindow().getActivePage();
+
+ if (page.getPartState(page.getActivePartReference()) != IWorkbenchPage.STATE_MAXIMIZED){
+ IWorkbenchAction action = ActionFactory.MAXIMIZE.create(CallgraphView
+ .getSingleInstance().getViewSite().getWorkbenchWindow());
+ action.run();
+ }
+
+ }
+
+
+//
+// public static void disposeAll() {
+// if (graphComp != null) {
+// graphComp.setVisible(false);
+// GridData gd = (GridData) graphComp.getLayoutData();
+// gd.exclude = true;
+// graphComp.setLayoutData(gd);
+// graphComp.dispose();
+// }
+// if (treeComp != null) {
+// treeComp.setVisible(false);
+// GridData gd = (GridData) treeComp.getLayoutData();
+// gd.exclude = true;
+// treeComp.setLayoutData(gd);
+// treeComp.dispose();
+// }
+// }
/**
* This must be executed before a Graph is displayed
*/
- private void initializePartControl(){
+ public static void createPartControl(){
+
+
setGraphOptions(true);
- if (graphComp == null)
- return;
+ String text = ""; //$NON-NLS-1$
+ StyleRange[] sr = null;
+
+
+ if (viewer != null && !viewer.isDisposed()) {
+ text = viewer.getText();
+ sr = viewer.getStyleRanges();
+ viewer.dispose();
+ }
+
+
graphComp.setParent(masterComposite);
if (treeComp != null)
treeComp.setParent(masterComposite);
- graphComp.setSize(masterComposite.getSize().x ,masterComposite.getSize().y);
+ if (graph == null) {
+ createViewer(masterComposite);
+ viewer.setText(text);
+ viewer.setStyleRanges(sr);
+ }
+
+ //MAXIMIZE THE SYSTEMTAP VIEW WHEN RENDERING A GRAPH
+ firstTimeRefresh();
}
+ public static void createViewer(Composite parent){
+ viewer = new StyledText(parent, SWT.READ_ONLY | SWT.MULTI
+ | SWT.V_SCROLL | SWT.WRAP);
+
+ viewer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ Font font = new Font(parent.getDisplay(), "Monospace", 11, SWT.NORMAL); //$NON-NLS-1$
+ viewer.setFont(font);
+ }
/**
* This is a callback that will allow us to create the viewer and
@@ -390,6 +307,7 @@ public class CallgraphView extends SystemTapView {
if (masterComposite != null)
masterComposite.dispose();
masterComposite = parent;
+ this.display = parent.getDisplay();
GridLayout layout = new GridLayout(2, false);
layout.horizontalSpacing=0;
GridData gd = new GridData(100, 100);
@@ -397,6 +315,10 @@ public class CallgraphView extends SystemTapView {
parent.setLayout(layout);
parent.setLayoutData(gd);
+ //CREATE THE TEXT VIEWER
+ if (graph == null)
+ createViewer(parent);
+
// LOAD ALL ACTIONS
createActions();
@@ -408,40 +330,56 @@ public class CallgraphView extends SystemTapView {
menu = getViewSite().getActionBars().getMenuManager();
// ADD OPTIONS TO THE GRAPH MENU
- addFileMenu();
+ file = new MenuManager(Messages.getString("CallgraphView.0")); //$NON-NLS-1$
view = new MenuManager(Messages.getString("CallgraphView.1")); //$NON-NLS-1$
+ errors = new MenuManager(Messages.getString("CallgraphView.Errors")); //$NON-NLS-1$
animation = new MenuManager(Messages.getString("CallgraphView.2")); //$NON-NLS-1$
+ help = new MenuManager(Messages.getString("CallgraphView.5")); //$NON-NLS-1$
markers = new MenuManager(Messages.getString("CallgraphView.6")); //$NON-NLS-1$
gotoMenu = new MenuManager(Messages.getString("CallgraphView.9")); //$NON-NLS-1$
+
+
+
+ menu.add(file);
menu.add(view);
-// menu.add(animation);
+// menu.add(animation);
menu.add(gotoMenu);
- addErrorMenu();
- addHelpMenu();
+ menu.add(errors);
+ menu.add(help);
+
+
+ file.add(open_callgraph);
+ file.add(open_default);
+ file.add(save_callgraph);
+
+
+ errors.add(error_errorLog);
+ errors.add(error_deleteError);
+
view.add(view_treeview);
view.add(view_radialview);
view.add(view_aggregateview);
- view.add(view_levelview);
+ view.add(view_boxview);
view.add(getView_refresh());
view.add(mode_collapsednodes);
view.add(limits);
- gotoMenu.add(play);
gotoMenu.add(goto_previous);
gotoMenu.add(goto_next);
gotoMenu.add(goto_last);
- addKillButton();
- mgr.add(play);
+
mgr.add(view_radialview);
mgr.add(view_treeview);
- mgr.add(view_levelview);
+ mgr.add(view_boxview);
mgr.add(view_aggregateview);
+ mgr.add(getView_refresh());
mgr.add(mode_collapsednodes);
// help.add(help_about);
+ help.add(help_version);
markers.add(markers_next);
markers.add(markers_previous);
@@ -451,71 +389,432 @@ public class CallgraphView extends SystemTapView {
// menu.add(markers);
setGraphOptions(false);
+
+ // Colouring helper variable
+ previousEnd = 0;
+ stapview = this;
}
+ /**
+ * Passing the focus request to the viewer's control.
+ */
+ public void setFocus() {
+ if (viewer != null && !viewer.isDisposed())
+ viewer.setFocus();
+ }
+
+ /**
+ * Force the CallgraphView to initialize
+ */
+ public static void forceDisplay(){
+ try {
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ window.getActivePage().showView("org.eclipse.linuxtools.callgraph.callgraphview").setFocus(); //$NON-NLS-1$
+ } catch (PartInitException e2) {
+ e2.printStackTrace();
+ }
+
+ }
+
+ public void prettyPrintln(String text) {
+ Vector<StyleRange> styles = new Vector<StyleRange>();
+ String[] txt = text.split("\\n"); //$NON-NLS-1$
+ int lineOffset = 0;
+ int inLineOffset;
+
+ //txt[] contains text, with one entry for each new line
+ for (int i = 0; i < txt.length; i++) {
+
+ //Skip blank strings
+ if (txt[i].length() == 0) {
+ viewer.append(NEW_LINE);
+ continue;
+ }
+
+ //Search for colour codes, if none exist then continue
+ String[] split_txt = txt[i].split("~\\("); //$NON-NLS-1$
+ if (split_txt.length == 1) {
+ viewer.append(split_txt[0]);
+ viewer.append(NEW_LINE);
+ continue;
+ }
+
+ inLineOffset = 0;
+ for (int k = 0; k < split_txt.length; k++) {
+ //Skip blank substrings
+ if (split_txt[k].length() == 0)
+ continue;
+
+ //Split for the number codes
+ String[] coloursAndText = split_txt[k].split("\\)~"); //$NON-NLS-1$
+
+ //If the string is properly formatted, colours should be length 2
+ //If it is not properly formatted, don't colour (just print)
+ if (coloursAndText.length != 2) {
+ for (int j = 0; j < coloursAndText.length; j++) {
+ viewer.append(coloursAndText[j]);
+ inLineOffset += coloursAndText[j].length();
+ }
+ continue;
+ }
+
+ //The first element in the array should contain the colours
+ String[] colours = coloursAndText[0].split(","); //$NON-NLS-1$
+ if (colours.length < 3) continue;
+
+ //The second element in the array should contain the text
+ viewer.append(coloursAndText[1]);
+
+ //Create a colour based on the 3 integers (if there are any more integers, just ignore)
+ int R = new Integer(colours[0].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
+ int G = new Integer(colours[1].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
+ int B = new Integer(colours[2].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
+
+ if (R > 255) R = 255;
+ if (G > 255) G = 255;
+ if (B > 255) B = 255;
+
+ if (R < 0 ) R = 0;
+ if (G < 0 ) G = 0;
+ if (B < 0 ) B = 0;
+
+ Color newColor = new Color(display, R, G, B);
+
+ //Find the offset of the current line
+ lineOffset = viewer.getOffsetAtLine(viewer.getLineCount() - 1);
+
+ //Create a new style that lasts no further than the length of the line
+ StyleRange newStyle = new StyleRange(lineOffset + inLineOffset,
+ coloursAndText[1].length(),
+ newColor, null);
+ styles.addElement(newStyle);
+
+ inLineOffset+=coloursAndText[1].length();
+ }
+
+ viewer.append(NEW_LINE);
+ }
+ //Create a new style range
+ StyleRange[] s = new StyleRange[styles.size()];
+ styles.copyInto(s);
+
+ int cnt = viewer.getCharCount();
+
+ //Using replaceStyleRanges with previousEnd, etc, effectively adds
+ //the StyleRange to the existing set of Style Ranges (so we don't
+ //waste time fudging with old style ranges that haven't changed)
+ viewer.replaceStyleRanges(previousEnd, cnt - previousEnd, s);
+ previousEnd = cnt;
+
+ //Change focus and update
+ viewer.setTopIndex(viewer.getLineCount() - 1);
+ viewer.update();
+ }
+
+ public void println(String text) {
+ if (viewer != null && !viewer.isDisposed()) {
+ viewer.append(text);
+ viewer.setTopIndex(viewer.getLineCount() - 1);
+ viewer.update();
+ }
+ }
+
+ public void clearAll() {
+ if (viewer != null && !viewer.isDisposed()) {
+ previousEnd = 0;
+ viewer.setText(""); //$NON-NLS-1$
+ viewer.update();
+ }
+ }
+
+ /**
+ * Testing convenience method to see what was printed
+ *
+ * @return viewer text
+ */
+ public String getText() {
+ return viewer.getText();
+ }
+
+
+ /**
+ * Populates the file menu
+ */
+ public void createFileActions() {
+ //Opens from some location in your program
+ open_callgraph = new Action(Messages.getString("CallgraphView.7")){ //$NON-NLS-1$
+ public void run(){
+ FileDialog dialog = new FileDialog(new Shell(), SWT.DEFAULT);
+ String filePath = dialog.open();
+ if (filePath != null){
+ StapGraphParser new_parser = new StapGraphParser();
+ new_parser.setFile(filePath);
+ new_parser.schedule();
+ }
+ }
+ };
+
+ //Opens from the default location
+ open_default = new Action(Messages.getString("CallgraphView.11")){ //$NON-NLS-1$
+ public void run(){
+ StapGraphParser new_parser = new StapGraphParser();
+ new_parser.schedule();
+ }
+ };
+
+
+ //Save callgraph.out
+ save_callgraph = new Action(Messages.getString("CallgraphView.8")){ //$NON-NLS-1$
+ public void run(){
+ Shell sh = new Shell();
+ FileDialog dialog = new FileDialog(sh, SWT.SAVE);
+ String filePath = dialog.open();
+
+ if (filePath != null) {
+ parser.saveData(filePath);
+ }
+ }
+ };
+
+ }
+
+ public void createHelpActions() {
+ help_version = new Action(Messages.getString("CallgraphView.13")) { //$NON-NLS-1$
+ public void run() {
+ Runtime rt = Runtime.getRuntime();
+ try {
+ Process pr = rt.exec("stap -V"); //$NON-NLS-1$
+ BufferedReader buf = new BufferedReader(new InputStreamReader(pr
+ .getErrorStream()));
+ String line = ""; //$NON-NLS-1$
+ String message = ""; //$NON-NLS-1$
+
+ while ((line = buf.readLine()) != null) {
+ message += line + NEW_LINE; //$NON-NLS-1$
+ }
+
+ try {
+ pr.waitFor();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+
+
+ Shell sh = new Shell();
+
+ MessageDialog.openInformation(sh, Messages.getString("CallgraphView.SystemTapVersionBox"), message); //$NON-NLS-1$
+
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ };
+
+ help_about = new Action(Messages.getString("CallgraphView.4")) { //$NON-NLS-1$
+ public void run() {
+ Display disp = Display.getCurrent();
+ if (disp == null){
+ disp = Display.getDefault();
+ }
+
+
+ Shell sh = new Shell(disp, SWT.MIN | SWT.MAX);
+ sh.setSize(425, 540);
+ GridLayout gl = new GridLayout(1, true);
+ sh.setLayout(gl);
+
+ sh.setText(""); //$NON-NLS-1$
+
+ Image img = new Image(disp, PluginConstants.PLUGIN_LOCATION+"systemtap.png"); //$NON-NLS-1$
+ Composite cmp = new Composite(sh, sh.getStyle());
+ cmp.setLayout(gl);
+ GridData data = new GridData(415,100);
+ cmp.setLayoutData(data);
+ cmp.setBackgroundImage(img);
+
+ Composite c = new Composite(sh, sh.getStyle());
+ c.setLayout(gl);
+ GridData gd = new GridData(415,400);
+ c.setLayoutData(gd);
+ c.setLocation(0,300);
+ StyledText viewer = new StyledText(c, SWT.READ_ONLY | SWT.MULTI
+ | SWT.V_SCROLL | SWT.WRAP | SWT.BORDER);
+
+ GridData viewerGD = new GridData(SWT.FILL, SWT.FILL, true, true);
+ viewer.setLayoutData(viewerGD);
+ Font font = new Font(sh.getDisplay(), "Monospace", 11, SWT.NORMAL); //$NON-NLS-1$
+ viewer.setFont(font);
+ viewer.setText(
+ "" + //$NON-NLS-1$
+ "" + //$NON-NLS-1$
+ "" + //$NON-NLS-1$
+ "" + //$NON-NLS-1$
+ "" + //$NON-NLS-1$
+ "" + //$NON-NLS-1$
+
+ "" + //$NON-NLS-1$
+//
+// Messages.getString("LaunchAbout.9") + //$NON-NLS-1$
+// Messages.getString("LaunchAbout.10") + //$NON-NLS-1$
+
+ "" + //$NON-NLS-1$
+ "" + //$NON-NLS-1$
+ "" + //$NON-NLS-1$
+
+// Messages.getString("LaunchAbout.14") + //$NON-NLS-1$
+// Messages.getString("LaunchAbout.15") + //$NON-NLS-1$
+// Messages.getString("LaunchAbout.16") + //$NON-NLS-1$
+
+ "" + //$NON-NLS-1$
+
+// Messages.getString("LaunchAbout.18") + //$NON-NLS-1$
+// Messages.getString("LaunchAbout.19") + //$NON-NLS-1$
+
+ "" + //$NON-NLS-1$
+ "" //$NON-NLS-1$
+ );
+
+
+
+ sh.open();
+ }
+ };
+ }
+
+ /**
+ * Populates the Errors menu
+ */
+ public void createErrorActions() {
+
+ error_errorLog = new Action(Messages.getString("CallgraphView.OpenLog")) { //$NON-NLS-1$
+ public void run() {
+ boolean error = false;
+ File log = new File(PluginConstants.DEFAULT_OUTPUT + "Error.log"); //$NON-NLS-1$
+ BufferedReader buff;
+ try {
+ buff = new BufferedReader(new FileReader(log));
+ String logText = ""; //$NON-NLS-1$
+ String line;
+
+ while ((line = buff.readLine()) != null) {
+ logText+=line + PluginConstants.NEW_LINE;
+ }
+
+ Shell sh = new Shell(SWT.BORDER | SWT.TITLE);
+
+ sh.setText(Messages.getString("CallgraphView.15")); //$NON-NLS-1$
+ sh.setLayout(new FillLayout());
+ sh.setSize(600,600);
+
+ StyledText txt = new StyledText(sh, SWT.MULTI | SWT.V_SCROLL | SWT.WRAP | SWT.READ_ONLY);
+
+ txt.setText(logText);
+
+ sh.setText(Messages.getString("CallgraphView.21")); //$NON-NLS-1$
+
+ sh.open();
+ txt.setTopIndex(txt.getLineCount());
+
+
+ } catch (FileNotFoundException e) {
+ error = true;
+ } catch (IOException e) {
+ error = true;
+ } finally {
+ if (error) {
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
+ Messages.getString("CallgraphView.ErrorMessageName"), //$NON-NLS-1$
+ Messages.getString("CallgraphView.ErrorMessageTitle"), //$NON-NLS-1$
+ Messages.getString("CallgraphView.ErrorMessageBody") + //$NON-NLS-1$
+ Messages.getString("CallgraphView.ErrorMessageBody2")); //$NON-NLS-1$
+ mess.schedule();
+ }
+ }
+
+ }
+ };
+
+
+ error_deleteError = new Action(Messages.getString("CallgraphView.ClearLog")) { //$NON-NLS-1$
+ public void run() {
+ if (!MessageDialog.openConfirm(new Shell(), Messages.getString("CallgraphView.DeleteLogsTitle"), //$NON-NLS-1$
+ Messages.getString("CallgraphView.DeleteLogsMessage") + //$NON-NLS-1$
+ Messages.getString("CallgraphView.DeleteLogsMessage2"))) //$NON-NLS-1$
+ return;
+
+ SystemTapErrorHandler.delete();
+ }
+ };
+
+
+ }
public void createViewActions() {
//Set drawmode to tree view
view_treeview = new Action(Messages.getString("CallgraphView.16")){ //$NON-NLS-1$
public void run() {
- g.draw(StapGraph.CONSTANT_DRAWMODE_TREE, g.getAnimationMode(),
- g.getRootVisibleNodeNumber());
- g.scrollTo(g.getNode(g.getRootVisibleNodeNumber()).getLocation().x
- - g.getBounds().width / 2, g.getNode(
- g.getRootVisibleNodeNumber()).getLocation().y);
- if (play != null)
- play.setEnabled(true);
+ graph.draw(StapGraph.CONSTANT_DRAWMODE_TREE, graph.getAnimationMode(),
+ graph.getRootVisibleNodeNumber());
+ graph.scrollTo(graph.getNode(graph.getRootVisibleNodeNumber()).getLocation().x
+ - graph.getBounds().width / 2, graph.getNode(
+ graph.getRootVisibleNodeNumber()).getLocation().y);
}
};
- ImageDescriptor treeImage = CallgraphPlugin.getImageDescriptor("icons/tree_view.gif"); //$NON-NLS-1$
+ ImageDescriptor treeImage = ImageDescriptor.createFromImage(
+ new Image(Display.getCurrent(), CallGraphConstants.PLUGIN_LOCATION + "icons/tree_view.gif")); //$NON-NLS-1$
view_treeview.setImageDescriptor(treeImage);
//Set drawmode to radial view
view_radialview = new Action(Messages.getString("CallgraphView.17")){ //$NON-NLS-1$
public void run(){
- g.draw(StapGraph.CONSTANT_DRAWMODE_RADIAL, g.getAnimationMode(),
- g.getRootVisibleNodeNumber());
- if (play != null)
- play.setEnabled(true);
+ graph.draw(StapGraph.CONSTANT_DRAWMODE_RADIAL, graph.getAnimationMode(),
+ graph.getRootVisibleNodeNumber());
+
}
};
- ImageDescriptor d = CallgraphPlugin.getImageDescriptor("/icons/radial_view.gif"); //$NON-NLS-1$
+ ImageDescriptor d = ImageDescriptor.createFromImage(
+ new Image(Display.getCurrent(),
+ CallGraphConstants.PLUGIN_LOCATION + "/icons/radial_view.gif")); //$NON-NLS-1$
view_radialview.setImageDescriptor(d);
+
//Set drawmode to aggregate view
view_aggregateview = new Action(Messages.getString("CallgraphView.18")){ //$NON-NLS-1$
public void run(){
- g.draw(StapGraph.CONSTANT_DRAWMODE_AGGREGATE, g.getAnimationMode(),
- g.getRootVisibleNodeNumber());
- if (play != null)
- play.setEnabled(false);
+ graph.draw(StapGraph.CONSTANT_DRAWMODE_AGGREGATE, graph.getAnimationMode(),
+ graph.getRootVisibleNodeNumber());
+
}
};
- ImageDescriptor aggregateImage = CallgraphPlugin.getImageDescriptor("/icons/view_aggregateview.gif"); //$NON-NLS-1$
+ ImageDescriptor aggregateImage = ImageDescriptor.createFromImage(
+ new Image(Display.getCurrent(),
+ CallGraphConstants.PLUGIN_LOCATION + "/icons/view_aggregateview.gif")); //$NON-NLS-1$
view_aggregateview.setImageDescriptor(aggregateImage);
- //Set drawmode to level view
- view_levelview = new Action(Messages.getString("CallgraphView.19")){ //$NON-NLS-1$
+ //Set drawmode to box view
+ view_boxview = new Action(Messages.getString("CallgraphView.19")){ //$NON-NLS-1$
public void run(){
- g.draw(StapGraph.CONSTANT_DRAWMODE_LEVEL, g.getAnimationMode(),
- g.getRootVisibleNodeNumber());
- if (play != null)
- play.setEnabled(true);
+ graph.draw(StapGraph.CONSTANT_DRAWMODE_BOX, graph.getAnimationMode(),
+ graph.getRootVisibleNodeNumber());
}
};
- ImageDescriptor levelImage = CallgraphPlugin.getImageDescriptor("/icons/showchild_mode.gif"); //$NON-NLS-1$
- view_levelview.setImageDescriptor(levelImage);
+ ImageDescriptor boxImage = ImageDescriptor.createFromImage(
+ new Image(Display.getCurrent(),
+ CallGraphConstants.PLUGIN_LOCATION + "/icons/showchild_mode.gif")); //$NON-NLS-1$
+ view_boxview.setImageDescriptor(boxImage);
setView_refresh(new Action(Messages.getString("CallgraphView.Reset")){ //$NON-NLS-1$
public void run(){
- g.reset();
+ graph.reset();
}
});
- ImageDescriptor refreshImage = CallgraphPlugin.getImageDescriptor("/icons/nav_refresh.gif"); //$NON-NLS-1$
+ ImageDescriptor refreshImage = ImageDescriptor.createFromImage(
+ new Image(Display.getCurrent(),
+ CallGraphConstants.PLUGIN_LOCATION + "/icons/nav_refresh.gif")); //$NON-NLS-1$
getView_refresh().setImageDescriptor(refreshImage);
@@ -529,7 +828,7 @@ public class CallgraphView extends SystemTapView {
//Set animation mode to slow
animation_slow = new Action(Messages.getString("CallgraphView.20"), Action.AS_RADIO_BUTTON){ //$NON-NLS-1$
public void run(){
- g.setAnimationMode(StapGraph.CONSTANT_ANIMATION_SLOW);
+ graph.setAnimationMode(StapGraph.CONSTANT_ANIMATION_SLOW);
this.setChecked(true);
animation_slow.setChecked(true);
animation_fast.setChecked(false);
@@ -541,7 +840,7 @@ public class CallgraphView extends SystemTapView {
//Set animation mode to fast
animation_fast = new Action(Messages.getString("CallgraphView.22"), Action.AS_RADIO_BUTTON){ //$NON-NLS-1$
public void run(){
- g.setAnimationMode(StapGraph.CONSTANT_ANIMATION_FASTEST);
+ graph.setAnimationMode(StapGraph.CONSTANT_ANIMATION_FASTEST);
animation_slow.setChecked(false);
animation_fast.setChecked(true);
}
@@ -551,18 +850,19 @@ public class CallgraphView extends SystemTapView {
mode_collapsednodes = new Action(Messages.getString("CallgraphView.24"), Action.AS_CHECK_BOX){ //$NON-NLS-1$
public void run(){
- if (g.isCollapseMode()) {
- g.setCollapseMode(false);
- g.draw(g.getRootVisibleNodeNumber());
+ if (graph.isCollapseMode()) {
+ graph.setCollapseMode(false);
+ graph.draw(graph.getRootVisibleNodeNumber());
}
else {
- g.setCollapseMode(true);
- g.draw(g.getRootVisibleNodeNumber());
+ graph.setCollapseMode(true);
+ graph.draw(graph.getRootVisibleNodeNumber());
}
}
};
- ImageDescriptor newImage = CallgraphPlugin.getImageDescriptor("icons/mode_collapsednodes.gif"); //$NON-NLS-1$
+ ImageDescriptor newImage = ImageDescriptor.createFromImage(
+ new Image(Display.getCurrent(), CallGraphConstants.PLUGIN_LOCATION + "icons/mode_collapsednodes.gif")); //$NON-NLS-1$
mode_collapsednodes.setImageDescriptor(newImage);
limits = new Action(Messages.getString("CallgraphView.SetLimits"), Action.AS_PUSH_BUTTON) { //$NON-NLS-1$
@@ -578,7 +878,7 @@ public class CallgraphView extends SystemTapView {
limitLabel.setText(Messages.getString("CallgraphView.MaxNodes")); //$NON-NLS-1$
limit = new Spinner(sh, SWT.BORDER);
limit.setMaximum(5000);
- limit.setSelection(g.getMaxNodes());
+ limit.setSelection(graph.getMaxNodes());
limit.setLayoutData(new GridData(SWT.CENTER, SWT.DEFAULT, true, false));
Label bufferLabel = new Label(sh, SWT.NONE);
@@ -586,7 +886,7 @@ public class CallgraphView extends SystemTapView {
bufferLabel.setText(Messages.getString("CallgraphView.MaxDepth")); //$NON-NLS-1$
buffer = new Spinner(sh, SWT.BORDER);
buffer.setMaximum(5000);
- buffer.setSelection(g.getLevelBuffer());
+ buffer.setSelection(graph.getLevelBuffer());
buffer.setLayoutData(new GridData(SWT.CENTER, SWT.DEFAULT, true, false));
Button set_limit = new Button(sh, SWT.PUSH);
@@ -596,16 +896,16 @@ public class CallgraphView extends SystemTapView {
public void widgetSelected(SelectionEvent e) {
boolean redraw = false;
if (limit.getSelection() > 0 && buffer.getSelection() > 0) {
- g.setMaxNodes(limit.getSelection());
- g.setLevelBuffer(buffer.getSelection());
+ graph.setMaxNodes(limit.getSelection());
+ graph.setLevelBuffer(buffer.getSelection());
- if (g.changeLevelLimits(g.getLevelOfNode(g.getRootVisibleNodeNumber()))) {
+ if (graph.changeLevelLimits(graph.getLevelOfNode(graph.getRootVisibleNodeNumber()))) {
SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
Messages.getString("CallgraphView.BufferTooHigh"), Messages.getString("CallgraphView.BufferTooHigh"), //$NON-NLS-1$ //$NON-NLS-2$
Messages.getString("CallgraphView.BufferMessage1") + //$NON-NLS-1$
Messages.getString("CallgraphView.BufferMessage2") + //$NON-NLS-1$
Messages.getString("CallgraphView.BufferMessage3") + //$NON-NLS-1$
- Messages.getString("CallgraphView.BufferMessage4") + g.getLevelBuffer() + //$NON-NLS-1$
+ Messages.getString("CallgraphView.BufferMessage4") + graph.getLevelBuffer() + //$NON-NLS-1$
Messages.getString("CallgraphView.BufferMessage5") + PluginConstants.NEW_LINE + PluginConstants.NEW_LINE + //$NON-NLS-1$
Messages.getString("CallgraphView.BufferMessage6") + //$NON-NLS-1$
Messages.getString("CallgraphView.BufferMessage7")); //$NON-NLS-1$
@@ -617,25 +917,30 @@ public class CallgraphView extends SystemTapView {
sh.dispose();
if (redraw)
- g.draw();
+ graph.draw();
}
});
- sh.open(); }
+ sh.open();
+ }
};
}
/**
- * Convenience method for creating all the various actions
+ * Creates actions by calling the relevant functions
*/
public void createActions() {
+ createFileActions();
+ createHelpActions();
+ createErrorActions();
createViewActions();
createAnimateActions();
createMarkerActions();
createMovementActions();
+// createButtonActions();
mode_collapsednodes.setChecked(true);
@@ -644,259 +949,224 @@ public class CallgraphView extends SystemTapView {
public void createMovementActions() {
goto_next = new Action(Messages.getString("CallgraphView.Next")) { //$NON-NLS-1$
public void run() {
- g.drawNextNode();
+ if (graph.isCollapseMode()) {
+ graph.setCollapseMode(false);
+ }
+ int toDraw = graph.getNextCalledNode(graph.getRootVisibleNodeNumber());
+ if (toDraw != -1)
+ graph.draw(toDraw);
}
};
goto_previous = new Action(Messages.getString("CallgraphView.Previous")) { //$NON-NLS-1$
public void run() {
- if (g.isCollapseMode()) {
- g.setCollapseMode(false);
+ if (graph.isCollapseMode()) {
+ graph.setCollapseMode(false);
}
- int toDraw = g.getPreviousCalledNode(g.getRootVisibleNodeNumber());
+ int toDraw = graph.getPreviousCalledNode(graph.getRootVisibleNodeNumber());
if (toDraw != -1)
- g.draw(toDraw);
+ graph.draw(toDraw);
}
};
goto_last = new Action(Messages.getString("CallgraphView.Last")) { //$NON-NLS-1$
public void run() {
- if (g.isCollapseMode())
- g.setCollapseMode(false);
- g.draw(g.getLastFunctionCalled());
- }
- };
-
- play = new Action(Messages.getString("CallgraphView.0")) { //$NON-NLS-1$
- public void run() {
- if (g.getDrawMode() != StapGraph.CONSTANT_DRAWMODE_AGGREGATE) {
- g.play();
- togglePlayImage();
- }
+ if (graph.isCollapseMode())
+ graph.setCollapseMode(false);
+ graph.draw(graph.getLastFunctionCalled());
}
};
- play.setImageDescriptor(playImage);
- }
-
- /**
- * Toggles the play/pause image
- * @param play
- */
- protected void togglePlayImage() {
- if (play.getToolTipText() == Messages.getString("CallgraphView.3")) { //$NON-NLS-1$
- play.setImageDescriptor(playImage);
- play.setToolTipText(Messages.getString("CallgraphView.0")); //$NON-NLS-1$
- }
- else {
- play.setImageDescriptor(pauseImage);
- play.setToolTipText(Messages.getString("CallgraphView.3")); //$NON-NLS-1$
- }
}
public void createMarkerActions() {
markers_next = new Action(Messages.getString("CallgraphView.nextMarker")) { //$NON-NLS-1$
public void run() {
- g.draw(g.getNextMarkedNode());
+ graph.draw(graph.getNextMarkedNode());
}
};
markers_previous = new Action(Messages.getString("CallgraphView.previousMarker")) { //$NON-NLS-1$
public void run() {
- g.draw(g.getPreviousMarkedNode());
+ graph.draw(graph.getPreviousMarkedNode());
}
};
}
- @Override
- protected boolean createOpenAction() {
- //Opens from specified location
- open_file = new Action(Messages.getString("CallgraphView.7")){ //$NON-NLS-1$
- public void run(){
- try {
- FileDialog dialog = new FileDialog(new Shell(), SWT.DEFAULT);
- String filePath = dialog.open();
- if (filePath != null){
- StapGraphParser new_parser = new StapGraphParser();
- new_parser.setSourcePath(filePath);
- new_parser.setViewID(CallGraphConstants.viewID);
- new_parser.schedule();
- }
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- };
- return true;
- }
-
-
- @Override
- protected boolean createOpenDefaultAction() {
- //Opens from the default location
- open_default = new Action(Messages.getString("CallgraphView.11")){ //$NON-NLS-1$
- public void run(){
- try {
- StapGraphParser new_parser = new StapGraphParser();
- new_parser.setViewID(CallGraphConstants.viewID);
- new_parser.schedule();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- };
-
- return true;
- }
- @Override
- public boolean setParser(SystemTapParser newParser) {
- if (newParser instanceof StapGraphParser) {
- parser = (StapGraphParser) newParser;
- return true;
+ public static void disposeGraph() {
+ if (graphComp != null && !graphComp.isDisposed())
+ graphComp.dispose();
+ if (treeComp != null && !treeComp.isDisposed())
+ treeComp.dispose();
+ if (viewer!= null && !viewer.isDisposed()) {
+ String tmp = viewer.getText();
+ StyleRange[] tempRange = viewer.getStyleRanges();
+ viewer.dispose();
+ createViewer(masterComposite);
+ viewer.setText(tmp);
+ viewer.setStyleRanges(tempRange);
}
- return false;
-
- }
-
- @Override
- public void setViewID() {
- viewID = "org.eclipse.linuxtools.callgraph.callgraphview"; //$NON-NLS-1$
+ CallgraphView.setGraphOptions(false);
+ //Force a redraw (.redraw() .update() not working)
+ CallgraphView.maximizeOrRefresh(false);
}
-
-
- public Action getAnimation_slow() {
+ public static Action getAnimation_slow() {
return animation_slow;
}
- public void setAnimation_slow(Action animation_slow) {
- this.animation_slow = animation_slow;
+ public static void setAnimation_slow(Action animation_slow) {
+ CallgraphView.animation_slow = animation_slow;
}
- public Action getAnimation_fast() {
+ public static Action getAnimation_fast() {
return animation_fast;
}
- public void setAnimation_fast(Action animation_fast) {
- this.animation_fast = animation_fast;
+ public static void setAnimation_fast(Action animation_fast) {
+ CallgraphView.animation_fast = animation_fast;
}
- public IMenuManager getAnimation() {
+ public static IMenuManager getAnimation() {
return animation;
}
- public void setAnimation(IMenuManager animation) {
- this.animation = animation;
+ public static void setAnimation(IMenuManager animation) {
+ CallgraphView.animation = animation;
}
- public Action getMode_collapsednodes() {
+ public static Action getMode_collapsednodes() {
return mode_collapsednodes;
}
- public void setMode_collapsednodes(Action mode_collapsednodes) {
- this.mode_collapsednodes = mode_collapsednodes;
+ public static void setMode_collapsednodes(Action mode_collapsednodes) {
+ CallgraphView.mode_collapsednodes = mode_collapsednodes;
}
- public void setView_refresh(Action view_refresh) {
- this.view_refresh = view_refresh;
+ public static void setView_refresh(Action view_refresh) {
+ CallgraphView.view_refresh = view_refresh;
}
- public Action getView_refresh() {
+ public static Action getView_refresh() {
return view_refresh;
}
- public Action getGoto_next() {
+ public static Action getGoto_next() {
return goto_next;
}
- public void setGoto_next(Action gotoNext) {
+ public static void setGoto_next(Action gotoNext) {
goto_next = gotoNext;
}
- public Action getGoto_previous() {
+ public static Action getGoto_previous() {
return goto_previous;
}
- public void setGoto_parent(Action gotoParent) {
+ public static void setGoto_parent(Action gotoParent) {
goto_previous = gotoParent;
}
- public Action getGoto_last() {
+ public static Action getGoto_last() {
return goto_last;
}
- public void setGoto_last(Action gotoLast) {
+ public static void setGoto_last(Action gotoLast) {
goto_last = gotoLast;
}
- public Action getView_treeview() {
- return view_treeview;
+ public static Action getOpen_callgraph() {
+ return open_callgraph;
}
- public void setView_treeview(Action viewTreeview) {
- view_treeview = viewTreeview;
+ public static void setOpen_callgraph(Action openCallgraph) {
+ open_callgraph = openCallgraph;
}
- public Action getView_radialview() {
- return view_radialview;
+ public static Action getSave_callgraph() {
+ return save_callgraph;
}
- public void setView_radialview(Action viewRadialview) {
- view_radialview = viewRadialview;
+ public static void setSave_callgraph(Action saveCallgraph) {
+ save_callgraph = saveCallgraph;
}
- public Action getView_aggregateview() {
- return view_aggregateview;
+ public static Action getError_errorLog() {
+ return error_errorLog;
}
- public void setView_aggregateview(Action viewAggregateview) {
- view_aggregateview = viewAggregateview;
+ public static void setError_errorLog(Action errorErrorLog) {
+ error_errorLog = errorErrorLog;
}
- public Action getView_levelview() {
- return view_levelview;
+ public static Action getError_deleteError() {
+ return error_deleteError;
}
- public void setView_levelview(Action viewlevelview) {
- view_levelview = viewlevelview;
+ public static void setError_deleteError(Action errorDeleteError) {
+ error_deleteError = errorDeleteError;
}
- public void setGoto_previous(Action gotoPrevious) {
- goto_previous = gotoPrevious;
+ public static Action getView_treeview() {
+ return view_treeview;
}
-
- public Action getPlay() {
- return play;
+
+ public static void setView_treeview(Action viewTreeview) {
+ view_treeview = viewTreeview;
}
-
- public StapGraph getGraph() {
- return g;
+
+ public static Action getView_radialview() {
+ return view_radialview;
}
-
- @Override
- public void setFocus() {
+
+ public static void setView_radialview(Action viewRadialview) {
+ view_radialview = viewRadialview;
}
+ public static Action getView_aggregateview() {
+ return view_aggregateview;
+ }
- @Override
- public void updateMethod() {
- IProgressMonitor m = new NullProgressMonitor();
- m.beginTask("Updating callgraph", 4); //$NON-NLS-1$
-
- loadData(m);
- m.worked(1);
- if (parser.totalTime > 0) {
- finishLoad(m);
- }
- m.worked(1);
-
- g.draw(StapGraph.CONSTANT_DRAWMODE_RADIAL, StapGraph.CONSTANT_ANIMATION_SLOW, g.getFirstUsefulNode());
+ public static void setView_aggregateview(Action viewAggregateview) {
+ view_aggregateview = viewAggregateview;
}
- @Override
- public SystemTapParser getParser() {
- return parser;
+ public static Action getView_boxview() {
+ return view_boxview;
}
+ public static void setView_boxview(Action viewBoxview) {
+ view_boxview = viewBoxview;
+ }
+
+ public static Action getHelp_version() {
+ return help_version;
+ }
-} \ No newline at end of file
+ public static void setHelp_version(Action helpVersion) {
+ help_version = helpVersion;
+ }
+
+ public static void setGoto_previous(Action gotoPrevious) {
+ goto_previous = gotoPrevious;
+ }
+
+ public static StapGraph getGraph() {
+ return graph;
+ }
+}
+
+/**
+ * The code graveyard: Where snippets go to die
+ */
+//StyleRange[] existingRange = viewer.getStyleRanges();
+//
+//StyleRange[] s = new StyleRange[styles.size()];
+//StyleRange[] s2 = new StyleRange[styles.size() + existingRange.length];
+//styles.copyInto(s);
+//
+//for (int i = 0; i < existingRange.length; i++)
+// s2[i] = existingRange[i];
+//
+//for (int i = 0; i < styles.size(); i ++)
+// s2[i+existingRange.length] = s[i];
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/GraphUIJob.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/GraphUIJob.java
new file mode 100644
index 0000000000..62b67e48ae
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/GraphUIJob.java
@@ -0,0 +1,226 @@
+/*******************************************************************************
+ * 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.callgraph;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.draw2d.LightweightSystem;
+import org.eclipse.draw2d.parts.ScrollableThumbnail;
+import org.eclipse.linuxtools.callgraph.graphlisteners.AutoScrollSelectionListener;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.progress.UIJob;
+
+/**
+ * Initializes and runs a StapGraph and TreeViewer within the SystemTap View
+ *
+ * @author chwang
+ *
+ */
+public class GraphUIJob extends UIJob{
+ private StapGraph g;
+ private StapGraphParser parser;
+ private static int treeSize = 200;
+
+
+ public StapGraph getGraph() {
+ return g;
+ }
+
+ public GraphUIJob(String name, StapGraphParser parser) {
+ super(name);
+ //CREATE THE SHELL
+ this.parser = parser;
+ }
+
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+
+ Display disp = Display.getCurrent();
+ if (disp == null)
+ disp = Display.getDefault();
+
+
+ //-------------Initialize shell, menu
+ treeSize = 200;
+
+
+ //OPEN UP THE SYSTEMTAPVIEW IF IT IS NOT ALREADY OPEN
+ CallgraphView.forceDisplay();
+
+ Composite treeComp = CallgraphView.makeTreeComp(treeSize);
+ Composite graphComp = CallgraphView.makeGraphComp();
+ graphComp.setBackgroundMode(SWT.INHERIT_FORCE);
+
+
+ //Create papa canvas
+ Canvas papaCanvas = new Canvas(graphComp, SWT.BORDER);
+ GridLayout papaLayout = new GridLayout(1, true);
+ papaLayout.horizontalSpacing=0;
+ papaLayout.verticalSpacing=0;
+ papaLayout.marginHeight=0;
+ papaLayout.marginWidth=0;
+ papaCanvas.setLayout(papaLayout);
+ GridData papaGD = new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false);
+ papaGD.widthHint=160;
+ papaCanvas.setLayoutData(papaGD);
+
+
+ //Add first button
+ Image image = new Image(disp, CallGraphConstants.PLUGIN_LOCATION+"icons/up.gif"); //$NON-NLS-1$
+ Button up = new Button(papaCanvas, SWT.PUSH);
+ GridData buttonData = new GridData(SWT.CENTER, SWT.CENTER, true, false);
+ buttonData.widthHint = 150;
+ buttonData.heightHint = 20;
+ up.setData(buttonData);
+ up.setImage(image);
+
+
+ //Add thumb canvas
+ Canvas thumbCanvas = new Canvas(papaCanvas, SWT.NONE);
+
+
+ //Add second button
+ image = new Image(disp, CallGraphConstants.PLUGIN_LOCATION+"icons/down.gif"); //$NON-NLS-1$
+ Button down = new Button(papaCanvas, SWT.PUSH);
+ buttonData = new GridData(SWT.CENTER, SWT.CENTER, true, false);
+ buttonData.widthHint = 150;
+ buttonData.heightHint = 0;
+ down.setData(buttonData);
+ down.setImage(image);
+
+
+ //Initialize graph
+ g = new StapGraph(graphComp, SWT.BORDER, treeComp, papaCanvas);
+ g.setLayoutData(new GridData(this.getDisplay().getPrimaryMonitor().getBounds().width - 200,this.getDisplay().getPrimaryMonitor().getBounds().height - 200));
+
+ up.addSelectionListener(new AutoScrollSelectionListener(
+ AutoScrollSelectionListener.AutoScroll_up, g));
+ down.addSelectionListener(new AutoScrollSelectionListener(
+ AutoScrollSelectionListener.AutoScroll_down, g));
+
+
+ //Initialize thumbnail
+ GridData thumbGD = new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false);
+ thumbGD.widthHint=160;
+ thumbCanvas.setLayoutData(thumbGD);
+ LightweightSystem lws = new LightweightSystem(thumbCanvas);
+ ScrollableThumbnail thumb = new ScrollableThumbnail(g.getViewport());
+ thumb.setSource(g.getContents());
+ lws.setContents(thumb);
+
+ //-------------Load graph data
+ g.loadData(SWT.NONE, 0, StapGraph.CONSTANT_TOP_NODE_NAME, 1, 1, -1, false, ""); //$NON-NLS-1$
+ boolean marked = false;
+ String msg = ""; //$NON-NLS-1$
+
+
+ for (int id_parent : parser.serialMap.keySet()) {
+ if (g.getData(id_parent) == null) {
+ if (parser.markedMap.get(id_parent) != null) {
+ marked = true;
+ msg = parser.markedMap.get(id_parent);
+ }
+ g.loadData(SWT.NONE, id_parent, parser.serialMap.get(id_parent), parser.timeMap.get(id_parent),
+ 1, 0, marked, msg);
+ }
+
+ for (int id_child : parser.outNeighbours.get(id_parent)) {
+
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+
+ marked = false;
+ msg = ""; //$NON-NLS-1$
+ if (parser.markedMap.get(id_child) != null) {
+ marked = true;
+ msg = parser.markedMap.get(id_child);
+ }
+ if (id_child != -1) {
+ if (parser.timeMap.get(id_child) == null){
+ g.loadData(SWT.NONE, id_child, parser.serialMap
+ .get(id_child), parser.timeMap.get(0),
+ 1, id_parent, marked,msg);
+ }else{
+ g.loadData(SWT.NONE, id_child, parser.serialMap
+ .get(id_child), parser.timeMap.get(id_child),
+ 1, id_parent, marked,msg);
+ }
+ }
+ }
+
+ }
+
+
+ g.aggregateCount = parser.countMap;
+ g.aggregateTime = parser.cumulativeTimeMap;
+
+ //Set total time
+ g.setTotalTime(parser.totalTime);
+
+ //-------------Finish initializations
+ //Generate data for collapsed nodes
+ g.recursivelyCollapseAllChildrenOfNode(g.getTopNode());
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ g.initializeTree();
+ g.setLastFunctionCalled(parser.lastFunctionCalled);
+
+
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ g.setFocus();
+ g.setCallOrderList(parser.callOrderList);
+
+ g.setProject(parser.project);
+
+ CallgraphView.setValues(graphComp, treeComp, g, parser);
+ CallgraphView.createPartControl();
+ g.draw(StapGraph.CONSTANT_DRAWMODE_RADIAL, StapGraph.CONSTANT_ANIMATION_SLOW,
+ g.getFirstUsefulNode());
+
+ return Status.OK_STATUS;
+ }
+
+
+ /**
+ * Returns number of StapData objects created
+ * @return
+ */
+ public int getNumberOfDataNodes() {
+ return g.getDataMapSize();
+ }
+
+
+ /**
+ * For easier JUnit testing only. Allows public access to run method without scheduling an extra job.
+ *
+ * @param m
+ * @return
+ */
+ public IStatus testRun(IProgressMonitor m) {
+ return runInUIThread(m);
+ }
+
+
+}
+
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapData.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapData.java
index aa642e73e4..06e4df7075 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapData.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapData.java
@@ -20,81 +20,72 @@ import java.util.TreeMap;
*/
public class StapData {
public boolean expandable;
- public static final int NOT_PART_OF_COLLAPSED_NODE = -10;
- public boolean noCaller;
- public boolean hasCollapsedChildren;
- public boolean isCollapsed;
- public boolean onlyChildWithThisName;
- public int id; //id of the StapNode
- public int timesCalled, parent, style;
+ public int id; //id of the StapNode
+ public long time;
+ public int called;
+ public int caller;
+ public int style;
public int levelOfRecursion;
- public int collapsedParent;
- public int uncollapsedPiece; //An uncollapsed piece of this node
- private long time; //execution time of this node
- public String markedMessage; //alt text for this node
- public String name; //text to be displayed
- public List<Integer> children;
- public List<Integer> collapsedChildren;
-
- private int partOfCollapsedNode;
-
+ public String name;
+ public boolean noCaller;
+ public List<Integer> callees;
+ public List<Integer> collapsedCallees;
private StapGraph graph;
+ public boolean hasCollapsedChildren;
+ public boolean isCollapsed;
+ public boolean onlyChildWithThisName;
+ private boolean partOfCollapsedNode;
+ public int collapsedCaller;
private boolean marked;
+ public String markedMessage;
public boolean isPartOfCollapsedNode() {
- return (partOfCollapsedNode != NOT_PART_OF_COLLAPSED_NODE);
+ return partOfCollapsedNode;
}
- /**
- * Compare to StapData.NOT_PART_OF_COLLAPSED_NODE to verify, or check
- * isPartOfCollapseNode first.
- *
- * @return The collapsed node this node is a part of (if any)
- */
- public int getPartOfCollapsedNode() {
- return partOfCollapsedNode;
- }
+
/**
- * Initialize StapData object. This object is not intended to be called by users.
+ * Initialize StapData object
*
- * @param graphModel StapGraph containing the StapNode that matches this StapData
- * @param style
- * @param txt Text to be displayed when rendering the StapNode
- * @param time Time taken for this particular node to execute
- * @param called Number of times this particular node was called
- * @param currentID The unique identifier for this node
- * @param caller The parent of this node
+ * @param graphModel
+ * @param style
+ * @param txt
+ * @param time
+ * @param called
+ * @param currentID
+ * @param caller
* @param isMarked
+ * @param message
*/
public StapData(StapGraph graphModel, int style, String txt,
- long time, int called, int currentID, int parent, boolean isMarked) {
+ long time, int called, int currentID, int caller, boolean isMarked, String message) {
this.time = time;
this.style = style;
- this.timesCalled = called;
+ this.called = called;
this.expandable = false;
- children = new ArrayList<Integer>();
- collapsedChildren = new ArrayList<Integer>();
+ callees = new ArrayList<Integer>();
+ collapsedCallees = new ArrayList<Integer>();
this.id = currentID;
this.name = txt;
this.graph = graphModel;
this.hasCollapsedChildren = false;
this.isCollapsed = false;
this.onlyChildWithThisName = false;
- this.partOfCollapsedNode= NOT_PART_OF_COLLAPSED_NODE;
- this.collapsedParent = -1;
- this.parent = parent;
+ this.partOfCollapsedNode= false;
+ this.collapsedCaller = -1;
+ this.caller = caller;
this.levelOfRecursion = 0;
this.marked = isMarked;
- this.uncollapsedPiece = -1;
+ this.markedMessage = message;
//Add this data to the caller's list of IDs
- if (this.parent != -1) {
- if (graphModel.getNodeData(this.parent) != null) {
- graphModel.getNodeData(this.parent).addCallee(this.id);
- this.levelOfRecursion = graphModel.getNodeData(this.parent).levelOfRecursion + 1;
+ if (this.caller != -1) {
+ if (graphModel.getData(this.caller) != null) {
+ graphModel.getData(this.caller).addCallee(this.id, this.time);
+ this.levelOfRecursion = graphModel.getData(this.caller).levelOfRecursion + 1;
}
}
@@ -109,20 +100,56 @@ public class StapData {
graphModel.setLowestLevelOfNodesAdded(levelOfRecursion);
- this.noCaller = (parent == -1) ? true : false;
+ this.noCaller = (caller == -1) ? true : false;
}
/**
- * Add the given id to the list of children, at the end.
+ * Add the given id to my list of children/callees. Sort based on time
*
* @param id
* @return
*/
- public int addCallee(int id) {
- children.add(id);
- return id;
+ public int addCallee(int id, long time) {
+
+ //TODO: This is phenomenally inefficient. We should just add them all
+ //then call a sort once instead of doing some crazy n! insertion :P
+
+ //Insert id based on its time
+ int size = callees.size();
+
+ if (size ==0) {
+ callees.add(id);
+ return callees.size();
+ }
+ int position = search(time);
+
+ if (position == -1) callees.add(id);
+ else callees.add(position, id);
+
+ return callees.size();
+ }
+
+
+ /**
+ * Returns the proper position in callees list for the node with the given time.
+ * Afterwards an insert at the return value will put the node in the right spot.
+ * @param time
+ * @return location in callees
+ */
+ private int search(long time) {
+ if (time > graph.getData(callees.get(0)).time)
+ return 0;
+
+ for (int i = 1; i < callees.size(); i++) {
+ if (time < graph.getData(callees.get(i -1)).time &&
+ time > graph.getData(callees.get(i)).time)
+ return i;
+ }
+
+ return -1;
}
+
/**
* Creates a node in the given graphModel using this stapData
@@ -141,37 +168,35 @@ public class StapData {
TreeMap<Long,ArrayList<StapData>> tempList = new TreeMap<Long,ArrayList<StapData>>();
//INDEX ALL THE STAPDATA INTO AN ARRAY AT THE CALCULATED INDEX
//SCATTERED INDICES : 0,1,...,5,..,10
- for (int val : collapsedChildren){
- if (tempList.get(graph.getNodeData(val).time) == null){
- tempList.put(graph.getNodeData(val).time, new ArrayList<StapData>());
+ for (int val : collapsedCallees){
+ if (tempList.get(graph.getData(val).time) == null){
+ tempList.put(graph.getData(val).time, new ArrayList<StapData>());
}
- tempList.get(graph.getNodeData(val).time).add(graph.getNodeData(val));
+ tempList.get(graph.getData(val).time).add(graph.getData(val));
}
- collapsedChildren.clear();
+ collapsedCallees.clear();
int count = 0;
// ANOTHER PASS THROUGH TO INDEX CONTINUOUSLY 0,1,2,..
for (long i : tempList.descendingKeySet()) {
for (StapData j : tempList.get(i)){
- collapsedChildren.add(count, j.id);
+ collapsedCallees.add(count, j.id);
}
count++;
}
}
-
/**
* Indicate that this StapData is part of a collapsed node (will not be drawn in
* uncollapsed mode)
* @param partOfCollapsedNode
*/
- public void setPartOfCollapsedNode(int partOfCollapsedNode) {
+ public void setPartOfCollapsedNode(boolean partOfCollapsedNode) {
this.partOfCollapsedNode = partOfCollapsedNode;
}
-
/**
* Indicate that this StapData was marked by the user
*/
@@ -179,83 +204,25 @@ public class StapData {
marked = true;
}
-
/**
- * Check if this StapData is marked -- returns the result of
- * marked || markedMessage.length() > 0 (in case marked was not set)
+ * Check if this StapData is marked
* @return
*/
public boolean isMarked() {
- return marked || (markedMessage != null && markedMessage.length() > 0);
+ return marked;
}
-
- public boolean isOnlyChildWithThisName() {
- return onlyChildWithThisName;
- }
- public void setOnlyChildWithThisName(boolean onlyChildWithThisName) {
- this.onlyChildWithThisName = onlyChildWithThisName;
- }
-
- /**
- * If the node has not yet terminated (i.e. the time is > 1200000000000000000l) this
- * function will return graph.getEndTime() - time. In other words, getTime will assume
- * that only the start time has been recorded if time is abnormally large, and will compensate
- * by assuming that the node 'terminates' at the current endTime.
- *
- * @return long time
- */
- public long getTime() {
- if (time > 1200000000000000000l) {
- return graph.getEndTime() - time;
- }
- return time;
+ public boolean isOnlyChildWithThisName() {
+ return onlyChildWithThisName;
}
- /**
- * Sets the time
- *
- * @param time
- */
- public void setTime(long time) {
- this.time = time;
- }
-/**
- * Sets the message for this data object to the given string,
- * overwriting the current markedMessage. Sets marked to true.
- *
- * Returns this.
- * @param message
- * @return this
- */
- public StapData setMessage(String message) {
- if (message == null || message.length() < 1)
- return this;
- this.markedMessage = message;
- this.marked = true;
- return this;
- }
-
-
- /**
- * Inserts the message after the current message. No spaces or newlines are appended.
- * @param message
- * @return
- */
- public StapData insertMessage(String message) {
- if (message == null || message.length() < 1)
- return this;
- String tmp = message;
- if (this.markedMessage != null && this.markedMessage.length() > 0)
- tmp = this.markedMessage + tmp;
- this.markedMessage = tmp;
- this.marked = true;
- return this;
- }
+ public void setOnlyChildWithThisName(boolean onlyChildWithThisName) {
+ this.onlyChildWithThisName = onlyChildWithThisName;
+ }
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapGraph.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapGraph.java
index 9f2a5d37a7..1bd1151059 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapGraph.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapGraph.java
@@ -20,14 +20,11 @@ import java.util.TreeSet;
import java.util.Map.Entry;
import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.core.runtime.Status;
import org.eclipse.draw2d.Animation;
import org.eclipse.draw2d.Label;
import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.linuxtools.callgraph.core.MP;
-import org.eclipse.linuxtools.callgraph.graphlisteners.Projectionist;
import org.eclipse.linuxtools.callgraph.graphlisteners.StapGraphKeyListener;
import org.eclipse.linuxtools.callgraph.graphlisteners.StapGraphMouseListener;
import org.eclipse.linuxtools.callgraph.graphlisteners.StapGraphMouseWheelListener;
@@ -50,7 +47,7 @@ public class StapGraph extends Graph {
public static final String CONSTANT_TOP_NODE_NAME = Messages.getString("StapGraph.0"); //$NON-NLS-1$
public static final int CONSTANT_HORIZONTAL_SPACING = 50;
- public static final int CONSTANT_DRAWMODE_LEVEL = 0;
+ public static final int CONSTANT_DRAWMODE_BOX = 0;
public static final int CONSTANT_DRAWMODE_RADIAL = 1;
public static final int CONSTANT_DRAWMODE_TREE = 2;
public static final int CONSTANT_DRAWMODE_AGGREGATE = 3;
@@ -60,7 +57,7 @@ public class StapGraph extends Graph {
public static final int CONSTANT_MAX_NUMBER_OF_SIBLINGS = 3;
public static final int CONSTANT_MAX_NUMBER_OF_RADIAL_SIBLINGS = 15;
public static final int CONSTANT_VERTICAL_INCREMENT = 50;
- public static final int CONSTANT_HORIZONTAL_SPACING_FOR_LEVEL = 150;
+ public static final int CONSTANT_HORIZONTAL_SPACING_FOR_BOX = 150;
public static final Color CONSTANT_HAS_PARENT = new Color(Display.getCurrent(), 240, 200,
200);
public static final Color CONSTANT_HAS_CHILDREN = new Color(Display.getCurrent(), 200,
@@ -73,8 +70,6 @@ public class StapGraph extends Graph {
private int topLevelOnScreen;
public static int levelBuffer = 30;
private static int maxNodes = 150;
- private Projectionist proj;
-
private int lowestLevelOfNodesAdded;
@@ -83,10 +78,8 @@ public class StapGraph extends Graph {
//Node management
private int idOfLastNode;
- private int idOfLastCollapsedNode;
private HashMap<Integer, StapNode> nodeMap; // HashMap of current nodes
private HashMap<Integer, StapData> nodeDataMap; // HashMap of all data
- //The negative side of nodeDataMap is collapsed, the positive side is uncollapsed
public List<GraphNode> aggregateNodes;
public HashMap<String, Long> aggregateTime;
@@ -102,8 +95,6 @@ public class StapGraph extends Graph {
//Time
private long totalTime;
- private long endTime;
- private long startTime;
//The current center/top of the nodes list
private int rootVisibleNodeNumber;
@@ -157,10 +148,7 @@ public class StapGraph extends Graph {
private StapGraphMouseWheelListener mwListener;
private StapGraphKeyListener kListener;
- private CallgraphView callgraphView;
-
- public StapGraph(Composite parent, int style, Composite treeComp, Canvas tCanvas,
- CallgraphView callgraphView) {
+ public StapGraph(Composite parent, int style, Composite treeComp, Canvas tCanvas) {
super(parent, style);
//-------------Initialize variables
@@ -183,8 +171,6 @@ public class StapGraph extends Graph {
nextMarkedNode = -1;
scale = 1;
treeLevelFromRoot = 0;
- idOfLastCollapsedNode = 0;
- this.callgraphView = callgraphView;
this.treeComp = treeComp;
if (treeViewer == null || treeViewer.getControl().isDisposed()) {
@@ -193,7 +179,6 @@ public class StapGraph extends Graph {
StapTreeListener stl = new StapTreeListener(treeViewer.getTree().getHorizontalBar());
treeViewer.addTreeListener(stl);
}
-
//-------------Add listeners
mListener = new StapGraphMouseListener(this);
@@ -207,22 +192,14 @@ public class StapGraph extends Graph {
-
/**
- * Initialize the treeviewer with data from the graph. If the treeviewer
- * has already been initialized (i.e. if it already has a content provider
- * set), we merely call treeViewer.refresh();
+ * Initialize the treeviewer with data from the graph
*/
public void initializeTree() {
if (treeViewer.getContentProvider() == null) {
StapTreeContentProvider scp = new StapTreeContentProvider();
treeViewer.setContentProvider(scp);
- } else {
- ((StapTreeContentProvider) treeViewer.getContentProvider())
- .setGraph(this);
- treeViewer.refresh();
- return;
- }
+ }
((StapTreeContentProvider) treeViewer.getContentProvider()).setGraph(this);
@@ -237,15 +214,13 @@ public class StapGraph extends Graph {
treeDoubleListener = new StapTreeDoubleClickListener(treeViewer, this);
treeViewer.addDoubleClickListener(treeDoubleListener);
- treeViewer.setInput(getNodeData(getTopNode()));
+ treeViewer.setInput(getData(getTopNode()));
treeViewer.refresh();
}
-
-
/**
- * Convenience method to loadData with a message preset.
+ * Create a new StapData object with the given parameters
*
* @param style
* @param id
@@ -270,49 +245,7 @@ public class StapGraph extends Graph {
}
//-------------Add node to appropriate map/list
- StapData n = new StapData(this, style, txt, time, called,
- id, caller, isMarked);
- if (isMarked) {
- n.setMessage(message);
- markedNodes.add(id);
- }
- nodeDataMap.put(id, n);
-
- // Make no assumptions about the order that data is input
- if (id > idOfLastNode)
- idOfLastNode = id;
- return id;
- }
-
- /**
- * Create a new StapData object with the given parameters. If the id is larger
- * than the current idOfLastNode, then idOfLastNode is set to id.
- *
- * @param style
- * @param id
- * @param txt
- * @param time
- * @param called
- * @param caller
- * @return
- */
- public int loadData(int style, int id, String txt, long time, int called,
- int caller, boolean isMarked) {
- //-------------Invalid function catching
- // Catches some random C/C++ directive functions
- if (id < 10 && killInvalidFunctions) {
- if (txt.contains(")")) { //$NON-NLS-1$
- return -1;
- } else if (txt.contains(".")) { //$NON-NLS-1$
- return -1;
- } else if (txt.contains("\"")) { //$NON-NLS-1$
- return -1;
- }
- }
-
- //-------------Add node to appropriate map/list
- StapData n = new StapData(this, style, txt, time, called,
- id, caller, isMarked);
+ StapData n = new StapData(this, style, txt, time, called, id, caller, isMarked, message);
if (isMarked)
markedNodes.add(id);
nodeDataMap.put(id, n);
@@ -323,13 +256,6 @@ public class StapGraph extends Graph {
return id;
}
- public void insertMessage(int id, String message) {
- StapData temp = nodeDataMap.get(id);
- if (temp == null) return;
- temp.insertMessage(message);
- nodeDataMap.put(id, temp);
- }
-
/*
* Fully functional draw functions
*
@@ -348,18 +274,9 @@ public class StapGraph extends Graph {
/ 2 - CONSTANT_VERTICAL_INCREMENT;
rootVisibleNodeNumber = centerNode;
- StapData nodeData = getNodeData(centerNode);
- int collapsed = nodeData.getPartOfCollapsedNode();
- if (!nodeData.isCollapsed && collapsed != StapData.NOT_PART_OF_COLLAPSED_NODE) {
- nodeData = getNodeData(collapsed);
- }
- treeViewer.expandToLevel(nodeData, 0);
- treeViewer.setSelection(new StructuredSelection(nodeData));
-
if (nodeMap.get(centerNode) == null) {
nodeMap.put(centerNode, getNodeData(centerNode).makeNode(this));
}
-
// Draw node in center
StapNode n = nodeMap.get(centerNode);
@@ -367,7 +284,7 @@ public class StapGraph extends Graph {
int y = this.getBounds().height / 2 - n.getSize().height;
n.setLocation(x, y);
- if (getNodeData(centerNode).isMarked())
+ if (getData(centerNode).isMarked())
nodeMap.get(centerNode).setBackgroundColor(CONSTANT_MARKED);
radialHelper(centerNode, x, y, radius, 0);
}
@@ -406,7 +323,7 @@ public class StapGraph extends Graph {
public void radialHelper(int id, int x, int y, int radius, int startFromChild) {
//-------------Draw parent node
// Draw caller node right beside this one, in a different color
- int callerID = nodeDataMap.get(id).parent;
+ int callerID = nodeDataMap.get(id).caller;
if (callerID != -1) {
if (getNode(callerID) == null) {
nodeMap.put(callerID, getNodeData(callerID).makeNode(this));
@@ -414,10 +331,10 @@ public class StapGraph extends Graph {
getNode(callerID).setBackgroundColor(CONSTANT_HAS_PARENT);
getNode(callerID).setLocation(x + radius / 5, y - radius / 5);
if (getNode(id).connection == null) {
- getNode(id).makeConnection(SWT.NONE, getNode(callerID), getNodeData(id).timesCalled);
+ getNode(id).makeConnection(SWT.NONE, getNode(callerID), getData(id).called);
}
- if (getNodeData(callerID).isMarked())
+ if (getData(callerID).isMarked())
nodeMap.get(callerID).setBackgroundColor(CONSTANT_MARKED);
}
@@ -425,10 +342,10 @@ public class StapGraph extends Graph {
//-------------Draw children nodes
List<Integer> nodeList;
if (!collapse_mode) {
- nodeList = nodeDataMap.get(id).children;
+ nodeList = nodeDataMap.get(id).callees;
}
else {
- nodeList = nodeDataMap.get(id).collapsedChildren;
+ nodeList = nodeDataMap.get(id).collapsedCallees;
}
int numberOfNodes;
@@ -470,22 +387,25 @@ public class StapGraph extends Graph {
subN.setLocation(x + xOffset, y + yOffset);
if (subN.connection == null) {
subN.makeConnection(SWT.NONE, nodeMap.get(id), nodeDataMap
- .get(subID).timesCalled);
+ .get(subID).called);
}
- StapData d = getNodeData(subID);
- if (d.isMarked())
+ if (getData(subID).isMarked())
subN.setBackgroundColor(CONSTANT_MARKED);
}
}
/**
- * Draws nodes according to the name of the function (not accounting for call
- * heirarchies). Uses colour to indicate the number of calls and size to indicate
- * the percentage time spent.
+ * THE AGGREGATE VIEW FROM VIEW -> AGGREGATE VIEW
*/
- private void drawAggregateView(){
+ public void drawAggregateView(){
+
+ //TEMPORARY STORAGE OF THE ENTRIES
+ //IMPLEMENTS A COMPARATOR TO STORE BY ORDER OF THE VALUE
+ TreeSet<Entry<String, Long>> sortedValues = new TreeSet<Entry<String, Long>>(StapGraph.VALUE_ORDER);
+ sortedValues.addAll(aggregateTime.entrySet());
+
if (aggregateNodes == null){
aggregateNodes = new ArrayList<GraphNode>();
@@ -513,38 +433,19 @@ public class StapGraph extends Graph {
}
}
-
- //TEMPORARY STORAGE OF THE ENTRIES
- //IMPLEMENTS A COMPARATOR TO STORE BY ORDER OF THE VALUE
- TreeSet<Entry<String, Long>> sortedValues = new TreeSet<Entry<String, Long>>(StapGraph.VALUE_ORDER);
- HashMap<String, Long> tempMap = new HashMap<String, Long>();
- tempMap.putAll(aggregateTime);
-
- for (String key : tempMap.keySet()) {
- long time = aggregateTime.get(key);
- //This is a stupid way to get the times right, but it is almost always guaranteed to work.
-
- while (time < 0)
- time += endTime;
- tempMap.put(key, time);
- }
-
- sortedValues.addAll(tempMap.entrySet());
-
//-------------Draw nodes
- for (Entry<String, Long> ent: sortedValues) {
- String key = ent.getKey();
+ for (Entry<String, Long> ent : sortedValues) {
+
GraphNode n = new GraphNode(this.getGraphModel(),SWT.NONE);
aggregateNodes.add(n);
- percentage_count = (float)aggregateCount.get(key) / (float)maxTimesCalled;
- percentage_time = ((float) ent.getValue()/ this
+ percentage_count = (float)aggregateCount.get(ent.getKey()) / (float)maxTimesCalled;
+ percentage_time = ((float) ent.getValue() / this
.getTotalTime() * 100);
-
- n.setText(key + "\n" //$NON-NLS-1$
+ n.setText(ent.getKey() + "\n" //$NON-NLS-1$
+ num.format((float)percentage_time) + "%" + "\n" //$NON-NLS-1$ //$NON-NLS-2$
- + aggregateCount.get(key) + "\n") ; //$NON-NLS-1$
- n.setData("AGGREGATE_NAME", key); //$NON-NLS-1$
+ + aggregateCount.get(ent.getKey()) + "\n") ; //$NON-NLS-1$
+ n.setData("AGGREGATE_NAME", ent.getKey()); //$NON-NLS-1$
primary = (int)(percentage_count * colorLevels * colorLevelDifference);
@@ -562,13 +463,12 @@ public class StapGraph extends Graph {
n.setHighlightColor(c);
n.setForegroundColor(new Color(this.getDisplay(),255,255,255));
n.setTooltip(new Label(
- Messages.getString("StapGraph.2")+ key + "\n" //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.getString("StapGraph.2")+ ent.getKey() + "\n" //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.getString("StapGraph.3") + num.format((float)percentage_time) + "%" + "\n" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- + Messages.getString("StapGraph.1") + aggregateCount.get(key) //$NON-NLS-1$
+ + Messages.getString("StapGraph.1") + aggregateCount.get(ent.getKey()) //$NON-NLS-1$
));
n.setBorderWidth(2);
}
-
//Set layout to gridlayout
this.setLayoutAlgorithm(new AggregateLayoutAlgorithm(LayoutStyles.NONE, sortedValues, this.getTotalTime(), this.getBounds().width), true);
@@ -582,12 +482,12 @@ public class StapGraph extends Graph {
* @param x
* @param y
*/
- private void drawTree(int id, int x, int y) {
+ public void drawTree(int id, int x, int y) {
//-------------Create node id
// Create and set
if (nodeMap.get(id) == null) {
- nodeMap.put(id, getNodeData(id).makeNode(this));
+ nodeMap.put(id, getData(id).makeNode(this));
}
StapNode n = getNode(id);
n.setLocation(x,y);
@@ -595,10 +495,10 @@ public class StapGraph extends Graph {
//This is the lowest level of nodes to draw, and it still has kids
if (getLevelOfNode(id) == bottomLevelToDraw &&
- getNodeData(id).children.size() > 0)
+ getData(id).callees.size() > 0)
n.setBackgroundColor(CONSTANT_HAS_CHILDREN);
- if (getNodeData(id).isMarked())
+ if (getData(id).isMarked())
n.setBackgroundColor(CONSTANT_MARKED);
@@ -608,9 +508,9 @@ public class StapGraph extends Graph {
// Determine which list of callees to use
if (!collapse_mode)
- callees = getNodeData(id).children;
+ callees = getData(id).callees;
else
- callees = getNodeData(id).collapsedChildren;
+ callees = getData(id).collapsedCallees;
if (callees == null)
return;
@@ -666,16 +566,16 @@ public class StapGraph extends Graph {
return;
- StapData data = getNodeData(rootVisibleNodeNumber);
- if (data.children != null) {
- if (data.children.size() < 1) {
+ StapData data = getData(rootVisibleNodeNumber);
+ if (data.callees != null) {
+ if (data.callees.size() < 1) {
return;
}
}
- List<Integer> list = data.children;
+ List<Integer> list = data.callees;
if (isCollapseMode())
- list = data.collapsedChildren;
+ list = data.collapsedCallees;
if (list.size() == 1) {
//Special case - only one child of the root node
@@ -757,16 +657,13 @@ public class StapGraph extends Graph {
int size = levels.get(i).size();
for (int j = 1; j < size; j++){
int val = levels.get(i).get(j);
- StapData data = nodeDataMap.get(val);
- if (!data.isOnlyChildWithThisName()) {
- if (collapse_mode && data.isPartOfCollapsedNode()) {
- continue;
- }
- if (!collapse_mode && data.isCollapsed)
- continue;
+ if (collapse_mode && nodeDataMap.get(val).isPartOfCollapsedNode()) {
+ continue;
}
+ if (!collapse_mode && nodeDataMap.get(val).isCollapsed)
+ continue;
- currPixelWidth += data.name.length() * 10 + StapGraph.CONSTANT_HORIZONTAL_SPACING_FOR_LEVEL;
+ currPixelWidth += nodeDataMap.get(val).name.length() * 10 + StapGraph.CONSTANT_HORIZONTAL_SPACING_FOR_BOX;
if (MaxLevelPixelWidth < currPixelWidth) {
MaxLevelPixelWidth = currPixelWidth;
}
@@ -806,14 +703,11 @@ public class StapGraph extends Graph {
for (int i = 0; i < levels.get(level).size(); i ++) {
int id = levels.get(level).get(i);
- StapData data = nodeDataMap.get(id);
- if (!data.isOnlyChildWithThisName()) {
- if (collapse_mode && data.isPartOfCollapsedNode() ) {
- continue;
- }
- if (!collapse_mode && nodeDataMap.get(id).isCollapsed)
- continue;
+ if (collapse_mode && nodeDataMap.get(id).isPartOfCollapsedNode()) {
+ continue;
}
+ if (!collapse_mode && nodeDataMap.get(id).isCollapsed)
+ continue;
if (nodeMap.get(id) == null) {
nodeMap.put(id, getNodeData(id).makeNode(this));
@@ -841,27 +735,27 @@ public class StapGraph extends Graph {
}
//IF WE CANNOT DISPLAY ALL NODES COLOUR NODES ON BOTTOM THAT STILL HAVE CHILDREN
- if (level == bottomLevelToDraw && nodeDataMap.get(id).children.size() != 0){
+ if (level == bottomLevelToDraw && nodeDataMap.get(id).callees.size() != 0){
n.setBackgroundColor(CONSTANT_HAS_CHILDREN);
}
- if (getNodeData(n.id).isMarked())
+ if (getData(n.id).isMarked())
n.setBackgroundColor(CONSTANT_MARKED);
// FIND ALL THE NODES THAT THIS NODE CALLS AND MAKE CONNECTIONS
List<Integer> setOfCallees = null;
if (collapse_mode)
- setOfCallees = nodeDataMap.get(id).collapsedChildren;
+ setOfCallees = nodeDataMap.get(id).collapsedCallees;
else
- setOfCallees = nodeDataMap.get(id).children;
+ setOfCallees = nodeDataMap.get(id).callees;
for (int val : setOfCallees) {
if (nodeMap.get(val) != null)
nodeMap.get(val).makeConnection(SWT.NONE, n,
- nodeDataMap.get(val).timesCalled);
+ nodeDataMap.get(val).called);
}
count++;
@@ -913,7 +807,7 @@ public class StapGraph extends Graph {
//-------------Recreate exception
if (x != -1 && y != -1) {
- StapNode n =getNodeData(exception).makeNode(this);
+ StapNode n =getData(exception).makeNode(this);
n.setLocation(x,y);
n.highlight();
nodeMap.put(exception, n);
@@ -1006,9 +900,9 @@ public class StapGraph extends Graph {
for (int level = lvl; level < maxLevel; level++) {
for (int id : levels.get(level)) {
if (isCollapseMode())
- list = getNodeData(id).collapsedChildren;
+ list = getData(id).collapsedCallees;
else
- list = getNodeData(id).children;
+ list = getData(id).callees;
numberOfNodes += list.size();
@@ -1059,14 +953,10 @@ public class StapGraph extends Graph {
public void draw(int drawMode, int animationMode, int id) {
setDrawMode(drawMode);
setAnimationMode(animationMode);
- if (nodeDataMap.get(id) == null)
- return;
this.clearSelection();
treeLevelFromRoot = 0;
currentPositionInLevel.clear();
-
-
this.setRedraw(false);
if (draw_mode == CONSTANT_DRAWMODE_RADIAL) {
//Remove thumbnail
@@ -1074,7 +964,7 @@ public class StapGraph extends Graph {
gd.exclude = true;
thumbCanvas.setLayoutData(gd);
thumbCanvas.setVisible(false);
- callgraphView.layout();
+ CallgraphView.layout();
//Add treeComp
@@ -1082,8 +972,8 @@ public class StapGraph extends Graph {
gd.exclude = false;
treeComp.setLayoutData(gd);
treeComp.setVisible(true);
- treeViewer.collapseToLevel(getNodeData(id), 1);
- treeViewer.expandToLevel(getNodeData(id), 1);
+ treeViewer.collapseToLevel(getData(id), 1);
+ treeViewer.expandToLevel(getData(id), 1);
} else if (draw_mode == CONSTANT_DRAWMODE_AGGREGATE){
@@ -1093,7 +983,7 @@ public class StapGraph extends Graph {
treeComp.setLayoutData(gd);
treeComp.setVisible(false);
- callgraphView.layout();
+ CallgraphView.layout();
//Remove thumbnail
gd = (GridData) thumbCanvas.getLayoutData();
gd.exclude = true;
@@ -1107,7 +997,7 @@ public class StapGraph extends Graph {
treeComp.setLayoutData(gd);
treeComp.setVisible(false);
- callgraphView.layout();
+ CallgraphView.layout();
//Add thumbnail
gd = (GridData) thumbCanvas.getLayoutData();
@@ -1118,7 +1008,7 @@ public class StapGraph extends Graph {
}
- callgraphView.layout();
+ //Remove treeComp
this.setRedraw(true);
@@ -1126,7 +1016,7 @@ public class StapGraph extends Graph {
if (draw_mode == CONSTANT_DRAWMODE_TREE) {
if (animation_mode == CONSTANT_ANIMATION_SLOW) {
if (nodeMap.get(id) == null)
- nodeMap.put(id, getNodeData(id).makeNode(this));
+ nodeMap.put(id, getData(id).makeNode(this));
int tempX = nodeMap.get(id).getLocation().x;
int tempY = nodeMap.get(id).getLocation().y;
Animation.markBegin();
@@ -1172,7 +1062,7 @@ public class StapGraph extends Graph {
this.getBounds().height / 2);
drawRadial(id);
Animation.run(ANIMATION_TIME);
- callgraphView.maximizeOrRefresh(false);
+ CallgraphView.maximizeOrRefresh(false);
}
else {
@@ -1181,12 +1071,12 @@ public class StapGraph extends Graph {
}
}
- //-------------Draw level
- else if (draw_mode == CONSTANT_DRAWMODE_LEVEL) {
+ //-------------Draw box
+ else if (draw_mode == CONSTANT_DRAWMODE_BOX) {
rootVisibleNodeNumber = id;
if (animation_mode == CONSTANT_ANIMATION_SLOW) {
if (nodeMap.get(id) == null)
- nodeMap.put(id, getNodeData(id).makeNode(this));
+ nodeMap.put(id, getData(id).makeNode(this));
Animation.markBegin();
moveAllNodesTo(nodeMap.get(id).getLocation().x, nodeMap.get(id).getLocation().y);
@@ -1198,7 +1088,7 @@ public class StapGraph extends Graph {
} else {
if (nodeMap.get(id) == null)
- nodeMap.put(id, getNodeData(id).makeNode(this));
+ nodeMap.put(id, getData(id).makeNode(this));
deleteAll(id);
drawBox(id, 0, 0);
@@ -1213,6 +1103,7 @@ public class StapGraph extends Graph {
drawAggregateView();
}
+ //THIS CAUSED A NULL POINTER GOING INTO AGGREGATE VIEW
if (getNode(id) != null)
getNode(id).unhighlight();
clearSelection();
@@ -1265,9 +1156,9 @@ public class StapGraph extends Graph {
List<Integer> list = null;
if (collapse_mode)
- list = nodeDataMap.get(id).collapsedChildren;
+ list = nodeDataMap.get(id).collapsedCallees;
else
- list = nodeDataMap.get(id).children;
+ list = nodeDataMap.get(id).callees;
for (int i = 0; i < list.size(); i++) {
moveRecursive(list.get(i), xTarget, yTarget);
}
@@ -1308,7 +1199,8 @@ public class StapGraph extends Graph {
//If all nodes have been collapsed, don't do anything
setCollapseMode(true);
- if (nodeDataMap.get(id).children.size() == 0)
+ if (nodeDataMap.get(id).hasCollapsedChildren
+ || nodeDataMap.get(id).callees.size() == 0)
return true;
nodeDataMap.get(id).hasCollapsedChildren = true;
@@ -1318,16 +1210,14 @@ public class StapGraph extends Graph {
HashMap<String, Integer> newNodeMap = new HashMap<String, Integer>();
// id of 'collapsed' node, id of its uncollapsed twin
HashMap<Integer, Integer> collapsedNodesWithOnlyOneNodeInThem = new HashMap<Integer, Integer>();
- int size = nodeDataMap.get(id).children.size();
+ int size = nodeDataMap.get(id).callees.size();
//-------------Iterate
for (int i = 0; i < size; i++) {
- int childID = nodeDataMap.get(id).children.get(i);
- if (getNodeData(childID).isPartOfCollapsedNode())
- continue;
+ int childID = nodeDataMap.get(id).callees.get(i);
int childLevel = getLevelOfNode(childID);
if (collapsedLevelSize.get(childLevel) == null)
collapsedLevelSize.put(childLevel, 0);
@@ -1342,36 +1232,32 @@ public class StapGraph extends Graph {
if (collapsedNodesWithOnlyOneNodeInThem.get(aggregateID) != null) {
//-------------Aggregate nodes - second node to be found
- // We still think this is an only child, but now we know better.
- // Create a new data node and aggregate
+ // We still think this is an only child - create a new
+ // data node and aggregate
this.loadData(SWT.NONE, aggregateID, nodeName, nodeDataMap
- .get(childID).getTime(), nodeDataMap.get(childID).timesCalled,
+ .get(childID).time, nodeDataMap.get(childID).called,
id, nodeDataMap.get(childID).isMarked(), ""); //$NON-NLS-1$
- if (getNodeData(aggregateID).isMarked()) {
+ if (getData(aggregateID).isMarked()) {
markedCollapsedNodes.add(aggregateID);
markedNodes.remove((Integer) aggregateID);
}
- nodeDataMap.get(id).children.remove((Integer) aggregateID);
- nodeDataMap.get(id).collapsedChildren.add(aggregateID);
- nodeDataMap.get(childID).setPartOfCollapsedNode(aggregateID);
+ nodeDataMap.get(id).callees.remove((Integer) aggregateID);
+ nodeDataMap.get(id).collapsedCallees.add(aggregateID);
- nodeDataMap.get(aggregateID).collapsedParent = id;
+ nodeDataMap.get(aggregateID).collapsedCaller = id;
- // Aggregate the first node that we found, and set it
- // as the uncollapsed piece of the aggregate node
+ // Aggregate
int otherChildID = collapsedNodesWithOnlyOneNodeInThem
.get(aggregateID);
aggregateData(nodeDataMap.get(aggregateID), nodeDataMap
.get(otherChildID));
collapsedNodesWithOnlyOneNodeInThem.remove(aggregateID);
- nodeDataMap.get(aggregateID).children.addAll(nodeDataMap
- .get(otherChildID).children);
- nodeDataMap.get(aggregateID).setPartOfCollapsedNode(StapData.NOT_PART_OF_COLLAPSED_NODE);
+ nodeDataMap.get(aggregateID).callees.addAll(nodeDataMap
+ .get(otherChildID).callees);
- nodeDataMap.get(otherChildID).setPartOfCollapsedNode(aggregateID);
- nodeDataMap.get(aggregateID).uncollapsedPiece = otherChildID;
+ nodeDataMap.get(otherChildID).setPartOfCollapsedNode(true);
} else
//-------------Aggregate - third and additional nodes
@@ -1380,8 +1266,8 @@ public class StapGraph extends Graph {
//-------------Complete aggregation
- nodeDataMap.get(aggregateID).children
- .addAll(nodeDataMap.get(childID).children);
+ nodeDataMap.get(aggregateID).callees
+ .addAll(nodeDataMap.get(childID).callees);
nodeDataMap.get(aggregateID).isCollapsed = true;
if (nodeMap.get(childID) != null) {
@@ -1391,13 +1277,13 @@ public class StapGraph extends Graph {
nodeMap.get(id).getLocation().y);
}
- nodeDataMap.get(childID).setPartOfCollapsedNode(aggregateID);
+ nodeDataMap.get(childID).setPartOfCollapsedNode(true);
} else {
//-------------First child with this name
- idOfLastCollapsedNode--;
- newNodeMap.put(nodeName, idOfLastCollapsedNode);
- collapsedNodesWithOnlyOneNodeInThem.put(idOfLastCollapsedNode, childID);
+ idOfLastNode++;
+ newNodeMap.put(nodeName, idOfLastNode);
+ collapsedNodesWithOnlyOneNodeInThem.put(idOfLastNode, childID);
if (nodeMap.get(childID) != null) {
nodeMap.get(childID).setLocation(
nodeMap.get(id).getLocation().x,
@@ -1413,23 +1299,23 @@ public class StapGraph extends Graph {
for (int i : collapsedNodesWithOnlyOneNodeInThem.keySet()) {
int childID =collapsedNodesWithOnlyOneNodeInThem.get(i);
nodeDataMap.get(childID).onlyChildWithThisName = true;
- nodeDataMap.get(id).collapsedChildren.add(childID);
+ nodeDataMap.get(id).collapsedCallees.add(childID);
newNodeMap.remove(nodeDataMap.get(childID).name);
- nodeDataMap.get(childID).collapsedParent = id;
- //This node is technically a part of itself
- nodeDataMap.get(childID).setPartOfCollapsedNode(childID);
+ nodeDataMap.get(childID).collapsedCaller = id;
- if (getNodeData(childID).isMarked())
+ if (getData(childID).isMarked())
markedCollapsedNodes.add(childID);
}
//-------------Finish iterations
- for (int i : nodeDataMap.get(id).collapsedChildren) {
+ for (int i : nodeDataMap.get(id).collapsedCallees) {
recursivelyCollapseAllChildrenOfNode(i);
}
+ nodeDataMap.get(id).sortByTime();
+
collapsedNodesWithOnlyOneNodeInThem.clear();
newNodeMap.clear();
@@ -1444,8 +1330,8 @@ public class StapGraph extends Graph {
* @param victim
*/
public void aggregateData(StapData target, StapData victim) {
- target.setTime(target.getTime()+ victim.getTime());
- target.timesCalled += victim.timesCalled;
+ target.time += victim.time;
+ target.called += victim.called;
if (victim.isMarked() || target.isMarked()) {
target.setMarked();
markedCollapsedNodes.add(target.id);
@@ -1495,7 +1381,7 @@ public class StapGraph extends Graph {
public int getTopNode() {
return levels.get(topLevelToDraw).get(0);
}
-
+
/**
* Recommend use of this function instead of getTopNode()
* @return First node that is not the dummy first node
@@ -1507,7 +1393,7 @@ public class StapGraph extends Graph {
}
// Get first node that is not TOP_NODE_NAME
- while (nodeDataMap.get(id) == null && id < idOfLastNode) {
+ while (nodeDataMap.get(id) == null) {
id++;
}
@@ -1537,7 +1423,7 @@ public class StapGraph extends Graph {
* @return
*/
public boolean hasChildren(int nodeID) {
- if (nodeDataMap.get(nodeID).children.size() > 0)
+ if (nodeDataMap.get(nodeID).callees.size() > 0)
return true;
return false;
}
@@ -1560,52 +1446,21 @@ public class StapGraph extends Graph {
public void setAnimationMode(int mode) {
animation_mode = mode;
if (mode == CONSTANT_ANIMATION_SLOW){
- callgraphView.getAnimation_slow().setChecked(true);
- callgraphView.getAnimation_fast().setChecked(false);
+ CallgraphView.getAnimation_slow().setChecked(true);
+ CallgraphView.getAnimation_fast().setChecked(false);
}else if (mode == CONSTANT_ANIMATION_FASTEST){
- callgraphView.getAnimation_slow().setChecked(false);
- callgraphView.getAnimation_fast().setChecked(true);
+ CallgraphView.getAnimation_slow().setChecked(false);
+ CallgraphView.getAnimation_fast().setChecked(true);
}
}
public void setCollapseMode(boolean value) {
- if (collapse_mode == value ||
- draw_mode == StapGraph.CONSTANT_DRAWMODE_AGGREGATE)
- return;
-
- if (draw_mode != StapGraph.CONSTANT_DRAWMODE_LEVEL) {
- if (collapse_mode) {
- //Collapsed to noncollapsed
- if (!getRootData().isOnlyChildWithThisName()) {
- //A collapsed node that isn't an only child must have an
- //uncollapsed piece
- rootVisibleNodeNumber = getRootData().uncollapsedPiece;
- }
-
- } else {
- //Uncollapsed to collapsed -- set center node to collapsed node
- if (!getRootData().isOnlyChildWithThisName()) {
- int temp = getRootData().getPartOfCollapsedNode();
- if (temp != StapData.NOT_PART_OF_COLLAPSED_NODE) {
- rootVisibleNodeNumber = temp;
- }
- }
- }
- }
collapse_mode = value;
- callgraphView.getMode_collapsednodes().setChecked(value);
nextMarkedNode = -1;
+ CallgraphView.getMode_collapsednodes().setChecked(value);
}
/**
- *
- * @return getNodeData(getRootVisibleNodeNumber())
- */
- public StapData getRootData() {
- return getNodeData(getRootVisibleNodeNumber());
- }
-
- /**
* Gets id of root visible node
* @return rootVisibleNode - ID of centre node
*/
@@ -1626,8 +1481,6 @@ public class StapGraph extends Graph {
* @return Time in milliseconds
*/
public long getTotalTime() {
- if (totalTime == 0 || totalTime > 1200000000000000000l)
- return endTime - startTime;
return totalTime;
}
@@ -1636,6 +1489,8 @@ public class StapGraph extends Graph {
* @param totalTime - Time in milliseconds
*/
public void setTotalTime(long val) {
+ //Divide by 100 to save us the trouble of
+ //multiplying by 100 to get percentages
this.totalTime = val;
}
@@ -1727,6 +1582,20 @@ public class StapGraph extends Graph {
}
+
+ /**
+ * Returns the StapData object with id == val.
+ * @param val
+ * @return
+ */
+ public StapData getData(int val) {
+ if (val > -1)
+ return nodeDataMap.get(val);
+ else
+ return null;
+ }
+
+
public void setTreeViewer(TreeViewer treeview) {
StapGraph.treeViewer = treeview;
}
@@ -1743,7 +1612,7 @@ public class StapGraph extends Graph {
* @return
*/
public StapNode getParentNode(int id) {
- return nodeMap.get(nodeDataMap.get(id).parent);
+ return nodeMap.get(nodeDataMap.get(id).caller);
}
@@ -1753,7 +1622,7 @@ public class StapGraph extends Graph {
* @return
*/
public StapData getParentData(int id) {
- return nodeDataMap.get(nodeDataMap.get(id).parent);
+ return nodeDataMap.get(nodeDataMap.get(id).caller);
}
/**
@@ -1766,18 +1635,13 @@ public class StapGraph extends Graph {
public int getNextCalledNode(int id) {
int returnID = -1;
- if (isCollapseMode()) {
- setCollapseMode(false);
- draw(getRootVisibleNodeNumber());
- }
-
for (int count = callOrderList.indexOf((Integer)id) + 1;
count < callOrderList.size(); count++) {
- int next = callOrderList.get(count);
- if (getNodeData(id) == null)
+ if (getData(id) == null)
continue;
- if (!getNodeData(next).isCollapsed || getNodeData(next).isOnlyChildWithThisName()) {
- return next;
+ if (!getData(id).isCollapsed || getData(id).isOnlyChildWithThisName()) {
+ returnID = callOrderList.get(count);
+ return returnID;
}
}
@@ -1796,9 +1660,9 @@ public class StapGraph extends Graph {
for (int count = callOrderList.indexOf((Integer)id) - 1;
count > -1; count--) {
- if (getNodeData(id) == null)
+ if (getData(id) == null)
continue;
- if (!getNodeData(id).isCollapsed || getNodeData(id).isOnlyChildWithThisName()) {
+ if (!getData(id).isCollapsed || getData(id).isOnlyChildWithThisName()) {
returnID = callOrderList.get(count);
return returnID;
}
@@ -1855,16 +1719,6 @@ public class StapGraph extends Graph {
return list.get(nextMarkedNode);
}
-
-
- public void play() {
- if (proj == null || proj.getResult() == Status.OK_STATUS) {
- proj = new Projectionist("Projectionist", this, 2000); //$NON-NLS-1$
- proj.schedule();
- } else {
- proj.pause();
- }
- }
@@ -1903,7 +1757,7 @@ public class StapGraph extends Graph {
* Retruns the number of StapData objects placed in the nodeDataMap.
* @return
*/
- public int getNodeDataMapSize() {
+ public int getDataMapSize() {
return nodeDataMap.size();
}
@@ -1941,21 +1795,25 @@ public class StapGraph extends Graph {
}
+
public ArrayList<Integer> getCallOrderList() {
return callOrderList;
}
+
public void setCallOrderList(ArrayList<Integer> callOrderList) {
this.callOrderList = callOrderList;
}
+
public int getLastFunctionCalled() {
return lastFunctionCalled;
}
+
public void setLastFunctionCalled(int lastFunctionCalled) {
this.lastFunctionCalled = lastFunctionCalled;
}
@@ -1967,41 +1825,8 @@ public class StapGraph extends Graph {
}
- public Projectionist getProjectionist() {
- return proj;
- }
public void setProject(ICProject myProject) {
this.project = myProject;
}
-
- public CallgraphView getCallgraphView() {
- return callgraphView;
- }
-
-
-
- public void drawNextNode() {
- if (isCollapseMode()) {
- setCollapseMode(false);
- }
- int toDraw = getNextCalledNode(getRootVisibleNodeNumber());
- if (toDraw != -1)
- draw(toDraw);
- else
- proj.pause();
- }
-
- public void setEndTime(long val) {
- endTime = val;
- }
-
- public long getEndTime() {
- return endTime;
- }
-
- public void setStartTime(long val) {
- startTime = val;
- }
-
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapGraphParser.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapGraphParser.java
index 89f8ed5623..f233a0a1db 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapGraphParser.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapGraphParser.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.linuxtools.callgraph;
import java.io.BufferedReader;
-import java.io.FileNotFoundException;
+import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
@@ -21,8 +21,11 @@ import org.eclipse.cdt.core.model.CoreModel;
import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.linuxtools.callgraph.core.Helper;
import org.eclipse.linuxtools.callgraph.core.SystemTapParser;
import org.eclipse.linuxtools.callgraph.core.SystemTapUIErrorMessages;
+import org.eclipse.swt.widgets.Shell;
/**
@@ -36,10 +39,11 @@ import org.eclipse.linuxtools.callgraph.core.SystemTapUIErrorMessages;
*/
public class StapGraphParser extends SystemTapParser {
+ private static final String NEW_LINE = "\n";
public HashMap<Integer, Long> timeMap;
public TreeMap<Integer, String> serialMap;
public HashMap<Integer, ArrayList<Integer>> outNeighbours;
- public HashMap<String, Long> aggregateTimeMap;
+ public HashMap<String, Long> cumulativeTimeMap;
public HashMap<String, Integer> countMap;
public ArrayList<Integer> callOrderList;
public HashMap<Integer, String> markedMap;
@@ -49,17 +53,7 @@ public class StapGraphParser extends SystemTapParser {
public long totalTime;
public int lastFunctionCalled;
public ICProject project;
- private static final String DELIM = ",,"; //$NON-NLS-1$
-
- private boolean encounteredMain = false;
- private ArrayList<Integer> shouldGetEndingTimeForID = new ArrayList <Integer>();
-
- private ArrayList<String> nameList = new ArrayList<String>();
- private ArrayList<Integer> idList = new ArrayList<Integer>();
- private boolean skippedDirectives = false;
- private int firstNode = -1;
-
- public long startTime = -1;
+
public String text;
@@ -69,324 +63,306 @@ public class StapGraphParser extends SystemTapParser {
outNeighbours = new HashMap<Integer, ArrayList<Integer>>();
timeMap = new HashMap<Integer, Long>();
serialMap = new TreeMap<Integer, String>();
- aggregateTimeMap = new HashMap<String, Long>();
+ cumulativeTimeMap = new HashMap<String, Long>();
countMap = new HashMap<String, Integer>();
endingTimeInNS = 0l;
callOrderList = new ArrayList<Integer>();
markedMap = new HashMap<Integer, String>();
lastFunctionCalled = 0;
- project = null;
- startTime = -1;
+ project = null;
}
- public IStatus nonRealTimeParsing(){
+ public IStatus executeParsing(){
//Clear maps (in case a previous execution left values hanging)
outNeighbours.clear();
timeMap.clear();
serialMap.clear();
- aggregateTimeMap.clear();
+ cumulativeTimeMap.clear();
countMap.clear();
text = ""; //$NON-NLS-1$
callOrderList.clear();
- shouldGetEndingTimeForID.clear();
- nameList.clear();
- idList.clear();
- encounteredMain = false;
- skippedDirectives = false;
- firstNode = -1;
- startTime = -1;
- BufferedReader buff = null;
try {
- buff = new BufferedReader(new FileReader(sourcePath));
- } catch (FileNotFoundException e1) {
- e1.printStackTrace();
- }
- internalData = buff;
- return realTimeParsing();
- }
-
-
- private void parseEnd() {
-
-
- //CHECK FOR EXIT() CALL
- if (idList.size() > 1) {
- for (int val : idList){
- String name = serialMap.get(val);
- long time = endingTimeInNS - timeMap.get(val);
- timeMap.put(val, time);
- if (val == firstNode)
- showTime(val, time);
- if (shouldGetEndingTimeForID.contains(val)){
- long cumulativeTime = aggregateTimeMap.get(name) + endingTimeInNS;
- aggregateTimeMap.put(name, cumulativeTime);
+ BufferedReader buff = new BufferedReader(new FileReader(filePath));
+ String tmp;
+ while ((tmp = buff.readLine()) != null) {
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
}
- lastFunctionCalled = val;
- }
- String tmp = markedMap.get(lastFunctionCalled);
- if (tmp == null) tmp = ""; //$NON-NLS-1$
- markedMap.put(lastFunctionCalled,
- tmp + "\n" + Messages.getString("StapGraphParser.16")); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
-
- //timecheck is true if the total execution time is less than 10ms
- //and the first function is more than 1% off from the total time.
- boolean timeCheck = totalTime < 50000000 &&
- (((float)timeMap.get(firstNode)/totalTime) > 1.01 ||
- ((float)timeMap.get(firstNode)/totalTime) < 0.99);
-
- /*
- * Indicate whether or not we had to manipulate total time, and why
- */
- if (skippedDirectives || timeCheck) {
- totalTime = timeMap.get(firstNode);
- String markedMessage = ""; //$NON-NLS-1$
- if (markedMap.containsKey(firstNode)) {
- markedMessage = markedMap.get(firstNode) + "\n"; //$NON-NLS-1$
- }
- if (skippedDirectives)
- markedMessage += Messages.getString("StapGraphParser.19"); //$NON-NLS-1$
- if (timeCheck)
- markedMessage += Messages.getString("StapGraphParser.20"); //$NON-NLS-1$
-
- markedMessage += Messages.getString("StapGraphParser.21"); //$NON-NLS-1$
-
- markedMap.put(firstNode, markedMessage);
- }
- }
-
- private void parseMarked(String msg) {
- /*
- * Append message
- */
- if (msg.length() < 1 || idList.size() < 1)
- return;
- int id = idList.get(idList.size() -1);
- if (msg.equals("<unknown>")) { //$NON-NLS-1$
- msg = msg + Messages.getString("StapGraphParser.UnknownMarkers"); //$NON-NLS-1$
- }
- markedMap.put(id, (markedMap.get(id) == null ? "" : markedMap.get(id)) + msg); //$NON-NLS-1$
-
- }
-
- private IStatus parse(String data) {
- String[] callsAndReturns = data.split(";"); //$NON-NLS-1$
-
- try {
- for (String s : callsAndReturns) {
- if (s.length() < 1)
- continue;
- switch (s.charAt(0)) {
- case '<' :
- /*
- *
- * Open tag -- function call
- *
- *
- */
- String[] args = s.substring(1, s.length()).split(DELIM); //$NON-NLS-1$
- // args[0] = name
- // args[1] = id
- // arsg[2] = time of event
- int id = Integer.parseInt(args[1]);
- long time = Long.parseLong(args[2]);
- String name = args[0];
+ if (tmp.equals("PROBE_BEGIN")){ //$NON-NLS-1$
+ tmp = buff.readLine();
- //If we haven't encountered a main function yet and the name isn't clean,
- //and the name contains "__", then this is probably a C directive
- if (!encounteredMain && !isFunctionNameClean(name) && name.contains("__")) { //$NON-NLS-1$
- skippedDirectives = true;
- break;
- }
- if (startTime < 1) {
- startTime = time;
+ if (tmp != null && tmp.length() > 0) {
+ project = CoreModel.getDefault().getCModel().getCProject(tmp);
}
- endingTimeInNS=time;
-
- name = cleanFunctionName(name);
- if (name.equals("main")) //$NON-NLS-1$
- encounteredMain = true;
- if (firstNode == -1) {
- firstNode = id;
+ else {
+ launchFileDialogError();
+ return Status.CANCEL_STATUS;
}
- serialMap.put(id, name);
- timeMap.put(id, time);
+ text = buff.readLine();
- if (aggregateTimeMap.get(name) == null){
- aggregateTimeMap.put(name, (long) 0);
- }
-
- //IF THERE ARE PREVIOUS FUNCTIONS WITH THE SAME NAME
- //WE ARE IN ONE OF THEM SO DO NOT ADD TO CUMULATIVE TIME
- if (nameList.indexOf(name) == -1) {
- long cumulativeTime = aggregateTimeMap.get(name) - time;
- aggregateTimeMap.put(name, cumulativeTime);
- shouldGetEndingTimeForID.add(id);
+ tmp = buff.readLine();
+ if (tmp != null && tmp.length() > 0)
+ endingTimeInNS = Long.parseLong(tmp);
+ else {
+ launchFileDialogError();
+ return Status.CANCEL_STATUS;
}
-
- if (countMap.get(name) == null){
- countMap.put(name, 0);
+ tmp = buff.readLine();
+ if (tmp != null && tmp.length() > 0)
+ totalTime = Long.parseLong(tmp);
+ else {
+ launchFileDialogError();
+ return Status.CANCEL_STATUS;
}
- countMap.put(name, countMap.get(name) + 1);
-
- nameList.add(name);
- idList.add(id);
+ }
+ }
+ buff.close();
+ } catch (IOException e) {
+ launchFileDialogError();
+ return Status.CANCEL_STATUS;
+ }
+
+
+ if (text.length() > 0) {
+
+ boolean encounteredMain = false;
+
+ ArrayList<Integer> shouldGetEndingTimeForID = new ArrayList <Integer>();
+ String[] callsAndReturns = text.split(";"); //$NON-NLS-1$
+ String[] args;
+ ArrayList<String> nameList = new ArrayList<String>();
+ ArrayList<Integer> idList = new ArrayList<Integer>();
+ boolean skippedDirectives = false;
+
+ String name;
+ int id;
+ long time;
+ long cumulativeTime;
+ int parentID;
+ int firstNode = -1;
+ try {
+ for (String s : callsAndReturns) {
+ switch (s.charAt(0)) {
+ case '<' :
+
+ args = s.substring(1, s.length()).split(",,"); //$NON-NLS-1$
+ // args[0] = name
+ // args[1] = id
+ // arsg[2] = time of event
+ id = Integer.parseInt(args[1]);
+ time = Long.parseLong(args[2]);
+ name = args[0];
+
+ //If we haven't encountered a main function yet and the name isn't clean,
+ //and the name contains "__", then this is probably a C directive
+ if (!encounteredMain && !isFunctionNameClean(name) && name.contains("__")) { //$NON-NLS-1$
+ skippedDirectives = true;
+ break;
+ }
+ name = cleanFunctionName(name);
+ if (name.equals("main")) //$NON-NLS-1$
+ encounteredMain = true;
+ if (firstNode == -1) {
+ firstNode = id;
+ }
+
+ serialMap.put(id, name);
+ timeMap.put(id, time);
+
+ if (cumulativeTimeMap.get(name) == null){
+ cumulativeTimeMap.put(name, (long) 0);
+ }
- if (outNeighbours.get(id) == null){
- outNeighbours.put(id, new ArrayList<Integer>());
- }
-
- if (idList.size() > 1) {
- int parentID = idList.get(idList.size() - 2);
- outNeighbours.get(parentID).add(id);
- }
-
- callOrderList.add(id);
- lastFunctionCalled = id;
+ //IF THERE ARE PREVIOUS FUNCTIONS WITH THE SAME NAME
+ //WE ARE IN ONE OF THEM SO DO NOT ADD TO CUMULATIVE TIME
+ if (nameList.indexOf(name) == -1) {
+ cumulativeTime = cumulativeTimeMap.get(name) - time;
+ cumulativeTimeMap.put(name, cumulativeTime);
+ shouldGetEndingTimeForID.add(id);
+ }
+
+
+ if (countMap.get(name) == null){
+ countMap.put(name, 0);
+ }
+ countMap.put(name, countMap.get(name) + 1);
+
+ nameList.add(name);
+ idList.add(id);
+
+ if (outNeighbours.get(id) == null){
+ outNeighbours.put(id, new ArrayList<Integer>());
+ }
+
+ if (idList.size() > 1) {
+ parentID = idList.get(idList.size() - 2);
+ outNeighbours.get(parentID).add(id);
+ }
+
+ callOrderList.add(id);
+ lastFunctionCalled = id;
- break;
- case '>' :
-
- /*
- *
- * Close tag -- Function return
- *
- */
-
- args = s.substring(1, s.length()).split(DELIM); //$NON-NLS-1$
- //args[0] = name
- //args[1] = time of event
- name = args[0];
-
-
- //If we haven't encountered a main function yet and the name isn't clean,
- //and the name contains "__", then this is probably a C directive
- if (!encounteredMain && !isFunctionNameClean(name) && name.contains("__")) { //$NON-NLS-1$
- skippedDirectives = true;
break;
- }
- name = cleanFunctionName(name);
- int lastOccurance = nameList.lastIndexOf(name);
- if (lastOccurance < 0) {
- parsingError(Messages.getString("StapGraphParser.12") + name); //$NON-NLS-1$
- return Status.CANCEL_STATUS;
- }
-
- nameList.remove(lastOccurance);
- id = idList.remove(lastOccurance);
-
-
- if (timeMap.get(id) == null) {
- parsingError(Messages.getString("StapGraphParser.13") + name); //$NON-NLS-1$
+ case '>' :
+ args = s.substring(1, s.length()).split(",,"); //$NON-NLS-1$
+ //args[0] = name
+ //args[1] = time of event
+ name = args[0];
+
+
+ //If we haven't encountered a main function yet and the name isn't clean,
+ //and the name contains "__", then this is probably a C directive
+ if (!encounteredMain && !isFunctionNameClean(name) && name.contains("__")) { //$NON-NLS-1$
+ skippedDirectives = true;
+ break;
+ }
+ name = cleanFunctionName(name);
+ int lastOccurance = nameList.lastIndexOf(name);
+ if (lastOccurance < 0) {
+ parsingError(Messages.getString("StapGraphParser.12") + name); //$NON-NLS-1$
+ return Status.CANCEL_STATUS;
+ }
+
+ nameList.remove(lastOccurance);
+ id = idList.remove(lastOccurance);
+
+
+ if (timeMap.get(id) == null) {
+ parsingError(Messages.getString("StapGraphParser.13") + name); //$NON-NLS-1$
+ return Status.CANCEL_STATUS;
+ }
+ time = Long.parseLong(args[1]) - timeMap.get(id);
+ timeMap.put(id, time);
+
+
+ //IF AN ID IS IN THIS ARRAY IT IS BECAUSE WE NEED THE ENDING TIME
+ // TO BE ADDED TO THE CUMULATIVE TIME FOR FUNCTIONS OF THIS NAME
+ if (shouldGetEndingTimeForID.contains(id)){
+ cumulativeTime = cumulativeTimeMap.get(name) + Long.parseLong(args[1]);
+ cumulativeTimeMap.put(name, cumulativeTime);
+ }
+
+
+ //Use + for end times
+// cumulativeTime = cumulativeTimeMap.get(name) + Long.parseLong(args[1]);
+// cumulativeTimeMap.put(name, cumulativeTime);
+
+ break;
+ default :
+ parsingError(Messages.getString("StapGraphParser.14") + s.charAt(0) + //$NON-NLS-1$
+ Messages.getString("StapGraphParser.15") ); //$NON-NLS-1$
return Status.CANCEL_STATUS;
- }
- endingTimeInNS=Long.parseLong(args[1]);
- time = endingTimeInNS - timeMap.get(id);
- timeMap.put(id, time);
- if (id == firstNode)
- showTime(id, time);
-
- //IF AN ID IS IN THIS ARRAY IT IS BECAUSE WE NEED THE ENDING TIME
- // TO BE ADDED TO THE CUMULATIVE TIME FOR FUNCTIONS OF THIS NAME
- if (shouldGetEndingTimeForID.contains(id)){
- long cumulativeTime = aggregateTimeMap.get(name) + Long.parseLong(args[1]);
- aggregateTimeMap.put(name, cumulativeTime);
+ }
+
+ }
+
+
+ //CHECK FOR EXIT() CALL
+ if (idList.size() != 0){
+ for (int val : idList){
+ name = serialMap.get(val);
+ time = endingTimeInNS - timeMap.get(val);
+ timeMap.put(val, time);
+ if (shouldGetEndingTimeForID.contains(val)){
+ cumulativeTime = cumulativeTimeMap.get(name) + endingTimeInNS;
+ cumulativeTimeMap.put(name, cumulativeTime);
}
- break;
- default :
- /*
- *
- * Anything else -- error
- *
- */
-// parsingError(Messages.getString("StapGraphParser.14") + s.charAt(0) + //$NON-NLS-1$
-// Messages.getString("StapGraphParser.15") ); //$NON-NLS-1$
- return Status.CANCEL_STATUS;
+// if (name.equals("main")) {
+// totalTime = time;
+// }
+ lastFunctionCalled = val;
+ }
+ markedMap.put(lastFunctionCalled, Messages.getString("StapGraphParser.16")); //$NON-NLS-1$
+ }
- }
+ //timecheck is true if the total execution time is less than 10ms
+ //and the first function is more than 1% off from the total time.
+ boolean timeCheck = totalTime < 50000000 &&
+ (((float)timeMap.get(firstNode)/totalTime) > 1.01 ||
+ ((float)timeMap.get(firstNode)/totalTime) < 0.99);
- }
- } catch (NumberFormatException e) {
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("StapGraphParser.22"), //$NON-NLS-1$
- Messages.getString("StapGraphParser.23"), Messages.getString("StapGraphParser.24") + //$NON-NLS-1$ //$NON-NLS-2$
- Messages.getString("StapGraphParser.25")); //$NON-NLS-1$
- mess.schedule();
+
+ if (skippedDirectives || timeCheck) {
+ totalTime = timeMap.get(firstNode);
+ String markedMessage = ""; //$NON-NLS-1$
+ if (markedMap.containsKey(firstNode)) {
+ markedMessage = markedMap.get(firstNode) + "\n"; //$NON-NLS-1$
+ }
+ if (skippedDirectives)
+ markedMessage += Messages.getString("StapGraphParser.19"); //$NON-NLS-1$
+ if (timeCheck)
+ markedMessage += Messages.getString("StapGraphParser.20"); //$NON-NLS-1$
+
+ markedMessage += Messages.getString("StapGraphParser.21"); //$NON-NLS-1$
+
+ markedMap.put(firstNode, markedMessage);
+ }
+
+
+ } catch (NumberFormatException e) {
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("StapGraphParser.22"), //$NON-NLS-1$
+ Messages.getString("StapGraphParser.23"), Messages.getString("StapGraphParser.24") + //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.getString("StapGraphParser.25")); //$NON-NLS-1$
+ mess.schedule();
+
+ return Status.CANCEL_STATUS;
+ }
+ } else {
+ parsingError(Messages.getString("StapGraphParser.26")); //$NON-NLS-1$
return Status.CANCEL_STATUS;
}
+
+ //Create a UIJob to handle the rest
+ GraphUIJob uijob = new GraphUIJob(Messages.getString("StapGraphParser.5"), this); //$NON-NLS-1$
+ uijob.schedule();
return Status.OK_STATUS;
+
}
-
-
- @Override
- public IStatus realTimeParsing() {
- if (!(internalData instanceof BufferedReader))
- return Status.CANCEL_STATUS;
- BufferedReader buff = (BufferedReader) internalData;
- String line;
- boolean draw = false;
+ @Override
+ public void saveData(String filePath) {
+ File file = new File(filePath);
+ String content = Messages.getString("CallgraphView.25") //$NON-NLS-1$
+ + project.getElementName()
+ + NEW_LINE
+ + text
+ + NEW_LINE
+ + endingTimeInNS
+ + NEW_LINE
+ + totalTime;
try {
- while ((line = buff.readLine()) != null) {
- draw = true;
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- if (line.length() < 1)
- continue;
-
- if (line.equals("PROBE_BEGIN")) { //$NON-NLS-1$
- String tmp = buff.readLine();
-
- if (tmp != null && tmp.length() > 0) {
- project = CoreModel.getDefault().getCModel().getCProject(tmp);
- }
- else {
- launchFileErrorDialog();
- return Status.CANCEL_STATUS;
- }
- } else if (line.charAt(0) == '-') {
- endingTimeInNS = Long.parseLong(line.substring(1));
- } else if (line.charAt(0) == '+') {
- totalTime = Long.parseLong(line.substring(1));
- //Total time should be the last line in the output
- parseEnd();
- } else if (line.charAt(0) == '?') {
- if (line.length() > 1)
- parseMarked(line.substring(1));
- } else {
- parse(line);
+ // WAS THE FILE CREATED OR DOES IT ALREADY EXIST
+ if (file.createNewFile()) {
+ Helper.writeToFile(filePath, content);
+ } else {
+ if (MessageDialog
+ .openConfirm(
+ new Shell(),
+ Messages
+ .getString("CallgraphView.FileExistsTitle"), //$NON-NLS-1$
+ Messages
+ .getString("CallgraphView.FileExistsMessage"))) { //$NON-NLS-1$
+ file.delete();
+ file.createNewFile();
+ Helper.writeToFile(filePath, content);
}
}
- if (draw && view != null)
- view.update();
- } catch (IOException e) {
- e.printStackTrace();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
-
- return Status.OK_STATUS;
+ } catch (IOException e1) {
+ e1.printStackTrace();
+ }
}
- /**
- * Mark node id with a message giving its actual time.
- */
- private void showTime(int id, long time) {
- String tmp = markedMap.get(id);
- if (tmp == null) tmp = ""; //$NON-NLS-1$
- markedMap.put(id, tmp +
- Messages.getString("StapGraphParser.ActualTime") + time/1000000 //$NON-NLS-1$
- + Messages.getString("StapGraphParser.TimeUnits")); //$NON-NLS-1$ //$NON-NLS-2$
- }
+
+
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapNode.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapNode.java
index 6be47b3360..8648eb235b 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapNode.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapNode.java
@@ -11,6 +11,8 @@
package org.eclipse.linuxtools.callgraph;
import java.text.NumberFormat;
+import java.util.ArrayList;
+import java.util.List;
import java.util.Locale;
import org.eclipse.draw2d.Label;
@@ -24,6 +26,8 @@ public class StapNode extends GraphNode{
private static int nodeSize = 20;
public int id;
public GraphConnection connection; //Each node should have only one connection (to its caller)
+ private boolean hasButtons; //Has buttons already attached
+ public List<Integer> buttons;
private static NumberFormat numberFormat = NumberFormat.getInstance(Locale.CANADA);
public StapNode(StapGraph graphModel, int style, StapData data) {
@@ -34,6 +38,8 @@ public class StapNode extends GraphNode{
if (Display.getCurrent().getPrimaryMonitor().getBounds().width < 1000)
nodeSize = 10;
+
+
if (data.name == StapGraph.CONSTANT_TOP_NODE_NAME)
this.setText(StapGraph.CONSTANT_TOP_NODE_NAME);
else {
@@ -41,18 +47,18 @@ public class StapNode extends GraphNode{
if (data.name.length() > nodeSize)
shortName = data.name.substring(0, nodeSize - 3) + "..."; //$NON-NLS-1$
this.setText(shortName + ": " + //$NON-NLS-1$
- numberFormat.format((float) data.getTime()/graphModel.getTotalTime() * 100)
+ numberFormat.format((float) data.time/graphModel.getTotalTime() * 100)
+ "%"); //$NON-NLS-1$
}
- if (data.markedMessage != null && data.markedMessage.length() != 0) {
+ if (data.markedMessage.length() != 0) {
Label tooltip = new Label(data.name + ": " + //$NON-NLS-1$
- numberFormat.format((float) data.getTime()/graphModel.getTotalTime() * 100)
+ numberFormat.format((float) data.time/graphModel.getTotalTime() * 100)
+ "%" + "\n " + data.markedMessage); //$NON-NLS-1$ //$NON-NLS-2$
this.setTooltip(tooltip);
} else if (data.name.length() > nodeSize) {
Label tooltip = new Label(data.name + ": " + //$NON-NLS-1$
- numberFormat.format((float) data.getTime()/graphModel.getTotalTime() * 100)
+ numberFormat.format((float) data.time/graphModel.getTotalTime() * 100)
+ "%"); //$NON-NLS-1$
this.setTooltip(tooltip);
}
@@ -60,19 +66,32 @@ public class StapNode extends GraphNode{
this.id = data.id;
this.connection = null;
+ hasButtons = false;
+ buttons = new ArrayList<Integer>();
- if (graphModel.getNode(data.parent) != null) {
+ if (graphModel.getNode(data.caller) != null) {
this.connection = new GraphConnection( graphModel, style,
- this, graphModel.getNode(data.parent));
+ this, graphModel.getNode(data.caller));
if (graphModel.isCollapseMode())
- connection.setText("" + data.timesCalled); //$NON-NLS-1$
- } else if (graphModel.getNode(data.collapsedParent) != null) {
+ connection.setText("" + data.called); //$NON-NLS-1$
+ }
+
+ if (graphModel.getNode(data.collapsedCaller) != null) {
this.connection = new GraphConnection( graphModel, style,
- this, graphModel.getNode(data.collapsedParent));
+ this, graphModel.getNode(data.collapsedCaller));
if (graphModel.isCollapseMode())
- connection.setText("" + data.timesCalled); //$NON-NLS-1$
- } //else do not create any connections (this should usually never happen)
+ connection.setText("" + data.called); //$NON-NLS-1$
+ }
+ }
+
+
+ public void setHasButtons(boolean value) {
+ hasButtons = value;
+ }
+
+ public boolean getHasButtons() {
+ return hasButtons;
}
/**
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/SystemTapCommandParser.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/SystemTapCommandParser.java
new file mode 100644
index 0000000000..c20e85ee7e
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/SystemTapCommandParser.java
@@ -0,0 +1,123 @@
+/*******************************************************************************
+ * 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.callgraph;
+
+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;
+
+
+public class SystemTapCommandParser extends Job {
+
+ private String filePath;
+ private String returnText;
+ private boolean printIsDone;
+ public CallgraphView stapview;
+ private String testOutput;
+ public boolean useColours;
+ private boolean graphingMode;
+ private boolean processFinished;
+
+
+ public boolean isProcessFinished() {
+ return processFinished;
+ }
+
+
+ public void setProcessFinished(boolean processFinished) {
+ this.processFinished = processFinished;
+ }
+
+
+ public SystemTapCommandParser(String name, String filePath, CallgraphView sview,
+ boolean useColours,
+ boolean scheduleGraph, String configName) {
+ super(name);
+ this.filePath = filePath;
+ this.stapview = sview;
+ this.useColours = useColours;
+ this.graphingMode = scheduleGraph;
+ this.processFinished=false;
+ }
+
+
+ public String getCommand() {
+ return filePath;
+ }
+
+ /**
+ * Convenience method to set this.filePath.
+ * Currently not used.
+ *
+ * @param filePath - filePath to be set
+ */
+ public void setFilePath(String filePath) {
+ this.filePath = filePath;
+ }
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+
+ if (graphingMode) {
+ //Delegate to graphing parser instead of this one
+ StapGraphParser p = new StapGraphParser();
+ p.setFile(filePath);
+ p.schedule();
+
+// String text = Helper.getMainConsoleTextByName(configName);
+// returnText = " " + configName+"\n"; //$NON-NLS-1$ //$NON-NLS-2$
+// returnText += dashes() + "\n\n"; //$NON-NLS-1$
+// setText(text);
+//
+//
+// SystemTapUIJob uijob = new SystemTapUIJob("SystemTapUIJob", this, this.useColours); //$NON-NLS-1$
+// uijob.schedule();
+
+ return Status.OK_STATUS;
+ }
+
+ return Status.OK_STATUS;
+ }
+
+ public synchronized void setText(String text) {
+ returnText += text;
+ }
+
+ public synchronized String getText() {
+ String tmp = returnText;
+ returnText = ""; //$NON-NLS-1$
+ return tmp;
+ }
+
+ public synchronized void setDone() {
+ printIsDone = true;
+ }
+
+ public synchronized void clearDone() {
+ printIsDone = false;
+ }
+
+ public synchronized boolean checkDone() {
+ return printIsDone;
+ }
+
+ public String getTestOutput() {
+ return testOutput;
+ }
+
+ public IStatus testRun(IProgressMonitor m) {
+ return run(m);
+ }
+
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/AutoScrollHelper.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/AutoScrollHelper.java
index 8e4d020b52..4ff91b0bdb 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/AutoScrollHelper.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/AutoScrollHelper.java
@@ -18,10 +18,10 @@ public class AutoScrollHelper {
public static void scrollUp(StapGraph graph) {
- if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_LEVEL) {
- int parent = graph.getNodeData(graph.getRootVisibleNodeNumber()).parent;
+ if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_BOX) {
+ int parent = graph.getNodeData(graph.getRootVisibleNodeNumber()).caller;
if (graph.isCollapseMode())
- parent = graph.getNodeData(graph.getRootVisibleNodeNumber()).collapsedParent;
+ parent = graph.getNodeData(graph.getRootVisibleNodeNumber()).collapsedCaller;
if (graph.getNodeData(parent) != null && graph.getNodeData(parent).levelOfRecursion > 0 ) {
int animMode = graph.getAnimationMode();
@@ -34,7 +34,7 @@ public class AutoScrollHelper {
}
public static void scrollDown(StapGraph graph) {
- if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_LEVEL) {
+ if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_BOX) {
if (graph.getTopLevel() + StapGraph.levelBuffer <
graph.getLowestLevelOfNodesAdded()) {
int newLevel = graph.getTopLevel() + 1;
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/Projectionist.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/Projectionist.java
deleted file mode 100644
index 36815d33bf..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/Projectionist.java
+++ /dev/null
@@ -1,95 +0,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
- *******************************************************************************/
-package org.eclipse.linuxtools.callgraph.graphlisteners;
-
-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;
-import org.eclipse.linuxtools.callgraph.StapGraph;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * A Projectionist is the gguy that operates a movie camera.
- * @author chwang
- *
- */
-public class Projectionist extends Job {
- private StapGraph graph;
- private int frame_time = 2000;
- private boolean pause;
- private boolean busy;
-
-
- /**
- * @param name
- * @param listener -- the keyListener instantiating this class
- * @param time -- Amount of time between frames
- */
- public Projectionist(String name, StapGraph graph, int time) {
- super(name);
- this.graph = graph;
- this.frame_time = time;
- pause = false;
- busy = false;
- }
-
- @Override
- public IStatus run(IProgressMonitor monitor) {
-
- long snapshot = System.currentTimeMillis();
- while (true) {
- if (busy) {
- try {
- Thread.sleep(300);
- } catch (InterruptedException e1) {
- e1.printStackTrace();
- }
- continue;
- }
-
- if (pause)
- return Status.OK_STATUS;
-
- if (System.currentTimeMillis() - snapshot >= frame_time) {
- snapshot = System.currentTimeMillis();
- busy = true;
- Display.getDefault().asyncExec(new Runnable() {
- @Override
- public void run() {
- graph.drawNextNode();
- busy = false;
- }
- });
-
- } else {
- try {
- Thread.sleep(500);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- if (monitor.isCanceled()) {
- break;
- }
- }
-
- return Status.CANCEL_STATUS;
- }
-
- /**
- * Projectionist will pause -- reschedule job to continue
- */
- public void pause() {
- pause = true;
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphKeyListener.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphKeyListener.java
index 023cf109e7..46ed512a7a 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphKeyListener.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphKeyListener.java
@@ -20,10 +20,10 @@ import org.eclipse.swt.events.KeyListener;
* StapGraph key listener
*/
public class StapGraphKeyListener implements KeyListener {
- private CallgraphView callgraphView;
+// private StapGraph graph;
public StapGraphKeyListener(StapGraph g) {
- callgraphView = g.getCallgraphView();
+// graph = g;
}
@Override
@@ -39,7 +39,7 @@ public class StapGraphKeyListener implements KeyListener {
//TODO: Use accelerator in menu actions instead of this hard-coded stuff
if (e.character == 'R') {
- callgraphView.getView_refresh().run();
+ CallgraphView.getView_refresh().run();
// }else if (e.character == '1') {
// graph.setAnimationMode(StapGraph.CONSTANT_ANIMATION_SLOW);
// }else if (e.character == '2') {
@@ -66,16 +66,13 @@ public class StapGraphKeyListener implements KeyListener {
// graph.getRootVisibleNode());
// graph.currentPositionInLevel.clear();
}else if (e.character == 'C') {
- callgraphView.getMode_collapsednodes().run();
+ CallgraphView.getMode_collapsednodes().run();
} else if (e.character == 'N') {
- callgraphView.getGoto_next().run();
+ CallgraphView.getGoto_next().run();
} else if (e.character == 'P') {
- callgraphView.getGoto_previous().run();
+ CallgraphView.getGoto_previous().run();
} else if (e.character == 'L') {
- callgraphView.getGoto_last().run();
- } else if (e.character == 'D') {
- callgraphView.getPlay().run();
+ CallgraphView.getGoto_last().run();
}
}
-
};
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphMouseListener.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphMouseListener.java
index 84c30cb9ba..a7ecf346c6 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphMouseListener.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphMouseListener.java
@@ -12,7 +12,6 @@ package org.eclipse.linuxtools.callgraph.graphlisteners;
import java.util.List;
-import org.eclipse.core.runtime.Status;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.linuxtools.callgraph.StapGraph;
import org.eclipse.linuxtools.callgraph.StapNode;
@@ -20,7 +19,6 @@ import org.eclipse.linuxtools.callgraph.core.FileFinderOpener;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
-import org.eclipse.ui.progress.UIJob;
import org.eclipse.zest.core.widgets.GraphNode;
@SuppressWarnings("unused")
@@ -58,7 +56,6 @@ public class StapGraphMouseListener implements MouseListener {
int id = node.getData().id;
graph.scale = 1;
-// graph.setCollapseMode(true);
// Redraw in the current mode with the new id as the center
// The x,y parameters to draw() are irrelevant for radial mode
graph.draw(id);
@@ -66,7 +63,7 @@ public class StapGraphMouseListener implements MouseListener {
// Unhighlight the center node and give it a normal colour
node = graph.getNode(id);
node.unhighlight();
- if (graph.getNodeData(id).isMarked())
+ if (graph.getData(id).isMarked())
node.setBackgroundColor(StapGraph.CONSTANT_MARKED);
else
node.setBackgroundColor(graph.DEFAULT_NODE_COLOR);
@@ -79,7 +76,8 @@ public class StapGraphMouseListener implements MouseListener {
unhighlightall(node);
graph.setSelection(null);
-
+ graph.getTreeViewer().expandToLevel(node.getData(), 0);
+ graph.getTreeViewer().setSelection(new StructuredSelection(node.getData()));
// Draw in current modes with 'id' at the top
int id = node.getData().id;
graph.draw(id);
@@ -91,9 +89,6 @@ public class StapGraphMouseListener implements MouseListener {
@Override
public void mouseDown(MouseEvent e) {
- if (graph.getProjectionist() != null) {
- graph.getProjectionist().pause();
- }
// MP.println("You clicked: " + e.x + ", " + e.y); //$NON-NLS-1$ //$NON-NLS-2$
// MP.println("Convert to control: " + graph.toControl(e.x, e.y).x + ", " //$NON-NLS-1$ //$NON-NLS-2$
// + graph.toControl(e.x, e.y).y);
@@ -114,9 +109,9 @@ public class StapGraphMouseListener implements MouseListener {
List<Integer> callees = null;
if (graph.isCollapseMode())
- callees = graph.getNodeData(id).collapsedChildren;
+ callees = graph.getData(id).collapsedCallees;
else
- callees = graph.getNodeData(id).children;
+ callees = graph.getData(id).callees;
for (int subID : callees) {
if (graph.getNode(subID) != null)
graph.getNode(subID).unhighlight();
@@ -181,14 +176,14 @@ public class StapGraphMouseListener implements MouseListener {
if (node == null)
return null;
- int caller = node.getData().parent;
+ int caller = node.getData().caller;
if (caller < graph.getFirstUsefulNode()) {
// The only node that satisfies this condition should be
// main
caller = graph.getFirstUsefulNode();
}
- output = FileFinderOpener.findAndOpen(graph.getProject(), graph.getNodeData(caller).name);
+ output = FileFinderOpener.findAndOpen(graph.getProject(), graph.getData(caller).name);
}
graph.setSelection(null);
@@ -237,7 +232,7 @@ public class StapGraphMouseListener implements MouseListener {
// ------------Highlighting
if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_TREE
- || graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_LEVEL) {
+ || graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_BOX) {
for (StapNode n : (List<StapNode>) graph.getNodes()) {
unhighlightall(n);
}
@@ -245,9 +240,9 @@ public class StapGraphMouseListener implements MouseListener {
List<Integer> callees = null;
if (graph.isCollapseMode())
- callees = graph.getNodeData(id).collapsedChildren;
+ callees = graph.getData(id).collapsedCallees;
else
- callees = graph.getNodeData(id).children;
+ callees = graph.getData(id).callees;
for (int subID : callees) {
if (graph.getNode(subID) != null)
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphMouseWheelListener.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphMouseWheelListener.java
index 13c94670ea..a330913999 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphMouseWheelListener.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphMouseWheelListener.java
@@ -45,7 +45,7 @@ public class StapGraphMouseWheelListener implements MouseWheelListener {
return;
}
- if (graph.getDrawMode() != StapGraph.CONSTANT_DRAWMODE_LEVEL &&
+ if (graph.getDrawMode() != StapGraph.CONSTANT_DRAWMODE_BOX &&
graph.getDrawMode() != StapGraph.CONSTANT_DRAWMODE_TREE)
return;
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/messages.properties b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/messages.properties
index 9454ce2c63..f3ad1950bd 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/messages.properties
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/messages.properties
@@ -14,6 +14,8 @@ StapGraph.2=function :
StapGraph.3=time :
StapGraphParser.12=Encountered return without matching call for function
StapGraphParser.13=No start time could be found for function
+StapGraphParser.14=Unexpected symbol when parsing: '
+StapGraphParser.15=' encountered, while expecting < or >.
StapGraphParser.16=:::Program terminated here
StapGraphParser.19=\n:::SystemTap detected functions that appeared to be C directives.
StapGraphParser.20=\n:::Program terminated in less than 50ms, SystemTap overhead may be significant.
@@ -22,24 +24,30 @@ StapGraphParser.22=Unexpected Number
StapGraphParser.23=Unexpected symbol
StapGraphParser.24=Unexpected symbol encountered while trying to
StapGraphParser.25=process id/time values.
-StapGraphParser.ActualTime=\nActual time:
-StapGraphParser.TimeUnits=ms
-StapGraphParser.UnknownMarkers=\ -- User-space may have been paged out before stap could find it. Please try again.
+StapGraphParser.26=Could not find data in target file. Ensure target file contains data and try again.
+StapGraphParser.5=GraphUIJob instance
StapNode.0=unnamed
-CallgraphView.0=Play (D)
+CallgraphView.0=File
CallgraphView.1=View
CallgraphView.11=Open Last Run
+CallgraphView.13=Version
+CallgraphView.15=SystemTap Error Log
CallgraphView.16=Tree View
CallgraphView.17=Radial View
CallgraphView.18=Aggregate View
-CallgraphView.19=Level View
+CallgraphView.19=Box View
CallgraphView.2=Animation
CallgraphView.20=Slow
+CallgraphView.21=Error Log
CallgraphView.22=Fast
CallgraphView.24=Collapse mode (C)
-CallgraphView.3=Pause (D)
+CallgraphView.25=PROBE_BEGIN\n
+CallgraphView.3=\n
+CallgraphView.4=About
+CallgraphView.5=Help
CallgraphView.6=Markers
CallgraphView.7=Open
+CallgraphView.8=Save
CallgraphView.9=Go to
CallgraphView.BufferMessage1=Unfortunately the requested setting for level buffer
CallgraphView.BufferMessage2=could not be processed due to the maximum number of nodes.
@@ -49,15 +57,26 @@ CallgraphView.BufferMessage5=).
CallgraphView.BufferMessage6=If you really want to see more levels, increment max nodes.
CallgraphView.BufferMessage7=This may cause lag on some systems.
CallgraphView.BufferTooHigh=LevelBuffer too high
+CallgraphView.ClearLog=Clear log
+CallgraphView.DeleteLogsMessage=This will permanently clear the SystemTap Eclipse error
+CallgraphView.DeleteLogsMessage2=logs. Are you sure you want to continue?
+CallgraphView.DeleteLogsTitle=Delete logs?
+CallgraphView.ErrorMessageBody=Error log could not be read, most likely this is because
+CallgraphView.ErrorMessageBody2=\ the log file could not be found.
+CallgraphView.ErrorMessageName=ErrorLog reading error
+CallgraphView.ErrorMessageTitle=Error reading error log
+CallgraphView.Errors=Errors
+CallgraphView.FileExistsMessage=Overwrite existing file?
+CallgraphView.FileExistsTitle=File Already Exists
CallgraphView.Last=Last (L)
CallgraphView.MaxDepth=Max depth:
CallgraphView.MaxNodes=Max nodes:
CallgraphView.Next=Next (N)
CallgraphView.nextMarker=(n)ext
+CallgraphView.OpenLog=Open log
CallgraphView.Previous=Previous (P)
CallgraphView.previousMarker=(p)revious
CallgraphView.Reset=Reset (R)
CallgraphView.SetLimits=Set limits
CallgraphView.SetValues=Set values
-CallgraphView.ThumbNailDown=More nodes below
-CallgraphView.ThumbNailUp=More nodes above
+CallgraphView.SystemTapVersionBox=SystemTap Version
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeContentProvider.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeContentProvider.java
index 9eae8440c7..17b548c5e5 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeContentProvider.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeContentProvider.java
@@ -27,10 +27,10 @@ public class StapTreeContentProvider implements ITreeContentProvider{
List<StapData> EMPTY = new ArrayList<StapData>();
if (parentElement instanceof StapData) {
StapData parent = ((StapData) parentElement);
- List<Integer> childrenIDs = parent.collapsedChildren;
+ List<Integer> childrenIDs = parent.collapsedCallees;
for (int val : childrenIDs) {
- if (graph.getNodeData(val) != null) {
- EMPTY.add(graph.getNodeData(val));
+ if (graph.getData(val) != null) {
+ EMPTY.add(graph.getData(val));
}
}
}
@@ -40,7 +40,7 @@ public class StapTreeContentProvider implements ITreeContentProvider{
@Override
public Object getParent(Object element) {
if (element instanceof StapData) {
- return graph.getNodeData(((StapData) element).collapsedParent);
+ return graph.getData(((StapData) element).collapsedCaller);
}
return null;
}
@@ -49,7 +49,7 @@ public class StapTreeContentProvider implements ITreeContentProvider{
public boolean hasChildren(Object element) {
if (element instanceof StapData)
return element == null ? false :
- ((StapData) element).children.size() > 0;
+ ((StapData) element).callees.size() > 0;
return false;
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeDoubleClickListener.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeDoubleClickListener.java
index 766d5335c5..05cdd24927 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeDoubleClickListener.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeDoubleClickListener.java
@@ -16,6 +16,7 @@ import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.linuxtools.callgraph.CallgraphView;
import org.eclipse.linuxtools.callgraph.StapData;
import org.eclipse.linuxtools.callgraph.StapGraph;
@@ -47,7 +48,7 @@ public class StapTreeDoubleClickListener implements IDoubleClickListener {
graph.getNode(data.id).unhighlight();
}
- graph.getCallgraphView().maximizeIfUnmaximized();
+ CallgraphView.maximizeIfUnmaximized();
graph.setFocus();
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeLabelProvider.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeLabelProvider.java
index d22caac7a4..ee05d05f89 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeLabelProvider.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeLabelProvider.java
@@ -23,15 +23,15 @@ public class StapTreeLabelProvider implements ILabelProvider {
public Image getImage(Object element) {
Image im = null;
if ( ((StapData) element).isMarked())
- im = new Image(Display.getCurrent(), CallGraphConstants.getPluginLocation() + "/icons/public_co.gif"); //$NON-NLS-1$
+ im = new Image(Display.getCurrent(), CallGraphConstants.PLUGIN_LOCATION + "/icons/public_co.gif"); //$NON-NLS-1$
else
- im = new Image(Display.getCurrent(), CallGraphConstants.getPluginLocation() + "/icons/compare_method.gif"); //$NON-NLS-1$
+ im = new Image(Display.getCurrent(), CallGraphConstants.PLUGIN_LOCATION + "/icons/compare_method.gif"); //$NON-NLS-1$
return im;
}
@Override
public String getText(Object element) {
- return ((StapData) element).timesCalled + ": " + ((StapData) element).name; //$NON-NLS-1$
+ return ((StapData) element).called + ": " + ((StapData) element).name; //$NON-NLS-1$
}
@Override
diff --git a/systemtap/org.eclipse.linuxtools.systemtap-feature/.project b/systemtap/org.eclipse.linuxtools.systemtap-feature/.project
deleted file mode 100644
index aa03b2d5cd..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap-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/systemtap/org.eclipse.linuxtools.systemtap-feature/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap-feature/ChangeLog
deleted file mode 100644
index ccfd32a243..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap-feature/ChangeLog
+++ /dev/null
@@ -1,25 +0,0 @@
-2009-08-06 Andrew Overholt <overholt@redhat.com>
-
- * feature.properties: Remove trailing period.
- Add copyright.
- * feature.xml: Add copyright.
-
-2009-08-06 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * feature.properties: Change the description.
- * feature.xml: Change the label.
-
-2009-08-06 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * feature.xml:renaming systemtap.ui to systemtap
-
-2009-08-05 Andrew Overholt <overholt@redhat.com>
-
- * feature.xml: use feature.properties variables.
- * feature.properties: Provider: Eclipse.org -> Eclipse
-
-2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * ChangeLog: Refactoring. Renaming all packages directories from *.systemtapgui.* to *.systemtap.ui.*
- * .project:
- * feature.xml: \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap-feature/build.properties b/systemtap/org.eclipse.linuxtools.systemtap-feature/build.properties
deleted file mode 100644
index 33c989ca2c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap-feature/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-bin.includes = feature.xml,\
- feature.properties,\
- epl-v10.html
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap-feature/feature.properties b/systemtap/org.eclipse.linuxtools.systemtap-feature/feature.properties
deleted file mode 100644
index d33e0ae9ab..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap-feature/feature.properties
+++ /dev/null
@@ -1,115 +0,0 @@
-#*******************************************************************************
-# 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
-#
-#********************************************************************************
-featureName=systemtapgui
-description=SystemTap IDE and visualization tool (Incubation)
-featureProvider=Eclipse
-copyright=\
-Copyright (c) 2009 IBM Corporation. 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
-licenseURL=epl-v10.html
-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 \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap-feature/feature.xml b/systemtap/org.eclipse.linuxtools.systemtap-feature/feature.xml
deleted file mode 100644
index 77f38a8099..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap-feature/feature.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.linuxtools.systemtap"
- label="%description"
- version="0.3.0.qualifier"
- provider-name="%provider">
-
- <description>
- %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>
-
- <plugin
- id="org.eclipse.linuxtools.systemtap.ui.consolelog"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.linuxtools.systemtap.ui.editor"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.linuxtools.systemtap.ui.graphingapi.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.linuxtools.systemtap.ui.logging"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.linuxtools.systemtap.ui.structures"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.linuxtools.systemtap.ui.graphing"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.linuxtools.systemtap.ui.systemtapgui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.linuxtools.systemtap.ui.ide"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/.project b/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/.project
deleted file mode 100644
index 23875d0964..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.backup-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/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/ChangeLog
deleted file mode 100644
index 64f4688042..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/ChangeLog
+++ /dev/null
@@ -1,38 +0,0 @@
-2009-08-06 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * feature.xml:renaming to systemtap.backup
-
-2009-08-05 Andrew Overholt <overholt@redhat.com>
-
- * feature.xml: Remove .feature from name.
-
-2009-07-08 Andrew Overholt <overholt@redhat.com>
-
- * feature.xml: Temporarily revert change to included plugin.
- * .project: Likewise.
-
-2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * .project:
- * feature.xml:
- * ChangeLog: Refactoring the code to systemtap.backup.ui*. This code
- has been merged with org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.*
-
-2009-05-19 Andrew Overholt <overholt@redhat.com>
-
- * feature.properties: Change provider from Eclipse.org to Eclipse.
-
-2009-01-09 Phil Muldoon <pmuldoon@redhat.com>
-
- * feature.xml: Add .qualifier to feature version.
-
-2009-01-06 Andrew Overholt <overholt@redhat.com>
-
- * feature.xml: Add update site information. 1.0.0 -> 0.1.0.
- * build.properties: Add feature.properties and epl-v10.html.
-
-2008-10-31 Andrew Overholt <overholt@redhat.com>
-
- * epl-v10.html: New file.
- * feature.properties: New file. Add more description feature.
- * feature.xml: Use feature.properties for strings. \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/feature.properties b/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/feature.properties
deleted file mode 100644
index 9ffd1f8d0e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/feature.properties
+++ /dev/null
@@ -1,112 +0,0 @@
-#*******************************************************************************
-# 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, Inc. - initial API and implementation
-#********************************************************************************
-featureName=Systemtap script editor (Incubation)
-description=Plugins for maintaining and developing Systemtap scripts.
-provider=Eclipse
-copyright=Copyright 2008 Phillip Muldoon.
-licenseURL=epl-v10.html
-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 \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/feature.xml b/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/feature.xml
deleted file mode 100644
index 512d5e60ea..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/feature.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.linuxtools.systemtap.backup"
- label="%featureName"
- version="0.1.0.qualifier"
- provider-name="%provider">
-
- <description>
- %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.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.ui.editors"/>
- </requires>
-
- <plugin
- id="org.eclipse.linuxtools.systemtap.ui.editor"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/.project b/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/.project
deleted file mode 100644
index b71f278e84..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.ui.editor</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/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/.settings/org.eclipse.jdt.core.prefs b/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 33e6c70b8f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,83 +0,0 @@
-#Mon Jan 19 18:16:21 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=ignore
-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=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=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/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/ChangeLog
deleted file mode 100644
index 7c9d4f8b63..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/ChangeLog
+++ /dev/null
@@ -1,77 +0,0 @@
-2009-08-05 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Add ".qualifier" to ensure it gets updated.
-
-2009-08-05 Andrew Overholt <overholt@redhat.com>
-
- Bug #272028
-
- * META-INF/MANIFEST.MF: Fix localization.
- * plugin.properties: Fix typo (missing 'S').
-
-2009-07-08 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Attempt to fix renaming situation.
- * .project: Likewise.
-
-2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * src/org/eclipse/linuxtools/systemtap/ui/editor/activator/Activator.java: Removed.
- * src/org/eclipse/linuxtools/systemtap/ui/editor/ColorManager.java: Removed.
- * src/org/eclipse/linuxtools/systemtap/ui/editor/STPColorConstants.java: Removed.
- * src/org/eclipse/linuxtools/systemtap/ui/editor/STPCompletionProcessor.java: Removed.
- * src/org/eclipse/linuxtools/systemtap/ui/editor/STPConfiguration.java: Removed.
- * src/org/eclipse/linuxtools/systemtap/ui/editor/STPDocumentProvider.java: Removed.
- * src/org/eclipse/linuxtools/systemtap/ui/editor/STPElementScanner.java: Removed.
- * src/org/eclipse/linuxtools/systemtap/ui/editor/STPMetadataSingleton.java: Removed.
- * src/org/eclipse/linuxtools/systemtap/ui/editor/STPPartitioner.java: Removed.
- * src/org/eclipse/linuxtools/systemtap/ui/editor/STPPartitionScanner.java: Removed.
- * src/org/eclipse/linuxtools/systemtap/ui/editor/STPReconcilingStrategy.java: Removed.
- * src/org/eclipse/linuxtools/systemtap/ui/editor/strings.properties: Removed.
- * src/org/eclipse/linuxtools/systemtap/ui/editor/SystemtapEditor.java: Removed.
- * src/org/eclipse/linuxtools/systemtap/backup/ui: New file.
- * .project:
- * META-INF/MANIFEST.MF:
- * plugin.xml:
- * ChangeLog: Refactoring the code to systemtap.backup.ui*. This code
- has been merged with org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.*
-
-2009-01-19 Alexander Kurtakov <akurtako@redhat.com>
-
- * .settings/org.eclipse.jdt.core.prefs: Enable more warnings.
-
-2009-01-09 Phil Muldoon <pmuldoon@redhat.com>
-
- * build.properties: Add completion/ folder to binary
- build.
-
-2008-12-09 Andrew Overholt <overholt@redhat.com>
-
- * plugin.xml: Remove erroneous metadata element under <plugin>.
-
-2008-11-03 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Add Bundle-ActivationPolicy.
-
-2008-10-31 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Use plugin.properties.
- * plugin.properties: Initial checkin.
-
-2008-10-28 Andrew Overholt <overholt@redhat.com>
-
- Bug #252489
- * META-INF/MANIFEST.MF: Set BREE to 1.6 (STPMetadataSingleton.parse uses
- ResourceBundle.containsKey).
-
-2009-09-13 Phil Muldoon <pmuldoon@redhat.com>
-
- * META-INF/MANIFEST.MF: Update to reflect
- import specifications.
- * plugin.xml: Likewise.
-
-2008-09-11 Phil Muldoon <pmuldoon@redhat.com>
-
- * .classpath: Add.
-
- * Initial import.
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/META-INF/MANIFEST.MF
deleted file mode 100644
index 460e0456e1..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,27 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %bundleName
-Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.editor;singleton:=true
-Bundle-Version: 0.1.0.qualifier
-Bundle-Activator: org.eclipse.linuxtools.systemtap.backup.ui.editor.activator.Activator
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.jface.text,
- org.eclipse.ui.editors
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Export-Package: org.eclipse.linuxtools.systemtap.backup.ui.editor;
- uses:="org.eclipse.jface.text,
- org.eclipse.jface.text.reconciler,
- org.eclipse.jface.text.source,
- org.eclipse.core.runtime,
- org.eclipse.jface.text.rules,
- org.eclipse.jface.text.contentassist,
- org.eclipse.jface.action,
- org.eclipse.jface.text.presentation,
- org.eclipse.swt.graphics,
- org.eclipse.swt.widgets,
- org.eclipse.ui.editors.text"
-Bundle-Vendor: %provider
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/build.properties
deleted file mode 100644
index 77ed4a7511..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- icons/,\
- plugin.properties,\
- completion/
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/completion/stp_completion.properties b/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/completion/stp_completion.properties
deleted file mode 100644
index 7221df6aa3..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/completion/stp_completion.properties
+++ /dev/null
@@ -1,569 +0,0 @@
-syscall.accept(name:string,sockfd:long,addr_uaddr:long,addrlen_uaddr:long,argstr:string)
-syscall.access(name:string,pathname:string,mode:long,mode_str:string,argstr:string)
-syscall.acct(name:string,filename:string,argstr:string)
-syscall.add_key(name:string,type_uaddr:long,description_auddr:long,payload_uaddr:long,plen:long,ringid:long,argstr:string)
-syscall.adjtimex(name:string,argstr:string)
-syscall.alarm(name:string,seconds:long,argstr:string)
-syscall.arch_prctl(name:string,code:long,addr:long,argstr:string)
-syscall.bdflush(name:string,func:long,data:long,data_str:string,argstr:string)
-syscall.bind(name:string,sockfd:long,my_addr_uaddr:long,addrlen:long,argstr:string)
-syscall.brk(name:string,brk:long,argstr:string)
-syscall.capget(name:string,header_uaddr:long,data_uaddr:long,argstr:string)
-syscall.capset(name:string,header_uaddr:long,data_uaddr:long,argstr:string)
-syscall.chdir(name:string,path:string,argstr:string)
-syscall.chmod(name:string,path:string,mode:long,argstr:string)
-syscall.chown(name:string,path:string,owner:long,group:long,argstr:string)
-syscall.chown16(name:string,path:string,owner:long,group:long,argstr:string)
-syscall.chroot(name:string,path:string,argstr:string)
-syscall.clock_getres(name:string,clk_id:long,clk_id_str:string,res_uaddr:long,argstr:string)
-syscall.clock_gettime(name:string,clk_id:long,clk_id_str:string,argstr:string)
-syscall.clock_nanosleep(name:string,flag_str:string,argstr:string)
-syscall.clock_settime(name:string,clk_id:long,clk_id_str:string,tp_uaddr:long,argstr:string)
-syscall.close(name:string,fd:long,argstr:string)
-syscall.compat_adjtimex(name:string,argstr:string)
-syscall.compat_clock_nanosleep(name:string,flag_str:string,argstr:string)
-syscall.compat_execve(name:string,filename:string,args:string,argstr:string)
-syscall.compat_futex(name:string,futex_uaddr:long,op:long,val:long,utime_uaddr:long,uaddr2_uaddr:long,val3:long,argstr:string)
-syscall.compat_futimesat(name:string,dirfd:long,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
-syscall.compat_getitimer(name:string,which:long,value_uaddr:long,argstr:string)
-syscall.compat_io_setup(name:string,maxevents:long,ctxp_uaddr:long,argstr:string)
-syscall.compat_io_submit(name:string,ctx_id:long,nr:long,iocbpp_uaddr:long,argstr:string)
-syscall.compat_nanosleep(name:string,req_uaddr:long,rem_uaddr:long,argstr:string)
-syscall.compat_ppoll(name:string,argstr:string)
-syscall.compat_pselect6(name:string,argstr:string)
-syscall.compat_pselect7a(name:string,argstr:string)
-syscall.compat_select(name:string,n:long,readfds_uaddr:long,writefds_uaddr:long,exceptfds_uaddr:long,timeout_uaddr:long,argstr:string)
-syscall.compat_setitimer(name:string,which:long,value_uaddr:long,ovalue_uaddr:long,argstr:string)
-syscall.compat_signalfd(name:string,argstr:string)
-syscall.compat_sys_msgctl(name:string,argstr:string)
-syscall.compat_sys_msgrcv(name:string,argstr:string)
-syscall.compat_sys_msgsnd(name:string,argstr:string)
-syscall.compat_sys_recvmsg(name:string,s:long,msg_uaddr:long,flags:long,argstr:string)
-syscall.compat_sys_semctl(name:string,argstr:string)
-syscall.compat_sys_semtimedop(name:string,semid:long,sops_uaddr:long,nsops:long,timeout_uaddr:long,argstr:string)
-syscall.compat_sys_sendmsg(name:string,s:long,msg_uaddr:long,flags:long,argstr:string)
-syscall.compat_sys_shmat(name:string,first:long,second:long,third:long,uptr_uaddr:long,argstr:string)
-syscall.compat_sys_shmctl(name:string,first:long,second:long,uptr_uaddr:long,argstr:string)
-syscall.compat_sys_utimes(name:string,filename:string,argstr:string)
-syscall.compat_utime(name:string,filename_uaddr:long,filename:string,buf_uaddr:long,actime:long,modtime:long,argstr:string)
-syscall.compat_utimensat(name:string,argstr:string)
-syscall.compat_vmsplice(name:string,argstr:string)
-syscall.connect(name:string,sockfd:long,serv_addr_uaddr:long,addrlen:long,argstr:string)
-syscall.creat(name:string,mode:long,pathname:string,argstr:string)
-syscall.delete_module(name:string,name_user:string,flags:long,argstr:string)
-syscall.dup(name:string,oldfd:long,argstr:string)
-syscall.dup2(name:string,oldfd:long,newfd:long,argstr:string)
-syscall.epoll_create(name:string,size:long,argstr:string)
-syscall.epoll_ctl(name:string,epfd:long,op:long,op_str:string,fd:long,event_uaddr:long,argstr:string)
-syscall.epoll_pwait(name:string,argstr:string)
-syscall.epoll_wait(name:string,epfd:long,events_uaddr:long,maxevents:long,timeout:long,argstr:string)
-syscall.eventfd(name:string,argstr:string)
-syscall.execve(name:string,filename:string,args:string,argstr:string)
-syscall.exit(name:string,status:long,argstr:string)
-syscall.exit_group(name:string,status:long,argstr:string)
-syscall.faccessat(name:string,dfd:long,dfd_str:string,filename:long,filename_str:string,mode:long,mode_str:string,argstr:string)
-syscall.fadvise64(name:string,fs:long,offset:long,len:long,advice:long,argstr:string)
-syscall.fadvise64_64(name:string,fs:long,offset:long,len:long,advice:long,argstr:string)
-syscall.fchdir(name:string,fd:long,argstr:string)
-syscall.fchmod(name:string,fildes:long,mode:long,argstr:string)
-syscall.fchmodat(name:string,dfd:long,dfd_str:string,filename:long,filename_str:string,mode:long,argstr:string)
-syscall.fchown(name:string,fd:long,owner:long,group:long,argstr:string)
-syscall.fchown16(name:string,fd:long,owner:long,group:long,argstr:string)
-syscall.fchownat(name:string,dfd:long,dfd_str:string,filename:long,filename_str:string,user:long,group:long,flag:long,flag_str:string,argstr:string)
-syscall.fcntl(name:string,fd:long,cmd:long,cmd_str:string,arg:long,argstr:string)
-syscall.fdatasync(name:string,fd:long,argstr:string)
-syscall.fgetxattr(name:string,filedes:long,name2:string,value_uaddr:long,size:long,argstr:string)
-syscall.flistxattr(name:string,filedes:long,list_uaddr:long,size:long,argstr:string)
-syscall.flock(name:string,fd:long,operation:long,argstr:string)
-syscall.fork(clone_flags:long,stack_start:long,regs:long,stack_size:long,parent_tid_uaddr:long,child_tid_uaddr:long,name:string,argstr:string)
-syscall.fremovexattr(name:string,filedes:long,name_uaddr:long,argstr:string)
-syscall.fsetxattr(name:string,filedes:long,name2:string,value_uaddr:long,size:long,flags:long,argstr:string)
-syscall.fstat(name:string,filedes:long,buf_uaddr:long,argstr:string)
-syscall.fstatat(name:string,dirfd:long,path:string,buf_uaddr:long,argstr:string)
-syscall.fstatfs(name:string,fd:long,buf_uaddr:long,argstr:string)
-syscall.fstatfs64(name:string,fd:long,sz:long,buf_uaddr:long,argstr:string)
-syscall.fsync(name:string,fd:long,argstr:string)
-syscall.ftruncate(name:string,fd:long,length:long,argstr:string)
-syscall.futex(name:string,futex_uaddr:long,op:long,val:long,utime_uaddr:long,uaddr2_uaddr:long,val3:long,argstr:string)
-syscall.futimesat(name:string,dirfd:long,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
-syscall.get_mempolicy(name:string,policy_uaddr:long,nmask_uaddr:long,maxnode:long,addr:long,flags:long,argstr:string)
-syscall.getcwd(name:string,buf_uaddr:long,size:long,argstr:string)
-syscall.getdents(name:string,fd:long,dirp_uaddr:long,count:long,argstr:string)
-syscall.getegid(name:string,argstr:string)
-syscall.geteuid(name:string,argstr:string)
-syscall.getgid(name:string,argstr:string)
-syscall.getgroups(name:string,size:long,list_uaddr:long,argstr:string)
-syscall.gethostname(name:string,name_uaddr:long,len:long,argstr:string)
-syscall.getitimer(name:string,which:long,value_uaddr:long,argstr:string)
-syscall.getpeername(name:string,s:long,name_uaddr:long,namelen_uaddr:long,argstr:string)
-syscall.getpgid(name:string,pid:long,argstr:string)
-syscall.getpgrp(name:string,argstr:string)
-syscall.getpid(name:string,argstr:string)
-syscall.getppid(name:string,argstr:string)
-syscall.getpriority(name:string,which:long,who:long,argstr:string)
-syscall.getresgid(name:string,rgid_uaddr:long,egid_uaddr:long,sgid_uaddr:long,argstr:string)
-syscall.getresuid(name:string,ruid_uaddr:long,euid_uaddr:long,suid_uaddr:long,argstr:string)
-syscall.getrlimit(name:string,resource:long,rlim_uaddr:long,argstr:string)
-syscall.getrusage(name:string,who:long,who_str:string,usage_uaddr:long,argstr:string)
-syscall.getsid(name:string,pid:long,argstr:string)
-syscall.getsockname(name:string,s:long,name_uaddr:long,namelen_uaddr:long,argstr:string)
-syscall.getsockopt(name:string,fd:long,level:long,level_str:string,optname:long,optname_str:string,optval_uaddr:long,optlen_uaddr:long,argstr:string)
-syscall.gettid(name:string,argstr:string)
-syscall.gettimeofday(name:string,tv_uaddr:long,tz_uaddr:long,argstr:string)
-syscall.getuid(name:string,argstr:string)
-syscall.getxattr(name:string,path:string,name2:string,value_uaddr:long,size:long,argstr:string)
-syscall.init_module(name:string,umod_uaddr:long,len:long,uargs:string,argstr:string)
-syscall.inotify_add_watch(name:string,fd:long,mask:long,path_uaddr:long,path:string,argstr:string)
-syscall.inotify_init(name:string,argstr:string)
-syscall.inotify_rm_watch(name:string,fd:long,wd:long,argstr:string)
-syscall.io_cancel(name:string,ctx_id:long,iocb_uaddr:long,result_uaddr:long,argstr:string)
-syscall.io_destroy(name:string,ctx:long,argstr:string)
-syscall.io_getevents(name:string,ctx_id:long,min_nr:long,nr:long,events_uaddr:long,timeout_uaddr:long,timestr:string,argstr:string)
-syscall.io_setup(name:string,maxevents:long,ctxp_uaddr:long,argstr:string)
-syscall.io_submit(name:string,ctx_id:long,nr:long,iocbpp_uaddr:long,argstr:string)
-syscall.ioctl(name:string,fd:long,request:long,argp:long,argstr:string)
-syscall.ioperm(name:string,from:long,num:long,turn_on:long,argstr:string)
-syscall.iopl(name:string,level:long,argstr:string)
-syscall.ioprio_get(name:string,which:long,who:long,argstr:string)
-syscall.ioprio_set(name:string,which:long,who:long,ioprio:long,argstr:string)
-syscall.kexec_load(name:string,entry:long,nr_segments:long,segments_uaddr:long,flags:long,argstr:string)
-syscall.keyctl(name:string,argstr:string)
-syscall.kill(name:string,pid:long,sig:long,argstr:string)
-syscall.lchown(name:string,path:string,owner:long,group:long,argstr:string)
-syscall.lchown16(name:string,path:string,owner:long,group:long,argstr:string)
-syscall.lgetxattr(name:string,path:string,name2:string,value_uaddr:long,size:long,argstr:string)
-syscall.link(name:string,oldpath:string,newpath:string,argstr:string)
-syscall.linkat(name:string,olddfd:long,olddfd_str:string,oldname:long,oldname_str:string,newdfd:long,newdfd_str:string,newname:long,newname_str:string,flags:long,flags_str:string,argstr:string)
-syscall.listen(name:string,sockfd:long,backlog:long,argstr:string)
-syscall.listxattr(name:string,list_uaddr:long,size:long,path_uaddr:long,path:string,argstr:string)
-syscall.llistxattr(name:string,list_uaddr:long,size:long,path_uaddr:long,path:string,argstr:string)
-syscall.llseek(name:string,fd:long,offset_high:long,offset_low:long,result_uaddr:long,whence:long,whence_str:string,argstr:string)
-syscall.lookup_dcookie(name:string,cookie:long,buffer_uaddr:long,len:long,argstr:string)
-syscall.lremovexattr(name:string,name_uaddr:long,name2:string,path_uaddr:long,path:string,argstr:string)
-syscall.lseek(name:string,fildes:long,offset:long,whence:long,whence_str:string,argstr:string)
-syscall.lsetxattr(name:string,path_uaddr:long,path:string,name_uaddr:long,name_str:string,value_uaddr:long,size:long,flags:long,argstr:string)
-syscall.lstat(name:string,path:string,buf_uaddr:long,argstr:string)
-syscall.madvise(name:string,start:long,length:long,advice:long,advice_str:string,argstr:string)
-syscall.mbind(name:string,start:long,len:long,mode:long,nmask_uaddr:long,maxnode:long,flags:long,argstr:string)
-syscall.migrate_pages(name:string,argstr:string)
-syscall.mincore(name:string,start:long,length:long,vec_uaddr:long,argstr:string)
-syscall.mkdir(name:string,pathname_uaddr:long,pathname:string,mode:long,argstr:string)
-syscall.mkdirat(name:string,dirfd:long,pathname:string,mode:long,argstr:string)
-syscall.mknod(name:string,pathname:string,mode:long,dev:long,argstr:string)
-syscall.mknodat(name:string,dfd:long,dfd_str:string,filename:long,filename_str:string,mode:long,mode_str:string,dev:long,argstr:string)
-syscall.mlock(name:string,addr:long,len:long,argstr:string)
-syscall.mlockall(name:string,flags:long,argstr:string)
-syscall.mmap(name:string,start:long,len:long,prot:long,flags:long,fd:long,offset:long,argstr:string)
-syscall.mmap2(name:string,argstr:string)
-syscall.mmap32(name:string,argstr:string)
-syscall.modify_ldt(name:string,func:long,ptr_uaddr:long,bytecount:long,argstr:string)
-syscall.mount(name:string,source:string,target:string,filesystemtype:string,mountflags:long,mountflags_str:string,data:string,argstr:string)
-syscall.move_pages(name:string,argstr:string)
-syscall.mprotect(name:string,addr:long,len:long,prot:long,prot_str:string,argstr:string)
-syscall.mq_getsetattr(name:string,mqdes:long,u_mqstat_uaddr:long,u_omqstat_uaddr:long,argstr:string)
-syscall.mq_notify(name:string,mqdes:long,notification_uaddr:long,argstr:string)
-syscall.mq_open(name:string,name_uaddr:long,filename:string,mode:long,u_attr_uaddr:long,oflag:long,argstr:string)
-syscall.mq_timedreceive(name:string,mqdes:long,msg_ptr_uaddr:long,msg_len:long,msg_prio_uaddr:long,abs_timout_uaddr:long,argstr:string)
-syscall.mq_timedsend(name:string,mqdes:long,msg_ptr_uaddr:long,msg_len:long,msg_prio:long,abs_timeout_uaddr:long,argstr:string)
-syscall.mq_unlink(name:string,u_name_uaddr:long,u_name:string,argstr:string)
-syscall.mremap(name:string,old_address:long,old_size:long,new_size:long,flags:long,new_address:long,argstr:string)
-syscall.msgctl(name:string,msqid:long,cmd:long,buf_uaddr:long,argstr:string)
-syscall.msgget(name:string,key:long,msgflg:long,msgflg_str:string,argstr:string)
-syscall.msgrcv(name:string,msqid:long,msgp_uaddr:long,msgsz:long,msgtyp:long,msgflg:long,argstr:string)
-syscall.msgsnd(name:string,msqid:long,msgp_uaddr:long,msgsz:long,msgflg:long,argstr:string)
-syscall.msync(name:string,start:long,length:long,flags:long,argstr:string)
-syscall.munlock(name:string,addr:long,len:long,argstr:string)
-syscall.munlockall(name:string,argstr:string)
-syscall.munmap(name:string,start:long,length:long,argstr:string)
-syscall.nanosleep(name:string,req_uaddr:long,rem_uaddr:long,argstr:string)
-syscall.nfsservctl(name:string,cmd:long,argp_uaddr:long,resp_uaddr:long,argstr:string)
-syscall.ni_syscall(name:string,argstr:string)
-syscall.nice(name:string,inc:long,argstr:string)
-syscall.open(name:string,filename:string,flags:long,mode:long,argstr:string)
-syscall.openat(name:string,filename:string,flags:long,mode:long,argstr:string)
-syscall.pause(name:string,argstr:string)
-syscall.personality(name:string,persona:long,argstr:string)
-syscall.pipe(name:string,argstr:string)
-syscall.pipe32(name:string,argstr:string)
-syscall.pivot_root(name:string,new_root_str:string,old_root_str:string,argstr:string)
-syscall.poll(name:string,ufds_uaddr:long,nfds:long,timeout:long,argstr:string)
-syscall.ppoll(name:string,argstr:string)
-syscall.prctl(name:string,option:long,arg2:long,arg3:long,arg4:long,arg5:long,argstr:string)
-syscall.pread(name:string,fd:long,buf_uaddr:long,count:long,offset:long,argstr:string)
-syscall.pselect6(name:string,argstr:string)
-syscall.pselect7(name:string,argstr:string)
-syscall.ptrace(name:string,request:long,pid:long,addr:long,data:long,argstr:string)
-syscall.pwrite(name:string,fd:long,buf_uaddr:long,count:long,offset:long,argstr:string)
-syscall.quotactl(name:string,cmd:long,cmd_str:string,special:long,special_str:string,id:long,addr_uaddr:long,argstr:string)
-syscall.read(name:string,fd:long,buf_uaddr:long,count:long,argstr:string)
-syscall.readahead(name:string,fd:long,offset:long,count:long,argstr:string)
-syscall.readdir(name:string,argstr:string)
-syscall.readlink(name:string,path:string,buf_uaddr:long,bufsiz:long,argstr:string)
-syscall.readlinkat(name:string,dfd:long,buf_uaddr:long,bufsiz:long,path:string,argstr:string)
-syscall.readv(name:string,vector_uaddr:long,count:long,fd:long,argstr:string)
-syscall.reboot(name:string,magic:long,magic_str:string,magic2:long,magic2_str:string,flag:long,flag_str:string,arg_uaddr:long,argstr:string)
-syscall.recv(name:string,s:long,buf_uaddr:long,len:long,flags:long,flags_str:string,argstr:string)
-syscall.recvfrom(name:string,s:long,buf_uaddr:long,len:long,flags:long,flags_str:string,addr_uaddr:long,addrlen_uaddr:long,argstr:string)
-syscall.recvmsg(name:string,s:long,msg_uaddr:long,flags:long,flags_str:string,argstr:string)
-syscall.remap_file_pages(name:string,start:long,size:long,prot:long,pgoff:long,flags:long,argstr:string)
-syscall.removexattr(name:string,name_str:string,path:string,argstr:string)
-syscall.rename(name:string,oldpath:string,newpath:string,argstr:string)
-syscall.renameat(name:string,olddfd:long,olddfd_str:string,oldname:long,oldname_str:string,newdfd:long,newdfd_str:string,newname:long,newname_str:string,argstr:string)
-syscall.request_key(name:string,type_uaddr:long,description_uaddr:long,callout_info_uaddr:long,destringid:long,argstr:string)
-syscall.restart_syscall(name:string,argstr:string)
-syscall.rmdir(name:string,pathname:string,argstr:string)
-syscall.rt_sigaction(name:string,sig:long,act_uaddr:long,oact_uaddr:long,sigsetsize:long,argstr:string)
-syscall.rt_sigaction32(name:string,sig:long,act_uaddr:long,oact_uaddr:long,sigsetsize:long,argstr:string)
-syscall.rt_sigpending(name:string,set_uaddr:long,sigsetsize:long,argstr:string)
-syscall.rt_sigprocmask(name:string,how:long,how_str:string,set_uaddr:long,oldset_uaddr:long,argstr:string)
-syscall.rt_sigqueueinfo(name:string,pid:long,sig:long,uinfo_uaddr:long,argstr:string)
-syscall.rt_sigreturn(name:string,argstr:string)
-syscall.rt_sigsuspend(name:string,argstr:string)
-syscall.rt_sigtimedwait(name:string,uthese_uaddr:long,uinfo_uaddr:long,uts_uaddr:long,sigsetsize:long,argstr:string)
-syscall.sched_get_priority_max(name:string,policy:long,argstr:string)
-syscall.sched_get_priority_min(name:string,policy:long,argstr:string)
-syscall.sched_getaffinity(name:string,pid:long,len:long,mask_uaddr:long,argstr:string)
-syscall.sched_getparam(name:string,pid:long,p_uaddr:long,argstr:string)
-syscall.sched_getscheduler(name:string,pid:long,argstr:string)
-syscall.sched_rr_get_interval(name:string,pid:long,tp_uaddr:long,argstr:string)
-syscall.sched_setaffinity(name:string,pid:long,len:long,mask_uaddr:long,argstr:string)
-syscall.sched_setparam(name:string,pid:long,p_uaddr:long,argstr:string)
-syscall.sched_setscheduler(name:string,pid:long,policy:long,policy_str:string,p_uaddr:long,argstr:string)
-syscall.sched_yield(name:string,argstr:string)
-syscall.select(name:string,n:long,readfds_uaddr:long,writefds_uaddr:long,exceptfds_uaddr:long,timeout_uaddr:long,argstr:string)
-syscall.semctl(name:string,semid:long,semnum:long,cmd:long,argstr:string)
-syscall.semget(name:string,key:long,nsems:long,semflg:long,argstr:string)
-syscall.semop(name:string,semid:long,tsops_uaddr:long,nsops:long,argstr:string)
-syscall.semtimedop(name:string,semid:long,sops_uaddr:long,nsops:long,timeout_uaddr:long,argstr:string)
-syscall.send(name:string,s:long,buf_uaddr:long,len:long,flags:long,flags_str:string,argstr:string)
-syscall.sendfile(name:string,out_fd:long,in_fd:long,offset_uaddr:long,count:long,argstr:string)
-syscall.sendmsg(name:string,s:long,msg_uaddr:long,flags:long,flags_str:string,argstr:string)
-syscall.sendto(name:string,s:long,buf_uaddr:long,len:long,flags:long,flags_str:string,to_uaddr:long,tolen:long,argstr:string)
-syscall.set_mempolicy(name:string,mode:long,nmask_uaddr:long,maxnode:long,argstr:string)
-syscall.set_tid_address(name:string,tidptr_uaddr:long,argstr:string)
-syscall.setdomainname(name:string,hostname_uaddr:long,len:long,argstr:string)
-syscall.setfsgid(name:string,fsgid:long,argstr:string)
-syscall.setfsuid(name:string,fsuid:long,argstr:string)
-syscall.setgid(name:string,gid:long,argstr:string)
-syscall.setgroups(name:string,size:long,list_uaddr:long,argstr:string)
-syscall.sethostname(name:string,hostname_uaddr:long,name_str:string,len:long,argstr:string)
-syscall.setitimer(name:string,which:long,value_uaddr:long,ovalue_uaddr:long,argstr:string)
-syscall.setpgid(name:string,pid:long,pgid:long,argstr:string)
-syscall.setpriority(name:string,which:long,which_str:string,who:long,prio:long,argstr:string)
-syscall.setregid(name:string,rgid:long,egid:long,argstr:string)
-syscall.setregid16(name:string,rgid:long,egid:long,argstr:string)
-syscall.setresgid(name:string,rgid:long,egid:long,sgid:long,argstr:string)
-syscall.setresgid16(name:string,rgid:long,egid:long,sgid:long,argstr:string)
-syscall.setresuid(name:string,ruid:long,euid:long,suid:long,argstr:string)
-syscall.setresuid16(name:string,ruid:long,euid:long,suid:long,argstr:string)
-syscall.setreuid(name:string,ruid:long,euid:long,argstr:string)
-syscall.setreuid16(name:string,ruid:long,euid:long,argstr:string)
-syscall.setrlimit(name:string,resource:long,rlim_uaddr:long,argstr:string)
-syscall.setsid(name:string,argstr:string)
-syscall.setsockopt(name:string,fd:long,level:long,level_str:string,optname:long,optname_str:string,optval_uaddr:long,optlen:long,argstr:string)
-syscall.settimeofday(name:string,tv_uaddr:long,tz_uaddr:long,argstr:string)
-syscall.settimeofday32(name:string,tv_uaddr:long,tz_uaddr:long,argstr:string)
-syscall.setuid(name:string,uid:long,argstr:string)
-syscall.setxattr(name:string,path_uaddr:long,path:string,name_uaddr:long,name_str:string,value_uaddr:long,size:long,flags:long,argstr:string)
-syscall.sgetmask(name:string,argstr:string)
-syscall.shmat(name:string,shmid:long,shmaddr_uaddr:long,shmflg:long,argstr:string)
-syscall.shmctl(name:string,shmid:long,cmd:long,buf_uaddr:long,argstr:string)
-syscall.shmdt(name:string,shmaddr_uaddr:long,argstr:string)
-syscall.shmget(name:string,key:long,size:long,shmflg:long,argstr:string)
-syscall.shutdown(name:string,s:long,how:long,how_str:string,argstr:string)
-syscall.sigaction32(name:string,sig:long,act_uaddr:long,oact_uaddr:long,argstr:string)
-syscall.sigaltstack(name:string,uss_uaddr:long,uoss_uaddr:long,regs_uaddr:long,argstr:string)
-syscall.signal(name:string,sig:long,handler:long,argstr:string)
-syscall.signalfd(name:string,argstr:string)
-syscall.sigpending(name:string,argstr:string)
-syscall.sigprocmask(name:string,how:long,how_str:string,set_uaddr:long,oldset_uaddr:long,argstr:string)
-syscall.sigreturn(name:string,argstr:string)
-syscall.sigsuspend(name:string,argstr:string)
-syscall.socket(name:string,family:long,type:long,protocol:long,argstr:string)
-syscall.socketpair(name:string,family:long,type:long,protocol:long,sv_uaddr:long,argstr:string)
-syscall.splice(name:string,argstr:string)
-syscall.ssetmask(name:string,newmask:long,argstr:string)
-syscall.stat(name:string,filename_uaddr:long,filename:string,buf_uaddr:long,argstr:string)
-syscall.statfs(name:string,buf_uaddr:long,path:string,argstr:string)
-syscall.statfs64(name:string,sz:long,buf_uaddr:long,path:string,argstr:string)
-syscall.stime(name:string,t_uaddr:long,argstr:string)
-syscall.swapoff(name:string,path:string,argstr:string)
-syscall.swapon(name:string,path:string,swapflags:long,argstr:string)
-syscall.symlink(name:string,oldpath:string,newpath:string,argstr:string)
-syscall.symlinkat(name:string,oldname:long,oldname_str:string,newdfd:long,newdfd_str:string,newname:long,newname_str:string,argstr:string)
-syscall.sync(name:string,argstr:string)
-syscall.sysctl(name:string,argstr:string)
-syscall.sysctl32(name:string,argstr:string)
-syscall.sysfs(name:string,option:long,arg1:long,arg2:long,argstr:string)
-syscall.sysinfo(name:string,info_uaddr:long,argstr:string)
-syscall.syslog(name:string,type:long,bufp_uaddr:long,len:long,argstr:string)
-syscall.tee(name:string,argstr:string)
-syscall.tgkill(name:string,tgid:long,pid:long,sig:long,argstr:string)
-syscall.time(name:string,t_uaddr:long,argstr:string)
-syscall.timer_create(name:string,clockid:long,clockid_str:string,evp_uaddr:long,timerid_uaddr:long,argstr:string)
-syscall.timer_delete(name:string,timerid:long,argstr:string)
-syscall.timer_getoverrun(name:string,timerid:long,argstr:string)
-syscall.timer_gettime(name:string,timerid:long,value_uaddr:long,argstr:string)
-syscall.timer_settime(name:string,timerid:long,flags:long,value_uaddr:long,ovalue_uaddr:long,argstr:string)
-syscall.times(name:string,argstr:string)
-syscall.tkill(name:string,pid:long,sig:long,argstr:string)
-syscall.truncate(name:string,path_uaddr:long,path:string,length:long,argstr:string)
-syscall.umask(name:string,mask:long,argstr:string)
-syscall.umount(name:string,target:string,flags:long,flags_str:string,argstr:string)
-syscall.uname(name:string,argstr:string)
-syscall.unlink(name:string,pathname_uaddr:long,pathname:string,argstr:string)
-syscall.unlinkat(name:string,dfd:long,dfd_str:string,pathname:long,pathname_str:string,flag:long,flag_str:string,argstr:string)
-syscall.unshare(name:string,unshare_flags:long,argstr:string)
-syscall.uselib(name:string,library_uaddr:long,library:string,argstr:string)
-syscall.ustat(name:string,dev:long,ubuf_uaddr:long,argstr:string)
-syscall.ustat32(name:string,dev:long,argstr:string)
-syscall.utime(name:string,filename_uaddr:long,filename:string,buf_uaddr:long,actime:long,modtime:long,argstr:string)
-syscall.utimensat(name:string,argstr:string)
-syscall.utimes(name:string,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
-syscall.vhangup(name:string,argstr:string)
-syscall.vm86_warning(name:string)
-syscall.vmsplice(name:string,argstr:string)
-syscall.wait4(name:string,pid:long,status_uaddr:long,options:long,options_str:string,rusage_uaddr:long,argstr:string)
-syscall.waitid(name:string,pid:long,which:long,which_str:string,infop_uaddr:long,options:long,options_str:string,rusage_uaddr:long,argstr:string)
-syscall.write(name:string,fd:long,buf_uaddr:long,count:long,argstr:string)
-syscall.writev(name:string,vector_uaddr:long,count:long,fd:long,argstr:string)
-signal.check_ignored(sig_pid:long,pid_name:string,sig:long,sig_name:string)
-signal.checkperm(sig:long,task:long,sinfo:long,name:string,sig_name:string,sig_pid:long,pid_name:string,si_code:string)
-signal.do_action(sig:long,sigact_addr:long,oldsigact_addr:long,sa_handler:long,sa_mask:long)
-signal.flush(task:long,sig_pid:long,pid_name:string)
-signal.force_segv(sig_pid:long,pid_name:string,sig:long,sig_name:string)
-signal.handle(sig:unknown,sig_name:string,sinfo:long,sig_code:long,ka_addr:unknown,oldset_addr:unknown,regs:unknown,sig_mode:string)
-signal.pending(sigset_add:long,sigset_size:long)
-signal.procmask(how:long,sigset_addr:long,oldsigset_addr:long,sigset:long)
-signal.send(name:string,sig:long,task:long,sinfo:long,shared:long,send2queue:long,sig_name:string,sig_pid:long,pid_name:string,si_code:string)
-signal.send_sig_queue(sig:long,sig_name:string,sig_pid:long,pid_name:string,sigqueue_addr:long)
-signal.syskill(name:string,pid:long,sig:long,argstr:string,sig_name:string)
-signal.systgkill(name:string,tgid:long,pid:long,sig:long,argstr:string,sig_name:string)
-signal.systkill(name:string,pid:long,sig:long,argstr:string,sig_name:string)
-signal.wakeup(sig_pid:long,pid_name:string,resume:long,state_mask:string)
-begin(-1))
-netdev.receive(dev_name:string,length:long,protocol:long,truesize:long)
-netdev.transmit(dev_name:string,length:long,protocol:long,truesize:long)
-ioblock.end(devname:string,ino:long,bytes_done:long,error:long,sector:long,flags:long,rw:long,vcnt:long,idx:long,phys_segments:long,hw_segments:long,size:long)
-ioblock.request(devname:string,ino:long,sector:long,flags:long,rw:long,vcnt:long,idx:long,phys_segments:long,hw_segments:long,size:long,bdev:long,bdev_contains:long,p_start_sect:long)
-ioscheduler.elv_add_request(elevator_name:string,disk_major:long,disk_minor:long,req:long,req_flags:long)
-ioscheduler.elv_completed_request(elevator_name:string,disk_major:long,disk_minor:long,req:long,req_flags:long)
-ioscheduler.elv_next_request(elevator_name:string)
-nd_syscall.accept(name:string,sockfd:long,addr_uaddr:long,addrlen_uaddr:long,argstr:string)
-nd_syscall.access(name:string,pathname:string,mode:long,mode_str:string,argstr:string)
-nd_syscall.acct(name:string,filename:string,argstr:string)
-nd_syscall.add_key(name:string,type_uaddr:long,description_uaddr:long,payload_uaddr:long,plen:long,ringid:long,argstr:string)
-nd_syscall.adjtimex(name:string,argstr:string)
-nd_syscall.alarm(name:string,seconds:long,argstr:string)
-nd_syscall.bdflush(name:string,func:long,data:long,data_str:string,argstr:string)
-nd_syscall.bind(name:string,sockfd:long,my_addr_uaddr:long,addrlen:long,argstr:string)
-nd_syscall.brk(name:string,brk:long,argstr:string)
-nd_syscall.capget(name:string,header_uaddr:long,data_uaddr:long,argstr:string)
-nd_syscall.capset(name:string,header_uaddr:long,data_uaddr:long,argstr:string)
-nd_syscall.chdir(name:string,path:string,argstr:string)
-nd_syscall.chmod(name:string,path:string,mode:long,argstr:string)
-nd_syscall.chown(name:string,path:string,owner:long,group:long,argstr:string)
-nd_syscall.chown16(name:string,path:string,owner:long,group:long,argstr:string)
-nd_syscall.chroot(name:string,path:string,argstr:string)
-nd_syscall.clock_getres(name:string,clk_id:long,clk_id_str:string,res_uaddr:long,argstr:string)
-nd_syscall.clock_gettime(name:string,clk_id:long,clk_id_str:string,argstr:string)
-nd_syscall.clock_nanosleep(name:string,flags:long,flag_str:string,argstr:string)
-nd_syscall.clock_settime(name:string,clk_id:long,clk_id_str:string,tp_uaddr:long,argstr:string)
-nd_syscall.close(name:string,fd:long,argstr:string)
-nd_syscall.compat_adjtimex(name:string,argstr:string)
-nd_syscall.compat_clock_nanosleep(name:string,flags:long,flag_str:string,argstr:string)
-nd_syscall.compat_execve(name:string,filename:string,args:string,argstr:string)
-nd_syscall.compat_futex(name:string,futex_uaddr:long,op:long,val:long,utime_uaddr:long,uaddr2_uaddr:long,val3:long,argstr:string)
-nd_syscall.compat_futimesat(name:string,dirfd:long,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
-nd_syscall.compat_getitimer(name:string,which:long,value_uaddr:long,argstr:string)
-nd_syscall.compat_io_setup(name:string,maxevents:long,ctxp_uaddr:long,argstr:string)
-nd_syscall.compat_io_submit(name:string,ctx_id:long,nr:long,iocbpp_uaddr:long,argstr:string)
-nd_syscall.compat_sys_msgctl(name:string,argstr:string)
-nd_syscall.compat_sys_msgrcv(name:string,argstr:string)
-nd_syscall.compat_sys_msgsnd(name:string,argstr:string)
-nd_syscall.connect(name:string,sockfd:long,serv_addr_uaddr:long,addrlen:long,argstr:string)
-nd_syscall.creat(name:string,mode:long,pathname:string,argstr:string)
-nd_syscall.delete_module(name:string,name_user:string,flags:long,argstr:string)
-nd_syscall.dup(name:string,old_fd:long,argstr:string)
-nd_syscall.dup2(name:string,oldfd:long,newfd:long,argstr:string)
-nd_syscall.epoll_create(name:string,size:long,argstr:string)
-nd_syscall.epoll_ctl(name:string,epfd:long,op:long,op_str:string,fd:long,event_uaddr:long,argstr:string)
-nd_syscall.epoll_pwait(name:string,argstr:string)
-nd_syscall.epoll_wait(name:string,epfd:long,events_uaddr:long,maxevents:long,timeout:long,argstr:string)
-nd_syscall.eventfd(name:string,argstr:string)
-nd_syscall.execve(name:string,filename:string,args:string,argstr:string)
-nd_syscall.exit(name:string,status:long,argstr:string)
-nd_syscall.exit_group(name:string,status:long,argstr:string)
-nd_syscall.fadvise64(name:string,fs:long,offset:long,len:long,advice:long,argstr:string)
-nd_syscall.fadvise64_64(name:string,fs:long,offset:long,len:long,advice:long,argstr:string)
-nd_syscall.fchdir(name:string,fd:long,argstr:string)
-nd_syscall.fchmod(name:string,fildes:long,mode:long,argstr:string)
-nd_syscall.fchown(name:string,fd:long,owner:long,group:long,argstr:string)
-nd_syscall.fchown16(name:string,fd:long,owner:long,group:long,argstr:string)
-nd_syscall.fcntl(name:string,fd:long,cmd:long,cmd_str:string,arg:long,argstr:string)
-nd_syscall.fdatasync(name:string,fd:long,argstr:string)
-nd_syscall.fgetxattr(name:string,filedes:long,name2:string,value_uaddr:long,size:long,argstr:string)
-nd_syscall.flistxattr(name:string,filedes:long,list_uaddr:long,size:long,argstr:string)
-nd_syscall.flock(name:string,fd:long,operation:long,argstr:string)
-nd_syscall.fork(clone_flags:long,stack_start:long,regs:long,stack_size:long,parent_tid_uaddr:long,child_tid_uaddr:long,name:string,argstr:string)
-nd_syscall.fremovexattr(name:string,filedes:long,name_uaddr:long,argstr:string)
-nd_syscall.fsetxattr(name:string,filedes:long,name2:string,value_uaddr:long,size:long,flags:long,argstr:string)
-nd_syscall.fstat(name:string,filedes:long,buf_uaddr:long,argstr:string)
-nd_syscall.fstatat(name:string,dirfd:long,path:string,buf_uaddr:long,argstr:string)
-nd_syscall.fstatfs(name:string,fd:long,buf_uaddr:long,argstr:string)
-nd_syscall.fstatfs64(name:string,fd:long,sz:long,buf_uaddr:long,argstr:string)
-nd_syscall.fsync(name:string,fd:long,argstr:string)
-nd_syscall.ftruncate(name:string,fd:long,length:long,argstr:string)
-nd_syscall.futex(name:string,futex_uaddr:long,op:long,val:long,utime_uaddr:long,uaddr2_uaddr:long,val3:long,argstr:string)
-nd_syscall.futimesat(name:string,dirfd:long,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
-nd_syscall.get_mempolicy(name:string,policy_uaddr:long,nmask_uaddr:long,maxnode:long,addr:long,flags:long,argstr:string)
-nd_syscall.getcwd(name:string,buf_uaddr:long,size:long,argstr:string)
-nd_syscall.getdents(name:string,fd:long,dirp_uaddr:long,count:long,argstr:string)
-nd_syscall.getegid(name:string,argstr:string)
-nd_syscall.geteuid(name:string,argstr:string)
-nd_syscall.getgid(name:string,argstr:string)
-nd_syscall.getgroups(name:string,size:long,list_uaddr:long,argstr:string)
-nd_syscall.gethostname(name:string,name_uaddr:long,len:long,argstr:string)
-nd_syscall.getitimer(name:string,which:long,value_uaddr:long,argstr:string)
-nd_syscall.getpeername(name:string,s:long,name_uaddr:long,namelen_uaddr:long,argstr:string)
-nd_syscall.getpgid(name:string,pid:long,argstr:string)
-nd_syscall.getpgrp(name:string,argstr:string)
-nd_syscall.getpid(name:string,argstr:string)
-nd_syscall.getppid(name:string,argstr:string)
-nd_syscall.getpriority(name:string,which:long,who:long,argstr:string)
-nd_syscall.getresgid(name:string,rgid_uaddr:long,egid_uaddr:long,sgid_uaddr:long,argstr:string)
-nd_syscall.getresuid(name:string,ruid_uaddr:long,euid_uaddr:long,suid_uaddr:long,argstr:string)
-nd_syscall.getrlimit(name:string,resource:long,rlim_uaddr:long,argstr:string)
-nd_syscall.getrusage(name:string,who:long,who_str:string,usage_uaddr:long,argstr:string)
-nd_syscall.getsid(name:string,pid:long,argstr:string)
-nd_syscall.getsockname(name:string,s:long,name_uaddr:long,namelen_uaddr:long,argstr:string)
-nd_syscall.getsockopt(name:string,fd:long,level:long,level_str:string,optname:long,optname_str:string,optval_uaddr:long,optlen_uaddr:long,argstr:string)
-nd_syscall.gettid(name:string,argstr:string)
-nd_syscall.gettimeofday(name:string,tv_uaddr:long,tz_uaddr:long,argstr:string)
-nd_syscall.getuid(name:string,argstr:string)
-nd_syscall.getxattr(name:string,path:string,name2:string,value_uaddr:long,size:long,argstr:string)
-nd_syscall.init_module(name:string,umod_uaddr:long,len:long,uargs:string,argstr:string)
-nd_syscall.inotify_add_watch(name:string,fd:long,path_uaddr:long,path:string,mask:long,argstr:string)
-nd_syscall.inotify_init(name:string,argstr:string)
-nd_syscall.inotify_rm_watch(name:string,fd:long,wd:long,argstr:string)
-nd_syscall.io_cancel(name:string,ctx_id:long,iocb_uaddr:long,result_uaddr:long,argstr:string)
-nd_syscall.io_destroy(name:string,ctx:long,argstr:string)
-nd_syscall.io_getevents(name:string,ctx_id:long,min_nr:long,nr:long,events_uaddr:long,timeout_uaddr:long,timestr:string,argstr:string)
-nd_syscall.io_setup(name:string,maxevents:long,ctxp_uaddr:long,argstr:string)
-nd_syscall.io_submit(name:string,ctx_id:long,nr:long,iocbpp_uaddr:long,argstr:string)
-nd_syscall.ioctl(name:string,fd:long,request:long,argp:long,argstr:string)
-nd_syscall.ioperm(name:string,from:long,num:long,turn_on:long,argstr:string)
-nd_syscall.ioprio_get(name:string,which:long,who:long,argstr:string)
-nd_syscall.ioprio_set(name:string,which:long,who:long,ioprio:long,argstr:string)
-nd_syscall.kexec_load(name:string,entry:long,nr_segments:long,segments_uaddr:long,flags:long,argstr:string)
-nd_syscall.keyctl(name:string,argstr:string)
-nd_syscall.kill(name:string,pid:long,sig:long,argstr:string)
-nd_syscall.lchown(name:string,path:string,owner:long,group:long,argstr:string)
-nd_syscall.lchown16(name:string,path:string,owner:long,group:long,argstr:string)
-nd_syscall.lgetxattr(name:string,path:string,name2:string,value_uaddr:long,size:long,argstr:string)
-nd_syscall.link(name:string,oldpath:string,newpath:string,argstr:string)
-nd_syscall.listen(name:string,sockfd:long,backlog:long,argstr:string)
-nd_syscall.listxattr(name:string,path_uaddr:long,path:string,list_uaddr:long,size:long,argstr:string)
-nd_syscall.llistxattr(name:string,path_uaddr:long,path:string,list_uaddr:long,size:long,argstr:string)
-nd_syscall.llseek(name:string,fd:long,offset_high:long,offset_low:long,result_uaddr:long,whence:long,whence_str:string,argstr:string)
-nd_syscall.lookup_dcookie(name:string,cookie:long,buffer_uaddr:long,len:long,argstr:string)
-nd_syscall.lremovexattr(name:string,path_uaddr:long,path:string,name_uaddr:long,name2:string,argstr:string)
-nd_syscall.lseek(name:string,fildes:long,offset:long,whence:long,whence_str:string,argstr:string)
-nd_syscall.lsetxattr(name:string,path_uaddr:long,path:string,name_uaddr:long,name_str:string,value_uaddr:long,size:long,flags:long,argstr:string)
-nd_syscall.lstat(name:string,path:string,buf_uaddr:long,argstr:string)
-nd_syscall.madvise(name:string,start:long,length:long,advice:long,advice_str:string,argstr:string)
-nd_syscall.mbind(name:string,start:long,len:long,mode:long,nmask_uaddr:long,maxnode:long,flags:long,argstr:string)
-nd_syscall.migrate_pages(name:string,argstr:string)
-nd_syscall.mincore(name:string,start:long,length:long,vec_uaddr:long,argstr:string)
-nd_syscall.mkdir(name:string,pathname_uaddr:long,pathname:string,mode:long,argstr:string)
-nd_syscall.mkdirat(name:string,dirfd:long,pathname:string,mode:long,argstr:string)
-nd_syscall.mknod(name:string,pathname:string,mode:long,dev:long,argstr:string)
-nd_syscall.mlock(name:string,addr:long,len:long,argstr:string)
-nd_syscall.mlockall(name:string,flags:long,argstr:string)
-nd_syscall.modify_ldt(name:string,func:long,ptr_uaddr:long,bytecount:long,argstr:string)
-nd_syscall.mount(name:string,source:string,target:string,filesystemtype:string,mountflags:long,mountflags_str:string,data:string,argstr:string)
-nd_syscall.move_pages(name:string,argstr:string)
-nd_syscall.mprotect(name:string,addr:long,len:long,prot:long,prot_str:string,argstr:string)
-nd_syscall.mq_getsetattr(name:string,mqdes:long,u_mqstat_uaddr:long,u_omqstat_uaddr:long,argstr:string)
-nd_syscall.mq_notify(name:string,mqdes:long,notification_uaddr:long,argstr:string)
-nd_syscall.mq_open(name:string,name_uaddr:long,filename:string,mode:long,u_attr_uaddr:long,oflag:long,argstr:string)
-nd_syscall.mq_timedreceive(name:string,mqdes:long,msg_ptr_uaddr:long,msg_len:long,msg_prio_uaddr:long,abs_timout_uaddr:long,argstr:string)
-nd_syscall.mq_timedsend(name:string,mqdes:long,msg_ptr_uaddr:long,msg_len:long,msg_prio:long,abs_timeout_uaddr:long,argstr:string)
-nd_syscall.mq_unlink(name:string,u_name_uaddr:long,u_name:string,argstr:string)
-nd_syscall.mremap(name:string,old_address:long,old_size:long,new_size:long,flags:long,new_address:long,argstr:string)
-nd_syscall.msgctl(name:string,msqid:long,cmd:long,buf_uaddr:long,argstr:string)
-nd_syscall.msgget(name:string,key:long,msgflg:long,msgflg_str:string,argstr:string)
-nd_syscall.msgrcv(name:string,msqid:long,msgp_uaddr:long,msgsz:long,msgtyp:long,msgflg:long,argstr:string)
-nd_syscall.msgsnd(name:string,msqid:long,msgp_uaddr:long,msgsz:long,msgflg:long,argstr:string)
-nd_syscall.msync(name:string,start:long,length:long,flags:long,argstr:string)
-nd_syscall.munlock(name:string,addr:long,len:long,argstr:string)
-nd_syscall.munlockall(name:string,argstr:string)
-nd_syscall.munmap(name:string,start:long,length:long,argstr:string)
-vm.brk(address:long,length:long)
-vm.mmap(address:unknown,length:unknown)
-vm.munmap(address:long,length:long)
-vm.oom_kill(task:long)
-vm.pagefault(write_access:long,address:long)
-vm.write_shared(address:long)
-nfsd.close(filename:string,name:string,argstr:string)
-nfsd.commit(fh:string,count:long,offset:long,flag:long,name:string,argstr:string,size:long,units:string)
-nfsd.create(fh:string,filelen:long,filename:string,type:long,iap_valid:long,iap_mode:long,name:string,argstr:string)
-nfsd.createv3(fh:string,filelen:long,filename:string,iap_valid:long,iap_mode:long,truncp:long,verfier:long,createmode:long,name:string,argstr:string)
-nfsd.dispatch(client_ip:long,proto:long,version:long,xid:long,prog:long,proc:long,name:string,argstr:string)
-nfsd.entries(fh:string,access:long,type:long,name:string,argstr:string)
-nfsd.lookup(fh:string,filelen:long,filename:string,name:string,argstr:string)
-nfsd.open(fh:string,access:long,type:long,name:string,argstr:string)
-nfsd.read(fh:string,file:long,count:long,offset:long,vec:long,vlen:long,name:string,argstr:string,size:long,units:string)
-nfsd.rename(fh:string,tfh:string,filelen:long,filename:string,tlen:long,tname:string,name:string,argstr:string)
-nfsd.return(name:string,retstr:string)
-nfsd.unlink(fh:string,filelen:long,filename:string,type:long,name:string,argstr:string)
-nfsd.write(fh:string,file:long,count:long,offset:long,vec:long,vlen:long,name:string,argstr:string,size:long,units:string)
-process.begin)
-process.create(task:long,new_pid:long)
-process.end)
-process.exec(filename:string)
-process.exec_complete(errno:long,success:long)
-process.exit(code:long)
-process.release(task:long,pid:long)
-process.start)
-process.syscall)
-sunrpc.entry(name:string,progname:string,prog:long,vers:long,authflavor:long,servername:string,prot:long,port:long,argstr:string)
-sunrpc.return(name:string,retstr:string)
-scheduler.balance)
-scheduler.cpu_off(task_prev:unknown,task_next:unknown,idle:long)
-scheduler.cpu_on(task_prev:long,idle:long)
-scheduler.ctxswitch(prev_pid:unknown,next_pid:unknown,prev_task:unknown,next_task:unknown,prevtsk_state:unknown)
-scheduler.migrate(task:long,cpu_from:long,cpu_to:long)
-scheduler.tick(idle:long)
-scsi.iocompleted(host_no:long,channel:long,lun:long,dev_id:long,device_state:long,data_direction:long,req_addr:long,goodbytes:long)
-scsi.iodispatching(host_no:long,channel:long,lun:long,dev_id:long,device_state:long,data_direction:long,request_buffer:long,request_bufflen:long,req_addr:long)
-scsi.iodone(host_no:long,channel:long,lun:long,dev_id:long,device_state:long,data_direction:long,req_addr:long,scsi_timer_pending:long)
-scsi.ioentry(disk_major:long,disk_minor:long,device_state:long,req_addr:long)
-socket.aio_read(name:string,_sock:long,size:long,protocol:long,family:long,state:long,flags:long,type:long)
-socket.aio_write(name:string,_sock:long,size:long,protocol:long,family:long,state:long,flags:long,type:long)
-socket.close(name:string,protocol:long,family:long,state:long,flags:long,type:long)
-socket.create(name:string,protocol:long,family:long,type:long,requester:long)
-socket.receive(_dwarf_tvar_tid:long,_dwarf_tvar_sock_16_tmp:long,_dwarf_tvar_sock_17_tmp:long,_dwarf_tvar_sock_18_tmp:long,_dwarf_tvar_sock_19_tmp:long,_dwarf_tvar_sock_20_tmp:long,name:string,size:long,protocol:long,family:long,state:long,flags:long,type:long,success:long)
-socket.recvmsg(name:string,size:long,protocol:long,family:long,state:long,flags:long,type:long)
-socket.send(_dwarf_tvar_tid:long,_dwarf_tvar_sock_32_tmp:long,_dwarf_tvar_sock_33_tmp:long,_dwarf_tvar_sock_34_tmp:long,_dwarf_tvar_sock_35_tmp:long,_dwarf_tvar_sock_36_tmp:long,name:string,size:long,protocol:long,family:long,state:long,flags:long,type:long,success:long)
-socket.sendmsg(name:string,size:long,protocol:long,family:long,state:long,flags:long,type:long)
-kernel.function("sock_recvmsg@net/socket.c:649")(_dwarf_tvar_tid:long)
-kernel.function("sock_aio_read@net/socket.c:750")(_dwarf_tvar_tid:long)
-kernel.function("sock_sendmsg@net/socket.c:566")(_dwarf_tvar_tid:long)
-kernel.function("sock_aio_write@net/socket.c:792")(_dwarf_tvar_tid:long)
-begin(-1001)(num:long)
-end(idx0:string)
-tcp.disconnect(name:string,sock:long,flags:long)
-tcp.recvmsg(name:string,sock:long,size:long)
-tcp.sendmsg(name:string,sock:long,size:long)
-tcp.setsockopt(name:string,sock:long,level:long,optname:long,optstr:string,optlen:long)
-udp.disconnect(name:string,sock:long,flags:long)
-udp.recvmsg(name:string,sock:long,size:long)
-udp.sendmsg(name:string,sock:long,size:long)
-generic.fop.aio_read(file:long,dev:long,devname:string,ino:long,pos:long,count:long,buf:long,name:string,argstr:string,size:long,units:string)
-generic.fop.aio_write(file:long,dev:long,devname:string,ino:long,pos:long,count:long,buf:long,name:string,argstr:string,size:long,units:string)
-generic.fop.llseek(dev:long,devname:string,ino:long,file:long,offset:long,origin:long,maxbyte:long,name:string,argstr:string)
-generic.fop.mmap(file:long,dev:long,devname:string,ino:long,vm_start:long,vm_end:long,vm_flags:long,name:string,argstr:string)
-generic.fop.open(dev:long,devname:string,ino:long,filename:string,flag:long,size:long,name:string,argstr:string)
-generic.fop.splice_read(dev:long,devname:string,ino:long,file:long,len:long,flags:long,name:string,argstr:string,size:long,units:string)
-generic.fop.splice_write(dev:long,devname:string,ino:long,file:long,len:long,flags:long,name:string,argstr:string,size:long,units:string)
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/plugin.properties
deleted file mode 100644
index 831b7ded97..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-#################################################################################
-# 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=Systemtap Editor Plug-in (Incubation)
-provider=Eclipse.org \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/plugin.xml
deleted file mode 100644
index c5bc07e623..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/plugin.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
-
- <extension
- point="org.eclipse.ui.editors">
- <editor
- name="Systemtap Editor"
- extensions="stp"
- icon="icons/sample.gif"
- contributorClass="org.eclipse.ui.texteditor.BasicTextEditorActionContributor"
- class="org.eclipse.linuxtools.systemtap.backup.ui.editor.SystemtapEditor"
- id="org.eclipse.linuxtools.systemtap.backup.ui.editor.SystemtapEditor">
- </editor>
- </extension>
-</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/ChangeLog
deleted file mode 100644
index 59d9abdd32..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/ChangeLog
+++ /dev/null
@@ -1,21 +0,0 @@
-2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * src/org/eclipse/linuxtools/systemtap/backup/ui/editor/ColorManager.java: New file.
- * src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPColorConstants.java: New file.
- * src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPCompletionProcessor.java: New file.
- * src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPConfiguration.java: New file.
- * src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPDocumentProvider.java: New file.
- * src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPElementScanner.java: New file.
- * src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPMetadataSingleton.java: New file.
- * src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPPartitioner.java: New file.
- * src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPPartitionScanner.java: New file.
- * src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPReconcilingStrategy.java: New file.
- * src/org/eclipse/linuxtools/systemtap/backup/ui/editor/strings.properties: New file.
- * src/org/eclipse/linuxtools/systemtap/backup/ui/editor/SystemtapEditor.java: New file.
- * src/org/eclipse/linuxtools/systemtap/backup/ui/editor/activator/Activator.java:
-
-2009-01-09 Phil Muldoon <pmuldoon@redhat.com>
-
- * SystemtapEditor.java (getCompletionURL): New.
- (buildCompletionDataLocation): New.
- (SystemtapEditor): Use buildCompletionDataLocation. \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/ColorManager.java b/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/ColorManager.java
deleted file mode 100644
index c7a1807ea2..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/ColorManager.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.backup.ui.editor;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-
-public class ColorManager {
-
- protected Map<RGB, Color> colorTable = new HashMap<RGB, Color>(10);
-
- public void dispose() {
- Iterator<Color> e = colorTable.values().iterator();
- while (e.hasNext())
- e.next().dispose();
- }
-
- public Color getColor(RGB rgb) {
- Color color = colorTable.get(rgb);
- if (color == null) {
- color = new Color(Display.getCurrent(), rgb);
- colorTable.put(rgb, color);
- }
- return color;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPColorConstants.java b/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPColorConstants.java
deleted file mode 100644
index bec1008802..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPColorConstants.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.backup.ui.editor;
-
-import org.eclipse.swt.graphics.RGB;
-
-public interface STPColorConstants {
- RGB KEYWORD = new RGB(127, 0, 85);
- RGB COMMENT = new RGB(63, 127, 95);
- RGB STP_STRING = new RGB(0, 0, 255);
- RGB DEFAULT = new RGB(0, 0, 0);
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPCompletionProcessor.java b/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPCompletionProcessor.java
deleted file mode 100644
index 0b0ffa62ff..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPCompletionProcessor.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.backup.ui.editor;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.jface.text.contentassist.IContextInformationValidator;
-
-class STPCompletionProcessor implements IContentAssistProcessor {
-
- private final IContextInformation[] NO_CONTEXTS = new IContextInformation[0];
- private final char[] PROPOSAL_ACTIVATION_CHARS = new char[] { '.' };
- private ICompletionProposal[] NO_COMPLETIONS = new ICompletionProposal[0];
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int)
- */
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer,
- int offset) {
-
- IDocument document = viewer.getDocument();
-
- String prefix;
- int locationOffset =0;
-
- // Get completion hint from document
- try {
- prefix = completionWord(document, offset);
- locationOffset = completionReplaceWordLocation(document, offset);
- } catch (Exception e) {
- return NO_COMPLETIONS;
- }
-
- // If cannot find a place to replace our partial typed completion
- // with the full one, abort with no completions.
- if (locationOffset < 0)
- return NO_COMPLETIONS;
-
- String[] completionData = STPMetadataSingleton
- .getCompletionResults(prefix);
-
- // If cannot find any completions
- // abort with no completions.
- if (completionData.length < 1)
- return NO_COMPLETIONS;
-
- // Build proposals and submit
- ICompletionProposal[] result = new ICompletionProposal[completionData.length];
- for (int i = 0; i < completionData.length; i++)
- result[i] = new CompletionProposal(
- completionData[i].substring(offset - locationOffset),
- offset, 0, completionData[i].length(), null,
- completionData[i], null, null);
- return result;
- }
-
- /**
- *
- * Compute location of completion proposal insertion.
- *
- * @param doc - document to insert completion.
- * @param offset - offset of where completion hint was first generated.
- * @return - offset into document for completion proposal insertion.
- * @throws BadLocationException
- *
- */
- private int completionReplaceWordLocation(IDocument doc, int offset)
- throws BadLocationException {
- try {
- for (int n = offset-1; n >= 0; n--) {
- if (doc.getChar(n) == '.')
- return n+1;
- }
- } catch (BadLocationException e) {
- throw e;
- }
-
- return -1;
- }
-
- /**
- *
- * Return the word the user wants to submit for completion proposals.
- *
- * @param doc - document to insert completion.
- * @param offset - offset of where completion hint was first generated.
- * @return - word to generate completion proposals.
- *
- * @throws BadLocationException
- */
- private String completionWord(IDocument doc, int offset)
- throws BadLocationException {
- try {
- for (int n = offset - 1; n >= 0; n--) {
- char c = doc.getChar(n);
- if ((Character.isSpaceChar(c)) || (c == '\n') || (c == '\0')) {
- String word = doc.get(n + 1, offset - n - 1);
- if (word.charAt(word.length() - 1) == '.')
- return word.substring(0, word.length() - 1);
- else
- return word;
- }
- }
- } catch (BadLocationException e) {
- throw e;
- }
- return "";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeContextInformation(org.eclipse.jface.text.ITextViewer, int)
- */
- public IContextInformation[] computeContextInformation(ITextViewer viewer,
- int offset) {
- return NO_CONTEXTS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
- */
- public char[] getCompletionProposalAutoActivationCharacters() {
- return PROPOSAL_ACTIVATION_CHARS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationAutoActivationCharacters()
- */
- public char[] getContextInformationAutoActivationCharacters() {
- return PROPOSAL_ACTIVATION_CHARS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationValidator()
- */
- public IContextInformationValidator getContextInformationValidator() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getErrorMessage()
- */
- public String getErrorMessage() {
- // TODO: When does this trigger?
- return "Error.";
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPConfiguration.java b/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPConfiguration.java
deleted file mode 100644
index 215c1e3ac1..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPConfiguration.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.backup.ui.editor;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.contentassist.ContentAssistant;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.contentassist.IContentAssistant;
-import org.eclipse.jface.text.presentation.IPresentationReconciler;
-import org.eclipse.jface.text.presentation.PresentationReconciler;
-import org.eclipse.jface.text.reconciler.IReconciler;
-import org.eclipse.jface.text.reconciler.MonoReconciler;
-import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-
-public class STPConfiguration extends SourceViewerConfiguration {
-
- private STPElementScanner scanner;
- private ColorManager colorManager;
- private SystemtapEditor editor;
-
- public STPConfiguration(ColorManager colorManager, SystemtapEditor editor) {
- this.colorManager = colorManager;
- this.editor = editor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getConfiguredContentTypes(org.eclipse.jface.text.source.ISourceViewer)
- */
- @Override
- public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
- return new String[] {
- IDocument.DEFAULT_CONTENT_TYPE,
- STPPartitionScanner. STP_COMMENT,
- STPPartitionScanner.STP_STRING};
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getContentAssistant(org.eclipse.jface.text.source.ISourceViewer)
- */
- @Override
- public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
- ContentAssistant assistant = new ContentAssistant();
-
- assistant.enableAutoActivation(true);
- assistant.setAutoActivationDelay(500);
- assistant.setProposalPopupOrientation(IContentAssistant.PROPOSAL_OVERLAY);
- assistant
- .setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE);
- IContentAssistProcessor processor = new STPCompletionProcessor();
- assistant.setContentAssistProcessor(processor,IDocument.DEFAULT_CONTENT_TYPE);
- assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
- return assistant;
- }
-
- /**
- * Return the default Element scanner.
- *
- * @return default element scanner.
- */
- protected STPElementScanner getSTPScanner() {
- if (scanner == null) {
- scanner = new STPElementScanner(colorManager);
- scanner.setDefaultReturnToken(new Token(new TextAttribute(
- colorManager.getColor(STPColorConstants.DEFAULT))));
- }
- return scanner;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getReconciler(org.eclipse.jface.text.source.ISourceViewer)
- *
- * Return the reconciler built on the custom Systemtap reconciling strategy that enables code folding for this editor.
- */
- @Override
- public IReconciler getReconciler(ISourceViewer sourceViewer)
- {
- STPReconcilingStrategy strategy = new STPReconcilingStrategy();
- strategy.setEditor(editor);
- MonoReconciler reconciler = new MonoReconciler(strategy,false);
- return reconciler;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getPresentationReconciler(org.eclipse.jface.text.source.ISourceViewer)
- */
- @Override
- public IPresentationReconciler getPresentationReconciler(
- ISourceViewer sourceViewer) {
-
- PresentationReconciler reconciler = new PresentationReconciler();
-
- DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getSTPScanner());
- reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
- reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
-
- dr = new DefaultDamagerRepairer(getSTPScanner());
- reconciler.setDamager(dr, STPPartitionScanner.STP_COMMENT);
- reconciler.setRepairer(dr, STPPartitionScanner.STP_COMMENT);
-
- dr = new DefaultDamagerRepairer(getSTPScanner());
- reconciler.setDamager(dr, STPPartitionScanner.STP_STRING);
- reconciler.setRepairer(dr, STPPartitionScanner.STP_STRING);
-
- dr = new DefaultDamagerRepairer(getSTPScanner());
- reconciler.setDamager(dr, STPPartitionScanner.STP_KEYWORD);
- reconciler.setRepairer(dr, STPPartitionScanner.STP_KEYWORD);
-
- dr = new DefaultDamagerRepairer(getSTPScanner());
- reconciler.setDamager(dr, STPPartitionScanner.STP_CONDITIONAL);
- reconciler.setRepairer(dr, STPPartitionScanner.STP_CONDITIONAL);
-
- return reconciler;
- }
-
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPDocumentProvider.java b/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPDocumentProvider.java
deleted file mode 100644
index 523625310c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPDocumentProvider.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.backup.ui.editor;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.ui.editors.text.TextFileDocumentProvider;
-
-public class STPDocumentProvider extends TextFileDocumentProvider {
- private IDocument document;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.editors.text.TextFileDocumentProvider#getDocument(java.lang.Object)
- */
- @Override
- public IDocument getDocument(Object element) {
- document = super.getDocument(element);
- if (document != null) {
- STPPartitioner partitioner = new STPPartitioner(
- new STPPartitionScanner(),
- STPPartitionScanner.STP_PARTITION_TYPES);
-
- partitioner.connect(document, false);
- if (document.getDocumentPartitioner() == null)
- document.setDocumentPartitioner(partitioner);
- }
- return document;
- }
-
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPElementScanner.java b/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPElementScanner.java
deleted file mode 100644
index e076cc9800..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPElementScanner.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.backup.ui.editor;
-
-
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.rules.BufferedRuleBasedScanner;
-import org.eclipse.jface.text.rules.EndOfLineRule;
-import org.eclipse.jface.text.rules.IRule;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.IWhitespaceDetector;
-import org.eclipse.jface.text.rules.IWordDetector;
-import org.eclipse.jface.text.rules.MultiLineRule;
-import org.eclipse.jface.text.rules.SingleLineRule;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.rules.WhitespaceRule;
-import org.eclipse.jface.text.rules.WordRule;
-import org.eclipse.swt.SWT;
-
-public class STPElementScanner extends BufferedRuleBasedScanner {
-
- private String[] keywordList= {"probe", "for", "else", "foreach", "exit", "printf", "in", "return",
- "break", "global", "next", "while", "if", "delete", "#include", "function", "do",
- "print", "error","log", "printd", "printdln", "println", "sprint", "sprintf", "system", "warn"};
-
-
-// TODO: Not sure if we want these keywords or not. Defer for now.
-// "backtrace", "caller", "caller_addr", "cpu", "egid", "euid", "execname", "gid", "is_return",
-// "pexecname", "pid", "ppid", "tid", "uid", "print_backtrace", "print_regs", "print_stack",
-// "stack_size", "stack_unused", "stack_used", "stp_pid", "target"};
-
- /**
- *
- * Build Element scanner for Syntax Highlighting for Systemtap Editor
- *
- * @param manager ColorManager to source highlighting.
- *
- */
- public STPElementScanner(ColorManager manager) {
- IToken defaultToken = new Token(new TextAttribute(manager
- .getColor(STPColorConstants.DEFAULT)));
-
- IToken keywordToken = new Token(new TextAttribute(manager
- .getColor(STPColorConstants.KEYWORD),null,SWT.BOLD));
-
- IToken commentToken = new Token(new TextAttribute(manager
- .getColor(STPColorConstants.COMMENT)));
-
- IToken stringToken = new Token(new TextAttribute(manager
- .getColor(STPColorConstants.STP_STRING)));
-
-
- // Build keyword scanner
- WordRule keywordsRule = new WordRule(new IWordDetector() {
-
- public boolean isWordStart(char c) {
- // probe kernel.function("schedule") is a valid name in
- // Systemtap, but we do not want to highlight the function
- // here as a keyword. Same with foo.return and so on.
- if (c == '.') {
- return true;
- }
-
- return Character.isJavaIdentifierStart(c);
- }
-
- public boolean isWordPart(char c) {
- // Set isWordStart for . rule.
- if (c == '.') {
- return true;
- }
-
- return Character.isJavaIdentifierPart(c);
- }
-
- }, defaultToken, true);
-
- for (int i=0; i<keywordList.length; i++)
- keywordsRule.addWord(keywordList[i], keywordToken);
-
- setRules(new IRule[] {
- new MultiLineRule("/*", "*/", commentToken),
- new EndOfLineRule("/*", commentToken),
- new EndOfLineRule("#", commentToken),
- new EndOfLineRule("//", commentToken),
- new EndOfLineRule("#if", defaultToken),
- new EndOfLineRule("#else", defaultToken),
- new EndOfLineRule("#endif", defaultToken),
- new EndOfLineRule("#define", defaultToken),
- new SingleLineRule("\"", "\"", stringToken, '\\'),
- new SingleLineRule("'", "'", stringToken, '\\'),
- keywordsRule,
- new WhitespaceRule(new IWhitespaceDetector() {
- public boolean isWhitespace(char c) {
- return Character.isWhitespace(c);
- }
- }),
- });
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPMetadataSingleton.java b/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPMetadataSingleton.java
deleted file mode 100644
index fd57195d06..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPMetadataSingleton.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.backup.ui.editor;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.PrintStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.ResourceBundle;
-
-/**
- *
- * Build and hold completion metadata fo Systemtap. This originally is generated from stap coverage data
- *
- *
- */
-
-// TODO: Generate a strategy to determine when meta-data is older than what is currently available. Right now
-// the generation of new meta-data is too slow to do this efficiently.
-public class STPMetadataSingleton {
-
-
- private static STPMetadataSingleton instance = null;
- private static HashMap<String, ArrayList<String>> builtMetadata = new HashMap<String, ArrayList<String>>();
-
- private static boolean barLookups = false;
-
- // Not a true singleton, but enough for the simplistic purpose
- // it has to serve.
- protected STPMetadataSingleton() {
- }
-
- public static STPMetadataSingleton getInstance() {
- if (instance == null) {
- instance = new STPMetadataSingleton();
- }
- return instance;
- }
-
- /**
- * Given the parameter return the completion proposals that best match the data.
- *
- * @param match - completion hint.
- *
- * @return - completion proposals.
- *
- */
- public static String[] getCompletionResults(String match) {
-
- ArrayList<String> data = new ArrayList<String>();
-
- // TODO: Until an error strategy is devised to better inform
- // the user that there was a problem compiling completions other than
- // a modal error dialog, or a log message use this.
- if (barLookups)
- return new String[] {"No completion data found."};
-
- // Check to see if the proposal hint included a <tapset>.<partialprobe>
- // or just a <probe>. (ie syscall. or syscall.re).
- boolean tapsetAndProbeIncluded = isTapsetAndProbe(match);
-
- // If the result is a tapset and partial probe, get the tapset, then
- /// narrow down the list with partial probe matches.
- if (tapsetAndProbeIncluded) {
- ArrayList<String> temp = builtMetadata.get(getTapset(match));
- String probe = getTapsetProbe(match);
- for (int i=0; i<temp.size(); i++) {
- if (temp.get(i).startsWith(probe)) {
- data.add(temp.get(i));
- }
- }
- }
- // If the result was a <tapset>, return all <probe> matches.
- else
- data = builtMetadata.get(match);
-
- if (data == null)
- return new String[] {};
- else
- return data.toArray(new String[0]);
- }
-
- /**
- *
- * From the file, read the metadata. The data follows the format of
- *
- * <tapset>.<probe>(<parameter list>)
- *
- * ie
- *
- * tcp.disconnect(name:string,sock:long,flags:long)
- * @param fileURL
-
- * @throws IOException
- *
- */
- private void readCompletionMetadata(URL fileURL) throws IOException {
- try {
- BufferedReader input = new BufferedReader(new FileReader(new File(fileURL.getFile())));
- try {
- String line = null;
- while ((line = input.readLine()) != null) {
- String tapset = "";
- String probe = "";
- try {
- tapset = getTapset(line);
- probe = getTapsetProbe(line);
- } catch (Exception e) {
- continue;
- }
- ArrayList<String> data = builtMetadata.get(tapset);
- if (data == null)
- data = new ArrayList<String>();
-
- data.add(probe);
- builtMetadata.put(tapset, data);
- }
- } finally {
- input.close();
- }
- } catch (IOException ex) {
- throw ex;
- }
- }
-
- /**
- * Given data, decide whether it is comprised of a <tapset>.<probe>
- * hint, or just a <tapset>.
- *
- * @param data - hint data
- * @return
- */
- private static boolean isTapsetAndProbe(String data) {
- if (data.indexOf('.') >= 0)
- return true;
-
- return false;
- }
-
- /**
- * Given data, extract <tapset>
- *
- * @param data - hint data
- * @return
- */
- private static String getTapset(String data) {
- int i = data.indexOf('.');
- if (i < 0)
- throw new StringIndexOutOfBoundsException();
- return data.substring(0, data.indexOf('.'));
- }
-
- /**
- * Given data, extract <probe>
- *
- * @param data - hint data
- * @return
- */
- private static String getTapsetProbe(String data) {
- int i = data.indexOf('.');
- if (i < 0)
- throw new StringIndexOutOfBoundsException();
- return data.substring(data.indexOf('.') + 1, data.length());
- }
-
- /**
- *
- * Decide whether cached metadata exists on disk.
- *
- * @return - whether metadata exists.
- */
- private boolean haveMetadata(String location) {
- File fileExists = new File(location);
- if ((fileExists.canRead()) && fileExists.exists())
- return true;
-
- return false;
- }
-
- /**
- *
- * Build the metadata from visiting the tapsets in turn and
- * requesting coverage data from each one.
- *
- * @throws FileNotFoundException
- *
- */
- private void buildCompletionMetadata(String location) throws FileNotFoundException {
- String[] tapsets = { "syscall", "signal", "netdev", "ioblock",
- "ioscheduler", "nd_syscall", "vm", "nfsd", "process", "sunrpc",
- "scheduler", "scsi", "socket", "tcp", "udp", "generic.fop" };
- ArrayList<StringBuffer> processedMetadata = new ArrayList<StringBuffer>();
- boolean openingBracket = false;
-
- // Execute each tapset, then convert the output from stdin
- // to a format more acceptable to completion.
- for (int i = 0; i < tapsets.length; i++) {
- StringBuffer[] data = executeSystemTap(tapsets[i]);
- for (int z = 0; z < data.length; z++) {
- openingBracket = false;
- for (int c = 0; c < data[z].length(); c++) {
- if (data[z].charAt(c) == ' ')
- if (openingBracket == false) {
- openingBracket = true;
- data[z].setCharAt(c, '(');
- } else {
- data[z].setCharAt(c, ',');
- }
- }
- data[z].append(')');
- processedMetadata.add(data[z]);
- }
-
- }
-
- // Output massaged data from stdout to a text file.
- PrintStream out = null;
- try {
- out = new PrintStream(new FileOutputStream(location));
- } catch (FileNotFoundException e) {
- throw e;
- }
- Iterator<StringBuffer> i = processedMetadata.iterator();
- while (i.hasNext()) {
- StringBuffer line = i.next();
- out.println(line.toString().trim());
- }
- out.close();
- }
-
- /**
- *
- * Execute Systemtap binary, cpature stdout and return.
- *
- * @param tapset to request coverage data from.
- * @return
- */
-
- // TODO: This could stand to be completely rewritten to be safer,
- // and be tolerant of faults. As it is we ship default meta-data
- // so this should never be executed in the user context. But eventually
- // an option will be made available to the user to regenerate the data.
- private StringBuffer[] executeSystemTap(String tapset) {
-
- ArrayList<StringBuffer> data = new ArrayList<StringBuffer>();
-
- try {
- String a;
- Process p = Runtime.getRuntime().exec(
- "stap -L " + tapset + ".*");
- BufferedReader in = new BufferedReader(new InputStreamReader(p
- .getInputStream()), 5000);
- while ((a = in.readLine()) != null) {
- data.add(new StringBuffer(a));
- }
- p.waitFor();
- in.close();
- } catch (IOException e) {
- return new StringBuffer[] {};
- }
-
- catch (java.lang.InterruptedException ie) {
- return new StringBuffer[] {};
- }
-
- return data.toArray(new StringBuffer[0]);
- }
-
- public void parse(ResourceBundle bundle) {
- System.out.println(System.getProperty("user.pwd"));
-
- System.out.println(System.getProperties());
- System.out.println(bundle.containsKey("syscall"));
- System.out.println(bundle.containsKey("syscall."));
- System.out.println(bundle.getKeys());
- }
-
- public void build(URL fileURL) {
- try {
-// if (!haveMetadata(location))
-// buildCompletionMetadata(location);
- readCompletionMetadata(fileURL);
- } catch (IOException e) {
- barLookups = true;
- }
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPPartitionScanner.java b/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPPartitionScanner.java
deleted file mode 100644
index c344cf1268..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPPartitionScanner.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.backup.ui.editor;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.rules.EndOfLineRule;
-import org.eclipse.jface.text.rules.ICharacterScanner;
-import org.eclipse.jface.text.rules.IPredicateRule;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.IWordDetector;
-import org.eclipse.jface.text.rules.MultiLineRule;
-import org.eclipse.jface.text.rules.RuleBasedPartitionScanner;
-import org.eclipse.jface.text.rules.SingleLineRule;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.rules.WordRule;
-
-public class STPPartitionScanner extends RuleBasedPartitionScanner {
- public final static String STP_COMMENT = "__stp_comment";
- public final static String STP_KEYWORD = "__stp_keyword";
- public final static String STP_STRING = "__stp_string";
- public final static String STP_CONDITIONAL = "__stp_conditional";
-
- public static String[] STP_PARTITION_TYPES = { IDocument.DEFAULT_CONTENT_TYPE,
- STP_COMMENT, STP_KEYWORD, STP_STRING, STP_CONDITIONAL};
-
- /**
- * Detect empty comments
- */
- static class EmptyCommentDetector implements IWordDetector {
- public boolean isWordStart(char c) {
- return (c == '/');
- }
-
- public boolean isWordPart(char c) {
- return (c == '*' || c == '/');
- }
- }
-
- /**
- * Cope with the empty comment issue.
- */
- static class EmptyCommentRule extends WordRule implements IPredicateRule {
-
- private IToken fSuccessToken;
-
- public EmptyCommentRule(IToken successToken) {
- super(new EmptyCommentDetector());
- fSuccessToken= successToken;
- addWord("/**/", fSuccessToken); //$NON-NLS-1$
- }
-
- public IToken evaluate(ICharacterScanner scanner, boolean resume) {
- return evaluate(scanner);
- }
-
- public IToken getSuccessToken() {
- return fSuccessToken;
- }
- }
-
- public STPPartitionScanner() {
-
- IToken stpComment = new Token(STP_COMMENT);
- IToken stpString = new Token(STP_STRING);
- IToken stpConditional = new Token(STP_CONDITIONAL);
-
- // Add special case word rule.
- EmptyCommentRule emptyCommentRule= new EmptyCommentRule(stpComment);
-
- setPredicateRules(new IPredicateRule[] {
- new MultiLineRule("/*", "*/", stpComment),
- new EndOfLineRule("/*", stpComment),
- new EndOfLineRule("#", stpComment),
- new EndOfLineRule("//", stpComment),
- emptyCommentRule,
- new EndOfLineRule("#if", stpConditional),
- new EndOfLineRule("#else", stpConditional),
- new EndOfLineRule("#endif", stpConditional),
- new EndOfLineRule("#define", stpConditional),
- new SingleLineRule("\"", "\"", stpString, '\\'),
- new SingleLineRule("'", "'", stpString, '\\'),
- });
-
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPPartitioner.java b/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPPartitioner.java
deleted file mode 100644
index 1e637fbbe5..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPPartitioner.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.systemtap.backup.ui.editor;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITypedRegion;
-import org.eclipse.jface.text.rules.FastPartitioner;
-import org.eclipse.jface.text.rules.IPartitionTokenScanner;
-
-public class STPPartitioner extends FastPartitioner {
-
- /**
- * Straight forward FastPartitioner, with debug output.
- *
- * Taken directly from org.eclipse.linuxtools.rpm.ui.editor.SpecFilePartitioner.
- * No noteworthy alterations so Copyright header and license text untouched.
- *
- * @param scanner
- * @param legalContentTypes
- */
- public STPPartitioner(IPartitionTokenScanner scanner, String[] legalContentTypes) {
- super(scanner, legalContentTypes);
- }
-
- @Override
- public void connect(IDocument document, boolean delayInitialization) {
- super.connect(document, delayInitialization);
-// printPartitions(document);
- }
-
- public void printPartitions(IDocument document) {
- StringBuffer buffer = new StringBuffer();
- ITypedRegion[] partitions = computePartitioning(0, document.getLength());
- for (int i = 0; i < partitions.length; i++) {
- try {
- buffer.append("Partition type: "
- + partitions[i].getType()
- + ", offset: " + partitions[i].getOffset()
- + ", length: " + partitions[i].getLength());
- buffer.append("\n");
- buffer.append("Text:\n");
- buffer.append(document.get(partitions[i].getOffset(),
- partitions[i].getLength()));
- buffer.append("\n---------------------------------------\n\n\n");
- } catch (org.eclipse.jface.text.BadLocationException e) {
- e.printStackTrace();
- }
- }
- System.out.println(buffer);
- };
-
-}
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPReconcilingStrategy.java b/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPReconcilingStrategy.java
deleted file mode 100644
index a245cf769b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/STPReconcilingStrategy.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.backup.ui.editor;
-
-import java.util.ArrayList;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.reconciler.DirtyRegion;
-import org.eclipse.jface.text.reconciler.IReconcilingStrategy;
-import org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension;
-import org.eclipse.swt.widgets.Display;
-
-/**
- *
- * Reconciling strategy for Systemtap editor code folding positions. The positional aspects
- * of document tag discovery should really be placed with a position builder
- *
- */
-public class STPReconcilingStrategy implements IReconcilingStrategy,
- IReconcilingStrategyExtension {
-
- // Constants
- protected static final int STP_NO_TAG = 0;
- protected static final int STP_MULTILINE_COMMENT_TAG = 1;
- protected static final int STP_PROBE = 2;
- protected static final int STP_FUNCTION = 3;
-
- // Next Character Position
- protected int nextCharPosition = 0;
-
- // Current tag start
- protected int currentTagStart = 0;
-
- // Current tag end
- protected int currentTagEnd = 0;
-
- // List of positions
- protected final ArrayList<Position> documentPositionList = new ArrayList<Position>();
-
- // The end offset of the range to be scanned *//*
- protected int endOfDocumentPostion;
-
- private IDocument currentDocument;
- private SystemtapEditor currentEditor;
-
- /**
- * Sets the current editor.
- */
- public void setEditor(SystemtapEditor editor) {
- this.currentEditor = editor;
- }
-
- /**
- * Sets the current (ie working) document.
- */
- public void setDocument(IDocument document) {
- this.currentDocument = document;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.reconciler.IReconcilingStrategy#reconcile(org.eclipse.jface.text.IRegion)
- */
- public void reconcile(IRegion partition) {
- // Just rebuild the whole document
- initialReconcile();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.reconciler.IReconcilingStrategy#reconcile(org.eclipse.jface.text.reconciler.DirtyRegion, org.eclipse.jface.text.IRegion)
- */
- public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
- //Just rebuild the whole document
- initialReconcile();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension#initialReconcile()
- */
- public void initialReconcile() {
- endOfDocumentPostion = currentDocument.getLength();
- try {
- calculatePositions();
- } catch (BadLocationException e) {
- // Cannot reconcile, return
- return;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension#setProgressMonitor(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void setProgressMonitor(IProgressMonitor monitor) {
-
- }
-
- /**
- *
- * From currentDocument, calculate beginning of document
- * to endOfDocumentPostion to build positions for code folding.
- *
- * @throws BadLocationException
- */
- private void calculatePositions() throws BadLocationException {
- // Clear old positions and reset to beginning of document
- documentPositionList.clear();
- nextCharPosition = 0;
-
- // Build the actual document positions
- buildPositions();
-
- // Paint the folding annotations in the background.
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- currentEditor.updateFoldingStructure(documentPositionList);
- }
- });
- }
-
- /**
- *
- * Start trying to guess if given char z, what - if any - tag this
- * begins.
- *
- * @param location - location of current position
- * @return - tag type, if any
- *
- * @throws BadLocationException
- */
- private int classifyComponent(int location) throws BadLocationException {
- int deltaLocation = location;
- char ch = currentDocument.getChar(deltaLocation);
- switch (ch) {
- // The 'comment' case.
- case '/':
- deltaLocation++;
- ch = currentDocument.getChar(deltaLocation);
- if (ch == '*') {
- currentTagStart = location;
- deltaLocation++;
- nextCharPosition = deltaLocation;
- return STP_MULTILINE_COMMENT_TAG;
- }
- break;
- // The 'probe' case.
- case 'p':
- if (isProbe()) {
- currentTagStart = location;
- return STP_PROBE;
- }
-
- // The 'function' case.
- case 'f':
- if (isFunction()) {
- currentTagStart = location;
- return STP_FUNCTION;
- }
- // No tag, don't fold region.
- default:
- break;
- }
- return STP_NO_TAG;
- }
-
- /**
- *
- * Build a list of locations to mark beginning and end of folding regions.
- *
- * @throws BadLocationException
- */
- private void buildPositions() throws BadLocationException {
- while (nextCharPosition < endOfDocumentPostion) {
- switch (classifyComponent(nextCharPosition))
- {
- // All of these cases have found the beginning of a tag
- // to start folding. Each element must now be find
- // the end of the region it represents.
- case STP_MULTILINE_COMMENT_TAG:
- currentTagEnd = findEndOfComment();
- writePosition(currentTagStart,currentTagEnd);
- nextCharPosition = currentTagStart + currentTagEnd;
- break;
- case STP_PROBE:
- case STP_FUNCTION:
- currentTagEnd = findEndOfProbeOrFunction();
- writePosition(currentTagStart,currentTagEnd);
- nextCharPosition = currentTagStart + currentTagEnd;
- break;
- default:
- nextCharPosition++;
- break;
- }
- }
- }
-
- /**
- *
- * Write a Position to the position list.
- *
- * @param startOffset - start of position in the document.
- * @param length - length of position.
- *
- */
- protected void writePosition(int startOffset, int length) {
- if (length > 0)
- documentPositionList.add(new Position(startOffset, length));
- }
-
- private boolean isProbe() throws BadLocationException {
- return matchKeyWord("probe");
- }
-
- private boolean isFunction() throws BadLocationException {
- return matchKeyWord("function");
- }
-
- private boolean matchKeyWord(String word) throws BadLocationException {
- StringBuffer keyWord = new StringBuffer();
- int location = nextCharPosition;
- while (location < endOfDocumentPostion) {
- char ch = currentDocument.getChar(location);
- if ((ch == ' ') || (!Character.isLetter(ch)))
- break;
- else
- keyWord.append(ch);
- location++;
- }
- if (keyWord.toString().compareTo(word) == 0)
- return true;
- return false;
- }
-
- private int findEndOfProbeOrFunction() throws BadLocationException {
- int bracketCount = 0;
- boolean firstBracket = false;
- char ch;
-
- while (nextCharPosition < endOfDocumentPostion) {
- ch = currentDocument.getChar(nextCharPosition);
- if (ch == '{') {
- firstBracket = true;
- bracketCount++;
- }
- if (ch == '}')
- bracketCount--;
- if ((bracketCount == 0) && (firstBracket))
- return (nextCharPosition-currentTagStart)+2;
- nextCharPosition++;
- }
- return -1;
- }
-
- private int findEndOfComment() throws BadLocationException {
- while (nextCharPosition < endOfDocumentPostion) {
- char ch = currentDocument.getChar(nextCharPosition);
- if (ch == '*') {
- nextCharPosition++;
- ch = currentDocument.getChar(nextCharPosition);
- if (ch == '/')
- return (nextCharPosition-currentTagStart)+2;
- }
- nextCharPosition++;
- }
- return -1;
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/SystemtapEditor.java b/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/SystemtapEditor.java
deleted file mode 100644
index 1f9f5876b4..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/SystemtapEditor.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pkmuldoon@picobot.org> - initial API.
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.backup.ui.editor;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.IVerticalRuler;
-import org.eclipse.jface.text.source.projection.ProjectionAnnotation;
-import org.eclipse.jface.text.source.projection.ProjectionAnnotationModel;
-import org.eclipse.jface.text.source.projection.ProjectionSupport;
-import org.eclipse.jface.text.source.projection.ProjectionViewer;
-import org.eclipse.linuxtools.systemtap.backup.ui.editor.activator.Activator;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.editors.text.TextEditor;
-import org.eclipse.ui.texteditor.ContentAssistAction;
-import org.eclipse.ui.texteditor.ITextEditorActionConstants;
-import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
-
-public class SystemtapEditor extends TextEditor {
-
- private ColorManager colorManager;
-
- private ProjectionSupport stpProjectionSupport;
- private Annotation[] stpOldAnnotations;
- private ProjectionAnnotationModel stpAnnotationModel;
-
- public SystemtapEditor() {
- super();
- URL completionURL = null;
-
- completionURL = buildCompletionDataLocation("completion/stp_completion.properties");
- STPMetadataSingleton completionDataStore = STPMetadataSingleton.getInstance();
-
- if (completionURL != null)
- completionDataStore.build(completionURL);
-
- colorManager = new ColorManager();
- setSourceViewerConfiguration(new STPConfiguration(colorManager,this));
- setDocumentProvider(new STPDocumentProvider());
- }
-
- public void createPartControl(Composite parent)
- {
- super.createPartControl(parent);
- ProjectionViewer viewer =(ProjectionViewer)getSourceViewer();
- stpProjectionSupport = new ProjectionSupport(viewer,getAnnotationAccess(),getSharedColors());
- stpProjectionSupport.install();
- viewer.doOperation(ProjectionViewer.TOGGLE);
- stpAnnotationModel = viewer.getProjectionAnnotationModel();
- }
-
- protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
-
- ISourceViewer viewer = new ProjectionViewer(parent, ruler,
- getOverviewRuler(), isOverviewRulerVisible(), styles);
- getSourceViewerDecorationSupport(viewer);
- return viewer;
- }
-
-
- public void updateFoldingStructure(ArrayList<Position> updatedPositions)
- {
- ProjectionAnnotation annotation;
- Annotation[] updatedAnnotations = new Annotation[updatedPositions.size()];
- HashMap<ProjectionAnnotation, Position> newAnnotations = new HashMap<ProjectionAnnotation, Position>();
- for(int i =0;i<updatedPositions.size();i++)
- {
- annotation = new ProjectionAnnotation();
- newAnnotations.put(annotation,updatedPositions.get(i));
- updatedAnnotations[i]=annotation;
- }
- stpAnnotationModel.modifyAnnotations(stpOldAnnotations,newAnnotations,null);
- stpOldAnnotations = updatedAnnotations;
- }
-
- protected void createActions() {
- Action action = new ContentAssistAction(ResourceBundle.getBundle("org.eclipse.linuxtools.systemtap.backup.ui.editor.strings"), "ContentAssistProposal.", this);
- String id = ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS;
- action.setActionDefinitionId(id);
- setAction("ContentAssistProposal", action);
- markAsStateDependentAction("ContentAssistProposal", true);
- super.createActions();
- }
-
- public ISourceViewer getMySourceViewer() {
- return this.getSourceViewer();
- }
-
- public void dispose() {
- colorManager.dispose();
- super.dispose();
- }
-
- protected void editorContextMenuAboutToShow(IMenuManager menu) {
-
- super.editorContextMenuAboutToShow(menu);
- addAction(menu, ITextEditorActionConstants.GROUP_EDIT,
- ITextEditorActionConstants.SHIFT_RIGHT);
- addAction(menu, ITextEditorActionConstants.GROUP_EDIT,
- ITextEditorActionConstants.SHIFT_LEFT);
-
- }
-
- private URL buildCompletionDataLocation(String completionDataLocation) {
- URL completionURLLocation = null;
- try {
- completionURLLocation = getCompletionURL(completionDataLocation);
- } catch (IOException e) {
- completionURLLocation = null;
- }
-
- if (completionURLLocation == null) {
- Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID,
- IStatus.OK, "Cannot locate plug-in location for System Tap completion metadata " +
- "(completion/stp_completion.properties). Completions are not available.", null));
- return null;
- }
-
- File completionFile = new File(completionURLLocation.getFile());
- if ((completionFile == null) || (!completionFile.exists()) || (!completionFile.canRead())) {
- Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID,
- IStatus.OK, "Cannot find System Tap completion metadata at " +completionFile.getPath() +
- "Completions are not available.", null));
-
- return null;
- }
-
- return completionURLLocation;
-
- }
- private URL getCompletionURL(String completionLocation) throws IOException {
- URL fileURL = null;
- URL location = Activator.getDefault().getBundle().getEntry(completionLocation);
-
- if (location != null)
- fileURL = FileLocator.toFileURL(location);
- return fileURL;
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/activator/Activator.java b/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/activator/Activator.java
deleted file mode 100644
index 295b54c5ce..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/activator/Activator.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pkmuldoon@picobot.org> - initial API.
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.backup.ui.editor.activator;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-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 plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.linuxtools.systemtap.backup.ui.editor.activator";
-
- // The shared instance
- public static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- 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);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/strings.properties b/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/strings.properties
deleted file mode 100644
index 8767bb5cea..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/src/org/eclipse/linuxtools/systemtap/backup/ui/editor/strings.properties
+++ /dev/null
@@ -1,568 +0,0 @@
-syscall.accept(name:string,sockfd:long,addr_uaddr:long,addrlen_uaddr:long,argstr:string)
-syscall.access(name:string,pathname:string,mode:long,mode_str:string,argstr:string)
-syscall.acct(name:string,filename:string,argstr:string)
-syscall.add_key(name:string,type_uaddr:long,description_auddr:long,payload_uaddr:long,plen:long,ringid:long,argstr:string)
-syscall.adjtimex(name:string,argstr:string)
-syscall.alarm(name:string,seconds:long,argstr:string)
-syscall.arch_prctl(name:string,code:long,addr:long,argstr:string)
-syscall.bdflush(name:string,func:long,data:long,data_str:string,argstr:string)
-syscall.bind(name:string,sockfd:long,my_addr_uaddr:long,addrlen:long,argstr:string)
-syscall.brk(name:string,brk:long,argstr:string)
-syscall.capget(name:string,header_uaddr:long,data_uaddr:long,argstr:string)
-syscall.capset(name:string,header_uaddr:long,data_uaddr:long,argstr:string)
-syscall.chdir(name:string,path:string,argstr:string)
-syscall.chmod(name:string,path:string,mode:long,argstr:string)
-syscall.chown(name:string,path:string,owner:long,group:long,argstr:string)
-syscall.chown16(name:string,path:string,owner:long,group:long,argstr:string)
-syscall.chroot(name:string,path:string,argstr:string)
-syscall.clock_getres(name:string,clk_id:long,clk_id_str:string,res_uaddr:long,argstr:string)
-syscall.clock_gettime(name:string,clk_id:long,clk_id_str:string,argstr:string)
-syscall.clock_nanosleep(name:string,flag_str:string,argstr:string)
-syscall.clock_settime(name:string,clk_id:long,clk_id_str:string,tp_uaddr:long,argstr:string)
-syscall.close(name:string,fd:long,argstr:string)
-syscall.compat_adjtimex(name:string,argstr:string)
-syscall.compat_clock_nanosleep(name:string,flag_str:string,argstr:string)
-syscall.compat_execve(name:string,filename:string,args:string,argstr:string)
-syscall.compat_futex(name:string,futex_uaddr:long,op:long,val:long,utime_uaddr:long,uaddr2_uaddr:long,val3:long,argstr:string)
-syscall.compat_futimesat(name:string,dirfd:long,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
-syscall.compat_getitimer(name:string,which:long,value_uaddr:long,argstr:string)
-syscall.compat_io_setup(name:string,maxevents:long,ctxp_uaddr:long,argstr:string)
-syscall.compat_io_submit(name:string,ctx_id:long,nr:long,iocbpp_uaddr:long,argstr:string)
-syscall.compat_nanosleep(name:string,req_uaddr:long,rem_uaddr:long,argstr:string)
-syscall.compat_ppoll(name:string,argstr:string)
-syscall.compat_pselect6(name:string,argstr:string)
-syscall.compat_pselect7a(name:string,argstr:string)
-syscall.compat_select(name:string,n:long,readfds_uaddr:long,writefds_uaddr:long,exceptfds_uaddr:long,timeout_uaddr:long,argstr:string)
-syscall.compat_setitimer(name:string,which:long,value_uaddr:long,ovalue_uaddr:long,argstr:string)
-syscall.compat_signalfd(name:string,argstr:string)
-syscall.compat_sys_msgctl(name:string,argstr:string)
-syscall.compat_sys_msgrcv(name:string,argstr:string)
-syscall.compat_sys_msgsnd(name:string,argstr:string)
-syscall.compat_sys_recvmsg(name:string,s:long,msg_uaddr:long,flags:long,argstr:string)
-syscall.compat_sys_semctl(name:string,argstr:string)
-syscall.compat_sys_semtimedop(name:string,semid:long,sops_uaddr:long,nsops:long,timeout_uaddr:long,argstr:string)
-syscall.compat_sys_sendmsg(name:string,s:long,msg_uaddr:long,flags:long,argstr:string)
-syscall.compat_sys_shmat(name:string,first:long,second:long,third:long,uptr_uaddr:long,argstr:string)
-syscall.compat_sys_shmctl(name:string,first:long,second:long,uptr_uaddr:long,argstr:string)
-syscall.compat_sys_utimes(name:string,filename:string,argstr:string)
-syscall.compat_utime(name:string,filename_uaddr:long,filename:string,buf_uaddr:long,actime:long,modtime:long,argstr:string)
-syscall.compat_utimensat(name:string,argstr:string)
-syscall.compat_vmsplice(name:string,argstr:string)
-syscall.connect(name:string,sockfd:long,serv_addr_uaddr:long,addrlen:long,argstr:string)
-syscall.creat(name:string,mode:long,pathname:string,argstr:string)
-syscall.delete_module(name:string,name_user:string,flags:long,argstr:string)
-syscall.dup(name:string,oldfd:long,argstr:string)
-syscall.dup2(name:string,oldfd:long,newfd:long,argstr:string)
-syscall.epoll_create(name:string,size:long,argstr:string)
-syscall.epoll_ctl(name:string,epfd:long,op:long,op_str:string,fd:long,event_uaddr:long,argstr:string)
-syscall.epoll_pwait(name:string,argstr:string)
-syscall.epoll_wait(name:string,epfd:long,events_uaddr:long,maxevents:long,timeout:long,argstr:string)
-syscall.eventfd(name:string,argstr:string)
-syscall.execve(name:string,filename:string,args:string,argstr:string)
-syscall.exit(name:string,status:long,argstr:string)
-syscall.exit_group(name:string,status:long,argstr:string)
-syscall.faccessat(name:string,dfd:long,dfd_str:string,filename:long,filename_str:string,mode:long,mode_str:string,argstr:string)
-syscall.fadvise64(name:string,fs:long,offset:long,len:long,advice:long,argstr:string)
-syscall.fadvise64_64(name:string,fs:long,offset:long,len:long,advice:long,argstr:string)
-syscall.fchdir(name:string,fd:long,argstr:string)
-syscall.fchmod(name:string,fildes:long,mode:long,argstr:string)
-syscall.fchmodat(name:string,dfd:long,dfd_str:string,filename:long,filename_str:string,mode:long,argstr:string)
-syscall.fchown(name:string,fd:long,owner:long,group:long,argstr:string)
-syscall.fchown16(name:string,fd:long,owner:long,group:long,argstr:string)
-syscall.fchownat(name:string,dfd:long,dfd_str:string,filename:long,filename_str:string,user:long,group:long,flag:long,flag_str:string,argstr:string)
-syscall.fcntl(name:string,fd:long,cmd:long,cmd_str:string,arg:long,argstr:string)
-syscall.fdatasync(name:string,fd:long,argstr:string)
-syscall.fgetxattr(name:string,filedes:long,name2:string,value_uaddr:long,size:long,argstr:string)
-syscall.flistxattr(name:string,filedes:long,list_uaddr:long,size:long,argstr:string)
-syscall.flock(name:string,fd:long,operation:long,argstr:string)
-syscall.fork(clone_flags:long,stack_start:long,regs:long,stack_size:long,parent_tid_uaddr:long,child_tid_uaddr:long,name:string,argstr:string)
-syscall.fremovexattr(name:string,filedes:long,name_uaddr:long,argstr:string)
-syscall.fsetxattr(name:string,filedes:long,name2:string,value_uaddr:long,size:long,flags:long,argstr:string)
-syscall.fstat(name:string,filedes:long,buf_uaddr:long,argstr:string)
-syscall.fstatat(name:string,dirfd:long,path:string,buf_uaddr:long,argstr:string)
-syscall.fstatfs(name:string,fd:long,buf_uaddr:long,argstr:string)
-syscall.fstatfs64(name:string,fd:long,sz:long,buf_uaddr:long,argstr:string)
-syscall.fsync(name:string,fd:long,argstr:string)
-syscall.ftruncate(name:string,fd:long,length:long,argstr:string)
-syscall.futex(name:string,futex_uaddr:long,op:long,val:long,utime_uaddr:long,uaddr2_uaddr:long,val3:long,argstr:string)
-syscall.futimesat(name:string,dirfd:long,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
-syscall.get_mempolicy(name:string,policy_uaddr:long,nmask_uaddr:long,maxnode:long,addr:long,flags:long,argstr:string)
-syscall.getcwd(name:string,buf_uaddr:long,size:long,argstr:string)
-syscall.getdents(name:string,fd:long,dirp_uaddr:long,count:long,argstr:string)
-syscall.getegid(name:string,argstr:string)
-syscall.geteuid(name:string,argstr:string)
-syscall.getgid(name:string,argstr:string)
-syscall.getgroups(name:string,size:long,list_uaddr:long,argstr:string)
-syscall.gethostname(name:string,name_uaddr:long,len:long,argstr:string)
-syscall.getitimer(name:string,which:long,value_uaddr:long,argstr:string)
-syscall.getpeername(name:string,s:long,name_uaddr:long,namelen_uaddr:long,argstr:string)
-syscall.getpgid(name:string,pid:long,argstr:string)
-syscall.getpgrp(name:string,argstr:string)
-syscall.getpid(name:string,argstr:string)
-syscall.getppid(name:string,argstr:string)
-syscall.getpriority(name:string,which:long,who:long,argstr:string)
-syscall.getresgid(name:string,rgid_uaddr:long,egid_uaddr:long,sgid_uaddr:long,argstr:string)
-syscall.getresuid(name:string,ruid_uaddr:long,euid_uaddr:long,suid_uaddr:long,argstr:string)
-syscall.getrlimit(name:string,resource:long,rlim_uaddr:long,argstr:string)
-syscall.getrusage(name:string,who:long,who_str:string,usage_uaddr:long,argstr:string)
-syscall.getsid(name:string,pid:long,argstr:string)
-syscall.getsockname(name:string,s:long,name_uaddr:long,namelen_uaddr:long,argstr:string)
-syscall.getsockopt(name:string,fd:long,level:long,level_str:string,optname:long,optname_str:string,optval_uaddr:long,optlen_uaddr:long,argstr:string)
-syscall.gettid(name:string,argstr:string)
-syscall.gettimeofday(name:string,tv_uaddr:long,tz_uaddr:long,argstr:string)
-syscall.getuid(name:string,argstr:string)
-syscall.getxattr(name:string,path:string,name2:string,value_uaddr:long,size:long,argstr:string)
-syscall.init_module(name:string,umod_uaddr:long,len:long,uargs:string,argstr:string)
-syscall.inotify_add_watch(name:string,fd:long,mask:long,path_uaddr:long,path:string,argstr:string)
-syscall.inotify_init(name:string,argstr:string)
-syscall.inotify_rm_watch(name:string,fd:long,wd:long,argstr:string)
-syscall.io_cancel(name:string,ctx_id:long,iocb_uaddr:long,result_uaddr:long,argstr:string)
-syscall.io_destroy(name:string,ctx:long,argstr:string)
-syscall.io_getevents(name:string,ctx_id:long,min_nr:long,nr:long,events_uaddr:long,timeout_uaddr:long,timestr:string,argstr:string)
-syscall.io_setup(name:string,maxevents:long,ctxp_uaddr:long,argstr:string)
-syscall.io_submit(name:string,ctx_id:long,nr:long,iocbpp_uaddr:long,argstr:string)
-syscall.ioctl(name:string,fd:long,request:long,argp:long,argstr:string)
-syscall.ioperm(name:string,from:long,num:long,turn_on:long,argstr:string)
-syscall.iopl(name:string,level:long,argstr:string)
-syscall.ioprio_get(name:string,which:long,who:long,argstr:string)
-syscall.ioprio_set(name:string,which:long,who:long,ioprio:long,argstr:string)
-syscall.kexec_load(name:string,entry:long,nr_segments:long,segments_uaddr:long,flags:long,argstr:string)
-syscall.keyctl(name:string,argstr:string)
-syscall.kill(name:string,pid:long,sig:long,argstr:string)
-syscall.lchown(name:string,path:string,owner:long,group:long,argstr:string)
-syscall.lchown16(name:string,path:string,owner:long,group:long,argstr:string)
-syscall.lgetxattr(name:string,path:string,name2:string,value_uaddr:long,size:long,argstr:string)
-syscall.link(name:string,oldpath:string,newpath:string,argstr:string)
-syscall.linkat(name:string,olddfd:long,olddfd_str:string,oldname:long,oldname_str:string,newdfd:long,newdfd_str:string,newname:long,newname_str:string,flags:long,flags_str:string,argstr:string)
-syscall.listen(name:string,sockfd:long,backlog:long,argstr:string)
-syscall.listxattr(name:string,list_uaddr:long,size:long,path_uaddr:long,path:string,argstr:string)
-syscall.llistxattr(name:string,list_uaddr:long,size:long,path_uaddr:long,path:string,argstr:string)
-syscall.llseek(name:string,fd:long,offset_high:long,offset_low:long,result_uaddr:long,whence:long,whence_str:string,argstr:string)
-syscall.lookup_dcookie(name:string,cookie:long,buffer_uaddr:long,len:long,argstr:string)
-syscall.lremovexattr(name:string,name_uaddr:long,name2:string,path_uaddr:long,path:string,argstr:string)
-syscall.lseek(name:string,fildes:long,offset:long,whence:long,whence_str:string,argstr:string)
-syscall.lsetxattr(name:string,path_uaddr:long,path:string,name_uaddr:long,name_str:string,value_uaddr:long,size:long,flags:long,argstr:string)
-syscall.lstat(name:string,path:string,buf_uaddr:long,argstr:string)
-syscall.madvise(name:string,start:long,length:long,advice:long,advice_str:string,argstr:string)
-syscall.mbind(name:string,start:long,len:long,mode:long,nmask_uaddr:long,maxnode:long,flags:long,argstr:string)
-syscall.migrate_pages(name:string,argstr:string)
-syscall.mincore(name:string,start:long,length:long,vec_uaddr:long,argstr:string)
-syscall.mkdir(name:string,pathname_uaddr:long,pathname:string,mode:long,argstr:string)
-syscall.mkdirat(name:string,dirfd:long,pathname:string,mode:long,argstr:string)
-syscall.mknod(name:string,pathname:string,mode:long,dev:long,argstr:string)
-syscall.mknodat(name:string,dfd:long,dfd_str:string,filename:long,filename_str:string,mode:long,mode_str:string,dev:long,argstr:string)
-syscall.mlock(name:string,addr:long,len:long,argstr:string)
-syscall.mlockall(name:string,flags:long,argstr:string)
-syscall.mmap(name:string,start:long,len:long,prot:long,flags:long,fd:long,offset:long,argstr:string)
-syscall.mmap2(name:string,argstr:string)
-syscall.mmap32(name:string,argstr:string)
-syscall.modify_ldt(name:string,func:long,ptr_uaddr:long,bytecount:long,argstr:string)
-syscall.mount(name:string,source:string,target:string,filesystemtype:string,mountflags:long,mountflags_str:string,data:string,argstr:string)
-syscall.move_pages(name:string,argstr:string)
-syscall.mprotect(name:string,addr:long,len:long,prot:long,prot_str:string,argstr:string)
-syscall.mq_getsetattr(name:string,mqdes:long,u_mqstat_uaddr:long,u_omqstat_uaddr:long,argstr:string)
-syscall.mq_notify(name:string,mqdes:long,notification_uaddr:long,argstr:string)
-syscall.mq_open(name:string,name_uaddr:long,filename:string,mode:long,u_attr_uaddr:long,oflag:long,argstr:string)
-syscall.mq_timedreceive(name:string,mqdes:long,msg_ptr_uaddr:long,msg_len:long,msg_prio_uaddr:long,abs_timout_uaddr:long,argstr:string)
-syscall.mq_timedsend(name:string,mqdes:long,msg_ptr_uaddr:long,msg_len:long,msg_prio:long,abs_timeout_uaddr:long,argstr:string)
-syscall.mq_unlink(name:string,u_name_uaddr:long,u_name:string,argstr:string)
-syscall.mremap(name:string,old_address:long,old_size:long,new_size:long,flags:long,new_address:long,argstr:string)
-syscall.msgctl(name:string,msqid:long,cmd:long,buf_uaddr:long,argstr:string)
-syscall.msgget(name:string,key:long,msgflg:long,msgflg_str:string,argstr:string)
-syscall.msgrcv(name:string,msqid:long,msgp_uaddr:long,msgsz:long,msgtyp:long,msgflg:long,argstr:string)
-syscall.msgsnd(name:string,msqid:long,msgp_uaddr:long,msgsz:long,msgflg:long,argstr:string)
-syscall.msync(name:string,start:long,length:long,flags:long,argstr:string)
-syscall.munlock(name:string,addr:long,len:long,argstr:string)
-syscall.munlockall(name:string,argstr:string)
-syscall.munmap(name:string,start:long,length:long,argstr:string)
-syscall.nanosleep(name:string,req_uaddr:long,rem_uaddr:long,argstr:string)
-syscall.nfsservctl(name:string,cmd:long,argp_uaddr:long,resp_uaddr:long,argstr:string)
-syscall.ni_syscall(name:string,argstr:string)
-syscall.nice(name:string,inc:long,argstr:string)
-syscall.open(name:string,filename:string,flags:long,mode:long,argstr:string)
-syscall.openat(name:string,filename:string,flags:long,mode:long,argstr:string)
-syscall.pause(name:string,argstr:string)
-syscall.personality(name:string,persona:long,argstr:string)
-syscall.pipe(name:string,argstr:string)
-syscall.pipe32(name:string,argstr:string)
-syscall.pivot_root(name:string,new_root_str:string,old_root_str:string,argstr:string)
-syscall.poll(name:string,ufds_uaddr:long,nfds:long,timeout:long,argstr:string)
-syscall.ppoll(name:string,argstr:string)
-syscall.prctl(name:string,option:long,arg2:long,arg3:long,arg4:long,arg5:long,argstr:string)
-syscall.pread(name:string,fd:long,buf_uaddr:long,count:long,offset:long,argstr:string)
-syscall.pselect6(name:string,argstr:string)
-syscall.pselect7(name:string,argstr:string)
-syscall.ptrace(name:string,request:long,pid:long,addr:long,data:long,argstr:string)
-syscall.pwrite(name:string,fd:long,buf_uaddr:long,count:long,offset:long,argstr:string)
-syscall.quotactl(name:string,cmd:long,cmd_str:string,special:long,special_str:string,id:long,addr_uaddr:long,argstr:string)
-syscall.read(name:string,fd:long,buf_uaddr:long,count:long,argstr:string)
-syscall.readahead(name:string,fd:long,offset:long,count:long,argstr:string)
-syscall.readdir(name:string,argstr:string)
-syscall.readlink(name:string,path:string,buf_uaddr:long,bufsiz:long,argstr:string)
-syscall.readlinkat(name:string,dfd:long,buf_uaddr:long,bufsiz:long,path:string,argstr:string)
-syscall.readv(name:string,vector_uaddr:long,count:long,fd:long,argstr:string)
-syscall.reboot(name:string,magic:long,magic_str:string,magic2:long,magic2_str:string,flag:long,flag_str:string,arg_uaddr:long,argstr:string)
-syscall.recv(name:string,s:long,buf_uaddr:long,len:long,flags:long,flags_str:string,argstr:string)
-syscall.recvfrom(name:string,s:long,buf_uaddr:long,len:long,flags:long,flags_str:string,addr_uaddr:long,addrlen_uaddr:long,argstr:string)
-syscall.recvmsg(name:string,s:long,msg_uaddr:long,flags:long,flags_str:string,argstr:string)
-syscall.remap_file_pages(name:string,start:long,size:long,prot:long,pgoff:long,flags:long,argstr:string)
-syscall.removexattr(name:string,name_str:string,path:string,argstr:string)
-syscall.rename(name:string,oldpath:string,newpath:string,argstr:string)
-syscall.renameat(name:string,olddfd:long,olddfd_str:string,oldname:long,oldname_str:string,newdfd:long,newdfd_str:string,newname:long,newname_str:string,argstr:string)
-syscall.request_key(name:string,type_uaddr:long,description_uaddr:long,callout_info_uaddr:long,destringid:long,argstr:string)
-syscall.restart_syscall(name:string,argstr:string)
-syscall.rmdir(name:string,pathname:string,argstr:string)
-syscall.rt_sigaction(name:string,sig:long,act_uaddr:long,oact_uaddr:long,sigsetsize:long,argstr:string)
-syscall.rt_sigaction32(name:string,sig:long,act_uaddr:long,oact_uaddr:long,sigsetsize:long,argstr:string)
-syscall.rt_sigpending(name:string,set_uaddr:long,sigsetsize:long,argstr:string)
-syscall.rt_sigprocmask(name:string,how:long,how_str:string,set_uaddr:long,oldset_uaddr:long,argstr:string)
-syscall.rt_sigqueueinfo(name:string,pid:long,sig:long,uinfo_uaddr:long,argstr:string)
-syscall.rt_sigreturn(name:string,argstr:string)
-syscall.rt_sigsuspend(name:string,argstr:string)
-syscall.rt_sigtimedwait(name:string,uthese_uaddr:long,uinfo_uaddr:long,uts_uaddr:long,sigsetsize:long,argstr:string)
-syscall.sched_get_priority_max(name:string,policy:long,argstr:string)
-syscall.sched_get_priority_min(name:string,policy:long,argstr:string)
-syscall.sched_getaffinity(name:string,pid:long,len:long,mask_uaddr:long,argstr:string)
-syscall.sched_getparam(name:string,pid:long,p_uaddr:long,argstr:string)
-syscall.sched_getscheduler(name:string,pid:long,argstr:string)
-syscall.sched_rr_get_interval(name:string,pid:long,tp_uaddr:long,argstr:string)
-syscall.sched_setaffinity(name:string,pid:long,len:long,mask_uaddr:long,argstr:string)
-syscall.sched_setparam(name:string,pid:long,p_uaddr:long,argstr:string)
-syscall.sched_setscheduler(name:string,pid:long,policy:long,policy_str:string,p_uaddr:long,argstr:string)
-syscall.sched_yield(name:string,argstr:string)
-syscall.select(name:string,n:long,readfds_uaddr:long,writefds_uaddr:long,exceptfds_uaddr:long,timeout_uaddr:long,argstr:string)
-syscall.semctl(name:string,semid:long,semnum:long,cmd:long,argstr:string)
-syscall.semget(name:string,key:long,nsems:long,semflg:long,argstr:string)
-syscall.semop(name:string,semid:long,tsops_uaddr:long,nsops:long,argstr:string)
-syscall.semtimedop(name:string,semid:long,sops_uaddr:long,nsops:long,timeout_uaddr:long,argstr:string)
-syscall.send(name:string,s:long,buf_uaddr:long,len:long,flags:long,flags_str:string,argstr:string)
-syscall.sendfile(name:string,out_fd:long,in_fd:long,offset_uaddr:long,count:long,argstr:string)
-syscall.sendmsg(name:string,s:long,msg_uaddr:long,flags:long,flags_str:string,argstr:string)
-syscall.sendto(name:string,s:long,buf_uaddr:long,len:long,flags:long,flags_str:string,to_uaddr:long,tolen:long,argstr:string)
-syscall.set_mempolicy(name:string,mode:long,nmask_uaddr:long,maxnode:long,argstr:string)
-syscall.set_tid_address(name:string,tidptr_uaddr:long,argstr:string)
-syscall.setdomainname(name:string,hostname_uaddr:long,len:long,argstr:string)
-syscall.setfsgid(name:string,fsgid:long,argstr:string)
-syscall.setfsuid(name:string,fsuid:long,argstr:string)
-syscall.setgid(name:string,gid:long,argstr:string)
-syscall.setgroups(name:string,size:long,list_uaddr:long,argstr:string)
-syscall.sethostname(name:string,hostname_uaddr:long,name_str:string,len:long,argstr:string)
-syscall.setitimer(name:string,which:long,value_uaddr:long,ovalue_uaddr:long,argstr:string)
-syscall.setpgid(name:string,pid:long,pgid:long,argstr:string)
-syscall.setpriority(name:string,which:long,which_str:string,who:long,prio:long,argstr:string)
-syscall.setregid(name:string,rgid:long,egid:long,argstr:string)
-syscall.setregid16(name:string,rgid:long,egid:long,argstr:string)
-syscall.setresgid(name:string,rgid:long,egid:long,sgid:long,argstr:string)
-syscall.setresgid16(name:string,rgid:long,egid:long,sgid:long,argstr:string)
-syscall.setresuid(name:string,ruid:long,euid:long,suid:long,argstr:string)
-syscall.setresuid16(name:string,ruid:long,euid:long,suid:long,argstr:string)
-syscall.setreuid(name:string,ruid:long,euid:long,argstr:string)
-syscall.setreuid16(name:string,ruid:long,euid:long,argstr:string)
-syscall.setrlimit(name:string,resource:long,rlim_uaddr:long,argstr:string)
-syscall.setsid(name:string,argstr:string)
-syscall.setsockopt(name:string,fd:long,level:long,level_str:string,optname:long,optname_str:string,optval_uaddr:long,optlen:long,argstr:string)
-syscall.settimeofday(name:string,tv_uaddr:long,tz_uaddr:long,argstr:string)
-syscall.settimeofday32(name:string,tv_uaddr:long,tz_uaddr:long,argstr:string)
-syscall.setuid(name:string,uid:long,argstr:string)
-syscall.setxattr(name:string,path_uaddr:long,path:string,name_uaddr:long,name_str:string,value_uaddr:long,size:long,flags:long,argstr:string)
-syscall.sgetmask(name:string,argstr:string)
-syscall.shmat(name:string,shmid:long,shmaddr_uaddr:long,shmflg:long,argstr:string)
-syscall.shmctl(name:string,shmid:long,cmd:long,buf_uaddr:long,argstr:string)
-syscall.shmdt(name:string,shmaddr_uaddr:long,argstr:string)
-syscall.shmget(name:string,key:long,size:long,shmflg:long,argstr:string)
-syscall.shutdown(name:string,s:long,how:long,how_str:string,argstr:string)
-syscall.sigaction32(name:string,sig:long,act_uaddr:long,oact_uaddr:long,argstr:string)
-syscall.sigaltstack(name:string,uss_uaddr:long,uoss_uaddr:long,regs_uaddr:long,argstr:string)
-syscall.signal(name:string,sig:long,handler:long,argstr:string)
-syscall.signalfd(name:string,argstr:string)
-syscall.sigpending(name:string,argstr:string)
-syscall.sigprocmask(name:string,how:long,how_str:string,set_uaddr:long,oldset_uaddr:long,argstr:string)
-syscall.sigreturn(name:string,argstr:string)
-syscall.sigsuspend(name:string,argstr:string)
-syscall.socket(name:string,family:long,type:long,protocol:long,argstr:string)
-syscall.socketpair(name:string,family:long,type:long,protocol:long,sv_uaddr:long,argstr:string)
-syscall.splice(name:string,argstr:string)
-syscall.ssetmask(name:string,newmask:long,argstr:string)
-syscall.stat(name:string,filename_uaddr:long,filename:string,buf_uaddr:long,argstr:string)
-syscall.statfs(name:string,buf_uaddr:long,path:string,argstr:string)
-syscall.statfs64(name:string,sz:long,buf_uaddr:long,path:string,argstr:string)
-syscall.stime(name:string,t_uaddr:long,argstr:string)
-syscall.swapoff(name:string,path:string,argstr:string)
-syscall.swapon(name:string,path:string,swapflags:long,argstr:string)
-syscall.symlink(name:string,oldpath:string,newpath:string,argstr:string)
-syscall.symlinkat(name:string,oldname:long,oldname_str:string,newdfd:long,newdfd_str:string,newname:long,newname_str:string,argstr:string)
-syscall.sync(name:string,argstr:string)
-syscall.sysctl(name:string,argstr:string)
-syscall.sysctl32(name:string,argstr:string)
-syscall.sysfs(name:string,option:long,arg1:long,arg2:long,argstr:string)
-syscall.sysinfo(name:string,info_uaddr:long,argstr:string)
-syscall.syslog(name:string,type:long,bufp_uaddr:long,len:long,argstr:string)
-syscall.tee(name:string,argstr:string)
-syscall.tgkill(name:string,tgid:long,pid:long,sig:long,argstr:string)
-syscall.time(name:string,t_uaddr:long,argstr:string)
-syscall.timer_create(name:string,clockid:long,clockid_str:string,evp_uaddr:long,timerid_uaddr:long,argstr:string)
-syscall.timer_delete(name:string,timerid:long,argstr:string)
-syscall.timer_getoverrun(name:string,timerid:long,argstr:string)
-syscall.timer_gettime(name:string,timerid:long,value_uaddr:long,argstr:string)
-syscall.timer_settime(name:string,timerid:long,flags:long,value_uaddr:long,ovalue_uaddr:long,argstr:string)
-syscall.times(name:string,argstr:string)
-syscall.tkill(name:string,pid:long,sig:long,argstr:string)
-syscall.truncate(name:string,path_uaddr:long,path:string,length:long,argstr:string)
-syscall.umask(name:string,mask:long,argstr:string)
-syscall.umount(name:string,target:string,flags:long,flags_str:string,argstr:string)
-syscall.uname(name:string,argstr:string)
-syscall.unlink(name:string,pathname_uaddr:long,pathname:string,argstr:string)
-syscall.unlinkat(name:string,dfd:long,dfd_str:string,pathname:long,pathname_str:string,flag:long,flag_str:string,argstr:string)
-syscall.unshare(name:string,unshare_flags:long,argstr:string)
-syscall.uselib(name:string,library_uaddr:long,library:string,argstr:string)
-syscall.ustat(name:string,dev:long,ubuf_uaddr:long,argstr:string)
-syscall.ustat32(name:string,dev:long,argstr:string)
-syscall.utime(name:string,filename_uaddr:long,filename:string,buf_uaddr:long,actime:long,modtime:long,argstr:string)
-syscall.utimensat(name:string,argstr:string)
-syscall.utimes(name:string,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
-syscall.vhangup(name:string,argstr:string)
-syscall.vm86_warning(name:string)
-syscall.vmsplice(name:string,argstr:string)
-syscall.wait4(name:string,pid:long,status_uaddr:long,options:long,options_str:string,rusage_uaddr:long,argstr:string)
-syscall.waitid(name:string,pid:long,which:long,which_str:string,infop_uaddr:long,options:long,options_str:string,rusage_uaddr:long,argstr:string)
-syscall.write(name:string,fd:long,buf_uaddr:long,count:long,argstr:string)
-syscall.writev(name:string,vector_uaddr:long,count:long,fd:long,argstr:string)
-signal.check_ignored(sig_pid:long,pid_name:string,sig:long,sig_name:string)
-signal.checkperm(sig:long,task:long,sinfo:long,name:string,sig_name:string,sig_pid:long,pid_name:string,si_code:string)
-signal.do_action(sig:long,sigact_addr:long,oldsigact_addr:long,sa_handler:long,sa_mask:long)
-signal.flush(task:long,sig_pid:long,pid_name:string)
-signal.force_segv(sig_pid:long,pid_name:string,sig:long,sig_name:string)
-signal.handle(sig:unknown,sig_name:string,sinfo:long,sig_code:long,ka_addr:unknown,oldset_addr:unknown,regs:unknown,sig_mode:string)
-signal.pending(sigset_add:long,sigset_size:long)
-signal.procmask(how:long,sigset_addr:long,oldsigset_addr:long,sigset:long)
-signal.send(name:string,sig:long,task:long,sinfo:long,shared:long,send2queue:long,sig_name:string,sig_pid:long,pid_name:string,si_code:string)
-signal.send_sig_queue(sig:long,sig_name:string,sig_pid:long,pid_name:string,sigqueue_addr:long)
-signal.syskill(name:string,pid:long,sig:long,argstr:string,sig_name:string)
-signal.systgkill(name:string,tgid:long,pid:long,sig:long,argstr:string,sig_name:string)
-signal.systkill(name:string,pid:long,sig:long,argstr:string,sig_name:string)
-signal.wakeup(sig_pid:long,pid_name:string,resume:long,state_mask:string)
-netdev.receive(dev_name:string,length:long,protocol:long,truesize:long)
-netdev.transmit(dev_name:string,length:long,protocol:long,truesize:long)
-ioblock.end(devname:string,ino:long,bytes_done:long,error:long,sector:long,flags:long,rw:long,vcnt:long,idx:long,phys_segments:long,hw_segments:long,size:long)
-ioblock.request(devname:string,ino:long,sector:long,flags:long,rw:long,vcnt:long,idx:long,phys_segments:long,hw_segments:long,size:long,bdev:long,bdev_contains:long,p_start_sect:long)
-ioscheduler.elv_add_request(elevator_name:string,disk_major:long,disk_minor:long,req:long,req_flags:long)
-ioscheduler.elv_completed_request(elevator_name:string,disk_major:long,disk_minor:long,req:long,req_flags:long)
-ioscheduler.elv_next_request(elevator_name:string)
-nd_syscall.accept(name:string,sockfd:long,addr_uaddr:long,addrlen_uaddr:long,argstr:string)
-nd_syscall.access(name:string,pathname:string,mode:long,mode_str:string,argstr:string)
-nd_syscall.acct(name:string,filename:string,argstr:string)
-nd_syscall.add_key(name:string,type_uaddr:long,description_uaddr:long,payload_uaddr:long,plen:long,ringid:long,argstr:string)
-nd_syscall.adjtimex(name:string,argstr:string)
-nd_syscall.alarm(name:string,seconds:long,argstr:string)
-nd_syscall.bdflush(name:string,func:long,data:long,data_str:string,argstr:string)
-nd_syscall.bind(name:string,sockfd:long,my_addr_uaddr:long,addrlen:long,argstr:string)
-nd_syscall.brk(name:string,brk:long,argstr:string)
-nd_syscall.capget(name:string,header_uaddr:long,data_uaddr:long,argstr:string)
-nd_syscall.capset(name:string,header_uaddr:long,data_uaddr:long,argstr:string)
-nd_syscall.chdir(name:string,path:string,argstr:string)
-nd_syscall.chmod(name:string,path:string,mode:long,argstr:string)
-nd_syscall.chown(name:string,path:string,owner:long,group:long,argstr:string)
-nd_syscall.chown16(name:string,path:string,owner:long,group:long,argstr:string)
-nd_syscall.chroot(name:string,path:string,argstr:string)
-nd_syscall.clock_getres(name:string,clk_id:long,clk_id_str:string,res_uaddr:long,argstr:string)
-nd_syscall.clock_gettime(name:string,clk_id:long,clk_id_str:string,argstr:string)
-nd_syscall.clock_nanosleep(name:string,flags:long,flag_str:string,argstr:string)
-nd_syscall.clock_settime(name:string,clk_id:long,clk_id_str:string,tp_uaddr:long,argstr:string)
-nd_syscall.close(name:string,fd:long,argstr:string)
-nd_syscall.compat_adjtimex(name:string,argstr:string)
-nd_syscall.compat_clock_nanosleep(name:string,flags:long,flag_str:string,argstr:string)
-nd_syscall.compat_execve(name:string,filename:string,args:string,argstr:string)
-nd_syscall.compat_futex(name:string,futex_uaddr:long,op:long,val:long,utime_uaddr:long,uaddr2_uaddr:long,val3:long,argstr:string)
-nd_syscall.compat_futimesat(name:string,dirfd:long,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
-nd_syscall.compat_getitimer(name:string,which:long,value_uaddr:long,argstr:string)
-nd_syscall.compat_io_setup(name:string,maxevents:long,ctxp_uaddr:long,argstr:string)
-nd_syscall.compat_io_submit(name:string,ctx_id:long,nr:long,iocbpp_uaddr:long,argstr:string)
-nd_syscall.compat_sys_msgctl(name:string,argstr:string)
-nd_syscall.compat_sys_msgrcv(name:string,argstr:string)
-nd_syscall.compat_sys_msgsnd(name:string,argstr:string)
-nd_syscall.connect(name:string,sockfd:long,serv_addr_uaddr:long,addrlen:long,argstr:string)
-nd_syscall.creat(name:string,mode:long,pathname:string,argstr:string)
-nd_syscall.delete_module(name:string,name_user:string,flags:long,argstr:string)
-nd_syscall.dup(name:string,old_fd:long,argstr:string)
-nd_syscall.dup2(name:string,oldfd:long,newfd:long,argstr:string)
-nd_syscall.epoll_create(name:string,size:long,argstr:string)
-nd_syscall.epoll_ctl(name:string,epfd:long,op:long,op_str:string,fd:long,event_uaddr:long,argstr:string)
-nd_syscall.epoll_pwait(name:string,argstr:string)
-nd_syscall.epoll_wait(name:string,epfd:long,events_uaddr:long,maxevents:long,timeout:long,argstr:string)
-nd_syscall.eventfd(name:string,argstr:string)
-nd_syscall.execve(name:string,filename:string,args:string,argstr:string)
-nd_syscall.exit(name:string,status:long,argstr:string)
-nd_syscall.exit_group(name:string,status:long,argstr:string)
-nd_syscall.fadvise64(name:string,fs:long,offset:long,len:long,advice:long,argstr:string)
-nd_syscall.fadvise64_64(name:string,fs:long,offset:long,len:long,advice:long,argstr:string)
-nd_syscall.fchdir(name:string,fd:long,argstr:string)
-nd_syscall.fchmod(name:string,fildes:long,mode:long,argstr:string)
-nd_syscall.fchown(name:string,fd:long,owner:long,group:long,argstr:string)
-nd_syscall.fchown16(name:string,fd:long,owner:long,group:long,argstr:string)
-nd_syscall.fcntl(name:string,fd:long,cmd:long,cmd_str:string,arg:long,argstr:string)
-nd_syscall.fdatasync(name:string,fd:long,argstr:string)
-nd_syscall.fgetxattr(name:string,filedes:long,name2:string,value_uaddr:long,size:long,argstr:string)
-nd_syscall.flistxattr(name:string,filedes:long,list_uaddr:long,size:long,argstr:string)
-nd_syscall.flock(name:string,fd:long,operation:long,argstr:string)
-nd_syscall.fork(clone_flags:long,stack_start:long,regs:long,stack_size:long,parent_tid_uaddr:long,child_tid_uaddr:long,name:string,argstr:string)
-nd_syscall.fremovexattr(name:string,filedes:long,name_uaddr:long,argstr:string)
-nd_syscall.fsetxattr(name:string,filedes:long,name2:string,value_uaddr:long,size:long,flags:long,argstr:string)
-nd_syscall.fstat(name:string,filedes:long,buf_uaddr:long,argstr:string)
-nd_syscall.fstatat(name:string,dirfd:long,path:string,buf_uaddr:long,argstr:string)
-nd_syscall.fstatfs(name:string,fd:long,buf_uaddr:long,argstr:string)
-nd_syscall.fstatfs64(name:string,fd:long,sz:long,buf_uaddr:long,argstr:string)
-nd_syscall.fsync(name:string,fd:long,argstr:string)
-nd_syscall.ftruncate(name:string,fd:long,length:long,argstr:string)
-nd_syscall.futex(name:string,futex_uaddr:long,op:long,val:long,utime_uaddr:long,uaddr2_uaddr:long,val3:long,argstr:string)
-nd_syscall.futimesat(name:string,dirfd:long,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
-nd_syscall.get_mempolicy(name:string,policy_uaddr:long,nmask_uaddr:long,maxnode:long,addr:long,flags:long,argstr:string)
-nd_syscall.getcwd(name:string,buf_uaddr:long,size:long,argstr:string)
-nd_syscall.getdents(name:string,fd:long,dirp_uaddr:long,count:long,argstr:string)
-nd_syscall.getegid(name:string,argstr:string)
-nd_syscall.geteuid(name:string,argstr:string)
-nd_syscall.getgid(name:string,argstr:string)
-nd_syscall.getgroups(name:string,size:long,list_uaddr:long,argstr:string)
-nd_syscall.gethostname(name:string,name_uaddr:long,len:long,argstr:string)
-nd_syscall.getitimer(name:string,which:long,value_uaddr:long,argstr:string)
-nd_syscall.getpeername(name:string,s:long,name_uaddr:long,namelen_uaddr:long,argstr:string)
-nd_syscall.getpgid(name:string,pid:long,argstr:string)
-nd_syscall.getpgrp(name:string,argstr:string)
-nd_syscall.getpid(name:string,argstr:string)
-nd_syscall.getppid(name:string,argstr:string)
-nd_syscall.getpriority(name:string,which:long,who:long,argstr:string)
-nd_syscall.getresgid(name:string,rgid_uaddr:long,egid_uaddr:long,sgid_uaddr:long,argstr:string)
-nd_syscall.getresuid(name:string,ruid_uaddr:long,euid_uaddr:long,suid_uaddr:long,argstr:string)
-nd_syscall.getrlimit(name:string,resource:long,rlim_uaddr:long,argstr:string)
-nd_syscall.getrusage(name:string,who:long,who_str:string,usage_uaddr:long,argstr:string)
-nd_syscall.getsid(name:string,pid:long,argstr:string)
-nd_syscall.getsockname(name:string,s:long,name_uaddr:long,namelen_uaddr:long,argstr:string)
-nd_syscall.getsockopt(name:string,fd:long,level:long,level_str:string,optname:long,optname_str:string,optval_uaddr:long,optlen_uaddr:long,argstr:string)
-nd_syscall.gettid(name:string,argstr:string)
-nd_syscall.gettimeofday(name:string,tv_uaddr:long,tz_uaddr:long,argstr:string)
-nd_syscall.getuid(name:string,argstr:string)
-nd_syscall.getxattr(name:string,path:string,name2:string,value_uaddr:long,size:long,argstr:string)
-nd_syscall.init_module(name:string,umod_uaddr:long,len:long,uargs:string,argstr:string)
-nd_syscall.inotify_add_watch(name:string,fd:long,path_uaddr:long,path:string,mask:long,argstr:string)
-nd_syscall.inotify_init(name:string,argstr:string)
-nd_syscall.inotify_rm_watch(name:string,fd:long,wd:long,argstr:string)
-nd_syscall.io_cancel(name:string,ctx_id:long,iocb_uaddr:long,result_uaddr:long,argstr:string)
-nd_syscall.io_destroy(name:string,ctx:long,argstr:string)
-nd_syscall.io_getevents(name:string,ctx_id:long,min_nr:long,nr:long,events_uaddr:long,timeout_uaddr:long,timestr:string,argstr:string)
-nd_syscall.io_setup(name:string,maxevents:long,ctxp_uaddr:long,argstr:string)
-nd_syscall.io_submit(name:string,ctx_id:long,nr:long,iocbpp_uaddr:long,argstr:string)
-nd_syscall.ioctl(name:string,fd:long,request:long,argp:long,argstr:string)
-nd_syscall.ioperm(name:string,from:long,num:long,turn_on:long,argstr:string)
-nd_syscall.ioprio_get(name:string,which:long,who:long,argstr:string)
-nd_syscall.ioprio_set(name:string,which:long,who:long,ioprio:long,argstr:string)
-nd_syscall.kexec_load(name:string,entry:long,nr_segments:long,segments_uaddr:long,flags:long,argstr:string)
-nd_syscall.keyctl(name:string,argstr:string)
-nd_syscall.kill(name:string,pid:long,sig:long,argstr:string)
-nd_syscall.lchown(name:string,path:string,owner:long,group:long,argstr:string)
-nd_syscall.lchown16(name:string,path:string,owner:long,group:long,argstr:string)
-nd_syscall.lgetxattr(name:string,path:string,name2:string,value_uaddr:long,size:long,argstr:string)
-nd_syscall.link(name:string,oldpath:string,newpath:string,argstr:string)
-nd_syscall.listen(name:string,sockfd:long,backlog:long,argstr:string)
-nd_syscall.listxattr(name:string,path_uaddr:long,path:string,list_uaddr:long,size:long,argstr:string)
-nd_syscall.llistxattr(name:string,path_uaddr:long,path:string,list_uaddr:long,size:long,argstr:string)
-nd_syscall.llseek(name:string,fd:long,offset_high:long,offset_low:long,result_uaddr:long,whence:long,whence_str:string,argstr:string)
-nd_syscall.lookup_dcookie(name:string,cookie:long,buffer_uaddr:long,len:long,argstr:string)
-nd_syscall.lremovexattr(name:string,path_uaddr:long,path:string,name_uaddr:long,name2:string,argstr:string)
-nd_syscall.lseek(name:string,fildes:long,offset:long,whence:long,whence_str:string,argstr:string)
-nd_syscall.lsetxattr(name:string,path_uaddr:long,path:string,name_uaddr:long,name_str:string,value_uaddr:long,size:long,flags:long,argstr:string)
-nd_syscall.lstat(name:string,path:string,buf_uaddr:long,argstr:string)
-nd_syscall.madvise(name:string,start:long,length:long,advice:long,advice_str:string,argstr:string)
-nd_syscall.mbind(name:string,start:long,len:long,mode:long,nmask_uaddr:long,maxnode:long,flags:long,argstr:string)
-nd_syscall.migrate_pages(name:string,argstr:string)
-nd_syscall.mincore(name:string,start:long,length:long,vec_uaddr:long,argstr:string)
-nd_syscall.mkdir(name:string,pathname_uaddr:long,pathname:string,mode:long,argstr:string)
-nd_syscall.mkdirat(name:string,dirfd:long,pathname:string,mode:long,argstr:string)
-nd_syscall.mknod(name:string,pathname:string,mode:long,dev:long,argstr:string)
-nd_syscall.mlock(name:string,addr:long,len:long,argstr:string)
-nd_syscall.mlockall(name:string,flags:long,argstr:string)
-nd_syscall.modify_ldt(name:string,func:long,ptr_uaddr:long,bytecount:long,argstr:string)
-nd_syscall.mount(name:string,source:string,target:string,filesystemtype:string,mountflags:long,mountflags_str:string,data:string,argstr:string)
-nd_syscall.move_pages(name:string,argstr:string)
-nd_syscall.mprotect(name:string,addr:long,len:long,prot:long,prot_str:string,argstr:string)
-nd_syscall.mq_getsetattr(name:string,mqdes:long,u_mqstat_uaddr:long,u_omqstat_uaddr:long,argstr:string)
-nd_syscall.mq_notify(name:string,mqdes:long,notification_uaddr:long,argstr:string)
-nd_syscall.mq_open(name:string,name_uaddr:long,filename:string,mode:long,u_attr_uaddr:long,oflag:long,argstr:string)
-nd_syscall.mq_timedreceive(name:string,mqdes:long,msg_ptr_uaddr:long,msg_len:long,msg_prio_uaddr:long,abs_timout_uaddr:long,argstr:string)
-nd_syscall.mq_timedsend(name:string,mqdes:long,msg_ptr_uaddr:long,msg_len:long,msg_prio:long,abs_timeout_uaddr:long,argstr:string)
-nd_syscall.mq_unlink(name:string,u_name_uaddr:long,u_name:string,argstr:string)
-nd_syscall.mremap(name:string,old_address:long,old_size:long,new_size:long,flags:long,new_address:long,argstr:string)
-nd_syscall.msgctl(name:string,msqid:long,cmd:long,buf_uaddr:long,argstr:string)
-nd_syscall.msgget(name:string,key:long,msgflg:long,msgflg_str:string,argstr:string)
-nd_syscall.msgrcv(name:string,msqid:long,msgp_uaddr:long,msgsz:long,msgtyp:long,msgflg:long,argstr:string)
-nd_syscall.msgsnd(name:string,msqid:long,msgp_uaddr:long,msgsz:long,msgflg:long,argstr:string)
-nd_syscall.msync(name:string,start:long,length:long,flags:long,argstr:string)
-nd_syscall.munlock(name:string,addr:long,len:long,argstr:string)
-nd_syscall.munlockall(name:string,argstr:string)
-nd_syscall.munmap(name:string,start:long,length:long,argstr:string)
-vm.brk(address:long,length:long)
-vm.mmap(address:unknown,length:unknown)
-vm.munmap(address:long,length:long)
-vm.oom_kill(task:long)
-vm.pagefault(write_access:long,address:long)
-vm.write_shared(address:long)
-nfsd.close(filename:string,name:string,argstr:string)
-nfsd.commit(fh:string,count:long,offset:long,flag:long,name:string,argstr:string,size:long,units:string)
-nfsd.create(fh:string,filelen:long,filename:string,type:long,iap_valid:long,iap_mode:long,name:string,argstr:string)
-nfsd.createv3(fh:string,filelen:long,filename:string,iap_valid:long,iap_mode:long,truncp:long,verfier:long,createmode:long,name:string,argstr:string)
-nfsd.dispatch(client_ip:long,proto:long,version:long,xid:long,prog:long,proc:long,name:string,argstr:string)
-nfsd.entries(fh:string,access:long,type:long,name:string,argstr:string)
-nfsd.lookup(fh:string,filelen:long,filename:string,name:string,argstr:string)
-nfsd.open(fh:string,access:long,type:long,name:string,argstr:string)
-nfsd.read(fh:string,file:long,count:long,offset:long,vec:long,vlen:long,name:string,argstr:string,size:long,units:string)
-nfsd.rename(fh:string,tfh:string,filelen:long,filename:string,tlen:long,tname:string,name:string,argstr:string)
-nfsd.return(name:string,retstr:string)
-nfsd.unlink(fh:string,filelen:long,filename:string,type:long,name:string,argstr:string)
-nfsd.write(fh:string,file:long,count:long,offset:long,vec:long,vlen:long,name:string,argstr:string,size:long,units:string)
-process.begin)
-process.create(task:long,new_pid:long)
-process.end)
-process.exec(filename:string)
-process.exec_complete(errno:long,success:long)
-process.exit(code:long)
-process.release(task:long,pid:long)
-process.start)
-process.syscall)
-sunrpc.entry(name:string,progname:string,prog:long,vers:long,authflavor:long,servername:string,prot:long,port:long,argstr:string)
-sunrpc.return(name:string,retstr:string)
-scheduler.balance)
-scheduler.cpu_off(task_prev:unknown,task_next:unknown,idle:long)
-scheduler.cpu_on(task_prev:long,idle:long)
-scheduler.ctxswitch(prev_pid:unknown,next_pid:unknown,prev_task:unknown,next_task:unknown,prevtsk_state:unknown)
-scheduler.migrate(task:long,cpu_from:long,cpu_to:long)
-scheduler.tick(idle:long)
-scsi.iocompleted(host_no:long,channel:long,lun:long,dev_id:long,device_state:long,data_direction:long,req_addr:long,goodbytes:long)
-scsi.iodispatching(host_no:long,channel:long,lun:long,dev_id:long,device_state:long,data_direction:long,request_buffer:long,request_bufflen:long,req_addr:long)
-scsi.iodone(host_no:long,channel:long,lun:long,dev_id:long,device_state:long,data_direction:long,req_addr:long,scsi_timer_pending:long)
-scsi.ioentry(disk_major:long,disk_minor:long,device_state:long,req_addr:long)
-socket.aio_read(name:string,_sock:long,size:long,protocol:long,family:long,state:long,flags:long,type:long)
-socket.aio_write(name:string,_sock:long,size:long,protocol:long,family:long,state:long,flags:long,type:long)
-socket.close(name:string,protocol:long,family:long,state:long,flags:long,type:long)
-socket.create(name:string,protocol:long,family:long,type:long,requester:long)
-socket.receive(_dwarf_tvar_tid:long,_dwarf_tvar_sock_16_tmp:long,_dwarf_tvar_sock_17_tmp:long,_dwarf_tvar_sock_18_tmp:long,_dwarf_tvar_sock_19_tmp:long,_dwarf_tvar_sock_20_tmp:long,name:string,size:long,protocol:long,family:long,state:long,flags:long,type:long,success:long)
-socket.recvmsg(name:string,size:long,protocol:long,family:long,state:long,flags:long,type:long)
-socket.send(_dwarf_tvar_tid:long,_dwarf_tvar_sock_32_tmp:long,_dwarf_tvar_sock_33_tmp:long,_dwarf_tvar_sock_34_tmp:long,_dwarf_tvar_sock_35_tmp:long,_dwarf_tvar_sock_36_tmp:long,name:string,size:long,protocol:long,family:long,state:long,flags:long,type:long,success:long)
-socket.sendmsg(name:string,size:long,protocol:long,family:long,state:long,flags:long,type:long)
-kernel.function("sock_recvmsg@net/socket.c:649")(_dwarf_tvar_tid:long)
-kernel.function("sock_aio_read@net/socket.c:750")(_dwarf_tvar_tid:long)
-kernel.function("sock_sendmsg@net/socket.c:566")(_dwarf_tvar_tid:long)
-kernel.function("sock_aio_write@net/socket.c:792")(_dwarf_tvar_tid:long)
-begin(-1001)(num:long)
-end(idx0:string)
-tcp.disconnect(name:string,sock:long,flags:long)
-tcp.recvmsg(name:string,sock:long,size:long)
-tcp.sendmsg(name:string,sock:long,size:long)
-tcp.setsockopt(name:string,sock:long,level:long,optname:long,optstr:string,optlen:long)
-udp.disconnect(name:string,sock:long,flags:long)
-udp.recvmsg(name:string,sock:long,size:long)
-udp.sendmsg(name:string,sock:long,size:long)
-generic.fop.aio_read(file:long,dev:long,devname:string,ino:long,pos:long,count:long,buf:long,name:string,argstr:string,size:long,units:string)
-generic.fop.aio_write(file:long,dev:long,devname:string,ino:long,pos:long,count:long,buf:long,name:string,argstr:string,size:long,units:string)
-generic.fop.llseek(dev:long,devname:string,ino:long,file:long,offset:long,origin:long,maxbyte:long,name:string,argstr:string)
-generic.fop.mmap(file:long,dev:long,devname:string,ino:long,vm_start:long,vm_end:long,vm_flags:long,name:string,argstr:string)
-generic.fop.open(dev:long,devname:string,ino:long,filename:string,flag:long,size:long,name:string,argstr:string)
-generic.fop.splice_read(dev:long,devname:string,ino:long,file:long,len:long,flags:long,name:string,argstr:string,size:long,units:string)
-generic.fop.splice_write(dev:long,devname:string,ino:long,file:long,len:long,flags:long,name:string,argstr:string,size:long,units:string)
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local-feature/.project b/systemtap/org.eclipse.linuxtools.systemtap.local-feature/.project
new file mode 100644
index 0000000000..b3cfb4bf36
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local-feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.systemtap.local-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/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.local-feature/build.properties
index 0c6ef87303..0c6ef87303 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/build.properties
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local-feature/build.properties
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/epl-v10.html b/systemtap/org.eclipse.linuxtools.systemtap.local-feature/epl-v10.html
index 9321f4082e..9321f4082e 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/epl-v10.html
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local-feature/epl-v10.html
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local-feature/feature.properties b/systemtap/org.eclipse.linuxtools.systemtap.local-feature/feature.properties
new file mode 100644
index 0000000000..fc10012e06
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local-feature/feature.properties
@@ -0,0 +1,114 @@
+#*******************************************************************************
+# 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, Inc. - initial API and implementation
+#********************************************************************************
+featureName=SystemTap C/C++ Visualization Tool (Incubation)
+featureProvider=Eclipse
+description=Graphically displays the call hierarchy from executing a C/C++ binary, along with various other runtime statistics.
+copyright=Copyright (c) 2009 Red Hat, Inc.\n\
+All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html
+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 \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local-feature/feature.xml b/systemtap/org.eclipse.linuxtools.systemtap.local-feature/feature.xml
new file mode 100644
index 0000000000..90fcba52d8
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local-feature/feature.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.linuxtools.systemtap.local"
+ label="%featureName"
+ version="0.0.1.qualifier"
+ provider-name="%featureProvider">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="http://www.eclipse.org/legal/epl-v10.html">
+ %license
+ </license>
+
+ <requires>
+ <import plugin="org.eclipse.ui"/>
+ <import plugin="org.eclipse.core.runtime"/>
+ <import plugin="org.eclipse.cdt.core"/>
+ <import plugin="org.eclipse.cdt.debug.core"/>
+ <import plugin="org.eclipse.cdt.launch"/>
+ <import plugin="org.eclipse.cdt.ui"/>
+ <import plugin="org.eclipse.core.resources"/>
+ <import plugin="org.eclipse.debug.core"/>
+ <import plugin="org.eclipse.debug.ui"/>
+ <import plugin="org.eclipse.jface.text"/>
+ <import plugin="org.eclipse.ui.ide"/>
+ <import plugin="org.eclipse.ui.console"/>
+ <import plugin="org.eclipse.ui.editors"/>
+ <import plugin="org.eclipse.draw2d"/>
+ <import plugin="org.eclipse.zest.layouts"/>
+ <import plugin="org.eclipse.zest.core"/>
+ <import plugin="org.eclipse.core.filesystem"/>
+ </requires>
+
+ <plugin
+ id="org.eclipse.linuxtools.profiling.launch"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.systemtap.local.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.systemtap.local.callgraph"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.systemtap.local.launch"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/.classpath
new file mode 100644
index 0000000000..ad32c83a78
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.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/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/.project b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/.project
new file mode 100644
index 0000000000..8bb007b39a
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.systemtap.local.callgraph.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.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/.settings/org.eclipse.jdt.core.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..5270881c3f
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Mon Sep 21 12:34:05 EDT 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..939da5b7ae
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Tests
+Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.local.callgraph.tests; singleton:=true
+Bundle-Version: 0.0.1.qualifier
+Bundle-Activator: org.eclipse.linuxtools.systemtap.local.callgraph.tests.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.draw2d,
+ org.eclipse.linuxtools.systemtap.local.callgraph;bundle-version="0.0.1",
+ org.junit
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Import-Package: org.eclipse.cdt.core.model,
+ org.eclipse.linuxtools.systemtap.local.core,
+ org.eclipse.zest.core.widgets,
+ org.eclipse.zest.layouts,
+ org.eclipse.zest.layouts.algorithms
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/basic.graph b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/basic.graph
new file mode 100644
index 0000000000..f40f0cbc11
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/basic.graph
@@ -0,0 +1,6 @@
+
+PROBE_BEGIN
+eag
+<main,,1,,1253642348832787256;<foo,,2,,1253642348832800639;>foo,,1253642348832807674;>main,,1253642348832811601;
+1253642348832817971
+30715 \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/build.properties
new file mode 100644
index 0000000000..c6baffa001
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ icons/
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/catlan.graph b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/catlan.graph
new file mode 100644
index 0000000000..3ab50c2871
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/catlan.graph
@@ -0,0 +1,6 @@
+
+PROBE_BEGIN
+eag
+<main,,1,,1253642412717911933;<catlan,,2,,1253642412717925326;<catlan,,3,,1253642412717935566;<catlan,,4,,1253642412717944129;<catlan,,5,,1253642412717952833;<catlan,,6,,1253642412717961350;<catlan,,7,,1253642412717969909;>catlan,,1253642412717975575;<catlan,,8,,1253642412717982613;>catlan,,1253642412717988032;>catlan,,1253642412717991647;<catlan,,9,,1253642412717998252;>catlan,,1253642412718003749;<catlan,,10,,1253642412718010330;>catlan,,1253642412718015806;<catlan,,11,,1253642412718022399;<catlan,,12,,1253642412718030940;>catlan,,1253642412718036387;<catlan,,13,,1253642412718042961;>catlan,,1253642412718048489;>catlan,,1253642412718051966;>catlan,,1253642412718055421;<catlan,,14,,1253642412718061905;>catlan,,1253642412718067343;<catlan,,15,,1253642412718073881;<catlan,,16,,1253642412718082492;>catlan,,1253642412718087950;<catlan,,17,,1253642412718094603;>catlan,,1253642412718109066;>catlan,,1253642412718113093;<catlan,,18,,1253642412718119950;<catlan,,19,,1253642412718128522;>catlan,,1253642412718133938;<catlan,,20,,1253642412718140537;>catlan,,1253642412718145992;>catlan,,1253642412718149511;<catlan,,21,,1253642412718156100;>catlan,,1253642412718161475;<catlan,,22,,1253642412718168106;<catlan,,23,,1253642412718176633;<catlan,,24,,1253642412718185165;>catlan,,1253642412718190648;<catlan,,25,,1253642412718197291;>catlan,,1253642412718202828;>catlan,,1253642412718206326;<catlan,,26,,1253642412718212993;>catlan,,1253642412718218350;<catlan,,27,,1253642412718224942;>catlan,,1253642412718230292;<catlan,,28,,1253642412718236849;<catlan,,29,,1253642412718245432;>catlan,,1253642412718250903;<catlan,,30,,1253642412718257537;>catlan,,1253642412718262975;>catlan,,1253642412718266930;>catlan,,1253642412718287059;>catlan,,1253642412718290848;<catlan,,31,,1253642412718298051;>catlan,,1253642412718303690;<catlan,,32,,1253642412718310301;<catlan,,33,,1253642412718318860;<catlan,,34,,1253642412718327347;>catlan,,1253642412718332905;<catlan,,35,,1253642412718339525;>catlan,,1253642412718345019;>catlan,,1253642412718348511;<catlan,,36,,1253642412718355149;>catlan,,1253642412718360592;<catlan,,37,,1253642412718367227;>catlan,,1253642412718372682;<catlan,,38,,1253642412718379287;<catlan,,39,,1253642412718387804;>catlan,,1253642412718393293;<catlan,,40,,1253642412718399904;>catlan,,1253642412718405458;>catlan,,1253642412718408944;>catlan,,1253642412718412469;<catlan,,41,,1253642412718419058;<catlan,,42,,1253642412718427597;>catlan,,1253642412718433109;<catlan,,43,,1253642412718439666;>catlan,,1253642412718445127;>catlan,,1253642412718448679;<catlan,,44,,1253642412718455389;<catlan,,45,,1253642412718463888;>catlan,,1253642412718469419;<catlan,,46,,1253642412718475981;>catlan,,1253642412718481416;>catlan,,1253642412718484974;<catlan,,47,,1253642412718491578;<catlan,,48,,1253642412718500098;<catlan,,49,,1253642412718508607;>catlan,,1253642412718514038;<catlan,,50,,1253642412718520679;>catlan,,1253642412718526134;>catlan,,1253642412718529647;<catlan,,51,,1253642412718536221;>catlan,,1253642412718541734;<catlan,,52,,1253642412718548381;>catlan,,1253642412718553824;<catlan,,53,,1253642412718560435;<catlan,,54,,1253642412718568940;>catlan,,1253642412718574314;<catlan,,55,,1253642412718581036;>catlan,,1253642412718586507;>catlan,,1253642412718590044;>catlan,,1253642412718593511;<catlan,,56,,1253642412718600083;>catlan,,1253642412718605544;<catlan,,57,,1253642412718612194;<catlan,,58,,1253642412718620750;<catlan,,59,,1253642412718629316;<catlan,,60,,1253642412718637809;>catlan,,1253642412718643345;<catlan,,61,,1253642412718649980;>catlan,,1253642412718655511;>catlan,,1253642412718659003;<catlan,,62,,1253642412718665508;>catlan,,1253642412718671069;<catlan,,63,,1253642412718677589;>catlan,,1253642412718683126;<catlan,,64,,1253642412718689784;<catlan,,65,,1253642412718698362;>catlan,,1253642412718703832;<catlan,,66,,1253642412718710404;>catlan,,1253642412718715817;>catlan,,1253642412718719339;>catlan,,1253642412718722741;<catlan,,67,,1253642412718729369;>catlan,,1253642412718734816;<catlan,,68,,1253642412718741456;<catlan,,69,,1253642412718749967;>catlan,,1253642412718755555;<catlan,,70,,1253642412718762175;>catlan,,1253642412718767826;>catlan,,1253642412718771330;<catlan,,71,,1253642412718777868;<catlan,,72,,1253642412718786352;>catlan,,1253642412718791793;<catlan,,73,,1253642412718798445;>catlan,,1253642412718803892;>catlan,,1253642412718807330;<catlan,,74,,1253642412718813943;>catlan,,1253642412718819501;<catlan,,75,,1253642412718826063;<catlan,,76,,1253642412718834653;<catlan,,77,,1253642412718843149;>catlan,,1253642412718848559;<catlan,,78,,1253642412718855095;>catlan,,1253642412718860592;>catlan,,1253642412718864042;<catlan,,79,,1253642412718870682;>catlan,,1253642412718876063;<catlan,,80,,1253642412718882646;>catlan,,1253642412718888051;<catlan,,81,,1253642412718894634;<catlan,,82,,1253642412718903176;>catlan,,1253642412718908574;<catlan,,83,,1253642412718915167;>catlan,,1253642412718920601;>catlan,,1253642412718924045;>catlan,,1253642412718927600;>catlan,,1253642412718931022;>catlan,,1253642412718934475;<catlan,,84,,1253642412718941040;>catlan,,1253642412718946556;<catlan,,85,,1253642412718953079;<catlan,,86,,1253642412718961683;<catlan,,87,,1253642412718970074;<catlan,,88,,1253642412718978589;>catlan,,1253642412718984071;<catlan,,89,,1253642412718990739;>catlan,,1253642412718996153;>catlan,,1253642412718999602;<catlan,,90,,1253642412719006149;>catlan,,1253642412719011719;<catlan,,91,,1253642412719018390;>catlan,,1253642412719023836;<catlan,,92,,1253642412719030405;<catlan,,93,,1253642412719038922;>catlan,,1253642412719044378;<catlan,,94,,1253642412719051000;>catlan,,1253642412719056612;>catlan,,1253642412719060071;>catlan,,1253642412719063551;<catlan,,95,,1253642412719070140;>catlan,,1253642412719075650;<catlan,,96,,1253642412719082305;<catlan,,97,,1253642412719090669;>catlan,,1253642412719096167;<catlan,,98,,1253642412719107443;>catlan,,1253642412719113365;>catlan,,1253642412719116976;<catlan,,99,,1253642412719123605;<catlan,,100,,1253642412719132212;>catlan,,1253642412719137674;<catlan,,101,,1253642412719144456;>catlan,,1253642412719149966;>catlan,,1253642412719153545;<catlan,,102,,1253642412719160068;>catlan,,1253642412719165545;<catlan,,103,,1253642412719172152;<catlan,,104,,1253642412719180660;<catlan,,105,,1253642412719189196;>catlan,,1253642412719194603;<catlan,,106,,1253642412719201174;>catlan,,1253642412719206642;>catlan,,1253642412719210077;<catlan,,107,,1253642412719216624;>catlan,,1253642412719222070;<catlan,,108,,1253642412719229998;>catlan,,1253642412719235622;<catlan,,109,,1253642412719242230;<catlan,,110,,1253642412719250876;>catlan,,1253642412719256374;<catlan,,111,,1253642412719262918;>catlan,,1253642412719268314;>catlan,,1253642412719271754;>catlan,,1253642412719275171;>catlan,,1253642412719278587;<catlan,,112,,1253642412719285129;<catlan,,113,,1253642412719293787;>catlan,,1253642412719299219;<catlan,,114,,1253642412719305700;>catlan,,1253642412719311068;>catlan,,1253642412719314599;<catlan,,115,,1253642412719321141;<catlan,,116,,1253642412719329844;<catlan,,117,,1253642412719338338;>catlan,,1253642412719343826;<catlan,,118,,1253642412719350398;>catlan,,1253642412719355976;>catlan,,1253642412719359426;<catlan,,119,,1253642412719366003;>catlan,,1253642412719371453;<catlan,,120,,1253642412719378064;>catlan,,1253642412719383444;<catlan,,121,,1253642412719390051;<catlan,,122,,1253642412719398593;>catlan,,1253642412719404078;<catlan,,123,,1253642412719410662;>catlan,,1253642412719416193;>catlan,,1253642412719419633;>catlan,,1253642412719423116;<catlan,,124,,1253642412719429750;<catlan,,125,,1253642412719438361;<catlan,,126,,1253642412719446791;>catlan,,1253642412719452222;<catlan,,127,,1253642412719458749;>catlan,,1253642412719464202;>catlan,,1253642412719467690;<catlan,,128,,1253642412719474195;>catlan,,1253642412719479693;<catlan,,129,,1253642412719486283;>catlan,,1253642412719491693;<catlan,,130,,1253642412719498313;<catlan,,131,,1253642412719506860;>catlan,,1253642412719512348;<catlan,,132,,1253642412719518941;>catlan,,1253642412719524454;>catlan,,1253642412719527882;>catlan,,1253642412719531371;<catlan,,133,,1253642412719537876;<catlan,,134,,1253642412719546556;>catlan,,1253642412719552035;<catlan,,135,,1253642412719558736;>catlan,,1253642412719564180;>catlan,,1253642412719567692;<catlan,,136,,1253642412719574174;<catlan,,137,,1253642412719582793;<catlan,,138,,1253642412719591307;<catlan,,139,,1253642412719599792;>catlan,,1253642412719605226;<catlan,,140,,1253642412719611912;>catlan,,1253642412719617394;>catlan,,1253642412719620943;<catlan,,141,,1253642412719627500;>catlan,,1253642412719633045;<catlan,,142,,1253642412719639668;>catlan,,1253642412719645151;<catlan,,143,,1253642412719651764;<catlan,,144,,1253642412719660303;>catlan,,1253642412719665713;<catlan,,145,,1253642412719672290;>catlan,,1253642412719677752;>catlan,,1253642412719681223;>catlan,,1253642412719684651;<catlan,,146,,1253642412719691172;>catlan,,1253642412719696678;<catlan,,147,,1253642412719703400;<catlan,,148,,1253642412719712074;>catlan,,1253642412719717568;<catlan,,149,,1253642412719724134;>catlan,,1253642412719729550;>catlan,,1253642412719733069;<catlan,,150,,1253642412719739565;<catlan,,151,,1253642412719748290;>catlan,,1253642412719753704;<catlan,,152,,1253642412719760311;>catlan,,1253642412719765746;>catlan,,1253642412719769267;<catlan,,153,,1253642412719775791;>catlan,,1253642412719781361;<catlan,,154,,1253642412719787950;<catlan,,155,,1253642412719796633;<catlan,,156,,1253642412719805177;>catlan,,1253642412719810705;<catlan,,157,,1253642412719817372;>catlan,,1253642412719822915;>catlan,,1253642412719826431;<catlan,,158,,1253642412719833122;>catlan,,1253642412719838653;<catlan,,159,,1253642412719845348;>catlan,,1253642412719850879;<catlan,,160,,1253642412719857516;<catlan,,161,,1253642412719866058;>catlan,,1253642412719871574;<catlan,,162,,1253642412719878172;>catlan,,1253642412719883748;>catlan,,1253642412719887237;>catlan,,1253642412719890716;>catlan,,1253642412719894175;<catlan,,163,,1253642412719900906;>catlan,,1253642412719906427;<catlan,,164,,1253642412719913125;<catlan,,165,,1253642412719921672;<catlan,,166,,1253642412719930253;<catlan,,167,,1253642412719938704;<catlan,,168,,1253642412719947236;>catlan,,1253642412719952683;<catlan,,169,,1253642412719959326;>catlan,,1253642412719964749;>catlan,,1253642412719968237;<catlan,,170,,1253642412719974830;>catlan,,1253642412719980445;<catlan,,171,,1253642412719987034;>catlan,,1253642412719992499;<catlan,,172,,1253642412719999070;<catlan,,173,,1253642412720007633;>catlan,,1253642412720013070;<catlan,,174,,1253642412720019756;>catlan,,1253642412720025248;>catlan,,1253642412720028691;>catlan,,1253642412720032105;<catlan,,175,,1253642412720038793;>catlan,,1253642412720044234;<catlan,,176,,1253642412720050790;<catlan,,177,,1253642412720059287;>catlan,,1253642412720064884;<catlan,,178,,1253642412720071476;>catlan,,1253642412720076956;>catlan,,1253642412720080390;<catlan,,179,,1253642412720086889;<catlan,,180,,1253642412720095304;>catlan,,1253642412720100745;<catlan,,181,,1253642412720124363;>catlan,,1253642412720129875;>catlan,,1253642412720133316;<catlan,,182,,1253642412720139818;>catlan,,1253642412720145238;<catlan,,183,,1253642412720151752;<catlan,,184,,1253642412720160314;<catlan,,185,,1253642412720168798;>catlan,,1253642412720174350;<catlan,,186,,1253642412720180862;>catlan,,1253642412720186416;>catlan,,1253642412720189926;<catlan,,187,,1253642412720196609;>catlan,,1253642412720201995;<catlan,,188,,1253642412720208479;>catlan,,1253642412720213872;<catlan,,189,,1253642412720220431;<catlan,,190,,1253642412720230055;>catlan,,1253642412720235697;<catlan,,191,,1253642412720242365;>catlan,,1253642412720247842;>catlan,,1253642412720251324;>catlan,,1253642412720254885;>catlan,,1253642412720258317;<catlan,,192,,1253642412720265014;>catlan,,1253642412720270539;<catlan,,193,,1253642412720277123;<catlan,,194,,1253642412720285634;<catlan,,195,,1253642412720294148;>catlan,,1253642412720299534;<catlan,,196,,1253642412720306268;>catlan,,1253642412720311679;>catlan,,1253642412720315213;<catlan,,197,,1253642412720321742;>catlan,,1253642412720327291;<catlan,,198,,1253642412720333793;>catlan,,1253642412720339261;<catlan,,199,,1253642412720345799;<catlan,,200,,1253642412720354433;>catlan,,1253642412720359916;<catlan,,201,,1253642412720366479;>catlan,,1253642412720371886;>catlan,,1253642412720375387;>catlan,,1253642412720378788;<catlan,,202,,1253642412720385305;<catlan,,203,,1253642412720393892;>catlan,,1253642412720399438;<catlan,,204,,1253642412720406012;>catlan,,1253642412720411597;>catlan,,1253642412720415077;<catlan,,205,,1253642412720421657;<catlan,,206,,1253642412720430147;>catlan,,1253642412720435666;<catlan,,207,,1253642412720442204;>catlan,,1253642412720447687;>catlan,,1253642412720451137;<catlan,,208,,1253642412720457687;<catlan,,209,,1253642412720466279;<catlan,,210,,1253642412720474791;>catlan,,1253642412720480291;<catlan,,211,,1253642412720486875;>catlan,,1253642412720492348;>catlan,,1253642412720495798;<catlan,,212,,1253642412720502345;>catlan,,1253642412720507768;<catlan,,213,,1253642412720514436;>catlan,,1253642412720519966;<catlan,,214,,1253642412720526622;<catlan,,215,,1253642412720535175;>catlan,,1253642412720540571;<catlan,,216,,1253642412720547166;>catlan,,1253642412720552700;>catlan,,1253642412720556126;>catlan,,1253642412720559677;<catlan,,217,,1253642412720566231;>catlan,,1253642412720571797;<catlan,,218,,1253642412720578435;<catlan,,219,,1253642412720586901;<catlan,,220,,1253642412720595391;<catlan,,221,,1253642412720603903;>catlan,,1253642412720609352;<catlan,,222,,1253642412720615936;>catlan,,1253642412720621331;>catlan,,1253642412720624835;<catlan,,223,,1253642412720631397;>catlan,,1253642412720636802;<catlan,,224,,1253642412720643358;>catlan,,1253642412720648847;<catlan,,225,,1253642412720655358;<catlan,,226,,1253642412720663923;>catlan,,1253642412720669304;<catlan,,227,,1253642412720675980;>catlan,,1253642412720681457;>catlan,,1253642412720684982;>catlan,,1253642412720688452;<catlan,,228,,1253642412720695093;>catlan,,1253642412720700588;<catlan,,229,,1253642412720707267;<catlan,,230,,1253642412720715830;>catlan,,1253642412720721246;<catlan,,231,,1253642412720727845;>catlan,,1253642412720733418;>catlan,,1253642412720736861;<catlan,,232,,1253642412720743439;<catlan,,233,,1253642412720751929;>catlan,,1253642412720757390;<catlan,,234,,1253642412720763989;>catlan,,1253642412720769468;>catlan,,1253642412720772978;<catlan,,235,,1253642412720779592;>catlan,,1253642412720785083;<catlan,,236,,1253642412720791742;<catlan,,237,,1253642412720800196;<catlan,,238,,1253642412720808659;>catlan,,1253642412720814094;<catlan,,239,,1253642412720820644;>catlan,,1253642412720826124;>catlan,,1253642412720829739;<catlan,,240,,1253642412720836316;>catlan,,1253642412720841919;<catlan,,241,,1253642412720848530;>catlan,,1253642412720854006;<catlan,,242,,1253642412720860590;<catlan,,243,,1253642412720869197;>catlan,,1253642412720874593;<catlan,,244,,1253642412720881260;>catlan,,1253642412720886740;>catlan,,1253642412720890229;>catlan,,1253642412720893621;>catlan,,1253642412720896996;>catlan,,1253642412720900511;>catlan,,1253642412720903898;>main,,1253642412722440674;
+1253642412722448040
+4536107 \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/eag.graph b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/eag.graph
new file mode 100644
index 0000000000..49135620bb
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/eag.graph
@@ -0,0 +1,6 @@
+
+PROBE_BEGIN
+eag
+<main,,1,,1253642440673012134;<callThisOnce,,2,,1253642440673025906;>callThisOnce,,1253642440673033205;<callThisTwice,,3,,1253642440673041635;>callThisTwice,,1253642440673048612;<callThisTwice,,4,,1253642440673055457;>callThisTwice,,1253642440673060982;<callThisThirtyTimes,,5,,1253642440673069187;>callThisThirtyTimes,,1253642440673076110;<callThisThirtyTimes,,6,,1253642440673082940;>callThisThirtyTimes,,1253642440673088573;<callThisThirtyTimes,,7,,1253642440673095259;>callThisThirtyTimes,,1253642440673100820;<callThisThirtyTimes,,8,,1253642440673109301;>callThisThirtyTimes,,1253642440673114862;<callThisThirtyTimes,,9,,1253642440673121508;>callThisThirtyTimes,,1253642440673127051;<callThisThirtyTimes,,10,,1253642440673133797;>callThisThirtyTimes,,1253642440673139286;<callThisThirtyTimes,,11,,1253642440673146079;>callThisThirtyTimes,,1253642440673151713;<callThisThirtyTimes,,12,,1253642440673158392;>callThisThirtyTimes,,1253642440673163947;<callThisThirtyTimes,,13,,1253642440673170594;>callThisThirtyTimes,,1253642440673176013;<callThisThirtyTimes,,14,,1253642440673182789;>callThisThirtyTimes,,1253642440673188353;<callThisThirtyTimes,,15,,1253642440673194981;>callThisThirtyTimes,,1253642440673200593;<callThisThirtyTimes,,16,,1253642440673207387;>callThisThirtyTimes,,1253642440673212960;<callThisThirtyTimes,,17,,1253642440673219739;>callThisThirtyTimes,,1253642440673246186;<callThisThirtyTimes,,18,,1253642440673254258;>callThisThirtyTimes,,1253642440673259981;<callThisThirtyTimes,,19,,1253642440673266718;>callThisThirtyTimes,,1253642440673272231;<callThisThirtyTimes,,20,,1253642440673278916;>callThisThirtyTimes,,1253642440673284549;<callThisThirtyTimes,,21,,1253642440673291358;>callThisThirtyTimes,,1253642440673296919;<callThisThirtyTimes,,22,,1253642440673303641;>callThisThirtyTimes,,1253642440673309184;<callThisThirtyTimes,,23,,1253642440673315873;>callThisThirtyTimes,,1253642440673321340;<callThisThirtyTimes,,24,,1253642440673328065;>callThisThirtyTimes,,1253642440673333641;<callThisThirtyTimes,,25,,1253642440673340308;>callThisThirtyTimes,,1253642440673345815;<callThisThirtyTimes,,26,,1253642440673352624;>callThisThirtyTimes,,1253642440673358062;<callThisThirtyTimes,,27,,1253642440673364817;>callThisThirtyTimes,,1253642440673370393;<callThisThirtyTimes,,28,,1253642440673377102;>callThisThirtyTimes,,1253642440673382648;<callThisThirtyTimes,,29,,1253642440673389511;>callThisThirtyTimes,,1253642440673395060;<callThisThirtyTimes,,30,,1253642440673401806;>callThisThirtyTimes,,1253642440673407373;<callThisThirtyTimes,,31,,1253642440673414056;>callThisThirtyTimes,,1253642440673419634;<callThisThirtyTimes,,32,,1253642440673426449;>callThisThirtyTimes,,1253642440673431938;<callThisThirtyTimes,,33,,1253642440673438699;>callThisThirtyTimes,,1253642440673444230;<callThisThirtyTimes,,34,,1253642440673450964;>callThisThirtyTimes,,1253642440673456413;<hasOneChild,,35,,1253642440673464843;<callThisOnce,,36,,1253642440673504942;>callThisOnce,,1253642440673510584;>hasOneChild,,1253642440673514133;<hasTwoDifferentChildren,,37,,1253642440673522199;<hasOneChild,,38,,1253642440673563062;<callThisOnce,,39,,1253642440673602797;>callThisOnce,,1253642440673608244;>hasOneChild,,1253642440673611781;<callThisOnce,,40,,1253642440673618364;>callThisOnce,,1253642440673623856;>hasTwoDifferentChildren,,1253642440673627483;<chainOfFifty,,41,,1253642440673635645;<chainOfFifty,,42,,1253642440673645666;<chainOfFifty,,43,,1253642440673654285;<chainOfFifty,,44,,1253642440673662872;<chainOfFifty,,45,,1253642440673671488;<chainOfFifty,,46,,1253642440673680138;<chainOfFifty,,47,,1253642440673688854;<chainOfFifty,,48,,1253642440673697473;<chainOfFifty,,49,,1253642440673706144;<chainOfFifty,,50,,1253642440673714688;<chainOfFifty,,51,,1253642440673723281;<chainOfFifty,,52,,1253642440673731921;<chainOfFifty,,53,,1253642440673740883;<chainOfFifty,,54,,1253642440673749723;<chainOfFifty,,55,,1253642440673758505;<chainOfFifty,,56,,1253642440673767100;<chainOfFifty,,57,,1253642440673775810;<chainOfFifty,,58,,1253642440673784474;<chainOfFifty,,59,,1253642440673792997;<chainOfFifty,,60,,1253642440673801761;<chainOfFifty,,61,,1253642440673810321;<chainOfFifty,,62,,1253642440673818889;<chainOfFifty,,63,,1253642440673827491;<chainOfFifty,,64,,1253642440673835924;<chainOfFifty,,65,,1253642440673844609;<chainOfFifty,,66,,1253642440673853157;<chainOfFifty,,67,,1253642440673861899;<chainOfFifty,,68,,1253642440673870645;<chainOfFifty,,69,,1253642440673879168;<chainOfFifty,,70,,1253642440673887845;<chainOfFifty,,71,,1253642440673896284;<chainOfFifty,,72,,1253642440673904961;<chainOfFifty,,73,,1253642440673913463;<chainOfFifty,,74,,1253642440673921935;<chainOfFifty,,75,,1253642440673930404;<chainOfFifty,,76,,1253642440673938945;<chainOfFifty,,77,,1253642440673947553;<chainOfFifty,,78,,1253642440673956145;<chainOfFifty,,79,,1253642440673964768;<chainOfFifty,,80,,1253642440673973312;<chainOfFifty,,81,,1253642440673981929;<chainOfFifty,,82,,1253642440673990711;<chainOfFifty,,83,,1253642440673999390;<chainOfFifty,,84,,1253642440674007856;<chainOfFifty,,85,,1253642440674016398;<chainOfFifty,,86,,1253642440674024945;<chainOfFifty,,87,,1253642440674033495;<chainOfFifty,,88,,1253642440674042415;<chainOfFifty,,89,,1253642440674051125;<chainOfFifty,,90,,1253642440674059757;<chainOfFifty,,91,,1253642440674068271;>chainOfFifty,,1253642440674074072;>chainOfFifty,,1253642440674077874;>chainOfFifty,,1253642440674081537;>chainOfFifty,,1253642440674085200;>chainOfFifty,,1253642440674088927;>chainOfFifty,,1253642440674092605;>chainOfFifty,,1253642440674096250;>chainOfFifty,,1253642440674099889;>chainOfFifty,,1253642440674103736;>chainOfFifty,,1253642440674107405;>chainOfFifty,,1253642440674111095;>chainOfFifty,,1253642440674114695;>chainOfFifty,,1253642440674118283;>chainOfFifty,,1253642440674121910;>chainOfFifty,,1253642440674125618;>chainOfFifty,,1253642440674129215;>chainOfFifty,,1253642440674132806;>chainOfFifty,,1253642440674136439;>chainOfFifty,,1253642440674140117;>chainOfFifty,,1253642440674143846;>chainOfFifty,,1253642440674147425;>chainOfFifty,,1253642440674151098;>chainOfFifty,,1253642440674154824;>chainOfFifty,,1253642440674158454;>chainOfFifty,,1253642440674162078;>chainOfFifty,,1253642440674165678;>chainOfFifty,,1253642440674169305;>chainOfFifty,,1253642440674172890;>chainOfFifty,,1253642440674176484;>chainOfFifty,,1253642440674180159;>chainOfFifty,,1253642440674183924;>chainOfFifty,,1253642440674187557;>chainOfFifty,,1253642440674191239;>chainOfFifty,,1253642440674194842;>chainOfFifty,,1253642440674198559;>chainOfFifty,,1253642440674202204;>chainOfFifty,,1253642440674205897;>chainOfFifty,,1253642440674209476;>chainOfFifty,,1253642440674213133;>chainOfFifty,,1253642440674216826;>chainOfFifty,,1253642440674220457;>chainOfFifty,,1253642440674224162;>chainOfFifty,,1253642440674232376;>chainOfFifty,,1253642440674236178;>chainOfFifty,,1253642440674239775;>chainOfFifty,,1253642440674243465;>chainOfFifty,,1253642440674247176;>chainOfFifty,,1253642440674250797;>chainOfFifty,,1253642440674254469;>chainOfFifty,,1253642440674258088;>chainOfFifty,,1253642440674261820;<abcdefghijklmnopqrstuvwxyz,,92,,1253642440674270132;>abcdefghijklmnopqrstuvwxyz,,1253642440674277146;<finalCall,,93,,1253642440674285356;>finalCall,,1253642440674292127;>main,,1253642440674295760;
+1253642440674312367
+1300233 \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/sample.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/icons/sample.gif
index 34fb3c9d8c..34fb3c9d8c 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/sample.gif
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/icons/sample.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/makefile b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/makefile
new file mode 100644
index 0000000000..a9983e7b40
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/makefile
@@ -0,0 +1,30 @@
+CC=gcc
+CPLUS=g++
+CFLAGS=-g -c -Wall
+OFLAG=-o
+
+all: catlan basic eag
+ make clean
+
+eag : eag.o
+ $(CPLUS) $(OFLAG) eag eag.o
+
+catlan: catlan.o
+ $(CC) $(OFLAG) catlan catlan.o
+
+basic: basic.o
+ $(CC) $(OFLAG) basic basic.o
+
+
+eag.o : eag.c
+ $(CPLUS) $(CFLAGS) eag.c
+
+catlan.o: catlan.c
+ $(CC) $(CFLAGS) catlan.c
+
+basic.o: basic.c
+ $(CC) $(CFLAGS) basic.c
+
+clean:
+ rm catlan.o basic.o eag.o
+
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/parse_function_nomark.stp b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/parse_function_nomark.stp
new file mode 100644
index 0000000000..34b01b6ca1
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/parse_function_nomark.stp
@@ -0,0 +1,43 @@
+global serial
+global startTime
+global finalTime
+
+probe process(@1).function("*"){
+ callFunction(probefunc())
+}
+
+probe process(@1).function("*").return{
+ returnFunction(probefunc())
+}
+
+probe begin {
+ printf("PROBE_BEGIN\n");
+ printf("testing\n");
+}
+
+function callFunction(probefunc) {
+ if (startTime == 0) {
+ startTime = gettimeofday_ns()
+ printf("<%s,,%d,,%d;", probefunc, serial, startTime)
+ } else
+ printf("<%s,,%d,,%d;", probefunc, serial, gettimeofday_ns())
+ serial++
+}
+
+
+function returnFunction(probefunc) {
+ finalTime = gettimeofday_ns()
+ printf(">%s,,%d;", probefunc, finalTime)
+}
+
+probe syscall.exit {
+ if (pid() == target()) {
+ finalTime = gettimeofday_ns()
+ }
+}
+
+probe end {
+ printf("\n%d",finalTime);
+ printf("\n%d",finalTime - startTime);
+ exit()
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/Activator.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/Activator.java
new file mode 100644
index 0000000000..f1ccb45bf6
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/Activator.java
@@ -0,0 +1,83 @@
+package org.eclipse.linuxtools.systemtap.local.callgraph.tests;
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.systemtap.local.callgraph.tests";
+ public static String PLUGIN_LOCATION = "NULL";
+
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ PLUGIN_LOCATION = getPluginLocation();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ 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);
+ }
+
+ public String getPluginLocation() {
+ Bundle bundle = getBundle();
+
+ URL locationUrl = FileLocator.find(bundle,new Path("/"), null); //$NON-NLS-1$
+ URL fileUrl = null;
+ try {
+ fileUrl = FileLocator.toFileURL(locationUrl);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return fileUrl.getFile();
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/AllTests.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/AllTests.java
new file mode 100644
index 0000000000..c5133426e3
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/AllTests.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph.tests;
+
+import org.eclipse.linuxtools.systemtap.local.core.SystemTapUIErrorMessages;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllTests {
+
+ public static Test suite() {
+ SystemTapUIErrorMessages.setActive(false);
+ TestSuite suite = new TestSuite(
+ "Test for org.eclipse.linuxtools.systemtap.local.callgraph.tests");
+ //$JUnit-BEGIN$
+ suite.addTestSuite(StapGraphParserTest.class);
+ suite.addTestSuite(SystemTapGraphViewTest.class);
+ suite.addTestSuite(SystemTapGraphTest.class);
+ //$JUnit-END$
+ return suite;
+ }
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/MouseListenerTest.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/MouseListenerTest.java
new file mode 100644
index 0000000000..c2657ad33f
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/MouseListenerTest.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph.tests;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.linuxtools.systemtap.local.callgraph.CallgraphView;
+import org.eclipse.linuxtools.systemtap.local.callgraph.GraphUIJob;
+import org.eclipse.linuxtools.systemtap.local.callgraph.StapGraph;
+import org.eclipse.linuxtools.systemtap.local.callgraph.StapGraphParser;
+import org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners.StapGraphKeyListener;
+import org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners.StapGraphMouseListener;
+import org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners.StapGraphMouseWheelListener;
+import org.eclipse.zest.core.widgets.GraphItem;
+
+
+public class MouseListenerTest extends TestCase{
+
+ public void test() {
+ StapGraphParser parse = new StapGraphParser();
+ parse.setFile(Activator.PLUGIN_LOCATION + "eag.graph");
+ parse.testRun(new NullProgressMonitor());
+
+ CallgraphView.forceDisplay();
+
+ GraphUIJob j = new GraphUIJob("Test Graph UI Job", parse);
+ j.runInUIThread(new NullProgressMonitor());
+
+
+ StapGraphMouseListener mListener = CallgraphView.getGraph().getMouseListener();
+ StapGraphKeyListener kListener = CallgraphView.getGraph().getKeyListener();
+ StapGraphMouseWheelListener mwListener = CallgraphView.getGraph().getMouseWheelListener();
+
+ StapGraph g = (StapGraph) CallgraphView.getGraph();
+ g.setProject(parse.project);
+
+
+ GraphItem[] nodes = {g.getNode(g.getFirstUsefulNode())};
+ g.setSelection(nodes);
+
+
+ System.out.println(mListener.controlDoubleClick());
+ mListener.mouseDownEvent(0, 0);
+ g.draw(StapGraph.CONSTANT_DRAWMODE_TREE, StapGraph.CONSTANT_ANIMATION_FASTEST,
+ g.getFirstUsefulNode());
+ mListener.mouseUpEvent();
+
+ System.out.println("TEST");
+
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/StapGraphParserTest.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/StapGraphParserTest.java
new file mode 100644
index 0000000000..801c92998e
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/StapGraphParserTest.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph.tests;
+
+import java.io.File;
+import java.util.ArrayList;
+import junit.framework.TestCase;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.linuxtools.systemtap.local.callgraph.StapGraphParser;
+
+public class StapGraphParserTest extends TestCase {
+
+ //RENDER THE GRAPH
+ public static StapGraphParser initializeGraph(String filePath){
+ StapGraphParser grph = new StapGraphParser();
+ grph.setFile(filePath);
+ grph.testRun(new NullProgressMonitor());
+ return grph;
+ }
+
+ public static void assertSanity(StapGraphParser grph){
+ //SAME NUMBER OF NODES ENTRIES
+ assertEquals(grph.serialMap.size(),grph.timeMap.size());
+ assertEquals(grph.serialMap.size(),grph.outNeighbours.size());
+ //ALL UNIQUE FUNCTIONS HAVE A TIME
+ //ALL FUNCTIONS HAVE A CUMULATIVE TIME
+ for (int val : grph.serialMap.keySet()){
+ String fname = grph.serialMap.get(val);
+ assertTrue(grph.timeMap.get(val) != null);
+ assertTrue(grph.cumulativeTimeMap.get(fname) != null);
+ }
+ }
+
+
+ public static void assertTimes(StapGraphParser grph){
+ //NO FUNCTION HAS TIME/CUMULATIVE TIME LARGER THAN TOTAL
+ for (int val : grph.serialMap.keySet()){
+ String fname = grph.serialMap.get(val);
+ assertTrue(grph.totalTime >= grph.timeMap.get(val));
+ assertTrue(grph.totalTime >= grph.cumulativeTimeMap.get(fname));
+ }
+ }
+
+
+ public static void assertConnectedness (StapGraphParser grph){
+ boolean hasParent;
+ //ALL NODES MUST HAVE A PARENT EXCEPT THE ROOT
+ for (int key : grph.serialMap.keySet()){
+ hasParent = false;
+ for (ArrayList<Integer> list : grph.outNeighbours.values()){
+ if (list.contains(key)){
+ hasParent = true;
+ break;
+ }
+ }
+
+ if (!hasParent){
+ for (int other : grph.serialMap.keySet()){
+ if (key > other){
+ fail(key + " " + grph.serialMap.get(key) + " had no parent");
+ }
+ }
+ }
+ }
+
+ }
+
+
+ File tmpfile = new File("");
+ public final String currentPath = tmpfile.getAbsolutePath();
+ public String graphDataPath= "";
+
+ //FOR TESTING THE GRAPH PARSING
+ public void executeGraphTests(){
+ StapGraphParser grph = StapGraphParserTest.initializeGraph(graphDataPath);
+ StapGraphParserTest.assertSanity(grph);
+ StapGraphParserTest.assertTimes(grph);
+ StapGraphParserTest.assertConnectedness(grph);
+ }
+
+
+ public void testCallGraphRunBasic(){
+ graphDataPath = currentPath+"/basic.graph";
+ executeGraphTests();
+ }
+
+ public void testCallGraphRunRecursive(){
+ graphDataPath = currentPath+"/catlan.graph";
+ executeGraphTests();
+ }
+
+ public void testManyFuncs(){
+ graphDataPath = currentPath+"/eag.graph";
+ executeGraphTests();
+ }
+
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/SystemTapGraphTest.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/SystemTapGraphTest.java
new file mode 100644
index 0000000000..4781660b2d
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/SystemTapGraphTest.java
@@ -0,0 +1,321 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph.tests;
+
+import java.io.File;
+import java.util.ArrayList;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.linuxtools.systemtap.local.callgraph.CallgraphView;
+import org.eclipse.linuxtools.systemtap.local.callgraph.GraphUIJob;
+import org.eclipse.linuxtools.systemtap.local.callgraph.StapGraphParser;
+import org.eclipse.linuxtools.systemtap.local.core.SystemTapUIErrorMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+
+public class SystemTapGraphTest extends TestCase {
+
+
+/* public void testLaunch() {
+ System.out.println("\n\nLaunching SystemTapGraphTest");
+
+ LaunchStapGraph launch = new LaunchStapGraph();
+ launch.launch(bin, mode);
+ checkScript(launch);
+ }*/
+ private ArrayList<Button> list = new ArrayList<Button>();
+ private boolean manual = false;
+
+ private class ButtonSelectionListener implements SelectionListener {
+ private Action action;
+
+ public ButtonSelectionListener(Action action) {
+ this.action = action;
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ action.run();
+ }
+
+ }
+
+ public void testGraphLoading() throws InterruptedException {
+
+ StapGraphParser parse = new StapGraphParser();
+ parse.setFile(Activator.PLUGIN_LOCATION+"eag.graph");
+// parse.setTestMode(true);
+ parse.testRun(new NullProgressMonitor());
+
+ CallgraphView.forceDisplay();
+
+ GraphUIJob j = new GraphUIJob("Test Graph UI Job", parse);
+ j.runInUIThread(new NullProgressMonitor());
+
+ if (!manual) {
+ ArrayList<String> tasks = new ArrayList<String>();
+
+
+ tasks.add("(Manually) Maximize CallgraphView");
+ tasks.add("Refresh");
+ tasks.add("Tree View");
+ tasks.add("Aggregate View");
+ tasks.add("Box View");
+ tasks.add("Animation->Fast");
+ tasks.add("Collapse");
+ tasks.add("Uncollapse");
+ tasks.add("Radial View");
+ tasks.add("Collapse.");
+ tasks.add("(Manually) Double-click node with no children in TreeViewer");
+ tasks.add("(Manually) Expand an arrow in the TreeViewer");
+ tasks.add("(Manually) Collapse an arrow in the TreeViewer");
+ tasks.add("Save file");
+ tasks.add("Reload file");
+ tasks.add("Maximize");
+
+
+ int taskNumber = 0;
+ for (String task : tasks) {
+ taskNumber++;
+ System.out.println(task);
+ Action act = null;
+ switch (taskNumber) {
+ case 1:
+ break;
+ case 2:
+ act = CallgraphView.getView_refresh();
+ break;
+ case 3:
+ act = CallgraphView.getView_treeview();
+ break;
+ case 4:
+ act = CallgraphView.getView_aggregateview();
+ break;
+ case 5:
+ act = CallgraphView.getView_boxview();
+ break;
+ case 6:
+ act = CallgraphView.getAnimation_fast();
+ break;
+ case 7:
+ case 8:
+ act = CallgraphView.getMode_collapsednodes();
+ break;
+ case 9:
+ act = CallgraphView.getView_radialview();
+ break;
+ case 10:
+ act = CallgraphView.getMode_collapsednodes();
+ break;
+ case 14:
+ String tempLocation = Activator.PLUGIN_LOCATION+"eag.graph2";
+ File temp = new File(tempLocation);
+ temp.delete();
+ parse.saveData(tempLocation);
+ temp.delete();
+ break;
+ case 15:
+ StapGraphParser new_parser = new StapGraphParser();
+ new_parser.setFile(Activator.PLUGIN_LOCATION+"eag.graph");
+ new_parser.testRun(new NullProgressMonitor());
+ break;
+ case 16:
+ CallgraphView.maximizeIfUnmaximized();
+ break;
+ default:
+ break;
+ }
+ if (act != null) {
+ act.run();
+ }
+ }
+ return;
+ }
+
+ //TODO: Figure out how to make the graph display at the same time as the dialog
+ SystemTapUIErrorMessages testRadial = new SystemTapUIErrorMessages("Test graph", "Opening graph",
+ "Testing Graph. Press OK, then go through the list of tasks.");
+ testRadial.schedule();
+
+ testRadial.cancel();
+
+ ArrayList<String> tasks = new ArrayList<String>();
+
+
+ tasks.add("(Manually) Maximize CallgraphView");
+ tasks.add("Refresh");
+ tasks.add("Tree View");
+ tasks.add("Aggregate View");
+ tasks.add("Box View");
+ tasks.add("Animation->Fast");
+ tasks.add("Collapse");
+ tasks.add("Uncollapse");
+ tasks.add("Radial View");
+ tasks.add("Collapse.");
+ tasks.add("(Manually) Double-click node with no children in TreeViewer");
+ tasks.add("(Manually) Expand an arrow in the TreeViewer");
+ tasks.add("(Manually) Collapse an arrow in the TreeViewer");
+ tasks.add("Save file");
+ tasks.add("Reload file");
+ tasks.add("Check Version");
+
+
+ final Shell sh = new Shell(SWT.SHELL_TRIM);
+ sh.setSize(450,tasks.size()*38);
+ sh.setText("Tasklist - press Finished when finished.");
+ sh.setLayout(new GridLayout(1, false));
+ sh.setAlpha(150);
+
+ ScrolledComposite testComp = new ScrolledComposite(sh, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+
+
+ Composite buttons = new Composite(testComp, SWT.NONE);
+ testComp.setContent(buttons);
+ buttons.setLayout(new GridLayout(1, false));
+ testComp.setExpandHorizontal(true);
+ testComp.setExpandVertical(true);
+
+ int taskNumber = 0;
+ for (String task : tasks) {
+ taskNumber++;
+
+
+ Button checkBox = new Button(buttons, SWT.CHECK);
+ list.add(checkBox);
+ checkBox.setText(task);
+ Action act = null;
+ switch (taskNumber) {
+ case 1:
+ break;
+ case 2:
+ act = CallgraphView.getView_refresh();
+ break;
+ case 3:
+ act = CallgraphView.getView_treeview();
+ break;
+ case 4:
+ act = CallgraphView.getView_aggregateview();
+ break;
+ case 5:
+ act = CallgraphView.getView_boxview();
+ break;
+ case 6:
+ act = CallgraphView.getAnimation_fast();
+ break;
+ case 7:
+ case 8:
+ act = CallgraphView.getMode_collapsednodes();
+ break;
+ case 9:
+ act = CallgraphView.getView_radialview();
+ break;
+ case 10:
+ act = CallgraphView.getMode_collapsednodes();
+ break;
+ case 14:
+ act = CallgraphView.getSave_callgraph();
+ break;
+ case 15:
+ act = CallgraphView.getOpen_callgraph();
+ break;
+ case 16:
+ act = CallgraphView.getHelp_version();
+ break;
+ default:
+ break;
+ }
+ if (act != null) {
+ ButtonSelectionListener bl = new ButtonSelectionListener(act);
+ checkBox.addSelectionListener(bl);
+ }
+
+
+ }
+
+// Button finish = new Button(buttons, SWT.PUSH);
+// finish.setText("Finish");
+// finish.addSelectionListener(new SelectionListener() {
+//
+// @Override
+// public void widgetSelected(SelectionEvent e) {
+//
+// }
+//
+// @Override
+// public void widgetDefaultSelected(SelectionEvent e) {
+// sh.dispose();
+// }
+// });
+//
+
+ sh.open();
+
+
+ boolean doneTasks =MessageDialog.openConfirm(new Shell(SWT.ON_TOP), "Check Graph",
+ "Press OK if all "+ tasks.size() + " boxes in the checklist have been checked.\n" +
+ "Hit Cancel if any test fails.");
+ assertEquals(true, doneTasks);
+
+ for (Button b : list) {
+ if (!b.getSelection()) {
+ fail("Task failed: " + b.getText());
+ }
+ assertEquals(true, b.getSelection());
+ }
+
+
+
+ //* To test:
+ //*
+ //* All transitions from (drawMode A, animMode A, collapseMode A, zoom A) to (drawMode B, animMode B, collapseMode B, zoom B)
+
+ //Transition: (dRadial, aSlow, cTrue, zDefault)-->(dTree, same)
+// SystemTapUIErrorMessages testTree = new SystemTapUIErrorMessages("Test graph", "Opening graph",
+// "Now checking Tree View. Please press OK, then , press OK if correct.");
+// testTree.schedule();
+//
+// assertEquals(true, MessageDialog.openConfirm(new Shell(), "Check Graph",
+// "Select Tree View from the drop-down menu. Does the Tree View look correct? Press OK to continue."));
+//
+// //Transition: (dTree, aSlow, cTrue, zDefault)-->(dAgg, same)
+// SystemTapUIErrorMessages testAggregate = new SystemTapUIErrorMessages("Test graph", "Opening graph",
+// "Now checking Aggregate View. Please press OK, then select Aggregate View from the drop-down menu, press OK to continue.");
+// testAggregate.schedule();
+//
+// assertEquals(true, MessageDialog.openConfirm(new Shell(), "Check Graph",
+// "Press OK, then Select Aggregate View from the drop-down menu. Does the Aggregate View look correct? Press OK to continue."));
+//
+// //Transition: (dAgg, aSlow, cTrue, zDefault)-->(dBox, same)
+// SystemTapUIErrorMessages testBox = new SystemTapUIErrorMessages("Test graph", "Opening graph",
+// "Now checking Box View. Please press OK, then select Box View from the drop-down menu, press OK to continue.");
+// testBox.schedule();
+//
+// assertEquals(true, MessageDialog.openConfirm(new Shell(), "Check Graph",
+// "Press OK, then Select Box View from the drop-down menu. Does the Box View look correct? Press OK to continue."));
+ }
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/SystemTapGraphViewTest.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/SystemTapGraphViewTest.java
new file mode 100644
index 0000000000..7ace4c0919
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/SystemTapGraphViewTest.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph.tests;
+
+import junit.framework.TestCase;
+
+import org.eclipse.linuxtools.systemtap.local.callgraph.CallgraphView;
+
+public class SystemTapGraphViewTest extends TestCase {
+ private CallgraphView stapView = new CallgraphView();
+ private String testText = "blah";
+
+ public void test() {
+ System.out.println("\n\nLaunching RunSystemTapActionTest\n");
+
+ CallgraphView.forceDisplay();
+
+ stapView.println(testText);
+ assertEquals(stapView.getText(), testText);
+
+ stapView.clearAll();
+ assertEquals(stapView.getText(), "");
+ }
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/test.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/test.xml
new file mode 100644
index 0000000000..727941bc82
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/test.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+
+<project name="testsuite" default="run" basedir=".">
+ <property name="classname" value="org.eclipse.linuxtools.systemtap.local.callgraph.tests.AllTests" />
+ <property name="plugin-name" value="org.eclipse.linuxtools.systemtap.local.callgraph.tests" />
+
+ <property name="library-file" value="${eclipse-home}/dropins/${subProjectName2}/plugins/org.eclipse.test/library.xml" />
+
+ <!-- The property ${eclipse-home} should be passed into this script -->
+ <!-- Set a meaningful default value for when it is not. -->
+ <property name="eclipse-home" value="${basedir}/../.." />
+
+ <!-- This target holds all initialization code that needs to be done for -->
+ <!-- all tests that are to be run. Initialization for individual tests -->
+ <!-- should be done within the body of the suite target. -->
+ <target name="init">
+ <tstamp />
+ <delete>
+ <fileset dir="${eclipse-home}" includes="org*.xml" />
+ </delete>
+ </target>
+
+ <!-- This target defines the tests that need to be run. -->
+ <target name="localcallgraph_suite">
+ <property name="localcallgraph-folder" value="${eclipse-home}/localcallgraph_folder" />
+ <delete dir="${localcallgraph-folder}" quiet="true" />
+ <ant target="callgraph-test" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="data-dir" value="${localcallgraph-folder}" />
+ <property name="plugin-name" value="${plugin-name}" />
+ <property name="classname" value="${classname}" />
+ </ant>
+ </target>
+
+ <!-- This target holds code to cleanup the testing environment after -->
+ <!-- after all of the tests have been run. You can use this target to -->
+ <!-- delete temporary files that have been created. -->
+ <target name="cleanup">
+ <mkdir dir="${results}/consolelogs" />
+ <copy failonerror="false" file="${eclipse-home}/results/${classname}.txt" tofile="${results}/consolelogs/${classname}_${platform}.metadata.log.txt" />
+ </target>
+
+ <!-- This target runs the test suite. Any actions that need to happen -->
+ <!-- after all the tests have been run should go here. -->
+ <target name="run" depends="init,localcallgraph_suite,cleanup">
+ <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="includes" value="org*.xml" />
+ <property name="output-file" value="${plugin-name}.xml" />
+ </ant>
+ </target>
+
+ <target name="all" depends="run" description="Dummy target to run all tests">
+ </target>
+
+</project>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/.classpath
new file mode 100644
index 0000000000..ad32c83a78
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/.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/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/.project b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/.project
new file mode 100644
index 0000000000..e654493362
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.systemtap.local.callgraph</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/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/.settings/org.eclipse.jdt.core.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..81816d5f6f
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Mon Sep 21 12:35:29 EDT 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..ea191f2fc1
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Graphing Plug-in
+Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.local.callgraph;singleton:=true
+Bundle-Version: 0.0.1.qualifier
+Bundle-Activator: org.eclipse.linuxtools.systemtap.local.callgraph.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.draw2d,
+ org.eclipse.zest.layouts
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Export-Package: org.eclipse.linuxtools.systemtap.local.callgraph,
+ org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners
+Import-Package: org.eclipse.cdt.core.model,
+ org.eclipse.jface.text,
+ org.eclipse.linuxtools.systemtap.local.core,
+ org.eclipse.ui.texteditor,
+ org.eclipse.zest.core.widgets,
+ org.eclipse.zest.layouts,
+ org.eclipse.zest.layouts.algorithms
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/build.properties
new file mode 100644
index 0000000000..2fe877d1f8
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/build.properties
@@ -0,0 +1,16 @@
+###############################################################################
+# 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/,\
+ .,\
+ icons/
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/compare_method.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/compare_method.gif
new file mode 100644
index 0000000000..a1b1748813
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/compare_method.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/down.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/down.gif
new file mode 100644
index 0000000000..f1991391b5
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/down.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/genericregister_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/genericregister_obj.gif
new file mode 100644
index 0000000000..7134210d0a
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/genericregister_obj.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/mode_collapsednodes.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/mode_collapsednodes.gif
new file mode 100644
index 0000000000..0bae56c346
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/mode_collapsednodes.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/nav_refresh.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/nav_refresh.gif
new file mode 100644
index 0000000000..3ca04d06ff
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/nav_refresh.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/public_co.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/public_co.gif
new file mode 100644
index 0000000000..a9af5d538d
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/public_co.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/radial_view.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/radial_view.gif
new file mode 100644
index 0000000000..b962e1c776
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/radial_view.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/showchild_mode.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/showchild_mode.gif
new file mode 100644
index 0000000000..6514f7bb77
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/showchild_mode.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/tree_view.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/tree_view.gif
new file mode 100644
index 0000000000..d89c06913c
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/tree_view.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/up.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/up.gif
new file mode 100644
index 0000000000..57d1de72bb
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/up.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/view_aggregateview.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/view_aggregateview.gif
new file mode 100644
index 0000000000..5a69c01c87
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/view_aggregateview.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/plugin.xml
new file mode 100644
index 0000000000..e2bd1ace8a
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/plugin.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+
+ <extension
+ point="org.eclipse.ui.views">
+ <view
+ category="org.eclipse.cdt.ui.views"
+ class="org.eclipse.linuxtools.systemtap.local.callgraph.CallgraphView"
+ icon="icons/genericregister_obj.gif"
+ id="org.eclipse.linuxtools.systemtap.local.callgraph.callgraphview"
+ name="Call Graph"
+ restorable="true">
+ </view>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.perspectiveExtensions">
+ <perspectiveExtension
+ targetID="org.eclipse.cdt.ui.CPerspective">
+ <view
+ id="org.eclipse.linuxtools.systemtap.local.callgraph.callgraphview"
+ minimized="false"
+ relationship="stack">
+ </view>
+ </perspectiveExtension>
+ </extension>
+
+
+
+ <extension
+ point="org.eclipse.ui.actionSets">
+ <actionSet
+ id="org.eclipse.linuxtools.systemtap.local.callgraph.actionSet"
+ label="Systemtap Marker Action Set"
+ visible="true">
+ <action
+ class="org.eclipse.linuxtools.systemtap.local.callgraph.actions.InsertMarkerAction"
+ definitionId="org.eclipse.linuxtools.systemtap.local.callgraph.command3"
+ id="org.eclipse.linuxtools.systemtap.local.callgraph.actions.StapAction"
+ label="Insert stap marker function"
+ tooltip="Insert systemtap marker">
+ </action>
+ <action
+ class="org.eclipse.linuxtools.systemtap.local.callgraph.actions.RemoveMarkerAction"
+ definitionId="org.eclipse.linuxtools.systemtap.local.callgraph.command4"
+ id="org.eclipse.linuxtools.systemtap.local.callgraph.actions.StapRemoveAction"
+ label="Remove stap marker function"
+ tooltip="Remove systemtap marker">
+ </action>
+ </actionSet>
+ </extension>
+
+ <extension point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.eclipse.linuxtools.systemtap.local.callgraph.command3"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="Ctrl+5"/>
+ <key
+ commandId="org.eclipse.linuxtools.systemtap.local.callgraph.command4"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="Ctrl+6">
+ </key>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.linuxtools.systemtap.local.callgraph.category2"
+ id="org.eclipse.linuxtools.systemtap.local.callgraph.command3"
+ name="Insert stap marker function">
+ </command>
+ <category
+ id="org.eclipse.linuxtools.systemtap.local.callgraph.category2"
+ name="SystemTap">
+ </category>
+ <command
+ categoryId="org.eclipse.linuxtools.systemtap.local.callgraph.category2"
+ id="org.eclipse.linuxtools.systemtap.local.callgraph.command4"
+ name="Remove stap marker function">
+ </command>
+ </extension>
+ <extension
+ id="org.eclipse.linuxtools.systemtap.local.callgraph.graphparser"
+ name="GraphParser"
+ point="org.eclipse.linuxtools.systemtap.local.core.parser">
+ <parser
+ class="org.eclipse.linuxtools.systemtap.local.callgraph.StapGraphParser"
+ realtime="false">
+ </parser>
+ </extension>
+</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/Activator.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/Activator.java
new file mode 100644
index 0000000000..8eb6c92471
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/Activator.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph;
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.systemtap.local.callgraph"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+
+ //TODO: Is this too slow?
+ CallGraphConstants.setPluginLocation(getPluginLocation());
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ 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);
+ }
+
+ public String getPluginLocation() {
+ Bundle bundle = getBundle();
+
+ URL locationUrl = FileLocator.find(bundle,new Path("/"), null); //$NON-NLS-1$
+ URL fileUrl = null;
+ try {
+ fileUrl = FileLocator.toFileURL(locationUrl);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return fileUrl.getFile();
+
+ }
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/AggregateLayoutAlgorithm.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/AggregateLayoutAlgorithm.java
new file mode 100644
index 0000000000..fdb2bfba10
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/AggregateLayoutAlgorithm.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph;
+
+import java.util.ArrayList;
+import java.util.TreeSet;
+import java.util.Map.Entry;
+
+import org.eclipse.zest.layouts.algorithms.GridLayoutAlgorithm;
+import org.eclipse.zest.layouts.dataStructures.InternalNode;
+import org.eclipse.zest.layouts.dataStructures.InternalRelationship;
+
+/**
+ * Calculates the size and location of a node when rendering the
+ * Aggregate View. This avoids needing to design a Layout Algorithm
+ * from scratch.
+ */
+public class AggregateLayoutAlgorithm extends GridLayoutAlgorithm{
+
+ protected ArrayList<Long> sortedAggregateTimes;
+ protected Long totalTime;
+ protected int graphWidth;
+
+ public AggregateLayoutAlgorithm(int styles, TreeSet<Entry<String, Long>> entries, Long time, int width){
+ super(styles);
+
+ this.sortedAggregateTimes = new ArrayList<Long>();
+ for (Entry<String,Long> val : entries){
+ this.sortedAggregateTimes.add(val.getValue());
+ }
+
+ this.totalTime = time;
+ this.graphWidth = width;
+ }
+
+ //THIS METHOD OVERRIDES THE PARENT'S IMPLEMENTATION (WHICH IS EMPTY ANYWAYS)
+ protected void postLayoutAlgorithm(InternalNode[] entitiesToLayout, InternalRelationship[] relationshipsToConsider) {
+ Long time;
+ final int minimumSize = 40;
+ double percent;
+ double xcursor = 0.0;
+ double ycursor = 0.0;
+
+ for (InternalNode sn : entitiesToLayout) {
+ time = sortedAggregateTimes.remove(0);
+ percent = (double) time / (double) totalTime;
+ double snWidth = (sn.getInternalWidth() * percent) + minimumSize;
+ double snHeight = (sn.getInternalHeight() * percent) + minimumSize;
+
+ sn.setSize(snWidth, snHeight);
+ if (xcursor + snWidth > graphWidth) {
+ //reaching the end of row, move to lower column
+ ycursor += snHeight;
+ xcursor = 0;
+ sn.setLocation(xcursor, ycursor);
+ } else {
+ sn.setLocation(xcursor, ycursor);
+ xcursor += snWidth;
+ }
+ }
+
+ }
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/CallGraphConstants.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/CallGraphConstants.java
new file mode 100644
index 0000000000..6dc1976525
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/CallGraphConstants.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph;
+
+public class CallGraphConstants {
+
+ public static String PLUGIN_LOCATION = ""; //$NON-NLS-1$
+
+ public static void setPluginLocation(String val) {
+ PLUGIN_LOCATION = val;
+ }
+
+
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/CallgraphView.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/CallgraphView.java
new file mode 100644
index 0000000000..143ae2cede
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/CallgraphView.java
@@ -0,0 +1,1172 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.Vector;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.linuxtools.systemtap.local.core.PluginConstants;
+import org.eclipse.linuxtools.systemtap.local.core.SystemTapErrorHandler;
+import org.eclipse.linuxtools.systemtap.local.core.SystemTapUIErrorMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Spinner;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+import org.eclipse.ui.part.ViewPart;
+
+/**
+ * The SystemTap View for displaying output of the 'stap' command, and acts
+ * as a container for any graph to be rendered. Any buttons/controls/actions
+ * necessary to the smooth running of SystemTap could be placed here.
+ */
+public class CallgraphView extends ViewPart {
+ private static final String NEW_LINE = Messages.getString("CallgraphView.3"); //$NON-NLS-1$
+ private static CallgraphView stapview;
+ private static boolean isInitialized = false;
+
+ private Display display;
+ private static StyledText viewer;
+ private int previousEnd;
+
+
+ private static Action open_callgraph;
+ private static Action save_callgraph;
+ private static Action open_default;
+ private static Action error_errorLog;
+ private static Action error_deleteError;
+ private static Action view_treeview;
+ private static Action view_radialview;
+ private static Action view_aggregateview;
+ private static Action view_boxview;
+ private static Action view_refresh;
+ private static Action animation_slow;
+ private static Action animation_fast;
+ private static Action mode_collapsednodes;
+ private static Action markers_next;
+ private static Action markers_previous;
+ private static Action limits;
+ private static Action goto_next;
+ private static Action goto_previous;
+ private static Action goto_last;
+
+ private static IMenuManager menu;
+ private static IMenuManager gotoMenu;
+ private static IMenuManager file;
+ private static IMenuManager errors;
+ private static IMenuManager view;
+ private static IMenuManager animation;
+ private static IMenuManager markers; //Unused
+ private static IMenuManager help;
+ @SuppressWarnings("unused")
+ private static Action help_about;
+ private static Action help_version;
+ public static IToolBarManager mgr;
+
+ public static Composite masterComposite;
+ private static Composite graphComp;
+ private static Composite treeComp;
+
+ private static StapGraphParser parser;
+ private static StapGraph graph;
+
+
+ /**
+ * The constructor.
+ * @return
+ */
+ public CallgraphView() {
+ isInitialized = true;
+ }
+
+ public static CallgraphView getSingleInstance(){
+ if (isInitialized){
+ return stapview;
+ }
+ return null;
+ }
+
+
+ public static void testFunction() {
+ if (masterComposite != null && !masterComposite.isDisposed())
+ masterComposite.dispose();
+ }
+
+ public static void setValues(Composite graphC, Composite treeC, StapGraph g, StapGraphParser p){
+ treeComp = treeC;
+ graphComp = graphC;
+ graph = g;
+ parser = p;
+ }
+
+
+ /**
+ * Enable or Disable the graph options
+ * @param visible
+ */
+ public static void setGraphOptions (boolean visible){
+ save_callgraph.setEnabled(visible);
+ view_treeview.setEnabled(visible);
+ view_radialview.setEnabled(visible);
+ view_aggregateview.setEnabled(visible);
+ view_boxview.setEnabled(visible);
+ view_refresh.setEnabled(visible);
+ limits.setEnabled(visible);
+
+ markers_next.setEnabled(visible);
+ markers_previous.setEnabled(visible);
+
+ animation_slow.setEnabled(visible);
+ animation_fast.setEnabled(visible);
+ mode_collapsednodes.setEnabled(visible);
+
+ goto_next.setEnabled(visible);
+ goto_previous.setEnabled(visible);
+ goto_last.setEnabled(visible);
+ }
+
+/**
+ * @param doMaximize : true && view minimized will maximize the view,
+ * otherwise it will just 'refresh'
+ */
+ public static void maximizeOrRefresh(boolean doMaximize){
+ IWorkbenchPage page = CallgraphView
+ .getSingleInstance().getViewSite().getWorkbenchWindow().getActivePage();
+
+ if (doMaximize && page.getPartState(page.getActivePartReference()) != IWorkbenchPage.STATE_MAXIMIZED){
+ IWorkbenchAction action = ActionFactory.MAXIMIZE.create(CallgraphView
+ .getSingleInstance().getViewSite().getWorkbenchWindow());
+ action.run();
+ }else{
+ CallgraphView.layout();
+ }
+ }
+
+
+ public static void firstTimeRefresh(){
+
+ graphComp.setSize(masterComposite.getSize().x ,masterComposite.getSize().y);
+ }
+
+
+ public static Composite makeTreeComp(int treeSize) {
+ if (treeComp != null && !treeComp.isDisposed()) {
+ return treeComp;
+ }
+
+ Composite treeComp = new Composite(CallgraphView.masterComposite, SWT.NONE);
+ GridData treegd = new GridData(SWT.BEGINNING, SWT.FILL, false, true);
+ treegd.widthHint = treeSize;
+ treeComp.setLayout(new FillLayout());
+ treeComp.setLayoutData(treegd);
+ return treeComp;
+ }
+
+ public static Composite makeGraphComp() {
+// if (graphComp != null && !graphComp.isDisposed()) {
+// return graphComp;
+// }
+ if (graphComp != null)
+ graphComp.dispose();
+ Composite graphComp = new Composite(CallgraphView.masterComposite, SWT.NONE);
+ GridData graphgd = new GridData(SWT.FILL, SWT.FILL, true, true);
+ GridLayout gl = new GridLayout(2, false);
+ gl.horizontalSpacing=0;
+ gl.verticalSpacing=0;
+
+ graphComp.setLayout(gl);
+ graphComp.setLayoutData(graphgd);
+ return graphComp;
+ }
+
+ public static void layout() {
+ masterComposite.layout();
+ }
+
+ /**
+ * If view is not maximized it will be maximized
+ */
+ public static void maximizeIfUnmaximized() {
+ IWorkbenchPage page = CallgraphView
+ .getSingleInstance().getViewSite().getWorkbenchWindow().getActivePage();
+
+ if (page.getPartState(page.getActivePartReference()) != IWorkbenchPage.STATE_MAXIMIZED){
+ IWorkbenchAction action = ActionFactory.MAXIMIZE.create(CallgraphView
+ .getSingleInstance().getViewSite().getWorkbenchWindow());
+ action.run();
+ }
+
+ }
+
+
+//
+// public static void disposeAll() {
+// if (graphComp != null) {
+// graphComp.setVisible(false);
+// GridData gd = (GridData) graphComp.getLayoutData();
+// gd.exclude = true;
+// graphComp.setLayoutData(gd);
+// graphComp.dispose();
+// }
+// if (treeComp != null) {
+// treeComp.setVisible(false);
+// GridData gd = (GridData) treeComp.getLayoutData();
+// gd.exclude = true;
+// treeComp.setLayoutData(gd);
+// treeComp.dispose();
+// }
+// }
+
+ /**
+ * This must be executed before a Graph is displayed
+ */
+ public static void createPartControl(){
+
+
+ setGraphOptions(true);
+ String text = ""; //$NON-NLS-1$
+ StyleRange[] sr = null;
+
+
+ if (viewer != null && !viewer.isDisposed()) {
+ text = viewer.getText();
+ sr = viewer.getStyleRanges();
+ viewer.dispose();
+ }
+
+
+ graphComp.setParent(masterComposite);
+
+ if (treeComp != null)
+ treeComp.setParent(masterComposite);
+
+ if (graph == null) {
+ createViewer(masterComposite);
+ viewer.setText(text);
+ viewer.setStyleRanges(sr);
+ }
+
+ //MAXIMIZE THE SYSTEMTAP VIEW WHEN RENDERING A GRAPH
+ firstTimeRefresh();
+ }
+
+
+ public static void createViewer(Composite parent){
+ viewer = new StyledText(parent, SWT.READ_ONLY | SWT.MULTI
+ | SWT.V_SCROLL | SWT.WRAP);
+
+ viewer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ Font font = new Font(parent.getDisplay(), "Monospace", 11, SWT.NORMAL); //$NON-NLS-1$
+ viewer.setFont(font);
+ }
+
+ /**
+ * This is a callback that will allow us to create the viewer and
+ * initialize it.
+ */
+ public void createPartControl(Composite parent) {
+ if (masterComposite != null)
+ masterComposite.dispose();
+ masterComposite = parent;
+ this.display = parent.getDisplay();
+ GridLayout layout = new GridLayout(2, false);
+ layout.horizontalSpacing=0;
+ GridData gd = new GridData(100, 100);
+
+ parent.setLayout(layout);
+ parent.setLayoutData(gd);
+
+ //CREATE THE TEXT VIEWER
+ if (graph == null)
+ createViewer(parent);
+
+ // LOAD ALL ACTIONS
+ createActions();
+
+ //MENU FOR SYSTEMTAP BUTTONS
+ mgr = getViewSite().getActionBars().getToolBarManager();
+
+
+ //MENU FOR SYSTEMTAP GRAPH OPTIONS
+ menu = getViewSite().getActionBars().getMenuManager();
+
+ // ADD OPTIONS TO THE GRAPH MENU
+ file = new MenuManager(Messages.getString("CallgraphView.0")); //$NON-NLS-1$
+ view = new MenuManager(Messages.getString("CallgraphView.1")); //$NON-NLS-1$
+ errors = new MenuManager(Messages.getString("CallgraphView.Errors")); //$NON-NLS-1$
+ animation = new MenuManager(Messages.getString("CallgraphView.2")); //$NON-NLS-1$
+ help = new MenuManager(Messages.getString("CallgraphView.5")); //$NON-NLS-1$
+ markers = new MenuManager(Messages.getString("CallgraphView.6")); //$NON-NLS-1$
+ gotoMenu = new MenuManager(Messages.getString("CallgraphView.9")); //$NON-NLS-1$
+
+
+
+ menu.add(file);
+ menu.add(view);
+// menu.add(animation);
+ menu.add(gotoMenu);
+ menu.add(errors);
+ menu.add(help);
+
+
+ file.add(open_callgraph);
+ file.add(open_default);
+ file.add(save_callgraph);
+
+
+ errors.add(error_errorLog);
+ errors.add(error_deleteError);
+
+
+ view.add(view_treeview);
+ view.add(view_radialview);
+ view.add(view_aggregateview);
+ view.add(view_boxview);
+ view.add(getView_refresh());
+ view.add(mode_collapsednodes);
+ view.add(limits);
+
+
+ gotoMenu.add(goto_previous);
+ gotoMenu.add(goto_next);
+ gotoMenu.add(goto_last);
+
+
+ mgr.add(view_radialview);
+ mgr.add(view_treeview);
+ mgr.add(view_boxview);
+ mgr.add(view_aggregateview);
+ mgr.add(getView_refresh());
+ mgr.add(mode_collapsednodes);
+
+// help.add(help_about);
+ help.add(help_version);
+
+ markers.add(markers_next);
+ markers.add(markers_previous);
+
+ animation.add(animation_slow);
+ animation.add(animation_fast);
+// menu.add(markers);
+
+ setGraphOptions(false);
+
+ // Colouring helper variable
+ previousEnd = 0;
+ stapview = this;
+ }
+
+ /**
+ * Passing the focus request to the viewer's control.
+ */
+ public void setFocus() {
+ if (viewer != null && !viewer.isDisposed())
+ viewer.setFocus();
+ }
+
+ /**
+ * Force the CallgraphView to initialize
+ */
+ public static void forceDisplay(){
+ try {
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ window.getActivePage().showView("org.eclipse.linuxtools.systemtap.local.callgraph.callgraphview").setFocus(); //$NON-NLS-1$
+ } catch (PartInitException e2) {
+ e2.printStackTrace();
+ }
+
+ }
+
+ public void prettyPrintln(String text) {
+ Vector<StyleRange> styles = new Vector<StyleRange>();
+ String[] txt = text.split("\\n"); //$NON-NLS-1$
+ int lineOffset = 0;
+ int inLineOffset;
+
+ //txt[] contains text, with one entry for each new line
+ for (int i = 0; i < txt.length; i++) {
+
+ //Skip blank strings
+ if (txt[i].length() == 0) {
+ viewer.append(NEW_LINE);
+ continue;
+ }
+
+ //Search for colour codes, if none exist then continue
+ String[] split_txt = txt[i].split("~\\("); //$NON-NLS-1$
+ if (split_txt.length == 1) {
+ viewer.append(split_txt[0]);
+ viewer.append(NEW_LINE);
+ continue;
+ }
+
+ inLineOffset = 0;
+ for (int k = 0; k < split_txt.length; k++) {
+ //Skip blank substrings
+ if (split_txt[k].length() == 0)
+ continue;
+
+ //Split for the number codes
+ String[] coloursAndText = split_txt[k].split("\\)~"); //$NON-NLS-1$
+
+ //If the string is properly formatted, colours should be length 2
+ //If it is not properly formatted, don't colour (just print)
+ if (coloursAndText.length != 2) {
+ for (int j = 0; j < coloursAndText.length; j++) {
+ viewer.append(coloursAndText[j]);
+ inLineOffset += coloursAndText[j].length();
+ }
+ continue;
+ }
+
+ //The first element in the array should contain the colours
+ String[] colours = coloursAndText[0].split(","); //$NON-NLS-1$
+ if (colours.length < 3) continue;
+
+ //The second element in the array should contain the text
+ viewer.append(coloursAndText[1]);
+
+ //Create a colour based on the 3 integers (if there are any more integers, just ignore)
+ int R = new Integer(colours[0].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
+ int G = new Integer(colours[1].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
+ int B = new Integer(colours[2].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
+
+ if (R > 255) R = 255;
+ if (G > 255) G = 255;
+ if (B > 255) B = 255;
+
+ if (R < 0 ) R = 0;
+ if (G < 0 ) G = 0;
+ if (B < 0 ) B = 0;
+
+ Color newColor = new Color(display, R, G, B);
+
+ //Find the offset of the current line
+ lineOffset = viewer.getOffsetAtLine(viewer.getLineCount() - 1);
+
+ //Create a new style that lasts no further than the length of the line
+ StyleRange newStyle = new StyleRange(lineOffset + inLineOffset,
+ coloursAndText[1].length(),
+ newColor, null);
+ styles.addElement(newStyle);
+
+ inLineOffset+=coloursAndText[1].length();
+ }
+
+ viewer.append(NEW_LINE);
+ }
+
+ //Create a new style range
+ StyleRange[] s = new StyleRange[styles.size()];
+ styles.copyInto(s);
+
+ int cnt = viewer.getCharCount();
+
+ //Using replaceStyleRanges with previousEnd, etc, effectively adds
+ //the StyleRange to the existing set of Style Ranges (so we don't
+ //waste time fudging with old style ranges that haven't changed)
+ viewer.replaceStyleRanges(previousEnd, cnt - previousEnd, s);
+ previousEnd = cnt;
+
+ //Change focus and update
+ viewer.setTopIndex(viewer.getLineCount() - 1);
+ viewer.update();
+ }
+
+ public void println(String text) {
+ if (viewer != null && !viewer.isDisposed()) {
+ viewer.append(text);
+ viewer.setTopIndex(viewer.getLineCount() - 1);
+ viewer.update();
+ }
+ }
+
+ public void clearAll() {
+ if (viewer != null && !viewer.isDisposed()) {
+ previousEnd = 0;
+ viewer.setText(""); //$NON-NLS-1$
+ viewer.update();
+ }
+ }
+
+ /**
+ * Testing convenience method to see what was printed
+ *
+ * @return viewer text
+ */
+ public String getText() {
+ return viewer.getText();
+ }
+
+
+ /**
+ * Populates the file menu
+ */
+ public void createFileActions() {
+ //Opens from some location in your program
+ open_callgraph = new Action(Messages.getString("CallgraphView.7")){ //$NON-NLS-1$
+ public void run(){
+ FileDialog dialog = new FileDialog(new Shell(), SWT.DEFAULT);
+ String filePath = dialog.open();
+ if (filePath != null){
+ StapGraphParser new_parser = new StapGraphParser();
+ new_parser.setFile(filePath);
+ new_parser.schedule();
+ }
+ }
+ };
+
+ //Opens from the default location
+ open_default = new Action(Messages.getString("CallgraphView.11")){ //$NON-NLS-1$
+ public void run(){
+ StapGraphParser new_parser = new StapGraphParser();
+ new_parser.schedule();
+ }
+ };
+
+
+ //Save callgraph.out
+ save_callgraph = new Action(Messages.getString("CallgraphView.8")){ //$NON-NLS-1$
+ public void run(){
+ Shell sh = new Shell();
+ FileDialog dialog = new FileDialog(sh, SWT.SAVE);
+ String filePath = dialog.open();
+
+ if (filePath != null) {
+ parser.saveData(filePath);
+ }
+ }
+ };
+
+ }
+
+ public void createHelpActions() {
+ help_version = new Action(Messages.getString("CallgraphView.13")) { //$NON-NLS-1$
+ public void run() {
+ Runtime rt = Runtime.getRuntime();
+ try {
+ Process pr = rt.exec("stap -V"); //$NON-NLS-1$
+ BufferedReader buf = new BufferedReader(new InputStreamReader(pr
+ .getErrorStream()));
+ String line = ""; //$NON-NLS-1$
+ String message = ""; //$NON-NLS-1$
+
+ while ((line = buf.readLine()) != null) {
+ message += line + NEW_LINE; //$NON-NLS-1$
+ }
+
+ try {
+ pr.waitFor();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+
+
+ Shell sh = new Shell();
+
+ MessageDialog.openInformation(sh, Messages.getString("CallgraphView.SystemTapVersionBox"), message); //$NON-NLS-1$
+
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ };
+
+ help_about = new Action(Messages.getString("CallgraphView.4")) { //$NON-NLS-1$
+ public void run() {
+ Display disp = Display.getCurrent();
+ if (disp == null){
+ disp = Display.getDefault();
+ }
+
+
+ Shell sh = new Shell(disp, SWT.MIN | SWT.MAX);
+ sh.setSize(425, 540);
+ GridLayout gl = new GridLayout(1, true);
+ sh.setLayout(gl);
+
+ sh.setText(""); //$NON-NLS-1$
+
+ Image img = new Image(disp, PluginConstants.PLUGIN_LOCATION+"systemtap.png"); //$NON-NLS-1$
+ Composite cmp = new Composite(sh, sh.getStyle());
+ cmp.setLayout(gl);
+ GridData data = new GridData(415,100);
+ cmp.setLayoutData(data);
+ cmp.setBackgroundImage(img);
+
+ Composite c = new Composite(sh, sh.getStyle());
+ c.setLayout(gl);
+ GridData gd = new GridData(415,400);
+ c.setLayoutData(gd);
+ c.setLocation(0,300);
+ StyledText viewer = new StyledText(c, SWT.READ_ONLY | SWT.MULTI
+ | SWT.V_SCROLL | SWT.WRAP | SWT.BORDER);
+
+ GridData viewerGD = new GridData(SWT.FILL, SWT.FILL, true, true);
+ viewer.setLayoutData(viewerGD);
+ Font font = new Font(sh.getDisplay(), "Monospace", 11, SWT.NORMAL); //$NON-NLS-1$
+ viewer.setFont(font);
+ viewer.setText(
+ "" + //$NON-NLS-1$
+ "" + //$NON-NLS-1$
+ "" + //$NON-NLS-1$
+ "" + //$NON-NLS-1$
+ "" + //$NON-NLS-1$
+ "" + //$NON-NLS-1$
+
+ "" + //$NON-NLS-1$
+//
+// Messages.getString("LaunchAbout.9") + //$NON-NLS-1$
+// Messages.getString("LaunchAbout.10") + //$NON-NLS-1$
+
+ "" + //$NON-NLS-1$
+ "" + //$NON-NLS-1$
+ "" + //$NON-NLS-1$
+
+// Messages.getString("LaunchAbout.14") + //$NON-NLS-1$
+// Messages.getString("LaunchAbout.15") + //$NON-NLS-1$
+// Messages.getString("LaunchAbout.16") + //$NON-NLS-1$
+
+ "" + //$NON-NLS-1$
+
+// Messages.getString("LaunchAbout.18") + //$NON-NLS-1$
+// Messages.getString("LaunchAbout.19") + //$NON-NLS-1$
+
+ "" + //$NON-NLS-1$
+ "" //$NON-NLS-1$
+ );
+
+
+
+ sh.open();
+ }
+ };
+ }
+
+ /**
+ * Populates the Errors menu
+ */
+ public void createErrorActions() {
+
+ error_errorLog = new Action(Messages.getString("CallgraphView.OpenLog")) { //$NON-NLS-1$
+ public void run() {
+ boolean error = false;
+ File log = new File(PluginConstants.DEFAULT_OUTPUT + "Error.log"); //$NON-NLS-1$
+ BufferedReader buff;
+ try {
+ buff = new BufferedReader(new FileReader(log));
+ String logText = ""; //$NON-NLS-1$
+ String line;
+
+ while ((line = buff.readLine()) != null) {
+ logText+=line + PluginConstants.NEW_LINE;
+ }
+
+ Shell sh = new Shell(SWT.BORDER | SWT.TITLE);
+
+ sh.setText(Messages.getString("CallgraphView.15")); //$NON-NLS-1$
+ sh.setLayout(new FillLayout());
+ sh.setSize(600,600);
+
+ StyledText txt = new StyledText(sh, SWT.MULTI | SWT.V_SCROLL | SWT.WRAP | SWT.READ_ONLY);
+
+ txt.setText(logText);
+
+ sh.setText(Messages.getString("CallgraphView.21")); //$NON-NLS-1$
+
+ sh.open();
+ txt.setTopIndex(txt.getLineCount());
+
+
+ } catch (FileNotFoundException e) {
+ error = true;
+ } catch (IOException e) {
+ error = true;
+ } finally {
+ if (error) {
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
+ Messages.getString("CallgraphView.ErrorMessageName"), //$NON-NLS-1$
+ Messages.getString("CallgraphView.ErrorMessageTitle"), //$NON-NLS-1$
+ Messages.getString("CallgraphView.ErrorMessageBody") + //$NON-NLS-1$
+ Messages.getString("CallgraphView.ErrorMessageBody2")); //$NON-NLS-1$
+ mess.schedule();
+ }
+ }
+
+ }
+ };
+
+
+ error_deleteError = new Action(Messages.getString("CallgraphView.ClearLog")) { //$NON-NLS-1$
+ public void run() {
+ if (!MessageDialog.openConfirm(new Shell(), Messages.getString("CallgraphView.DeleteLogsTitle"), //$NON-NLS-1$
+ Messages.getString("CallgraphView.DeleteLogsMessage") + //$NON-NLS-1$
+ Messages.getString("CallgraphView.DeleteLogsMessage2"))) //$NON-NLS-1$
+ return;
+
+ SystemTapErrorHandler.delete();
+ }
+ };
+
+
+ }
+
+ public void createViewActions() {
+ //Set drawmode to tree view
+ view_treeview = new Action(Messages.getString("CallgraphView.16")){ //$NON-NLS-1$
+ public void run() {
+ graph.draw(StapGraph.CONSTANT_DRAWMODE_TREE, graph.getAnimationMode(),
+ graph.getRootVisibleNodeNumber());
+ graph.scrollTo(graph.getNode(graph.getRootVisibleNodeNumber()).getLocation().x
+ - graph.getBounds().width / 2, graph.getNode(
+ graph.getRootVisibleNodeNumber()).getLocation().y);
+ }
+ };
+ ImageDescriptor treeImage = ImageDescriptor.createFromImage(
+ new Image(Display.getCurrent(), CallGraphConstants.PLUGIN_LOCATION + "icons/tree_view.gif")); //$NON-NLS-1$
+ view_treeview.setImageDescriptor(treeImage);
+
+
+ //Set drawmode to radial view
+ view_radialview = new Action(Messages.getString("CallgraphView.17")){ //$NON-NLS-1$
+ public void run(){
+ graph.draw(StapGraph.CONSTANT_DRAWMODE_RADIAL, graph.getAnimationMode(),
+ graph.getRootVisibleNodeNumber());
+
+ }
+ };
+ ImageDescriptor d = ImageDescriptor.createFromImage(
+ new Image(Display.getCurrent(),
+ CallGraphConstants.PLUGIN_LOCATION + "/icons/radial_view.gif")); //$NON-NLS-1$
+ view_radialview.setImageDescriptor(d);
+
+
+ //Set drawmode to aggregate view
+ view_aggregateview = new Action(Messages.getString("CallgraphView.18")){ //$NON-NLS-1$
+ public void run(){
+ graph.draw(StapGraph.CONSTANT_DRAWMODE_AGGREGATE, graph.getAnimationMode(),
+ graph.getRootVisibleNodeNumber());
+
+ }
+ };
+ ImageDescriptor aggregateImage = ImageDescriptor.createFromImage(
+ new Image(Display.getCurrent(),
+ CallGraphConstants.PLUGIN_LOCATION + "/icons/view_aggregateview.gif")); //$NON-NLS-1$
+ view_aggregateview.setImageDescriptor(aggregateImage);
+
+
+ //Set drawmode to box view
+ view_boxview = new Action(Messages.getString("CallgraphView.19")){ //$NON-NLS-1$
+ public void run(){
+ graph.draw(StapGraph.CONSTANT_DRAWMODE_BOX, graph.getAnimationMode(),
+ graph.getRootVisibleNodeNumber());
+ }
+ };
+ ImageDescriptor boxImage = ImageDescriptor.createFromImage(
+ new Image(Display.getCurrent(),
+ CallGraphConstants.PLUGIN_LOCATION + "/icons/showchild_mode.gif")); //$NON-NLS-1$
+ view_boxview.setImageDescriptor(boxImage);
+
+
+ setView_refresh(new Action(Messages.getString("CallgraphView.Reset")){ //$NON-NLS-1$
+ public void run(){
+ graph.reset();
+ }
+ });
+ ImageDescriptor refreshImage = ImageDescriptor.createFromImage(
+ new Image(Display.getCurrent(),
+ CallGraphConstants.PLUGIN_LOCATION + "/icons/nav_refresh.gif")); //$NON-NLS-1$
+ getView_refresh().setImageDescriptor(refreshImage);
+
+
+ }
+
+
+ /**
+ * Populates Animate menu.
+ */
+ public void createAnimateActions() {
+ //Set animation mode to slow
+ animation_slow = new Action(Messages.getString("CallgraphView.20"), Action.AS_RADIO_BUTTON){ //$NON-NLS-1$
+ public void run(){
+ graph.setAnimationMode(StapGraph.CONSTANT_ANIMATION_SLOW);
+ this.setChecked(true);
+ animation_slow.setChecked(true);
+ animation_fast.setChecked(false);
+ }
+ };
+
+ animation_slow.setChecked(true);
+
+ //Set animation mode to fast
+ animation_fast = new Action(Messages.getString("CallgraphView.22"), Action.AS_RADIO_BUTTON){ //$NON-NLS-1$
+ public void run(){
+ graph.setAnimationMode(StapGraph.CONSTANT_ANIMATION_FASTEST);
+ animation_slow.setChecked(false);
+ animation_fast.setChecked(true);
+ }
+ };
+
+ //Toggle collapse mode
+ mode_collapsednodes = new Action(Messages.getString("CallgraphView.24"), Action.AS_CHECK_BOX){ //$NON-NLS-1$
+ public void run(){
+
+ if (graph.isCollapseMode()) {
+ graph.setCollapseMode(false);
+ graph.draw(graph.getRootVisibleNodeNumber());
+ }
+ else {
+ graph.setCollapseMode(true);
+ graph.draw(graph.getRootVisibleNodeNumber());
+ }
+ }
+ };
+
+ ImageDescriptor newImage = ImageDescriptor.createFromImage(
+ new Image(Display.getCurrent(), CallGraphConstants.PLUGIN_LOCATION + "icons/mode_collapsednodes.gif")); //$NON-NLS-1$
+ mode_collapsednodes.setImageDescriptor(newImage);
+
+ limits = new Action(Messages.getString("CallgraphView.SetLimits"), Action.AS_PUSH_BUTTON) { //$NON-NLS-1$
+ private Spinner limit;
+ private Spinner buffer;
+ private Shell sh;
+ public void run() {
+ sh = new Shell();
+ sh.setLayout(new GridLayout());
+ sh.setSize(150, 200);
+ Label limitLabel = new Label(sh, SWT.NONE);
+ limitLabel.setLayoutData(new GridData(SWT.CENTER, SWT.DEFAULT, true, false));
+ limitLabel.setText(Messages.getString("CallgraphView.MaxNodes")); //$NON-NLS-1$
+ limit = new Spinner(sh, SWT.BORDER);
+ limit.setMaximum(5000);
+ limit.setSelection(graph.getMaxNodes());
+ limit.setLayoutData(new GridData(SWT.CENTER, SWT.DEFAULT, true, false));
+
+ Label bufferLabel = new Label(sh, SWT.NONE);
+ bufferLabel.setLayoutData(new GridData(SWT.CENTER, SWT.DEFAULT, true, false));
+ bufferLabel.setText(Messages.getString("CallgraphView.MaxDepth")); //$NON-NLS-1$
+ buffer = new Spinner(sh, SWT.BORDER);
+ buffer.setMaximum(5000);
+ buffer.setSelection(graph.getLevelBuffer());
+ buffer.setLayoutData(new GridData(SWT.CENTER, SWT.DEFAULT, true, false));
+
+ Button set_limit = new Button(sh, SWT.PUSH);
+ set_limit.setText(Messages.getString("CallgraphView.SetValues")); //$NON-NLS-1$
+ set_limit.setLayoutData(new GridData(SWT.CENTER, SWT.DEFAULT, true, false));
+ set_limit.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ boolean redraw = false;
+ if (limit.getSelection() > 0 && buffer.getSelection() > 0) {
+ graph.setMaxNodes(limit.getSelection());
+ graph.setLevelBuffer(buffer.getSelection());
+
+ if (graph.changeLevelLimits(graph.getLevelOfNode(graph.getRootVisibleNodeNumber()))) {
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
+ Messages.getString("CallgraphView.BufferTooHigh"), Messages.getString("CallgraphView.BufferTooHigh"), //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.getString("CallgraphView.BufferMessage1") + //$NON-NLS-1$
+ Messages.getString("CallgraphView.BufferMessage2") + //$NON-NLS-1$
+ Messages.getString("CallgraphView.BufferMessage3") + //$NON-NLS-1$
+ Messages.getString("CallgraphView.BufferMessage4") + graph.getLevelBuffer() + //$NON-NLS-1$
+ Messages.getString("CallgraphView.BufferMessage5") + PluginConstants.NEW_LINE + PluginConstants.NEW_LINE + //$NON-NLS-1$
+ Messages.getString("CallgraphView.BufferMessage6") + //$NON-NLS-1$
+ Messages.getString("CallgraphView.BufferMessage7")); //$NON-NLS-1$
+ mess.schedule();
+ }
+
+ redraw = true;
+ }
+ sh.dispose();
+
+ if (redraw)
+ graph.draw();
+ }
+
+ });
+
+
+ sh.open();
+ }
+ };
+
+ }
+
+/**
+ * Creates actions by calling the relevant functions
+ */
+ public void createActions() {
+ createFileActions();
+ createHelpActions();
+ createErrorActions();
+ createViewActions();
+ createAnimateActions();
+ createMarkerActions();
+ createMovementActions();
+// createButtonActions();
+
+ mode_collapsednodes.setChecked(true);
+
+ }
+
+ public void createMovementActions() {
+ goto_next = new Action(Messages.getString("CallgraphView.Next")) { //$NON-NLS-1$
+ public void run() {
+ if (graph.isCollapseMode()) {
+ graph.setCollapseMode(false);
+ }
+ int toDraw = graph.getNextCalledNode(graph.getRootVisibleNodeNumber());
+ if (toDraw != -1)
+ graph.draw(toDraw);
+ }
+ };
+
+ goto_previous = new Action(Messages.getString("CallgraphView.Previous")) { //$NON-NLS-1$
+ public void run() {
+ if (graph.isCollapseMode()) {
+ graph.setCollapseMode(false);
+ }
+ int toDraw = graph.getPreviousCalledNode(graph.getRootVisibleNodeNumber());
+ if (toDraw != -1)
+ graph.draw(toDraw);
+ }
+ };
+
+ goto_last = new Action(Messages.getString("CallgraphView.Last")) { //$NON-NLS-1$
+ public void run() {
+ if (graph.isCollapseMode())
+ graph.setCollapseMode(false);
+ graph.draw(graph.getLastFunctionCalled());
+ }
+ };
+ }
+
+ public void createMarkerActions() {
+ markers_next = new Action(Messages.getString("CallgraphView.nextMarker")) { //$NON-NLS-1$
+ public void run() {
+ graph.draw(graph.getNextMarkedNode());
+ }
+ };
+
+ markers_previous = new Action(Messages.getString("CallgraphView.previousMarker")) { //$NON-NLS-1$
+ public void run() {
+ graph.draw(graph.getPreviousMarkedNode());
+ }
+ };
+ }
+
+
+ public static void disposeGraph() {
+ if (graphComp != null && !graphComp.isDisposed())
+ graphComp.dispose();
+ if (treeComp != null && !treeComp.isDisposed())
+ treeComp.dispose();
+ if (viewer!= null && !viewer.isDisposed()) {
+ String tmp = viewer.getText();
+ StyleRange[] tempRange = viewer.getStyleRanges();
+ viewer.dispose();
+ createViewer(masterComposite);
+ viewer.setText(tmp);
+ viewer.setStyleRanges(tempRange);
+ }
+ CallgraphView.setGraphOptions(false);
+ //Force a redraw (.redraw() .update() not working)
+ CallgraphView.maximizeOrRefresh(false);
+ }
+
+ public static Action getAnimation_slow() {
+ return animation_slow;
+ }
+
+ public static void setAnimation_slow(Action animation_slow) {
+ CallgraphView.animation_slow = animation_slow;
+ }
+
+ public static Action getAnimation_fast() {
+ return animation_fast;
+ }
+
+ public static void setAnimation_fast(Action animation_fast) {
+ CallgraphView.animation_fast = animation_fast;
+ }
+
+ public static IMenuManager getAnimation() {
+ return animation;
+ }
+
+ public static void setAnimation(IMenuManager animation) {
+ CallgraphView.animation = animation;
+ }
+
+ public static Action getMode_collapsednodes() {
+ return mode_collapsednodes;
+ }
+
+ public static void setMode_collapsednodes(Action mode_collapsednodes) {
+ CallgraphView.mode_collapsednodes = mode_collapsednodes;
+ }
+
+ public static void setView_refresh(Action view_refresh) {
+ CallgraphView.view_refresh = view_refresh;
+ }
+
+ public static Action getView_refresh() {
+ return view_refresh;
+ }
+
+ public static Action getGoto_next() {
+ return goto_next;
+ }
+
+ public static void setGoto_next(Action gotoNext) {
+ goto_next = gotoNext;
+ }
+
+ public static Action getGoto_previous() {
+ return goto_previous;
+ }
+
+ public static void setGoto_parent(Action gotoParent) {
+ goto_previous = gotoParent;
+ }
+
+ public static Action getGoto_last() {
+ return goto_last;
+ }
+
+ public static void setGoto_last(Action gotoLast) {
+ goto_last = gotoLast;
+ }
+
+ public static Action getOpen_callgraph() {
+ return open_callgraph;
+ }
+
+ public static void setOpen_callgraph(Action openCallgraph) {
+ open_callgraph = openCallgraph;
+ }
+
+ public static Action getSave_callgraph() {
+ return save_callgraph;
+ }
+
+ public static void setSave_callgraph(Action saveCallgraph) {
+ save_callgraph = saveCallgraph;
+ }
+
+ public static Action getError_errorLog() {
+ return error_errorLog;
+ }
+
+ public static void setError_errorLog(Action errorErrorLog) {
+ error_errorLog = errorErrorLog;
+ }
+
+ public static Action getError_deleteError() {
+ return error_deleteError;
+ }
+
+ public static void setError_deleteError(Action errorDeleteError) {
+ error_deleteError = errorDeleteError;
+ }
+
+ public static Action getView_treeview() {
+ return view_treeview;
+ }
+
+ public static void setView_treeview(Action viewTreeview) {
+ view_treeview = viewTreeview;
+ }
+
+ public static Action getView_radialview() {
+ return view_radialview;
+ }
+
+ public static void setView_radialview(Action viewRadialview) {
+ view_radialview = viewRadialview;
+ }
+
+ public static Action getView_aggregateview() {
+ return view_aggregateview;
+ }
+
+ public static void setView_aggregateview(Action viewAggregateview) {
+ view_aggregateview = viewAggregateview;
+ }
+
+ public static Action getView_boxview() {
+ return view_boxview;
+ }
+
+ public static void setView_boxview(Action viewBoxview) {
+ view_boxview = viewBoxview;
+ }
+
+ public static Action getHelp_version() {
+ return help_version;
+ }
+
+ public static void setHelp_version(Action helpVersion) {
+ help_version = helpVersion;
+ }
+
+ public static void setGoto_previous(Action gotoPrevious) {
+ goto_previous = gotoPrevious;
+ }
+
+ public static StapGraph getGraph() {
+ return graph;
+ }
+}
+
+/**
+ * The code graveyard: Where snippets go to die
+ */
+//StyleRange[] existingRange = viewer.getStyleRanges();
+//
+//StyleRange[] s = new StyleRange[styles.size()];
+//StyleRange[] s2 = new StyleRange[styles.size() + existingRange.length];
+//styles.copyInto(s);
+//
+//for (int i = 0; i < existingRange.length; i++)
+// s2[i] = existingRange[i];
+//
+//for (int i = 0; i < styles.size(); i ++)
+// s2[i+existingRange.length] = s[i];
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/GraphUIJob.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/GraphUIJob.java
new file mode 100644
index 0000000000..41c6e0e495
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/GraphUIJob.java
@@ -0,0 +1,226 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.draw2d.LightweightSystem;
+import org.eclipse.draw2d.parts.ScrollableThumbnail;
+import org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners.AutoScrollSelectionListener;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.progress.UIJob;
+
+/**
+ * Initializes and runs a StapGraph and TreeViewer within the SystemTap View
+ *
+ * @author chwang
+ *
+ */
+public class GraphUIJob extends UIJob{
+ private StapGraph g;
+ private StapGraphParser parser;
+ private static int treeSize = 200;
+
+
+ public StapGraph getGraph() {
+ return g;
+ }
+
+ public GraphUIJob(String name, StapGraphParser parser) {
+ super(name);
+ //CREATE THE SHELL
+ this.parser = parser;
+ }
+
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+
+ Display disp = Display.getCurrent();
+ if (disp == null)
+ disp = Display.getDefault();
+
+
+ //-------------Initialize shell, menu
+ treeSize = 200;
+
+
+ //OPEN UP THE SYSTEMTAPVIEW IF IT IS NOT ALREADY OPEN
+ CallgraphView.forceDisplay();
+
+ Composite treeComp = CallgraphView.makeTreeComp(treeSize);
+ Composite graphComp = CallgraphView.makeGraphComp();
+ graphComp.setBackgroundMode(SWT.INHERIT_FORCE);
+
+
+ //Create papa canvas
+ Canvas papaCanvas = new Canvas(graphComp, SWT.BORDER);
+ GridLayout papaLayout = new GridLayout(1, true);
+ papaLayout.horizontalSpacing=0;
+ papaLayout.verticalSpacing=0;
+ papaLayout.marginHeight=0;
+ papaLayout.marginWidth=0;
+ papaCanvas.setLayout(papaLayout);
+ GridData papaGD = new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false);
+ papaGD.widthHint=160;
+ papaCanvas.setLayoutData(papaGD);
+
+
+ //Add first button
+ Image image = new Image(disp, CallGraphConstants.PLUGIN_LOCATION+"icons/up.gif"); //$NON-NLS-1$
+ Button up = new Button(papaCanvas, SWT.PUSH);
+ GridData buttonData = new GridData(SWT.CENTER, SWT.CENTER, true, false);
+ buttonData.widthHint = 150;
+ buttonData.heightHint = 20;
+ up.setData(buttonData);
+ up.setImage(image);
+
+
+ //Add thumb canvas
+ Canvas thumbCanvas = new Canvas(papaCanvas, SWT.NONE);
+
+
+ //Add second button
+ image = new Image(disp, CallGraphConstants.PLUGIN_LOCATION+"icons/down.gif"); //$NON-NLS-1$
+ Button down = new Button(papaCanvas, SWT.PUSH);
+ buttonData = new GridData(SWT.CENTER, SWT.CENTER, true, false);
+ buttonData.widthHint = 150;
+ buttonData.heightHint = 0;
+ down.setData(buttonData);
+ down.setImage(image);
+
+
+ //Initialize graph
+ g = new StapGraph(graphComp, SWT.BORDER, treeComp, papaCanvas);
+ g.setLayoutData(new GridData(this.getDisplay().getPrimaryMonitor().getBounds().width - 200,this.getDisplay().getPrimaryMonitor().getBounds().height - 200));
+
+ up.addSelectionListener(new AutoScrollSelectionListener(
+ AutoScrollSelectionListener.AutoScroll_up, g));
+ down.addSelectionListener(new AutoScrollSelectionListener(
+ AutoScrollSelectionListener.AutoScroll_down, g));
+
+
+ //Initialize thumbnail
+ GridData thumbGD = new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false);
+ thumbGD.widthHint=160;
+ thumbCanvas.setLayoutData(thumbGD);
+ LightweightSystem lws = new LightweightSystem(thumbCanvas);
+ ScrollableThumbnail thumb = new ScrollableThumbnail(g.getViewport());
+ thumb.setSource(g.getContents());
+ lws.setContents(thumb);
+
+ //-------------Load graph data
+ g.loadData(SWT.NONE, 0, StapGraph.CONSTANT_TOP_NODE_NAME, 1, 1, -1, false, ""); //$NON-NLS-1$
+ boolean marked = false;
+ String msg = ""; //$NON-NLS-1$
+
+
+ for (int id_parent : parser.serialMap.keySet()) {
+ if (g.getData(id_parent) == null) {
+ if (parser.markedMap.get(id_parent) != null) {
+ marked = true;
+ msg = parser.markedMap.get(id_parent);
+ }
+ g.loadData(SWT.NONE, id_parent, parser.serialMap.get(id_parent), parser.timeMap.get(id_parent),
+ 1, 0, marked, msg);
+ }
+
+ for (int id_child : parser.outNeighbours.get(id_parent)) {
+
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+
+ marked = false;
+ msg = ""; //$NON-NLS-1$
+ if (parser.markedMap.get(id_child) != null) {
+ marked = true;
+ msg = parser.markedMap.get(id_child);
+ }
+ if (id_child != -1) {
+ if (parser.timeMap.get(id_child) == null){
+ g.loadData(SWT.NONE, id_child, parser.serialMap
+ .get(id_child), parser.timeMap.get(0),
+ 1, id_parent, marked,msg);
+ }else{
+ g.loadData(SWT.NONE, id_child, parser.serialMap
+ .get(id_child), parser.timeMap.get(id_child),
+ 1, id_parent, marked,msg);
+ }
+ }
+ }
+
+ }
+
+
+ g.aggregateCount = parser.countMap;
+ g.aggregateTime = parser.cumulativeTimeMap;
+
+ //Set total time
+ g.setTotalTime(parser.totalTime);
+
+ //-------------Finish initializations
+ //Generate data for collapsed nodes
+ g.recursivelyCollapseAllChildrenOfNode(g.getTopNode());
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ g.initializeTree();
+ g.setLastFunctionCalled(parser.lastFunctionCalled);
+
+
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ g.setFocus();
+ g.setCallOrderList(parser.callOrderList);
+
+ g.setProject(parser.project);
+
+ CallgraphView.setValues(graphComp, treeComp, g, parser);
+ CallgraphView.createPartControl();
+ g.draw(StapGraph.CONSTANT_DRAWMODE_RADIAL, StapGraph.CONSTANT_ANIMATION_SLOW,
+ g.getFirstUsefulNode());
+
+ return Status.OK_STATUS;
+ }
+
+
+ /**
+ * Returns number of StapData objects created
+ * @return
+ */
+ public int getNumberOfDataNodes() {
+ return g.getDataMapSize();
+ }
+
+
+ /**
+ * For easier JUnit testing only. Allows public access to run method without scheduling an extra job.
+ *
+ * @param m
+ * @return
+ */
+ public IStatus testRun(IProgressMonitor m) {
+ return runInUIThread(m);
+ }
+
+
+}
+
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/Messages.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/Messages.java
new file mode 100644
index 0000000000..cdadf95b69
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/Messages.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.systemtap.local.callgraph.messages"; //$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/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapData.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapData.java
new file mode 100644
index 0000000000..1657272e78
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapData.java
@@ -0,0 +1,228 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.TreeMap;
+
+/**
+ * Contains information to populate StapNodes with
+ *
+ */
+public class StapData {
+ public boolean expandable;
+ public int id; //id of the StapNode
+ public long time;
+ public int called;
+ public int caller;
+ public int style;
+ public int levelOfRecursion;
+ public String name;
+ public boolean noCaller;
+ public List<Integer> callees;
+ public List<Integer> collapsedCallees;
+ private StapGraph graph;
+ public boolean hasCollapsedChildren;
+ public boolean isCollapsed;
+ public boolean onlyChildWithThisName;
+ private boolean partOfCollapsedNode;
+ public int collapsedCaller;
+ private boolean marked;
+ public String markedMessage;
+
+ public boolean isPartOfCollapsedNode() {
+ return partOfCollapsedNode;
+ }
+
+
+
+
+ /**
+ * Initialize StapData object
+ *
+ * @param graphModel
+ * @param style
+ * @param txt
+ * @param time
+ * @param called
+ * @param currentID
+ * @param caller
+ * @param isMarked
+ * @param message
+ */
+ public StapData(StapGraph graphModel, int style, String txt,
+ long time, int called, int currentID, int caller, boolean isMarked, String message) {
+ this.time = time;
+ this.style = style;
+ this.called = called;
+ this.expandable = false;
+ callees = new ArrayList<Integer>();
+ collapsedCallees = new ArrayList<Integer>();
+ this.id = currentID;
+ this.name = txt;
+ this.graph = graphModel;
+ this.hasCollapsedChildren = false;
+ this.isCollapsed = false;
+ this.onlyChildWithThisName = false;
+ this.partOfCollapsedNode= false;
+ this.collapsedCaller = -1;
+ this.caller = caller;
+ this.levelOfRecursion = 0;
+ this.marked = isMarked;
+ this.markedMessage = message;
+
+
+ //Add this data to the caller's list of IDs
+ if (this.caller != -1) {
+ if (graphModel.getData(this.caller) != null) {
+ graphModel.getData(this.caller).addCallee(this.id, this.time);
+ this.levelOfRecursion = graphModel.getData(this.caller).levelOfRecursion + 1;
+ }
+ }
+
+ //---------------Recursion management
+ //Insert new level if necessary
+ if (graphModel.levels.get(levelOfRecursion) == null)
+ graphModel.levels.put(levelOfRecursion, new ArrayList<Integer>());
+ graphModel.levels.get(levelOfRecursion).add(this.id);
+
+ //Keep track of the lowest level of recursion
+ if (levelOfRecursion > graphModel.getLowestLevelOfNodesAdded())
+ graphModel.setLowestLevelOfNodesAdded(levelOfRecursion);
+
+
+ this.noCaller = (caller == -1) ? true : false;
+ }
+
+
+ /**
+ * Add the given id to my list of children/callees. Sort based on time
+ *
+ * @param id
+ * @return
+ */
+ public int addCallee(int id, long time) {
+
+ //TODO: This is phenomenally inefficient. We should just add them all
+ //then call a sort once instead of doing some crazy n! insertion :P
+
+ //Insert id based on its time
+ int size = callees.size();
+
+ if (size ==0) {
+ callees.add(id);
+ return callees.size();
+ }
+ int position = search(time);
+
+ if (position == -1) callees.add(id);
+ else callees.add(position, id);
+
+ return callees.size();
+ }
+
+
+ /**
+ * Returns the proper position in callees list for the node with the given time.
+ * Afterwards an insert at the return value will put the node in the right spot.
+ * @param time
+ * @return location in callees
+ */
+ private int search(long time) {
+ if (time > graph.getData(callees.get(0)).time)
+ return 0;
+
+ for (int i = 1; i < callees.size(); i++) {
+ if (time < graph.getData(callees.get(i -1)).time &&
+ time > graph.getData(callees.get(i)).time)
+ return i;
+ }
+
+ return -1;
+ }
+
+
+ /**
+ * Creates a node in the given graphModel using this stapData
+ * @param graphModel
+ * @return the generated stapNode
+ */
+
+ public StapNode makeNode(StapGraph graphModel) {
+ return new StapNode(graphModel, style, this);
+ }
+
+ /**
+ * Sort the list of callees according to time
+ */
+ public void sortByTime(){
+ TreeMap<Long,ArrayList<StapData>> tempList = new TreeMap<Long,ArrayList<StapData>>();
+ //INDEX ALL THE STAPDATA INTO AN ARRAY AT THE CALCULATED INDEX
+ //SCATTERED INDICES : 0,1,...,5,..,10
+ for (int val : collapsedCallees){
+ if (tempList.get(graph.getData(val).time) == null){
+ tempList.put(graph.getData(val).time, new ArrayList<StapData>());
+ }
+
+ tempList.get(graph.getData(val).time).add(graph.getData(val));
+ }
+
+ collapsedCallees.clear();
+ int count = 0;
+ // ANOTHER PASS THROUGH TO INDEX CONTINUOUSLY 0,1,2,..
+ for (long i : tempList.descendingKeySet()) {
+ for (StapData j : tempList.get(i)){
+ collapsedCallees.add(count, j.id);
+ }
+ count++;
+ }
+
+ }
+
+ /**
+ * Indicate that this StapData is part of a collapsed node (will not be drawn in
+ * uncollapsed mode)
+ * @param partOfCollapsedNode
+ */
+ public void setPartOfCollapsedNode(boolean partOfCollapsedNode) {
+ this.partOfCollapsedNode = partOfCollapsedNode;
+ }
+
+ /**
+ * Indicate that this StapData was marked by the user
+ */
+ public void setMarked() {
+ marked = true;
+ }
+
+ /**
+ * Check if this StapData is marked
+ * @return
+ */
+ public boolean isMarked() {
+ return marked;
+ }
+
+
+
+
+ public boolean isOnlyChildWithThisName() {
+ return onlyChildWithThisName;
+ }
+
+
+
+
+ public void setOnlyChildWithThisName(boolean onlyChildWithThisName) {
+ this.onlyChildWithThisName = onlyChildWithThisName;
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapGraph.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapGraph.java
new file mode 100644
index 0000000000..c0bfe0cd16
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapGraph.java
@@ -0,0 +1,1832 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph;
+
+import java.text.NumberFormat;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.TreeSet;
+import java.util.Map.Entry;
+
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.draw2d.Animation;
+import org.eclipse.draw2d.Label;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners.StapGraphKeyListener;
+import org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners.StapGraphMouseListener;
+import org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners.StapGraphMouseWheelListener;
+import org.eclipse.linuxtools.systemtap.local.callgraph.treeviewer.StapTreeContentProvider;
+import org.eclipse.linuxtools.systemtap.local.callgraph.treeviewer.StapTreeDoubleClickListener;
+import org.eclipse.linuxtools.systemtap.local.callgraph.treeviewer.StapTreeLabelProvider;
+import org.eclipse.linuxtools.systemtap.local.callgraph.treeviewer.StapTreeListener;
+import org.eclipse.linuxtools.systemtap.local.core.MP;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.zest.core.widgets.Graph;
+import org.eclipse.zest.core.widgets.GraphNode;
+import org.eclipse.zest.layouts.LayoutStyles;
+
+
+public class StapGraph extends Graph {
+
+ public static final String CONSTANT_TOP_NODE_NAME = Messages.getString("StapGraph.0"); //$NON-NLS-1$
+ public static final int CONSTANT_HORIZONTAL_SPACING = 50;
+ public static final int CONSTANT_DRAWMODE_BOX = 0;
+ public static final int CONSTANT_DRAWMODE_RADIAL = 1;
+ public static final int CONSTANT_DRAWMODE_TREE = 2;
+ public static final int CONSTANT_DRAWMODE_AGGREGATE = 3;
+ public static final int CONSTANT_ANIMATION_SLOW = 1;
+ public static final int CONSTANT_ANIMATION_FASTER = 2;
+ public static final int CONSTANT_ANIMATION_FASTEST = 3;
+ public static final int CONSTANT_MAX_NUMBER_OF_SIBLINGS = 3;
+ public static final int CONSTANT_MAX_NUMBER_OF_RADIAL_SIBLINGS = 15;
+ public static final int CONSTANT_VERTICAL_INCREMENT = 50;
+ public static final int CONSTANT_HORIZONTAL_SPACING_FOR_BOX = 150;
+ public static final Color CONSTANT_HAS_PARENT = new Color(Display.getCurrent(), 240, 200,
+ 200);
+ public static final Color CONSTANT_HAS_CHILDREN = new Color(Display.getCurrent(), 200,
+ 250, 200);
+ public static final Color CONSTANT_MARKED = new Color(Display.getCurrent(), 210, 112, 214);
+ private int ANIMATION_TIME = 500;
+ //Draw level management
+ private int topLevelToDraw;
+ private int bottomLevelToDraw;
+ private int topLevelOnScreen;
+ public static int levelBuffer = 30;
+ private static int maxNodes = 150;
+
+
+ private int lowestLevelOfNodesAdded;
+ public HashMap<Integer, List<Integer>> levels; //Level number, list of node ids
+
+
+ //Node management
+ private int idOfLastNode;
+ private HashMap<Integer, StapNode> nodeMap; // HashMap of current nodes
+ private HashMap<Integer, StapData> nodeDataMap; // HashMap of all data
+
+ public List<GraphNode> aggregateNodes;
+ public HashMap<String, Long> aggregateTime;
+ public HashMap<String, Integer> aggregateCount;
+ private HashMap <Integer, Integer> collapsedLevelSize;
+ public List<Integer> markedNodes;
+ public List<Integer> markedCollapsedNodes;
+
+ //Modes
+ private boolean collapse_mode;
+ private int draw_mode;
+ private int animation_mode;
+
+ //Time
+ private long totalTime;
+
+ //The current center/top of the nodes list
+ private int rootVisibleNodeNumber;
+
+ //Special cases
+ private boolean killInvalidFunctions; //Toggle hiding of invalid functions
+
+ //Tree viewer
+ private static TreeViewer treeViewer;
+ private Composite treeComp;
+ private static IDoubleClickListener treeDoubleListener;
+ public HashMap<Integer, Integer> currentPositionInLevel;
+ //(level, next horizontal position to place a node)
+
+ //For cycling through marked nodes
+ private int nextMarkedNode;
+
+ //Zooming factor
+ public double scale;
+
+ private int counter; //All purpose counting variable
+
+
+ private ArrayList<Integer> callOrderList;
+ private int lastFunctionCalled;
+ private Canvas thumbCanvas;
+
+
+ private ICProject project;
+
+ private int treeLevelFromRoot;
+ public StapGraphMouseListener getMouseListener() {
+ return mListener;
+ }
+
+
+
+ public StapGraphMouseWheelListener getMouseWheelListener() {
+ return mwListener;
+ }
+
+
+
+ public StapGraphKeyListener getKeyListener() {
+ return kListener;
+ }
+
+
+
+ private StapGraphMouseListener mListener;
+ private StapGraphMouseWheelListener mwListener;
+ private StapGraphKeyListener kListener;
+
+ public StapGraph(Composite parent, int style, Composite treeComp, Canvas tCanvas) {
+ super(parent, style);
+
+ //-------------Initialize variables
+ thumbCanvas = tCanvas;
+ nodeMap = new HashMap<Integer, StapNode>();
+ levels = new HashMap<Integer, List<Integer>>();
+ nodeDataMap = new HashMap<Integer, StapData>();
+ aggregateTime = new HashMap<String, Long>();
+ aggregateCount = new HashMap<String, Integer>();
+ currentPositionInLevel = new HashMap<Integer, Integer>();
+ collapsedLevelSize = new HashMap<Integer, Integer>();
+ markedNodes = new ArrayList<Integer>();
+ markedCollapsedNodes = new ArrayList<Integer>();
+ animation_mode = 1;
+ idOfLastNode = 0;
+ rootVisibleNodeNumber=0;
+ totalTime = 0;
+ collapse_mode = false;
+ killInvalidFunctions = true;
+ nextMarkedNode = -1;
+ scale = 1;
+ treeLevelFromRoot = 0;
+
+ this.treeComp = treeComp;
+ if (treeViewer == null || treeViewer.getControl().isDisposed()) {
+ //Only create once
+ treeViewer = new TreeViewer(this.treeComp);
+ StapTreeListener stl = new StapTreeListener(treeViewer.getTree().getHorizontalBar());
+ treeViewer.addTreeListener(stl);
+ }
+
+ //-------------Add listeners
+ mListener = new StapGraphMouseListener(this);
+ kListener = new StapGraphKeyListener(this);
+ mwListener = new StapGraphMouseWheelListener(this);
+ this.addMouseListener(mListener);
+ this.addKeyListener(kListener);
+ this.addMouseWheelListener(mwListener);
+
+ }
+
+
+
+ /**
+ * Initialize the treeviewer with data from the graph
+ */
+ public void initializeTree() {
+ if (treeViewer.getContentProvider() == null) {
+ StapTreeContentProvider scp = new StapTreeContentProvider();
+ treeViewer.setContentProvider(scp);
+ }
+
+ ((StapTreeContentProvider) treeViewer.getContentProvider()).setGraph(this);
+
+ if (treeViewer.getLabelProvider() != null)
+ treeViewer.getLabelProvider().dispose();
+ StapTreeLabelProvider prov = new StapTreeLabelProvider();
+ treeViewer.setLabelProvider(prov);
+
+ if (treeDoubleListener != null) {
+ treeViewer.removeDoubleClickListener(treeDoubleListener);
+ }
+ treeDoubleListener = new StapTreeDoubleClickListener(treeViewer, this);
+ treeViewer.addDoubleClickListener(treeDoubleListener);
+
+ treeViewer.setInput(getData(getTopNode()));
+ treeViewer.refresh();
+ }
+
+
+ /**
+ * Create a new StapData object with the given parameters
+ *
+ * @param style
+ * @param id
+ * @param txt
+ * @param time
+ * @param called
+ * @param caller
+ * @return
+ */
+ public int loadData(int style, int id, String txt, long time, int called,
+ int caller, boolean isMarked, String message) {
+ //-------------Invalid function catching
+ // Catches some random C/C++ directive functions
+ if (id < 10 && killInvalidFunctions) {
+ if (txt.contains(")")) { //$NON-NLS-1$
+ return -1;
+ } else if (txt.contains(".")) { //$NON-NLS-1$
+ return -1;
+ } else if (txt.contains("\"")) { //$NON-NLS-1$
+ return -1;
+ }
+ }
+
+ //-------------Add node to appropriate map/list
+ StapData n = new StapData(this, style, txt, time, called, id, caller, isMarked, message);
+ if (isMarked)
+ markedNodes.add(id);
+ nodeDataMap.put(id, n);
+
+ // Make no assumptions about the order that data is input
+ if (id > idOfLastNode)
+ idOfLastNode = id;
+ return id;
+ }
+
+ /*
+ * Fully functional draw functions
+ *
+ * -Radial
+ * -Tree
+ */
+
+ /**
+ * Draws a 2-node-layer circle
+ * Draws all nodes in place.
+ * @param centerNode
+ */
+ public void drawRadial(int centerNode) {
+ int radius = Math.min(this.getBounds().width,
+ this.getBounds().height)
+ / 2 - CONSTANT_VERTICAL_INCREMENT;
+
+ rootVisibleNodeNumber = centerNode;
+ if (nodeMap.get(centerNode) == null) {
+ nodeMap.put(centerNode, getNodeData(centerNode).makeNode(this));
+ }
+
+ // Draw node in center
+ StapNode n = nodeMap.get(centerNode);
+ int x = this.getBounds().width / 2 - n.getSize().width/2;
+ int y = this.getBounds().height / 2 - n.getSize().height;
+ n.setLocation(x, y);
+
+ if (getData(centerNode).isMarked())
+ nodeMap.get(centerNode).setBackgroundColor(CONSTANT_MARKED);
+ radialHelper(centerNode, x, y, radius, 0);
+ }
+
+ /**
+ * Helps animation of radial draw. Can be replaced by a draw and moveAll.
+ *
+ * @param centerNode
+ */
+ public void preDrawRadial(int centerNode) {
+ rootVisibleNodeNumber = centerNode;
+
+ if (nodeMap.get(centerNode) == null) {
+ nodeMap.put(centerNode, getNodeData(centerNode).makeNode(this));
+ StapNode n = nodeMap.get(centerNode);
+ n.setLocation(this.getBounds().width / 2, this.getShell()
+ .getSize().y / 2);
+ }
+
+ //Pass coordinates of the node to radialHelper
+ StapNode n = nodeMap.get(centerNode);
+ int x = n.getLocation().x;
+ int y = n.getLocation().y;
+ radialHelper(centerNode, x, y, 0, 0);
+ }
+
+ /**
+ * Completes radial-mode draws
+ *
+ * @param id
+ * @param x
+ * @param y
+ * @param radius
+ * @param startFromChild
+ */
+ public void radialHelper(int id, int x, int y, int radius, int startFromChild) {
+ //-------------Draw parent node
+ // Draw caller node right beside this one, in a different color
+ int callerID = nodeDataMap.get(id).caller;
+ if (callerID != -1) {
+ if (getNode(callerID) == null) {
+ nodeMap.put(callerID, getNodeData(callerID).makeNode(this));
+ }
+ getNode(callerID).setBackgroundColor(CONSTANT_HAS_PARENT);
+ getNode(callerID).setLocation(x + radius / 5, y - radius / 5);
+ if (getNode(id).connection == null) {
+ getNode(id).makeConnection(SWT.NONE, getNode(callerID), getData(id).called);
+ }
+
+ if (getData(callerID).isMarked())
+ nodeMap.get(callerID).setBackgroundColor(CONSTANT_MARKED);
+ }
+
+
+ //-------------Draw children nodes
+ List<Integer> nodeList;
+ if (!collapse_mode) {
+ nodeList = nodeDataMap.get(id).callees;
+ }
+ else {
+ nodeList = nodeDataMap.get(id).collapsedCallees;
+ }
+
+ int numberOfNodes;
+
+ if (nodeList.size() >= CONSTANT_MAX_NUMBER_OF_RADIAL_SIBLINGS ) {
+ numberOfNodes = CONSTANT_MAX_NUMBER_OF_RADIAL_SIBLINGS;
+ }
+ else
+ numberOfNodes = nodeList.size();
+
+
+ double angle;
+ if (numberOfNodes > 5)
+ angle = 2 * Math.PI / numberOfNodes;
+ else
+ angle = 2 * Math.PI / CONSTANT_MAX_NUMBER_OF_RADIAL_SIBLINGS;
+
+ int i = 0;
+
+ for (i = 0; i < numberOfNodes; i++) {
+
+
+ int subID = nodeList.get(i);
+ int yOffset = 0;
+ int xOffset = 0;
+ if (nodeMap.get(subID) == null) {
+ nodeMap.put(subID, getNodeData(subID).makeNode(this));
+ }
+
+ StapNode subN = nodeMap.get(subID);
+ if (radius != 0) {
+ yOffset = (int) (radius * Math.cos(angle * i));
+ xOffset = (int) (radius * Math.sin(angle * i) + StapNode.getNodeSize()*Math.sin(angle*i)*3);
+ }
+
+
+ if (hasChildren(subID))
+ subN.setBackgroundColor(CONSTANT_HAS_CHILDREN);
+ subN.setLocation(x + xOffset, y + yOffset);
+ if (subN.connection == null) {
+ subN.makeConnection(SWT.NONE, nodeMap.get(id), nodeDataMap
+ .get(subID).called);
+ }
+
+ if (getData(subID).isMarked())
+ subN.setBackgroundColor(CONSTANT_MARKED);
+ }
+ }
+
+
+ /**
+ * THE AGGREGATE VIEW FROM VIEW -> AGGREGATE VIEW
+ */
+ public void drawAggregateView(){
+
+ //TEMPORARY STORAGE OF THE ENTRIES
+ //IMPLEMENTS A COMPARATOR TO STORE BY ORDER OF THE VALUE
+ TreeSet<Entry<String, Long>> sortedValues = new TreeSet<Entry<String, Long>>(StapGraph.VALUE_ORDER);
+ sortedValues.addAll(aggregateTime.entrySet());
+
+
+ if (aggregateNodes == null){
+ aggregateNodes = new ArrayList<GraphNode>();
+ }else{
+ aggregateNodes.clear();
+ }
+
+ //-------------Format numbers
+ float percentage_time;
+ float percentage_count;
+ int maxTimesCalled = 0;
+ final int colorLevels = 15;
+ final int colorLevelDifference = 12;
+ int primary;
+ int secondary;
+
+ NumberFormat num = NumberFormat.getInstance(Locale.CANADA);
+ num.setMinimumFractionDigits(2);
+ num.setMaximumFractionDigits(2);
+
+ //FIND THE MOST TIMES A FUNCTION IS CALLED
+ for (int val : aggregateCount.values()){
+ if ( val > maxTimesCalled){
+ maxTimesCalled = val;
+ }
+ }
+
+ //-------------Draw nodes
+ for (Entry<String, Long> ent : sortedValues) {
+
+ GraphNode n = new GraphNode(this.getGraphModel(),SWT.NONE);
+ aggregateNodes.add(n);
+
+ percentage_count = (float)aggregateCount.get(ent.getKey()) / (float)maxTimesCalled;
+ percentage_time = ((float) ent.getValue() / this
+ .getTotalTime() * 100);
+ n.setText(ent.getKey() + "\n" //$NON-NLS-1$
+ + num.format((float)percentage_time) + "%" + "\n" //$NON-NLS-1$ //$NON-NLS-2$
+ + aggregateCount.get(ent.getKey()) + "\n") ; //$NON-NLS-1$
+ n.setData("AGGREGATE_NAME", ent.getKey()); //$NON-NLS-1$
+
+
+ primary = (int)(percentage_count * colorLevels * colorLevelDifference);
+ secondary = (colorLevels * colorLevelDifference) - (int)(percentage_count * colorLevels * colorLevelDifference);
+
+ primary = Math.max(0, primary);
+ secondary = Math.max(0, secondary);
+
+ primary = Math.min(primary, 255);
+ secondary = Math.min(secondary, 255);
+
+
+ Color c = new Color(this.getDisplay(),primary,0,secondary);
+ n.setBackgroundColor(c);
+ n.setHighlightColor(c);
+ n.setForegroundColor(new Color(this.getDisplay(),255,255,255));
+ n.setTooltip(new Label(
+ Messages.getString("StapGraph.2")+ ent.getKey() + "\n" //$NON-NLS-1$ //$NON-NLS-2$
+ + Messages.getString("StapGraph.3") + num.format((float)percentage_time) + "%" + "\n" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ + Messages.getString("StapGraph.1") + aggregateCount.get(ent.getKey()) //$NON-NLS-1$
+ ));
+ n.setBorderWidth(2);
+ }
+
+ //Set layout to gridlayout
+ this.setLayoutAlgorithm(new AggregateLayoutAlgorithm(LayoutStyles.NONE, sortedValues, this.getTotalTime(), this.getBounds().width), true);
+ }
+
+
+
+ /**
+ * Draws a tree starting with node id, putting node id at location x,y
+ * @param id
+ * @param x
+ * @param y
+ */
+ public void drawTree(int id, int x, int y) {
+
+ //-------------Create node id
+ // Create and set
+ if (nodeMap.get(id) == null) {
+ nodeMap.put(id, getData(id).makeNode(this));
+ }
+ StapNode n = getNode(id);
+ n.setLocation(x,y);
+ n.setSize(n.getSize().width/scale, n.getSize().height/scale);
+
+ //This is the lowest level of nodes to draw, and it still has kids
+ if (getLevelOfNode(id) == bottomLevelToDraw &&
+ getData(id).callees.size() > 0)
+ n.setBackgroundColor(CONSTANT_HAS_CHILDREN);
+
+ if (getData(id).isMarked())
+ n.setBackgroundColor(CONSTANT_MARKED);
+
+
+ //-------------Get appropriate list of children
+ List<Integer> callees = null;
+ int usefulSize = 0;
+
+ // Determine which list of callees to use
+ if (!collapse_mode)
+ callees = getData(id).callees;
+ else
+ callees = getData(id).collapsedCallees;
+ if (callees == null)
+ return;
+
+ int cLevel = getLevelOfNode(id) + 1;
+
+ if (!collapse_mode) {
+ if (levels.get(cLevel) != null) {
+ usefulSize = levels.get(cLevel).size() - collapsedLevelSize.get(cLevel);
+ }
+ }
+ else {
+ if (collapsedLevelSize.get(cLevel) != null)
+ usefulSize = collapsedLevelSize.get(cLevel);
+ }
+ //-------------Draw all children
+ for (int i = 0; i < callees.size(); i++) {
+ //Find the number of nodes on this level for spacing purposes
+ int childID = callees.get(i);
+ int childLevel = getLevelOfNode(childID);
+
+
+ //Initialise the offset to roughly centre the nodes
+ if (currentPositionInLevel.get(getLevelOfNode(childID)) == null) {
+ int tmp = (int) (CONSTANT_HORIZONTAL_SPACING*(usefulSize-1) * -1/scale);
+ currentPositionInLevel.put(childLevel, getNode(rootVisibleNodeNumber)
+ .getLocation().x + tmp);
+ }
+
+ //Recursive iteration
+ if (childLevel <= bottomLevelToDraw &&
+ childLevel <= lowestLevelOfNodesAdded) {
+ drawTree(callees.get(i), currentPositionInLevel.get(childLevel),
+ y + (int)(CONSTANT_VERTICAL_INCREMENT/scale));
+
+ //Do not scale newSize or nodes will no longer be adjacent
+ int newSize = currentPositionInLevel.get(getLevelOfNode(childID))
+ + getNode(childID).getSize().width;
+
+ //Leave a small blank space between nodes for aesthetic purposes
+ if (i == callees.size() - 1)
+ newSize += CONSTANT_HORIZONTAL_SPACING/3;
+ currentPositionInLevel.put(getLevelOfNode(childID), newSize);
+ }
+
+ }
+ }
+
+ /**
+ * Extend the tree downwards
+ */
+ public void extendTree() {
+ if (bottomLevelToDraw >= lowestLevelOfNodesAdded)
+ return;
+
+
+ StapData data = getData(rootVisibleNodeNumber);
+ if (data.callees != null) {
+ if (data.callees.size() < 1) {
+ return;
+ }
+ }
+
+ List<Integer> list = data.callees;
+ if (isCollapseMode())
+ list = data.collapsedCallees;
+
+ if (list.size() == 1) {
+ //Special case - only one child of the root node
+ //Therefore change root node to this new root node
+ int aMode = animation_mode;
+ draw(CONSTANT_DRAWMODE_TREE, CONSTANT_ANIMATION_FASTEST, list.get(0));
+ setAnimationMode(aMode);
+ return;
+ }
+
+
+ List<Integer> bottomList = levels.get(bottomLevelToDraw);
+ bottomLevelToDraw++;
+
+ for (int i : bottomList) {
+ if (getNode(i) != null) {
+ getNode(i).setBackgroundColor(DEFAULT_NODE_COLOR);
+ getParentNode(i).setBackgroundColor(DEFAULT_NODE_COLOR);
+ drawTree(i, getNode(i).getLocation().x, getNode(i).getLocation().y);
+ }
+ }
+
+ treeLevelFromRoot++;
+ }
+
+ /**
+ * Removes nodes from the bottom of the tree
+ */
+ public void shrinkTree() {
+ if (treeLevelFromRoot < 1)
+ return;
+
+
+ bottomLevelToDraw--;
+ deleteAll(rootVisibleNodeNumber);
+
+ int i = rootVisibleNodeNumber;
+ currentPositionInLevel.clear();
+ drawTree(i, getNode(i).getLocation().x, getNode(i).getLocation().y);
+
+ treeLevelFromRoot--;
+ }
+
+ /**
+ * Moves all nodes to the point x,y
+ * @param x
+ * @param y
+ */
+ public void moveAllNodesTo(int x, int y) {
+ for (int i: nodeMap.keySet()) {
+ nodeMap.get(i).setLocation(x,y);
+ }
+ }
+
+ /*
+ * Partially functional draw functions
+ *
+ * -Box (drawFromBottomToTop)
+ * Breaks when switching modes??
+ */
+
+
+ /**
+ * Draws a tree roughly starting from node id
+ */
+ public void drawBox(int id, int x, int y) {
+ setLevelLimits(id);
+ int MaxLevelPixelWidth = 1;
+ int currPixelWidth = 1;
+
+ // FIND THE LEVEL THAT WILL BE THE WIDEST
+ // WILL BE A USEFUL VALUE LATER ON
+ int count;
+
+
+ for (int i = topLevelToDraw; i <= bottomLevelToDraw; i++) {
+ count = 0;
+ levels.get(i).add(0, count);
+ int size = levels.get(i).size();
+ for (int j = 1; j < size; j++){
+ int val = levels.get(i).get(j);
+ if (collapse_mode && nodeDataMap.get(val).isPartOfCollapsedNode()) {
+ continue;
+ }
+ if (!collapse_mode && nodeDataMap.get(val).isCollapsed)
+ continue;
+
+ currPixelWidth += nodeDataMap.get(val).name.length() * 10 + StapGraph.CONSTANT_HORIZONTAL_SPACING_FOR_BOX;
+ if (MaxLevelPixelWidth < currPixelWidth) {
+ MaxLevelPixelWidth = currPixelWidth;
+ }
+ count++;
+ levels.get(i).remove(0);
+ levels.get(i).add(0, count);
+ }
+ currPixelWidth = 1;
+ }
+
+ MaxLevelPixelWidth = (int)(MaxLevelPixelWidth/scale);
+ counter = 0;
+ if (id == getFirstUsefulNode())
+ nodeMap.get(id).setLocation(150 + (MaxLevelPixelWidth/2),y);
+
+ drawFromBottomToTop(bottomLevelToDraw, y
+ + ((bottomLevelToDraw - topLevelToDraw ) * 3 * (int)(CONSTANT_VERTICAL_INCREMENT/scale)),
+ MaxLevelPixelWidth);
+
+ if (id == getFirstUsefulNode())
+ nodeMap.get(id).setLocation(150 + (MaxLevelPixelWidth/2),y);
+ }
+
+ public void drawFromBottomToTop(int level, int height,
+ int MaxLevelPixelWidth) {
+
+ // FINISHED DRAWING THE ROOT IN THE LAST RECURSIVE CALL
+ if (level == 0 || level < topLevelToDraw ) {
+ return;
+ }
+
+ // FIND ALL THE CHILDREN AT LEVEL 'level'
+ int total = levels.get(level).remove(0);
+ int count = 1;
+
+ //CREATE THE NODES
+ for (int i = 0; i < levels.get(level).size(); i ++) {
+ int id = levels.get(level).get(i);
+
+ if (collapse_mode && nodeDataMap.get(id).isPartOfCollapsedNode()) {
+ continue;
+ }
+ if (!collapse_mode && nodeDataMap.get(id).isCollapsed)
+ continue;
+
+ if (nodeMap.get(id) == null) {
+ nodeMap.put(id, getNodeData(id).makeNode(this));
+ }
+
+ StapNode n = nodeMap.get(id);
+
+ n.setVisible(true);
+ n.setSize(n.getSize().width/scale, n.getSize().height/scale);
+ //Placement algorithm
+ if (getAnimationMode() == CONSTANT_ANIMATION_SLOW){
+
+ if (counter <= ANIMATION_TIME)
+ Animation.markBegin();
+ n.setLocation(150 + (nodeMap.get(getRootVisibleNodeNumber()).getLocation().x),nodeMap.get(getRootVisibleNodeNumber()).getLocation().y);
+ n.setLocation(150 + (MaxLevelPixelWidth / (total + 1) * count),height);
+
+ if (counter <= ANIMATION_TIME) {
+ Animation.run(ANIMATION_TIME/nodeMap.size()/3);
+ counter+=ANIMATION_TIME/nodeMap.size();
+ }
+
+ }else{
+ n.setLocation(150 + (MaxLevelPixelWidth / (total + 1) * count),height);
+ }
+
+ //IF WE CANNOT DISPLAY ALL NODES COLOUR NODES ON BOTTOM THAT STILL HAVE CHILDREN
+ if (level == bottomLevelToDraw && nodeDataMap.get(id).callees.size() != 0){
+ n.setBackgroundColor(CONSTANT_HAS_CHILDREN);
+ }
+
+
+
+ if (getData(n.id).isMarked())
+ n.setBackgroundColor(CONSTANT_MARKED);
+
+
+ // FIND ALL THE NODES THAT THIS NODE CALLS AND MAKE CONNECTIONS
+ List<Integer> setOfCallees = null;
+ if (collapse_mode)
+ setOfCallees = nodeDataMap.get(id).collapsedCallees;
+ else
+ setOfCallees = nodeDataMap.get(id).callees;
+
+ for (int val : setOfCallees) {
+ if (nodeMap.get(val) != null)
+ nodeMap.get(val).makeConnection(SWT.NONE, n,
+ nodeDataMap.get(val).called);
+ }
+
+ count++;
+ }
+ // DRAW THE NEXT LEVEL UP
+ drawFromBottomToTop(level - 1, height - (3 * (int)(CONSTANT_VERTICAL_INCREMENT/scale)),
+ MaxLevelPixelWidth);
+ }
+
+
+
+ /*
+ * Level/node management
+ */
+
+ /**
+ * Delete all nodes except for the node with the specified nodeID
+ *
+ * @param exception
+ * - id of node NOT to delete (use -1 for 'no exceptions')
+ */
+ public void deleteAll(int exception) {
+ //-------------Delete aggregate nodes
+ if (aggregateNodes != null){
+ for (GraphNode n : aggregateNodes){
+ n.dispose();
+ }
+ aggregateNodes.clear();
+ }
+
+ //-------------Save exception node's location
+ int x = -1;
+ int y = -1;
+ if (exception != -1 && nodeMap.get(exception) != null) {
+ x = nodeMap.get(exception).getLocation().x;
+ y = nodeMap.get(exception).getLocation().y;
+ }
+
+ //-------------Delete all nodes
+ for (int i : nodeMap.keySet()) {
+ StapNode node = nodeMap.get(i);
+ if (node == null)
+ continue;
+
+ node.unhighlight();
+ node.dispose();
+ }
+ nodeMap.clear();
+
+ //-------------Recreate exception
+ if (x != -1 && y != -1) {
+ StapNode n =getData(exception).makeNode(this);
+ n.setLocation(x,y);
+ n.highlight();
+ nodeMap.put(exception, n);
+ }
+ }
+
+ /**
+ * Delete a number of levels from the top of the graph
+ *
+ * @param numberOfLevelsToDelete
+ */
+ private void deleteLevelsFromTop(int numberOfLevelsToDelete) {
+
+ if (numberOfLevelsToDelete <= 0)
+ return;
+
+ for (int i = 0; i < numberOfLevelsToDelete; i++) {
+ List<Integer> level = levels.get(topLevelToDraw);
+ for (int j = 0; j < level.size(); j++) {
+ if (nodeMap.get(level.get(j)) != null)
+ nodeMap.remove(level.get(j)).dispose();
+ }
+ topLevelToDraw++;
+ }
+ }
+
+ /**
+ * Delete a number of levels from the bottom of the graph
+ *
+ * @param numberOfLevelsToDelete
+ */
+ private void deleteLevelsFromBottom(int numberOfLevelsToDelete) {
+
+ if (numberOfLevelsToDelete <= 0)
+ return;
+
+ for (int i = 0; i < numberOfLevelsToDelete; i++) {
+ List<Integer> level = levels.get(getBottomLevelToDraw());
+
+ for (int j = 0; j < level.size(); j++) {
+ if (nodeMap.get(level.get(j)) != null)
+ nodeMap.remove(level.get(j)).dispose();
+ }
+ bottomLevelToDraw--;
+ }
+ }
+
+ /**
+ * Sets top level limit to the level of id, bottom level limit to top level
+ * limit + CONSTANT_LEVEL_BUFFER.
+ * Deletes extraneous levels, changes topLevelToDraw, bottomLevelToDraw
+ *
+ * Convenience method: Calls setLevelLimitsToLevel(levelOfNode(id))
+ *
+ * @param id - node to recenter with
+ */
+ public void setLevelLimits(int id) {
+ setTopLevelTo(getLevelOfNode(id));
+ }
+
+ /**
+ * Sets top level limit to the given level, bottom level limit to top level
+ * limit + CONSTANT_LEVEL_BUFFER.
+ * Deletes extraneous levels, changes topLevelToDraw, bottomLevelToDraw
+ *
+ * @param id - node to recenter with
+ */
+
+ public void setTopLevelTo(int new_topLevelToDraw) {
+ changeLevelLimits(new_topLevelToDraw);
+
+ int new_bottomLevelToDraw = new_topLevelToDraw + levelBuffer;
+ if (new_bottomLevelToDraw > lowestLevelOfNodesAdded)
+ new_bottomLevelToDraw = lowestLevelOfNodesAdded;
+
+ deleteLevelsFromTop(new_topLevelToDraw - topLevelToDraw);
+ deleteLevelsFromBottom(getBottomLevelToDraw() - new_bottomLevelToDraw);
+
+ topLevelToDraw = new_topLevelToDraw;
+ bottomLevelToDraw = new_bottomLevelToDraw;
+ }
+
+
+ public boolean changeLevelLimits(int lvl) {
+ int numberOfNodes = 0;
+ List<Integer> list;
+
+ int maxLevel = min(lvl + levelBuffer, lowestLevelOfNodesAdded);
+
+ for (int level = lvl; level < maxLevel; level++) {
+ for (int id : levels.get(level)) {
+ if (isCollapseMode())
+ list = getData(id).collapsedCallees;
+ else
+ list = getData(id).callees;
+
+ numberOfNodes += list.size();
+
+ if (numberOfNodes > maxNodes) {
+ levelBuffer = max(0,level-1);
+ return true;
+ }
+ }
+ }
+
+ return false;
+
+
+ }
+
+ /**
+ * Convenience method to redraw everything.
+ */
+ public void draw() {
+ draw(getFirstUsefulNode());
+ }
+
+ /**
+ * Convenience method to draw with current draw parameters. Equivalent to
+ * draw(graph.draw_mode, graph.animation_mode, id)
+ * @param id
+ */
+ public void draw(int id) {
+ draw(draw_mode, animation_mode, id);
+ }
+
+ /**
+ * Convenience method to draw with current draw parameters. Equivalent to
+ * draw(graph.draw_mode, animation, id)
+ * @param id
+ */
+ public void draw(int animation, int id) {
+ draw(draw_mode, animation, id);
+ }
+
+
+ /**
+ * Draws with the given modes.
+ * @param drawMode
+ * @param animationMode
+ * @param id
+ */
+ public void draw(int drawMode, int animationMode, int id) {
+ setDrawMode(drawMode);
+ setAnimationMode(animationMode);
+ this.clearSelection();
+ treeLevelFromRoot = 0;
+ currentPositionInLevel.clear();
+
+ this.setRedraw(false);
+ if (draw_mode == CONSTANT_DRAWMODE_RADIAL) {
+ //Remove thumbnail
+ GridData gd = (GridData) thumbCanvas.getLayoutData();
+ gd.exclude = true;
+ thumbCanvas.setLayoutData(gd);
+ thumbCanvas.setVisible(false);
+ CallgraphView.layout();
+
+
+ //Add treeComp
+ gd = (GridData) treeComp.getLayoutData();
+ gd.exclude = false;
+ treeComp.setLayoutData(gd);
+ treeComp.setVisible(true);
+ treeViewer.collapseToLevel(getData(id), 1);
+ treeViewer.expandToLevel(getData(id), 1);
+
+
+ } else if (draw_mode == CONSTANT_DRAWMODE_AGGREGATE){
+ //Remove treeComp
+ GridData gd = (GridData) treeComp.getLayoutData();
+ gd.exclude = true;
+ treeComp.setLayoutData(gd);
+ treeComp.setVisible(false);
+
+ CallgraphView.layout();
+ //Remove thumbnail
+ gd = (GridData) thumbCanvas.getLayoutData();
+ gd.exclude = true;
+ thumbCanvas.setLayoutData(gd);
+ thumbCanvas.setVisible(false);
+ }
+ else{
+ //Remove treeComp
+ GridData gd = (GridData) treeComp.getLayoutData();
+ gd.exclude = true;
+ treeComp.setLayoutData(gd);
+ treeComp.setVisible(false);
+
+ CallgraphView.layout();
+
+ //Add thumbnail
+ gd = (GridData) thumbCanvas.getLayoutData();
+ gd.exclude = true;
+ thumbCanvas.setLayoutData(gd);
+ thumbCanvas.setVisible(true);
+ thumbCanvas.setBackground(this.getBackground());
+
+
+ }
+ //Remove treeComp
+ this.setRedraw(true);
+
+
+ //-------------Draw tree
+ if (draw_mode == CONSTANT_DRAWMODE_TREE) {
+ if (animation_mode == CONSTANT_ANIMATION_SLOW) {
+ if (nodeMap.get(id) == null)
+ nodeMap.put(id, getData(id).makeNode(this));
+ int tempX = nodeMap.get(id).getLocation().x;
+ int tempY = nodeMap.get(id).getLocation().y;
+ Animation.markBegin();
+ moveAllNodesTo(tempX, tempY);
+ Animation.run(ANIMATION_TIME);
+
+ deleteAll(id);
+ setLevelLimits(id);
+ rootVisibleNodeNumber = id;
+ drawTree(id, this.getBounds().width / 2, 20);
+ currentPositionInLevel.clear();
+
+ this.update();
+ Animation.markBegin();
+ drawTree(id, this.getBounds().width / 2, 20);
+
+ Animation.run(ANIMATION_TIME);
+ getNode(id).unhighlight();
+ } else {
+ deleteAll(id);
+ setLevelLimits(id);
+ rootVisibleNodeNumber = id;
+ drawTree(id, this.getBounds().width / 2, 20);
+ getNode(id).unhighlight();
+ }
+ }
+
+
+ //-------------Draw radial
+ else if (draw_mode == CONSTANT_DRAWMODE_RADIAL) {
+
+ if (animation_mode == CONSTANT_ANIMATION_SLOW) {
+ rootVisibleNodeNumber = id;
+ deleteAll(id);
+
+ preDrawRadial(id);
+ this.redraw();
+ this.getLightweightSystem().getUpdateManager()
+ .performUpdate();
+
+ Animation.markBegin();
+ nodeMap.get(id).setLocation(this.getBounds().width / 2,
+ this.getBounds().height / 2);
+ drawRadial(id);
+ Animation.run(ANIMATION_TIME);
+ CallgraphView.maximizeOrRefresh(false);
+ }
+
+ else {
+ deleteAll(id);
+ drawRadial(id);
+ }
+ }
+
+ //-------------Draw box
+ else if (draw_mode == CONSTANT_DRAWMODE_BOX) {
+ rootVisibleNodeNumber = id;
+ if (animation_mode == CONSTANT_ANIMATION_SLOW) {
+ if (nodeMap.get(id) == null)
+ nodeMap.put(id, getData(id).makeNode(this));
+
+ Animation.markBegin();
+ moveAllNodesTo(nodeMap.get(id).getLocation().x, nodeMap.get(id).getLocation().y);
+ Animation.run(ANIMATION_TIME);
+
+ deleteAll(id);
+
+ drawBox(id, 0, 0);
+
+ } else {
+ if (nodeMap.get(id) == null)
+ nodeMap.put(id, getData(id).makeNode(this));
+ deleteAll(id);
+ drawBox(id, 0, 0);
+
+ }
+ }
+
+
+ //-------------Draw aggregate
+ else if (draw_mode == CONSTANT_DRAWMODE_AGGREGATE) {
+ rootVisibleNodeNumber = getFirstUsefulNode();
+ deleteAll(-1);
+ drawAggregateView();
+ }
+
+ //THIS CAUSED A NULL POINTER GOING INTO AGGREGATE VIEW
+ if (getNode(id) != null)
+ getNode(id).unhighlight();
+ clearSelection();
+
+ //AFTER FIRST LOADING LET THE GRAPH EXPAND TO FILL THE VIEW
+ this.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
+ }
+
+
+
+ @SuppressWarnings("unchecked")
+ /**
+ * Unhighlights all selected nodes and sets selection to null
+ */
+ public void clearSelection() {
+ List<GraphNode> list = this.getSelection();
+
+ for (GraphNode n : list) {
+ if (n != null) n.unhighlight();
+ }
+ this.setSelection(null);
+
+ }
+
+ /*
+ * THE FOLLOWING METHODS ARE NOT WELL TESTED
+ *
+ * Some are not thoroughly tested, and some just plain don't work. Use at your peril!
+ */
+
+ /**
+ * Shift the given node to the given location, moving all children nodes
+ * accordingly
+ *
+ *
+ * @param id
+ * @param x
+ * @param y
+ */
+ public void moveRecursive(int id, int xTarget, int yTarget) {
+ if (nodeMap.get(id) != null) {
+ int x = nodeMap.get(id).getLocation().x;
+ int y = nodeMap.get(id).getLocation().y;
+ nodeMap.get(id).setLocation(x + xTarget, y + yTarget);
+ }
+ //If a node is null, then its children must be null
+ else
+ return;
+
+ List<Integer> list = null;
+
+ if (collapse_mode)
+ list = nodeDataMap.get(id).collapsedCallees;
+ else
+ list = nodeDataMap.get(id).callees;
+ for (int i = 0; i < list.size(); i++) {
+ moveRecursive(list.get(i), xTarget, yTarget);
+ }
+ }
+
+
+ /**
+ * Moves all nodes by the given amount. Adds xDiff, yDiff to the current x,y coordinates.
+ *
+ * Currently unused.
+ */
+ public void moveAllNodesBy(int xDiff, int yDiff) {
+ for (int id : nodeMap.keySet()) {
+ if (nodeMap.get(id) == null) continue;
+
+ int x = nodeMap.get(id).getLocation().x;
+ int y = nodeMap.get(id).getLocation().y;
+ getNode(id).setLocation(x + xDiff, y + yDiff);
+ }
+ }
+
+
+
+ /**
+ * Recursively collapses all children of node id, and puts them in the
+ * collapsedCallees list of id.
+ *
+ * At the end of this run, each collapsed node will have a list of other
+ * collapsed nodes AND a list of non-collapsed nodes. So will node #id.
+ *
+ * Uncollapsed nodes, however, will not have a list of collapsed nodes attached.
+ *
+ * @param ID of node to start from (use getFirstUsefulNode() to collapse everything
+ * @return True if successful
+ */
+ public boolean recursivelyCollapseAllChildrenOfNode(int id) {
+ //-------------Initialize
+ //If all nodes have been collapsed, don't do anything
+ setCollapseMode(true);
+
+ if (nodeDataMap.get(id).hasCollapsedChildren
+ || nodeDataMap.get(id).callees.size() == 0)
+ return true;
+ nodeDataMap.get(id).hasCollapsedChildren = true;
+
+
+
+ // Name, id
+ HashMap<String, Integer> newNodeMap = new HashMap<String, Integer>();
+ // id of 'collapsed' node, id of its uncollapsed twin
+ HashMap<Integer, Integer> collapsedNodesWithOnlyOneNodeInThem = new HashMap<Integer, Integer>();
+ int size = nodeDataMap.get(id).callees.size();
+
+
+
+ //-------------Iterate
+ for (int i = 0; i < size; i++) {
+
+ int childID = nodeDataMap.get(id).callees.get(i);
+ int childLevel = getLevelOfNode(childID);
+ if (collapsedLevelSize.get(childLevel) == null)
+ collapsedLevelSize.put(childLevel, 0);
+ String nodeName = nodeDataMap.get(childID).name;
+
+ /*
+ * Aggregate data for the given node
+ */
+ if (newNodeMap.get(nodeName) != null) {
+ int aggregateID = newNodeMap.get(nodeName);
+
+ if (collapsedNodesWithOnlyOneNodeInThem.get(aggregateID) != null) {
+
+ //-------------Aggregate nodes - second node to be found
+ // We still think this is an only child - create a new
+ // data node and aggregate
+ this.loadData(SWT.NONE, aggregateID, nodeName, nodeDataMap
+ .get(childID).time, nodeDataMap.get(childID).called,
+ id, nodeDataMap.get(childID).isMarked(), ""); //$NON-NLS-1$
+
+ if (getData(aggregateID).isMarked()) {
+ markedCollapsedNodes.add(aggregateID);
+ markedNodes.remove((Integer) aggregateID);
+ }
+
+ nodeDataMap.get(id).callees.remove((Integer) aggregateID);
+ nodeDataMap.get(id).collapsedCallees.add(aggregateID);
+
+ nodeDataMap.get(aggregateID).collapsedCaller = id;
+
+ // Aggregate
+ int otherChildID = collapsedNodesWithOnlyOneNodeInThem
+ .get(aggregateID);
+ aggregateData(nodeDataMap.get(aggregateID), nodeDataMap
+ .get(otherChildID));
+ collapsedNodesWithOnlyOneNodeInThem.remove(aggregateID);
+ nodeDataMap.get(aggregateID).callees.addAll(nodeDataMap
+ .get(otherChildID).callees);
+
+ nodeDataMap.get(otherChildID).setPartOfCollapsedNode(true);
+
+ } else
+ //-------------Aggregate - third and additional nodes
+ aggregateData(nodeDataMap.get(aggregateID), nodeDataMap
+ .get(childID));
+
+
+ //-------------Complete aggregation
+ nodeDataMap.get(aggregateID).callees
+ .addAll(nodeDataMap.get(childID).callees);
+ nodeDataMap.get(aggregateID).isCollapsed = true;
+
+ if (nodeMap.get(childID) != null) {
+ nodeMap.get(childID).setLocation(
+ nodeMap.get(id).getLocation().x
+ - nodeMap.get(id).getSize().width,
+ nodeMap.get(id).getLocation().y);
+ }
+
+ nodeDataMap.get(childID).setPartOfCollapsedNode(true);
+ } else {
+ //-------------First child with this name
+
+ idOfLastNode++;
+ newNodeMap.put(nodeName, idOfLastNode);
+ collapsedNodesWithOnlyOneNodeInThem.put(idOfLastNode, childID);
+ if (nodeMap.get(childID) != null) {
+ nodeMap.get(childID).setLocation(
+ nodeMap.get(id).getLocation().x,
+ nodeMap.get(id).getLocation().y);
+ }
+
+ int tmp = collapsedLevelSize.get(childLevel) + 1;
+ collapsedLevelSize.put(childLevel, tmp);
+ }
+ }
+
+ //-------------Handle nodes that only appeared once
+ for (int i : collapsedNodesWithOnlyOneNodeInThem.keySet()) {
+ int childID =collapsedNodesWithOnlyOneNodeInThem.get(i);
+ nodeDataMap.get(childID).onlyChildWithThisName = true;
+ nodeDataMap.get(id).collapsedCallees.add(childID);
+ newNodeMap.remove(nodeDataMap.get(childID).name);
+ nodeDataMap.get(childID).collapsedCaller = id;
+
+ if (getData(childID).isMarked())
+ markedCollapsedNodes.add(childID);
+ }
+
+
+
+ //-------------Finish iterations
+ for (int i : nodeDataMap.get(id).collapsedCallees) {
+ recursivelyCollapseAllChildrenOfNode(i);
+ }
+
+ nodeDataMap.get(id).sortByTime();
+
+ collapsedNodesWithOnlyOneNodeInThem.clear();
+ newNodeMap.clear();
+
+ nodeDataMap.get(id).hasCollapsedChildren = true;
+ return true;
+ }
+
+ /**
+ * Add time, called values for the two given nodes, storing them inside
+ * victim. Also adds marked collapsed nodes to markedCollapsedNodes list
+ * @param target
+ * @param victim
+ */
+ public void aggregateData(StapData target, StapData victim) {
+ target.time += victim.time;
+ target.called += victim.called;
+ if (victim.isMarked() || target.isMarked()) {
+ target.setMarked();
+ markedCollapsedNodes.add(target.id);
+ }
+ }
+
+ /*
+ * Convenience methods
+ */
+
+ /**
+ * Prints the name of every node on the given level
+ * @param level
+ */
+ public void printContents(int level) {
+ if (levels.get(level) != null)
+ return;
+ MP.println("Contents of level " + level + ":\n"); //$NON-NLS-1$ //$NON-NLS-2$
+ for (int i = 0; i < levels.get(level).size(); i++) {
+ MP.println(nodeDataMap.get(levels.get(level).get(i)).name);
+ }
+ MP.println("---------------------------"); //$NON-NLS-1$
+ }
+
+ /**
+ *
+ * @param id of node
+ * @return StapNode
+ */
+ public StapNode getNode(int id) {
+ return nodeMap.get(id);
+ }
+
+ /**
+ *
+ * @param id of node
+ * @return StapData
+ */
+ public StapData getNodeData(int id) {
+ return nodeDataMap.get(id);
+ }
+
+ /**
+ * Recommend using getFirstUsefulNode instead.
+ * @return First node in level 0
+ */
+ public int getTopNode() {
+ return levels.get(topLevelToDraw).get(0);
+ }
+
+ /**
+ * Recommend use of this function instead of getTopNode()
+ * @return First node that is not the dummy first node
+ */
+ public int getFirstUsefulNode() {
+ int id = 0;
+ if (nodeDataMap.get(id).name == CONSTANT_TOP_NODE_NAME) {
+ id++;
+ }
+
+ // Get first node that is not TOP_NODE_NAME
+ while (nodeDataMap.get(id) == null) {
+ id++;
+ }
+
+ return id;
+ }
+
+ /**
+ *
+ * @return Top level to draw - the level should be defined by draw algorithms
+ */
+ public int getTopLevel() {
+ return topLevelToDraw;
+ }
+
+ /**
+ * Returns the level of recursion associated with the given node.
+ * @param nodeID
+ * @return
+ */
+ public int getLevelOfNode(int nodeID) {
+ return nodeDataMap.get(nodeID).levelOfRecursion;
+ }
+
+ /**
+ * Returns true if the given node has any children.
+ * @param nodeID
+ * @return
+ */
+ public boolean hasChildren(int nodeID) {
+ if (nodeDataMap.get(nodeID).callees.size() > 0)
+ return true;
+ return false;
+ }
+
+ /**
+ * Attempts to set dimensions (not used)
+ * @param width
+ * @param height
+ */
+ public void setDimensions(int width, int height) {
+ this.getBounds().width = width;
+ this.getBounds().height = height;
+ }
+
+ /**
+ * Sets animation mode - all available modes are named
+ * StapGraph.CONSTANT_ANIMATION_*
+ * @param mode
+ */
+ public void setAnimationMode(int mode) {
+ animation_mode = mode;
+ if (mode == CONSTANT_ANIMATION_SLOW){
+ CallgraphView.getAnimation_slow().setChecked(true);
+ CallgraphView.getAnimation_fast().setChecked(false);
+ }else if (mode == CONSTANT_ANIMATION_FASTEST){
+ CallgraphView.getAnimation_slow().setChecked(false);
+ CallgraphView.getAnimation_fast().setChecked(true);
+ }
+ }
+
+ public void setCollapseMode(boolean value) {
+ collapse_mode = value;
+ nextMarkedNode = -1;
+ CallgraphView.getMode_collapsednodes().setChecked(value);
+ }
+
+ /**
+ * Gets id of root visible node
+ * @return rootVisibleNode - ID of centre node
+ */
+ public int getRootVisibleNodeNumber() {
+ return rootVisibleNodeNumber;
+ }
+
+ /**
+ * Sets id of root visible node
+ * @param id - ID of centre node
+ */
+ public void setRootVisibleNodeNumber(int id) {
+ this.rootVisibleNodeNumber = id;
+ }
+
+ /**
+ * Gets to the total time spent running tapped program
+ * @return Time in milliseconds
+ */
+ public long getTotalTime() {
+ return totalTime;
+ }
+
+ /**
+ * Sets total time spent running tapped program
+ * @param totalTime - Time in milliseconds
+ */
+ public void setTotalTime(long val) {
+ //Divide by 100 to save us the trouble of
+ //multiplying by 100 to get percentages
+ this.totalTime = val;
+ }
+
+ /**
+ *
+ * @return Number of the lowest level in which nodes exist
+ */
+ public int getLowestLevelOfNodesAdded() {
+ return lowestLevelOfNodesAdded;
+ }
+
+ /**
+ * Set lowest level to which nodes have been added
+ *
+ * WARNING: Do not set this without adding nodes to that level first, or there
+ * may be null pointer exceptions.
+ * @param lowestLevelOfNodesAdded
+ */
+ public void setLowestLevelOfNodesAdded(int lowestLevelOfNodesAdded) {
+ this.lowestLevelOfNodesAdded = lowestLevelOfNodesAdded;
+ }
+
+
+ public int getDrawMode() {
+ return draw_mode;
+ }
+
+ public void setDrawMode(int draw_mode) {
+ this.draw_mode = draw_mode;
+ }
+
+ /**
+ * Resets the tree and graph to center on the first useful node.
+ * Does NOT change draw mode, animation mode or collapse mode.
+ */
+ public void reset() {
+ setSelection(null);
+
+ draw(draw_mode, animation_mode, getFirstUsefulNode());
+ if (! (draw_mode == StapGraph.CONSTANT_DRAWMODE_AGGREGATE)){
+ getNode(getFirstUsefulNode()).unhighlight();
+ }
+ if (treeViewer!=null) {
+ treeViewer.collapseAll();
+ treeViewer.expandToLevel(2);
+ }
+ scale = 1;
+ nextMarkedNode = -1;
+ }
+
+
+ public boolean isCollapseMode() {
+ return this.collapse_mode;
+ }
+
+
+ public void setBottomLevelToDraw(int bottomLevelToDraw) {
+ this.bottomLevelToDraw = bottomLevelToDraw;
+ }
+
+
+ public int getBottomLevelToDraw() {
+ return bottomLevelToDraw;
+ }
+
+
+ public void setTopLevelOnScreen(int topLevelOnScreen) {
+ this.topLevelOnScreen = topLevelOnScreen;
+ }
+
+
+ public int getTopLevelOnScreen() {
+ return topLevelOnScreen;
+ }
+
+
+ /**
+ * Returns a list of all nodes at the given level.
+ *
+ * @param level
+ * @return List of ID's of all nodes at the given level.
+ */
+ public List<Integer> getLevel(int level) {
+ if (level < 0 || level > lowestLevelOfNodesAdded) {
+ return null;
+ }
+
+ return levels.get(level);
+ }
+
+
+
+ /**
+ * Returns the StapData object with id == val.
+ * @param val
+ * @return
+ */
+ public StapData getData(int val) {
+ if (val > -1)
+ return nodeDataMap.get(val);
+ else
+ return null;
+ }
+
+
+ public void setTreeViewer(TreeViewer treeview) {
+ StapGraph.treeViewer = treeview;
+ }
+
+
+ public TreeViewer getTreeViewer() {
+ return treeViewer;
+ }
+
+
+ /**
+ * Returns the StapNode object for the parent of node id. May be null.
+ * @param id
+ * @return
+ */
+ public StapNode getParentNode(int id) {
+ return nodeMap.get(nodeDataMap.get(id).caller);
+ }
+
+
+ /**
+ * Returns a StapData object for the parent of node id. May be null.
+ * @param id
+ * @return
+ */
+ public StapData getParentData(int id) {
+ return nodeDataMap.get(nodeDataMap.get(id).caller);
+ }
+
+ /**
+ * Returns the id of the next node that was called. This is necessarily either a
+ * child of the current root node or of one of its ancestors' children.
+ *
+ * @param id
+ * @return Id of next node that was called.
+ */
+ public int getNextCalledNode(int id) {
+ int returnID = -1;
+
+ for (int count = callOrderList.indexOf((Integer)id) + 1;
+ count < callOrderList.size(); count++) {
+ if (getData(id) == null)
+ continue;
+ if (!getData(id).isCollapsed || getData(id).isOnlyChildWithThisName()) {
+ returnID = callOrderList.get(count);
+ return returnID;
+ }
+ }
+
+
+ return returnID;
+ }
+
+ /**
+ * Returns the id of the previous node that was called.
+ *
+ * @param id
+ * @return Id of previous node that was called.
+ */
+ public int getPreviousCalledNode(int id) {
+ int returnID = -1;
+
+ for (int count = callOrderList.indexOf((Integer)id) - 1;
+ count > -1; count--) {
+ if (getData(id) == null)
+ continue;
+ if (!getData(id).isCollapsed || getData(id).isOnlyChildWithThisName()) {
+ returnID = callOrderList.get(count);
+ return returnID;
+ }
+ }
+
+
+ return returnID;
+ }
+
+
+
+ /**
+ * Returns the id of the next marked node in current collapse mode.
+ * Wraps back to the first marked node.
+ *
+ * @return Node id of next marked node.
+ */
+ public int getNextMarkedNode() {
+ List<Integer> list = markedNodes;
+ if (collapse_mode)
+ list = markedCollapsedNodes;
+
+ if (list.size() == 0)
+ return -1;
+
+
+ nextMarkedNode++;
+ if (nextMarkedNode >= list.size())
+ nextMarkedNode = 0;
+
+
+ return list.get(nextMarkedNode);
+ }
+
+
+ /**
+ * Returns the id of the next marked node in current collapse mode.
+ * Wraps back to the first marked node.
+ *
+ * @return Node id of next marked node.
+ */
+ public int getPreviousMarkedNode() {
+ List<Integer> list = markedNodes;
+ if (collapse_mode)
+ list = markedCollapsedNodes;
+
+ if (list.size() == 0)
+ return -1;
+
+ nextMarkedNode--;
+ if (nextMarkedNode < 0)
+ nextMarkedNode = list.size() - 1;
+
+
+ return list.get(nextMarkedNode);
+ }
+
+
+
+ public static final Comparator<Entry<String, Long>> VALUE_ORDER = new Comparator<Entry<String, Long>>()
+ {
+ public int compare(Entry<String, Long> a, Entry<String, Long> b){
+ return ((Long)a.getValue()).compareTo(((Long)b.getValue()));
+ }
+ };
+
+
+ /**
+ * Increments the scrollbars by x, y
+ *
+ * @param x
+ * @param y
+ */
+ public void scrollBy(int x, int y) {
+ this.scrollTo(this.getHorizontalBar().getSelection() + x,
+ this.getVerticalBar().getSelection() + y);
+ }
+
+
+ /**
+ * Smoothly increments the scrollbars by x, y
+ *
+ * @param x
+ * @param y
+ */
+ public void scrollSmoothBy(int x, int y) {
+ this.scrollSmoothTo(this.getHorizontalBar().getSelection() + x,
+ this.getVerticalBar().getSelection() + y);
+ }
+
+ /**
+ * Retruns the number of StapData objects placed in the nodeDataMap.
+ * @return
+ */
+ public int getDataMapSize() {
+ return nodeDataMap.size();
+ }
+
+
+ public int getAnimationMode() {
+ return animation_mode;
+ }
+
+
+ public int getLevelBuffer() {
+ return levelBuffer;
+ }
+
+
+ public void setLevelBuffer(int val) {
+ levelBuffer = val;
+ }
+
+ public int min(int a, int b) {
+ if (a < b) return a;
+ return b;
+ }
+
+ public int max(int a, int b) {
+ if (a > b) return a;
+ return b;
+ }
+
+ public int getMaxNodes() {
+ return maxNodes;
+ }
+
+ public void setMaxNodes(int val) {
+ maxNodes = val;
+ }
+
+
+
+ public ArrayList<Integer> getCallOrderList() {
+ return callOrderList;
+ }
+
+
+
+ public void setCallOrderList(ArrayList<Integer> callOrderList) {
+ this.callOrderList = callOrderList;
+ }
+
+
+
+ public int getLastFunctionCalled() {
+ return lastFunctionCalled;
+ }
+
+
+
+ public void setLastFunctionCalled(int lastFunctionCalled) {
+ this.lastFunctionCalled = lastFunctionCalled;
+ }
+
+
+
+ public ICProject getProject() {
+ return project;
+ }
+
+
+
+ public void setProject(ICProject myProject) {
+ this.project = myProject;
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapGraphParser.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapGraphParser.java
new file mode 100644
index 0000000000..703e71f204
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapGraphParser.java
@@ -0,0 +1,368 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.TreeMap;
+
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.linuxtools.systemtap.local.core.Helper;
+import org.eclipse.linuxtools.systemtap.local.core.SystemTapParser;
+import org.eclipse.linuxtools.systemtap.local.core.SystemTapUIErrorMessages;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ * This class is used only in the case that we are rendering a graph
+ * using GEF (specifically Zest).
+ *
+ * After a stap command is sent to be executed, and after data is stored
+ * into some temporary file, the data must be parsed to be used. This class
+ * handles all of the parsing. All data is stored into Maps and this class
+ * also starts the job responsible for taking the parsed data and rendering it.
+ */
+public class StapGraphParser extends SystemTapParser {
+
+ private static final String NEW_LINE = "\n";
+ public HashMap<Integer, Long> timeMap;
+ public TreeMap<Integer, String> serialMap;
+ public HashMap<Integer, ArrayList<Integer>> outNeighbours;
+ public HashMap<String, Long> cumulativeTimeMap;
+ public HashMap<String, Integer> countMap;
+ public ArrayList<Integer> callOrderList;
+ public HashMap<Integer, String> markedMap;
+ public String markedNodes;
+ public int validator;
+ public Long endingTimeInNS;
+ public long totalTime;
+ public int lastFunctionCalled;
+ public ICProject project;
+
+
+ public String text;
+
+ @Override
+ protected void initialize() {
+ //INITIALIZE MAPS
+ outNeighbours = new HashMap<Integer, ArrayList<Integer>>();
+ timeMap = new HashMap<Integer, Long>();
+ serialMap = new TreeMap<Integer, String>();
+ cumulativeTimeMap = new HashMap<String, Long>();
+ countMap = new HashMap<String, Integer>();
+ endingTimeInNS = 0l;
+ callOrderList = new ArrayList<Integer>();
+ markedMap = new HashMap<Integer, String>();
+ lastFunctionCalled = 0;
+ project = null;
+ }
+
+
+ public IStatus executeParsing(){
+ //Clear maps (in case a previous execution left values hanging)
+ outNeighbours.clear();
+ timeMap.clear();
+ serialMap.clear();
+ cumulativeTimeMap.clear();
+ countMap.clear();
+ text = ""; //$NON-NLS-1$
+ callOrderList.clear();
+
+ try {
+ BufferedReader buff = new BufferedReader(new FileReader(filePath));
+ String tmp;
+ while ((tmp = buff.readLine()) != null) {
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+
+ if (tmp.equals("PROBE_BEGIN")){ //$NON-NLS-1$
+ tmp = buff.readLine();
+
+ if (tmp != null && tmp.length() > 0) {
+ project = CoreModel.getDefault().getCModel().getCProject(tmp);
+ }
+ else {
+ launchFileDialogError();
+ return Status.CANCEL_STATUS;
+ }
+
+ text = buff.readLine();
+
+ tmp = buff.readLine();
+ if (tmp != null && tmp.length() > 0)
+ endingTimeInNS = Long.parseLong(tmp);
+ else {
+ launchFileDialogError();
+ return Status.CANCEL_STATUS;
+ }
+
+ tmp = buff.readLine();
+ if (tmp != null && tmp.length() > 0)
+ totalTime = Long.parseLong(tmp);
+ else {
+ launchFileDialogError();
+ return Status.CANCEL_STATUS;
+ }
+ }
+ }
+ buff.close();
+
+ } catch (IOException e) {
+ launchFileDialogError();
+ return Status.CANCEL_STATUS;
+ }
+
+
+ if (text.length() > 0) {
+
+ boolean encounteredMain = false;
+
+ ArrayList<Integer> shouldGetEndingTimeForID = new ArrayList <Integer>();
+ String[] callsAndReturns = text.split(";"); //$NON-NLS-1$
+ String[] args;
+ ArrayList<String> nameList = new ArrayList<String>();
+ ArrayList<Integer> idList = new ArrayList<Integer>();
+ boolean skippedDirectives = false;
+
+ String name;
+ int id;
+ long time;
+ long cumulativeTime;
+ int parentID;
+ int firstNode = -1;
+ try {
+ for (String s : callsAndReturns) {
+ switch (s.charAt(0)) {
+ case '<' :
+
+ args = s.substring(1, s.length()).split(",,"); //$NON-NLS-1$
+ // args[0] = name
+ // args[1] = id
+ // arsg[2] = time of event
+ id = Integer.parseInt(args[1]);
+ time = Long.parseLong(args[2]);
+ name = args[0];
+
+ //If we haven't encountered a main function yet and the name isn't clean,
+ //and the name contains "__", then this is probably a C directive
+ if (!encounteredMain && !isFunctionNameClean(name) && name.contains("__")) { //$NON-NLS-1$
+ skippedDirectives = true;
+ break;
+ }
+ name = cleanFunctionName(name);
+ if (name.equals("main")) //$NON-NLS-1$
+ encounteredMain = true;
+ if (firstNode == -1) {
+ firstNode = id;
+ }
+
+ serialMap.put(id, name);
+ timeMap.put(id, time);
+
+ if (cumulativeTimeMap.get(name) == null){
+ cumulativeTimeMap.put(name, (long) 0);
+ }
+
+ //IF THERE ARE PREVIOUS FUNCTIONS WITH THE SAME NAME
+ //WE ARE IN ONE OF THEM SO DO NOT ADD TO CUMULATIVE TIME
+ if (nameList.indexOf(name) == -1) {
+ cumulativeTime = cumulativeTimeMap.get(name) - time;
+ cumulativeTimeMap.put(name, cumulativeTime);
+ shouldGetEndingTimeForID.add(id);
+ }
+
+
+ if (countMap.get(name) == null){
+ countMap.put(name, 0);
+ }
+ countMap.put(name, countMap.get(name) + 1);
+
+ nameList.add(name);
+ idList.add(id);
+
+ if (outNeighbours.get(id) == null){
+ outNeighbours.put(id, new ArrayList<Integer>());
+ }
+
+ if (idList.size() > 1) {
+ parentID = idList.get(idList.size() - 2);
+ outNeighbours.get(parentID).add(id);
+ }
+
+ callOrderList.add(id);
+ lastFunctionCalled = id;
+
+ break;
+ case '>' :
+ args = s.substring(1, s.length()).split(",,"); //$NON-NLS-1$
+ //args[0] = name
+ //args[1] = time of event
+ name = args[0];
+
+
+ //If we haven't encountered a main function yet and the name isn't clean,
+ //and the name contains "__", then this is probably a C directive
+ if (!encounteredMain && !isFunctionNameClean(name) && name.contains("__")) { //$NON-NLS-1$
+ skippedDirectives = true;
+ break;
+ }
+ name = cleanFunctionName(name);
+ int lastOccurance = nameList.lastIndexOf(name);
+ if (lastOccurance < 0) {
+ parsingError(Messages.getString("StapGraphParser.12") + name); //$NON-NLS-1$
+ return Status.CANCEL_STATUS;
+ }
+
+ nameList.remove(lastOccurance);
+ id = idList.remove(lastOccurance);
+
+
+ if (timeMap.get(id) == null) {
+ parsingError(Messages.getString("StapGraphParser.13") + name); //$NON-NLS-1$
+ return Status.CANCEL_STATUS;
+ }
+ time = Long.parseLong(args[1]) - timeMap.get(id);
+ timeMap.put(id, time);
+
+
+ //IF AN ID IS IN THIS ARRAY IT IS BECAUSE WE NEED THE ENDING TIME
+ // TO BE ADDED TO THE CUMULATIVE TIME FOR FUNCTIONS OF THIS NAME
+ if (shouldGetEndingTimeForID.contains(id)){
+ cumulativeTime = cumulativeTimeMap.get(name) + Long.parseLong(args[1]);
+ cumulativeTimeMap.put(name, cumulativeTime);
+ }
+
+
+ //Use + for end times
+// cumulativeTime = cumulativeTimeMap.get(name) + Long.parseLong(args[1]);
+// cumulativeTimeMap.put(name, cumulativeTime);
+
+ break;
+ default :
+ parsingError(Messages.getString("StapGraphParser.14") + s.charAt(0) + //$NON-NLS-1$
+ Messages.getString("StapGraphParser.15") ); //$NON-NLS-1$
+ return Status.CANCEL_STATUS;
+
+ }
+
+ }
+
+
+ //CHECK FOR EXIT() CALL
+ if (idList.size() != 0){
+ for (int val : idList){
+ name = serialMap.get(val);
+ time = endingTimeInNS - timeMap.get(val);
+ timeMap.put(val, time);
+ if (shouldGetEndingTimeForID.contains(val)){
+ cumulativeTime = cumulativeTimeMap.get(name) + endingTimeInNS;
+ cumulativeTimeMap.put(name, cumulativeTime);
+ }
+
+// if (name.equals("main")) {
+// totalTime = time;
+// }
+ lastFunctionCalled = val;
+ }
+ markedMap.put(lastFunctionCalled, Messages.getString("StapGraphParser.16")); //$NON-NLS-1$
+ }
+
+ //timecheck is true if the total execution time is less than 10ms
+ //and the first function is more than 1% off from the total time.
+ boolean timeCheck = totalTime < 50000000 &&
+ (((float)timeMap.get(firstNode)/totalTime) > 1.01 ||
+ ((float)timeMap.get(firstNode)/totalTime) < 0.99);
+
+
+
+ if (skippedDirectives || timeCheck) {
+ totalTime = timeMap.get(firstNode);
+ String markedMessage = ""; //$NON-NLS-1$
+ if (markedMap.containsKey(firstNode)) {
+ markedMessage = markedMap.get(firstNode) + "\n"; //$NON-NLS-1$
+ }
+ if (skippedDirectives)
+ markedMessage += Messages.getString("StapGraphParser.19"); //$NON-NLS-1$
+ if (timeCheck)
+ markedMessage += Messages.getString("StapGraphParser.20"); //$NON-NLS-1$
+
+ markedMessage += Messages.getString("StapGraphParser.21"); //$NON-NLS-1$
+
+ markedMap.put(firstNode, markedMessage);
+ }
+
+
+ } catch (NumberFormatException e) {
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("StapGraphParser.22"), //$NON-NLS-1$
+ Messages.getString("StapGraphParser.23"), Messages.getString("StapGraphParser.24") + //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.getString("StapGraphParser.25")); //$NON-NLS-1$
+ mess.schedule();
+
+ return Status.CANCEL_STATUS;
+ }
+ } else {
+ parsingError(Messages.getString("StapGraphParser.26")); //$NON-NLS-1$
+ return Status.CANCEL_STATUS;
+ }
+
+ //Create a UIJob to handle the rest
+ GraphUIJob uijob = new GraphUIJob(Messages.getString("StapGraphParser.5"), this); //$NON-NLS-1$
+ uijob.schedule();
+ return Status.OK_STATUS;
+
+ }
+
+
+ @Override
+ public void saveData(String filePath) {
+ File file = new File(filePath);
+ String content = Messages.getString("CallgraphView.25") //$NON-NLS-1$
+ + project.getElementName()
+ + NEW_LINE
+ + text
+ + NEW_LINE
+ + endingTimeInNS
+ + NEW_LINE
+ + totalTime;
+ try {
+ // WAS THE FILE CREATED OR DOES IT ALREADY EXIST
+ if (file.createNewFile()) {
+ Helper.writeToFile(filePath, content);
+ } else {
+ if (MessageDialog
+ .openConfirm(
+ new Shell(),
+ Messages
+ .getString("CallgraphView.FileExistsTitle"), //$NON-NLS-1$
+ Messages
+ .getString("CallgraphView.FileExistsMessage"))) { //$NON-NLS-1$
+ file.delete();
+ file.createNewFile();
+ Helper.writeToFile(filePath, content);
+ }
+ }
+ } catch (IOException e1) {
+ e1.printStackTrace();
+ }
+ }
+
+
+
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapNode.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapNode.java
new file mode 100644
index 0000000000..1534844624
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapNode.java
@@ -0,0 +1,143 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph;
+
+import java.text.NumberFormat;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+import org.eclipse.draw2d.Label;
+import org.eclipse.linuxtools.systemtap.local.core.MP;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.zest.core.widgets.GraphConnection;
+import org.eclipse.zest.core.widgets.GraphNode;
+
+public class StapNode extends GraphNode{
+
+ private static int nodeSize = 20;
+ public int id;
+ public GraphConnection connection; //Each node should have only one connection (to its caller)
+ private boolean hasButtons; //Has buttons already attached
+ public List<Integer> buttons;
+ private static NumberFormat numberFormat = NumberFormat.getInstance(Locale.CANADA);
+
+ public StapNode(StapGraph graphModel, int style, StapData data) {
+
+ super(graphModel, style, Messages.getString("StapNode.0")); //$NON-NLS-1$
+ numberFormat.setMaximumFractionDigits(2);
+ numberFormat.setMinimumFractionDigits(2);
+ if (Display.getCurrent().getPrimaryMonitor().getBounds().width < 1000)
+ nodeSize = 10;
+
+
+
+ if (data.name == StapGraph.CONSTANT_TOP_NODE_NAME)
+ this.setText(StapGraph.CONSTANT_TOP_NODE_NAME);
+ else {
+ String shortName = data.name;
+ if (data.name.length() > nodeSize)
+ shortName = data.name.substring(0, nodeSize - 3) + "..."; //$NON-NLS-1$
+ this.setText(shortName + ": " + //$NON-NLS-1$
+ numberFormat.format((float) data.time/graphModel.getTotalTime() * 100)
+ + "%"); //$NON-NLS-1$
+ }
+
+ if (data.markedMessage.length() != 0) {
+ Label tooltip = new Label(data.name + ": " + //$NON-NLS-1$
+ numberFormat.format((float) data.time/graphModel.getTotalTime() * 100)
+ + "%" + "\n " + data.markedMessage); //$NON-NLS-1$ //$NON-NLS-2$
+ this.setTooltip(tooltip);
+ } else if (data.name.length() > nodeSize) {
+ Label tooltip = new Label(data.name + ": " + //$NON-NLS-1$
+ numberFormat.format((float) data.time/graphModel.getTotalTime() * 100)
+ + "%"); //$NON-NLS-1$
+ this.setTooltip(tooltip);
+ }
+
+
+ this.id = data.id;
+ this.connection = null;
+ hasButtons = false;
+ buttons = new ArrayList<Integer>();
+
+
+ if (graphModel.getNode(data.caller) != null) {
+ this.connection = new GraphConnection( graphModel, style,
+ this, graphModel.getNode(data.caller));
+ if (graphModel.isCollapseMode())
+ connection.setText("" + data.called); //$NON-NLS-1$
+ }
+
+ if (graphModel.getNode(data.collapsedCaller) != null) {
+ this.connection = new GraphConnection( graphModel, style,
+ this, graphModel.getNode(data.collapsedCaller));
+ if (graphModel.isCollapseMode())
+ connection.setText("" + data.called); //$NON-NLS-1$
+ }
+ }
+
+
+ public void setHasButtons(boolean value) {
+ hasButtons = value;
+ }
+
+ public boolean getHasButtons() {
+ return hasButtons;
+ }
+
+ /**
+ * Returns the StapData object associated with this node.
+ */
+ public StapData getData() {
+ return ((StapGraph) this.getGraphModel()).getNodeData(id);
+ }
+
+ /**
+ * Creates a connection between this node and the
+ * specified node. The connection will have the int called as its text.
+ *
+ * @param graphModel
+ * @param style
+ * @param n
+ * @param called
+ */
+ public void makeConnection(int style, StapNode n, int called) {
+ if (n == null) {
+ MP.println("Error! Attempting to connect null node to " + this.getText()); //$NON-NLS-1$
+ }
+ this.connection = new GraphConnection(this.getGraphModel(), style, this, n);
+ if (((StapGraph)this.getGraphModel()).isCollapseMode())
+ connection.setText("" + called); //$NON-NLS-1$
+ }
+
+ /**
+ * Returns this node's connection, or null if none exists.
+ * @return
+ */
+ public GraphConnection getConnection() {
+ return connection;
+ }
+
+
+ public static int getNodeSize() {
+ return nodeSize;
+ }
+
+
+ public static void setNodeSize(int nodeSize) {
+ StapNode.nodeSize = nodeSize;
+ }
+
+
+
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/SystemTapCommandParser.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/SystemTapCommandParser.java
new file mode 100644
index 0000000000..19d3c27e88
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/SystemTapCommandParser.java
@@ -0,0 +1,123 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph;
+
+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;
+
+
+public class SystemTapCommandParser extends Job {
+
+ private String filePath;
+ private String returnText;
+ private boolean printIsDone;
+ public CallgraphView stapview;
+ private String testOutput;
+ public boolean useColours;
+ private boolean graphingMode;
+ private boolean processFinished;
+
+
+ public boolean isProcessFinished() {
+ return processFinished;
+ }
+
+
+ public void setProcessFinished(boolean processFinished) {
+ this.processFinished = processFinished;
+ }
+
+
+ public SystemTapCommandParser(String name, String filePath, CallgraphView sview,
+ boolean useColours,
+ boolean scheduleGraph, String configName) {
+ super(name);
+ this.filePath = filePath;
+ this.stapview = sview;
+ this.useColours = useColours;
+ this.graphingMode = scheduleGraph;
+ this.processFinished=false;
+ }
+
+
+ public String getCommand() {
+ return filePath;
+ }
+
+ /**
+ * Convenience method to set this.filePath.
+ * Currently not used.
+ *
+ * @param filePath - filePath to be set
+ */
+ public void setFilePath(String filePath) {
+ this.filePath = filePath;
+ }
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+
+ if (graphingMode) {
+ //Delegate to graphing parser instead of this one
+ StapGraphParser p = new StapGraphParser();
+ p.setFile(filePath);
+ p.schedule();
+
+// String text = Helper.getMainConsoleTextByName(configName);
+// returnText = " " + configName+"\n"; //$NON-NLS-1$ //$NON-NLS-2$
+// returnText += dashes() + "\n\n"; //$NON-NLS-1$
+// setText(text);
+//
+//
+// SystemTapUIJob uijob = new SystemTapUIJob("SystemTapUIJob", this, this.useColours); //$NON-NLS-1$
+// uijob.schedule();
+
+ return Status.OK_STATUS;
+ }
+
+ return Status.OK_STATUS;
+ }
+
+ public synchronized void setText(String text) {
+ returnText += text;
+ }
+
+ public synchronized String getText() {
+ String tmp = returnText;
+ returnText = ""; //$NON-NLS-1$
+ return tmp;
+ }
+
+ public synchronized void setDone() {
+ printIsDone = true;
+ }
+
+ public synchronized void clearDone() {
+ printIsDone = false;
+ }
+
+ public synchronized boolean checkDone() {
+ return printIsDone;
+ }
+
+ public String getTestOutput() {
+ return testOutput;
+ }
+
+ public IStatus testRun(IProgressMonitor m) {
+ return run(m);
+ }
+
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/InsertMarkerAction.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/InsertMarkerAction.java
new file mode 100644
index 0000000000..3ff14e9803
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/InsertMarkerAction.java
@@ -0,0 +1,123 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph.actions;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.texteditor.AbstractTextEditor;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+/**
+ * Our sample action implements workbench action delegate. The action proxy will
+ * be created by the workbench and shown in the UI. When the user tries to use
+ * the action, this delegate will be created and execution will be delegated to
+ * it.
+ *
+ * @see IWorkbenchWindowActionDelegate
+ */
+public class InsertMarkerAction implements IWorkbenchWindowActionDelegate {
+ private IWorkbenchWindow window;
+ private static final String SYSTEMTAP_MARKER_INSERTED =
+ "//SYSTEMTAP marker function - this code should appear //STAPSTAPSTAP\n" +//$NON-NLS-1$
+ "//once at the top of your program //STAPSTAPSTAP\n" //$NON-NLS-1$
+ + "void ___STAP_MARKER___(const char*); //STAPSTAPSTAP\n " //$NON-NLS-1$
+ + "void ___STAP_MARKER___(const char* i) { //STAPSTAPSTAP\n" //$NON-NLS-1$
+ + "return; //STAPSTAPSTAP\n" //$NON-NLS-1$
+ + "} //STAPSTAPSTAP\n"; //$NON-NLS-1$
+
+ /**
+ * The constructor.
+ */
+ public InsertMarkerAction() {
+ }
+
+ /**
+ * The action has been activated. The argument of the method represents the
+ * 'real' action sitting in the workbench UI.
+ *
+ * @see IWorkbenchWindowActionDelegate#run
+ */
+ public void run(IAction action) {
+ IWorkbenchPage page = window.getActivePage();
+ IEditorPart part = page.getActiveEditor();
+ if (!(part instanceof AbstractTextEditor))
+ return;
+ ITextEditor editor = (ITextEditor) part;
+ IDocumentProvider dp = editor.getDocumentProvider();
+ IDocument doc = dp.getDocument(editor.getEditorInput());
+
+ StyledText st = (StyledText) editor.getAdapter(Control.class);
+
+ try {
+ int offset = st.getCaretOffset();
+ doc.replace(offset, 0, "if (true) { //STAPSTAPSTAP\n" + //$NON-NLS-1$
+ "\tchar* stapMarker = new char[20]; //STAPSTAPSTAP\n" + //$NON-NLS-1$
+ "\tsprintf(stapMarker, \"\"); //STAPSTAPSTAP\n" + //$NON-NLS-1$
+ // "\tprintf(\"%s\\n\", stapMarker); //STAPSTAPSTAP\n"
+ // +
+ "\t___STAP_MARKER___(stapMarker); //STAPSTAPSTAP\n\t} //STAPSTAPSTAP\n"); //$NON-NLS-1$
+ st.setCaretOffset(offset + 68);
+ } catch (BadLocationException e1) {
+ e1.printStackTrace();
+ }
+ // TODO: if this is too slow, fix
+ if (!doc.get().contains(SYSTEMTAP_MARKER_INSERTED)) {
+ try {
+ int offset;
+ offset = doc.getLineOffset(0);
+ String output = SYSTEMTAP_MARKER_INSERTED;
+
+ doc.replace(offset, 0, output);
+ } catch (org.eclipse.jface.text.BadLocationException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ /**
+ * Selection in the workbench has been changed. We can change the state of
+ * the 'real' action here if we want, but this can only happen after the
+ * delegate has been created.
+ *
+ * @see IWorkbenchWindowActionDelegate#selectionChanged
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ }
+
+ /**
+ * We can use this method to dispose of any system resources we previously
+ * allocated.
+ *
+ * @see IWorkbenchWindowActionDelegate#dispose
+ */
+ public void dispose() {
+ }
+
+ /**
+ * We will cache window object in order to be able to provide parent shell
+ * for the message dialog.
+ *
+ * @see IWorkbenchWindowActionDelegate#init
+ */
+ public void init(IWorkbenchWindow window) {
+ this.window = window;
+ }
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/Messages.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/Messages.java
new file mode 100644
index 0000000000..98ee40fd7d
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/Messages.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph.actions;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.systemtap.local.callgraph.actions.messages"; //$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/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/RemoveMarkerAction.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/RemoveMarkerAction.java
new file mode 100644
index 0000000000..de5ba330c7
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/RemoveMarkerAction.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph.actions;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.texteditor.AbstractTextEditor;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+/**
+ * Our sample action implements workbench action delegate. The action proxy will
+ * be created by the workbench and shown in the UI. When the user tries to use
+ * the action, this delegate will be created and execution will be delegated to
+ * it.
+ *
+ * @see IWorkbenchWindowActionDelegate
+ */
+public class RemoveMarkerAction implements IWorkbenchWindowActionDelegate {
+ private IWorkbenchWindow window;
+ private String stapCommentMarker = "//STAPSTAPSTAP"; //$NON-NLS-1$
+
+ /**
+ * The constructor.
+ */
+ public RemoveMarkerAction() {
+ }
+
+ /**
+ * The action has been activated. The argument of the method represents the
+ * 'real' action sitting in the workbench UI.
+ *
+ * @see IWorkbenchWindowActionDelegate#run
+ */
+ public void run(IAction action) {
+ IWorkbenchPage page = window.getActivePage();
+ IEditorPart part = page.getActiveEditor();
+ if (!(part instanceof AbstractTextEditor))
+ return;
+ ITextEditor editor = (ITextEditor) part;
+ IDocumentProvider dp = editor.getDocumentProvider();
+ IDocument doc = dp.getDocument(editor.getEditorInput());
+
+ for (int i = 0; i < doc.getNumberOfLines(); i++) {
+ try {
+ int start = doc.getLineOffset(i);
+ int length = doc.getLineLength(i);
+ if (doc.get(start, length).contains(stapCommentMarker)) {
+ doc.replace(start, length, ""); //$NON-NLS-1$
+ }
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
+ }
+
+ //TODO: Figure out why I need to do this 3 times to remove all STAPSTAPSTAP...
+ for (int i = 0; i < doc.getNumberOfLines(); i++) {
+ try {
+ int start = doc.getLineOffset(i);
+ int length = doc.getLineLength(i);
+ if (doc.get(start, length).contains(stapCommentMarker)) {
+ doc.replace(start, length, ""); //$NON-NLS-1$
+ }
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
+ }
+
+ for (int i = 0; i < doc.getNumberOfLines(); i++) {
+ try {
+ int start = doc.getLineOffset(i);
+ int length = doc.getLineLength(i);
+ if (doc.get(start, length).contains(stapCommentMarker)) { //$NON-NLS-1$
+ doc.replace(start, length, ""); //$NON-NLS-1$
+ }
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ /**
+ * Selection in the workbench has been changed. We can change the state of
+ * the 'real' action here if we want, but this can only happen after the
+ * delegate has been created.
+ *
+ * @see IWorkbenchWindowActionDelegate#selectionChanged
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ }
+
+ /**
+ * We can use this method to dispose of any system resources we previously
+ * allocated.
+ *
+ * @see IWorkbenchWindowActionDelegate#dispose
+ */
+ public void dispose() {
+ }
+
+ /**
+ * We will cache window object in order to be able to provide parent shell
+ * for the message dialog.
+ *
+ * @see IWorkbenchWindowActionDelegate#init
+ */
+ public void init(IWorkbenchWindow window) {
+ this.window = window;
+ }
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/messages.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/messages.properties
new file mode 100644
index 0000000000..14b6a7aae0
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/messages.properties
@@ -0,0 +1,10 @@
+###############################################################################
+# 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
+###############################################################################
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/AutoScrollHelper.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/AutoScrollHelper.java
new file mode 100644
index 0000000000..71b1414b49
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/AutoScrollHelper.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph.graphlisteners;
+
+import org.eclipse.linuxtools.systemtap.local.callgraph.StapGraph;
+
+public class AutoScrollHelper {
+
+
+
+ public static void scrollUp(StapGraph graph) {
+
+ if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_BOX) {
+ int parent = graph.getNodeData(graph.getRootVisibleNodeNumber()).caller;
+ if (graph.isCollapseMode())
+ parent = graph.getNodeData(graph.getRootVisibleNodeNumber()).collapsedCaller;
+
+ if (graph.getNodeData(parent) != null && graph.getNodeData(parent).levelOfRecursion > 0 ) {
+ int animMode = graph.getAnimationMode();
+ graph.draw(graph.getDrawMode(), StapGraph.CONSTANT_ANIMATION_FASTEST, parent);
+ graph.setAnimationMode(animMode);
+ }
+ } else if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_TREE) {
+ graph.shrinkTree();
+ }
+ }
+
+ public static void scrollDown(StapGraph graph) {
+ if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_BOX) {
+ if (graph.getTopLevel() + StapGraph.levelBuffer <
+ graph.getLowestLevelOfNodesAdded()) {
+ int newLevel = graph.getTopLevel() + 1;
+ if (graph.levels.get(newLevel).get(0) == null)
+ return;
+
+ graph.setTopLevelTo(newLevel);
+ int animMode = graph.getAnimationMode();
+ graph.setAnimationMode(StapGraph.CONSTANT_ANIMATION_FASTEST);
+ graph.draw(graph.getDrawMode(), StapGraph.CONSTANT_ANIMATION_FASTEST,
+ graph.levels.get(newLevel).get(0));
+ graph.setAnimationMode(animMode);
+ }
+ } else if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_TREE) {
+ graph.extendTree();
+ }
+
+ }
+
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/AutoScrollSelectionListener.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/AutoScrollSelectionListener.java
new file mode 100644
index 0000000000..00d77b3b46
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/AutoScrollSelectionListener.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph.graphlisteners;
+
+import org.eclipse.linuxtools.systemtap.local.callgraph.StapGraph;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+
+public class AutoScrollSelectionListener implements SelectionListener{
+ public static final int AutoScroll_up = 0;
+ public static final int AutoScroll_down = 1;
+ public static final int AutoScroll_bar = 2;
+ private final int type;
+ private final StapGraph graph;
+
+ public AutoScrollSelectionListener(int type, StapGraph g) {
+ this.type = type;
+ this.graph = g;
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+
+ }
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (type == AutoScroll_up)
+ AutoScrollHelper.scrollUp(graph);
+ if (type == AutoScroll_down)
+ AutoScrollHelper.scrollDown(graph);
+ }
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/Messages.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/Messages.java
new file mode 100644
index 0000000000..0fffd02a63
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/Messages.java
@@ -0,0 +1,17 @@
+package org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners.messages"; //$NON-NLS-1$
+ public static String StapGraphMouseMoveListener_0;
+ public static String StapGraphMouseMoveListener_1;
+ public static String StapGraphMouseMoveListener_2;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphFocusListener.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphFocusListener.java
new file mode 100644
index 0000000000..8321868323
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphFocusListener.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.systemtap.local.callgraph.graphlisteners;
+
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+
+/**
+ * Set mouseDown flag to false when focus is lost (prevents the graph from
+ * sticking to the mouse cursor when focus is regained)
+ *
+ *
+ */
+public class StapGraphFocusListener implements FocusListener{
+ private StapGraphMouseMoveListener listener;
+
+ public StapGraphFocusListener(StapGraphMouseMoveListener listener) {
+ this.listener = listener;
+ }
+
+ @Override
+ public void focusGained(FocusEvent e) {
+ }
+
+ @Override
+ public void focusLost(FocusEvent e) {
+ listener.setStop(true);
+ }
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphKeyListener.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphKeyListener.java
new file mode 100644
index 0000000000..4ae3d07dca
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphKeyListener.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph.graphlisteners;
+
+import org.eclipse.linuxtools.systemtap.local.callgraph.CallgraphView;
+import org.eclipse.linuxtools.systemtap.local.callgraph.StapGraph;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+
+/**
+ * StapGraph key listener
+ */
+public class StapGraphKeyListener implements KeyListener {
+// private StapGraph graph;
+
+ public StapGraphKeyListener(StapGraph g) {
+// graph = g;
+ }
+
+ @Override
+ public void keyPressed(KeyEvent e) {
+
+ }
+
+ @Override
+ public void keyReleased(KeyEvent e) {
+ if (e.stateMask != SWT.SHIFT) {
+ return;
+ }
+
+ //TODO: Use accelerator in menu actions instead of this hard-coded stuff
+ if (e.character == 'R') {
+ CallgraphView.getView_refresh().run();
+// }else if (e.character == '1') {
+// graph.setAnimationMode(StapGraph.CONSTANT_ANIMATION_SLOW);
+// }else if (e.character == '2') {
+// graph.setAnimationMode(StapGraph.CONSTANT_ANIMATION_FASTER);
+// }else if (e.character == '3') {
+// graph.setAnimationMode(StapGraph.CONSTANT_ANIMATION_FASTEST);
+// }else if (e.character == 'k') {
+// Shell sh = graph.getShell();
+// graph.dispose();
+// sh.close();
+// }else if (e.character == 'n') {
+// int id = graph.getNextMarkedNode();
+// graph.draw(id, 0, 0);
+// graph.getTreeViewer().expandToLevel(graph.getData(id), 0);
+// }else if (e.character == 'p') {
+// int id = graph.getPreviousMarkedNode();
+// graph.draw(id, 0, 0);
+// graph.getTreeViewer().expandToLevel(graph.getData(id), 0);
+// }else if (e.character == 'd') {
+// graph.deleteAll(-1);
+// }else if (e.character == 'T') {
+// graph.deleteAll(graph.getRootVisibleNode());
+// graph.draw(StapGraph.CONSTANT_DRAWMODE_TREE, graph.getAnimationMode(),
+// graph.getRootVisibleNode());
+// graph.currentPositionInLevel.clear();
+ }else if (e.character == 'C') {
+ CallgraphView.getMode_collapsednodes().run();
+ } else if (e.character == 'N') {
+ CallgraphView.getGoto_next().run();
+ } else if (e.character == 'P') {
+ CallgraphView.getGoto_previous().run();
+ } else if (e.character == 'L') {
+ CallgraphView.getGoto_last().run();
+ }
+ }
+};
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseExitListener.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseExitListener.java
new file mode 100644
index 0000000000..95066472f7
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseExitListener.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.systemtap.local.callgraph.graphlisteners;
+
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+
+public class StapGraphMouseExitListener implements Listener{
+ private StapGraphMouseMoveListener listener;
+
+ public StapGraphMouseExitListener(StapGraphMouseMoveListener l) {
+ this.listener = l;
+ }
+
+ @Override
+ public void handleEvent(Event event) {
+ listener.setStop(true);
+ }
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseListener.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseListener.java
new file mode 100644
index 0000000000..c72d55230b
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseListener.java
@@ -0,0 +1,278 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph.graphlisteners;
+
+import java.util.List;
+
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.linuxtools.systemtap.local.core.FileFinderOpener;
+import org.eclipse.linuxtools.systemtap.local.callgraph.StapGraph;
+import org.eclipse.linuxtools.systemtap.local.callgraph.StapNode;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.zest.core.widgets.GraphNode;
+
+@SuppressWarnings("unused")
+public class StapGraphMouseListener implements MouseListener {
+ private int x;
+ private int y;
+ private StapGraph graph;
+ private StapGraphMouseMoveListener listener;
+ private StapGraphFocusListener focus;
+ private StapGraphMouseExitListener exitListener;
+
+ public StapGraphMouseListener(StapGraph g) {
+ this.graph = g;
+ listener = new StapGraphMouseMoveListener(graph);
+ focus = new StapGraphFocusListener(listener);
+ exitListener = new StapGraphMouseExitListener(listener);
+ }
+
+ @Override
+ public void mouseDoubleClick(MouseEvent e) {
+ if (e.stateMask == SWT.CONTROL) {
+ controlDoubleClick();
+ }
+
+
+ if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_RADIAL) {
+ StapNode node = getNodeFromSelection();
+ if (node == null)
+ return;
+
+ graph.getTreeViewer().collapseToLevel(node.getData(), 0);
+ graph.getTreeViewer().expandToLevel(node.getData(), 0);
+ graph.getTreeViewer().setSelection(new StructuredSelection(node.getData()));
+
+ int id = node.getData().id;
+
+ graph.scale = 1;
+ // Redraw in the current mode with the new id as the center
+ // The x,y parameters to draw() are irrelevant for radial mode
+ graph.draw(id);
+
+ // Unhighlight the center node and give it a normal colour
+ node = graph.getNode(id);
+ node.unhighlight();
+ if (graph.getData(id).isMarked())
+ node.setBackgroundColor(StapGraph.CONSTANT_MARKED);
+ else
+ node.setBackgroundColor(graph.DEFAULT_NODE_COLOR);
+ return;
+ } else {
+
+ StapNode node = getNodeFromSelection();
+ if (node == null)
+ return;
+
+ unhighlightall(node);
+ graph.setSelection(null);
+ graph.getTreeViewer().expandToLevel(node.getData(), 0);
+ graph.getTreeViewer().setSelection(new StructuredSelection(node.getData()));
+ // Draw in current modes with 'id' at the top
+ int id = node.getData().id;
+ graph.draw(id);
+ }
+
+ graph.setSelection(null);
+ }
+
+
+ @Override
+ public void mouseDown(MouseEvent e) {
+// MP.println("You clicked: " + e.x + ", " + e.y); //$NON-NLS-1$ //$NON-NLS-2$
+// MP.println("Convert to control: " + graph.toControl(e.x, e.y).x + ", " //$NON-NLS-1$ //$NON-NLS-2$
+// + graph.toControl(e.x, e.y).y);
+// MP.println("Convert to display: " + graph.toDisplay(e.x, e.y).x + ", " //$NON-NLS-1$ //$NON-NLS-2$
+// + graph.toDisplay(e.x, e.y).y);
+// MP.println("Bounds: " + graph.getBounds().width + ", " //$NON-NLS-1$ //$NON-NLS-2$
+// + graph.getBounds().height);
+ mouseDownEvent(e.x, e.y);
+ }
+
+ @Override
+ public void mouseUp(MouseEvent e) {
+ mouseUpEvent();
+ }
+
+ private void unhighlightall(StapNode n) {
+ int id = n.id;
+ List<Integer> callees = null;
+
+ if (graph.isCollapseMode())
+ callees = graph.getData(id).collapsedCallees;
+ else
+ callees = graph.getData(id).callees;
+ for (int subID : callees) {
+ if (graph.getNode(subID) != null)
+ graph.getNode(subID).unhighlight();
+ }
+
+ if (graph.getParentNode(id) != null) {
+ graph.getParentNode(id).unhighlight();
+ }
+ n.unhighlight();
+ }
+
+
+ @SuppressWarnings("unchecked")
+ private StapNode getNodeFromSelection() {
+ List<GraphNode> stapNodeList = graph.getSelection();
+ if (stapNodeList.isEmpty() || stapNodeList.size() != 1) {
+ graph.setSelection(null);
+ return null;
+ }
+
+ StapNode node = null;
+ if (stapNodeList.get(0) instanceof StapNode) {
+ node = (StapNode) stapNodeList.remove(0);
+ } else {
+ graph.setSelection(null);
+ return null;
+ }
+ return node;
+ }
+
+ @SuppressWarnings("unchecked")
+ private GraphNode getAggregateNodeFromSelection() {
+ List<GraphNode> graphNodeList = graph.getSelection();
+ if (graphNodeList.isEmpty() || graphNodeList.size() != 1) {
+ graph.setSelection(null);
+ return null;
+ }
+
+ GraphNode node = null;
+ if (graphNodeList.get(0) instanceof GraphNode) {
+ node = (GraphNode) graphNodeList.remove(0);
+ } else {
+ graph.setSelection(null);
+ return null;
+ }
+ return node;
+ }
+
+ public String controlDoubleClick() {
+ String output = null;
+ if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_AGGREGATE) {
+ GraphNode node = getAggregateNodeFromSelection();
+
+ if (node == null)
+ return null;
+
+ String functionName = (String) node.getData("AGGREGATE_NAME"); //$NON-NLS-1$
+ output= FileFinderOpener.findAndOpen(graph.getProject(), functionName);
+ } else {
+ StapNode node = getNodeFromSelection();
+
+ if (node == null)
+ return null;
+
+ int caller = node.getData().caller;
+
+ if (caller < graph.getFirstUsefulNode()) {
+ // The only node that satisfies this condition should be
+ // main
+ caller = graph.getFirstUsefulNode();
+ }
+ output = FileFinderOpener.findAndOpen(graph.getProject(), graph.getData(caller).name);
+ }
+
+ graph.setSelection(null);
+ return output;
+ }
+
+ public void mouseDownEvent(int x, int y) {
+ List<?> list = graph.getSelection();
+ if (list.size() < 1) {
+ listener.setPoint(x, y);
+ listener.setStop(false);
+ graph.addMouseMoveListener(listener);
+ graph.addListener(SWT.MouseExit, exitListener);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public void mouseUpEvent() {
+
+ listener.setStop(true);
+ graph.removeMouseMoveListener(listener);
+ graph.removeListener(SWT.MouseExit, exitListener);
+
+ List<StapNode> list = graph.getSelection();
+
+ // ------------Debug information
+ if (list.size() == 1) {
+ int id;
+ if (list.get(0) instanceof StapNode)
+ id = list.get(0).id;
+ else {
+ graph.setSelection(null);
+ return;
+ }
+ graph.setSelection(null);
+// MP.println("Clicked node " + graph.getData(id).name + " with id " //$NON-NLS-1$ //$NON-NLS-2$
+// + id);
+// MP.println(" level: " + graph.getData(id).levelOfRecursion); //$NON-NLS-1$
+// MP.println(" called: " + graph.getData(id).called); //$NON-NLS-1$
+// MP.println(" caller: " + graph.getData(id).caller); //$NON-NLS-1$
+// MP.println(" copllapsedCaller: " //$NON-NLS-1$
+// + graph.getData(id).collapsedCaller);
+// MP.println(" callees: " + graph.getData(id).callees.size()); //$NON-NLS-1$
+// MP.println(" position: " + graph.getNode(id).getLocation().x //$NON-NLS-1$
+// + ", " + graph.getNode(id).getLocation().y); //$NON-NLS-1$
+
+ // ------------Highlighting
+ if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_TREE
+ || graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_BOX) {
+ for (StapNode n : (List<StapNode>) graph.getNodes()) {
+ unhighlightall(n);
+ }
+
+ List<Integer> callees = null;
+
+ if (graph.isCollapseMode())
+ callees = graph.getData(id).collapsedCallees;
+ else
+ callees = graph.getData(id).callees;
+
+ for (int subID : callees) {
+ if (graph.getNode(subID) != null)
+ graph.getNode(subID).highlight();
+ }
+
+ if (graph.getParentNode(id) != null) {
+ graph.getParentNode(id).highlight();
+ }
+// graph.setSelection(null);
+ graph.getNode(id).highlight();
+
+ return;
+ }
+
+ }
+
+ else if (list.size() == 0 && ! (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_AGGREGATE)) {
+ for (StapNode n : (List<StapNode>) graph.getNodes()) {
+ unhighlightall(n);
+ }
+
+ }
+
+// else {
+// for (StapNode n : list) {
+// unhighlightall(n);
+// }
+// }
+
+// graph.setSelection(null);
+ }
+};
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseMoveListener.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseMoveListener.java
new file mode 100644
index 0000000000..cefeeab4b6
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseMoveListener.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph.graphlisteners;
+
+import org.eclipse.linuxtools.systemtap.local.callgraph.StapGraph;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseMoveListener;
+
+
+public class StapGraphMouseMoveListener implements MouseMoveListener {
+ private StapGraph graph;
+ private int prevX;
+ private int prevY;
+ private static final int INIT = -20000;
+ private boolean stop;
+ private boolean showMessage;
+
+ public StapGraphMouseMoveListener(StapGraph graph) {
+ this.graph = graph;
+ prevX = INIT;
+ prevY = INIT;
+ showMessage = true;
+ }
+
+ public void setPoint(int x, int y) {
+ prevX = x;
+ prevY = y;
+ }
+
+ public void setStop(boolean val) {
+ stop = val;
+ }
+
+ @Override
+ public void mouseMove(MouseEvent e) {
+ //-------------Panning
+ //TODO: Implement panning at this zoom and mode
+ //For some reason getting rid of some of the /scale's in drawTree
+ //Will fix panning, but at the cost of making the drawTree zoom look weird
+
+ if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_TREE) {
+// if (graph.scale < 0.63) {
+ if (showMessage) {
+// SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
+// Messages.StapGraphMouseMoveListener_0, Messages.StapGraphMouseMoveListener_1,
+// Messages.StapGraphMouseMoveListener_2);
+// mess.schedule();
+ showMessage = false;
+ }
+ return;
+ }
+
+ //Initialize
+ if (prevX == INIT && prevY == INIT) {
+ prevX = e.x;
+ prevY = e.y;
+ return;
+ }
+
+ if (!stop) {
+ int yDiff, xDiff;
+ xDiff = prevX - e.x;
+ yDiff = prevY - e.y;
+ if (graph.scale > 1)
+ graph.scrollSmoothBy((int) (xDiff/graph.scale), (int) (yDiff/graph.scale));
+ else
+ graph.scrollSmoothBy((int) (xDiff), (int) (yDiff));
+
+ prevX = e.x;
+ prevY = e.y;
+ }
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseWheelListener.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseWheelListener.java
new file mode 100644
index 0000000000..98a94bdfd3
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseWheelListener.java
@@ -0,0 +1,143 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph.graphlisteners;
+
+import org.eclipse.linuxtools.systemtap.local.callgraph.StapGraph;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseWheelListener;
+
+/**
+ * Allows the user to zoom when CTRL + mouse wheel is used
+ *
+ */
+public class StapGraphMouseWheelListener implements MouseWheelListener {
+// private long snapshot;
+ private StapGraph graph;
+
+ public StapGraphMouseWheelListener(StapGraph g) {
+ this.graph = g;
+ }
+
+
+
+ @Override
+ public void mouseScrolled(MouseEvent e) {
+
+
+ if (e.stateMask != SWT.CTRL) {
+ // Scrolling
+ if (e.count > 0) {
+ AutoScrollHelper.scrollUp(graph);
+ }
+
+ else {
+ AutoScrollHelper.scrollDown(graph);
+ }
+ return;
+ }
+
+ if (graph.getDrawMode() != StapGraph.CONSTANT_DRAWMODE_BOX &&
+ graph.getDrawMode() != StapGraph.CONSTANT_DRAWMODE_TREE)
+ return;
+
+
+ if (e.count <= 0) {
+ if (graph.scale < 2){
+ graph.scale /= (10.0 / 11.0);
+ }else{
+ graph.scale = (int)graph.scale + 1;
+ }
+
+ }else {
+ if (graph.scale <= 2){
+ graph.scale *= (10.0 / 11.0);
+ }else{
+ graph.scale = (int) graph.scale - 1;
+ }
+ }
+
+ int currentAnimationMode = graph.getAnimationMode();
+ graph.draw(graph.getDrawMode(), StapGraph.CONSTANT_ANIMATION_FASTEST,
+ graph.getRootVisibleNodeNumber());
+ graph.setAnimationMode(currentAnimationMode);
+
+ int realeX = 3 * (int)(e.x / graph.scale);
+ int realeY = 3 * (int)(e.y / graph.scale);
+ int xDiff = (realeX - graph.getSize().x);
+ int yDiff = (realeY - graph.getSize().y);
+
+ graph.scrollTo(realeX + xDiff, realeY - yDiff);
+// x = graph.getNode(graph.getRootVisibleNode()).getLocation().x - x;
+// y = graph.getNode(graph.getRootVisibleNode()).getLocation().y - y;
+// graph.scrollBy(x/3, y);
+// graph.moveAllNodesBy(graph.getBounds().width/2 - e.x, graph.getBounds().height/2 - e.y);
+// System.out.println("AFTER: " + graph.getNode(graph.getRootVisibleNode()).getLocation().x + ", " +graph.getNode(graph.getRootVisibleNode()).getLocation().y + "\n\n") ;
+
+// // Don't scroll for circle mode
+// if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_CIRCLE)
+// return;
+//
+// // Scrolling
+// if (e.count > 0) {
+//
+// long tempSnapshot = System.currentTimeMillis();
+// if (tempSnapshot - snapshot < 100)
+// return;
+// snapshot = tempSnapshot;
+//
+// // Scrolling up
+// if (graph.getBottomLevelToDraw() < graph.getLowestLevelOfNodesAdded()
+// - StapGraph.CONSTANT_LEVEL_BUFFER / 2)
+// graph.addLevelToTop();
+//
+// graph.decreaseTopLevelOnScreen();
+// if (graph.getTopLevelOnScreen() < 0) {
+// graph.setTopLevelOnScreen(0);
+// }
+//
+// graph
+// .scrollToY(graph.getNode(
+// graph.getLevel(graph.getTopLevelOnScreen()).get(0))
+// .getLocation().y);
+// graph.update();
+//
+// }
+//
+// else {
+//
+// long tempSnapshot = System.currentTimeMillis();
+//
+// if (tempSnapshot - snapshot < 100)
+// return;
+// snapshot = tempSnapshot;
+//
+// // Don't delete levels yet
+// if (graph.getTopLevelOnScreen() > StapGraph.CONSTANT_LEVEL_BUFFER / 4)
+// graph.addLevelToBottom();
+//
+// graph.incrementTopLevelOnScreen();
+// if (graph.getTopLevelOnScreen() < 0) {
+// graph.setTopLevelOnScreen(0);
+// }
+//
+// graph
+// .scrollToY(graph.getNode(
+// graph.getLevel(graph.getTopLevelOnScreen()).get(0))
+// .getLocation().y);
+// graph.update();
+//
+// }
+
+ }
+
+};
+
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/messages.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/messages.properties
new file mode 100644
index 0000000000..02024a9a57
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/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
+###############################################################################
+StapGraphMouseMoveListener_0=PanError
+StapGraphMouseMoveListener_1=Panning disabled
+StapGraphMouseMoveListener_2=We're sorry, but panning is disabled in tree mode.
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/messages.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/messages.properties
new file mode 100644
index 0000000000..f3ad1950bd
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/messages.properties
@@ -0,0 +1,82 @@
+###############################################################################
+# 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
+###############################################################################
+StapGraph.0=Start of Program
+StapGraph.1=number of calls :
+StapGraph.2=function :
+StapGraph.3=time :
+StapGraphParser.12=Encountered return without matching call for function
+StapGraphParser.13=No start time could be found for function
+StapGraphParser.14=Unexpected symbol when parsing: '
+StapGraphParser.15=' encountered, while expecting < or >.
+StapGraphParser.16=:::Program terminated here
+StapGraphParser.19=\n:::SystemTap detected functions that appeared to be C directives.
+StapGraphParser.20=\n:::Program terminated in less than 50ms, SystemTap overhead may be significant.
+StapGraphParser.21=\n:::Total time for this run has been set to the total time taken by this node.
+StapGraphParser.22=Unexpected Number
+StapGraphParser.23=Unexpected symbol
+StapGraphParser.24=Unexpected symbol encountered while trying to
+StapGraphParser.25=process id/time values.
+StapGraphParser.26=Could not find data in target file. Ensure target file contains data and try again.
+StapGraphParser.5=GraphUIJob instance
+StapNode.0=unnamed
+CallgraphView.0=File
+CallgraphView.1=View
+CallgraphView.11=Open Last Run
+CallgraphView.13=Version
+CallgraphView.15=SystemTap Error Log
+CallgraphView.16=Tree View
+CallgraphView.17=Radial View
+CallgraphView.18=Aggregate View
+CallgraphView.19=Box View
+CallgraphView.2=Animation
+CallgraphView.20=Slow
+CallgraphView.21=Error Log
+CallgraphView.22=Fast
+CallgraphView.24=Collapse mode (C)
+CallgraphView.25=PROBE_BEGIN\n
+CallgraphView.3=\n
+CallgraphView.4=About
+CallgraphView.5=Help
+CallgraphView.6=Markers
+CallgraphView.7=Open
+CallgraphView.8=Save
+CallgraphView.9=Go to
+CallgraphView.BufferMessage1=Unfortunately the requested setting for level buffer
+CallgraphView.BufferMessage2=could not be processed due to the maximum number of nodes.
+CallgraphView.BufferMessage3=Setting levelBuffer to the maximum number of levels possible
+CallgraphView.BufferMessage4=without hitting the max nodes(
+CallgraphView.BufferMessage5=).
+CallgraphView.BufferMessage6=If you really want to see more levels, increment max nodes.
+CallgraphView.BufferMessage7=This may cause lag on some systems.
+CallgraphView.BufferTooHigh=LevelBuffer too high
+CallgraphView.ClearLog=Clear log
+CallgraphView.DeleteLogsMessage=This will permanently clear the SystemTap Eclipse error
+CallgraphView.DeleteLogsMessage2=logs. Are you sure you want to continue?
+CallgraphView.DeleteLogsTitle=Delete logs?
+CallgraphView.ErrorMessageBody=Error log could not be read, most likely this is because
+CallgraphView.ErrorMessageBody2=\ the log file could not be found.
+CallgraphView.ErrorMessageName=ErrorLog reading error
+CallgraphView.ErrorMessageTitle=Error reading error log
+CallgraphView.Errors=Errors
+CallgraphView.FileExistsMessage=Overwrite existing file?
+CallgraphView.FileExistsTitle=File Already Exists
+CallgraphView.Last=Last (L)
+CallgraphView.MaxDepth=Max depth:
+CallgraphView.MaxNodes=Max nodes:
+CallgraphView.Next=Next (N)
+CallgraphView.nextMarker=(n)ext
+CallgraphView.OpenLog=Open log
+CallgraphView.Previous=Previous (P)
+CallgraphView.previousMarker=(p)revious
+CallgraphView.Reset=Reset (R)
+CallgraphView.SetLimits=Set limits
+CallgraphView.SetValues=Set values
+CallgraphView.SystemTapVersionBox=SystemTap Version
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeContentProvider.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeContentProvider.java
new file mode 100644
index 0000000000..99fb4aa63f
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeContentProvider.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph.treeviewer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.linuxtools.systemtap.local.callgraph.StapData;
+import org.eclipse.linuxtools.systemtap.local.callgraph.StapGraph;
+
+public class StapTreeContentProvider implements ITreeContentProvider{
+
+ private StapGraph graph;
+
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ List<StapData> EMPTY = new ArrayList<StapData>();
+ if (parentElement instanceof StapData) {
+ StapData parent = ((StapData) parentElement);
+ List<Integer> childrenIDs = parent.collapsedCallees;
+ for (int val : childrenIDs) {
+ if (graph.getData(val) != null) {
+ EMPTY.add(graph.getData(val));
+ }
+ }
+ }
+ return EMPTY.toArray();
+ }
+
+ @Override
+ public Object getParent(Object element) {
+ if (element instanceof StapData) {
+ return graph.getData(((StapData) element).collapsedCaller);
+ }
+ return null;
+ }
+
+ @Override
+ public boolean hasChildren(Object element) {
+ if (element instanceof StapData)
+ return element == null ? false :
+ ((StapData) element).callees.size() > 0;
+ return false;
+ }
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ return getChildren(inputElement);
+ }
+
+ @Override
+ public void dispose() {
+
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+ public void setGraph(StapGraph graph) {
+ this.graph = graph;
+ }
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeDoubleClickListener.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeDoubleClickListener.java
new file mode 100644
index 0000000000..cd20cb3d7f
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeDoubleClickListener.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph.treeviewer;
+
+import java.util.Iterator;
+
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.linuxtools.systemtap.local.callgraph.CallgraphView;
+import org.eclipse.linuxtools.systemtap.local.callgraph.StapData;
+import org.eclipse.linuxtools.systemtap.local.callgraph.StapGraph;
+
+public class StapTreeDoubleClickListener implements IDoubleClickListener {
+
+ private StapGraph graph;
+ private TreeViewer viewer;
+
+ public StapTreeDoubleClickListener(TreeViewer t , StapGraph g) {
+ this.graph = g;
+ this.viewer = t;
+ }
+
+ @Override
+ public void doubleClick(DoubleClickEvent event) {
+ if (!(event.getSelection() instanceof IStructuredSelection))
+ return;
+ IStructuredSelection selection = (IStructuredSelection) event.getSelection();
+ if (selection.size() != 1) return;
+
+
+ //Expand the current node in the tree viewer and on the graph
+ for (Iterator<?> iterator = selection.iterator(); iterator.hasNext();) {
+ StapData data = (StapData) iterator.next();
+ viewer.collapseToLevel(data, 1);
+ viewer.expandToLevel(data, 1);
+ graph.setCollapseMode(true);
+ graph.draw(data.id);
+ graph.getNode(data.id).unhighlight();
+ }
+
+ CallgraphView.maximizeIfUnmaximized();
+ graph.setFocus();
+ }
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeLabelProvider.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeLabelProvider.java
new file mode 100644
index 0000000000..ae29eb0eea
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeLabelProvider.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph.treeviewer;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.linuxtools.systemtap.local.callgraph.CallGraphConstants;
+import org.eclipse.linuxtools.systemtap.local.callgraph.StapData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+
+public class StapTreeLabelProvider implements ILabelProvider {
+
+ @Override
+ public Image getImage(Object element) {
+ Image im = null;
+ if ( ((StapData) element).isMarked())
+ im = new Image(Display.getCurrent(), CallGraphConstants.PLUGIN_LOCATION + "/icons/public_co.gif"); //$NON-NLS-1$
+ else
+ im = new Image(Display.getCurrent(), CallGraphConstants.PLUGIN_LOCATION + "/icons/compare_method.gif"); //$NON-NLS-1$
+ return im;
+ }
+
+ @Override
+ public String getText(Object element) {
+ return ((StapData) element).called + ": " + ((StapData) element).name; //$NON-NLS-1$
+ }
+
+ @Override
+ public void addListener(ILabelProviderListener listener) {
+ }
+
+
+ @Override
+ public void dispose() {
+ }
+
+ @Override
+ public boolean isLabelProperty(Object element, String property) {
+ return false;
+ }
+
+ @Override
+ public void removeListener(ILabelProviderListener listener) {
+ }
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeListener.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeListener.java
new file mode 100644
index 0000000000..8337cfd10e
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeListener.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * 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.systemtap.local.callgraph.treeviewer;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import org.eclipse.jface.viewers.ITreeViewerListener;
+import org.eclipse.jface.viewers.TreeExpansionEvent;
+import org.eclipse.linuxtools.systemtap.local.callgraph.StapData;
+import org.eclipse.swt.widgets.ScrollBar;
+
+public class StapTreeListener implements ITreeViewerListener{
+ private static final int INCREMENT = 15;
+
+ private int highestLevelOfExpansion;
+ private ScrollBar scrollbar;
+ private HashMap<Integer, List<Integer>> highestLevelNodes;
+ //Level of recursion, list of nodes at that level currently displayed in tree
+
+
+ /**
+ * Autoscroll the horizontal scrollbar when there is a collapse event.
+ *
+ */
+ @Override
+ public void treeCollapsed(TreeExpansionEvent event) {
+ StapData data = (StapData) event.getElement();
+ if (highestLevelNodes.get(highestLevelOfExpansion) != null) {
+ if (highestLevelNodes.get(highestLevelOfExpansion).remove((Integer) data.id)) {
+ scrollbar.setSelection(scrollbar.getSelection() - INCREMENT);
+ // scrollbar.setMaximum(scrollbar.getMaximum() - scrollbar.getThumb() - INCREMENT);
+ // if (highestLevelNodes.size() == 0) {
+ highestLevelOfExpansion--;
+ // }
+ }
+ }
+
+ }
+
+ /**
+ * Autoscroll the horizontal scrollbar when there is an expand event.
+ *
+ */
+ @Override
+ public void treeExpanded(TreeExpansionEvent event) {
+ StapData d = ((StapData) event.getElement());
+ if (d.levelOfRecursion > highestLevelOfExpansion) {
+ scrollbar.setSelection(scrollbar.getSelection() + INCREMENT);
+ highestLevelOfExpansion = ((StapData) event.getElement()).levelOfRecursion;
+ }
+
+ int lvl = d.levelOfRecursion;
+ if (highestLevelNodes.get(lvl) == null)
+ highestLevelNodes.put(lvl, new ArrayList<Integer>());
+ highestLevelNodes.get(lvl).add(d.id);
+ }
+
+ public StapTreeListener(ScrollBar bar) {
+ this.highestLevelOfExpansion=0;
+ this.scrollbar = bar;
+ highestLevelNodes = new HashMap<Integer, List<Integer>>();
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.local.core/.classpath
new file mode 100644
index 0000000000..ad32c83a78
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/.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/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/.project b/systemtap/org.eclipse.linuxtools.systemtap.local.core/.project
new file mode 100644
index 0000000000..547f6de468
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.systemtap.local.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/systemtap/org.eclipse.linuxtools.systemtap.local.core/.settings/org.eclipse.jdt.core.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..55f799a8d0
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Mon Sep 21 12:33:24 EDT 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.local.core/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..e77da2de98
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: SystemTap Local Core Project
+Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.local.core;singleton:=true
+Bundle-Version: 0.0.1.qualifier
+Bundle-Activator: org.eclipse.linuxtools.systemtap.local.core.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Export-Package: org.eclipse.linuxtools.systemtap.local.core
+Import-Package: org.eclipse.cdt.core,
+ org.eclipse.cdt.core.dom.ast,
+ org.eclipse.cdt.core.index,
+ org.eclipse.cdt.core.model,
+ org.eclipse.core.filesystem,
+ org.eclipse.jface.text,
+ org.eclipse.ui,
+ org.eclipse.ui.console,
+ org.eclipse.ui.ide,
+ org.eclipse.ui.texteditor
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.core/build.properties
new file mode 100644
index 0000000000..1b9a74f53b
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/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 = META-INF/,\
+ .,\
+ install.sh,\
+ systemtap.png,\
+ parse_function_mark_partial.stp,\
+ parse_function_partial.stp,\
+ bin/,\
+ systemtapbanner.png,\
+ plugin.xml
+
+
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/errors.prop b/systemtap/org.eclipse.linuxtools.systemtap.local.core/errors.prop
new file mode 100644
index 0000000000..1991b8893f
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/errors.prop
@@ -0,0 +1,13 @@
+.*no match while resolving probe point.*=One or more of the functions you specified could not be found.
+.*debuginfo under.*=No debuginfo could be found. As root, try running debuginfo-install kernel.
+.*___STAP_MARKER___.*=No ___STAP_MARKER___ functions were found in the target binary. Please insert markers, or try again without marking mode.
+.*semantic error.*debuginfo.*=No debuginfo was found, try debuginfo-install kernel
+.*libdwfl failure.*=Some debug info could not be found. On Fedora, try 'yum install systemtap kernel-devel yum-utils' and 'debuginfo-install kernel', as root.
+.*MAXACTION exceeded.*=SystemTap attempted to execute too many actions, please change the MAXACTIONS directive in the options tab of SystemTap Profile Configurations.
+.*uprobes.*=Probes were not compiled on your system. Try 'make -C /usr/local/share/systemtap/runtime/uprobes' as root
+.*Unable to find full path for "stap".*=SystemTap is necessary for the running of this command. If it is installed please make sure it is on the standard path.
+.*parse error.*=There may be an error in the arguments you sent or in the stap script, consult the log for more details.
+.*MAXMAPENTRIES exceeded.*=The maximum number of entries for a map has been exceeded, please change the MAXMAPENTRIES directive in the options tap of SystemTap Profile Configurations.
+.*stapdev.*=Please add yourself to the 'stapdev' or 'stapusr' group in order to run stap. Also, as root, run 'debuginfo-install kernel' and 'make -C /usr/local/share/systemtap/runtime/uprobes' if you have not done so already.
+.*Error inserting module.*File exists=A previous run of systemtap did not finish execution properly. In commandline, try ps aux | grep stap, kill any running stap processes and try again.
+.*line 0: syntax error near unexpected token.*=Your workspace name may contain opening and closing brackets -- please switch to a workspace that does not use brackets and try again.
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/install.sh b/systemtap/org.eclipse.linuxtools.systemtap.local.core/install.sh
new file mode 100755
index 0000000000..004fe90319
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/install.sh
@@ -0,0 +1,21 @@
+FILE=/etc/group
+USER=`whoami`
+num=1
+
+#CREATE A BACKUP FILE WITHOUT OVERWRITING ANYTHING
+while [ -e "${FILE}.bak${num}" ]; do
+ num=`expr ${num} + 1`
+done
+
+USEREXISTS=`grep stapdev ${FILE}| grep ${USER}`
+
+if [ -z "${USEREXISTS}" ]; then
+
+echo -e "Creating backup of ${FILE} \nat : ${FILE}.bak${num}"
+
+
+#BACKUP THE FILE AND THEN WRITE THE CURRENT USER TO THE STAPDEV GROUP
+echo "Root password required to add your username to the stapdev group."
+su -c "cp ${FILE} ${FILE}.bak${num}; gpasswd -a `whoami` stapdev"
+
+fi
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/parse_function_mark_partial.stp b/systemtap/org.eclipse.linuxtools.systemtap.local.core/parse_function_mark_partial.stp
new file mode 100644
index 0000000000..5145c21d1d
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/parse_function_mark_partial.stp
@@ -0,0 +1,122 @@
+
+probe begin{
+ printf("\nPROBE_BEGIN\n")
+ printf("0<")
+ funcName[0] = "init"
+ serial++
+ exitCalled = 0
+ start[0] = gettimeofday_ns()
+}
+
+
+/*HANDLE CASE WHEN AN EXIT() IS MADE*/
+probe syscall.exit{
+ if (target() == pid()){
+ exitCalled = 1
+ }
+}
+
+function callFunction(probefunc) {
+
+ start[serial] = gettimeofday_ns()
+
+ if (probefunc != "___STAP_MARKER___" && !(isinstr(probefunc,"(")) && !(isinstr(probefunc,")")) ) {
+ currentLevel++
+ currentlyIn[currentLevel] = serial
+
+
+ /*RELATED TO MEASURING TOTAL TIME A FUNCTION TAKES */
+ if (nested[probefunc] == 0){
+ start_total[probefunc] = start_total[probefunc] - gettimeofday_ns()
+ }
+ nested[probefunc]++
+
+
+ /*TRACK THE DEPTH OF A FUNCTION*/
+ depth[serial] = val
+ printf("%d<",serial)
+
+
+ /*RECORD NAME OF THE FUNCTION*/
+ funcName[serial] = probefunc
+ /*TALLY NUMBER OF USES OF FUNCTION*/
+
+ val++
+ serial++
+ }
+}
+
+function returnFunction(probefunc) {
+ if (probefunc != "___STAP_MARKER___" && !(isinstr(probefunc,"(")) && !(isinstr(probefunc,")")) ) {
+ val--
+ currentLevel--
+
+ /*IF WE ARE BACK TO THE DEPTH OF ANY FUNCTION WE HAVE RETURNED FROM IT*/
+ foreach (ser in depth)
+ if (depth[ser] == val){
+ total[ser] = gettimeofday_ns() - start[ser]
+ delete start[ser]
+ }
+ /*PREVENT CHANGING THE TIME OF THIS FUNCTION ONCE FOUND*/
+ delete depth[ser]
+
+ /*RELATED TO MEASURING TOTAL TIME A FUNCTION TAKES */
+ if (nested[probefunc] == 1){
+ start_total[probefunc] = start_total[probefunc] + ( gettimeofday_ns() )
+ }
+
+ printf(">")
+
+ /*RELATED TO MEASURING TOTAL TIME A FUNCTION TAKES */
+ nested[probefunc]--
+ }
+}
+
+
+
+probe end{
+ total[0] = gettimeofday_ns() - start[0]
+ start_total["init"] = total[0]
+
+ /*IF EXIT() WAS CALLED TALLY TIME FOR FUNCTIONS THAT DID NOT RETURN*/
+ if (exitCalled == 1){
+ foreach (fc in funcName){
+ if (total[fc] == 0){
+ total[fc] = gettimeofday_ns() - start[fc]
+ }
+ }
+
+ foreach (fd in nested){
+ if (start_total[fd] < 0){
+ start_total[fd] = start_total[fd] + (nested[fd] * gettimeofday_ns())
+ }
+ }
+ }
+
+ printf(">")
+
+ printf("\n")
+
+ foreach (fa in funcName)
+ printf("%d:%s;", fa, funcName[fa])
+
+ printf("\n")
+
+ foreach (ser in total)
+ printf("%d:%d;", ser, total[ser])
+
+ printf("\n")
+
+ foreach (fn in start_total) {
+ if (start_total[fn] > 0)
+ printf("%s:%d;", fn, start_total[fn])
+ }
+
+ printf("\n")
+
+ foreach (fc in markedFunctions) {
+ printf("%d:%s;", markedFunctions[fc], markedMessages[fc])
+ }
+ printf("\n")
+ exit()
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/parse_function_partial.stp b/systemtap/org.eclipse.linuxtools.systemtap.local.core/parse_function_partial.stp
new file mode 100644
index 0000000000..06003ec96c
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/parse_function_partial.stp
@@ -0,0 +1,21 @@
+function callFunction(probefunc) {
+ if (startTime == 0) {
+ startTime = gettimeofday_ns()
+ printf("<%s,,%d,,%d;", probefunc, serial, startTime)
+ } else
+ printf("<%s,,%d,,%d;", probefunc, serial, gettimeofday_ns())
+ serial++
+}
+
+
+function returnFunction(probefunc) {
+ finalTime = gettimeofday_ns()
+ printf(">%s,,%d;", probefunc, finalTime)
+}
+
+
+probe end {
+ printf("\n%d",finalTime);
+ printf("\n%d",finalTime - startTime);
+ exit()
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.core/plugin.xml
new file mode 100644
index 0000000000..72c4438fc5
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/plugin.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension-point id="org.eclipse.linuxtools.systemtap.local.core.parser" name="SystemTapParserPoint" schema="schema/org.eclipse.linuxtools.systemtap.local.core.parser.exsd"/>
+
+</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/schema/org.eclipse.linuxtools.systemtap.local.core.parser.exsd b/systemtap/org.eclipse.linuxtools.systemtap.local.core/schema/org.eclipse.linuxtools.systemtap.local.core.parser.exsd
new file mode 100644
index 0000000000..9df510c744
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/schema/org.eclipse.linuxtools.systemtap.local.core.parser.exsd
@@ -0,0 +1,109 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.linuxtools.systemtap.local.core" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.linuxtools.systemtap.local.core" id="org.eclipse.linuxtools.systemtap.local.core.parser" name="StapParserPoint"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="parser"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="parser">
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.linuxtools.systemtap.local.core.ISystemTapParser"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="realtime" type="boolean" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/schema/systemtapCommands.exsd b/systemtap/org.eclipse.linuxtools.systemtap.local.core/schema/systemtapCommands.exsd
new file mode 100644
index 0000000000..52749626c9
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/schema/systemtapCommands.exsd
@@ -0,0 +1,84 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.linuxtools.systemtap.localgui.core" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.linuxtools.systemtap.localgui.core" id="systemtapCommands" name="SystemTapCommands"/>
+ </appinfo>
+ <documentation>
+ Allows other programs to use the SystemTapCommands class.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/Activator.java b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/Activator.java
new file mode 100644
index 0000000000..5101b3330e
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/Activator.java
@@ -0,0 +1,133 @@
+/*******************************************************************************
+ * 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.systemtap.local.core;
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * Activator class behaves like standard Wizard-created activator,
+ * except for the checkRun() function.
+ *
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ PluginConstants.setPluginLocation(getPluginLocation());
+ PluginConstants.setWorkspaceLocation(getDefault().getStateLocation().toString()+"/"); //$NON-NLS-1$
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ 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(LaunchConfigurationConstants.PLUGIN_ID, path);
+ }
+
+ public String getPluginLocation() {
+ Bundle bundle = getBundle();
+
+ URL locationUrl = FileLocator.find(bundle,new Path("/"), null); //$NON-NLS-1$
+ URL fileUrl = null;
+ try {
+ fileUrl = FileLocator.toFileURL(locationUrl);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return fileUrl.getFile();
+
+ }
+
+
+
+ /**
+ * Check if install script has been executed. Install script MUST delete the FirstRun file,
+ * or else this will execute every time!
+ *
+ * Opens an install script to prompt user to properly install the plugin.
+ */
+ //@SuppressWarnings("static-access")
+/* private void checkRun() {
+
+ PluginConstants.setPluginLocation(getPluginLocation());
+ File initFile = new File(PluginConstants.PLUGIN_LOCATION + "SystemTapPlugin.init");//$NON-NLS-1
+ String line;
+
+ try {
+ BufferedReader br = new BufferedReader (new FileReader(initFile));
+ while ( (line = br.readLine()) != null) {
+ if (line.contains("First time")) {
+ Shell sh = new Shell();
+ //String command = "SystemTapPluginInstall/" + "install.sh"; //$NON-NLS-1$ $NON-NLS-2$
+ MessageDialog.openInformation(sh, Messages.getString("Activator.0"), Messages.getString("Activator.1")); //$NON-NLS-1$ //$NON-NLS-2$
+ BufferedWriter bw = new BufferedWriter(new FileWriter(initFile));
+ bw.append("Easter egg");
+ bw.close();
+ }
+ }
+
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ }*/
+
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/FileFinderOpener.java b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/FileFinderOpener.java
new file mode 100644
index 0000000000..e58ba1012d
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/FileFinderOpener.java
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * 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.systemtap.local.core;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IIndexFile;
+import org.eclipse.cdt.core.index.IIndexFileLocation;
+import org.eclipse.cdt.core.index.IIndexManager;
+import org.eclipse.cdt.core.index.IIndexName;
+import org.eclipse.cdt.core.index.IndexFilter;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.linuxtools.systemtap.local.core.SystemTapUIErrorMessages;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.ElementListSelectionDialog;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.texteditor.ITextEditor;
+/**
+ * Helper class that finds and opens files. Finds based on function names,
+ * opens based on path and in the current default editor.
+ *
+ */
+public class FileFinderOpener {
+
+ private static HashMap<String, Integer> offset = new HashMap<String, Integer>();
+ private static HashMap<String, Integer> length = new HashMap<String, Integer>();
+
+
+ /**
+ * @param project : C Project Type
+ * @param functionName : name of a function
+ * @return an ArrayList of String paths (relative to current workspace) of
+ * files with specified function name
+ */
+ private static ArrayList<String> findFunctionsInProject(ICProject project,
+ String functionName) {
+ ArrayList<String> files = new ArrayList<String>() ;
+
+ IIndexManager manager = CCorePlugin.getIndexManager();
+ IIndex index = null;
+ try {
+ index = manager.getIndex(project);
+ index.acquireReadLock();
+ IBinding[] bindings = index.findBindings(functionName.toCharArray(), IndexFilter.ALL, null);
+ for (IBinding bind : bindings) {
+ if (bind instanceof IFunction) {
+ IFunction ifunction = (IFunction) bind;
+ IIndexName[] names = index.findNames(ifunction,
+ IIndex.FIND_DEFINITIONS);
+ for (IIndexName iname : names) {
+ IIndexFile file = iname.getFile();
+ if (file != null) {
+ IIndexFileLocation filelocation = file.getLocation();
+ String loc = filelocation.getURI().getPath();
+ files.add(loc);
+ offset.put(loc, iname.getNodeOffset());
+ length.put(loc, iname.getNodeLength());
+ }
+ }
+ }
+ }
+
+ } catch (CoreException e) {
+ e.printStackTrace();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+
+ index.releaseReadLock();
+ return files;
+ }
+
+
+ public static String findAndOpen(ICProject project, String functionName) {
+ offset.clear();
+ length.clear();
+
+ ArrayList<String> files = findFunctionsInProject(project, functionName);
+
+ if (files == null || files.size() < 1)
+ return null;
+ StringBuilder output = new StringBuilder();
+
+ if (files.size() == 1) {
+ open(files.get(0), offset.get(files.get(0)), length.get(files.get(0)));
+ } else {
+ ElementListSelectionDialog d = new ElementListSelectionDialog(
+ new Shell(), new LabelProvider());
+ d.setTitle(Messages.getString("FileFinderOpener.MultipleFilesDialog")); //$NON-NLS-1$
+ d.setMessage(Messages.getString("FileFinderOpener.MultFilesDialogM1") + functionName + Messages.getString("FileFinderOpener.MultFilesDialogM2") + //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.getString("FileFinderOpener.MultFilesDialogM3")); //$NON-NLS-1$
+ d.setElements(files.toArray());
+ d.open();
+ for (Object o : d.getResult()) {
+ if (o instanceof String) {
+ String s = (String) o;
+ output.append(open(s, offset.get(s), length.get(s)));
+ }
+ }
+ }
+
+ return output.toString();
+ }
+
+
+ public static String open(String path, int offset, int length) {
+ if (path == null)
+ return null;
+ File fileToOpen = new File(path);
+
+ if (fileToOpen.exists() && fileToOpen.isFile()) {
+ IFileStore fileStore = EFS.getLocalFileSystem().getStore(fileToOpen.toURI());
+ IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+
+ try {
+ IEditorPart ed = IDE.openEditorOnFileStore( page, fileStore );
+ if (ed instanceof ITextEditor && offset > 0) {
+ ITextEditor text = (ITextEditor) ed;
+ text.selectAndReveal(offset, length);
+ return text.getTitle();
+ }
+ } catch ( PartInitException e ) {
+ }
+ } else {
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("FileFinderOpener.FileNotFound"), //$NON-NLS-1$
+ Messages.getString("FileFinderOpener.FileNotFound1"), Messages.getString("FileFinderOpener.FileNotFound2") + path); //$NON-NLS-1$ //$NON-NLS-2$
+ mess.schedule();
+ }
+ return null;
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/Helper.java b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/Helper.java
new file mode 100644
index 0000000000..b07b9b7c5b
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/Helper.java
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * 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.systemtap.local.core;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.TextConsole;
+
+public class Helper {
+
+ /**
+ * @param name : A String that can be found in the console (BE AS SPECIFIC AS POSSIBLE)
+ * @return The TextConsole having 'name' somewhere within it's name
+ */
+ public static TextConsole getConsoleByName(String name) {
+ for (int i = 0; i < ConsolePlugin.getDefault().getConsoleManager()
+ .getConsoles().length; i++) {
+ if (ConsolePlugin.getDefault().getConsoleManager().
+ getConsoles()[i].getName().contains(name)) {
+ return (TextConsole)ConsolePlugin.getDefault().getConsoleManager().getConsoles()[i];
+ }
+ }
+ return null;
+ }
+
+
+ /**
+ * @param name : A String that can be found in the console (BE AS SPECIFIC AS POSSIBLE)
+ * @return The text contained within that console
+ */
+ public static String getMainConsoleTextByName(String name){
+ TextConsole proc = (TextConsole) getConsoleByName(name);
+ return ((IDocument)proc.getDocument()).get();
+ }
+
+ public static IDocument getConsoleDocumentByName(String name) {
+ return ((TextConsole)Helper.getConsoleByName(name)).getDocument();
+ }
+
+ /**
+ * @param absoluteFilePath : the absolute path to the file
+ * @param content : the text to be written
+ */
+ public static void writeToFile(String absoluteFilePath, String content){
+ try {
+ FileWriter fstream;
+ fstream = new FileWriter(absoluteFilePath);
+ BufferedWriter out = new BufferedWriter(fstream);
+ out.write(content);
+ out.close();
+ } catch (Exception e) {
+ SystemTapUIErrorMessages err = new SystemTapUIErrorMessages(Messages.getString("SystemTapView.31"), //$NON-NLS-1$
+ Messages.getString("SystemTapView.32"), //$NON-NLS-1$
+ Messages.getString("SystemTapView.33")); //$NON-NLS-1$
+ err.schedule();
+ e.printStackTrace();
+ }
+ }
+
+
+ public static void appendToFile(String absoluteFilePath, String content) {
+ try {
+ FileWriter fstream;
+ fstream = new FileWriter(absoluteFilePath, true);
+ BufferedWriter out = new BufferedWriter(fstream);
+ out.append(content);
+ out.close();
+ } catch (Exception e) {
+ SystemTapUIErrorMessages err = new SystemTapUIErrorMessages(Messages.getString("SystemTapView.31"), //$NON-NLS-1$
+ Messages.getString("SystemTapView.32"), //$NON-NLS-1$
+ Messages.getString("SystemTapView.33")); //$NON-NLS-1$
+ err.schedule();
+ e.printStackTrace();
+ }
+ }
+
+ public static String readFile(String absoluteFilePath) {
+
+ try {
+ String output = ""; //$NON-NLS-1$
+ String tmp = ""; //$NON-NLS-1$
+ BufferedReader bw = new BufferedReader(new FileReader(new File(absoluteFilePath)));
+ while ((tmp = bw.readLine()) != null) {
+ output+=tmp + "\n"; //$NON-NLS-1$
+ }
+ bw.close();
+
+ return output;
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ private static BufferedWriter bw;
+
+ public void setBufferedWriter(String absoluteFilePath) {
+ try {
+ File f = new File(absoluteFilePath);
+ f.delete();
+ f.createNewFile();
+ FileWriter fstream;
+ fstream = new FileWriter(absoluteFilePath, true);
+ bw = new BufferedWriter(fstream);
+ } catch (Exception e) {
+ SystemTapUIErrorMessages err = new SystemTapUIErrorMessages(Messages.getString("SystemTapView.31"), //$NON-NLS-1$
+ Messages.getString("SystemTapView.32"), //$NON-NLS-1$
+ Messages.getString("SystemTapView.33")); //$NON-NLS-1$
+ err.schedule();
+ e.printStackTrace();
+ }
+ }
+
+ public void appendToExistingFile(String content) throws IOException {
+ bw.append(content);
+ }
+
+ public void closeBufferedWriter() throws IOException {
+ bw.close();
+ }
+
+
+}
+ \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/LaunchConfigurationConstants.java b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/LaunchConfigurationConstants.java
new file mode 100644
index 0000000000..d74000b78a
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/LaunchConfigurationConstants.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * 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.systemtap.local.core;
+
+
+/**
+ * Contains the name and default value of configuration variables, as well as
+ * a few other plugin-specific constants.
+ *
+ */
+public final class LaunchConfigurationConstants {
+
+
+ //Configuration type variables
+ private static final String INVALID = ""; //$NON-NLS-1$
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.systemtap.localgui.launch"; //$NON-NLS-1$
+
+ public static final String COMMAND_VERBOSE = PLUGIN_ID + ".COMMAND_VERBOSE"; //$NON-NLS-1$
+ public static final String COMMAND_PASS = PLUGIN_ID + ".PASS"; //$NON-NLS-1$
+ public static final String COMMAND_KEEP_TEMPORARY = PLUGIN_ID + ".KEEP_TEMPORARY"; //$NON-NLS-1$
+ public static final String COMMAND_GURU = PLUGIN_ID + ".GURU"; //$NON-NLS-1$
+ public static final String COMMAND_PROLOGUE_SEARCH = PLUGIN_ID + ".PROLOGUE_SEARCH"; //$NON-NLS-1$
+ public static final String COMMAND_NO_CODE_ELISION = PLUGIN_ID + ".NO_CODE_ELISION"; //$NON-NLS-1$
+ public static final String COMMAND_DISABLE_WARNINGS = PLUGIN_ID + ".DISABLE_WARNINGS"; //$NON-NLS-1$
+ public static final String COMMAND_BULK_MODE = PLUGIN_ID + ".BULK_MODE"; //$NON-NLS-1$
+ public static final String COMMAND_TIMING_INFO = PLUGIN_ID + ".TIMING_INFO"; //$NON-NLS-1$
+ public static final String COMMAND_SKIP_BADVARS = PLUGIN_ID + ".SKIP_BADVARS"; //$NON-NLS-1$
+ public static final String COMMAND_IGNORE_DWARF = PLUGIN_ID + ".IGNORE_DWARF"; //$NON-NLS-1$
+ public static final String COMMAND_TAPSET_COVERAGE = PLUGIN_ID + ".TAPSET_COVERAGE"; //$NON-NLS-1$
+ public static final String BINARY_PATH = PLUGIN_ID + ".BINARY_PATH"; //$NON-NLS-1$
+ public static final String SCRIPT_PATH = PLUGIN_ID + ".SCRIPT_PATH"; //$NON-NLS-1$
+ public static final String COMMAND_LEAVE_RUNNING = PLUGIN_ID + ".LEAVE_RUNNING"; //$NON-NLS-1$
+ public static final String COMMAND_C_DIRECTIVES = PLUGIN_ID + ".C_DIRECTIVES"; //$NON-NLS-1$
+ public static final String COMMAND_BUFFER_BYTES = PLUGIN_ID + ".BUFFER_BYTES"; //$NON-NLS-1$
+ public static final String COMMAND_TARGET_PID = PLUGIN_ID + ".TARGET_PID"; //$NON-NLS-1$
+ public static final String ARGUMENTS = PLUGIN_ID + ".ARGUMENTS"; //$NON-NLS-1$
+ public static final String NUMBER_OF_ARGUMENTS = PLUGIN_ID + ".NUMBER_OF_ARGUMENTS"; //$NON-NLS-1$
+ public static final String OUTPUT_PATH = PLUGIN_ID + ".OUTPUT_PATH"; //$NON-NLS-1$
+ public static final String OVERWRITE = PLUGIN_ID + ".OVERWRITE"; //$NON-NLS-1$
+ public static final String BUILD_PROJECT = PLUGIN_ID + ".BUILD_PROJECT"; //$NON-NLS-1$
+ public static final String COMMAND_LIST = PLUGIN_ID + ".COMMAND_LIST"; //$NON-NLS-1$
+ public static final String BINARY_ARGUMENTS = PLUGIN_ID + ".BINARY_ARGUMENTS"; //$NON-NLS-1$
+ public static final String PARSER_CLASS = PLUGIN_ID + ".PARSER_CLASS";
+
+
+ public static final String GENERATED_SCRIPT = PLUGIN_ID + ".GENERATED_SCRIPT"; //$NON-NLS-1$
+ public static final String NEED_TO_GENERATE = PLUGIN_ID + ".NEED_TO_GENERATE"; //$NON-NLS-1$
+ public static final String USE_COLOUR = PLUGIN_ID + ".USE_COLOUR"; //$NON-NLS-1$
+
+
+ //Defaults
+ public static final boolean DEFAULT_COMMAND_VERBOSE = false;
+ public static final int DEFAULT_COMMAND_PASS = 0;
+ public static final boolean DEFAULT_COMMAND_KEEP_TEMPORARY = false;
+ public static final boolean DEFAULT_COMMAND_GURU = false;
+ public static final boolean DEFAULT_COMMAND_PROLOGUE_SEARCH = false;
+ public static final boolean DEFAULT_COMMAND_NO_CODE_ELISION = false;
+ public static final boolean DEFAULT_COMMAND_DISABLE_WARNINGS = false;
+ public static final boolean DEFAULT_COMMAND_BULK_MODE = false;
+ public static final boolean DEFAULT_COMMAND_TIMING_INFO = false;
+ public static final boolean DEFAULT_COMMAND_SKIP_BADVARS = false;
+ public static final boolean DEFAULT_COMMAND_IGNORE_DWARF = false;
+ public static final boolean DEFAULT_COMMAND_TAPSET_COVERAGE = false;
+ public static final String DEFAULT_BINARY_PATH = INVALID;
+ public static final String DEFAULT_SCRIPT_PATH = INVALID;
+ public static final boolean DEFAULT_COMMAND_LEAVE_RUNNING = false;
+ public static final String DEFAULT_COMMAND_C_DIRECTIVES = INVALID;
+ public static final int DEFAULT_COMMAND_BUFFER_BYTES = 0;
+ public static final int DEFAULT_COMMAND_TARGET_PID = 0;
+ public static final String DEFAULT_ARGUMENTS = INVALID;
+ public static final String DEFAULT_OUTPUT_PATH = INVALID;
+ public static final boolean DEFAULT_OVERWRITE = false;
+ public static final int DEFAULT_NUMBER_OF_ARGUMENTS = 0;
+ public static final boolean DEFAULT_BUILD_PROJECT = true;
+ public static final String DEFAULT_COMMAND_LIST = INVALID;
+ public static final String DEFAULT_BINARY_ARGUMENTS = INVALID;
+
+ public static final String DEFAULT_GENERATED_SCRIPT = INVALID;
+ public static final boolean DEFAULT_NEED_TO_GENERATE = false;
+ public static final boolean DEFAULT_USE_COLOUR = false;
+
+ public static final String DEFAULT_PARSER_CLASS = INVALID;
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/MP.java b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/MP.java
new file mode 100644
index 0000000000..f79a57c76b
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/MP.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * 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.systemtap.local.core;
+
+/**
+ * Helper class for easily muted prints
+ *
+ */
+public class MP {
+ public static boolean mute = false;
+
+ /**
+ * Prints the given string. All calls to MP.println can be muted by changing the mute variable
+ * in MP, either by going into the source code or calling MP.setMute(boolean)
+ *
+ * @param String to print
+ */
+ public static void println(String val) {
+ if (!mute) System.out.println(val);
+ }
+
+ public static void print(String val){
+ if (!mute) System.out.print(val);
+ }
+
+ public static void setMute(boolean val) {
+ mute = val;
+ }
+
+ public static void mute() {
+ mute = true;
+ }
+
+ public static void unmute() {
+ mute = false;
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/Messages.java b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/Messages.java
new file mode 100644
index 0000000000..1edee958fc
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/Messages.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.systemtap.local.core;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * Class generated by Eclipse to handle externalized strings.
+ *
+ */
+public class Messages {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.systemtap.local.core.messages"; //$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/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/PluginConstants.java b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/PluginConstants.java
new file mode 100644
index 0000000000..72ccb4183c
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/PluginConstants.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * 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.systemtap.local.core;
+
+public final class PluginConstants {
+
+ public static String DEFAULT_OUTPUT = ""; //$NON-NLS-1$
+ public static final String CONFIGURATION_TYPE_ID = "org.eclipse.linuxtools.systemtap.localgui.launch.systemtapLaunch"; //$NON-NLS-1$
+ public static final String PARSER_CLASS = "org.eclipse.linuxtools.systemtap.local.core.parser";
+ public static final String PARSER_RESOURCE = "org.eclipse.linuxtools.systemtap.local.core";
+ public static final String PARSER_NAME = "parser";
+
+ public static final String NEW_LINE = "\n"; //$NON-NLS-1$
+
+ public static final int MAX_ERRORS = 500; //Maximum number of errors to tolerate
+
+ public static String PLUGIN_LOCATION = ""; //$NON-NLS-1$
+ public static int SYSTEMTAP_OPTIONS_TAB_HORIZONTAL_SPACING = 30;
+
+ public static final String STAP_PATH = "stap"; //$NON-NLS-1$
+ public static String STAP_GRAPH_DEFAULT_IO_PATH = ""; //$NON-NLS-1$
+
+ /**
+ * Sets the absolute path of the Plugin folder and updates
+ * the PLUGIN_LOCATION.
+ *
+ * @param loc
+ */
+ public static void setPluginLocation(String loc) {
+ PLUGIN_LOCATION = loc;
+ }
+
+ public static String getPluginLocation() {
+ return PLUGIN_LOCATION;
+ }
+
+ public static void setWorkspaceLocation(String loc){
+ DEFAULT_OUTPUT = loc;
+ STAP_GRAPH_DEFAULT_IO_PATH = DEFAULT_OUTPUT+"callgraph.out"; //$NON-NLS-1$
+ }
+
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/ShellOpener.java b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/ShellOpener.java
new file mode 100644
index 0000000000..16d64ec977
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/ShellOpener.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * 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.systemtap.local.core;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.progress.UIJob;
+
+public class ShellOpener extends UIJob{
+ private Shell shell;
+
+ public ShellOpener(String name, Shell sh) {
+ super(name);
+ shell = sh;
+ }
+
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ shell.open();
+ return Status.OK_STATUS;
+ }
+
+ public boolean isDisposed() {
+ if (shell.isDisposed())
+ return true;
+ return false;
+ }
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapCommandGenerator.java b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapCommandGenerator.java
new file mode 100644
index 0000000000..793494047b
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapCommandGenerator.java
@@ -0,0 +1,236 @@
+/*******************************************************************************
+ * 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.systemtap.local.core;
+
+import java.util.ArrayList;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+
+
+/**
+ * This <code>Action</code> is used to run a SystemTap script that is currently open in the editor.
+ * @author Ryan Morse
+ */
+public class SystemTapCommandGenerator extends Action implements IWorkbenchWindowActionDelegate {
+
+ private boolean needsToSendCommand;
+ private boolean needsArguments;
+ protected String arguments;
+ protected String scriptPath;
+ protected String commands;
+ protected boolean isGuru;
+ private String binaryPath = null;
+ protected IWorkbenchWindow actionWindow = null;
+ private IAction act;
+ private String executeCommand;
+ private String binaryArguments;
+
+
+ public SystemTapCommandGenerator() {
+ super();
+ }
+
+ public void dispose() {
+ actionWindow= null;
+ }
+
+ public void init(IWorkbenchWindow window) {
+ actionWindow= window;
+ }
+
+ public void run(IAction action) {
+ System.out.println("Not implemented"); //$NON-NLS-1$
+ }
+
+ public void run() {
+ System.out.println("Calling run() without parameters not implemented"); //$NON-NLS-1$
+ }
+
+ public String generateCommand(String scrPath, String binPath, String cmds, boolean needBinary, boolean needsArgs, String arg, String binArguments) {
+ needsToSendCommand = needBinary;
+ needsArguments = needsArgs;
+ binaryPath = binPath;
+ scriptPath = scrPath;
+ isGuru = false;
+ arguments = arg;
+ commands = cmds;
+ binaryArguments = binArguments;
+
+ String[] script = buildScript();
+
+ String cmd = ""; //$NON-NLS-1$
+ for (int i = 0; i < script.length-1; i++)
+ cmd = cmd + script[i] + " "; //$NON-NLS-1$
+ cmd = cmd + script[script.length-1];
+
+ this.executeCommand = cmd;
+ return cmd;
+ }
+
+
+ /**
+ * Parses the data created from generateCommand
+ * @return An array of strings to be joined and executed by the shell
+ */
+ protected String[] buildScript() {
+ //TODO: Take care of this in the next release. For now only the guru mode is sent
+ ArrayList<String> cmdList = new ArrayList<String>();
+ String[] script;
+
+ //getImportedTapsets(cmdList);
+ if (commands.length() > 0){
+ cmdList.add(commands);
+ }
+
+ //Execute a binary
+ if (needsToSendCommand){
+ if (binaryArguments.length() < 1){
+ cmdList.add("-c '" + binaryPath + "'"); //$NON-NLS-1$ //$NON-NLS-2$
+ }else{
+ cmdList.add("-c '" + binaryPath + " " + binaryArguments +"'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+ }
+
+
+ if (needsArguments) {
+ script = new String[cmdList.size() + 3];
+ script[script.length-2] = scriptPath;
+ script[script.length-1] = arguments;
+ } else {
+ script = new String[cmdList.size() + 2];
+ script[script.length-1] = scriptPath;
+ }
+
+ script[0] = PluginConstants.STAP_PATH; //$NON-NLS-1$
+
+ for(int i=0; i< cmdList.size(); i++) {
+ if (cmdList.get(i) != null)
+ script[i +1] = cmdList.get(i).toString();
+ else script[i + 1] = ""; //$NON-NLS-1$
+ }
+ return script;
+
+ }
+
+
+ public void selectionChanged(IAction act, ISelection select) {
+ this.act = act;
+ setEnablement(false);
+ //buildEnablementChecks();
+ }
+
+ private void setEnablement(boolean enabled) {
+ act.setEnabled(enabled);
+ }
+
+ public String getExecuteCommand(){
+ return this.executeCommand;
+ }
+
+
+ /**
+ * Convenience method to return the current window
+ */
+ public IWorkbenchWindow getWindow() {
+ return actionWindow;
+ }
+
+}
+
+
+/**
+ * Checks if the current editor is operating on a file that actually exists and can be
+ * used as an argument to stap (as opposed to an unsaved buffer).
+ * @return True if the file is valid.
+ */
+//protected boolean isValid() {
+// IEditorPart ed = fWindow.getActivePage().getActiveEditor();
+// if (ed == null) return true;
+// if(isValidFile(ed)){
+//
+// String ret = getFilePath();
+//
+// if(isValidDirectory(ret))
+// return true;
+// }
+// return true;
+//}
+
+//private boolean isValidFile(IEditorPart editor) {
+// if(null == editor) {
+// String msg = MessageFormat.format("No script file is selected", (Object[])null);
+// //LogManager.logInfo("Initializing", MessageDialog.class);
+// MessageDialog.openWarning(fWindow.getShell(), "Problem running SystemTap script - invalid script", msg);
+// //LogManager.logInfo("Disposing", MessageDialog.class);
+// return false;
+// }
+//
+// if(editor.isDirty())
+// editor.doSave(new ProgressMonitorPart(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), new FillLayout()));
+//
+// return true;
+//}
+
+
+/*private boolean isValidDirectory(String fileName) {
+ this.fileName = fileName;
+
+ if(0 == IDESessionSettings.tapsetLocation.trim().length())
+ TapsetLibrary.getTapsetLocation(IDEPlugin.getDefault().getPreferenceStore());
+ if(fileName.contains(IDESessionSettings.tapsetLocation)) {
+ String msg = MessageFormat.format(Localization.getString("RunScriptAction.TapsetDirectoryRun"), (Object[])null);
+ MessageDialog.openWarning(fWindow.getShell(), Localization.getString("RunScriptAction.Error"), msg);
+ return false;
+ }
+ return true;
+}*/
+
+//protected Subscription getSubscription()
+//{
+// return subscription;
+//}
+//
+
+//private void buildEnablementChecks() {
+//if(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor() instanceof STPEditor)
+// setEnablement(true);
+//}
+//
+
+//
+//protected String[] getEnvironmentVariables() {
+// return EnvironmentVariablesPreferencePage.getEnvironmentVariables();
+//}
+
+//
+//protected boolean createClientSession()
+//{
+// if (!ClientSession.isConnected())
+// {
+// new SelectServerDialog(fWindow.getShell()).open();
+// }
+// if((ConsoleLogPlugin.getDefault().getPluginPreferences().getBoolean(ConsoleLogPreferenceConstants.CANCELLED))!=true)
+// {
+// subscription = new Subscription(fileName,isGuru());
+// if (ClientSession.isConnected())
+// {
+// console = ScriptConsole.getInstance(fileName, subscription);
+// console.run();
+// }
+// }
+// return true;
+//}
+//
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapErrorHandler.java b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapErrorHandler.java
new file mode 100644
index 0000000000..9fe92d2a77
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapErrorHandler.java
@@ -0,0 +1,323 @@
+/*******************************************************************************
+ * 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.systemtap.local.core;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.TimeZone;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+
+/**
+ * Helper class parses the given string for recognizable error messages
+ *
+ */
+public class SystemTapErrorHandler {
+
+ public static final String FILE_PROP = "errors.prop"; //$NON-NLS-1$
+ public static final String FILE_ERROR_LOG = "Error.log"; //$NON-NLS-1$
+ public static final int MAX_LOG_SIZE = 50000;
+ private boolean errorRecognized;
+ private String errorMessage = ""; //$NON-NLS-1$
+ private StringBuilder logContents;
+ private boolean mismatchedProbePoints;
+ ArrayList<String> functions = new ArrayList<String>();
+
+ /**
+ * Delete the log file and create an empty one
+ */
+ public static void delete(){
+ File log = new File(PluginConstants.DEFAULT_OUTPUT + FILE_ERROR_LOG); //$NON-NLS-1$
+ log.delete();
+ try {
+ log.createNewFile();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+
+ public SystemTapErrorHandler() {
+ mismatchedProbePoints = false;
+ errorRecognized = false;
+ if (errorMessage.length() < 1) {
+ errorMessage =
+ Messages.getString("SystemTapErrorHandler.ErrorMessage") + //$NON-NLS-1$
+ Messages.getString("SystemTapErrorHandler.ErrorMessage1"); //$NON-NLS-1$
+ }
+
+ logContents = new StringBuilder(); //$NON-NLS-1$
+ }
+
+
+ /**
+ * Search given string for recognizable error messages. Can append the contents of
+ * the string to the error log if writeToLog() or finishHandling() are called.
+ * A call to finishHandling() will also open a popup window with user-friendly messages
+ * corresponding to the recognizable errors.
+ *
+ * @param doc
+ */
+ public void handle (IProgressMonitor m, String errors){
+ String[] blah = errors.split("\n"); //$NON-NLS-1$
+
+ //READ FROM THE PROP FILE AND DETERMINE TYPE OF ERROR
+ File file = new File(PluginConstants.PLUGIN_LOCATION+FILE_PROP);
+ try {
+ BufferedReader buff = new BufferedReader (new FileReader(file));
+ String line;
+ int index;
+
+ for (String message : blah) {
+ boolean firstLine = true; //Keep the error about mismatched probe points first
+ buff = new BufferedReader (new FileReader(file));
+ while ((line = buff.readLine()) != null){
+ if (m != null && m.isCanceled())
+ return;
+ index = line.indexOf('=');
+ String matchString = line.substring(0, index);
+ Pattern pat = Pattern.compile(matchString, Pattern.DOTALL);
+ Matcher matcher = pat.matcher(message);
+
+
+ if (matcher.matches()) {
+ if (!isErrorRecognized()) {
+ errorMessage+=Messages.getString("SystemTapErrorHandler.ErrorMessage2"); //$NON-NLS-1$
+ setErrorRecognized(true);
+ }
+
+ errorMessage+=line.substring(index+1)
+ + PluginConstants.NEW_LINE + PluginConstants.NEW_LINE;
+
+ if (firstLine) {
+ findFunctions(m, message, pat);
+ mismatchedProbePoints = true;
+ }
+ break;
+ }
+ firstLine = false;
+ }
+ buff.close();
+ }
+
+ logContents.append(errors);
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+
+ public void handle (IProgressMonitor m, FileReader f) throws IOException {
+ BufferedReader br = new BufferedReader (f);
+
+ String line;
+ StringBuilder builder = new StringBuilder();
+ int counter = 0;
+ while ( (line = br.readLine()) != null) {
+ counter++;
+ builder.append(line);
+ builder.append("\n"); //$NON-NLS-1$
+ if (m != null && m.isCanceled())
+ return;
+ if (counter == 300) {
+ handle(m, builder.toString());
+ builder = new StringBuilder();
+ counter = 0;
+ }
+ }
+ handle(m, builder.toString());
+
+ }
+
+ /**
+ * Run this method when there are no more error messages to handle.
+ * Creates the error pop-up message and writes to log.
+ *
+ */
+ public void finishHandling(IProgressMonitor m, int numberOfErrors) {
+ if (!isErrorRecognized()) {
+ errorMessage+=Messages.getString("SystemTapErrorHandler.4") + //$NON-NLS-1$
+ Messages.getString("SystemTapErrorHandler.5"); //$NON-NLS-1$
+ }
+
+ writeToLog();
+
+ if (mismatchedProbePoints){
+ if (numberOfErrors > PluginConstants.MAX_ERRORS) {
+ errorMessage = PluginConstants.NEW_LINE + PluginConstants.NEW_LINE
+ + Messages.getString("SystemTapErrorHandler.TooManyErrors1") + numberOfErrors +Messages.getString("SystemTapErrorHandler.TooManyErrors2") + //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.getString("SystemTapErrorHandler.TooManyErrors3") + //$NON-NLS-1$
+ Messages.getString("SystemTapErrorHandler.TooManyErrors4"); //$NON-NLS-1$
+ SystemTapUIErrorMessages mes = new SystemTapUIErrorMessages(
+ Messages.getString("SystemTapErrorHandler.ErrorMessageName"), //$NON-NLS-1$
+ Messages.getString("SystemTapErrorHandler.ErrorMessageTitle"), //$NON-NLS-1$
+ errorMessage); //$NON-NLS-1$ //$NON-NLS-2$
+ mes.schedule();
+ m.setCanceled(true);
+ return;
+ }
+
+
+ StringBuffer resultFileContent = new StringBuffer();
+ String fileLocation = PluginConstants.DEFAULT_OUTPUT + "callgraphGen.stp"; //$NON-NLS-1$
+ String line;
+ boolean skip = false;
+ File file = new File(fileLocation);
+ try {
+ BufferedReader buff = new BufferedReader(new FileReader(file));
+ while ((line = buff.readLine()) != null){
+ if (m != null && m.isCanceled())
+ return;
+ skip = false;
+ for (String func : functions){
+ if (line.contains("function(\"" + func + "\").call")){ //$NON-NLS-1$ //$NON-NLS-2$
+ skip = true;
+ break;
+ }
+ }
+
+ if (!skip && !line.equals("\n")){ //$NON-NLS-1$
+ resultFileContent.append(line);
+ resultFileContent.append("\n"); //$NON-NLS-1$
+ }
+ }
+
+ buff.close();
+
+ BufferedWriter wbuff= new BufferedWriter(new FileWriter(file));
+ wbuff.write(resultFileContent.toString());
+ wbuff.close();
+
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ }else{
+ SystemTapUIErrorMessages mes = new SystemTapUIErrorMessages(
+ Messages.getString("SystemTapErrorHandler.ErrorMessageName"), //$NON-NLS-1$
+ Messages.getString("SystemTapErrorHandler.ErrorMessageTitle"), //$NON-NLS-1$
+ errorMessage); //$NON-NLS-1$ //$NON-NLS-2$
+ mes.schedule();
+ }
+
+
+ }
+
+
+ /**
+ * Writes the contents of logContents to the error log, along with date and time.
+ */
+ public void writeToLog() {
+ File errorLog = new File(PluginConstants.DEFAULT_OUTPUT + "Error.log"); //$NON-NLS-1$
+
+ try {
+ //CREATE THE ERROR LOG IF IT DOES NOT EXIST
+ //CLEAR THE ERROR LOG AFTER A FIXED SIZE(BYTES)
+ if (!errorLog.exists()
+ || errorLog.length() > MAX_LOG_SIZE) {
+ errorLog.delete();
+ errorLog.createNewFile();
+ }
+
+ Calendar cal = Calendar.getInstance(TimeZone.getDefault());
+ int year = cal.get(Calendar.YEAR);
+ int month = cal.get(Calendar.MONTH);
+ int day = cal.get(Calendar.DAY_OF_MONTH);
+ int hour = cal.get(Calendar.HOUR_OF_DAY);
+ int minute = cal.get(Calendar.MINUTE);
+ int second = cal.get(Calendar.SECOND);
+
+ //APPEND THE ERROR TO THE LOG
+ Helper
+ .appendToFile(errorLog.getAbsolutePath(),
+ Messages.getString("SystemTapErrorHandler.ErrorLogDashes") //$NON-NLS-1$
+ + PluginConstants.NEW_LINE
+ + day + "/" + month //$NON-NLS-1$
+ + "/" + year + " - " + hour + ":" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ + minute + ":" + second //$NON-NLS-1$
+ + PluginConstants.NEW_LINE + logContents
+ + PluginConstants.NEW_LINE + PluginConstants.NEW_LINE);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ logContents = new StringBuilder(); //$NON-NLS-1$
+ }
+
+ /**
+ * Returns true if an error matches one of the regex's in error.prop
+ * @return
+ */
+ public boolean isErrorRecognized() {
+ return errorRecognized;
+ }
+
+
+ /**
+ * Convenience method to change the error recognition value.
+ * @param errorsRecognized
+ */
+ private void setErrorRecognized(boolean errorsRecognized) {
+ errorRecognized = errorsRecognized;
+ }
+
+
+ public boolean hasMismatchedProbePoints() {
+ return mismatchedProbePoints;
+ }
+
+
+ public void setMismatchedProbePoints(boolean mismatchedProbePoints) {
+ this.mismatchedProbePoints = mismatchedProbePoints;
+ }
+
+
+ public void findFunctions(IProgressMonitor m, String message, Pattern pat) {
+ String[] list = message.split("\n"); //$NON-NLS-1$
+ String result;
+ for (String s : list) {
+ if (m.isCanceled())
+ return;
+ if (pat.matcher(s).matches()) {
+ int lastQuote = s.lastIndexOf('"');
+ if (lastQuote < 0)
+ return;
+ int secondLastQuote = s.lastIndexOf('"', lastQuote - 1);
+ if (secondLastQuote < 0)
+ return;
+ result = s.substring(secondLastQuote+1, lastQuote);
+ if (!functions.contains(result))
+ functions.add(result);
+ }
+ }
+ }
+
+
+ public ArrayList<String> getFunctions() {
+ return functions;
+ }
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapParser.java b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapParser.java
new file mode 100644
index 0000000000..9d621cd964
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapParser.java
@@ -0,0 +1,169 @@
+/*******************************************************************************
+ * 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.systemtap.local.core;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.jobs.Job;
+
+public abstract class SystemTapParser extends Job {
+ protected IProgressMonitor monitor;
+ protected String filePath;
+
+ public SystemTapParser() {
+ super("New_Job");
+ this.filePath = PluginConstants.STAP_GRAPH_DEFAULT_IO_PATH;
+ initialize();
+ }
+
+ /**
+ * Initialize will be called in the constructors for this class.
+ * Use this method to initialize variables.
+ */
+ protected abstract void initialize();
+
+
+ /**
+ * Implement this method to execute parsing. The return from
+ * executeParsing() will be the return value of the run command.
+ *
+ * SystemTapParser will call executeParsing() within its run method.
+ * (i.e. will execute in a separate, non-UI thread)
+ * @return
+ */
+ public abstract IStatus executeParsing();
+
+ public abstract void saveData(String filePath);
+
+
+ public SystemTapParser(String name, String filePath) {
+ super(name);
+ //BY DEFAULT READ/WRITE FROM HERE
+ if (filePath != null)
+ this.filePath = filePath;
+ else
+ this.filePath = PluginConstants.STAP_GRAPH_DEFAULT_IO_PATH;
+ initialize();
+ }
+
+ /**
+ * Cleans names of form 'name").return', returning just the name
+ * @param name
+ */
+ protected String cleanFunctionName(String name) {
+ return name.split("\"")[0]; //$NON-NLS-1$
+ }
+
+ /**
+ * Checks for quotations and brackets in the function name
+ * @param name
+ */
+ protected boolean isFunctionNameClean(String name) {
+ if (name.contains("\"") || name.contains(")")) //$NON-NLS-1$ //$NON-NLS-2$
+ return false;
+ return true;
+ }
+
+ /**
+ * Creates a popup error dialog in a separate UI thread.
+ * Dialog title is 'Unexpected symbol,' name is 'ParseError' and body
+ * is the specified message.
+ * @param message
+ */
+ protected void parsingError(String message) {
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
+ Messages.getString("SystemTapParser.0"), Messages.getString("SystemTapParser.1"), message); //$NON-NLS-1$ //$NON-NLS-2$
+ mess.schedule();
+ }
+
+
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ this.monitor = monitor;
+ return executeParsing();
+
+ }
+
+ public void printArrayListMap(HashMap<Integer, ArrayList<Integer>> blah) {
+ int amt = 0;
+ for (int a : blah.keySet()) {
+ amt++;
+ MP.print(a + " ::> "); //$NON-NLS-1$
+ for (int c : blah.get(a)) {
+ System.out.print(c + " "); //$NON-NLS-1$
+ }
+ MP.println(""); //$NON-NLS-1$
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public void printMap(Map blah) {
+ int amt = 0;
+ for (Object a : blah.keySet()) {
+ amt++;
+ MP.println(a + " ::> "+blah.get(a)); //$NON-NLS-1$
+ }
+ }
+
+
+
+ /**
+ * Returns the monitor
+ * @return
+ */
+ public IProgressMonitor getMonitor() {
+ return monitor;
+ }
+
+
+ /**
+ * For easier JUnit testing only. Allows public access to run method without scheduling an extra job.
+ *
+ * @param m
+ * @return
+ */
+ public IStatus testRun(IProgressMonitor m) {
+ return run(m);
+ }
+
+
+ public void launchFileDialogError(){
+ SystemTapUIErrorMessages err = new SystemTapUIErrorMessages(
+ Messages.getString("SystemTapParser.2"), //$NON-NLS-1$
+ Messages.getString("SystemTapParser.3"), //$NON-NLS-1$
+ Messages.getString("SystemTapParser.4")+filePath+ //$NON-NLS-1$
+ Messages.getString("SystemTapParser.5")); //$NON-NLS-1$
+ err.schedule();
+ }
+
+ /**
+ * Sets the file to read from
+ * @param filePath
+ */
+ public void setFile(String filePath) {
+ this.filePath = filePath;
+ }
+
+
+ /**
+ * Gets the file to read from
+ * @return
+ */
+ public String getFile() {
+ return filePath;
+ }
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapUIErrorMessages.java b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapUIErrorMessages.java
new file mode 100644
index 0000000000..124820337b
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapUIErrorMessages.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * 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.systemtap.local.core;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.progress.UIJob;
+
+/**
+ * Convenience class for opening an error dialog from a non-UI job.
+ *
+ */
+public class SystemTapUIErrorMessages extends UIJob {
+ private String title, message;
+ private static boolean active = true;
+
+ public SystemTapUIErrorMessages(String name, String title, String message) {
+ super(name);
+ this.title = title;
+ this.message = message;
+ }
+
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ if (!active)
+ return Status.CANCEL_STATUS;
+ //Test that this job is running in the UI thread
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+
+ if (window == null) {
+ return Status.CANCEL_STATUS; //Something is wrong!
+ }
+
+ Shell sh = new Shell();
+
+
+ MessageDialog.openError(sh, title, message);
+ return Status.OK_STATUS;
+ }
+
+
+ public static boolean isActive() {
+ return active;
+ }
+
+ public static void setActive(boolean val) {
+ active = val;
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/messages.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/messages.properties
new file mode 100644
index 0000000000..45f129c881
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/messages.properties
@@ -0,0 +1,38 @@
+FileFinderOpener.FileNotFound1=File not found
+FileFinderOpener.FileNotFound2=Could not find file to open:\n\n
+FileFinderOpener.MultFilesDialogM1=Multiple files found which define a function '
+FileFinderOpener.MultFilesDialogM2='.
+FileFinderOpener.MultFilesDialogM3=Please select a file or files to open
+FileFinderOpener.MultipleFilesDialog=Multiple files found
+###############################################################################
+# 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
+###############################################################################
+FileFinderOpener.FileNotFound=File not found
+SystemTapErrorHandler.4=No recognizable errors detected.
+SystemTapErrorHandler.5=Please consult error log for more information.
+SystemTapErrorHandler.ErrorLogDashes=-----------------------
+SystemTapErrorHandler.ErrorMessage=One or more errors were encountered and logged.
+SystemTapErrorHandler.ErrorMessage1=(Errors -> Open log from the SystemTap View menu).
+SystemTapErrorHandler.ErrorMessage2=Possible causes: \n\n
+SystemTapErrorHandler.ErrorMessageName=Error
+SystemTapErrorHandler.ErrorMessageTitle=Error
+SystemTapErrorHandler.TooManyErrors1=***WARNING*** Cataclysmic failure. Detected
+SystemTapErrorHandler.TooManyErrors2=\ possible faulty probes. Not attempting relaunch.
+SystemTapErrorHandler.TooManyErrors3=Try probing all available files instead - this will also be faster
+SystemTapErrorHandler.TooManyErrors4=as it does not require Eclipse to search for functions.
+SystemTapParser.0=ParseError
+SystemTapParser.1=Unexpected symbol
+SystemTapParser.2=Invalid File Error
+SystemTapParser.3=File Specified Invalid
+SystemTapParser.4=The file :
+SystemTapParser.5=\ could not be rendered. Please make sure the file exists and is valid.
+SystemTapView.31=IO error
+SystemTapView.32=File access error
+SystemTapView.33=Could not access the selected file. This could be because due to a permissions error.
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/systemtap.png b/systemtap/org.eclipse.linuxtools.systemtap.local.core/systemtap.png
new file mode 100644
index 0000000000..d0dc4f5303
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/systemtap.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/systemtapbanner.png b/systemtap/org.eclipse.linuxtools.systemtap.local.core/systemtapbanner.png
new file mode 100644
index 0000000000..c48d634332
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.core/systemtapbanner.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/.classpath
new file mode 100644
index 0000000000..ad32c83a78
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.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/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/.project b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/.project
new file mode 100644
index 0000000000..2c4f7626ca
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.systemtap.local.launch.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/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/.settings/org.eclipse.jdt.core.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..e49768af22
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Mon Sep 21 12:40:52 EDT 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..3d018ceb6f
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Launch and Core Test
+Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.local.launch.tests
+Bundle-Version: 0.0.1.qualifier
+Bundle-Activator: org.eclipse.linuxtools.systemtap.local.launch.tests.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.debug.ui;bundle-version="3.4.1",
+ org.junit;bundle-version="[0.0.0,4.0.0)"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Import-Package: org.eclipse.cdt.core.model,
+ org.eclipse.cdt.internal.core.model,
+ org.eclipse.cdt.launch,
+ org.eclipse.core.resources,
+ org.eclipse.debug.core,
+ org.eclipse.linuxtools.profiling.launch,
+ org.eclipse.linuxtools.profiling.tests,
+ org.eclipse.linuxtools.systemtap.local.core,
+ org.eclipse.linuxtools.systemtap.local.launch
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/build.properties
new file mode 100644
index 0000000000..7937021d7e
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/build.properties
@@ -0,0 +1,16 @@
+###############################################################################
+# 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 = META-INF/,\
+ .,\
+ src/,\
+ resources/
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.cproject b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.cproject
new file mode 100644
index 0000000000..c0cd73664f
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.cproject
@@ -0,0 +1,936 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+
+<cproject>
+<storageModule moduleId="org.eclipse.cdt.core.settings">
+<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.1770452088">
+<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.1770452088" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+<externalSettings/>
+<extensions>
+<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+</extensions>
+</storageModule>
+<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+<configuration artifactName="eag" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.1770452088" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug">
+<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.1770452088." name="/" resourcePath="">
+<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.1442429891" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
+<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.535947733" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
+<builder buildPath="${workspace_loc:/eag/Debug}" id="cdt.managedbuild.target.gnu.builder.exe.debug.1661255968" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
+<tool id="cdt.managedbuild.tool.gnu.archiver.base.225690961" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
+<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.374528198" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
+<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.886738070" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
+<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.1663737825" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
+<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.28775023" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
+</tool>
+<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1832776764" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
+<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.534412024" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
+<option id="gnu.c.compiler.exe.debug.option.debugging.level.1449229527" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
+<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1481141764" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+</tool>
+<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.739464353" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug"/>
+<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.843559057" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
+<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1416890963" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
+<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+<additionalInput kind="additionalinput" paths="$(LIBS)"/>
+</inputType>
+</tool>
+<tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.1550114770" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
+<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1413052230" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+</tool>
+</toolChain>
+</folderInfo>
+<sourceEntries>
+<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+</sourceEntries>
+</configuration>
+</storageModule>
+<storageModule moduleId="scannerConfiguration">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.2027009676;cdt.managedbuild.config.gnu.exe.release.2027009676.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.832705582;cdt.managedbuild.tool.gnu.c.compiler.input.1127782331">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+</scannerConfigBuildInfo>
+<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.2027009676;cdt.managedbuild.config.gnu.exe.release.2027009676.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1081690282;cdt.managedbuild.tool.gnu.cpp.compiler.input.1387572330">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+</scannerConfigBuildInfo>
+<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1770452088;cdt.managedbuild.config.gnu.exe.debug.1770452088.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.374528198;cdt.managedbuild.tool.gnu.cpp.compiler.input.28775023">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+</scannerConfigBuildInfo>
+<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1770452088;cdt.managedbuild.config.gnu.exe.debug.1770452088.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1832776764;cdt.managedbuild.tool.gnu.c.compiler.input.1481141764">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+</scannerConfigBuildInfo>
+</storageModule>
+<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
+</cconfiguration>
+<cconfiguration id="cdt.managedbuild.config.gnu.exe.release.2027009676">
+<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.2027009676" moduleId="org.eclipse.cdt.core.settings" name="Release">
+<externalSettings/>
+<extensions>
+<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+</extensions>
+</storageModule>
+<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+<configuration artifactName="eag" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.release.2027009676" name="Release" parent="cdt.managedbuild.config.gnu.exe.release">
+<folderInfo id="cdt.managedbuild.config.gnu.exe.release.2027009676." name="/" resourcePath="">
+<toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.1386132769" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
+<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.release.1801541583" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.release"/>
+<builder buildPath="${workspace_loc:/eag/Release}" id="cdt.managedbuild.target.gnu.builder.exe.release.1322398833" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.release"/>
+<tool id="cdt.managedbuild.tool.gnu.archiver.base.861618002" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
+<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1081690282" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release">
+<option id="gnu.cpp.compiler.exe.release.option.optimization.level.1242434100" name="Optimization Level" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
+<option id="gnu.cpp.compiler.exe.release.option.debugging.level.1288000062" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
+<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1387572330" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
+</tool>
+<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.832705582" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
+<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.1207253534" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" valueType="enumerated"/>
+<option id="gnu.c.compiler.exe.release.option.debugging.level.2131641039" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
+<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1127782331" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+</tool>
+<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.release.1835444074" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.release"/>
+<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.release.1813279246" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.release">
+<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1312332519" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
+<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+<additionalInput kind="additionalinput" paths="$(LIBS)"/>
+</inputType>
+</tool>
+<tool id="cdt.managedbuild.tool.gnu.assembler.exe.release.32275748" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.release">
+<inputType id="cdt.managedbuild.tool.gnu.assembler.input.2043969971" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+</tool>
+</toolChain>
+</folderInfo>
+<sourceEntries>
+<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+</sourceEntries>
+</configuration>
+</storageModule>
+<storageModule moduleId="scannerConfiguration">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.2027009676;cdt.managedbuild.config.gnu.exe.release.2027009676.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.832705582;cdt.managedbuild.tool.gnu.c.compiler.input.1127782331">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+</scannerConfigBuildInfo>
+<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.2027009676;cdt.managedbuild.config.gnu.exe.release.2027009676.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1081690282;cdt.managedbuild.tool.gnu.cpp.compiler.input.1387572330">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+</scannerConfigBuildInfo>
+<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1770452088;cdt.managedbuild.config.gnu.exe.debug.1770452088.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.374528198;cdt.managedbuild.tool.gnu.cpp.compiler.input.28775023">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+</scannerConfigBuildInfo>
+<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1770452088;cdt.managedbuild.config.gnu.exe.debug.1770452088.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1832776764;cdt.managedbuild.tool.gnu.c.compiler.input.1481141764">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+</scannerConfigBuildInfo>
+</storageModule>
+<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
+</cconfiguration>
+</storageModule>
+<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+<project id="eag.cdt.managedbuild.target.gnu.exe.2013229658" name="Executable" projectType="cdt.managedbuild.target.gnu.exe"/>
+</storageModule>
+</cproject>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.lock b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.lock
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.lock
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.mylyn/repositories.xml.zip b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.mylyn/repositories.xml.zip
new file mode 100644
index 0000000000..1da74ad5ac
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.mylyn/repositories.xml.zip
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.mylyn/tasks.xml.zip b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.mylyn/tasks.xml.zip
new file mode 100644
index 0000000000..b2e87053f0
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.mylyn/tasks.xml.zip
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.history/e4/0056fdb7b8a6001e143aec015f68a927 b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.history/e4/0056fdb7b8a6001e143aec015f68a927
new file mode 100644
index 0000000000..ddf0661f81
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.history/e4/0056fdb7b8a6001e143aec015f68a927
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>CallGraphDemo</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <triggers>clean,full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>?name?</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.append_environment</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+ <value>all</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildArguments</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildCommand</key>
+ <value>make</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildLocation</key>
+ <value>${workspace_loc:/eag/Debug}</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
+ <value>clean</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.contents</key>
+ <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+ <value>false</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableFullBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
+ <value>all</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.stopOnError</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+ <value>true</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ </natures>
+</projectDescription>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.projects/CallGraphDemo/.indexes/history.index b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.projects/CallGraphDemo/.indexes/history.index
new file mode 100644
index 0000000000..818380abdf
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.projects/CallGraphDemo/.indexes/history.index
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.projects/CallGraphDemo/1.tree b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.projects/CallGraphDemo/1.tree
new file mode 100644
index 0000000000..3cb2667db3
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.projects/CallGraphDemo/1.tree
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version
new file mode 100644
index 0000000000..25cb955ba2
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version
@@ -0,0 +1 @@
+ \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index
new file mode 100644
index 0000000000..16ff9e9597
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version
new file mode 100644
index 0000000000..6b2aaa7640
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version
@@ -0,0 +1 @@
+ \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/2.tree b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/2.tree
new file mode 100644
index 0000000000..e24fb8ce7a
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/2.tree
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources
new file mode 100644
index 0000000000..ed1fdda75e
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.collabnet.subversion.merge.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.collabnet.subversion.merge.prefs
new file mode 100644
index 0000000000..be423e0538
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.collabnet.subversion.merge.prefs
@@ -0,0 +1,3 @@
+#Mon Sep 21 10:16:22 EDT 2009
+merge_provider_set=true
+eclipse.preferences.version=1
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000000..57db05de8b
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Sep 21 10:14:45 EDT 2009
+version=1
+eclipse.preferences.version=1
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000000..160c27dee9
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,15 @@
+#Mon Sep 21 10:16:22 EDT 2009
+useQuickDiffPrefPage=true
+proposalOrderMigrated=true
+tabWidthPropagated=true
+content_assist_proposals_background=255,255,255
+org.eclipse.jdt.ui.javadoclocations.migrated=true
+useAnnotationsPrefPage=true
+spelling_locale=en_GB
+org.eclipse.jface.textfont=1|Monospace|10.0|0|GTK|1|;
+org.eclipse.jdt.ui.editor.tab.width=
+org.eclipse.jdt.ui.formatterprofiles.version=11
+spelling_locale_initialized=true
+eclipse.preferences.version=1
+content_assist_proposals_foreground=0,0,0
+fontPropagated=true
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs
new file mode 100644
index 0000000000..34bdce7947
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs
@@ -0,0 +1,3 @@
+#Mon Sep 21 10:11:19 EDT 2009
+eclipse.preferences.version=1
+mylyn.attention.migrated=true
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.cvs.ui.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.cvs.ui.prefs
new file mode 100644
index 0000000000..78f0fac618
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.cvs.ui.prefs
@@ -0,0 +1,3 @@
+#Mon Sep 21 10:16:22 EDT 2009
+pref_first_startup=false
+eclipse.preferences.version=1
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.ui.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.ui.prefs
new file mode 100644
index 0000000000..0e56745009
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.ui.prefs
@@ -0,0 +1,3 @@
+#Mon Sep 21 10:16:22 EDT 2009
+eclipse.preferences.version=1
+org.eclipse.team.ui.first_time=false
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs
new file mode 100644
index 0000000000..1a6f4af78a
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs
@@ -0,0 +1,6 @@
+#Mon Sep 21 10:16:22 EDT 2009
+eclipse.preferences.version=1
+tipsAndTricks=true
+platformState=1251740764806
+quickStart=true
+PROBLEMS_FILTERS_MIGRATE=true
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs
new file mode 100644
index 0000000000..0640ec6132
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs
@@ -0,0 +1,3 @@
+#Mon Sep 21 10:11:19 EDT 2009
+eclipse.preferences.version=1
+showIntro=false
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs
new file mode 100644
index 0000000000..0796a6bf17
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs
@@ -0,0 +1,3 @@
+#Mon Sep 21 10:11:20 EDT 2009
+eclipse.preferences.version=1
+ENABLED_DECORATORS=com.mountainminds.eclemma.ui.coverageDecorator\:false,org.eclipse.cdt.ui.indexedFiles\:false,org.eclipse.jdt.ui.override.decorator\:true,org.eclipse.jdt.ui.interface.decorator\:false,org.eclipse.jdt.ui.buildpath.decorator\:true,org.eclipse.mylyn.context.ui.decorator.interest\:true,org.eclipse.mylyn.tasks.ui.decorators.task\:true,org.eclipse.mylyn.team.ui.changeset.decorator\:true,org.eclipse.pde.ui.binaryProjectDecorator\:false,org.eclipse.team.cvs.ui.decorator\:true,org.eclipse.ui.LinkedResourceDecorator\:true,org.eclipse.ui.ContentTypeDecorator\:true,org.tigris.subversion.subclipse.ui.decorator\:true,
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.tigris.subversion.subclipse.ui.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.tigris.subversion.subclipse.ui.prefs
new file mode 100644
index 0000000000..09afa30861
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.tigris.subversion.subclipse.ui.prefs
@@ -0,0 +1,3 @@
+#Mon Sep 21 10:16:22 EDT 2009
+eclipse.preferences.version=1
+pref_merge_provider=CollabNet Desktop
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache
new file mode 100644
index 0000000000..593f4708db
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat
new file mode 100644
index 0000000000..46ba64d913
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml
new file mode 100644
index 0000000000..a4ee3cbc9a
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<typeInfoHistroy/>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml
new file mode 100644
index 0000000000..9e390f501d
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<qualifiedTypeNameHistroy/>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml
new file mode 100644
index 0000000000..f11bde40cd
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section name="Workbench">
+ <section name="org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart">
+ <item value="true" key="group_libraries"/>
+ <item value="false" key="linkWithEditor"/>
+ <item value="2" key="layout"/>
+ <item value="1" key="rootMode"/>
+ <item value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#x0A;&lt;packageExplorer group_libraries=&quot;1&quot; layout=&quot;2&quot; linkWithEditor=&quot;0&quot; rootMode=&quot;1&quot; workingSetName=&quot;Aggregate for window 1253542278535&quot;&gt;&#x0A;&lt;customFilters userDefinedPatternsEnabled=&quot;false&quot;&gt;&#x0A;&lt;xmlDefinedFilters&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.LibraryFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.LocalTypesFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.StaticsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.pde.ui.ExternalPluginLibrariesFilter1&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ClosedProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonSharedProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonJavaElementFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ContainedLibraryFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.CuAndClassFileFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonJavaProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.EmptyInnerPackageFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.PackageDeclarationFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.EmptyPackageFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ImportDeclarationFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.FieldsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.HideInnerClassFilesFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonPublicFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer_patternFilterId_.*&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.EmptyLibraryContainerFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.pde.ui.BinaryProjectFilter1&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.SyntheticMembersFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.mylyn.java.ui.MembersFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;/xmlDefinedFilters&gt;&#x0A;&lt;/customFilters&gt;&#x0A;&lt;/packageExplorer&gt;" key="memento"/>
+ </section>
+</section>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ltk.ui.refactoring/dialog_settings.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ltk.ui.refactoring/dialog_settings.xml
new file mode 100644
index 0000000000..27eb4040f4
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ltk.ui.refactoring/dialog_settings.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section name="Workbench">
+ <section name="RefactoringWizard.preview">
+ <item value="400" key="height"/>
+ <item value="600" key="width"/>
+ </section>
+</section>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml
new file mode 100644
index 0000000000..eed015db7b
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section name="Workbench">
+ <section name="ExternalProjectImportWizard">
+ <item value="false" key="WizardProjectsImportPage.STORE_ARCHIVE_SELECTED"/>
+ <item value="true" key="WizardProjectsImportPage.STORE_COPY_PROJECT_ID"/>
+ </section>
+</section>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml
new file mode 100644
index 0000000000..5b583c4bea
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section name="Workbench">
+ <section name="ImportExportAction">
+ </section>
+</section>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml
new file mode 100644
index 0000000000..7cc0f30290
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml
@@ -0,0 +1,235 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<workbench progressCount="22" version="2.0">
+<workbenchAdvisor/>
+<window height="768" width="1024" x="0" y="25">
+<fastViewData fastViewLocation="1024"/>
+<perspectiveBar>
+<itemSize x="160"/>
+</perspectiveBar>
+<coolbarLayout locked="0">
+<coolItem id="group.file" itemType="typeGroupMarker"/>
+<coolItem id="org.eclipse.ui.workbench.file" itemType="typeToolBarContribution" x="102" y="28"/>
+<coolItem id="additions" itemType="typeGroupMarker"/>
+<coolItem id="org.eclipse.debug.ui.launchActionSet" itemType="typeToolBarContribution" x="154" y="28"/>
+<coolItem id="org.eclipse.jdt.ui.JavaElementCreationActionSet" itemType="typeToolBarContribution" x="102" y="28"/>
+<coolItem id="org.eclipse.search.searchActionSet" itemType="typeToolBarContribution" x="102" y="28"/>
+<coolItem id="group.nav" itemType="typeGroupMarker"/>
+<coolItem id="org.eclipse.ui.workbench.navigate" itemType="typeToolBarContribution" x="182" y="28"/>
+<coolItem id="group.editor" itemType="typeGroupMarker"/>
+<coolItem id="group.help" itemType="typeGroupMarker"/>
+<coolItem id="org.eclipse.ui.workbench.help" itemType="typeToolBarContribution" x="-1" y="-1"/>
+</coolbarLayout>
+<page aggregateWorkingSetId="Aggregate for window 1253542278535" focus="true" label="Workspace - Java">
+<editors>
+<editorArea activeWorkbook="DefaultEditorWorkbook">
+<info part="DefaultEditorWorkbook">
+<folder appearance="1" expanded="2">
+<presentation id="org.eclipse.ui.presentations.WorkbenchPresentationFactory"/>
+</folder>
+</info>
+</editorArea>
+</editors>
+<views>
+<view id="org.eclipse.jdt.ui.TypeHierarchy" partName="Hierarchy"/>
+<view id="org.eclipse.ui.views.ProblemView" partName="Problems">
+<viewState PRIMARY_SORT_FIELD="org.eclipse.ui.ide.severityAndDescriptionField" categoryGroup="org.eclipse.ui.ide.severity" markerContentGenerator="org.eclipse.ui.ide.problemsGenerator" partName="Problems">
+<columnWidths org.eclipse.ui.ide.locationField="73" org.eclipse.ui.ide.markerType="108" org.eclipse.ui.ide.pathField="143" org.eclipse.ui.ide.resourceField="108" org.eclipse.ui.ide.severityAndDescriptionField="350"/>
+<visible IMemento.internal.id="org.eclipse.ui.ide.severityAndDescriptionField"/>
+<visible IMemento.internal.id="org.eclipse.ui.ide.resourceField"/>
+<visible IMemento.internal.id="org.eclipse.ui.ide.pathField"/>
+<visible IMemento.internal.id="org.eclipse.ui.ide.locationField"/>
+<visible IMemento.internal.id="org.eclipse.ui.ide.markerType"/>
+</viewState>
+</view>
+<view id="org.eclipse.jdt.ui.PackageExplorer" partName="Package Explorer">
+<viewState group_libraries="1" layout="2" linkWithEditor="0" rootMode="1" workingSetName="Aggregate for window 1253542278535">
+<customFilters userDefinedPatternsEnabled="false">
+<xmlDefinedFilters>
+<child filterId="org.eclipse.jdt.ui.PackageExplorer.LibraryFilter" isEnabled="false"/>
+<child filterId="org.eclipse.jdt.ui.PackageExplorer.LocalTypesFilter" isEnabled="false"/>
+<child filterId="org.eclipse.jdt.ui.PackageExplorer.StaticsFilter" isEnabled="false"/>
+<child filterId="org.eclipse.pde.ui.ExternalPluginLibrariesFilter1" isEnabled="true"/>
+<child filterId="org.eclipse.jdt.ui.PackageExplorer.ClosedProjectsFilter" isEnabled="false"/>
+<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonSharedProjectsFilter" isEnabled="false"/>
+<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonJavaElementFilter" isEnabled="false"/>
+<child filterId="org.eclipse.jdt.ui.PackageExplorer.ContainedLibraryFilter" isEnabled="false"/>
+<child filterId="org.eclipse.jdt.ui.PackageExplorer.CuAndClassFileFilter" isEnabled="false"/>
+<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonJavaProjectsFilter" isEnabled="false"/>
+<child filterId="org.eclipse.jdt.internal.ui.PackageExplorer.EmptyInnerPackageFilter" isEnabled="true"/>
+<child filterId="org.eclipse.jdt.ui.PackageExplorer.PackageDeclarationFilter" isEnabled="true"/>
+<child filterId="org.eclipse.jdt.internal.ui.PackageExplorer.EmptyPackageFilter" isEnabled="false"/>
+<child filterId="org.eclipse.jdt.ui.PackageExplorer.ImportDeclarationFilter" isEnabled="true"/>
+<child filterId="org.eclipse.jdt.ui.PackageExplorer.FieldsFilter" isEnabled="false"/>
+<child filterId="org.eclipse.jdt.internal.ui.PackageExplorer.HideInnerClassFilesFilter" isEnabled="true"/>
+<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonPublicFilter" isEnabled="false"/>
+<child filterId="org.eclipse.jdt.ui.PackageExplorer_patternFilterId_.*" isEnabled="true"/>
+<child filterId="org.eclipse.jdt.ui.PackageExplorer.EmptyLibraryContainerFilter" isEnabled="true"/>
+<child filterId="org.eclipse.pde.ui.BinaryProjectFilter1" isEnabled="false"/>
+<child filterId="org.eclipse.jdt.ui.PackageExplorer.SyntheticMembersFilter" isEnabled="true"/>
+<child filterId="org.eclipse.mylyn.java.ui.MembersFilter" isEnabled="false"/>
+</xmlDefinedFilters>
+</customFilters>
+</viewState>
+</view>
+<view id="org.eclipse.mylyn.tasks.ui.views.tasks" partName="Task List">
+<viewState linkWithEditor="true" presentation="org.eclipse.mylyn.tasks.ui.categorized">
+<sorter groupBy="CATEGORY_QUERY">
+<sorter>
+<sort0 sortDirection="1" sortKey="PRIORITY"/>
+<sort1 sortDirection="1" sortKey="DATE_CREATED"/>
+<sort2 sortDirection="1" sortKey="NONE"/>
+<sort3 sortDirection="1" sortKey="NONE"/>
+</sorter>
+</sorter>
+</viewState>
+</view>
+<view id="org.eclipse.ui.views.ContentOutline" partName="Outline">
+<viewState/>
+</view>
+<view id="org.eclipse.jdt.ui.SourceView" partName="Declaration"/>
+<view id="org.eclipse.jdt.ui.JavadocView" partName="Javadoc"/>
+</views>
+<perspectives activePart="org.eclipse.jdt.ui.PackageExplorer" activePerspective="org.eclipse.jdt.ui.JavaPerspective">
+<perspective editorAreaTrimState="2" editorAreaVisible="1" fixed="0" version="0.016">
+<descriptor class="org.eclipse.jdt.internal.ui.JavaPerspectiveFactory" id="org.eclipse.jdt.ui.JavaPerspective" label="Java"/>
+<alwaysOnActionSet id="org.eclipse.ui.cheatsheets.actionSet"/>
+<alwaysOnActionSet id="org.eclipse.search.searchActionSet"/>
+<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.annotationNavigation"/>
+<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.navigation"/>
+<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo"/>
+<alwaysOnActionSet id="org.eclipse.ui.externaltools.ExternalToolsSet"/>
+<alwaysOnActionSet id="org.eclipse.ui.actionSet.keyBindings"/>
+<alwaysOnActionSet id="org.eclipse.ui.actionSet.openFiles"/>
+<alwaysOnActionSet id="org.eclipse.mylyn.context.ui.actionSet"/>
+<alwaysOnActionSet id="org.eclipse.mylyn.doc.actionSet"/>
+<alwaysOnActionSet id="org.eclipse.mylyn.tasks.ui.navigation"/>
+<alwaysOnActionSet id="org.eclipse.debug.ui.launchActionSet"/>
+<alwaysOnActionSet id="org.eclipse.jdt.ui.JavaActionSet"/>
+<alwaysOnActionSet id="org.eclipse.jdt.ui.JavaElementCreationActionSet"/>
+<alwaysOnActionSet id="org.eclipse.ui.NavigateActionSet"/>
+<alwaysOnActionSet id="com.mountainminds.eclemma.ui.CoverageActionSet"/>
+<alwaysOnActionSet id="org.eclipse.debug.ui.breakpointActionSet"/>
+<alwaysOnActionSet id="org.eclipse.jdt.debug.ui.JDTDebugActionSet"/>
+<alwaysOnActionSet id="org.eclipse.jdt.junit.JUnitActionSet"/>
+<show_view_action id="org.eclipse.jdt.ui.PackageExplorer"/>
+<show_view_action id="org.eclipse.jdt.ui.TypeHierarchy"/>
+<show_view_action id="org.eclipse.jdt.ui.SourceView"/>
+<show_view_action id="org.eclipse.jdt.ui.JavadocView"/>
+<show_view_action id="org.eclipse.search.ui.views.SearchView"/>
+<show_view_action id="org.eclipse.ui.console.ConsoleView"/>
+<show_view_action id="org.eclipse.ui.views.ContentOutline"/>
+<show_view_action id="org.eclipse.ui.views.ProblemView"/>
+<show_view_action id="org.eclipse.ui.views.ResourceNavigator"/>
+<show_view_action id="org.eclipse.ui.views.TaskList"/>
+<show_view_action id="org.eclipse.ui.views.ProgressView"/>
+<show_view_action id="org.eclipse.ui.navigator.ProjectExplorer"/>
+<show_view_action id="org.eclipse.ui.texteditor.TemplatesView"/>
+<show_view_action id="org.eclipse.ant.ui.views.AntView"/>
+<show_view_action id="org.eclipse.pde.runtime.LogView"/>
+<show_view_action id="org.eclipse.mylyn.tasks.ui.views.tasks"/>
+<new_wizard_action id="org.eclipse.jdt.ui.wizards.JavaProjectWizard"/>
+<new_wizard_action id="org.eclipse.jdt.ui.wizards.NewPackageCreationWizard"/>
+<new_wizard_action id="org.eclipse.jdt.ui.wizards.NewClassCreationWizard"/>
+<new_wizard_action id="org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard"/>
+<new_wizard_action id="org.eclipse.jdt.ui.wizards.NewEnumCreationWizard"/>
+<new_wizard_action id="org.eclipse.jdt.ui.wizards.NewAnnotationCreationWizard"/>
+<new_wizard_action id="org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard"/>
+<new_wizard_action id="org.eclipse.jdt.ui.wizards.NewSnippetFileCreationWizard"/>
+<new_wizard_action id="org.eclipse.jdt.ui.wizards.NewJavaWorkingSetWizard"/>
+<new_wizard_action id="org.eclipse.ui.wizards.new.folder"/>
+<new_wizard_action id="org.eclipse.ui.wizards.new.file"/>
+<new_wizard_action id="org.eclipse.ui.editors.wizards.UntitledTextFileWizard"/>
+<new_wizard_action id="org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizard"/>
+<new_wizard_action id="org.eclipse.mylyn.tasks.ui.wizards.new.repository.task"/>
+<perspective_action id="org.eclipse.debug.ui.DebugPerspective"/>
+<perspective_action id="org.eclipse.jdt.ui.JavaBrowsingPerspective"/>
+<hide_toolbar_item_id id="org.eclipse.ui.edit.text.toggleShowSelectedElementOnly"/>
+<view id="org.eclipse.jdt.ui.PackageExplorer"/>
+<view id="org.eclipse.jdt.ui.TypeHierarchy"/>
+<view id="org.eclipse.ui.views.ProblemView"/>
+<view id="org.eclipse.jdt.ui.JavadocView"/>
+<view id="org.eclipse.jdt.ui.SourceView"/>
+<view id="org.eclipse.ui.views.ContentOutline"/>
+<view id="org.eclipse.mylyn.tasks.ui.views.tasks"/>
+<fastViewBars/>
+<layout>
+<mainWindow>
+<info folder="true" part="left">
+<folder activePageID="org.eclipse.jdt.ui.PackageExplorer" appearance="2" expanded="2">
+<page content="org.eclipse.jdt.ui.PackageExplorer" label="Package Explorer"/>
+<page content="org.eclipse.jdt.ui.TypeHierarchy" label="Hierarchy"/>
+<page content="org.eclipse.ui.views.ResourceNavigator" label="LabelNotFound"/>
+<page content="org.eclipse.ui.navigator.ProjectExplorer" label="LabelNotFound"/>
+<page content="org.eclipse.jdt.junit.ResultView" label="LabelNotFound"/>
+<presentation id="org.eclipse.ui.presentations.WorkbenchPresentationFactory">
+<part id="0"/>
+<part id="1"/>
+</presentation>
+</folder>
+</info>
+<info folder="true" part="org.eclipse.ui.internal.ViewStack@498b5a73" ratio="0.7495049" ratioLeft="757" ratioRight="253" relationship="2" relative="left">
+<folder appearance="2" expanded="2">
+<page content="org.eclipse.help.ui.HelpView" label="LabelNotFound"/>
+<page content="org.eclipse.ui.internal.introview" label="LabelNotFound"/>
+<page content="org.eclipse.ui.cheatsheets.views.CheatSheetView" label="LabelNotFound"/>
+<presentation id="org.eclipse.ui.presentations.WorkbenchPresentationFactory"/>
+</folder>
+</info>
+<info part="org.eclipse.ui.editorss" ratio="0.24950495" ratioLeft="252" ratioRight="758" relationship="2" relative="left"/>
+<info folder="true" part="bottom" ratio="0.75" ratioLeft="480" ratioRight="160" relationship="4" relative="org.eclipse.ui.editorss">
+<folder activePageID="org.eclipse.ui.views.ProblemView" appearance="2" expanded="2">
+<page content="org.eclipse.ui.views.ProblemView" label="Problems"/>
+<page content="org.eclipse.jdt.ui.JavadocView" label="Javadoc"/>
+<page content="org.eclipse.jdt.ui.SourceView" label="Declaration"/>
+<page content="org.eclipse.search.ui.views.SearchView" label="LabelNotFound"/>
+<page content="org.eclipse.ui.console.ConsoleView" label="LabelNotFound"/>
+<page content="org.eclipse.ui.views.BookmarkView" label="LabelNotFound"/>
+<page content="org.eclipse.ui.views.ProgressView" label="LabelNotFound"/>
+<presentation id="org.eclipse.ui.presentations.WorkbenchPresentationFactory">
+<part id="0"/>
+<part id="1"/>
+<part id="2"/>
+</presentation>
+</folder>
+</info>
+<info folder="true" part="org.eclipse.ui.internal.ViewStack@6b482747" ratio="0.74934036" ratioLeft="568" ratioRight="190" relationship="2" relative="org.eclipse.ui.editorss">
+<folder activePageID="org.eclipse.mylyn.tasks.ui.views.tasks" appearance="2" expanded="2">
+<page content="org.eclipse.mylyn.tasks.ui.views.tasks" label="Task List"/>
+<presentation id="org.eclipse.ui.presentations.WorkbenchPresentationFactory">
+<part id="0"/>
+</presentation>
+</folder>
+</info>
+<info folder="true" part="right" ratio="0.5" ratioLeft="240" ratioRight="240" relationship="4" relative="org.eclipse.ui.internal.ViewStack@6b482747">
+<folder activePageID="org.eclipse.ui.views.ContentOutline" appearance="2" expanded="2">
+<page content="org.eclipse.ui.views.ContentOutline" label="Outline"/>
+<page content="org.eclipse.ui.texteditor.TemplatesView" label="LabelNotFound"/>
+<page content="org.eclipse.ant.ui.views.AntView" label="LabelNotFound"/>
+<presentation id="org.eclipse.ui.presentations.WorkbenchPresentationFactory">
+<part id="0"/>
+</presentation>
+</folder>
+</info>
+</mainWindow>
+</layout>
+</perspective>
+</perspectives>
+<workingSets/>
+<navigationHistory/>
+<input factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/" type="8"/>
+</page>
+<workbenchWindowAdvisor/>
+<actionBarAdvisor/>
+<trimLayout>
+<trimArea IMemento.internal.id="128">
+<trimItem IMemento.internal.id="org.eclipse.ui.internal.WorkbenchWindow.topBar"/>
+</trimArea>
+<trimArea IMemento.internal.id="1024">
+<trimItem IMemento.internal.id="org.eclise.ui.internal.FastViewBar"/>
+<trimItem IMemento.internal.id="org.eclipse.jface.action.StatusLineManager"/>
+<trimItem IMemento.internal.id="org.eclipse.ui.internal.progress.ProgressRegion"/>
+</trimArea>
+</trimLayout>
+</window>
+<mruList/>
+</workbench> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml
new file mode 100644
index 0000000000..eb836ca8bc
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<workingSetManager>
+<workingSet aggregate="true" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1253542278536_0" label="Window Working Set" name="Aggregate for window 1253542278535"/>
+</workingSetManager> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/version.ini b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/version.ini
new file mode 100644
index 0000000000..c51ff745b6
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/version.ini
@@ -0,0 +1 @@
+org.eclipse.core.runtime=1 \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.project b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.project
new file mode 100644
index 0000000000..ddf0661f81
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.project
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>CallGraphDemo</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <triggers>clean,full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>?name?</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.append_environment</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+ <value>all</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildArguments</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildCommand</key>
+ <value>make</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildLocation</key>
+ <value>${workspace_loc:/eag/Debug}</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
+ <value>clean</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.contents</key>
+ <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+ <value>false</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableFullBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
+ <value>all</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.stopOnError</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+ <value>true</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ </natures>
+</projectDescription>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/.cproject b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/.cproject
new file mode 100644
index 0000000000..c138c118e2
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/.cproject
@@ -0,0 +1,593 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+
+<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+<storageModule moduleId="org.eclipse.cdt.core.settings">
+<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.2135562020">
+<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.2135562020" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+<externalSettings/>
+<extensions>
+<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+</extensions>
+</storageModule>
+<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+<configuration artifactName="basicTest" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.2135562020" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug">
+<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.2135562020." name="/" resourcePath="">
+<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.101516407" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
+<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.87652736" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
+<builder buildPath="${workspace_loc:/basicTest/Debug}" id="cdt.managedbuild.target.gnu.builder.exe.debug.711674383" managedBuildOn="true" name="Gnu Make Builder.Debug" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
+<tool id="cdt.managedbuild.tool.gnu.archiver.base.584252080" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
+<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.942952139" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
+<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.1710669157" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
+<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.943190718" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
+</tool>
+<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.2114875696" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
+<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.442592240" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
+<option id="gnu.c.compiler.exe.debug.option.debugging.level.1038207667" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
+<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1588134977" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+</tool>
+<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.690432365" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug">
+<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.710576397" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
+<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+<additionalInput kind="additionalinput" paths="$(LIBS)"/>
+</inputType>
+</tool>
+<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.1855294342" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug"/>
+<tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.404150272" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
+<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1440186503" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+</tool>
+</toolChain>
+</folderInfo>
+</configuration>
+</storageModule>
+<storageModule moduleId="scannerConfiguration">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.2135562020;cdt.managedbuild.config.gnu.exe.debug.2135562020.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.2114875696;cdt.managedbuild.tool.gnu.c.compiler.input.1588134977">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+</scannerConfigBuildInfo>
+<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.1817975882;cdt.managedbuild.config.gnu.exe.release.1817975882.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.444073320;cdt.managedbuild.tool.gnu.c.compiler.input.797024236">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+</scannerConfigBuildInfo>
+</storageModule>
+<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+</cconfiguration>
+<cconfiguration id="cdt.managedbuild.config.gnu.exe.release.1817975882">
+<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.1817975882" moduleId="org.eclipse.cdt.core.settings" name="Release">
+<externalSettings/>
+<extensions>
+<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+</extensions>
+</storageModule>
+<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+<configuration artifactName="basicTest" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.release.1817975882" name="Release" parent="cdt.managedbuild.config.gnu.exe.release">
+<folderInfo id="cdt.managedbuild.config.gnu.exe.release.1817975882." name="/" resourcePath="">
+<toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.638749964" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
+<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.release.93931152" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.release"/>
+<builder buildPath="${workspace_loc:/basicTest/Release}" id="cdt.managedbuild.target.gnu.builder.exe.release.1459250839" managedBuildOn="true" name="Gnu Make Builder.Release" superClass="cdt.managedbuild.target.gnu.builder.exe.release"/>
+<tool id="cdt.managedbuild.tool.gnu.archiver.base.1811684256" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
+<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1303850239" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release">
+<option id="gnu.cpp.compiler.exe.release.option.optimization.level.2129950917" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
+<option id="gnu.cpp.compiler.exe.release.option.debugging.level.937916202" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
+</tool>
+<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.444073320" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
+<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.1535551833" superClass="gnu.c.compiler.exe.release.option.optimization.level" valueType="enumerated"/>
+<option id="gnu.c.compiler.exe.release.option.debugging.level.786094264" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
+<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.797024236" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+</tool>
+<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.release.1554906730" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.release">
+<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.320125291" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
+<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+<additionalInput kind="additionalinput" paths="$(LIBS)"/>
+</inputType>
+</tool>
+<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.release.1861740149" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.release"/>
+<tool id="cdt.managedbuild.tool.gnu.assembler.exe.release.800688609" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.release">
+<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1339981349" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+</tool>
+</toolChain>
+</folderInfo>
+</configuration>
+</storageModule>
+<storageModule moduleId="scannerConfiguration">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.2135562020;cdt.managedbuild.config.gnu.exe.debug.2135562020.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.2114875696;cdt.managedbuild.tool.gnu.c.compiler.input.1588134977">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+</scannerConfigBuildInfo>
+<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.1817975882;cdt.managedbuild.config.gnu.exe.release.1817975882.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.444073320;cdt.managedbuild.tool.gnu.c.compiler.input.797024236">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+</scannerConfigBuildInfo>
+</storageModule>
+</cconfiguration>
+</storageModule>
+<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+<project id="basicTest.cdt.managedbuild.target.gnu.exe.495188798" name="Executable" projectType="cdt.managedbuild.target.gnu.exe"/>
+</storageModule>
+</cproject>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/.project b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/.project
new file mode 100644
index 0000000000..3ac0878e85
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/.project
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>basicTest</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <triggers>clean,full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>?name?</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.append_environment</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+ <value>all</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildArguments</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildCommand</key>
+ <value>make</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildLocation</key>
+ <value>${workspace_loc:/basicTest/Debug}</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
+ <value>clean</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.contents</key>
+ <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+ <value>false</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableFullBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
+ <value>all</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.stopOnError</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+ <value>true</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ </natures>
+</projectDescription>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/main.c b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/main.c
new file mode 100644
index 0000000000..c8fafdd2a9
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/main.c
@@ -0,0 +1,25 @@
+/*
+ * main.c
+ *
+ * Created on: 2009-09-21
+ * Author: chwang
+ */
+#include <stdio.h>
+
+
+void calledOnce() {
+ printf("Called\n");
+}
+
+void calledTwice() {
+ printf("Double\n");
+}
+
+int main() {
+ printf("Done\n");
+ calledOnce();
+ calledTwice();
+ calledTwice();
+ return 0;
+}
+
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/uncalled.c b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/uncalled.c
new file mode 100644
index 0000000000..e99430a11d
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/uncalled.c
@@ -0,0 +1,3 @@
+void doNothing() {
+ return;
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/AbstractStapTest.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/AbstractStapTest.java
new file mode 100644
index 0000000000..3672cb3588
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/AbstractStapTest.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * 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.systemtap.local.launch.tests;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.eclipse.linuxtools.profiling.tests.AbstractTest;
+import org.eclipse.linuxtools.systemtap.local.core.PluginConstants;
+import org.eclipse.linuxtools.systemtap.local.launch.SystemTapOptionsTab;
+import org.osgi.framework.Bundle;
+
+public abstract class AbstractStapTest extends AbstractTest {
+ protected ICProject proj;
+
+ @Override
+ protected ILaunchConfigurationType getLaunchConfigType() {
+ return getLaunchManager().getLaunchConfigurationType(PluginConstants.CONFIGURATION_TYPE_ID);
+ }
+
+ @Override
+ protected void setProfileAttributes(ILaunchConfigurationWorkingCopy wc)
+ throws CoreException {
+ ILaunchConfigurationTab tab = new SystemTapOptionsTab();
+ tab.setDefaults(wc);
+ }
+
+
+ protected ICProject createProjectAndBuild(String projname) throws Exception {
+ return createProjectAndBuild(getBundle(), projname);
+ }
+
+ protected abstract Bundle getBundle();
+
+ private List<ILaunch> launches;
+
+ @Override
+ protected void setUp() throws Exception {
+ launches = new ArrayList<ILaunch>();
+
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ if (launches.size() > 0) {
+ DebugPlugin.getDefault().getLaunchManager().removeLaunches(launches.toArray(new ILaunch[launches.size()]));
+ launches.clear();
+ }
+ super.tearDown();
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/Activator.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/Activator.java
new file mode 100644
index 0000000000..b19f0a66f5
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/Activator.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * 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.systemtap.local.launch.tests;
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.systemtap.tests";
+ public static String PLUGIN_LOCATION;
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ PLUGIN_LOCATION = getPluginLocation();
+
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ 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;
+ }
+
+
+ public String getPluginLocation() {
+ Bundle bundle = getBundle();
+
+ URL locationUrl = FileLocator.find(bundle,new Path("/"), null); //$NON-NLS-1$
+ URL fileUrl = null;
+ try {
+ fileUrl = FileLocator.toFileURL(locationUrl);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return fileUrl.getFile();
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/AllTests.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/AllTests.java
new file mode 100644
index 0000000000..7bf687edee
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/AllTests.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * 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.systemtap.local.launch.tests;
+
+//import org.eclipse.jface.dialogs.MessageDialog;
+//import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.linuxtools.systemtap.local.core.SystemTapUIErrorMessages;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllTests {
+
+ public static Test suite() {
+
+ SystemTapUIErrorMessages.setActive(false);
+
+ TestSuite suite = new TestSuite(
+ "Test for org.eclipse.linuxtools.systemtap.local.launch.tests");
+ //$JUnit-BEGIN$
+ suite.addTestSuite(SystemTapCommandTest.class);
+ suite.addTestSuite(ConfigurationTest.class);
+ suite.addTestSuite(SystemTapCommandGeneratorTest.class);
+ if (TestConstants.canRunStap)
+ suite.addTestSuite(SystemTapCommandLineTest.class);
+ suite.addTestSuite(SystemTapTabTest.class);
+ suite.addTestSuite(LaunchShortcutsTest.class);
+ //$JUnit-END$
+ return suite;
+ }
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/ConfigurationTest.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/ConfigurationTest.java
new file mode 100644
index 0000000000..aa25639917
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/ConfigurationTest.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.systemtap.local.launch.tests;
+
+import java.io.IOException;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.linuxtools.systemtap.local.core.LaunchConfigurationConstants;
+import org.eclipse.linuxtools.systemtap.local.launch.SystemTapLaunchConfigurationDelegate;
+import org.eclipse.linuxtools.systemtap.local.launch.SystemTapLaunchShortcut;
+
+public class ConfigurationTest extends TestCase{
+
+
+ /**
+ * This test checks if the commands sent by SystemTap match exactly the options
+ * that are set. Uses the delegate.launch() function.
+ *
+ * Activates all options!
+ */
+ public void testConfig() {
+
+ System.out.println("\n\nLaunching ConfigurationTest\n");
+ SystemTapLaunchShortcut shortcut = new SystemTapLaunchShortcut();
+
+ try {
+ String testCDirectives = "-DRandomjunk -DMoreJunk";
+ String testOutputPath = "/tmp/ThisFileDoesNothingDeleteIt";
+ String testBinaryPath = "More random junk";
+ String testScriptPath = "/tmp/NotAScriptFile.stp";
+ String testArguments = "Nonexistent Arguments";
+ int testPid = 413;
+ int testBuffer = 100;
+ int testPass = 10;
+
+ ILaunchConfiguration config = shortcut.outsideGetLaunchConfigType().newInstance(null, "Temp name");
+ ILaunchConfigurationWorkingCopy wc = config.copy("Testing configuration");
+
+ wc.setAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE, true);
+ wc.setAttribute(LaunchConfigurationConstants.COMMAND_KEEP_TEMPORARY, true);
+ wc.setAttribute(LaunchConfigurationConstants.COMMAND_GURU, true);
+ wc.setAttribute(LaunchConfigurationConstants.COMMAND_PROLOGUE_SEARCH, true);
+ wc.setAttribute(LaunchConfigurationConstants.COMMAND_NO_CODE_ELISION, true);
+ wc.setAttribute(LaunchConfigurationConstants.COMMAND_DISABLE_WARNINGS, true);
+ wc.setAttribute(LaunchConfigurationConstants.COMMAND_BULK_MODE, true);
+ wc.setAttribute(LaunchConfigurationConstants.COMMAND_TIMING_INFO, true);
+ wc.setAttribute(LaunchConfigurationConstants.COMMAND_SKIP_BADVARS, true);
+ wc.setAttribute(LaunchConfigurationConstants.COMMAND_IGNORE_DWARF, true);
+ wc.setAttribute(LaunchConfigurationConstants.COMMAND_TAPSET_COVERAGE, true);
+ wc.setAttribute(LaunchConfigurationConstants.COMMAND_LEAVE_RUNNING, true);
+ wc.setAttribute(LaunchConfigurationConstants.COMMAND_PASS,testPass);
+ wc.setAttribute(LaunchConfigurationConstants.COMMAND_BUFFER_BYTES,testBuffer);
+ wc.setAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID,testPid);
+
+
+
+ wc.setAttribute(LaunchConfigurationConstants.COMMAND_C_DIRECTIVES, testCDirectives);
+ wc.setAttribute(LaunchConfigurationConstants.BINARY_PATH, testBinaryPath);
+ wc.setAttribute(LaunchConfigurationConstants.SCRIPT_PATH, testScriptPath);
+ wc.setAttribute(LaunchConfigurationConstants.ARGUMENTS, testArguments);
+ wc.setAttribute(LaunchConfigurationConstants.OUTPUT_PATH, testOutputPath);
+
+ config = wc.doSave();
+
+ SystemTapLaunchConfigurationDelegate del = new SystemTapLaunchConfigurationDelegate();
+ del.launch(config, "profile", null, null);
+
+ System.out.println(del.getCommand());
+
+ assertEquals("stap -v -p" + testPass + " -k -g -P -u -w -b -t -s"
+ + testBuffer + " -x" + testPid + " "
+ + testCDirectives + " -F --skip-badvars --ignore-dwarf -q " + "-o "
+ + testOutputPath + " -c '"
+ + testBinaryPath + "' " + testScriptPath + " " + testArguments, del.getCommand());
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+
+ killStap();
+ }
+
+ public void killStap() {
+ Runtime run = Runtime.getRuntime();
+ try {
+ run.exec("kill stap");
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/LaunchShortcutsTest.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/LaunchShortcutsTest.java
new file mode 100644
index 0000000000..381f111ac1
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/LaunchShortcutsTest.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * 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.systemtap.local.launch.tests;
+
+import org.eclipse.cdt.core.model.IBinary;
+import org.eclipse.linuxtools.systemtap.local.core.SystemTapUIErrorMessages;
+import org.eclipse.linuxtools.systemtap.local.launch.LaunchStapGraph;
+import org.osgi.framework.Bundle;
+
+
+
+
+public class LaunchShortcutsTest extends AbstractStapTest{
+
+ /**
+ * Checks that the scripts are correct/exist and that the expected
+ * command is sent.
+ */
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ proj = createProjectAndBuild("basicTest"); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ deleteProject(proj);
+ super.tearDown();
+ }
+
+
+ public void testLaunchCallGraph() {
+ try {
+ SystemTapUIErrorMessages.setActive(false);
+
+ LaunchStapGraph launch = new LaunchStapGraph();
+ launch.setTestMode(true);
+
+ IBinary bin = proj.getBinaryContainer().getBinaries()[0];
+ launch.launch(bin, "profile");
+ String script = launch.getScript();
+ System.out.println(script);
+
+ assert(script.contains("probe process(@1).function(\"calledOnce\").call{ callFunction(probefunc()) } probe process(@1).function(\"calledOnce\").return{ returnFunction(probefunc()) }"));
+ assert(script.contains("probe process(@1).function(\"calledTwice\").call{ callFunction(probefunc()) } probe process(@1).function(\"calledTwice\").return{ returnFunction(probefunc()) }"));
+ assert(script.contains("probe process(@1).function(\"main\").call{ callFunction(probefunc()) } probe process(@1).function(\"main\").return{ returnFunction(probefunc()) }"));
+
+
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Override
+ protected Bundle getBundle() {
+ return Activator.getDefault().getBundle();
+ }
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapCommandGeneratorTest.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapCommandGeneratorTest.java
new file mode 100644
index 0000000000..bf276df325
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapCommandGeneratorTest.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * 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.systemtap.local.launch.tests;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.linuxtools.systemtap.local.core.SystemTapCommandGenerator;
+
+import junit.framework.TestCase;
+
+public class SystemTapCommandGeneratorTest extends TestCase{
+
+ //HACK TO GET THE PATH TO THE TESTING PROJECT
+ File file = new File("");
+ private String location = file.getAbsolutePath() + "/";
+ SystemTapCommandGenerator stapgen = new SystemTapCommandGenerator();
+
+ public void testExecutionWithScriptAndBinaryAndArgument(){
+
+ System.out.println("\n\nLaunching SystemTapCommandGeneratorTest\n");
+ String binaryFilePath = location + "factorial";
+ String scriptPath = location + "function_count.stp";
+
+ //RUN
+ stapgen
+ .generateCommand(
+ scriptPath,
+ binaryFilePath,
+ "",
+ true,
+ true,
+ binaryFilePath, "");
+
+ assertEquals(
+ "stap -c '"+binaryFilePath+"' "+scriptPath+ " " +binaryFilePath,
+ stapgen.getExecuteCommand());
+ killStap();
+ //END
+ }
+
+ public void testScriptExecution(){
+
+ String scriptPath = location + "simple.stp";
+
+ //RUN
+ stapgen
+ .generateCommand(
+ scriptPath,
+ "",
+ "",
+ false,
+ false,
+ "", "");
+
+ assertEquals(
+ "stap "+scriptPath,
+ stapgen.getExecuteCommand());
+ //END
+ }
+
+ public void testExecutionWithScriptAndBinary() {
+
+ // RUN
+ String binaryFilePath = location + "factorial";
+ String scriptPath = location + "allsyscall.stp";
+
+ stapgen.generateCommand(scriptPath, binaryFilePath, "", true, false, "", "");
+
+ assertEquals("stap -c '" + binaryFilePath + "' " + scriptPath, stapgen
+ .getExecuteCommand());
+ // END
+
+ killStap();
+ }
+
+
+ public void killStap() {
+ Runtime run = Runtime.getRuntime();
+ try {
+ run.exec("kill stap");
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapCommandLineTest.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapCommandLineTest.java
new file mode 100644
index 0000000000..7f6a741031
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapCommandLineTest.java
@@ -0,0 +1,172 @@
+/*******************************************************************************
+ * 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.systemtap.local.launch.tests;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.linuxtools.systemtap.local.core.LaunchConfigurationConstants;
+import org.eclipse.linuxtools.systemtap.local.launch.SystemTapLaunchShortcut;
+
+import junit.framework.TestCase;
+
+public class SystemTapCommandLineTest extends TestCase {
+ File tmpfile = new File("");
+ public final String currentPath = tmpfile.getAbsolutePath();
+
+ public String stapCommand;
+ public final String scriptPath = currentPath+"/stapscript";
+ public String binaryPath = "";
+ public final String graphDataPath = currentPath+"/graph_data_output.graph";
+ public final String parseFunctionPath = currentPath+"/parse_function_nomark.stp";
+
+
+
+
+ //FOR TESTING RAW STAP SCRIPT OUTPUT
+ public String getCommandOutput(String command, boolean needsBinary){
+ Runtime rt = Runtime.getRuntime();
+ try {
+ //CREATE/ACCESS A TEMPORARY FILE TO HOLD THE SCRIPT
+ File file = new File(scriptPath);
+ file.createNewFile();
+
+ //WRITE THE COMMAND TO THE FILE
+ BufferedWriter wbuff = new BufferedWriter(new FileWriter(file));
+ wbuff.write(command);
+ wbuff.close();
+
+ //EXECUTE THE COMMAND
+ Process pr = null;
+ rt.exec("kill stap");
+ if (needsBinary){
+ pr = rt.exec("stap -c '"+binaryPath+ "' "+ scriptPath + " " + binaryPath);
+ }else{
+ pr = rt.exec("stap "+scriptPath);
+ }
+ pr.waitFor();
+
+ InputStream inpstr = pr.getInputStream();
+ BufferedReader rbuff = new BufferedReader (new InputStreamReader(inpstr));
+ String line = "";
+ String text = "";
+
+ //READ THE STANDARD OUTPUT OF COMMAND
+ while ((line = rbuff.readLine()) != null){
+ text += line;
+ }
+
+ rbuff.close();
+ return text;
+
+ } catch (IOException e) {
+ e.printStackTrace();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+
+ public void testBasicStapScript() {
+ if (!TestConstants.canRunStap)
+ return;
+ final String expected = "probe_beginprobe_end";
+
+ String command = "probe begin { " +
+ "printf(\"probe_begin\")" +
+ "exit()" +
+ "}" +
+ "probe end {" +
+ "printf(\"probe_end\")" +
+ "}";
+ String actual = getCommandOutput(command, false);
+
+ assertEquals(expected, actual);
+ }
+
+
+
+ public void testFunctionProbes(){
+ binaryPath = currentPath+"/basic";
+ final String expected = "mainfoo";
+
+ String command = "probe process(@1).function(\"*\"){ printf(\"%s\",probefunc()) }";
+ String actual = getCommandOutput(command, true);
+
+ assertEquals(expected, actual);
+
+ }
+
+ public void testBasicOperations(){
+ if (!TestConstants.canRunStap)
+ return;
+ final String expected = "01234";
+
+ String command = "global map\n" +
+ "global num\n" +
+ "probe begin {" +
+ "for (num=0; num<5; num++){"+
+ "map[num]=num"+
+ "}"+
+ "exit()"+
+ "}"+
+ "probe end {" +
+ "foreach (tmp in map){"+
+ "printf(\"%d\",map[tmp])"+
+ "}"+
+ "}";
+ String actual = getCommandOutput(command, false);
+
+ assertEquals(expected, actual);
+
+ }
+
+ public void testFailure(){
+ try {
+ SystemTapLaunchShortcut shortcut = new SystemTapLaunchShortcut();
+ ILaunchConfiguration config = shortcut.outsideGetLaunchConfigType().newInstance(null, "Temp Name");
+ ILaunchConfigurationWorkingCopy wc = config.copy("Temp Name");
+
+ wc.setAttribute(LaunchConfigurationConstants.BINARY_PATH,currentPath + "/basic");
+ wc.setAttribute(LaunchConfigurationConstants.SCRIPT_PATH,scriptPath);
+ wc.setAttribute(LaunchConfigurationConstants.ARGUMENTS,"-e'()'");
+ wc.setAttribute(LaunchConfigurationConstants.OUTPUT_PATH,graphDataPath);
+ config = wc.doSave();
+ config.launch("profile", null);
+
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+
+
+ public void initializeFiles(){
+ File scriptFile = new File(scriptPath);
+ File graphDataFile = new File(graphDataPath);
+
+ try {
+ scriptFile.createNewFile();
+ graphDataFile.createNewFile();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapCommandTest.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapCommandTest.java
new file mode 100644
index 0000000000..173ec32bed
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapCommandTest.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.systemtap.local.launch.tests;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.PrintStream;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+
+public class SystemTapCommandTest extends TestCase{
+
+
+ /**
+ * Tests if SystemTapCommand is properly obtaining output from the runtime process
+ */
+ public void testCommand() {
+ System.out.println("\n\nLaunching SystemTapCommandTest\n");
+
+
+ //Set up variables
+ String testText = "CORRECT";
+ String tempLocation = ResourcesPlugin.getWorkspace().getRoot().getLocation().toString()
+ + "/DeleteThisScript.stp";
+
+ //Create temporary file containing the test script
+ File temporaryScript = new File(tempLocation);
+
+ try {
+ FileOutputStream output = new FileOutputStream(temporaryScript);
+ new PrintStream(output).println("probe begin { printf(\"" + testText + "\") exit() }");
+
+ } catch (FileNotFoundException e1) {
+ e1.printStackTrace();
+ }
+
+
+// //Execute and assert
+// SystemTapCommandParser cmd = new SystemTapCommandParser("CallgraphView", "stap "
+// + tempLocation, junk,false, false, "");
+// cmd.setTestingMode();
+// assertEquals(cmd.testRun(new NullProgressMonitor()), Status.OK_STATUS);
+// assertEquals(testText, cmd.getTestOutput());
+
+ //Cleanup
+ temporaryScript.delete();
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapTabTest.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapTabTest.java
new file mode 100644
index 0000000000..56a1878100
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapTabTest.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * 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.systemtap.local.launch.tests;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.linuxtools.systemtap.local.launch.SystemTapLaunchShortcut;
+import org.eclipse.linuxtools.systemtap.local.launch.SystemTapOptionsTab;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+
+public class SystemTapTabTest extends TestCase{
+
+
+ public void testTabs(){
+ Shell sh = new Shell();
+ Composite cmp = new Composite(sh, SWT.NONE);
+
+ SystemTapLaunchShortcut shortCut = new SystemTapLaunchShortcut();
+ SystemTapOptionsTab stp = new SystemTapOptionsTab();
+ stp.createControl(cmp);
+ ILaunchConfiguration configuration;
+ try {
+ configuration = shortCut.outsideGetLaunchConfigType().
+ newInstance(null, (DebugPlugin.getDefault().getLaunchManager()).
+ generateUniqueLaunchConfigurationNameFrom("invalid"));
+ ILaunchConfigurationWorkingCopy wc = configuration.getWorkingCopy();
+ stp.setDefaults(wc);
+ stp.performApply(wc);
+ wc.doSave();
+ stp.initializeFrom(configuration);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ sh.open();
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/TestConstants.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/TestConstants.java
new file mode 100644
index 0000000000..e6042341cd
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/TestConstants.java
@@ -0,0 +1,15 @@
+/*******************************************************************************
+ * 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.systemtap.local.launch.tests;
+
+public class TestConstants {
+ public static boolean canRunStap = false;
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/test.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/test.xml
new file mode 100644
index 0000000000..4559259865
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/test.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+
+<project name="testsuite" default="run" basedir=".">
+ <property name="classname" value="org.eclipse.linuxtools.systemtap.local.launch.tests.AllTests" />
+ <property name="plugin-name" value="org.eclipse.linuxtools.systemtap.local.launch.tests" />
+
+ <property name="library-file" value="${eclipse-home}/dropins/${subProjectName2}/plugins/org.eclipse.test/library.xml" />
+
+ <!-- The property ${eclipse-home} should be passed into this script -->
+ <!-- Set a meaningful default value for when it is not. -->
+ <property name="eclipse-home" value="${basedir}/../.." />
+
+ <!-- This target holds all initialization code that needs to be done for -->
+ <!-- all tests that are to be run. Initialization for individual tests -->
+ <!-- should be done within the body of the suite target. -->
+ <target name="init">
+ <tstamp />
+ <delete>
+ <fileset dir="${eclipse-home}" includes="org*.xml" />
+ </delete>
+ </target>
+
+ <!-- This target defines the tests that need to be run. -->
+ <target name="locallaunch_suite">
+ <property name="locallaunch-folder" value="${eclipse-home}/locallaunch_folder" />
+ <delete dir="${localcallgraph-folder}" quiet="true" />
+ <ant target="launch-test" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="data-dir" value="${locallaunch-folder}" />
+ <property name="plugin-name" value="${plugin-name}" />
+ <property name="classname" value="${classname}" />
+ </ant>
+ </target>
+
+ <!-- This target holds code to cleanup the testing environment after -->
+ <!-- after all of the tests have been run. You can use this target to -->
+ <!-- delete temporary files that have been created. -->
+ <target name="cleanup">
+ <mkdir dir="${results}/consolelogs" />
+ <copy failonerror="false" file="${eclipse-home}/results/${classname}.txt" tofile="${results}/consolelogs/${classname}_${platform}.metadata.log.txt" />
+ </target>
+
+ <!-- This target runs the test suite. Any actions that need to happen -->
+ <!-- after all the tests have been run should go here. -->
+ <target name="run" depends="init,locallaunch_suite,cleanup">
+ <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="includes" value="org*.xml" />
+ <property name="output-file" value="${plugin-name}.xml" />
+ </ant>
+ </target>
+
+ <target name="all" depends="run" description="Dummy target to run all tests">
+ </target>
+
+</project>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/.classpath
new file mode 100644
index 0000000000..ad32c83a78
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/.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/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/.project b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/.project
new file mode 100644
index 0000000000..18815fe63a
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.systemtap.local.launch</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/systemtap/org.eclipse.linuxtools.systemtap.local.launch/.settings/org.eclipse.jdt.core.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..8a7655522f
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Mon Sep 21 12:33:12 EDT 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..0c01710dcd
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/META-INF/MANIFEST.MF
@@ -0,0 +1,30 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: SystemTap Local Launch
+Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.local.launch;singleton:=true
+Bundle-Version: 0.0.1.qualifier
+Bundle-Activator: org.eclipse.linuxtools.systemtap.local.launch.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.debug.ui,
+ org.eclipse.draw2d,
+ org.eclipse.cdt.core
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Import-Package: org.eclipse.cdt.core.model,
+ org.eclipse.cdt.debug.core,
+ org.eclipse.cdt.launch,
+ org.eclipse.cdt.utils.pty,
+ org.eclipse.cdt.utils.spawner,
+ org.eclipse.core.resources,
+ org.eclipse.debug.core,
+ org.eclipse.debug.ui,
+ org.eclipse.jface.text,
+ org.eclipse.linuxtools.profiling.launch,
+ org.eclipse.linuxtools.systemtap.local.core,
+ org.eclipse.ui,
+ org.eclipse.ui.console,
+ org.eclipse.ui.model,
+ org.eclipse.ui.views.navigator
+Bundle-Localization: plugin
+Export-Package: org.eclipse.linuxtools.systemtap.local.launch
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/build.properties
new file mode 100644
index 0000000000..bbba056b40
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/build.properties
@@ -0,0 +1,18 @@
+###############################################################################
+# 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/,\
+ plugin.properties,\
+ .,\
+ icons/,\
+ bin/
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/icons/Wizard.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/icons/Wizard.gif
new file mode 100644
index 0000000000..a10f66d312
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/icons/Wizard.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/icons/bar_graph.png b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/icons/bar_graph.png
new file mode 100644
index 0000000000..4a6e255790
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/icons/bar_graph.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/icons/question.png b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/icons/question.png
new file mode 100644
index 0000000000..7e6554c9f5
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/icons/question.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/index.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/index.xml
new file mode 100644
index 0000000000..c6de5e59d7
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/index.xml
@@ -0,0 +1,5 @@
+ <index version="1.0">
+ <entry keyword="Tree Selection">
+ <topic href="tree.htm" />
+ </entry>
+ </index>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/plugin.properties
new file mode 100644
index 0000000000..06458bf8f8
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/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
+###############################################################################
+launchConfigurationType.name.0 = Profile with SystemTap
+launchConfigurationTabGroup.description.0 = Launch a custom SystemTap Script \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/plugin.xml
new file mode 100644
index 0000000000..a6bfec58e3
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/plugin.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+
+<plugin>
+ <!--<extension point="org.eclipse.help.toc">
+ <toc file="toc.xml" primary="true"/>
+ </extension>
+ <extension point="org.eclipse.help.index">
+ <index file="index.xml"/>
+ </extension>-->
+
+ <extension
+ point="org.eclipse.debug.core.launchConfigurationTypes">
+ <launchConfigurationType
+ delegate="org.eclipse.linuxtools.systemtap.local.launch.SystemTapLaunchConfigurationDelegate"
+ id="org.eclipse.linuxtools.systemtap.localgui.launch.systemtapLaunch"
+ modes="profile"
+ name="%launchConfigurationType.name.0"
+ public="true"
+ sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
+ sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
+ </launchConfigurationType>
+ </extension>
+
+
+
+ <extension
+ point="org.eclipse.debug.ui.launchConfigurationTabGroups">
+ name = "SystemTap Control Tab"
+ <launchConfigurationTabGroup
+ class="org.eclipse.linuxtools.systemtap.local.launch.SystemTapLaunchConfigurationTabGroup"
+ description="%launchConfigurationTabGroup.description.0"
+ id="org.eclipse.linuxtools.systemtap.localgui.launch.systemtapTabGroup"
+ type="org.eclipse.linuxtools.systemtap.localgui.launch.systemtapLaunch">
+ </launchConfigurationTabGroup>
+ </extension>
+
+
+ <extension
+ point="org.eclipse.debug.ui.launchShortcuts">
+ <shortcut
+ class="org.eclipse.linuxtools.systemtap.local.launch.LaunchStapGraph"
+ id="org.eclipse.linuxtools.systemtap.quicklaunchStapGraph1"
+ icon="icons/bar_graph.png"
+ label="Function callgraph"
+ modes="profile">
+ <contextualLaunch>
+ <enablement>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <or>
+ <instanceof
+ value="org.eclipse.cdt.core.model.IBinary">
+ </instanceof>
+ <instanceof
+ value="org.eclipse.cdt.core.model.ICProject">
+ </instanceof>
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.cdt.launch.isExecutable">
+ </test>
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.cdt.launch.isCProject">
+ </test>
+ <and>
+ <instanceof
+ value="org.eclipse.ui.IFileEditorInput">
+ </instanceof>
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ <adapt
+ type="org.eclipse.cdt.core.model.ICElement">
+ </adapt>
+ </adapt>
+ </and>
+ </or>
+ </iterate>
+ </with>
+ </enablement>
+ </contextualLaunch>
+ </shortcut>
+ </extension>
+
+
+</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/ASTTranslationUnitVisitor.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/ASTTranslationUnitVisitor.java
new file mode 100644
index 0000000000..195b43b1f5
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/ASTTranslationUnitVisitor.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.systemtap.local.launch;
+
+import java.util.ArrayList;
+
+import org.eclipse.cdt.core.dom.ast.ASTVisitor;
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+
+
+//TODO: Remove unused class?
+public class ASTTranslationUnitVisitor extends ASTVisitor{
+
+ public ASTTranslationUnitVisitor () {
+ super();
+ shouldVisitStatements = true;
+ shouldVisitDeclarations = true;
+ funcs = new ArrayList<String>();
+ }
+
+
+ private String fileName;
+
+ private ArrayList<String> funcs;
+ public int visit(IASTDeclaration s) {
+ if (!s.getParent().getContainingFilename().contains(fileName))
+ return PROCESS_SKIP;
+ if (s instanceof IASTFunctionDefinition) {
+ String name =((IASTFunctionDefinition) s).getDeclarator().getName().toString();
+ if (!name.substring(0, 2).equals("__")) { //$NON-NLS-1$
+ funcs.add(name);
+ }
+ }
+ return PROCESS_CONTINUE;
+ }
+
+
+ public ArrayList<String> getFunctions() {
+ return funcs;
+ }
+
+ public void setFileName(String val) {
+ fileName = val;
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/Activator.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/Activator.java
new file mode 100644
index 0000000000..db0923f86c
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/Activator.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * 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.systemtap.local.launch;
+
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.linuxtools.systemtap.local.core.LaunchConfigurationConstants;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ *
+ * This is more or less the default Eclipse plugin-wizard Activator.
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+
+ }
+
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ 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(LaunchConfigurationConstants.PLUGIN_ID, path);
+ }
+
+
+}
+
+
+//public String getPluginLocation() {
+//Bundle bundle = getBundle();
+//
+//URL locationUrl = FileLocator.find(bundle,new Path("/"), null);
+//URL fileUrl = null;
+//try {
+// fileUrl = FileLocator.toFileURL(locationUrl);
+//} catch (IOException e) {
+// e.printStackTrace();
+//}
+//return fileUrl.getFile();
+//}
+
+//private void checkRun() {
+////Check if install script has been executed. Install script MUST delete the FirstRun file,
+////this will execute every time!
+//String firstRun = getPluginLocation() + "FirstRun";
+//File firstFile = new File(firstRun);
+//if (firstFile.exists()) {
+// Shell sh = new Shell();
+// String command = "./" + getPluginLocation() + "install.sh " + firstRun;
+// InputDialog id = new InputDialog(sh, "First time startup", "Hi there! Looks like this is your first time running the SystemTap Eclipse plugin. In order for this plugin to work, you will first need to install SystemTap. Then please open a terminal and execute the following command. ", command, null);
+// id.open();
+//}
+//}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/ConfigurationOptionsSetter.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/ConfigurationOptionsSetter.java
new file mode 100644
index 0000000000..2254182f0a
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/ConfigurationOptionsSetter.java
@@ -0,0 +1,235 @@
+/*******************************************************************************
+ * 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.systemtap.local.launch;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.linuxtools.systemtap.local.core.LaunchConfigurationConstants;
+
+public class ConfigurationOptionsSetter {
+
+ public static String setOptions(ILaunchConfiguration config) {
+ String options = ""; //$NON-NLS-1$
+ try {
+ if (config.getAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_VERBOSE)) {
+ options += "-v "; //$NON-NLS-1$
+ }
+
+
+ if (config.getAttribute(LaunchConfigurationConstants.COMMAND_PASS,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_PASS) > 0) {
+ options += "-p" + config.getAttribute(LaunchConfigurationConstants.COMMAND_PASS, LaunchConfigurationConstants.DEFAULT_COMMAND_PASS) + " "; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_KEEP_TEMPORARY,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_KEEP_TEMPORARY)) {
+ options += "-k "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(LaunchConfigurationConstants.COMMAND_GURU,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_GURU)) {
+ options += "-g "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_PROLOGUE_SEARCH,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_PROLOGUE_SEARCH)) {
+ options += "-P "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_NO_CODE_ELISION,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_NO_CODE_ELISION)) {
+ options += "-u "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_DISABLE_WARNINGS,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_DISABLE_WARNINGS)) {
+ options += "-w "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(LaunchConfigurationConstants.COMMAND_BULK_MODE,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_BULK_MODE)) {
+ options += "-b "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_TIMING_INFO,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_TIMING_INFO)) {
+ options += "-t "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_BUFFER_BYTES,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_BUFFER_BYTES) > 0) {
+ options += "-s" + config.getAttribute(LaunchConfigurationConstants.COMMAND_BUFFER_BYTES, LaunchConfigurationConstants.DEFAULT_COMMAND_BUFFER_BYTES) + " "; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_TARGET_PID,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID) > 0) {
+ options += "-x" + config.getAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID, LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID) + " "; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_C_DIRECTIVES,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES) != LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES) {
+ options += config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_C_DIRECTIVES,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES)
+ + " "; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_LEAVE_RUNNING,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_LEAVE_RUNNING)) {
+ options += "-F "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_SKIP_BADVARS,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_SKIP_BADVARS)) {
+ options += "--skip-badvars "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_IGNORE_DWARF,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_IGNORE_DWARF)) {
+ options += "--ignore-dwarf "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_TAPSET_COVERAGE,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_TAPSET_COVERAGE)) {
+ options += "-q "; //$NON-NLS-1$
+ }
+ return options;
+
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
+ public static String setOptions(ILaunchConfigurationWorkingCopy config) {
+ String options = ""; //$NON-NLS-1$
+ try {
+ if (config.getAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_VERBOSE)) {
+ options += "-v "; //$NON-NLS-1$
+ }
+
+
+ if (config.getAttribute(LaunchConfigurationConstants.COMMAND_PASS,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_PASS) > 0) {
+ options += "-p" + config.getAttribute(LaunchConfigurationConstants.COMMAND_PASS, LaunchConfigurationConstants.DEFAULT_COMMAND_PASS) + " "; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_KEEP_TEMPORARY,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_KEEP_TEMPORARY)) {
+ options += "-k "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(LaunchConfigurationConstants.COMMAND_GURU,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_GURU)) {
+ options += "-g "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_PROLOGUE_SEARCH,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_PROLOGUE_SEARCH)) {
+ options += "-P "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_NO_CODE_ELISION,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_NO_CODE_ELISION)) {
+ options += "-u "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_DISABLE_WARNINGS,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_DISABLE_WARNINGS)) {
+ options += "-w "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(LaunchConfigurationConstants.COMMAND_BULK_MODE,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_BULK_MODE)) {
+ options += "-b "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_TIMING_INFO,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_TIMING_INFO)) {
+ options += "-t "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_BUFFER_BYTES,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_BUFFER_BYTES) > 0) {
+ options += "-s" + config.getAttribute(LaunchConfigurationConstants.COMMAND_BUFFER_BYTES, LaunchConfigurationConstants.DEFAULT_COMMAND_BUFFER_BYTES) + " "; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_TARGET_PID,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID) > 0) {
+ options += "-x" + config.getAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID, LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID) + " "; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_C_DIRECTIVES,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES) != LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES) {
+ options += config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_C_DIRECTIVES,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES)
+ + " "; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_LEAVE_RUNNING,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_LEAVE_RUNNING)) {
+ options += "-F "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_SKIP_BADVARS,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_SKIP_BADVARS)) {
+ options += "--skip-badvars "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_IGNORE_DWARF,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_IGNORE_DWARF)) {
+ options += "--ignore-dwarf "; //$NON-NLS-1$
+ }
+
+ if (config.getAttribute(
+ LaunchConfigurationConstants.COMMAND_TAPSET_COVERAGE,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_TAPSET_COVERAGE)) {
+ options += "-q "; //$NON-NLS-1$
+ }
+ return options;
+
+ } catch (CoreException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ return null;
+
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/LaunchStapGraph.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/LaunchStapGraph.java
new file mode 100644
index 0000000000..157dbc2019
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/LaunchStapGraph.java
@@ -0,0 +1,301 @@
+/*******************************************************************************
+ * 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.systemtap.local.launch;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.ArrayList;
+
+import org.eclipse.cdt.core.model.IBinary;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.linuxtools.systemtap.local.core.PluginConstants;
+import org.eclipse.linuxtools.systemtap.local.core.SystemTapUIErrorMessages;
+import org.eclipse.ui.IEditorPart;
+
+public class LaunchStapGraph extends SystemTapLaunchShortcut {
+ /*
+ * The following protected parameters are provided by
+ * SystemTapLaunchShortcut:
+ *
+ * Optional customization parameters: protected String name; protected
+ * String binaryPath; protected String arguments; protected String
+ * outputPath; protected String dirPath; protected String generatedScript;
+ * protected boolean needToGenerate; protected boolean overwrite;
+ *
+ * Mandatory: protected String scriptPath; protected ILaunchConfiguration
+ * config;
+ */
+
+ /**
+ * Launch method for a generated script that executes on a binary
+ *
+ * MUST specify (String) scriptPath and call config =
+ * createConfiguration(bin)!
+ *
+ * Noteworthy defaults: name defaults to "", but please set it (for
+ * usability) overwrite defaults to true - don't change it unless you really
+ * have to.
+ *
+ * To create new launches: -Copy shortcut code in xml, changing class name
+ * and label accordingly -Create a class that extends
+ * SystemTapLaunchShortcut with a function launch(IBinary bin, String mode)
+ * -Call super.Init() -Set name (this is shortcut-specific) -If a binary is
+ * used, call binName = getName(bin) -Call createConfiguration(bin, name)
+ *
+ * -Specify whichever of the optional parameters you need -Set scriptPath
+ * -Set an ILaunchConfiguration -Call finishLaunch or
+ * finishLaunchWithoutBinary
+ */
+
+ private String partialScriptPath;
+ private String funcs;
+ private ArrayList<String> exclusions;
+ private String projectName;
+
+ public void setProjectName(String val) {
+ projectName = val;
+ }
+
+ public LaunchStapGraph() {
+ funcs = null;
+ exclusions = new ArrayList<String>();
+ projectName = null;
+ }
+
+
+
+ public void launch(IEditorPart ed, String mode) {
+ resourceToSearchFor = ed.getTitle();
+ searchForResource = true;
+
+ //Note: This launch will eventually end up calling
+ //launch(IBinary bin, String mode) below
+ super.launch(ed, mode);
+ }
+
+ public void launch(IBinary bin, String mode) {
+ super.Init();
+ this.bin = bin;
+ name = "SystemTapGraph"; //$NON-NLS-1$
+ binName = getName(bin);
+ partialScriptPath = PluginConstants.getPluginLocation()
+ + "parse_function_partial.stp"; //$NON-NLS-1$
+
+ scriptPath = PluginConstants.DEFAULT_OUTPUT
+ + "callgraphGen.stp"; //$NON-NLS-1$
+
+ parserID = "org.eclipse.linuxtools.systemtap.local.callgraph.graphparser";
+
+
+
+ if (projectName == null || projectName.length() < 1)
+ projectName = bin.getCProject().getElementName();
+
+ try {
+
+ config = createConfiguration(bin, name);
+ binaryPath = bin.getResource().getLocation().toString();
+ arguments = binaryPath;
+ outputPath = PluginConstants.STAP_GRAPH_DEFAULT_IO_PATH;
+
+ writeFunctionListToScript(resourceToSearchFor);
+ if (funcs == null || funcs.length() < 0)
+ return;
+ generatedScript = generateScript();
+ if (generatedScript == null || generatedScript.length() < 0)
+ return;
+
+ generatedScript+= "probe syscall.exit {\n" +
+ "if (pid() == target()) {\n" +
+ "finalTime = gettimeofday_ns()\n" +
+ "}\n" +
+ "}\n";
+ needToGenerate = true;
+
+ finishLaunch(name, mode);
+
+ } catch (IOException e) {
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
+ "LaunchShortcutScriptGen", //$NON-NLS-1$
+ Messages.getString("LaunchStapGraph.0"), //$NON-NLS-1$
+ Messages.getString("LaunchStapGraph.6")); //$NON-NLS-1$
+ mess.schedule();
+ e.printStackTrace();
+ } catch (CoreException e1) {
+ e1.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ resourceToSearchFor = ""; //$NON-NLS-1$
+ searchForResource = false;
+ }
+
+
+ }
+
+ public void setFuncs(String val) {
+ funcs = val;
+ }
+
+ /**
+ * Generates the call and return function probes for the specified function
+ * @param function
+ * @return
+ */
+ private String generateProbe(String function) {
+ String output = "probe process(@1).function(\"" + //$NON-NLS-1$
+ function + "\").call{" + //$NON-NLS-1$
+ "\tcallFunction(probefunc())\t" + //$NON-NLS-1$
+ "}\t" + //$NON-NLS-1$
+ "probe process(@1).function(\"" + //$NON-NLS-1$
+ function + "\").return{\t" + //$NON-NLS-1$
+ "\treturnFunction(probefunc())\t" + //$NON-NLS-1$
+ "}\n"; //$NON-NLS-1$
+ return output;
+ }
+
+ /**
+ * Prompts the user for a list of functions to probe
+ *
+ * @param bw
+ * @return
+ * @throws IOException
+ */
+ public String writeFunctionListToScript(String resourceToSearchFor) throws IOException {
+ String toWrite = getFunctionsFromBinary(bin, resourceToSearchFor);
+
+ if (toWrite == null || toWrite.length() < 1) {
+ return null;
+ }
+
+ StringBuffer output = new StringBuffer();
+
+ for (String func : toWrite.split(" ")) { //$NON-NLS-1$
+ if (func.length() > 0) {
+ if (exclusions == null || exclusions.size() < 1 || exclusions.contains(func) ) {
+ output.append(generateProbe(func));
+ }
+ }
+ }
+
+ funcs = output.toString();
+ return funcs;
+ }
+
+ /**
+ * Copies the contents of the specified partial script. You should call writeStapMarkers first
+ * if you want StapMarkers to function properly.
+ *
+ * @param bw
+ * @return
+ * @throws IOException
+ */
+ private String writeFromPartialScript(String projectName) throws IOException {
+ String toWrite = ""; //$NON-NLS-1$
+ String temp = ""; //$NON-NLS-1$
+ toWrite += "probe begin{\n" + //$NON-NLS-1$
+ "printf(\"\\nPROBE_BEGIN\\n\")\n" + //$NON-NLS-1$
+ "serial=1\n" + //$NON-NLS-1$
+ "startTime = 0;\n" + //$NON-NLS-1$
+ "printf(\"" + projectName + "\\n\")\n" + //$NON-NLS-1$ //$NON-NLS-2$
+ "}"; //$NON-NLS-1$
+ File partialScript = new File(partialScriptPath);
+ BufferedReader scriptReader = new BufferedReader(new FileReader(
+ partialScript));
+ while ((temp = scriptReader.readLine()) != null) {
+ toWrite += temp + "\n"; //$NON-NLS-1$
+ }
+ scriptReader.close();
+
+ return toWrite;
+ }
+
+
+ public void setExclusions(ArrayList<String> e) {
+ exclusions = e;
+ }
+
+
+ /**
+ * Writes global variables for the StapGraph script to the BufferedWriter.
+ * Should be called first.
+ *
+ * @param bw
+ * @return
+ * @throws IOException
+ */
+ private String writeGlobalVariables() throws IOException {
+ String toWrite = "global serial\n" + //$NON-NLS-1$
+ "global startTime\n " + //$NON-NLS-1$
+ "global finalTime\n"; //$NON-NLS-1$
+
+ return toWrite;
+ }
+
+ @Override
+ public String generateScript() throws IOException {
+
+ String scriptContents = ""; //$NON-NLS-1$
+
+
+ scriptContents += writeGlobalVariables();
+// scriptContents += writeStapMarkers();
+
+ scriptContents += funcs;
+
+ scriptContents += writeFromPartialScript(projectName);
+
+// BufferedWriter bw = new BufferedWriter(new FileWriter(scriptFile));
+//// bw.write("probe begin { printf(\"HELLO\") }");
+// bw.write(scriptContents);
+// bw.close();
+ return scriptContents;
+ }
+
+ public void setPartialScriptPath(String val) {
+ partialScriptPath = val;
+ }
+
+// /**
+// * Determines whether or not the user wants StapMarkers and inserts them. To
+// * disable StapMarkers, simply stop calling this function. This should be called
+// * before writeFromPartialScript.
+// *
+// * @param bw
+// * @return
+// * @throws IOException
+// */
+// private String writeStapMarkers() throws IOException {
+// String toWrite = Messages.getString("LaunchStapGraph.26"); //$NON-NLS-1$
+// if (MessageDialog.openQuestion(new Shell(),
+// Messages.getString("LaunchStapGraph.27"), //$NON-NLS-1$
+// Messages.getString("LaunchStapGraph.28") //$NON-NLS-1$
+// + Messages.getString("LaunchStapGraph.29"))) { //$NON-NLS-1$
+// toWrite = Messages.getString("LaunchStapGraph.30") //$NON-NLS-1$
+// + Messages.getString("LaunchStapGraph.31") //$NON-NLS-1$
+// + Messages.getString("LaunchStapGraph.32") //$NON-NLS-1$
+// + Messages.getString("LaunchStapGraph.33") //$NON-NLS-1$
+// + Messages.getString("LaunchStapGraph.34") //$NON-NLS-1$
+// + Messages.getString("LaunchStapGraph.35") //$NON-NLS-1$
+// + Messages.getString("LaunchStapGraph.36") //$NON-NLS-1$
+// + Messages.getString("LaunchStapGraph.37") //$NON-NLS-1$
+// + Messages.getString("LaunchStapGraph.38") //$NON-NLS-1$
+// + Messages.getString("LaunchStapGraph.39") + Messages.getString("LaunchStapGraph.40"); //$NON-NLS-1$ //$NON-NLS-2$
+// partialScriptPath = PluginConstants.getPluginLocation()
+// + Messages.getString("LaunchStapGraph.41"); //$NON-NLS-1$
+// }
+//
+// return toWrite;
+// }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/LaunchWizard.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/LaunchWizard.java
new file mode 100644
index 0000000000..0d278fb4fb
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/LaunchWizard.java
@@ -0,0 +1,332 @@
+/*******************************************************************************
+ * 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.systemtap.local.launch;
+
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.linuxtools.systemtap.local.core.PluginConstants;
+import org.eclipse.linuxtools.systemtap.local.core.ShellOpener;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
+import org.eclipse.ui.model.WorkbenchContentProvider;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+import org.eclipse.ui.views.navigator.ResourceComparator;
+
+public class LaunchWizard extends SystemTapLaunchShortcut {
+
+ private Text scriptLocation;
+ private Text binaryLocation;
+ private Text argumentsLocation;
+ private String workspacePath;
+ private String mode;
+
+ private Shell sh;
+ private Composite fileComp;
+ private boolean completed;
+
+ private static final int WIDTH = 670;
+ private static final int HEIGHT = 630;
+ /*
+ * The following protected parameters are provided by SystemTapLaunchShortcut:
+ *
+ * Optional customization parameters:
+ * protected String name;
+ * protected String binaryPath;
+ * protected String arguments;
+ * protected String outputPath;
+ * protected String dirPath;
+ * protected String generatedScript;
+ * protected boolean needToGenerate;
+ * protected boolean overwrite;
+ *
+ * Mandatory:
+ * protected String scriptPath;
+ * protected ILaunchConfiguration config;
+ */
+
+
+ /**
+ * Launch method for a generated script that executes on a binary
+ *
+ * MUST specify (String) scriptPath and call config = createConfiguration(bin)!
+ *
+ * Noteworthy defaults:
+ * name defaults to "", but please set it (for usability)
+ * overwrite defaults to true - don't change it unless you really have to.
+ *
+ * To create new launches:
+ * -Copy shortcut code in xml, changing class name and label accordingly
+ * -Create a class that extends SystemTapLaunchShortcut with a function
+ * launch(IBinary bin, String mode)
+ * -Call super.Init()
+ * -Set name (this is shortcut-specific)
+ * -If a binary is used, call binName = getName(bin)
+ * -Call createConfiguration(bin, name)
+ *
+ * -Specify whichever of the optional parameters you need
+ * -Set scriptPath
+ * -Set an ILaunchConfiguration
+ * -Call finishLaunch or finishLaunchWithoutBinary
+ */
+
+ @Override
+ public void launch(IEditorPart ed, String mode) {
+ super.Init();
+ promptForInputs();
+
+ this.mode = mode;
+
+// finishLaunch(scriptPath + ": " + binName, mode); //$NON-NLS-1$
+ }
+
+ @Override
+ public void launch(ISelection selection, String mode) {
+ super.Init();
+ completed = false;
+ promptForInputs();
+
+ this.mode = mode;
+
+// finishLaunch(scriptPath + ": " + binName, mode); //$NON-NLS-1$
+ }
+
+
+ private void promptForInputs() {
+ InputDialog id = new InputDialog(new Shell(), Messages.getString("LaunchWizard.0"), //$NON-NLS-1$
+ Messages.getString("LaunchWizard.1") + //$NON-NLS-1$
+ Messages.getString("LaunchWizard.2") + //$NON-NLS-1$
+ Messages.getString("LaunchWizard.3"), //$NON-NLS-1$
+ getLaunchManager().generateUniqueLaunchConfigurationNameFrom(
+ Messages.getString("LaunchWizard.4")), null); //$NON-NLS-1$
+ id.open();
+
+ if (id.getReturnCode() == InputDialog.CANCEL){
+ return;
+ }
+
+ name = id.getValue();
+
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ IWorkspaceRoot root = workspace.getRoot();
+ IPath location = root.getLocation();
+ workspacePath = location.toString();
+
+ sh = new Shell();
+ sh.setSize(WIDTH,HEIGHT);
+ sh.setLayout(new GridLayout(1, false));
+ sh.setText(name);
+
+
+ Image img = new Image(sh.getDisplay(), PluginConstants.PLUGIN_LOCATION + "systemtapbanner.png"); //$NON-NLS-1$
+ Composite imageCmp = new Composite(sh, SWT.BORDER);
+ imageCmp.setLayout(new FillLayout());
+ GridData imageData = new GridData(650, 157);
+ imageData.horizontalAlignment = SWT.CENTER;
+ imageCmp.setLayoutData(imageData);
+ imageCmp.setBackgroundImage(img);
+
+ fileComp = new Composite(sh, SWT.NONE);
+ fileComp.setLayout(new GridLayout(2, false));
+ fileComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+
+ GridDataFactory labelData = GridDataFactory.fillDefaults().grab(true, false)
+ .span(2,1);
+
+ Label scriptLabel = new Label(fileComp, SWT.HORIZONTAL);
+ scriptLabel.setText(Messages.getString("LaunchWizard.19")); //$NON-NLS-1$
+ labelData.applyTo(scriptLabel);
+
+ GridDataFactory textData = GridDataFactory.fillDefaults().grab( true, false )
+ .hint(WIDTH, SWT.DEFAULT);
+
+ scriptLocation = new Text(fileComp, SWT.SINGLE | SWT.BORDER);
+ textData.applyTo(scriptLocation);
+ Button scriptButton = new Button(fileComp, SWT.PUSH);
+ scriptButton.setText(Messages.getString("SystemTapOptionsTab.BrowseFiles")); //$NON-NLS-1$
+ scriptButton.setLayoutData(new GridData());
+ scriptButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ String filePath = scriptLocation.getText();
+ FileDialog dialog = new FileDialog(sh, SWT.SAVE);
+ filePath = dialog.open();
+ if (filePath != null) {
+ scriptLocation.setText(filePath);
+ }
+ }
+ });
+
+
+ GridData gd2 = new GridData();
+ gd2.horizontalSpan = 3;
+ Label binaryLabel= new Label(fileComp, SWT.HORIZONTAL);
+ binaryLabel.setText(Messages.getString("LaunchWizard.20")); //$NON-NLS-1$
+ labelData.applyTo(binaryLabel);
+
+ binaryLocation = new Text(fileComp, SWT.SINGLE | SWT.BORDER);
+ textData.applyTo(binaryLocation);
+ Button binaryButton = new Button(fileComp, SWT.PUSH);
+ binaryButton.setText(Messages.getString("SystemTapOptionsTab.WorkspaceButton2")); //$NON-NLS-1$
+ binaryButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(sh, new WorkbenchLabelProvider(), new WorkbenchContentProvider());
+ dialog.setTitle(Messages.getString("SystemTapOptionsTab.SelectResource")); //$NON-NLS-1$
+ dialog.setMessage(Messages.getString("SystemTapOptionsTab.SelectSuppressions")); //$NON-NLS-1$
+ dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
+ dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
+ if (dialog.open() == IDialogConstants.OK_ID) {
+ IResource resource = (IResource) dialog.getFirstResult();
+ String arg = resource.getFullPath().toString();
+ binaryLocation.setText(workspacePath + arg);
+ }
+ }
+ });
+
+ Composite argumentsComp = new Composite(sh, SWT.BORDER_DASH);
+ argumentsComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ argumentsComp.setLayout(new GridLayout(2, false));
+
+ Label argumentsLabel= new Label(argumentsComp, SWT.HORIZONTAL);
+ argumentsLabel.setText(Messages.getString("LaunchWizard.21")); //$NON-NLS-1$
+ labelData.applyTo(argumentsLabel);
+
+ argumentsLocation = new Text(argumentsComp, SWT.MULTI | SWT.WRAP | SWT.BORDER);
+ GridData gd3 = new GridData(GridData.FILL_HORIZONTAL);
+ gd3.heightHint=200;
+ argumentsLocation.setLayoutData(gd3);
+ Button argumentsButton = new Button(argumentsComp, SWT.PUSH);
+ argumentsButton.setText(Messages.getString("LaunchWizard.22")); //$NON-NLS-1$
+ argumentsButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ argumentsLocation.setText(
+ argumentsLocation.getText() + " process(\"" //$NON-NLS-1$
+ + binaryLocation.getText() + "\").function(\"\")"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ });
+
+
+ //TODO: Don't use blank labels to move button to the right column :P
+ Label blankLabel2 = new Label(argumentsComp, SWT.HORIZONTAL);
+ blankLabel2.setText(""); //$NON-NLS-1$
+
+
+ Button launch = new Button(sh, SWT.PUSH);
+ launch.setLayoutData(new GridData(GridData.CENTER, GridData.BEGINNING, false, false));
+ launch.setText(Messages.getString("LaunchWizard.24")); //$NON-NLS-1$
+ launch.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ scriptPath = scriptLocation.getText();
+ binaryPath = binaryLocation.getText();
+ arguments = argumentsLocation.getText();
+ config = createConfiguration(null, name);
+ try {
+ finishLaunch(scriptPath + ": " + binName, mode);//$NON-NLS-1$
+ } catch (Exception e1) {
+ e1.printStackTrace();
+ }
+ completed = true;
+ sh.dispose();
+ }
+
+ });
+
+ ShellOpener so = new ShellOpener(Messages.getString("LaunchWizard.23"), sh); //$NON-NLS-1$
+ so.schedule();
+
+ completed = true;
+
+ }
+
+ public boolean isCompleted() {
+ return completed;
+ }
+
+}
+
+//
+// public void launch(IBinary bin, String mode) {
+// super.Init();
+// Shell sh = new Shell();
+// MessageDialog.openInformation(sh, "Welcome to SystemTap Wizard",
+// "The SystemTap Wizard will guide you through the process of \n" +
+// "launching a SystemTap script through Eclipse. First, select\n" +
+// "a script to run.");
+//
+//
+//
+// name = Messages.getString("LaunchWizard.WizardName"); //$NON-NLS-1$
+// promptForInputs();
+// binName = getName(bin);
+// binaryPath = dirPath + binName;
+// config = createConfiguration(bin);
+//
+//
+// System.out.println("LaunchCallGraph: launch(IBinary bin, String mode)"); //$NON-NLS-1$
+//
+// finishLaunch(scriptPath + ": " + binName, mode); //$NON-NLS-1$
+// }
+//
+//
+// private void promptForInputs() {
+//
+// Shell sh = new Shell();
+//
+// //Get script
+// MessageDialog.openInformation(sh, "Specify Script", //$NON-NLS-1$
+// "Please specify the location of the SystemTap script to run."); //$NON-NLS-1$
+// FileDialog fd = new FileDialog(sh);
+// scriptPath = fd.open();
+//
+// if (scriptPath == null){
+// scriptPath = ""; //$NON-NLS-1$
+// return;
+// }
+//
+// //Get arguments
+// InputDialog inputDialog = new InputDialog(
+// sh,
+// "Specify Arguments", //$NON-NLS-1$
+// "Specify Arguments separated by a space (eg. arg1 arg2 arg3) or CANCEL to specify no arguments.", //$NON-NLS-1$
+// "", null); //$NON-NLS-1$
+// inputDialog.open();
+// arguments = inputDialog.getValue();
+// inputDialog.close();
+//
+// if (arguments == null || arguments.equals("")){ //$NON-NLS-1$
+// arguments = ""; //$NON-NLS-1$
+// }
+//
+// sh.dispose();
+// }
+//
+//}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/ListTreeContentProvider.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/ListTreeContentProvider.java
new file mode 100644
index 0000000000..31f25feeb6
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/ListTreeContentProvider.java
@@ -0,0 +1,151 @@
+/*******************************************************************************
+ * 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.systemtap.local.launch;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.ICContainer;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+public class ListTreeContentProvider implements ITreeContentProvider {
+
+ @Override
+ public Object[] getChildren(Object parentElement) {
+
+ ArrayList<Object> output = new ArrayList<Object>();
+
+ if (parentElement instanceof ICContainer) {
+ try {
+ Object[] list =((ICContainer) parentElement).getChildren();
+ for (Object item : list) {
+ if (item instanceof ICContainer) {
+ if (checkForValidChildren((ICContainer) item))
+ output.add(item);
+ } else if (item instanceof ICElement) {
+ ICElement el = (ICElement) item;
+ if (el.getElementName().contains(".c")) //$NON-NLS-1$
+ output.add(el);
+ }
+
+
+ }
+
+ return output.toArray();
+ } catch (CModelException e) {
+ e.printStackTrace();
+ }
+ }
+ return null;
+ }
+
+ /**
+ * A container is valid if any of its children are valid c/cpp elements
+ * or if it contains another container for which the above holds
+ * @param cont
+ * @return
+ */
+ private boolean checkForValidChildren(ICContainer cont) {
+ try {
+ for (ICElement child : cont.getChildren()) {
+
+ if (child instanceof ICElement)
+ if (child.getElementName().endsWith(".c")) //$NON-NLS-1$
+ return true;
+ if (child instanceof ICContainer) {
+ if (checkForValidChildren((ICContainer) child))
+ return true;
+ }
+ }
+ } catch (CModelException e) {
+ e.printStackTrace();
+ }
+
+ return false;
+
+ }
+
+ @Override
+ public Object getParent(Object element) {
+ if (element instanceof ICElement)
+ return ((ICElement)element).getAncestor(ICElement.C_CCONTAINER);
+ return null;
+ }
+
+ @Override
+ public boolean hasChildren(Object element) {
+ if (element instanceof ICContainer) {
+ try {
+ if (((ICContainer) element).getChildren().length > 0)
+ return true;
+ } catch (CModelException e) {
+ e.printStackTrace();
+ }
+ }
+ return false;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public Object[] getElements(Object inputElement) {
+ if (inputElement instanceof List) {
+ for (Object element : (List) inputElement)
+ if (element instanceof ICContainer)
+ try {
+ ICElement[] array = ((ICContainer) element).getChildren();
+ ArrayList<ICElement> output = new ArrayList<ICElement>();
+
+ for (ICElement item : array) {
+ if (item instanceof ICContainer) {
+ if (checkForValidChildren((ICContainer) item))
+ output.add(item);
+ }
+
+ if (item.getElementName().endsWith(".cpp") || //$NON-NLS-1$
+ item.getElementName().endsWith(".c")) //$NON-NLS-1$
+ output.add(item);
+ }
+ return output.toArray();
+ } catch (CModelException e) {
+ e.printStackTrace();
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public void dispose() {
+
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+
+ @SuppressWarnings("unchecked")
+ public Object[] findElements(Object inputElement) {
+ ArrayList<Object> output = new ArrayList<Object>();
+
+ if (inputElement instanceof List) {
+ for (Object element : (List) inputElement) {
+ Object[] list = (getChildren(element));
+ for (Object o : list) {
+ output.add(o);
+ }
+ }
+ }
+ return output.toArray();
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/Messages.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/Messages.java
new file mode 100644
index 0000000000..a848484454
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/Messages.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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.systemtap.local.launch;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.systemtap.local.launch.messages"; //$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/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/RuledTreeSelectionDialog.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/RuledTreeSelectionDialog.java
new file mode 100644
index 0000000000..6621450284
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/RuledTreeSelectionDialog.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * Sebastian Davids <sdavids@gmx.de> - Fix for bug 19346 - Dialog font should be
+ * activated and used by other components.
+ * Lubomir Marinov <lubomir.marinov@gmail.com> - Fix for bug 182122 -[Dialogs]
+ * CheckedTreeSelectionDialog#createSelectionButtons(Composite) fails to
+ * align the selection buttons to the right
+ *******************************************************************************/
+package org.eclipse.linuxtools.systemtap.local.launch;
+
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.dialogs.CheckedTreeSelectionDialog;
+
+/**
+ * A class to select elements out of a tree structure.
+ *
+ * @since 2.0
+ */
+public class RuledTreeSelectionDialog extends CheckedTreeSelectionDialog {
+
+ public RuledTreeSelectionDialog(Shell parent, ILabelProvider labelProvider,
+ ITreeContentProvider contentProvider) {
+ super(parent, labelProvider, contentProvider);
+ // TODO Auto-generated constructor stub
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ */
+ protected Control createDialogArea(Composite parent) {
+ Composite composite = (Composite) super.createDialogArea(parent);
+
+ Label line = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL
+ | SWT.BOLD);
+ GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
+ gridData.horizontalSpan = 2;
+ line.setLayoutData(gridData);
+ GridLayout lay = (GridLayout) composite.getLayout();
+ lay.marginHeight=0;
+ composite.setLayout(lay);
+
+ return composite;
+ }
+
+
+ /*
+ * @see Dialog#createButtonBar(Composite)
+ */
+ @Override
+ protected Control createButtonBar(Composite parent) {
+ Font font = parent.getFont();
+ Composite composite = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout();
+
+ layout.marginHeight = 0;
+ layout.marginLeft = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+ layout.marginWidth = 0;
+ composite.setLayout(layout);
+ composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ composite.setFont(font);
+
+ /*
+ * Create the rest of the button bar, but tell it not to
+ * create a help button (we've already created it).
+ */
+ boolean helpAvailable = isHelpAvailable();
+ setHelpAvailable(false);
+ Composite c = (Composite) super.createButtonBar(composite);
+ GridLayout lay = (GridLayout) c.getLayout();
+ lay.marginHeight=0;
+ c.setLayout(lay);
+ composite.setLayout(layout);
+
+ setHelpAvailable(helpAvailable);
+ return composite;
+ }
+
+ @Override
+ protected Label createMessageArea(Composite composite) {
+ Label label = new Label(composite, SWT.NONE);
+ if (this.getMessage() != null) {
+ label.setText(this.getMessage());
+ }
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.verticalIndent=10;
+ label.setLayoutData(gd);
+
+ label.setFont(composite.getFont());
+ return label;
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLCTG.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLCTG.java
new file mode 100644
index 0000000000..0445ec0f6b
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLCTG.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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.systemtap.local.launch;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+
+/**
+ * Stripped down version of the Profiling LaunchConfigurationTabGroup
+ *
+ *
+ */
+public abstract class SystemTapLCTG extends AbstractLaunchConfigurationTabGroup {
+
+ public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
+ ArrayList<AbstractLaunchConfigurationTab> tabs = new ArrayList<AbstractLaunchConfigurationTab>();
+
+ tabs.addAll(Arrays.asList(getProfileTabs()));
+
+
+ setTabs(tabs.toArray(new AbstractLaunchConfigurationTab[tabs.size()]));
+ }
+
+ public abstract AbstractLaunchConfigurationTab[] getProfileTabs();
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLaunchConfigurationDelegate.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLaunchConfigurationDelegate.java
new file mode 100644
index 0000000000..f0c7ce00ad
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLaunchConfigurationDelegate.java
@@ -0,0 +1,473 @@
+/*******************************************************************************
+ * 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.systemtap.local.launch;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+
+import org.eclipse.cdt.launch.AbstractCLaunchDelegate;
+import org.eclipse.cdt.utils.pty.PTY;
+import org.eclipse.cdt.utils.spawner.ProcessFactory;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.IStreamListener;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.debug.core.model.IStreamMonitor;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.linuxtools.systemtap.local.core.Helper;
+import org.eclipse.linuxtools.systemtap.local.core.LaunchConfigurationConstants;
+import org.eclipse.linuxtools.systemtap.local.core.PluginConstants;
+import org.eclipse.linuxtools.systemtap.local.core.SystemTapCommandGenerator;
+import org.eclipse.linuxtools.systemtap.local.core.SystemTapErrorHandler;
+import org.eclipse.linuxtools.systemtap.local.core.SystemTapParser;
+import org.eclipse.linuxtools.systemtap.local.core.SystemTapUIErrorMessages;
+import org.eclipse.ui.console.TextConsole;
+import org.eclipse.ui.progress.UIJob;
+
+
+/**
+ * Delegate for Stap scripts. The Delegate generates part of the command string
+ * and schedules a job to finish generation of the command and execute.
+ *
+ */
+public class SystemTapLaunchConfigurationDelegate extends
+ AbstractCLaunchDelegate {
+
+ private static final String TEMP_ERROR_OUTPUT =
+ PluginConstants.PLUGIN_LOCATION + "stapTempError.error"; //$NON-NLS-1$
+ private String cmd;
+ private File temporaryScript = null;
+ private String arguments = ""; //$NON-NLS-1$
+ private String scriptPath = ""; //$NON-NLS-1$
+ private String binaryPath = ""; //$NON-NLS-1$
+ private String outputPath = ""; //$NON-NLS-1$
+ private boolean needsBinary = false; // Set to false if we want to use SystemTap
+ private boolean needsArguments = false;
+ @SuppressWarnings("unused")
+ private boolean useColour = false;
+ private String binaryArguments = ""; //$NON-NLS-1$
+
+
+ @Override
+ protected String getPluginID() {
+ return null;
+ }
+
+ @Override
+ public void launch(ILaunchConfiguration config, String mode,
+ ILaunch launch, IProgressMonitor m) throws CoreException {
+
+ if (m == null) {
+ m = new NullProgressMonitor();
+ }
+ SubMonitor monitor = SubMonitor.convert(m,
+ "SystemTap runtime monitor", 5); //$NON-NLS-1$
+
+ //System.out.println("SystemTapLaunchConfigurationDelegate: launch"); //$NON-NLS-1$
+
+ // check for cancellation
+ if (monitor.isCanceled()) {
+ return;
+ }
+
+
+
+ String command = ConfigurationOptionsSetter.setOptions(config);
+
+ if (config.getAttribute(LaunchConfigurationConstants.USE_COLOUR,
+ LaunchConfigurationConstants.DEFAULT_USE_COLOUR))
+ useColour = true;
+
+ if (!config.getAttribute(LaunchConfigurationConstants.ARGUMENTS,
+ LaunchConfigurationConstants.DEFAULT_ARGUMENTS).equals(
+ LaunchConfigurationConstants.DEFAULT_ARGUMENTS)) {
+ arguments = config.getAttribute(
+ LaunchConfigurationConstants.ARGUMENTS,
+ LaunchConfigurationConstants.DEFAULT_ARGUMENTS);
+ needsArguments = true;
+ }
+
+
+ if (!config.getAttribute(LaunchConfigurationConstants.BINARY_PATH,
+ LaunchConfigurationConstants.DEFAULT_BINARY_PATH).equals(
+ LaunchConfigurationConstants.DEFAULT_BINARY_PATH)) {
+ binaryPath = config.getAttribute(
+ LaunchConfigurationConstants.BINARY_PATH,
+ LaunchConfigurationConstants.DEFAULT_BINARY_PATH);
+ needsBinary = true;
+ }
+
+ if (!config.getAttribute(LaunchConfigurationConstants.BINARY_ARGUMENTS,
+ LaunchConfigurationConstants.DEFAULT_BINARY_ARGUMENTS).equals(
+ LaunchConfigurationConstants.DEFAULT_BINARY_ARGUMENTS)) {
+ binaryArguments = config.getAttribute(
+ LaunchConfigurationConstants.BINARY_ARGUMENTS,
+ LaunchConfigurationConstants.DEFAULT_BINARY_ARGUMENTS);
+ }
+
+
+
+ if (!config.getAttribute(LaunchConfigurationConstants.SCRIPT_PATH,
+ LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH).equals(
+ LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH)) {
+ scriptPath = config.getAttribute(
+ LaunchConfigurationConstants.SCRIPT_PATH,
+ LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH);
+ }
+
+ // Generate script if needed
+ if (config.getAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE,
+ LaunchConfigurationConstants.DEFAULT_NEED_TO_GENERATE)) {
+ temporaryScript = new File(scriptPath);
+ temporaryScript.delete();
+
+ try {
+ temporaryScript.createNewFile();
+ FileWriter fstream = new FileWriter(temporaryScript);
+ BufferedWriter out = new BufferedWriter(fstream);
+ out.write(config.getAttribute(
+ LaunchConfigurationConstants.GENERATED_SCRIPT,
+ LaunchConfigurationConstants.DEFAULT_GENERATED_SCRIPT));
+ out.close();
+ } catch (IOException e1) {
+ e1.printStackTrace();
+ }
+ }
+
+ outputPath = config.getAttribute(
+ LaunchConfigurationConstants.OUTPUT_PATH,
+ PluginConstants.DEFAULT_OUTPUT);
+ command += "-o " + outputPath; //$NON-NLS-1$
+ try {
+ File tempFile = new File(outputPath);
+ tempFile.createNewFile();
+ //Make sure the output file exists
+ } catch (IOException e1) {
+ e1.printStackTrace();
+ }
+
+
+ // check for cancellation
+ if (monitor.isCanceled()) {
+ return;
+ }
+
+ finishLaunch(launch, config, command, m, true);
+ }
+
+ public String getCommand() {
+ if (cmd.length() > 0)
+ return cmd;
+ else
+ return Messages.getString("SystemTapLaunchConfigurationDelegate.0"); //$NON-NLS-1$
+ }
+
+ public Process execute(String[] commandArray, String[] env, File wd,
+ boolean usePty) throws IOException {
+ Process process = null;
+ try {
+ if (wd == null) {
+ process = ProcessFactory.getFactory().exec(commandArray, env);
+ } else {
+ if (PTY.isSupported() && usePty) {
+ process = ProcessFactory.getFactory().exec(commandArray,
+ env, wd, new PTY());
+ } else {
+ process = ProcessFactory.getFactory().exec(commandArray,
+ env, wd);
+ }
+ }
+ } catch (IOException e) {
+ if (process != null) {
+ process.destroy();
+ }
+ return null;
+ }
+ return process;
+ }
+
+
+
+ protected IProcess createNewProcess(ILaunch launch, Process systemProcess,
+ String programName) {
+ return DebugPlugin.newProcess(launch, systemProcess,
+ renderProcessLabel(programName));
+ }
+
+ public String getCommandLine(String[] args) {
+ StringBuffer ret = new StringBuffer();
+ for (String arg : args) {
+ ret.append(arg + " "); //$NON-NLS-1$
+ }
+ return ret.toString().trim();
+ }
+
+
+ private class DocWriter extends UIJob {
+ private TextConsole console;
+ private String configName;
+ private String binaryCommand;
+
+ public DocWriter(String name, TextConsole console, String cName,
+ String binaryCommand) {
+ super(name);
+ this.console = console;
+ this.configName = cName;
+ this.binaryCommand = binaryCommand;
+ }
+
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+
+ if (console == null)
+ return Status.CANCEL_STATUS;
+
+ IDocument doc = console.getDocument();
+
+ if (binaryCommand.length() > 0)
+ try {
+ doc.replace(doc.getLength(), 0,
+ PluginConstants.NEW_LINE
+ + PluginConstants.NEW_LINE +"-------------" //$NON-NLS-1$
+ + PluginConstants.NEW_LINE
+ + Messages.getString("SystemTapLaunchConfigurationDelegate.DocWriterMessage1")//$NON-NLS-1$
+ + configName + PluginConstants.NEW_LINE +
+ Messages.getString("SystemTapLaunchConfigurationDelegate.DocWriterMessage2")//$NON-NLS-1$
+ + binaryCommand + PluginConstants.NEW_LINE +
+ Messages.getString("SystemTapLaunchConfigurationDelegate.DocWriterMessage3") + //$NON-NLS-1$
+ Messages.getString("SystemTapLaunchConfigurationDelegate.DocWriterMessage4") + //$NON-NLS-1$
+ Messages.getString("SystemTapLaunchConfigurationDelegate.DocWriterMessage5")//$NON-NLS-1$
+ );
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
+ else
+ try {
+ doc.replace(doc.getLength(), 0,
+ PluginConstants.NEW_LINE +
+ PluginConstants.NEW_LINE + "-------------" + //$NON-NLS-1$
+ PluginConstants.NEW_LINE +
+ Messages.getString("SystemTapLaunchConfigurationDelegate.DocWriterMessage1")//$NON-NLS-1$
+ + configName + PluginConstants.NEW_LINE +
+ Messages.getString("SystemTapLaunchConfigurationDelegate.DocWriterNoBinarySpecified") + //$NON-NLS-1$
+ PluginConstants.NEW_LINE + PluginConstants.NEW_LINE);
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
+
+ return Status.OK_STATUS;
+ }
+
+ }
+
+ private void finishLaunch(ILaunch launch, ILaunchConfiguration config, String command,
+ IProgressMonitor monitor, boolean retry) {
+ try {
+ File workDir = getWorkingDirectory(config);
+ if (workDir == null) {
+ workDir = new File(System.getProperty("user.home", ".")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+
+
+ // Generate the command
+ SystemTapCommandGenerator cmdGenerator = new SystemTapCommandGenerator();
+ cmd = cmdGenerator.generateCommand(scriptPath, binaryPath,
+ command, needsBinary, needsArguments, arguments, binaryArguments);
+
+
+// MP.println(cmd);
+ // Prepare cmd for execution - we need a command array of strings,
+ // no string can contain a space character. (One of the process'
+ // requirements)
+ String tmp[] = cmd.split(" "); //$NON-NLS-1$
+ ArrayList<String> cmdLine = new ArrayList<String>();
+ for (String str : tmp) {
+ cmdLine.add(str);
+ }
+ String[] commandArray = (String[]) cmdLine
+ .toArray(new String[cmdLine.size()]);
+
+ // Check for cancellation
+ if (monitor.isCanceled()) {
+ return;
+ }
+
+ monitor.worked(1);
+
+ if (launch == null) {
+ return;
+ }
+ // Not sure if this line is necessary
+ // set the default source locator if required
+ setDefaultSourceLocator(launch, config);
+
+ String parserClass = config.getAttribute(LaunchConfigurationConstants.PARSER_CLASS,
+ LaunchConfigurationConstants.DEFAULT_PARSER_CLASS);
+ IExtensionRegistry reg = Platform.getExtensionRegistry();
+ IConfigurationElement[] extensions = reg
+ .getConfigurationElementsFor(PluginConstants.PARSER_RESOURCE,
+ PluginConstants.PARSER_NAME,
+ parserClass);
+
+
+ if (extensions == null || extensions.length < 1) {
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages("Invalid parser", "invalid parser",
+ "The selected parser is not valid. Please select a different parser. \n\n" +
+ "Invalid id: " + parserClass);
+ mess.schedule();
+ return;
+ }
+
+ IConfigurationElement element = extensions[0];
+
+ SystemTapParser parser =
+ (SystemTapParser) element.createExecutableExtension("class");
+
+
+ if (element.getAttribute("realtime") == "true") {
+ parser.schedule();
+ }
+
+ monitor.worked(1);
+
+
+ Process subProcess = execute(commandArray, getEnvironment(config),
+ workDir, true);
+
+ if (subProcess == null){
+ //TODO: FIgure out what the console error message is so we can catch it in errorlog
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("SystemTapLaunchConfigurationDelegate.NullProcessErrorName"), Messages.getString("SystemTapLaunchConfigurationDelegate.NullProcessErrorTitle"), //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.getString("SystemTapLaunchConfigurationDelegate.NullProcessErrorMessage1") + //$NON-NLS-1$
+ Messages.getString("SystemTapLaunchConfigurationDelegate.NullProcessErrorMessage2")); //$NON-NLS-1$
+ mess.schedule();
+ return;
+ }
+
+ IProcess process = createNewProcess(launch, subProcess,
+ commandArray[0]);
+ // set the command line used
+ process.setAttribute(IProcess.ATTR_CMDLINE,
+ cmd);
+ monitor.worked(1);
+ ((TextConsole)Helper.getConsoleByName(config.getName())).activate();
+
+ StreamListener s = new StreamListener();
+ process.getStreamsProxy().getErrorStreamMonitor().addListener(s);
+
+
+
+ while (!process.isTerminated()) {
+ Thread.sleep(100);
+ if (monitor.isCanceled()) {
+ Runtime run = Runtime.getRuntime();
+ run.exec("kill stap"); //$NON-NLS-1$
+ process.terminate();
+ return;
+ }
+ }
+ Thread.sleep(100);
+ s.close();
+
+ if (process.getExitValue() != 0) {
+ //SystemTap terminated with errors, parse console to figure out which error
+ IDocument doc = Helper.getConsoleDocumentByName(config.getName());
+ //Sometimes the console has not been printed to yet, wait for a little while longer
+ if (doc.get().length() < 1)
+ Thread.sleep(300);
+ SystemTapErrorHandler errorHandler = new SystemTapErrorHandler();
+ errorHandler.handle(monitor, config.getName() + Messages.getString("SystemTapLaunchConfigurationDelegate.stap_command") //$NON-NLS-1$
+ + PluginConstants.NEW_LINE + cmd
+ + PluginConstants.NEW_LINE + PluginConstants.NEW_LINE);
+ errorHandler.handle(monitor, new FileReader(TEMP_ERROR_OUTPUT)); //$NON-NLS-1$
+ if (monitor != null && monitor.isCanceled())
+ return;
+
+
+ if (errorHandler.hasMismatchedProbePoints() && retry) {
+ errorHandler.finishHandling(monitor, s.getNumberOfErrors());
+ if (monitor != null && monitor.isCanceled())
+ return;
+ finishLaunch(launch, config, command, monitor, false);
+ return;
+ }
+ errorHandler.finishHandling(monitor, s.getNumberOfErrors());
+
+ return;
+ }
+
+ if (element.getAttribute("realtime") != "true") {
+ parser.schedule();
+ }
+
+
+ monitor.worked(1);
+
+ } catch (IOException e) {
+ e.printStackTrace();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ } catch (CoreException e) {
+ e.printStackTrace();
+ } finally {
+ DocWriter dw = new DocWriter(Messages.getString("SystemTapLaunchConfigurationDelegate.DocWriterName"), //$NON-NLS-1$
+ ((TextConsole)Helper.getConsoleByName(config.getName())), config.getName(),
+ binaryArguments);
+ dw.schedule();
+ monitor.done();
+ }
+ }
+
+ private class StreamListener implements IStreamListener{
+ private Helper h;
+ private int counter;
+ public StreamListener() throws IOException {
+ h = new Helper();
+ counter = 0;
+ h.setBufferedWriter(TEMP_ERROR_OUTPUT); //$NON-NLS-1$
+ }
+ @Override
+ public void streamAppended(String text, IStreamMonitor monitor) {
+ try {
+ counter++;
+ if (counter < PluginConstants.MAX_ERRORS)
+ h.appendToExistingFile(text);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ public void close() throws IOException {
+ h.closeBufferedWriter();
+ }
+
+ public int getNumberOfErrors() {
+ return counter;
+ }
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLaunchConfigurationTabGroup.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLaunchConfigurationTabGroup.java
new file mode 100644
index 0000000000..70212f7230
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLaunchConfigurationTabGroup.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * 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.systemtap.local.launch;
+
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
+
+/**
+ * Expansion of the SystemTapLCTG, which was a stripped down version of the ProfileLaunchConfigurationTabGroup
+ *
+ * @author chwang
+ *
+ */
+public class SystemTapLaunchConfigurationTabGroup extends SystemTapLCTG{
+
+ public AbstractLaunchConfigurationTab[] getProfileTabs() {
+ return new AbstractLaunchConfigurationTab[] {
+ new SystemTapOptionsTab()
+ };
+ }
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLaunchShortcut.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLaunchShortcut.java
new file mode 100644
index 0000000000..0a7da93c0f
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLaunchShortcut.java
@@ -0,0 +1,793 @@
+/*******************************************************************************
+ * 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.systemtap.local.launch;
+
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IIndexBinding;
+import org.eclipse.cdt.core.index.IIndexFile;
+import org.eclipse.cdt.core.index.IIndexManager;
+import org.eclipse.cdt.core.index.IIndexName;
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.IBinary;
+import org.eclipse.cdt.core.model.ICContainer;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+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;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.jface.window.Window;
+import org.eclipse.linuxtools.profiling.launch.ProfileLaunchShortcut;
+import org.eclipse.linuxtools.systemtap.local.core.LaunchConfigurationConstants;
+import org.eclipse.linuxtools.systemtap.local.core.PluginConstants;
+import org.eclipse.linuxtools.systemtap.local.core.SystemTapUIErrorMessages;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+
+
+public class SystemTapLaunchShortcut extends ProfileLaunchShortcut{
+ protected IEditorPart editor;
+ protected ILaunchConfiguration config;
+
+ private static final String USER_SELECTED_ALL = "ALL"; //$NON-NLS-1$
+
+ protected String name;
+ protected String binaryPath;
+ protected String scriptPath; //$NON-NLS-1$
+ protected String arguments;
+ protected String outputPath;
+ protected String binName;
+ protected String dirPath;
+ protected String generatedScript;
+ protected String parserID;
+ protected boolean needToGenerate;
+ protected boolean overwrite;
+ protected boolean useColours;
+ protected String resourceToSearchFor;
+ protected boolean searchForResource;
+ protected IBinary bin;
+
+
+ private Button OKButton;
+ private boolean testMode = false;
+
+
+ /**
+ * Provides access to the Profiling Frameworks' launch method
+ *
+ * @param editor
+ * @param mode
+ */
+ public void reLaunch(IEditorPart editor, String mode) {
+ launch(editor, mode);
+ }
+
+ public void Init() {
+ name = ""; //$NON-NLS-1$
+ dirPath = ResourcesPlugin.getWorkspace().getRoot().getLocation().toString();
+ binaryPath = LaunchConfigurationConstants.DEFAULT_BINARY_PATH;
+ arguments = LaunchConfigurationConstants.DEFAULT_ARGUMENTS;
+ outputPath = PluginConstants.STAP_GRAPH_DEFAULT_IO_PATH;
+ overwrite = true;
+ scriptPath = null; //Every shortcut MUST declare its own script path.
+ generatedScript = LaunchConfigurationConstants.DEFAULT_GENERATED_SCRIPT;
+ needToGenerate = false;
+ useColours = false;
+ parserID = null;
+ }
+
+ @Override
+ protected ILaunchConfigurationType getLaunchConfigType() {
+ //System.out.println("SystemTapLaunchShortcut: getLaunchConfigType"); //$NON-NLS-1$
+ return getLaunchManager().getLaunchConfigurationType(PluginConstants.CONFIGURATION_TYPE_ID);
+ }
+
+
+ @Override
+ protected void setDefaultProfileAttributes(
+ ILaunchConfigurationWorkingCopy wc) throws CoreException {
+ SystemTapOptionsTab tab = new SystemTapOptionsTab();
+ tab.setDefaults(wc);
+ //System.out.println("SystemTapLaunchShortcut: setDefaultProfileAttributes"); //$NON-NLS-1$
+ }
+
+
+ protected ILaunchConfiguration checkForExistingConfiguration() {
+ ILaunchConfigurationType configType = getLaunchConfigType();
+ try {
+ ILaunchConfiguration[] configs = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations(configType);
+
+ for (int i = 0; i < configs.length; i++) {
+ if (configs[i].exists() && configs[i]!=null && !config.equals(configs[i])) {
+ if(checkIfAttributesAreEqual(config, configs[i])) {
+ config.delete();
+ config = configs[i];
+ }
+ }
+ }
+
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+
+ return config;
+
+ }
+
+
+ /**
+ * Returns true if two configurations are exactly identical (i.e. all attributes are equal)
+ *
+ * @param first
+ * @param second
+ * @return True if two configurations are exactly identical (i.e. all attributes are equal)
+ */
+ private boolean checkIfAttributesAreEqual(ILaunchConfiguration first,ILaunchConfiguration second) {
+ boolean isEqual = false;
+
+ try {
+ if (first.getAttributes().equals(second.getAttributes()))
+ isEqual = true;
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+
+ return isEqual;
+ }
+
+/**
+ * Helper function to complete launches. Uses protected parameters
+ * (Strings) scriptPath, binaryPath, arguments, outputPath and (boolean)
+ * overwrite. These must be set by the calling function (or else
+ * nonsensical results will occur).
+ *
+ * ScriptPath MUST be set.
+ *
+ * @param name: Used to generate the name of the new configuration
+ * @param bin: Affiliated executable
+ * @param mode: Mode setting
+ * @throws Exception
+ */
+ protected void finishLaunch(String name, String mode) throws Exception {
+ if (parserID == null)
+ throw new Exception();
+
+ if (scriptPath.length() < 1) {
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("SystemTapLaunchShortcut.ErrorMessageName"), //$NON-NLS-1$
+ Messages.getString("SystemTapLaunchShortcut.ErrorMessageTitle"), Messages.getString("SystemTapLaunchShortcut.ErrorMessage") + name); //$NON-NLS-1$ //$NON-NLS-2$
+ mess.schedule();
+ return;
+ }
+
+
+ ILaunchConfigurationWorkingCopy wc = null;
+ if (config != null) {
+ try {
+ wc = config.getWorkingCopy(); //$NON-NLS-1$
+ } catch (CoreException e1) {
+ e1.printStackTrace();
+ }
+
+ wc.setAttribute(LaunchConfigurationConstants.SCRIPT_PATH, scriptPath);
+ wc.setAttribute(LaunchConfigurationConstants.BINARY_PATH, binaryPath);
+ wc.setAttribute(LaunchConfigurationConstants.OUTPUT_PATH, outputPath);
+ wc.setAttribute(LaunchConfigurationConstants.ARGUMENTS, arguments);
+ wc.setAttribute(LaunchConfigurationConstants.GENERATED_SCRIPT, generatedScript);
+ wc.setAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE, needToGenerate);
+ wc.setAttribute(LaunchConfigurationConstants.OVERWRITE, overwrite);
+ wc.setAttribute(LaunchConfigurationConstants.USE_COLOUR, useColours);
+ wc.setAttribute(LaunchConfigurationConstants.PARSER_CLASS, parserID);
+
+
+ try {
+ config = wc.doSave();
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+
+ checkForExistingConfiguration();
+
+ if (!testMode)
+ DebugUITools.launch(config, mode);
+ }
+
+ }
+
+ //TODO: Should merge finishWith and Without binary - we only use
+ //the IBinary to find the name, in any case.
+ /**
+ * This function is identical to the function above, except it does not
+ * require a binary.
+ *
+ * Helper function to complete launches. Uses protected parameters
+ * (Strings) scriptPath, arguments, outputPath and (boolean)
+ * overwrite. These must be set by the calling function (or else
+ * nonsensical results will occur).
+ *
+ * ScriptPath MUST be set.
+ *
+ * @param name: Used to generate the name of the new configuration
+ * @param bin: Affiliated executable
+ * @param mode: Mode setting
+ */
+protected void finishLaunchWithoutBinary(String name, String mode) {
+
+
+ if (scriptPath.length() < 1) {
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("SystemTapLaunchShortcut.ErrorMessagename"), //$NON-NLS-1$
+ Messages.getString("SystemTapLaunchShortcut.ErrorMessageTitle"), Messages.getString("SystemTapLaunchShortcut.ErrorMessage") + name); //$NON-NLS-1$ //$NON-NLS-2$
+ mess.schedule();
+ return;
+ }
+
+ ILaunchConfigurationWorkingCopy wc = null;
+ if (config != null) {
+ try {
+ wc = config.getWorkingCopy();
+ } catch (CoreException e1) {
+ e1.printStackTrace();
+ }
+
+ wc.setAttribute(LaunchConfigurationConstants.SCRIPT_PATH, scriptPath);
+ wc.setAttribute(LaunchConfigurationConstants.OUTPUT_PATH, outputPath);
+ wc.setAttribute(LaunchConfigurationConstants.ARGUMENTS, arguments);
+ wc.setAttribute(LaunchConfigurationConstants.GENERATED_SCRIPT, generatedScript);
+ wc.setAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE, needToGenerate);
+ wc.setAttribute(LaunchConfigurationConstants.OVERWRITE, overwrite);
+ wc.setAttribute(LaunchConfigurationConstants.USE_COLOUR, useColours);
+
+
+ try {
+ config = wc.doSave();
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ checkForExistingConfiguration();
+
+ if (!testMode)
+ DebugUITools.launch(config, mode);
+ }
+ }
+
+
+/**
+ * Returns bin.getPath().toString()
+ *
+ * @param bin
+ * @return
+ */
+ public String getName(IBinary bin) {
+ if (bin != null) {
+ binName = bin.getPath().toString();
+ } else {
+ binName = ""; //$NON-NLS-1$
+// SystemTapUIErrorMessages error = new SystemTapUIErrorMessages(
+// "Null_Binary",
+// "Invalid executable",
+// "An error has occured: a binary/executable file was not given to the launch shortcut.");
+// error.schedule();
+ }
+ return binName;
+ }
+
+ /**
+ * Creates a configuration for the given IBinary
+ *
+ */
+ @Override
+ protected ILaunchConfiguration createConfiguration(IBinary bin){
+ if (bin != null){
+ return super.createConfiguration(bin);
+ }else{
+ try {
+ return getLaunchConfigType().newInstance(null, getLaunchManager().generateUniqueLaunchConfigurationNameFrom(Messages.getString("SystemTapLaunchShortcut.0"))); //$NON-NLS-1$
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+ return null;
+ }
+
+
+
+ /**
+ * Creates a configuration with the given name - does not use a binary
+ *
+ * @param name
+ * @return
+ */
+ protected ILaunchConfiguration createConfiguration(String name) {
+ ILaunchConfiguration config = null;
+ try {
+ ILaunchConfigurationType configType = getLaunchConfigType();
+ ILaunchConfigurationWorkingCopy wc = configType.newInstance(null, getLaunchManager().generateUniqueLaunchConfigurationNameFrom(name));
+
+ setDefaultProfileAttributes(wc);
+
+ config = wc.doSave();
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ return config;
+ }
+
+ /**
+ * Allows null configurations to be launched. Any launch that uses a binary should
+ * never call this configuration with a null parameter, and any launch that does not
+ * use a binary should never call this function. The null handling is included for
+ * ease of testing.
+ *
+ * @param bin
+ * @param name - Customize the name based on the shortcut being launched
+ * @return A launch configuration, or null
+ */
+ protected ILaunchConfiguration createConfiguration(IBinary bin, String name) {
+ if (bin != null) {
+ config = null;
+ try {
+ String projectName = bin.getResource().getProjectRelativePath().toString();
+ ILaunchConfigurationType configType = getLaunchConfigType();
+ ILaunchConfigurationWorkingCopy wc = configType.newInstance(null,
+ getLaunchManager().generateUniqueLaunchConfigurationNameFrom(name + " - " + bin.getElementName())); //$NON-NLS-1$
+
+ wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, projectName);
+ wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, bin.getCProject().getElementName());
+ wc.setMappedResources(new IResource[] {bin.getResource(), bin.getResource().getProject()});
+ wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, (String) null);
+
+ setDefaultProfileAttributes(wc);
+
+ config = wc.doSave();
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+ else
+ try {
+ ILaunchConfigurationWorkingCopy wc = getLaunchConfigType().newInstance(null, getLaunchManager().generateUniqueLaunchConfigurationNameFrom(name)); //$NON-NLS-1$
+ setDefaultProfileAttributes(wc);
+ config = wc.doSave();
+ } catch (CoreException e) {
+ e.printStackTrace();
+ return null;
+ }
+ return config;
+ }
+
+ /**
+ * Creates an error message stating that the launch failed for the specified reason.
+ *
+ * @param reason
+ */
+ protected void failedToLaunch(String reason) {
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("SystemTapLaunchShortcut.StapLaunchFailed"), //$NON-NLS-1$
+ Messages.getString("SystemTapLaunchShortcut.StapLaunchFailedTitle"), Messages.getString("SystemTapLaunchShortcut.StapLaunchFailedMessage") + reason); //$NON-NLS-1$ //$NON-NLS-2$
+ mess.schedule();
+ }
+
+
+ public void errorHandler() {
+ };
+
+
+ /**
+ * The following are convenience methods for test programs, etc. to check
+ * the value of certain protected parameters.
+ *
+ */
+ public ILaunchConfigurationType outsideGetLaunchConfigType() {
+ return getLaunchConfigType();
+ }
+
+ public ILaunchConfiguration getConfig() {
+ return config;
+ }
+
+ public String getScriptPath() {
+ return scriptPath;
+ }
+
+ public String getDirPath() {
+ return dirPath;
+ }
+
+ public String getArguments() {
+ return arguments;
+ }
+
+ public String getBinaryPath() {
+ return binaryPath;
+ }
+
+ /**
+ * Retrieves the names of all functions referenced by the binary. If searchForResource
+ * is true, this function will return all function names belonging to an element with name
+ * matching the String held by resourceToSearchFor. Otherwise it will create a dialog
+ * prompting the user to select from a list of files to profile, or select the only
+ * available file if only one file is available.
+ *
+ *
+ * @param bin
+ * @return
+ */
+ protected String getFunctionsFromBinary(IBinary bin, String targetResource) {
+ String funcs = ""; //$NON-NLS-1$
+ if (bin == null)
+ return funcs;
+ try {
+ ArrayList<ICContainer> list = new ArrayList<ICContainer>();
+ TranslationUnitVisitor v = new TranslationUnitVisitor();
+// ASTTranslationUnitVisitor v = new ASTTranslationUnitVisitor();
+
+ for (ICElement b : bin.getCProject().getChildrenOfType(ICElement.C_CCONTAINER)) {
+ ICContainer c = (ICContainer) b;
+
+ for (ITranslationUnit tu : c .getTranslationUnits()) {
+ if (searchForResource && tu.getElementName().contains(targetResource)) {
+ tu.accept(v);
+ funcs+=v.getFunctions();
+ return funcs;
+ } else {
+ if (!list.contains(c))
+ list.add(c);
+ }
+ }
+
+ //Iterate down to all children, checking for more C_Containers
+ while (c.getChildrenOfType(ICElement.C_CCONTAINER).size() > 0) {
+ ICContainer e = null;
+ for (ICElement d : c.getChildrenOfType(ICElement.C_CCONTAINER)) {
+ e = (ICContainer) d;
+ for (ITranslationUnit tu : e.getTranslationUnits()) {
+ if (searchForResource && tu.getElementName().contains(targetResource)) {
+ tu.accept(v);
+ funcs+=(v.getFunctions());
+ return funcs;
+ } else {
+ if (!list.contains(c))
+ list.add(c);
+ }
+ }
+ }
+ c = e;
+ }
+ }
+
+ int numberOfFiles = numberOfValidFiles(list.toArray());
+ if (numberOfFiles == 1) {
+ for (ICContainer c : list) {
+ for (ITranslationUnit e : c.getTranslationUnits()) {
+ if (e.getElementName().endsWith(".c") || //$NON-NLS-1$
+ e.getElementName().endsWith(".cpp")) { //$NON-NLS-1$
+ e.accept(v);
+ funcs+=v.getFunctions();
+ }
+ }
+ }
+ } else {
+
+ Object[] unitList = chooseUnit(list, numberOfFiles);
+ if (unitList == null || unitList.length == 0) {
+ return null; //$NON-NLS-1$
+ } else if (unitList.length == 1 && unitList[0].toString().equals(USER_SELECTED_ALL)) {
+ funcs = "*"; //$NON-NLS-1$
+ return funcs;
+ }
+
+ StringBuffer tmpFunc = new StringBuffer();
+ for (String item : getAllFunctions(bin.getCProject(), unitList)){
+ tmpFunc.append(item);
+ tmpFunc.append(" "); //$NON-NLS-1$
+ }
+ funcs = tmpFunc.toString();
+
+ }
+
+ return funcs;
+
+ } catch (CModelException e) {
+ e.printStackTrace();
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
+ /**
+ * Creates a dialog that prompts the user to select from the given list
+ * of ICElements
+ *
+ * @param list: list of ICElements
+ * @return
+ */
+ protected Object[] chooseUnit(List<ICContainer> list, int numberOfValidFiles) {
+ ListTreeContentProvider prov = new ListTreeContentProvider();
+
+ RuledTreeSelectionDialog dialog = new RuledTreeSelectionDialog(getActiveWorkbenchShell(),
+ new WorkbenchLabelProvider(), prov);
+
+ dialog.setTitle(Messages.getString("SystemTapLaunchShortcut.8")); //$NON-NLS-1$
+ dialog.setMessage(Messages.getString("SystemTapLaunchShortcut.9")); //$NON-NLS-1$
+ dialog.setInput(list);
+ dialog.setHelpAvailable(false);
+ dialog.setStatusLineAboveButtons(false);
+ dialog.setEmptyListMessage(Messages.getString("SystemTapLaunchShortcut.10")); //$NON-NLS-1$
+ dialog.setContainerMode(true);
+
+ Object[] topLevel = prov.findElements(list);
+ dialog.setInitialSelections(topLevel);
+ dialog.setSize(cap(topLevel.length*10, 30, 55),
+ cap((int) (topLevel.length*1.5), 3, 13));
+
+ dialog.create();
+ OKButton = dialog.getOkButton();
+
+ Object[] result = null;
+
+
+ if (testMode) {
+ OKButton.setSelection(true);
+ result = list.toArray();
+ ArrayList<Object> output = new ArrayList<Object>();
+ try {
+ for (Object obj : result) {
+ if (obj instanceof ICContainer){
+ ICElement[] array = ((ICContainer) obj).getChildren();
+ for (ICElement c : array) {
+ if (!(c.getElementName().endsWith(".c") || //$NON-NLS-1$
+ c.getElementName().endsWith(".cpp"))) //$NON-NLS-1$
+ continue;
+ if (c.getElementName().contains("main") && !output.contains(c)) //$NON-NLS-1$
+ output.add(c);
+ }
+ }
+ }
+
+ if ( output.size() >= numberOfValidFiles) {
+ output.clear();
+ output.add(USER_SELECTED_ALL);
+ }
+ } catch (CModelException e) {
+ e.printStackTrace();
+ }
+
+ result = output.toArray();
+ }
+ else {
+ if (dialog.open() == Window.CANCEL)
+ return null;
+ result = dialog.getResult();
+ }
+
+ if (result == null)
+ return null;
+
+ ArrayList<Object> output = new ArrayList<Object>();
+ try {
+ for (Object obj : result) {
+ if (obj instanceof ICContainer){
+ ICElement[] array = ((ICContainer) obj).getChildren();
+ for (ICElement c : array) {
+ if (!(c.getElementName().endsWith(".c") || //$NON-NLS-1$
+ c.getElementName().endsWith(".cpp"))) //$NON-NLS-1$
+ continue;
+ if (!output.contains(c))
+ output.add(c);
+ }
+ }
+ else if (obj instanceof ICElement) {
+ if (((ICElement) obj).getElementName().endsWith(".c") //$NON-NLS-1$
+ || ((ICElement) obj).getElementName().endsWith(".cpp")) { //$NON-NLS-1$
+ if (!output.contains(obj)) {
+ output.add(obj);
+ }
+ }
+ }
+ }
+
+ if ( output.size() >= numberOfValidFiles) {
+ output.clear();
+ output.add(USER_SELECTED_ALL);
+ }
+ } catch (CModelException e) {
+ e.printStackTrace();
+ }
+
+ return output.toArray();
+ }
+
+
+ private int numberOfValidFiles(Object[] list) throws CModelException {
+ int output = 0;
+ for (Object parent : list) {
+ if (parent instanceof ICContainer) {
+ ICContainer cont = (ICContainer) parent;
+ for (ICElement ele : cont.getChildren()) {
+ if (ele instanceof ICContainer) {
+ output += numberOfValidFiles(((ICContainer) ele).getChildren());
+ }
+ if (ele instanceof ICElement) {
+ if (ele.getElementName().endsWith(".c") || //$NON-NLS-1$
+ ele.getElementName().endsWith(".cpp")) //$NON-NLS-1$
+ output++;
+ }
+ }
+ } else if (parent instanceof ICElement) {
+ if (((ICElement) parent).getElementName().endsWith(".c") || //$NON-NLS-1$
+ ((ICElement) parent).getElementName().endsWith(".cpp")) //$NON-NLS-1$
+ output++;
+ }
+ }
+ return output;
+ }
+
+
+ /**
+ * Convenience method for creating a new configuration
+ * @return a new configuration
+ * @throws CoreException
+ */
+ public ILaunchConfiguration getNewConfiguration() throws CoreException {
+ ILaunchConfigurationType configType = getLaunchConfigType();
+ ILaunchConfigurationWorkingCopy wc = configType.newInstance(null,
+ getLaunchManager().generateUniqueLaunchConfigurationNameFrom("TestingConfiguration")); //$NON-NLS-1$
+
+ return wc.doSave();
+
+ }
+
+
+ /**
+ * @param project : C Project Type
+ * @return A String list of all functions contained within the specified
+ * C Project
+ */
+ public static ArrayList<String> getAllFunctions(ICProject project, Object [] listOfFiles){
+ try {
+ GetFunctionsJob j = new GetFunctionsJob(project.getHandleIdentifier(), project, listOfFiles);
+ j.schedule();
+ j.join();
+ ArrayList<String> functionList = j.getFunctionList();
+
+ return functionList;
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ private static boolean specialContains (Object [] list, String input){
+ for (Object val : list){
+ if (val instanceof ICElement) {
+ ICElement el = (ICElement) val;
+ if (el.getPath().toString().contains(input)){
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+
+
+ private int cap (int number, int low, int high) {
+ if (number > high)
+ return high;
+ if (number < low)
+ return low;
+ return number;
+ }
+
+ /**
+ * Function for generating scripts. Should be overriden by interested classes
+ * @throws IOException
+ */
+ public String generateScript() throws IOException {
+ return null;
+ }
+
+ public void setScriptPath(String val) {
+ this.scriptPath = val;
+ }
+
+ public void setBinary(IBinary val) {
+ this.bin = val;
+ }
+
+
+ private static class GetFunctionsJob extends Job {
+ private ArrayList<String> functionList;
+ private ICProject project;
+ private Object[] listOfFiles;
+
+ public GetFunctionsJob(String name, ICProject p, Object[] o) {
+ super(name);
+ functionList = new ArrayList<String>();
+ listOfFiles = o;
+ project = p;
+ }
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ IIndexManager manager = CCorePlugin.getIndexManager();
+ IIndex index = null;
+
+ try {
+ index = manager.getIndex(project);
+ index.acquireReadLock();
+
+ IIndexFile[] blah = index.getAllFiles();
+ for (IIndexFile file : blah) {
+ String fullFilePath = file.getLocation().getFullPath();
+ if (fullFilePath == null || !specialContains(listOfFiles, fullFilePath)) {
+ continue;
+ }
+
+ IIndexName[] indexNamesArray = file.findNames(0, Integer.MAX_VALUE);
+ for (IIndexName name : indexNamesArray) {
+ if (name.isDefinition() && specialContains(listOfFiles, name.getFile().getLocation().getFullPath())) {
+ IIndexBinding binder = index.findBinding(name);
+ if (binder instanceof IFunction && !functionList.contains(binder.getName())) {
+ functionList.add(binder.getName());
+ }
+ }
+ }
+
+ }
+
+ } catch (CoreException e) {
+ e.printStackTrace();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+
+ index.releaseReadLock();
+ return Status.OK_STATUS;
+ }
+
+ public ArrayList<String> getFunctionList() {
+ return functionList;
+ }
+ }
+
+
+ public String getScript() {
+ return generatedScript;
+ }
+
+ public Button getButton() {
+ return OKButton;
+ }
+
+ public void setTestMode(boolean val) {
+ testMode = val;
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapOptionsTab.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapOptionsTab.java
new file mode 100644
index 0000000000..2c8c7bf0e2
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapOptionsTab.java
@@ -0,0 +1,1011 @@
+/*******************************************************************************
+ * 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.systemtap.local.launch;
+
+import java.io.File;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.linuxtools.systemtap.local.core.LaunchConfigurationConstants;
+import org.eclipse.linuxtools.systemtap.local.core.PluginConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Spinner;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.ElementListSelectionDialog;
+import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
+import org.eclipse.ui.model.WorkbenchContentProvider;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+import org.eclipse.ui.views.navigator.ResourceComparator;
+
+/**
+ * Options tab for SystemTap. Currently does NOT contain all possible options
+ *
+ */
+public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
+
+ //Control creation objects
+ protected Composite top;
+ protected ScrolledComposite scrollTop;
+ protected Combo toolsCombo;
+
+ protected TabFolder fileFolder;
+ protected TabFolder commandFolder;
+ protected TabFolder argumentsFolder;
+ protected TabFolder binaryArgumentsFolder;
+ protected TabFolder parserFolder;
+ protected TabFolder generatedScriptFolder;
+
+ //Controls
+ protected Text scriptFile;
+ protected Text binaryFile;
+ protected Text arguments;
+ protected Text generatedScript;
+ protected Text outputFile;
+ protected Text button_D_text;
+ protected Text binaryArguments;
+ protected Text parser;
+// protected Text commandFile;
+
+ protected Button fileBrowseButton;
+ protected Button workspaceBrowseButton;
+ protected Button parserButton;
+
+ protected Button button_v;
+ protected Button button_k;
+ protected Button button_u;
+ protected Button button_w;
+ protected Button button_b;
+ protected Button button_g;
+ protected Button button_P;
+ protected Button button_t;
+ protected Button button_build;
+ protected Button button_F;
+ protected Button button_skip_badvars;
+ protected Button button_ignore_dwarf;
+ protected Button button_q;
+ protected Button needsBinaryButton;
+ protected Button needToGenerateScriptButton;
+ protected Button button_graphicsMode;
+
+
+ protected Spinner button_p_Spinner;
+ protected Spinner button_s_Spinner;
+ protected Spinner button_x_Spinner;
+
+ private Button useColourButton;
+// private Button generateScriptButton;
+
+ //Other variables
+ protected String workspacePath;
+ protected String[] tools;
+ protected boolean output_file_has_changed = false;
+ protected boolean needsOverwritePermission = false;
+ protected boolean overwritePermission = false;
+ private boolean changeOverwrite = false;
+
+ /**
+ * The code below is very long, but it boils down to this.
+ *
+ * The main function is createControl. This function prepares
+ * some space for the various tabs and calls the other create*Option
+ * functions to create buttons, text fields and spinners.
+ *
+ * The create*Option functions create their respective sub-tabs.
+ *
+ * Each of the controls (button, text, spinner) needs to have a listener
+ * attached so Eclipse knows what to do with them.
+ *
+ * There are a bunch of functions to update/set defaults/initialize,
+ * and a final
+ */
+
+ protected SelectionListener graphicsModeListener = new SelectionAdapter(){
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (scriptFile.isEnabled()){
+ scriptFile.setEnabled(false);
+ workspaceBrowseButton.setEnabled(false);
+ fileBrowseButton.setEnabled(false);
+ scriptFile.setText(PluginConstants.PLUGIN_LOCATION+"parse_function.stp"); //$NON-NLS-1$
+ }else{
+ scriptFile.setEnabled(true);
+ workspaceBrowseButton.setEnabled(true);
+ fileBrowseButton.setEnabled(true);
+ }
+ updateLaunchConfigurationDialog();
+ }
+ };
+
+ protected SelectionListener selectListener = new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ updateLaunchConfigurationDialog();
+ }
+ };
+
+ protected ModifyListener modifyListener = new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ updateLaunchConfigurationDialog();
+ }
+ };
+
+ protected ModifyListener modifyListenerOutput = new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ updateLaunchConfigurationDialog();
+ output_file_has_changed = true;
+ }
+ };
+
+ protected FocusListener focusListener = new FocusListener() {
+
+ @Override
+ public void focusGained(FocusEvent e) {
+ //Do nothing
+ }
+
+ @Override
+ public void focusLost(FocusEvent e) {
+ if (output_file_has_changed) {
+ checkOverwrite();
+ }
+ output_file_has_changed = false;
+
+ updateLaunchConfigurationDialog();
+ }
+ };
+
+ /**
+ * Convenience method to check if the overwrite permissions are consistent
+ *
+ * Helps ensure validity of configuration.
+ */
+ public void checkOverwrite() {
+ File f = new File(outputFile.getText());
+ changeOverwrite = true;
+ if (f.exists()) {
+ needsOverwritePermission = true;
+ Shell sh = new Shell();
+ if (MessageDialog.openConfirm(sh, Messages.getString("SystemTapOptionsTab.ConfirmOverwriteFileTitle"), //$NON-NLS-1$
+ Messages.getString("SystemTapOptionsTab.ConfirmOverwriteFileMessage"))) { //$NON-NLS-1$
+ overwritePermission = true;
+ } else {
+ overwritePermission = false;
+ }
+ }
+ else
+ needsOverwritePermission = false;
+ }
+
+ /**
+ * This function prepares some space for the various
+ * tabs and calls and sets the other create*Option
+ * functions to create buttons, text fields and spinners.
+ */
+ @Override
+ public void createControl(Composite parent) {
+ scrollTop = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL);
+ scrollTop.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ scrollTop.setExpandVertical(true);
+ scrollTop.setExpandHorizontal(true);
+
+ setControl(scrollTop);
+
+ top = new Composite(scrollTop, SWT.NONE);
+ top.setLayout(new GridLayout());
+
+ scrollTop.setContent(top);
+
+ /*
+ * File folder - tab for selecting binary/stp file
+ */
+ fileFolder = new TabFolder(top, SWT.BORDER);
+ fileFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ TabItem fileTab = new TabItem(fileFolder, SWT.NONE);
+ fileTab.setText(Messages.getString("SystemTapOptionsTab.FilesTab")); //$NON-NLS-1$
+
+ Composite fileTop = new Composite(fileFolder, SWT.NONE);
+ fileTop.setLayout(new GridLayout());
+ fileTop.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ createFileOption(fileTop);
+ fileTab.setControl(fileTop);
+
+
+ /*
+ * Commands folder - tab for selecting SystemTap commands
+ */
+
+ commandFolder = new TabFolder(top, SWT.BORDER);
+ commandFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ TabItem commandTab = new TabItem(fileFolder, SWT.NONE);
+ commandTab.setText(Messages.getString("SystemTapOptionsTab.CommandsTab")); //$NON-NLS-1$
+
+ Composite commandTop = new Composite(fileFolder, SWT.NONE);
+ commandTop.setLayout(new GridLayout());
+ commandTop.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ createCommandOption(commandTop);
+ commandTab.setControl(commandTop);
+
+ /*
+ * Arguments folder - tab for selecting script arguments
+ */
+ argumentsFolder = new TabFolder(top, SWT.BORDER);
+ argumentsFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ TabItem argumentsTab = new TabItem(fileFolder, SWT.NONE);
+ argumentsTab.setText(Messages.getString("SystemTapOptionsTab.Arguments")); //$NON-NLS-1$
+
+ Composite argumentsTop = new Composite(fileFolder, SWT.NONE);
+ argumentsTop.setLayout(new GridLayout());
+ argumentsTop.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ createArgumentsOption(argumentsTop);
+ argumentsTab.setControl(argumentsTop);
+
+
+ /*
+ * Binary Argument folder - tab for supplying arguments for a binary
+ */
+ binaryArgumentsFolder = new TabFolder(top, SWT.BORDER);
+ binaryArgumentsFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ TabItem binaryArgumentsTab = new TabItem(fileFolder, SWT.NONE);
+ binaryArgumentsTab.setText(Messages.getString("SystemTapOptionsTab.44")); //$NON-NLS-1$
+
+ Composite binaryArgumentsTop = new Composite(fileFolder, SWT.NONE);
+ binaryArgumentsTop.setLayout(new GridLayout());
+ binaryArgumentsTop.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ createBinaryArgumentsOption(binaryArgumentsTop);
+ binaryArgumentsTab.setControl(binaryArgumentsTop);
+
+
+ /*
+ * Parser folder -- Tab for selecting a parser to use
+ */
+ parserFolder = new TabFolder(top, SWT.BORDER);
+ parserFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ TabItem parserTab = new TabItem(fileFolder, SWT.NONE);
+ parserTab.setText("Parser"); //$NON-NLS-1$
+
+ Composite parserTop = new Composite(fileFolder, SWT.NONE);
+ parserTop.setLayout(new GridLayout());
+ parserTop.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ createParserOption(parserTop);
+ parserTab.setControl(parserTop);
+
+// /*
+// * Generated Script folder - tab for selecting script generatedScript
+// */
+// generatedScriptFolder = new TabFolder(top, SWT.BORDER);
+// generatedScriptFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
+//
+// TabItem generatedScriptTab = new TabItem(fileFolder, SWT.NONE);
+// generatedScriptTab.setText(Messages.getString("SystemTapOptionsTab.GeneratedScriptsTab")); //$NON-NLS-1$
+//
+// Composite generatedScriptTop = new Composite(fileFolder, SWT.NONE);
+// generatedScriptTop.setLayout(new GridLayout());
+// generatedScriptTop.setLayoutData(new GridData(GridData.FILL_BOTH));
+//
+// createGeneratedScriptOption(generatedScriptTop);
+// generatedScriptTab.setControl(generatedScriptTop);
+
+ /*
+ * SystemTap help - contains the stap man page
+ */
+ }
+
+
+ private void createBinaryArgumentsOption(Composite binaryArgumentsTop) {
+ Composite browseTop = new Composite(binaryArgumentsTop, SWT.NONE);
+ browseTop.setLayout(new GridLayout(1, false));
+ GridData browseData = new GridData(GridData.FILL_HORIZONTAL);
+ browseTop.setLayoutData(browseData);
+
+ Label suppFileLabel = new Label(browseTop, SWT.NONE);
+ suppFileLabel.setText(Messages.getString("SystemTapOptionsTab.45")); //$NON-NLS-1$
+
+ binaryArguments = new Text(browseTop,SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.heightHint = 200;
+ binaryArguments.setLayoutData(gd);
+ binaryArguments.addModifyListener(modifyListener);
+ }
+
+ private void createParserOption(Composite parserTop) {
+ Composite browseTop = new Composite(parserTop, SWT.NONE);
+ browseTop.setLayout(new GridLayout(1, false));
+ GridData browseData = new GridData(GridData.FILL_HORIZONTAL);
+ browseTop.setLayoutData(browseData);
+
+ Label suppFileLabel = new Label(browseTop, SWT.NONE);
+ suppFileLabel.setText("Parser");
+
+ parser = new Text(browseTop, SWT.BORDER);
+ parser.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ parser.addModifyListener(modifyListener);
+
+ parserButton = createPushButton(browseTop,
+ "Find parsers", null); //$NON-NLS-1$
+ parserButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(),
+ new ListLabelProvider());
+ dialog.setTitle("Select parser"); //$NON-NLS-1$
+ dialog.setMessage("Select parser to use."); //$NON-NLS-1$
+ IExtensionRegistry reg = Platform.getExtensionRegistry();
+ IConfigurationElement[] extensions = reg
+ .getConfigurationElementsFor(PluginConstants.PARSER_RESOURCE,
+ PluginConstants.PARSER_NAME);
+
+ dialog.setElements(extensions);
+ if (dialog.open() == IDialogConstants.OK_ID) {
+ String arg = getUsefulLabel(dialog.getFirstResult());
+ parser.setText(arg);
+ }
+ }
+ });
+ }
+
+ protected void createGeneratedScriptOption(Composite generatedScriptTop) {
+ Composite browseTop = new Composite(generatedScriptTop, SWT.NONE);
+ browseTop.setLayout(new GridLayout(1, false));
+ GridData browseData = new GridData(GridData.FILL_HORIZONTAL);
+ browseTop.setLayoutData(browseData);
+
+
+ Label suppFileLabel = new Label(browseTop, SWT.NONE);
+ suppFileLabel.setText(Messages.getString("SystemTapOptionsTab.GeneratedScriptsTitle")); //$NON-NLS-1$
+
+ generatedScript = new Text(browseTop,SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
+
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.heightHint = 200;
+ generatedScript.setLayoutData(gd);
+ generatedScript.addModifyListener(modifyListener);
+
+ needToGenerateScriptButton = new Button(browseTop, SWT.CHECK);
+ needToGenerateScriptButton.setText(Messages.getString("SystemTapOptionsTab.GenerateScriptButton")); //$NON-NLS-1$
+ needToGenerateScriptButton.addSelectionListener(selectListener);
+ needToGenerateScriptButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+
+ }
+
+ protected void createArgumentsOption(Composite argumentsTop) {
+ Composite browseTop = new Composite(argumentsTop, SWT.NONE);
+ browseTop.setLayout(new GridLayout(1, false));
+ GridData browseData = new GridData(GridData.FILL_HORIZONTAL);
+ browseTop.setLayoutData(browseData);
+
+
+ Label suppFileLabel = new Label(browseTop, SWT.NONE);
+ suppFileLabel.setText(Messages.getString("SystemTapOptionsTab.SelectArguments")); //$NON-NLS-1$
+
+ arguments = new Text(browseTop,SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
+
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.heightHint = 200;
+ arguments.setLayoutData(gd);
+ arguments.addModifyListener(modifyListener);
+
+
+ Button probeFunctionButton = createPushButton(browseTop, Messages.getString("SystemTapOptionsTab.ProbeFunction"), null); //$NON-NLS-1$
+ probeFunctionButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ arguments.setText(arguments.getText() + " process(\"" + binaryFile.getText() + "\").function(\"\")"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ });
+ }
+
+ protected void createFileOption(Composite top) {
+ Composite browseTop = new Composite(top, SWT.NONE);
+ browseTop.setLayout(new GridLayout(4, false));
+ browseTop.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ Label suppFileLabel = new Label(browseTop, SWT.NONE);
+ suppFileLabel.setText(Messages.getString("SystemTapOptionsTab.ScriptSelector")); //$NON-NLS-1$
+
+ scriptFile = new Text(browseTop, SWT.BORDER);
+ scriptFile.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ scriptFile.addModifyListener(modifyListener);
+
+ workspaceBrowseButton = createPushButton(browseTop, Messages.getString("SystemTapOptionsTab.WorkspaceButton"), null); //$NON-NLS-1$
+ workspaceBrowseButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
+ dialog.setTitle(Messages.getString("SystemTapOptionsTab.ResourceButton")); //$NON-NLS-1$
+ dialog.setMessage(Messages.getString("SystemTapOptionsTab.SuppresionsFile")); //$NON-NLS-1$
+ dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
+ dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
+ if (dialog.open() == IDialogConstants.OK_ID) {
+ IResource resource = (IResource) dialog.getFirstResult();
+ String arg = resource.getFullPath().toString();
+ scriptFile.setText(workspacePath + arg);
+ }
+ }
+ });
+
+ fileBrowseButton = createPushButton(browseTop, Messages.getString("SystemTapOptionsTab.FileSystem"), null); //$NON-NLS-1$
+ fileBrowseButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ String filePath = scriptFile.getText();
+ FileDialog dialog = new FileDialog(getShell(), SWT.SAVE);
+ filePath = dialog.open();
+ if (filePath != null) {
+ scriptFile.setText(filePath);
+ }
+ }
+ });
+
+
+ Label binaryFileLabel = new Label(browseTop, SWT.NONE);
+ binaryFileLabel.setText(Messages.getString("SystemTapOptionsTab.SelectBinary")); //$NON-NLS-1$
+
+ binaryFile = new Text(browseTop, SWT.BORDER);
+ binaryFile.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ binaryFile.addModifyListener(modifyListener);
+
+
+ Button workspaceBrowseButton2 = createPushButton(browseTop, Messages.getString("SystemTapOptionsTab.WorkspaceButton2"), null); //$NON-NLS-1$
+ workspaceBrowseButton2.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
+ dialog.setTitle(Messages.getString("SystemTapOptionsTab.SelectResource")); //$NON-NLS-1$
+ dialog.setMessage(Messages.getString("SystemTapOptionsTab.SelectSuppressions")); //$NON-NLS-1$
+ dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
+ dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
+ if (dialog.open() == IDialogConstants.OK_ID) {
+ IResource resource = (IResource) dialog.getFirstResult();
+ String arg = resource.getFullPath().toString();
+ binaryFile.setText(workspacePath + arg);
+ }
+ }
+ });
+
+
+ Button fileBrowseButton2 = createPushButton(browseTop, Messages.getString("SystemTapOptionsTab.BrowseFiles"), null); //$NON-NLS-1$
+ fileBrowseButton2.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ String filePath = binaryFile.getText();
+ FileDialog dialog = new FileDialog(getShell(), SWT.SAVE);
+ filePath = dialog.open();
+ if (filePath != null) {
+ File file = new File(filePath);
+ if (file.exists()) binaryFile.setText(filePath);
+ }
+ }
+ });
+
+
+ Label outputFileLabel = new Label(browseTop, SWT.NONE);
+ outputFileLabel.setText(Messages.getString("SystemTapOptionsTab.SelectOutput")); //$NON-NLS-1$
+
+ outputFile = new Text(browseTop, SWT.BORDER);
+ outputFile.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ outputFile.addModifyListener(modifyListenerOutput);
+ outputFile.addFocusListener(focusListener);
+
+ Button workspaceBrowseButton3 = createPushButton(browseTop, Messages.getString("SystemTapOptionsTab.WorkspaceButton2"), null); //$NON-NLS-1$
+ workspaceBrowseButton3.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
+ dialog.setTitle(Messages.getString("SystemTapOptionsTab.SelectResource")); //$NON-NLS-1$
+ dialog.setMessage(Messages.getString("SystemTapOptionsTab.SelectSuppressions")); //$NON-NLS-1$
+ dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
+ dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
+ if (dialog.open() == IDialogConstants.OK_ID) {
+ IResource resource = (IResource) dialog.getFirstResult();
+ String arg = resource.getFullPath().toString();
+ outputFile.setText(workspacePath + arg);
+ checkOverwrite();
+ updateLaunchConfigurationDialog();
+
+ }
+ }
+ });
+
+ Button fileBrowseButton3 = createPushButton(browseTop, Messages.getString("SystemTapOptionsTab.BrowseFiles"), null); //$NON-NLS-1$
+ fileBrowseButton3.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ String filePath = outputFile.getText();
+ FileDialog dialog = new FileDialog(getShell(), SWT.SAVE);
+ filePath = dialog.open();
+ if (filePath != null) {
+ outputFile.setText(filePath);
+ checkOverwrite();
+ updateLaunchConfigurationDialog();
+ }
+ }
+ });
+
+ useColourButton = new Button(browseTop, SWT.CHECK);
+ useColourButton.setText(Messages.getString("SystemTapOptionsTab.ColourCodes")); //$NON-NLS-1$
+ useColourButton.addSelectionListener(selectListener);
+ useColourButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+// generateScriptButton = new Button(browseTop, SWT.PUSH);
+// generateScriptButton.setText("Command");
+// generateScriptButton.addSelectionListener(new SelectionListener() {
+//
+// @Override
+// public void widgetDefaultSelected(SelectionEvent e) {
+// }
+//
+// @Override
+// public void widgetSelected(SelectionEvent e) {
+// SystemTapCommandGenerator gen = new SystemTapCommandGenerator();
+// gen.generateCommand(scrPath, binPath, cmds, needBinary, needsArgs, arg, useColour)
+//
+// }
+//
+// });
+//
+ }
+
+
+
+ protected void createCommandOption(Composite top) {
+ Composite browseTop = new Composite(top, SWT.NONE);
+ browseTop.setLayout(new GridLayout(3, false));
+ GridData browseData = new GridData(GridData.FILL_HORIZONTAL);
+ browseTop.setLayoutData(browseData);
+
+// Label suppFileLabel = new Label(browseTop, SWT.NONE);
+// suppFileLabel.setText(Messages.getString("SystemTapOptionsTab.CommandsLabel1") + //$NON-NLS-1$
+// Messages.getString("SystemTapOptionsTab.CommandsLabel2")); //$NON-NLS-1$
+//
+// commandFile = new Text(browseTop, SWT.BORDER);
+// commandFile.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+// commandFile.addModifyListener(modifyListener);
+//
+
+ Composite buttonsTop = new Composite(top, SWT.NONE);
+ GridLayout gl = new GridLayout(2, false);
+ gl.horizontalSpacing = PluginConstants.SYSTEMTAP_OPTIONS_TAB_HORIZONTAL_SPACING;
+ buttonsTop.setLayout( gl );
+ GridData buttonsData = new GridData(SWT.CENTER, SWT.BEGINNING, true, true);
+ buttonsData.heightHint = 400;
+ buttonsTop.setLayoutData(buttonsData);
+
+
+ button_v = new Button(buttonsTop, SWT.CHECK);
+ button_v.setText(Messages.getString("SystemTapOptionsTab.18")); //$NON-NLS-1$
+ button_v.addSelectionListener(selectListener);
+ button_v.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ button_v.setToolTipText(Messages.getString("SystemTapOptionsTab.2") + //$NON-NLS-1$
+ Messages.getString("SystemTapOptionsTab.4")); //$NON-NLS-1$
+
+ button_k = new Button(buttonsTop, SWT.CHECK);
+ button_k.setText(Messages.getString("SystemTapOptionsTab.20")); //$NON-NLS-1$
+ button_k.addSelectionListener(selectListener);
+ button_k.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ button_k.setToolTipText(
+ Messages.getString("SystemTapOptionsTab.5") + //$NON-NLS-1$
+ Messages.getString("SystemTapOptionsTab.6") + //$NON-NLS-1$
+ Messages.getString("SystemTapOptionsTab.7")); //$NON-NLS-1$
+
+
+ button_g = new Button(buttonsTop, SWT.CHECK);
+ button_g.setText(Messages.getString("SystemTapOptionsTab.21")); //$NON-NLS-1$
+ button_g.addSelectionListener(selectListener);
+ button_g.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ button_g.setToolTipText(
+ Messages.getString("SystemTapOptionsTab.8") + //$NON-NLS-1$
+ Messages.getString("SystemTapOptionsTab.9")); //$NON-NLS-1$
+
+ button_P = new Button(buttonsTop, SWT.CHECK);
+ button_P.setText(Messages.getString("SystemTapOptionsTab.22")); //$NON-NLS-1$
+ button_P.addSelectionListener(selectListener);
+ button_P.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ button_P.setToolTipText(
+ Messages.getString("SystemTapOptionsTab.10") + //$NON-NLS-1$
+ Messages.getString("SystemTapOptionsTab.11")); //$NON-NLS-1$
+
+ button_u = new Button(buttonsTop, SWT.CHECK);
+ button_u.setText(Messages.getString("SystemTapOptionsTab.23")); //$NON-NLS-1$
+ button_u.addSelectionListener(selectListener);
+ button_u.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ button_u.setToolTipText(
+ Messages.getString("SystemTapOptionsTab.12")); //$NON-NLS-1$
+
+ button_w = new Button(buttonsTop, SWT.CHECK);
+ button_w.setText(Messages.getString("SystemTapOptionsTab.24")); //$NON-NLS-1$
+ button_w.addSelectionListener(selectListener);
+ button_w.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ button_w.setToolTipText(
+ Messages.getString("SystemTapOptionsTab.13")+ //$NON-NLS-1$
+ Messages.getString("SystemTapOptionsTab.14")); //$NON-NLS-1$
+
+ button_b = new Button(buttonsTop, SWT.CHECK);
+ button_b.setText(Messages.getString("SystemTapOptionsTab.25")); //$NON-NLS-1$
+ button_b.addSelectionListener(selectListener);
+ button_b.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ button_b.setToolTipText(
+ Messages.getString("SystemTapOptionsTab.15")); //$NON-NLS-1$
+
+ button_t = new Button(buttonsTop, SWT.CHECK);
+ button_t.setText(Messages.getString("SystemTapOptionsTab.26")); //$NON-NLS-1$
+ button_t.addSelectionListener(selectListener);
+ button_t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ button_t.setToolTipText(
+ Messages.getString("SystemTapOptionsTab.16") + //$NON-NLS-1$
+ Messages.getString("SystemTapOptionsTab.17")); //$NON-NLS-1$
+
+ button_F = new Button(buttonsTop, SWT.CHECK);
+ button_F.setText(Messages.getString("SystemTapOptionsTab.LeaveProbesRunning")); //$NON-NLS-1$
+ button_F.addSelectionListener(selectListener);
+ button_F.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ button_F.setToolTipText(
+ Messages.getString("SystemTapOptionsTab.27") + //$NON-NLS-1$
+ Messages.getString("SystemTapOptionsTab.28") + //$NON-NLS-1$
+ Messages.getString("SystemTapOptionsTab.29")); //$NON-NLS-1$
+
+ button_skip_badvars = new Button(buttonsTop, SWT.CHECK);
+ button_skip_badvars.setText(Messages.getString("SystemTapOptionsTab.IgnoreBadVars")); //$NON-NLS-1$
+ button_skip_badvars.addSelectionListener(selectListener);
+ button_skip_badvars.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ button_skip_badvars.setToolTipText(
+ Messages.getString("SystemTapOptionsTab.30")); //$NON-NLS-1$
+
+ button_ignore_dwarf = new Button(buttonsTop, SWT.CHECK);
+ button_ignore_dwarf.setText(Messages.getString("SystemTapOptionsTab.ForTesting")); //$NON-NLS-1$
+ button_ignore_dwarf.addSelectionListener(selectListener);
+ button_ignore_dwarf.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ button_ignore_dwarf.setToolTipText(
+ Messages.getString("SystemTapOptionsTab.31") + //$NON-NLS-1$
+ Messages.getString("SystemTapOptionsTab.32")); //$NON-NLS-1$
+
+ button_q = new Button(buttonsTop, SWT.CHECK);
+ button_q.setText(Messages.getString("SystemTapOptionsTab.Button_qInfo")); //$NON-NLS-1$
+ button_q.addSelectionListener(selectListener);
+ button_q.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ button_q.setToolTipText(Messages.getString("SystemTapOptionsTab.33")); //$NON-NLS-1$
+
+ Composite button_p_Spinner_Top = new Composite(buttonsTop, SWT.NONE);
+ button_p_Spinner_Top.setLayout(new GridLayout(3, false));
+ Label button_p_Spinner_Label = new Label(button_p_Spinner_Top, SWT.NONE);
+ button_p_Spinner_Label.setText(Messages.getString("SystemTapOptionsTab.19")); //$NON-NLS-1$
+ button_p_Spinner = new Spinner(button_p_Spinner_Top, SWT.BORDER);
+ button_p_Spinner.setMaximum(Integer.MAX_VALUE);
+ button_p_Spinner.addModifyListener(modifyListener);
+ button_p_Spinner.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ button_p_Spinner_Label.setToolTipText(
+ Messages.getString("SystemTapOptionsTab.34") + //$NON-NLS-1$
+ Messages.getString("SystemTapOptionsTab.35") + //$NON-NLS-1$
+ Messages.getString("SystemTapOptionsTab.36")); //$NON-NLS-1$
+
+ Composite button_s_Spinner_Top = new Composite(buttonsTop, SWT.NONE);
+ button_s_Spinner_Top.setLayout(new GridLayout(2, false));
+ Label button_s_Spinner_Label = new Label(button_s_Spinner_Top, SWT.NONE);
+ button_s_Spinner_Label.setText(Messages.getString("SystemTapOptionsTab.BufferWith")); //$NON-NLS-1$
+ button_s_Spinner = new Spinner(button_s_Spinner_Top, SWT.BORDER);
+ button_s_Spinner.setMaximum(Integer.MAX_VALUE);
+ button_s_Spinner.addModifyListener(modifyListener);
+ button_s_Spinner.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ button_s_Spinner_Label.setToolTipText(
+ Messages.getString("SystemTapOptionsTab.37") + //$NON-NLS-1$
+ Messages.getString("SystemTapOptionsTab.38")); //$NON-NLS-1$
+
+ Composite button_x_Spinner_Top = new Composite(buttonsTop, SWT.NONE);
+ button_x_Spinner_Top.setLayout(new GridLayout(2, false));
+ Label button_x_Spinner_Label = new Label(button_x_Spinner_Top, SWT.NONE);
+ button_x_Spinner_Label.setText(Messages.getString("SystemTapOptionsTab.TargetPID")); //$NON-NLS-1$
+ button_x_Spinner = new Spinner(button_x_Spinner_Top, SWT.BORDER);
+ button_x_Spinner.setMaximum(Integer.MAX_VALUE);
+ button_x_Spinner.addModifyListener(modifyListener);
+ button_x_Spinner.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ button_x_Spinner_Label.setToolTipText(
+ Messages.getString("SystemTapOptionsTab.39") + //$NON-NLS-1$
+ Messages.getString("SystemTapOptionsTab.40")); //$NON-NLS-1$
+
+ button_graphicsMode = new Button(buttonsTop, SWT.CHECK);
+ button_graphicsMode.setText(Messages.getString("SystemTapOptionsTab.3")); //$NON-NLS-1$
+ button_graphicsMode.addSelectionListener(graphicsModeListener);
+ button_graphicsMode.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ button_graphicsMode.setToolTipText(
+ Messages.getString("SystemTapOptionsTab.41")); //$NON-NLS-1$
+
+ Label button_D_label = new Label(buttonsTop, SWT.NONE);
+ button_D_label.setText(Messages.getString("SystemTapOptionsTab.PreprocessorDirective")); //$NON-NLS-1$
+ button_D_text = new Text(buttonsTop, SWT.BORDER);
+ button_D_text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ button_D_text.addModifyListener(modifyListener);
+ button_D_label.setToolTipText(
+ Messages.getString("SystemTapOptionsTab.42") + //$NON-NLS-1$
+ Messages.getString("SystemTapOptionsTab.43")); //$NON-NLS-1$
+
+
+
+ }
+
+
+ @Override
+ public String getName() {
+ return Messages.getString("SystemTapOptionsTab.MainTabName"); //$NON-NLS-1$
+ }
+
+ @Override
+ public void initializeFrom(ILaunchConfiguration configuration) {
+
+
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ IWorkspaceRoot root = workspace.getRoot();
+ IPath location = root.getLocation();
+ workspacePath = location.toString();
+
+ try {
+ button_v.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE, LaunchConfigurationConstants.DEFAULT_COMMAND_VERBOSE));
+ button_k.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_KEEP_TEMPORARY, LaunchConfigurationConstants.DEFAULT_COMMAND_KEEP_TEMPORARY));
+ button_u.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_NO_CODE_ELISION, LaunchConfigurationConstants.DEFAULT_COMMAND_NO_CODE_ELISION));
+ button_w.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_DISABLE_WARNINGS, LaunchConfigurationConstants.DEFAULT_COMMAND_DISABLE_WARNINGS));
+ button_b.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_BULK_MODE, LaunchConfigurationConstants.DEFAULT_COMMAND_BULK_MODE));
+ button_g.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_GURU, LaunchConfigurationConstants.DEFAULT_COMMAND_GURU));
+ button_P.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_PROLOGUE_SEARCH, LaunchConfigurationConstants.DEFAULT_COMMAND_PROLOGUE_SEARCH));
+ button_t.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_TIMING_INFO, LaunchConfigurationConstants.DEFAULT_COMMAND_TIMING_INFO));
+ button_skip_badvars.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_SKIP_BADVARS, LaunchConfigurationConstants.DEFAULT_COMMAND_SKIP_BADVARS));
+ button_ignore_dwarf.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_IGNORE_DWARF, LaunchConfigurationConstants.DEFAULT_COMMAND_IGNORE_DWARF));
+ button_q.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_TAPSET_COVERAGE, LaunchConfigurationConstants.DEFAULT_COMMAND_TAPSET_COVERAGE));
+ button_F.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_LEAVE_RUNNING, LaunchConfigurationConstants.DEFAULT_COMMAND_LEAVE_RUNNING));
+ button_s_Spinner.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_BUFFER_BYTES, LaunchConfigurationConstants.DEFAULT_COMMAND_BUFFER_BYTES));
+ button_x_Spinner.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID, LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID));
+ button_p_Spinner.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_PASS, LaunchConfigurationConstants.DEFAULT_COMMAND_PASS));
+
+ button_D_text.setText(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_C_DIRECTIVES, LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES));
+ binaryFile.setText(configuration.getAttribute(LaunchConfigurationConstants.BINARY_PATH, LaunchConfigurationConstants.DEFAULT_BINARY_PATH));
+ scriptFile.setText(configuration.getAttribute(LaunchConfigurationConstants.SCRIPT_PATH, LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH));
+ outputFile.setText(configuration.getAttribute(LaunchConfigurationConstants.OUTPUT_PATH, LaunchConfigurationConstants.DEFAULT_OUTPUT_PATH));
+ arguments.setText(configuration.getAttribute(LaunchConfigurationConstants.ARGUMENTS, LaunchConfigurationConstants.DEFAULT_ARGUMENTS));
+ binaryArguments.setText(configuration.getAttribute(LaunchConfigurationConstants.BINARY_ARGUMENTS, LaunchConfigurationConstants.DEFAULT_BINARY_ARGUMENTS));
+
+ parser.setText(configuration.getAttribute(LaunchConfigurationConstants.PARSER_CLASS, LaunchConfigurationConstants.DEFAULT_PARSER_CLASS));
+
+ if (generatedScript != null){
+ generatedScript.setText(configuration.getAttribute(LaunchConfigurationConstants.GENERATED_SCRIPT, LaunchConfigurationConstants.DEFAULT_GENERATED_SCRIPT));
+ needToGenerateScriptButton.setSelection(configuration.getAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE, LaunchConfigurationConstants.DEFAULT_NEED_TO_GENERATE));
+ }
+ useColourButton.setSelection(configuration.getAttribute(LaunchConfigurationConstants.USE_COLOUR, LaunchConfigurationConstants.DEFAULT_USE_COLOUR));
+
+// commandFile.setText(ConfigurationOptionsSetter.setOptions(configuration));
+
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+
+
+ }
+
+ @Override
+ public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+
+ getControl().setRedraw(false);
+
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE, button_v.getSelection());
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_KEEP_TEMPORARY, button_k.getSelection());
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_GURU, button_g.getSelection());
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_PROLOGUE_SEARCH, button_P.getSelection());
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_NO_CODE_ELISION, button_u.getSelection());
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_DISABLE_WARNINGS, button_w.getSelection());
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_BULK_MODE, button_b.getSelection());
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_TIMING_INFO, button_t.getSelection());
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_SKIP_BADVARS, button_skip_badvars.getSelection());
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_IGNORE_DWARF, button_ignore_dwarf.getSelection());
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_TAPSET_COVERAGE, button_q.getSelection());
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_LEAVE_RUNNING, button_F.getSelection());
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_PASS, button_p_Spinner.getSelection());
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_BUFFER_BYTES, button_s_Spinner.getSelection());
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID, button_x_Spinner.getSelection());
+
+ configuration.setAttribute(LaunchConfigurationConstants.PARSER_CLASS, parser.getText());
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_C_DIRECTIVES, button_D_text.getText());
+ configuration.setAttribute(LaunchConfigurationConstants.BINARY_PATH, binaryFile.getText());
+ configuration.setAttribute(LaunchConfigurationConstants.SCRIPT_PATH, scriptFile.getText());
+ configuration.setAttribute(LaunchConfigurationConstants.ARGUMENTS, arguments.getText());
+ configuration.setAttribute(LaunchConfigurationConstants.BINARY_ARGUMENTS, binaryArguments.getText());
+ configuration.setAttribute(LaunchConfigurationConstants.OUTPUT_PATH, outputFile.getText());
+// configuration.setAttribute(LaunchConfigurationConstants.COMMAND_LIST, commandFile.getText());
+
+ if (generatedScript != null){
+ configuration.setAttribute(LaunchConfigurationConstants.GENERATED_SCRIPT, generatedScript.getText());
+ configuration.setAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE, needToGenerateScriptButton.getSelection());
+ }
+
+ configuration.setAttribute(LaunchConfigurationConstants.USE_COLOUR, useColourButton.getSelection());
+
+ if (button_graphicsMode.getSelection()){
+ scriptFile.setEnabled(false);
+ workspaceBrowseButton.setEnabled(false);
+ fileBrowseButton.setEnabled(false);
+
+ }else{
+ scriptFile.setEnabled(true);
+ workspaceBrowseButton.setEnabled(true);
+ fileBrowseButton.setEnabled(true);
+ }
+
+ if (changeOverwrite) {
+ if (needsOverwritePermission && overwritePermission || !needsOverwritePermission) {
+ configuration.setAttribute(LaunchConfigurationConstants.OVERWRITE, true);
+ }
+ else {
+ configuration.setAttribute(LaunchConfigurationConstants.OVERWRITE, false);
+ }
+ changeOverwrite = false;
+ }
+
+ getControl().setRedraw(true);
+ }
+
+ @Override
+ public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE,LaunchConfigurationConstants.DEFAULT_COMMAND_VERBOSE);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_KEEP_TEMPORARY,LaunchConfigurationConstants.DEFAULT_COMMAND_KEEP_TEMPORARY);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_GURU,LaunchConfigurationConstants.DEFAULT_COMMAND_GURU);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_PROLOGUE_SEARCH,LaunchConfigurationConstants.DEFAULT_COMMAND_PROLOGUE_SEARCH);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_NO_CODE_ELISION,LaunchConfigurationConstants.DEFAULT_COMMAND_NO_CODE_ELISION);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_DISABLE_WARNINGS,LaunchConfigurationConstants.DEFAULT_COMMAND_DISABLE_WARNINGS);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_BULK_MODE,LaunchConfigurationConstants.DEFAULT_COMMAND_BULK_MODE);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_TIMING_INFO,LaunchConfigurationConstants.DEFAULT_COMMAND_TIMING_INFO);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_SKIP_BADVARS,LaunchConfigurationConstants.DEFAULT_COMMAND_SKIP_BADVARS);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_IGNORE_DWARF,LaunchConfigurationConstants.DEFAULT_COMMAND_IGNORE_DWARF);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_TAPSET_COVERAGE,LaunchConfigurationConstants.DEFAULT_COMMAND_TAPSET_COVERAGE);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_LEAVE_RUNNING,LaunchConfigurationConstants.DEFAULT_COMMAND_LEAVE_RUNNING);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_PASS,LaunchConfigurationConstants.DEFAULT_COMMAND_PASS);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_BUFFER_BYTES,LaunchConfigurationConstants.DEFAULT_COMMAND_BUFFER_BYTES);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID,LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID);
+
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_C_DIRECTIVES,LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES);
+ configuration.setAttribute(LaunchConfigurationConstants.BINARY_PATH,LaunchConfigurationConstants.DEFAULT_BINARY_PATH);
+ configuration.setAttribute(LaunchConfigurationConstants.SCRIPT_PATH,LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH);
+ configuration.setAttribute(LaunchConfigurationConstants.OUTPUT_PATH,LaunchConfigurationConstants.DEFAULT_OUTPUT_PATH);
+ configuration.setAttribute(LaunchConfigurationConstants.ARGUMENTS,LaunchConfigurationConstants.DEFAULT_ARGUMENTS);
+ configuration.setAttribute(LaunchConfigurationConstants.BINARY_ARGUMENTS,LaunchConfigurationConstants.DEFAULT_BINARY_ARGUMENTS);
+
+ configuration.setAttribute(LaunchConfigurationConstants.GENERATED_SCRIPT, LaunchConfigurationConstants.DEFAULT_GENERATED_SCRIPT);
+ configuration.setAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE, LaunchConfigurationConstants.DEFAULT_NEED_TO_GENERATE);
+ configuration.setAttribute(LaunchConfigurationConstants.PARSER_CLASS, LaunchConfigurationConstants.DEFAULT_PARSER_CLASS);
+
+
+ configuration.setAttribute(LaunchConfigurationConstants.USE_COLOUR, LaunchConfigurationConstants.DEFAULT_USE_COLOUR);
+
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_LIST, ConfigurationOptionsSetter.setOptions(configuration));
+
+ }
+
+
+ @Override
+ public boolean isValid(ILaunchConfiguration launchConfig) {
+ // Check that the major options are sane
+ boolean valid = true;
+
+// try {
+// if (!launchConfig.getAttribute(LaunchConfigurationConstants.OVERWRITE, LaunchConfigurationConstants.DEFAULT_OVERWRITE)) {
+// valid = false;
+// }
+// } catch (CoreException e1) {
+// e1.printStackTrace();
+// }
+//
+//
+ try {
+ String sPath = launchConfig.getAttribute(
+ LaunchConfigurationConstants.SCRIPT_PATH,
+ LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH);
+
+ File script = new File(sPath);
+
+ if (sPath.equals(LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH) || !script.exists()) {
+ //No script path specified or no such script exists
+ valid = false;
+ }
+
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+
+ return valid;
+ }
+
+ private String getUsefulLabel(Object element) {
+ if (element instanceof IConfigurationElement) {
+ Object o = ((IConfigurationElement) element).getParent();
+ if (o instanceof IExtension) {
+ IExtension e = (IExtension) ((IConfigurationElement) element).getParent();
+ return e.getUniqueIdentifier();
+ }
+ }
+ return "Invalid";
+
+ }
+
+ private class ListLabelProvider implements ILabelProvider {
+
+ @Override
+ public Image getImage(Object element) {
+ return null;
+ }
+
+ @Override
+ public String getText(Object element) {
+ if (element instanceof IConfigurationElement) {
+ Object o = ((IConfigurationElement) element).getParent();
+ if (o instanceof IExtension) {
+ IExtension e = (IExtension) ((IConfigurationElement) element).getParent();
+ return e.getLabel();
+ }
+ else if (o instanceof IConfigurationElement) {
+ IConfigurationElement e = (IConfigurationElement) ((IConfigurationElement) element).getParent();
+ return e.getName();
+ }
+
+ }
+ return "No name -- set name attribute of extension"; }
+
+ @Override
+ public void addListener(ILabelProviderListener listener) {
+
+ }
+
+ @Override
+ public void dispose() {
+ }
+
+ @Override
+ public boolean isLabelProperty(Object element, String property) {
+ return false;
+ }
+
+ @Override
+ public void removeListener(ILabelProviderListener listener) {
+ }
+
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/TranslationUnitVisitor.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/TranslationUnitVisitor.java
new file mode 100644
index 0000000000..1914439a4d
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/TranslationUnitVisitor.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * 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.systemtap.local.launch;
+
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICElementVisitor;
+import org.eclipse.core.runtime.CoreException;
+
+public class TranslationUnitVisitor implements ICElementVisitor{
+ private String functions;
+
+ public TranslationUnitVisitor() {
+ super();
+ functions = ""; //$NON-NLS-1$
+ }
+ private long time;
+ @Override
+ public boolean visit(ICElement arg0) throws CoreException {
+ if (arg0.getElementType() == ICElement.C_FUNCTION) {
+ functions+=arg0.getElementName() + " "; //$NON-NLS-1$
+ return false;
+ }
+ return true;
+ }
+
+
+ public String getFunctions() {
+ return functions;
+ }
+
+ public int getNumberOfFunctions() {
+ return (functions.split(" ").length); //$NON-NLS-1$
+ }
+
+
+ public double getTime() {
+ return time;
+ }
+
+}
+
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/messages.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/messages.properties
new file mode 100644
index 0000000000..ad349f92f5
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/messages.properties
@@ -0,0 +1,135 @@
+###############################################################################
+# 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
+###############################################################################
+LaunchAbout.0=About SystemTap Eclipse plugin
+LaunchAbout.11=Function callgraph: Produces a graph of all function calls. You can also mark functions by
+LaunchAbout.12=\ pressing CTRL+4 while in the editor. (Warning: Marking functions currently annotates your code
+LaunchAbout.13=\ by adding calls to a ___STAP_MARKER___ function.)\n\n
+LaunchAbout.17=Launch Wizard: Helper for launching SystemTap scripts.\n\n
+LaunchAbout.2=-------------SystemTap Eclipse Plugin---------\n
+LaunchAbout.20=Thank you for trying the SystemTap Eclipse plugin - if you have any comments or
+LaunchAbout.21=suggestions, please feel free to direct them to the e-mails above\!
+LaunchAbout.3=/*********************************************\n
+LaunchAbout.4=* Comments and concerns:\n
+LaunchAbout.5=* Charley Wang (chwang@redhat.com)\t\t\n
+LaunchAbout.6=* Roland Grunberg (rgrunber@redhat.com) \n
+LaunchAbout.7=*********************************************/\n\n
+LaunchAbout.8=Available pre-bundled scripts:\n\n
+LaunchStapGraph.0=Error generating script
+LaunchStapGraph.6=The path to the temporary script could not be opened.
+LaunchWizard.0=Welcome to SystemTap Wizard
+LaunchWizard.1=The SystemTap Wizard will guide you through the process of launching a
+LaunchWizard.2=script through Eclipse. \n\nFirst, please name your new launch configuration.
+LaunchWizard.20=Binary file:
+LaunchWizard.21=Arguments:
+LaunchWizard.22=Function
+LaunchWizard.23=Wizard Opener
+LaunchWizard.24=Launch
+LaunchWizard.3=If the name already exists, a (1), (2), etc. will be appended to make the name unique.\n
+LaunchWizard.4=MyWizardLaunch
+LaunchWizard.19=Script:
+RunSystemTapAction.0=System Tap Command Executing...
+SystemTapLaunchConfigurationDelegate.0=SystemTapLaunchConfigurationDelegate does not have a command yet
+SystemTapLaunchConfigurationDelegate.DocWriterMessage1=Configuration name:
+SystemTapLaunchConfigurationDelegate.DocWriterMessage2=Binary arguments :
+SystemTapLaunchConfigurationDelegate.DocWriterMessage3=To change this command, check under the Binary
+SystemTapLaunchConfigurationDelegate.DocWriterMessage4=Arguments tab for this configuration in
+SystemTapLaunchConfigurationDelegate.DocWriterMessage5=Profile As --> Profile Configurations.
+SystemTapLaunchConfigurationDelegate.DocWriterName=DocWriter, Delegate
+SystemTapLaunchConfigurationDelegate.DocWriterNoBinarySpecified=No binary commands specified. To specify commands, check under the Binary Arguments tab for this configuration in Profile As --> Profile Configurations.
+SystemTapLaunchConfigurationDelegate.NullProcessErrorMessage1=SystemTap could not execute. This could be due to missing
+SystemTapLaunchConfigurationDelegate.NullProcessErrorMessage2=packages that are necessary to the running of SystemTap
+SystemTapLaunchConfigurationDelegate.NullProcessErrorName=Error
+SystemTapLaunchConfigurationDelegate.NullProcessErrorTitle=SystemTap Error
+SystemTapLaunchConfigurationDelegate.stap_command=\ stap command:
+SystemTapLaunchShortcut.0=invalid
+SystemTapLaunchShortcut.10=No files found.
+SystemTapLaunchShortcut.8=Select files to probe
+SystemTapLaunchShortcut.9=For faster probing, select all files.
+SystemTapLaunchShortcut.ErrorMessage=Error: Script path not given by :
+SystemTapLaunchShortcut.ErrorMessagename=Error
+SystemTapLaunchShortcut.ErrorMessageName=Error
+SystemTapLaunchShortcut.ErrorMessageTitle=Script not found
+SystemTapLaunchShortcut.StapLaunchFailed=FailedToLaunch
+SystemTapLaunchShortcut.StapLaunchFailedMessage=The launch failed. This could be because of :
+SystemTapLaunchShortcut.StapLaunchFailedTitle=Launch failed
+SystemTapOptionsTab.10=Prologue-searching mode. Activate heuristics to work around
+SystemTapOptionsTab.11=incorrect debugging information for $target variables.
+SystemTapOptionsTab.12=Unoptimized mode. Disable unused code elision during elaboration.
+SystemTapOptionsTab.13=Suppressed warnings mode. Disable warning messages for elided
+SystemTapOptionsTab.14=code in user script.
+SystemTapOptionsTab.15=\ Use bulk mode (percpu files) for kernel-to-user data transfer.
+SystemTapOptionsTab.16=Collect timing information on the number of times probe executes
+SystemTapOptionsTab.17=and average amount of time spent in each probe.
+SystemTapOptionsTab.18=-v: Enable verbose mode
+SystemTapOptionsTab.19=Stop after pass \#
+SystemTapOptionsTab.2=Increase verbosity for all passes. Produce a larger volume of
+SystemTapOptionsTab.20=-k: Keep temporary directories
+SystemTapOptionsTab.21=-g: Guru mode (Experts only!)
+SystemTapOptionsTab.22=-P: Enable prologue-search mode
+SystemTapOptionsTab.23=-u: Disable unused code elision
+SystemTapOptionsTab.24=-w: Disable warnings
+SystemTapOptionsTab.25=-b: Use bulk mode
+SystemTapOptionsTab.26=-t: Collect timing information
+SystemTapOptionsTab.27=Without -o option, load module and start probes, then detach
+SystemTapOptionsTab.28=from the module leaving the probes running. With -o option, run
+SystemTapOptionsTab.29=staprun in background as a daemon and show its pid.
+SystemTapOptionsTab.3=Enable Graphics Mode
+SystemTapOptionsTab.30=Ignore out of context variables and substitute with literal 0.
+SystemTapOptionsTab.31=For testing, act as though vmlinux and modules lack debugging
+SystemTapOptionsTab.32=information.
+SystemTapOptionsTab.33=Generate information on tapset coverage
+SystemTapOptionsTab.34=Stop after specified pass. The passes are numbered 1-5: parse, elaborate
+SystemTapOptionsTab.35=, translate,\t compile, run.\tSee the PROCESSING section for
+SystemTapOptionsTab.36=details.
+SystemTapOptionsTab.37=Use NUM megabyte buffers for kernel-to-user data transfer. On a
+SystemTapOptionsTab.38=multiprocessor in bulk mode, this is a per-processor amount.
+SystemTapOptionsTab.39=Sets target() to PID. This allows scripts\t to be\t written that
+SystemTapOptionsTab.4=\ informative (?) output each time option repeated.
+SystemTapOptionsTab.40=filter on a specific process.
+SystemTapOptionsTab.41=Graph the output. Enable only if using a generated StapGraph script.
+SystemTapOptionsTab.42=Add the given C preprocessor directive to the module Makefile.
+SystemTapOptionsTab.43=These can be used to override limit parameters.
+SystemTapOptionsTab.44=Binary Arguments
+SystemTapOptionsTab.45=Please input the desired arguments, separated by spaces to be given to your binary.
+SystemTapOptionsTab.5=Keep the temporary directory after all processing. This may be
+SystemTapOptionsTab.6=useful in order to examine the generated C code, or to reuse the
+SystemTapOptionsTab.7=compiled kernel object.
+SystemTapOptionsTab.8=Guru mode. Enable parsing of unsafe expert-level constructs
+SystemTapOptionsTab.9=like embedded C.
+SystemTapOptionsTab.IgnoreBadVars=--skip-badvars: Ignore out of context vars
+SystemTapOptionsTab.ForTesting=--ignore-dwarf: Ignore debug info
+SystemTapOptionsTab.Arguments=Arguments
+SystemTapOptionsTab.BrowseFiles=Browse File System
+SystemTapOptionsTab.BufferWith=Buffer with \# bytes:
+SystemTapOptionsTab.Button_qInfo=-q : tapset coverage info
+SystemTapOptionsTab.ColourCodes=Use colour-codes
+SystemTapOptionsTab.CommandsTab=SystemTap options
+SystemTapOptionsTab.ConfirmOverwriteFileMessage=Selected file exists - overwrite selected file during Profile?
+SystemTapOptionsTab.ConfirmOverwriteFileTitle=Overwrite File?
+SystemTapOptionsTab.FilesTab=Script and Output
+SystemTapOptionsTab.FileSystem=Browse File System
+SystemTapOptionsTab.GeneratedScriptsTitle=Script to be generated
+SystemTapOptionsTab.GenerateScriptButton=Generate script
+SystemTapOptionsTab.LeaveProbesRunning=-F: Leave probes running
+SystemTapOptionsTab.MainTabName=SystemTap Configurations
+SystemTapOptionsTab.PreprocessorDirective=Add C preprocessor directive
+SystemTapOptionsTab.ProbeFunction=Probe function
+SystemTapOptionsTab.ResourceButton=Select a Resource
+SystemTapOptionsTab.ScriptSelector=Select a SystemTap script
+SystemTapOptionsTab.SelectArguments=Enter arguments. Separate with spaces. "Probe Function" will insert a template for probing your program.
+SystemTapOptionsTab.SelectBinary=Select a binary\n(Optional)
+SystemTapOptionsTab.SelectOutput=Select output file\n(Optional)
+SystemTapOptionsTab.SelectResource=Select a Resource
+SystemTapOptionsTab.SelectSuppressions=Select a Suppressions File
+SystemTapOptionsTab.SuppresionsFile=Select a Suppressions File
+SystemTapOptionsTab.TargetPID=Target process pid:
+SystemTapOptionsTab.WorkspaceButton=Browse Workspace
+SystemTapOptionsTab.WorkspaceButton2=Browse Workspace
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/toc.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/toc.xml
new file mode 100644
index 0000000000..c96f3fdf48
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/toc.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+ <toc label="My Guide">
+ <topic href="tree.htm" label="Tree Selection">
+ </topic>
+ </toc> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/tree.htm b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/tree.htm
new file mode 100644
index 0000000000..5ab2f8a432
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/tree.htm
@@ -0,0 +1 @@
+Hello \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/.project b/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/.project
new file mode 100644
index 0000000000..8a9084ce91
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.systemtap.local.tests-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/systemtap/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/build.properties
index 64f93a9f0b..64f93a9f0b 100644
--- a/systemtap/build.properties
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/build.properties
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.test-feature/epl-v10.html b/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/epl-v10.html
index 9321f4082e..9321f4082e 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.test-feature/epl-v10.html
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/epl-v10.html
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/feature.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/feature.properties
new file mode 100644
index 0000000000..00e7f1d7b5
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/feature.properties
@@ -0,0 +1,112 @@
+#*******************************************************************************
+# 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, Inc. - initial API and implementation
+#********************************************************************************
+featureName=Tests for local SystemTap on Eclipse
+description=Tests for local integration of SystemTap on Eclipse
+featureProvider=Eclipse
+copyright=Copyright 2009 Red Hat, Inc.
+licenseURL=epl-v10.html
+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 \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/feature.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/feature.xml
new file mode 100644
index 0000000000..681ce3f198
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/feature.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.linuxtools.systemtap.local.tests"
+ label="%featureName"
+ version="0.0.1.qualifier"
+ provider-name="%featureProvider">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <requires>
+ <import plugin="org.eclipse.ui"/>
+ <import plugin="org.eclipse.core.runtime"/>
+ <import plugin="org.eclipse.linuxtools.systemtap.local.callgraph" version="0.0.1" match="greaterOrEqual"/>
+ <import plugin="org.junit"/>
+ <import plugin="org.eclipse.linuxtools.systemtap.local.core"/>
+ <import plugin="org.eclipse.debug.ui" version="3.4.1" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.cdt.core"/>
+ <import plugin="org.eclipse.cdt.launch"/>
+ <import plugin="org.eclipse.core.resources"/>
+ <import plugin="org.eclipse.debug.core"/>
+ <import plugin="org.eclipse.linuxtools.profiling.launch"/>
+ <import plugin="org.eclipse.linuxtools.systemtap.local.launch" version="0.0.1" match="greaterOrEqual"/>
+ <import plugin="org.junit" version="0.0.0"/>
+ <import plugin="org.eclipse.linuxtools.profiling.tests"/>
+ </requires>
+
+ <plugin
+ id="org.eclipse.linuxtools.systemtap.local.callgraph.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.systemtap.local.launch.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/.project b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/.project
deleted file mode 100644
index 21f24f7a45..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.ui.consolelog.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/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/ChangeLog
deleted file mode 100644
index 1f18bac74c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/ChangeLog
+++ /dev/null
@@ -1,20 +0,0 @@
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Make version 0.3.0.qualifier.
-
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Change provider from IBM to Eclipse.
-
-2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * .classpath: New file.
- * .project: New file.
- * build.properties: New file.
- * META-INF/MANIFEST.MF: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/AllTests.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ConsoleStreamDaemonTest.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ErrorStreamDaemonTest.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ErrorTableDisplayTest.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ScriptConsoleTest.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/views/ErrorViewTest.java: \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 8fa1850e95..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name.0
-Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.consolelog.tests
-Bundle-Version: 0.3.0.qualifier
-Bundle-Vendor: Eclipse
-Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.consolelog.tests.ConsoleLogPlugin
-Bundle-Localization: plugin
-Bundle-ActivationPolicy: lazy
-Import-Package: junit.framework,
- org.eclipse.linuxtools.systemtap.ui.consolelog,
- org.eclipse.linuxtools.systemtap.ui.consolelog.structures,
- org.eclipse.linuxtools.systemtap.ui.structures.runnable,
- org.eclipse.ui.console
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/build.properties
deleted file mode 100644
index 34d2e4d2da..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/AllTests.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/AllTests.java
deleted file mode 100644
index f6add33796..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/AllTests.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.consolelog.test;
-
-import org.eclipse.linuxtools.systemtap.ui.consolelog.test.structures.ConsoleStreamDaemonTest;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.test.structures.ErrorStreamDaemonTest;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.test.structures.ErrorTableDisplayTest;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.test.structures.ScriptConsoleTest;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.test.views.ErrorViewTest;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.linuxtools.systemtap.ui.consolelog.test");
-
- //Structures
- suite.addTestSuite(ConsoleStreamDaemonTest.class);
- suite.addTestSuite(ErrorStreamDaemonTest.class);
- suite.addTestSuite(ErrorTableDisplayTest.class);
- suite.addTestSuite(ScriptConsoleTest.class);
-
- //views
- suite.addTestSuite(ErrorViewTest.class);
-
- return suite;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ConsoleStreamDaemonTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ConsoleStreamDaemonTest.java
deleted file mode 100644
index 2906906471..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ConsoleStreamDaemonTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.consolelog.test.structures;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.runnable.StreamGobbler;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ConsoleStreamDaemon;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ScriptConsole;
-
-import junit.framework.TestCase;
-
-public class ConsoleStreamDaemonTest extends TestCase {
- public ConsoleStreamDaemonTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- StreamGobbler gobbler = new StreamGobbler(System.in);
- gobbler.start();
- daemon = new ConsoleStreamDaemon(null);
- }
-
- public void testConsoleStreamDaemon() {
- assertNotNull(daemon);
-
- ConsoleStreamDaemon csd = new ConsoleStreamDaemon(null);
- assertNotNull(csd);
-
- csd = new ConsoleStreamDaemon(ScriptConsole.getInstance("test"));
- assertNotNull(csd);
- }
-
- public void testHandleDataEvent() {
- daemon.handleDataEvent("");
- assertNotNull(daemon);
- }
-
- public void testIsDisposed() {
- ConsoleStreamDaemon csd = new ConsoleStreamDaemon(null);
- assertFalse(csd.isDisposed());
- csd.dispose();
- assertTrue(csd.isDisposed());
- }
-
- public void testDispose() {
- daemon.dispose();
- assertNotNull(daemon);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- private ConsoleStreamDaemon daemon;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ErrorStreamDaemonTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ErrorStreamDaemonTest.java
deleted file mode 100644
index adca740b56..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ErrorStreamDaemonTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.consolelog.test.structures;
-
-import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ConsoleStreamDaemon;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ErrorStreamDaemon;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ScriptConsole;
-import org.eclipse.linuxtools.systemtap.ui.structures.runnable.StreamGobbler;
-
-import junit.framework.TestCase;
-
-public class ErrorStreamDaemonTest extends TestCase {
- public ErrorStreamDaemonTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- StreamGobbler gobbler = new StreamGobbler(System.in);
- gobbler.start();
- daemon = new ErrorStreamDaemon(null, null, null);
- }
-
- public void testConsoleStreamDaemon() {
- assertNotNull(daemon);
-
- ConsoleStreamDaemon csd = new ConsoleStreamDaemon(null);
- assertNotNull(csd);
-
- csd = new ConsoleStreamDaemon(ScriptConsole.getInstance("test"));
- assertNotNull(csd);
- }
-
- public void testHandleDataEvent() {
- daemon.handleDataEvent("");
- assertNotNull(daemon);
- }
-
- public void testIsDisposed() {
- ConsoleStreamDaemon csd = new ConsoleStreamDaemon(null);
- assertFalse(csd.isDisposed());
- csd.dispose();
- assertTrue(csd.isDisposed());
- }
-
- public void testDispose() {
- daemon.dispose();
- assertNotNull(daemon);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- private ErrorStreamDaemon daemon;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ErrorTableDisplayTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ErrorTableDisplayTest.java
deleted file mode 100644
index 42bc72496a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ErrorTableDisplayTest.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.consolelog.test.structures;
-
-import junit.framework.TestCase;
-
-public class ErrorTableDisplayTest extends TestCase {
- public ErrorTableDisplayTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ScriptConsoleTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ScriptConsoleTest.java
deleted file mode 100644
index 3f5ac718fb..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/structures/ScriptConsoleTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.consolelog.test.structures;
-
-import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ScriptConsole;
-
-
-import junit.framework.TestCase;
-
-public class ScriptConsoleTest extends TestCase {
-
- public ScriptConsoleTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- console = ScriptConsole.getInstance("test");
- }
-
- public void testGetInstance() {
- assertNotNull(console);
- assertSame(console, ScriptConsole.getInstance("test"));
- ScriptConsole console2 = ScriptConsole.getInstance("a");
- assertNotNull(console2);
- assertNotSame(console, console2);
- }
-
- public void testRun() {
-
- }
-
- public void testIsRunning() {
-
- }
-
- public void testIsDisposed() {
-
- }
-
- public void testSaveStream() {
-
- }
-
- public void testGetCommand() {
-
- }
-
- public void testStop() {
-
- }
-
- public void testDispose() {
-
- }
-
- public void testSetName() {
-
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- ScriptConsole console;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/views/ErrorViewTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/views/ErrorViewTest.java
deleted file mode 100644
index 685832323c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog.tests/src/org/eclipse/linuxtools/systemtap/ui/consolelog/test/views/ErrorViewTest.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.consolelog.test.views;
-
-import junit.framework.TestCase;
-
-public class ErrorViewTest extends TestCase {
- public ErrorViewTest(String name) {
- super(name);
- }
-
- public void testCreatePartControl() {
- }
-
- public void testAdd() {
-/* view.add(null);
- view.add(new String[] {});
- view.add(new String[] {"asdf"});
- view.add(new String[] {"test", "one", "two"});
-*/ }
-
- public void testClear() {
-// view.clear();
- }
-
- public void testSetFocus() {
-// view.setFocus();
- }
-
- public void testDispose() {
-// view.dispose();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/.classpath
deleted file mode 100644
index 64c5e31b7a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/.project b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/.project
deleted file mode 100644
index 166d553357..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.ui.consolelog</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/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/.settings/org.eclipse.jdt.core.prefs b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index e6130aa6a3..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Feb 27 18:15:40 IST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/ChangeLog
deleted file mode 100644
index 360812d163..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/ChangeLog
+++ /dev/null
@@ -1,15 +0,0 @@
-2009-11-16 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Fix Bundle-Name.
-
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Make version 0.3.0.qualifier.
-
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Change provider from IBM to Eclipse.
-
-2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * ChangeLog: Refactoring. Renaming all packages directories from *.systemtapgui.* to *.systemtap.ui.* \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/META-INF/MANIFEST.MF
deleted file mode 100644
index 2ed83df730..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,24 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: SystemTap ConsoleLog Plug-in (Incubation)
-Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.consolelog;singleton:=true
-Bundle-Version: 0.3.0.qualifier
-Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.consolelog.internal.ConsoleLogPlugin
-Bundle-Vendor: Eclipse
-Bundle-Localization: plugin
-Export-Package: org.eclipse.linuxtools.systemtap.ui.consolelog,
- org.eclipse.linuxtools.systemtap.ui.consolelog.actions,
- org.eclipse.linuxtools.systemtap.ui.consolelog.dialogs,
- org.eclipse.linuxtools.systemtap.ui.consolelog.internal,
- org.eclipse.linuxtools.systemtap.ui.consolelog.preferences,
- org.eclipse.linuxtools.systemtap.ui.consolelog.structures,
- org.eclipse.linuxtools.systemtap.ui.consolelog.views
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.ui.console;visibility:=reexport,
- org.eclipse.ui.workbench.texteditor,
- org.eclipse.linuxtools.systemtap.ui.editor,
- org.eclipse.linuxtools.systemtap.ui.structures,
- com.jcraft.jsch;bundle-version="0.1.37"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/build.properties
deleted file mode 100644
index fc993cec49..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/build.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- icons/,\
- plugin.properties,\
- .classpath
-src.includes = .classpath
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/icons/actions/save_log.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/icons/actions/save_log.gif
deleted file mode 100644
index 71ad510b41..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/icons/actions/save_log.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/icons/views/error_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/icons/views/error_obj.gif
deleted file mode 100644
index b6922ac11c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/icons/views/error_obj.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/plugin.properties
deleted file mode 100644
index afd8b0297e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/plugin.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-view.error.name=Error Log
-
-action.saveLog.name=Save &Log
-action.saveLog.desc=Save console log to file
-
-preference.consoleLog.name=RemoteServer \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/plugin.xml
deleted file mode 100644
index 82a09c16b5..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/plugin.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
- <extension
- point="org.eclipse.ui.views">
- <view
- name="%view.error.name"
- allowMultiple="false"
- icon="icons/views/error_obj.gif"
- class="org.eclipse.linuxtools.systemtap.ui.consolelog.views.ErrorView"
- id="org.eclipse.linuxtools.systemtap.ui.consolelog.views.ErrorView"/>
- </extension>
-
-
- <extension
- point="org.eclipse.ui.viewActions">
- <viewContribution
- id="org.eclipse.linuxtools.systemtap.ui.consolelog.consoleview.toolbar"
- targetID="org.eclipse.ui.console.ConsoleView">
- <action
- id="org.eclipse.linuxtools.systemtap.ui.consolelog.actions.SaveLogAction"
- label="%action.saveLog.name"
- tooltip="%action.saveLog.desc"
- class="org.eclipse.linuxtools.systemtap.ui.consolelog.actions.SaveLogAction"
- icon="icons/actions/save_log.gif"
- toolbarPath="launchGroup"
- state="false"
- style="push"/>
-
- </viewContribution>
- </extension>
-
- <extension
- point="org.eclipse.core.runtime.preferences">
- <initializer class="org.eclipse.linuxtools.systemtap.ui.consolelog.preferences.PreferenceInitializer"/>
- </extension>
-
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%preference.consoleLog.name"
- id="com.qualityeclipse.systemtap.prefs.consoleLog"
- class="org.eclipse.linuxtools.systemtap.ui.consolelog.preferences.ConsoleLogPreferencePage"
- category="com.qualityeclipse.systemtap.prefs.view"/>
- </extension>
-</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/ClientSession.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/ClientSession.java
deleted file mode 100644
index dc3db44111..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/ClientSession.java
+++ /dev/null
@@ -1,326 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.consolelog;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.TreeMap;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.net.Socket;
-import java.net.UnknownHostException;
-
-import org.eclipse.linuxtools.systemtap.ui.consolelog.dialogs.ErrorMessage;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.internal.ConsoleLogPlugin;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.preferences.ConsoleLogPreferenceConstants;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.DMRequest;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.DMResponse;
-
-
-
-
-/**
- * Singleton thread. Maintains the communication between the
- * data manager and the client (this).
- *
- * @author patrickm
- *
- */
-public final class ClientSession extends Thread {
-
- private static ClientSession instance = null;
- private static int portnumber, clientID;
- private static boolean connected;
- private static String hostname;
- private static int scriptnumber;
- private static InputStream in;
- private static TreeMap<Integer, LinkedBlockingQueue<byte[]>> mbox;
-
- private ClientSession () {
- // only happens once
-
- hostname = ConsoleLogPlugin.getDefault().getPluginPreferences().getString(ConsoleLogPreferenceConstants.HOST_NAME);
- portnumber = ConsoleLogPlugin.getDefault().getPluginPreferences().getInt(ConsoleLogPreferenceConstants.PORT_NUMBER);
- mbox = new TreeMap<Integer, LinkedBlockingQueue<byte[]>> ();
- connected = createConnection ();
- scriptnumber = 15;
- if (connected) this.start();
- }
-
- /**
- * Send a request packet to the data manager. Synchronized, only
- * one request can be sent at a time.
- *
- * @param req The filled in request packet to send over the socket.
- * @return true if successfully sent, false otherwise.
- */
- public synchronized boolean sendRequest (DMRequest req) {
-
- try {
- // open perma-socket:
- Socket tmp = new Socket(hostname, portnumber);
- OutputStream out = tmp.getOutputStream();
-
- out.write(req.getData());
- out.flush();
- out.flush();
- out.close();
-
- return true;
-
- } catch (final UnknownHostException uhe) {
- new ErrorMessage("Unknown host!", "Check if server is running").open();
- System.err.println("Unknown host: " + uhe.getMessage());
- connected = false;
- return false;
- } catch (final IOException ioe) {
- new ErrorMessage("Unable to send request!", "Check if server is running").open();
- System.err.println("Req I/O error " + ioe.getMessage());
- connected = false;
- return false;
- }
- }
-
- /**
- * Read a response from the data manager and return the response packet.
- *
- * @return A response packet. Possibly invalid/incomplete.
- */
- public DMResponse recvResponse (int scriptnum) {
-
- if (!mbox.containsKey(scriptnum)) {
- return null;
- }
- try {
- DMResponse dm = new DMResponse (mbox.get(scriptnum).take());
-
- return dm;
- } catch (InterruptedException ie) {
- return null;
- }
-
- }
-
- /**
- * Read size bytes from the socket and return the result as a String. The
- * size is most likely from DMResponse.packetsize .
- *
- * @param size The number of bytes to read from the open socket.
- * @return A String of size characters long, or null if there was an error.
- */
- public byte[] recvData (int scriptnum, int size) {
- if (!mbox.containsKey(scriptnum)) {
-
- return null;
- }
-
- try {
- // maybe check that the sizes match?
- return mbox.get(scriptnum).take();
-
- } catch (InterruptedException ie) {
-// subscription.interrupt() was probably called
- System.err.println("Interruptedrecvdata");
- return null;
- }
- }
-
- public boolean addSubscription (int scriptnum) {
- if (mbox.containsKey(scriptnum))
- {
- return false;
- }
- mbox.put(scriptnum, new LinkedBlockingQueue<byte[]>());
- return true;
- }
-
- public boolean delSubscription (int scriptnum)
- {
- if (!mbox.containsKey(scriptnum))
- return false;
-
-
- mbox.get(scriptnum).clear();
- mbox.remove(scriptnum);
- return true;
- }
-
- public static synchronized ClientSession getInstance () {
- // synchronized so everybody has the same session
- if (instance == null)
- instance = new ClientSession ();
- else
- {
- if(!isConnected())
- {
- connected=instance.createConnection();
- scriptnumber = 15;
- if (connected) instance.start();
- }
- }
- return instance;
- }
-
- public static int getNewScriptId()
- {
- return scriptnumber++;
- }
-
- public static boolean isConnected () {
- return connected;
- }
-
- public int getcid () {
- return clientID;
- }
-
- public void run () {
-
- while (!Thread.interrupted()) {
-
- final byte[] headBuffer = new byte[DMResponse.packetsize];
- final byte[] bodyBuffer;
- DMResponse header;
-
- try {
- // Boolean first = new Boolean(true);
- in.read(headBuffer, 0, headBuffer.length);
- header = new DMResponse (headBuffer);
- if(header.isValid())
- {
- bodyBuffer = new byte[header.getsize()];
- in.read(bodyBuffer, 0, bodyBuffer.length);
- if(header.getsource() == DMResponse.SUBSCRIPTION_MGR)
- {
- if(!mbox.containsKey(header.getscriptID()))
- mbox.put(header.getscriptID (), new LinkedBlockingQueue<byte[]> ());
- mbox.get(header.getscriptID()).put(header.tobytes());
- mbox.get(header.getscriptID()).put(bodyBuffer);
-
- }
- else
- {
- if(!mbox.containsKey(header.getscriptID()))
- mbox.put(header.getscriptID (), new LinkedBlockingQueue<byte[]> ());
- mbox.get(header.getscriptID()).put(header.tobytes());
- mbox.get(header.getscriptID()).put(bodyBuffer);
-
- }
- }
- else {
- // either the header was not valid,
- // or the scriptid has not been seen before..
-
- }
-
- } catch (InterruptedException ie) {
- // probably shutting down
- System.err.println ("Interrupted: " + ie.getMessage());
- break;
-
- } catch (IOException ioe) {
- new ErrorMessage("I/O Error Check host!", "See stderr for more details").open();
- System.err.println ("i/o error: " + ioe.getMessage());
- return;
-
- } catch (Exception e) {
- new ErrorMessage("Check if DMD is running", "See stderr for more details").open();
- System.err.println ("Server terminated unexpectedly?," + e.getMessage());
- return;
- }
-
-
-
- } // while
- this.destroyConnection();
-
- }
-
- /**
- * Grab hostname and port settings from the settings, attempt to open
- * socket, and finally attempt to open a connection to the data manager
- * and store a clientID. If anything fails the connection is left in an
- * unknown state (see stderr).
- *
- * @return true if everything succeeded, false otherwise.
- */
- public boolean createConnection () {
-
- final DMRequest ccpacket = new DMRequest (DMRequest.CREATE_CONN, 0, 0, 0);
- final byte buffer[] = new byte[DMResponse.packetsize];
- final DMResponse respacket;
- hostname = ConsoleLogPlugin.getDefault().getPluginPreferences().getString(ConsoleLogPreferenceConstants.HOST_NAME);
- portnumber = ConsoleLogPlugin.getDefault().getPluginPreferences().getInt(ConsoleLogPreferenceConstants.PORT_NUMBER);
-
- OutputStream out = null;
- try {
-
- Socket tmp = new Socket(hostname, portnumber);
- out = tmp.getOutputStream();
- in = tmp.getInputStream();
- out.write(ccpacket.getData());
- out.flush();
- in.read(buffer, 0, buffer.length);
- respacket = new DMResponse (buffer);
-
- } catch (final UnknownHostException uhe) {
- new ErrorMessage("Unknown host!", "See stderr for more details").open();
- System.err.println("Unknown host: " + uhe.getMessage());
- return false;
- } catch (final IOException ioe) {
- new ErrorMessage("Connection I/O error!", "See stderr for more details").open();
- System.err.println("Con I/O error: " + ioe.getMessage());
- //ioe.printStackTrace();
- return false;
- }
-
- if (!respacket.isValid())
- {
- return false;}
-
-
- clientID = respacket.getclientID();
- return true;
- }
-
- /**
- * Send a disconnection request to the data manager, and attempt to
- * close the open socket to the data manager. If anything fails the
- * connection is left in a unknown state (see stderr).
- *
- * @return true if successfully destroyed, false otherwise
- */
- public boolean destroyConnection () {
-
- final DMRequest dcpacket = new DMRequest (DMRequest.DESTROY_CONN, 0, clientID, 0);
-
- try {
- sendRequest (dcpacket);
- in.close();
- connected = false;
- return true;
- } catch (final IOException e) {
- new ErrorMessage("Connection close error!", "See stderr for more details").open();
- System.err.println("Close error: " + e.getMessage());
- return false;
- }
-
-// Old code that actually checks the response and whatnot,
-// removed because we can hang waiting for a response from
-// (for example) a recently deceased Data Manager
-// if (!sendRequest (dcpacket))
-// rc = false;
-//
-// final DMResponse respacket = recvResponse ();
-//
-// if (respacket.getreturnCode() != 0)
-// rc = false;
-//
-// try {
-// in.close();
-// } catch (final IOException e) {
-// System.err.println("Close error: " + e.getMessage());
-// rc = false;
-// }
-//
-// return rc;
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/ScpClient.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/ScpClient.java
deleted file mode 100644
index 757b719c5e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/ScpClient.java
+++ /dev/null
@@ -1,232 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.consolelog;
-
-import com.jcraft.jsch.*;
-import java.awt.*;
-import javax.swing.*;
-
-import org.eclipse.linuxtools.systemtap.ui.consolelog.dialogs.ErrorMessage;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.internal.ConsoleLogPlugin;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.preferences.ConsoleLogPreferenceConstants;
-
-
-import java.io.*;
-
-public class ScpClient{
-
- private Session session;
-
- public ScpClient() {
- //public static void main(String[] arg){
-
-
- String user=ConsoleLogPlugin.getDefault().getPluginPreferences().getString(ConsoleLogPreferenceConstants.SCP_USER);
- String host=ConsoleLogPlugin.getDefault().getPluginPreferences().getString(ConsoleLogPreferenceConstants.HOST_NAME);
-
-
- //System.out.println(lfile + " " + rfile);
-
- try{
- JSch jsch=new JSch();
-
- session=jsch.getSession(user, host, 22);
-
- // username and password will be given via UserInfo interface.
- //UserInfo ui=new MyUserInfo();
- //session.setUserInfo(ui);
- session.setPassword(ConsoleLogPlugin.getDefault().getPluginPreferences().getString(ConsoleLogPreferenceConstants.SCP_PASSWORD));
- java.util.Properties config = new java.util.Properties();
- config.put("StrictHostKeyChecking", "no");
- session.setConfig(config);
- session.connect();
- }catch(Exception e)
- {
- e.printStackTrace(System.err);
- new ErrorMessage("Error in connection", "File Transfer failed.\n See stderr for more details").open();
- }
- }
-
- public void transfer(String fromFile, String toFile) {
- // exec 'scp -t rfile' remotely
- FileInputStream fis=null;
- String rfile=toFile;
- String lfile=fromFile;
- String command="scp -t "+rfile;
- try {
- Channel channel=session.openChannel("exec");
- ((ChannelExec)channel).setCommand(command);
-
- // get I/O streams for remote scp
- OutputStream out=channel.getOutputStream();
- InputStream in=channel.getInputStream();
-
- channel.connect();
-
-
- if(checkAck(in)!=0){
- System.out.println("err");
- }
-
- // send "C0644 filesize filename", where filename should not include '/'
- long filesize=(new File(lfile)).length();
- command="C0644 "+filesize+" ";
- if(lfile.lastIndexOf('/')>0){
- command+=lfile.substring(lfile.lastIndexOf('/')+1);
- }
- else{
- command+=lfile;
- }
- command+="\n";
-
- out.write(command.getBytes()); out.flush();
- if(checkAck(in)!=0){
- System.out.println("err");
- }
-
-
-
- // send a content of lfile
- fis=new FileInputStream(lfile);
- byte[] buf=new byte[1024];
- while(true){
- int len=fis.read(buf, 0, buf.length);
- if(len<=0) break;
- out.write(buf, 0, len); //out.flush();
-
- }
- fis.close();
- fis=null;
- // send '\0'
- buf[0]=0; out.write(buf, 0, 1); out.flush();
- if(checkAck(in)!=0){
- System.out.println("err");
- }
- out.close();
-
- channel.disconnect();
- session.disconnect();
-
- }
- catch(Exception e){
- try{if(fis!=null)fis.close();}catch(Exception ee){}
-
- }
- }
-
- static int checkAck(InputStream in) throws IOException{
- int b=in.read();
- // b may be 0 for success,
- // 1 for error,
- // 2 for fatal error,
- // -1
- if(b==0) return b;
- if(b==-1) return b;
-
- if(b==1 || b==2){
- StringBuffer sb=new StringBuffer();
- int c;
- do {
- c=in.read();
- sb.append((char)c);
- }
- while(c!='\n');
- if(b==1){ // error
- //System.out.print(sb.toString());
- }
- if(b==2){ // fatal error
- //System.out.print(sb.toString());
- }
- }
- return b;
- }
-
- public static class MyUserInfo implements UserInfo, UIKeyboardInteractive{
- public String getPassword(){ return passwd; }
- public boolean promptYesNo(String str){
- Object[] options={ "yes", "no" };
- int foo=JOptionPane.showOptionDialog(null,
- str,
- "Warning",
- JOptionPane.DEFAULT_OPTION,
- JOptionPane.WARNING_MESSAGE,
- null, options, options[0]);
- return foo==0;
- }
-
- String passwd;
- JTextField passwordField=(JTextField)new JPasswordField(20);
-
- public String getPassphrase(){ return null; }
- public boolean promptPassphrase(String message){ return true; }
- public boolean promptPassword(String message){
- Object[] ob={passwordField};
- int result=
- JOptionPane.showConfirmDialog(null, ob, message,
- JOptionPane.OK_CANCEL_OPTION);
- if(result==JOptionPane.OK_OPTION){
- passwd=passwordField.getText();
- return true;
- }
- else{ return false; }
- }
- public void showMessage(String message){
- JOptionPane.showMessageDialog(null, message);
- }
- final GridBagConstraints gbc =
- new GridBagConstraints(0,0,1,1,1,1,
- GridBagConstraints.NORTHWEST,
- GridBagConstraints.NONE,
- new Insets(0,0,0,0),0,0);
- private Container panel;
- public String[] promptKeyboardInteractive(String destination,
- String name,
- String instruction,
- String[] prompt,
- boolean[] echo){
- panel = new JPanel();
- panel.setLayout(new GridBagLayout());
-
- gbc.weightx = 1.0;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.gridx = 0;
- panel.add(new JLabel(instruction), gbc);
- gbc.gridy++;
-
- gbc.gridwidth = GridBagConstraints.RELATIVE;
-
- JTextField[] texts=new JTextField[prompt.length];
- for(int i=0; i<prompt.length; i++){
- gbc.fill = GridBagConstraints.NONE;
- gbc.gridx = 0;
- gbc.weightx = 1;
- panel.add(new JLabel(prompt[i]),gbc);
-
- gbc.gridx = 1;
- gbc.fill = GridBagConstraints.HORIZONTAL;
- gbc.weighty = 1;
- if(echo[i]){
- texts[i]=new JTextField(20);
- }
- else{
- texts[i]=new JPasswordField(20);
- }
- panel.add(texts[i], gbc);
- gbc.gridy++;
- }
-
- if(JOptionPane.showConfirmDialog(null, panel,
- destination+": "+name,
- JOptionPane.OK_CANCEL_OPTION,
- JOptionPane.QUESTION_MESSAGE)
- ==JOptionPane.OK_OPTION){
- String[] response=new String[prompt.length];
- for(int i=0; i<prompt.length; i++){
- response[i]=texts[i].getText();
- }
- return response;
- }
- else{
- return null; // cancel
- }
- }
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/Subscription.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/Subscription.java
deleted file mode 100644
index aabb2ac17b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/Subscription.java
+++ /dev/null
@@ -1,420 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.consolelog;
-
-
-//import com.trilead.ssh2.SCPClient;
-//import com.trilead.ssh2.Connection;
-//import com.jcraft.jsch.*;
-
-
-import java.io.File;
-import java.io.PipedOutputStream;
-import java.io.PipedInputStream;
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.systemtap.ui.consolelog.dialogs.ErrorMessage;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.DMRequest;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.DMResponse;
-import org.eclipse.linuxtools.systemtap.ui.structures.LoggingStreamDaemon;
-import org.eclipse.linuxtools.systemtap.ui.structures.listeners.IGobblerListener;
-import org.eclipse.linuxtools.systemtap.ui.structures.runnable.StreamGobbler;
-
-
-
-public class Subscription extends Thread {
- private int scriptid;
- private boolean running;
- private final ClientSession session;
- private final String filename;
- private final boolean isGuru;
- private boolean disposed = false;
- private PipedOutputStream pos = null;
- private PipedInputStream pis = null;
- private StreamGobbler inputGobbler = null;
- private StreamGobbler errorGobbler = null;
- private ArrayList<IGobblerListener> inputListeners = new ArrayList<IGobblerListener>(); //Only used to allow adding listeners before creating the StreamGobbler
- private ArrayList<IGobblerListener> errorListeners = new ArrayList<IGobblerListener>(); //Only used to allow adding listeners before creating the StreamGobbler
- private LoggingStreamDaemon logger;
-
- public Subscription(final int scriptid) {
- this.scriptid = scriptid;
- this.filename = null;
- this.running = false;
- this.session = ClientSession.getInstance();
- this.isGuru = false;
-
- }
-
- public Subscription(final String filename,boolean isGuru) {
- this.filename = filename;
- this.scriptid = -1;
- this.running = false;
- this.session = ClientSession.getInstance();
- this.isGuru = isGuru;
- }
-
- public boolean init() {
- // send subscription request packet
- // check if response is OK
-
- if (!ClientSession.isConnected()) {
- return false;
- }
-
-
- // BusyIndicator.showWhile(null, new Runnable() {
- // public void run() {
- try{
- ScpClient scpclient = new ScpClient();
- scpclient.transfer(filename,"/tmp/"+ filename.substring(filename.lastIndexOf('/')+1));
- }catch(Exception e){e.printStackTrace();}
- scriptid = ClientSession.getNewScriptId();
- final DMRequest subreq = new DMRequest(DMRequest.SUBSCRIBE,scriptid, filename,session.getcid(), 0, isGuru);
- if (!session.sendRequest(subreq)) {
- //System.out.println("sent subscription");
- // return false;
- }
-
-
- session.addSubscription(scriptid);
- // FIXME: horrible hack. I think there is some sort of deadlock issue
- // when starting up, either way this fixes it.
- try { Thread.sleep(500); }
- catch (InterruptedException ie) {}
-
- final DMResponse subrep = session.recvResponse(scriptid);
- if (subrep.isValid()) {
- scriptid = subrep.getscriptID();
-
-
- logger = new LoggingStreamDaemon();
- inputListeners.add(logger);
-
- try{
- pos = new PipedOutputStream();
- pis = new PipedInputStream(pos);
- pos.flush();
- }catch(Exception e)
- {
- new ErrorMessage("Could not subscribe!", "See stderr for more details").open();
- }
-
- inputGobbler = new StreamGobbler(pis);
- addInputStreamListener(logger);
-
- return true;
- }
- else {
- session.delSubscription(scriptid);
- new ErrorMessage("Could not subscribe!", "Response from Server not valid \n See stderr for more details").open();
- return false;
- }
- }
-
- /**
- * Gather data from a previously started script and do stuff with it.
- * Contains blocking reads.
- *
- */
- public void run () {
- running = true;
- DMResponse subrep = null;
- //long timeToRemove = 0;
- inputGobbler.start();
- while (!Thread.interrupted() && ClientSession.isConnected()) {
- subrep = session.recvResponse(scriptid);
- //timeToRemove = System.currentTimeMillis() - (1000 * ConsoleLogPlugin.getDefault().getPluginPreferences().getInt(ConsoleLogPreferenceConstants.SAVE_LENGTH));
- if (subrep == null) {
- // Interrupting this thread cause recvResponse to return
- // from its blocking read, leaving subrep null
- break;
- }
-
- if (subrep.isValid() && (subrep.getsource() == DMResponse.STDERR)) {
- // log the err output?, maybe pop up a dialog? ignore for now..
- final String outp = new String (session.recvData(scriptid, subrep.getsize()));
- final String[] lines = outp.trim().split("\n");
- for (final String str : lines) {
- try{
- inputGobbler.fireNewDataEvent(str + "\n");
- }catch(Exception e)
- {
- System.err.println(e.toString());
- }
-
- }
- return;
- }
- else if (subrep.isValid()) {
-
- final String outp = new String (session.recvData(scriptid, subrep.getsize()));
-
- final String[] lines = outp.trim().split("\n");
- for (final String str : lines) {
- try{
- inputGobbler.fireNewDataEvent(str + "\n");
- }catch(Exception e)
- {
- System.err.println(e.toString());
- }
-
- }
-
- }
- }
-
- final DMRequest unsub = new DMRequest (DMRequest.UNSUBSCRIBE, scriptid, session.getcid(), 0);
- if (!session.sendRequest (unsub))
- System.err.println ("Failed Unsubscribing: " + session.getcid());
-
- subrep = session.recvResponse(scriptid);
- delSubscription();
-
- running = false;
- }
-
- public boolean isRunning() {
- return running;
- }
-
- public String getScriptName(final int script) {
- return "table" + script;
- }
-
- public String getOutput()
- {
- return logger.getOutput();
- }
-
- public boolean saveLog(File file) {
- return logger.saveLog(file);
- }
-
-
-
- public void dispose() {
- if(!disposed) {
- disposed = true;
- inputListeners = null;
- errorListeners = null;
-
- if(null != inputGobbler){
- inputGobbler.dispose();
- inputGobbler.stop();
- }
- inputGobbler = null;
-
- if(null != errorGobbler){
- errorGobbler.dispose();
- errorGobbler.stop();
- }
- errorGobbler = null;
- }
- }
-
- /**
- * Registers the provided <code>IGobblerListener</code> with the InputStream
- * @param listener A listener to monitor the InputStream from the Process
- */
- public void addInputStreamListener(IGobblerListener listener) {
- if(null != inputGobbler)
- {
- inputGobbler.addDataListener(listener);
- }
- else
- inputListeners.add(listener);
- }
-
- /**
- * Registers the provided <code>IGobblerListener</code> with the ErrorStream
- * @param listener A listener to monitor the ErrorStream from the Process
- */
- public void addErrorStreamListener(IGobblerListener listener) {
- if(null != errorGobbler)
- errorGobbler.addDataListener(listener);
- else
- errorListeners.add(listener);
- }
-
- /**
- * Returns the list of everything that is listening the the InputStream
- * @return List of all <code>IGobblerListeners</code> that are monitoring the stream.
- */
- public ArrayList<IGobblerListener> getInputStreamListeners() {
- if(null != inputGobbler)
- return inputListeners;
- else
- return inputGobbler.getDataListeners();
- }
-
- /**
- * Returns the list of everything that is listening the the ErrorStream
- * @return List of all <code>IGobblerListeners</code> that are monitoring the stream.
- */
- public ArrayList<IGobblerListener> getErrorStreamListeners() {
- if(null != errorGobbler)
- return errorListeners;
- else
- return errorGobbler.getDataListeners();
- }
-
- /**
- * Removes the provided listener from those monitoring the InputStream.
- * @param listener An </code>IGobblerListener</code> that is monitoring the stream.
- */
- public void removeInputStreamListener(IGobblerListener listener) {
- if(null != inputGobbler)
- inputGobbler.removeDataListener(listener);
- else
- inputListeners.remove(listener);
- }
-
- /**
- * Removes the provided listener from those monitoring the ErrorStream.
- * @param listener An </code>IGobblerListener</code> that is monitoring the stream.
- */
- public void removeErrorStreamListener(IGobblerListener listener) {
- if(null != errorGobbler)
- errorGobbler.removeDataListener(listener);
- else
- errorListeners.remove(listener);
- }
-
- public void delSubscription()
- {
- session.delSubscription(scriptid);
- }
-
- /*private boolean sendFile()
- {
- /*try
- {
- Connection conn = new Connection(ConsoleLogPlugin.getDefault().getPluginPreferences().getString(ConsoleLogPreferenceConstants.HOST_NAME));
- conn.connect();
- boolean isAuthenticated = conn.authenticateWithPassword(ConsoleLogPlugin.getDefault().getPluginPreferences().getString(ConsoleLogPreferenceConstants.SCP_USER),ConsoleLogPlugin.getDefault().getPluginPreferences().getString(ConsoleLogPreferenceConstants.SCP_PASSWORD));
- if (isAuthenticated == false)
- {
- new ErrorMessage("Could not send script!", "Authentication failure").open();
- return false;
- }
- SCPClient scpclient = conn.createSCPClient();
- scpclient.put(filename, "/tmp");
- // return true;
- }catch(Exception Ex)
- {
- new ErrorMessage("Could not send script!", "Check if scp is enabled on server").open();
- return false;
- }
- FileInputStream fis=null;
- try{
- String osname=(String)(System.getProperties().get("os.name"));
- System.out.println(osname);
- JSch jsch = new JSch();
- System.out.println("1");
- Session session = jsch.getSession(ConsoleLogPlugin.getDefault().getPluginPreferences().getString(ConsoleLogPreferenceConstants.SCP_USER), ConsoleLogPlugin.getDefault().getPluginPreferences().getString(ConsoleLogPreferenceConstants.HOST_NAME), 22);
- System.out.println("1");
- session.setPassword(ConsoleLogPlugin.getDefault().getPluginPreferences().getString(ConsoleLogPreferenceConstants.SCP_PASSWORD));
- System.out.println("1");
- session.connect();
- System.out.println("1");
- String command="scp -p -t /tmp/"+ filename;
- Channel channel=session.openChannel("exec");
- ((ChannelExec)channel).setCommand(command);
- OutputStream out=channel.getOutputStream();
- InputStream in=channel.getInputStream();
- System.out.println("2");
- channel.connect();
- System.out.println("3");
- if(checkAck(in)!=0){
- //System.exit(0);
- }
- System.out.println("4");
- // send "C0644 filesize filename", where filename should not include '/'
- long filesize=(new File(filename)).length();
- command="C0644 "+filesize+" ";
- if(filename.lastIndexOf('/')>0){
- command+=filename.substring(filename.lastIndexOf('/')+1);
- }
- else{
- command+=filename;
- }
- command+="\n";
- System.out.println("5");
- out.write(command.getBytes()); out.flush();
- System.out.println("6");
- if(checkAck(in)!=0){
- //System.exit(0);
- }
- System.out.println("7");
- // send a content of lfile
- fis=new FileInputStream(filename);
- byte[] buf=new byte[1024];
- while(true){
- int len=fis.read(buf, 0, buf.length);
- if(len<=0) break;
- out.write(buf, 0, len); //out.flush();
- }
- fis.close();
- fis=null;
- // send '\0'
- System.out.println("8");
- buf[0]=0; out.write(buf, 0, 1); out.flush();
- System.out.println("9");
- if(checkAck(in)!=0){
- //System.exit(0);
- }
- System.out.println("10");
- out.close();
-
- channel.disconnect();
- session.disconnect();
-
- return true;
- }
- catch(Exception e){
- System.out.println(e);
- try{if(fis!=null)fis.close();}catch(Exception ee){}
- }
- return true;
- }
-
-
- static int checkAck(InputStream in) throws IOException{
- int b=in.read();
- // b may be 0 for success,
- // 1 for error,
- // 2 for fatal error,
- // -1
- if(b==0) return b;
- if(b==-1) return b;
-
- if(b==1 || b==2){
- StringBuffer sb=new StringBuffer();
- int c;
- do {
- c=in.read();
- sb.append((char)c);
- }
- while(c!='\n');
- if(b==1){ // error
- System.out.print(sb.toString());
- }
- if(b==2){ // fatal error
- System.out.print(sb.toString());
- }
- }
- return b;
- }
- */
- /**
- * Removes the provided listener from those monitoring the ErrorStream.
- * @param listener An </code>IGobblerListener</code> that is monitoring the stream.
- *//*
- public void removeInputStreamListeners() {
- if(null != inputGobbler)
- inputGobbler.r removeDataListener(listener);
- else
- inputListeners.remove
- }
- */
-
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/ConsoleAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/ConsoleAction.java
deleted file mode 100644
index 0cbeb7d137..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/ConsoleAction.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.consolelog.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ScriptConsole;
-import org.eclipse.ui.IPropertyListener;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.console.IConsoleConstants;
-import org.eclipse.ui.console.IConsoleView;
-
-
-
-
-/**
- * A basic core class that provides common methods that are needed by any
- * action that makes use of the Console.
- * @author Ryan Morse
- */
-public abstract class ConsoleAction extends Action implements IWorkbenchWindowActionDelegate, IViewActionDelegate {
- public void init(IWorkbenchWindow window) {}
-
- public void init(IViewPart part) {}
-
- public void run(IAction action) {
- run();
- }
-
- public abstract void run();
-
-
- /**
- * Finds and returns the active console.
- * @return The active <code>ScriptConsole<code> in the ConsoleView
- */
- protected ScriptConsole getActive() {
- IConsoleView ivp = (IConsoleView)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(IConsoleConstants.ID_CONSOLE_VIEW);
- return (ScriptConsole)ivp.getConsole();
- }
-
- /**
- * Updates whether the action should be enabled when the user changes their ViewPart selection
- */
- public void selectionChanged(IAction act, ISelection select) {
- this.setAct(act);
- buildEnablementChecks();
- }
-
- /**
- * Builds the checks to see if the action should be enabled or not
- */
- private void buildEnablementChecks() {
- IViewPart ivp = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(IConsoleConstants.ID_CONSOLE_VIEW);
- if(null != ivp) {
- setEnablement(isRunning((IConsoleView)ivp));
- ivp.addPropertyListener(listener);
- }
- }
-
- /**
- * Checks to see if the active console is still running
- */
- private boolean isRunning(IConsoleView cv) {
- ScriptConsole console = (ScriptConsole)cv.getConsole();
- return (console != null && console.isRunning());
- }
-
- /**
- * Changes whether or not this action is enabled
- */
- private void setEnablement(boolean enabled) {
- //act.setEnabled(enabled); //TODO: This is disabled until we figure out how to get it to realize script is running.
- }
-
- /**
- * Disposes of all internal references held by this class. No method should be called after
- * calling this.
- */
- public void dispose() {
- setAct(null);
- //Unable to findView when disposed is called, as a result null pointer exception is thrown
- //PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(IConsoleConstants.ID_CONSOLE_VIEW).removePropertyListener(listener);
- listener = null;
- }
-
- public void setAct(IAction act) {
- this.act = act;
- }
-
- public IAction getAct() {
- return act;
- }
-
- private IAction act;
- private IPropertyListener listener = new IPropertyListener() {
- public void propertyChanged(Object o, int i) {
- if(o instanceof IConsoleView)
- setEnablement(isRunning((IConsoleView)o));
- }
- };
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/SaveLogAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/SaveLogAction.java
deleted file mode 100644
index e2b1b30774..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/SaveLogAction.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.consolelog.actions;
-
-import java.io.File;
-
-import org.eclipse.linuxtools.systemtap.ui.consolelog.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ScriptConsole;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.ui.PlatformUI;
-
-
-
-/**
- * This class is used to allow the user to save the log generated from an active console
- * @author Ryan Morse
- */
-public class SaveLogAction extends ConsoleAction {
- /**
- * The main method of this class. Handles getting the currnet <code>ScriptConsole</code>
- * and telling it to save the output to the selected file.
- */
- public void run() {
- ScriptConsole console = getActive();
- if(null != console && console.isRunning()) {
- File file = getFile();
-
- if(null != file)
- console.saveStream(file);
- }
- }
-
- /**
- * Brings up a dialog box for the user to select a place to save the log output.
- * @return File representing the desired destination for the log.
- */
- private File getFile() {
- String path = null;
- FileDialog dialog= new FileDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.SAVE);
- dialog.setText(Localization.getString("SaveLogAction.OutputFile"));
-
- path = dialog.open();
-
- if(null == path)
- return null;
-
- return new File(path);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/StopScriptAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/StopScriptAction.java
deleted file mode 100644
index ed7ed07c1a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/StopScriptAction.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.consolelog.actions;
-
-import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ScriptConsole;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.console.ConsolePlugin;
-import org.eclipse.ui.console.IConsole;
-
-
-
-/**
- * A class that handles stopping the <code>ScriptConsole</code>.
- * @author Ryan Morse
- */
-public class StopScriptAction extends ConsoleAction {
- /**
- * This is the main method of the class. It handles stopping the
- * currently active <code>ScriptConsole</code>.
- */
- public void run() {
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- boolean stop = false;
- public void run() {
- if(stop) return;
- try {
- ScriptConsole console = getActive();
- if(null != console && console.isRunning())
- console.stop();
- } catch (Exception e) {
- stop = true;
- }
- }
- });
- }
-
- /**
- * This method will stop the i'th <code>ScriptConsole</code> if it is running.
- * @param i The index value of the console that will be stopped.
- */
- public void run(int i) {
- IConsole ic[] = ConsolePlugin.getDefault().getConsoleManager().getConsoles();
- ScriptConsole console = (ScriptConsole)ic[i];
-
- if(console.isRunning())
- console.stop();
-
- }
-
- /**
- * This method will stop all consoles that are running.
- */
- public void stopAll() {
- IConsole ic[] = ConsolePlugin.getDefault().getConsoleManager().getConsoles();
- ScriptConsole console;
-
- for(int i=0; i<ic.length; i++) {
- console = (ScriptConsole)ic[i];
- if(console.isRunning())
- console.stop();
- }
- }
-
- /**
- * This method will check to see if any scripts are currently running.
- * @return - boolean indicating whether any scripts are running
- */
- public boolean anyRunning() {
- IConsole ic[] = ConsolePlugin.getDefault().getConsoleManager().getConsoles();
- ScriptConsole console;
-
- for(int i=0; i<ic.length; i++) {
- console = (ScriptConsole)ic[i];
- if(console.isRunning())
- return true;
- }
- return false;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/ErrorMessage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/ErrorMessage.java
deleted file mode 100644
index 40de170e1c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/ErrorMessage.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.consolelog.dialogs;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.MessageBox;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Creates and displays an error message box that runs in the UI thread.
- *
- */
-public class ErrorMessage {
- private String title;
- private String error;
-
- public ErrorMessage(String title, String error) {
- this.title = title;
- this.error = error;
- }
-
- public void open() {
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- MessageBox messageBox = new MessageBox(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.ICON_ERROR | SWT.OK);
- messageBox.setMessage(error);
- messageBox.setText(title);
- messageBox.open();
- } // end run
- }); // end new Runnable
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/SCPDetails.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/SCPDetails.java
deleted file mode 100644
index 7800389b77..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/SCPDetails.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.consolelog.dialogs;
-
-import org.eclipse.linuxtools.systemtap.ui.consolelog.internal.ConsoleLogPlugin;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.preferences.ConsoleLogPreferenceConstants;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Dialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.events.SelectionEvent;
-
-
-
-public class SCPDetails extends Dialog {
- private Text userText;
- private Text passwordText;
-// private Button rememberButton;
- private Button sendButton;
- private Button cancelButton;
-
- public SCPDetails(Shell parent) {
- super(parent);
- }
-
- public void open() {
-
- Shell parent = getParent();
- final Shell shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
- shell.setText("Enter SCP details");
- shell.setSize(350, 160);
-
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.makeColumnsEqualWidth = false;
- shell.setLayout(layout);
-
- GridData data = new GridData();
- data.grabExcessHorizontalSpace = false;
- data.horizontalAlignment = SWT.LEFT;
- Label userLabel = new Label(shell, SWT.NONE);
- userLabel.setText("User: ");
- userLabel.setLayoutData(data);
-
- data = new GridData();
- data.grabExcessHorizontalSpace = true;
- data.horizontalAlignment = SWT.FILL;
- userText = new Text(shell, SWT.SINGLE | SWT.BORDER);
- userText.setLayoutData(data);
- userText.setText(ConsoleLogPlugin.getDefault().getPluginPreferences().getString(ConsoleLogPreferenceConstants.SCP_USER));
-
- data = new GridData();
- data.grabExcessHorizontalSpace = false;
- data.horizontalAlignment = SWT.LEFT;
- Label passwordLabel = new Label(shell, SWT.NONE);
- passwordLabel.setText("Password: ");
- passwordLabel.setLayoutData(data);
-
- data = new GridData();
- data.grabExcessHorizontalSpace = true;
- data.horizontalAlignment = SWT.FILL;
- passwordText = new Text(shell, SWT.SINGLE | SWT.BORDER);
- passwordText.setEchoChar('*');
- passwordText.setLayoutData(data);
- passwordText.setText(ConsoleLogPlugin.getDefault().getPluginPreferences().getString(ConsoleLogPreferenceConstants.SCP_PASSWORD));
-
-
- data = new GridData();
- data.horizontalAlignment = SWT.RIGHT;
- cancelButton = new Button(shell, SWT.PUSH);
- cancelButton.setLayoutData(data);
- cancelButton.setSize(50, 100);
- cancelButton.setText("Cancel");
- cancelButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- shell.dispose();
- }
- public void widgetDefaultSelected(SelectionEvent e) {}
- });
-
- data = new GridData();
- data.horizontalAlignment = SWT.RIGHT;
- sendButton = new Button(shell, SWT.PUSH);
- sendButton.setLayoutData(data);
- sendButton.setSize(50, 100);
- sendButton.setText("Send");
- sendButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- // FIXME: no error handling is done, should probably be
- // pushed down to the connection level
- // Set the preferences to this new info.
- ConsoleLogPlugin.getDefault().getPreferenceStore().setValue(ConsoleLogPreferenceConstants.SCP_PASSWORD, passwordText.getText());
- ConsoleLogPlugin.getDefault().getPreferenceStore().setValue(ConsoleLogPreferenceConstants.SCP_USER, userText.getText());
-
- shell.close();
- }
- public void widgetDefaultSelected(SelectionEvent e) {}
- });
-
- shell.open();
- Display display = parent.getDisplay();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/SelectServerDialog.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/SelectServerDialog.java
deleted file mode 100644
index 2cfbbebe93..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/SelectServerDialog.java
+++ /dev/null
@@ -1,165 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.consolelog.dialogs;
-
-import org.eclipse.linuxtools.systemtap.ui.consolelog.internal.ConsoleLogPlugin;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.preferences.ConsoleLogPreferenceConstants;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Dialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.events.SelectionEvent;
-
-
-
-public class SelectServerDialog extends Dialog {
- private Text hostText;
- private Text portText;
- private Text userText;
- private Text passwordText;
- private Button rememberButton;
- private Button connectButton;
- private Button cancelButton;
-
- public SelectServerDialog(Shell parent) {
- super(parent);
- }
-
- public void open() {
- if (ConsoleLogPlugin.getDefault().getPluginPreferences().getBoolean(ConsoleLogPreferenceConstants.REMEMBER_SERVER)) {
- return;
- }
-
- Shell parent = getParent();
- final Shell shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
- shell.setText("Remote Server Details");
- shell.pack();
- //shell.setSize(350, 220);
-
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.makeColumnsEqualWidth = false;
- shell.setLayout(layout);
-
- GridData data = new GridData();
- data.grabExcessHorizontalSpace = false;
- data.horizontalAlignment = SWT.LEFT;
- Label hostLabel = new Label(shell, SWT.NONE);
- hostLabel.setText("Host: ");
- hostLabel.setLayoutData(data);
-
- data = new GridData();
- data.grabExcessHorizontalSpace = true;
- data.horizontalAlignment = SWT.FILL;
- hostText = new Text(shell, SWT.SINGLE | SWT.BORDER);
- hostText.setLayoutData(data);
- hostText.setText(ConsoleLogPlugin.getDefault().getPluginPreferences().getString(ConsoleLogPreferenceConstants.HOST_NAME));
-
- data = new GridData();
- data.grabExcessHorizontalSpace = false;
- data.horizontalAlignment = SWT.LEFT;
- Label portLabel = new Label(shell, SWT.NONE);
- portLabel.setText("Port: ");
- portLabel.setLayoutData(data);
-
- data = new GridData();
- data.grabExcessHorizontalSpace = true;
- data.horizontalAlignment = SWT.FILL;
- portText = new Text(shell, SWT.SINGLE | SWT.BORDER);
- portText.setLayoutData(data);
- portText.setText(ConsoleLogPlugin.getDefault().getPluginPreferences().getString(ConsoleLogPreferenceConstants.PORT_NUMBER));
-
- data = new GridData();
- data.grabExcessHorizontalSpace = false;
- data.horizontalAlignment = SWT.LEFT;
- Label userLabel = new Label(shell, SWT.NONE);
- userLabel.setText("User: ");
- userLabel.setLayoutData(data);
-
- data = new GridData();
- data.grabExcessHorizontalSpace = true;
- data.horizontalAlignment = SWT.FILL;
- userText = new Text(shell, SWT.SINGLE | SWT.BORDER);
- userText.setLayoutData(data);
- userText.setText(ConsoleLogPlugin.getDefault().getPluginPreferences().getString(ConsoleLogPreferenceConstants.SCP_USER));
-
- data = new GridData();
- data.grabExcessHorizontalSpace = false;
- data.horizontalAlignment = SWT.LEFT;
- Label passwordLabel = new Label(shell, SWT.NONE);
- passwordLabel.setText("Password: ");
- passwordLabel.setLayoutData(data);
-
- data = new GridData();
- data.grabExcessHorizontalSpace = true;
- data.horizontalAlignment = SWT.FILL;
- passwordText = new Text(shell, SWT.SINGLE | SWT.BORDER);
- passwordText.setEchoChar('*');
- passwordText.setLayoutData(data);
- passwordText.setText(ConsoleLogPlugin.getDefault().getPluginPreferences().getString(ConsoleLogPreferenceConstants.SCP_PASSWORD));
-
-
- data = new GridData();
- data.horizontalAlignment = SWT.LEFT;
- data.horizontalSpan = 2;
- rememberButton = new Button(shell, SWT.CHECK);
- rememberButton.setLayoutData(data);
- rememberButton.setText("Always connect to this host.");
- rememberButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
-
- }
- public void widgetDefaultSelected(SelectionEvent e) {}
- });
-
- data = new GridData();
- data.horizontalAlignment = SWT.RIGHT;
- cancelButton = new Button(shell, SWT.PUSH);
- cancelButton.setLayoutData(data);
- cancelButton.setSize(50, 100);
- cancelButton.setText("Cancel");
- cancelButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- ConsoleLogPlugin.getDefault().getPreferenceStore().setValue(ConsoleLogPreferenceConstants.CANCELLED, true);
- shell.dispose();
-
- }
- public void widgetDefaultSelected(SelectionEvent e) {}
- });
-
- data = new GridData();
- data.horizontalAlignment = SWT.RIGHT;
- connectButton = new Button(shell, SWT.PUSH);
- connectButton.setLayoutData(data);
- connectButton.setSize(50, 100);
- connectButton.setText("Connect");
- connectButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- // FIXME: no error handling is done, should probably be
- // pushed down to the connection level
- // Set the preferences to this new info.
- ConsoleLogPlugin.getDefault().getPreferenceStore().setValue(ConsoleLogPreferenceConstants.PORT_NUMBER, portText.getText());
- ConsoleLogPlugin.getDefault().getPreferenceStore().setValue(ConsoleLogPreferenceConstants.HOST_NAME, hostText.getText());
- ConsoleLogPlugin.getDefault().getPreferenceStore().setValue(ConsoleLogPreferenceConstants.REMEMBER_SERVER, rememberButton.getSelection());
- ConsoleLogPlugin.getDefault().getPreferenceStore().setValue(ConsoleLogPreferenceConstants.SCP_PASSWORD, passwordText.getText());
- ConsoleLogPlugin.getDefault().getPreferenceStore().setValue(ConsoleLogPreferenceConstants.SCP_USER, userText.getText());
- ConsoleLogPlugin.getDefault().getPreferenceStore().setValue(ConsoleLogPreferenceConstants.CANCELLED, false);
-
- shell.close();
- }
- public void widgetDefaultSelected(SelectionEvent e) {}
- });
-
- shell.pack();
- shell.open();
- Display display = parent.getDisplay();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
-
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/internal/ConsoleLogPlugin.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/internal/ConsoleLogPlugin.java
deleted file mode 100644
index 9e7e40f2af..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/internal/ConsoleLogPlugin.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.consolelog.internal;
-
-import org.eclipse.ui.plugin.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class ConsoleLogPlugin extends AbstractUIPlugin {
-
- //The shared instance.
- private static ConsoleLogPlugin plugin;
-
- /**
- * The constructor.
- */
- public ConsoleLogPlugin() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- this.internalInitializeDefaultPluginPreferences();
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static ConsoleLogPlugin 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 AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.linuxtools.systemtap.ui.consolelog", path);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/internal/Localization.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/internal/Localization.java
deleted file mode 100644
index 24f6d52101..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/internal/Localization.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.consolelog.internal;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Localization {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.systemtap.ui.consolelog.internal.localization";
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- private Localization() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/internal/localization.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/internal/localization.properties
deleted file mode 100644
index 7d933a4fd0..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/internal/localization.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-SaveLogAction.OutputFile=Output File
-
-ErrorStreamDaemon.Password=Password:
-
-ErrorView.Description=Description
-
-ScriptConsole.Problem=Problem
-ScriptConsole.ErrorSavingLog=Error saving the log file.
-ScriptConsole.Terminated=<terminated>
-
-ErrorView.Type=Type
-ErrorView.Saw=Saw
-ErrorView.Line=Line
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/preferences/ConsoleLogPreferenceConstants.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/preferences/ConsoleLogPreferenceConstants.java
deleted file mode 100644
index 65d5bf547c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/preferences/ConsoleLogPreferenceConstants.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.consolelog.preferences;
-
-public class ConsoleLogPreferenceConstants {
- //ide
- public static final String HOST_NAME = "host";
- public static final String PORT_NUMBER = "port";
- public static final String DB_COMMIT = "commit";
- public static final String SAVE_LENGTH = "saveLength";
- public static final String REMEMBER_SERVER = "rememberServer";
- public static final String SCP_USER = "scpuser";
- public static final String SCP_PASSWORD = "scppassword";
- public static final String REMEMBER_SCPUSER = "rememberscpuser";
- public static final String CANCELLED = "cancel";
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/preferences/ConsoleLogPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/preferences/ConsoleLogPreferencePage.java
deleted file mode 100644
index 8cc1e47b32..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/preferences/ConsoleLogPreferencePage.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.consolelog.preferences;
-
-import org.eclipse.jface.preference.*;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.internal.ConsoleLogPlugin;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.IWorkbench;
-
-
-
-
-
-public class ConsoleLogPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
- public ConsoleLogPreferencePage() {
- super(GRID);
- // LogManager.logDebug("Start ConsoleLogPreferencePage:", this);
- setPreferenceStore(ConsoleLogPlugin.getDefault().getPreferenceStore());
- setDescription("Preferences when accessing a remote server");
- //LogManager.logDebug("End ConsoleLogPreferencePage:", this);
- }
-
- public void createFieldEditors() {
-
- addField(new StringFieldEditor(ConsoleLogPreferenceConstants.HOST_NAME,
- "Host Name: ", getFieldEditorParent()));
-
- addField(new IntegerFieldEditor(ConsoleLogPreferenceConstants.PORT_NUMBER,
- "Port: ", getFieldEditorParent()));
-
- addField(new StringFieldEditor(ConsoleLogPreferenceConstants.SCP_USER,
- "User Name: ", getFieldEditorParent()));
-
- StringFieldEditor passwordField = new StringFieldEditor(
- ConsoleLogPreferenceConstants.SCP_PASSWORD, "Password: ",
- getFieldEditorParent());
- passwordField.getTextControl(getFieldEditorParent()).setEchoChar('*');
- addField(passwordField);
-
- // addField(new StringFieldEditor(ConsoleLogPreferenceConstants.SCP_PASSWORD,
- // "Password: ", getFieldEditorParent()));
-
- addField(new BooleanFieldEditor(ConsoleLogPreferenceConstants.REMEMBER_SERVER,
- "Always connect to this host.", getFieldEditorParent()));
-
- addField(new IntegerFieldEditor(ConsoleLogPreferenceConstants.SAVE_LENGTH,
- "Seconds to Save Data: ", getFieldEditorParent()));
-
- }
-
- public void init(IWorkbench workbench) {
-
- }
-
- public void dispose() {
-
- super.dispose();
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/preferences/PreferenceInitializer.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/preferences/PreferenceInitializer.java
deleted file mode 100644
index 5d2b1b775f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/preferences/PreferenceInitializer.java
+++ /dev/null
@@ -1,38 +0,0 @@
- /* Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.consolelog.preferences;
-
-
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.internal.ConsoleLogPlugin;
-
-
-
-public class PreferenceInitializer extends AbstractPreferenceInitializer {
- public void initializeDefaultPreferences() {
- IPreferenceStore store = ConsoleLogPlugin.getDefault().getPreferenceStore();
-
- //ide
- store.setDefault(ConsoleLogPreferenceConstants.HOST_NAME, "localhost");
- store.setDefault(ConsoleLogPreferenceConstants.PORT_NUMBER, 22462);
- store.setDefault(ConsoleLogPreferenceConstants.DB_COMMIT, false);
- store.setDefault(ConsoleLogPreferenceConstants.SAVE_LENGTH, 5);
- store.setDefault(ConsoleLogPreferenceConstants.REMEMBER_SERVER, false);
- store.setDefault(ConsoleLogPreferenceConstants.SCP_USER, "guest");
- store.setDefault(ConsoleLogPreferenceConstants.SCP_PASSWORD, "welcome");
- store.setDefault(ConsoleLogPreferenceConstants.REMEMBER_SCPUSER, false);
- store.setDefault(ConsoleLogPreferenceConstants.CANCELLED, false);
-
-
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ConsoleStreamDaemon.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ConsoleStreamDaemon.java
deleted file mode 100644
index 18432e74ce..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ConsoleStreamDaemon.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.consolelog.structures;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.listeners.IGobblerListener;
-import org.eclipse.ui.console.MessageConsoleStream;
-
-
-
-/**
- * A class push data to a ScriptConsole.
- * @author Ryan Morse
- */
-public class ConsoleStreamDaemon implements IGobblerListener {
- public ConsoleStreamDaemon(ScriptConsole console) {
- this.console = console;
- if(null != console)
- msgConsole = console.newMessageStream();
- disposed = false;
- }
-
- /**
- * Prints out the new output data to the console
- */
- protected void pushData() {
- if(null != msgConsole)
- msgConsole.print(output);
- }
-
- /**
- * Captures data events and pushes the data to the console
- */
- public void handleDataEvent(String line) {
- output = line;
- this.pushData();
- }
-
- /**
- * Checks to see if the class has been disposed already
- * @return boolean representing whether or not the class has been disposed
- */
- public boolean isDisposed() {
- return disposed;
- }
-
- /**
- * Disposes of all internal references in the class. No method should be called after this.
- */
- public void dispose() {
- if(!disposed) {
- disposed = true;
- output = null;
- console = null;
- msgConsole = null;
- }
- }
-
- protected String output;
- protected ScriptConsole console;
- protected MessageConsoleStream msgConsole;
- private boolean disposed;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/DMError.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/DMError.java
deleted file mode 100644
index 504aa75498..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/DMError.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.consolelog.structures;
-
-/**
- * Turn error codes into text. Taken from include/staperror.hpp
- * from the data manager's source.
- *
- * @author patrickm
- *
- */
-public final class DMError {
-
- private static String errtext;
-
- public DMError (int errcode) {
-
- if (errcode >= 0) {
- errtext = "Success";
- return;
- }
-
- switch (errcode) {
- case 0x82100001:
- errtext = "Invalid/Unknown request type";
- break;
- case 0x81100002:
- errtext = "Error running script, or script unexpectedly died";
- break;
- case 0x82100003:
- errtext = "Unknown / unused !?";
- break;
- case 0x81100004:
- errtext = "Unused?";
- break;
- case 0x81200005:
- errtext = "Invalid mailbox number requested";
- break;
- case 0x82200006:
- errtext = "Duplicate/invalid un- or subscription request";
- break;
- case 0x82200007:
- errtext = "Failed to release or aquire a mutex lock";
- break;
- case 0x82200009:
- errtext = "Malformed or unrecognizable packet";
- break;
- case 0x8220000A:
- errtext = "Invalid client ID";
- break;
- case 0x8220000B:
- errtext = "Attemting to use unopen or bad channel";
- break;
- default:
- errtext = "Unknown Error: " + errcode;
- }
- return;
- }
-
- public String toString() {
- return new String(errtext);
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/DMPacket.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/DMPacket.java
deleted file mode 100644
index 9eeeca569b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/DMPacket.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.consolelog.structures;
-
-/**
- * A class to represent a data packet. This abstract class just has all of the
- * common fields and associated get-methods.
- *
- * @author patrickm
- *
- */
-public abstract class DMPacket {
-
- // TODO?: replace with java enums
-
- // header ID
- protected final int BEGINSTR = 0xa1b2c3d4;
- public int packetsize;
-
- // common packet fields
- protected int clientID;
- protected int size;
- protected int scriptID;
- protected String filename;
-
- /**
- * Return the client ID number from this packet. This needs to be included
- * in all outgoing packets (so the DM can tell who is sending what).
- *
- * @return The clientID of this packet.
- */
- public int getclientID() {
- return clientID;
- }
- /**
- * Return the filename from this packet. This needs to be included
- * in all outgoing packets (so the DM can tell who is sending what).
- *
- * @return The filename.
- */
-
- public String getfilename() {
- return filename;
- }
-
- /**
- * Return the script number of this packet. Consult the data manager package
- * for what these map to.
- *
- * @return The script number of this packet.
- */
- public int getscriptID() {
- return scriptID;
- }
-
- /**
- * Return the size field of this packet. This is not the size of the packet
- * but the size of the following stream. All request packets this will be
- * zero, most response packets will be non negative.
- *
- * @return The size in bytes of this packets "size" field
- */
- public int getsize() {
- return size;
- }
-
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/DMRequest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/DMRequest.java
deleted file mode 100644
index 44abd3bfb2..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/DMRequest.java
+++ /dev/null
@@ -1,197 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.consolelog.structures;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.eclipse.linuxtools.systemtap.ui.consolelog.dialogs.ErrorMessage;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.internal.ConsoleLogPlugin;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.preferences.ConsoleLogPreferenceConstants;
-
-
-
-
-
-/**
- * The request packet class. This class is used to construct a "packet", which
- * is just a stream of bytes with specific properties. Normally a DMRequest
- * object is constructed, and then its byte-stream is sent over a socket to the
- * data manager.
- *
- * @author patrickm
- *
- */
-public class DMRequest extends DMPacket {
-
- // packet size
- public static final int packetsize = 28; // bytes
-
- // request types
- public static final int CREATE_CONN = 1;
- public static final int SUBSCRIBE = 2;
- public static final int UNSUBSCRIBE = 3;
- public static final int GET_STATUS = 4;
- public static final int SUBSCRIPTION_MODIFY = 5;
- public static final int DESTROY_CONN = 6;
- public static final int FILE = 7;
-
- // request specific
- private final int reqType;
- private final boolean isGuru;
-
- /**
- * Construct a request packet. There is no error checking, if you construct
- * a bad packet then send it to the data manager to see what is wrong with
- * it.
- *
- * @param reqType
- * One of the public REQ_* fields of this packet, the "request" /
- * command of this packet.
- * @param scriptID
- * The script ID associated with this packet, right now only
- * valid for un/subscribe.
- * @param clientID
- * The client ID of this packet. Every packet must have the
- * correct client ID, or 0 if they are requesting one.
- * @param size
- * The size of the succeeding body. Always 0 for now, may change
- * in the future.
- */
- public DMRequest(final int reqType, final int scriptID, final int clientID,
- final int size) {
- this.reqType = reqType;
- this.scriptID = scriptID;
- this.filename = "";
- this.clientID = clientID;
- this.size = size;
- this.isGuru = false;
- }
-
- public DMRequest(final int reqType, final int scriptnum,final String filename, final int clientID,
- final int size, final boolean isGuru) {
- this.reqType = reqType;
- this.filename = filename;
- this.scriptID = scriptnum;
- this.clientID = clientID;
- this.size = size;
- this.isGuru = isGuru;
-
- }
-
-
- /**
- * Convert all of this packet's fields into a stream of bytes of length
- * packetsize. Any errors would leave the packet in an unknown state, so
- * null is returned.
- *
- * @return A stream of bytes representing the packet or null.
- */
- public byte[] getData() {
- // TODO: close these open streams, if needed
- if (reqType == SUBSCRIBE)
- return getFile();
- else
- return getMessage();
- }
-
- public int getReqtype()
- {
- return reqType;
- }
-
- private byte[] getMessage()
- {
- final ByteArrayOutputStream baos = new ByteArrayOutputStream();
- final DataOutputStream dos = new DataOutputStream(baos);
- char a[] = new char[20];
- for (int i = 0; i < 20 ; i++)
- a[i] = ' ';
- String b= ConsoleLogPlugin.getDefault().getPluginPreferences().getString(ConsoleLogPreferenceConstants.SCP_USER);
- b.getChars(0, b.length(), a, 0);
-
- b = null;
- b = String.copyValueOf(a);
-
- //String b = String.copyValueOf(a, 0, 20);
- //System.out.println(a.toString() + " " + b + " " + b.length());
- try {
- dos.writeInt(BEGINSTR);
- dos.writeInt(reqType);
- dos.writeInt(scriptID);
- dos.writeInt(clientID);
- dos.writeInt(0);
- dos.writeInt(ConsoleLogPlugin.getDefault().getPluginPreferences().getString(ConsoleLogPreferenceConstants.SCP_USER).length());
- dos.writeBytes(b);
- // System.out.println(a.length + " " + a.toString().length() + " " + filename.substring(filename.lastIndexOf('/')).length());
- dos.flush();
- } catch (final IOException ioe) {
- new ErrorMessage("Request packet error!", "See stderr for more details").open();
- System.err.println("Packet Error: " + ioe.getMessage());
- // baos.close();
- // dos.close();
- return null;
- }
- return baos.toByteArray();
- }
-
-
- private byte[] getFile()
- {
-
- try {
- /* int len = 0;
- File f = new File(filename);
- FileReader fr = new FileReader(f);
-
- BufferedReader br = new BufferedReader(fr);
- StringBuilder sb = new StringBuilder();
- String line;
- while(null != (line=br.readLine())) {
- sb.append(line + "\n");
- }
- File tmpfile = new File("/home/anithra/eclipse/tmp.stp");
- tmpfile.createNewFile();
- FileWriter tmpfilewriter = new FileWriter(tmpfile);
- tmpfilewriter.write(sb.toString());
- tmpfilewriter.flush();
- tmpfilewriter.close();
-
- // System.out.println("file:" + sb.toString());
- // BufferedInputStream in = new BufferedInputStream(new FileInputStream(filename));
- // byte[] buffer = new byte[in.available()];*/
- final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-
- final DataOutputStream dos = new DataOutputStream(baos);
- // System.out.println("file:" + sb.length());
- dos.writeInt(BEGINSTR);
- dos.writeInt(reqType);
- dos.writeInt(scriptID);
- dos.writeInt(clientID);
- if(isGuru)
- dos.writeInt(1);
- else
- dos.writeInt(0);
- dos.writeInt(filename.length());
- dos.writeBytes(filename.substring(filename.lastIndexOf('/')));
- dos.flush();
- return baos.toByteArray();
-
- } catch (final Exception ioe) {
- new ErrorMessage("Request packet error!", "See stderr for more details").open();
- System.err.println("Packet Error: " + ioe.getMessage());
- // baos.close();
- // dos.close();
- return null;
- }
-
- }
-
- /**
- * For debugging, dump the packet contents to a formatted string
- */
- public String toString() {
- return "ID String:\t" + BEGINSTR + "\nRequest Type:\t" + reqType
- + "\nScript #:\t" + scriptID + "\nFilename:\t" + filename + "\nClient ID:\t" + clientID
- + "\nData Size:\t" + size + "\n";
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/DMResponse.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/DMResponse.java
deleted file mode 100644
index 93cdf1036f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/DMResponse.java
+++ /dev/null
@@ -1,136 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.consolelog.structures;
-
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.io.EOFException;
-
-import org.eclipse.linuxtools.systemtap.ui.consolelog.dialogs.ErrorMessage;
-
-
-
-/**
- * A class to represent a response packet. A response packet prefaces all data
- * sent from the data manager, even the DM is not sending any data (ie shutting
- * down now).
- *
- * @author patrickm
- *
- */
-public class DMResponse extends DMPacket {
-
- // packet size
- public static final int packetsize = 24; // bytes
-
- // data sources
- public static final int STDOUT = 1;
- public static final int STDERR = 2;
- public static final int SUBSCRIPTION_MGR = 3;
- public static final int DATA_MGR = 4;
- public static final int MAILBOX = 5;
-
- // response specific
- private int returnCode;
- private int source;
- private boolean valid;
-
- // for adding to ClientSession's buffer
- private byte[] bacopy;
-
- /**
- * Construct a response object from a stream of bytes. If there are any
- * errors, the valid flag is set to false.
- *
- * @param ba
- * The array of bytes from the data manager, of length
- * packetsize.
- */
- public DMResponse(final byte[] ba) {
-
- if (ba.length != packetsize) {
- // usually happens when reading garbage data
- // ignore for now, but can be useful
-// System.err.println("Invalid packet length: " + ba.length);
- valid = false;
- return;
- }
-
- bacopy = ba;
-
- final ByteArrayInputStream bais = new ByteArrayInputStream(ba);
- final DataInputStream dis = new DataInputStream(bais);
- int headerID = 0;
-
- try {
- headerID = dis.readInt();
- source = dis.readInt();
- scriptID = dis.readInt();
- clientID = dis.readInt();
- returnCode = dis.readInt();
- size = dis.readInt();
- // void ptr?
- } catch (final EOFException eofe) {
- valid = false;
- new ErrorMessage("Response packet error!", "See stderr for more details").open();
- System.err.println("response packet Error: " + eofe.getMessage());
- } catch (final IOException ioe) {
- valid = false;
- new ErrorMessage("Response packet error!", "See stderr for more details").open();
- System.err.println("response packet Error: " + ioe.getMessage());
- }
-
- valid = (headerID == BEGINSTR);
- return;
-
- }
-
- /**
- * The "source" of this packet, unused right now.
- *
- * @return An integer corresponding to the data manager, the subscription
- * manager, or the mailbox, etc.
- */
- public int getsource() {
- return source;
- }
-
- /**
- * The return code. This does not apply to all responses.
- *
- * @return An integer: zero on success, non zero otherwise.
- */
- public int getreturnCode() {
- return returnCode;
- }
-
- /**
- * A packet is marked invalid if the size is wrong, there was any errors
- * converting the stream of bytes to individual integers, or the header's
- * magic number is wrong.
- *
- * @return True if the packet appears to be sane, false otherwise.
- */
- public boolean isValid() {
- return valid;
- }
-
- /**
- * For debugging, dump the packet contents to a formatted string
- */
- public String toString() {
- return "ID String:\t" + BEGINSTR + "\nSource:\t" + source
- + "\nScript #:\t" + scriptID + "\nClient ID:\t" + clientID
- + "\nData Size:\t" + size + "\nReturn Code:\t" + returnCode
- + "\n";
- }
-
- /**
- * Hackish function to retrieve the original byte array. <ay be removed in
- * the future.
- *
- * @return The original array of bytes this packet was constructed from.
- */
- public byte[] tobytes() {
- return bacopy;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ErrorStreamDaemon.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ErrorStreamDaemon.java
deleted file mode 100644
index 6754502191..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ErrorStreamDaemon.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.consolelog.structures;
-
-import org.eclipse.linuxtools.systemtap.ui.consolelog.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.views.ErrorView;
-
-/**
- * A class push data to both the </code>ScriptConsole</code> and the ErrorView
- * @author Ryan Morse
- */
-public class ErrorStreamDaemon extends ConsoleStreamDaemon {
- public ErrorStreamDaemon(ScriptConsole console, ErrorView errorWindow, IErrorParser parser) {
- super(console);
-
- outputData = new StringBuilder();
- this.parser = parser;
-
- errorView = errorWindow;
- errorView.clear();
- }
-
- /**
- * Prints out the new output data to the console and parses it and sends it to the
- * ErrorView.
- */
- protected void pushData() {
- if(output.startsWith(Localization.getString("ErrorStreamDaemon.Password")))
- output = output.substring(Localization.getString("ErrorStreamDaemon.Password").length());
-
- super.pushData();
-
- outputData.append(output);
-
- /* Since we never know when the last set of data is comming we don't clear the
- * errorStream in the hope of getting a more complete error message. As a result
- * the parser will always return what we already had. Clear removes anything
- * that was added before.
- */
- if(null != errorView) {
- String[][] errors = parser.parseOutput(outputData.toString());
-
- if(null != errors) {
- errorView.clear();
- for(int i=0; i<errors.length; i++)
- errorView.add(errors[i]);
- }
- }
- }
-
- /**
- * Disposes of all internal references in the class. No method should be called after this.
- */
- public void dispose() {
- if(!isDisposed()) {
- super.dispose();
- errorView = null;
- outputData.delete(0, outputData.length());
- outputData = null;
- parser = null;
- }
- }
-
- private ErrorView errorView;
- private StringBuilder outputData;
- private IErrorParser parser;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ErrorTableDisplay.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ErrorTableDisplay.java
deleted file mode 100644
index ddeaeb47fc..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ErrorTableDisplay.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.consolelog.structures;
-
-import org.eclipse.linuxtools.systemtap.ui.consolelog.internal.ConsoleLogPlugin;
-import org.eclipse.linuxtools.systemtap.ui.editor.SimpleEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-
-
-
-/**
- * A class push data to a ScriptConsole.
- * @author Ryan Morse
- */
-public class ErrorTableDisplay {
- public ErrorTableDisplay(Composite parent, String[] titles) {
- this.titles = titles;
- createControl(parent);
- }
-
- /**
- * Creates the table for displaying error messages in.
- * @param parent The container for the new error table.
- */
- public void createControl(Composite parent) {
- table = new Table(parent, SWT.SINGLE);
- table.setHeaderVisible(true);
- table.getVerticalBar().setVisible(true);
- table.setLinesVisible(true);
- table.addMouseListener(mouseListener);
-
- TableColumn column;
- for(int i = 0; i < titles.length; i++) {
- column = new TableColumn(table, SWT.NONE);
- column.setText(titles[i]);
- }
-
- updateColumns();
- }
-
- /**
- * Clears all items from the table.
- */
- public void clear() {
- table.getDisplay().syncExec(new Runnable() {
- boolean stop = false;
- public void run() {
- if(stop) return;
- try {
- table.removeAll();
- } catch (Exception e) {
- stop = true;
- }
- }
-
- });
- }
-
- /**
- * Adds a new row to the table with an error icon.
- * @param row The pre-divied sections of the error message.
- */
- public void addRow(final String[] row) {
- addRow(row, ConsoleLogPlugin.getImageDescriptor("icons/views/error_st_obj.gif").createImage());
- }
-
- /**
- * Adds a new row to the table.
- * @param row The pre-divied sections of the error message.
- * @param img The image to display with the error.
- */
- public void addRow(final String[] row, final Image img) {
- table.getDisplay().syncExec(new Runnable() {
- boolean stop = false;
- public void run() {
- if(stop) return;
- try {
- item = new TableItem(table, SWT.NULL);
- for(int i=0; i<row.length; i++)
- item.setText(i+1, row[i]);
- item.setImage(img);
- updateColumns();
- } catch (Exception e) {
- stop = true;
- }
- }
-
- });
- }
-
- /**
- * Updates each of the columns in the table to ensure that the entries all fit
- * as well as possible.
- */
- private void updateColumns() {
- TableColumn[] columns = table.getColumns();
- for (int i = 0; i < columns.length; i++) {
- columns[i].pack();
- columns[i].setMoveable(true);
- }
- }
-
- public Control getControl() {
- return table;
- }
-
- /**
- * Disposes of all internal references in the class. No method should be called after this.
- */
- public void dispose() {
- if(null != table && !table.isDisposed()) {
- table.removeMouseListener(mouseListener);
- table.dispose();
- table = null;
- }
-
- if(titles != null)
- for(int i=0; i<titles.length; i++)
- titles[i] = null;
- titles = null;
-
- if(null != item)
- item.dispose();
- item = null;
- }
-
- /**
- * MouseListener that is used to detect when the user clicks on a row in the table.
- * When clicked it will find the line number the error occured on and then set the
- * cursor location to that location in the active editor.
- */
- private final MouseListener mouseListener = new MouseListener() {
- public void mouseDown(MouseEvent me) {}
- public void mouseUp(MouseEvent me) {}
-
- public void mouseDoubleClick(MouseEvent me) {
- try {
- String location = table.getSelection()[0].getText(4);
-
- if(location.length() > 0) {
- int line = 0;
- if(location.indexOf(':') > 0) {
- String[] pos = location.split(":");
- line = Integer.parseInt(pos[0]);
- } else
- line = Integer.parseInt(location);
-
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- IEditorPart ed = page.getActiveEditor();
-
- if(ed instanceof SimpleEditor) {
- SimpleEditor editor = ((SimpleEditor)ed);
- editor.selectLine(line);
- editor.setFocus();
- }
- }
- } catch(Exception e) {}
- }
- };
-
- private Table table;
- private String[] titles;
- private TableItem item;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/IErrorParser.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/IErrorParser.java
deleted file mode 100644
index 9ee962367b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/IErrorParser.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.consolelog.structures;
-
-public interface IErrorParser {
- public String[][] parseOutput(String data);
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ScriptConsole.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ScriptConsole.java
deleted file mode 100644
index 3f0e6f3072..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ScriptConsole.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.consolelog.structures;
-
-import java.io.File;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.Subscription;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.actions.StopScriptAction;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.views.ErrorView;
-import org.eclipse.linuxtools.systemtap.ui.structures.IPasswordPrompt;
-import org.eclipse.linuxtools.systemtap.ui.structures.runnable.LoggedCommand;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.console.ConsolePlugin;
-import org.eclipse.ui.console.IConsole;
-import org.eclipse.ui.console.MessageConsole;
-
-
-
-/**
- * This class serves as a pain in the ConsoleView. It is used to create a new Command that,
- * through ConsoleDaemons will print all the output the the console. In order to stop the
- * running Command <code>StopScriptAction</code> should be used to stop this console from
- * running.
- * @author Ryan Morse
- */
-public class ScriptConsole extends MessageConsole {
- /**
- * This method is used to get a reference to a <code>ScriptConsole</code>. If there
- * is already an console that has the same name as that provided it will be stopped,
- * cleared and returned to the caller to use. If there is no console matching the
- * provided name then a new <code>ScriptConsole</code> will be created for use.
- * @param name The name of the console that should be returned if available.
- * @return The console with the provided name, or a new instance if none exist.
- */
- public static ScriptConsole getInstance(String name) {
- ScriptConsole console = null;
- try {
- IConsole ic[] = ConsolePlugin.getDefault().getConsoleManager().getConsoles();
-
- //Prevent running the same script twice
- if(null != ic) {
- ScriptConsole activeConsole;
- StopScriptAction ssa = new StopScriptAction();
- ssa.init(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
- for(int i=0; i<ic.length; i++) {
- activeConsole = (ScriptConsole)ic[i];
- if(activeConsole.getName().endsWith(name)) {
- //Stop any script currently running
- ssa.run(i);
- //Remove output from last run
- activeConsole.clearConsole();
- activeConsole.setName(name);
- console = activeConsole;
- }
- }
- }
-
- if(null == console) {
- console = new ScriptConsole(name, null);
- ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[] {console});
- }
- } catch(NullPointerException npe) {
- console = null;
- }
- return console;
- }
-
- public static ScriptConsole getInstance(String name,Subscription sub) {
- ScriptConsole console = null;
- try {
- IConsole ic[] = ConsolePlugin.getDefault().getConsoleManager().getConsoles();
-
- //Prevent running the same script twice
- if(null != ic) {
- ScriptConsole activeConsole;
- StopScriptAction ssa = new StopScriptAction();
- ssa.init(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
- for(int i=0; i<ic.length; i++) {
- activeConsole = (ScriptConsole)ic[i];
- if(activeConsole.getName().endsWith(name)) {
- //Stop any script currently running
- ssa.run(i);
-
- //Remove output from last run
- activeConsole.clearConsole();
- activeConsole.setName(name);
- console = activeConsole;
- }
- }
- }
-
- if(null == console) {
- console = new ScriptConsole(name, null, sub);
- ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[] {console});
- }
- } catch(NullPointerException npe) {
- console = null;
- }
- return console;
- }
- private ScriptConsole(String name, ImageDescriptor imageDescriptor) {
- super(name, imageDescriptor);
- cmd = null;
- }
-
- private ScriptConsole(String name, ImageDescriptor imageDescriptor, Subscription sub) {
- super(name, imageDescriptor);
- this.subscription = sub;
- cmd = null;
- }
-
- /**
- * Creates the <code>ConsoleStreamDaemon</code> for passing data from the
- * <code>LoggedCommand</code>'s InputStream to the Console.
- */
- protected void createConsoleDaemon() {
- consoleDaemon = new ConsoleStreamDaemon(this);
- }
-
- /**
- * Creates the <code>ErrorStreamDaemon</code> for passing data from the
- * <code>LoggedCommand</code>'s ErrorStream to the Console and ErrorView.
- */
- protected void createErrorDaemon(IErrorParser parser) {
- ErrorView errorView = null;
- try {
- IViewPart ivp = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(ErrorView.ID);
- if(null != ivp && ivp instanceof ErrorView)
- errorView = ((ErrorView)ivp);
- } catch(Exception e) {}
-
- errorDaemon = new ErrorStreamDaemon(this, errorView, parser);
- }
-
- /**
- * Runs the provied command in this ScriptConsole instance.
- * @param command The command and arguments to run.
- * @param envVars The environment variables to use while running
- * @param prompt The prompt to get the users password if needed.
- * @param errorParser The parser to handle error messages generated by the command
- */
- public void run(String[] command, String[] envVars, IPasswordPrompt prompt, IErrorParser errorParser) {
- if(subscription.init())
- {
- createConsoleDaemon();
- createErrorDaemon(errorParser);
- subscription.addErrorStreamListener(errorDaemon);
- subscription.addInputStreamListener(consoleDaemon);
-
- if (!subscription.isRunning())
- {
- subscription.start();
- }
- ConsolePlugin.getDefault().getConsoleManager().showConsoleView(this);
- }
- else
- {
- setName(Localization.getString("ScriptConsole.Terminated") + super.getName());
- subscription.interrupt();
- subscription.delSubscription();
- ConsolePlugin.getDefault().getConsoleManager().removeConsoles(new IConsole[] {this});
- }
- }
-
- public void run() {
- if(subscription.init())
- {
- createConsoleDaemon();
- subscription.addInputStreamListener(consoleDaemon);
- subscription.addErrorStreamListener(consoleDaemon);
-
- if (!subscription.isRunning())
- {
- subscription.start();
- }
- ConsolePlugin.getDefault().getConsoleManager().showConsoleView(this);
- //ConsolePlugin.getDefault().getConsoleManager().
- //activate();
- }
- else
- {
- setName(Localization.getString("ScriptConsole.Terminated") + super.getName());
- subscription.interrupt();
- subscription.delSubscription();
- ConsolePlugin.getDefault().getConsoleManager().removeConsoles(new IConsole[] {this});
- }
-
- }
-
- /**
- * Check to see if the Command is still running
- * @return boolean representing if the command is running
- */
- public boolean isRunning() {
- return subscription.isRunning();
- }
-
- /**
- * Check to see if this class has already been disposed.
- * @return boolean represneting whether or not the class has been disposed.
- */
- public boolean isDisposed() {
- return cmd.isDisposed();
- }
-
- /**
- * Method to allow the user to save the Commands output to a file for use latter.
- * @param file The new file to save the output to.
- */
- public void saveStream(File file) {
- if(isRunning())
- if(!subscription.saveLog(file))
- MessageDialog.openWarning(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), Localization.getString("ScriptConsole.Problem"), Localization.getString("ScriptConsole.ErrorSavingLog"));
- }
-
- /**
- * Gets the command that is running in this console, or null if there is no running command.
- * @return The <code>LoggedCommand</code> that is running in this console.
- */
- public LoggedCommand getCommand() {
- return cmd;
- }
-
- public String getOutput() {
- return subscription.getOutput();
- }
-
- /**
- * Stops the running command and the associated listeners.
- */
- public synchronized void stop() {
- if(isRunning()) {
- setName(Localization.getString("ScriptConsole.Terminated") + super.getName());
- subscription.interrupt();
- subscription.delSubscription();
- ConsolePlugin.getDefault().getConsoleManager().removeConsoles(new IConsole[] {this});
-
- }
- }
-
- /**
- * Disposes of all internal references in the class. No method should be called after this.
- */
- public void dispose() {
- if(!isDisposed()) {
- if(null != subscription)
- subscription.dispose();
- subscription = null;
- if(null != errorDaemon)
- errorDaemon.dispose();
- errorDaemon = null;
- if(null != consoleDaemon)
- consoleDaemon.dispose();
- consoleDaemon = null;
- }
- }
-
- /**
- * Changes the name displayed on this console.
- * @param name The new name to display on the console.
- */
- public void setName(String name) {
- try {
- super.setName(name);
- if(null != ConsolePlugin.getDefault())
- ConsolePlugin.getDefault().getConsoleManager().refresh(this);
- } catch(Exception e) {}
- }
-
- private LoggedCommand cmd;
-
- private ErrorStreamDaemon errorDaemon;
- private ConsoleStreamDaemon consoleDaemon;
- private Subscription subscription;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/views/ErrorView.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/views/ErrorView.java
deleted file mode 100644
index 1606b00b59..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/views/ErrorView.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.consolelog.views;
-
-import org.eclipse.linuxtools.systemtap.ui.consolelog.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ErrorTableDisplay;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.ViewPart;
-
-
-
-/**
- * A view to list error messages generated from trying to run a script in the editor.
- * @author Ryan Morse
- */
-public class ErrorView extends ViewPart {
- public ErrorView() {
- super();
- }
-
- /**
- * Greates a new table to contain all of the error messages.
- * @param parent The composite to draw all content to.
- */
- public void createPartControl(Composite parent) {
- Composite c = new Composite(parent, SWT.NONE);
-
- GridLayout grid = new GridLayout();
- c.setLayout(grid);
-
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- table = new ErrorTableDisplay(c, new String[] {"", Localization.getString("ErrorView.Type"), Localization.getString("ErrorView.Description"), Localization.getString("ErrorView.Saw"), Localization.getString("ErrorView.Line")});
- table.getControl().setLayoutData(gd);
- }
-
- /**
- * Adds the log details to the table of errors.
- * @param log The details for an error message to display in the table.
- */
- public void add(final String[] log) {
- table.getControl().getDisplay().syncExec(new Runnable() {
- boolean stop = false;
- public void run() {
- if(stop) return;
- try {
- table.addRow(log);
-
- try {
- PlatformUI.getWorkbench().getWorkbenchWindows()[0].getActivePage().showView(ID);
- } catch(PartInitException pie) {
- } catch(NullPointerException npe) {}
- } catch (Exception e) {
- stop = true;
- }
- }
-
- });
- }
-
- /**
- * Clears the entire table of error messages.
- */
- public void clear() {
- table.clear();
- }
-
- public void setFocus() {}
-
- /**
- * Disposes of everything in this class.
- */
- public void dispose() {
- if(null != table)
- table.dispose();
- table = null;
- super.dispose();
- }
-
- private volatile ErrorTableDisplay table;
- public static final String ID = "org.eclipse.linuxtools.systemtap.ui.consolelog.views.ErrorView";
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/.classpath
deleted file mode 100644
index 64c5e31b7a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/.project b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/.project
deleted file mode 100644
index b71f278e84..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.ui.editor</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/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/.settings/org.eclipse.jdt.core.prefs b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index baa9fca64a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Feb 27 17:31:01 IST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/ChangeLog
deleted file mode 100644
index 2044c2164e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/ChangeLog
+++ /dev/null
@@ -1,22 +0,0 @@
-2009-11-16 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Fix Bundle-Name.
-
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Make version 0.3.0.qualifier.
-
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Change provider from IBM to Eclipse.
-
-2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * src/org/eclipse/linuxtools/systemtap/ui/editor/ColorManager.java (dispose):
- (getColor): Replacing with Phil's code
- * src/org/eclipse/linuxtools/systemtap/ui/editor/SimpleEditor.java:
-
-
-2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * ChangeLog: Refactoring. Renaming all packages directories from *.systemtapgui.* to *.systemtap.ui.* \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/META-INF/MANIFEST.MF
deleted file mode 100644
index dc4fc1a6b8..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: SystemTap Script Editor (Incubation)
-Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.editor;singleton:=true
-Bundle-Version: 0.3.0.qualifier
-Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.editor.internal.EditorPlugin
-Bundle-Vendor: Eclipse
-Bundle-Localization: plugin
-Export-Package: org.eclipse.linuxtools.systemtap.ui.editor,
- org.eclipse.linuxtools.systemtap.ui.editor.actions.file
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.jface.text;visibility:=reexport,
- org.eclipse.ui.editors;visibility:=reexport,
- org.eclipse.ui.workbench.texteditor;visibility:=reexport,
- org.eclipse.ui;bundle-version="3.4.1"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/build.properties
deleted file mode 100644
index 370b6c6896..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- icons/,\
- .,\
- plugin.properties
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/edit/copy_edit.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/edit/copy_edit.gif
deleted file mode 100644
index 71d7c95aa8..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/edit/copy_edit.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/edit/cut_edit.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/edit/cut_edit.gif
deleted file mode 100644
index d044e59777..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/edit/cut_edit.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/edit/delete_edit.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/edit/delete_edit.gif
deleted file mode 100644
index b6922ac11c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/edit/delete_edit.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/edit/paste_edit.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/edit/paste_edit.gif
deleted file mode 100644
index 39dd4d9d38..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/edit/paste_edit.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/edit/redo_edit.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/edit/redo_edit.gif
deleted file mode 100644
index c84e5b1d84..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/edit/redo_edit.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/edit/undo_edit.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/edit/undo_edit.gif
deleted file mode 100644
index eae118ad16..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/edit/undo_edit.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/close_edit.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/close_edit.gif
deleted file mode 100644
index 2cd9c54443..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/close_edit.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/closeall_edit.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/closeall_edit.gif
deleted file mode 100644
index 28a3785aac..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/closeall_edit.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/new_wiz.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/new_wiz.gif
deleted file mode 100644
index 7aea894d0b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/new_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/open_wiz.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/open_wiz.gif
deleted file mode 100644
index 51e703b1b9..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/open_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/print_edit.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/print_edit.gif
deleted file mode 100644
index 04cb84bf4f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/print_edit.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/save_edit.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/save_edit.gif
deleted file mode 100644
index 499dd0ca60..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/save_edit.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/saveall_edit.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/saveall_edit.gif
deleted file mode 100644
index ef0eab5ba3..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/icons/actions/file/saveall_edit.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/plugin.properties
deleted file mode 100644
index e0f6e1371b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/plugin.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-category.file.name=File
-category.file.desc=File
-
-menu.recentFiles.name=Recent Files
-menu.recentFiles.slot0.name=1 NA
-menu.recentFiles.slot1.name=2 NA
-menu.recentFiles.slot2.name=3 NA
-menu.recentFiles.slot3.name=4 NA
-
-actionset.file.name=File Action Set
-action.open.name=&Open File
-action.open.desc=Open a file
-action.new.name=&New File
-action.new.desc=Create a new file
-
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/plugin.xml
deleted file mode 100644
index 00139cc7d0..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/plugin.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension
- point="org.eclipse.ui.startup">
- </extension>
-
- <extension
- point="org.eclipse.ui.commands">
- <command
- name="%command.open.name"
- description="%command.open.desc"
- categoryId="org.eclipse.linuxtools.systemtap.ui.editor.category.file"
- id="org.eclipse.linuxtools.systemtap.ui.editor.commands.file.OpenFileCommand"/>
- <category
- name="%category.file.name"
- description="%category.file.desc"
- id="org.eclipse.linuxtools.systemtap.ui.editor.category.file"/>
- </extension>
-
-
-
- <extension
- point="org.eclipse.ui.actionSets">
-
- <actionSet
- label="%actionset.file.name"
- visible="false"
- id="org.eclipse.linuxtools.systemtap.ui.editor.FileActionSet">
- <action
- label="%action.open.name"
- tooltip="%action.open.desc"
- id="org.eclipse.linuxtools.systemtap.ui.editor.actions.file.OpenFileAction"
- icon="icons/actions/file/open_wiz.gif"
- toolbarPath="org.eclipse.ui.workbench.file/new.ext"
- class="org.eclipse.linuxtools.systemtap.ui.editor.actions.file.OpenFileAction"
- definitionId="org.eclipse.linuxtools.systemtap.ui.editor.commands.file.OpenFileCommand"
- style="push"
- state="false"/>
- <action
- label=""
-
- id="org.eclipse.linuxtools.systemtap.ui.editor.actions.file.NewFileAction"
-
- class="org.eclipse.linuxtools.systemtap.ui.editor.actions.file.NewFileAction"
- definitionId="org.eclipse.ui.newWizard"
-
- state="false"/>
-
-
- <!--<menu
- id="org.eclipse.linuxtools.systemtap.ui.editor.recentFilesMenu"
- label="%menu.recentFiles.name"
- path="file2/recentFiles.ext">
- <groupMarker name="slot0"/>
- <groupMarker name="slot1"/>
- <groupMarker name="slot2"/>
- <groupMarker name="slot3"/>
- </menu> -->
- <!--<action
- label="%menu.recentFiles.slot3.name"
- id="org.eclipse.linuxtools.systemtap.ui.editor.actions.file.openRecentFile"
- menubarPath="file2/org.eclipse.linuxtools.systemtap.ui.editor.recentFilesMenu/slot3"
- class="org.eclipse.linuxtools.systemtap.ui.editor.actions.file.OpenRecentFileAction"
- definitionId="org.eclipse.ui.file.openRecentFile"
- style="push"
- state="false"/>-->
- </actionSet>
-
- </extension>
-</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/ColorManager.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/ColorManager.java
deleted file mode 100644
index 93a0508b37..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/ColorManager.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.editor;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-
-public class ColorManager {
-
- protected Map<RGB, Color> colorTable = new HashMap<RGB, Color>(10);
-
- public void dispose() {
- Iterator<Color> e = colorTable.values().iterator();
- while (e.hasNext())
- e.next().dispose();
- }
-
- public Color getColor(RGB rgb) {
- Color color = colorTable.get(rgb);
- if (color == null) {
- color = new Color(Display.getCurrent(), rgb);
- colorTable.put(rgb, color);
- }
- return color;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/DoubleClickStrategy.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/DoubleClickStrategy.java
deleted file mode 100644
index 65016ed145..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/DoubleClickStrategy.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.editor;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextDoubleClickStrategy;
-import org.eclipse.jface.text.ITextViewer;
-
-public class DoubleClickStrategy implements ITextDoubleClickStrategy {
- protected ITextViewer fText;
-
- public void doubleClicked(ITextViewer part) {
- int pos = part.getSelectedRange().x;
-
- if (pos < 0)
- return;
-
- fText = part;
-
- if (!selectComment(pos))
- selectWord(pos);
- }
-
- /**
- * Method handles the selection of comments in the editor.
- *
- * @param caretPos postition of the caret
- */
- protected boolean selectComment(int caretPos) {
- IDocument doc = fText.getDocument();
- int startPos, endPos;
-
- try {
- int pos = caretPos;
- char c = ' ';
-
- while (pos >= 0) {
- c = doc.getChar(pos);
- if (c == '\\') {
- pos -= 2;
- continue;
- }
- if (c == Character.LINE_SEPARATOR || c == '\"')
- break;
- --pos;
- }
-
- if (c != '\"')
- return false;
-
- startPos = pos;
-
- pos = caretPos;
- int length = doc.getLength();
- c = ' ';
-
- while (pos < length) {
- c = doc.getChar(pos);
- if (c == Character.LINE_SEPARATOR || c == '\"')
- break;
- ++pos;
- }
- if (c != '\"')
- return false;
-
- endPos = pos;
-
- int offset = startPos + 1;
- int len = endPos - offset;
- fText.setSelectedRange(offset, len);
-
- return true;
- } catch (BadLocationException x) {}
-
- return false;
- }
-
- /**
- * Method handles the selection of words in the editor.
- *
- * @param caretPos postition of the caret
- */
- protected boolean selectWord(int caretPos) {
- IDocument doc = fText.getDocument();
- int startPos, endPos;
-
- try {
- int pos = caretPos;
- char c;
-
- while (pos >= 0) {
- c = doc.getChar(pos);
- if (!Character.isJavaIdentifierPart(c))
- break;
- --pos;
- }
-
- startPos = pos;
-
- pos = caretPos;
- int length = doc.getLength();
-
- while (pos < length) {
- c = doc.getChar(pos);
- if (!Character.isJavaIdentifierPart(c))
- break;
- ++pos;
- }
-
- endPos = pos;
- selectRange(startPos, endPos);
-
- return true;
- } catch (BadLocationException x) {}
-
- return false;
- }
-
- private void selectRange(int startPos, int stopPos) {
- int offset = startPos + 1;
- int length = stopPos - offset;
- fText.setSelectedRange(offset, length);
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/PathEditorInput.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/PathEditorInput.java
deleted file mode 100644
index 594456de5e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/PathEditorInput.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.editor;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.linuxtools.systemtap.ui.editor.internal.Localization;
-
-import org.eclipse.ui.IPathEditorInput;
-import org.eclipse.ui.IPersistableElement;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.editors.text.ILocationProvider;
-
-
-
-public class PathEditorInput implements IPathEditorInput, ILocationProvider {
- private IPath fPath;
- private IWorkbenchWindow fMainWindow;
- public boolean temp = false;
- private static int tempcount = 0;
-
- public PathEditorInput(IPath path) {
- if (path == null) {
- throw new IllegalArgumentException();
- }
- this.fPath = path;
- }
- public PathEditorInput(IPath path, IWorkbenchWindow window) {
- this(path);
- this.fMainWindow = window;
- }
-
- public PathEditorInput() throws IOException {
- temp = true;
- tempcount++;
- File file = File.createTempFile(Localization.getString("PathEditorInput.Untitled") , ".stp"); //$NON-NLS-1$ //$NON-NLS-2$
- fPath = new Path(file.getAbsolutePath());
- }
-
- public int hashCode() {
- return fPath.hashCode();
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof PathEditorInput))
- return false;
- PathEditorInput other = (PathEditorInput) obj;
-
- return fPath.equals(other.fPath);
- }
-
- public boolean exists() {
- return fPath.toFile().exists();
- }
-
- public ImageDescriptor getImageDescriptor() {
- return PlatformUI.getWorkbench().getEditorRegistry().getImageDescriptor(fPath.toString());
- }
-
- public String getName() {
- String[] substr = fPath.segments();
- return substr[substr.length -1];
- }
-
- public String getToolTipText() {
- return fPath.makeRelative().toOSString();
- }
-
- public IPath getPath() {
- return fPath;
- }
-
- @SuppressWarnings("unchecked")
- public Object getAdapter(Class adapter) {
- return null;
- }
-
- public IPersistableElement getPersistable() {
- return null;
- }
-
- public IWorkbenchWindow getMainWindow() {
- return fMainWindow;
- }
-
- public IPath getPath(Object element) {
- if(element instanceof PathEditorInput) {
- return ((PathEditorInput)element).getPath();
- }
- return null;
- }
-
- public void setPath(IPath newPath) {
- fPath = newPath;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/RecentFileMenuManager.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/RecentFileMenuManager.java
deleted file mode 100644
index 8dd2531b61..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/RecentFileMenuManager.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.editor;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.systemtap.ui.editor.actions.file.OpenRecentFileAction;
-import org.eclipse.ui.IActionBars;
-
-
-
-public class RecentFileMenuManager {
- private RecentFileMenuManager() {
- addedBars = new ArrayList<IActionBars>();
- for(int i=0; i<MAX_RECENT_FILES; i++)
- fileActions[i] = new OpenRecentFileAction(i);
- }
-
- public static RecentFileMenuManager getInstance() {
- return manager;
- }
-
- public void registerActionBar(IActionBars bars) {
- addedBars.add(bars);
-
- for(int i=0; i<MAX_RECENT_FILES; i++)
- bars.setGlobalActionHandler(
- "org.eclipse.linuxtools.systemtap.ui.editor.actions.file.openRecentFile" + i,
- fileActions[i]);
- bars.updateActionBars();
- }
-
- public static void update() {
- for(int i=0; i<MAX_RECENT_FILES; i++)
- fileActions[i].update();
- for(int i=0; i<addedBars.size(); i++)
- ((IActionBars)addedBars.get(i)).updateActionBars();
- }
-
- public static final int MAX_RECENT_FILES = 4;
- private static OpenRecentFileAction[] fileActions = new OpenRecentFileAction[MAX_RECENT_FILES];
- private static RecentFileMenuManager manager = new RecentFileMenuManager();
- private static ArrayList<IActionBars> addedBars;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/SimpleDocumentProvider.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/SimpleDocumentProvider.java
deleted file mode 100644
index 23322b8a82..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/SimpleDocumentProvider.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.editor;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.Reader;
-import java.io.Writer;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-import org.eclipse.jface.operation.IRunnableContext;
-
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.source.IAnnotationModel;
-
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IPathEditorInput;
-import org.eclipse.ui.texteditor.AbstractDocumentProvider;
-
-public class SimpleDocumentProvider extends AbstractDocumentProvider {
- public boolean canSaveDocument(Object element) {
- return super.canSaveDocument(element);
- }
-
- protected IDocument createDocument(Object element) throws CoreException {
- if (element instanceof IEditorInput) {
- IDocument document= new Document();
- if (setDocumentContent(document, (IEditorInput) element)) {
- setupDocument(document);
- }
- return document;
- }
-
- return null;
- }
-
- /**
- * Tries to read the file pointed at by <code>input</code> if it is an
- * <code>IPathEditorInput</code>. If the file does not exist, <code>true</code>
- * is returned.
- *
- * @param document the document to fill with the contents of <code>input</code>
- * @param input the editor input
- * @return <code>true</code> if setting the content was successful or no file exists, <code>false</code> otherwise
- * @throws CoreException if reading the file fails
- */
- private boolean setDocumentContent(IDocument document, IEditorInput input) throws CoreException {
- Reader reader;
- String inputClassName = input.getClass().getName();
- try {
- if (input instanceof IPathEditorInput){
- reader= new FileReader(((IPathEditorInput)input).getPath().toFile());
- }
- else if ( inputClassName.equals( "org.eclipse.ui.internal.editors.text.JavaFileEditorInput" )
- || inputClassName.equals( "org.eclipse.ui.ide.FileStoreEditorInput" ) )
- // The class 'org.eclipse.ui.internal.editors.text.JavaFileEditorInput'
- // is used when opening a file from the menu File > Open... in Eclipse 3.2.x
- // The class 'org.eclipse.ui.ide.FileStoreEditorInput' is used when
- // opening a file from the menu File > Open... in Eclipse 3.3.x
- {
- reader = new FileReader( new File( input.getToolTipText() ) );
- }
- else
- {
- return false;
- }
- } catch (FileNotFoundException e) {
- // return empty document and save later
- return true;
- }
-
- try {
- setDocumentContent(document, reader);
- return true;
- } catch (IOException e) {
- throw new CoreException(new Status(IStatus.ERROR, "org.eclipse.linuxtools.systemtap.ui.editor", IStatus.OK, "error reading file", e)); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Reads in document content from a reader and fills <code>document</code>
- *
- * @param document the document to fill
- * @param reader the source
- * @throws IOException if reading fails
- */
- private void setDocumentContent(IDocument document, Reader reader) throws IOException {
- Reader in= new BufferedReader(reader);
- try {
-
- StringBuffer buffer= new StringBuffer(512);
- char[] readBuffer= new char[512];
- int n= in.read(readBuffer);
- while (n > 0) {
- buffer.append(readBuffer, 0, n);
- n= in.read(readBuffer);
- }
-
- document.set(buffer.toString());
- } finally {
- in.close();
- }
- }
-
- /**
- * Set up the document - default implementation does nothing.
- *
- * @param document the new document
- */
- protected void setupDocument(IDocument document) {
- }
-
- /*
- * @see org.eclipse.ui.texteditor.AbstractDocumentProvider#createAnnotationModel(java.lang.Object)
- */
- protected IAnnotationModel createAnnotationModel(Object element) throws CoreException {
- return null;
- }
-
- /*
- * @see org.eclipse.ui.texteditor.AbstractDocumentProvider#doSaveDocument(org.eclipse.core.runtime.IProgressMonitor, java.lang.Object, org.eclipse.jface.text.IDocument, boolean)
- */
- protected void doSaveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite) throws CoreException {
- String elementClassName = element.getClass().getName();
- File file = null;
- if (element instanceof IPathEditorInput) {
- IPathEditorInput pei= (IPathEditorInput) element;
- IPath path= pei.getPath();
- file= path.toFile();
- }
- else if ( elementClassName.equals( "org.eclipse.ui.internal.editors.text.JavaFileEditorInput" )
- || elementClassName.equals( "org.eclipse.ui.ide.FileStoreEditorInput" ) )
- // The class 'org.eclipse.ui.internal.editors.text.JavaFileEditorInput'
- // is used when opening a file from the menu File > Open... in Eclipse 3.2.x
- // The class 'org.eclipse.ui.ide.FileStoreEditorInput' is used when
- // opening a file from the menu File > Open... in Eclipse 3.3.x
- {
- file = new File( ( ( IEditorInput ) element ).getToolTipText() );
- }
- if (file!=null){
- try {
- file.createNewFile();
-
- if (file.exists()) {
- if (file.canWrite()) {
- Writer writer= new FileWriter(file);
- writeDocumentContent(document, writer, monitor);
- } else
- throw new CoreException(new Status(IStatus.ERROR, "org.eclipse.linuxtools.systemtap.ui.editor", IStatus.OK, "file is read-only", null)); //$NON-NLS-1$ //$NON-NLS-2$
- } else
- throw new CoreException(new Status(IStatus.ERROR, "org.eclipse.linuxtools.systemtap.ui.editor", IStatus.OK, "error creating file", null)); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (IOException e) {
- throw new CoreException(new Status(IStatus.ERROR, "org.eclipse.linuxtools.systemtap.ui.editor", IStatus.OK, "error when saving file", e)); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
-
- /**
- * Saves the document contents to a stream.
- *
- * @param document the document to save
- * @param writer the stream to save it to
- * @param monitor a progress monitor to report progress
- * @throws IOException if writing fails
- */
- private void writeDocumentContent(IDocument document, Writer writer, IProgressMonitor monitor) throws IOException {
- Writer out= new BufferedWriter(writer);
- try {
- out.write(document.get());
- } finally {
- out.close();
- }
- }
-
- /*
- * @see org.eclipse.ui.texteditor.AbstractDocumentProvider#getOperationRunner(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IRunnableContext getOperationRunner(IProgressMonitor monitor) {
- return null;
- }
-
- /*
- * @see org.eclipse.ui.texteditor.IDocumentProviderExtension#isModifiable(java.lang.Object)
- */
- public boolean isModifiable( Object element )
- {
- String elementClassName = element.getClass().getName();
- if ( element instanceof IPathEditorInput )
- {
- IPathEditorInput pei = ( IPathEditorInput ) element;
- File file = pei.getPath().toFile();
- return file.canWrite() || !file.exists(); // Allow to edit new files
- }
- else if ( elementClassName.equals( "org.eclipse.ui.internal.editors.text.JavaFileEditorInput" )
- || elementClassName.equals( "org.eclipse.ui.ide.FileStoreEditorInput" ) )
- // The class 'org.eclipse.ui.internal.editors.text.JavaFileEditorInput'
- // is used when opening a file from the menu File > Open... in Eclipse 3.2.x
- // The class 'org.eclipse.ui.ide.FileStoreEditorInput' is used when
- // opening a file from the menu File > Open... in Eclipse 3.3.x
- {
- File file = new File( ( ( IEditorInput ) element ).getToolTipText() );
- return file.canWrite() || !file.exists(); // Allow to edit new files
- }
-
- return false;
- }
-
-
- /*
- * @see org.eclipse.ui.texteditor.IDocumentProviderExtension#isReadOnly(java.lang.Object)
- */
- public boolean isReadOnly(Object element) {
- return false;
- }
-
- /*
- * @see org.eclipse.ui.texteditor.IDocumentProviderExtension#isStateValidated(java.lang.Object)
- */
- public boolean isStateValidated(Object element) {
- return true;
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/SimpleEditor.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/SimpleEditor.java
deleted file mode 100644
index edcc1b4542..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/SimpleEditor.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.editor;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.PrintStream;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.FindReplaceDocumentAdapter;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.text.TextSelection;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.editors.text.TextEditor;
-
-public class SimpleEditor extends TextEditor {
- public SimpleEditor() {
- super();
- // make sure we inherit all the text editing commands (delete line etc).
- setKeyBindingScopes(new String[] { "org.eclipse.ui.textEditorScope" });
- internal_init();
- }
-
- protected void internal_init() {
- configureInsertMode(SMART_INSERT, false);
- setDocumentProvider(new SimpleDocumentProvider());
- }
-
- public void init(final IEditorSite site, final IEditorInput input) throws PartInitException {
- super.init(site, input);
- RecentFileMenuManager.getInstance().registerActionBar(getEditorSite().getActionBars());
- }
-
- /**
- * Searches the IDocument for the specified string.
- *
- * @param search string to find
- * @return the integer line number of the string
- */
- public int find(String search) {
- IDocument doc = getSourceViewer().getDocument();
- FindReplaceDocumentAdapter finder = new FindReplaceDocumentAdapter(doc);
-
- int line = 0;
-
- jumpToLocation(0, 0);
- try {
- IRegion reg = finder.find(0, search, true, false, false, false);
- int offset = reg.getOffset();
- line = doc.getLineOfOffset(offset);
- } catch(BadLocationException ble) {
- } catch(NullPointerException npe) {
- line = -1;
- }
-
- return line;
- }
-
- /**
- * Jumps to the location in the IDocument.
- * @param line the line you wish to jump to
- * @param the character you wish to jump to
- */
- public void jumpToLocation(int line, int character) {
- IDocument doc = getSourceViewer().getDocument();
-
- try {
- int offset = doc.getLineOffset(line-1) + character;
- this.getSelectionProvider().setSelection(new TextSelection(doc, offset, 0));
- } catch(BadLocationException boe) {}
- }
-
- /**
- * Selects a line in the IDocument.
- * @param line the line you wish to select
- */
- public void selectLine(int line) {
- IDocument doc = getSourceViewer().getDocument();
-
- try {
- this.getSelectionProvider().setSelection(new TextSelection(doc, doc.getLineOffset(line-1), doc.getLineLength(line-1)-1));
- } catch(BadLocationException boe) {}
- }
-
- /**
- * Performs a SaveAs on the IDocument.
- */
- public void doSaveAs() {
- File file = queryFile();
- if(file == null) {
- return;
- }
-
- IEditorInput inputFile = createEditorInput(file);
-
- IDocument doc = getSourceViewer().getDocument();
- String s = doc.get();
-
- try {
- FileOutputStream fos = new FileOutputStream(file);
- PrintStream ps = new PrintStream(fos);
-
- ps.print(s);
- } catch(FileNotFoundException fnfe) {}
-
- setInput(inputFile);
- setPartName(inputFile.getName());
- }
-
- /**
- * Sets up an editor input based on the specified file.
- * @param file the location of the file you wish to set.
- * @return input object created.
- */
- private IEditorInput createEditorInput(File file) {
- IPath location= new Path(file.getAbsolutePath());
- PathEditorInput input= new PathEditorInput(location);
- return input;
- }
-
- /**
- * Inserts text into the IDocument.
- * @param text string to insert
- */
- public void insertText(String text) {
- IDocument doc = getSourceViewer().getDocument();
- String s = doc.get();
- int offset = s.length();
- s += text;
- doc.set(s);
- this.setHighlightRange(offset,0,true);
- }
-
- /**
- * Inserts text at the current location.
- * @param text string to insert
- */
- public void insertTextAtCurrent(String text) {
- ISelection selection = this.getSelectionProvider().getSelection();
- IDocument doc = getSourceViewer().getDocument();
-
- if(selection instanceof ITextSelection) {
- ITextSelection s = (ITextSelection) selection;
- StringBuffer sb = new StringBuffer(doc.get().substring(0,s.getOffset()));
- sb.append(text.trim());
- sb.append(doc.get().substring(s.getOffset() + s.getLength(), doc.get().length()));
- doc.set(sb.toString());
- this.setHighlightRange(s.getOffset() + text.trim().length(),0,true);
- }
- }
-
- private File queryFile() {
- FileDialog dialog= new FileDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.SAVE);
- dialog.setText("New File");
- String path= dialog.open();
- if (path != null && path.length() > 0)
- return new File(path);
- return null;
- }
-
- /**
- * Determines whether saving is allowed currently.
- * @return boolean value indicating whether or not saving is allowed
- */
- public boolean isSaveAsAllowed() {
- return true;
- }
-
- public static final String ID = "org.eclipse.linuxtools.systemtap.ui.editor.SimpleEditor";
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/WhitespaceDetector.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/WhitespaceDetector.java
deleted file mode 100644
index 5e1b9e7656..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/WhitespaceDetector.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.editor;
-
-import org.eclipse.jface.text.rules.IWhitespaceDetector;
-
-public class WhitespaceDetector implements IWhitespaceDetector {
-
- /**
- * Determines whether or not a character is considered whitespace
- *
- * @param c the character to test
- *
- * @return a boolean value indicating if the character is whitespace
- */
- public boolean isWhitespace(char c) {
- return (c == ' ' || c == '\t' || c == '\n' || c == '\r');
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/WordDetector.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/WordDetector.java
deleted file mode 100644
index fa54b52156..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/WordDetector.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.editor;
-
-import org.eclipse.jface.text.rules.IWordDetector;
-
-public class WordDetector implements IWordDetector {
-
- public boolean isWordPart(char character) {
- if (character == '.') return true;
-
- return Character.isJavaIdentifierPart(character);
- }
-
- public boolean isWordStart(char character) {
- return Character.isJavaIdentifierStart(character);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/actions/ActiveEditorAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/actions/ActiveEditorAction.java
deleted file mode 100644
index 893c27b741..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/actions/ActiveEditorAction.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.editor.actions;
-
-public abstract class ActiveEditorAction extends EditorAction {
- public ActiveEditorAction() {
- super();
- }
-
- protected void buildEnablementChecks() {
- setEnablement(null != getActiveEditor());
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/actions/EditorAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/actions/EditorAction.java
deleted file mode 100644
index 5d2b9e3b5f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/actions/EditorAction.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.editor.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.PlatformUI;
-
-public abstract class EditorAction extends Action implements IWorkbenchWindowActionDelegate {
- public EditorAction() {
- super();
- setEnabled(true);
- }
-
- public void init(IWorkbenchWindow window) {
- this.window = window;
- }
-
- protected void updateState() {
- IEditorPart editor = getActiveEditor();
- setEnabled(editor != null && editor.isDirty());
- }
-
- protected IWorkbenchWindow getWorkbenchWindow() {
- return PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- }
-
- protected IWorkbenchPage getActivePage() {
- return getWorkbenchWindow().getActivePage();
- }
-
- protected IEditorPart getActiveEditor() {
- return getActivePage().getActiveEditor();
- }
-
- public void selectionChanged(IAction act, ISelection select) {
- action = act;
- buildEnablementChecks();
- }
-
- protected void buildEnablementChecks() {
- setEnablement(true);
- }
-
- protected void setEnablement(boolean enabled) {
- action.setEnabled(enabled);
- }
-
- public void dispose() {
- window = null;
- action = null;
- }
-
- protected IWorkbenchWindow window;
- protected IAction action;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/actions/file/NewFileAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/actions/file/NewFileAction.java
deleted file mode 100644
index a02f2eba10..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/actions/file/NewFileAction.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.editor.actions.file;
-
-import java.io.File;
-
-import org.eclipse.linuxtools.systemtap.ui.editor.internal.Localization;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-
-public class NewFileAction extends OpenFileAction {
-
- public NewFileAction() {
- super();
- }
-
- public NewFileAction(IWorkbenchWindow window) {
- super();
- init(window);
- }
- /**
- * Creates a new file.
- * @return the new file object.
- */
- protected File queryFile() {
- FileDialog dialog= new FileDialog(window.getShell(), SWT.SAVE);
- dialog.setText(Localization.getString("NewFileAction.NewFile")); //$NON-NLS-1$
- String path= dialog.open();
- if (path != null && path.length() > 0)
- return new File(path);
- return null;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/actions/file/OpenFileAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/actions/file/OpenFileAction.java
deleted file mode 100644
index 929113a25f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/actions/file/OpenFileAction.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.editor.actions.file;
-
-import java.io.File;
-import java.text.MessageFormat;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.linuxtools.systemtap.ui.editor.PathEditorInput;
-import org.eclipse.linuxtools.systemtap.ui.editor.SimpleEditor;
-import org.eclipse.linuxtools.systemtap.ui.editor.actions.EditorAction;
-import org.eclipse.linuxtools.systemtap.ui.editor.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.editor.internal.RecentFileLog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-
-
-
-public class OpenFileAction extends EditorAction {
- public OpenFileAction() {
- super();
- setEnabled(true);
- }
-
- public void run(IAction act) {
- run();
- }
-
- /**
- * Opens the editor input.
- */
- public void run() {
- File file = queryFile();
- if (file != null) {
- IEditorInput input= createEditorInput(file);
- String editorId= getEditorId(file);
- IWorkbenchPage page= window.getActivePage();
- try {
- page.openEditor(input, editorId);
- RecentFileLog.updateRecentFiles(file);
- } catch (PartInitException e) {}
- } else if (file != null) {
- String msg = MessageFormat.format(Localization.getString("OpenFileAction.FileIsNull"), (Object [])(new String[] {file.getName()}));
- MessageDialog.openWarning(window.getShell(), Localization.getString("OpenFileAction.Problem"), msg);
- }
- }
-
- /**
- * Request the name and location of the file to the user.
- * @return the File object associated to the selected file.
- */
- protected File queryFile() {
- FileDialog dialog= new FileDialog(window.getShell(), SWT.OPEN);
- dialog.setText(Localization.getString("OpenFileAction.OpenFile"));
- String path= dialog.open();
- if (path != null && path.length() > 0)
- return new File(path);
- return null;
- }
-
- /**
- * Returns the editor ID associated with the specified file.
- * @param file the file to examine
- * @return the editor ID
- */
- protected String getEditorId(File file) {
- IWorkbench workbench= window.getWorkbench();
- IEditorRegistry editorRegistry= workbench.getEditorRegistry();
- IEditorDescriptor descriptor= editorRegistry.getDefaultEditor(file.getName());
- if (descriptor != null && descriptor.getId().startsWith("org.eclipse.linuxtools.systemtap.ui")) { //TODO: descriptor.getId().startsWith("org.eclipse.linuxtools.systemtap.ui") is a temparary fix until we find out why .txt files are opening with org.eclipse.ui.DefautTextEditor //$NON-NLS-1$
- return descriptor.getId();
- }
- return SimpleEditor.ID;
- }
-
- /**
- * Creates an editor input.
- * @param file the file you wish the editor to point at
- * @return the input created
- */
- protected IEditorInput createEditorInput(File file) {
- IPath location= new Path(file.getAbsolutePath());
- PathEditorInput input= new PathEditorInput(location);
- return input;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/actions/file/OpenRecentFileAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/actions/file/OpenRecentFileAction.java
deleted file mode 100644
index 676f164b33..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/actions/file/OpenRecentFileAction.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.editor.actions.file;
-
-import java.io.File;
-
-import org.eclipse.linuxtools.systemtap.ui.editor.internal.RecentFileLog;
-
-
-
-public class OpenRecentFileAction extends OpenFileAction {
- public OpenRecentFileAction(int item) {
- super();
-
- index = item;
- update();
- super.init(getWorkbenchWindow());
- }
-
- protected File queryFile() {
- int index = Integer.parseInt(this.getText().substring(0, 1));
-
- String path = RecentFileLog.getString("path" + (index-1));
- if (path != null && path.length() > 0)
- return new File(path);
- return null;
- }
-
- public void update() {
- String name = RecentFileLog.getString("file" + index);
- this.setText(index+1 + " " + (name != null ? name : "NA"));
- }
-
- private int index;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/internal/EditorPlugin.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/internal/EditorPlugin.java
deleted file mode 100644
index f3577c7bea..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/internal/EditorPlugin.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.editor.internal;
-
-import org.eclipse.ui.IStartup;
-import org.eclipse.ui.plugin.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class EditorPlugin extends AbstractUIPlugin implements IStartup {
-
- //The shared instance.
- private static EditorPlugin plugin;
-
- /**
- * The constructor.
- */
- public EditorPlugin() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static EditorPlugin 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 AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.linuxtools.systemtap.ui.editor", path);
- }
-
- public void earlyStartup() {}
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/internal/Localization.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/internal/Localization.java
deleted file mode 100644
index 0cedea30d3..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/internal/Localization.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.editor.internal;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Localization {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.systemtap.ui.editor.internal.localization";
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- private Localization() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/internal/RecentFileLog.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/internal/RecentFileLog.java
deleted file mode 100644
index 5d68b19c5e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/internal/RecentFileLog.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.editor.internal;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.linuxtools.systemtap.ui.editor.RecentFileMenuManager;
-
-
-
-public final class RecentFileLog {
- private RecentFileLog() {
- File f = new File(fileName);
- try {
- if(!f.exists()) {
- f.createNewFile();
- EditorPlugin.getDefault().getDialogSettings().save(fileName);
- }
- } catch(IOException ioe) {}
- }
-
- public static RecentFileLog getInstance() {
- return log;
- }
-
- public static String getString(String key) {
- try {
- IDialogSettings settings = EditorPlugin.getDefault().getDialogSettings();
- settings.load(fileName);
- return settings.get(key);
- } catch(IOException e) {}
- return null;
- }
-
- private static boolean setString(String key, String val) {
- try {
- IDialogSettings settings = EditorPlugin.getDefault().getDialogSettings();
- settings.load(fileName);
- settings.put(key, val);
- settings.save(fileName);
- return true;
- } catch(IOException e) {}
- return false;
- }
-
- /**
- * Updates the list of recently opened files.
- * @param file the file that was just opened
- */
- public static boolean updateRecentFiles(File file) {
- String[] temps = new String[RecentFileMenuManager.MAX_RECENT_FILES];
- String[] files = new String[RecentFileMenuManager.MAX_RECENT_FILES];
- String[] paths = new String[RecentFileMenuManager.MAX_RECENT_FILES];
-
- for(int i=0; i<RecentFileMenuManager.MAX_RECENT_FILES; i++) {
- files[i] = getString("file" + i);
- paths[i] = getString("path" + i);
- }
-
- if(!file.getAbsolutePath().equals(paths[0])) {
- temps[0] = files[0];
- temps[1] = paths[0];
- files[0] = file.getName();
- paths[0] = file.getAbsolutePath();
-
- if(file.getAbsolutePath().equals(paths[1])) {
- files[1] = temps[0];
- paths[1] = temps[1];
- } else {
- temps[2] = files[1];
- temps[3] = paths[1];
- files[1] = temps[0];
- paths[1] = temps[1];
-
- if(file.getAbsolutePath().equals(paths[2])) {
- files[2] = temps[2];
- paths[2] = temps[3];
- } else {
- temps[0] = files[2];
- temps[1] = paths[2];
- files[2] = temps[2];
- paths[2] = temps[3];
-
- if(file.getAbsolutePath().equals(paths[3])) {
- files[3] = temps[0];
- paths[3] = temps[1];
- } else {
- files[3] = temps[0];
- paths[3] = temps[1];
- }
- }
- }
- }
-
- for(int i=0; i<RecentFileMenuManager.MAX_RECENT_FILES; i++) {
- if(null != files[i] && null != paths[i]) {
- setString("file" + i, files[i]);
- setString("path" + i, paths[i]);
- RecentFileMenuManager.update();
- }
- }
- return true;
- }
-
- private static final String fileName = EditorPlugin.getDefault().getStateLocation().append("recentFiles.log").toOSString();
- private static final RecentFileLog log = new RecentFileLog();
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/internal/localization.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/internal/localization.properties
deleted file mode 100644
index a73c31f992..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/internal/localization.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-PathEditorInput.Untitled=untitled
-OpenFileAction.FileIsNull=File is null
-OpenFileAction.Problem=Problem
-OpenFileAction.OpenFile=Open File
-NewFileAction.NewFile=New File
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/.project b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/.project
deleted file mode 100644
index 582642ad82..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.ui.graphing.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/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/ChangeLog
deleted file mode 100644
index 2e69f0d2d8..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/ChangeLog
+++ /dev/null
@@ -1,18 +0,0 @@
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Make version 0.3.0.qualifier.
-
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Change provider from IBM to Eclipse.
-
-2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * .classpath: New file.
- * .project: New file.
- * build.properties: New file.
- * META-INF/MANIFEST.MF: New file.
- * src/com/ibm/ras/systemtap/graphing/structures: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/graphing/AllTests.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/graphing/structures/GraphDisplaySetTest.java: New file.
- * src/org/eclipse/linuxtools/systemtapgui: \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index cbe10eeade..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,11 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name.0
-Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.graphing.tests
-Bundle-Version: 0.3.0.qualifier
-Bundle-Vendor: Eclipse
-Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.graphing.tests.GraphingPlugin
-Bundle-Localization: plugin
-Bundle-ActivationPolicy: lazy
-Import-Package: junit.framework
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/build.properties
deleted file mode 100644
index 34d2e4d2da..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/src/org/eclipse/linuxtools/systemtap/ui/graphing/AllTests.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/src/org/eclipse/linuxtools/systemtap/ui/graphing/AllTests.java
deleted file mode 100644
index b3ab20eefd..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/src/org/eclipse/linuxtools/systemtap/ui/graphing/AllTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphing;
-
-import org.eclipse.linuxtools.systemtap.ui.graphing.structures.GraphDisplaySetTest;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.linuxtools.systemtap.ui.graphing");
-
- //Structures
- suite.addTestSuite(GraphDisplaySetTest.class);
-
- return suite;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/src/org/eclipse/linuxtools/systemtap/ui/graphing/structures/GraphDisplaySetTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/src/org/eclipse/linuxtools/systemtap/ui/graphing/structures/GraphDisplaySetTest.java
deleted file mode 100644
index 3f5ba4d18b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing.tests/src/org/eclipse/linuxtools/systemtap/ui/graphing/structures/GraphDisplaySetTest.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphing.structures;
-
-import junit.framework.TestCase;
-
-public class GraphDisplaySetTest extends TestCase {
- public GraphDisplaySetTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/.classpath
deleted file mode 100644
index 64c5e31b7a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/.project b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/.project
deleted file mode 100644
index 4070a4c0ff..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.ui.graphing</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/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/.settings/org.eclipse.jdt.core.prefs b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 5cb5e1b38f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Feb 27 18:15:17 IST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/.settings/org.eclipse.pde.prefs b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index b67d47e77b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,22 +0,0 @@
-#Tue Jan 20 16:47:22 IST 2009
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=2
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/ChangeLog
deleted file mode 100644
index 360812d163..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/ChangeLog
+++ /dev/null
@@ -1,15 +0,0 @@
-2009-11-16 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Fix Bundle-Name.
-
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Make version 0.3.0.qualifier.
-
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Change provider from IBM to Eclipse.
-
-2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * ChangeLog: Refactoring. Renaming all packages directories from *.systemtapgui.* to *.systemtap.ui.* \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/META-INF/MANIFEST.MF
deleted file mode 100644
index 5558af61bc..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,26 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: SystemTap Graphing Plug-In (Incubation)
-Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.graphing;singleton:=true
-Bundle-Version: 0.3.0.qualifier
-Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.graphing.internal.GraphingPlugin
-Bundle-Vendor: Eclipse
-Bundle-Localization: plugin
-Export-Package: org.eclipse.linuxtools.systemtap.ui.graphing,
- org.eclipse.linuxtools.systemtap.ui.graphing.structures,
- org.eclipse.linuxtools.systemtap.ui.graphing.views
-Require-Bundle: org.eclipse.linuxtools.systemtap.ui.graphingapi.ui,
- org.eclipse.linuxtools.systemtap.ui.structures,
- org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.linuxtools.systemtap.ui.logging,
- org.eclipse.ui.forms,
- org.eclipse.linuxtools.systemtap.ui.systemtapgui,
- org.eclipse.core.resources;bundle-version="3.4.1",
- org.eclipse.ui.editors;bundle-version="3.4.0",
- org.eclipse.ui.console;bundle-version="3.3.0"
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.linuxtools.systemtap.ui.consolelog.actions,
- org.eclipse.linuxtools.systemtap.ui.consolelog.structures,
- org.eclipse.linuxtools.systemtap.ui.editor
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/build.properties
deleted file mode 100644
index 0137899eba..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/build.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- icons/,\
- documentation/,\
- toc.xml,\
- plugin.properties
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/concepts.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/concepts.html
deleted file mode 100644
index 51789692fd..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/concepts.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<a href="../toc.html">Table of Contents</a>
-
-<h2>
-Concepts
-</h2>
-
-This section of the Graphing User Guide details conceptual topics of the application; the major
-components, what they do, and how how you interact with them.
-
-<ol>
-<li><a href="dataTable.html">DataTable</a></li>
-<li><a href="graphTypes.html">Graph Types</a>
-<ol>
-<li><a href="graphTypes/barGraph.html">Bar Graph</a></li>
-<li><a href="graphTypes/multiBarGraph.html">Multi-Bar Graph</a></li>
-<li><a href="graphTypes/lineGraph.html">Line Graph</a></li>
-<li><a href="graphTypes/multiLineGraph.html">Multi-Line Graph</a></li>
-<li><a href="graphTypes/scatterGraph.html">Scatter Graph</a></li>
-<li><a href="graphTypes/multiScatterGraph.html">Multi-Scatter Graph</a></li>
-</ol>
-</li>
-<li><a href="filters.html">Filters</a></li>
-<li><a href="graphInteraction.html">Graph Interaction</a></li>
-</ol> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/dataTable.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/dataTable.html
deleted file mode 100644
index daf7782402..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/dataTable.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="concepts.html">Concepts</a>
-
-<h2>
-DataTable
-</h2>
-
-The DataTable is the default view the user sees when running a script with the chart option. It
-intitially starts empty and populates as it recieves information parsed from the console originally
-from the script. The DataTable is a visualization of the data structure that every other graph type
-spawns from.<br><br>
-
-<img src="images/GraphingPerspective.png"><br><br>
-
-The columns of the DataTable can be resized at will by dragging the seperation lines between column
-headers. In addition, the information in the data table can be <a href="../tasks/importDataSet.html">
-saved and loaded</a> without having to re-run the script. Furthermore, the user can populate the
-DataTable without having to run a script if a script's output has been saved into a file, see
-<a href="../tasks/openScriptOutput.html">Opening Script Output</a>.<br><br>
-
-Right clicking the DataTable provides a menu with the following options:
-<ul>
-<li><b>Format as...</b> - Depending on which column the user right clicked, his allows the user to
-format that column's data as one of the following:
-<ul>
-<li>Unformated - No formating is applied.</li>
-<li>String</li>
-<li>Date</li>
-<li>Double</li>
-<li>Hex</li>
-<li>Octal</li>
-<li>Binary</li>
-</ul>
-</li>
-<li><b>Add Filter...</b> - Adds a <a href="filters.html">filter</a> to the DataTable.
-<li><b>Remove Filter...</b> - Removes a <a href="filters.html">filter</a> from the DataTable.
-<li><b>Manually Resize</b> - Allows the user to resize column width without bouncing back to the
-minimum based on the largest value.</li>
-</ul> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/filters.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/filters.html
deleted file mode 100644
index 4df03c9bdd..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/filters.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="concepts.html">Concepts</a>
-
-<h2>
-Filters
-</h2>
-
-Filters are screens that you can set on your DataTable to limit the quantity of samples you wish to work with.
-Filters are very often used in restricting the sheer amount of information available to make data tables and
-graphs more substantial to people.<br><br>
-
-The following options exist to work with Filters in the DataTable:
-<ul>
-<li><b>Add Filter...</b> - Adds a Filter to the DataTable.
-<li><b>Remove Filter...</b> - Removes a Filter from the DataTable.
-</ul>
-
-When you select <b>Add Filter</b> you see the following dialogue box:<br><br>
-
-<img src="images/filters.png"><br><br>
-
-What follows is a breakdown of each Filter type:
-<ul>
-
-<li><b>Match Filter</b> - This filter removes everything from the data set where the selected column's
-value does not match the chosen value.<br><br>
-<img src="images/match.png"><br><br>
-Result:<br><br>
-<img src="images/match2.png"><br><br>
-</li>
-
-<li><b>Range Filter</b> - This filter removes everything from the data set that is not included in the
-selected range of values.
-<img src="images/range.png"><br><br>
-Result:<br><br>
-<img src="images/range2.png"><br><br>
-</li>
-
-<li><b>Sort Filter</b> - This filter will sort the data set based on the selected column. No data will be
-removed.
-<img src="images/sort.png"><br><br>
-Result:<br><br>
-<img src="images/sort2.png"><br><br>
-</li>
-
-<li><b>Unique Filter</b> - This filter will remove all merge all entries in that data set that share a common
-value in the selected column. Data for the removed rows will be aggregated together based on the chosen
-aggregation method.<br><br>
-<img src="images/unique.png"><br><br>
-<ul>
-<li><b>Average Aggregate</b> - This aggregate will return the average of all the items consolidated.</li>
-<li><b>Count Aggregate</b> - This aggregate will return the number of items consolidated.</li>
-<li><b>Max Aggregate</b> - This aggregate will return the maximum value of all the items consolidated.</li>
-<li><b>Min Aggregate</b> - This aggregate will return the minimum value of all the items consolidated.</li>
-<li><b>Sum Aggregate</b> - This aggregate will return the sum of all the items consolidated.</li>
-</ul>
-</li>
-</ul> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphInteraction.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphInteraction.html
deleted file mode 100644
index e6b74362c4..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphInteraction.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="concepts.html">Concepts</a>
-
-<h2>
-Graph Interaction
-</h2>
-
-Each of the <a href="graphTypes.html">graph types</a> have similar options that can be used in the Graphical
-Perspective:
-<ul>
-<li><b>Zoom Bar</b> - This enables the user to zoom in and out on the current graph by sliding the bar up and
-down. The current magnification is shown at the top of the bar. Magnification can range from as high as
-.0625x to as low as 4x the dimensions of the original graph.<br><br><img src="images/zoom.png"></li>
-<li><b>Title</b> - This option turns on and off the title specified in the graph creation wizard.</li>
-<li><b>Legend</b> - This option turns on and off the legend, particularly useful in the graph types that
-show multiple series.</li>
-<li><b>Grid Lines</b> - This option permits the user to turn and off the grid lines.</li>
-<li><b>Normalization</b> - The option to normalize occurs only in multi-series graphs. By default, series graphs are rendered using normalization which scales them to
-visuals easily comparable to one another. The user has the option to view the normalization scale by clicking
-the data in the graph. The user also has the option of disabling normalization by deselecting it.</li>
-</ul>
-
-<img src="images/graphExpanded.png"> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes.html
deleted file mode 100644
index 330e4298db..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="concepts.html">Concepts</a>
-
-<h2>
-Graph Types
-</h2>
-
-Currently there are six graph types built into SystemTap GUI. They are:
-<ul>
-<li><a href="graphTypes/barGraph.html">Bar Graph</a></li>
-<li><a href="graphTypes/multiBarGraph.html">Multi-Bar Graph</a></li>
-<li><a href="graphTypes/lineGraph.html">Line Graph</a></li>
-<li><a href="graphTypes/multiLineGraph.html">Multi-Line Graph</a></li>
-<li><a href="graphTypes/scatterGraph.html">Scatter Graph</a></li>
-<li><a href="graphTypes/multiScatterGraph.html">Multi-Scatter Graph</a></li>
-</ul>
-
-These graph types can be used instantiated by using the Graph Wizard once the DataTable is populated.
-The Graphing Perspective can support multiple graphs from one DataTable. Each are updated and can
-be viewed by navigating through the tabs shown at the top of each graph. \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/barGraph.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/barGraph.html
deleted file mode 100644
index ff4abfefa3..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/barGraph.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<h2>
-Bar Graph
-</h2>
-
-The Bar Graph typically uses bars to show frequencies or values.<br><br>
-
-Creating a Bar Graph will prompt the user for three values. The first is the title and is fully cosmetic. The
-option to turn on and off the title is given to the user, and its off by default. The second option is X Series;
-here you select which series of data you want to plot along the X Axis. The third option is the Y Series; here
-you select which series of data you want to plot along the Y Axis.<br><br>
-
-<img src="images/bar.png"> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/images/bar.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/images/bar.png
deleted file mode 100644
index 50aeb04f48..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/images/bar.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/images/line.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/images/line.png
deleted file mode 100644
index 593fd7f99c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/images/line.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/images/multibar.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/images/multibar.png
deleted file mode 100644
index 6dbac24d0a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/images/multibar.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/images/multiline.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/images/multiline.png
deleted file mode 100644
index 0863a6850a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/images/multiline.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/images/multiscatter.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/images/multiscatter.png
deleted file mode 100644
index a6f5446bf0..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/images/multiscatter.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/images/scatter.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/images/scatter.png
deleted file mode 100644
index 4cfa50eb11..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/images/scatter.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/lineGraph.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/lineGraph.html
deleted file mode 100644
index f3e3ce9517..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/lineGraph.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<h2>
-Line Graph
-</h2>
-
-The Line Graph is traditionally ideal for horozontally depicting non-cumulative data over, say, time.<br><br>
-
-Creating a Line Graph will prompt the user for three values. The first is the title and is fully cosmetic. The
-option to turn on and off the title is given to the user, and its off by default. The second option is X Series;
-here you select which series of data you want to plot along the X Axis. The third option is the Y Series; here
-you select which series of data you want to plot along the Y Axis.<br><br>
-
-<img src="images/line.png"> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/multiBarGraph.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/multiBarGraph.html
deleted file mode 100644
index 094aa47348..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/multiBarGraph.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<h2>
-Multi-Bar Graph
-</h2>
-
-The Multi-Bar Graph is useful for illustrating compounding series data against a fixed interval, such as time.<br><br>
-
-Creating a Multi-Bar Graph will prompt the user for four values. The first is the title and is fully cosmetic. The
-option to turn on and off the title is given to the user, and its off by default. The second option is X Series;
-here you select which series of data you want to plot along the X Axis. The third option is the first Y Series; here
-you select one of the series of data you want to plot along the Y Axis. The fourth option is the second Y series;
-here you select the other series of data you want to plot along the Y Axis.<br><br>
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/multiLineGraph.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/multiLineGraph.html
deleted file mode 100644
index 41e08f475d..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/multiLineGraph.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<h2>
-Multi-Line Graph
-</h2>
-
-A Multi-Line Graph is useful for contrasting multiple series of data on a fixed interval, such as time.<br><br>
-
-Creating a Multi-Line Graph will prompt the user for four values. The first is the title and is fully cosmetic. The
-option to turn on and off the title is given to the user, and its off by default. The second option is X Series;
-here you select which series of data you want to plot along the X Axis. The third option is the first Y Series; here
-you select one of the series of data you want to plot along the Y Axis. The fourth option is the second Y series;
-here you select the other series of data you want to plot along the Y Axis.<br><br>
-
-<img src="images/multiline.png"> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/multiScatterGraph.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/multiScatterGraph.html
deleted file mode 100644
index 8d822076e1..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/multiScatterGraph.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<h2>
-Multi-Scatter Graph
-</h2>
-
-The Multi-Scatter Graph is useful for comparing two sets of series data with multiple Y values on the same
-X value.<br><br>
-
-Creating a Multi-Scatter Graph will prompt the user for four values. The first is the title and is fully cosmetic. The
-option to turn on and off the title is given to the user, and its off by default. The second option is X Series;
-here you select which series of data you want to plot along the X Axis. The third option is the first Y Series; here
-you select one of the series of data you want to plot along the Y Axis. The fourth option is the second Y series;
-here you select the other series of data you want to plot along the Y Axis.<br><br>
-
-<img src="images/multiscatter.png"> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/scatterGraph.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/scatterGraph.html
deleted file mode 100644
index eee7b8c830..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/graphTypes/scatterGraph.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<h2>
-Scatter Graph
-</h2>
-
-A Scatter Graph uses Cartesian coordinates to show the relation of two or more quantitative variables.<br><br>
-
-Creating a Scatter Graph will prompt the user for three values. The first is the title and is fully cosmetic. The
-option to turn on and off the title is given to the user, and its off by default. The second option is X Series;
-here you select which series of data you want to plot along the X Axis. The third option is the Y Series; here
-you select which series of data you want to plot along the Y Axis.<br><br>
-
-<img src="images/scatter.png"> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/GraphWizard.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/GraphWizard.png
deleted file mode 100644
index 33c3c125f6..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/GraphWizard.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/GraphWizard2.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/GraphWizard2.png
deleted file mode 100644
index 068a8d094e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/GraphWizard2.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/GraphingPerspective.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/GraphingPerspective.png
deleted file mode 100644
index aa931e2611..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/GraphingPerspective.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/GraphingPerspective2.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/GraphingPerspective2.png
deleted file mode 100644
index 769260571d..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/GraphingPerspective2.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/filters.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/filters.png
deleted file mode 100644
index bece7fa052..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/filters.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/graphExpanded.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/graphExpanded.png
deleted file mode 100644
index 870bfe97c5..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/graphExpanded.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/match.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/match.png
deleted file mode 100644
index fcb5d4e91a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/match.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/match2.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/match2.png
deleted file mode 100644
index fa636f875f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/match2.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/range.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/range.png
deleted file mode 100644
index 26d0eaaafb..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/range.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/range2.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/range2.png
deleted file mode 100644
index 7bac7f86e5..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/range2.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/scale2.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/scale2.png
deleted file mode 100644
index 03c32ab128..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/scale2.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/sort.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/sort.png
deleted file mode 100644
index f07e646646..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/sort.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/sort2.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/sort2.png
deleted file mode 100644
index 9f29b1e59d..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/sort2.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/unique.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/unique.png
deleted file mode 100644
index a1fda64c2f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/unique.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/zoom.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/zoom.png
deleted file mode 100644
index 4ff3b64665..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/concepts/images/zoom.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/gettingStarted.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/gettingStarted.html
deleted file mode 100644
index c6f4d546b0..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/gettingStarted.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<a href="../toc.html">Table of Contents</a>
-
-<h2>
-Getting Started
-</h2>
-
-This section of the SystemTap Graphing User Guide covers the essentials of getting started using the Graphing
-Perspective.
-
-<ol>
-<li><a href="introduction.html">Introduction</a></li>
-<li><a href="configurationTutorial.html">Configuration Tutorial</a></li>
-</ol>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/graphingTutorial.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/graphingTutorial.html
deleted file mode 100644
index 01b960c6d8..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/graphingTutorial.html
+++ /dev/null
@@ -1,78 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="gettingStarted.html">Getting Started</a>
-
-<h2>
-Graphing Tutorial
-</h2>
-
-In order to graph SystemTap scripts you must have a script open in the IDE Perspective, and the <b><u>R</u>un->Run
-w/ Chart</b> option must be used. If you are unfamiliar with how to load or write a SystemTap script, please
-review the IDE Tutorial in the SystemTap IDE User's Guide. Please use the following script for this example by
-copying and pasting it into a new file (any name is fine that ends in a .stp extension):<br><br>
-
-<pre>
-global read, write, start
-
-probe begin {
- start = gettimeofday_s()
-}
-probe syscall.write {
- write += count
-}
-
-probe syscall.read {
- read += count
-}
-
-probe timer.ms(1000) {
- printf("%d\t%d\t%d\n", (gettimeofday_s()-start), read, write)
- read=0
- write=0
-}
-</pre>
-
-Now select <b><u>R</u>un->Run w/ <u>C</u>hart</b>. This feature will prompt the user for the number of columns for the chart, in addition to
-their titles and regular expressions. The regular expressions are used to parse the console output for
-the script and determine the values of each column at a certain sample point. The combined regular
-expression is shown at the bottom of the dialogue box. You should see the following:<br><br>
-
-<br><img src="images/chartbox1.png"><br><br></li>
-
-For this example enter the following:<br>
-
-<pre> Columns: 3
-
- TITLE REGULAR EXPRESSION DELIMITER
- Time \d+ .* \D+
- Read \d+ .* \D+
- Write \d+ .* \D+
-</pre><br>
-
-The title fields simply display the associated string in the column's header. After clicking OK the
-script will prompt you for details regarding the Remote Server. Provide the ip address of the remote server
-that is running the systemtapgui Server or the Data Management Daemon. The port is by default 22462. Enter
-a username and password.This will give the application permissions to run your script on the remote machine.
-You have the option of saving your password as well, however be warned this is currently NOT encrypted so this
-convenience runs at a risk. The username is also used to transfer the file to the remote system using SCP. If the
-same machine is used as both the server and the client enter 'localhost' for the Host field.
-When the script is executed the application will switch into the Graphing perspective. A Data View chart is
-populated with live data, in addition to the output in the console. <br><br>
-You should see a screen similar to the following:<br><br>
-
-<img src="images/graphics.png"><br><br>
-
-You will see that the data table poplulates from live data parsed from the console. Now we'll make a
-graph to briefly illustrate the Graphing perspective. Click the Create Graph button next to bring up the
-Select Chart dialogue.<br><br>
-
-<img src="images/GraphWizard.png"><br><br>
-
-Select line graph. You will be prompted to select a column of the X series and Y
-series; select "Time" and "Write" respectively. After you click ok you should see the line graph as follows:<br><br>
-
-<img src="images/graph.png"><br><br>
-
-Note that the multiple series graphs (Multi-Line, Multi-Bar, and Multi-Scatter) will request two Y series, Y1
-and Y2. In the case of our example, these would be "Read" and "Write". Each series will be assigned a different
-color value for the purposes of differentiation and will be plotted both in respect to the specified X series.<br><br>
-
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/images/GraphWizard.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/images/GraphWizard.png
deleted file mode 100644
index 33c3c125f6..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/images/GraphWizard.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/images/chartbox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/images/chartbox1.png
deleted file mode 100644
index 0008258b2b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/images/chartbox1.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/images/graph.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/images/graph.png
deleted file mode 100644
index 4b1b57f3e0..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/images/graph.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/images/graphics.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/images/graphics.png
deleted file mode 100644
index 91034b6395..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/images/graphics.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/images/multi.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/images/multi.png
deleted file mode 100644
index 86cb90e94c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/images/multi.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/introduction.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/introduction.html
deleted file mode 100644
index 93bacc6779..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/gettingstarted/introduction.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="gettingStarted.html">Getting Started</a>
-
-<h2>
-Introduction
-</h2>
-
-The Graphing Perspective in the SystemTap GUI is a perspective that is active once a user runs a script with
-the chart option (<b><u>R</u>un->Run w/ <u>C</u>hart</b>). From this point a
-<a href="../concepts/dataTable.html">DataTable</a> is populated with live data as it is parsed from the Console.
-From the information in the DataTable you can generate the following graphs:
-
-<ul>
-<li><a href="../concepts/graphTypes/barGraph.html">Bar Graph</a></li>
-<li><a href="../concepts/graphTypes/multiBarGraph.html">Multi-Bar Graph</a></li>
-<li><a href="../concepts/graphTypes/lineGraph.html">Line Graph</a></li>
-<li><a href="../concepts/graphTypes/multiLineGraph.html">Multi-Line Graph</a></li>
-<li><a href="../concepts/graphTypes/scatterGraph.html">Scatter Graph</a></li>
-<li><a href="../concepts/graphTypes/multiScatterGraph.html">Multi-Scatter Graph</a></li>
-</ul>
-
-These graph types can be used instantiated by using the Graph Wizard once the DataTable is populated.
-The Graphing Perspective can support multiple graphs from one DataTable. Each are updated and can
-be viewed by navigating through the tabs shown at the top of each graph.<br><br>
-
-If you have not already, you will want to review the <a href="graphingTutorial.html">Graphing Tutorial</a> and
-the <a href="configurationTutorial.html">Configuration Tutorial</a>.
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/exampleGraphingScripts.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/exampleGraphingScripts.html
deleted file mode 100644
index 935aec4bcb..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/exampleGraphingScripts.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="reference.html">Reference</a>
-
-<h2>
-Example Graphing Scripts
-</h2>
-
-Provided below are a few scripts that you can use with the Graphing Perspective.<br><br>
-
-<b>readwrite.stp</b><br><br>
-
-<i>Counts the reads and writes that occur and provide this information once per second.</i><br><br>
-
-<pre>
-global read, write, startasdfasdf
-
-probe begin {
- start = gettimeofday_s()
-}
-probe syscall.write {
- write += count
-}
-
-probe syscall.read {
- read += count
-}
-
-probe timer.ms(1000) {
- printf("%d\t%d\t%d\n", (gettimeofday_s()-start), read, write)
- read=0
- write=0
-}
-</pre> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/frequentlyAskedQuestions.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/frequentlyAskedQuestions.html
deleted file mode 100644
index 8e50ac675f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/frequentlyAskedQuestions.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="reference.html">Reference</a>
-
-<h2>
-Frequently Asked Questions
-</h2>
-
-This section details frequently asked questions relating to the Graphing Perspective.<br><br>
-
-<b>
-Can I make more than one graph at one time? Do they update concurrently?
-</b><br><br>
-
-A: Yes and yes. Start another graph the same way you started the first one, by clicking the Graph Wizard button.
-<br><br><br>
-
-<b>
-Can I increase the rate at which SystemTap GUI update the graph?
-</b><br><br>
-
-A: Yes. By default it is set to once per second, but you can increase this in the <a href="preferences.html">
-Preferences.</a>
-<br><br><br>
-
-<b>
-Is there any way to save or export the graph images?
-</b><br><br>
-
-A: Yes. Use <b><u>F</u>ile->Save <u>G</u>raph Image</b> to save the graph.
-<br><br><br>
-
-<b>
-What if I want to preserve this data for manipulation later?
-</b><br><br>
-
-A: You can do this by using <b><u>F</u>ile-><u>E</u>xport Data Set</b>. This will save your data set for further
-work.
-<br><br><br> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/menu/export.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/menu/export.png
deleted file mode 100644
index ebfdcb39b2..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/menu/export.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/menu/import.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/menu/import.png
deleted file mode 100644
index acbb91fd64..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/menu/import.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/menu/openbox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/menu/openbox1.png
deleted file mode 100644
index 3155183cf4..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/menu/openbox1.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/menu/preferencesbox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/menu/preferencesbox1.png
deleted file mode 100644
index 31b0cbc9f1..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/menu/preferencesbox1.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/menu/saveoutput.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/menu/saveoutput.png
deleted file mode 100644
index 1c1d81daab..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/menu/saveoutput.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/menu/viewbox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/menu/viewbox1.png
deleted file mode 100644
index 28e5cd8db3..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/menu/viewbox1.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/dash.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/dash.png
deleted file mode 100644
index 4e1dc2ee25..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/dash.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/graphing.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/graphing.png
deleted file mode 100644
index adfa0c2943..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/graphing.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/ide.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/ide.png
deleted file mode 100644
index 43dacebd97..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/ide.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/open_wiz.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/open_wiz.gif
deleted file mode 100644
index 51e703b1b9..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/open_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/save_wiz.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/save_wiz.gif
deleted file mode 100644
index 499dd0ca60..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/save_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/stop_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/stop_obj.gif
deleted file mode 100644
index dc47edf069..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/images/toolbars/stop_obj.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/menus.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/menus.html
deleted file mode 100644
index f7131ec4c7..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/menus.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="reference.html">Reference</a>
-
-<h2>
-IDE Perspective Menus
-</h2>
-
-What follows is a comprehension list of the menu options available within the Systemtap GUI Graphing Perspective.
-
-
-<h3>
-<u>F</u>ile
-</h3>
-<ul>
-<li><b><u>O</u>pen Script Output</b> - This option opens the specified file and reads the contents into the DataTable for use in the Graphing Perspective.<br><img src="images/menu/openbox1.png"><br><br></li>
-<li><b>Save <u>G</u>raph Image</b> - This option saves the graph in the specified file extension format.<br><img src="images/menu/saveoutput.png"><br><br></li>
-<li><b><u>I</u>mport Data Set</b> - This option allows you to load a previously saved set of data obtained from running a SystemTap script. You can proceed from this point as if you had just ran a script and populated the DataTable.<br><img src="images/menu/import.png"><br><br></li>
-<li><b><u>E</u>xport Data Set</b> - This option allows you to save a current data set after you've ran a script in the intention of having someone else look at the user's script results through the tool or for further work done by the user. (Shortcut: Ctrl+X)<br><img src="images/menu/export.png"><br><br></li>
-<li><b><u>P</u>rint</b> - This option prints the graph currently holding the focus. (Shortcut: Crtl+P)</li>
-<li><b>E<u>x</u>it</b> - Exits Systemtap GUI.
-</ul>
-
-<h3>
-<a name="run"><u>R</u>un</a>
-</h3>
-<ul>
-<li><b><u>S</u>top</b> - This option terminates the script thread associated with whichever script currently has the focus. (Shortcut: Ctrl+F9)</li>
-</ul>
-
-<h3>
-<u>W</u>indow
-</h3>
-<ul>
-<li><b>Open in <u>N</u>ew Window</b> - This option opens a new instance of SystemTap GUI.</li>
-<li><b><u>O</u>pen Perspective</b> - This submenu lists each of the available perspectives to open:
-<ul>
-<li>IDE Perspective</li>
-<li>Graphing Perspective</li>
-</ul></li>
-<li><b>Show <u>V</u>iews</b> - This submenus lists each of the available views to open:
-<ul>
-<li>Console</li>
-<li>Error Log</li>
-<li>Functions</li>
-<li>Kernel Source</li>
-<li>Probe Alias</li>
-<li>Other - Lists all views in the application.</li><br><img src="images/menu/viewbox1.png"><br><br>
-</ul></li>
-<li><b><u>P</u>references</b> - Due to the breath of this topic it is covered in another section. Please see <a href="preferences.html">Preferences Help</a>.<br><img src="images/menu/preferencesbox1.png"><br><br></li>
-</ul>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/preferences.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/preferences.html
deleted file mode 100644
index cb8a709681..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/preferences.html
+++ /dev/null
@@ -1,129 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="reference.html">Reference</a>
-
-<h2>
-Preferences
-</h2>
-
-This section details each of the options listed under <b><u>W</u>indow-><u>P</u>references</b>. The Preferences dialog is the dialog used to set user preferences. The Preferences dialog pages can be searched using the filter function. To filter by matching the page title, simply type the name of the page you are seeking and the available pages will be presented below. The filter also searches on keywords such as appearance and java.
-
-<ul>
-<li><b>Logging</b>
-<ul>
-<li><b>Enable logging</b> - This option turns on and off the ability to log data from the console.</li>
-<li><b>Logging level</b> - This dropdown box allows you to select one of our levels of logging.
-<ul>
-<li>Debug - A very large quantity of debug information, difficult to identify what you are looking for but extremely exhaustive.</li>
-<li>Info - Displays most information regarding program execution; the default level.</li>
-<li>Critical - Lists only critical errors duration execution.</li>
-<li>Fatal - Lists only fatal errors during execution.</li>
-</ul>
-</li>
-<li><b>Log to</b> - Specifies where you wish the logging to be written:
-<ul>
-<li>Console - Writes the debug information directly to the console.</li>
-<li>File - Write the debug information to a file.</li>
-</ul>
-<li><b>File</b> - The location of the file that logging sends the debug information to.</li>
-</ul>
-<li><b>SystemTap</b> - This section contains options relevent to SystemTap itself.
-<ul>
-<li><b>Remember window state</b> - Preserves the state of the window on exitting SystemTap GUI.
-<li><b>Dashboard Preferences</b> - Preferences relate to the Dashboard Perspective.
-<ul>
-<li>Additional Modules - Provides for the addition of more modules to the Dashboard. Modules are files containing a SystemTap script and associated metadata.</li>
-</ul>
-<li><b>Environment Variables</b> - Allows the user to set specific values to the following environment variables
-<ul>
-<li>LD_LIBRARY_PATH</li>
-<li>PATH</li>
-<li>SYSTEMTAP_TAPSET</li>
-<li>SYSTEMTAP_RUNTIME</li>
-</ul>
-</li>
-<li><b>Graphing</b> - Preferences related to the Graphing Perspective.
-<ul>
-<li><b><u>R</u>efresh Delay (ms)</b> - Milliseconds in between re-painting the graph.</li>
-<li><b>Data Table</b> - Preferences related to the data table.
-<ul>
-<li><u>J</u>ump to the newest entry - Determines whether the scroll bar maintains its location at the newest entry.</li>
-<li><u>A</u>uto resize columns - Determines whether columns automatically resize to the width of the contents or whether they remain placed when moved.</li>
-<li><u>M</u>ax data items - Maximum number of entries that the table shows, though the table itself may have more not visible.</li>
-</ul>
-</li>
-<li><b>Graph</b> - Preferences related to graphs.
-<ul>
-<li><u>S</u>how grid lines - Turns on and off painting of the grid lines.</li>
-<li><u>V</u>iewable data items - Number of maximum samples plotted at any time.</li>
-</ul>
-</ul>
-<li><b>IDE</b> - Preferences when loading the IDE Perspective.
-<ul>
-<li><b>Use stored tapset trees</b> - Loads the stored tapset trees on initialization.</li>
-<li><b>Editor</b> - Preferences related to the editor.
-<ul>
-<li><u>E</u>ditor Background Color - Sets the color painted in the background of the editor pane.</li>
-<li>Show Line <u>N</u>umbers - Option to turn on and off line numbers in the editor pane.
-<li>Code Assist
-<ul>
-<li><u>U</u>se Code Assist - Turns on and off the option to use Code Assist, which is a method that predicts what you are typing based on existing probe aliasi and opens a window that allows you to scroll down and select and/or continue typing for refined results.</li>
-<li>How Code Assist adds code - Method used in Code Assist.
-<ul>
-<li><u>I</u>nsert - Inserts the selected text directly into the cursor point.</li>
-<li><u>O</u>verwrite - Overwrites as you type.</li>
-</ul>
-</li>
-<li>Activation <u>D</u>elay (requires restart) - Delay in milliseconds before the code assist routines attempts to run.
-<li>Activation <u>T</u>rigger - This is the key that actives Code Assist. For SystemTap GUI it is set to the divider between tapset and probe alias.
-</ul>
-</li>
-<li>Syntax Coloring - These options assign color values to identified types within the .stp and .c editors.
-<ul>
-<li>STP editor
-<ul>
-<li><u>D</u>efault Color - Color of normal code.</li>
-<li><u>K</u>eyword Color - Color of keywords.</li>
-<li><u>E</u>mbedded C Color - Color of embedded C code.</li>
-<li><u>E</u>mbedded Color - Color of embedded code.</li>
-<li><u>C</u>omment Color - Color of comments.</li>
-<li><u>T</u>ype Color - Color of items identified as types.</li>
-<li><u>S</u>tring Color - Color of strings.</li>
-</ul>
-</li>
-<li>C editor
-<ul>
-<li><u>D</u>efault Color - Color of normal code.</li>
-<li><u>K</u>eyword Color - Color of keywords.</li>
-<li><u>P</u>reprocessor Color - Color of preprocessor code.</li>
-<li><u>C</u>omment Color - Color of comments.</li>
-<li><u>T</u>ype Color - Color of items identified as types.</li>
-<li><u>S</u>tring Color - Color of strings.</li>
-</ul>
-</li>
-</ul
-</li>
-<li>Typeing - No options available at this time.</li>
-</ul>
-</li>
-<li><b>Path</b>
-<ul>
-<li><u>K</u>ernel Source Directory - Location of the directory that the kernel source code is pulled from.</li>
-<li>Stap - No options available at this time.
-<ul>
-<li>Tapsets - Preferences related to tapsets.
-<ul>
-<li><u>A</u>dditional Tapsets - Allows you to specify additional tapsets scripts to be added in with every script.</li>
-</ul>
-</li>
-</ul>
-</li>
-</ul>
-</li>
-</ul>
-<li><b>Remote Server</b> - Details regarding the remote machine running the systemtapgui Server
-<ul>
-<li><b>Host Name</b> - IP address of the remote machine</li>
-<li><b>Port</b> - Port used for communication. Default is 22462.</li>
-<li><b>User Name</b> - User name that has sufficient permissions to transfer and run the script on the remote machine. </li>
-<li><b>Password</b> - Password for the above user. </li>
-</ul>
-</ul> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/reference.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/reference.html
deleted file mode 100644
index 4840dbc7d8..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/reference.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<a href="../toc.html">Table of Contents</a > <a href="reference.html">Reference</a>
-
-<h2>
-Reference
-</h2>
-
-This section of the Graphing User Guild is intended to provide the following resources should you have any
-very specific questions regarding the Graphing Perspective in general or one of the options associated with
-it. It also contains example scripts and FAQs.
-
-<ol>
-<li><a href="exampleGraphingScripts.html">Example SystemTap Scripts</a></li>
-<li><a href="frequentlyAskedQuestions.html">Frequently Asked Questions</a></li>
-<li><a href="menus.html">Menus</a></li>
-<li><a href="preferences.html">Preferences</a></li>
-<li><a href="toolbars.html">Toolbars</a></li>
-<li><a href="regex.html">Guide to Regular Expressions</a></li>
-</ol>
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/regex.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/regex.html
deleted file mode 100644
index 8643733fde..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/regex.html
+++ /dev/null
@@ -1,144 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="reference.html">Reference</a>
-
-<h2>
-Regex Reference Page
-</h2>
-
-Regular expressions are used in SystemTap GUI to define how the GUI interprets information that it recieves
-from the script file. If the user wishes to change the regular expression during runtime they may do so by
-selecting <b><u>E</u>dit->Modify <u>P</u>arsing Expression</b>.<br><br>
-
-Basic regex (taken from <a href="http://java.sun.com/j2se/1.5.0/docs/api/">http://java.sun.com/j2se/1.5.0/docs/api/</a> ) -
-
-<pre> Summary of regular-expression constructs
-
-Construct Matches
-
-Characters
-x The character x
-\\ The backslash character
-\0n The character with octal value 0n (0 <= n <= 7)
-\0nn The character with octal value 0nn (0 <= n <= 7)
-\0mnn The character with octal value 0mnn (0 <= m <= 3, 0 <= n <= 7)
-\xhh The character with hexadecimal value 0xhh
-\uhhhh The character with hexadecimal value 0xhhhh
-\t The tab character ('\u0009')
-\n The newline (line feed) character ('\u000A')
-\r The carriage-return character ('\u000D')
-\f The form-feed character ('\u000C')
-\a The alert (bell) character ('\u0007')
-\e The escape character ('\u001B')
-\cx The control character corresponding to x
-
-Character classes
-[abc] a, b, or c (simple class)
-[^abc] Any character except a, b, or c (negation)
-[a-zA-Z] a through z or A through Z, inclusive (range)
-[a-d[m-p]] a through d, or m through p: [a-dm-p] (union)
-[a-z&&[def]] d, e, or f (intersection)
-[a-z&&[^bc]] a through z, except for b and c: [ad-z] (subtraction)
-[a-z&&[^m-p]] a through z, and not m through p: [a-lq-z](subtraction)
-
-Predefined character classes
-. Any character (may or may not match line terminators)
-\d A digit: [0-9]
-\D A non-digit: [^0-9]
-\s A whitespace character: [ \t\n\x0B\f\r]
-\S A non-whitespace character: [^\s]
-\w A word character: [a-zA-Z_0-9]
-\W A non-word character: [^\w]
-
-POSIX character classes (US-ASCII only)
-\p{Lower} A lower-case alphabetic character: [a-z]
-\p{Upper} An upper-case alphabetic character:[A-Z]
-\p{ASCII} All ASCII:[\x00-\x7F]
-\p{Alpha} An alphabetic character:[\p{Lower}\p{Upper}]
-\p{Digit} A decimal digit: [0-9]
-\p{Alnum} An alphanumeric character:[\p{Alpha}\p{Digit}]
-\p{Punct} Punctuation: One of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
-\p{Graph} A visible character: [\p{Alnum}\p{Punct}]
-\p{Print} A printable character: [\p{Graph}\x20]
-\p{Blank} A space or a tab: [ \t]
-\p{Cntrl} A control character: [\x00-\x1F\x7F]
-\p{XDigit} A hexadecimal digit: [0-9a-fA-F]
-\p{Space} A whitespace character: [ \t\n\x0B\f\r]
-
-java.lang.Character classes (simple java character type)
-\p{javaLowerCase} Equivalent to java.lang.Character.isLowerCase()
-\p{javaUpperCase} Equivalent to java.lang.Character.isUpperCase()
-\p{javaWhitespace} Equivalent to java.lang.Character.isWhitespace()
-\p{javaMirrored} Equivalent to java.lang.Character.isMirrored()
-
-Classes for Unicode blocks and categories
-\p{InGreek} A character in the Greek block (simple block)
-\p{Lu} An uppercase letter (simple category)
-\p{Sc} A currency symbol
-\P{InGreek} Any character except one in the Greek block (negation)
-[\p{L}&&[^\p{Lu}]] Any letter except an uppercase letter (subtraction)
-
-Boundary matchers
-^ The beginning of a line
-$ The end of a line
-\b A word boundary
-\B A non-word boundary
-\A The beginning of the input
-\G The end of the previous match
-\Z The end of the input but for the final terminator, if any
-\z The end of the input
-
-Greedy quantifiers
-X? X, once or not at all
-X* X, zero or more times
-X+ X, one or more times
-X{n} X, exactly n times
-X{n,} X, at least n times
-X{n,m} X, at least n but not more than m times
-
-Reluctant quantifiers
-X?? X, once or not at all
-X*? X, zero or more times
-X+? X, one or more times
-X{n}? X, exactly n times
-X{n,}? X, at least n times
-X{n,m}? X, at least n but not more than m times
-
-Possessive quantifiers
-X?+ X, once or not at all
-X*+ X, zero or more times
-X++ X, one or more times
-X{n}+ X, exactly n times
-X{n,}+ X, at least n times
-X{n,m}+ X, at least n but not more than m times
-
-Logical operators
-XY X followed by Y
-X|Y Either X or Y
-(X) X, as a capturing group
-
-Back references
-\n Whatever the nth capturing group matched
-
-Quotation
-\ Nothing, but quotes the following character
-\Q Nothing, but quotes all characters until \E
-\E Nothing, but ends quoting started by \Q
-
-Special constructs (non-capturing)
-(?:X) X, as a non-capturing group
-(?idmsux-idmsux) Nothing, but turns match flags on - off
-(?idmsux-idmsux:X) X, as a non-capturing group with the given flags on - off
-(?=X) X, via zero-width positive lookahead
-(?!X) X, via zero-width negative lookahead
-(?<=X) X, via zero-width positive lookbehind
-(?<!X) X, via zero-width negative lookbehind
-(?>X) X, as an independent, non-capturing group
-Match a position that is not a word boundary.
-</pre>
-
-<br>Information regarding regular expressions can be found all over the Internet. A few examples have been listed
-below:<br><br>
-
-<ul>
-<li><a href="http://www.javascriptkit.com/javatutors/redev.shtml">http://www.javascriptkit.com/javatutors/redev.shtml</a></li>
-<li><a href="http://www.zytrax.com/tech/web/regex.htm">http://www.zytrax.com/tech/web/regex.htm</a></li>
-</ul> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/toolbars.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/toolbars.html
deleted file mode 100644
index d300e7e139..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/reference/toolbars.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="reference.html">Reference</a>
-
-<h2>
-Toolbars
-</h2>
-
-
-SystemTap GUI currently has two toolbars built in; an Action Bar for file and execution operations and a Perspective Selector to jump to different perspectives.
-
-<h3>
-Action Bar
-</h3>
-
-<ul>
-<li><img src="images/toolbars/open_wiz.gif"> <b>Open Script Output</b> - This option opens the specified file and reads the contents into the DataTable for use in the Graphing Perspective.</li>
-<li><img src="images/toolbars/save_wiz.gif"> <b>Save Graph Image</b> - This option saves the graph in the specified file extension format.</li>
-<li><img src="images/toolbars/import_wiz.gif"> <b>Import Data Set</b> - This option allows you to load a previously saved set of data obtained from running a SystemTap script. You can proceed from this point as if you had just ran a script and populated the DataTable.</li>
-<li><img src="images/toolbars/export_wiz.gif"> <b>Export Data Set</b> - This option allows you to save a current data set after you've ran a script in the intention of having someone else look at the user's script results through the tool or for further work done by the user.</li>
-<li><img src="images/toolbars/stop_obj.gif"> <b>Stop Script</b> - This button will stop the currently active script from running.</li>
-</ul>
-
-<h3>
-Perspective Selector
-</h3>
-
-<ul>
-<li><img src="images/toolbars/ide.png"> <b>IDE Perspective</b> - This button brings you into the IDE Perspective, useful for writing and executing scripts.</li>
-<li><img src="images/toolbars/graphing.png"> <b>Graphing Perspective</b> - This button brings you into the Graphing Perspective, useful for graphing scripts.</li>
-</ul>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/tasks/importDataSet.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/tasks/importDataSet.html
deleted file mode 100644
index e1c24d9a72..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/tasks/importDataSet.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="tasks.html">Tasks</a>
-
-<h2>
-Importing/Exporting Data Sets
-</h2>
-
-From time to time the user may want to preserve the script results for continued work at a later date/time or
-to share findings with others. The Importing and Exporting options provide an easy way to do this.
-
-<h3>
-Importing a Data Set
-</h3>
-
-In order to import a Data Set the user must first have one either from running a script or from another
-user. To import the Data Set select <b><u>F</u>ile-><u>I</u>mport Data Set</b>. The user will be prompted with an
-Open File dialogue box. Navigate to the Data Set file you wish to open and select it. Keep in mind Data Set
-files can have any extension type, though the user may want to use .set for consistency.<br><br>
-
-<img src="../reference/images/menu/import.png"><br><br>
-
-<h3>
-Exporting a Data Set
-</h3>
-
-In order to export a Data Set the user must first have a populated DataTable from a previously running script.
-To export the Data Set select <b><u>F</u>ile-><u>E</u>xport Data Set</b>. The user will be prompted with an
-New File dialogue box. Navigate to the location you wish to export the Data Set to and save it. Keep in mind Data Set
-files can have any extension type, though the user may want to use .set for consistency.<br><br>
-
-<img src="../reference/images/menu/export.png"><br><br> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/tasks/makingGraphs.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/tasks/makingGraphs.html
deleted file mode 100644
index d1aa0088b7..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/tasks/makingGraphs.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="tasks.html">Tasks</a>
-
-<h2>
-Making Graphs
-</h2>
-
-In order to graph SystemTap scripts you must have a script open in the IDE Perspective, and the <b><u>R</u>un->Run
-w/ Chart</b> option must be used. If you are unfamiliar with how to load or write a SystemTap script, please
-review the IDE Tutorial in the SystemTap IDE User's Guide.<br><br>
-
-A <a href="../gettingstarted/graphingTutorial.html">tutorial</a> has been written to guide the user through the execution
-and charting of a provided script. Any script can be used however that provides consistent data along with a
-regular expression (regex). For instructions on using regex see our
-<a href="../reference/regex.html">Regex Reference Page</a>.<br><br>
-
-<img src="../concepts/graphTypes/images/multiline.png"> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/tasks/openScriptOutput.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/tasks/openScriptOutput.html
deleted file mode 100644
index e699a63960..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/tasks/openScriptOutput.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="tasks.html">Tasks</a>
-
-<h2>
-Opening Script Output
-</h2>
-
-This option allows the user to open a text file containing the output of a SystemTap script, and to parse it
-as it would real time data from a running script. Select <b><u>F</u>ile-><u>O</u>pen Script Output</b>.
-Navigate to the file you wish to open and select it. The DataTable will populate with the data, at which point
-you can graph the results.<br><br>
-
-<img src="../reference/images/menu/openbox1.png">
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/tasks/savingGraphImage.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/tasks/savingGraphImage.html
deleted file mode 100644
index 73fade531c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/tasks/savingGraphImage.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="tasks.html">Tasks</a>
-
-<h2>
-Saving Graph Images
-</h2>
-
-The Graphics Perspective provides a unique feature to users that allows them to save their graphs in a
-standard image format. In order to do this use the menu option <b><u>F</u>ile->Save <u>G</u>raph Image</b>.
-This opens a dialogue box where the user can navigate to the location they desire to save the image file.<br><br>
-
-<img src="../reference/images/menu/saveoutput.png"> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/tasks/tasks.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/tasks/tasks.html
deleted file mode 100644
index f4adeea8d4..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/tasks/tasks.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<a href="../toc.html">Table of Contents</a>
-
-<h2>
-Tasks
-</h2>
-
-This section of the Graphing User Guild is intended to provide help pages for common tasks that the user may
-wish to perform in the Graphics Perspective.
-
-<ol>
-<li><a href="importDataSet.html">Importing/Exporting Data Sets</a></li>
-<li><a href="makingGraphs.html">Making Graphs</a></li>
-<li><a href="openScriptOutput.html">Opening Script Output</a></li>
-<li><a href="savingGraphImage.html">Saving a Graph Image</a></li>
-</ol>
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/toc.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/toc.html
deleted file mode 100644
index 925c8a4823..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/html/toc.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Table of Contents</title>
-</head>
-
-<body>
-<h1>Table of Contents</h1>
-
-Welcome to SystemTap GUI help pages. Here you will find wide selection of help pages covering the Graphics
-Perspective of SystemTap GUI.
-
-<ol>
-
-<li><a href="gettingstarted/gettingStarted.html">Getting Started</a>
-<ol>
-<li><a href="gettingstarted/introduction.html">Introduction</a></li>
-<li><a href="gettingstarted/graphingTutorial.html">Graphing Tutorial</a></li>
-</ol>
-</li>
-
-<li><a href="concepts/concepts.html">Concepts</a></li>
-<ol>
-<li><a href="concepts/dataTable.html">DataTable</a></li>
-<li><a href="concepts/graphTypes.html">Graph Types</a>
-<ul>
-<li><a href="concepts/graphTypes/barGraph.html">Bar Graph</a></li>
-<li><a href="concepts/graphTypes/multiBarGraph.html">Multi-Bar Graph</a></li>
-<li><a href="concepts/graphTypes/lineGraph.html">Line Graph</a></li>
-<li><a href="concepts/graphTypes/multiLineGraph.html">Multi-Line Graph</a></li>
-<li><a href="concepts/graphTypes/scatterGraph.html">Scatter Graph</a></li>
-<li><a href="concepts/graphTypes/multiScatterGraph.html">Multi-Scatter Graph</a></li>
-</ul>
-</li>
-<li><a href="concepts/filters.html">Filters</a></li>
-<li><a href="concepts/graphInteraction.html">Graph Interaction</a></li>
-</ol>
-</li>
-
-<li><a href="tasks/tasks.html">Tasks</a>
-<ol>
-<li><a href="tasks/importDataSet.html">Importing/Exporting Data Sets</a></li>
-<li><a href="tasks/makingGraphs.html">Making Graphs</a></li>
-<li><a href="tasks/openScriptOutput.html">Opening Script Output</a></li>
-<li><a href="tasks/savingGraphImage.html">Saving a Graph Image</a></li>
-</ol>
-</li>
-
-<li><a href="reference/reference.html">Reference</li>
-<ol>
-<li><a href="reference/exampleGraphingScripts.html">Example SystemTap Scripts</a></li>
-<li><a href="reference/frequentlyAskedQuestions.html">Frequently Asked Questions</a></li>
-<li><a href="reference/menus.html">Menus</a></li>
-<li><a href="reference/preferences.html">Preferences</a></li>
-<li><a href="reference/toolbars.html">Toolbars</a></li>
-<li><a href="reference/regex.html">Guide to Regular Expressions</a></li>
-</ol>
-</body>
-</html> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/tocconcepts.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/tocconcepts.xml
deleted file mode 100644
index 25abcb96cd..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/tocconcepts.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-
-<toc label="Concepts" link_to="toc.xml#concepts">
- <topic label="DataTable" href="documentation/html/concepts/dataTable.html" />
- <topic label="Graph Types" href="documentation/html/concepts/graphTypes.html" />
-
- <topic label="Line Graph" href="documentation/html/concepts/graphTypes/lineGraph.html" />
- <topic label="Multi-Line Graph" href="documentation/html/concepts/graphTypes/multiLineGraph.html" />
- <topic label="Bar Graph" href="documentation/html/concepts/graphTypes/barGraph.html" />
- <topic label="Multi-Bar Graph" href="documentation/html/concepts/graphTypes/multiBarGraph.html" />
- <topic label="Scatter Graph" href="documentation/html/concepts/graphTypes/scatterGraph.html" />
- <topic label="Multi-Scatter Graph" href="documentation/html/concepts/graphTypes/multiScatterGraph.html" />
-
- <topic label="Filters" href="documentation/html/concepts/filters.html" />
- <topic label="Graph Interaction" href="documentation/html/concepts/graphInteraction.html" />
-</toc>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/tocgettingstarted.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/tocgettingstarted.xml
deleted file mode 100644
index 43f8239efb..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/tocgettingstarted.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-
-<toc label="Getting Started" link_to="toc.xml#gettingstarted">
- <topic label="Introduction" href="documentation/html/gettingstarted/introduction.html" />
- <topic label="Graphing Tutorial" href="documentation/html/gettingstarted/graphingTutorial.html" />
-</toc>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/tocreference.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/tocreference.xml
deleted file mode 100644
index 3ab8f2df69..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/tocreference.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-
-<toc label="Reference" link_to="toc.xml#reference">
- <topic label="Example Graphing Scripts" href="documentation/html/reference/exampleGraphingScripts.html" />
- <topic label="Frequently Asked Questions" href="documentation/html/reference/frequentlyAskedQuestions.html" />
- <topic label="Menus" href="documentation/html/reference/menus.html" />
- <topic label="Preferences" href="documentation/html/reference/preferences.html" />
- <topic label="Toolbars" href="documentation/html/reference/toolbars.html" />
- <topic label="Regex" href="documentation/html/reference/regex.html" />
-</toc>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/toctasks.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/toctasks.xml
deleted file mode 100644
index e8ce52f2ad..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/documentation/toctasks.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-
-<toc label="Tasks" link_to="toc.xml#tasks">
- <topic label="Importing/Exporting Data Sets" href="documentation/html/tasks/importDataSet.html" />
- <topic label="Making Graphs" href="documentation/html/tasks/makingGraphs.html" />
- <topic label="Opening Script Output" href="documentation/html/tasks/openScriptOutput.html" />
- <topic label="Saving Graph Images" href="documentation/html/tasks/savingGraphImage.html" />
-</toc>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/actions/export_wiz.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/actions/export_wiz.gif
deleted file mode 100644
index 5a0837d1e4..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/actions/export_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/actions/import_wiz.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/actions/import_wiz.gif
deleted file mode 100644
index d38085ad9c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/actions/import_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/actions/new_wiz.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/actions/new_wiz.gif
deleted file mode 100644
index 7aea894d0b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/actions/new_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/actions/open_wiz.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/actions/open_wiz.gif
deleted file mode 100644
index 51e703b1b9..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/actions/open_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/actions/regEx.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/actions/regEx.gif
deleted file mode 100644
index fc4c9fadd3..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/actions/regEx.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/actions/save_wiz.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/actions/save_wiz.gif
deleted file mode 100644
index 499dd0ca60..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/actions/save_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/graphs/MultiBar.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/graphs/MultiBar.gif
deleted file mode 100644
index b396c353b4..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/graphs/MultiBar.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/graphs/MultiLine.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/graphs/MultiLine.gif
deleted file mode 100644
index 2a09ccf943..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/graphs/MultiLine.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/graphs/MultiScatter.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/graphs/MultiScatter.gif
deleted file mode 100644
index 3542e06835..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/graphs/MultiScatter.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/graphs/SingleBar.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/graphs/SingleBar.gif
deleted file mode 100644
index 186a1168a6..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/graphs/SingleBar.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/graphs/SingleLine.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/graphs/SingleLine.gif
deleted file mode 100644
index 10616b199b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/graphs/SingleLine.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/graphs/SingleScatter.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/graphs/SingleScatter.gif
deleted file mode 100644
index 1416c03e32..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/graphs/SingleScatter.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/perspective_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/perspective_obj.gif
deleted file mode 100644
index 34fb3c9d8c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/perspective_obj.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/views/selector_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/views/selector_obj.gif
deleted file mode 100644
index 34fb3c9d8c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/icons/views/selector_obj.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/plugin.properties
deleted file mode 100644
index 6ef90e8dfb..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/plugin.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-perspective.graphing.name=Graphing
-
-view.graphSelector.name=Graph Selector
-
-preference.graphing.name=Graphing
-
-command.open.name=Open Script Output
-command.open.desc=Open script output file
-command.import.name=Import Data Set
-command.import.desc=Import data set from file
-command.export.name=Export Data Set
-command.export.desc=Export data set to file
-command.save.name=Save Graph
-command.save.desc=Save graph as image
-
-category.file.name=File2
-cateogry.file.desc=File2
-
-actionset.graph.name=Graph Display Action Set
-action.open.name=Open Script Output
-action.open.desc=Open script output file
-action.import.name=Import Data Set
-action.import.name=Import data set from file
-action.export.name=Export Data Set
-action.export.desc=Export data set to file
-action.save.name=Save Graph
-action.save.desc=Save graph as image
-
-actionset.parsing.name=Parsing Action Set
-action.modifyParsing.name=Modify Parsing Expression
-action.modifyParsing.desc=Modify Parsing Expression
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/plugin.xml
deleted file mode 100644
index c73341ca65..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/plugin.xml
+++ /dev/null
@@ -1,174 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="%perspective.graphing.name"
- class="org.eclipse.linuxtools.systemtap.ui.graphing.GraphingPerspective"
- icon="icons/perspective_obj.gif"
- id="org.eclipse.linuxtools.systemtap.ui.graphing.GraphingPerspective"/>
- </extension>
-
- <extension
- point="org.eclipse.ui.views">
- <view
- name="%view.graphSelector.name"
- allowMultiple="false"
- icon="icons/views/selector_obj.gif"
- class="org.eclipse.linuxtools.systemtap.ui.graphing.views.GraphSelectorView"
- id="org.eclipse.linuxtools.systemtap.ui.graphing.views.GraphSelectorView">
- </view>
- </extension>
-
- <extension
- point="org.eclipse.help.toc">
- <toc
- file="toc.xml"
- primary="true"/>
- <toc file="documentation/tocconcepts.xml"/>
- <toc file="documentation/tocgettingstarted.xml"/>
- <toc file="documentation/tocreference.xml"/>
- <toc file="documentation/toctasks.xml"/>
- </extension>
-
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%preference.graphing.name"
- id="com.qualityeclipse.systemtap.prefs.graphing"
- class="org.eclipse.linuxtools.systemtap.ui.graphing.preferences.GraphingPreferencePage"
- category="com.qualityeclipse.systemtap.prefs.view"/>
- </extension>
-
- <extension
- point="org.eclipse.core.runtime.preferences">
- <initializer class="org.eclipse.linuxtools.systemtap.ui.graphing.preferences.PreferenceInitializer"/>
- </extension>
-
- <extension
- point="org.eclipse.ui.commands">
- <command
- name="%command.open.name"
- description="%command.open.desc"
- categoryId="org.eclipse.linuxtools.systemtap.ui.graphing.category.file"
- id="org.eclipse.linuxtools.systemtap.ui.graphing.commands.OpenScriptOutput"/>
- <command
- name="%command.export.name"
- description="%command.export.desc"
- categoryId="org.eclipse.linuxtools.systemtap.ui.graphing.category.file"
- id="org.eclipse.linuxtools.systemtap.ui.graphing.commands.ExportDataSet"/>
- <command
- name="%command.save.name"
- description="%command.save.desc"
- categoryId="org.eclipse.linuxtools.systemtap.ui.graphing.category.file"
- id="org.eclipse.linuxtools.systemtap.ui.graphing.commands.SaveGraphImage"/>
- <command
- name="%command.import.name"
- description="%command.import.desc"
- categoryId="org.eclipse.linuxtools.systemtap.ui.graphing.category.file"
- id="org.eclipse.linuxtools.systemtap.ui.graphing.commands.ImportDataSet"/>
-
- <category
- name="%category.file.name"
- description="%category.file.desc"
- id="org.eclipse.linuxtools.systemtap.ui.graphing.category.file"/>
- <command
- name="%command.modifyParsing.name"
- description="%command.modifyParsing.desc"
- categoryId="org.eclipse.linuxtools.systemtap.ui.graphing.category.edit"
- id="org.eclipse.linuxtools.systemtap.ui.graphing.commands.ModifyParsing"/>
-
- <category
- name="%category.edit.name"
- description="%category.edit.desc"
- id="org.eclipse.linuxtools.systemtap.ui.graphing.category.edit"/>
- </extension>
-
-
- <extension
- point="org.eclipse.ui.actionSets">
- <actionSet
- label="actionset.graph.name"
- visible="false"
- id="org.eclipse.linuxtools.systemtap.ui.graphing.GraphingActionSet">
- <action
- label="%action.save.name"
- tooltip="%action.save.desc"
- id="org.eclipse.linuxtools.systemtap.ui.graphing.actions.SaveGraphImage"
- icon="icons/actions/save_wiz.gif"
- toolbarPath="org.eclipse.ui.workbench.file/save.ext"
- class="org.eclipse.linuxtools.systemtap.ui.graphing.actions.SaveGraphImageAction"
- definitionId="org.eclipse.linuxtools.systemtap.ui.graphing.commands.SaveGraphImage"
- style="push"
- state="false"/>
- <action
- label="%action.export.name"
- tooltip="%action.export.desc"
- id="org.eclipse.linuxtools.systemtap.ui.graphing.actions.ExportDataSet"
- icon="icons/actions/export_wiz.gif"
- toolbarPath="org.eclipse.ui.workbench.file/export.ext"
- class="org.eclipse.linuxtools.systemtap.ui.graphing.actions.ExportDataSetAction"
- definitionId="org.eclipse.linuxtools.systemtap.ui.graphing.commands.ExportDataSet"
- style="push"
- state="false"/>
- <action
- label="%action.import.name"
- tooltip="%action.import.desc"
- id="org.eclipse.linuxtools.systemtap.ui.graphing.actions.ImportDataSet"
- icon="icons/actions/import_wiz.gif"
- toolbarPath="org.eclipse.ui.workbench.file/import.ext"
- class="org.eclipse.linuxtools.systemtap.ui.graphing.actions.ImportDataSetAction"
- definitionId="org.eclipse.linuxtools.systemtap.ui.graphing.commands.ImportDataSet"
- style="push"
- state="false"/>
- <action
- label="%action.open.name"
- tooltip="%action.open.desc"
- id="org.eclipse.linuxtools.systemtap.ui.graphing.actions.OpenScriptOutput"
- icon="icons/actions/open_wiz.gif"
- toolbarPath="org.eclipse.ui.workbench.file/new.ext"
- class="org.eclipse.linuxtools.systemtap.ui.graphing.actions.OpenScriptOutputAction"
- definitionId="org.eclipse.linuxtools.systemtap.ui.graphing.commands.OpenScriptOutput"
- style="push"
- state="false"/>
- </actionSet>
- <actionSet
- label="%actionset.modifyParsing.name"
- visible="false"
- id="org.eclipse.linuxtools.systemtap.ui.graphing.ParsingActionSet">
- <action
- label="%action.modifyParsing.name"
- tooltip="%action.modifyParsing.name"
- id="org.eclipse.linuxtools.systemtap.ui.graphing.actions.ModifyParsingAction"
- icon="icons/actions/regEx.gif"
- toolbarPath="org.eclipse.ui.workbench.file/build.ext"
- menubarPath="edit/edit.ext"
- class="org.eclipse.linuxtools.systemtap.ui.graphing.actions.ModifyParsingAction"
- definitionId="org.eclipse.linuxtools.systemtap.ui.graphing.commands.ModifyParsing"
- style="push"
- state="false"/>
- </actionSet>
-
- </extension>
-
- <extension
- point="org.eclipse.ui.perspectiveExtensions">
- <perspectiveExtension
- targetID="org.eclipse.linuxtools.systemtap.ui.graphing.GraphingPerspective">
- <actionSet id="org.eclipse.linuxtools.systemtap.ui.graphing.GraphingActionSet"/>
- <actionSet id="org.eclipse.linuxtools.systemtap.ui.graphing.ParsingActionSet"/>
- </perspectiveExtension>
- <perspectiveExtension
- targetID="org.eclipse.linuxtools.systemtap.ui.graphing.GraphingPerspective">
-
- <view
- ratio="0.60f"
- relative="org.eclipse.linuxtools.systemtap.ui.graphing.views.GraphSelectorView"
- relationship="top"
- id="org.eclipse.linuxtools.systemtap.ui.graphing.views.GraphSelectorView"/>
- <viewShortcut id="org.eclipse.linuxtools.systemtap.ui.graphing.views.GraphSelectorView"/>
-
- </perspectiveExtension>
- </extension>
-</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/GraphingConstants.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/GraphingConstants.java
deleted file mode 100644
index 0fb671b35c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/GraphingConstants.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphing;
-
-import java.io.File;
-
-import org.eclipse.linuxtools.systemtap.ui.systemtapgui.SystemTapGUISettings;
-
-
-
-public final class GraphingConstants {
- private static final String dataSetFileName = "/GraphSettings.xml";
- public static final File DataSetMetaData = new File(SystemTapGUISettings.settingsFolder.getAbsolutePath() + dataSetFileName);
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/GraphingPerspective.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/GraphingPerspective.java
deleted file mode 100644
index f4faa4bbc8..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/GraphingPerspective.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphing;
-
-import org.eclipse.linuxtools.systemtap.ui.graphing.views.GraphSelectorView;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-
-
-
-/**
- * The <code>GraphingPerspective</code> class defines the layout of the Graphing perspective
- * in the application.
- * @see org.eclipse.ui.IPerspectiveFactory
- * @author Ryan Morse
- */
-public class GraphingPerspective implements IPerspectiveFactory {
- public static String ID = "org.eclipse.linuxtools.systemtap.ui.graphing.GraphingPerspective";
-
- public void createInitialLayout(IPageLayout layout) {
- LogManager.logDebug("Start createInitialLayout: layout-" + layout, this);
- LogManager.logInfo("Initializing", this);
- String editorArea = layout.getEditorArea();
- layout.setEditorAreaVisible(false);
-
- layout.addStandaloneView(GraphSelectorView.ID, false, IPageLayout.TOP, .75f, editorArea);
-
- layout.getViewLayout(GraphSelectorView.ID).setCloseable(false);
-
- //Add all perspectives to the MainMenu. Window->Show View
- layout.addShowViewShortcut(GraphSelectorView.ID);
-
- //Add a link to the perspective in the MainMenu. Window->Open Perspective
- layout.addPerspectiveShortcut(ID);
-
- LogManager.logDebug("End createInitialLayout:", this);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/actions/ExportDataSetAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/actions/ExportDataSetAction.java
deleted file mode 100644
index f7ce968532..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/actions/ExportDataSetAction.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphing.actions;
-
-import java.io.File;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.linuxtools.systemtap.ui.graphing.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.graphing.structures.GraphDisplaySet;
-import org.eclipse.linuxtools.systemtap.ui.graphing.views.GraphSelectorView;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSet;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.linuxtools.systemtap.ui.structures.listeners.ITabListener;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.PlatformUI;
-
-
-
-/**
- * This action handles exporting all of the data that was collected for the DataSet. It
- * exports everything as a table, that can easily be read back in at a later time.
- * @author Ryan Morse
- */
-public class ExportDataSetAction extends Action implements IWorkbenchWindowActionDelegate {
- public void init(IWorkbenchWindow window) {
- LogManager.logDebug("Start ExportDataSetAction.init", this);
- LogManager.logInfo("Initialize ExportDataSetAction", this);
- fWindow = window;
- LogManager.logDebug("End ExportDataSetAction.init", this);
- }
-
- /**
- * This is the main method of the action. It handles getting the active dataset,
- * and then saving it to a file that can be accessed later.
- * @param act The action that fired this method.
- */
- public void run(IAction act) {
- LogManager.logDebug("Start ExportDataSetAction.run", this);
- File f = null;
- IDataSet data = getDataSet();
-
- if(null != data)
- f = getFile();
-
- if(f != null && data != null)
- data.writeToFile(f);
- LogManager.logDebug("End ExportDataSetAction.run", this);
- }
-
- /**
- * This method retreives the active <code>DataSet</code> from the <code>GraphSelectorView</code>. If no
- * DataSet is active it will return null.
- * @return The IDataSet in tha active display set.
- */
- public IDataSet getDataSet() {
- LogManager.logDebug("Start ExportDataSetAction.getDataSet", this);
- IViewPart ivp = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(GraphSelectorView.ID);
- IDataSet data = null;
- GraphDisplaySet gds = ((GraphSelectorView)ivp).getActiveDisplaySet();
- if(null != gds)
- data = gds.getDataSet();
- LogManager.logDebug("End ExportDataSetAction.getDataSet", this);
- return data;
- }
-
- /**
- * This method will display a dialog box for the user to select a
- * location to save the graph image.
- * @return The File selected to save the image to.
- */
- public File getFile() {
- LogManager.logDebug("Start ExportDataSetAction.getFile", this);
- String path = null;
- FileDialog dialog= new FileDialog(fWindow.getShell(), SWT.SAVE);
- dialog.setText(Localization.getString("ExportDataSetAction.NewFile"));
-
- path = dialog.open();
-
- if(null == path)
- return null;
-
- LogManager.logDebug("End ExportDataSetAction.getFile", this);
- return new File(path);
- }
-
- public void selectionChanged(IAction a, ISelection s) {
- action = a;
- setEnablement(false);
- buildEnablementChecks();
- }
-
- /**
- * This method is used to generate the checks to see it this button
- * should be enabled or not.
- */
- private void buildEnablementChecks() {
- IViewPart ivp = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(GraphSelectorView.ID);
- if(null != ivp) {
- final GraphSelectorView gsv = (GraphSelectorView)ivp;
- setEnablement(null != gsv.getActiveDisplaySet());
- gsv.addTabListener(new ITabListener() {
- public void tabClosed() {
- setEnablement(null != gsv.getActiveDisplaySet());
- }
-
- public void tabOpened() {
- setEnablement(true);
- }
-
- public void tabChanged() {}
- });
- }
- }
-
- private void setEnablement(boolean enable) {
- action.setEnabled(enable);
- }
-
- /**
- * Removes all internal references in this class. Nothing should make any references
- * to anyting in this class after calling the dispose method.
- */
- public void dispose() {
- LogManager.logDebug("Start ExportDataSetAction.dispose", this);
- LogManager.logInfo("Dispose ExportDataSetAction", this);
- fWindow = null;
- action = null;
- LogManager.logDebug("End ExportDataSetAction.dispose", this);
- }
-
- private IWorkbenchWindow fWindow;
- private IAction action;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/actions/ImportDataSetAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/actions/ImportDataSetAction.java
deleted file mode 100644
index b181a13349..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/actions/ImportDataSetAction.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphing.actions;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.linuxtools.systemtap.ui.graphing.GraphingPerspective;
-import org.eclipse.linuxtools.systemtap.ui.graphing.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.graphing.views.GraphSelectorView;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.dataset.DataSetFactory;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.WorkbenchException;
-
-
-
-/**
- * This action is designed to open up an exported <code>DataSet</code> from the graphing.
- * It allows users to bring up data from previous runs of stap so they can
- * see old data. Importing DataSets is no different then a script live and getting data.
- * @author Ryan Morse
- */
-public class ImportDataSetAction extends Action implements IWorkbenchWindowActionDelegate {
- public void init(IWorkbenchWindow window) {
- LogManager.logDebug("Start ImportDataSetAction.init", this);
- LogManager.logDebug("Initializing", this);
- fWindow = window;
- LogManager.logDebug("End ImportDataSetAction.init", this);
- }
-
- /**
- * This is the main method of the action. It handles prompting the user
- * for a file that contans an exported DataSet. Then, it will generate
- * a new <code>DataSet</code> to hold all of the data.
- * @param act The action that fired this method.
- */
- public void run(IAction act) {
- LogManager.logDebug("Start ImportDataSetAction.run", this);
- //Get the file
- FileDialog dialog= new FileDialog(fWindow.getShell(), SWT.OPEN);
- dialog.setText(Localization.getString("ImportDataSetAction.OpenDataSetFile"));
- String fileName = dialog.open();
-
- File f = null;
-
- if(null == fileName || fileName.length() <= 0)
- return;
-
- f = new File(fileName);
-
- if(!f.exists() || !f.canRead())
- return;
-
- //Create a new DataSet
- IDataSet dataSet = readFile(f);
-
- if(null == dataSet) {
- displayError(Localization.getString("ImportDataSetAction.ErrorReadingDataSet"));
- return;
- }
-
- //Create a new script set
- try {
- IWorkbenchPage p = PlatformUI.getWorkbench().showPerspective(GraphingPerspective.ID, PlatformUI.getWorkbench().getActiveWorkbenchWindow());
- IViewPart ivp = p.findView(GraphSelectorView.ID);
- ((GraphSelectorView)ivp).createScriptSet(fileName, dataSet);
- } catch(WorkbenchException we) {
- LogManager.logCritical("WorkbenchException ImportDataSetAction.run:" + we.getMessage(), this);
- }
- LogManager.logDebug("End ImportDataSetAction.run", this);
- }
-
- public void selectionChanged(IAction a, ISelection s) {}
-
- /**
- * Read the contents of the file into a new DataSet
- * @param f The file that was selected to read a DataSet from
- * @return The newly created DataSet containing the data from the file.
- */
- private IDataSet readFile(File f) {
- LogManager.logDebug("Start ImportDataSetAction.readFile", this);
- IDataSet data;
-
- readHeader(f);
- if(null == labels || null == id)
- return null;
-
- data = DataSetFactory.createFilteredDataSet(id, labels);
- data.readFromFile(f);
-
- LogManager.logDebug("End ImportDataSetAction.readFile", this);
- return data;
- }
-
- /**
- * This method will read out the labels and DataSet type from the file
- * @param f The file that was selected for reading.
- * @return An array of all of the labels found in the file
- */
- private void readHeader(File f) {
- LogManager.logDebug("Start ImportDataSetAction.readLabels", this);
-
- try {
- FileReader fr = new FileReader(f);
- BufferedReader br = new BufferedReader(fr);
-
- id = br.readLine();
-
- String line = br.readLine();
- labels = line.split(", ");
- } catch(FileNotFoundException fnfe) {
- LogManager.logCritical("FileNotFoundException ImportDataSetAction.readLabels:" + fnfe.getMessage(), this);
- } catch(IOException ioe) {
- LogManager.logCritical("IOException ImportDataSetAction.readLabels:" + ioe.getMessage(), this);
- }
-
- LogManager.logDebug("End ImportDataSetAction.readLabels", this);
- }
-
- private void displayError(String message) {
- LogManager.logInfo("Initializing", MessageDialog.class);
- MessageDialog.openWarning(fWindow.getShell(), Localization.getString("ImportDataSetAction.Problem"), message);
- LogManager.logInfo("Disposing", MessageDialog.class);
- }
-
- public void dispose() {
- LogManager.logDebug("Start ImportDataSetAction.dispose", this);
- LogManager.logInfo("Disposing", this);
- fWindow = null;
- LogManager.logDebug("End ImportDataSetAction.dispose", this);
- }
-
- private IWorkbenchWindow fWindow;
- private String id;
- private String[] labels;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/actions/ModifyParsingAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/actions/ModifyParsingAction.java
deleted file mode 100644
index 2c246742dc..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/actions/ModifyParsingAction.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphing.actions;
-
-import java.util.ArrayList;
-
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.actions.ConsoleAction;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ScriptConsole;
-import org.eclipse.linuxtools.systemtap.ui.editor.PathEditorInput;
-import org.eclipse.linuxtools.systemtap.ui.graphing.GraphingConstants;
-import org.eclipse.linuxtools.systemtap.ui.graphing.GraphingPerspective;
-import org.eclipse.linuxtools.systemtap.ui.graphing.views.GraphSelectorView;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSetParser;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.ChartStreamDaemon;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.ChartStreamDaemon2;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.dataset.DataSetWizard;
-import org.eclipse.linuxtools.systemtap.ui.structures.runnable.LoggedCommand;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.WorkbenchException;
-
-
-
-
-/**
- * The action to allow users to change the parsing expression while a script is activly running.
- * @author Ryan Morse
- */
-public class ModifyParsingAction extends ConsoleAction implements IWorkbenchWindowActionDelegate {
- /**
- * Prompts the user for a new regular expression to use in parsing the stap output for
- * the <code>DataSet</code>. If the user enters a new parsing expression then it will
- * get the active <code>ScriptConsole</code> and from that the active <code>LoggedCommand</code>.
- * Finally, it will dispose of the old <code>ChartStreamDaemon2</code> and add an new
- * one in its place.
- */
- public void run() {
- DataSetWizard wizard = new DataSetWizard(GraphingConstants.DataSetMetaData, getFilePath());
- IWorkbench workbench = PlatformUI.getWorkbench();
- wizard.init(workbench, null);
- WizardDialog dialog = new WizardDialog(workbench.getActiveWorkbenchWindow().getShell(), wizard);
- dialog.create();
- dialog.open();
-
- IDataSetParser parser = wizard.getParser();
- IDataSet dataSet = wizard.getDataSet();
-
- if(null != parser && null != dataSet) {
- ScriptConsole console = super.getActive();
- LoggedCommand cmd = console.getCommand();
-
- ArrayList<?> listeners = cmd.getInputStreamListeners();
- ChartStreamDaemon2 daemon = null;
- if(null != listeners) {
- for(int i=0; i<listeners.size(); i++) {
- if(listeners.get(i) instanceof ChartStreamDaemon) {
- daemon = (ChartStreamDaemon2)listeners.get(i);
- break;
- }
- }
- }
- if(null == daemon) {
- daemon = new ChartStreamDaemon2(console, dataSet, parser);
- cmd.addInputStreamListener(daemon);
- } else
- daemon.setParser(dataSet, parser);
-
- IViewPart ivp = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(GraphSelectorView.ID);
- GraphSelectorView graphSelector = ((GraphSelectorView)ivp);
- String name = console.getName();
- graphSelector.createScriptSet(name.substring(name.lastIndexOf('/')+1), dataSet);
- }
-
- wizard.dispose();
- }
-
- /**
- * Gets the file location of the file open in the editor window.
- * @return The path of the file in the active editor window.
- */
- private String getFilePath() {
- try {
- IWorkbenchPage p = PlatformUI.getWorkbench().showPerspective("org.eclipse.linuxtools.systemtap.ui.ide.IDEPerspective", PlatformUI.getWorkbench().getActiveWorkbenchWindow());
- IEditorPart ed = p.getActiveEditor();
- PlatformUI.getWorkbench().showPerspective(GraphingPerspective.ID, PlatformUI.getWorkbench().getActiveWorkbenchWindow());
- return ((PathEditorInput)ed.getEditorInput()).getPath().toString();
- } catch(WorkbenchException we) {}
- return null;
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/actions/OpenScriptOutputAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/actions/OpenScriptOutputAction.java
deleted file mode 100644
index d011363901..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/actions/OpenScriptOutputAction.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphing.actions;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.linuxtools.systemtap.ui.graphing.GraphingConstants;
-import org.eclipse.linuxtools.systemtap.ui.graphing.GraphingPerspective;
-import org.eclipse.linuxtools.systemtap.ui.graphing.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.graphing.views.GraphSelectorView;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataEntry;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSetParser;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.dataset.DataSetWizard;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.WorkbenchException;
-
-
-
-/**
- * This action is designed to open up the raw script output from a stap command.
- * It will act just like the user is running a script with graphing, but will
- * not cause update events.
- * @author Ryan Morse
- */
-public class OpenScriptOutputAction extends Action implements IWorkbenchWindowActionDelegate {
- public void init(IWorkbenchWindow window) {
- LogManager.logDebug("Start OpenScriptOutputAction.init", this);
- LogManager.logDebug("Initializing", this);
- fWindow = window;
- LogManager.logDebug("End OpenScriptOutputAction.init", this);
- }
-
- /**
- * This is the main method of the action. It handles prompting the user
- * for a file that they want to graph. Then prompts the user to select a
- * parsing expression to use to break the table into tabular output. Finally,
- * it will generate a new <code>DataSet</code> to hold all of the data.
- * @param act The action that fired this method.
- */
- public void run(IAction act) {
- LogManager.logDebug("Start OpenScriptOutputAction.run", this);
-
- File f = queryFile();
-
- if(null == f) {
- } else if(!f.exists()) {
- displayError(Localization.getString("OpenScriptOutputAction.SelectedFileDNE"));
- } else if(!f.canRead()) {
- displayError(Localization.getString("OpenScriptOutputAction.SelectedFileCanNotRead"));
- } else {
- //Get the file from the user
- StringBuilder sb = new StringBuilder();
- readFile(f, sb);
- if(getChartingOptions(f.getAbsolutePath())) {
- IDataEntry output;
- while(true) {
- output = parser.parse(sb);
- if(null != output)
- dataSet.setData(output);
- else
- break;
- }
-
- try {
- IWorkbenchPage p = PlatformUI.getWorkbench().showPerspective(GraphingPerspective.ID, PlatformUI.getWorkbench().getActiveWorkbenchWindow());
- IViewPart ivp = p.findView(GraphSelectorView.ID);
- ((GraphSelectorView)ivp).createScriptSet(f.getName(), dataSet);
- } catch(WorkbenchException we) {
- LogManager.logCritical("WorkbenchException OpenScriptOutputAction.run:" + we.getMessage(), this);
- }
- }
- }
-
- LogManager.logDebug("End OpenScriptOutputAction.run", this);
- }
-
-
- /**
- * This method will display a dialog box for the user to select a
- * location to open a file from.
- * @return The File selected to open.
- */
- private File queryFile() {
- LogManager.logDebug("Start queryFile:", this);
- FileDialog dialog= new FileDialog(fWindow.getShell(), SWT.OPEN);
- dialog.setText(Localization.getString("OpenScriptOutputAction.OpenFile"));
- String path= dialog.open();
- if (path != null && path.length() > 0) {
- LogManager.logDebug("queryFile: returnVal-" + path, this);
- return new File(path);
- }
- LogManager.logDebug("queryFile: returnVal-null", this);
- return null;
- }
-
- /**
- * This method will display the error message to the user in the case
- * that something went wrong.
- * @param message The message that should be shown in the error dialog.
- */
- private void displayError(String message) {
- LogManager.logDebug("Start OpenScriptOutputAction.displayError", this);
- LogManager.logInfo("Initializing", MessageDialog.class);
- MessageDialog.openWarning(fWindow.getShell(), Localization.getString("OpenScriptOutputAction.Problem"), message);
- LogManager.logInfo("Disposing", MessageDialog.class);
- LogManager.logDebug("End OpenScriptOutputAction.displayError", this);
- }
-
- /**
- * This method will read the contents of the provided file and
- * add the contents to the provided StringBuilder.
- * @param f The file that will be opened for reading
- * @param sb The StringBuilder to store the contents of the file
- */
- private void readFile(File f, StringBuilder sb) {
- LogManager.logDebug("Start ImportDataSetAction.readData", this);
- try {
- FileReader fr = new FileReader(f);
- BufferedReader br = new BufferedReader(fr);
-
- String line;
- while(null != (line=br.readLine())) {
- sb.append(line);
- }
- } catch(FileNotFoundException fnfe) {
- fnfe.printStackTrace();
- LogManager.logCritical("FileNotFoundException ImportDataSetAction.readData:" + fnfe.getMessage(), this);
- } catch(IOException ioe) {
- ioe.printStackTrace();
- LogManager.logCritical("IOException ImportDataSetAction.readData:" + ioe.getMessage(), this);
- }
- LogManager.logDebug("End ImportDataSetAction.readData", this);
- }
-
- /**
- * This method will get all of the parsing information from the user.
- * @param filePath The location of the file to be opened.
- * @return boolean representing whether or not it was successful
- */
- protected boolean getChartingOptions(String filePath) {
- DataSetWizard wizard = new DataSetWizard(GraphingConstants.DataSetMetaData, filePath);
- IWorkbench workbench = PlatformUI.getWorkbench();
- wizard.init(workbench, null);
- WizardDialog dialog = new WizardDialog(workbench.getActiveWorkbenchWindow().getShell(), wizard);
- dialog.create();
- dialog.open();
-
- parser = wizard.getParser();
- dataSet = wizard.getDataSet();
-
- wizard.dispose();
- return(null != parser && null != dataSet);
- }
-
- public void selectionChanged(IAction a, ISelection s) {
- }
-
- /**
- * Removes all internal references in this class. Nothing should make any references
- * to anyting in this class after calling the dispose method.
- */
- public void dispose() {
- LogManager.logDebug("Start OpenScriptOutputAction.dispose", this);
- LogManager.logInfo("Disposing", this);
- fWindow = null;
- parser = null;
- LogManager.logDebug("End OpenScriptOutputAction.dispose", this);
- }
-
- private IWorkbenchWindow fWindow;
- private IDataSet dataSet;
- private IDataSetParser parser;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/actions/SaveGraphImageAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/actions/SaveGraphImageAction.java
deleted file mode 100644
index 1d88bce6cc..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/actions/SaveGraphImageAction.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphing.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.linuxtools.systemtap.ui.graphing.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.graphing.structures.GraphDisplaySet;
-import org.eclipse.linuxtools.systemtap.ui.graphing.views.GraphSelectorView;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs.IGraph;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.widgets.GraphCanvas;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.linuxtools.systemtap.ui.structures.listeners.ITabListener;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.SWTException;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.ImageLoader;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.PlatformUI;
-
-
-
-/**
- * This action is designed to allow for saving of the graph in the active window.
- * It will let the user select the location to save the image, and then save it as
- * a jpg image.
- * @author Ryan Morse
- */
-public class SaveGraphImageAction extends Action implements IWorkbenchWindowActionDelegate {
- public void init(IWorkbenchWindow window) {
- fWindow = window;
- }
-
- /**
- * This is the main method of the action. It handles getting the active graph,
- * prompting the user for a location to save the image to, and then actually doing
- * the save.
- * @param act The action that fired this method.
- */
- public void run(IAction act) {
- LogManager.logDebug("Start run", this);
- IGraph g = getGraph();
- try {
- PlatformUI.getWorkbench().getDisplay().update();
- } catch(SWTException swte) {
- LogManager.logCritical("SWTException SaveGraphImageAction.run:" + swte.getMessage(), this);
- }
- if(null == g) {
- displayError(Localization.getString("SaveGraphImageAction.CanNotGetGraph"));
- return;
- }
-
- ImageData image = getImage(g);
- if(null == image) {
- displayError(Localization.getString("SaveGraphImageAction.CanNotCreateImage"));
- return;
- }
-
- String path = getFile();
- if(null == path)
- return;
-
- save(image, path);
- LogManager.logDebug("End run", this);
- }
-
- /**
- * This method retreives the active graph from the GraphSelectorView. If no
- * graph is active it will return null.
- * @return The IGraph in tha active display set.
- */
- public IGraph getGraph() {
- LogManager.logDebug("Start getGraph", this);
- IViewPart ivp = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(GraphSelectorView.ID);
- IGraph g = null;
-
- GraphDisplaySet gds = ((GraphSelectorView)ivp).getActiveDisplaySet();
- if(null != gds)
- g = gds.getActiveGraph();
- LogManager.logDebug("End getGraph", this);
- return g;
- }
-
- /**
- * This method converts the Graph into an actual image.
- * @param g The graph that needs to be converted to an image
- * @return The Image that was generated by the supplied Graph.
- */
- public ImageData getImage(IGraph g) {
- LogManager.logDebug("Start getImage", this);
- GraphCanvas canvas = (GraphCanvas)g;
- GC gc = new GC(canvas);
- Image image = new Image(canvas.getDisplay(), canvas.getSize().x, canvas.getSize().y);
- gc.copyArea(image, 0, 0);
- gc.dispose();
-
- ImageData data = image.getImageData();
- image.dispose();
- LogManager.logDebug("End getImage", this);
- return data;
- }
-
- /**
- * This method will display a dialog box for the user to select a
- * location to save the graph image.
- * @return The String location selected to save the image to.
- */
- public String getFile() {
- LogManager.logDebug("Start getFile", this); //$NON-NLS-1$
- FileDialog dialog= new FileDialog(fWindow.getShell(), SWT.SAVE);
- dialog.setText(Localization.getString("SaveGraphImageAction.NewFile"));
-
- LogManager.logInfo("Init FileDialog", dialog);
- LogManager.logDebug("End getFile", this);
- return dialog.open();
- }
-
- /**
- * This method will perform the save operation to store the generated
- * image as an image file on the computer
- * @param image The image data generated from the graph
- * @param path The location to create the new file in and save to.
- */
- public void save(ImageData image, String path) {
- LogManager.logDebug("Start save", this);
-
- ImageLoader loader = new ImageLoader();
- loader.data = new ImageData[] {image};
- loader.save(path, SWT.IMAGE_JPEG);
-
- LogManager.logDebug("End save", this);
- }
-
- /**
- * This method will display the error message to the user in the case
- * that something went wrong.
- * @param message The message that should be shown in the error dialog.
- */
- private void displayError(String message) {
- LogManager.logInfo("Initializing", MessageDialog.class);
- MessageDialog.openWarning(fWindow.getShell(), Localization.getString("SaveGraphImageAction.Problem"), message);
- LogManager.logInfo("Disposing", MessageDialog.class);
- }
-
- /**
- * This method is used to generate the checks to see it this button
- * should be enabled or not.
- */
- public void selectionChanged(IAction a, ISelection s) {
- action = a;
- setEnablement(false);
- buildEnablementChecks();
- }
-
- /**
- * This method is used to generate the checks to see it this button
- * should be enabled or not.
- */
- private void buildEnablementChecks() {
- IViewPart ivp = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(GraphSelectorView.ID);
- if(null != ivp) {
- final GraphSelectorView gsv = (GraphSelectorView)ivp;
- gsv.addTabListener(new ITabListener() {
- public void tabClosed() {
- if(null == gsv.getActiveDisplaySet() || null == gsv.getActiveDisplaySet().getActiveGraph())
- setEnablement(false);
- }
-
- public void tabOpened() {
- gsv.getActiveDisplaySet().addTabListener(new ITabListener() {
- public void tabClosed() {
- if(null == gsv.getActiveDisplaySet().getActiveGraph())
- setEnablement(false);
- }
-
- public void tabOpened() {
- if(null != gsv.getActiveDisplaySet().getActiveGraph())
- setEnablement(true);
- }
-
- public void tabChanged() {
- if(null == gsv.getActiveDisplaySet() || null == gsv.getActiveDisplaySet().getActiveGraph())
- setEnablement(false);
- else
- setEnablement(true);
- }
- });
- }
-
- public void tabChanged() {
- if(null == gsv.getActiveDisplaySet() || null == gsv.getActiveDisplaySet().getActiveGraph())
- setEnablement(false);
- else
- setEnablement(true);
- }
- });
- }
- }
-
- private void setEnablement(boolean enable) {
- action.setEnabled(enable);
- }
-
- /**
- * Removes all internal references in this class. Nothing should make any references
- * to anyting in this class after calling the dispose method.
- */
- public void dispose() {
- LogManager.logInfo("Start dispose", this);
- LogManager.logInfo("Disposing", MessageDialog.class);
- fWindow = null;
- action = null;
- LogManager.logDebug("End dispose", this);
- }
-
- private IWorkbenchWindow fWindow;
- private IAction action;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/internal/GraphingPlugin.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/internal/GraphingPlugin.java
deleted file mode 100644
index 4cc210b09e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/internal/GraphingPlugin.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphing.internal;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class GraphingPlugin extends AbstractUIPlugin {
-
- //The shared instance.
- private static GraphingPlugin plugin;
-
- /**
- * The constructor.
- */
- public GraphingPlugin() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static GraphingPlugin 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 AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.linuxtools.systemtap.ui.graphing", path);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/internal/Localization.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/internal/Localization.java
deleted file mode 100644
index 7525e5f791..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/internal/Localization.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.graphing.internal;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Localization {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.systemtap.ui.graphing.internal.localization";
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- private Localization() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/internal/localization.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/internal/localization.properties
deleted file mode 100644
index 75ee813387..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/internal/localization.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-ExportDataSetAction.NewFile=New File
-
-ImportDataSetAction.OpenDataSetFile=Open DataSet File
-ImportDataSetAction.ErrorReadingDataSet=Error reading the selected dataset.
-ImportDataSetAction.Problem=Problem
-
-OpenScriptOutputAction.SelectedFileDNE=Selected file does not exist\!
-OpenScriptOutputAction.SelectedFileCanNotRead=Selected file can not be read\!
-OpenScriptOutputAction.OpenFile=Open File
-OpenScriptOutputAction.Problem=Problem
-
-SaveGraphImageAction.CanNotGetGraph=Can't get active graph.
-SaveGraphImageAction.CanNotCreateImage=Can't create image
-SaveGraphImageAction.NewFile=New File
-SaveGraphImageAction.Problem=Problem
-
-GraphingPreferencePage.GraphDisplayPreferences=Basic preferences for graph display.
-GraphingPreferencePage.RefreshDelay=&Refresh delay (ms):
-
-GraphDisplaySet.DataView=Data View
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/preferences/DataTablePreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/preferences/DataTablePreferencePage.java
deleted file mode 100644
index eb90cf2ac4..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/preferences/DataTablePreferencePage.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphing.preferences;
-
-import org.eclipse.jface.preference.BooleanFieldEditor;
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.jface.preference.IntegerFieldEditor;
-import org.eclipse.linuxtools.systemtap.ui.graphing.internal.GraphingPlugin;
-import org.eclipse.linuxtools.systemtap.ui.graphing.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.preferences.GraphingAPIPreferenceConstants;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-
-
-public class DataTablePreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
- public DataTablePreferencePage() {
- super(GRID);
- LogManager.logDebug("Start DataTablePreferencePage:", this);
- //setPreferenceStore(GraphingAPIUIPlugin.getDefault().getPreferenceStore());
- setPreferenceStore(GraphingPlugin.getDefault().getPreferenceStore());
- setDescription(Localization.getString("DataTablePreferencePage.GraphDisplayPreferences"));
- LogManager.logDebug("End DataTablePreferencePage:", this);
- }
-
- public void createFieldEditors() {
- LogManager.logDebug("Start createFieldEditors:", this);
-
- addField(new BooleanFieldEditor(
- GraphingAPIPreferenceConstants.P_JUMP_NEW_TABLE_ENTRY,
- Localization.getString("DataTablePreferencePage.JumpNewestEntry"),
- getFieldEditorParent()));
-
- addField(new BooleanFieldEditor(
- GraphingAPIPreferenceConstants.P_AUTO_RESIZE,
- Localization.getString("DataTablePreferencePage.AutoResizeColumns"),
- getFieldEditorParent()));
-
- addField(
- new IntegerFieldEditor(
- GraphingAPIPreferenceConstants.P_MAX_DATA_ITEMS,
- Localization.getString("DataTablePreferencePage.MaxDataItems"),
- getFieldEditorParent()));
-
- LogManager.logDebug("End createFieldEditors:", this);
- }
-
- public void init(IWorkbench workbench) {
- LogManager.logDebug("Start init:", this);
- LogManager.logInfo("Initializing", this);
- LogManager.logDebug("End init:", this);
- }
-
- public void dispose() {
- LogManager.logDebug("Start dispose:", this);
- LogManager.logInfo("Disposing", this);
- super.dispose();
- LogManager.logDebug("End dispose:", this);
- }
-}
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/preferences/GraphPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/preferences/GraphPreferencePage.java
deleted file mode 100644
index ce88e48916..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/preferences/GraphPreferencePage.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphing.preferences;
-
-import org.eclipse.jface.preference.BooleanFieldEditor;
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.jface.preference.IntegerFieldEditor;
-import org.eclipse.linuxtools.systemtap.ui.graphing.internal.GraphingPlugin;
-import org.eclipse.linuxtools.systemtap.ui.graphing.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.preferences.GraphingAPIPreferenceConstants;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-
-
-public class GraphPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
- public GraphPreferencePage() {
- super(GRID);
- LogManager.logDebug("Start GraphPreferencePage:", this);
- setPreferenceStore(GraphingPlugin.getDefault().getPreferenceStore());
- //setPreferenceStore(GraphingAPIUIPlugin.getDefault().getPreferenceStore());
- setDescription(Localization.getString("GraphPreferencePage.GraphDisplayPreferences"));
- LogManager.logDebug("End GraphPreferencePage:", this);
- }
-
- public void createFieldEditors() {
- LogManager.logDebug("Start createFieldEditors:", this);
-
- addField(new BooleanFieldEditor(
- GraphingAPIPreferenceConstants.P_SHOW_GRID_LINES,
- Localization.getString("GraphPreferencePage.ShowGridLines"),
- getFieldEditorParent()));
-
- addField(
- new IntegerFieldEditor(
- GraphingAPIPreferenceConstants.P_MAX_DATA_ITEMS,
- Localization.getString("GraphPreferencePage.MaxDataItems"),
- getFieldEditorParent()));
-
- addField(
- new IntegerFieldEditor(
- GraphingAPIPreferenceConstants.P_VIEWABLE_DATA_ITEMS,
- Localization.getString("GraphPreferencePage.ViewableDataItems"),
- getFieldEditorParent()));
-
- addField(
- new IntegerFieldEditor(
- GraphingAPIPreferenceConstants.P_X_SERIES_TICKS,
- Localization.getString("GraphPreferencePage.XSeriesTicks"),
- getFieldEditorParent()));
-
- addField(
- new IntegerFieldEditor(
- GraphingAPIPreferenceConstants.P_Y_SERIES_TICKS,
- Localization.getString("GraphPreferencePage.YSeriesTicks"),
- getFieldEditorParent()));
-
- LogManager.logDebug("End createFieldEditors:", this);
- }
-
- public void init(IWorkbench workbench) {
- LogManager.logDebug("Start init:", this);
- LogManager.logInfo("Initializing", this);
- LogManager.logDebug("End init:", this);
- }
-
- public void dispose() {
- LogManager.logDebug("Start dispose:", this);
- LogManager.logInfo("Disposing", this);
- super.dispose();
- LogManager.logDebug("End dispose:", this);
- }
-}
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/preferences/GraphingPreferenceConstants.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/preferences/GraphingPreferenceConstants.java
deleted file mode 100644
index 208328151f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/preferences/GraphingPreferenceConstants.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphing.preferences;
-
-public class GraphingPreferenceConstants {
-
- //graphing
- public static final String P_GRAPH_UPDATE_DELAY = "GraphUpdateDelay";
-
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/preferences/GraphingPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/preferences/GraphingPreferencePage.java
deleted file mode 100644
index 8e526657a2..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/preferences/GraphingPreferencePage.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphing.preferences;
-
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.jface.preference.IntegerFieldEditor;
-import org.eclipse.linuxtools.systemtap.ui.graphing.internal.GraphingPlugin;
-import org.eclipse.linuxtools.systemtap.ui.graphing.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-
-
-public class GraphingPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
- public GraphingPreferencePage() {
- super(GRID);
- LogManager.logDebug("Start GraphingPreferencePage:", this);
- setPreferenceStore(GraphingPlugin.getDefault().getPreferenceStore());
- setDescription(Localization.getString("GraphingPreferencePage.GraphDisplayPreferences"));
- LogManager.logDebug("End GraphingPreferencePage:", this);
- }
-
- public void createFieldEditors() {
- LogManager.logDebug("Start createFieldEditors:", this);
-
- addField(
- new IntegerFieldEditor(
- GraphingPreferenceConstants.P_GRAPH_UPDATE_DELAY,
- Localization.getString("GraphingPreferencePage.RefreshDelay"),
- getFieldEditorParent()));
-
- LogManager.logDebug("End createFieldEditors:", this);
- }
-
- public void init(IWorkbench workbench) {
- LogManager.logDebug("Start init:", this);
- LogManager.logInfo("Initializing", this);
- LogManager.logDebug("End init:", this);
- }
-
- public void dispose() {
- LogManager.logDebug("Start dispose:", this);
- LogManager.logInfo("Disposing", this);
- super.dispose();
- LogManager.logDebug("End dispose:", this);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/preferences/PreferenceInitializer.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/preferences/PreferenceInitializer.java
deleted file mode 100644
index c49d777230..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/preferences/PreferenceInitializer.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphing.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.linuxtools.systemtap.ui.graphing.internal.GraphingPlugin;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-
-
-
-public class PreferenceInitializer extends AbstractPreferenceInitializer {
- public void initializeDefaultPreferences() {
- LogManager.logDebug("Start initializeDefaultPreferences:", this);
- IPreferenceStore store = GraphingPlugin.getDefault().getPreferenceStore();
-
- //graphing
- store.setDefault(GraphingPreferenceConstants.P_GRAPH_UPDATE_DELAY, 1000);
-
-/* These are set in graphingapi.ui. They shouldn't be reset here
-
- IPreferenceStore store2 = GraphingAPIUIPlugin.getDefault().getPreferenceStore();
- //graphing.graph
- store2.setDefault(GraphingAPIPreferenceConstants.P_SHOW_GRID_LINES, true);
- store2.setDefault(GraphingAPIPreferenceConstants.P_VIEWABLE_DATA_ITEMS, 100);
-
- //graphing.datatable
- store2.setDefault(GraphingAPIPreferenceConstants.P_AUTO_RESIZE, true);
- store2.setDefault(GraphingAPIPreferenceConstants.P_JUMP_NEW_TABLE_ENTRY, false);
- store2.setDefault(GraphingAPIPreferenceConstants.P_MAX_DATA_ITEMS, 250);
-*/
- LogManager.logDebug("End initializeDefaultPreferences:", this);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/structures/GraphDisplaySet.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/structures/GraphDisplaySet.java
deleted file mode 100644
index 2ad625742e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/structures/GraphDisplaySet.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphing.structures;
-
-import java.util.ArrayList;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.linuxtools.systemtap.ui.graphing.internal.GraphingPlugin;
-import org.eclipse.linuxtools.systemtap.ui.graphing.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.graphing.preferences.GraphingPreferenceConstants;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.GraphData;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.datadisplay.DataGrid;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs.IGraph;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.widgets.GraphComposite;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.dataset.DataSetFactory;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.graph.GraphFactory;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.graph.SelectGraphWizard;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.linuxtools.systemtap.ui.structures.UpdateManager;
-import org.eclipse.linuxtools.systemtap.ui.structures.listeners.ITabListener;
-import org.eclipse.linuxtools.systemtap.ui.structures.listeners.IUpdateListener;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CTabFolder;
-import org.eclipse.swt.custom.CTabFolder2Listener;
-import org.eclipse.swt.custom.CTabFolderEvent;
-import org.eclipse.swt.custom.CTabItem;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-
-
-
-/**
- * This class is used to contain all of the graphing components that can
- * be displayed as individual tabs in a single location.
- * @author Ryan Morse
- */
-public class GraphDisplaySet {
- public GraphDisplaySet(Composite parent, IDataSet data) {
- LogManager.logDebug("Start GraphSelectorView:", this);
- LogManager.logInfo("Initializing", this);
- IPreferenceStore p = GraphingPlugin.getDefault().getPreferenceStore();
- int delay = p.getInt(GraphingPreferenceConstants.P_GRAPH_UPDATE_DELAY);
-
- dataSet = data;
- // if(null != cmd) {
- updater = new UpdateManager(delay);
- updater.addUpdateListener(new IUpdateListener() {
- public void handleUpdateEvent() {
- // if(!cmd.isRunning())
- // updater.stop();
- }
- });
- // }
- createPartControl(parent);
-
- graphs = new ArrayList<IGraph>();
- tabListeners = new ArrayList<ITabListener>();
- LogManager.logDebug("End GraphSelectorView:", this);
- }
-
- /**
- * This method creates the framework for what will be displayed by this dialog box.
- * @param parent The composite that will contain all the elements from this dialog
- */
- public void createPartControl(Composite parent) {
- LogManager.logDebug("Start createPartControl: parent-" + parent, this);
-
- parent.setLayout(new FormLayout());
- FormData data1 = new FormData();
- Composite cmpCoolBar = new Composite(parent, SWT.NONE);
- data1.left = new FormAttachment(0, 0);
- data1.top = new FormAttachment(0, 0);
- data1.right = new FormAttachment(100, 0);
- data1.bottom = new FormAttachment(0, 10);
- cmpCoolBar.setLayoutData(data1);
-
- FormData data2 = new FormData();
- data2.left = new FormAttachment(0, 0);
- data2.top = new FormAttachment(cmpCoolBar);
- data2.right = new FormAttachment(100, 0);
- data2.bottom = new FormAttachment(100, 0);
- Composite cmpGraph = new Composite(parent, SWT.NONE);
- cmpGraph.setLayoutData(data2);
-
- //This is for the tab view
- cmpGraph.setLayout(new FormLayout());
-
- folder = new CTabFolder(cmpGraph, SWT.NONE);
- FormData data = new FormData();
- data.top = new FormAttachment(0, 0);
- data.left = new FormAttachment(0, 0);
- data.right = new FormAttachment(100, 0);
- data.bottom = new FormAttachment(100, 0);
- folder.setLayoutData(data);
-
- listener = new ButtonClickListener();
- folder.addSelectionListener(listener);
-
- folder.addCTabFolder2Listener(new CTabFolder2Listener() {
- public void restore(CTabFolderEvent e) {}
- public void showList(CTabFolderEvent e) {}
- public void minimize(CTabFolderEvent e) {}
- public void maximize(CTabFolderEvent e) {}
- public void close(CTabFolderEvent e) {
- int selected = folder.indexOf((CTabItem)e.item)-2;
- if(null != updater)
- updater.removeUpdateListener((IGraph)graphs.get(selected));
- graphs.remove(selected);
- fireTabCloseEvent();
- }
- });
-
- //This is a tab/button for opening new graphs
- CTabItem newGraph = new CTabItem(folder, SWT.NONE);
- newGraph.setImage(GraphingPlugin.getImageDescriptor("icons/actions/new_wiz.gif").createImage());
-
- //Tab containing the data table
- CTabItem item = new CTabItem(folder, SWT.NONE);
- item.setText(Localization.getString("GraphDisplaySet.DataView"));
- Composite c = new Composite(folder, SWT.NONE);
- GridLayout grid = new GridLayout();
- grid.marginHeight = 0;
- grid.marginWidth = 0;
- c.setLayout(grid);
-
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- DataGrid table = DataSetFactory.getDataGrid(c, dataSet);
- if(null != updater)
- updater.addUpdateListener(table);
- table.getControl().setLayoutData(gd);
- item.setControl(c);
- folder.setSelection(item);
- lastSelectedTab = 1;
-
- LogManager.logDebug("End createPartControl", this);
- }
-
- public IDataSet getDataSet() {
- return dataSet;
- }
-
- /**
- * Finds the graph that is open in the current tab
- * @return The graph that is currently visible on the screen
- */
- public IGraph getActiveGraph() {
- if(0 == graphs.size() || folder.getSelectionIndex() < 2)
- return null;
- return (IGraph)graphs.get(folder.getSelectionIndex()-2);
- }
-
- public void setFocus() {}
-
- /**
- * Removes all internal references in this class. Nothing should make any references
- * to anyting in this class after calling the dispose method.
- */
- public void dispose() {
- LogManager.logDebug("Start dispose:", this);
- LogManager.logInfo("Disposing", this);
-
- if(null != updater)
- updater.dispose();
- updater = null;
-
- dataSet = null;
- if(null != folder) {
- folder.removeSelectionListener(listener);
- folder.dispose();
- folder = null;
- }
- listener = null;
-
- LogManager.logDebug("End dispose:", this);
- }
-
- /**
- * This class handles switching between tabs and creating new graphs.
- * When the user selects the first tab a new dialog is displayed for
- * them to slect what they want to display for the new graph.
- */
- public class ButtonClickListener implements SelectionListener {
- public void widgetDefaultSelected(SelectionEvent event) {}
- public void widgetSelected(SelectionEvent event) {
- CTabFolder folder = (CTabFolder)event.getSource();
-
- if(folder.getSelectionIndex() == 0) {
- folder.setSelection(lastSelectedTab);
- SelectGraphWizard wizard = new SelectGraphWizard(dataSet);
- IWorkbench workbench = PlatformUI.getWorkbench();
- wizard.init(workbench, null);
- WizardDialog dialog = new WizardDialog(workbench.getActiveWorkbenchWindow().getShell(), wizard);
- dialog.create();
- dialog.open();
-
- GraphData gd = wizard.getGraphData();
-
- if(null != gd) {
- CTabItem item = new CTabItem(folder, SWT.CLOSE);
- item.setText(GraphFactory.getGraphName(gd.graphID));
- GraphComposite gc = new GraphComposite(folder, SWT.FILL, gd, dataSet);
- gc.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- folder.setSelection(item);
-
- IGraph g = gc.getGraph();
- item.setControl(gc);
-
- if(null != g) {
- if(null != updater)
- updater.addUpdateListener(g);
- graphs.add(g);
- }
- }
- wizard.dispose();
- fireTabOpenEvent();
- }
- lastSelectedTab = folder.getSelectionIndex();
- fireTabChangedEvent();
- }
- }
-
- public void addTabListener(ITabListener listener) {
- tabListeners.add(listener);
- }
-
- public void removeTabListener(ITabListener listener) {
- tabListeners.remove(listener);
- }
-
- private void fireTabCloseEvent() {
- for(int i=0; i<tabListeners.size(); i++)
- ((ITabListener)tabListeners.get(i)).tabClosed();
- }
-
- private void fireTabOpenEvent() {
- for(int i=0; i<tabListeners.size(); i++)
- ((ITabListener)tabListeners.get(i)).tabOpened();
- }
-
- private void fireTabChangedEvent() {
- for(int i=0; i<tabListeners.size(); i++)
- ((ITabListener)tabListeners.get(i)).tabChanged();
- }
-
- private int lastSelectedTab;
- private IDataSet dataSet;
- private CTabFolder folder;
- private ButtonClickListener listener;
- private UpdateManager updater;
- private ArrayList<ITabListener> tabListeners;
-
- private ArrayList<IGraph> graphs;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/views/GraphSelectorView.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/views/GraphSelectorView.java
deleted file mode 100644
index 9acb449480..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/views/GraphSelectorView.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphing.views;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.systemtap.ui.graphing.structures.GraphDisplaySet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSet;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.linuxtools.systemtap.ui.structures.listeners.ITabListener;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CTabFolder;
-import org.eclipse.swt.custom.CTabFolder2Listener;
-import org.eclipse.swt.custom.CTabFolderEvent;
-import org.eclipse.swt.custom.CTabItem;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.part.ViewPart;
-
-
-
-/**
- * This class is designed to hold a number of different running script sets.
- * Each running script is given its own tab that contains all the details for
- * that specific script. Script sets can be created or disposed of at the will
- * of the user.
- * @author Ryan Morse
- */
-public class GraphSelectorView extends ViewPart {
- public GraphSelectorView() {
- super();
- LogManager.logDebug("Start GraphSelectorView:", this);
- LogManager.logInfo("Initializing", this);
- displaySets = new ArrayList<GraphDisplaySet>();
- tabListeners = new ArrayList<ITabListener>();
- LogManager.logDebug("End GraphSelectorView:", this);
- }
-
- /**
- * This method will create a new script set for the provided dataSet
- * The new script set will be given a new tab item at the end of
- * the list.
- * @param title The name to be shown on the new tab
- * @param dataSet The <code>IDataSet</code> for the new script set
- * @param cmd The running command that this script set represents.
- */
- public void createScriptSet(String title, IDataSet dataSet) {
- CTabItem item;
-
- item = new CTabItem(scriptFolder, SWT.CLOSE);
- item.setText(title);
- Composite parent = new Composite(scriptFolder, SWT.NONE);
- parent.setBackground(new Color(parent.getDisplay(), 0, 0, 255));
- GraphDisplaySet gds = new GraphDisplaySet(parent, dataSet);
- displaySets.add(gds);
- item.setControl(parent);
-
- scriptFolder.setSelection(item);
- fireTabOpenEvent();
- }
-
- /**
- * This method creates the framework for what will be displayed by this dialog box.
- * @param parent The composite that will contain all the elements from this dialog
- */
- public void createPartControl(Composite parent) {
- LogManager.logDebug("Start createPartControl: parent-" + parent, this);
-
- FormData data2 = new FormData();
- data2.left = new FormAttachment(0, 0);
- data2.top = new FormAttachment(0, 0);
- data2.right = new FormAttachment(100, 0);
- data2.bottom = new FormAttachment(100, 0);
- Composite cmpGraph = new Composite(parent, SWT.NONE);
- cmpGraph.setLayoutData(data2);
-
- //This is for the tab view
- cmpGraph.setLayout(new FormLayout());
-
- //Create the folder for all of the script sets, so it takes up all of the parent composite
- scriptFolder = new CTabFolder(cmpGraph, SWT.NONE);
- FormData data = new FormData();
- data.top = new FormAttachment(0, 0);
- data.left = new FormAttachment(0, 0);
- data.right = new FormAttachment(100, 0);
- data.bottom = new FormAttachment(100, 0);
- scriptFolder.setLayoutData(data);
- scriptFolder.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- fireTabChangedEvent();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {}
- });
-
-
- scriptFolder.addCTabFolder2Listener(new CTabFolder2Listener() {
- public void restore(CTabFolderEvent e) {}
- public void showList(CTabFolderEvent e) {}
- public void minimize(CTabFolderEvent e) {}
- public void maximize(CTabFolderEvent e) {}
- public void close(CTabFolderEvent e) {
- displaySets.remove(scriptFolder.indexOf((CTabItem)e.item));
- fireTabCloseEvent();
- }
- });
-
- LogManager.logDebug("End createPartControl", this);
- }
-
- /**
- * Finds and returns the active component inside of the active script set
- * @return The <code>GraphDisplaySet</code> that is currently active
- */
- public GraphDisplaySet getActiveDisplaySet() {
- int index = scriptFolder.getSelectionIndex();
- if(index >= 0 && index < displaySets.size())
- return (GraphDisplaySet)displaySets.get(index);
- else
- return null;
- }
-
- public void setFocus() {}
-
- public void addTabListener(ITabListener listener) {
- tabListeners.add(listener);
- }
-
- public void removeTabListener(ITabListener listener) {
- tabListeners.remove(listener);
- }
-
- private void fireTabCloseEvent() {
- for(int i=0; i<tabListeners.size(); i++)
- ((ITabListener)tabListeners.get(i)).tabClosed();
- }
-
- private void fireTabOpenEvent() {
- for(int i=0; i<tabListeners.size(); i++)
- ((ITabListener)tabListeners.get(i)).tabOpened();
- }
-
- private void fireTabChangedEvent() {
- for(int i=0; i<tabListeners.size(); i++)
- ((ITabListener)tabListeners.get(i)).tabChanged();
- }
-
- /**
- * Removes all internal references in this class. Nothing should make any references
- * to anyting in this class after calling the dispose method.
- */
- public void dispose() {
- LogManager.logDebug("Start dispose:", this);
- LogManager.logInfo("Disposing", this);
- super.dispose();
-
- if(null != scriptFolder)
- scriptFolder.dispose();
- scriptFolder = null;
- if(null != tabListeners)
- tabListeners.removeAll(tabListeners);
- tabListeners = null;
- LogManager.logDebug("End dispose:", this);
- }
-
- private CTabFolder scriptFolder;
- private ArrayList<GraphDisplaySet> displaySets;
- private ArrayList<ITabListener> tabListeners;
- public static final String ID = "org.eclipse.linuxtools.systemtap.ui.graphing.views.GraphSelectorView";
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/toc.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/toc.xml
deleted file mode 100644
index 6d1ee401f4..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/toc.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-
-<toc label="Systemtap Graphing User Guide" topic="documentation/html/toc.html">
- <topic label="Getting Started" href="documentation/html/gettingstarted/gettingStarted.html">
- <anchor id="gettingstarted"/>
- </topic>
- <topic label="Concepts" href="documentation/html/concepts/concepts.html">
- <anchor id="concepts"/>
- </topic>
- <topic label="Tasks" href="documentation/html/tasks/tasks.html">
- <anchor id="tasks"/>
- </topic>
- <topic label="Reference" href="documentation/html/reference/reference.html">
- <anchor id="reference"/>
- </topic>
-</toc>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/.classpath
deleted file mode 100644
index c035463db3..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry exported="true" kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/.project b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/.project
deleted file mode 100644
index 42646c7e08..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.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/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/ChangeLog
deleted file mode 100644
index 7329545877..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/ChangeLog
+++ /dev/null
@@ -1,7 +0,0 @@
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Make version 0.3.0.qualifier.
-
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Change provider from IBM to Eclipse. \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index da4ed2c05c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name.0
-Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests;singleton:=true
-Bundle-Version: 0.3.0.qualifier
-Bundle-Vendor: Eclipse
-Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.GraphingAPINonUIPlugin
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.linuxtools.systemtap.ui.structures
-Bundle-ActivationPolicy: lazy
-Import-Package: junit.framework,
- org.eclipse.linuxtools.systemtap.ui.consolelog.structures
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/build.properties
deleted file mode 100644
index 34d2e4d2da..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/AllTests.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/AllTests.java
deleted file mode 100644
index e6a62f22a6..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/AllTests.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.adapters.BlockAdapterTest;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.adapters.ScrollAdapterTest;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.aggregates.AverageAggregateTest;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.aggregates.CountAggregateTest;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.aggregates.MaxAggregateTest;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.aggregates.MinAggregateTest;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.aggregates.SumAggregateTest;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.datasets.row.FilteredRowDataSetTest;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.datasets.row.RowDataSetTest;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.datasets.row.RowEntryTest;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.datasets.row.RowParserTest;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.datasets.table.FilteredTableDataSetTest;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.datasets.table.TableDataSetTest;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.datasets.table.TableEntryTest;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.datasets.table.TableParserTest;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.filters.MatchFilterTest;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.filters.RangeFilterTest;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.filters.SortFilterTest;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.filters.UniqueFilterTest;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.structures.ChartStreamDaemonTest;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.structures.ChartStreamDaemonTest2;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.structures.DataPointTest;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.structures.GraphDataTest;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.structures.NumberTypeTest;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.structures.UpdateManagerTest;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests");
-
- //Adapters
- suite.addTestSuite(BlockAdapterTest.class);
- suite.addTestSuite(ScrollAdapterTest.class);
-
- //Aggregates
- suite.addTestSuite(AverageAggregateTest.class);
- suite.addTestSuite(CountAggregateTest.class);
- suite.addTestSuite(MaxAggregateTest.class);
- suite.addTestSuite(MinAggregateTest.class);
- suite.addTestSuite(SumAggregateTest.class);
-
- //DataSets
-
- //DataSets.Row
- suite.addTestSuite(FilteredRowDataSetTest.class);
- suite.addTestSuite(RowDataSetTest.class);
- suite.addTestSuite(RowEntryTest.class);
- suite.addTestSuite(RowParserTest.class);
-
- //DataSets.Table
- suite.addTestSuite(FilteredTableDataSetTest.class);
- suite.addTestSuite(TableDataSetTest.class);
- suite.addTestSuite(TableEntryTest.class);
- suite.addTestSuite(TableParserTest.class);
-
- //Filters
- suite.addTestSuite(MatchFilterTest.class);
- suite.addTestSuite(RangeFilterTest.class);
- suite.addTestSuite(SortFilterTest.class);
- suite.addTestSuite(UniqueFilterTest.class);
-
- //Structures
- suite.addTestSuite(ChartStreamDaemonTest.class);
- suite.addTestSuite(ChartStreamDaemonTest2.class);
- suite.addTestSuite(DataPointTest.class);
- suite.addTestSuite(GraphDataTest.class);
- suite.addTestSuite(NumberTypeTest.class);
- suite.addTestSuite(UpdateManagerTest.class);
-
- return suite;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/MockDataSet.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/MockDataSet.java
deleted file mode 100644
index 9ed699d2f6..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/MockDataSet.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row.RowDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row.RowEntry;
-
-
-public final class MockDataSet {
- public static RowDataSet buildDataSet(int rows, int cols) {
- String[] titles = new String[cols];
- int i;
- for(i=0; i<cols; i++)
- titles[i] = ""+ i;
-
- RowDataSet data = new RowDataSet(titles);
- RowEntry entry;
-
- int j;
- for(i=0; i<rows; i++) {
- Object[] d = new Object[cols];
- for(j=0; j< cols; j++)
- d[j] = new Double(i*cols + j);
- entry = new RowEntry();
- entry.putRow(0, d);
- data.append(entry);
- }
- return data;
- }
-
- public static ArrayList[] buildArray(int width, int height, int wrap) {
- ArrayList[] list = new ArrayList[width];
-
- for(int i=0; i<width; i++) {
- list[i] = new ArrayList();
- for(int j=0; j<height; j++) {
- list[i].add("" + ((j+i) % wrap));
- }
- }
- return list;
- }
-
- public static Integer[] buildIntegerArray(int[] arr) {
- Integer[] ints = new Integer[arr.length];
- for(int i=0; i<arr.length; i++)
- ints[i] = new Integer(arr[i]);
- return ints;
- }
-
- public static Double[] buildDoubleArray(double[] arr) {
- Double[] doubles = new Double[arr.length];
- for(int i=0; i<arr.length; i++)
- doubles[i] = new Double(arr[i]);
- return doubles;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/adapters/BlockAdapterTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/adapters/BlockAdapterTest.java
deleted file mode 100644
index 5579279e49..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/adapters/BlockAdapterTest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.adapters;
-
-import junit.framework.TestCase;
-
-public class BlockAdapterTest extends TestCase {
- public BlockAdapterTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- public void testIsValid() {
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/adapters/ScrollAdapterTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/adapters/ScrollAdapterTest.java
deleted file mode 100644
index 39d4e9fa40..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/adapters/ScrollAdapterTest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.adapters;
-
-import junit.framework.TestCase;
-
-public class ScrollAdapterTest extends TestCase {
- public ScrollAdapterTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- public void testIsValid() {
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/aggregates/AverageAggregateTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/aggregates/AverageAggregateTest.java
deleted file mode 100644
index 14fb182203..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/aggregates/AverageAggregateTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.aggregates;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates.AverageAggregate;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.MockDataSet;
-
-import junit.framework.TestCase;
-
-public class AverageAggregateTest extends TestCase {
- public AverageAggregateTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- public void testAggregate() {
- AverageAggregate aa = new AverageAggregate();
- Number num;
-
- num = aa.aggregate(null);
- assertNull(num);
-
- num = aa.aggregate(new Number[] {});
- assertNull(num);
-
- num = aa.aggregate(MockDataSet.buildIntegerArray(new int[] {0,0,0}));
- assertEquals(0, num.intValue());
-
- num = aa.aggregate(MockDataSet.buildIntegerArray(new int[] {-1,0,1}));
- assertEquals(0, num.intValue());
-
- num = aa.aggregate(MockDataSet.buildIntegerArray(new int[] {0,0,1}));
- assertEquals(0, num.intValue());
-
-
- num = aa.aggregate(MockDataSet.buildDoubleArray(new double[] {0,0,0}));
- assertEquals(0.0, num.doubleValue(), 0.0);
-
- num = aa.aggregate(MockDataSet.buildDoubleArray(new double[] {-1,0,1}));
- assertEquals(0.0, num.doubleValue(), 0.0);
-
- num = aa.aggregate(MockDataSet.buildDoubleArray(new double[] {0,0,1}));
- assertEquals(1.0/3.0, num.doubleValue(), 0.0);
- }
-
- public void testGetID() {
- AverageAggregate aa = new AverageAggregate();
- assertTrue(AverageAggregate.ID.equals(aa.getID()));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/aggregates/CountAggregateTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/aggregates/CountAggregateTest.java
deleted file mode 100644
index 051ffc4c68..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/aggregates/CountAggregateTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.aggregates;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates.CountAggregate;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.MockDataSet;
-
-import junit.framework.TestCase;
-
-public class CountAggregateTest extends TestCase {
- public CountAggregateTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- public void testAggregate() {
- CountAggregate aa = new CountAggregate();
- Number num;
-
- num = aa.aggregate(null);
- assertNull(num);
-
- num = aa.aggregate(new Number[] {});
- assertNull(num);
-
- num = aa.aggregate(MockDataSet.buildIntegerArray(new int[] {0,0,0}));
- assertEquals(3, num.intValue());
-
- num = aa.aggregate(MockDataSet.buildIntegerArray(new int[] {-1,0}));
- assertEquals(2, num.intValue());
-
- num = aa.aggregate(MockDataSet.buildIntegerArray(new int[] {0,0,1,2,3}));
- assertEquals(5, num.intValue());
-
-
- num = aa.aggregate(MockDataSet.buildDoubleArray(new double[] {0,0,0}));
- assertEquals(3, num.doubleValue(), 0.0);
-
- num = aa.aggregate(MockDataSet.buildDoubleArray(new double[] {-1,1}));
- assertEquals(2, num.doubleValue(), 0.0);
-
- num = aa.aggregate(MockDataSet.buildDoubleArray(new double[] {0,0,1,4,5}));
- assertEquals(5, num.doubleValue(), 0.0);
- }
-
- public void testGetID() {
- CountAggregate aa = new CountAggregate();
- assertTrue(CountAggregate.ID.equals(aa.getID()));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/aggregates/MaxAggregateTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/aggregates/MaxAggregateTest.java
deleted file mode 100644
index e3be6c8f82..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/aggregates/MaxAggregateTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.aggregates;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates.MaxAggregate;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.MockDataSet;
-
-import junit.framework.TestCase;
-
-public class MaxAggregateTest extends TestCase {
- public MaxAggregateTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- public void testAggregate() {
- MaxAggregate aa = new MaxAggregate();
- Number num;
-
- num = aa.aggregate(null);
- assertNull(num);
-
- num = aa.aggregate(new Number[] {});
- assertNull(num);
-
- num = aa.aggregate(MockDataSet.buildIntegerArray(new int[] {0,0,0}));
- assertEquals(0, num.intValue());
-
- num = aa.aggregate(MockDataSet.buildIntegerArray(new int[] {-1,0,1}));
- assertEquals(1, num.intValue());
-
- num = aa.aggregate(MockDataSet.buildIntegerArray(new int[] {0,0,1}));
- assertEquals(1, num.intValue());
-
- num = aa.aggregate(MockDataSet.buildDoubleArray(new double[] {0,0,0}));
- assertEquals(0.0, num.doubleValue(), 0.0);
-
- num = aa.aggregate(MockDataSet.buildDoubleArray(new double[] {-1,0,1}));
- assertEquals(1.0, num.doubleValue(), 0.0);
-
- num = aa.aggregate(MockDataSet.buildDoubleArray(new double[] {0,0,1,2}));
- assertEquals(2.0, num.doubleValue(), 0.0);
- }
-
- public void testGetID() {
- MaxAggregate aa = new MaxAggregate();
- assertTrue(MaxAggregate.ID.equals(aa.getID()));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/aggregates/MinAggregateTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/aggregates/MinAggregateTest.java
deleted file mode 100644
index 43386877cf..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/aggregates/MinAggregateTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.aggregates;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates.MinAggregate;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.MockDataSet;
-
-import junit.framework.TestCase;
-
-public class MinAggregateTest extends TestCase {
- public MinAggregateTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- public void testAggregate() {
- MinAggregate aa = new MinAggregate();
- Number num;
-
- num = aa.aggregate(null);
- assertNull(num);
-
- num = aa.aggregate(new Number[] {});
- assertNull(num);
-
- num = aa.aggregate(MockDataSet.buildIntegerArray(new int[] {0,0,0}));
- assertEquals(0, num.intValue());
-
- num = aa.aggregate(MockDataSet.buildIntegerArray(new int[] {-1,0,1}));
- assertEquals(-1, num.intValue());
-
- num = aa.aggregate(MockDataSet.buildIntegerArray(new int[] {0,0,1}));
- assertEquals(0, num.intValue());
-
-
- num = aa.aggregate(MockDataSet.buildDoubleArray(new double[] {0,0,0}));
- assertEquals(0.0, num.doubleValue(), 0.0);
-
- num = aa.aggregate(MockDataSet.buildDoubleArray(new double[] {-1,0,1}));
- assertEquals(-1.0, num.doubleValue(), 0.0);
-
- num = aa.aggregate(MockDataSet.buildDoubleArray(new double[] {0,0,1}));
- assertEquals(0.0, num.doubleValue(), 0.0);
- }
-
- public void testGetID() {
- MinAggregate aa = new MinAggregate();
- assertTrue(MinAggregate.ID.equals(aa.getID()));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/aggregates/SumAggregateTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/aggregates/SumAggregateTest.java
deleted file mode 100644
index 6678fde62f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/aggregates/SumAggregateTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.aggregates;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates.SumAggregate;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.MockDataSet;
-
-import junit.framework.TestCase;
-
-public class SumAggregateTest extends TestCase {
- public SumAggregateTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- public void testAggregate() {
- SumAggregate aa = new SumAggregate();
- Number num;
-
- num = aa.aggregate(null);
- assertNull(num);
-
- num = aa.aggregate(new Number[] {});
- assertNull(num);
-
- num = aa.aggregate(MockDataSet.buildIntegerArray(new int[] {0,0,0}));
- assertEquals(0, num.intValue());
-
- num = aa.aggregate(MockDataSet.buildIntegerArray(new int[] {-1,0,1}));
- assertEquals(0, num.intValue());
-
- num = aa.aggregate(MockDataSet.buildIntegerArray(new int[] {0,0,1}));
- assertEquals(1, num.intValue());
-
-
- num = aa.aggregate(MockDataSet.buildDoubleArray(new double[] {0,0,0}));
- assertEquals(0.0, num.doubleValue(), 0.0);
-
- num = aa.aggregate(MockDataSet.buildDoubleArray(new double[] {-1,0,1}));
- assertEquals(0.0, num.doubleValue(), 0.0);
-
- num = aa.aggregate(MockDataSet.buildDoubleArray(new double[] {0,0,1,2}));
- assertEquals(3.0, num.doubleValue(), 0.0);
- }
-
- public void testGetID() {
- SumAggregate aa = new SumAggregate();
- assertTrue(SumAggregate.ID.equals(aa.getID()));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/row/FilteredRowDataSetTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/row/FilteredRowDataSetTest.java
deleted file mode 100644
index 0caf8b57ee..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/row/FilteredRowDataSetTest.java
+++ /dev/null
@@ -1,271 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.datasets.row;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataEntry;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row.FilteredRowDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row.RowDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row.RowEntry;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.IDataSetFilter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.RangeFilter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.SortFilter;
-
-import junit.framework.TestCase;
-
-public class FilteredRowDataSetTest extends TestCase {
- public FilteredRowDataSetTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- data = new RowDataSet(new String[] {"a", "b", "c"});
- fdata = new FilteredRowDataSet(data);
- new FilteredRowDataSet(data.getTitles());
-
- entry0 = new RowEntry();
- entry0.putRow(0, new String[] {"1", "2", "3"});
- data.setData(entry0);
- RowEntry entry = new RowEntry();
- entry.putRow(0, new String[] {"4", "5", "6"});
- data.setData(entry);
- }
-
- //Overwrite methods to insure data is removed from the original DataSet
- public void testAppend() {
- assertEquals(2, data.getEntryCount());
- RowEntry entry = new RowEntry();
- entry.putRow(0, new String[] {"1", "2", "3"});
- fdata.append(entry);
- assertEquals(3, data.getEntryCount());
- }
-
- public void testRemove() {
- assertFalse(fdata.remove(null));
- assertFalse(fdata.remove(new RowEntry()));
- assertFalse(fdata.remove(-1));
- assertFalse(fdata.remove(10));
- assertEquals(2, fdata.getEntryCount());
-
- IDataEntry entry = data.getEntry(0);
- assertTrue(fdata.remove(entry));
- assertEquals(1, fdata.getEntryCount());
- assertFalse(fdata.remove(entry));
- assertTrue(fdata.remove(0));
- }
- //End overwrite methods to insure data is removed from the original DataSet
-
- //Overwrite to ensure the data returned has all the filters applied
- public void testGetColumn() {
- assertNull(fdata.getColumn(-3));
- assertNull(fdata.getColumn(10));
-
- assertNull(fdata.getColumn(-3, 0, 1));
- assertNull(fdata.getColumn(10, 0, 1));
- assertNull(fdata.getColumn(1, 3, 1));
- assertNull(fdata.getColumn(1, -2, 1));
- assertNull(fdata.getColumn(1, 0, 20));
-
- Object[] col = fdata.getColumn(0);
- assertEquals(2, col.length);
- assertSame("1", col[0]);
- assertSame("4", col[1]);
-
- col = fdata.getColumn(RowDataSet.COL_ROW_NUM);
- assertEquals(2, col.length);
- assertEquals("1", col[0].toString());
- assertEquals("2", col[1].toString());
-
- col = fdata.getColumn(1, 0, 1);
- assertEquals(1, col.length);
- assertSame("2", col[0]);
- }
-
- public void testGetRow() {
- assertNull(fdata.getRow(-3));
- assertNull(fdata.getRow(10));
-
- Object[] row = fdata.getRow(1);
- assertEquals(3, row.length);
- assertSame("5", row[1]);
- }
-
- public void testGetHistoricalData() {
- assertNull(fdata.getHistoricalData(null, -3));
- assertNull(fdata.getHistoricalData(null, 10));
-
- assertNull(fdata.getHistoricalData(null, -3, 0, 1));
- assertNull(fdata.getHistoricalData(null, 10, 0, 1));
- assertNull(fdata.getHistoricalData(null, 1, 3, 1));
- assertNull(fdata.getHistoricalData(null, 1, -2, 1));
- assertNull(fdata.getHistoricalData(null, 1, 0, 20));
-
- Object[] col = fdata.getHistoricalData(null, 0);
- assertEquals(2, col.length);
- assertSame("1", col[0]);
- assertSame("4", col[1]);
-
- col = fdata.getHistoricalData(null, RowDataSet.COL_ROW_NUM);
- assertEquals(2, col.length);
- assertEquals("1", col[0].toString());
- assertEquals("2", col[1].toString());
-
- col = fdata.getHistoricalData(null, 1, 0, 1);
- assertEquals(1, col.length);
- assertSame("2", col[0]);
- }
-
- public void testGetEntryCount() {
- assertEquals(2, fdata.getEntryCount());
- }
-
- public void testGetEntry() {
- assertNull(fdata.getEntry(-1));
- assertNull(fdata.getEntry(20));
- assertEquals(entry0, data.getEntry(0));
- }
- //End overwrite to ensure the data returned has all the filters applied
-
- //IFilteredDataSet Methods
- public void testAddFilter() {
- data.remove(0);
- data.remove(0);
-
- RowEntry entry;
-
- entry = new RowEntry();
- entry.putRow(0, new Integer[] {new Integer(3), new Integer(2), new Integer(5)});
- data.append(entry);
- entry = new RowEntry();
- entry.putRow(0, new Integer[] {new Integer(4), new Integer(2), new Integer(3)});
- data.append(entry);
- entry = new RowEntry();
- entry.putRow(0, new Integer[] {new Integer(7), new Integer(2), new Integer(9)});
- data.append(entry);
- entry = new RowEntry();
- entry.putRow(0, new Integer[] {new Integer(2), new Integer(2), new Integer(6)});
- data.append(entry);
- entry = new RowEntry();
- entry.putRow(0, new Integer[] {new Integer(5), new Integer(2), new Integer(2)});
- data.append(entry);
-
- fdata.addFilter(new RangeFilter(0, new Integer(3), new Integer(5), RangeFilter.INCLUSIVE | RangeFilter.INSIDE_BOUNDS));
-
- assertEquals(3, fdata.getRowCount());
- Object[] row = fdata.getRow(1);
- assertEquals(4, ((Integer)row[0]).intValue());
- assertEquals(3, ((Integer)row[2]).intValue());
-
- row = fdata.getRow(2);
- assertEquals(5, ((Integer)row[0]).intValue());
- assertEquals(2, ((Integer)row[1]).intValue());
-
-
- fdata.addFilter(new SortFilter(2, SortFilter.ASCENDING));
-
- assertEquals(3, fdata.getRowCount());
- row = fdata.getRow(0);
- assertEquals(5, ((Integer)row[0]).intValue());
- assertEquals(2, ((Integer)row[2]).intValue());
-
- row = fdata.getRow(1);
- assertEquals(4, ((Integer)row[0]).intValue());
- assertEquals(3, ((Integer)row[2]).intValue());
- }
-
- public void testRemoveFilter() {
- data.remove(0);
- data.remove(0);
-
- RowEntry entry;
-
- entry = new RowEntry();
- entry.putRow(0, new Integer[] {new Integer(3), new Integer(2), new Integer(5)});
- data.append(entry);
- entry = new RowEntry();
- entry.putRow(0, new Integer[] {new Integer(4), new Integer(2), new Integer(3)});
- data.append(entry);
- entry = new RowEntry();
- entry.putRow(0, new Integer[] {new Integer(7), new Integer(2), new Integer(9)});
- data.append(entry);
- entry = new RowEntry();
- entry.putRow(0, new Integer[] {new Integer(2), new Integer(2), new Integer(6)});
- data.append(entry);
- entry = new RowEntry();
- entry.putRow(0, new Integer[] {new Integer(5), new Integer(2), new Integer(2)});
- data.append(entry);
-
- RangeFilter filter = new RangeFilter(0, new Integer(3), new Integer(5), RangeFilter.INCLUSIVE | RangeFilter.INSIDE_BOUNDS);
- fdata.addFilter(filter);
- fdata.addFilter(new SortFilter(2, SortFilter.ASCENDING));
- fdata.removeFilter(filter);
-
-
- assertEquals(5, fdata.getRowCount());
- Object[] row = fdata.getRow(0);
- assertEquals(5, ((Integer)row[0]).intValue());
- assertEquals(2, ((Integer)row[2]).intValue());
-
- row = fdata.getRow(1);
- assertEquals(4, ((Integer)row[0]).intValue());
- assertEquals(3, ((Integer)row[2]).intValue());
- }
-
- public void testClearFilters() {
- data.remove(0);
- data.remove(0);
-
- RowEntry entry;
-
- entry = new RowEntry();
- entry.putRow(0, new Integer[] {new Integer(3), new Integer(2), new Integer(5)});
- data.append(entry);
- entry = new RowEntry();
- entry.putRow(0, new Integer[] {new Integer(4), new Integer(2), new Integer(3)});
- data.append(entry);
- entry = new RowEntry();
- entry.putRow(0, new Integer[] {new Integer(7), new Integer(2), new Integer(9)});
- data.append(entry);
- entry = new RowEntry();
- entry.putRow(0, new Integer[] {new Integer(2), new Integer(2), new Integer(6)});
- data.append(entry);
- entry = new RowEntry();
- entry.putRow(0, new Integer[] {new Integer(5), new Integer(2), new Integer(2)});
- data.append(entry);
-
- RangeFilter filter = new RangeFilter(0, new Integer(3), new Integer(5), RangeFilter.INCLUSIVE | RangeFilter.INSIDE_BOUNDS);
- fdata.addFilter(filter);
- fdata.addFilter(new SortFilter(2, SortFilter.ASCENDING));
-
- fdata.clearFilters();
-
- assertEquals(5, fdata.getRowCount());
- Object[] row = fdata.getRow(0);
- assertEquals(3, ((Integer)row[0]).intValue());
- assertEquals(5, ((Integer)row[2]).intValue());
-
- row = fdata.getRow(1);
- assertEquals(4, ((Integer)row[0]).intValue());
- assertEquals(3, ((Integer)row[2]).intValue());
- }
-
- public void testGetFilters() {
- assertEquals(0, fdata.getFilters().length);
-
- RangeFilter filter1 = new RangeFilter(0, new Integer(3), new Integer(5), RangeFilter.INCLUSIVE | RangeFilter.INSIDE_BOUNDS);
- SortFilter filter2 = new SortFilter(2, SortFilter.ASCENDING);
-
- fdata.addFilter(filter1);
- fdata.addFilter(filter2);
-
- IDataSetFilter[] filters = fdata.getFilters();
- assertEquals(2, filters.length);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- private RowDataSet data;
- private FilteredRowDataSet fdata;
- private RowEntry entry0;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/row/RowDataSetTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/row/RowDataSetTest.java
deleted file mode 100644
index 7cabb6e0d2..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/row/RowDataSetTest.java
+++ /dev/null
@@ -1,157 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.datasets.row;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataEntry;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row.RowDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row.RowEntry;
-
-import junit.framework.TestCase;
-
-public class RowDataSetTest extends TestCase {
- public RowDataSetTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- data = new RowDataSet(new String[] {"a", "b", "c"});
- entry0 = new RowEntry();
- entry0.putRow(0, new String[] {"1", "2", "3"});
- data.setData(entry0);
- RowEntry entry = new RowEntry();
- entry.putRow(0, new String[] {"4", "5", "6"});
- data.setData(entry);
- }
-
- public void testSetData() {
- assertEquals(2, data.getEntryCount());
- RowEntry entry = new RowEntry();
- entry.putRow(0, new String[] {"1", "2", "3"});
- data.setData(entry);
- assertEquals(3, data.getEntryCount());
- }
-
- public void testAppend() {
- assertEquals(2, data.getEntryCount());
- RowEntry entry = new RowEntry();
- entry.putRow(0, new String[] {"1", "2", "3"});
- data.append(entry);
- assertEquals(3, data.getEntryCount());
- }
-
- public void testGetTitles() {
- String[] titles = data.getTitles();
- assertEquals(3, titles.length);
- assertSame("a", titles[0]);
- }
-
- public void testGetColumn() {
- assertNull(data.getColumn(-3));
- assertNull(data.getColumn(10));
-
- assertNull(data.getColumn(-3, 0, 1));
- assertNull(data.getColumn(10, 0, 1));
- assertNull(data.getColumn(1, 3, 1));
- assertNull(data.getColumn(1, -2, 1));
- assertNull(data.getColumn(1, 0, 20));
-
- Object[] col = data.getColumn(0);
- assertEquals(2, col.length);
- assertSame("1", col[0]);
- assertSame("4", col[1]);
-
- col = data.getColumn(RowDataSet.COL_ROW_NUM);
- assertEquals(2, col.length);
- assertEquals("1", col[0].toString());
- assertEquals("2", col[1].toString());
-
- col = data.getColumn(1, 0, 1);
- assertEquals(1, col.length);
- assertSame("2", col[0]);
- }
-
- public void testGetRow() {
- assertNull(data.getRow(-3));
- assertNull(data.getRow(10));
-
- Object[] row = data.getRow(1);
- assertEquals(3, row.length);
- assertSame("5", row[1]);
- }
-
- public void testGetRowCount() {
- assertEquals(2, data.getRowCount());
- }
-
- public void testGetColCount() {
- assertEquals(3, data.getColCount());
-
- assertEquals(-1, new RowDataSet(null).getColCount());
- }
-
- public void testReadFromFile() {}
-
- public void testWriteToFile() {}
-
- public void testGetID() {
- assertEquals(RowDataSet.ID, data.getID());
- }
- //End IDataSet Methods
-
- //IHistoricalDataSet Methods
- public void testGetHistoricalData() {
- assertNull(data.getHistoricalData(null, -3));
- assertNull(data.getHistoricalData(null, 10));
-
- assertNull(data.getHistoricalData(null, -3, 0, 1));
- assertNull(data.getHistoricalData(null, 10, 0, 1));
- assertNull(data.getHistoricalData(null, 1, 3, 1));
- assertNull(data.getHistoricalData(null, 1, -2, 1));
- assertNull(data.getHistoricalData(null, 1, 0, 20));
-
- Object[] col = data.getHistoricalData(null, 0);
- assertEquals(2, col.length);
- assertSame("1", col[0]);
- assertSame("4", col[1]);
-
- col = data.getHistoricalData(null, RowDataSet.COL_ROW_NUM);
- assertEquals(2, col.length);
- assertEquals("1", col[0].toString());
- assertEquals("2", col[1].toString());
-
- col = data.getHistoricalData(null, 1, 0, 1);
- assertEquals(1, col.length);
- assertSame("2", col[0]);
- }
-
- public void testGetEntryCount() {
- assertEquals(2, data.getEntryCount());
- }
-
- public void testRemove() {
- assertFalse(data.remove(null));
- assertFalse(data.remove(new RowEntry()));
- assertFalse(data.remove(-1));
- assertFalse(data.remove(10));
- assertEquals(2, data.getEntryCount());
-
- IDataEntry entry = data.getEntry(0);
- assertTrue(data.remove(entry));
- assertEquals(1, data.getEntryCount());
- assertFalse(data.remove(entry));
- assertTrue(data.remove(0));
- }
-
- public void testGetEntry() {
- assertNull(data.getEntry(-1));
- assertNull(data.getEntry(20));
- assertEquals(entry0, data.getEntry(0));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- RowDataSet data;
- RowEntry entry0;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/row/RowEntryTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/row/RowEntryTest.java
deleted file mode 100644
index 4f747fc3ff..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/row/RowEntryTest.java
+++ /dev/null
@@ -1,109 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.datasets.row;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataEntry;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row.RowEntry;
-
-import junit.framework.TestCase;
-
-public class RowEntryTest extends TestCase {
- public RowEntryTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- entry = new RowEntry();
- data = new Integer[] {new Integer(2), new Integer(5), new Integer(4)};
- entry.putRow(0, data);
- }
-
- public void testGetRowCount() {
- RowEntry entry2 = new RowEntry();
- assertEquals(0, entry2.getRowCount());
-
- entry2 = new RowEntry();
- entry2.putRow(0, null);
- assertEquals(0, entry2.getRowCount());
-
- assertEquals(1, entry.getRowCount());
- }
-
- public void testGetColCount() {
- RowEntry entry2 = new RowEntry();
- assertEquals(0, entry2.getColCount());
-
- entry2 = new RowEntry();
- entry2.putRow(0, null);
- assertEquals(0, entry2.getColCount());
-
- assertEquals(3, entry.getColCount());
- }
-
- public void testGet() {
- assertEquals(data[1], entry.get(null, 1));
- assertEquals(data[1], entry.get("asdf", 1));
- assertNull(entry.get(null, 10));
- assertNull(entry.get(null, -1));
- }
-
- public void testGetRow() {
- assertEquals(data, entry.getRow(0));
- assertNull(entry.getRow(10));
- assertNull(entry.getRow(-1));
-
- assertEquals(data, entry.getRow(null));
- assertEquals(data, entry.getRow("asdf"));
- }
-
- public void testGetColumn() {
- assertEquals(data[1], entry.getColumn(1)[0]);
- assertNull(entry.getColumn(10));
- assertNull(entry.getColumn(-1));
- }
-
- public void testGetData() {
- assertEquals(data[0], entry.getData()[0][0]);
- assertEquals(data[1], entry.getData()[0][1]);
- }
-
- public void testCopy() {
- IDataEntry entry2 = entry.copy();
- assertEquals(entry2.getRowCount(), entry.getRowCount());
- assertEquals(entry2.getColCount(), entry.getColCount());
- assertSame(entry2.getRow(0)[1], entry.getRow(0)[1]);
- }
-
- public void testPutRow() {
- Integer[] data2 = new Integer[] {new Integer(2), new Integer(5)};
-
- //Can't add to -1 position
- entry.putRow(-1, data2);
- assertEquals(3, entry.getColCount());
-
- //Cant add to non 0 position
- entry.putRow(10, data2);
- assertEquals(3, entry.getColCount());
-
- //Add successful
- entry.putRow(0, data2);
- assertEquals(2, entry.getColCount());
- }
-
- public void testRemove() {
- assertFalse(entry.remove(-1));
- assertEquals(3, entry.getColCount());
- assertFalse(entry.remove(10));
- assertEquals(3, entry.getColCount());
-
- assertTrue(entry.remove(0));
- assertEquals(0, entry.getColCount());
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- RowEntry entry;
- Integer[] data;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/row/RowParserTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/row/RowParserTest.java
deleted file mode 100644
index 6158edaec4..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/row/RowParserTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.datasets.row;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataEntry;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row.RowDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row.RowParser;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.XMLMemento;
-
-
-import junit.framework.TestCase;
-
-public class RowParserTest extends TestCase {
- public RowParserTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- parser = new RowParser(new String[] {"\\d+", "(\\D+)", "\\d+", "\\D+"});
-
- IMemento m = XMLMemento.createWriteRoot("a");
- parser.saveXML(m);
- parser2 = new RowParser(m);
- }
-
- public void testParse() {
- assertNull(parser.parse(null));
- assertNull(parser.parse(new StringBuilder("")));
- assertNull(parser.parse(new StringBuilder("asdf")));
- assertNull(parser.parse(new StringBuilder("1, ")));
- assertNull(parser.parse(new StringBuilder("1, 3")));
-
- IDataEntry entry = parser.parse(new StringBuilder("1, (2), 3, 4, 5"));
- assertNotNull(entry);
- assertEquals(2, entry.getColCount());
- assertEquals(1, entry.getRowCount());
- assertEquals("1", entry.getRow(0)[0]);
-
- entry = parser2.parse(new StringBuilder("1, 2, 3, 4, 5"));
- assertNotNull(entry);
- assertEquals(2, entry.getColCount());
- assertEquals(1, entry.getRowCount());
- assertEquals("1", entry.getRow(0)[0]);
- }
-
- public void testSaveXML() {
- IMemento m = XMLMemento.createWriteRoot("a");
- parser.saveXML(m);
- assertSame(RowDataSet.ID, m.getString("dataset"));
-
- IMemento[] children = m.getChildren("Series");
- assertEquals(2, children.length);
- assertSame("\\d+", children[0].getString("parsingExpression"));
- assertSame("(\\D+)", children[0].getString("parsingSpacer"));
- assertSame("\\d+", children[1].getString("parsingExpression"));
- assertSame("\\D+", children[1].getString("parsingSpacer"));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- RowParser parser;
- RowParser parser2;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/table/FilteredTableDataSetTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/table/FilteredTableDataSetTest.java
deleted file mode 100644
index 16ab53c76f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/table/FilteredTableDataSetTest.java
+++ /dev/null
@@ -1,267 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.datasets.table;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row.RowDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row.RowEntry;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.table.FilteredTableDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.table.TableDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.table.TableEntry;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.IDataSetFilter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.RangeFilter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.SortFilter;
-
-import junit.framework.TestCase;
-
-public class FilteredTableDataSetTest extends TestCase {
- public FilteredTableDataSetTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- data = new TableDataSet(new String[] {"a", "b", "c"});
- dataSet = new FilteredTableDataSet(data);
- }
-
- public void testFilteredDataSet() {
- FilteredTableDataSet fds = new FilteredTableDataSet(new String[] {"a", "b", "c"});
- assertNotNull(fds);
- assertNotNull(fds.getTitles());
- }
-
- public void testAppend() {
- TableEntry entry;
-
- entry = new TableEntry();
- entry.add(new Integer[] {new Integer(3), new Integer(2), new Integer(5)});
- dataSet.append(entry);
- entry = new TableEntry();
- entry.add(new Integer[] {new Integer(4), new Integer(2), new Integer(3)});
- dataSet.append(entry);
- entry = new TableEntry();
- entry.add(new Integer[] {new Integer(7), new Integer(2), new Integer(9)});
- dataSet.append(entry);
- entry = new TableEntry();
- entry.add(new Integer[] {new Integer(2), new Integer(2), new Integer(6)});
- dataSet.append(entry);
- entry = new TableEntry();
- entry.add(new Integer[] {new Integer(5), new Integer(2), new Integer(2)});
- dataSet.append(entry);
-
- Object[] row = dataSet.getRow(0);
- assertEquals(5, ((Integer)row[0]).intValue());
- assertEquals(2, ((Integer)row[2]).intValue());
-
- assertNull(dataSet.getRow(2));
- }
-
- public void testRemove() {
- assertFalse(dataSet.remove(null));
- assertFalse(dataSet.remove(new RowEntry()));
- assertFalse(dataSet.remove(-1));
- assertFalse(dataSet.remove(10));
- assertEquals(0, dataSet.getEntryCount());
-
- TableEntry entry= new TableEntry();
- entry.add(new String[] {"1", "2", "3"});
- data.append(entry);
-
- entry = (TableEntry)data.getEntry(0);
- assertEquals(1, dataSet.getEntryCount());
- assertTrue(dataSet.remove(entry));
- assertEquals(0, dataSet.getEntryCount());
- assertFalse(dataSet.remove(entry));
- assertFalse(dataSet.remove(0));
- }
- //End overwrite methods to insure data is removed from the original DataSet
- public void testGetHistoricalData() {
- TableEntry entry = new TableEntry();
- entry.putRow(0, new String[] {"1", "2", "3"});
- dataSet.setData(entry);
- entry = new TableEntry();
- entry.putRow(0, new String[] {"4", "5", "6"});
- dataSet.setData(entry);
-
- assertNull(dataSet.getHistoricalData(null, -3));
- assertNull(dataSet.getHistoricalData(null, 10));
-
- assertNull(dataSet.getHistoricalData(null, -3, 0, 1));
- assertNull(dataSet.getHistoricalData(null, 10, 0, 1));
- assertNull(dataSet.getHistoricalData(null, 1, 3, 1));
- assertNull(dataSet.getHistoricalData(null, 1, -2, 1));
- assertNull(dataSet.getHistoricalData(null, 1, 0, 20));
-
- Object[] col = dataSet.getHistoricalData(null, 0);
- assertEquals(2, col.length);
- assertEquals("0", col[0].toString());
- assertEquals("0", col[1].toString());
-
- col = dataSet.getHistoricalData(null, TableDataSet.COL_ROW_NUM);
- assertEquals(2, col.length);
- assertEquals("1", col[0].toString());
- assertEquals("2", col[1].toString());
-
- col = dataSet.getHistoricalData("4", 1, 1, 2);
- assertEquals(1, col.length);
- assertSame("5", col[0]);
- }
-
- public void testGetEntryCount() {
- assertEquals(0, dataSet.getEntryCount());
- }
-
- public void testGetEntry() {
- assertNull(dataSet.getEntry(-1));
- assertNull(dataSet.getEntry(20));
- }
-
- public void testGetData() {
- TableEntry entry= new TableEntry();
- entry.add(new String[] {"1", "2", "3"});
- data.append(entry);
-
- Object[][] d = dataSet.getData();
- assertNotNull(d);
- assertEquals(1, d.length);
- assertEquals("3", d[0][2]);
- }
-
- //Overwrite to ensure the data returned has all the filters applied
- public void testGetColumn() {
- TableEntry entry= new TableEntry();
- entry.add(new String[] {"1", "2", "3"});
- data.append(entry);
-
- assertNull(dataSet.getColumn(-3));
- assertNull(dataSet.getColumn(10));
-
- assertNull(dataSet.getColumn(-3, 0, 1));
- assertNull(dataSet.getColumn(10, 0, 1));
- assertNull(dataSet.getColumn(1, 3, 1));
- assertNull(dataSet.getColumn(1, -2, 1));
- assertNull(dataSet.getColumn(1, 0, 20));
-
- Object[] col = dataSet.getColumn(0);
- assertEquals(1, col.length);
- assertSame("1", col[0]);
-
- col = dataSet.getColumn(RowDataSet.COL_ROW_NUM);
- assertEquals(1, col.length);
- assertEquals("1", col[0].toString());
-
- col = dataSet.getColumn(1, 0, 1);
- assertEquals(1, col.length);
- assertSame("2", col[0]);
- }
-
- public void testAddFilter() {
- TableEntry entry;
-
- entry = new TableEntry();
- entry.add(new Integer[] {new Integer(3), new Integer(2), new Integer(5)});
- dataSet.append(entry);
- entry = new TableEntry();
- entry.add(new Integer[] {new Integer(4), new Integer(2), new Integer(3)});
- dataSet.append(entry);
- entry = new TableEntry();
- entry.add(new Integer[] {new Integer(7), new Integer(2), new Integer(9)});
- dataSet.append(entry);
- entry = new TableEntry();
- entry.add(new Integer[] {new Integer(2), new Integer(2), new Integer(6)});
- dataSet.append(entry);
- entry = new TableEntry();
- entry.add(new Integer[] {new Integer(5), new Integer(2), new Integer(2)});
- dataSet.append(entry);
-
- dataSet.addFilter(new RangeFilter(0, new Integer(3), new Integer(4), RangeFilter.INCLUSIVE | RangeFilter.INSIDE_BOUNDS));
- assertEquals(0, dataSet.getRowCount());
- dataSet.clearFilters();
- dataSet.addFilter(new RangeFilter(0, new Integer(3), new Integer(5), RangeFilter.INCLUSIVE | RangeFilter.INSIDE_BOUNDS));
-
- assertEquals(1, dataSet.getRowCount());
- Object[] row = dataSet.getRow(0);
- assertEquals(5, ((Integer)row[0]).intValue());
- assertEquals(2, ((Integer)row[2]).intValue());
- }
-
- public void testRemoveFilter() {
- TableEntry entry;
-
- entry = new TableEntry();
- entry.add(new Integer[] {new Integer(3), new Integer(2), new Integer(5)});
- dataSet.append(entry);
- entry = new TableEntry();
- entry.add(new Integer[] {new Integer(4), new Integer(2), new Integer(3)});
- dataSet.append(entry);
- entry = new TableEntry();
- entry.add(new Integer[] {new Integer(7), new Integer(2), new Integer(9)});
- dataSet.append(entry);
- entry = new TableEntry();
- entry.add(new Integer[] {new Integer(2), new Integer(2), new Integer(6)});
- dataSet.append(entry);
- entry = new TableEntry();
- entry.add(new Integer[] {new Integer(5), new Integer(2), new Integer(2)});
- dataSet.append(entry);
-
- RangeFilter filter = new RangeFilter(0, new Integer(3), new Integer(5), RangeFilter.INCLUSIVE | RangeFilter.INSIDE_BOUNDS);
- dataSet.addFilter(filter);
- dataSet.addFilter(new SortFilter(2, SortFilter.ASCENDING));
- dataSet.removeFilter(filter);
-
- assertEquals(1, dataSet.getRowCount());
- Object[] row = dataSet.getRow(0);
- assertEquals(5, ((Integer)row[0]).intValue());
- assertEquals(2, ((Integer)row[2]).intValue());
- }
-
- public void testClearFilters() {
- TableEntry entry;
-
- entry = new TableEntry();
- entry.add(new Integer[] {new Integer(3), new Integer(2), new Integer(5)});
- dataSet.append(entry);
- entry = new TableEntry();
- entry.add(new Integer[] {new Integer(4), new Integer(2), new Integer(3)});
- dataSet.append(entry);
- entry = new TableEntry();
- entry.add(new Integer[] {new Integer(7), new Integer(2), new Integer(9)});
- dataSet.append(entry);
- entry = new TableEntry();
- entry.add(new Integer[] {new Integer(2), new Integer(2), new Integer(6)});
- dataSet.append(entry);
- entry = new TableEntry();
- entry.add(new Integer[] {new Integer(5), new Integer(2), new Integer(2)});
- dataSet.append(entry);
-
- dataSet.addFilter(new RangeFilter(0, new Integer(3), new Integer(5), RangeFilter.INCLUSIVE | RangeFilter.INSIDE_BOUNDS));
- dataSet.addFilter(new SortFilter(2, SortFilter.ASCENDING));
-
- assertEquals(2, dataSet.getFilters().length);
- dataSet.clearFilters();
-
- assertEquals(1, dataSet.getRowCount());
- Object[] row = dataSet.getRow(0);
- assertEquals(5, ((Integer)row[0]).intValue());
- assertEquals(2, ((Integer)row[2]).intValue());
- assertEquals(0, dataSet.getFilters().length);
- }
-
- public void testGetFilters() {
- assertEquals(0, dataSet.getFilters().length);
-
- RangeFilter filter1 = new RangeFilter(0, new Integer(3), new Integer(5), RangeFilter.INCLUSIVE | RangeFilter.INSIDE_BOUNDS);
- SortFilter filter2 = new SortFilter(2, SortFilter.ASCENDING);
-
- dataSet.addFilter(filter1);
- dataSet.addFilter(filter2);
-
- IDataSetFilter[] filters = dataSet.getFilters();
- assertEquals(2, filters.length);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- FilteredTableDataSet dataSet;
- TableDataSet data;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/table/TableDataSetTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/table/TableDataSetTest.java
deleted file mode 100644
index 2f1f00c5b9..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/table/TableDataSetTest.java
+++ /dev/null
@@ -1,164 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.datasets.table;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataEntry;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.table.TableDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.table.TableEntry;
-
-import junit.framework.TestCase;
-
-public class TableDataSetTest extends TestCase {
- public TableDataSetTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- data = new TableDataSet(new String[] {"a", "b", "c"});
- entry0 = new TableEntry();
- entry0.putRow(0, new String[] {"1", "2", "3"});
- data.setData(entry0);
- TableEntry entry = new TableEntry();
- entry.putRow(0, new String[] {"4", "5", "6"});
- data.setData(entry);
- }
-
- public void testSetData() {
- assertEquals(2, data.getEntryCount());
- TableEntry entry = new TableEntry();
- entry.putRow(0, new String[] {"1", "2", "3"});
- data.setData(entry);
- assertEquals(3, data.getEntryCount());
- }
-
- public void testAppend() {
- assertEquals(2, data.getEntryCount());
- TableEntry entry = new TableEntry();
- entry.putRow(0, new String[] {"1", "2", "3"});
- data.append(entry);
- assertEquals(3, data.getEntryCount());
- }
-
- public void testGetTitles() {
- String[] titles = data.getTitles();
- assertEquals(3, titles.length);
- assertSame("a", titles[0]);
- }
-
- public void testGetColumn() {
- assertNull(data.getColumn(-3));
- assertNull(data.getColumn(10));
-
- assertNull(data.getColumn(-3, 0, 1));
- assertNull(data.getColumn(10, 0, 1));
- assertNull(data.getColumn(1, 3, 1));
- assertNull(data.getColumn(1, -2, 1));
- assertNull(data.getColumn(1, 0, 20));
-
- Object[] col = data.getColumn(0);
- assertEquals(1, col.length);
- assertSame("4", col[0]);
-
- col = data.getColumn(TableDataSet.COL_ROW_NUM);
- assertEquals(1, col.length);
- assertEquals("1", col[0].toString());
-
- col = data.getColumn(1, 0, 1);
- assertEquals(1, col.length);
- assertSame("5", col[0]);
- }
-
- public void testGetRow() {
- assertNull(data.getRow(-3));
- assertNull(data.getRow(10));
-
- assertNull(data.getRow(1));
-
- Object[] row = data.getRow(0);
- assertEquals(3, row.length);
- assertSame("5", row[1]);
- }
-
- public void testGetRowCount() {
- assertEquals(1, data.getRowCount());
- }
-
- public void testGetColCount() {
- assertEquals(3, data.getColCount());
-
- assertEquals(0, new TableDataSet(null).getColCount());
- }
-
- public void testReadFromFile() {}
-
- public void testWriteToFile() {}
-
- public void testGetID() {
- assertEquals(TableDataSet.ID, data.getID());
- }
- //End IDataSet Methods
-
- //IHistoricalDataSet Methods
- public void testGetHistoricalData() {
- assertNull(data.getHistoricalData(null, -3));
- assertNull(data.getHistoricalData(null, 10));
-
- assertNull(data.getHistoricalData(null, -3, 0, 1));
- assertNull(data.getHistoricalData(null, 10, 0, 1));
- assertNull(data.getHistoricalData(null, 1, 3, 1));
- assertNull(data.getHistoricalData(null, 1, -2, 1));
- assertNull(data.getHistoricalData(null, 1, 0, 20));
-
- Object[] col = data.getHistoricalData(null, 0);
- assertEquals(2, col.length);
- assertEquals("0", col[0].toString());
- assertEquals("0", col[1].toString());
-
- col = data.getHistoricalData(null, TableDataSet.COL_ROW_NUM);
- assertEquals(2, col.length);
- assertEquals("1", col[0].toString());
- assertEquals("2", col[1].toString());
-
- col = data.getHistoricalData("4", 1, 1, 2);
- assertEquals(1, col.length);
- assertSame("5", col[0]);
- }
-
- public void testGetEntryCount() {
- assertEquals(2, data.getEntryCount());
- }
-
- public void testRemove() {
- assertFalse(data.remove(null));
- assertFalse(data.remove(new TableEntry()));
- assertFalse(data.remove(-1));
- assertFalse(data.remove(10));
- assertEquals(2, data.getEntryCount());
-
- IDataEntry entry = data.getEntry(0);
- assertTrue(data.remove(entry));
- assertEquals(1, data.getEntryCount());
- assertFalse(data.remove(entry));
- assertTrue(data.remove(0));
- }
-
- public void testGetEntry() {
- assertNull(data.getEntry(-1));
- assertNull(data.getEntry(20));
- assertEquals(entry0, data.getEntry(0));
- }
-
- public void testGetData() {
- Object[][] d = data.getData();
- assertNotNull(d);
- assertEquals(1, d.length);
- assertEquals("6", d[0][2]);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- TableDataSet data;
- TableEntry entry0;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/table/TableEntryTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/table/TableEntryTest.java
deleted file mode 100644
index a42dab9d42..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/table/TableEntryTest.java
+++ /dev/null
@@ -1,125 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.datasets.table;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataEntry;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.table.TableEntry;
-
-import junit.framework.TestCase;
-
-public class TableEntryTest extends TestCase {
- public TableEntryTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- entry = new TableEntry();
- data = new Integer[] {new Integer(2), new Integer(5), new Integer(4)};
- entry.add(data);
- data = new Integer[] {new Integer(5), new Integer(1), new Integer(3)};
- entry.add(data);
- }
-
- public void testGetRowCount() {
- TableEntry entry2 = new TableEntry();
- assertEquals(0, entry2.getRowCount());
-
- entry2 = new TableEntry();
- entry2.putRow(0, null);
- assertEquals(0, entry2.getRowCount());
-
- assertEquals(2, entry.getRowCount());
- }
-
- public void testGetColCount() {
- TableEntry entry2 = new TableEntry();
- assertEquals(0, entry2.getColCount());
-
- entry2 = new TableEntry();
- entry2.putRow(0, null);
- assertEquals(0, entry2.getColCount());
-
- assertEquals(3, entry.getColCount());
- }
-
- public void testGet() {
- assertNull(entry.get(null, 1));
- assertNull(entry.get("asdf", 1));
- assertNull(entry.get(null, 10));
- assertNull(entry.get(null, -1));
- assertEquals("5", entry.get("2", 1).toString());
- }
-
- public void testGetData() {
- assertEquals(data[0], entry.getData()[1][0]);
- assertEquals(data[1], entry.getData()[1][1]);
- }
-
- public void testGetRow() {
- assertNull(entry.getRow(10));
- assertNull(entry.getRow(-1));
- assertNotNull(entry.getRow(0));
- assertEquals(data, entry.getRow(1));
-
- assertNull(entry.getRow(null));
- assertNull(entry.getRow("asdf"));
- assertNotNull(entry.getRow("2"));
- assertEquals(data, entry.getRow("5"));
- }
-
- public void testGetColumn() {
- assertEquals(data[1], entry.getColumn(1)[1]);
- assertNull(entry.getColumn(10));
- assertNull(entry.getColumn(-1));
- }
-
- public void testPutRow() {
- Integer[] data2 = new Integer[] {new Integer(2), new Integer(5)};
-
- //Can't add to -1 position
- entry.putRow(-1, data2);
- assertEquals(2, entry.getRowCount());
-
- //Cant add wrong sized array
- entry.putRow(10, data2);
- assertEquals(2, entry.getRowCount());
-
- entry.putRow(0, data2);
- assertEquals(2, entry.getRowCount());
-
- //Add successful
- data2 = new Integer[] {new Integer(2), new Integer(5), new Integer(6)};
- entry.putRow(0, data2);
- assertEquals(2, entry.getRowCount());
- }
-
- public void testAdd() {
- Integer[] data2 = new Integer[] {new Integer(2), new Integer(5)};
- entry.add(data2);
- assertEquals(2, entry.getRowCount());
-
- //Add successful
- data2 = new Integer[] {new Integer(2), new Integer(5), new Integer(6)};
- entry.add(data2);
- assertEquals(3, entry.getRowCount());
- }
-
- public void testCopy() {
- IDataEntry entry2 = entry.copy();
- assertEquals(entry2.getRowCount(), entry.getRowCount());
- assertEquals(entry2.getColCount(), entry.getColCount());
- assertSame(entry2.getRow(0)[1], entry.getRow(0)[1]);
- }
-
- public void testRemove() {
- assertTrue(entry.remove(0));
- assertEquals(1, entry.getRowCount());
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- TableEntry entry;
- Integer[] data;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/table/TableParserTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/table/TableParserTest.java
deleted file mode 100644
index a5f2a64901..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/datasets/table/TableParserTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.datasets.table;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataEntry;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.table.TableDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.table.TableParser;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.XMLMemento;
-
-
-import junit.framework.TestCase;
-
-public class TableParserTest extends TestCase {
- public TableParserTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- parser = new TableParser(new String[] {"\\d+", "(\\D+)", "\\d+", "\\D+"}, "\n\n");
-
- IMemento m = XMLMemento.createWriteRoot("a");
- parser.saveXML(m);
- parser2 = new TableParser(m);
- }
-
- public void testParse() {
- assertNull(parser.parse(null));
- assertNull(parser.parse(new StringBuilder("")));
- assertNull(parser.parse(new StringBuilder("asdf")));
- assertNull(parser.parse(new StringBuilder("1, ")));
- assertNull(parser.parse(new StringBuilder("1, 3")));
-
- IDataEntry entry = parser.parse(new StringBuilder("1, (2), 3, 4, 5\n\n"));
- assertNotNull(entry);
- assertEquals(2, entry.getColCount());
- assertEquals(2, entry.getRowCount());
- assertEquals("1", entry.getRow(0)[0]);
-
- entry = parser2.parse(new StringBuilder("1, 2, 3, 4, 5\n\n"));
- assertNotNull(entry);
- assertEquals(2, entry.getColCount());
- assertEquals(2, entry.getRowCount());
- assertEquals("1", entry.getRow(0)[0]);
- }
-
- public void testSaveXML() {
- IMemento m = XMLMemento.createWriteRoot("a");
- parser.saveXML(m);
- assertSame(TableDataSet.ID, m.getString("dataset"));
-
- IMemento[] children = m.getChildren("Series");
- assertEquals(2, children.length);
- assertSame("\\d+", children[0].getString("parsingExpression"));
- assertSame("(\\D+)", children[0].getString("parsingSpacer"));
- assertSame("\\d+", children[1].getString("parsingExpression"));
- assertSame("\\D+", children[1].getString("parsingSpacer"));
-
- IMemento child = m.getChild("Delimiter");
- assertSame("\n\n", child.getString("parsingExpression"));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- TableParser parser;
- TableParser parser2;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/filters/MatchFilterTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/filters/MatchFilterTest.java
deleted file mode 100644
index 2bd69f2b6a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/filters/MatchFilterTest.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.filters;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.MatchFilter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.MockDataSet;
-import org.eclipse.ui.XMLMemento;
-
-
-import junit.framework.TestCase;
-
-public class MatchFilterTest extends TestCase {
- public MatchFilterTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- public void testMatchFilter() {
- MatchFilter filter = new MatchFilter(-1, null, MatchFilter.KEEP_MATCHING);
- assertNotNull(filter);
- }
-
- public void testFilter() {
- int width = 4;
- int height = 10;
- int wrap = height / 3;
- ArrayList[] data = MockDataSet.buildArray(width, height, wrap);
-
- assertEquals(width, data.length);
- assertEquals(height, data[0].size());
- MatchFilter filter = new MatchFilter(0, data[0].get(0), MatchFilter.KEEP_MATCHING);
- ArrayList[] data2 = filter.filter(data);
-
- assertEquals(width, data.length);
- assertEquals(height, data[0].size());
- assertEquals(width, data2.length);
- assertEquals((int)Math.ceil(height/((double)wrap)), data2[0].size());
- assertEquals("0", data2[0].get(0));
- assertEquals("0", data2[0].get(1));
- assertEquals("0", data2[0].get(2));
- assertEquals("0", data2[0].get(3));
-
- assertEquals(data[2].get(0), data2[2].get(0));
- assertEquals(data[2].get(3), data2[2].get(1));
- assertEquals(data[2].get(6), data2[2].get(2));
- assertEquals(data[2].get(9), data2[2].get(3));
-
- filter = new MatchFilter(-1, "", MatchFilter.KEEP_MATCHING);
- assertNull(filter.filter(data));
- }
-
- public void testGetID() {
- MatchFilter filter = new MatchFilter(0, "", MatchFilter.KEEP_MATCHING);
- assertTrue(MatchFilter.ID.equals(filter.getID()));
- }
-
- public void testWriteXML() {
- MatchFilter filter = new MatchFilter(0, "", MatchFilter.KEEP_MATCHING);
- filter.writeXML(XMLMemento.createWriteRoot("test"));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/filters/RangeFilterTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/filters/RangeFilterTest.java
deleted file mode 100644
index faa5982c6e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/filters/RangeFilterTest.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.filters;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.RangeFilter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.MockDataSet;
-import org.eclipse.ui.XMLMemento;
-
-
-import junit.framework.TestCase;
-
-public class RangeFilterTest extends TestCase {
- public RangeFilterTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- filter = new RangeFilter(0, new Integer(1), new Integer(2), RangeFilter.INSIDE_BOUNDS | RangeFilter.INCLUSIVE);
- }
-
- public void testRangeFilter() {
- RangeFilter filter = new RangeFilter(-1, new Integer(3), new Integer(5), RangeFilter.INSIDE_BOUNDS);
- assertNotNull(filter);
- }
-
- public void testFilter() {
- int width = 4;
- int height = 10;
- int wrap = height / 3;
- ArrayList[] data = MockDataSet.buildArray(width, height, wrap);
-
- assertEquals(width, data.length);
- assertEquals(height, data[0].size());
- ArrayList[] data2 = filter.filter(data);
-
- assertEquals(width, data.length);
- assertEquals(height, data[0].size());
- assertEquals(width, data2.length);
- assertEquals(6, data2[0].size());
- assertEquals("1", data2[0].get(0));
- assertEquals("2", data2[0].get(1));
- assertEquals("1", data2[0].get(2));
- assertEquals("2", data2[0].get(3));
-
- assertEquals(data[2].get(1), data2[2].get(0));
- assertEquals(data[2].get(2), data2[2].get(1));
- assertEquals(data[2].get(4), data2[2].get(2));
- assertEquals(data[2].get(5), data2[2].get(3));
-
-
- filter = new RangeFilter(0, new Integer(0), new Integer(2), RangeFilter.INSIDE_BOUNDS);
- data2 = filter.filter(data);
-
- assertEquals(width, data.length);
- assertEquals(height, data[0].size());
- assertEquals(width, data2.length);
- assertEquals(3, data2[0].size());
- assertEquals("1", data2[0].get(0));
- assertEquals("1", data2[0].get(1));
- assertEquals("1", data2[0].get(2));
-
- assertEquals(data[2].get(1), data2[2].get(0));
- assertEquals(data[2].get(4), data2[2].get(1));
- assertEquals(data[2].get(7), data2[2].get(2));
-
-
- filter = new RangeFilter(0, new Integer(0), new Integer(2), RangeFilter.OUTSIDE_BOUNDS | RangeFilter.INCLUSIVE);
- data2 = filter.filter(data);
-
- assertEquals(width, data.length);
- assertEquals(height, data[0].size());
- assertEquals(width, data2.length);
- assertEquals(7, data2[0].size());
- assertEquals("0", data2[0].get(0));
- assertEquals("2", data2[0].get(1));
- assertEquals("0", data2[0].get(2));
- assertEquals("2", data2[0].get(3));
-
- assertEquals(data[2].get(0), data2[2].get(0));
- assertEquals(data[2].get(2), data2[2].get(1));
- assertEquals(data[2].get(3), data2[2].get(2));
- assertEquals(data[2].get(5), data2[2].get(3));
-
-
- filter = new RangeFilter(0, new Integer(0), new Integer(2), RangeFilter.INSIDE_BOUNDS);
- data2 = filter.filter(data);
-
- assertEquals(width, data.length);
- assertEquals(height, data[0].size());
- assertEquals(width, data2.length);
- assertEquals(3, data2[0].size());
- assertEquals("1", data2[0].get(0));
- assertEquals("1", data2[0].get(1));
- assertEquals("1", data2[0].get(2));
-
- assertEquals(data[2].get(1), data2[2].get(0));
- assertEquals(data[2].get(4), data2[2].get(1));
- assertEquals(data[2].get(7), data2[2].get(2));
-
-
- filter = new RangeFilter(0, new Integer(0), new Integer(2), RangeFilter.OUTSIDE_BOUNDS);
- data2 = filter.filter(data);
-
- assertEquals(width, data.length);
- assertEquals(height, data[0].size());
- assertEquals(width, data2.length);
- assertEquals(0, data2[0].size());
-
-
- filter = new RangeFilter(-1, new Integer(1), new Integer(3), 0);
- assertNull(filter.filter(data));
- }
-
- public void testGetID() {
- assertTrue(RangeFilter.ID.equals(filter.getID()));
- }
-
- public void testWriteXML() {
- filter.writeXML(XMLMemento.createWriteRoot("test"));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- RangeFilter filter;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/filters/SortFilterTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/filters/SortFilterTest.java
deleted file mode 100644
index 5d2fcc1788..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/filters/SortFilterTest.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.filters;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.SortFilter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.MockDataSet;
-import org.eclipse.ui.XMLMemento;
-
-
-import junit.framework.TestCase;
-
-public class SortFilterTest extends TestCase {
- public SortFilterTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- filter = new SortFilter(0, SortFilter.ASCENDING);
- }
-
- public void testSortFilter() {
- SortFilter filter = new SortFilter(-1, SortFilter.ASCENDING);
- assertNotNull(filter);
- }
-
- @SuppressWarnings("unchecked")
- public void testFilter() {
- int width = 4;
- int height = 10;
- int wrap = height / 3;
- ArrayList[] data = MockDataSet.buildArray(width, height, wrap);
-
- assertEquals(width, data.length);
- assertEquals(height, data[0].size());
- ArrayList[] data2 = filter.filter(data);
-
- assertEquals(width, data.length);
- assertEquals(height, data[0].size());
- assertEquals(width, data2.length);
- assertEquals(height, data2[0].size());
- assertEquals("0", data2[0].get(0));
- assertEquals("0", data2[0].get(1));
- assertEquals("0", data2[0].get(2));
- assertEquals("0", data2[0].get(3));
- assertEquals("1", data2[0].get(4));
- assertEquals("2", data2[0].get(7));
-
- assertEquals(data[2].get(0), data2[2].get(0));
- assertEquals(data[2].get(3), data2[2].get(1));
- assertEquals(data[2].get(6), data2[2].get(2));
- assertEquals(data[2].get(9), data2[2].get(3));
-
-
- filter = new SortFilter(0, SortFilter.DESCENDING);
- data2 = filter.filter(data);
-
- assertEquals(width, data.length);
- assertEquals(height, data[0].size());
- assertEquals(width, data2.length);
- assertEquals(height, data2[0].size());
- assertEquals("2", data2[0].get(0));
- assertEquals("2", data2[0].get(1));
- assertEquals("2", data2[0].get(2));
- assertEquals("1", data2[0].get(3));
- assertEquals("0", data2[0].get(7));
-
- assertEquals(data[2].get(2), data2[2].get(0));
- assertEquals(data[2].get(5), data2[2].get(1));
- assertEquals(data[2].get(8), data2[2].get(2));
- assertEquals(data[2].get(9), data2[2].get(7));
-
- filter = new SortFilter(-1, 0);
- assertNull(filter.filter(data));
-
- data[0].add("a");
- data[0].add("a");
- data[1].add("b");
- data[1].add("c");
- filter = new SortFilter(0, 0);
- assertNotNull(filter.filter(data));
- }
-
- public void testGetID() {
- assertTrue(SortFilter.ID.equals(filter.getID()));
- }
-
- public void testWriteXML() {
- filter.writeXML(XMLMemento.createWriteRoot("test"));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- filter = null;
- }
-
- SortFilter filter;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/filters/UniqueFilterTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/filters/UniqueFilterTest.java
deleted file mode 100644
index 3cd62d11c8..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/filters/UniqueFilterTest.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.filters;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates.MaxAggregate;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates.SumAggregate;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.UniqueFilter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.MockDataSet;
-import org.eclipse.ui.XMLMemento;
-
-
-import junit.framework.TestCase;
-
-public class UniqueFilterTest extends TestCase {
- public UniqueFilterTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- filter = new UniqueFilter(0, new SumAggregate(), 0);
- }
-
- public void testUniqueFilter() {
- filter = new UniqueFilter(-1, new MaxAggregate(), 0);
- assertNotNull(filter);
- }
-
- @SuppressWarnings("unchecked")
- public void testFilter() {
- int width = 4;
- int height = 10;
- int wrap = height / 3;
- ArrayList[] data = MockDataSet.buildArray(width, height, wrap);
-
- assertEquals(width, data.length);
- assertEquals(height, data[0].size());
-
- ArrayList[] data2 = filter.filter(data);
-
- assertEquals(width, data.length);
- assertEquals(height, data[0].size());
- assertEquals(width, data2.length);
- assertEquals(wrap, data2[0].size());
- assertEquals("1", data2[0].get(0));
- assertEquals("2", data2[0].get(1));
- assertEquals("0", data2[0].get(2));
-
- assertEquals(0, ((Number)data2[2].get(0)).intValue());
- assertEquals(3, ((Number)data2[2].get(1)).intValue());
- assertEquals(8, ((Number)data2[2].get(2)).intValue());
-
- filter = new UniqueFilter(-1, new SumAggregate(), 0);
- assertNull(filter.filter(null));
-
- data = new ArrayList[2];
- data[0] = new ArrayList();
- data[1] = new ArrayList();
-
- data[0].add("a");
- data[0].add("a");
- data[1].add("b");
- data[1].add("c");
- filter = new UniqueFilter(0, new SumAggregate(), 0);
- assertNotNull(filter.filter(data));
- }
-
- public void testGetID() {
- assertTrue(UniqueFilter.ID.equals(filter.getID()));
- }
-
- public void testWriteXML() {
- filter.writeXML(XMLMemento.createWriteRoot("test"));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- filter = null;
- }
- UniqueFilter filter;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/structures/ChartStreamDaemonTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/structures/ChartStreamDaemonTest.java
deleted file mode 100644
index 6248dc5e13..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/structures/ChartStreamDaemonTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.structures;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row.RowDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row.RowParser;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.ChartStreamDaemon;
-
-import junit.framework.TestCase;
-
-public class ChartStreamDaemonTest extends TestCase {
- public ChartStreamDaemonTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- csd = new ChartStreamDaemon(null, null);
- assertNotNull(csd);
-
- csd1 = new ChartStreamDaemon(new RowDataSet(new String[] {"a"}), new RowParser(new String[] {"\\w", "\\s"}));
- assertNotNull(csd1);
- }
-
- public void testHandleEvent() {
- csd.handleDataEvent("a a a");
- csd1.handleDataEvent("a a a");
- }
-
- public void testIsDisposed() {
- assertFalse(csd1.isDisposed());
- }
-
- public void testDispose() {
- assertFalse(csd1.isDisposed());
- csd1.dispose();
- assertTrue(csd1.isDisposed());
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- private ChartStreamDaemon csd, csd1;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/structures/ChartStreamDaemonTest2.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/structures/ChartStreamDaemonTest2.java
deleted file mode 100644
index 4273854a27..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/structures/ChartStreamDaemonTest2.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.structures;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row.RowDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row.RowParser;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.ChartStreamDaemon2;
-
-import junit.framework.TestCase;
-
-public class ChartStreamDaemonTest2 extends TestCase {
- public ChartStreamDaemonTest2(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- csd = new ChartStreamDaemon2(null, null, null);
- assertNotNull(csd);
-
- csd1 = new ChartStreamDaemon2(null, new RowDataSet(new String[] {"a"}), new RowParser(new String[] {"\\w", "\\s"}));
- assertNotNull(csd1);
- }
-
- public void testHandleEvent() {
- csd.handleDataEvent("a a a");
- csd1.handleDataEvent("a a a");
- }
-
- public void testIsDisposed() {
- assertFalse(csd1.isDisposed());
- }
-
- public void testSetParser() {
- csd1.handleDataEvent("a a a");
- csd1.setParser(new RowDataSet(new String[] {"a"}), new RowParser(new String[] {"\\w", "\\s"}));
- }
-
- public void testDispose() {
- assertFalse(csd1.isDisposed());
- csd1.dispose();
- assertTrue(csd1.isDisposed());
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- private ChartStreamDaemon2 csd, csd1;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/structures/DataPointTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/structures/DataPointTest.java
deleted file mode 100644
index f41bd0dafa..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/structures/DataPointTest.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.structures;
-
-import junit.framework.TestCase;
-
-public class DataPointTest extends TestCase {
- public DataPointTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- public void test() {}
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/structures/GraphDataTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/structures/GraphDataTest.java
deleted file mode 100644
index 286adb246e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/structures/GraphDataTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.structures;
-
-import junit.framework.TestCase;
-
-public class GraphDataTest extends TestCase {
- public GraphDataTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- public void test() {}
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/structures/NumberTypeTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/structures/NumberTypeTest.java
deleted file mode 100644
index 5712834a36..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/structures/NumberTypeTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.structures;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.NumberType;
-
-import junit.framework.TestCase;
-
-public class NumberTypeTest extends TestCase {
- public NumberTypeTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- public void testGetNumber() {
- Number n = NumberType.getNumber(new Integer(3), 3.2);
- assertTrue(n instanceof Integer);
- assertEquals(3, n.intValue());
-
- n = NumberType.getNumber(new Double(3), 3.2);
- assertTrue(n instanceof Double);
- assertEquals(3.2, n.doubleValue(), 0.0);
-
- n = NumberType.getNumber(new Float(3), 3.2);
- assertTrue(n instanceof Float);
- assertEquals(3.2, n.floatValue(), 0.0001);
-
- n = NumberType.getNumber(new Long(3), 3.2);
- assertTrue(n instanceof Long);
- assertEquals(3, n.longValue());
-
- n = NumberType.getNumber(new Byte((byte)3), 3.2);
- assertTrue(n instanceof Byte);
- assertEquals(3, n.byteValue());
-
- n = NumberType.getNumber(new Short((short)3), 3.2);
- assertTrue(n instanceof Short);
- assertEquals(3, n.shortValue());
- }
-
- public void testObj2num() {
- Object[] obj = new Object[] {new Integer(3), new Double(2.3), new Float(4.2)};
- Number[] num = NumberType.obj2num(obj);
-
- assertEquals(0, NumberType.obj2num("a").intValue());
- assertEquals(3, num.length);
- assertTrue(num[0] instanceof Integer);
- assertTrue(num[1] instanceof Double);
- assertTrue(num[2] instanceof Float);
- assertEquals(3, num[0].intValue());
- assertEquals(2.3, num[1].doubleValue(), 0.00001);
- assertEquals(4.2, num[2].doubleValue(), 0.00001);
- }
-
- public void testCleanObj2Num() {
- assertEquals(3, NumberType.cleanObj2Num("3").intValue());
- assertEquals(3.2, NumberType.cleanObj2Num("3.2").doubleValue(), 0.00001);
- assertEquals(3, NumberType.cleanObj2Num(new Integer(3)).intValue());
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/structures/UpdateManagerTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/structures/UpdateManagerTest.java
deleted file mode 100644
index 79e07a367d..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/tests/structures/UpdateManagerTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests.structures;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.*;
-import org.eclipse.linuxtools.systemtap.ui.structures.listeners.IUpdateListener;
-import org.eclipse.linuxtools.systemtap.ui.structures.UpdateManager;
-
-import junit.framework.TestCase;
-
-public class UpdateManagerTest extends TestCase {
- public UpdateManagerTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- manager = new UpdateManager(5);
- }
-
- public void testStop() {
- assertTrue(manager.isRunning());
- manager.stop();
- assertFalse(manager.isRunning());
- }
-
- public void testAddUpdateListener() {
- manager.addUpdateListener(listener);
- }
-
- public void testRemoveUpdateListener() {
- manager.addUpdateListener(listener);
- manager.removeUpdateListener(listener);
- }
-
- public void testIsRunning() {
- assertTrue(manager.isRunning());
- manager.stop();
- assertFalse(manager.isRunning());
- }
-
- public void testDispose() {
- manager.dispose();
- assertFalse(manager.isRunning());
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- manager.stop();
- manager.dispose();
- }
-
- private UpdateManager manager;
- private IUpdateListener listener = new IUpdateListener() {
- public void handleUpdateEvent() {
- //Do nothing;
- }
- };
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/.classpath
deleted file mode 100644
index 64c5e31b7a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/.project b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/.project
deleted file mode 100644
index 832d492a5c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui</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/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/.settings/org.eclipse.jdt.core.prefs b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 316c96002d..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Feb 27 17:29:26 IST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/ChangeLog
deleted file mode 100644
index 360812d163..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/ChangeLog
+++ /dev/null
@@ -1,15 +0,0 @@
-2009-11-16 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Fix Bundle-Name.
-
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Make version 0.3.0.qualifier.
-
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Change provider from IBM to Eclipse.
-
-2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * ChangeLog: Refactoring. Renaming all packages directories from *.systemtapgui.* to *.systemtap.ui.* \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/META-INF/MANIFEST.MF
deleted file mode 100644
index 79bfa253e2..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,21 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: SystemTap Graphing API (non-UI) (Incubation)
-Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui;singleton:=true
-Bundle-Version: 0.3.0.qualifier
-Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.internal.GraphingAPINonUIPlugin
-Bundle-Vendor: Eclipse
-Export-Package: org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui,
- org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.adapters,
- org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates,
- org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets,
- org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row,
- org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.table,
- org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters,
- org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.linuxtools.systemtap.ui.structures
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.linuxtools.systemtap.ui.consolelog.structures
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/build.properties
deleted file mode 100644
index 98def4deb0..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- src/
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/IGraphColorConstants.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/IGraphColorConstants.java
deleted file mode 100644
index 61d8424e8b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/IGraphColorConstants.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui;
-
-import org.eclipse.swt.graphics.RGB;
-
-public interface IGraphColorConstants {
- static final RGB[] COLORS = new RGB[] {
- new RGB(0, 0, 255),
- new RGB(255, 0, 0),
- new RGB(0, 255, 0),
- new RGB(255, 0, 255),
- new RGB(0, 255, 255),
- new RGB(255, 255, 0),
- new RGB(127, 127, 255),
- new RGB(255, 127, 127),
- new RGB(127, 255, 127),
-
- new RGB(255, 255, 255),
- new RGB(255, 255, 204),
- new RGB(255, 255, 153),
- new RGB(255, 255, 102),
- new RGB(255, 255, 51),
- new RGB(255, 255, 0),
- new RGB(255, 204, 255),
- new RGB(255, 204, 204),
- new RGB(255, 204, 153),
- new RGB(255, 204, 102),
- new RGB(255, 204, 51),
- new RGB(255, 204, 0),
- new RGB(255, 153, 255),
- new RGB(255, 153, 204),
- new RGB(255, 153, 153),
- new RGB(255, 153, 102),
- new RGB(255, 153, 51),
- new RGB(255, 153, 0),
- new RGB(255, 102, 255),
- new RGB(255, 102, 204),
- new RGB(255, 102, 153),
- new RGB(255, 102, 102),
- new RGB(255, 102, 51),
- new RGB(255, 102, 0),
- new RGB(255, 51, 255),
- new RGB(255, 51, 204),
- new RGB(255, 51, 153),
- new RGB(255, 51, 102),
- new RGB(255, 51, 51),
- new RGB(255, 51, 0),
- new RGB(255, 0, 255),
- new RGB(255, 0, 204),
- new RGB(255, 0, 153),
- new RGB(255, 0, 102),
- new RGB(255, 0, 51),
- new RGB(255, 0, 0),
- new RGB(204, 255, 255),
- new RGB(204, 255, 204),
- new RGB(204, 255, 153),
- new RGB(204, 255, 102),
- new RGB(204, 255, 51),
- new RGB(204, 255, 0),
- new RGB(204, 204, 255),
- new RGB(204, 204, 204),
- new RGB(204, 204, 153),
- new RGB(204, 204, 102),
- new RGB(204, 204, 51),
- new RGB(204, 204, 0),
- new RGB(204, 153, 255),
- new RGB(204, 153, 204),
- new RGB(204, 153, 153),
- new RGB(204, 153, 102),
- new RGB(204, 153, 51),
- new RGB(204, 153, 0),
- new RGB(204, 102, 255),
- new RGB(204, 102, 204),
- new RGB(204, 102, 153),
- new RGB(204, 102, 102),
- new RGB(204, 102, 51),
- new RGB(204, 102, 0),
- new RGB(204, 51, 255),
- new RGB(204, 51, 204),
- new RGB(204, 51, 153),
- new RGB(204, 51, 102),
- new RGB(204, 51, 51),
- new RGB(204, 51, 0),
- new RGB(204, 0, 255),
- new RGB(204, 0, 204),
- new RGB(204, 0, 153),
- new RGB(204, 0, 102),
- new RGB(204, 0, 51),
- new RGB(204, 0, 0),
- new RGB(153, 255, 255),
- new RGB(153, 255, 204),
- new RGB(153, 255, 153),
- new RGB(153, 255, 102),
- new RGB(153, 255, 51),
- new RGB(153, 255, 0),
- new RGB(153, 204, 255),
- new RGB(153, 204, 204),
- new RGB(153, 204, 153),
- new RGB(153, 204, 102),
- new RGB(153, 204, 51),
- new RGB(153, 204, 0),
- new RGB(153, 153, 255),
- new RGB(153, 153, 204),
- new RGB(153, 153, 153),
- new RGB(153, 153, 102),
- new RGB(153, 153, 51),
- new RGB(153, 153, 0),
- new RGB(153, 102, 255),
- new RGB(153, 102, 204),
- new RGB(153, 102, 153),
- new RGB(153, 102, 102),
- new RGB(153, 102, 51),
- new RGB(153, 102, 0),
- new RGB(153, 51, 255),
- new RGB(153, 51, 204),
- new RGB(153, 51, 153),
- new RGB(153, 51, 102),
- new RGB(153, 51, 51),
- new RGB(153, 51, 0),
- new RGB(153, 0, 255),
- new RGB(153, 0, 204),
- new RGB(153, 0, 153),
- new RGB(153, 0, 102),
- new RGB(153, 0, 51),
- new RGB(153, 0, 0),
- new RGB(102, 255, 255),
- new RGB(102, 255, 204),
- new RGB(102, 255, 153),
- new RGB(102, 255, 102),
- new RGB(102, 255, 51),
- new RGB(102, 255, 0),
- new RGB(102, 204, 255),
- new RGB(102, 204, 204),
- new RGB(102, 204, 153),
- new RGB(102, 204, 102),
- new RGB(102, 204, 51),
- new RGB(102, 204, 0),
- new RGB(102, 153, 255),
- new RGB(102, 153, 204),
- new RGB(102, 153, 153),
- new RGB(102, 153, 102),
- new RGB(102, 153, 51),
- new RGB(102, 153, 0),
- new RGB(102, 102, 255),
- new RGB(102, 102, 204),
- new RGB(102, 102, 153),
- new RGB(102, 102, 102),
- new RGB(102, 102, 51),
- new RGB(102, 102, 0),
- new RGB(102, 51, 255),
- new RGB(102, 51, 204),
- new RGB(102, 51, 153),
- new RGB(102, 51, 102),
- new RGB(102, 51, 51),
- new RGB(102, 51, 0),
- new RGB(102, 0, 255),
- new RGB(102, 0, 204),
- new RGB(102, 0, 153),
- new RGB(102, 0, 102),
- new RGB(102, 0, 51),
- new RGB(102, 0, 0),
- new RGB(51, 255, 255),
- new RGB(51, 255, 204),
- new RGB(51, 255, 153),
- new RGB(51, 255, 102),
- new RGB(51, 255, 51),
- new RGB(51, 255, 0),
- new RGB(51, 204, 255),
- new RGB(51, 204, 204),
- new RGB(51, 204, 153),
- new RGB(51, 204, 102),
- new RGB(51, 204, 51),
- new RGB(51, 204, 0),
- new RGB(51, 153, 255),
- new RGB(51, 153, 204),
- new RGB(51, 153, 153),
- new RGB(51, 153, 102),
- new RGB(51, 153, 51),
- new RGB(51, 153, 0),
- new RGB(51, 102, 255),
- new RGB(51, 102, 204),
- new RGB(51, 102, 153),
- new RGB(51, 102, 102),
- new RGB(51, 102, 51),
- new RGB(51, 102, 0),
- new RGB(51, 51, 255),
- new RGB(51, 51, 204),
- new RGB(51, 51, 153),
- new RGB(51, 51, 102),
- new RGB(51, 51, 51),
- new RGB(51, 51, 0),
- new RGB(51, 0, 255),
- new RGB(51, 0, 204),
- new RGB(51, 0, 153),
- new RGB(51, 0, 102),
- new RGB(51, 0, 51),
- new RGB(51, 0, 0),
- new RGB(0, 255, 255),
- new RGB(0, 255, 204),
- new RGB(0, 255, 153),
- new RGB(0, 255, 102),
- new RGB(0, 255, 51),
- new RGB(0, 255, 0),
- new RGB(0, 204, 255),
- new RGB(0, 204, 204),
- new RGB(0, 204, 153),
- new RGB(0, 204, 102),
- new RGB(0, 204, 51),
- new RGB(0, 204, 0),
- new RGB(0, 153, 255),
- new RGB(0, 153, 204),
- new RGB(0, 153, 153),
- new RGB(0, 153, 102),
- new RGB(0, 153, 51),
- new RGB(0, 153, 0),
- new RGB(0, 102, 255),
- new RGB(0, 102, 204),
- new RGB(0, 102, 153),
- new RGB(0, 102, 102),
- new RGB(0, 102, 51),
- new RGB(0, 102, 0),
- new RGB(0, 51, 255),
- new RGB(0, 51, 204),
- new RGB(0, 51, 153),
- new RGB(0, 51, 102),
- new RGB(0, 51, 51),
- new RGB(0, 51, 0),
- new RGB(0, 0, 255),
- new RGB(0, 0, 204),
- new RGB(0, 0, 153),
- new RGB(0, 0, 102),
- new RGB(0, 0, 51),
- new RGB(0, 0, 0)
- };
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/adapters/BlockAdapter.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/adapters/BlockAdapter.java
deleted file mode 100644
index 137cc5b8e6..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/adapters/BlockAdapter.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.adapters;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IBlockDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.internal.Localization;
-
-public class BlockAdapter implements IAdapter {
- public BlockAdapter(IBlockDataSet data, int xSeries, int[] ySeries) {
- this.data = data;
- this.xSeries = xSeries;
- this.ySeries = ySeries;
- }
-
- public Number getXMax() {
- return getXMax(0, getRecordCount());
- }
-
- public Number getXMax(int start, int end) {
- return getSeriesMax(xSeries, start, end);
- }
-
- public Number getYMax() {
- return getYMax(0, getRecordCount());
- }
-
- public Number getYMax(int start, int end) {
- Number max = new Double(Double.MIN_VALUE);
- Number a;
- for(int i=0; i<ySeries.length; i++) {
- a = getSeriesMax(ySeries[i], start, end);
- max = (max.doubleValue()) > a.doubleValue() ? max : a;
- }
- return max;
- }
-
- public Number getYSeriesMax(int y) {
- return getYSeriesMax(y, 0, getRecordCount());
- }
-
- public Number getYSeriesMax(int y, int start, int end) {
- return getSeriesMax(ySeries[y], start, end);
- }
-
- public Number getSeriesMax(int series) {
- return getSeriesMax(series, 0, getRecordCount());
- }
-
- public Number getSeriesMax(int series, int start, int end) {
- if(start < 0 || end > data.getRowCount() || start > end)
- return null;
-
- Number max = new Double(Double.NEGATIVE_INFINITY);
- Number cur;
-
- Object[] dataColumn = data.getColumn(series, start, end);
- for(int i=0; i<dataColumn.length; i++) {
- try {
- cur = new Double(Double.parseDouble(dataColumn[i].toString()));
- if(max.doubleValue() < cur.doubleValue())
- max = cur;
- } catch (NumberFormatException e) {}
- }
- return max;
- }
-
- public Number getXMin() {
- return getXMin(0, getRecordCount());
- }
-
- public Number getXMin(int start, int end) {
- return getSeriesMin(xSeries, start, end);
- }
-
- public Number getYMin() {
- return getYMin(0, getRecordCount());
- }
-
- public Number getYMin(int start, int end) {
- Number min = new Double(Double.MIN_VALUE);
- Number a;
- for(int i=0; i<ySeries.length; i++) {
- a = getSeriesMin(ySeries[i], start, end);
- min = (min.doubleValue()) < a.doubleValue() ? min : a;
- }
- return min;
- }
-
- public Number getYSeriesMin(int y) {
- return getYSeriesMin(y, 0, getRecordCount());
- }
-
- public Number getYSeriesMin(int y, int start, int end) {
- return getSeriesMin(ySeries[y], start, end);
- }
-
- public Number getSeriesMin(int series) {
- return getSeriesMin(series, 0, getRecordCount());
- }
-
- public Number getSeriesMin(int series, int start, int end) {
- if(start < 0 || end > data.getRowCount() || start > end)
- return null;
-
- Number min = new Double(Double.POSITIVE_INFINITY);
- Number cur;
-
- Object[] dataColumn = data.getColumn(series, start, end);
- for(int i=0; i<dataColumn.length; i++) {
- try {
- cur = new Double(Double.parseDouble(dataColumn[i].toString()));
- if(min.doubleValue() > cur.doubleValue())
- min = cur;
- } catch (NumberFormatException e) {}
- }
- return min;
- }
-
- public String[] getLabels() {
- String[] labels = data.getTitles();
-
- String[] labels2 = new String[ySeries.length + 1];
- labels2[0] = (IDataSet.COL_ROW_NUM == xSeries) ? Localization.getString("BlockAdapter.RowNum") : labels[xSeries];
-
- for(int i=0; i<ySeries.length; i++)
- labels2[i+1] = labels[ySeries[i]];
-
- return labels2;
- }
-
- public int getSeriesCount() {
- return ySeries.length;
- }
-
- public int getRecordCount() {
- return data.getRowCount();
- }
-
- public Object[][] getData() {
- return getData(0, getRecordCount());
- }
-
- //[Row][Column]
- public Object[][] getData(int start, int end) {
- Object[][] o = new Object[Math.min(end-start,getRecordCount())][ySeries.length+1];
-
- Object[] row;
- for(int j,i=0; i<o.length; i++) {
- row = data.getRow(i+start);
- o[i][0] = (IDataSet.COL_ROW_NUM == xSeries) ? new Integer(i) : row[xSeries];
-
- for(j=0; j<ySeries.length; j++)
- o[i][j+1] = row[ySeries[j]];
- }
-
- return o;
- }
-
- private IBlockDataSet data;
- private int xSeries;
- private int[] ySeries;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/adapters/IAdapter.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/adapters/IAdapter.java
deleted file mode 100644
index 107d08c05c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/adapters/IAdapter.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.adapters;
-
-public interface IAdapter {
- public Number getXMax();
- public Number getXMax(int start, int end);
- public Number getYMax();
- public Number getYMax(int start, int end);
- public Number getYSeriesMax(int series);
- public Number getYSeriesMax(int series, int start, int end);
- public Number getSeriesMax(int series);
- public Number getSeriesMax(int series, int start, int end);
-
- public Number getXMin();
- public Number getXMin(int start, int end);
- public Number getYMin();
- public Number getYMin(int start, int end);
- public Number getYSeriesMin(int series);
- public Number getYSeriesMin(int series, int start, int end);
- public Number getSeriesMin(int series);
- public Number getSeriesMin(int series, int start, int end);
-
- public String[] getLabels();
- public int getRecordCount();
- public int getSeriesCount();
- public Object[][] getData();
- public Object[][] getData(int start, int end);
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/adapters/ScrollAdapter.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/adapters/ScrollAdapter.java
deleted file mode 100644
index 5ff4990386..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/adapters/ScrollAdapter.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.adapters;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IHistoricalDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.internal.Localization;
-
-public class ScrollAdapter implements IAdapter {
- public ScrollAdapter(IHistoricalDataSet data, int xSeries, int[] ySeries, String key) {
- this.data = data;
- this.xSeries = xSeries;
- this.ySeries = ySeries;
- this.key = key;
- }
-
- public Number getXMax() {
- return getXMax(0, getRecordCount());
- }
-
- public Number getXMax(int start, int end) {
- return getSeriesMax(xSeries, start, end);
- }
-
- public Number getYMax() {
- return getYMax(0, getRecordCount());
- }
-
- public Number getYMax(int start, int end) {
- Number max = new Double(Double.MIN_VALUE);
- Number a;
- for(int i=0; i<ySeries.length; i++) {
- a = getSeriesMax(ySeries[i], start, end);
- max = (max.doubleValue()) > a.doubleValue() ? max : a;
- }
- return max;
- }
-
- public Number getYSeriesMax(int y) {
- return getYSeriesMax(y, 0, getRecordCount());
- }
-
- public Number getYSeriesMax(int y, int start, int end) {
- return getSeriesMax(ySeries[y], start, end);
- }
-
- public Number getSeriesMax(int series) {
- return getSeriesMax(series, 0, getRecordCount());
- }
-
- public Number getSeriesMax(int series, int start, int end) {
- if(start < 0 || end > data.getRowCount() || start > end)
- return null;
-
- Number max = new Double(Double.NEGATIVE_INFINITY);
- Number cur;
-
- Object[] dataColumn = data.getHistoricalData(key, series, start, end);
- for(int i=0; i<dataColumn.length; i++) {
- try {
- cur = new Double(Double.parseDouble(dataColumn[i].toString()));
- if(max.doubleValue() < cur.doubleValue())
- max = cur;
- } catch (NumberFormatException e) {}
- }
- return max;
- }
-
- public Number getXMin() {
- return getXMin(0, getRecordCount());
- }
-
- public Number getXMin(int start, int end) {
- return getSeriesMin(xSeries, start, end);
- }
-
- public Number getYMin() {
- return getYMin(0, getRecordCount());
- }
-
- public Number getYMin(int start, int end) {
- Number min = new Double(Double.MIN_VALUE);
- Number a;
- for(int i=0; i<ySeries.length; i++) {
- a = getSeriesMin(ySeries[i], start, end);
- min = (min.doubleValue()) < a.doubleValue() ? min : a;
- }
- return min;
- }
-
- public Number getYSeriesMin(int y) {
- return getYSeriesMin(y, 0, getRecordCount());
- }
-
- public Number getYSeriesMin(int y, int start, int end) {
- return getSeriesMin(ySeries[y], start, end);
- }
-
- public Number getSeriesMin(int series) {
- return getSeriesMin(series, 0, getRecordCount());
- }
-
- public Number getSeriesMin(int series, int start, int end) {
- if(start < 0 || end > data.getRowCount() || start > end)
- return null;
-
- Number min = new Double(Double.POSITIVE_INFINITY);
- Number cur;
-
- Object[] dataColumn = data.getHistoricalData(key, series, start, end);
- for(int i=0; i<dataColumn.length; i++) {
- try {
- cur = new Double(Double.parseDouble(dataColumn[i].toString()));
- if(min.doubleValue() > cur.doubleValue())
- min = cur;
- } catch (NumberFormatException e) {}
- }
- return min;
- }
-
- public String[] getLabels() {
- String[] labels = data.getTitles();
-
- String[] labels2 = new String[ySeries.length + 1];
- labels2[0] = (IDataSet.COL_ROW_NUM == xSeries) ? Localization.getString("ScrollAdapter.RowNum") : labels[xSeries];
-
- for(int i=0; i<ySeries.length; i++)
- labels2[i+1] = labels[ySeries[i]];
-
- return labels2;
- }
-
- public int getSeriesCount() {
- return ySeries.length;
- }
-
- public int getRecordCount() {
- return data.getEntryCount();
- }
-
- public Object[][] getData() {
- return getData(0, getRecordCount());
- }
-
- //[Row][Column]
- public Object[][] getData(int start, int end) {
- Object[][] o = new Object[Math.min(end-start,getRecordCount())][ySeries.length+1];
-
- Object[] x = data.getHistoricalData(key, xSeries, start, end);
- Object[][] y = new Object[ySeries.length][data.getEntryCount()];
-
- for(int i=0; i<ySeries.length; i++)
- y[i] = data.getHistoricalData(key, ySeries[i], start, end);
-
- for(int j,i=0; i<o.length; i++) {
- o[i][0] = x[i];
- for(j=0; j<ySeries.length; j++)
- o[i][j+1] = y[j][i];
- }
-
- return o;
- }
-
- private IHistoricalDataSet data;
- private int xSeries;
- private int[] ySeries;
- private String key;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/aggregates/AverageAggregate.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/aggregates/AverageAggregate.java
deleted file mode 100644
index b8e9131038..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/aggregates/AverageAggregate.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.NumberType;
-
-public class AverageAggregate implements IDataAggregate {
-
- /**
- * Ensure column isn't empty, then get the average of all the column's values.
- *
- * @param column The column to average.
- *
- * @return Average of all the column's values.
- */
- public Number aggregate(Number[] column) {
- if(column == null || column.length == 0)
- return null;
-
- double num = 0;
-
- for(int i=0; i<column.length; i++)
- num += column[i].doubleValue();
-
- num /= column.length;
- return NumberType.getNumber(column[0], num);
- }
-
- public String getID() {
- return ID;
- }
-
- public static final String ID = "org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates.AverageAggregate";
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/aggregates/CountAggregate.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/aggregates/CountAggregate.java
deleted file mode 100644
index cd0750dd87..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/aggregates/CountAggregate.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates;
-
-public class CountAggregate implements IDataAggregate {
-
- /**
- * Ensure column isn't empty, then get the count of the column's values.
- *
- * @param column The column to count.
- *
- * @return Count of that column's values.
- */
- public Number aggregate(Number[] column) {
- if(column == null || column.length == 0)
- return null;
-
- int num = 0;
-
- for(int i=0; i<column.length; i++)
- num++;
-
- return new Integer(num);
- }
-
- public String getID() {
- return ID;
- }
-
- public static final String ID = "org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates.CountAggregate";
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/aggregates/IDataAggregate.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/aggregates/IDataAggregate.java
deleted file mode 100644
index 1558e24f1b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/aggregates/IDataAggregate.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates;
-
-public interface IDataAggregate {
- public Number aggregate(Number[] column);
- public String getID();
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/aggregates/MaxAggregate.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/aggregates/MaxAggregate.java
deleted file mode 100644
index 7da69d4795..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/aggregates/MaxAggregate.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.NumberType;
-
-public class MaxAggregate implements IDataAggregate {
-
- /**
- * Ensure column isn't empty, then get the maximum of all the column's values.
- *
- * @param column The column to search.
- *
- * @return Maximum of all the column's values.
- */
- public Number aggregate(Number[] column) {
- if(column == null || column.length == 0)
- return null;
-
- double num = Double.NEGATIVE_INFINITY;
-
- for(int i=0; i<column.length; i++) {
- if(num < column[i].doubleValue())
- num = column[i].doubleValue();
- }
-
- return NumberType.getNumber(column[0], num);
- }
-
- public String getID() {
- return ID;
- }
-
- public static final String ID = "org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates.MaxAggregate";
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/aggregates/MinAggregate.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/aggregates/MinAggregate.java
deleted file mode 100644
index bf86ddd8f3..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/aggregates/MinAggregate.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.NumberType;
-
-public class MinAggregate implements IDataAggregate {
-
- /**
- * Ensure column isn't empty, then get the minimum of all the column's values.
- *
- * @param column The column to search.
- *
- * @return Minimum of all the column's values.
- */
- public Number aggregate(Number[] column) {
- if(column == null || column.length == 0)
- return null;
-
- double num = Double.POSITIVE_INFINITY;
-
- for(int i=0; i<column.length; i++) {
- if(num > column[i].doubleValue())
- num = column[i].doubleValue();
- }
-
- return NumberType.getNumber(column[0], num);
- }
-
- public String getID() {
- return ID;
- }
-
- public static final String ID = "org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates.MinAggregate";
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/aggregates/SumAggregate.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/aggregates/SumAggregate.java
deleted file mode 100644
index 09a3bb23ec..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/aggregates/SumAggregate.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.NumberType;
-
-public class SumAggregate implements IDataAggregate {
-
- /**
- * Ensure column isn't empty, then get the sum total of all the column's values.
- *
- * @param column The column to total.
- *
- * @return The sum total of all the column's values.
- */
- public Number aggregate(Number[] column) {
- if(column == null || column.length == 0)
- return null;
-
- double num = 0;
-
- for(int i=0; i<column.length; i++)
- num += column[i].doubleValue();
-
- return NumberType.getNumber(column[0], num);
- }
-
- public String getID() {
- return ID;
- }
-
- public static final String ID = "org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates.SumAggregate";
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/IBlockDataSet.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/IBlockDataSet.java
deleted file mode 100644
index d9681b9bb4..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/IBlockDataSet.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets;
-
-public interface IBlockDataSet extends IDataSet {
- public Object[][] getData();
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/IDataEntry.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/IDataEntry.java
deleted file mode 100644
index 1a408ab214..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/IDataEntry.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets;
-
-public interface IDataEntry {
- public int getRowCount();
- public int getColCount();
- public Object get(String key, int col);
- public Object[] getRow(int row);
- public Object[] getRow(String key);
- public Object[] getColumn(int col);
- public Object[][] getData();
- public IDataEntry copy();
- public void putRow(int row, Object[] data);
- public boolean remove(int row);
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/IDataSet.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/IDataSet.java
deleted file mode 100644
index 5a6efba3f4..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/IDataSet.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets;
-
-import java.io.File;
-
-
-public interface IDataSet {
- public String[] getTitles();
- public String getID();
- public boolean writeToFile(File file);
- public boolean readFromFile(File file);
-
- public int getRowCount();
- public int getColCount();
-
- public Object[] getRow(int row);
- public Object[] getColumn(int col);
- public Object[] getColumn(int col, int start, int end);
-
- public void setData(IDataEntry entry);
-
- public boolean remove(IDataEntry entry);
-
- public static final int COL_ROW_NUM = -1;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/IDataSetParser.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/IDataSetParser.java
deleted file mode 100644
index dd1cb1d827..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/IDataSetParser.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets;
-
-import org.eclipse.ui.IMemento;
-
-
-public interface IDataSetParser {
- public IDataEntry parse(StringBuilder entry);
- public boolean saveXML(IMemento target);
-
- public static final String XMLDataSetSettings = "DataSetSettings";
- public static final String XMLparsingExpression = "parsingExpression";
- public static final String XMLparsingSpacer = "parsingSpacer";
- public static final String XMLColumn = "Column";
- public static final String XMLdataset = "dataset";
- public static final String XMLFile = "File";
- public static final String XMLSeries = "Series";
- public static final String XMLname = "name";
- public static final String XMLDelimiter = "Delimiter";
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/IFilteredDataSet.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/IFilteredDataSet.java
deleted file mode 100644
index cb496d1b08..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/IFilteredDataSet.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.IDataSetFilter;
-
-public interface IFilteredDataSet extends IDataSet {
- public void addFilter(IDataSetFilter filter);
- public IDataSetFilter[] getFilters();
- public void clearFilters();
- public boolean removeFilter(IDataSetFilter filter);
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/IHistoricalDataSet.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/IHistoricalDataSet.java
deleted file mode 100644
index d0ca7d7d7a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/IHistoricalDataSet.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets;
-
-public interface IHistoricalDataSet extends IDataSet {
- public void append(IDataEntry entry) throws ArrayIndexOutOfBoundsException;
-
- public Object[] getHistoricalData(String key, int col);
- public Object[] getHistoricalData(String key, int col, int start, int end);
- public int getEntryCount();
- public IDataEntry getEntry(int entry);
- public boolean remove(int entry);
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/row/FilteredRowDataSet.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/row/FilteredRowDataSet.java
deleted file mode 100644
index 0958a4773f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/row/FilteredRowDataSet.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataEntry;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IFilteredDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.IDataSetFilter;
-
-
-
-public class FilteredRowDataSet extends RowDataSet implements IFilteredDataSet {
- public FilteredRowDataSet(RowDataSet data) {
- super(data.getTitles());
- original = data;
- this.data = data.data;
- filters = new ArrayList<IDataSetFilter>();
-
- filtersChanged = false;
- topData = null;
- dataCount = data.getRowCount();
- }
-
- public FilteredRowDataSet(String[] titles) {
- this(new RowDataSet(titles));
- }
-
- //Overwrite methods to insure data is removed from the original DataSet
- public void append(IDataEntry entry) throws ArrayIndexOutOfBoundsException {
- original.append(entry);
- }
-
- public boolean remove(IDataEntry entry) {
- return original.remove(entry);
- }
-
- public boolean remove(int entry) {
- return original.remove(entry);
- }
- //End overwrite methods to insure data is removed from the original DataSet
-
- //Overwrite to ensure the data returned has all the filters applied
- public Object[] getColumn(int col, int start, int end) {
- rebuildDataSet();
- return super.getColumn(col, start, end);
- }
-
- public Object[] getRow(int row) {
- rebuildDataSet();
- return super.getRow(row);
- }
-
- //public int getRowCount() - calls getEntryCount();
-
- public Object[] getHistoricalData(String key, int col, int start, int end) {
- rebuildDataSet();
- return super.getHistoricalData(key, col, start, end);
- }
-
- public int getEntryCount() {
- rebuildDataSet();
- return super.getEntryCount();
- }
-
- public IDataEntry getEntry(int entry) {
- rebuildDataSet();
- return super.getEntry(entry);
- }
- //End overwrite to ensure the data returned has all the filters applied
-
- //IFilteredDataSet Methods
- public void addFilter(IDataSetFilter filter) {
- filters.add(filter);
- filtersChanged = true;
- }
-
- public boolean removeFilter(IDataSetFilter filter) {
- filtersChanged = filters.remove(filter);
- return filtersChanged;
- }
-
- public void clearFilters() {
- filters.clear();
- filtersChanged = true;
- }
-
- public IDataSetFilter[] getFilters() {
- IDataSetFilter[] f = new IDataSetFilter[filters.size()];
- filters.toArray(f);
- return f;
- }
- //End IFilteredDataSet Methods
-
- @SuppressWarnings("unchecked")
- private void rebuildDataSet() {
- IDataEntry top = original.getEntry(original.getEntryCount()-1);
-
- if(filtersChanged || dataCount != original.getRowCount() || topData != top) {
- dataCount = original.getRowCount();
- topData = top;
-
- ArrayList[] filterData = getFilterData();
- for(int i=0; i<filters.size(); i++)
- filterData = ((IDataSetFilter)filters.get(i)).filter(filterData);
- setFilteredData(filterData);
- }
- }
-
- @SuppressWarnings("unchecked")
- private ArrayList[] getFilterData() {
- ArrayList[] data = new ArrayList[original.getColCount()];
- for(int i=0; i<data.length; i++)
- data[i] = new ArrayList<Object>();
-
- Object[] row;
- for(int j,i=0; i<original.getRowCount(); i++) {
- row = original.getRow(i);
- for(j=0; j<data.length; j++)
- data[j].add(row[j]);
- }
-
- return data;
- }
-
- @SuppressWarnings("unchecked")
- private void setFilteredData(ArrayList[] data) {
- this.data = new ArrayList<IDataEntry>();
-
- RowEntry entry;
- Object[] row;
- for(int j,i=0; i<data[0].size(); i++) {
- row = new Object[data.length];
- entry = new RowEntry();
- for(j=0; j<data.length; j++)
- row[j] = data[j].get(i);
- entry.putRow(0, row);
- this.data.add(entry);
- }
- }
-
- private RowDataSet original;
- private ArrayList<IDataSetFilter> filters;
-
- private boolean filtersChanged;
- private int dataCount;
- private Object topData;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/row/RowDataSet.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/row/RowDataSet.java
deleted file mode 100644
index 82d7d5ef11..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/row/RowDataSet.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataEntry;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IHistoricalDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.internal.Localization;
-
-
-
-public class RowDataSet implements IHistoricalDataSet {
- //IDataSet Methods
- public RowDataSet(String[] titles) {
- this.titles = titles;
- data = new ArrayList<IDataEntry>();
- }
-
- public void setData(IDataEntry entry) {
- append(entry);
- }
-
- public void append(IDataEntry entry) throws ArrayIndexOutOfBoundsException {
- RowEntry dataBlock = (RowEntry)entry;
- if(dataBlock.getRow(null).length != this.getColCount())
- throw new ArrayIndexOutOfBoundsException(Localization.getString("RowDataSet.ArraySizeMismatch") + dataBlock.getRow(null).length + " != " + this.getColCount());
-
- data.add(entry);
- }
-
- public String[] getTitles() {
- return titles;
- }
-
- public Object[] getColumn(int col) {
- return getColumn(col, 0, getRowCount());
- }
-
- public Object[] getColumn(int col, int start, int end) {
- return getHistoricalData(null, col, start, end);
- }
-
- public Object[] getRow(int row) {
- IDataEntry entry = getEntry(row);
- if(null != entry)
- return entry.getRow(null);
- return null;
- }
-
- public int getRowCount() {
- return getEntryCount();
- }
-
- public int getColCount() {
- if(null == titles)
- return -1;
- return titles.length;
- }
-
- public boolean readFromFile(File file) {
- try {
- FileReader fr = new FileReader(file);
- BufferedReader br = new BufferedReader(fr);
-
- br.readLine(); //Skip the ID
- br.readLine(); //Skip the Titles
- String line;
- RowEntry entry;
- while(null != (line = br.readLine())) {
- entry = new RowEntry();
- entry.putRow(0, line.split(", "));
- append(entry);
- }
- return true;
- } catch(FileNotFoundException fnfe) {
- } catch(IOException ioe) {
- } catch(ArrayIndexOutOfBoundsException aioobe) {}
- return false;
- }
-
- public boolean writeToFile(File file) {
- try {
- file.createNewFile();
- FileOutputStream fos = new FileOutputStream(file);
- PrintStream ps = new PrintStream(fos);
-
- String line = "";
- Object[] dataRow;
-
- //ID
- ps.print(ID + "\n");
-
- //Labels
- int i, j;
- for(i=0; i<titles.length; i++)
- line += titles[i] + ", ";
- ps.print(line + "\n");
-
- //Data
- for(i=0; i<getRowCount(); i++) {
- dataRow = getRow(i);
- line = "";
- for(j=0; j<dataRow.length; j++)
- line += dataRow[j].toString() + ", ";
- ps.print(line + "\n");
- }
- return true;
- } catch(FileNotFoundException e) {
- } catch(IOException e) {}
- return false;
- }
-
- public String getID() {
- return ID;
- }
- //End IDataSet Methods
-
- //IHistoricalDataSet Methods
- public Object[] getHistoricalData(String key, int col) {
- return getHistoricalData(key, col, 0, getRowCount());
- }
-
- public Object[] getHistoricalData(String key, int col, int start, int end) {
- if(start > end || start < 0 || end > getRowCount() || col < COL_ROW_NUM || col >= this.getColCount())
- return null;
-
- if(COL_ROW_NUM == col) {
- Integer[] rows = new Integer[Math.min(end-start, data.size())];
- for(int i=0;i<rows.length; i++)
- rows[i] = new Integer(start+i+1);
- return rows;
- }
-
- Object[] d = new Object[Math.min(end-start, data.size())];
-
- for(int i=0; i<d.length; i++)
- d[i] = ((IDataEntry)data.get(start+i)).getColumn(col)[0];
- return d;
- }
-
- public int getEntryCount() {
- return data.size();
- }
-
- public boolean remove(IDataEntry entry) {
- return data.remove(entry);
- }
-
- public boolean remove(int entry) {
- if(entry < 0 || entry >= data.size())
- return false;
- return (null != data.remove(entry));
- }
-
- public IDataEntry getEntry(int entry) {
- if(entry < 0 || entry >= getEntryCount())
- return null;
- else
- return (IDataEntry)data.get(entry);
- }
- //End IHistoricalDataSet Methods
-
- protected ArrayList<IDataEntry> data;
- private String[] titles;
- public static final String ID = "org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.rowdataset";
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/row/RowEntry.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/row/RowEntry.java
deleted file mode 100644
index f5d346d383..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/row/RowEntry.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataEntry;
-
-public class RowEntry implements IDataEntry {
- public RowEntry() {
- data = null;
- }
-
- public int getRowCount() {
- if(null != data)
- return 1;
- return 0;
- }
-
- public int getColCount() {
- return (null == data) ? 0 : data.length;
- }
-
- public Object get(String key, int col) {
- return (0 <= col && col < getColCount()) ? data[col] : null;
- }
-
- public Object[] getRow(int row) {
- if(0 == row)
- return data;
- return null;
- }
-
- public Object[] getRow(String key) {
- return data;
- }
-
- public Object[] getColumn(int col) {
- if(0 <= col && getColCount() > col)
- return new Object[] {get(null, col)};
- return null;
- }
-
- public Object[][] getData() {
- return new Object[][] {getRow(null)};
- }
-
- public IDataEntry copy() {
- RowEntry entry = new RowEntry();
- if(null != data) {
- entry.data = new Object[data.length];
- System.arraycopy(data, 0, entry.data, 0, data.length);
- }
-
- return entry;
- }
-
- public void putRow(int row, Object[] data) {
- if(0 == row)
- this.data = data;
- }
-
- public boolean remove(int row) {
- if(row == 0) {
- data = null;
- return true;
- } else
- return false;
- }
-
- private Object[] data;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/row/RowParser.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/row/RowParser.java
deleted file mode 100644
index 227d751bd3..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/row/RowParser.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataEntry;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSetParser;
-import org.eclipse.ui.IMemento;
-
-
-
-public class RowParser implements IDataSetParser {
- public RowParser(String[] regEx) {
- this.regEx = regEx;
- buildPattern();
- }
-
- public RowParser(IMemento source) {
- IMemento[] children = source.getChildren(IDataSetParser.XMLSeries);
- regEx = new String[children.length<<1];
- for(int j=0; j<children.length; j++) {
- regEx[j<<1] = children[j].getString(IDataSetParser.XMLparsingExpression);
- regEx[(j<<1)+1] = children[j].getString(IDataSetParser.XMLparsingSpacer);
- }
- buildPattern();
- }
-
- private void buildPattern() {
- StringBuilder wholeRegExpr = new StringBuilder();
- for(int i=0; i<regEx.length; i++)
- wholeRegExpr.append('(' + regEx[i] + ')');
- wholePattern = Pattern.compile(wholeRegExpr.toString());
- }
-
- public IDataEntry parse(StringBuilder s) {
- if(null == s)
- return null;
-
- RowEntry e = null;
- Matcher wholeMatcher = wholePattern.matcher(s);
-
- if(wholeMatcher.find()) {
- e = new RowEntry();
- Object[] data = new Object[regEx.length>>1];
-
- int group=0, j;
-
- for(int i=0; i<regEx.length; i++) {
- group++;
- for(j=0; j<regEx[i].length(); j++)
- if(regEx[i].charAt(j) == ')')
- group++;
-
- if(0 == (i&1))
- data[i>>1] = wholeMatcher.group(group);
- }
- e.putRow(0, data);
- s.delete(0, wholeMatcher.end());
- }
-
- return e;
- }
-
- public boolean saveXML(IMemento target) {
- target.putString(IDataSetParser.XMLdataset, RowDataSet.ID);
- IMemento child2;
- for(int i=0; i<regEx.length>>1; i++) {
- child2 = target.createChild(IDataSetParser.XMLSeries);
- child2.putString(IDataSetParser.XMLparsingExpression, regEx[i<<1]);
- child2.putString(IDataSetParser.XMLparsingSpacer, regEx[(i<<1)+1]);
- }
- return true;
- }
-
- private String[] regEx;
- private Pattern wholePattern;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/table/FilteredTableDataSet.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/table/FilteredTableDataSet.java
deleted file mode 100644
index 67d3c6c30b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/table/FilteredTableDataSet.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.table;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataEntry;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IFilteredDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.IDataSetFilter;
-
-
-
-public class FilteredTableDataSet extends TableDataSet implements IFilteredDataSet {
- public FilteredTableDataSet(TableDataSet data) {
- super(data.getTitles());
- original = data;
- this.data = data.data;
- filters = new ArrayList<IDataSetFilter>();
-
- filtersChanged = false;
- historical = false;
- topData = null;
- dataCount = data.getRowCount();
- }
-
- public FilteredTableDataSet(String[] titles) {
- this(new TableDataSet(titles));
- }
-
- //Overwrite methods to insure data is removed from the original DataSet
- public void append(IDataEntry entry) throws ArrayIndexOutOfBoundsException {
- original.append(entry);
- }
-
- public boolean remove(IDataEntry entry) {
- return original.remove(entry);
- }
-
- public boolean remove(int entry) {
- return original.remove(entry);
- }
- //End overwrite methods to insure data is removed from the original DataSet
-
- //Overwrite to ensure the data returned has all the filters applied
- public Object[] getColumn(int col, int start, int end) {
- rebuildDataSet();
- return super.getColumn(col, start, end);
- }
-
- public Object[] getRow(int row) {
- rebuildDataSet();
- return super.getRow(row);
- }
-
- public int getRowCount() {
- rebuildDataSet();
- return super.getRowCount();
- }
-
- public Object[] getHistoricalData(String key, int col, int start, int end) {
- return original.getHistoricalData(key, col, start, end);
- //rebuildHistoricalDataSet();
- //return super.getHistoricalData(key, col, start, end);
- }
-
- public int getEntryCount() {
- return original.getEntryCount();
- //rebuildHistoricalDataSet();
- //return super.getEntryCount();
- }
-
- public IDataEntry getEntry(int entry) {
- return original.getEntry(entry);
- //rebuildHistoricalDataSet();
- //return super.getEntry(entry);
- }
-
- public Object[][] getData() {
- rebuildDataSet();
- return super.getData();
- }
- //End overwrite to ensure the data returned has all the filters applied
-
- //IFilteredDataSet Methods
- public void addFilter(IDataSetFilter filter) {
- filters.add(filter);
- filtersChanged = true;
- }
-
- public boolean removeFilter(IDataSetFilter filter) {
- filtersChanged = filters.remove(filter);
- return filtersChanged;
- }
-
- public void clearFilters() {
- filters.clear();
- filtersChanged = true;
- }
-
- public IDataSetFilter[] getFilters() {
- IDataSetFilter[] f = new IDataSetFilter[filters.size()];
- filters.toArray(f);
- return f;
- }
- //End IFilteredDataSet Methods
-
- @SuppressWarnings("unchecked")
- private void rebuildDataSet() {
- IDataEntry top = original.getEntry(original.getEntryCount()-1);
-
- if(filtersChanged || dataCount != original.getRowCount() || topData != top || historical) {
- dataCount = original.getRowCount();
- topData = top;
- historical = false;
-
- ArrayList[] filterData = getFilterData();
- for(int i=0; i<filters.size(); i++)
- filterData = ((IDataSetFilter)filters.get(i)).filter(filterData);
- setFilteredData(filterData);
- }
- }
-
- @SuppressWarnings("unchecked")
- private ArrayList[] getFilterData() {
- ArrayList[] data = new ArrayList[original.getColCount()];
- for(int i=0; i<data.length; i++)
- data[i] = new ArrayList();
-
- Object[][] table = original.getData();
- for(int j,i=0; i<original.getRowCount(); i++) {
- for(j=0; j<data.length; j++)
- data[j].add(table[i][j]);
- }
-
- return data;
- }
-
- @SuppressWarnings("unchecked")
- private void setFilteredData(ArrayList[] data) {
- this.data = new ArrayList<TableEntry>();
-
- TableEntry entry = new TableEntry();
- Object[] row;
- for(int j,i=0; i<data[0].size(); i++) {
- row = new Object[data.length];
- for(j=0; j<data.length; j++)
- row[j] = data[j].get(i);
- entry.add(row);
- }
- this.data.add(entry);
- }
-
- private TableDataSet original;
- private ArrayList<IDataSetFilter> filters;
-
- private boolean filtersChanged;
- private int dataCount;
- private Object topData;
- private boolean historical;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/table/TableDataSet.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/table/TableDataSet.java
deleted file mode 100644
index 05ae546d22..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/table/TableDataSet.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.table;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IBlockDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataEntry;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IHistoricalDataSet;
-
-
-
-public class TableDataSet implements IHistoricalDataSet, IBlockDataSet {
- public TableDataSet(String[] labels) {
- if(null == labels)
- this.titles = new String[0];
- else {
- this.titles = labels;
- }
- data = new ArrayList<TableEntry>();
- }
-
- //IDataSet Methods
- public String[] getTitles() {
- return titles;
- }
-
- public String getID() {
- return ID;
- }
-
- public boolean readFromFile(File file) {
- try {
- FileReader fr = new FileReader(file);
- BufferedReader br = new BufferedReader(fr);
-
- br.readLine(); //Skip the ID
- br.readLine(); //Skip the Titles
- String line;
- TableEntry entry = new TableEntry();
- while(null != (line = br.readLine())) {
- if(line.equals("")) {
- append(entry);
- entry = new TableEntry();
- } else
- entry.add(line.split(", "));
- }
- return true;
- } catch(FileNotFoundException fnfe) {
- } catch(IOException ioe) {
- } catch(ArrayIndexOutOfBoundsException aioobe) {}
- return false;
- }
-
- public boolean writeToFile(File file) {
- try {
- file.createNewFile();
- FileOutputStream fos = new FileOutputStream(file);
- PrintStream ps = new PrintStream(fos);
- StringBuilder b = new StringBuilder();
-
- //ID
- b.append(ID + "\n");
-
- //Labels
- int i, j, k;
- for(i=0; i<titles.length; i++)
- b.append(titles[i] + ", ");
- b.append("\n");
-
- //Data
- TableEntry e;
- Object[] o;
- for(i=0; i<data.size(); i++) {
- e = (TableEntry)data.get(i);
- for(j=0; j<e.getRowCount(); j++) {
- o = e.getRow(j);
- for(k=0; k<o.length; k++)
- b.append(o[k].toString() + ", ");
- b.append("\n");
- }
- b.append("\n");
- }
- ps.print(b.toString());
- return true;
- } catch(FileNotFoundException e) {
- } catch(IOException e) {}
- return false;
- }
-
- public int getRowCount() {
- if(data.size() > 0)
- return ((TableEntry)data.get(data.size()-1)).getRowCount();
- else
- return 0;
- }
-
- public int getColCount() {
- return titles.length;
- }
-
- public Object[] getRow(int row) {
- return ((TableEntry)data.get(data.size()-1)).getRow(row);
- }
-
- public Object[] getColumn(int col) {
- return getColumn(col, 0, getRowCount());
- }
-
- public Object[] getColumn(int col, int start, int end) {
- if(start > end || start < 0 || end > getEntryCount() || col < COL_ROW_NUM || col >= this.getColCount())
- return null;
- if(COL_ROW_NUM == col) {
- Integer[] rows = new Integer[Math.min(end-start, getRowCount())];
- for(int i=0;i<rows.length; i++)
- rows[i] = new Integer(start+i+1);
- return rows;
- }
- return ((TableEntry)data.get(data.size()-1)).getColumn(col, start, end);
- }
-
- public void setData(IDataEntry data) {
- append(data);
- }
-
- public boolean remove(IDataEntry entry) {
- return data.remove(entry);
- }
- //End IDataSet Methods
-
- //IHistoricalDataSet Methods
- public void append(IDataEntry data) {
- if(data instanceof TableEntry)
- this.data.add((TableEntry)data);
- }
-
- public Object[] getHistoricalData(String key, int col) {
- return getHistoricalData(key, col, 0, getEntryCount());
- }
-
- public Object[] getHistoricalData(String key, int col, int start, int end) {
- if(start > end || start < 0 || end > getEntryCount() || col < COL_ROW_NUM || col >= this.getColCount())
- return null;
-
- if(COL_ROW_NUM == col) {
- Integer[] rows = new Integer[Math.min(end-start, data.size())];
- for(int i=0;i<rows.length; i++)
- rows[i] = new Integer(start+i+1);
- return rows;
- }
-
- Object[] d = new Object[Math.min(end-start, getEntryCount())];
-
- for(int i=0; i<d.length; i++) {
- d[i] = getEntry(i+start).get(key, col);
- if(null == d[i])
- d[i] = new Integer(0);
- }
- return d;
- }
-
- public int getEntryCount() {
- return data.size();
- }
-
- public IDataEntry getEntry(int entry) {
- if(entry >=0 && entry < getEntryCount())
- return (TableEntry)data.get(entry);
- return null;
- }
-
- public boolean remove(int entry) {
- if(entry < 0 || entry >= data.size())
- return false;
- return (null != data.remove(entry));
- }
- //End IHistoricalDataSet Methods
-
- //IBlockDataSet Methods
- public Object[][] getData() {
- return ((TableEntry)data.get(getEntryCount()-1)).getData();
- }
- //End IBlockDataSet Methods
-
- public static final String ID = "org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.tabledataset";
- protected ArrayList<TableEntry> data;
- private String[] titles;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/table/TableEntry.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/table/TableEntry.java
deleted file mode 100644
index 0011984166..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/table/TableEntry.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.table;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataEntry;
-
-
-
-public class TableEntry implements IDataEntry {
- public TableEntry() {
- bodyContent = new ArrayList<Object[]>();
- }
-
- public int getRowCount() {
- return bodyContent.size();
- }
-
- public int getColCount() {
- if(getRowCount() > 0) {
- try {
- return ((Object [])bodyContent.get(0)).length;
- } catch(Exception cce) {}
- }
- return 0;
- }
-
- public Object get(String key, int col) {
- if(col >= 0 && col < getColCount()) {
- Object[] row = getRow(key);
- if(null != row)
- return row[col];
- }
- return null;
- }
-
- public Object[][] getData() {
- Object[][] d = new Object[getRowCount()][getColCount()];
- for(int i=0; i<getRowCount(); i++) {
- d[i] = getRow(i);
- }
- return d;
- }
-
- public Object[] getRow(int row) {
- if(row < 0 || row >= getRowCount())
- return null;
- return (Object[])bodyContent.get(row);
- }
-
- public Object[] getRow(String key) {
- Object[] row;
- for(int i=0; i<bodyContent.size(); i++) {
- row = (Object[])bodyContent.get(i);
- if(row[0].toString().equals(key))
- return row;
- }
- return null;
- }
-
- public Object[] getColumn(int col) {
- return getColumn(col, 0, getRowCount());
- }
-
- public Object[] getColumn(int col, int start, int end) {
- if(0 <= col && getColCount() > col && start >=0 && end > start && end <= getRowCount()) {
- Object[] res = new Object[Math.min(end-start, getRowCount())];
- for(int i=0; i<res.length; i++)
- res[i] = ((Object[])bodyContent.get(i+start))[col];
- return res;
- }
- return null;
- }
-
- public void putRow(int row, Object[] data) {
- if(row >= bodyContent.size())
- add(data);
- else if(row >= 0) {
- bodyContent.add(row, data);
- bodyContent.remove(row+1);
- }
- }
-
- public void add(Object[] data) {
- if(null != data && (data.length == getColCount() || getRowCount() == 0))
- bodyContent.add(data);
- }
-
- public IDataEntry copy() {
- TableEntry entry = new TableEntry();
- for(int i=0; i<bodyContent.size(); i++)
- entry.add((Object[])bodyContent.get(i));
-
- return entry;
- }
-
- public boolean remove(int row) {
- return (null != bodyContent.remove(row));
- }
-
- private ArrayList<Object[]> bodyContent; //ArrayList of arrays
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/table/TableParser.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/table/TableParser.java
deleted file mode 100644
index 217e37a54c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/table/TableParser.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.table;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataEntry;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSetParser;
-import org.eclipse.ui.IMemento;
-
-
-
-public class TableParser implements IDataSetParser {
- public TableParser(String[] regEx, String delimiter) {
- this.regEx = regEx;
- this.delimiter = delimiter;
- buildPattern();
- }
-
- public TableParser(IMemento source) {
- IMemento[] children = source.getChildren(IDataSetParser.XMLSeries);
- regEx = new String[children.length<<1];
- for(int j=0; j<children.length; j++) {
- regEx[j<<1] = children[j].getString(IDataSetParser.XMLparsingExpression);
- regEx[(j<<1)+1] = children[j].getString(IDataSetParser.XMLparsingSpacer);
- }
- IMemento del = source.getChild(IDataSetParser.XMLDelimiter);
- delimiter = del.getString(IDataSetParser.XMLparsingExpression);
- buildPattern();
- }
-
- private void buildPattern() {
- StringBuilder wholeRegExpr = new StringBuilder();
- for(int i=0; i<regEx.length; i++)
- wholeRegExpr.append('(' + regEx[i] + ')');
- wholePattern = Pattern.compile(wholeRegExpr.toString());
- delimPattern = Pattern.compile(delimiter);
- }
-
- public IDataEntry parse(StringBuilder s) {
- if(null == s)
- return null;
-
- TableEntry e = null;
-
- Matcher wholeMatcher = wholePattern.matcher(s);
- Matcher delimMatcher = delimPattern.matcher(s);
-
- Object[] data;
- int end = 0;
- if(delimMatcher.find()) {
- e = new TableEntry();
- end = delimMatcher.start();
-
- int group, j;
- while(wholeMatcher.find() && wholeMatcher.end() < end) {
- group = 0;
- data = new Object[regEx.length>>1];
- for(int i=0; i<regEx.length; i++) {
- group++;
- for(j=0; j<regEx[i].length(); j++)
- if(regEx[i].charAt(j) == ')')
- group++;
-
- if(0 == (i&1))
- data[i>>1] = wholeMatcher.group(group);
- }
- e.add(data);
- }
- s.delete(0, delimMatcher.end());
- }
-
- return e;
- }
-
- public boolean saveXML(IMemento target) {
- target.putString(IDataSetParser.XMLdataset, TableDataSet.ID);
- IMemento child;
- for(int i=0; i<regEx.length>>1; i++) {
- child = target.createChild(IDataSetParser.XMLSeries);
- child.putString(IDataSetParser.XMLparsingExpression, regEx[i<<1]);
- child.putString(IDataSetParser.XMLparsingSpacer, regEx[(i<<1)+1]);
- }
- child = target.createChild(IDataSetParser.XMLDelimiter);
- child.putString(IDataSetParser.XMLparsingExpression, delimiter);
- return true;
- }
-
- private String[] regEx;
- private String delimiter;
-
- private Pattern wholePattern;
- private Pattern delimPattern;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/filters/IDataSetFilter.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/filters/IDataSetFilter.java
deleted file mode 100644
index b30fca05e1..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/filters/IDataSetFilter.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters;
-
-import java.util.ArrayList;
-
-import org.eclipse.ui.IMemento;
-
-public interface IDataSetFilter {
- @SuppressWarnings("unchecked")
- public ArrayList[] filter(ArrayList[] data);
- public String getID();
- public void writeXML(IMemento parent);
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/filters/MatchFilter.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/filters/MatchFilter.java
deleted file mode 100644
index 121209d6b9..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/filters/MatchFilter.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.Copier;
-import org.eclipse.ui.IMemento;
-
-
-
-public class MatchFilter implements IDataSetFilter {
- public MatchFilter(int column, Object value, int style) {
- this.column = column;
- this.value = value;
- this.style = style;
- }
-
- /**
- * Apply the MatchFilter to the passed dataset.
- *
- * @param data The dataset to filter.
- *
- * @return The filtered dataset.
- */
- @SuppressWarnings("unchecked")
- public ArrayList[] filter(ArrayList[] data) {
- if(column < 0 || column >= data.length)
- return null;
-
- ArrayList[] newData = Copier.copy(data);
- boolean equals;
- for(int j, i=newData[column].size()-1; i>=0; i--) {
- equals = newData[column].get(i).toString().equals(value.toString()); //TODO: Find better equivilance method
- if((equals && REMOVE_MATCHING == (style & 1)) || (!equals && KEEP_MATCHING == (style & 1))) {
- for(j=0; j<newData.length; j++)
- newData[j].remove(i);
- }
- }
- return newData;
- }
-
- public String getID() {
- return ID;
- }
-
- /**
- * Preserve what filter was applied.
- *
- * @param parent Parent object of the new child Memento to create.
- */
- public void writeXML(IMemento parent) {
- IMemento child = parent.createChild("Filter", ID);
- child.putInteger("column", column);
- child.putString("value", value.toString());
- child.putInteger("style", style);
- }
-
- private int column;
- private Object value;
- private int style;
-
- public static final int KEEP_MATCHING = 0;
- public static final int REMOVE_MATCHING = 1;
-
- public static final String ID = "org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.MatchFilter";
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/filters/RangeFilter.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/filters/RangeFilter.java
deleted file mode 100644
index 25ea29d1e2..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/filters/RangeFilter.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.NumberType;
-import org.eclipse.linuxtools.systemtap.ui.structures.Copier;
-import org.eclipse.ui.IMemento;
-
-
-
-public class RangeFilter implements IDataSetFilter {
- public RangeFilter(int column, Number lowerBound, Number upperBound, int style) {
- this.column = column;
- this.lowerBound = lowerBound;
- this.upperBound = upperBound;
- this.style = style;
- }
-
- /**
- * Apply the RangeFilter to the passed dataset.
- *
- * @param data The dataset to filter.
- *
- * @return The filtered dataset.
- */
- @SuppressWarnings("unchecked")
- public ArrayList[] filter(ArrayList[] data) {
- if(column < 0 || column >= data.length)
- return null;
-
- ArrayList[] newData = Copier.copy(data);
- for(int j,i=newData[column].size()-1; i>=0; i--) {
- if(!inBounds(NumberType.obj2num(newData[column].get(i)))) {
- for(j=0; j<newData.length; j++)
- newData[j].remove(i);
- }
- }
- return newData;
- }
-
- public String getID() {
- return ID;
- }
-
- /**
- * Verify that the number passed is in the bounds of the created filter.
- *
- * @param num The number to verify.
- *
- * @return True if the number is within bounds.
- */
- private boolean inBounds(Number num) {
- if(INSIDE_BOUNDS == (style & 1)) {
- if(INCLUSIVE == (style & 2)) {
- if(num.doubleValue() > upperBound.doubleValue()
- || num.doubleValue() < lowerBound.doubleValue())
- return false;
- } else {
- if(num.doubleValue() >= upperBound.doubleValue()
- || num.doubleValue() <= lowerBound.doubleValue())
- return false;
- }
- }
-
- if(OUTSIDE_BOUNDS == (style & 1)) {
- if(INCLUSIVE == (style & 2)) {
- if(num.doubleValue() < upperBound.doubleValue()
- && num.doubleValue() > lowerBound.doubleValue())
- return false;
- } else {
- if(num.doubleValue() <= upperBound.doubleValue()
- && num.doubleValue() >= lowerBound.doubleValue())
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * Preserve what filter was applied.
- *
- * @param parent Parent object of the new child Memento to create.
- */
- public void writeXML(IMemento parent) {
- IMemento child = parent.createChild("Filter", ID);
- child.putInteger("column", column);
- child.putString("low", lowerBound.toString());
- child.putString("high", upperBound.toString());
- child.putInteger("style", style);
- }
-
- private int column;
- private Number upperBound;
- private Number lowerBound;
- private int style;
-
- public static final int INSIDE_BOUNDS = 0;
- public static final int OUTSIDE_BOUNDS = 1;
-
- public static final int INCLUSIVE = 2;
- public static final String ID = "org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.RangeFilter";
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/filters/SortFilter.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/filters/SortFilter.java
deleted file mode 100644
index 9cd9178c25..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/filters/SortFilter.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.NumberType;
-import org.eclipse.linuxtools.systemtap.ui.structures.Copier;
-import org.eclipse.linuxtools.systemtap.ui.structures.IndexedObject;
-import org.eclipse.linuxtools.systemtap.ui.structures.Sort;
-import org.eclipse.ui.IMemento;
-
-
-
-public class SortFilter implements IDataSetFilter {
- public SortFilter(int column, int ordering) {
- this.column = column;
- this.style = (ordering==ASCENDING ? ASCENDING : DESCENDING);
- }
-
- /**
- * Apply the RangeFilter to the passed dataset.
- *
- * @param data The dataset to filter.
- *
- * @return The filtered dataset.
- */
- @SuppressWarnings("unchecked")
- public ArrayList[] filter(ArrayList[] data) {
- if(column < 0 || column >= data.length)
- return null;
-
- ArrayList[] newData = Copier.copy(data);
- IndexedObject[] items = new IndexedObject[newData[0].size()];
-
- try {
- for(int i=0; i<newData[column].size(); i++)
- items[i] = new IndexedObject(i, NumberType.cleanObj2Num(newData[column].get(i)));
- } catch(NumberFormatException nfe) {
- for(int i=0; i<newData[column].size(); i++)
- items[i] = new IndexedObject(i, newData[column].get(i));
- }
-
- Sort.quicksort(items, 0, items.length-1);
-
- for(int j, i=0; i<newData.length; i++) {
- for(j=0; j<items.length; j++) {
- if(DESCENDING == style)
- newData[i].add(newData[i].get(items[items.length-j-1].index));
- else
- newData[i].add(newData[i].get(items[j].index));
- }
- for(j=0; j<items.length; j++)
- newData[i].remove(0);
- }
- return newData;
- }
-
- public String getID() {
- return ID;
- }
-
- /**
- * Preserve what filter was applied.
- *
- * @param parent Parent object of the new child Memento to create.
- */
- public void writeXML(IMemento parent) {
- IMemento child = parent.createChild("Filter", ID);
- child.putInteger("column", column);
- child.putInteger("style", style);
- }
-
- private int column;
- private int style;
-
- public static final int ASCENDING = 0;
- public static final int DESCENDING = 1;
- public static final String ID = "org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.SortFilter";
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/filters/UniqueFilter.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/filters/UniqueFilter.java
deleted file mode 100644
index 4a08d7469c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/filters/UniqueFilter.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters;
-
-import java.util.ArrayList;
-
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates.IDataAggregate;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.NumberType;
-import org.eclipse.linuxtools.systemtap.ui.structures.Copier;
-import org.eclipse.ui.IMemento;
-
-
-
-public class UniqueFilter implements IDataSetFilter {
- public UniqueFilter(int column, IDataAggregate aggregate, int style) {
- this.column = column;
- this.aggregate = aggregate;
- this.style = style;
- }
-
- /**
- * Verify that the number passed is in the bounds of the created filter.
- *
- * @param num The number to verify.
- *
- * @return True if the number is within bounds.
- */
- @SuppressWarnings("unchecked")
- public ArrayList[] filter(ArrayList[] data) {
- if(column < 0 || column >= data.length)
- return null;
-
- ArrayList[] newData = Copier.copy(data);
- ArrayList[] aggregates = new ArrayList[newData.length];
- for(int i=0; i<aggregates.length;i++)
- aggregates[i] = new ArrayList();
-
- for(int k,j,i=newData[0].size()-1; i>=0; i--) {
- for(j=i-1; j>=0; j--) {
- if(newData[column].get(i).toString().equals(newData[column].get(j).toString())) { //TODO: Find better equivilance method
- i--;
- for(k=0; k<newData.length; k++) {
- aggregates[k].add(newData[k].get(j));
- newData[k].remove(j);
- }
- }
- }
- for(k=0; k<newData.length; k++) {
- aggregates[k].add(newData[k].get(i));
- if(k!=column) {
- newData[k].remove(i);
- try {
- newData[k].add(i, aggregate.aggregate(NumberType.cleanObj2Num(aggregates[k].toArray())));
- } catch(NumberFormatException nfe) {
- newData[k].add(i, columnMerge(aggregates[k].toArray()));
- }
- }
- aggregates[k].clear();
- }
- }
- return newData;
- }
-
- /**
- * Merges two passed columns into a StringBuilder object.
- *
- * @param col The columns to merge.
- *
- * @return The StringBuilder object made as a result of the merge.
- */
- private String columnMerge(Object[] col) {
- StringBuilder sb = new StringBuilder(col[0].toString());
- for(int i=1; i<col.length; i++) {
- if(sb.indexOf(col[i].toString()) < 0)
- sb.append("/" + col[i].toString());
- }
- return sb.toString();
- }
-
- public String getID() {
- return ID;
- }
-
- /**
- * Preserve what filter was applied.
- *
- * @param parent Parent object of the new child Memento to create.
- */
- public void writeXML(IMemento parent) {
- IMemento child = parent.createChild("Filter", ID);
- child.putInteger("column", column);
- child.putString("aggregate", aggregate.getID());
- child.putInteger("style", style);
- }
-
- private int column;
- private IDataAggregate aggregate;
- private int style;
- public static final String ID = "org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.UniqueFilter";
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/internal/GraphingAPINonUIPlugin.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/internal/GraphingAPINonUIPlugin.java
deleted file mode 100644
index 06e36a97ba..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/internal/GraphingAPINonUIPlugin.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.internal;
-
-import org.eclipse.ui.plugin.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class GraphingAPINonUIPlugin extends AbstractUIPlugin {
-
- //The shared instance.
- private static GraphingAPINonUIPlugin plugin;
-
- /**
- * The constructor.
- */
- public GraphingAPINonUIPlugin() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static GraphingAPINonUIPlugin 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 AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui", path);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/internal/Localization.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/internal/Localization.java
deleted file mode 100644
index 6250f6f872..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/internal/Localization.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.internal;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Localization {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.internal.localization";
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- private Localization() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/internal/localization.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/internal/localization.properties
deleted file mode 100644
index fb17d5caa3..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/internal/localization.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-ScrollAdapter.RowNum=Row Num
-
-BlockAdapter.RowNum=Row Num
-
-RowDataSet.ArraySizeMismatch=Array size mismatch
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/structures/ChartStreamDaemon.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/structures/ChartStreamDaemon.java
deleted file mode 100644
index c5f4f86bdc..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/structures/ChartStreamDaemon.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataEntry;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSetParser;
-import org.eclipse.linuxtools.systemtap.ui.structures.listeners.IGobblerListener;
-
-
-
-public class ChartStreamDaemon implements IGobblerListener {
- public ChartStreamDaemon(IDataSet d, IDataSetParser p) {
- data = d;
- outputData = new StringBuilder("");
- parser = p;
- disposed = false;
- }
-
- /**
- * Takes one line from the output data and appends it to data object.
- */
- protected void pushData() {
- if(null == data || null == parser)
- return;
-
- IDataEntry e = parser.parse(outputData);
- if(null != e)
- data.setData(e);
- }
-
- public void handleDataEvent(String line) {
- outputData.append(line);
- this.pushData();
- }
-
- public boolean isDisposed() {
- return disposed;
- }
-
- public void dispose() {
- if(!disposed) {
- disposed = true;
- data = null;
- if(null != outputData)
- outputData.delete(0, outputData.length());
- outputData = null;
- parser = null;
- }
- }
-
- protected IDataSet data;
- protected StringBuilder outputData;
- protected IDataSetParser parser;
- private boolean disposed;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/structures/ChartStreamDaemon2.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/structures/ChartStreamDaemon2.java
deleted file mode 100644
index e31b27fb95..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/structures/ChartStreamDaemon2.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures;
-
-
-import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ScriptConsole;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSetParser;
-
-
-/**
- * Listens for data events and populates the internal <code>DataSet</code> with the data
- * that was received and matched the regExpr
- * @author Ryan Morse
- */
-public class ChartStreamDaemon2 extends ChartStreamDaemon {
- public ChartStreamDaemon2(ScriptConsole console, IDataSet d, IDataSetParser p) {
- super(d, p);
-
- }
-
- /**
- * Changes the internal <code>DataSet</code> and parsing expression.
- * @param d The new <code>DataSet</code> to store the parsed output.
- * @param regExpr String[] containing the RegEx patterns to match against.
- */
- public void setParser(IDataSet d, IDataSetParser p) {
- data = d;
- parser = p;
- if(0 != outputData.length())
- outputData.delete(0, outputData.length()-1);
- outputData.append(console.getOutput());
- }
-
- /**
- * Disposes of all the internal data.
- */
- public void dispose() {
- if(!isDisposed()) {
- super.dispose();
- console = null;
- }
- }
-
- private ScriptConsole console;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/structures/DataPoint.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/structures/DataPoint.java
deleted file mode 100644
index 6074f0cfd9..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/structures/DataPoint.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures;
-
-public class DataPoint {
- public DataPoint() {
- this(0, 0);
- }
-
- public DataPoint(double x, double y) {
- this.x = x;
- this.y = y;
- }
-
- public double x;
- public double y;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/structures/GraphData.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/structures/GraphData.java
deleted file mode 100644
index fc81a838a4..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/structures/GraphData.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures;
-
-public class GraphData {
- public int xSeries;
- public int[] ySeries;
- public String key;
- public String graphID;
- public String title;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/structures/NumberType.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/structures/NumberType.java
deleted file mode 100644
index 5e19408ce5..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/structures/NumberType.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures;
-
-public final class NumberType {
-
- /**
- * Returns a new instance of the passed in num of type orig.
- *
- * @param orig The desired datatype.
- * @param num The number to replicate.
- *
- * @return The new cast number.
- */
- public static Number getNumber(Number orig, double num) {
- if(orig instanceof Long)
- return new Long((long)num);
- else if(orig instanceof Double)
- return new Double(num);
- else if(orig instanceof Float)
- return new Float((float)num);
- else if(orig instanceof Byte)
- return new Byte((byte)num);
- else if(orig instanceof Short)
- return new Short((short)num);
- return new Integer((int)num);
- }
-
- /**
- * Takes an array of objects and returns an array of Numbers.
- *
- * @param o The array of objects to convert.
- *
- * @return The array of Numbers from o.
- */
- public static Number[] obj2num(Object[] o) {
- Number[] arr = new Number[o.length];
- for(int i = 0; i < o.length; i++)
- arr[i] = obj2num(o[i]);
-
- return arr;
- }
-
- /**
- * Takes an array of Numbers and returns an array of objects.
- *
- * @param o The array of Numbers to convert.
- *
- * @return The array of objects from o.
- */
- public static Number obj2num(Object o) {
- Number n = null;
-
- try {
- n = cleanObj2Num(o);
- } catch(NumberFormatException e ) {
- n = new Long(0);
- }
- return n;
- }
-
- /**
- * Returns an array of Numbers type if they are Numbers, otherwise, returns Doubles and Longs as appropriate
- * based on whether or not it has a '.'
- *
- * @param o The object array to clean.
- *
- * @return The Number array cleaned.
- */
- public static Number[] cleanObj2Num(Object[] o) throws NumberFormatException {
- Number[] arr = new Number[o.length];
- for(int i = 0; i < o.length; i++)
- arr[i] = cleanObj2Num(o[i]);
-
- return arr;
- }
-
- /**
- * Returns a Number type if its a Number, otherwise, returns Doubles and Longs as appropriate
- * based on whether or not it has a '.'
- *
- * @param o The object to clean.
- *
- * @return The Number object cleaned.
- */
- public static Number cleanObj2Num(Object o) throws NumberFormatException {
- if(o instanceof Number)
- return (Number)o;
- else {
- if(o.toString().contains("."))
- return new Double(Double.parseDouble(o.toString()));
- else
- return new Long(Long.parseLong(o.toString()));
- }
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/.classpath
deleted file mode 100644
index 64c5e31b7a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/.project b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/.project
deleted file mode 100644
index 688d7e359d..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.ui.graphingapi.ui</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/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/.settings/org.eclipse.jdt.core.prefs b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 9e7431cd31..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Feb 27 18:15:25 IST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/ChangeLog
deleted file mode 100644
index e8998e8246..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/ChangeLog
+++ /dev/null
@@ -1,15 +0,0 @@
-2009-11-16 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Fix Bundle-Name.
-
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Make version 0.3.0.qualifier.
-
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Change provider from IBM to Eclipse.
-
-2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * ChangeLog: Refactoring. Renaming all packages directories from *.systemtapgui.* to *.systemtap.ui.* \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index 858540fb4d..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,23 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: SystemTap Graphing API (UI) (Incubation)
-Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.graphingapi.ui;singleton:=true
-Bundle-Version: 0.3.0.qualifier
-Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.GraphingAPIUIPlugin
-Bundle-Vendor: Eclipse
-Bundle-Localization: plugin
-Export-Package:
- org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.datadisplay,
- org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs,
- org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.preferences,
- org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.widgets,
- org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.dataset,
- org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.filter,
- org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.graph
-Require-Bundle: org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui;visibility:=reexport,
- org.eclipse.linuxtools.systemtap.ui.structures,
- org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.ui.forms
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/build.properties
deleted file mode 100644
index c88359b87e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- icons/,\
- plugin.properties
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/icons/graphs/BarGraph.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/icons/graphs/BarGraph.gif
deleted file mode 100644
index b396c353b4..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/icons/graphs/BarGraph.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/icons/graphs/LineGraph.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/icons/graphs/LineGraph.gif
deleted file mode 100644
index 2a09ccf943..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/icons/graphs/LineGraph.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/icons/graphs/PieChart.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/icons/graphs/PieChart.gif
deleted file mode 100644
index d9e7b13ce1..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/icons/graphs/PieChart.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/icons/graphs/ScatterGraph.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/icons/graphs/ScatterGraph.gif
deleted file mode 100644
index 3542e06835..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/icons/graphs/ScatterGraph.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/plugin.properties
deleted file mode 100644
index 1c7f6fbc11..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/plugin.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-preference.graphing.name=GraphingAPI
-preference.dataTable.name=Data Table
-preference.graph.name=Graph
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/plugin.xml
deleted file mode 100644
index 10c8211584..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/plugin.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%preference.graphing.name"
- id="com.qualityeclipse.generic.prefs.graphingapi"
- class="org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.preferences.GraphingAPIPreferencePage"/>
- <page
- name="%preference.dataTable.name"
- id="com.qualityeclipse.generic.prefs.graphing.datatable"
- class="org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.preferences.DataTablePreferencePage"
- category="com.qualityeclipse.generic.prefs.graphingapi"/>
- <page
- name="%preference.graph.name"
- id="com.qualityeclipse.generic.prefs.graphing.graph"
- class="org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.preferences.GraphPreferencePage"
- category="com.qualityeclipse.generic.prefs.graphingapi"/>
- </extension>
-
- <extension
- point="org.eclipse.core.runtime.preferences">
- <initializer class="org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.preferences.PreferenceInitializer"/>
- </extension>
-</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/datadisplay/DataGrid.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/datadisplay/DataGrid.java
deleted file mode 100644
index cd4e9bb2a2..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/datadisplay/DataGrid.java
+++ /dev/null
@@ -1,344 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.datadisplay;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IFilteredDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.IDataSetFilter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.GraphingAPIUIPlugin;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.preferences.GraphingAPIPreferenceConstants;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.dataset.DataSetFactory;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.filter.AvailableFilterTypes;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.filter.SelectFilterWizard;
-import org.eclipse.linuxtools.systemtap.ui.structures.IFormattingStyles;
-import org.eclipse.linuxtools.systemtap.ui.structures.StringFormatter;
-import org.eclipse.linuxtools.systemtap.ui.structures.listeners.IUpdateListener;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MenuEvent;
-import org.eclipse.swt.events.MenuListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-
-
-
-public class DataGrid implements IUpdateListener {
- public DataGrid(Composite composite, IDataSet set, int style) {
- prefs = GraphingAPIUIPlugin.getDefault().getPreferenceStore();
- manualResize = !prefs.getBoolean(GraphingAPIPreferenceConstants.P_AUTO_RESIZE);
-
- dataSet = set;
- filteredDataSet = (dataSet instanceof IFilteredDataSet)
- ? (IFilteredDataSet)dataSet
- : DataSetFactory.createFilteredDataSet(dataSet);
- this.style = style;
- clickLocation = new Point(-1, -1);
- removedItems = 0;
- createPartControl(composite);
- }
-
- public void setLayoutData(Object data) {
- table.setLayoutData(data);
- }
-
- public IDataSet getDataSet() { return dataSet; }
- public Control getControl() { return table; }
-
- public void createPartControl(Composite parent) {
- table = new Table(parent, SWT.SINGLE | SWT.FULL_SELECTION);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- table.getVerticalBar().setVisible(true);
-
- String[] names = dataSet.getTitles();
- TableColumn column = new TableColumn(table, SWT.LEFT);
- column.setText(Localization.getString("DataGrid.Row"));
- column.pack();
- column.setMoveable(false);
- column.setResizable(false);
-
- columnFormat = new IFormattingStyles[names.length];
- for(int i=0; i<names.length; i++) {
- column = new TableColumn(table, SWT.LEFT);
- column.setText(names[i]);
- column.pack();
- column.setMoveable(true);
-
- columnFormat[i] = new StringFormatter();
- }
-
- table.setMenu(this.initMenus());
-
- table.addListener(SWT.MouseDown, new Listener() {
- public void handleEvent(Event event) {
- clickLocation.x = event.x;
- clickLocation.y = event.y;
- }
- });
- handleUpdateEvent();
- }
-
- public Menu initMenus() {
- Menu menu = new Menu(table.getShell(), SWT.POP_UP);
- menu.addMenuListener(new MainMenuListener());
-
- Menu formatMenu = new Menu(menu);
- MenuItem item = new MenuItem(menu, SWT.CASCADE);
- item.setText(Localization.getString("DataGrid.FormatAs"));
- item.setMenu(formatMenu);
-
- //if(dataSet instanceof IFilteredDataSet) {
- filterMenu = new Menu(menu);
- item = new MenuItem(menu, SWT.CASCADE);
- item.setText(Localization.getString("DataGrid.AddFilter"));
- item.addSelectionListener(new AddFilterSelection());
-
- item = new MenuItem(menu, SWT.CASCADE);
- item.setText(Localization.getString("DataGrid.RemoveFilter"));
- item.setMenu(filterMenu);
-
- IDataSetFilter[] filters = filteredDataSet.getFilters();
- if(null != filters) {
- for(int i=0; i<filters.length; i++) {
- item = new MenuItem(filterMenu, SWT.CASCADE);
- item.setText(AvailableFilterTypes.getFilterName(filters[i].getID()));
- item.setData(filters[i]);
- item.addSelectionListener(new RemoveFilterSelection());
- }
- }
- //}
-
- item = new MenuItem(menu, SWT.CHECK);
- item.setText(Localization.getString("DataGrid.ManualyResize"));
- item.addSelectionListener(new MenuManualyResizedSelection());
-
- for(int i=0; i<IFormattingStyles.FORMAT_TITLES.length; i++) {
- item = new MenuItem(formatMenu, SWT.RADIO);
- item.setText(IFormattingStyles.FORMAT_TITLES[i]);
- item.addSelectionListener(new MenuFormatSelection());
- }
-
- formatMenu.addMenuListener(new FormatMenuListener());
- return menu;
- }
-
- private int getSelectedColumn() {
- TableColumn[] cols = table.getColumns();
- int location = 0;
- for(int i=0; i<cols.length; i++)
- if(clickLocation.x > location && clickLocation.x < (location+=cols[i].getWidth()))
- return i;
-
- return cols.length-1;
- }
-
- public class MainMenuListener implements MenuListener {
- public void menuHidden(MenuEvent e) {}
-
- public void menuShown(MenuEvent e) {
- MenuItem item = ((Menu)e.widget).getItem(1);
- item.setSelection(manualResize);
- }
- }
-
- public class MenuManualyResizedSelection implements SelectionListener {
- public void widgetSelected(SelectionEvent e) {
- manualResize = !manualResize;
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {}
- }
-
- public class AddFilterSelection implements SelectionListener {
- public void widgetSelected(SelectionEvent e) {
- SelectFilterWizard wizard = new SelectFilterWizard(dataSet.getTitles());
- IWorkbench workbench = PlatformUI.getWorkbench();
- wizard.init(workbench, null);
- WizardDialog dialog = new WizardDialog(workbench.getActiveWorkbenchWindow().getShell(), wizard);
- dialog.create();
- dialog.open();
-
- IDataSetFilter filter = wizard.getFilter();
- wizard.dispose();
-
- if(null != filter) {
- filteredDataSet.addFilter(filter);
- table.removeAll();
- handleUpdateEvent();
-
- MenuItem item = new MenuItem(filterMenu, SWT.CASCADE);
- item.setText(AvailableFilterTypes.getFilterName(filter.getID()));
- item.setData(filter);
- item.addSelectionListener(new RemoveFilterSelection());
- }
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {}
- }
-
- public class RemoveFilterSelection implements SelectionListener {
- public void widgetSelected(SelectionEvent e) {
- IDataSetFilter idsf = (IDataSetFilter)((MenuItem)e.widget).getData();
- e.widget.dispose();
-
- if(filteredDataSet.removeFilter(idsf)) {
- table.removeAll();
- handleUpdateEvent();
- }
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {}
- }
-
- public class FormatMenuListener implements MenuListener {
- public void menuHidden(MenuEvent e) {}
-
- public void menuShown(MenuEvent e) {
- MenuItem[] items = ((Menu)e.widget).getItems();
- boolean doubleValid = false, longValid = false;
- String itemText;
-
- int selectedCol = Math.max(1, getSelectedColumn());
-
- for(int i=0; i<items.length; i++)
- items[i].setSelection(false);
- items[columnFormat[selectedCol-1].getFormat()].setSelection(true);
-
- itemText = dataSet.getRow(0)[selectedCol-1].toString();
- items[IFormattingStyles.UNFORMATED].setEnabled(true);
- items[IFormattingStyles.STRING].setEnabled(true);
-
- try {
- Double.parseDouble(itemText);
- doubleValid = true;
-
- try {
- Long.parseLong(itemText);
- longValid = true;
- } catch(NumberFormatException nfe2) {}
- } catch(NumberFormatException nfe) {}
-
- items[IFormattingStyles.DOUBLE].setEnabled(doubleValid);
- items[IFormattingStyles.HEX].setEnabled(longValid);
- items[IFormattingStyles.OCTAL].setEnabled(longValid);
- items[IFormattingStyles.BINARY].setEnabled(longValid);
- items[IFormattingStyles.DATE].setEnabled(longValid);
- }
- }
-
- public class MenuFormatSelection implements SelectionListener {
- public void widgetSelected(SelectionEvent e) {
- int format = IFormattingStyles.UNFORMATED;
- int column = Math.max(1, getSelectedColumn());
- int i;
- for(i=0; i<IFormattingStyles.FORMAT_TITLES.length; i++)
- if(IFormattingStyles.FORMAT_TITLES[i].equals(((MenuItem)e.getSource()).getText()))
- format = i;
-
- Object[] data = dataSet.getColumn(column-1);
- columnFormat[column-1].setFormat(format);
- for(i=0; i<table.getItemCount(); i++)
- table.getItem(i).setText(column, columnFormat[column-1].format(data[i].toString()));
- table.redraw();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {}
- }
-
- public void handleUpdateEvent() {
- if(table.isDisposed()) return;
-
- table.getDisplay().asyncExec(new Runnable() {
- public void run() {
- TableItem item;
- int startLocation, endLocation = filteredDataSet.getRowCount();
-
- if(FULL_UPDATE == (style & FULL_UPDATE)) {
- //Remove extra items so save memory.
- removedItems += table.getItemCount();
- table.removeAll();
- startLocation = 0;
- } else {
- startLocation = table.getItemCount()+removedItems;
- }
-
- //Add all the new items to the table
- Object[] os;
- for(int j,i=startLocation; i<endLocation; i++) {
- item = new TableItem(table, SWT.NONE);
- os = filteredDataSet.getRow(i);
-
- item.setText(0, "" + i);
- for(j=0; j<os.length; j++)
- item.setText(j+1, columnFormat[j].format(os[j].toString()));
- }
-
- if(FULL_UPDATE != (style & FULL_UPDATE)) {
- //Remove extra items so save memory.
- if(table.getItemCount() > prefs.getInt(GraphingAPIPreferenceConstants.P_MAX_DATA_ITEMS)) {
- int items = table.getItemCount()-prefs.getInt(GraphingAPIPreferenceConstants.P_MAX_DATA_ITEMS);
- table.remove(0, items-1);
- removedItems += items;
- }
- }
-
- //Resize the columns
- TableColumn col = table.getColumn(0);
- col.pack();
- if(!manualResize) {
- TableColumn[] cols = table.getColumns();
- for(int i=1; i<cols.length; i++)
- cols[i].pack();
- }
- //Use if we want to set focus to newly added item
- if(prefs.getBoolean(GraphingAPIPreferenceConstants.P_JUMP_NEW_TABLE_ENTRY))
- table.showItem(table.getItem(table.getItemCount()-1));
- }
- });
- }
-
- public void dispose() {
- dataSet = null;
- table.dispose();
- table = null;
- clickLocation = null;
- columnFormat = null;
- }
-
- protected IDataSet dataSet;
- protected IFilteredDataSet filteredDataSet;
- protected IFormattingStyles columnFormat[];
- protected int removedItems;
- protected Table table;
- protected Point clickLocation;
- protected IPreferenceStore prefs;
- protected boolean manualResize;
- protected Menu filterMenu;
- protected int style;
-
- public static final int NONE = 0;
- public static final int FULL_UPDATE = 1;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/AChart.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/AChart.java
deleted file mode 100644
index ba04aae690..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/AChart.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs;
-
-import java.util.LinkedList;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.IGraphColorConstants;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.adapters.IAdapter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.widgets.GraphCanvas;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.widgets.GraphComposite;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.widgets.GraphLabel;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.widgets.GraphLegend;
-import org.eclipse.linuxtools.systemtap.ui.structures.listeners.IUpdateListener;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.widgets.Button;
-
-
-
-public abstract class AChart extends GraphCanvas implements IGraph, IUpdateListener {
- public AChart(GraphComposite parent, int style, String title, IAdapter adapt) {
- super(parent, style);
- adapter = adapt;
-
- elementList = new LinkedList[adapt.getSeriesCount()];
- for(int i=0; i<elementList.length; i++)
- elementList[i] = new LinkedList<Object>();
-
- createLegend();
- createTitle(title);
-
- this.addPaintListener(paintListener);
-
- parent.addCheckOption(Localization.getString("AChart.Title"), titleListener);
- parent.addCheckOption(Localization.getString("AChart.Legend"), legendListener);
- }
-
- protected void createTitle(String title) {
- this.title = new GraphLabel(this, title, this, 0.1f, SWT.BOLD);
- }
-
- protected void createLegend() {
- String[] labels = adapter.getLabels();
- String[] labels2 = new String[labels.length-1];
- Color[] colors = new Color[labels2.length];
-
- for(int i=0; i<labels2.length; i++) {
- labels2[i] = labels[i+1];
- colors[i] = new Color(this.getDisplay(), IGraphColorConstants.COLORS[i]);
- }
-
- legend = new GraphLegend(this, labels2, colors);
- }
-
- protected void paintAll(GC gc) {
- paintElementList(gc);
- if(showLegend && legend != null)
- legend.paint(gc);
- if(showTitle && title != null)
- title.paint(gc);
- }
-
- public void dispose() {
- this.removePaintListener(paintListener);
- parent.removeCheckOption(Localization.getString("AChart.Title"));
- parent.removeCheckOption(Localization.getString("AChart.Legend"));
-
- legendListener = null;
- titleListener = null;
-
- super.dispose();
- }
-
- /*
- * Listeners are below:
- * paintListener - A PaintListener for making sure everything is drawn
- * titleListener - A SelectionListener for the title button
- * legendListener - A SelectionListener for the legend checkbox
- */
- private final PaintListener paintListener = new PaintListener() {
- public void paintControl(PaintEvent e) {
- paintAll(e.gc);
- }
- };
-
- private SelectionListener titleListener = new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {}
- public void widgetSelected(SelectionEvent e) {
- showTitle = ((Button)e.getSource()).getSelection();
- repaint();
- }
- };
-
- private SelectionListener legendListener = new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {}
- public void widgetSelected(SelectionEvent e) {
- showLegend = ((Button)e.getSource()).getSelection();
- repaint();
- }
- };
-
- public abstract boolean isMultiGraph();
- public abstract void handleUpdateEvent();
- public abstract void paintElementList(GC gc);
-
- protected GraphComposite parent;
- protected GraphLegend legend;
- protected GraphLabel title;
- @SuppressWarnings("unchecked")
- protected LinkedList[] elementList;
-
- public boolean showTitle, showLegend;
-
- private IAdapter adapter;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/AGraph.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/AGraph.java
deleted file mode 100644
index dbf2519d47..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/AGraph.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs;
-
-import java.util.LinkedList;
-
-import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
-import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.IGraphColorConstants;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.adapters.IAdapter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.DataPoint;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.GraphingAPIUIPlugin;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.preferences.GraphingAPIPreferenceConstants;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.widgets.GraphAxis;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.widgets.GraphAxis2;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.widgets.GraphComposite;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Button;
-
-
-
-public abstract class AGraph extends AChart implements IGraph {
- public AGraph(GraphComposite parent, int style, String title, IAdapter adapt) {
- super(parent, style, title, adapt);
- adapter = adapt;
- axes = new LinkedList<GraphAxis>();
-
- IPreferenceStore store = GraphingAPIUIPlugin.getDefault().getPreferenceStore();
- xSeriesTicks = store.getInt(GraphingAPIPreferenceConstants.P_X_SERIES_TICKS);
- ySeriesTicks = store.getInt(GraphingAPIPreferenceConstants.P_Y_SERIES_TICKS);
- maxItems = store.getInt(GraphingAPIPreferenceConstants.P_MAX_DATA_ITEMS);
- viewableItems = store.getInt(GraphingAPIPreferenceConstants.P_VIEWABLE_DATA_ITEMS);
-
- createAxis(Localization.getString("AGraph.xAxis"), xSeriesTicks, GraphAxis.HORIZONTAL);
- createAxis(Localization.getString("AGraph.yAxis"), ySeriesTicks, GraphAxis.VERTICAL);
-
- GraphingAPIUIPlugin.getDefault().getPluginPreferences().addPropertyChangeListener(propertyChangeListener);
-
- parent.addCheckOption(Localization.getString("AGraph.GridLines"), gridListener);
- if(adapter.getSeriesCount() > 1)
- parent.addCheckOption(Localization.getString("AGraph.Normalize"), normalizeListener);
- }
-
- protected void createAxis(String title, int tickCount, int style) {
- axes.add(new GraphAxis(this, title, tickCount, style));
- }
-
- protected void createAxis2(String title, int tickCount, int style) {
- axes.add(new GraphAxis2(this, title, tickCount, style, this.axisColor));
- }
-
- //******************************************************Please remove
- public Rectangle getArea(int items) {
- int uBound = elementList[0].size();
- int lBound = (uBound > items) ? (uBound-items) : 0;
-
- int maxX = Integer.MIN_VALUE;
- int minX = Integer.MAX_VALUE;
- int maxY = Integer.MIN_VALUE;
- int minY = Integer.MAX_VALUE;
-
- DataPoint p;
- Object o;
-
- //System.out.println("defaults:" + minX + " " + minY + " " + maxX + " " + maxY);
-
- for(int j=0; j<elementList.length; j++) {
- for(int i=lBound; i<uBound; i++) {
- o = elementList[j].get(i);
- p = (DataPoint)o;
- if(p.x < minX) minX = (int)p.x;
- if(p.x > maxX) maxX = (int)p.x;
- if(p.y < minY) minY = (int)p.y;
- if(p.y > maxY) maxY = (int)p.y;
- }
- }
-
- //This is to attempt to keep the data series a constant width apart
- //if(uBound < viewableItems && adapter instanceof ScrollAdapter)
- //minX = maxX - (int)(((maxX-minX)/(uBound-1.0))*(viewableItems-1));
-
-
- return new Rectangle(minX, minY, maxX-minX, maxY-minY);
- }
-
- private synchronized void rebound() {
- getDisplay().syncExec(new Runnable() {
- boolean stop = false;
- public void run() {
- if(stop) return;
- try {
- setGlobalArea(getArea(maxItems));
- setLocalArea(getArea(viewableItems));
- } catch (Exception e) {
- stop = true;
- }
- }
- });
- }
-
- public synchronized void repaint() {
- rebound();
- super.repaint();
- }
- //*******************************************************End remove
-
-
- /**
- * Sets the category axis that is displayed to the axis belonging to the input series index.
- * @param series Series to display the axis for.
- */
- public void addSeriesAxis(int series) {
- if(selectedSeries != (series+1)) {
- removeSeriesAxis();
- seriesAxis = new GraphAxis2(this, Localization.getString("AGraph.SeriesAxis"), ySeriesTicks,
- GraphAxis2.ALIGN_RIGHT |
- GraphAxis2.HIDE_GRID_LINES |
- GraphAxis2.UNNORMALIZED |
- GraphAxis2.HIDE_TITLE,
- new Color(this.getDisplay(), IGraphColorConstants.COLORS[series]));
- selectedSeries = series+1;
- axes.add(seriesAxis);
- this.repaint();
- }
- }
-
- /**
- * Removes the series axis from the graph.
- */
- public void removeSeriesAxis() {
- if(null != seriesAxis) {
- axes.remove(seriesAxis);
- seriesAxis = null;
- selectedSeries = -1;
- this.repaint();
- }
- }
-
- protected void paintAll(GC gc) {
- for(int i = 0; i < axes.size(); i++)
- ((GraphAxis)axes.get(i)).paint(gc);
- super.paintAll(gc);
- }
-
- public void dispose() {
- GraphingAPIUIPlugin.getDefault().getPluginPreferences().removePropertyChangeListener(propertyChangeListener);
-
- parent.removeCheckOption(Localization.getString("AGraph.Normalize"));
- parent.removeCheckOption(Localization.getString("AGraph.GridLines"));
-
- normalizeListener = null;
- gridListener = null;
-
- parent = null;
-
- super.dispose();
- }
-
- /*
- * Listeners are below:
- * gridListener - A SelectionListener for the Grid checkbox
- * normalizeListener - A SelectionListener for the normalization checkbox
- * propertyChangeListener - Detects changes in user preferences and applies them
- */
- private final IPropertyChangeListener propertyChangeListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- IPreferenceStore store = GraphingAPIUIPlugin.getDefault().getPreferenceStore();
- if(event.getProperty().equals(GraphingAPIPreferenceConstants.P_MAX_DATA_ITEMS))
- maxItems = store.getInt(GraphingAPIPreferenceConstants.P_MAX_DATA_ITEMS);
- else if(event.getProperty().equals(GraphingAPIPreferenceConstants.P_VIEWABLE_DATA_ITEMS))
- viewableItems = store.getInt(GraphingAPIPreferenceConstants.P_VIEWABLE_DATA_ITEMS);
- else if(event.getProperty().equals(GraphingAPIPreferenceConstants.P_X_SERIES_TICKS)) {
- xSeriesTicks = store.getInt(GraphingAPIPreferenceConstants.P_X_SERIES_TICKS);
- GraphAxis a;
- for(int i=0; i<axes.size(); i++) {
- a = ((GraphAxis)axes.get(i));
- if(GraphAxis.HORIZONTAL == a.getType())
- a.setTickCount(xSeriesTicks);
- }
- } else if(event.getProperty().equals(GraphingAPIPreferenceConstants.P_Y_SERIES_TICKS)) {
- ySeriesTicks = store.getInt(GraphingAPIPreferenceConstants.P_Y_SERIES_TICKS);
- GraphAxis a;
- for(int i=0; i<axes.size(); i++) {
- a = ((GraphAxis)axes.get(i));
- if(GraphAxis.VERTICAL == a.getType())
- a.setTickCount(ySeriesTicks);
- }
- } else if(event.getProperty().equals(GraphingAPIPreferenceConstants.P_SHOW_GRID_LINES))
- showGrid = store.getBoolean(GraphingAPIPreferenceConstants.P_SHOW_GRID_LINES);
-
- repaint();
- }
- };
-
- private SelectionListener gridListener = new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {}
- public void widgetSelected(SelectionEvent e) {
- showGrid = ((Button)e.getSource()).getSelection();
- repaint();
- }
- };
-
- private SelectionListener normalizeListener = new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {}
- public void widgetSelected(SelectionEvent e) {
- normalize = ((Button)e.getSource()).getSelection();
- if(!normalize) removeSeriesAxis();
- handleUpdateEvent();
- }
- };
-
- protected LinkedList<GraphAxis> axes;
-
- private IAdapter adapter;
-
- protected static int xSeriesTicks;
- protected static int ySeriesTicks;
- protected static int maxItems;
- protected static int viewableItems;
- protected int removedItems;
-
- public boolean showGrid, normalize;
-
- protected int selectedSeries;
- protected GraphAxis seriesAxis;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/BarGraph.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/BarGraph.java
deleted file mode 100644
index 8a8358717a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/BarGraph.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.IGraphColorConstants;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.adapters.BlockAdapter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.adapters.IAdapter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.DataPoint;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.NumberType;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.widgets.GraphComposite;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-
-
-
-/**
- * A Bar Graph implementation for the Graphing system.
- * @author Henry Hughes
- * @author Ryan Morse
- */
-public class BarGraph extends AGraph implements IBlockGraph, IScrollGraph {
- /**
- * Default constructor for the bar graph.
- * @param title Title of the graph.
- * @param style Style code to use.
- * @param adapt Dataset Adapter for the graph.
- */
- public BarGraph(GraphComposite parent, int style, String title, IAdapter adapter) {
- super(parent, style, title, adapter);
- this.adapter = adapter;
- fullUpdate = (adapter instanceof BlockAdapter) ? true : false;
- handleUpdateEvent();
- }
-
- /**
- * Paints all of the data elements to the screen
- */
- @SuppressWarnings("unchecked")
- public void paintElementList(GC gc) {
- DataPoint[] points = new DataPoint[0];
-
- Color temp = gc.getForeground();
- Color temp1 = gc.getBackground();
-
- Color c;
- Color c1;
-
- double xSize = super.getSize().x - (super.getXPadding()<<1);
- xSize /= (super.getLocalWidth()+1);
- xSize /= (elementList.length);
- double ySize = super.getSize().y - (super.getYPadding()<<1);
- ySize /= (super.getLocalHeight());
-
- double px, py;
- double pw=0, ph;
-
- for(int j=0; j<elementList.length; j++) {
- points = (DataPoint[])elementList[j].toArray(points);
-
- c = new Color(getDisplay(), IGraphColorConstants.COLORS[j]);
- c1 = new Color(getDisplay(), c.getRed()>>1, c.getGreen()>>1, c.getBlue()>>1);
- gc.setForeground(c);
- gc.setBackground(c1);
- double width = WIDTH_PERCENT;
- for(int i=0; i<points.length; i++) {
- px = super.getLocation().x + (((points[i].x * (elementList.length))-super.getLocalXMin()) * xSize) + super.getXPadding();
- px = px + ((j - elementList.length/2) * (xSize * width));
- pw = (xSize * width);
-
- py = super.getSize().y - super.getYPadding();
- ph = ((super.getLocalYMax() - points[i].y) * ySize) + super.getYPadding()-py;
- //System.out.println("rectangle area:" + j + " " + px + " " + pw + " " + py + " " + ph + " " + points[i].x + " " + points[i].y );
- gc.fillGradientRectangle((int)(px), (int)py, (int)pw, (int)ph, true);
- }
- }
-
- gc.setForeground(temp);
- gc.setBackground(temp1);
- }
-
- public boolean isMultiGraph() {
- return adapter.getSeriesCount() > 0;
- }
-
- /**
- * Handles an update notification for new data in the Data Set. Causes the graph to add
- * all new samples to the graph, and then repaint itself.
- */
- public void handleUpdateEvent() {
- if(null == adapter) return;
-
- this.getDisplay().syncExec(new Runnable() {
- @SuppressWarnings("unchecked")
- public void run() {
- Object[][] data;
- if(fullUpdate) {
- for(int i=0; i<elementList.length; i++)
- elementList[i].clear();
- data = adapter.getData();
- } else
- data = adapter.getData(removedItems, adapter.getRecordCount());
-
- if(normalize) {
- double max;
- for(int j,i=0; i<adapter.getSeriesCount(); i++) {
- elementList[i].clear(); //TODO: Only temparary
- max = adapter.getYSeriesMax(i, removedItems, adapter.getRecordCount()).doubleValue() / 100;
- for(j=0; j<data.length; j++) {
- elementList[i].add(new DataPoint(adapter instanceof BlockAdapter ? j : NumberType.obj2num(data[j][0]).doubleValue(),
- NumberType.obj2num(data[j][i+1]).doubleValue() / max));
- }
- }
- } else {
- for(int j,i=0; i<adapter.getSeriesCount(); i++) {
- elementList[i].clear(); //TODO: Only temparary
- for(j=0; j<data.length; j++) {
- elementList[i].add(new DataPoint(adapter instanceof BlockAdapter ? j : NumberType.obj2num(data[j][0]).doubleValue(),
- NumberType.obj2num(data[j][i+1]).doubleValue()));
- }
- }
- }
- }
- });
- this.repaint();
- }
-
- private IAdapter adapter;
- private boolean fullUpdate;
- public static final String ID = "org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs.bargraph";
- private static final double WIDTH_PERCENT = 0.8;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/IBlockGraph.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/IBlockGraph.java
deleted file mode 100644
index 50b4f7d209..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/IBlockGraph.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs;
-
-public interface IBlockGraph extends IGraph {
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/IGraph.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/IGraph.java
deleted file mode 100644
index 7de3c6ad70..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/IGraph.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.listeners.IUpdateListener;
-import org.eclipse.swt.graphics.Color;
-
-
-
-public interface IGraph extends IUpdateListener {
- public boolean isMultiGraph();
- public void repaint();
- public void dispose();
- public void setBackground(Color c);
- public void setForeground(Color c);
- public void setLayoutData(Object layout);
- public void setScale(double scale);
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/IScrollGraph.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/IScrollGraph.java
deleted file mode 100644
index 00b30a3e38..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/IScrollGraph.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs;
-
-public interface IScrollGraph extends IGraph {
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/LineGraph.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/LineGraph.java
deleted file mode 100644
index 247fc7f13d..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/LineGraph.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.IGraphColorConstants;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.adapters.ScrollAdapter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.DataPoint;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.NumberType;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.widgets.GraphComposite;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-
-
-
-/**
- * A line graph implementation for the graphing system.
- * @author Ryan Morse
- * @author Henry Hughes
- */
-public class LineGraph extends AGraph implements IScrollGraph {
- /**
- * Default constructor for LineGraph. Simply invokes the constructor from <code>ScatterGraph</code>
- * and fires the Update Event when its done, causing the graph to draw itself.
- */
- public LineGraph(GraphComposite parent, int style, String title, ScrollAdapter adapter) {
- super(parent, style, title, adapter);
- this.adapter = adapter;
- handleUpdateEvent();
- }
-
- @SuppressWarnings("unchecked")
- public void paintElementList(GC gc) {
- DataPoint[] points = new DataPoint[0];
-
- Color temp = gc.getForeground();
- Color c;
-
- double xSize = super.getSize().x - (super.getXPadding()<<1);
- xSize /= (super.getLocalWidth());
- double ySize = super.getSize().y - (super.getYPadding()<<1);
- ySize /= (super.getLocalHeight());
-
- double px, py;
- double px2, py2;
-
- for(int j=0; j<elementList.length; j++) {
- points = (DataPoint[])elementList[j].toArray(points);
- c = new Color(getDisplay(), IGraphColorConstants.COLORS[j]);
- gc.setForeground(c);
-
- px2 = 0;
- py2 = super.getSize().y - super.getYPadding();
- for(int i=0; i<points.length; i++) {
- px = (points[i].x-super.getLocalXMin());
- px *= xSize;
- px += super.getXPadding();
-
- py = super.getLocalYMax() - points[i].y;
- py *= ySize;
- py += super.getYPadding();
-
- gc.drawLine((int)px, (int)py, (int)px2, (int)py2);
- px2 = px;
- py2 = py;
- }
- }
-
- gc.setForeground(temp);
- }
-
- public boolean isMultiGraph() {
- return adapter.getSeriesCount() > 0;
- }
-
- /**
- * Updates the graph when the <code>DataSet</code> has more data, adding the new samples to the graph.
- */
- public void handleUpdateEvent() {
- if(null == adapter) return;
-
- this.getDisplay().syncExec(new Runnable() {
- @SuppressWarnings("unchecked")
- public void run() {
- Object[][] data = adapter.getData(removedItems, adapter.getRecordCount());
- if(normalize) {
- double max;
- for(int j,i=0; i<adapter.getSeriesCount(); i++) {
- elementList[i].clear(); //TODO: Only temparary
- max = adapter.getYSeriesMax(i, removedItems, adapter.getRecordCount()).doubleValue() / 100;
- for(j=0; j<data.length; j++) {
- elementList[i].add(new DataPoint(NumberType.obj2num(data[j][0]).doubleValue(),
- NumberType.obj2num(data[j][i+1]).doubleValue() / max));
- }
- }
- } else {
- for(int j,i=0; i<adapter.getSeriesCount(); i++) {
- elementList[i].clear(); //TODO: Only temparary
- for(j=0; j<data.length; j++) {
- elementList[i].add(new DataPoint(NumberType.obj2num(data[j][0]).doubleValue(),
- NumberType.obj2num(data[j][i+1]).doubleValue()));
- }
- }
- }
- }
- });
- this.repaint();
- }
-
- private ScrollAdapter adapter;
- public static final String ID = "org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs.linegraph";
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/PieChart.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/PieChart.java
deleted file mode 100644
index 866c660dee..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/PieChart.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.IGraphColorConstants;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.adapters.BlockAdapter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.NumberType;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.widgets.GraphComposite;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.widgets.GraphLegend;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-
-
-
-public class PieChart extends AChart implements IBlockGraph {
- public PieChart(GraphComposite parent, int style, String title, BlockAdapter adapt) {
- super(parent, style, title, adapt);
- adapter = adapt;
- handleUpdateEvent();
- }
-
- private void updateLegend() {
- Object [][] l = adapter.getData();
- String [] labels = new String[adapter.getRecordCount()];
- Color[] colors = new Color[labels.length];
-
- for(int i=0; i<labels.length; i++) {
- labels[i] = l[i][0].toString();
- colors[i] = new Color(this.getDisplay(), IGraphColorConstants.COLORS[i]);
- }
-
- legend = new GraphLegend(this, labels, colors);
- }
-
- @SuppressWarnings("unchecked")
- public void paintElementList(GC gc) {
- updateLegend(); //Make sure legend has current keys
- Color temp = gc.getForeground();
- Color temp1 = gc.getBackground();
- Color c;
-
- int pw = Math.min(super.getSize().x - (super.getXPadding()<<1), super.getSize().y - (super.getYPadding()<<1));
- int px = (super.getSize().x - super.getXPadding() - pw)>>1;
- int py = (super.getSize().y - super.getYPadding() - pw)>>1;
-
- int angle1, angle0 = 0;
- Number[] points = new Number[0];
- points = (Number[])elementList[0].toArray(points);
- for(int i=0; i<points.length; i++) {
- c = new Color(getDisplay(), IGraphColorConstants.COLORS[i]);
- gc.setForeground(c);
- gc.setBackground(c);
- angle1 = (int)((MAX_ANGLE*(points[i].doubleValue()/sum))+0.51);
- gc.fillArc(px, py, pw, pw, angle0, angle1);
- angle0 += angle1;
- }
-
- //If there is no data to display draw a crossed out circle
- if(0 == points.length) {
- gc.drawArc(px, py, pw, pw, 0, 360);
- gc.drawLine(px, py, px+pw, py+pw);
- gc.drawLine(px, py+pw, px+pw, py);
- }
-
- gc.setForeground(temp);
- gc.setBackground(temp1);
- }
-
- public boolean isMultiGraph() {
- return false;
- }
-
- public void handleUpdateEvent() {
- if(null == adapter) return;
-
- this.getDisplay().syncExec(new Runnable() {
- @SuppressWarnings("unchecked")
- public void run() {
- Object[][] data;
- elementList[0].clear();
- data = adapter.getData();
-
- Number n;
- sum = 0;
- for(int i=0; i<data.length; i++) {
- n = NumberType.obj2num(data[i][1]);
- elementList[0].add(n);
- sum += n.doubleValue();
- }
- }
- });
- this.repaint();
- }
-
- public static final String ID = "org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs.piechart";
- private BlockAdapter adapter;
- private double sum;
- private static final int MAX_ANGLE = 360;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/ScatterGraph.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/ScatterGraph.java
deleted file mode 100644
index d91c400b1b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/ScatterGraph.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.IGraphColorConstants;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.adapters.ScrollAdapter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.DataPoint;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.NumberType;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.widgets.GraphComposite;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-
-
-
-/**
- * A generic scatter plot implementation.
- * @author Ryan Morse
- * @author Henry Hughes
- */
-public class ScatterGraph extends AGraph implements IScrollGraph {
- /**
- * Default constructor for ScatterGraph. Simply invokes the constructor from <code>Graph</code>
- * and fires the Update Event when its done, causing the graph to draw itself.
- */
- public ScatterGraph(GraphComposite parent, int style, String title, ScrollAdapter adapter) {
- super(parent, style, title, adapter);
- this.adapter = adapter;
- handleUpdateEvent();
- }
-
- @SuppressWarnings("unchecked")
- public void paintElementList(GC gc) {
- DataPoint[] points = new DataPoint[0];
-
- Color temp = gc.getForeground();
- Color temp1 = gc.getBackground();
- Color c;
-
- double xSize = super.getSize().x - (super.getXPadding()<<1);
- xSize /= (super.getLocalWidth());
- double ySize = super.getSize().y - (super.getYPadding()<<1);
- ySize /= (super.getLocalHeight());
-
- double px, py;
-
- for(int j=0; j<elementList.length; j++) {
- points = (DataPoint[])elementList[j].toArray(points);
-
- c = new Color(getDisplay(), IGraphColorConstants.COLORS[j]);
- gc.setForeground(c);
- gc.setBackground(c);
-
- for(int i=0; i<points.length; i++) {
- px = (points[i].x-super.getLocalXMin());
- px *= xSize;
- px += super.getXPadding() - (DIAMETER>>1);
-
- py = super.getLocalYMax() - points[i].y;
- py *= ySize;
- py += super.getYPadding() - (DIAMETER>>1);
-
- gc.fillOval((int)px, (int)py, DIAMETER, DIAMETER);
- }
- }
-
- gc.setForeground(temp);
- gc.setBackground(temp1);
- }
-
- public boolean isMultiGraph() {
- return adapter.getSeriesCount() > 0;
- }
-
- /**
- * Updates the graph when the <code>IDataSet</code> has more data, adding the new samples to the graph.
- */
- public void handleUpdateEvent() {
- if(null == adapter) return;
-
- this.getDisplay().syncExec(new Runnable() {
- @SuppressWarnings("unchecked")
- public void run() {
- Object[][] data = adapter.getData(removedItems, adapter.getRecordCount());
-
- if(normalize) {
- double max;
- for(int j,i=0; i<adapter.getSeriesCount(); i++) {
- elementList[i].clear(); //TODO: Only temparary
- max = adapter.getYSeriesMax(i, removedItems, adapter.getRecordCount()).doubleValue() / 100;
- for(j=0; j<data.length; j++) {
- elementList[i].add(new DataPoint(NumberType.obj2num(data[j][0]).doubleValue(),
- NumberType.obj2num(data[j][i+1]).doubleValue() / max));
- }
- }
- } else {
- for(int j,i=0; i<adapter.getSeriesCount(); i++) {
- elementList[i].clear(); //TODO: Only temparary
- for(j=0; j<data.length; j++) {
- elementList[i].add(new DataPoint(NumberType.obj2num(data[j][0]).doubleValue(),
- NumberType.obj2num(data[j][i+1]).doubleValue()));
- }
- }
- }
- }
- });
- this.repaint();
- }
-
- private ScrollAdapter adapter;
- public static final String ID = "org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs.scattergraph";
- private static final int DIAMETER = 5;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/internal/GraphingAPIUIPlugin.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/internal/GraphingAPIUIPlugin.java
deleted file mode 100644
index 55ac08ed41..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/internal/GraphingAPIUIPlugin.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal;
-
-import org.eclipse.ui.plugin.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class GraphingAPIUIPlugin extends AbstractUIPlugin {
-
- //The shared instance.
- private static GraphingAPIUIPlugin plugin;
-
- /**
- * The constructor.
- */
- public GraphingAPIUIPlugin() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static GraphingAPIUIPlugin 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 AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.linuxtools.systemtap.ui.graphingapi.ui", path);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/internal/Localization.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/internal/Localization.java
deleted file mode 100644
index 70eea68919..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/internal/Localization.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Localization {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.localization";
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
-
- private Localization() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/internal/localization.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/internal/localization.properties
deleted file mode 100644
index aef74faf23..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/internal/localization.properties
+++ /dev/null
@@ -1,142 +0,0 @@
-#DataDisplay
-DataGrid.Row=Row
-DataGrid.FormatAs=Format as...
-DataGrid.AddFilter=Add filter...
-DataGrid.RemoveFilter=Remove filter...
-DataGrid.ManualyResize=Manualy Resize
-
-#Graphs
-AChart.Title=Title
-AChart.Legend=Legend
-
-AGraph.xAxis=x-axis
-AGraph.yAxis=y-axis
-AGraph.GridLines=Grid Lines
-AGraph.Normalize=Normalize
-AGraph.SeriesAxis=series axis
-
-#Preferences
-GraphingAPIPreferencePage.GraphDisplayPreferences=GraphingAPI Details
-
-GraphPreferencePage.GraphDisplayPreferences=Basic preferences for graph display.
-GraphPreferencePage.ShowGridLines=&Show grid lines:
-GraphPreferencePage.MaxDataItems=&Max data items:
-GraphPreferencePage.ViewableDataItems=&Viewable data items:
-GraphPreferencePage.XSeriesTicks=&X series ticks:
-GraphPreferencePage.YSeriesTicks=&Y series ticks:
-
-DataTablePreferencePage.GraphDisplayPreferences=Basic preferences for graph display.
-DataTablePreferencePage.JumpNewestEntry=&Jump to newest entry:
-DataTablePreferencePage.AutoResizeColumns=&Auto resize columns:
-DataTablePreferencePage.MaxDataItems=&Max data items:
-
-#Wigets
-GraphAxis.Kilo=K
-GraphAxis.Mega=M
-GraphAxis.Giga=G
-GraphAxis.Tera=T
-GraphAxis.Peta=P
-GraphAxis.Exa=E
-GraphAxis.Zetta=Z
-GraphAxis.Yotta=Y
-
-GraphLegend.Legend=Legend
-
-GraphComposite.ScaleValue=x
-
-#Wizards.DataSet
-DataSetFactory.RowDataSet=Row Data Set
-DataSetFactory.TableDataSet=Table Data Set
-DataSetFactory.RowDataSetDescription=Script outputs simple rows of values.\n\n
-DataSetFactory.DataSetExample=ie:\n
-DataSetFactory.DataSetHeader=Col1\tCol2\tCol3\n
-DataSetFactory.TableDataSetDescription=Script periodicaly outputs preformated tables of the values\n\n
-
-DataSetWizard.CreateDataSet=Create Data Set
-
-ParsingWizardPage.NumberOfColumns=Number of Columns:
-ParsingWizardPage.RegularExpression=Regular Expression:
-ParsingWizardPage.Title=Title:
-ParsingWizardPage.Delimiter=Delimiter:
-
-SelectDataSetWizardPage.SelectDataSetType=Select Data Set Type
-
-SelectTableParsingWizardPage.SelectTableDataSetParsing=Select Table Data Set Parsing
-SelectTableParsingWizardPage.TableDelimiter=Table Delimiter:
-
-SelectRowParsingWizardPage.SelectRowDataSetParsing=Select Row Data Set Parsing
-
-#Wizards.Filter
-AvailableFilterTypes.MatchFilter=Match Filter
-AvailableFilterTypes.RangeFilter=Range Filter
-AvailableFilterTypes.SortFilter=Sort Filter
-AvailableFilterTypes.UniqueFilter=Unique Filter
-AvailableFilterTypes.MatchFilterDescription=This filter removes everything from the data set where the selected column's value does not match the chosen value.
-AvailableFilterTypes.RangeFilterDescription=This filter will remove everying that is not included in the selected range of values.
-AvailableFilterTypes.SortFilterDescription=This filter will sort the entire data set based on the selected column. No data will be removed.
-AvailableFilterTypes.UniqueFilterDescription=This filter will remove all merge all entries in the data set that share a common value in the selected column. Data for the removed rows will be aggregated together based on the chosed aggregation method.
-
-AggregateFactory.AverageAggregate=Average Aggregate
-AggregateFactory.CountAggregate=Count Aggregate
-AggregateFactory.MaxAggregate=Max Aggregate
-AggregateFactory.MinAggregate=Min Aggregate
-AggregateFactory.SumAggregate=Sum Aggregate
-AggregateFactory.AverageDescription=This aggregate will return the average of all of the items consolidated.
-AggregateFactory.CountDescription=This aggregate will return the number of items consolidated.
-AggregateFactory.MaxDescription=This aggregate will return the maximum value of all the items consolidated.
-AggregateFactory.MinDescription=This aggregate will return the minimum value of all the items consolidated.
-AggregateFactory.SumDescription=This aggregate will return the sum of all of the items consolidated.
-
-MatchFilterWizardPage.CreateMatchFilter=Create Match Filter
-MatchFilterWizardPage.Column=Column:
-MatchFilterWizardPage.CompareTo=String to compare to:
-MatchFilterWizardPage.KeepMatching=Keep Matching
-MatchFilterWizardPage.RemoveMatching=Remove Matching
-
-RangeFilterWizardPage.CreateRangeFilter=Create Range Filter
-RangeFilterWizardPage.Column=Column:
-RangeFilterWizardPage.LowerBound=Lower bound:
-RangeFilterWizardPage.UpperBound=Upper bound:
-RangeFilterWizardPage.InsideBounds=Inside Bounds
-RangeFilterWizardPage.OutsideBounds=Outside Bounds
-RangeFilterWizardPage.Inclusive=Inclusive
-
-SelectFilterWizard.CreateFilter=Create Filter
-
-SelectFilterWizardPage.SelectFilter=Select Filter
-
-SortFilterWizardPage.CreateSortFilter=Create Sort Filter
-SortFilterWizardPage.Column=Column:
-SortFilterWizardPage.Ascending=Ascending
-SortFilterWizardPage.Descending=Descending
-
-UniqueFilterWizardPage.CreateUniqueFilter=Create Unique Filter
-UniqueFilterWizardPage.Column=Column:
-UniqueFilterWizardPage.Aggregate=Aggregate:
-
-
-#Wizards.Graph
-GraphFactory.BarGraph=Bar Graph
-GraphFactory.PieChart=Pie Chart
-GraphFactory.ScatterGraph=Scatter Graph
-GraphFactory.LineGraph=Line Graph
-GraphFactory.LineDescription=This is a simple line graph of a single set of data. Each (x,y) pair will be pltted a a single dot and connected with a solid line on the graph.
-GraphFactory.BarDescription=This is a histagram of data. One series represents the categories and the other represents the value assigned to that category.
-GraphFactory.PieDescription=This is a pie chart
-GraphFactory.ScatterDescription=This is a simple plot of one series of data vs another set. Each (x,y) pair will be plotted as a single dot on the graph.
-
-SelectGraphWizard.CreateGraph=Create Graph
-
-SelectGraphWizardPage.SelectGraph=Select Graph
-
-SelectSeriesWizardPage.Title=Title:
-SelectSeriesWizardPage.XSeries=X Series:
-SelectSeriesWizardPage.RowID=Row ID
-SelectSeriesWizardPage.YSeries=Y Series
-SelectSeriesWizardPage.SelectSeries=Select Series
-SelectSeriesWizardPage.TitleNotSet=Title not set
-SelectSeriesWizardPage.KeyFilter=Key filter:
-SelectSeriesWizardPage.KeyNotSet=Key not set
-SelectSeriesWizardPage.NA=NA
-SelectSeriesWizardPage.UseHistoricalData=Use historical data?
-SelectSeriesWizardPage.SeriesNotSelected=Series not selected, or share the same selection \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/preferences/DataTablePreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/preferences/DataTablePreferencePage.java
deleted file mode 100644
index da84a634cc..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/preferences/DataTablePreferencePage.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.preferences;
-
-import org.eclipse.jface.preference.BooleanFieldEditor;
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.jface.preference.IntegerFieldEditor;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.GraphingAPIUIPlugin;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.preferences.GraphingAPIPreferenceConstants;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-
-
-public class DataTablePreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
- public DataTablePreferencePage() {
- super(GRID);
- setPreferenceStore(GraphingAPIUIPlugin.getDefault().getPreferenceStore());
- setDescription(Localization.getString("DataTablePreferencePage.GraphDisplayPreferences"));
- }
-
- public void createFieldEditors() {
- addField(new BooleanFieldEditor(
- GraphingAPIPreferenceConstants.P_JUMP_NEW_TABLE_ENTRY,
- Localization.getString("DataTablePreferencePage.JumpNewestEntry"),
- getFieldEditorParent()));
-
- addField(new BooleanFieldEditor(
- GraphingAPIPreferenceConstants.P_AUTO_RESIZE,
- Localization.getString("DataTablePreferencePage.AutoResizeColumns"),
- getFieldEditorParent()));
-
- addField(
- new IntegerFieldEditor(
- GraphingAPIPreferenceConstants.P_MAX_DATA_ITEMS,
- Localization.getString("DataTablePreferencePage.MaxDataItems"),
- getFieldEditorParent()));
- }
-
- public void init(IWorkbench workbench) {}
-
- public void dispose() {
- super.dispose();
- }
-}
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/preferences/GraphPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/preferences/GraphPreferencePage.java
deleted file mode 100644
index e4d4f1962d..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/preferences/GraphPreferencePage.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.preferences;
-
-import org.eclipse.jface.preference.BooleanFieldEditor;
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.jface.preference.IntegerFieldEditor;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.GraphingAPIUIPlugin;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.preferences.GraphingAPIPreferenceConstants;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-
-
-public class GraphPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
- public GraphPreferencePage() {
- super(GRID);
- setPreferenceStore(GraphingAPIUIPlugin.getDefault().getPreferenceStore());
- setDescription(Localization.getString("GraphPreferencePage.GraphDisplayPreferences"));
- }
-
- public void createFieldEditors() {
- addField(new BooleanFieldEditor(
- GraphingAPIPreferenceConstants.P_SHOW_GRID_LINES,
- Localization.getString("GraphPreferencePage.ShowGridLines"),
- getFieldEditorParent()));
-
- addField(
- new IntegerFieldEditor(
- GraphingAPIPreferenceConstants.P_MAX_DATA_ITEMS,
- Localization.getString("GraphPreferencePage.MaxDataItems"),
- getFieldEditorParent()));
-
- addField(
- new IntegerFieldEditor(
- GraphingAPIPreferenceConstants.P_VIEWABLE_DATA_ITEMS,
- Localization.getString("GraphPreferencePage.ViewableDataItems"),
- getFieldEditorParent()));
-
- addField(
- new IntegerFieldEditor(
- GraphingAPIPreferenceConstants.P_X_SERIES_TICKS,
- Localization.getString("GraphPreferencePage.XSeriesTicks"),
- getFieldEditorParent()));
-
- addField(
- new IntegerFieldEditor(
- GraphingAPIPreferenceConstants.P_Y_SERIES_TICKS,
- Localization.getString("GraphPreferencePage.YSeriesTicks"),
- getFieldEditorParent()));
- }
-
- public void init(IWorkbench workbench) {}
-
- public void dispose() {
- super.dispose();
- }
-}
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/preferences/GraphingAPIPreferenceConstants.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/preferences/GraphingAPIPreferenceConstants.java
deleted file mode 100644
index 0f7af298ae..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/preferences/GraphingAPIPreferenceConstants.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.preferences;
-
-public class GraphingAPIPreferenceConstants {
- //graphing.datatable
- public static final String P_JUMP_NEW_TABLE_ENTRY = "JumpNewTableEntry";
- public static final String P_AUTO_RESIZE = "AutoResizeColumns";
-
- //graphing.graph
- public static final String P_SHOW_GRID_LINES = "ShowGridLines";
- public static final String P_MAX_DATA_ITEMS = "MaxDataItems";
- public static final String P_VIEWABLE_DATA_ITEMS = "ViewableDataItems";
- public static final String P_X_SERIES_TICKS = "XSeriesTicks";
- public static final String P_Y_SERIES_TICKS = "YSeriesTicks";
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/preferences/GraphingAPIPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/preferences/GraphingAPIPreferencePage.java
deleted file mode 100644
index c162c5b5fe..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/preferences/GraphingAPIPreferencePage.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.preferences;
-
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.GraphingAPIUIPlugin;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-
-
-public class GraphingAPIPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
- public GraphingAPIPreferencePage() {
- super(GRID);
- setPreferenceStore(GraphingAPIUIPlugin.getDefault().getPreferenceStore());
- setDescription(Localization.getString("GraphingAPIPreferencePage.GraphDisplayPreferences"));
- }
-
- public void createFieldEditors() {
- }
-
- public void init(IWorkbench workbench) {}
-
- public void dispose() {
- super.dispose();
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/preferences/PreferenceInitializer.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/preferences/PreferenceInitializer.java
deleted file mode 100644
index 5b3f025a4a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/preferences/PreferenceInitializer.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.GraphingAPIUIPlugin;
-
-
-
-public class PreferenceInitializer extends AbstractPreferenceInitializer {
- public void initializeDefaultPreferences() {
- IPreferenceStore store = GraphingAPIUIPlugin.getDefault().getPreferenceStore();
-
- store.setDefault(GraphingAPIPreferenceConstants.P_SHOW_GRID_LINES, true);
- store.setDefault(GraphingAPIPreferenceConstants.P_AUTO_RESIZE, true);
- store.setDefault(GraphingAPIPreferenceConstants.P_JUMP_NEW_TABLE_ENTRY, false);
- store.setDefault(GraphingAPIPreferenceConstants.P_VIEWABLE_DATA_ITEMS, 100);
- store.setDefault(GraphingAPIPreferenceConstants.P_MAX_DATA_ITEMS, 250);
- store.setDefault(GraphingAPIPreferenceConstants.P_X_SERIES_TICKS, 8);
- store.setDefault(GraphingAPIPreferenceConstants.P_Y_SERIES_TICKS, 4);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphAxis.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphAxis.java
deleted file mode 100644
index 9714b789e4..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphAxis.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.widgets;
-
-import java.text.DecimalFormat;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs.AGraph;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Point;
-
-
-
-/**
- * The Axis primitive, used to draw gridlines and axes on graphs.
- * @author Henry Hughes
- * @author Ryan Morse
- */
-public class GraphAxis implements IGraphPrimitive {
- public GraphAxis(AGraph graph, String title, int tickCount, int type) {
- this.graph = graph;
- this.type = type&1; //Ensure type matches one of the possible values
- this.tickCount = tickCount;
- this.title = title;
- this.color = graph.axisColor;
- }
-
- public void setTickCount(int count) {
- tickCount = count;
- }
-
- public int getType() {
- return type;
- }
-
- public boolean isVisible() {
- return true;
- }
-
- /**
- * Determines if the given point is inside this axis' bounds.
- */
- public boolean isUnder(Point loc) {
- if(type==VERTICAL && loc.x < graph.getXPadding() ||
- type==HORIZONTAL && loc.y > graph.getSize().y-graph.getYPadding())
- return true;
- return false;
- }
-
- public void calculateBounds() {
- x1 = graph.getXPadding();
- y2 = graph.getSize().y-graph.getYPadding();
- locationX = graph.getXPadding();
- tickAmount = 0;
-
- if(type == HORIZONTAL) {
- locationY = graph.getYPadding();
- y1 = graph.getSize().y-graph.getYPadding();
- x2 = graph.getSize().x-graph.getXPadding();
- x2a = (int)locationX;
- y2a = graph.getSize().y-graph.getYPadding();
-
- widthX = graph.getSize().x - (graph.getXPadding()<<1);
- widthY = 0;
- tickIncrament = ((graph.getLocalXMax()-graph.getLocalXMin())/(double)tickCount);
- range = graph.getLocalXMax() - graph.getLocalXMin();
- localMin = graph.getLocalXMin();
- } else {
- locationY = graph.getSize().y - graph.getYPadding();
- y1 = graph.getYPadding();
- x2 = graph.getXPadding();
- x2a = graph.getSize().x-graph.getXPadding();
- y2a = (int)locationY;
-
- widthX = 0;
- widthY = graph.getSize().y - (graph.getYPadding()<<1);
- tickIncrament = ((graph.getLocalYMax()-graph.getLocalYMin())/(double)tickCount);
- range = graph.getLocalYMax() - graph.getLocalYMin();
- localMin = graph.getLocalYMin();
- }
- }
-
- /**
- * Calculates the width, in pixels, of the input string.
- * @param gc GC to use for the calculation.
- * @param s String to calculate.
- * @return Width of the string in pixels.
- */
- protected int stringWidth(GC gc, String s) {
- int width = 0;
- for(int i=0; i<s.length(); i++)
- width += gc.getCharWidth(s.charAt(i));
-
- return width;
- }
-
- /**
- * Draws the grid line for the given coordinates if grid lines are enabled.
- */
- protected void drawGridLine(GC gc, int x1, int y1, int x2, int y2) {
- if(graph.showGrid) {
- gc.setLineStyle(SWT.LINE_DOT);
- gc.drawLine(x1,y1,x2,y2);
- }
- }
-
- /**
- * Graphs the tick at the given location. Places the given string near the tick.
- */
- protected void drawTick(GC gc, int x, int y, String val) {
- gc.setLineStyle(SWT.LINE_SOLID);
- int strWidth = stringWidth(gc, val);
- int strHeight = gc.getFontMetrics().getHeight();
- gc.drawLine(x, y, x+((HORIZONTAL==type) ? 0 : strWidth), y+((HORIZONTAL==type) ? -strHeight : 0));
-
- x -= (strWidth>>1);
- if(x < 0)
- x = 0;
- else if(x > graph.getSize().x-strWidth)
- x = graph.getSize().x-strWidth;
-
- y -= (strHeight>>1);
- if(y < 0)
- y = 0;
- else if(y > graph.getSize().y-strHeight)
- y = graph.getSize().y-strHeight;
- gc.drawText(val, x, y);
- }
-
- protected void drawTitle(GC gc) {
- //TODO: Implement this function. Has to rotate text for vertical bars
- //http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/Rotateandflipanimage.htm
- }
-
- /**
- * Converts units on the input value using SI prefixes (1 million becomes 1M, etc)
- */
- protected String getLabel(double val, int range) {
- int metric = 0;
- String pattern=".0";
- range /= tickCount;
- while(val > 1000) {
- val /= 1000;
- metric++;
-
- range /= 10;
- if(range < 1)
- pattern += "0";
- }
-
- DecimalFormat format = new DecimalFormat(pattern);
- return format.format(val) + PREFIXES[metric];
- }
-
- public void paint(GC gc) {
- calculateBounds();
-
- Color foreground = gc.getForeground();
- gc.setForeground(color);
-
- gc.drawLine(x1, y1, x2, y2);
- drawTitle(gc);
- for(int i=0; i<=tickCount; i++) {
- drawGridLine(gc, (int)locationX, (int)locationY, (int)x2a, (int)y2a);
- drawTick(gc, (int)locationX, (int)y2a, getLabel(localMin+tickAmount, range));
-
- locationX += (widthX/(double)tickCount);
- x2a += (widthX/(double)tickCount);
- locationY -= (widthY/(double)tickCount);
- y2a -= (widthY/(double)tickCount);
- tickAmount += tickIncrament;
-
- }
- gc.setForeground(foreground);
- }
-
- public static final int VERTICAL = 0;
- public static final int HORIZONTAL = 1;
- //kilo, mega, giga, tera, peta, exa, zetta, yotta
- protected static final String[] PREFIXES = { "", Localization.getString("GraphAxis.Kilo"), Localization.getString("GraphAxis.Mega"), Localization.getString("GraphAxis.Giga"), Localization.getString("GraphAxis.Tera"), Localization.getString("GraphAxis.Peta"), Localization.getString("GraphAxis.Exa"), Localization.getString("GraphAxis.Zetta"), Localization.getString("GraphAxis.Yotta") } ;
-
- protected int type;
- protected int tickCount;
- protected final AGraph graph;
- protected Color color;
- @SuppressWarnings("unused")
- private String title;
-
- protected int x1, y1, x2, y2;
- protected int widthX, widthY, range, localMin;
- protected double locationX, locationY, x2a, y2a, tickAmount, tickIncrament;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphAxis2.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphAxis2.java
deleted file mode 100644
index 07233ecb5a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphAxis2.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.widgets;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs.AGraph;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-
-
-
-/**
- * An extension to GraphAxis.
- * @author Ryan Morse
- */
-public class GraphAxis2 extends GraphAxis implements IGraphPrimitive {
- public GraphAxis2(AGraph graph, String title, int tickCount, int type, Color color) {
- super(graph, title, tickCount, type&1);
- this.type = type;
- this.color = color;
- }
-
- public void calculateBounds() {
- x1 = graph.getXPadding();
- y1 = graph.getYPadding();
- x2 = graph.getSize().x-graph.getXPadding();
- y2 = graph.getSize().y-graph.getYPadding();
- locationX = graph.getXPadding();
- locationY = graph.getSize().y - graph.getYPadding();
- tickAmount = 0;
-
- switch(type&1) {
- case VERTICAL:
- widthX = 0;
- widthY = graph.getSize().y - (graph.getYPadding()<<1);
- tickIncrament = ((graph.getLocalYMax()-graph.getLocalYMin())/(double)tickCount);
- range = graph.getLocalYMax() - graph.getLocalYMin();
- localMin = graph.getLocalYMin();
- break;
- case HORIZONTAL:
- widthX = graph.getSize().x - (graph.getXPadding()<<1);
- widthY = 0;
- tickIncrament = ((graph.getLocalXMax()-graph.getLocalXMin())/(double)tickCount);
- range = graph.getLocalXMax() - graph.getLocalXMin();
- localMin = graph.getLocalXMin();
- break;
- }
-
- switch(type&3) {
- case ALIGN_BOTTOM:
- locationY = graph.getYPadding();
- y1 = graph.getSize().y-graph.getYPadding();
- y2a = graph.getSize().y - graph.getYPadding();
- x2a = (int)locationX;
- break;
- case ALIGN_TOP:
- y2 = graph.getYPadding();
- y2a = graph.getYPadding();
- x2a = (int)locationX;
- break;
- case ALIGN_LEFT:
- x2 = graph.getXPadding();
- y2a = (int)locationY;
- x2a = graph.getSize().x-graph.getXPadding();
- break;
- case ALIGN_RIGHT:
- locationX = graph.getSize().x-graph.getXPadding();
- x1 = graph.getSize().x-graph.getXPadding();
- y2a = (int)locationY;
- x2a = graph.getXPadding();
- break;
- }
- }
-
- protected void drawGridLine(GC gc, int x1, int y1, int x2, int y2) {
- if(HIDE_GRID_LINES != (HIDE_GRID_LINES&type))
- super.drawGridLine(gc, x1, y1, x2, y2);
- }
-
- protected void drawTick(GC gc, int x, int y, String val) {
- if(HIDE_TICKS != (HIDE_TICKS&type))
- super.drawTick(gc, x, y, val);
- }
-
- protected void drawTitle(GC gc) {
- if(HIDE_TITLE != (HIDE_TITLE&type))
- super.drawTitle(gc);
- }
- /*TODO: This should be reimplemented for viewing true values when normalized
- protected String getLabel(double val, int range) {
- if(UNNORMALIZED == (UNNORMALIZED&type))
- val = graph.unscaleValue(val);
-
- return super.getLabel(val, range);
- }
- */
- public static final int ALIGN_LEFT = VERTICAL; //0
- public static final int ALIGN_TOP = HORIZONTAL; //1
- public static final int ALIGN_RIGHT = VERTICAL | 2; //2
- public static final int ALIGN_BOTTOM = HORIZONTAL | 2; //3
-
- public static final int HIDE_GRID_LINES = 4;
- public static final int HIDE_TITLE = 8;
- public static final int HIDE_TICKS = 16;
- public static final int UNNORMALIZED = 32;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphCanvas.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphCanvas.java
deleted file mode 100644
index b7ffcd0edf..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphCanvas.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.widgets;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Canvas;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.ScrollBar;
-
-/**
- * The Graph Canvas class provides a Canvas type object that renders IGraphPrimitive objects on itself.
- * It is an implementation of the IWidgetContainer interface and can be used by Graph Primitives to scale
- * themselves.
- *
- * This class is the parent class of the entire Graph system, all of the decendents from Graph are
- * based upon this class.
- * @author Henry Hughes
- * @author Ryan Morse
- * @see org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs.Graph
- *
- */
-public class GraphCanvas extends Canvas {
- /**
- * The default constructor for GraphCanvas. Creates a canvas of the appropriate size, then
- * sets the internal area rectangles, the internal padding and scaling levels, enables scrolling,
- * and sets the default axis color.
- * @param parent Parent composite for this canvas.
- * @param style SWT Style flags for this canvas (use SWT.NONE)
- */
- public GraphCanvas(Composite parent, int style) {
- super(parent, style | SWT.V_SCROLL | SWT.H_SCROLL);
-
- globalArea = new Rectangle(0, 0, 0, 0);
- localArea = new Rectangle(0, 0, 0, 0);
-
- xpad = 10;
- ypad = 10;
- scale = 1.0;
- autoScroll = true;
-
- axisColor = parent.getDisplay().getSystemColor(SWT.COLOR_GRAY);
-
- hBar = this.getHorizontalBar();
- vBar = this.getVerticalBar();
- hBar.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- if(hBar.getSelection()+hBar.getThumb() == hBar.getMaximum())
- autoScroll = true;
- else
- autoScroll = false;
-
- setLocalArea(new Rectangle(hBar.getSelection(), localArea.y, localArea.width, localArea.height), true);
- redraw();
- }
- });
-
- vBar.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- autoScroll = false;
-
- setLocalArea(new Rectangle(localArea.x, vBar.getMaximum()-(vBar.getSelection()+vBar.getThumb())+vBar.getMinimum(), localArea.width, localArea.height), true);
- redraw();
- }
- });
-
- }
- /**
- * An accessor to set both the X and Y padding widths simultaneously.
- * @param xpad X padding width.
- * @param ypad Y padding width.
- */
- public void setPadding(int xpad, int ypad) {
- setXPadding(xpad);
- setYPadding(ypad);
- }
- /**
- * An accessor to set the X padding width. Padding is defined as pixels inside the bounds
- * of the drawable area that are left blank when rendering the graph. Valid values are integers
- * greater than 0. The canvas will silently ignore requests to set the padding width to <=0.
- * @param xpad New X padding value.
- */
- public void setXPadding(int xpad) { this.xpad = xpad > 0 ? xpad : this.xpad; }
- /**
- * An accessor to set the Y padding width. Padding is defined as pixels inside the bounds
- * of the drawable area that are left blank when rendering the graph. Valid values are integers
- * greater than 0. The canvas will silently ignore requests to set the padding width to <=0.
- * @param xpad New Y padding value.
- */
- public void setYPadding(int ypad) { this.ypad = ypad > 0 ? ypad : this.ypad; }
- /**
- * Returns the current X padding value.
- * @return The X padding width value, in pixels.
- */
- public int getXPadding() { return xpad; }
- /**
- * Returns the current Y padding value.
- * @return The Y padding width value, in pixels.
- */
- public int getYPadding() { return ypad; }
-
- /**
- * The repaint method is called when the graph is out of date and needs to be redrawn. This is an
- * abstraction method around <code>Canvas.redraw</code> that synchronously executes the request
- * on the display thread, blocking the calling thread until the repaint is completed.
- */
- public synchronized void repaint() {
- getDisplay().syncExec(new Runnable() {
- boolean stop = false;
- public void run() {
- if(stop) return;
- try {
- redraw();
- } catch (Exception e) {
- stop = true;
- }
- }
- });
- }
-
- /**
- * Returns the size of the graphing area of the canvas.
- */
- public Point getSize() {
- Point p = new Point(super.getSize().x, super.getSize().y);
- p.x -= vBar.getSize().x+5;
- p.y -= hBar.getSize().y+5;
- return p;
- }
-
- /**
- * Returns the actual bounding area of the canvas, including the width of the scroll bars.
- */
- public Point getTrueSize() {
- return super.getSize();
- }
-
- /**
- * Sets the scaling value for the canvas. This causes graph primitive sizes to change.
- * The default scaling value is 1.0, and the larger the scaling value, the larger the graph area's
- * numerical bounds are. For example, if the graph was set from 0 &lt; x &lt; 10, and the scaling value
- * is reset to 2.0, the new X range is from 0 &lt; x &lt 20.
- * @param s The new scaling value.
- */
- public void setScale(double s) {
- scale = s;
- setLocalArea(localArea, true);
-
- redraw();
- }
-
- /**
- * Resets the canvas size to the specified area.
- */
- public void setGlobalArea(Rectangle area) {
- globalArea = area;
-
- hBar.setMinimum(getGlobalXMin());
- hBar.setMaximum (getGlobalXMax());
- vBar.setMinimum(getGlobalYMin());
- vBar.setMaximum (getGlobalYMax());
- }
-
- /**
- * Sets the size of the graphing area to the specified area.
- */
- public void setLocalArea(Rectangle area) {
- setLocalArea(area, false);
- }
-
- public void setLocalArea(Rectangle area, boolean force) {
- if(autoScroll || force) {
- localArea = area;
-
- hBar.setThumb (getLocalWidth());
- vBar.setThumb (getLocalHeight());
-
- hBar.setIncrement(getLocalWidth()>>3);
- hBar.setPageIncrement(getLocalWidth());
- vBar.setIncrement(getLocalHeight()>>3);
- vBar.setPageIncrement(getLocalHeight());
- }
- if(autoScroll) {
- hBar.setSelection(hBar.getMaximum());
- vBar.setSelection(getGlobalYMax() - Math.min(getLocalYMax(), getGlobalYMax()) + getGlobalYMin());
- }
- }
-
- public int getGlobalXMin() {
- return globalArea.x;
- }
-
- public int getLocalXMin() {
- return localArea.x;
- }
-
- public int getGlobalXMax() {
- return globalArea.x+globalArea.width;
- }
-
- public int getLocalXMax() {
- return getLocalXMin() + getLocalWidth();
- }
-
- public int getGlobalYMin() {
- return globalArea.y;
- }
-
- public int getLocalYMin() {
- return localArea.y;
- }
-
- public int getGlobalYMax() {
- return globalArea.y+globalArea.height;
- }
-
- public int getLocalYMax() {
- return getLocalYMin() + getLocalHeight();
- }
-
- public int getGlobalWidth() {
- return globalArea.width;
- }
-
- public int getLocalWidth() {
- return (int)(localArea.width / scale);
- }
-
- public int getGlobalHeight() {
- return globalArea.height;
- }
-
- public int getLocalHeight() {
- return (int)(localArea.height / scale);
- }
-
- protected Color axisColor;
- private int xpad, ypad;
- private ScrollBar hBar, vBar;
- private Rectangle globalArea, localArea;
- private boolean autoScroll;
- private double scale;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphComposite.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphComposite.java
deleted file mode 100644
index f4d74e1217..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphComposite.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.widgets;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.GraphData;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs.IGraph;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.graph.GraphFactory;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Scale;
-
-
-
-/**
- * A Composite type to contain a Graph object.
- * @author Henry Hughes
- * @author Ryan Morse
- */
-public class GraphComposite extends Composite {
- /**
- * The default constructor: creates an internal composite for the Graph to render on, asks GraphFactory
- * to create the graph from the given GraphData and DataSet, then initializes all buttons and listeners.
- */
- public GraphComposite(Composite parent, int style, GraphData gd, IDataSet ds) {
- super(parent, style);
- FormLayout layout = new FormLayout();
- layout.marginWidth = 5;
- layout.marginHeight = 5;
- this.setLayout(layout);
- checkOptions = new ArrayList<Button>();
-
- label = new Label(this, SWT.HORIZONTAL | SWT.CENTER);
- scale = scales[7];
- label.setText(scale + Localization.getString("GraphComposite.ScaleValue"));
- FormData data = new FormData();
- data.top = new FormAttachment(0,0);
- data.right = new FormAttachment(100, 0);
- data.width = 40;
- label.setLayoutData(data);
-
- zoomScale = new Scale(this,SWT.VERTICAL | SWT.BORDER);
- zoomScale.setMinimum(0);
- zoomScale.setMaximum(14);
- zoomScale.setIncrement(1);
- zoomScale.setPageIncrement(1);
- zoomScale.setSelection(7);
- data = new FormData();
- data.top = new FormAttachment(label, 10);
- data.bottom = new FormAttachment(100, 5);
- data.right = new FormAttachment(100,-10);
- zoomScale.setLayoutData(data);
-
- graph = GraphFactory.createGraph(this, gd, ds);
- data = new FormData();
- data.top = new FormAttachment(0,0);
- data.bottom = new FormAttachment(100,0);
- data.right = new FormAttachment(label,-10);
- data.left = new FormAttachment(0,0);
- graph.setLayoutData(data);
-
- graph.setBackground(this.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
- graph.setForeground(this.getDisplay().getSystemColor(SWT.COLOR_WIDGET_FOREGROUND));
- this.setBackground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
- zoomScale.addSelectionListener(scaleListener);
- }
-
- /**
- * Toggles sidebar visible or not visible.
- * @param withSidebar Enables or disables the sidebar.
- */
- public void configure(boolean withSidebar) {
- sidebarVisible = withSidebar;
-
- for(int i=0; i<checkOptions.size(); i++)
- ((Button)checkOptions.get(i)).setVisible(sidebarVisible);
-
- zoomScale.setVisible(sidebarVisible);
- label.setVisible(sidebarVisible);
-
- FormData data = new FormData();
- data.top = new FormAttachment(0,0);
- data.bottom = new FormAttachment(100,0);
- data.left = new FormAttachment(0,0);
- data.right = (withSidebar ? new FormAttachment(label,-10) : new FormAttachment(100, 0));
- graph.setLayoutData(data);
-
- layout(true, true);
- }
-
- public void addCheckOption(String title, SelectionListener listener) {
- Button b = new Button(this, SWT.CHECK);
- b.setText(title);
-
- Button old = null;
- if(checkOptions.size() > 0)
- old = (Button)checkOptions.get(checkOptions.size()-1);
-
- FormData data = new FormData();
- data.bottom = (null != old) ? new FormAttachment(old,0) : new FormAttachment(100, 0);
- data.right = new FormAttachment(100,0);
- data.width = 85;
- b.setLayoutData(data);
- b.addSelectionListener(listener);
-
- checkOptions.add(b);
-
- if(checkOptions.size() == 1) {
- ((FormData)label.getLayoutData()).right = new FormAttachment(b, 0);
- ((FormData)zoomScale.getLayoutData()).right = new FormAttachment(b, 0);
- }
- }
-
- public void removeCheckOption(String title) {
- Button b;
- for(int i=0; i<checkOptions.size(); i++) {
- b = (Button)checkOptions.get(i);
- if(b.getText().equals(title)) {
- checkOptions.remove(b);
-
- if(checkOptions.size() == 0)
- ((FormData)label.getLayoutData()).right = new FormAttachment(100, 0);
-
- return;
- }
- }
- }
-
- /**
- * Returns the graph that is rendering to this composite.
- */
- public IGraph getGraph() {
- return graph;
- }
-
- /**
- * Returns the current sidebar visibility state.
- */
- public boolean isSidebarVisible() {
- return sidebarVisible;
- }
-
- /**
- * Dispose is overriden in order to dispose of the listeners attached to this Composite on disposal.
- */
- public void dispose() {
- scaleListener = null;
-
- if(null != graph) graph.dispose();
- graph = null;
-
- if(null != zoomScale) zoomScale.dispose();
- zoomScale = null;
-
- if(null != label) label.dispose();
- label = null;
- super.dispose();
- }
-
- /*
- * Listeners are below:
- * scaleListener - detects movement in the Scale widget and rescales the graph on change
- * titleListener - A SelectionListener for the title button
- * legendListener - A SelectionListener for the legend checkbox
- * gridListener - A SelectionListener for the Grid checkbox
- * normalizeListener - A SelectionListener for the normalization checkbox
- * propertyChangeListener - Detects changes in user preferences and applies them
- */
- private SelectionListener scaleListener = new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- Scale scaler = (Scale) e.widget;
- int index = scaler.getSelection();
- if(scale != scales[index]) {
- scale = scales[index];
- label.setText(scale + Localization.getString("GraphComposite.ScaleValue"));
- graph.setScale(scale);
- }
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {}
- };
-
- private boolean sidebarVisible = true;
- private IGraph graph;
- private Scale zoomScale;
- public double scale;
- private static final double[] scales = { .0625, .125, .25, .33 , .5, .66, .8, 1.0, 1.25, 1.5, 2, 3, 4, 8, 16 };
- private Label label;
-
- private ArrayList<Button> checkOptions;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphLabel.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphLabel.java
deleted file mode 100644
index 6d20382ac8..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphLabel.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.widgets;
-
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * The GraphLabel primitive is used to draw a string of text at an arbitrary point on the graph.
- * @author Ryan Morse
- *
- */
-public class GraphLabel implements IGraphPrimitive {
- public GraphLabel(GraphCanvas canvas, String title, Point center, float size, int style) {
- this.canvas = canvas;
- this.title = title;
- this.center = center;
- this.size = size;
- this.style = style;
- this.parent = null;
- }
-
- public GraphLabel(GraphCanvas canvas, String title, Point center, int size, int style) {
- this(canvas, title, center, (float)size, style);
- }
-
- public GraphLabel(GraphCanvas canvas, String title, Composite parent, float size, int style) {
- this(canvas, title, parent.getSize(), size, style);
- this.parent = parent;
- }
-
- public GraphLabel(GraphCanvas canvas, String title, Composite parent, int size, int style) {
- this(canvas, title, parent, (float)size, style);
- }
-
- public int calculateSize(GC gc) {
- int width = 0;
- for (int i=0; i<title.length(); i++)
- width += gc.getCharWidth(title.charAt(i));
- return width;
- }
-
- public void calculateBounds() {
- if(null != parent) {
- Point size = parent.getSize();
- x = (size.x - width)>>1;
- y = parent.getBounds().y;
- } else {
- x = center.x - (width>>1);
- y = center.y - (height>>1);
- }
- }
-
- public boolean isVisible() {
- return true;
- }
-
- public boolean isUnder(Point loc) {
- if(loc.x >= x && loc.y >= y && loc.x <= x+width && loc.y <=y+height)
- return true;
- return false;
- }
-
- public void paint(GC gc) {
- if(staticSize)
- gc.setFont(new Font(canvas.getDisplay(), "Times", (int)size, style));
- else
- gc.setFont(new Font(canvas.getDisplay(), "Times", (int)(canvas.getSize().y * size), style));
-
- width = calculateSize(gc);
- height = gc.getFontMetrics().getHeight();
- calculateBounds();
-
- Color temp = gc.getForeground();
- gc.setForeground(canvas.axisColor);
- gc.drawText(title, x, y);
-
- gc.setForeground(temp);
- }
-
- private GraphCanvas canvas;
- private String title;
- private int width;
- private int height;
- private Point center;
- private Composite parent;
-
- private int x, y;
- private float size;
- private int style;
- private boolean staticSize;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphLegend.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphLegend.java
deleted file mode 100644
index 178b169d4e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphLegend.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.widgets;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-
-
-
-/**
- * A legend primitive for the Graphing system. Used to display a list of
- * all the series that are on this graph, and to change the current axis on a
- * normalized multi-series graph.
- * @author Jeff Briggs
- * @author Ryan Morse
- */
-public class GraphLegend implements IGraphPrimitive {
- public GraphLegend(GraphCanvas graph, String[] keysPassed, Color[] colorsPassed) {
- this.graph = graph;
- colors = colorsPassed;
- keys = keysPassed;
- bounds = new Rectangle[keys.length];
-
- width = 0;
- height = 0;
- }
-
- public boolean isVisible() {
- return true;
- }
-
- public void calculateBounds() {
- x = graph.getSize().x - width;
- y = 0;
- }
-
- private void getSize(GC gc) {
- textHeight = gc.getFontMetrics().getHeight();
- height = textHeight * (keys.length + 1) + (BORDER<<1);
-
- for (int i=0; i<TITLE.length(); i++)
- width += gc.getCharWidth(TITLE.charAt(i));
-
- int currWidth;
- for(int i=0; i<keys.length; i++) {
- currWidth = 0;
- for (int j=0; j<keys[i].length(); j++)
- currWidth += gc.getCharWidth(keys[i].charAt(j));
-
- if (currWidth > width)
- width = currWidth;
- }
- width += BOX_SIZE + 3*BORDER;
- }
-
- public boolean isUnder(Point loc) {
- if(loc.x >=x && loc.y >= y && loc.x <= x+width && loc.y <= y+height)
- return true;
- return false;
- }
-
- public void paint(GC gc) {
- if(width == 0 || height ==0)
- getSize(gc);
- calculateBounds();
-
- Color temp = gc.getForeground();
- gc.setForeground(graph.axisColor);
- gc.drawRectangle(x, y, width, height);
- gc.fillRectangle(x+1, y+1, width-1, height-1);
- gc.drawText(TITLE, x+BORDER, y+BORDER);
-
- for (int i=0; i<keys.length; i++) {
- gc.setForeground(colors[i]);
-
- bounds[i] = new Rectangle(x+BORDER, y+BORDER+((i+1)*textHeight), BOX_SIZE, BOX_SIZE);
- gc.fillGradientRectangle(bounds[i].x, bounds[i].y, BOX_SIZE, BOX_SIZE, true);
-
- gc.setForeground(graph.axisColor);
- gc.drawText(keys[i], x+(BORDER<<1)+BOX_SIZE, bounds[i].y);
- }
-
- gc.setForeground(temp);
- }
-
- private final GraphCanvas graph;
- private int x, y, width, height, textHeight;
-
- private String[] keys;
- private Color[] colors;
- private Rectangle[] bounds;
-
- private static final int BORDER = 5;
- private static final int BOX_SIZE = 15;
- private static final String TITLE = Localization.getString("GraphLegend.Legend");
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/IGraphPrimitive.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/IGraphPrimitive.java
deleted file mode 100644
index 64b950004d..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/IGraphPrimitive.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.widgets;
-
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Point;
-
-/**
- * Graphing Primitive Interface, defines the basic mechanism through which graph objects are drawn
- * to a Graph type.
- * @author Henry Hughes
- * @author Ryan Morse
- *
- */
-public interface IGraphPrimitive {
- /**
- * Paint method, called by the Graph object to paint the graph.
- * @param gc GC object to render with.
- */
- public void paint(GC gc);
-
- /**
- * CalculateBounds method, called by the Graph object when the graph's bounds changed (say
- * if a data sample was added) in order to allow the primitives to update their locations.
- *
- * The behavior of this method is entirely left up to the primitive author, but it is ideally
- * used to take care of location and bounds calculations for graph objects, rather than performing
- * such calculations during the paint method.
- */
- public void calculateBounds();
-
- /**
- * This method determines if the graph primitive is currently shown on the Graph surface.
- * @return True if the primitive is currently displayed on the graph surface.
- */
- public boolean isVisible();
-
- /**
- * This method determines if the primitive covers the given point. If the point is inside the
- * bounds of the graph primitive, the point is defined as isUnder=true.
- * @param loc Location to test.
- * @return True if the location is inside the bounds of the primitive.
- */
- public boolean isUnder(Point loc);
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/DataSetFactory.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/DataSetFactory.java
deleted file mode 100644
index c98213c927..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/DataSetFactory.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.dataset;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSetParser;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IFilteredDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row.FilteredRowDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row.RowDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row.RowParser;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.table.FilteredTableDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.table.TableDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.table.TableParser;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.datadisplay.DataGrid;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IMemento;
-
-
-
-public final class DataSetFactory {
- public static IDataSet createDataSet(String id, String[] labels) {
- if(id.equals(RowDataSet.ID))
- return new RowDataSet(labels);
- else if(id.equals(TableDataSet.ID))
- return new TableDataSet(labels);
- return null;
- }
-
- public static IFilteredDataSet createFilteredDataSet(String id, String[] labels) {
- if(id.equals(RowDataSet.ID))
- return new FilteredRowDataSet(labels);
- else if(id.equals(TableDataSet.ID))
- return new FilteredTableDataSet(labels);
- return new FilteredRowDataSet(labels);
- }
-
- public static IFilteredDataSet createFilteredDataSet(IDataSet set) {
- if(set instanceof RowDataSet)
- return new FilteredRowDataSet((RowDataSet)set);
- else if(set instanceof TableDataSet)
- return new FilteredTableDataSet((TableDataSet)set);
- return null;
- }
-
- public static String[] getIDs() {
- return ids;
- }
-
- public static String getName(String id) {
- int index = getIndex(id);
- if(index >= 0)
- return names[index];
- return null;
- }
-
- public static String getDescription(String id) {
- int index = getIndex(id);
- if(index >= 0)
- return descriptions[index];
- return null;
- }
-
- public static ParsingWizardPage getParsingWizardPage(String id) {
- ParsingWizardPage page = null;
-
- int index = getIndex(id);
- if(index >=0 && index < dataSetWizards.length)
- return dataSetWizards[index];
-
- return page;
- }
-
- public static IDataSetParser createParserXML(String id, IMemento source) {
- if(id.equals(ids[0]))
- return new RowParser(source);
- else if(id.equals(ids[1]))
- return new TableParser(source);
-
- return null;
- }
-
- public static DataGrid getDataGrid(Composite composite, IDataSet set) {
- if(set instanceof RowDataSet)
- return new DataGrid(composite, (RowDataSet)set, DataGrid.NONE);
- else if(set instanceof TableDataSet)
- return new DataGrid(composite, (TableDataSet)set, DataGrid.FULL_UPDATE);
-
- return null;
- }
-
- private static int getIndex(String id) {
- for(int i=0; i<ids.length; i++)
- if(id.equals(ids[i]))
- return i;
- return -1;
- }
-
- private static final String[] ids = {
- RowDataSet.ID,
- TableDataSet.ID
- };
-
- private static final String[] names = {
- Localization.getString("DataSetFactory.RowDataSet"),
- Localization.getString("DataSetFactory.TableDataSet")
- };
-
- private static final String[] descriptions = {
- Localization.getString("DataSetFactory.RowDataSetDescription") +
- Localization.getString("DataSetFactory.DataSetExample") +
- Localization.getString("DataSetFactory.DataSetHeader") +
- "1305 2309 4233\n" +
- "2322 3234 4223\n" +
- "2321 3123 4533\n" +
- "2343 2931 4423\n" +
- "1356 2984 3850\n",
-
- Localization.getString("DataSetFactory.TableDataSetDescription") +
- Localization.getString("DataSetFactory.DataSetExample") +
- Localization.getString("DataSetFactory.DataSetHeader") +
- "2322 3232 3453\n" +
- "2321 3123 4533\n" +
- "2145 2135 5921\n" +
- "-------------------\n" +
- Localization.getString("DataSetFactory.DataSetHeader") +
- "2343 2931 4423\n" +
- "2234 2723 5233\n" +
- "3215 3565 4922\n" +
- "-------------------\n"
- };
-
- private static final ParsingWizardPage[] dataSetWizards = new ParsingWizardPage[] {
- new SelectRowParsingWizardPage(),
- new SelectTableParsingWizardPage()
- };
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/DataSetWizard.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/DataSetWizard.java
deleted file mode 100644
index c667b11219..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/DataSetWizard.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.dataset;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-
-import org.eclipse.jface.dialogs.IPageChangedListener;
-import org.eclipse.jface.dialogs.PageChangedEvent;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSetParser;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.WorkbenchException;
-import org.eclipse.ui.XMLMemento;
-
-
-
-public class DataSetWizard extends Wizard implements INewWizard {
- public DataSetWizard(File metaFile, String scriptFile) {
- this.metaFile = metaFile;
- this.scriptFile = scriptFile;
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {}
-
- public void addPages() {
- setWindowTitle(Localization.getString("DataSetWizard.CreateDataSet"));
- dataSetPage = new SelectDataSetWizardPage();
- addPage(dataSetPage);
-
- String[] ids = DataSetFactory.getIDs();
- parsingPages = new ParsingWizardPage[ids.length];
- for(int i=0; i<ids.length; i++) {
- parsingPages[i] = DataSetFactory.getParsingWizardPage(ids[i]);
- addPage(parsingPages[i]);
- }
-
- ((WizardDialog)getContainer()).addPageChangedListener(pageListener);
- }
-
- public boolean canFinish() {
- IWizardPage page = this.getContainer().getCurrentPage();
- if((null != dataSet) && (null != parser) && (page instanceof ParsingWizardPage))
- return true;
- return false;
- }
-
- public boolean performCancel() {
- parser = null;
- dataSet = null;
- return true;
- }
-
- public boolean performFinish() {
- writeParsingExpression();
- return true;
- }
-
- public IDataSetParser getParser() {
- return parser;
- }
-
- public IDataSet getDataSet() {
- return dataSet;
- }
-
- private boolean writeParsingExpression() {
- XMLMemento data = copyExisting();
- if(null == data)
- data = XMLMemento.createWriteRoot(IDataSetParser.XMLDataSetSettings);
-
- try {
- IMemento child = data.createChild(IDataSetParser.XMLFile, scriptFile);
-
- saveColumns(child, dataSet.getTitles());
- parser.saveXML(child);
-
- FileWriter writer = new FileWriter(metaFile);
- data.save(writer);
- writer.close();
- } catch(FileNotFoundException fnfe) {
- return false;
- } catch(Exception e) {
- return false;
- }
-
- return true;
- }
-
- protected XMLMemento copyExisting() {
- XMLMemento data = null;
- try {
- FileReader reader = new FileReader(metaFile);
- if(!reader.ready())
- return null;
-
- data = XMLMemento.createReadRoot(reader, IDataSetParser.XMLDataSetSettings);
- IMemento[] children = data.getChildren(IDataSetParser.XMLFile);
-
- data = XMLMemento.createWriteRoot(IDataSetParser.XMLDataSetSettings);
-
- IMemento child;
- String dataSetID;
- for(int i=0; i<children.length; i++) {
- if(!scriptFile.equals(children[i].getID())) {
- child = data.createChild(IDataSetParser.XMLFile, children[i].getID());
- dataSetID = children[i].getString(IDataSetParser.XMLdataset);
- child.putString(IDataSetParser.XMLdataset, dataSetID);
-
- DataSetFactory.getParsingWizardPage(dataSetID).copyExisting(children[i], child);
- }
- }
- } catch(FileNotFoundException fnfe) {
- } catch(IOException ioe) {
- } catch(WorkbenchException we) {}
-
- return data;
- }
-
- protected boolean saveColumns(IMemento target, String[] columns) {
- IMemento child;
- for(int i=0; i<columns.length; i++) {
- child = target.createChild(IDataSetParser.XMLColumn);
- child.putString(IDataSetParser.XMLname, columns[i]);
- }
- return true;
- }
-
- protected boolean openFile() {
- try {
- if (!metaFile.exists())
- metaFile.createNewFile();
- } catch(IOException ioe) {
- return false;
- }
-
- return true;
- }
-
- public void dispose() {
- if(null != getContainer())
- ((WizardDialog)getContainer()).removePageChangedListener(pageListener);
- if(null != dataSetPage)
- dataSetPage.dispose();
- if(null != parsingPages) {
- for(int i=0; i<parsingPages.length; i++) {
- if(null != parsingPages[i]) {
- parsingPages[i].dispose();
- parsingPages[i] = null;
- }
- }
- parsingPages = null;
- }
- }
-
- private IPageChangedListener pageListener = new IPageChangedListener() {
- public void pageChanged(PageChangedEvent e) {
- if(e.getSelectedPage() instanceof ParsingWizardPage) {
- ((ParsingWizardPage)e.getSelectedPage()).checkComplete();
- getContainer().updateButtons();
- }
- }
- };
-
- private SelectDataSetWizardPage dataSetPage;
-
- private ParsingWizardPage[] parsingPages;
- public String scriptFile;
- public File metaFile;
- public IDataSet dataSet;
- public IDataSetParser parser;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/ParsingWizardPage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/ParsingWizardPage.java
deleted file mode 100644
index 8c8a8e3da3..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/ParsingWizardPage.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.dataset;
-
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.ScrolledComposite;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IMemento;
-
-
-
-public abstract class ParsingWizardPage extends WizardPage {
- public ParsingWizardPage(String title) {
- super(title);
- }
-
- public void createControl(Composite parent) {
- wizard = (DataSetWizard)super.getWizard();
- }
-
- protected void createColumnSelector(Composite parent) {
- Label lblSeries = new Label(parent, SWT.NONE);
- lblSeries.setText(Localization.getString("ParsingWizardPage.NumberOfColumns"));
- lblSeries.setBounds(0, 5, 120, 25);
-
- txtSeries = new Text(parent, SWT.BORDER);
- txtSeries.setBounds(125, 0, 100, 25);
- txtSeries.setText("2"); //$NON-NLS-1$
- txtSeries.setTextLimit(2);
- txtSeries.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- if(!"".equals(txtSeries.getText().trim())) {
- displayTextBoxes();
- refreshRegEx();
- }
- }
- });
- txtSeries.addKeyListener(new KeyListener() {
- public void keyPressed(KeyEvent e) {
- if(('0' > e.character || '9' < e.character) && 31 < e.character && 127 > e.character)
- e.doit = false;
- }
-
- public void keyReleased(KeyEvent e) {}
- });
-
-
- Label lblRegExTitle = new Label(parent, SWT.NONE);
- lblRegExTitle.setText(Localization.getString("ParsingWizardPage.RegularExpression"));
- lblRegExTitle.setBounds(5, 325, 150, 20);
-
- lblRegEx = new Label(parent, SWT.NONE);
- lblRegEx.setBounds(155, 325, 300, 20);
-
-
- Label lblTitle = new Label(parent, SWT.NONE);
- lblTitle.setText(Localization.getString("ParsingWizardPage.Title"));
- lblTitle.setBounds(0, 45, 150, 25);
- Label lblExpr = new Label(parent, SWT.NONE);
- lblExpr.setText(Localization.getString("ParsingWizardPage.RegularExpression"));
- lblExpr.setBounds(160, 45, 150, 25);
- Label lblSpace = new Label(parent, SWT.NONE);
- lblSpace.setText(Localization.getString("ParsingWizardPage.Delimiter"));
- lblSpace.setBounds(310, 45, 150, 25);
-
- ScrolledComposite sc1 = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- sc1.setBounds(0, 70, 475, 250);
- cmpTextFields = new Composite(sc1, SWT.NONE);
- sc1.setContent(cmpTextFields);
-
- txtRegExpr = new Text[MAX_SERIES*COLUMNS];
- for(int i=0; i<txtRegExpr.length; i++) {
- txtRegExpr[i] = new Text(cmpTextFields, SWT.BORDER);
- txtRegExpr[i].setBounds(150*(i%COLUMNS), 30*(i/COLUMNS), 140, 25);
-
- if(2 == i%COLUMNS)
- txtRegExpr[i].setText("\\D+");
- else if(1 == i%COLUMNS)
- txtRegExpr[i].setText("\\d+");
- }
-
- readParsingExpression();
-
- //Do this after readingParsingExpressions so events arn't fired
- for(int i=0; i<txtRegExpr.length; i++) {
- if(0 != i%COLUMNS)
- txtRegExpr[i].addModifyListener(regExListener);
- else
- txtRegExpr[i].addModifyListener(textListener);
- }
-
- displayTextBoxes();
- refreshRegEx();
- }
-
- private void displayTextBoxes() {
- int series = Integer.parseInt(txtSeries.getText());
- if(series > MAX_SERIES) {
- txtSeries.setText("" +MAX_SERIES);
- return;
- }
- cmpTextFields.setSize(450, series * 30);
- series *= COLUMNS;
-
- for(int i=0; i<txtRegExpr.length; i++) {
- if(i < series)
- txtRegExpr[i].setVisible(true);
- else
- txtRegExpr[i].setVisible(false);
- }
- }
-
- private void refreshRegEx() {
- int series = Integer.parseInt(txtSeries.getText());
- series *= COLUMNS;
- StringBuilder s = new StringBuilder();
- for(int i=0; i<series; i++)
- if(0 != i%COLUMNS)
- s.append(txtRegExpr[i].getText());
- lblRegEx.setText(s.toString());
- }
-
- public boolean canFlipToNextPage() {
- return false;
- }
-
- public void dispose() {
- if(null != txtRegExpr) {
- for(int i=0; i<txtRegExpr.length; i++) {
- if(null != txtRegExpr[i]) {
- if(0 != i%COLUMNS)
- txtRegExpr[i].removeModifyListener(regExListener);
- else
- txtRegExpr[i].removeModifyListener(textListener);
- txtRegExpr[i].dispose();
- }
- txtRegExpr[i] = null;
- }
- txtRegExpr = null;
- }
- super.dispose();
- }
-
- public boolean checkComplete() {
- int series = Integer.parseInt(txtSeries.getText());
- labels = new String[series];
- regEx = new String[series*(COLUMNS-1)];
-
- for(int i=0, j=0, k=0; i<(series*COLUMNS); i++) {
- if("".equals(txtRegExpr[i].getText())) {
- regEx = null;
- wizard.parser = null;
- wizard.dataSet = null;
- return false;
- }
-
- if(0 == i%COLUMNS) {
- labels[j] = txtRegExpr[i].getText();
- j++;
- } else {
- regEx[k] = txtRegExpr[i].getText();
- k++;
- }
- }
- return true;
- }
-
- abstract boolean readParsingExpression();
- abstract void copyExisting(IMemento oldMeta, IMemento newMeta);
-
- protected class TextModifyListener implements ModifyListener {
- public void modifyText(ModifyEvent e) {
- checkComplete();
- wizard.getContainer().updateButtons();
- }
- }
-
- private class RegExModifyListener extends TextModifyListener {
- public void modifyText(ModifyEvent e) {
- super.modifyText(e);
- refreshRegEx();
- }
- }
-
- protected ModifyListener textListener = new TextModifyListener();
- protected ModifyListener regExListener = new RegExModifyListener();
-
- protected DataSetWizard wizard;
- public static final int COLUMNS = 3;
- private static final int MAX_SERIES = 24;
-
- protected Text txtSeries;
- protected Text[] txtRegExpr;
- protected Label lblRegEx;
- private Composite cmpTextFields;
-
- protected String[] labels;
- protected String[] regEx;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/SelectDataSetWizardPage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/SelectDataSetWizardPage.java
deleted file mode 100644
index 4cb8e712ef..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/SelectDataSetWizardPage.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.dataset;
-
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.forms.widgets.ColumnLayout;
-
-
-
-public class SelectDataSetWizardPage extends WizardPage {
- public SelectDataSetWizardPage() {
- super("selectDataSetType");
- setTitle(Localization.getString("SelectDataSetWizardPage.SelectDataSetType"));
- dataSetID = "";
- btnDataSets = null;
- }
-
- public void createControl(Composite parent) {
- wizard = (DataSetWizard)super.getWizard();
-
- Composite comp = new Composite(parent, SWT.NULL);
- comp.setLayout(new FormLayout());
- FormData data1 = new FormData();
- data1.left = new FormAttachment(0, 0);
- data1.top = new FormAttachment(0, 0);
- data1.right = new FormAttachment(40, 0);
- data1.bottom = new FormAttachment(100, 0);
-
- Composite cmpFilterOpts = new Composite(comp, SWT.NONE);
- cmpFilterOpts.setLayoutData(data1);
- ColumnLayout colLayout = new ColumnLayout();
- colLayout.maxNumColumns = 1;
- cmpFilterOpts.setLayout(colLayout);
-
- String[] ids = DataSetFactory.getIDs();
- btnDataSets = new Button[ids.length];
- for(int i=0; i<btnDataSets.length; i++) {
- btnDataSets[i] = new Button(cmpFilterOpts, SWT.NONE);
- btnDataSets[i].setText(DataSetFactory.getName(ids[i]));
- btnDataSets[i].addSelectionListener(buttonListener);
- btnDataSets[i].setData(ids[i]);
- }
-
- FormData data2 = new FormData();
- data2.left = new FormAttachment(cmpFilterOpts);
- data2.top = new FormAttachment(0, 0);
- data2.right = new FormAttachment(100, 0);
- data2.bottom = new FormAttachment(100, 0);
-
- lblDesc = new Label(comp, SWT.WRAP);
- lblDesc.setLayoutData(data2);
-
- setControl(comp);
- }
-
- public boolean canFlipToNextPage() {
- return (dataSetID.length() > 0);
- }
-
- public IWizardPage getNextPage() {
- return DataSetFactory.getParsingWizardPage(dataSetID);
- }
-
- public void dispose() {
- super.dispose();
- if(null != btnDataSets)
- for(int i=0; i<btnDataSets.length; i++) {
- btnDataSets[i].removeSelectionListener(buttonListener);
- btnDataSets[i].dispose();
- btnDataSets[i] = null;
- }
- btnDataSets = null;
- lblDesc = null;
- }
-
- private SelectionListener buttonListener = new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {}
-
- public void widgetSelected(SelectionEvent e) {
- if(e.widget instanceof Button) {
- Button target = (Button)e.widget;
-
- for(int i=0; i<btnDataSets.length; i++) {
- if(target == btnDataSets[i]) {
- dataSetID = btnDataSets[i].getData().toString();
- lblDesc.setText(DataSetFactory.getName(dataSetID) + "\n\n" +
- DataSetFactory.getDescription(dataSetID));
- wizard.getContainer().updateButtons();
- }
- }
- }
- }
- };
-
- private Button[] btnDataSets;
- private Label lblDesc;
- private String dataSetID;
- private DataSetWizard wizard;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/SelectRowParsingWizardPage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/SelectRowParsingWizardPage.java
deleted file mode 100644
index 4db4b481c5..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/SelectRowParsingWizardPage.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.dataset;
-
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.regex.PatternSyntaxException;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSetParser;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row.RowDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row.RowParser;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.WorkbenchException;
-import org.eclipse.ui.XMLMemento;
-
-
-
-public class SelectRowParsingWizardPage extends ParsingWizardPage {
- public SelectRowParsingWizardPage() {
- super("selectRowDataSetParsing");
- setTitle(Localization.getString("SelectRowParsingWizardPage.SelectRowDataSetParsing"));
- }
-
- public void createControl(Composite parent) {
- super.createControl(parent);
-
- Composite comp = new Composite(parent, SWT.NONE);
- createColumnSelector(comp);
-
- setControl(comp);
- }
-
- protected boolean readParsingExpression() {
- if(null == wizard.metaFile && !wizard.openFile())
- return false;
-
- try {
- FileReader reader = new FileReader(wizard.metaFile);
-
- if(!reader.ready())
- return false;
-
- XMLMemento data = XMLMemento.createReadRoot(reader, IDataSetParser.XMLDataSetSettings);
-
- IMemento[] children = data.getChildren(IDataSetParser.XMLFile);
- int i;
- for(i=0; i<children.length; i++) {
- if(children[i].getID().equals(wizard.scriptFile))
- break;
- }
-
- if(i>=children.length) //Didn't find file
- return false;
-
- if(0 != children[i].getString(IDataSetParser.XMLdataset).compareTo(RowDataSet.ID))
- return false;
-
- IMemento[] children2 = children[i].getChildren(IDataSetParser.XMLColumn);
- txtSeries.setText("" + children2.length);
- for(int j=0; j<children2.length; j++)
- txtRegExpr[j*COLUMNS].setText(children2[j].getString(IDataSetParser.XMLname));
-
- children2 = children[i].getChildren(IDataSetParser.XMLSeries);
- txtSeries.setText("" + children2.length);
- for(int j=0; j<children2.length; j++) {
- txtRegExpr[j*COLUMNS+1].setText(children2[j].getString(IDataSetParser.XMLparsingExpression));
- txtRegExpr[j*COLUMNS+2].setText(children2[j].getString(IDataSetParser.XMLparsingSpacer));
- }
-
- reader.close();
- } catch(FileNotFoundException fnfe) {
- return false;
- } catch(WorkbenchException we) {
- return false;
- } catch(IOException ioe) {
- return false;
- }
-
- return true;
- }
-
- protected void copyExisting(IMemento oldMeta, IMemento newMeta) {
- IMemento[] children = oldMeta.getChildren(IDataSetParser.XMLColumn);
- IMemento child;
- for(int j=0; j<children.length; j++) {
- child = newMeta.createChild(IDataSetParser.XMLColumn);
- child.putString(IDataSetParser.XMLname, children[j].getString(IDataSetParser.XMLname));
- }
- children = oldMeta.getChildren(IDataSetParser.XMLSeries);
- for(int j=0; j<children.length; j++) {
- child = newMeta.createChild(IDataSetParser.XMLSeries);
- child.putString(IDataSetParser.XMLparsingExpression, children[j].getString(IDataSetParser.XMLparsingExpression));
- child.putString(IDataSetParser.XMLparsingSpacer, children[j].getString(IDataSetParser.XMLparsingSpacer));
- }
- }
-
- public boolean checkComplete() {
- if(super.checkComplete()) {
- try {
- wizard.parser = new RowParser(regEx);
- wizard.dataSet = DataSetFactory.createDataSet(RowDataSet.ID, labels);
- return true;
- } catch(PatternSyntaxException pse) {}
- }
- wizard.parser = null;
- wizard.dataSet = null;
- return false;
- }
-
- public void dispose() {
- super.dispose();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/SelectTableParsingWizardPage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/SelectTableParsingWizardPage.java
deleted file mode 100644
index d2270c2650..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/SelectTableParsingWizardPage.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.dataset;
-
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.regex.PatternSyntaxException;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSetParser;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.table.TableDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.table.TableParser;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.WorkbenchException;
-import org.eclipse.ui.XMLMemento;
-
-
-
-public class SelectTableParsingWizardPage extends ParsingWizardPage {
- public SelectTableParsingWizardPage() {
- super("selectTableDataSetParsing");
- setTitle(Localization.getString("SelectTableParsingWizardPage.SelectTableDataSetParsing"));
- }
-
- public void createControl(Composite parent) {
- super.createControl(parent);
-
- Composite comp = new Composite(parent, SWT.NONE);
- Label l = new Label(comp, SWT.NONE);
- l.setText(Localization.getString("SelectTableParsingWizardPage.TableDelimiter"));
- l.setBounds(5, 350, 150, 25);
- txtDelim = new Text(comp, SWT.SINGLE | SWT.BORDER);
-
- createColumnSelector(comp);
-
- txtDelim.setBounds(160, 350, 200, 25);
- txtDelim.addModifyListener(textListener);
-
- setControl(comp);
- }
-
- protected boolean readParsingExpression() {
- if(null == wizard.metaFile && !wizard.openFile())
- return false;
-
- try {
- FileReader reader = new FileReader(wizard.metaFile);
-
- if(!reader.ready())
- return false;
-
- XMLMemento data = XMLMemento.createReadRoot(reader, IDataSetParser.XMLDataSetSettings);
-
- IMemento[] children = data.getChildren(IDataSetParser.XMLFile);
- int i;
- for(i=0; i<children.length; i++) {
- if(children[i].getID().equals(wizard.scriptFile))
- break;
- }
-
- if(i>=children.length) //Didn't find file
- return false;
-
- if(0 != children[i].getString(IDataSetParser.XMLdataset).compareTo(TableDataSet.ID))
- return false;
-
- IMemento[] children2 = children[i].getChildren(IDataSetParser.XMLColumn);
- txtSeries.setText("" + children2.length);
- for(int j=0; j<children2.length; j++)
- txtRegExpr[j*COLUMNS].setText(children2[j].getString(IDataSetParser.XMLname));
-
- children2 = children[i].getChildren(IDataSetParser.XMLSeries);
- txtSeries.setText("" + children2.length);
- for(int j=0; j<children2.length; j++) {
- txtRegExpr[j*COLUMNS+1].setText(children2[j].getString(IDataSetParser.XMLparsingExpression));
- txtRegExpr[j*COLUMNS+2].setText(children2[j].getString(IDataSetParser.XMLparsingSpacer));
- }
- txtDelim.setText(children[i].getChild(IDataSetParser.XMLDelimiter).getString(IDataSetParser.XMLparsingExpression));
-
- reader.close();
- } catch(FileNotFoundException fnfe) {
- return false;
- } catch(WorkbenchException we) {
- return false;
- } catch(IOException ioe) {
- return false;
- }
-
- return true;
- }
-
- protected void copyExisting(IMemento oldMeta, IMemento newMeta) {
- IMemento[] children = oldMeta.getChildren(IDataSetParser.XMLColumn);
- IMemento child;
- for(int j=0; j<children.length; j++) {
- child = newMeta.createChild(IDataSetParser.XMLColumn);
- child.putString(IDataSetParser.XMLname, children[j].getString(IDataSetParser.XMLname));
- }
- children = oldMeta.getChildren(IDataSetParser.XMLSeries);
- for(int j=0; j<children.length; j++) {
- child = newMeta.createChild(IDataSetParser.XMLSeries);
- child.putString(IDataSetParser.XMLparsingExpression, children[j].getString(IDataSetParser.XMLparsingExpression));
- child.putString(IDataSetParser.XMLparsingSpacer, children[j].getString(IDataSetParser.XMLparsingSpacer));
- }
- newMeta.createChild(IDataSetParser.XMLDelimiter).putString(IDataSetParser.XMLparsingExpression, oldMeta.getChild(IDataSetParser.XMLDelimiter).getString(IDataSetParser.XMLparsingExpression));
- }
-
- public boolean checkComplete() {
- if(super.checkComplete() && txtDelim.getText().length() > 0) {
- try {
- wizard.parser = new TableParser(regEx, txtDelim.getText());
- wizard.dataSet = DataSetFactory.createDataSet(TableDataSet.ID, labels);
- return true;
- } catch(PatternSyntaxException pse) {}
- }
- wizard.parser = null;
- wizard.dataSet = null;
- return false;
- }
-
- public void dispose() {
- super.dispose();
- if(null != txtDelim) {
- txtDelim.removeModifyListener(textListener);
- txtDelim.dispose();
- txtDelim = null;
- }
- }
-
- protected Text txtDelim;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/AggregateFactory.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/AggregateFactory.java
deleted file mode 100644
index 687dc2a56e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/AggregateFactory.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.filter;
-
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates.AverageAggregate;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates.CountAggregate;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates.IDataAggregate;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates.MaxAggregate;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates.MinAggregate;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates.SumAggregate;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-
-
-
-public final class AggregateFactory {
- private static final String[] aggregateNames = new String[] {
- Localization.getString("AggregateFactory.AverageAggregate"),
- Localization.getString("AggregateFactory.CountAggregate"),
- Localization.getString("AggregateFactory.MaxAggregate"),
- Localization.getString("AggregateFactory.MinAggregate"),
- Localization.getString("AggregateFactory.SumAggregate")
- };
-
- private static final String[] aggregateDescriptions = new String[] {
- Localization.getString("AggregateFactory.AverageDescription"),
- Localization.getString("AggregateFactory.CountDescription"),
- Localization.getString("AggregateFactory.MaxDescription"),
- Localization.getString("AggregateFactory.MinDescription"),
- Localization.getString("AggregateFactory.SumDescription")
- };
-
- public static final String[] aggregateIDs = new String[] {
- AverageAggregate.ID,
- CountAggregate.ID,
- MaxAggregate.ID,
- MinAggregate.ID,
- SumAggregate.ID
- };
-
- public static String getAggregateName(String id) {
- int index = getIndex(id);
- if(index >= 0)
- return aggregateNames[index];
- return null;
- }
-
- public static String getAggregateDescription(String id) {
- int index = getIndex(id);
- if(index >= 0)
- return aggregateDescriptions[index];
- return null;
- }
-
- private static int getIndex(String id) {
- for(int i=0; i< aggregateIDs.length; i++)
- if(id.equals(aggregateIDs[i]))
- return i;
-
- return -1;
- }
-
- public static final IDataAggregate createAggregate(String id) {
- switch(getIndex(id)) {
- case 0:
- return new AverageAggregate();
- case 1:
- return new CountAggregate();
- case 2:
- return new MaxAggregate();
- case 3:
- return new MinAggregate();
- case 4:
- return new SumAggregate();
- }
- return null;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/AvailableFilterTypes.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/AvailableFilterTypes.java
deleted file mode 100644
index 4065aaeadc..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/AvailableFilterTypes.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.filter;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.IDataSetFilter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.MatchFilter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.RangeFilter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.SortFilter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.UniqueFilter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.ui.IMemento;
-
-
-
-public final class AvailableFilterTypes {
- private static final String[] filterNames = new String[] {
- Localization.getString("AvailableFilterTypes.MatchFilter"),
- Localization.getString("AvailableFilterTypes.RangeFilter"),
- Localization.getString("AvailableFilterTypes.SortFilter"),
- Localization.getString("AvailableFilterTypes.UniqueFilter")
- };
-
- private static final String[] filterDescriptions = new String[] {
- Localization.getString("AvailableFilterTypes.MatchFilterDescription"),
- Localization.getString("AvailableFilterTypes.RangeFilterDescription"),
- Localization.getString("AvailableFilterTypes.SortFilterDescription"),
- Localization.getString("AvailableFilterTypes.UniqueFilterDescription")
- };
-
- private static final FilterWizardPage[] filterWizards = new FilterWizardPage[] {
- new MatchFilterWizardPage(),
- new RangeFilterWizardPage(),
- new SortFilterWizardPage(),
- new UniqueFilterWizardPage()
- };
-
- public static final String[] filterIDs = new String[] {
- MatchFilter.ID,
- RangeFilter.ID,
- SortFilter.ID,
- UniqueFilter.ID
- };
-
- public static FilterWizardPage getFilterWizardPage(String id) {
- FilterWizardPage page = null;
-
- int index = getIndex(id);
- if(index >=0 && index < filterWizards.length)
- return filterWizards[index];
-
- return page;
- }
-
- public static String getFilterName(String id) {
- int index = getIndex(id);
- if(index >= 0)
- return filterNames[index];
- return null;
- }
-
- public static String getFilterDescription(String id) {
- int index = getIndex(id);
- if(index >= 0)
- return filterDescriptions[index];
- return null;
- }
-
- public static IDataSetFilter getDataSetFilter(IMemento xml) {
- String id = xml.getID();
- int column = xml.getInteger("column").intValue();
- int style;
-
- switch(getIndex(id)) {
- case 0:
- String val = xml.getString("value");
- style = xml.getInteger("style").intValue();
- return new MatchFilter(column, val, style);
- case 1:
- style = xml.getInteger("style").intValue();
- String l = xml.getString("low");
- String h = xml.getString("high");
-
- Number low, high;
- if(l.contains("."))
- low = new Double(Double.parseDouble(l));
- else
- low = new Long(Long.parseLong(l));
- if(h.contains("."))
- high = new Double(Double.parseDouble(h));
- else
- high = new Long(Long.parseLong(h));
-
- return new RangeFilter(column, low, high, style);
- case 2:
- style = xml.getInteger("style").intValue();
- return new SortFilter(column, style);
- case 3:
- String agg = xml.getString("aggregate");
- style = xml.getInteger("style").intValue();
- return new UniqueFilter(column, AggregateFactory.createAggregate(agg), style);
- }
- return null;
- }
-
- private static int getIndex(String id) {
- for(int i=0; i< filterIDs.length; i++)
- if(id.equals(filterIDs[i]))
- return i;
-
- return -1;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/FilterWizardPage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/FilterWizardPage.java
deleted file mode 100644
index 0d00d49b75..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/FilterWizardPage.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.filter;
-
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.Composite;
-
-public abstract class FilterWizardPage extends WizardPage {
- public FilterWizardPage(String title) {
- super("selectFilterOptions");
- setTitle(title);
- }
-
- public void createControl(Composite parent) {
- wizard = (SelectFilterWizard)super.getWizard();
- }
-
- public boolean canFlipToNextPage() {
- return false;
- }
-
- abstract void createFilter();
-
- public void dispose() {
- wizard = null;
- super.dispose();
- }
-
- protected final SelectionListener selectionListener = new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {}
-
- public void widgetSelected(SelectionEvent e) {
- createFilter();
- wizard.getContainer().updateButtons();
- }
- };
-
- protected final ModifyListener modifyListener = new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- createFilter();
- wizard.getContainer().updateButtons();
- }
- };
-
- protected SelectFilterWizard wizard;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/MatchFilterWizardPage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/MatchFilterWizardPage.java
deleted file mode 100644
index c72abf694a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/MatchFilterWizardPage.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.filter;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.MatchFilter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.forms.widgets.ColumnLayout;
-
-
-
-public class MatchFilterWizardPage extends FilterWizardPage {
- public MatchFilterWizardPage() {
- super("selectFilterOptions");
- setTitle(Localization.getString("MatchFilterWizardPage.CreateMatchFilter"));
- }
-
- public void createControl(Composite parent) {
- super.createControl(parent);
-
- Composite comp = new Composite(parent, SWT.NULL);
- comp.setLayout(new FormLayout());
- FormData data1 = new FormData();
- data1.left = new FormAttachment(0, 0);
- data1.top = new FormAttachment(0, 0);
- data1.right = new FormAttachment(40, 0);
- data1.bottom = new FormAttachment(100, 0);
-
- Composite cmpFilterOpts = new Composite(comp, SWT.NONE);
- cmpFilterOpts.setLayoutData(data1);
- ColumnLayout colLayout = new ColumnLayout();
- colLayout.maxNumColumns = 1;
- cmpFilterOpts.setLayout(colLayout);
-
- //Column
- Label lblColumn = new Label(cmpFilterOpts, SWT.NONE);
- lblColumn.setText(Localization.getString("MatchFilterWizardPage.Column"));
- cboColumn = new Combo(cmpFilterOpts, SWT.DROP_DOWN);
- cboColumn.addSelectionListener(selectionListener);
- for(int i=0; i<wizard.series.length; i++)
- cboColumn.add(wizard.series[i]);
-
- new Label(cmpFilterOpts, SWT.NONE); //Spacer
-
- //String to compare to
- Label lblCompare = new Label(cmpFilterOpts, SWT.NONE);
- lblCompare.setText(Localization.getString("MatchFilterWizardPage.CompareTo"));
- txtCompare = new Text(cmpFilterOpts, SWT.BORDER);
- txtCompare.addModifyListener(modifyListener);
-
- new Label(cmpFilterOpts, SWT.NONE); //Spacer
-
- //Style
- radKeepMatch = new Button(cmpFilterOpts, SWT.RADIO);
- radKeepMatch.setText(Localization.getString("MatchFilterWizardPage.KeepMatching"));
- radKeepMatch.addSelectionListener(selectionListener);
- radKeepMatch.setSelection(true);
- radRemoveMatch = new Button(cmpFilterOpts, SWT.RADIO);
- radRemoveMatch.setText(Localization.getString("MatchFilterWizardPage.RemoveMatching"));
- radRemoveMatch.addSelectionListener(selectionListener);
-
- setControl(comp);
- }
-
- public boolean canFlipToNextPage() {
- return false;
- }
-
- protected void createFilter() {
- int selected = cboColumn.getSelectionIndex();
- String compare = txtCompare.getText().trim();
- int style = (radKeepMatch.getSelection() ? MatchFilter.KEEP_MATCHING : MatchFilter.REMOVE_MATCHING);
- if(selected >=0 && selected < cboColumn.getItemCount()) {
- if(compare.length() > 0)
- wizard.filter = new MatchFilter(selected, compare, style);
- }
- }
-
- public void dispose() {
- if(null != txtCompare) {
- txtCompare.removeModifyListener(modifyListener);
- txtCompare.dispose();
- txtCompare = null;
- }
-
- if(null != cboColumn) {
- cboColumn.removeSelectionListener(selectionListener);
- cboColumn.dispose();
- cboColumn = null;
- }
-
- if(null != radKeepMatch) {
- radKeepMatch.removeSelectionListener(selectionListener);
- radKeepMatch.dispose();
- radKeepMatch = null;
- }
-
- if(null != radRemoveMatch) {
- radRemoveMatch.removeSelectionListener(selectionListener);
- radRemoveMatch.dispose();
- radRemoveMatch = null;
- }
-
- super.dispose();
- }
-
- private Combo cboColumn;
- private Text txtCompare;
- private Button radKeepMatch, radRemoveMatch;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/RangeFilterWizardPage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/RangeFilterWizardPage.java
deleted file mode 100644
index 7bc9622a0c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/RangeFilterWizardPage.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.filter;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.RangeFilter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.forms.widgets.ColumnLayout;
-
-
-
-public class RangeFilterWizardPage extends FilterWizardPage {
- public RangeFilterWizardPage() {
- super("selectFilterOptions");
- setTitle(Localization.getString("RangeFilterWizardPage.CreateRangeFilter"));
- }
-
- public void createControl(Composite parent) {
- super.createControl(parent);
-
- Composite comp = new Composite(parent, SWT.NULL);
- comp.setLayout(new FormLayout());
- FormData data1 = new FormData();
- data1.left = new FormAttachment(0, 0);
- data1.top = new FormAttachment(0, 0);
- data1.right = new FormAttachment(40, 0);
- data1.bottom = new FormAttachment(100, 0);
-
- Composite cmpFilterOpts = new Composite(comp, SWT.NONE);
- cmpFilterOpts.setLayoutData(data1);
- ColumnLayout colLayout = new ColumnLayout();
- colLayout.maxNumColumns = 1;
- cmpFilterOpts.setLayout(colLayout);
-
- //Column
- Label lblColumn = new Label(cmpFilterOpts, SWT.NONE);
- lblColumn.setText(Localization.getString("RangeFilterWizardPage.Column"));
- cboColumn = new Combo(cmpFilterOpts, SWT.DROP_DOWN);
- cboColumn.addSelectionListener(selectionListener);
- for(int i=0; i<wizard.series.length; i++)
- cboColumn.add(wizard.series[i]);
-
- new Label(cmpFilterOpts, SWT.NONE); //Spacer
-
- //Low
- Label lblLow = new Label(cmpFilterOpts, SWT.NONE);
- lblLow.setText(Localization.getString("RangeFilterWizardPage.LowerBound"));
- txtLow = new Text(cmpFilterOpts, SWT.BORDER);
- txtLow.addModifyListener(modifyListener);
- txtLow.addKeyListener(numberKeyListener);
-
- new Label(cmpFilterOpts, SWT.NONE); //Spacer
-
- //High
- Label lblHigh = new Label(cmpFilterOpts, SWT.NONE);
- lblHigh.setText(Localization.getString("RangeFilterWizardPage.UpperBound"));
- txtHigh = new Text(cmpFilterOpts, SWT.BORDER);
- txtHigh.addModifyListener(modifyListener);
- txtHigh.addKeyListener(numberKeyListener);
-
- new Label(cmpFilterOpts, SWT.NONE); //Spacer
-
- //Style
- radInside = new Button(cmpFilterOpts, SWT.RADIO);
- radInside.setText(Localization.getString("RangeFilterWizardPage.InsideBounds"));
- radInside.addSelectionListener(selectionListener);
- radInside.setSelection(true);
- radOutside = new Button(cmpFilterOpts, SWT.RADIO);
- radOutside.setText(Localization.getString("RangeFilterWizardPage.OutsideBounds"));
- radOutside.addSelectionListener(selectionListener);
-
- chkInclusive = new Button(cmpFilterOpts, SWT.CHECK);
- chkInclusive.setText(Localization.getString("RangeFilterWizardPage.Inclusive"));
-
- setControl(comp);
- }
-
- public boolean canFlipToNextPage() {
- return false;
- }
-
- protected void createFilter() {
- int selected = cboColumn.getSelectionIndex();
-
- try {
- double high = Double.parseDouble(txtHigh.getText().trim());
- double low = Double.parseDouble(txtLow.getText().trim());
- int style = (radInside.getSelection() ? RangeFilter.INSIDE_BOUNDS : RangeFilter.OUTSIDE_BOUNDS);
- if(chkInclusive.getSelection())
- style |= RangeFilter.INCLUSIVE;
-
- if(selected >=0 && selected < cboColumn.getItemCount()) {
- if(low <= high)
- wizard.filter = new RangeFilter(selected, new Double(low), new Double(high), style);
- }
- } catch(NumberFormatException nfe) {}
- }
-
- public void dispose() {
- super.dispose();
- if(null != cboColumn) {
- cboColumn.removeSelectionListener(selectionListener);
- cboColumn.dispose();
- cboColumn = null;
- }
-
- if(null != txtLow) {
- txtLow.removeModifyListener(modifyListener);
- txtLow.removeKeyListener(numberKeyListener);
- txtLow.dispose();
- txtLow = null;
- }
-
- if(null != txtHigh) {
- txtHigh.removeModifyListener(modifyListener);
- txtHigh.removeKeyListener(numberKeyListener);
- txtHigh.dispose();
- txtHigh = null;
- }
-
- if(null != chkInclusive) {
- chkInclusive.removeSelectionListener(selectionListener);
- chkInclusive.dispose();
- chkInclusive = null;
- }
-
- if(null != radInside) {
- radInside.removeSelectionListener(selectionListener);
- radInside.dispose();
- radInside = null;
- }
-
- if(null != radOutside) {
- radOutside.removeSelectionListener(selectionListener);
- radOutside.dispose();
- radOutside = null;
- }
- }
-
- private final KeyListener numberKeyListener = new KeyListener() {
- public void keyPressed(KeyEvent e) {
- if((e.character >= ' ' && e.character <= '~')
- && (e.character > '9' || e.character < '0'))
- e.doit = false;
- if(e.character == '.' && !((Text)e.widget).getText().contains("."))
- e.doit = true;
- }
-
- public void keyReleased(KeyEvent e) {}
- };
-
- private Combo cboColumn;
- private Text txtLow, txtHigh;
- private Button chkInclusive;
- private Button radInside, radOutside;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/SelectFilterWizard.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/SelectFilterWizard.java
deleted file mode 100644
index 1419731e88..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/SelectFilterWizard.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.filter;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.IDataSetFilter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-
-
-
-public class SelectFilterWizard extends Wizard implements INewWizard {
- public SelectFilterWizard(String[] series) {
- filter = null;
- this.series = series;
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- }
-
- public void addPages() {
- setWindowTitle(Localization.getString("SelectFilterWizard.CreateFilter"));
- selectFilterPage = new SelectFilterWizardPage();
- addPage(selectFilterPage);
-
- filterOptionsPages = new FilterWizardPage[AvailableFilterTypes.filterIDs.length];
- for(int i=0; i<AvailableFilterTypes.filterIDs.length; i++) {
- filterOptionsPages[i] = AvailableFilterTypes.getFilterWizardPage(AvailableFilterTypes.filterIDs[i]);
- addPage(filterOptionsPages[i]);
- }
- }
-
- public boolean canFinish() {
- IWizardPage page = this.getContainer().getCurrentPage();
- if((null != filter) && (page instanceof FilterWizardPage))
- return true;
- return false;
- }
-
- public boolean performCancel() {
- return true;
- }
-
- public boolean performFinish() {
- return true;
- }
-
- public IDataSetFilter getFilter() {
- return filter;
- }
-
- public void dispose() {
- if(null != selectFilterPage)
- selectFilterPage.dispose();
- selectFilterPage = null;
- if(null != filterOptionsPages) {
- for(int i=0; i<filterOptionsPages.length; i++) {
- filterOptionsPages[i].dispose();
- filterOptionsPages[i] = null;
- }
- }
- filterOptionsPages = null;
- series = null;
-
- super.dispose();
- }
-
- private SelectFilterWizardPage selectFilterPage;
- private FilterWizardPage[] filterOptionsPages;
- public String[] series;
-
- public IDataSetFilter filter;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/SelectFilterWizardPage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/SelectFilterWizardPage.java
deleted file mode 100644
index b2234bedd1..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/SelectFilterWizardPage.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.filter;
-
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.forms.widgets.ColumnLayout;
-
-
-
-public class SelectFilterWizardPage extends WizardPage {
- public SelectFilterWizardPage() {
- super("selectFilter");
- setTitle(Localization.getString("SelectFilterWizardPage.SelectFilter"));
- filterID = "";
- btnFilters = null;
- buttonListener = new ButtonSelectionListener();
- }
-
- public void createControl(Composite parent) {
- wizard = (SelectFilterWizard)super.getWizard();
-
- Composite comp = new Composite(parent, SWT.NULL);
- comp.setLayout(new FormLayout());
- FormData data1 = new FormData();
- data1.left = new FormAttachment(0, 0);
- data1.top = new FormAttachment(0, 0);
- data1.right = new FormAttachment(40, 0);
- data1.bottom = new FormAttachment(100, 0);
-
- Composite cmpFilterOpts = new Composite(comp, SWT.NONE);
- cmpFilterOpts.setLayoutData(data1);
- ColumnLayout colLayout = new ColumnLayout();
- colLayout.maxNumColumns = 1;
- cmpFilterOpts.setLayout(colLayout);
-
- btnFilters = new Button[AvailableFilterTypes.filterIDs.length];
- for(int i=0; i<btnFilters.length; i++) {
- btnFilters[i] = new Button(cmpFilterOpts, SWT.NONE);
- btnFilters[i].setText(AvailableFilterTypes.getFilterName(AvailableFilterTypes.filterIDs[i]));
- btnFilters[i].addSelectionListener(buttonListener);
- btnFilters[i].setData(AvailableFilterTypes.filterIDs[i]);
- }
-
- FormData data2 = new FormData();
- data2.left = new FormAttachment(cmpFilterOpts);
- data2.top = new FormAttachment(0, 0);
- data2.right = new FormAttachment(100, 0);
- data2.bottom = new FormAttachment(100, 0);
-
- lblDesc = new Label(comp, SWT.WRAP);
- lblDesc.setLayoutData(data2);
- setControl(comp);
- }
-
- public IWizardPage getNextPage() {
- return AvailableFilterTypes.getFilterWizardPage(filterID);
- }
-
- public boolean canFlipToNextPage() {
- return (filterID.length() > 0);
- }
-
- public void dispose() {
- super.dispose();
- if(null != btnFilters)
- for(int i=0; i<btnFilters.length; i++) {
- btnFilters[i].removeSelectionListener(buttonListener);
- btnFilters[i].dispose();
- btnFilters[i] = null;
- }
- btnFilters = null;
- lblDesc = null;
- }
-
- private class ButtonSelectionListener implements SelectionListener {
- public void widgetDefaultSelected(SelectionEvent e) {}
-
- public void widgetSelected(SelectionEvent e) {
- if(e.widget instanceof Button) {
- Button target = (Button)e.widget;
-
- for(int i=0; i<btnFilters.length; i++) {
- if(target == btnFilters[i]) {
- filterID = btnFilters[i].getData().toString();
- lblDesc.setText(AvailableFilterTypes.getFilterName(filterID) + "\n\n" +
- AvailableFilterTypes.getFilterDescription(filterID));
- wizard.getContainer().updateButtons();
- }
- }
- }
- }
- }
-
- private Button[] btnFilters;
- private Label lblDesc;
- private String filterID;
- private SelectFilterWizard wizard;
- private ButtonSelectionListener buttonListener;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/SortFilterWizardPage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/SortFilterWizardPage.java
deleted file mode 100644
index 666c7364f1..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/SortFilterWizardPage.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.filter;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.SortFilter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.forms.widgets.ColumnLayout;
-
-
-
-public class SortFilterWizardPage extends FilterWizardPage {
- public SortFilterWizardPage() {
- super("selectFilterOptions");
- setTitle(Localization.getString("SortFilterWizardPage.CreateSortFilter"));
- }
-
- public void createControl(Composite parent) {
- super.createControl(parent);
-
- Composite comp = new Composite(parent, SWT.NULL);
- comp.setLayout(new FormLayout());
- FormData data1 = new FormData();
- data1.left = new FormAttachment(0, 0);
- data1.top = new FormAttachment(0, 0);
- data1.right = new FormAttachment(40, 0);
- data1.bottom = new FormAttachment(100, 0);
-
- Composite cmpFilterOpts = new Composite(comp, SWT.NONE);
- cmpFilterOpts.setLayoutData(data1);
- ColumnLayout colLayout = new ColumnLayout();
- colLayout.maxNumColumns = 1;
- cmpFilterOpts.setLayout(colLayout);
-
- //Column
- Label lblColumn = new Label(cmpFilterOpts, SWT.NONE);
- lblColumn.setText(Localization.getString("SortFilterWizardPage.Column"));
- cboColumn = new Combo(cmpFilterOpts, SWT.DROP_DOWN);
- cboColumn.addSelectionListener(selectionListener);
- for(int i=0; i<wizard.series.length; i++)
- cboColumn.add(wizard.series[i]);
-
- new Label(cmpFilterOpts, SWT.NONE); //Spacer
-
- //Style
- radAscending = new Button(cmpFilterOpts, SWT.RADIO);
- radAscending.setText(Localization.getString("SortFilterWizardPage.Ascending"));
- radAscending.addSelectionListener(selectionListener);
- radAscending.setSelection(true);
- radDescending = new Button(cmpFilterOpts, SWT.RADIO);
- radDescending.setText(Localization.getString("SortFilterWizardPage.Descending"));
- radDescending.addSelectionListener(selectionListener);
-
- setControl(comp);
- }
-
- public boolean canFlipToNextPage() {
- return false;
- }
-
- protected void createFilter() {
- int selected = cboColumn.getSelectionIndex();
- int style = (radAscending.getSelection() ? SortFilter.ASCENDING : SortFilter.DESCENDING);
- if(selected >=0 && selected < cboColumn.getItemCount())
- wizard.filter = new SortFilter(selected, style);
- }
-
- public void dispose() {
- if(null != cboColumn) {
- cboColumn.removeSelectionListener(selectionListener);
- cboColumn.dispose();
- cboColumn = null;
- }
-
- if(null != radAscending) {
- radAscending.removeSelectionListener(selectionListener);
- radAscending.dispose();
- radAscending = null;
- }
-
- if(null != radDescending) {
- radDescending.removeSelectionListener(selectionListener);
- radDescending.dispose();
- radDescending = null;
- }
-
- super.dispose();
- }
-
- private Combo cboColumn;
- private Button radAscending, radDescending;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/UniqueFilterWizardPage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/UniqueFilterWizardPage.java
deleted file mode 100644
index 2fdac8eaf1..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/filter/UniqueFilterWizardPage.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.filter;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters.UniqueFilter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.forms.widgets.ColumnLayout;
-
-
-
-public class UniqueFilterWizardPage extends FilterWizardPage {
- public UniqueFilterWizardPage() {
- super("selectFilterOptions");
- setTitle(Localization.getString("UniqueFilterWizardPage.CreateUniqueFilter"));
- aggregateID = "";
- }
-
- public void createControl(Composite parent) {
- super.createControl(parent);
-
- Composite comp = new Composite(parent, SWT.NULL);
- comp.setLayout(new FormLayout());
- FormData data1 = new FormData();
- data1.left = new FormAttachment(0, 0);
- data1.top = new FormAttachment(0, 0);
- data1.right = new FormAttachment(40, 0);
- data1.bottom = new FormAttachment(100, 0);
-
- Composite cmpFilterOpts = new Composite(comp, SWT.NONE);
- cmpFilterOpts.setLayoutData(data1);
- ColumnLayout colLayout = new ColumnLayout();
- colLayout.maxNumColumns = 1;
- cmpFilterOpts.setLayout(colLayout);
-
- //Column
- Label lblColumn = new Label(cmpFilterOpts, SWT.NONE);
- lblColumn.setText(Localization.getString("UniqueFilterWizardPage.Column"));
- cboColumn = new Combo(cmpFilterOpts, SWT.DROP_DOWN);
- cboColumn.addSelectionListener(selectionListener);
- for(int i=0; i<wizard.series.length; i++)
- cboColumn.add(wizard.series[i]);
-
- new Label(cmpFilterOpts, SWT.NONE); //Spacer
-
- //String to compare to
- Label lblAggregate = new Label(cmpFilterOpts, SWT.NONE);
- lblAggregate.setText(Localization.getString("UniqueFilterWizardPage.Aggregate"));
-
- btnAggregates = new Button[AggregateFactory.aggregateIDs.length];
- for(int i=0; i<btnAggregates.length; i++) {
- btnAggregates[i] = new Button(cmpFilterOpts, SWT.NONE);
- btnAggregates[i].setText(AggregateFactory.getAggregateName(AggregateFactory.aggregateIDs[i]));
- btnAggregates[i].addSelectionListener(btnSelectionListener);
- btnAggregates[i].setData(AggregateFactory.aggregateIDs[i]);
- }
-
- FormData data2 = new FormData();
- data2.left = new FormAttachment(cmpFilterOpts);
- data2.top = new FormAttachment(0, 0);
- data2.right = new FormAttachment(100, 0);
- data2.bottom = new FormAttachment(100, 0);
-
- lblDesc = new Label(comp, SWT.WRAP);
- lblDesc.setLayoutData(data2);
- setControl(comp);
- }
-
- public boolean canFlipToNextPage() {
- return false;
- }
-
- protected void createFilter() {
- int selected = cboColumn.getSelectionIndex();
- int style = 0;
- if(selected >=0 && selected < cboColumn.getItemCount()) {
- if(null != aggregateID && aggregateID.length() > 0)
- ((SelectFilterWizard)super.getWizard()).filter = new UniqueFilter(selected, AggregateFactory.createAggregate(aggregateID), style);
- }
- }
-
- public void dispose() {
- if(null != cboColumn) {
- cboColumn.removeSelectionListener(selectionListener);
- cboColumn.dispose();
- cboColumn = null;
- }
-
- if(null != lblDesc)
- lblDesc.dispose();
- lblDesc = null;
-
- if(null != btnAggregates) {
- for(int i=0; i<btnAggregates.length; i++) {
- btnAggregates[i].removeSelectionListener(btnSelectionListener);
- btnAggregates[i].dispose();
- btnAggregates[i] = null;
- }
- btnAggregates = null;
- }
-
- aggregateID = null;
-
- super.dispose();
- }
-
- private final SelectionListener btnSelectionListener = new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {}
-
- public void widgetSelected(SelectionEvent e) {
- if(e.widget instanceof Button) {
- Button target = (Button)e.widget;
-
- for(int i=0; i<btnAggregates.length; i++) {
- if(target == btnAggregates[i]) {
- lblDesc.setText(AggregateFactory.getAggregateName(btnAggregates[i].getData().toString()) + "\n\n" +
- AggregateFactory.getAggregateDescription(btnAggregates[i].getData().toString()));
- aggregateID = btnAggregates[i].getData().toString();
- createFilter();
- wizard.getContainer().updateButtons();
- }
- }
- }
- }
- };
-
- private Combo cboColumn;
- private Button[] btnAggregates;
- private Label lblDesc;
- private String aggregateID;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/graph/GraphFactory.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/graph/GraphFactory.java
deleted file mode 100644
index a61836e0ed..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/graph/GraphFactory.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.graph;
-
-import java.util.LinkedList;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.adapters.BlockAdapter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.adapters.ScrollAdapter;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IBlockDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IHistoricalDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.GraphData;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs.BarGraph;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs.IGraph;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs.LineGraph;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs.PieChart;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs.ScatterGraph;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.GraphingAPIUIPlugin;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.widgets.GraphComposite;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-
-
-
-public final class GraphFactory {
- private static final String[] graphNames = new String[] {
- Localization.getString("GraphFactory.ScatterGraph"),
- Localization.getString("GraphFactory.LineGraph"),
- Localization.getString("GraphFactory.BarGraph"),
- Localization.getString("GraphFactory.PieChart")
- };
-
- private static final String[] graphDescriptions = new String[] {
- Localization.getString("GraphFactory.ScatterDescription"),
- Localization.getString("GraphFactory.LineDescription"),
- Localization.getString("GraphFactory.BarDescription"),
- Localization.getString("GraphFactory.PieDescription")
- };
-
- private static final Image[] graphImages = new Image[] {
- GraphingAPIUIPlugin.getImageDescriptor("icons/graphs/ScatterGraph.gif").createImage(),
- GraphingAPIUIPlugin.getImageDescriptor("icons/graphs/LineGraph.gif").createImage(),
- GraphingAPIUIPlugin.getImageDescriptor("icons/graphs/BarGraph.gif").createImage(),
- GraphingAPIUIPlugin.getImageDescriptor("icons/graphs/PieChart.gif").createImage()
- };
-
- private static final String[] graphIDs = new String[] {
- ScatterGraph.ID,
- LineGraph.ID,
- BarGraph.ID,
- PieChart.ID
- };
-
- public static String[] getAvailableGraphs(IDataSet data) {
- LinkedList<String> ids = new LinkedList<String>();
- if(data instanceof IHistoricalDataSet) {
- ids.add(ScatterGraph.ID);
- ids.add(LineGraph.ID);
- ids.add(BarGraph.ID);
- }
- if(data instanceof IBlockDataSet) {
- if(!ids.contains(BarGraph.ID))
- ids.add(BarGraph.ID);
- ids.add(PieChart.ID);
- }
-
- String[] id = new String[0];
- return (String[])ids.toArray(id);
- }
-
- public static String getGraphName(String id) {
- int index = getIndex(id);
- if(index >= 0)
- return graphNames[index];
- return null;
- }
-
- public static String getGraphDescription(String id) {
- int index = getIndex(id);
- if(index >= 0)
- return graphDescriptions[index];
- return null;
- }
-
- public static Image getGraphImage(String id) {
- int index = getIndex(id);
- if(index >= 0)
- return graphImages[index];
- return null;
- }
-
- public static boolean isMultiGraph(String id) {
- if(id.equals(PieChart.ID))
- return false;
- return true;
- }
-
- public static boolean isKeyRequired(String graphID, IDataSet data) {
- switch(getIndex(graphID)) {
- case 0:
- case 1:
- if(data instanceof IBlockDataSet) //Has to be IHistoricalDataSet
- return true;
- default:
- return false;
- }
- }
-
- public static boolean isKeyOptional(String graphID, IDataSet data) {
- switch(getIndex(graphID)) {
- case 2:
- if(data instanceof IBlockDataSet) //Has to be IHistoricalDataSet
- return true;
- default:
- return false;
- }
- }
-
- public static final IGraph createGraph(GraphComposite comp, GraphData gd, IDataSet data) {
- IGraph g = null;
- switch(getIndex(gd.graphID)) {
- case 0:
- g = new ScatterGraph(comp, SWT.NONE, gd.title, new ScrollAdapter((IHistoricalDataSet)data, gd.xSeries, gd.ySeries, gd.key));
- break;
- case 1:
- g = new LineGraph(comp, SWT.NONE, gd.title, new ScrollAdapter((IHistoricalDataSet)data, gd.xSeries, gd.ySeries, gd.key));
- break;
- case 2:
- if(!(data instanceof IBlockDataSet) || (null != gd.key))
- g = new BarGraph(comp, SWT.NONE, gd.title, new ScrollAdapter((IHistoricalDataSet)data, gd.xSeries, gd.ySeries, gd.key));
- else
- g = new BarGraph(comp, SWT.NONE, gd.title, new BlockAdapter((IBlockDataSet)data, gd.xSeries, gd.ySeries));
- break;
- case 3:
- g = new PieChart(comp, SWT.NONE, gd.title, new BlockAdapter((IBlockDataSet)data, gd.xSeries, gd.ySeries));
- break;
- }
- return g;
- }
-
- private static int getIndex(String id) {
- for(int i=0; i<graphIDs.length; i++)
- if(id.equals(graphIDs[i]))
- return i;
- return -1;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/graph/GraphModel.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/graph/GraphModel.java
deleted file mode 100644
index 2fd002ca39..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/graph/GraphModel.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.graph;
-
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.GraphData;
-
-public class GraphModel {
- public GraphModel(IDataSet d) {
- graph = new GraphData();
- graph.graphID = "";
- graph.title = "";
- graph.xSeries = -1;
- graph.ySeries = null;
- data = d;
- }
-
- public void destroy() {
- graph = null;
- }
-
- public GraphData getGraphData() {
- return graph;
- }
-
- public IDataSet getDataSet() {
- return data;
- }
-
- public String[] getSeries() {
- return data.getTitles();
- }
-
- public String getGraphID() {
- return graph.graphID;
- }
-
- public int getXSeries() {
- return graph.xSeries;
- }
-
- public int[] getYSeries() {
- return graph.ySeries;
- }
-
- public void setTitle(String title) {
- graph.title = title;
- }
-
- public void setKey(String key) {
- graph.key = key;
- }
-
- public void setGraph(String g) {
- graph.graphID = g;
- }
-
- public void setXSeries(int x) {
- graph.xSeries = x;
- }
-
- public void setYSeries(int[] y) {
- graph.ySeries = y;
- }
-
- public boolean isGraphSet() {
- return ("" != graph.graphID);
- }
-
- public boolean isSeriesSet() {
- return ((-1 <= graph.xSeries) && (null != graph.ySeries) && graph.ySeries.length > 0);
- }
-
- public boolean isTitleSet() {
- return !("".equals(graph.title));
- }
-
- private GraphData graph;
- private IDataSet data;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/graph/SelectGraphWizard.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/graph/SelectGraphWizard.java
deleted file mode 100644
index c12861f363..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/graph/SelectGraphWizard.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.graph;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.GraphData;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-
-
-
-public class SelectGraphWizard extends Wizard implements INewWizard {
- public SelectGraphWizard(IDataSet data) {
- model = new GraphModel(data);
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- }
-
- public void addPages() {
- setWindowTitle(Localization.getString("SelectGraphWizard.CreateGraph"));
- selectGraphPage = new SelectGraphWizardPage();
- addPage(selectGraphPage);
- selectSeriesPage = new SelectSeriesWizardPage();
- addPage(selectSeriesPage);
- }
-
- public boolean canFinish() {
- if (this.getContainer().getCurrentPage() == selectSeriesPage &&
- selectSeriesPage.isPageComplete())
- return true;
- return false;
- }
-
- public boolean performCancel() {
- model.destroy();
- return true;
- }
-
- public boolean performFinish() {
- return true;
- }
-
- public GraphData getGraphData() {
- return model.getGraphData();
- }
-
- public void dispose() {
- if(null != selectGraphPage)
- selectGraphPage.dispose();
- if(null != selectSeriesPage)
- selectSeriesPage.dispose();
- super.dispose();
- }
-
- public SelectGraphWizardPage selectGraphPage;
- public SelectSeriesWizardPage selectSeriesPage;
- public GraphModel model;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/graph/SelectGraphWizardPage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/graph/SelectGraphWizardPage.java
deleted file mode 100644
index c9e314a48b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/graph/SelectGraphWizardPage.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.graph;
-
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.ui.forms.widgets.ColumnLayout;
-
-
-
-
-public class SelectGraphWizardPage extends WizardPage implements Listener {
- public SelectGraphWizardPage() {
- super("selectGraph");
- setTitle(Localization.getString("SelectGraphWizardPage.SelectGraph"));
- btnGraphs = null;
- }
-
- public void createControl(Composite parent) {
- wizard = (SelectGraphWizard)getWizard();
-
- Composite comp = new Composite(parent, SWT.NULL);
- comp.setLayout(new FormLayout());
- FormData data1 = new FormData();
- data1.left = new FormAttachment(0, 0);
- data1.top = new FormAttachment(0, 0);
- data1.right = new FormAttachment(40, 0);
- data1.bottom = new FormAttachment(100, 0);
-
- Composite cmpGraphOpts = new Composite(comp, SWT.NONE);
- cmpGraphOpts.setLayoutData(data1);
- ColumnLayout colLayout = new ColumnLayout();
- colLayout.maxNumColumns = 1;
- cmpGraphOpts.setLayout(colLayout);
-
- String[] graphIDs = GraphFactory.getAvailableGraphs(wizard.model.getDataSet());
- btnGraphs = new Button[graphIDs.length];
- for(int i=0; i<btnGraphs.length; i++) {
- btnGraphs[i] = new Button(cmpGraphOpts, SWT.NONE);
- //btnGraphs[i].setText(GraphTypeConstants.getGraphName(graphIDs[i]));
- btnGraphs[i].setImage(GraphFactory.getGraphImage(graphIDs[i]));
- btnGraphs[i].addListener(SWT.Selection, this);
- btnGraphs[i].setData(graphIDs[i]);
- }
-
- FormData data2 = new FormData();
- data2.left = new FormAttachment(cmpGraphOpts);
- data2.top = new FormAttachment(0, 0);
- data2.right = new FormAttachment(100, 0);
- data2.bottom = new FormAttachment(100, 0);
-
- lblDesc = new Label(comp, SWT.WRAP);
- lblDesc.setLayoutData(data2);
- setControl(comp);
- }
-
- public void handleEvent(Event event) {
- if(event.widget instanceof Button) {
- Button target = (Button)event.widget;
-
- for(int i=0; i<btnGraphs.length; i++)
- if(target == btnGraphs[i]) {
- lblDesc.setText(GraphFactory.getGraphName(btnGraphs[i].getData().toString()) + "\n\n" +
- GraphFactory.getGraphDescription(btnGraphs[i].getData().toString()));
- saveDataToModel(btnGraphs[i].getData().toString());
- wizard.getContainer().updateButtons();
- }
- }
- }
-
- public IWizardPage getNextPage() {
- return wizard.selectSeriesPage;
- }
-
- public boolean canFlipToNextPage() {
- return wizard.model.isGraphSet();
- }
-
- private void saveDataToModel(String selected) {
- GraphModel model = wizard.model;
- model.setGraph(selected);
- wizard.selectSeriesPage.setKeyEnablement(
- GraphFactory.isKeyRequired(model.getGraphID(), model.getDataSet()),
- GraphFactory.isKeyOptional(model.getGraphID(), model.getDataSet()));
- }
-
- public void dispose() {
- super.dispose();
- if(null != btnGraphs)
- for(int i=0; i<btnGraphs.length; i++)
- btnGraphs[i] = null;
- btnGraphs = null;
- lblDesc = null;
- }
-
- private Button[] btnGraphs;
- private Label lblDesc;
- private SelectGraphWizard wizard;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/graph/SelectSeriesWizardPage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/graph/SelectSeriesWizardPage.java
deleted file mode 100644
index 9664490e8f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/graph/SelectSeriesWizardPage.java
+++ /dev/null
@@ -1,328 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.graph;
-
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.Localization;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.forms.widgets.ColumnLayout;
-
-
-
-
-public class SelectSeriesWizardPage extends WizardPage {
- public SelectSeriesWizardPage() {
- super("selectSeries");
- setTitle(Localization.getString("SelectSeriesWizardPage.SelectSeries"));
- }
-
- public void createControl(Composite parent) {
- model = ((SelectGraphWizard)super.getWizard()).model;
-
- //Set the layout data
- Composite comp = new Composite(parent, SWT.NULL);
- comp.setLayout(new FormLayout());
- FormData data1 = new FormData();
- data1.left = new FormAttachment(0, 0);
- data1.top = new FormAttachment(0, 0);
- data1.right = new FormAttachment(40, 0);
- data1.bottom = new FormAttachment(100, 0);
-
- //Add the title wigets
- Label lblTitle = new Label(comp, SWT.NONE);
- lblTitle.setText(Localization.getString("SelectSeriesWizardPage.Title"));
- txtTitle = new Text(comp, SWT.BORDER);
- txtTitle.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- getWizard().getContainer().updateButtons();
- if(txtTitle.getText().length() == 0) {
- setErrorMessage(Localization.getString("SelectSeriesWizardPage.TitleNotSet"));
- setMessage(null);
- } else {
- setErrorMessage(null);
- setMessage("");
- }
- }
- });
- data1 = new FormData();
- data1.left = new FormAttachment(0,0);
- data1.top = new FormAttachment(0,0);
- data1.width = 200;
- lblTitle.setLayoutData(data1);
-
- data1 = new FormData();
- data1.left = new FormAttachment(0,0);
- data1.top = new FormAttachment(lblTitle,0);
- data1.width = 200;
- txtTitle.setLayoutData(data1);
-
-
- //Add the data series widgets
- data1 = new FormData();
- data1.left = new FormAttachment(0, 0);
- data1.top = new FormAttachment(txtTitle, 20);
- data1.right = new FormAttachment(40, 0);
- data1.bottom = new FormAttachment(100, 0);
-
- Composite cmpGraphOpts = new Composite(comp, SWT.NONE);
- cmpGraphOpts.setLayoutData(data1);
- ColumnLayout colLayout = new ColumnLayout();
- colLayout.maxNumColumns = 1;
- cmpGraphOpts.setLayout(colLayout);
-
- String[] labels = model.getSeries();
-
- cboYItems = new Combo[labels.length];
- lblYItems = new Label[cboYItems.length];
-
- Label lblXItem = new Label(cmpGraphOpts, SWT.NONE);
- lblXItem.setText(Localization.getString("SelectSeriesWizardPage.XSeries"));
- cboXItem = new Combo(cmpGraphOpts, SWT.DROP_DOWN);
- cboXItem.addSelectionListener(new ComboSelectionListener());
- cboXItem.add(Localization.getString("SelectSeriesWizardPage.RowID"));
- cboXItem.select(0);
-
- new Label(cmpGraphOpts, SWT.NONE); //Spacer
-
- for(int i=0; i<cboYItems.length; i++) {
- lblYItems[i] = new Label(cmpGraphOpts, SWT.NONE);
- lblYItems[i].setText(Localization.getString("SelectSeriesWizardPage.YSeries") + i + ":");
- cboYItems[i] = new Combo(cmpGraphOpts, SWT.DROP_DOWN);
- cboYItems[i].addSelectionListener(new ComboSelectionListener());
-
- if(i>0) {
- cboYItems[i].add(Localization.getString("SelectSeriesWizardPage.NA"));
- cboYItems[i].select(0);
- cboYItems[i].setVisible(false);
- lblYItems[i].setVisible(false);
- }
- }
-
- for(int j,i=0; i<labels.length; i++) {
- cboXItem.add(labels[i]);
- for(j=0; j<lblYItems.length; j++)
- cboYItems[j].add(labels[i]);
- }
-
-
- //Add the key filter wigets
- btnKey = new Button(comp, SWT.CHECK);
- btnKey.setText(Localization.getString("SelectSeriesWizardPage.UseHistoricalData"));
- btnKey.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {}
- public void widgetSelected(SelectionEvent e) {
- txtKey.setEnabled(btnKey.getSelection());
- }
- });
-
- data1 = new FormData();
- data1.left = new FormAttachment(cmpGraphOpts, 20);
- data1.top = new FormAttachment(txtTitle, 0);
- data1.right = new FormAttachment(100, 0);
- btnKey.setLayoutData(data1);
-
- lblKey = new Label(comp, SWT.NONE);
- lblKey.setText(Localization.getString("SelectSeriesWizardPage.KeyFilter"));
- txtKey = new Text(comp, SWT.BORDER);
-
- if(null != txtKey) {
- txtKey.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- getWizard().getContainer().updateButtons();
- if(txtTitle.getText().length() == 0) {
- setErrorMessage(Localization.getString("SelectSeriesWizardPage.KeyNotSet"));
- setMessage(null);
- } else {
- setErrorMessage(null);
- setMessage(""); //$NON-NLS-1$
- }
- }
- });
- }
-
- data1 = new FormData();
- data1.left = new FormAttachment(cmpGraphOpts, 20);
- data1.top = new FormAttachment(btnKey, 0);
- data1.right = new FormAttachment(80, 0);
- lblKey.setLayoutData(data1);
-
- data1 = new FormData();
- data1.left = new FormAttachment(cmpGraphOpts, 20);
- data1.top = new FormAttachment(lblKey, 2);
- data1.right = new FormAttachment(80, 0);
- txtKey.setLayoutData(data1);
-
- //Make comp visible
- setControl(comp);
- }
-
- public void setKeyEnablement(boolean required, boolean optional) {
- btnKey.setVisible(optional);
- txtKey.setVisible(required || optional);
- lblKey.setVisible(required || optional);
- txtKey.setEnabled(required);
- }
-
- public boolean canFlipToNextPage() {
- return false;
- }
-
- public boolean isPageComplete() {
- return saveDataToModel();
- }
-
- private boolean saveDataToModel() {
- if(isSeriesUnique()) {
- model.setTitle(txtTitle.getText());
-
- if(null != txtKey && txtKey.isEnabled())
- model.setKey(txtKey.getText());
- else
- model.setKey(null);
-
- model.setXSeries(cboXItem.getSelectionIndex()-1);
-
- int i, count;
- for(i=1, count=1; i<cboYItems.length; i++)
- if(cboYItems[i].isVisible() && 0 != cboYItems[i].getSelectionIndex())
- count++;
-
- int[] ySeries = new int[count];
- ySeries[0] = cboYItems[0].getSelectionIndex();
- for(i=1; i<count; i++)
- ySeries[i] = cboYItems[i].getSelectionIndex()-1;
- model.setYSeries(ySeries);
- return true;
- }
- return false;
- }
-
- private boolean isSeriesUnique() {
- if("".equals(txtTitle.getText().trim()))
- return false;
- if(null != txtKey && txtKey.isEnabled() && txtKey.getText().length() <= 0)
- return false;
-
- for(int j,i=0; i<cboYItems.length; i++) {
- if(cboYItems[i].isVisible()) {
- for(j=i+1; j<cboYItems.length; j++) {
- if(cboYItems[j].isVisible()) {
- if(0 > cboYItems[i].getSelectionIndex())
- return false;
- else if(0 > cboYItems[j].getSelectionIndex())
- return false;
- else if(cboYItems[i].getItem(cboYItems[i].getSelectionIndex()).equals(cboYItems[j].getItem(cboYItems[j].getSelectionIndex()))) {
- return false;
- }
- }
- }
- if(0 > cboYItems[i].getSelectionIndex())
- return false;
- else if(0 > cboXItem.getSelectionIndex())
- return false;
- else if(cboYItems[i].getItem(cboYItems[i].getSelectionIndex()).equals(cboXItem.getItem(cboXItem.getSelectionIndex()))) {
- return false;
- }
- }
- }
- return true;
- }
-
- public void dispose() {
- super.dispose();
- if(null != txtTitle)
- txtTitle.dispose();
- txtTitle = null;
-
- if(null != txtKey)
- txtKey.dispose();
- txtKey = null;
- if(null != btnKey)
- btnKey.dispose();
- btnKey = null;
- if(null != lblKey)
- lblKey.dispose();
- lblKey = null;
-
- if(null != cboXItem)
- cboXItem.dispose();
- cboXItem = null;
- if(null != cboYItems) {
- for(int i=0; i<cboYItems.length; i++) {
- if(null != cboYItems[i])
- cboYItems[i].dispose();
- cboYItems[i] = null;
- if(null != lblYItems[i])
- lblYItems[i].dispose();
- lblYItems[i] = null;
- }
- }
- cboYItems = null;
- lblYItems = null;
- model = null;
- }
-
- private class ComboSelectionListener implements SelectionListener {
- public void widgetDefaultSelected(SelectionEvent e) {}
-
- public void widgetSelected(SelectionEvent e) {
- if(!cboXItem.equals(e.getSource())) {
- boolean setVisible = true;
- if(GraphFactory.isMultiGraph(model.getGraphID())) {
- for(int i=1; i<cboYItems.length; i++) {
- cboYItems[i].setVisible(setVisible);
- lblYItems[i].setVisible(setVisible);
- if(cboYItems[i].getSelectionIndex() > 0 && cboYItems[i].isVisible())
- setVisible = true;
- else
- setVisible = false;
- }
- }
- }
-
- if(!isSeriesUnique()) {
- setErrorMessage(Localization.getString("SelectSeriesWizardPage.SeriesNotSelected"));
- setMessage(null);
- } else {
- setErrorMessage(null);
- setMessage("");
- }
- if(txtTitle.getText().length() == 0) {
- setErrorMessage(Localization.getString("SelectSeriesWizardPage.TitleNotSet"));
- setMessage(null);
- }
-
- getWizard().getContainer().updateButtons();
- }
- }
-
- private Text txtTitle; //TODO: Move this to another page once graphs get more detail
- private Text txtKey;
- private Button btnKey;
- private Label lblKey;
- private Combo cboXItem;
- private Combo[] cboYItems;
- private Label[] lblYItems;
- private GraphModel model;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/.classpath
deleted file mode 100644
index afa4693114..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/.classpath
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry exported="true" kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="lib" path="/home/anithra/eclipse/plugins/emma.jar"/>
- <classpathentry kind="lib" path="/home/anithra/eclipse/plugins/emma_ant.jar"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/.project b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/.project
deleted file mode 100644
index 31fb9428f6..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.ui.ide.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/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/ChangeLog
deleted file mode 100644
index da858530a0..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/ChangeLog
+++ /dev/null
@@ -1,21 +0,0 @@
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Make version 0.3.0.qualifier.
-
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Change provider from IBM to Eclipse.
-
-2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * .classpath: New file.
- * .project: New file.
- * build.properties: New file.
- * META-INF/MANIFEST.MF: New file.
- * src/com/ibm/ras/systemtap/ide/structures: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/ide/test/AllTests.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/ide/test/IDESessionSettingsTest.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/ide/test/structures/StapErrorParserTest.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/ide/test/structures/TreeSettingsTest.java: New file.
- * src/org/eclipse/linuxtools/systemtapgui/ide:
- \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 0f8d140153..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name.0
-Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.ide.tests
-Bundle-Version: 0.3.0.qualifier
-Bundle-Vendor: Eclipse
-Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.ide.tests.IDEPlugin
-Bundle-Localization: plugin
-Bundle-ActivationPolicy: lazy
-Import-Package: junit.framework,
- org.eclipse.linuxtools.systemtap.ui.ide,
- org.eclipse.linuxtools.systemtap.ui.ide.actions,
- org.eclipse.linuxtools.systemtap.ui.ide.structures,
- org.eclipse.linuxtools.systemtap.ui.structures
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/build.properties
deleted file mode 100644
index 34d2e4d2da..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/AllTests.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/AllTests.java
deleted file mode 100644
index 1fea18d50a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/AllTests.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.test;
-
-import org.eclipse.linuxtools.systemtap.ui.ide.test.structures.StapErrorParserTest;
-import org.eclipse.linuxtools.systemtap.ui.ide.test.structures.TreeSettingsTest;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.linuxtools.systemtap.ui.ide.test");
-
- //Root
- suite.addTestSuite(IDESessionSettingsTest.class);
-
- //Structures
- suite.addTestSuite(StapErrorParserTest.class);
- suite.addTestSuite(TreeSettingsTest.class);
-
- return suite;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/IDESessionSettingsTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/IDESessionSettingsTest.java
deleted file mode 100644
index 727ae689df..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/IDESessionSettingsTest.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.test;
-
-import junit.framework.TestCase;
-
-public class IDESessionSettingsTest extends TestCase {
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/structures/StapErrorParserTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/structures/StapErrorParserTest.java
deleted file mode 100644
index f4ddd74967..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/structures/StapErrorParserTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.test.structures;
-
-import org.eclipse.linuxtools.systemtap.ui.ide.structures.StapErrorParser;
-
-import junit.framework.TestCase;
-
-public class StapErrorParserTest extends TestCase {
-
- public static void main(String[] args) {
- }
-
- public StapErrorParserTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- public void testStapErrorParser() {
- String[][] output;
-
- StapErrorParser parser = new StapErrorParser();
-
- output = parser.parseOutput(null);
- assertNull(output);
-
- output = parser.parseOutput("");
- assertNotNull(output);
- assertEquals(0, output.length);
-
- output = parser.parseOutput("this shouldn't have anything");
- assertNotNull(output);
- assertEquals(0, output.length);
-
- output = parser.parseOutput("parse error: expected identifier or '*' \n" +
- "saw: operator '{' at /home/morser/test.stp:14:7 \n" +
- "1 parse error(s). \n" +
- "Pass 1: parse failed. Try again with more '-v' (verbose) options.");
- assertNotNull(output);
- assertEquals(1, output.length);
- assertTrue("parse error:".equals(output[0][0]));
- assertTrue(output[0][3].startsWith("14"));
-
- output = parser.parseOutput("semantic error: probe_615 with type mismatch for identifier 'flags' at /home/morser/test.stp:22:6: string vs. long \n" +
- "semantic error: probe_615 with type mismatch for identifier 'mode' at /home/morser/test.stp:23:6: string vs. long \n" +
- "semantic error: probe_615 with type mismatch for identifier 'f' at /home/morser/test.stp:25:6: string vs. long \n" +
- "Pass 2: analysis failed. Try again with more '-v' (verbose) options.");
- assertNotNull(output);
- assertEquals(3, output.length);
- assertTrue("semantic error:".equals(output[0][0]));
- assertTrue(output[0][3].startsWith("22:6"));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/structures/TreeSettingsTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/structures/TreeSettingsTest.java
deleted file mode 100644
index c6fd45b4de..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/structures/TreeSettingsTest.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.test.structures;
-
-import org.eclipse.linuxtools.systemtap.ui.ide.structures.TreeSettings;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.TreeNode;
-
-import junit.framework.TestCase;
-
-public class TreeSettingsTest extends TestCase {
-
- public static void main(String[] args) {
- //Do not preseve what was in the trees beacuse of invalid date
- }
-
- public TreeSettingsTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- TreeSettings.setTrees(new TreeNode("func", false), new TreeNode("probe", false));
- }
-
- public void testSetTrees() {
- TreeNode t = new TreeNode("f", false);
- TreeNode t1 = new TreeNode("as", "as3", false);
- TreeNode t2 = new TreeNode(null, false);
- TreeNode t3 = null;
-
- assertTrue("Set tree fine1", TreeSettings.setTrees(t, t));
- assertTrue("Set tree fine2", TreeSettings.setTrees(t1, t1));
- assertTrue("Set tree null obj", TreeSettings.setTrees(t2, t2));
- assertFalse("Set trees null", TreeSettings.setTrees(t3, t3));
- assertFalse("Set func null", TreeSettings.setTrees(t3, t));
- assertFalse("Set probe null", TreeSettings.setTrees(t, t3));
- }
-
- public void testGetTreeFileDate() {
- long d1 = TreeSettings.getTreeFileDate();
- long d2 = TreeSettings.getTreeFileDate();
- assertEquals("TreeDate same", d1, d2);
-
- TreeSettings.setTrees(new TreeNode("f", false), new TreeNode("p", false));
- d2 = TreeSettings.getTreeFileDate();
-
- assertTrue("TreeDate changed", d1 < d2);
- }
-
- public void testGetFunctionTree() {
- TreeNode temp;
- TreeNode t = new TreeNode("f", false);
- TreeNode t1 = new TreeNode(null, false);
- TreeNode t2 = new TreeNode(new StringBuilder("asfd"), true);
-
- TreeSettings.setTrees(t, t);
- temp = TreeSettings.getFunctionTree();
- assertEquals("Funcs no children", 0, temp.getChildCount());
- assertTrue("Funcs object", t.getData().toString().equals(temp.getData().toString()));
- assertTrue("Funcs display", t.toString().equals(temp.toString()));
-
- TreeSettings.setTrees(t1, t);
- temp = TreeSettings.getFunctionTree();
- assertEquals("Funcs no children", 0, temp.getChildCount());
- assertEquals("Funcs object", t1.getData(), temp.getData());
- assertEquals("Funcs display", t1.toString(), temp.toString());
-
- TreeSettings.setTrees(t2, t);
- temp = TreeSettings.getFunctionTree();
- assertEquals("Funcs no children", 0, temp.getChildCount());
- assertTrue("Funcs object", t2.getData().toString().equals(temp.getData()));
- assertTrue("Funcs display", t2.toString().equals(temp.toString()));
-
- t.add(t2);
- t.add(t1);
- TreeSettings.setTrees(t, t);
- temp = TreeSettings.getFunctionTree();
- assertEquals("Funcs has children", 2, temp.getChildCount());
- assertTrue("Funcs child object", t2.getData().toString().equals(temp.getChildAt(0).getData()));
- assertTrue("Funcs child display", t2.toString().equals(temp.getChildAt(0).toString()));
- }
-
- public void testGetProbeTree() {
- TreeNode temp;
- TreeNode t = new TreeNode("f", false);
- TreeNode t1 = new TreeNode(null, false);
- TreeNode t2 = new TreeNode(new StringBuilder("asfd"), true);
-
- TreeSettings.setTrees(t, t);
- temp = TreeSettings.getProbeTree();
- assertEquals("Probs no children", 0, temp.getChildCount());
- assertTrue("Probs object", t.getData().toString().equals(temp.getData().toString()));
- assertTrue("Probs display", t.toString().equals(temp.toString()));
-
- TreeSettings.setTrees(t, t1);
- temp = TreeSettings.getProbeTree();
- assertEquals("Probs no children", 0, temp.getChildCount());
- assertEquals("Probs object", t1.getData(), temp.getData());
- assertEquals("Probs display", t1.toString(), temp.toString());
-
- TreeSettings.setTrees(t, t2);
- temp = TreeSettings.getProbeTree();
- assertEquals("Probs no children", 0, temp.getChildCount());
- assertTrue("Probs object", t2.getData().toString().equals(temp.getData()));
- assertTrue("Probs display", t2.toString().equals(temp.toString()));
-
- t.add(t2);
- t.add(t1);
- TreeSettings.setTrees(t, t);
- temp = TreeSettings.getProbeTree();
- assertEquals("Probs has children", 2, temp.getChildCount());
- assertTrue("Probs child object", t2.getData().toString().equals(temp.getChildAt(0).getData()));
- assertTrue("Probs child display", t2.toString().equals(temp.getChildAt(0).toString()));
-
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/.classpath
deleted file mode 100644
index 64c5e31b7a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/.project b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/.project
deleted file mode 100644
index 04197af3c8..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.ui.ide</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/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/.settings/org.eclipse.jdt.core.prefs b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index e72ca5ffff..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Feb 27 18:15:33 IST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/ChangeLog
deleted file mode 100644
index c54d88d5d2..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/ChangeLog
+++ /dev/null
@@ -1,71 +0,0 @@
-2009-11-16 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Fix Bundle-Name.
-
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Make version 0.3.0.qualifier.
-
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Change provider from IBM to Eclipse.
-
-2009-08-06 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPMetadataSingleton.java (parse):
-
-2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * ChangeLog:Replacing all /org/eclipse/linuxtools/systemtap/ui/ide/editors/stp
- files with Phil's editor code
- * src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptAction.java (isValidFile):
- (isValid):
- (getFilePath):
- * src/org/eclipse/linuxtools/systemtap/ui/ide/internal/IDEPlugin.java (PLUGIN_ID):
- (getImageDescriptor):
- * src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/PreferenceInitializer.java (initializeDefaultPreferences):
-
-2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * ChangeLog:Refactoring. Renaming all packages directories from *.systemtapgui.
-
- 2009-01-19 Alexander Kurtakov <akurtako@redhat.com>
-
- * .settings/org.eclipse.jdt.core.prefs: Enable more warnings.
-
-2009-01-09 Phil Muldoon <pmuldoon@redhat.com>
-
- * build.properties: Add completion/ folder to binary
- build.
-
-2008-12-09 Andrew Overholt <overholt@redhat.com>
-
- * plugin.xml: Remove erroneous metadata element under <plugin>.
-
-2008-11-03 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Add Bundle-ActivationPolicy.
-
-2008-10-31 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Use plugin.properties.
- * plugin.properties: Initial checkin.
-
-2008-10-28 Andrew Overholt <overholt@redhat.com>
-
- Bug #252489
- * META-INF/MANIFEST.MF: Set BREE to 1.6 (STPMetadataSingleton.parse uses
- ResourceBundle.containsKey).
-
-2009-09-13 Phil Muldoon <pmuldoon@redhat.com>
-
- * META-INF/MANIFEST.MF: Update to reflect
- import specifications.
- * plugin.xml: Likewise.
-
-2008-09-11 Phil Muldoon <pmuldoon@redhat.com>
-
- * .classpath: Add.
-
- * Initial import of Systemtap editor
- \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/META-INF/MANIFEST.MF
deleted file mode 100644
index 7ad3e7674e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,35 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: SystemTap IDE Plug-in (Incubation)
-Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.ide;singleton:=true
-Bundle-Version: 0.3.0.qualifier
-Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin
-Bundle-Vendor: Eclipse
-Bundle-Localization: plugin
-Export-Package: org.eclipse.linuxtools.systemtap.ui.ide,
- org.eclipse.linuxtools.systemtap.ui.ide.actions,
- org.eclipse.linuxtools.systemtap.ui.ide.structures
-Require-Bundle: org.eclipse.linuxtools.systemtap.ui.logging,
- org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.linuxtools.systemtap.ui.editor,
- org.eclipse.linuxtools.systemtap.ui.systemtapgui,
- org.eclipse.linuxtools.systemtap.ui.consolelog,
- org.eclipse.linuxtools.systemtap.ui.structures,
- org.eclipse.core.resources;bundle-version="3.4.1"
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.core.filesystem,
- org.eclipse.linuxtools.systemtap.ui.graphing,
- org.eclipse.linuxtools.systemtap.ui.graphing.views,
- org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets,
- org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures,
- org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.dataset,
- org.eclipse.linuxtools.systemtap.ui.structures,
- org.eclipse.linuxtools.systemtap.ui.structures.listeners,
- org.eclipse.linuxtools.systemtap.ui.structures.runnable,
- org.eclipse.linuxtools.systemtap.ui.structures.ui,
- org.eclipse.linuxtools.systemtap.ui.structures.validators,
- org.eclipse.ui.ide,
- org.eclipse.ui.part
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/build.properties
deleted file mode 100644
index e3fe0187cf..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/build.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- icons/,\
- toc.xml,\
- documentation/,\
- plugin.properties
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/completion/stp_completion.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/completion/stp_completion.properties
deleted file mode 100644
index 7221df6aa3..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/completion/stp_completion.properties
+++ /dev/null
@@ -1,569 +0,0 @@
-syscall.accept(name:string,sockfd:long,addr_uaddr:long,addrlen_uaddr:long,argstr:string)
-syscall.access(name:string,pathname:string,mode:long,mode_str:string,argstr:string)
-syscall.acct(name:string,filename:string,argstr:string)
-syscall.add_key(name:string,type_uaddr:long,description_auddr:long,payload_uaddr:long,plen:long,ringid:long,argstr:string)
-syscall.adjtimex(name:string,argstr:string)
-syscall.alarm(name:string,seconds:long,argstr:string)
-syscall.arch_prctl(name:string,code:long,addr:long,argstr:string)
-syscall.bdflush(name:string,func:long,data:long,data_str:string,argstr:string)
-syscall.bind(name:string,sockfd:long,my_addr_uaddr:long,addrlen:long,argstr:string)
-syscall.brk(name:string,brk:long,argstr:string)
-syscall.capget(name:string,header_uaddr:long,data_uaddr:long,argstr:string)
-syscall.capset(name:string,header_uaddr:long,data_uaddr:long,argstr:string)
-syscall.chdir(name:string,path:string,argstr:string)
-syscall.chmod(name:string,path:string,mode:long,argstr:string)
-syscall.chown(name:string,path:string,owner:long,group:long,argstr:string)
-syscall.chown16(name:string,path:string,owner:long,group:long,argstr:string)
-syscall.chroot(name:string,path:string,argstr:string)
-syscall.clock_getres(name:string,clk_id:long,clk_id_str:string,res_uaddr:long,argstr:string)
-syscall.clock_gettime(name:string,clk_id:long,clk_id_str:string,argstr:string)
-syscall.clock_nanosleep(name:string,flag_str:string,argstr:string)
-syscall.clock_settime(name:string,clk_id:long,clk_id_str:string,tp_uaddr:long,argstr:string)
-syscall.close(name:string,fd:long,argstr:string)
-syscall.compat_adjtimex(name:string,argstr:string)
-syscall.compat_clock_nanosleep(name:string,flag_str:string,argstr:string)
-syscall.compat_execve(name:string,filename:string,args:string,argstr:string)
-syscall.compat_futex(name:string,futex_uaddr:long,op:long,val:long,utime_uaddr:long,uaddr2_uaddr:long,val3:long,argstr:string)
-syscall.compat_futimesat(name:string,dirfd:long,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
-syscall.compat_getitimer(name:string,which:long,value_uaddr:long,argstr:string)
-syscall.compat_io_setup(name:string,maxevents:long,ctxp_uaddr:long,argstr:string)
-syscall.compat_io_submit(name:string,ctx_id:long,nr:long,iocbpp_uaddr:long,argstr:string)
-syscall.compat_nanosleep(name:string,req_uaddr:long,rem_uaddr:long,argstr:string)
-syscall.compat_ppoll(name:string,argstr:string)
-syscall.compat_pselect6(name:string,argstr:string)
-syscall.compat_pselect7a(name:string,argstr:string)
-syscall.compat_select(name:string,n:long,readfds_uaddr:long,writefds_uaddr:long,exceptfds_uaddr:long,timeout_uaddr:long,argstr:string)
-syscall.compat_setitimer(name:string,which:long,value_uaddr:long,ovalue_uaddr:long,argstr:string)
-syscall.compat_signalfd(name:string,argstr:string)
-syscall.compat_sys_msgctl(name:string,argstr:string)
-syscall.compat_sys_msgrcv(name:string,argstr:string)
-syscall.compat_sys_msgsnd(name:string,argstr:string)
-syscall.compat_sys_recvmsg(name:string,s:long,msg_uaddr:long,flags:long,argstr:string)
-syscall.compat_sys_semctl(name:string,argstr:string)
-syscall.compat_sys_semtimedop(name:string,semid:long,sops_uaddr:long,nsops:long,timeout_uaddr:long,argstr:string)
-syscall.compat_sys_sendmsg(name:string,s:long,msg_uaddr:long,flags:long,argstr:string)
-syscall.compat_sys_shmat(name:string,first:long,second:long,third:long,uptr_uaddr:long,argstr:string)
-syscall.compat_sys_shmctl(name:string,first:long,second:long,uptr_uaddr:long,argstr:string)
-syscall.compat_sys_utimes(name:string,filename:string,argstr:string)
-syscall.compat_utime(name:string,filename_uaddr:long,filename:string,buf_uaddr:long,actime:long,modtime:long,argstr:string)
-syscall.compat_utimensat(name:string,argstr:string)
-syscall.compat_vmsplice(name:string,argstr:string)
-syscall.connect(name:string,sockfd:long,serv_addr_uaddr:long,addrlen:long,argstr:string)
-syscall.creat(name:string,mode:long,pathname:string,argstr:string)
-syscall.delete_module(name:string,name_user:string,flags:long,argstr:string)
-syscall.dup(name:string,oldfd:long,argstr:string)
-syscall.dup2(name:string,oldfd:long,newfd:long,argstr:string)
-syscall.epoll_create(name:string,size:long,argstr:string)
-syscall.epoll_ctl(name:string,epfd:long,op:long,op_str:string,fd:long,event_uaddr:long,argstr:string)
-syscall.epoll_pwait(name:string,argstr:string)
-syscall.epoll_wait(name:string,epfd:long,events_uaddr:long,maxevents:long,timeout:long,argstr:string)
-syscall.eventfd(name:string,argstr:string)
-syscall.execve(name:string,filename:string,args:string,argstr:string)
-syscall.exit(name:string,status:long,argstr:string)
-syscall.exit_group(name:string,status:long,argstr:string)
-syscall.faccessat(name:string,dfd:long,dfd_str:string,filename:long,filename_str:string,mode:long,mode_str:string,argstr:string)
-syscall.fadvise64(name:string,fs:long,offset:long,len:long,advice:long,argstr:string)
-syscall.fadvise64_64(name:string,fs:long,offset:long,len:long,advice:long,argstr:string)
-syscall.fchdir(name:string,fd:long,argstr:string)
-syscall.fchmod(name:string,fildes:long,mode:long,argstr:string)
-syscall.fchmodat(name:string,dfd:long,dfd_str:string,filename:long,filename_str:string,mode:long,argstr:string)
-syscall.fchown(name:string,fd:long,owner:long,group:long,argstr:string)
-syscall.fchown16(name:string,fd:long,owner:long,group:long,argstr:string)
-syscall.fchownat(name:string,dfd:long,dfd_str:string,filename:long,filename_str:string,user:long,group:long,flag:long,flag_str:string,argstr:string)
-syscall.fcntl(name:string,fd:long,cmd:long,cmd_str:string,arg:long,argstr:string)
-syscall.fdatasync(name:string,fd:long,argstr:string)
-syscall.fgetxattr(name:string,filedes:long,name2:string,value_uaddr:long,size:long,argstr:string)
-syscall.flistxattr(name:string,filedes:long,list_uaddr:long,size:long,argstr:string)
-syscall.flock(name:string,fd:long,operation:long,argstr:string)
-syscall.fork(clone_flags:long,stack_start:long,regs:long,stack_size:long,parent_tid_uaddr:long,child_tid_uaddr:long,name:string,argstr:string)
-syscall.fremovexattr(name:string,filedes:long,name_uaddr:long,argstr:string)
-syscall.fsetxattr(name:string,filedes:long,name2:string,value_uaddr:long,size:long,flags:long,argstr:string)
-syscall.fstat(name:string,filedes:long,buf_uaddr:long,argstr:string)
-syscall.fstatat(name:string,dirfd:long,path:string,buf_uaddr:long,argstr:string)
-syscall.fstatfs(name:string,fd:long,buf_uaddr:long,argstr:string)
-syscall.fstatfs64(name:string,fd:long,sz:long,buf_uaddr:long,argstr:string)
-syscall.fsync(name:string,fd:long,argstr:string)
-syscall.ftruncate(name:string,fd:long,length:long,argstr:string)
-syscall.futex(name:string,futex_uaddr:long,op:long,val:long,utime_uaddr:long,uaddr2_uaddr:long,val3:long,argstr:string)
-syscall.futimesat(name:string,dirfd:long,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
-syscall.get_mempolicy(name:string,policy_uaddr:long,nmask_uaddr:long,maxnode:long,addr:long,flags:long,argstr:string)
-syscall.getcwd(name:string,buf_uaddr:long,size:long,argstr:string)
-syscall.getdents(name:string,fd:long,dirp_uaddr:long,count:long,argstr:string)
-syscall.getegid(name:string,argstr:string)
-syscall.geteuid(name:string,argstr:string)
-syscall.getgid(name:string,argstr:string)
-syscall.getgroups(name:string,size:long,list_uaddr:long,argstr:string)
-syscall.gethostname(name:string,name_uaddr:long,len:long,argstr:string)
-syscall.getitimer(name:string,which:long,value_uaddr:long,argstr:string)
-syscall.getpeername(name:string,s:long,name_uaddr:long,namelen_uaddr:long,argstr:string)
-syscall.getpgid(name:string,pid:long,argstr:string)
-syscall.getpgrp(name:string,argstr:string)
-syscall.getpid(name:string,argstr:string)
-syscall.getppid(name:string,argstr:string)
-syscall.getpriority(name:string,which:long,who:long,argstr:string)
-syscall.getresgid(name:string,rgid_uaddr:long,egid_uaddr:long,sgid_uaddr:long,argstr:string)
-syscall.getresuid(name:string,ruid_uaddr:long,euid_uaddr:long,suid_uaddr:long,argstr:string)
-syscall.getrlimit(name:string,resource:long,rlim_uaddr:long,argstr:string)
-syscall.getrusage(name:string,who:long,who_str:string,usage_uaddr:long,argstr:string)
-syscall.getsid(name:string,pid:long,argstr:string)
-syscall.getsockname(name:string,s:long,name_uaddr:long,namelen_uaddr:long,argstr:string)
-syscall.getsockopt(name:string,fd:long,level:long,level_str:string,optname:long,optname_str:string,optval_uaddr:long,optlen_uaddr:long,argstr:string)
-syscall.gettid(name:string,argstr:string)
-syscall.gettimeofday(name:string,tv_uaddr:long,tz_uaddr:long,argstr:string)
-syscall.getuid(name:string,argstr:string)
-syscall.getxattr(name:string,path:string,name2:string,value_uaddr:long,size:long,argstr:string)
-syscall.init_module(name:string,umod_uaddr:long,len:long,uargs:string,argstr:string)
-syscall.inotify_add_watch(name:string,fd:long,mask:long,path_uaddr:long,path:string,argstr:string)
-syscall.inotify_init(name:string,argstr:string)
-syscall.inotify_rm_watch(name:string,fd:long,wd:long,argstr:string)
-syscall.io_cancel(name:string,ctx_id:long,iocb_uaddr:long,result_uaddr:long,argstr:string)
-syscall.io_destroy(name:string,ctx:long,argstr:string)
-syscall.io_getevents(name:string,ctx_id:long,min_nr:long,nr:long,events_uaddr:long,timeout_uaddr:long,timestr:string,argstr:string)
-syscall.io_setup(name:string,maxevents:long,ctxp_uaddr:long,argstr:string)
-syscall.io_submit(name:string,ctx_id:long,nr:long,iocbpp_uaddr:long,argstr:string)
-syscall.ioctl(name:string,fd:long,request:long,argp:long,argstr:string)
-syscall.ioperm(name:string,from:long,num:long,turn_on:long,argstr:string)
-syscall.iopl(name:string,level:long,argstr:string)
-syscall.ioprio_get(name:string,which:long,who:long,argstr:string)
-syscall.ioprio_set(name:string,which:long,who:long,ioprio:long,argstr:string)
-syscall.kexec_load(name:string,entry:long,nr_segments:long,segments_uaddr:long,flags:long,argstr:string)
-syscall.keyctl(name:string,argstr:string)
-syscall.kill(name:string,pid:long,sig:long,argstr:string)
-syscall.lchown(name:string,path:string,owner:long,group:long,argstr:string)
-syscall.lchown16(name:string,path:string,owner:long,group:long,argstr:string)
-syscall.lgetxattr(name:string,path:string,name2:string,value_uaddr:long,size:long,argstr:string)
-syscall.link(name:string,oldpath:string,newpath:string,argstr:string)
-syscall.linkat(name:string,olddfd:long,olddfd_str:string,oldname:long,oldname_str:string,newdfd:long,newdfd_str:string,newname:long,newname_str:string,flags:long,flags_str:string,argstr:string)
-syscall.listen(name:string,sockfd:long,backlog:long,argstr:string)
-syscall.listxattr(name:string,list_uaddr:long,size:long,path_uaddr:long,path:string,argstr:string)
-syscall.llistxattr(name:string,list_uaddr:long,size:long,path_uaddr:long,path:string,argstr:string)
-syscall.llseek(name:string,fd:long,offset_high:long,offset_low:long,result_uaddr:long,whence:long,whence_str:string,argstr:string)
-syscall.lookup_dcookie(name:string,cookie:long,buffer_uaddr:long,len:long,argstr:string)
-syscall.lremovexattr(name:string,name_uaddr:long,name2:string,path_uaddr:long,path:string,argstr:string)
-syscall.lseek(name:string,fildes:long,offset:long,whence:long,whence_str:string,argstr:string)
-syscall.lsetxattr(name:string,path_uaddr:long,path:string,name_uaddr:long,name_str:string,value_uaddr:long,size:long,flags:long,argstr:string)
-syscall.lstat(name:string,path:string,buf_uaddr:long,argstr:string)
-syscall.madvise(name:string,start:long,length:long,advice:long,advice_str:string,argstr:string)
-syscall.mbind(name:string,start:long,len:long,mode:long,nmask_uaddr:long,maxnode:long,flags:long,argstr:string)
-syscall.migrate_pages(name:string,argstr:string)
-syscall.mincore(name:string,start:long,length:long,vec_uaddr:long,argstr:string)
-syscall.mkdir(name:string,pathname_uaddr:long,pathname:string,mode:long,argstr:string)
-syscall.mkdirat(name:string,dirfd:long,pathname:string,mode:long,argstr:string)
-syscall.mknod(name:string,pathname:string,mode:long,dev:long,argstr:string)
-syscall.mknodat(name:string,dfd:long,dfd_str:string,filename:long,filename_str:string,mode:long,mode_str:string,dev:long,argstr:string)
-syscall.mlock(name:string,addr:long,len:long,argstr:string)
-syscall.mlockall(name:string,flags:long,argstr:string)
-syscall.mmap(name:string,start:long,len:long,prot:long,flags:long,fd:long,offset:long,argstr:string)
-syscall.mmap2(name:string,argstr:string)
-syscall.mmap32(name:string,argstr:string)
-syscall.modify_ldt(name:string,func:long,ptr_uaddr:long,bytecount:long,argstr:string)
-syscall.mount(name:string,source:string,target:string,filesystemtype:string,mountflags:long,mountflags_str:string,data:string,argstr:string)
-syscall.move_pages(name:string,argstr:string)
-syscall.mprotect(name:string,addr:long,len:long,prot:long,prot_str:string,argstr:string)
-syscall.mq_getsetattr(name:string,mqdes:long,u_mqstat_uaddr:long,u_omqstat_uaddr:long,argstr:string)
-syscall.mq_notify(name:string,mqdes:long,notification_uaddr:long,argstr:string)
-syscall.mq_open(name:string,name_uaddr:long,filename:string,mode:long,u_attr_uaddr:long,oflag:long,argstr:string)
-syscall.mq_timedreceive(name:string,mqdes:long,msg_ptr_uaddr:long,msg_len:long,msg_prio_uaddr:long,abs_timout_uaddr:long,argstr:string)
-syscall.mq_timedsend(name:string,mqdes:long,msg_ptr_uaddr:long,msg_len:long,msg_prio:long,abs_timeout_uaddr:long,argstr:string)
-syscall.mq_unlink(name:string,u_name_uaddr:long,u_name:string,argstr:string)
-syscall.mremap(name:string,old_address:long,old_size:long,new_size:long,flags:long,new_address:long,argstr:string)
-syscall.msgctl(name:string,msqid:long,cmd:long,buf_uaddr:long,argstr:string)
-syscall.msgget(name:string,key:long,msgflg:long,msgflg_str:string,argstr:string)
-syscall.msgrcv(name:string,msqid:long,msgp_uaddr:long,msgsz:long,msgtyp:long,msgflg:long,argstr:string)
-syscall.msgsnd(name:string,msqid:long,msgp_uaddr:long,msgsz:long,msgflg:long,argstr:string)
-syscall.msync(name:string,start:long,length:long,flags:long,argstr:string)
-syscall.munlock(name:string,addr:long,len:long,argstr:string)
-syscall.munlockall(name:string,argstr:string)
-syscall.munmap(name:string,start:long,length:long,argstr:string)
-syscall.nanosleep(name:string,req_uaddr:long,rem_uaddr:long,argstr:string)
-syscall.nfsservctl(name:string,cmd:long,argp_uaddr:long,resp_uaddr:long,argstr:string)
-syscall.ni_syscall(name:string,argstr:string)
-syscall.nice(name:string,inc:long,argstr:string)
-syscall.open(name:string,filename:string,flags:long,mode:long,argstr:string)
-syscall.openat(name:string,filename:string,flags:long,mode:long,argstr:string)
-syscall.pause(name:string,argstr:string)
-syscall.personality(name:string,persona:long,argstr:string)
-syscall.pipe(name:string,argstr:string)
-syscall.pipe32(name:string,argstr:string)
-syscall.pivot_root(name:string,new_root_str:string,old_root_str:string,argstr:string)
-syscall.poll(name:string,ufds_uaddr:long,nfds:long,timeout:long,argstr:string)
-syscall.ppoll(name:string,argstr:string)
-syscall.prctl(name:string,option:long,arg2:long,arg3:long,arg4:long,arg5:long,argstr:string)
-syscall.pread(name:string,fd:long,buf_uaddr:long,count:long,offset:long,argstr:string)
-syscall.pselect6(name:string,argstr:string)
-syscall.pselect7(name:string,argstr:string)
-syscall.ptrace(name:string,request:long,pid:long,addr:long,data:long,argstr:string)
-syscall.pwrite(name:string,fd:long,buf_uaddr:long,count:long,offset:long,argstr:string)
-syscall.quotactl(name:string,cmd:long,cmd_str:string,special:long,special_str:string,id:long,addr_uaddr:long,argstr:string)
-syscall.read(name:string,fd:long,buf_uaddr:long,count:long,argstr:string)
-syscall.readahead(name:string,fd:long,offset:long,count:long,argstr:string)
-syscall.readdir(name:string,argstr:string)
-syscall.readlink(name:string,path:string,buf_uaddr:long,bufsiz:long,argstr:string)
-syscall.readlinkat(name:string,dfd:long,buf_uaddr:long,bufsiz:long,path:string,argstr:string)
-syscall.readv(name:string,vector_uaddr:long,count:long,fd:long,argstr:string)
-syscall.reboot(name:string,magic:long,magic_str:string,magic2:long,magic2_str:string,flag:long,flag_str:string,arg_uaddr:long,argstr:string)
-syscall.recv(name:string,s:long,buf_uaddr:long,len:long,flags:long,flags_str:string,argstr:string)
-syscall.recvfrom(name:string,s:long,buf_uaddr:long,len:long,flags:long,flags_str:string,addr_uaddr:long,addrlen_uaddr:long,argstr:string)
-syscall.recvmsg(name:string,s:long,msg_uaddr:long,flags:long,flags_str:string,argstr:string)
-syscall.remap_file_pages(name:string,start:long,size:long,prot:long,pgoff:long,flags:long,argstr:string)
-syscall.removexattr(name:string,name_str:string,path:string,argstr:string)
-syscall.rename(name:string,oldpath:string,newpath:string,argstr:string)
-syscall.renameat(name:string,olddfd:long,olddfd_str:string,oldname:long,oldname_str:string,newdfd:long,newdfd_str:string,newname:long,newname_str:string,argstr:string)
-syscall.request_key(name:string,type_uaddr:long,description_uaddr:long,callout_info_uaddr:long,destringid:long,argstr:string)
-syscall.restart_syscall(name:string,argstr:string)
-syscall.rmdir(name:string,pathname:string,argstr:string)
-syscall.rt_sigaction(name:string,sig:long,act_uaddr:long,oact_uaddr:long,sigsetsize:long,argstr:string)
-syscall.rt_sigaction32(name:string,sig:long,act_uaddr:long,oact_uaddr:long,sigsetsize:long,argstr:string)
-syscall.rt_sigpending(name:string,set_uaddr:long,sigsetsize:long,argstr:string)
-syscall.rt_sigprocmask(name:string,how:long,how_str:string,set_uaddr:long,oldset_uaddr:long,argstr:string)
-syscall.rt_sigqueueinfo(name:string,pid:long,sig:long,uinfo_uaddr:long,argstr:string)
-syscall.rt_sigreturn(name:string,argstr:string)
-syscall.rt_sigsuspend(name:string,argstr:string)
-syscall.rt_sigtimedwait(name:string,uthese_uaddr:long,uinfo_uaddr:long,uts_uaddr:long,sigsetsize:long,argstr:string)
-syscall.sched_get_priority_max(name:string,policy:long,argstr:string)
-syscall.sched_get_priority_min(name:string,policy:long,argstr:string)
-syscall.sched_getaffinity(name:string,pid:long,len:long,mask_uaddr:long,argstr:string)
-syscall.sched_getparam(name:string,pid:long,p_uaddr:long,argstr:string)
-syscall.sched_getscheduler(name:string,pid:long,argstr:string)
-syscall.sched_rr_get_interval(name:string,pid:long,tp_uaddr:long,argstr:string)
-syscall.sched_setaffinity(name:string,pid:long,len:long,mask_uaddr:long,argstr:string)
-syscall.sched_setparam(name:string,pid:long,p_uaddr:long,argstr:string)
-syscall.sched_setscheduler(name:string,pid:long,policy:long,policy_str:string,p_uaddr:long,argstr:string)
-syscall.sched_yield(name:string,argstr:string)
-syscall.select(name:string,n:long,readfds_uaddr:long,writefds_uaddr:long,exceptfds_uaddr:long,timeout_uaddr:long,argstr:string)
-syscall.semctl(name:string,semid:long,semnum:long,cmd:long,argstr:string)
-syscall.semget(name:string,key:long,nsems:long,semflg:long,argstr:string)
-syscall.semop(name:string,semid:long,tsops_uaddr:long,nsops:long,argstr:string)
-syscall.semtimedop(name:string,semid:long,sops_uaddr:long,nsops:long,timeout_uaddr:long,argstr:string)
-syscall.send(name:string,s:long,buf_uaddr:long,len:long,flags:long,flags_str:string,argstr:string)
-syscall.sendfile(name:string,out_fd:long,in_fd:long,offset_uaddr:long,count:long,argstr:string)
-syscall.sendmsg(name:string,s:long,msg_uaddr:long,flags:long,flags_str:string,argstr:string)
-syscall.sendto(name:string,s:long,buf_uaddr:long,len:long,flags:long,flags_str:string,to_uaddr:long,tolen:long,argstr:string)
-syscall.set_mempolicy(name:string,mode:long,nmask_uaddr:long,maxnode:long,argstr:string)
-syscall.set_tid_address(name:string,tidptr_uaddr:long,argstr:string)
-syscall.setdomainname(name:string,hostname_uaddr:long,len:long,argstr:string)
-syscall.setfsgid(name:string,fsgid:long,argstr:string)
-syscall.setfsuid(name:string,fsuid:long,argstr:string)
-syscall.setgid(name:string,gid:long,argstr:string)
-syscall.setgroups(name:string,size:long,list_uaddr:long,argstr:string)
-syscall.sethostname(name:string,hostname_uaddr:long,name_str:string,len:long,argstr:string)
-syscall.setitimer(name:string,which:long,value_uaddr:long,ovalue_uaddr:long,argstr:string)
-syscall.setpgid(name:string,pid:long,pgid:long,argstr:string)
-syscall.setpriority(name:string,which:long,which_str:string,who:long,prio:long,argstr:string)
-syscall.setregid(name:string,rgid:long,egid:long,argstr:string)
-syscall.setregid16(name:string,rgid:long,egid:long,argstr:string)
-syscall.setresgid(name:string,rgid:long,egid:long,sgid:long,argstr:string)
-syscall.setresgid16(name:string,rgid:long,egid:long,sgid:long,argstr:string)
-syscall.setresuid(name:string,ruid:long,euid:long,suid:long,argstr:string)
-syscall.setresuid16(name:string,ruid:long,euid:long,suid:long,argstr:string)
-syscall.setreuid(name:string,ruid:long,euid:long,argstr:string)
-syscall.setreuid16(name:string,ruid:long,euid:long,argstr:string)
-syscall.setrlimit(name:string,resource:long,rlim_uaddr:long,argstr:string)
-syscall.setsid(name:string,argstr:string)
-syscall.setsockopt(name:string,fd:long,level:long,level_str:string,optname:long,optname_str:string,optval_uaddr:long,optlen:long,argstr:string)
-syscall.settimeofday(name:string,tv_uaddr:long,tz_uaddr:long,argstr:string)
-syscall.settimeofday32(name:string,tv_uaddr:long,tz_uaddr:long,argstr:string)
-syscall.setuid(name:string,uid:long,argstr:string)
-syscall.setxattr(name:string,path_uaddr:long,path:string,name_uaddr:long,name_str:string,value_uaddr:long,size:long,flags:long,argstr:string)
-syscall.sgetmask(name:string,argstr:string)
-syscall.shmat(name:string,shmid:long,shmaddr_uaddr:long,shmflg:long,argstr:string)
-syscall.shmctl(name:string,shmid:long,cmd:long,buf_uaddr:long,argstr:string)
-syscall.shmdt(name:string,shmaddr_uaddr:long,argstr:string)
-syscall.shmget(name:string,key:long,size:long,shmflg:long,argstr:string)
-syscall.shutdown(name:string,s:long,how:long,how_str:string,argstr:string)
-syscall.sigaction32(name:string,sig:long,act_uaddr:long,oact_uaddr:long,argstr:string)
-syscall.sigaltstack(name:string,uss_uaddr:long,uoss_uaddr:long,regs_uaddr:long,argstr:string)
-syscall.signal(name:string,sig:long,handler:long,argstr:string)
-syscall.signalfd(name:string,argstr:string)
-syscall.sigpending(name:string,argstr:string)
-syscall.sigprocmask(name:string,how:long,how_str:string,set_uaddr:long,oldset_uaddr:long,argstr:string)
-syscall.sigreturn(name:string,argstr:string)
-syscall.sigsuspend(name:string,argstr:string)
-syscall.socket(name:string,family:long,type:long,protocol:long,argstr:string)
-syscall.socketpair(name:string,family:long,type:long,protocol:long,sv_uaddr:long,argstr:string)
-syscall.splice(name:string,argstr:string)
-syscall.ssetmask(name:string,newmask:long,argstr:string)
-syscall.stat(name:string,filename_uaddr:long,filename:string,buf_uaddr:long,argstr:string)
-syscall.statfs(name:string,buf_uaddr:long,path:string,argstr:string)
-syscall.statfs64(name:string,sz:long,buf_uaddr:long,path:string,argstr:string)
-syscall.stime(name:string,t_uaddr:long,argstr:string)
-syscall.swapoff(name:string,path:string,argstr:string)
-syscall.swapon(name:string,path:string,swapflags:long,argstr:string)
-syscall.symlink(name:string,oldpath:string,newpath:string,argstr:string)
-syscall.symlinkat(name:string,oldname:long,oldname_str:string,newdfd:long,newdfd_str:string,newname:long,newname_str:string,argstr:string)
-syscall.sync(name:string,argstr:string)
-syscall.sysctl(name:string,argstr:string)
-syscall.sysctl32(name:string,argstr:string)
-syscall.sysfs(name:string,option:long,arg1:long,arg2:long,argstr:string)
-syscall.sysinfo(name:string,info_uaddr:long,argstr:string)
-syscall.syslog(name:string,type:long,bufp_uaddr:long,len:long,argstr:string)
-syscall.tee(name:string,argstr:string)
-syscall.tgkill(name:string,tgid:long,pid:long,sig:long,argstr:string)
-syscall.time(name:string,t_uaddr:long,argstr:string)
-syscall.timer_create(name:string,clockid:long,clockid_str:string,evp_uaddr:long,timerid_uaddr:long,argstr:string)
-syscall.timer_delete(name:string,timerid:long,argstr:string)
-syscall.timer_getoverrun(name:string,timerid:long,argstr:string)
-syscall.timer_gettime(name:string,timerid:long,value_uaddr:long,argstr:string)
-syscall.timer_settime(name:string,timerid:long,flags:long,value_uaddr:long,ovalue_uaddr:long,argstr:string)
-syscall.times(name:string,argstr:string)
-syscall.tkill(name:string,pid:long,sig:long,argstr:string)
-syscall.truncate(name:string,path_uaddr:long,path:string,length:long,argstr:string)
-syscall.umask(name:string,mask:long,argstr:string)
-syscall.umount(name:string,target:string,flags:long,flags_str:string,argstr:string)
-syscall.uname(name:string,argstr:string)
-syscall.unlink(name:string,pathname_uaddr:long,pathname:string,argstr:string)
-syscall.unlinkat(name:string,dfd:long,dfd_str:string,pathname:long,pathname_str:string,flag:long,flag_str:string,argstr:string)
-syscall.unshare(name:string,unshare_flags:long,argstr:string)
-syscall.uselib(name:string,library_uaddr:long,library:string,argstr:string)
-syscall.ustat(name:string,dev:long,ubuf_uaddr:long,argstr:string)
-syscall.ustat32(name:string,dev:long,argstr:string)
-syscall.utime(name:string,filename_uaddr:long,filename:string,buf_uaddr:long,actime:long,modtime:long,argstr:string)
-syscall.utimensat(name:string,argstr:string)
-syscall.utimes(name:string,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
-syscall.vhangup(name:string,argstr:string)
-syscall.vm86_warning(name:string)
-syscall.vmsplice(name:string,argstr:string)
-syscall.wait4(name:string,pid:long,status_uaddr:long,options:long,options_str:string,rusage_uaddr:long,argstr:string)
-syscall.waitid(name:string,pid:long,which:long,which_str:string,infop_uaddr:long,options:long,options_str:string,rusage_uaddr:long,argstr:string)
-syscall.write(name:string,fd:long,buf_uaddr:long,count:long,argstr:string)
-syscall.writev(name:string,vector_uaddr:long,count:long,fd:long,argstr:string)
-signal.check_ignored(sig_pid:long,pid_name:string,sig:long,sig_name:string)
-signal.checkperm(sig:long,task:long,sinfo:long,name:string,sig_name:string,sig_pid:long,pid_name:string,si_code:string)
-signal.do_action(sig:long,sigact_addr:long,oldsigact_addr:long,sa_handler:long,sa_mask:long)
-signal.flush(task:long,sig_pid:long,pid_name:string)
-signal.force_segv(sig_pid:long,pid_name:string,sig:long,sig_name:string)
-signal.handle(sig:unknown,sig_name:string,sinfo:long,sig_code:long,ka_addr:unknown,oldset_addr:unknown,regs:unknown,sig_mode:string)
-signal.pending(sigset_add:long,sigset_size:long)
-signal.procmask(how:long,sigset_addr:long,oldsigset_addr:long,sigset:long)
-signal.send(name:string,sig:long,task:long,sinfo:long,shared:long,send2queue:long,sig_name:string,sig_pid:long,pid_name:string,si_code:string)
-signal.send_sig_queue(sig:long,sig_name:string,sig_pid:long,pid_name:string,sigqueue_addr:long)
-signal.syskill(name:string,pid:long,sig:long,argstr:string,sig_name:string)
-signal.systgkill(name:string,tgid:long,pid:long,sig:long,argstr:string,sig_name:string)
-signal.systkill(name:string,pid:long,sig:long,argstr:string,sig_name:string)
-signal.wakeup(sig_pid:long,pid_name:string,resume:long,state_mask:string)
-begin(-1))
-netdev.receive(dev_name:string,length:long,protocol:long,truesize:long)
-netdev.transmit(dev_name:string,length:long,protocol:long,truesize:long)
-ioblock.end(devname:string,ino:long,bytes_done:long,error:long,sector:long,flags:long,rw:long,vcnt:long,idx:long,phys_segments:long,hw_segments:long,size:long)
-ioblock.request(devname:string,ino:long,sector:long,flags:long,rw:long,vcnt:long,idx:long,phys_segments:long,hw_segments:long,size:long,bdev:long,bdev_contains:long,p_start_sect:long)
-ioscheduler.elv_add_request(elevator_name:string,disk_major:long,disk_minor:long,req:long,req_flags:long)
-ioscheduler.elv_completed_request(elevator_name:string,disk_major:long,disk_minor:long,req:long,req_flags:long)
-ioscheduler.elv_next_request(elevator_name:string)
-nd_syscall.accept(name:string,sockfd:long,addr_uaddr:long,addrlen_uaddr:long,argstr:string)
-nd_syscall.access(name:string,pathname:string,mode:long,mode_str:string,argstr:string)
-nd_syscall.acct(name:string,filename:string,argstr:string)
-nd_syscall.add_key(name:string,type_uaddr:long,description_uaddr:long,payload_uaddr:long,plen:long,ringid:long,argstr:string)
-nd_syscall.adjtimex(name:string,argstr:string)
-nd_syscall.alarm(name:string,seconds:long,argstr:string)
-nd_syscall.bdflush(name:string,func:long,data:long,data_str:string,argstr:string)
-nd_syscall.bind(name:string,sockfd:long,my_addr_uaddr:long,addrlen:long,argstr:string)
-nd_syscall.brk(name:string,brk:long,argstr:string)
-nd_syscall.capget(name:string,header_uaddr:long,data_uaddr:long,argstr:string)
-nd_syscall.capset(name:string,header_uaddr:long,data_uaddr:long,argstr:string)
-nd_syscall.chdir(name:string,path:string,argstr:string)
-nd_syscall.chmod(name:string,path:string,mode:long,argstr:string)
-nd_syscall.chown(name:string,path:string,owner:long,group:long,argstr:string)
-nd_syscall.chown16(name:string,path:string,owner:long,group:long,argstr:string)
-nd_syscall.chroot(name:string,path:string,argstr:string)
-nd_syscall.clock_getres(name:string,clk_id:long,clk_id_str:string,res_uaddr:long,argstr:string)
-nd_syscall.clock_gettime(name:string,clk_id:long,clk_id_str:string,argstr:string)
-nd_syscall.clock_nanosleep(name:string,flags:long,flag_str:string,argstr:string)
-nd_syscall.clock_settime(name:string,clk_id:long,clk_id_str:string,tp_uaddr:long,argstr:string)
-nd_syscall.close(name:string,fd:long,argstr:string)
-nd_syscall.compat_adjtimex(name:string,argstr:string)
-nd_syscall.compat_clock_nanosleep(name:string,flags:long,flag_str:string,argstr:string)
-nd_syscall.compat_execve(name:string,filename:string,args:string,argstr:string)
-nd_syscall.compat_futex(name:string,futex_uaddr:long,op:long,val:long,utime_uaddr:long,uaddr2_uaddr:long,val3:long,argstr:string)
-nd_syscall.compat_futimesat(name:string,dirfd:long,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
-nd_syscall.compat_getitimer(name:string,which:long,value_uaddr:long,argstr:string)
-nd_syscall.compat_io_setup(name:string,maxevents:long,ctxp_uaddr:long,argstr:string)
-nd_syscall.compat_io_submit(name:string,ctx_id:long,nr:long,iocbpp_uaddr:long,argstr:string)
-nd_syscall.compat_sys_msgctl(name:string,argstr:string)
-nd_syscall.compat_sys_msgrcv(name:string,argstr:string)
-nd_syscall.compat_sys_msgsnd(name:string,argstr:string)
-nd_syscall.connect(name:string,sockfd:long,serv_addr_uaddr:long,addrlen:long,argstr:string)
-nd_syscall.creat(name:string,mode:long,pathname:string,argstr:string)
-nd_syscall.delete_module(name:string,name_user:string,flags:long,argstr:string)
-nd_syscall.dup(name:string,old_fd:long,argstr:string)
-nd_syscall.dup2(name:string,oldfd:long,newfd:long,argstr:string)
-nd_syscall.epoll_create(name:string,size:long,argstr:string)
-nd_syscall.epoll_ctl(name:string,epfd:long,op:long,op_str:string,fd:long,event_uaddr:long,argstr:string)
-nd_syscall.epoll_pwait(name:string,argstr:string)
-nd_syscall.epoll_wait(name:string,epfd:long,events_uaddr:long,maxevents:long,timeout:long,argstr:string)
-nd_syscall.eventfd(name:string,argstr:string)
-nd_syscall.execve(name:string,filename:string,args:string,argstr:string)
-nd_syscall.exit(name:string,status:long,argstr:string)
-nd_syscall.exit_group(name:string,status:long,argstr:string)
-nd_syscall.fadvise64(name:string,fs:long,offset:long,len:long,advice:long,argstr:string)
-nd_syscall.fadvise64_64(name:string,fs:long,offset:long,len:long,advice:long,argstr:string)
-nd_syscall.fchdir(name:string,fd:long,argstr:string)
-nd_syscall.fchmod(name:string,fildes:long,mode:long,argstr:string)
-nd_syscall.fchown(name:string,fd:long,owner:long,group:long,argstr:string)
-nd_syscall.fchown16(name:string,fd:long,owner:long,group:long,argstr:string)
-nd_syscall.fcntl(name:string,fd:long,cmd:long,cmd_str:string,arg:long,argstr:string)
-nd_syscall.fdatasync(name:string,fd:long,argstr:string)
-nd_syscall.fgetxattr(name:string,filedes:long,name2:string,value_uaddr:long,size:long,argstr:string)
-nd_syscall.flistxattr(name:string,filedes:long,list_uaddr:long,size:long,argstr:string)
-nd_syscall.flock(name:string,fd:long,operation:long,argstr:string)
-nd_syscall.fork(clone_flags:long,stack_start:long,regs:long,stack_size:long,parent_tid_uaddr:long,child_tid_uaddr:long,name:string,argstr:string)
-nd_syscall.fremovexattr(name:string,filedes:long,name_uaddr:long,argstr:string)
-nd_syscall.fsetxattr(name:string,filedes:long,name2:string,value_uaddr:long,size:long,flags:long,argstr:string)
-nd_syscall.fstat(name:string,filedes:long,buf_uaddr:long,argstr:string)
-nd_syscall.fstatat(name:string,dirfd:long,path:string,buf_uaddr:long,argstr:string)
-nd_syscall.fstatfs(name:string,fd:long,buf_uaddr:long,argstr:string)
-nd_syscall.fstatfs64(name:string,fd:long,sz:long,buf_uaddr:long,argstr:string)
-nd_syscall.fsync(name:string,fd:long,argstr:string)
-nd_syscall.ftruncate(name:string,fd:long,length:long,argstr:string)
-nd_syscall.futex(name:string,futex_uaddr:long,op:long,val:long,utime_uaddr:long,uaddr2_uaddr:long,val3:long,argstr:string)
-nd_syscall.futimesat(name:string,dirfd:long,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
-nd_syscall.get_mempolicy(name:string,policy_uaddr:long,nmask_uaddr:long,maxnode:long,addr:long,flags:long,argstr:string)
-nd_syscall.getcwd(name:string,buf_uaddr:long,size:long,argstr:string)
-nd_syscall.getdents(name:string,fd:long,dirp_uaddr:long,count:long,argstr:string)
-nd_syscall.getegid(name:string,argstr:string)
-nd_syscall.geteuid(name:string,argstr:string)
-nd_syscall.getgid(name:string,argstr:string)
-nd_syscall.getgroups(name:string,size:long,list_uaddr:long,argstr:string)
-nd_syscall.gethostname(name:string,name_uaddr:long,len:long,argstr:string)
-nd_syscall.getitimer(name:string,which:long,value_uaddr:long,argstr:string)
-nd_syscall.getpeername(name:string,s:long,name_uaddr:long,namelen_uaddr:long,argstr:string)
-nd_syscall.getpgid(name:string,pid:long,argstr:string)
-nd_syscall.getpgrp(name:string,argstr:string)
-nd_syscall.getpid(name:string,argstr:string)
-nd_syscall.getppid(name:string,argstr:string)
-nd_syscall.getpriority(name:string,which:long,who:long,argstr:string)
-nd_syscall.getresgid(name:string,rgid_uaddr:long,egid_uaddr:long,sgid_uaddr:long,argstr:string)
-nd_syscall.getresuid(name:string,ruid_uaddr:long,euid_uaddr:long,suid_uaddr:long,argstr:string)
-nd_syscall.getrlimit(name:string,resource:long,rlim_uaddr:long,argstr:string)
-nd_syscall.getrusage(name:string,who:long,who_str:string,usage_uaddr:long,argstr:string)
-nd_syscall.getsid(name:string,pid:long,argstr:string)
-nd_syscall.getsockname(name:string,s:long,name_uaddr:long,namelen_uaddr:long,argstr:string)
-nd_syscall.getsockopt(name:string,fd:long,level:long,level_str:string,optname:long,optname_str:string,optval_uaddr:long,optlen_uaddr:long,argstr:string)
-nd_syscall.gettid(name:string,argstr:string)
-nd_syscall.gettimeofday(name:string,tv_uaddr:long,tz_uaddr:long,argstr:string)
-nd_syscall.getuid(name:string,argstr:string)
-nd_syscall.getxattr(name:string,path:string,name2:string,value_uaddr:long,size:long,argstr:string)
-nd_syscall.init_module(name:string,umod_uaddr:long,len:long,uargs:string,argstr:string)
-nd_syscall.inotify_add_watch(name:string,fd:long,path_uaddr:long,path:string,mask:long,argstr:string)
-nd_syscall.inotify_init(name:string,argstr:string)
-nd_syscall.inotify_rm_watch(name:string,fd:long,wd:long,argstr:string)
-nd_syscall.io_cancel(name:string,ctx_id:long,iocb_uaddr:long,result_uaddr:long,argstr:string)
-nd_syscall.io_destroy(name:string,ctx:long,argstr:string)
-nd_syscall.io_getevents(name:string,ctx_id:long,min_nr:long,nr:long,events_uaddr:long,timeout_uaddr:long,timestr:string,argstr:string)
-nd_syscall.io_setup(name:string,maxevents:long,ctxp_uaddr:long,argstr:string)
-nd_syscall.io_submit(name:string,ctx_id:long,nr:long,iocbpp_uaddr:long,argstr:string)
-nd_syscall.ioctl(name:string,fd:long,request:long,argp:long,argstr:string)
-nd_syscall.ioperm(name:string,from:long,num:long,turn_on:long,argstr:string)
-nd_syscall.ioprio_get(name:string,which:long,who:long,argstr:string)
-nd_syscall.ioprio_set(name:string,which:long,who:long,ioprio:long,argstr:string)
-nd_syscall.kexec_load(name:string,entry:long,nr_segments:long,segments_uaddr:long,flags:long,argstr:string)
-nd_syscall.keyctl(name:string,argstr:string)
-nd_syscall.kill(name:string,pid:long,sig:long,argstr:string)
-nd_syscall.lchown(name:string,path:string,owner:long,group:long,argstr:string)
-nd_syscall.lchown16(name:string,path:string,owner:long,group:long,argstr:string)
-nd_syscall.lgetxattr(name:string,path:string,name2:string,value_uaddr:long,size:long,argstr:string)
-nd_syscall.link(name:string,oldpath:string,newpath:string,argstr:string)
-nd_syscall.listen(name:string,sockfd:long,backlog:long,argstr:string)
-nd_syscall.listxattr(name:string,path_uaddr:long,path:string,list_uaddr:long,size:long,argstr:string)
-nd_syscall.llistxattr(name:string,path_uaddr:long,path:string,list_uaddr:long,size:long,argstr:string)
-nd_syscall.llseek(name:string,fd:long,offset_high:long,offset_low:long,result_uaddr:long,whence:long,whence_str:string,argstr:string)
-nd_syscall.lookup_dcookie(name:string,cookie:long,buffer_uaddr:long,len:long,argstr:string)
-nd_syscall.lremovexattr(name:string,path_uaddr:long,path:string,name_uaddr:long,name2:string,argstr:string)
-nd_syscall.lseek(name:string,fildes:long,offset:long,whence:long,whence_str:string,argstr:string)
-nd_syscall.lsetxattr(name:string,path_uaddr:long,path:string,name_uaddr:long,name_str:string,value_uaddr:long,size:long,flags:long,argstr:string)
-nd_syscall.lstat(name:string,path:string,buf_uaddr:long,argstr:string)
-nd_syscall.madvise(name:string,start:long,length:long,advice:long,advice_str:string,argstr:string)
-nd_syscall.mbind(name:string,start:long,len:long,mode:long,nmask_uaddr:long,maxnode:long,flags:long,argstr:string)
-nd_syscall.migrate_pages(name:string,argstr:string)
-nd_syscall.mincore(name:string,start:long,length:long,vec_uaddr:long,argstr:string)
-nd_syscall.mkdir(name:string,pathname_uaddr:long,pathname:string,mode:long,argstr:string)
-nd_syscall.mkdirat(name:string,dirfd:long,pathname:string,mode:long,argstr:string)
-nd_syscall.mknod(name:string,pathname:string,mode:long,dev:long,argstr:string)
-nd_syscall.mlock(name:string,addr:long,len:long,argstr:string)
-nd_syscall.mlockall(name:string,flags:long,argstr:string)
-nd_syscall.modify_ldt(name:string,func:long,ptr_uaddr:long,bytecount:long,argstr:string)
-nd_syscall.mount(name:string,source:string,target:string,filesystemtype:string,mountflags:long,mountflags_str:string,data:string,argstr:string)
-nd_syscall.move_pages(name:string,argstr:string)
-nd_syscall.mprotect(name:string,addr:long,len:long,prot:long,prot_str:string,argstr:string)
-nd_syscall.mq_getsetattr(name:string,mqdes:long,u_mqstat_uaddr:long,u_omqstat_uaddr:long,argstr:string)
-nd_syscall.mq_notify(name:string,mqdes:long,notification_uaddr:long,argstr:string)
-nd_syscall.mq_open(name:string,name_uaddr:long,filename:string,mode:long,u_attr_uaddr:long,oflag:long,argstr:string)
-nd_syscall.mq_timedreceive(name:string,mqdes:long,msg_ptr_uaddr:long,msg_len:long,msg_prio_uaddr:long,abs_timout_uaddr:long,argstr:string)
-nd_syscall.mq_timedsend(name:string,mqdes:long,msg_ptr_uaddr:long,msg_len:long,msg_prio:long,abs_timeout_uaddr:long,argstr:string)
-nd_syscall.mq_unlink(name:string,u_name_uaddr:long,u_name:string,argstr:string)
-nd_syscall.mremap(name:string,old_address:long,old_size:long,new_size:long,flags:long,new_address:long,argstr:string)
-nd_syscall.msgctl(name:string,msqid:long,cmd:long,buf_uaddr:long,argstr:string)
-nd_syscall.msgget(name:string,key:long,msgflg:long,msgflg_str:string,argstr:string)
-nd_syscall.msgrcv(name:string,msqid:long,msgp_uaddr:long,msgsz:long,msgtyp:long,msgflg:long,argstr:string)
-nd_syscall.msgsnd(name:string,msqid:long,msgp_uaddr:long,msgsz:long,msgflg:long,argstr:string)
-nd_syscall.msync(name:string,start:long,length:long,flags:long,argstr:string)
-nd_syscall.munlock(name:string,addr:long,len:long,argstr:string)
-nd_syscall.munlockall(name:string,argstr:string)
-nd_syscall.munmap(name:string,start:long,length:long,argstr:string)
-vm.brk(address:long,length:long)
-vm.mmap(address:unknown,length:unknown)
-vm.munmap(address:long,length:long)
-vm.oom_kill(task:long)
-vm.pagefault(write_access:long,address:long)
-vm.write_shared(address:long)
-nfsd.close(filename:string,name:string,argstr:string)
-nfsd.commit(fh:string,count:long,offset:long,flag:long,name:string,argstr:string,size:long,units:string)
-nfsd.create(fh:string,filelen:long,filename:string,type:long,iap_valid:long,iap_mode:long,name:string,argstr:string)
-nfsd.createv3(fh:string,filelen:long,filename:string,iap_valid:long,iap_mode:long,truncp:long,verfier:long,createmode:long,name:string,argstr:string)
-nfsd.dispatch(client_ip:long,proto:long,version:long,xid:long,prog:long,proc:long,name:string,argstr:string)
-nfsd.entries(fh:string,access:long,type:long,name:string,argstr:string)
-nfsd.lookup(fh:string,filelen:long,filename:string,name:string,argstr:string)
-nfsd.open(fh:string,access:long,type:long,name:string,argstr:string)
-nfsd.read(fh:string,file:long,count:long,offset:long,vec:long,vlen:long,name:string,argstr:string,size:long,units:string)
-nfsd.rename(fh:string,tfh:string,filelen:long,filename:string,tlen:long,tname:string,name:string,argstr:string)
-nfsd.return(name:string,retstr:string)
-nfsd.unlink(fh:string,filelen:long,filename:string,type:long,name:string,argstr:string)
-nfsd.write(fh:string,file:long,count:long,offset:long,vec:long,vlen:long,name:string,argstr:string,size:long,units:string)
-process.begin)
-process.create(task:long,new_pid:long)
-process.end)
-process.exec(filename:string)
-process.exec_complete(errno:long,success:long)
-process.exit(code:long)
-process.release(task:long,pid:long)
-process.start)
-process.syscall)
-sunrpc.entry(name:string,progname:string,prog:long,vers:long,authflavor:long,servername:string,prot:long,port:long,argstr:string)
-sunrpc.return(name:string,retstr:string)
-scheduler.balance)
-scheduler.cpu_off(task_prev:unknown,task_next:unknown,idle:long)
-scheduler.cpu_on(task_prev:long,idle:long)
-scheduler.ctxswitch(prev_pid:unknown,next_pid:unknown,prev_task:unknown,next_task:unknown,prevtsk_state:unknown)
-scheduler.migrate(task:long,cpu_from:long,cpu_to:long)
-scheduler.tick(idle:long)
-scsi.iocompleted(host_no:long,channel:long,lun:long,dev_id:long,device_state:long,data_direction:long,req_addr:long,goodbytes:long)
-scsi.iodispatching(host_no:long,channel:long,lun:long,dev_id:long,device_state:long,data_direction:long,request_buffer:long,request_bufflen:long,req_addr:long)
-scsi.iodone(host_no:long,channel:long,lun:long,dev_id:long,device_state:long,data_direction:long,req_addr:long,scsi_timer_pending:long)
-scsi.ioentry(disk_major:long,disk_minor:long,device_state:long,req_addr:long)
-socket.aio_read(name:string,_sock:long,size:long,protocol:long,family:long,state:long,flags:long,type:long)
-socket.aio_write(name:string,_sock:long,size:long,protocol:long,family:long,state:long,flags:long,type:long)
-socket.close(name:string,protocol:long,family:long,state:long,flags:long,type:long)
-socket.create(name:string,protocol:long,family:long,type:long,requester:long)
-socket.receive(_dwarf_tvar_tid:long,_dwarf_tvar_sock_16_tmp:long,_dwarf_tvar_sock_17_tmp:long,_dwarf_tvar_sock_18_tmp:long,_dwarf_tvar_sock_19_tmp:long,_dwarf_tvar_sock_20_tmp:long,name:string,size:long,protocol:long,family:long,state:long,flags:long,type:long,success:long)
-socket.recvmsg(name:string,size:long,protocol:long,family:long,state:long,flags:long,type:long)
-socket.send(_dwarf_tvar_tid:long,_dwarf_tvar_sock_32_tmp:long,_dwarf_tvar_sock_33_tmp:long,_dwarf_tvar_sock_34_tmp:long,_dwarf_tvar_sock_35_tmp:long,_dwarf_tvar_sock_36_tmp:long,name:string,size:long,protocol:long,family:long,state:long,flags:long,type:long,success:long)
-socket.sendmsg(name:string,size:long,protocol:long,family:long,state:long,flags:long,type:long)
-kernel.function("sock_recvmsg@net/socket.c:649")(_dwarf_tvar_tid:long)
-kernel.function("sock_aio_read@net/socket.c:750")(_dwarf_tvar_tid:long)
-kernel.function("sock_sendmsg@net/socket.c:566")(_dwarf_tvar_tid:long)
-kernel.function("sock_aio_write@net/socket.c:792")(_dwarf_tvar_tid:long)
-begin(-1001)(num:long)
-end(idx0:string)
-tcp.disconnect(name:string,sock:long,flags:long)
-tcp.recvmsg(name:string,sock:long,size:long)
-tcp.sendmsg(name:string,sock:long,size:long)
-tcp.setsockopt(name:string,sock:long,level:long,optname:long,optstr:string,optlen:long)
-udp.disconnect(name:string,sock:long,flags:long)
-udp.recvmsg(name:string,sock:long,size:long)
-udp.sendmsg(name:string,sock:long,size:long)
-generic.fop.aio_read(file:long,dev:long,devname:string,ino:long,pos:long,count:long,buf:long,name:string,argstr:string,size:long,units:string)
-generic.fop.aio_write(file:long,dev:long,devname:string,ino:long,pos:long,count:long,buf:long,name:string,argstr:string,size:long,units:string)
-generic.fop.llseek(dev:long,devname:string,ino:long,file:long,offset:long,origin:long,maxbyte:long,name:string,argstr:string)
-generic.fop.mmap(file:long,dev:long,devname:string,ino:long,vm_start:long,vm_end:long,vm_flags:long,name:string,argstr:string)
-generic.fop.open(dev:long,devname:string,ino:long,filename:string,flag:long,size:long,name:string,argstr:string)
-generic.fop.splice_read(dev:long,devname:string,ino:long,file:long,len:long,flags:long,name:string,argstr:string,size:long,units:string)
-generic.fop.splice_write(dev:long,devname:string,ino:long,file:long,len:long,flags:long,name:string,argstr:string,size:long,units:string)
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/concepts.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/concepts.html
deleted file mode 100644
index fbd0152454..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/concepts.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<a href="../toc.html">Table of Contents</a>
-
-<h2>
-Concepts
-</h2>
-
-This section of the IDE User Guide covers conceptual topics of the application; the major
-components, what they do, and how how you interact with them.
-
-<ol>
-<li><a href="systemtapPerspectives.html">SystemTap Perspectives</a></li>
-<li><a href="stpEditor.html">STP Editor</a></li>
-<li><a href="functionBrowser.html">Function Browser</a></li>
-<li><a href="kernelBrowser.html">Kernel Browser</a></li>
-<li><a href="probeAliasBrowser.html">Probe Alias Browser</a></li>
-</ol> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/functionBrowser.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/functionBrowser.html
deleted file mode 100644
index d71d2c99fe..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/functionBrowser.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="concepts.html">Concepts</a>
-
-<h2>
-Function Browser
-</h2>
-
-The Funtion Browser lists all of the functions that are defined in the tapset library. Functions are grouped by the file that they are defined. Each listed function has an icon that corrisponds to its return type.
-
-<ul>
-<li><img src="images/var_str.gif"> String</li>
-<li><img src="images/var_long.gif"> Long</li>
-<li><img src="images/var_void.gif"> Void</li>
-</ul>
-
-If you double click on any function a call to that function will be added to the active editor at the current cursor location. Also if you right click on a function and click "View Definition" the tapset file where the function is defined will be opened.<br><br>
-
-<br><img src="images/Function.png"><br><br> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/Editor.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/Editor.png
deleted file mode 100644
index 1c04a068f5..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/Editor.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/Function.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/Function.png
deleted file mode 100644
index a4b6cf3409..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/Function.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/KernelSource.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/KernelSource.png
deleted file mode 100644
index 4fe0917b55..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/KernelSource.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/ProbeAlias.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/ProbeAlias.png
deleted file mode 100644
index 5aa3836dbb..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/ProbeAlias.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_long.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_long.gif
deleted file mode 100644
index 678467f2d8..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_long.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_str.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_str.gif
deleted file mode 100644
index 4f4907c3d6..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_str.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_unk.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_unk.gif
deleted file mode 100644
index 10abf0dfad..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_unk.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_void.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_void.gif
deleted file mode 100644
index c804bbb947..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_void.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/kernelBrowser.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/kernelBrowser.html
deleted file mode 100644
index 5153a016f0..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/kernelBrowser.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="concepts.html">Concepts</a>
-
-<h2>
-Kernel Source Browser
-</h2>
-
-The Kernel Source Browser is used to display the kernel tree. This provides you with a quick way to locate places to add probes. Any file in the Kernel Source tree can be opened by double clicking on it. This will open up the selected file in the Editor view. You can then double click on the ruler next to any line that you wish to probe. If SystemTap can probe that line a probe point will be inserted at the end of the script you were most recently working on. If the line can't be probed, an error message will be displayed.<br><br>
-
-<br><img src="images/KernelSource.png"><br><br> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/probeAliasBrowser.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/probeAliasBrowser.html
deleted file mode 100644
index 34dd752fa5..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/probeAliasBrowser.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="concepts.html">Concepts</a>
-
-<h2>
-Probe Alias Browser
-</h2>
-
-The Probe Alias Browser lists all of the probe aliases that are defined in the tapset library. Probes are grouped based on their type. In addition to the list of probes, each probe lists all of the variables that it has access to. Each variable is listed with an icon that represents its type. Types are as follows:
-
-<ul>
-<li><img src="images/var_str.gif"> String</li>
-<li><img src="images/var_long.gif"> Long</li>
-<li><img src="images/var_unk.gif"> Unknown</li>
-</ul>
-
-If you double click on any probe alias, probe point will be added to the end of the active editor. Also if you right click on a probe and click "View Definition" the tapset file where the probe is defined will be opened.<br><br>
-
-<br><img src="images/ProbeAlias.png"><br><br>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/stpEditor.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/stpEditor.html
deleted file mode 100644
index 5d61d56dd9..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/stpEditor.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="concepts.html">Concepts</a>
-
-<h2>
-STP Editor
-</h2>
-
-This editor is the most commonly used; it is used for the authoring and editing of Systemtap scripts. It is invoked when the user starts a new file or opens a file with the .stp extension. It provides syntax highlighting, code completion, and run support.<br><br>
-
-<img src="images/Editor.png"><br><br>
-
-
-See also: <a href="../reference/menus.html">IDE Perspective Menus</a>,
-<a href="../reference/exampleScripts.html">Example Scripts</a>, <a href="../reference/toolbars.html">Toolbars</a>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/systemtapPerspectives.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/systemtapPerspectives.html
deleted file mode 100644
index dedb6ff80f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/systemtapPerspectives.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="concepts.html">Concepts</a>
-
-<h2>
-SystemTap Perspectives
-</h2>
-
-SystemTap has three perspectives built into it, each with its own purpose.
-
-<ol>
-<li><img src="../reference/images/toolbars/ide.png"> <b>IDE Perspective</b> - This will be the primary perspective for SystemTap script writers. It contains
-the <a href="stpEditor.html">editor</a>, <a href="functionBrowser.html">Function Browser</a>,
-<a href="kernelBrowser.html">Kernel Browser</a>, <a href="probeAliasBrowser.html">Probe Alias Browser</a>,
-and <a href="../reference/viewsAndEditors.html#console">console/error log</a>. The IDE Perspective contains
-the features necessary to <a href="">run SystemTap scripts</a> and the syntax highlighting and code
-completion features to facilitate efficient development.</li>
-<li><img src="../reference/images/toolbars/graphing.png"> <b>Graphing Perspective</b> - This perspective is invoked when the user calls the Run /w Chart option.
-It defaults to showing a data table containing the script results and is capable of producing six different
-chart types: Line Graph, Multi-Line Graph, Bar Graph, Multi-Bar Graph, Scatter Graph, and Multi-Scatter
-Graph.</li>
-<li><img src="../reference/images/toolbars/dash.png"><b>Dashboard Perspective</b> - This perspective will be capable of storing meta-data related to
-each graph such as filters, aggregates, and display options in addition to showing a "dashboard" interface
-with multiple graphs updating simultaneously. It is currently still under development.</li>
-</ol> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial.html
deleted file mode 100644
index f3995f196c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="gettingStarted.html">Getting Started</a>
-
-<h2>
-IDE Tutorial
-</h2>
-
-The IDE Perspective is a powerful portion of the SystemTap GUI that focuses on writing and editing
-SystemTap scripts. This tutorial consists of three lessons to guide first users through writing and
-running scripts and to illustrate features along the way.<br><br>
-
-<a href="IDETutorial/lesson1.html">Lesson 1: Getting Started</a><br><br>
-
-<a href="IDETutorial/lesson2.html">Lesson 2: Writing Your First Script</a><br><br>
-
-<a href="IDETutorial/lesson3.html">Lesson 3: Running Your Script</a><br><br> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/chartbox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/chartbox1.png
deleted file mode 100644
index 0008258b2b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/chartbox1.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/editor.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/editor.png
deleted file mode 100644
index 5103ada3a4..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/editor.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/graph.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/graph.png
deleted file mode 100644
index 4b1b57f3e0..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/graph.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/graphics.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/graphics.png
deleted file mode 100644
index 91034b6395..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/graphics.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/newfile.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/newfile.png
deleted file mode 100644
index 9b23dec081..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/newfile.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/output.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/output.png
deleted file mode 100644
index 7a869a4c47..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/output.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/lesson1.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/lesson1.html
deleted file mode 100644
index e5b204bbae..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/lesson1.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<a href="../../toc.html">Table of Contents</a> > <a href="../gettingStarted.html">Getting Started</a> > <a href="../IDETutorial.html">IDE Tutorial</a>
-
-<h2>
-IDE Tutorial, Lesson One: Getting Started
-</h2>
-
-In this tutorial we will orient you with IDE Perspective and its functions. At this point we assume
-that you are able to run Systemtap GUI and are unfamiliar with how to procede. If you cannot yet start
-the application, please refer to our <a href="../installation.html">section on installation</a>.
-<b>NOTE:</b> If this is the first time opening the IDE Perspective it will take a while to load as it has to
-parse everything in the tapsets. <br><br>
-
-The IDE Perspective's purpose is to allow the user to create, view, and edit Systemtap scripts. There are
-other editors built in (plain text and the C editor), however, they ultimately exist to facilitate the
-writing of Systemtap scripts.<br><br>
-
-In this lesson we will open a new Systemtap script file to familiarize ourselves with the IDE Perspective.
-Start by opening the <u>F</u>ile menu and selecting <u>O</u>pen. A dialogue box will pop up and request the
-location of the file you want to open. We've included a folder called "examples" right in the tar ball. You
-may chose any of them to use; in this tutorial we will open top.stp. Go ahead and open the file.
-
-<br><br><img src="images/editor.png"><br><br>
-
-You'll see the file is loaded into the editor pane of Systemtap GUI. You'll also noticed different colored
-text. Systemtap GUI supports syntax highlighting for the ease of the writer. Feel free to edit the file.<br><br>
-
-At this point proceed to <a href="lesson2.html">Lesson 2</a> if you wish to learn how to write your
-own script file or <a href="lesson3.html">Lesson 3</a> if you wish to run this one.<br><br>
-
-<a href="../IDETutorial.html>Back to Tutorial Contents</a> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/lesson2.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/lesson2.html
deleted file mode 100644
index deea0b8561..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/lesson2.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<a href="../../toc.html">Table of Contents</a> > <a href="../gettingStarted.html">Getting Started</a> > <a href="../IDETutorial.html">IDE Tutorial</a>
-
-<h2>
-IDE Tutorial, Lesson Two: Writing Your First Script
-</h2>
-
-In this tutorial we will guide you through the process of writing your first Systemtap script. It is
-strongly recommended that you review the <a href="http://sourceware.org/systemtap/tutorial/">
-Systemtap website's tutorial</a> for up-to-date information on the latest version of Systemtap.<br><br>
-
-Start by selecting <u>F</u>ile-><u>N</u>ew. Specify a file name of your choosing, but be sure that it
-ends with an .stp extension. Click ok. Your blank script should be present in the editor pane.<br><br>
-
-<img src="images/newfile.png"><br><br>
-
-<pre>Now type/copy the following:
-
-<code>
- global read, write, start
-
- probe begin {
- start = gettimeofday_s()
- }
- probe syscall.write {
- write += count
- }
-
- probe timer.ms(1000) {
- printf("%d\t%d\t%d\n", (gettimeofday_s()-start), read, write)
- read=0
- write=0
- }
-</code></pre>
-
-Now to demonstrate the functionality of the Probe Alias browser we will have you complete the read probe
-yourself. Start by opening the syscall folder in the Probe Alias browser. If you do not have any content
-in the browser you are experiencing a problem with Systemtap installation and should refer to our
-<a href="./installation.html">installation help</a>. Ensure your cursor is located at the end of the file.
-Now scroll down and double click the read probe alias. Systemtap GUI will insert the skeleton probe at the
-point at which your cursor is at, and should look similar to the following:
-
-<pre><code>
-probe syscall.read
-{
- /*
- * available variables on this probe:
- * argstr, buf_uaddr, count, fd, name
- */
-
-}
-</code></pre>
-
-Now insert the following line into the syscall.read probe:<br>
-
-<pre><code>read += count</code></pre>
-
-You may remove the comment (/* ... */) if you wish.<br><br>
-
-This will count the number of bytes read and written each second and print it out. The begin probe executes
-first, by getting the time of day. The read and write probes increment each time the function is called. The
-timer probe prints the information every second. If you typed the script in manually you may have noticed
-that the editor provides code completion for probe aliasi. If you did not, type "syscall.". You'll see a
-box come up that you may use to select an item to complete your probe alias.<br><br>
-
-In <a href="lesson3.html">Lesson 3</a> you will learn how to run Systemtap scripts in the IDE Perspective.<br><br>
-
-<a href="../IDETutorial.html>Back to Tutorial Contents</a>
-
-
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/lesson3.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/lesson3.html
deleted file mode 100644
index bb628313cb..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/lesson3.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<a href="../../toc.html">Table of Contents</a> > <a href="../gettingStarted.html">Getting Started</a> > <a href="../IDETutorial.html">IDE Tutorial</a>
-
-<h2>
-IDE Tutorial, Lesson Three: Running Your Script
-</h2>
-
-In this lesson we will cover running your script. You may use either the example script you opened in Lesson
-1 or the script you wrote in Lesson two. Select <u>R</u>un-><u>R</u>un. Enter the remote server details. You should receive output in the console
-similar to the following, which shows the reads and write per second. If you do not, please refer to
-<a href="crap.html">troubleshooting</a>.<br><br>
-
-<img src="images/output.png"><br><br>
-
-Now we will demonstrate running Systemtap scripts with graphs. In order to run the chart example you'll
-need to use the code provided in <a href="lesson2.html">Lesson 2</a>. To do this select
-<b><u>R</u>un->Run w/ <u>C</u>hart</b>. This feature will prompt the user for the number of columns for the chart, in addition to
-their titles and regular expressions. The regular expressions are used to parse the console output for
-the script and determine the values of each column at a certain sample point. The combined regular
-expression is shown at the bottom of the dialogue box.
-
-<br><img src="images/chartbox1.png"><br><br></li>
-
-For this example enter the following:<br>
-
-<pre> Columns: 3
-
- TITLE REGULAR EXPRESSION DELIMITER
- Time \d+ .* \D+
- Read \d+ .* \D+
- Write \d+ .* \D+
-</pre><br>
-
-The title fields simply display the associated string in the column's header. After clicking OK the
-script will prompt you for details regarding the Remote Server. Provide the ip address of the remote server
-that is running the systemtapgui Server or the Data Management Daemon. The port is by default 22462. Enter
-a username and password.This will give the application permissions to run your script on the remote machine.
-You have the option of saving your password as well, however be warned this is currently NOT encrypted so this
-convenience runs at a risk. The username is also used to transfer the file to the remote system using SCP. If the
-same machine is used as both the server and the client enter 'localhost' for the Host field.
-When the script is executed the application will switch into the Graphing perspective. A Data View chart is
-populated with live data, in addition to the output in the console. <br><br>
-You should see a screen similar to the following:<br><br>
-
-<img src="images/graphics.png"><br><br>
-
-You will see that the data table poplulates from live data parsed from the console. Now we'll make a
-graph to briefly illustrate the Graphing perspective. Click the Create Graph button next to bring up the
-Select Chart dialogue.Select line graph. You will be prompted to select a column of the X series and Y
-series; select "Time" and "Write" respectively. After you click ok you should see the line graph as follows:<br><br>
-
-<img src="images/graph.png"><br><br>
-
-Note that the multiple series graphs (Multi-Line, Multi-Bar, and Multi-Scatter) will request two Y series, Y1
-and Y2. In the case of our example, these would be "Read" and "Write". Each series will be assigned a different
-color value for the purposes of differentiation and will be plotted both in respect to the specified X series.<
-
-Those are the basics behind running a script in Systemtap GUI.<br><br>
-
-<a href="../IDETutorial.html>Back to Tutorial Contents</a> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/gettingStarted.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/gettingStarted.html
deleted file mode 100644
index 7d2bb6b088..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/gettingStarted.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<a href="../toc.html">Table of Contents</a>
-
-<h2>
-Getting Started
-</h2>
-
-Systemtap GUI is a tool being developed to assist in writing SystemTap scripts and viewing kernel performance.
-
-Systemtap scripts can be used to insert probes into the Linux kernel, where they can monitor various system activities and provide information back based on what is going on. The goal of the Systemtap GUI project is to provide three things. The first is an IDE to assist Systemtap scripts. Secondly, a data collection and graphical display that users can use to visually see what is happening in the kernel. Finally, a dashboard with an number of precanned scripts for users to use without having to write their own scripts.
-
-The current code drop comes with the IDE Perspective and the Graphical Perspective. Subsequent installments will include updates to these features as well as the Dashboard perspective.
-
-<ol>
-<li><a href="IDETutorial.html">IDE Tutorial</a>
-<ul>
-<li><a href="IDETutorial/lesson1.html">Lesson 1: Getting Started</a></li>
-<li><a href="IDETutorial/lesson2.html">Lesson 2: Writing Your First Script</a></li>
-<li><a href="IDETutorial/lesson3.html">Lesson 3: Running Your Script</a></li>
-</ul>
-</li>
-</ol>
-</li>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/exampleScripts.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/exampleScripts.html
deleted file mode 100644
index 19185a763d..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/exampleScripts.html
+++ /dev/null
@@ -1,174 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="reference.html">Reference</a>
-
-<h2>
-Example SystemTap Scripts
-</h2>
-
-What follows is a few SystemTap Scripts that you may use in SystemTap GUI, taken from and linked to
-<a href="http://sourceware.org/systemtap/documentation.html">http://sourceware.org/systemtap/documentation.html</a>
-
-<br><br>There is also a
-<a href="http://sourceware.org/systemtap/examples/demo_script.txt">description of the examples</a>.
-
-<h3>
-top.stp - Prints the top 20 system calls (<a href="http://sourceware.org/systemtap/examples/top.stp">online source</a>)
-</h3>
-
-<code><pre>
-#!/usr/bin/env stap
-#
-# This script continuously lists the top 20 systemcalls on the system
-#
-
-global syscalls
-
-function print_top () {
- cnt=0
- log ("SYSCALL\t\t\t\tCOUNT")
- foreach ([name] in syscalls-) {
- printf("%-20s\t\t%5d\n",name, syscalls[name])
- if (cnt++ == 20)
- break
- }
- printf("--------------------------------------\n")
- delete syscalls
-}
-
-probe kernel.function("sys_*") {
- syscalls[probefunc()]++
-}
-
-# print top syscalls every 5 seconds
-probe timer.ms(5000) {
- print_top ()
-</pre></code>
-
-
-<h3>
-prof.stp - Simple profiling (<a href="http://sourceware.org/systemtap/examples/prof.stp">online source</a>)
-</h3>
-
-<code><pre>
-#!/usr/bin/env stap
-
-# This is an example of profiling a specific command or pid.
-# It works by recording the time when a system call is entered
-# exited.
-
-# Usage: prof.stp -c "top -n5"
-# Will start up "top" and after 5 iterations, will exit.
-#
-# Usage: prof.stp -x 3323
-# Will profile pid 3323 until it ^c is hit.
-#
-
-probe kernel.function("sys_*") {
- if (target() == tid())
- calltime[tid()] = gettimeofday_us()
-}
-
-probe kernel.function("sys_*").return {
- if (target() != tid()) next
- now = gettimeofday_us()
- c = calltime[tid()]
- if (!c) next
- ttime[probefunc()] <<< now - c
- delete calltime[tid()]
-}
-
-probe end {
- printf("\n")
- foreach (x in ttime)
- printf("%-20s\tcalls:%6d\tavg time (ms):%5d\ttotal(ms):%7d\n",
- x, @count(ttime[x]), @avg(ttime[x]), @sum(ttime[x]))
-}
-
-global calltime, ttime
-</pre></code>
-
-
-<h3>
-keyhack.stp - Modifying variables in the kernel. (<a href="http://sourceware.org/systemtap/examples/keyhack.stp">online source</a>)
-</h3>
-
-<code><pre>
-#! /usr/bin/env stap
-
-# This is not useful, but it demonstrates that
-# Systemtap can modify variables in a running kernel.
-
-# Usage: ./keyhack.stp -g
-
-probe kernel.function("kbd_event") {
- # Changes 'm' to 'b' .
- if ($event_code == 50) $event_code = 48
-}
-
-probe end {
- printf("\nDONE\n")
-}
-</code></pre>
-
-
-<h3>
-kmalloc.stp - Statistics example. (<a href="http://sourceware.org/systemtap/examples/kmalloc.stp">online source</a>)
-</h3>
-
-<code><pre>
-#! /usr/bin/env stap
-
-# Using statistics to examine kernel memory allocations
-
-global kmalloc
-
-probe kernel.function("__kmalloc") {
- kmalloc <<< $size
-}
-
-# Exit after 10 seconds
-probe timer.ms(10000) { exit () }
-
-probe end {
- printf("Count: %d allocations\n", @count(kmalloc))
- printf("Sum: %d Kbytes\n", @sum(kmalloc)/1000)
- printf("Average: %d bytes\n", @avg(kmalloc))
- printf("Min: %d bytes\n", @min(kmalloc))
- printf("Max: %d bytes\n", @max(kmalloc))
- print("\nAllocations by size in bytes\n")
- print(@hist_log(kmalloc))
-}
-</code></pre>
-
-
-<h3>
-kmalloc2.stp - Example using arrays of statistics. (<a href="http://sourceware.org/systemtap/examples/kmalloc2.stp">online source</a>)
-</h3>
-
-<code><pre>
-#! /usr/bin/env stap
-
-# Using statistics and maps to examine kernel memory allocations
-
-global kmalloc
-
-probe kernel.function("__kmalloc") {
- kmalloc[execname()] <<< $size
-}
-
-# Exit after 10 seconds
-probe timer.ms(10000) { exit () }
-
-probe end {
- foreach ([name] in kmalloc) {
- printf("Allocations for %s\n", name)
- printf("Count: %d allocations\n", @count(kmalloc[name]))
- printf("Sum: %d Kbytes\n", @sum(kmalloc[name])/1000)
- printf("Average: %d bytes\n", @avg(kmalloc[name]))
- printf("Min: %d bytes\n", @min(kmalloc[name]))
- printf("Max: %d bytes\n", @max(kmalloc[name]))
- print("\nAllocations by size in bytes\n")
- print(@hist_log(kmalloc[name]))
- printf("-------------------------------------------------------\n\n");
- }
-}
-</code></pre> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/frequentlyAskedQuestions.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/frequentlyAskedQuestions.html
deleted file mode 100644
index e2326e7337..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/frequentlyAskedQuestions.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="reference.html">Reference</a>
-
-<h2>
-Frequently Asked Questions
-</h2>
-
-This section details frequently asked questions relating to the IDE Perspective.<br><br>
-
-<b>
-Where can I find information regarding the Systemtap scripting language?
-</b><br><br>
-
-A: The best place to look for up to date information regarding Systemtap itself is its <A HREF="http://sourceware.org/systemtap/documentation.html">homepage.</A>
-<br><br><br>
-
-<b>
-How do I run a script once I've written it?
-</b><br><br>
-
-A: There are different options as far as running your Systemtap script. Please visit the <a href="menus.html#run">Run menu section</a> to learn more about the four ways of running Systemtap scripts.<br><br>
-<br><br><br>
-
-<b>
-Why does the application seem to hang when switchign to the IDE Perspective?
-</b><br><br>
-
-A: If this is the first time you are trying to open the IDE perspective, or have recently gotten a new version of SystemTap this is expected. In order to generate a full list of all of the available probes, and functions the GUI has to run the stap command. If there are tapsets that do not run correctly using the 'stap -up2' comamnd this takes a long time. In order to build as complete a list as possible it will use a binary filtering algorithm to figure out which tapset function is broken and generate data for all of the others.
-<br><br><br>
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/Console.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/Console.png
deleted file mode 100644
index 350a87e416..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/Console.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/ErrorLog.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/ErrorLog.png
deleted file mode 100644
index 396397b552..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/ErrorLog.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/chartbox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/chartbox1.png
deleted file mode 100644
index 0008258b2b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/chartbox1.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/consolebox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/consolebox1.png
deleted file mode 100644
index 4ef123c9fd..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/consolebox1.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/findbox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/findbox1.png
deleted file mode 100644
index fbb1195e55..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/findbox1.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/gotobox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/gotobox1.png
deleted file mode 100644
index 3a6faae06b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/gotobox1.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/importbox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/importbox1.png
deleted file mode 100644
index 050eb82f9a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/importbox1.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/newbox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/newbox1.png
deleted file mode 100644
index ced1f3fac8..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/newbox1.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/openbox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/openbox1.png
deleted file mode 100644
index 3155183cf4..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/openbox1.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/optionsbox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/optionsbox1.png
deleted file mode 100644
index 0ee82f163f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/optionsbox1.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/passbox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/passbox1.png
deleted file mode 100644
index f8d6dca709..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/passbox1.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/preferencesbox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/preferencesbox1.png
deleted file mode 100644
index 31b0cbc9f1..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/preferencesbox1.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/viewbox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/viewbox1.png
deleted file mode 100644
index 348b354600..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/viewbox1.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/dash.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/dash.png
deleted file mode 100644
index 4e1dc2ee25..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/dash.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/graphing.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/graphing.png
deleted file mode 100644
index adfa0c2943..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/graphing.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/ide.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/ide.png
deleted file mode 100644
index 43dacebd97..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/ide.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/import_wiz.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/import_wiz.gif
deleted file mode 100644
index d38085ad9c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/import_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/new_wiz.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/new_wiz.gif
deleted file mode 100644
index 7aea894d0b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/new_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/open_wiz.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/open_wiz.gif
deleted file mode 100644
index 51e703b1b9..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/open_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/run_chart.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/run_chart.gif
deleted file mode 100644
index b7f03d5679..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/run_chart.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/run_exc.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/run_exc.gif
deleted file mode 100644
index 57f410224c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/run_exc.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/run_tool.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/run_tool.gif
deleted file mode 100644
index 8fa2ef50f8..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/run_tool.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/stop_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/stop_obj.gif
deleted file mode 100644
index dc47edf069..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/stop_obj.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/menus.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/menus.html
deleted file mode 100644
index 0accc78023..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/menus.html
+++ /dev/null
@@ -1,105 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="reference.html">Reference</a>
-
-<h2>
-Graphics Perspective Menus
-</h2>
-
-What follows is a comprehension list of the menu options available within the IDE Perspective of Systemtap GUI.
-
-
-<h3>
-<u>F</u>ile
-</h3>
-<ul>
-<li><b><u>N</u>ew File</b> - This option will bring up a dialog to create a new file. You may specify any location. Files ending in a .stp or .c extension will have syntax highlighting and code completion features as appropriate. (Shortcut: Crtl+L)<br><img src="images/menu/newbox1.png"><br><br></li>
-<li><b><u>O</u>pen File</b> - This option will bring up a dialog to select a file to open. Once a file is selected it will open in the editor window. (Shortcut: Crtl+O)<br><img src="images/menu/openbox1.png"><br><br></li>
-<li><b><u>C</u>lose</b> - This option closes the file in the editor pane that currently has the focus. (Shortcut: Crtl+F4)</li>
-<li><b>C<u>l</u>ose All</b> - This option closes all files in the editor pane. (Shortcut: Shift+Crtl+F4)</li>
-<li><b><u>S</u>ave</b> - This option saves the file that currently has the focus. (Shortcut: Crtl+S)</li>
-<li><b>Save <u>A</u>s</b> - This option prompts the user for a new location and file name and saves the file that currently has the focus under that new name and location.</li>
-<li><b>Sav<u>e</u> All</b> - This option saves all files currently open in the editor pane. (Shortcut: Shift+Crtl+S)</li>
-<li><b>Rever<u>t</u></b> - This option discards changes to the file currently under the focus replaces it with the last saved version.</li>
-<li><b><u>P</u>rint</b> - This option prints the file in the editor pane currently holding the focus. (Shortcut: Crtl+P)</li>
-<li><b><u>E</u>xport Script</b> - This option prompts the user to enter metadata associated with the Systemtap script to be exported and used in the Dashboard perspective. See the <a href="../tasks/creatingModules.html">Creating Modules task guide</a> for instructions.</li>
-<li><b><u>I</u>mport Tapset</b> - This option allows you to include additional tapset directories when you run a script. (Shortcut: Crtl+I)<br><img src="images/menu/importbox1.png"><br><br></li>
-<li><b>E<u>x</u>it</b> - Exits Systemtap GUI.
-</ul>
-
-
-<h3>
-<u>E</u>dit
-</h3>
-<ul>
-<li><b><u>U</u>ndo</b> - Undos the previous editor related action. (Shortcut: Crtl+Z)</li>
-<li><b><u>R</u>edo</b> - Redos the previous editor related action removed by Undo. (Shortcut: Crtl+Y)</li>
-<li><b>Cu<u>t</u></b> - Removes the selected text from the editor pane and places it in the clipboard. (Shortcut: Shift+Delete, Ctrl+X)</li>
-<li><b><u>C</u>opy</b> - Copies the selected text from the editor pane and places it in the clipboard. (Shortcut: Ctrl+Insert, Crtl+C)</li>
-<li><b><u>P</u>aste</b> - Copies the text from the clipboard to the location of the focus in the editor pane. (Shortcut: Shift+Insert, Crtl+V)</li>
-<li><b>Select <u>A</u>ll</b> - Selects all text within the file in the editor that the focus is currently in. (Shortcut: Crtl+A)</li>
-<li><b><u>F</u>ind/Replace</b> - Opens the Find/Replace dialogue in which users may specify a text string to find and/or replace, with options to search forwards or backwards, the entire document or just the selected lines, and whether or not they want the following options:
-<ul>
-<li>Case sensitive</li>
-<li>Wrap Search</li>
-<li>Whole Word</li>
-<li>Incremental</li>
-<li>Regular expressions</li>
-</ul>(Shortcut: Crtl+F)</li><br><img src="images/menu/findbox1.png"><br><br></li>
-<li><b>Find <u>N</u>ext</b> - Finds the next instance of the search string in the direction indicated in the Find/Replace dialogue box. (Shortcut: Crtl+K)</li>
-<li><b>Find Pre<u>v</u>ious</b> - Finds the previous instance of the search string in the direction indicated in the Find/Replace dialogue box. (Shortcut: Shift+Crtl+K)</li>
-<li><b><u>I</u>ncremental Find Next</b> - Finds the next occurrence of the text and updates the selection after each character typed. To use Incremental Find:
-<ol>
- <li>In the text (or Java) editor, press Ctrl+J or select Edit > Incremental Find Next from the menu bar.</li>
- <li>The workbench status line displays "Incremental Find:". The editor is now in the Incremental Find mode.</li>
- <li>As you type, the editor finds the next occurrence of the text and updates the selection after each character typed.</li>
- <li>Navigate to the next or previous match by pressing Arrow Down or Arrow Up.</li>
- <li>Undo the last action within the Incremental Find mode by pressing Backspace.</li>
- <li>You can leave the Incremental Find mode by pressing Esc</li>
-</ol>(Shortcut: Crtl+J)</li>
-<li><b>Incre<u>m</u>ental Find Previous</b> - Operates as illustrated in above bullet but in the reverse. (Shortcut: Shift+Crtl+J)</li>
-<li><b>Select <u>A</u>ll</b> - Selects all the text in the file that currently has the focus. (Shortcut: Ctrl+A)</li>
-<li><b><u>W</u>ord Completion</b> - Completes the string being typed by using the last example typed by the user. (Shortcut: Alt+/)</i>
-</ul>
-
-<h3>
-<u>N</u>avigate
-</h3>
-<ul>
-<li><b><u>F</u>orward</b> - Navigates to the next file in sequence as they were opened in the editor pane. (Shortcut: Alt+Right)</li>
-<li><b><u>B</u>ack</b> - Navigates to the previous file in sequence as they were opened in the editor pane. (Shortcut: Alt+Left)</li>
-<li><b>Last Edit Lo<u>c</u>ation</b> - Moves the focus to the file containing the last known edit. (Shortcut: Crtl+Q)</li>
-<li><b><u>G</u>oto Line...</b> - Moves the focus to the specified line number, with the range of line numbers listed in the dialogue box. (Shortcut: Ctrl+L)<br><img src="images/menu/gotobox1.png"><br><br></li>
-</ul>
-
-<h3>
-<a name="run"><u>R</u>un</a>
-</h3>
-<ul>
-<li><b><u>R</u>un</b> - Available when a Systemtap script is loaded into the editor, this feature runs the script. You will be prompted to enter details of the remote machine running the systemtapgui server.ShortCut(Ctrl+F5)<br><img src="images/menu/consolebox1.png"><br><br></li>
-<li><b><u>R</u>un w/Chart</b> - Available when a Systemtap script is loaded into the editor, this feature will prompt the user for the number of columns for the chart, in addition to their titles and regular expressions. The regular expressions are used to parse the console output for the script and determine the values of each column at a certain sample point. The combined regular expression is shown at the bottom of the dialogue box. The user has the option to use Command Line Options as well. When you click OK you will be prompted to enter the details of the remote machine running the systemtapgui server. When the script is executed the application will switch into the Graphing perspective. A Data View chart is populated with live data, in addition to the output in the console. More information regarding the Graphing perspective is available here.<br><img src="images/menu/chartbox1.png"><br><br></li>
-<li><b><u>S</u>top</b> - This option terminates the script thread associated with whichever script currently has the focus. (Shortcut: Ctrl+F9)</li>
-</ul>
-
-<h3>
-<u>W</u>indow
-</h3>
-<ul>
-<li><b>Open in <u>N</u>ew Window</b> - This option opens a new instance of SystemTap GUI.</li>
-<li><b><u>O</u>pen Perspective</b> - This submenu lists each of the available perspectives to open:
-<ul>
-<li>IDE Perspective</li>
-<li>Graphing Perspective</li>
-<li>Dashboard Perspective</li>
-</ul></li>
-<li><b>Show <u>V</u>iews</b> - This submenus lists each of the available views to open:
-<ul>
-<li>Console</li>
-<li>Error Log</li>
-<li>Functions</li>
-<li>Kernel Source</li>
-<li>Probe Alias</li>
-<li>Other - Lists all views in the application.</li><br><img src="images/menu/viewbox1.png"><br><br>
-</ul></li>
-<li><b><u>P</u>references</b> - Due to the breath of this topic it is covered in another section. Please see <a href="preferences.html">Preferences Help</a>.<br><br></li>
-</ul>
-
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/preferences.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/preferences.html
deleted file mode 100644
index cb8a709681..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/preferences.html
+++ /dev/null
@@ -1,129 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="reference.html">Reference</a>
-
-<h2>
-Preferences
-</h2>
-
-This section details each of the options listed under <b><u>W</u>indow-><u>P</u>references</b>. The Preferences dialog is the dialog used to set user preferences. The Preferences dialog pages can be searched using the filter function. To filter by matching the page title, simply type the name of the page you are seeking and the available pages will be presented below. The filter also searches on keywords such as appearance and java.
-
-<ul>
-<li><b>Logging</b>
-<ul>
-<li><b>Enable logging</b> - This option turns on and off the ability to log data from the console.</li>
-<li><b>Logging level</b> - This dropdown box allows you to select one of our levels of logging.
-<ul>
-<li>Debug - A very large quantity of debug information, difficult to identify what you are looking for but extremely exhaustive.</li>
-<li>Info - Displays most information regarding program execution; the default level.</li>
-<li>Critical - Lists only critical errors duration execution.</li>
-<li>Fatal - Lists only fatal errors during execution.</li>
-</ul>
-</li>
-<li><b>Log to</b> - Specifies where you wish the logging to be written:
-<ul>
-<li>Console - Writes the debug information directly to the console.</li>
-<li>File - Write the debug information to a file.</li>
-</ul>
-<li><b>File</b> - The location of the file that logging sends the debug information to.</li>
-</ul>
-<li><b>SystemTap</b> - This section contains options relevent to SystemTap itself.
-<ul>
-<li><b>Remember window state</b> - Preserves the state of the window on exitting SystemTap GUI.
-<li><b>Dashboard Preferences</b> - Preferences relate to the Dashboard Perspective.
-<ul>
-<li>Additional Modules - Provides for the addition of more modules to the Dashboard. Modules are files containing a SystemTap script and associated metadata.</li>
-</ul>
-<li><b>Environment Variables</b> - Allows the user to set specific values to the following environment variables
-<ul>
-<li>LD_LIBRARY_PATH</li>
-<li>PATH</li>
-<li>SYSTEMTAP_TAPSET</li>
-<li>SYSTEMTAP_RUNTIME</li>
-</ul>
-</li>
-<li><b>Graphing</b> - Preferences related to the Graphing Perspective.
-<ul>
-<li><b><u>R</u>efresh Delay (ms)</b> - Milliseconds in between re-painting the graph.</li>
-<li><b>Data Table</b> - Preferences related to the data table.
-<ul>
-<li><u>J</u>ump to the newest entry - Determines whether the scroll bar maintains its location at the newest entry.</li>
-<li><u>A</u>uto resize columns - Determines whether columns automatically resize to the width of the contents or whether they remain placed when moved.</li>
-<li><u>M</u>ax data items - Maximum number of entries that the table shows, though the table itself may have more not visible.</li>
-</ul>
-</li>
-<li><b>Graph</b> - Preferences related to graphs.
-<ul>
-<li><u>S</u>how grid lines - Turns on and off painting of the grid lines.</li>
-<li><u>V</u>iewable data items - Number of maximum samples plotted at any time.</li>
-</ul>
-</ul>
-<li><b>IDE</b> - Preferences when loading the IDE Perspective.
-<ul>
-<li><b>Use stored tapset trees</b> - Loads the stored tapset trees on initialization.</li>
-<li><b>Editor</b> - Preferences related to the editor.
-<ul>
-<li><u>E</u>ditor Background Color - Sets the color painted in the background of the editor pane.</li>
-<li>Show Line <u>N</u>umbers - Option to turn on and off line numbers in the editor pane.
-<li>Code Assist
-<ul>
-<li><u>U</u>se Code Assist - Turns on and off the option to use Code Assist, which is a method that predicts what you are typing based on existing probe aliasi and opens a window that allows you to scroll down and select and/or continue typing for refined results.</li>
-<li>How Code Assist adds code - Method used in Code Assist.
-<ul>
-<li><u>I</u>nsert - Inserts the selected text directly into the cursor point.</li>
-<li><u>O</u>verwrite - Overwrites as you type.</li>
-</ul>
-</li>
-<li>Activation <u>D</u>elay (requires restart) - Delay in milliseconds before the code assist routines attempts to run.
-<li>Activation <u>T</u>rigger - This is the key that actives Code Assist. For SystemTap GUI it is set to the divider between tapset and probe alias.
-</ul>
-</li>
-<li>Syntax Coloring - These options assign color values to identified types within the .stp and .c editors.
-<ul>
-<li>STP editor
-<ul>
-<li><u>D</u>efault Color - Color of normal code.</li>
-<li><u>K</u>eyword Color - Color of keywords.</li>
-<li><u>E</u>mbedded C Color - Color of embedded C code.</li>
-<li><u>E</u>mbedded Color - Color of embedded code.</li>
-<li><u>C</u>omment Color - Color of comments.</li>
-<li><u>T</u>ype Color - Color of items identified as types.</li>
-<li><u>S</u>tring Color - Color of strings.</li>
-</ul>
-</li>
-<li>C editor
-<ul>
-<li><u>D</u>efault Color - Color of normal code.</li>
-<li><u>K</u>eyword Color - Color of keywords.</li>
-<li><u>P</u>reprocessor Color - Color of preprocessor code.</li>
-<li><u>C</u>omment Color - Color of comments.</li>
-<li><u>T</u>ype Color - Color of items identified as types.</li>
-<li><u>S</u>tring Color - Color of strings.</li>
-</ul>
-</li>
-</ul
-</li>
-<li>Typeing - No options available at this time.</li>
-</ul>
-</li>
-<li><b>Path</b>
-<ul>
-<li><u>K</u>ernel Source Directory - Location of the directory that the kernel source code is pulled from.</li>
-<li>Stap - No options available at this time.
-<ul>
-<li>Tapsets - Preferences related to tapsets.
-<ul>
-<li><u>A</u>dditional Tapsets - Allows you to specify additional tapsets scripts to be added in with every script.</li>
-</ul>
-</li>
-</ul>
-</li>
-</ul>
-</li>
-</ul>
-<li><b>Remote Server</b> - Details regarding the remote machine running the systemtapgui Server
-<ul>
-<li><b>Host Name</b> - IP address of the remote machine</li>
-<li><b>Port</b> - Port used for communication. Default is 22462.</li>
-<li><b>User Name</b> - User name that has sufficient permissions to transfer and run the script on the remote machine. </li>
-<li><b>Password</b> - Password for the above user. </li>
-</ul>
-</ul> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/reference.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/reference.html
deleted file mode 100644
index fba8de0b13..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/reference.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<a href="../toc.html">Table of Contents</a>
-
-<h2>
-Reference
-</h2>
-
-This section of the IDE User Guild is intended to provide the following resources should you have any
-very specific questions regarding the IDE Perspective in general or one of the options associated with
-it. It also contains example scripts and FAQs.
-
-<ol>
-<li><a href="viewsAndEditors.html">Views and Editors</a></li>
-<li><a href="menus.html">Menus</a></li>
-<li><a href="toolbars.html">Toolbars</a></li>
-<li><a href="preferences.html">Preferences</a></li>
-<li><a href="frequentlyAskedQuestions.html">Frequently Asked Questions</a></li>
-<li><a href="exampleScripts.html">Example SystemTap Scripts</a></li>
-<li><a href="regex.html">Guide to Regular Expressions</a></li>
-</ol>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/regex.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/regex.html
deleted file mode 100644
index 8643733fde..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/regex.html
+++ /dev/null
@@ -1,144 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="reference.html">Reference</a>
-
-<h2>
-Regex Reference Page
-</h2>
-
-Regular expressions are used in SystemTap GUI to define how the GUI interprets information that it recieves
-from the script file. If the user wishes to change the regular expression during runtime they may do so by
-selecting <b><u>E</u>dit->Modify <u>P</u>arsing Expression</b>.<br><br>
-
-Basic regex (taken from <a href="http://java.sun.com/j2se/1.5.0/docs/api/">http://java.sun.com/j2se/1.5.0/docs/api/</a> ) -
-
-<pre> Summary of regular-expression constructs
-
-Construct Matches
-
-Characters
-x The character x
-\\ The backslash character
-\0n The character with octal value 0n (0 <= n <= 7)
-\0nn The character with octal value 0nn (0 <= n <= 7)
-\0mnn The character with octal value 0mnn (0 <= m <= 3, 0 <= n <= 7)
-\xhh The character with hexadecimal value 0xhh
-\uhhhh The character with hexadecimal value 0xhhhh
-\t The tab character ('\u0009')
-\n The newline (line feed) character ('\u000A')
-\r The carriage-return character ('\u000D')
-\f The form-feed character ('\u000C')
-\a The alert (bell) character ('\u0007')
-\e The escape character ('\u001B')
-\cx The control character corresponding to x
-
-Character classes
-[abc] a, b, or c (simple class)
-[^abc] Any character except a, b, or c (negation)
-[a-zA-Z] a through z or A through Z, inclusive (range)
-[a-d[m-p]] a through d, or m through p: [a-dm-p] (union)
-[a-z&&[def]] d, e, or f (intersection)
-[a-z&&[^bc]] a through z, except for b and c: [ad-z] (subtraction)
-[a-z&&[^m-p]] a through z, and not m through p: [a-lq-z](subtraction)
-
-Predefined character classes
-. Any character (may or may not match line terminators)
-\d A digit: [0-9]
-\D A non-digit: [^0-9]
-\s A whitespace character: [ \t\n\x0B\f\r]
-\S A non-whitespace character: [^\s]
-\w A word character: [a-zA-Z_0-9]
-\W A non-word character: [^\w]
-
-POSIX character classes (US-ASCII only)
-\p{Lower} A lower-case alphabetic character: [a-z]
-\p{Upper} An upper-case alphabetic character:[A-Z]
-\p{ASCII} All ASCII:[\x00-\x7F]
-\p{Alpha} An alphabetic character:[\p{Lower}\p{Upper}]
-\p{Digit} A decimal digit: [0-9]
-\p{Alnum} An alphanumeric character:[\p{Alpha}\p{Digit}]
-\p{Punct} Punctuation: One of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
-\p{Graph} A visible character: [\p{Alnum}\p{Punct}]
-\p{Print} A printable character: [\p{Graph}\x20]
-\p{Blank} A space or a tab: [ \t]
-\p{Cntrl} A control character: [\x00-\x1F\x7F]
-\p{XDigit} A hexadecimal digit: [0-9a-fA-F]
-\p{Space} A whitespace character: [ \t\n\x0B\f\r]
-
-java.lang.Character classes (simple java character type)
-\p{javaLowerCase} Equivalent to java.lang.Character.isLowerCase()
-\p{javaUpperCase} Equivalent to java.lang.Character.isUpperCase()
-\p{javaWhitespace} Equivalent to java.lang.Character.isWhitespace()
-\p{javaMirrored} Equivalent to java.lang.Character.isMirrored()
-
-Classes for Unicode blocks and categories
-\p{InGreek} A character in the Greek block (simple block)
-\p{Lu} An uppercase letter (simple category)
-\p{Sc} A currency symbol
-\P{InGreek} Any character except one in the Greek block (negation)
-[\p{L}&&[^\p{Lu}]] Any letter except an uppercase letter (subtraction)
-
-Boundary matchers
-^ The beginning of a line
-$ The end of a line
-\b A word boundary
-\B A non-word boundary
-\A The beginning of the input
-\G The end of the previous match
-\Z The end of the input but for the final terminator, if any
-\z The end of the input
-
-Greedy quantifiers
-X? X, once or not at all
-X* X, zero or more times
-X+ X, one or more times
-X{n} X, exactly n times
-X{n,} X, at least n times
-X{n,m} X, at least n but not more than m times
-
-Reluctant quantifiers
-X?? X, once or not at all
-X*? X, zero or more times
-X+? X, one or more times
-X{n}? X, exactly n times
-X{n,}? X, at least n times
-X{n,m}? X, at least n but not more than m times
-
-Possessive quantifiers
-X?+ X, once or not at all
-X*+ X, zero or more times
-X++ X, one or more times
-X{n}+ X, exactly n times
-X{n,}+ X, at least n times
-X{n,m}+ X, at least n but not more than m times
-
-Logical operators
-XY X followed by Y
-X|Y Either X or Y
-(X) X, as a capturing group
-
-Back references
-\n Whatever the nth capturing group matched
-
-Quotation
-\ Nothing, but quotes the following character
-\Q Nothing, but quotes all characters until \E
-\E Nothing, but ends quoting started by \Q
-
-Special constructs (non-capturing)
-(?:X) X, as a non-capturing group
-(?idmsux-idmsux) Nothing, but turns match flags on - off
-(?idmsux-idmsux:X) X, as a non-capturing group with the given flags on - off
-(?=X) X, via zero-width positive lookahead
-(?!X) X, via zero-width negative lookahead
-(?<=X) X, via zero-width positive lookbehind
-(?<!X) X, via zero-width negative lookbehind
-(?>X) X, as an independent, non-capturing group
-Match a position that is not a word boundary.
-</pre>
-
-<br>Information regarding regular expressions can be found all over the Internet. A few examples have been listed
-below:<br><br>
-
-<ul>
-<li><a href="http://www.javascriptkit.com/javatutors/redev.shtml">http://www.javascriptkit.com/javatutors/redev.shtml</a></li>
-<li><a href="http://www.zytrax.com/tech/web/regex.htm">http://www.zytrax.com/tech/web/regex.htm</a></li>
-</ul> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/toolbars.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/toolbars.html
deleted file mode 100644
index 6366a2e7a3..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/toolbars.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="reference.html">Reference</a>
-
-<h2>
-Toolbars
-</h2>
-
-SystemTap GUI currently has two toolbars built in; an Action Bar for file and execution operations and a Perspective Selector to jump to different perspectives.
-
-<h3>
-Action Bar
-</h3>
-
-<ul>
-<li><img src="images/toolbars/new_wiz.gif"> <b>New File</b> - This button will bring up a dialog to create a new file. When you click ok the file will be opened in the editor window.</li>
-<li><img src="images/toolbars/open_wiz.gif"> <b>Open File</b> - This button will bring up a dialog to select a file to open. Once a file is selected it will open in the editor window.</li>
-<li><img src="images/toolbars/import_wiz.gif"> <b>Import Tapset</b> - This button allows you to include additional tapset directories when you run a script.</li>
-<li><img src="images/toolbars/run_exc.gif"> <b>Run Script</b> - This will compile the open script and start running it. All output will be sent to the console. If there is an error in the script the error will be reported in the ErrorLog.</li>
-<li><img src="images/toolbars/run_chart.gif"> <b>Run Script w/Chart</b> - This button is also like the standard Run Script button but will bring up a charting dialog box. Once the formatting expressions have been entered it will change the current perspective to the graphing perspective.</li>
-<li><img src="images/toolbars/stop_obj.gif"> <b>Stop Script</b> - This button will stop the currently active script from running.</li>
-</ul>
-
-<h3>
-Perspective Selector
-</h3>
-
-<ul>
-<li><img src="images/toolbars/ide.png"> <b>IDE Perspective</b> - This button brings you into the IDE Perspective, useful for writing and executing scripts.</li>
-<li><img src="images/toolbars/graphing.png"> <b>Graphing Perspective</b> - This button brings you into the Graphing Perspective, useful for graphing scripts.</li>
-</ul> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/viewsAndEditors.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/viewsAndEditors.html
deleted file mode 100644
index 20a705121e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/viewsAndEditors.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="reference.html">Reference</a>
-
-<h2>
-Views and Editors
-</h2>
-
-This section details the views and editor in relation to the IDE Perspective.
-
-<h3>
-Views
-</h3>
-
-The IDE Perspective consists of 5 views and and two editors.<br><br>
-
-<ul>
-<li><b>Probe Alias Browser</b> - A list of all probe aliasi currently available in your version of Systemtap. Covered in detail <a href="../concepts/probeAliasBrowser.html">here</a>.</li>
-<li><b>Function Browser</b> - A list of functions currently supported in your version of Systemtap. Covered in detail <a href="../concepts/functionBrowser.html">here</a>.</li>
-<li><b>Kernel Source Browser</b> - Used to display the kernel tree. Covered in detail <a href="../concepts/kernelBrowser.html">here</a>.</li>
-<a name="console"></a>
-<li><b>Console</b> - The console view is where all of the output from the running script is shown. If more then one script is running at the same time you are able to switch between which console is currently displayed by clicking on the "Display Selected Console" button. The script can halt execution here if the user selects the <b>Stop</b> button. The user also has the option of saving the console output to a file, which can be done by clicking the <b>Save log output</b> button at the top of the console.<br><br><img src="images/Console.png"></li>
-<li><b>Error Log</b> - If the script you tried to run contained errors, this view will become active and display the errors. You can double click on the eror message to jump to the line in the file where the error occured. <img src="images/ErrorLog.png"></li>
-</ul>
-
-<h3>
-Editors
-</h3>
-
-Three editors are available in Systemtap GUI.
-
-<ul>
-<li><b>STP Editor</b> - This editor is the most commonly used; it is used for the authoring and editing of Systemtap scripts. It is invoked when the user starts a new file or opens a file with the .stp extension. It provides syntax highlighting, code completion, and run support.</li>
-<li><b>C Editor</b> - This editor is available for the read only viewing of kernel source. It is invoked when the user opens a file of extension .c. Syntax highlighting is supported in this mode.</li>
-<li><b>Plain Text Editor</b> - A plain text editor is also implemented for the user should they need it.
-</ul>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/creatingSystemtapScripts.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/creatingSystemtapScripts.html
deleted file mode 100644
index 84255eab16..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/creatingSystemtapScripts.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="tasks.html">Tasks</a>
-
-<h2>
-Creating SystemTap Scripts
-</h2>
-
-Create a SystemTap script by selecting <b><u>F</u>ile-><u>N</u>ew</b> in the IDE Perspective. You'll be
-prompted to enter a name for the file; <i>make sure that you use a .stp extension or else SystemTap GUI
-will not recognize the file as a SystemTap script and certain editor and run features will not be active.</i>
-Your new file will be open and ready for coding in the Editor pane.<br><br>
-
-A <a href="../gettingstarted/IDETutorial.html">full length tutorial</a> is also provided in the help pages
-for a step by step demo.<br><br>
-
-For advanced SystemTap langauge help please see the SystemTap Development User's
-Guide and <a href="http://sourceware.org/systemtap/documentation.html">the SystemTap website's documentation
-page. \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/images/addedModule.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/images/addedModule.png
deleted file mode 100644
index 989dbb5196..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/images/addedModule.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/images/exportScript.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/images/exportScript.png
deleted file mode 100644
index cee013d18e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/images/exportScript.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/images/options.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/images/options.png
deleted file mode 100644
index 999051b3fb..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/images/options.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/tasks.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/tasks.html
deleted file mode 100644
index 0317e8cf11..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/tasks.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<a href="../toc.html">Table of Contents</a>
-
-<h2>
-Tasks
-</h2>
-
-This section of the IDE User's Guide contains guides on how to accomplish common tasks in the IDE
-Perspective.<br><br>
-
-<ol>
-<li><a href="creatingSystemtapScripts.html">Creating SystemTap Scripts</a></li>
-<li><a href="usingTheSTPEditor.html">Using the STP Editor</a></li>
-<li><a href="viewingDataCharts.html">Viewing Data Charts</a></li>
-</ol> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/usingTheSTPEditor.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/usingTheSTPEditor.html
deleted file mode 100644
index beea6abd27..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/usingTheSTPEditor.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="tasks.html">Tasks</a>
-
-<h2>
-STP Editor
-</h2>
-
-The STP Editor is used for the authoring and editing of Systemtap scripts. It is invoked when the user
-starts a new file or opens a file with the .stp extension. Using the editor is as easy as setting the focus
-to the editor pane and typing.<br><br>
-
-<img src="../concepts/images/Editor.png"><br><br>
-
-There are certain features within the editor you may want to take advantage of:
-<ul>
-<li>Syntax Highlighting - Certain code items are colored in .stp and .c files based on a set of rules and
-colors. You can turn this on or off and change the colors in <b><u>W</u>indow-><u>P</u>references</b>.</li>
-<li>Code Assist - SystemTap GUI will attempt to finish your probe alias names based on what you have already
-typed. You can then select the appropriate probe alias or continue typing to filter the list down even more.
-You can turn this feature on and off or set the speed on it in <b><u>W</u>indow-><u>P</u>references</b>.</li>
-<li>Run Support - See the <a href="../gettingstarted/IDETutorial/lesson3.html">IDE Tutorial: Lesson 3</a>
-help page on a walk through use of the Run command. The Run command allows scripts to be executed directly
-through SystemTap GUI.</li>
-</ul>
-
-
-
-
-See also: <a href="../reference/menus.html">IDE Perspective Menus</a>,
-<a href="../reference/exampleScripts.html">Example Scripts</a>, <a href="../reference/toolbars.html">Toolbars</a>
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/viewingDataCharts.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/viewingDataCharts.html
deleted file mode 100644
index 5f5b2f1142..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/viewingDataCharts.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<a href="../toc.html">Table of Contents</a> > <a href="tasks.html">Tasks</a>
-
-<h2>
-Viewing Data Charts
-</h2>
-
-Viewing data charts from a SystemTap script is accomplished by running that script with the
-<b><u>R</u>un-><u>R</u>un w/ Chart</b> option. This is covered in the
-<a href="../gettingstarted/IDETutorial/lesson3.html">IDE Tutorial: Lesson Three</a>. After running a script
-with the chart option, the user is taken into the Graphing Perspective and the Data Table is loaded by
-default. The data table immediately begins populating as it recieves input back through the console from
-the running SystemTap script.<br><br>
-
-<img src="../gettingstarted/IDETutorial/images/graphics.png">
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/toc.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/toc.html
deleted file mode 100644
index 6898898f7b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/toc.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Table of Contents</title>
-</head>
-
-<body>
-<h1>Table of Contents</h1>
-
-Welcome to SystemTap GUI help pages. Here you will find wide selection of help pages covering the IDE of
-SystemTap GUI.
-
-<ol>
-<li><a href="gettingstarted/gettingStarted.html">Getting Started</a>
-<ol>
-<li><a href="gettingstarted/IDETutorial.html">IDE Tutorial</a>
-<ul>
-<li><a href="gettingstarted/IDETutorial/lesson1.html">Lesson 1: Getting Started</a></li>
-<li><a href="gettingstarted/IDETutorial/lesson2.html">Lesson 2: Writing Your First Script</a></li>
-<li><a href="gettingstarted/IDETutorial/lesson3.html">Lesson 3: Running Your Script</a></li>
-</ul>
-</li>
-</ol>
-</li>
-<li><a href="concepts/concepts.html">Concepts</a></li>
-<ol>
-<li><a href="concepts/systemtapPerspectives.html">SystemTap Perspectives</a></li>
-<li><a href="concepts/stpEditor.html">STP Editor</a></li>
-<li><a href="concepts/functionBrowser.html">Function Browser</a></li>
-<li><a href="concepts/kernelBrowser.html">Kernel Browser</a></li>
-<li><a href="concepts/probeAliasBrowser.html">Probe Alias Browser</a></li>
-</ol>
-<li><a href="tasks/tasks.html">Tasks</a>
-<ol>
-<li><a href="tasks/creatingSystemtapScripts.html">Creating SystemTap Scripts</a></li>
-<li><a href="tasks/executingScripts.html">Executing Scripts</a></li>
-<li><a href="tasks/viewingDataCharts.html">Viewing Data Charts</a></li>
-<li><a href="tasks/creatingModules.html">Creating Modules</a></li>
-</ol>
-</li>
-<li><a href="reference/reference.html">Reference</li>
-<ol>
-<li><a href="reference/viewsAndEditors.html">Views and Editors</a></li>
-<li><a href="reference/menus.html">Menus</a></li>
-<li><a href="reference/toolbars.html">Toolbars</a></li>
-<li><a href="reference/preferences.html">Preferences</a></li>
-<li><a href="reference/frequentlyAskedQuestions.html">Frequently Asked Questions</a></li>
-<li><a href="reference/exampleScripts.html">Example SystemTap Scripts</a></li>
-<li><a href="reference/regex.html">Guide to Regular Expressions</a></li>
-</ol>
-</body>
-</html> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/tocconcepts.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/tocconcepts.xml
deleted file mode 100644
index 81f1229880..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/tocconcepts.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-
-<toc label="Concepts" link_to="toc.xml#concepts">
- <topic label="Systemtap Perspectives" href="documentation/html/concepts/systemtapPerspectives.html" />
- <topic label="STP Editor" href="documentation/html/concepts/stpEditor.html" />
- <topic label="Function Browser" href="documentation/html/concepts/functionBrowser.html" />
- <topic label="Kernel Browser" href="documentation/html/concepts/kernelBrowser.html" />
- <topic label="Probe Alias Browser" href="documentation/html/concepts/probeAliasBrowser.html" />
-</toc>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/tocgettingstarted.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/tocgettingstarted.xml
deleted file mode 100644
index fe20faa677..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/tocgettingstarted.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-
-<toc label="Getting Started" link_to="toc.xml#gettingstarted">
- <topic label="IDE Tutorial" href="documentation/html/gettingstarted/IDETutorial.html">
- <topic label="Lesson 1" href="documentation/html/gettingstarted/IDETutorial/lesson1.html" />
- <topic label="Lesson 2" href="documentation/html/gettingstarted/IDETutorial/lesson2.html" />
- <topic label="Lesson 3" href="documentation/html/gettingstarted/IDETutorial/lesson3.html" />
- </topic>
-</toc>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/tocreference.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/tocreference.xml
deleted file mode 100644
index c383d7c89d..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/tocreference.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-
-<toc label="Reference" link_to="toc.xml#reference">
- <topic label="Views and editors" href="documentation/html/reference/viewsAndEditors.html" />
- <topic label="Menus" href="documentation/html/reference/menus.html" />
- <topic label="Toolbars" href="documentation/html/reference/toolbars.html" />
- <topic label="Preferences" href="documentation/html/reference/preferences.html" />
- <topic label="Frequently Asked Questions" href="documentation/html/reference/frequentlyAskedQuestions.html" />
- <topic label="Example SystemTap Scripts" href="documentation/html/reference/exampleScripts.html" />
-</toc>
-
-
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/toctasks.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/toctasks.xml
deleted file mode 100644
index 6f12b5e106..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/toctasks.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-
-<toc label="Tasks" link_to="toc.xml#tasks">
- <topic label="Creating systemtap scripts" href="documentation/html/tasks/creatingSystemtapScripts.html" />
- <topic label="Using the STP Editor" href="documentation/html/tasks/usingTheSTPEditor.html" />
- <topic label="Viewing data charts" href="documentation/html/tasks/viewingDataCharts.html" />
-</toc>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/import_wiz.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/import_wiz.gif
deleted file mode 100644
index d38085ad9c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/import_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/run/run_chart.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/run/run_chart.gif
deleted file mode 100644
index b7f03d5679..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/run/run_chart.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/run/run_exc.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/run/run_exc.gif
deleted file mode 100644
index 57f410224c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/run/run_exc.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/run/run_tool.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/run/run_tool.gif
deleted file mode 100644
index 8fa2ef50f8..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/run/run_tool.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/terminate_co.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/terminate_co.gif
deleted file mode 100644
index dc47edf069..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/terminate_co.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/files/file_c.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/files/file_c.gif
deleted file mode 100644
index 778bf3d9a8..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/files/file_c.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/files/file_h.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/files/file_h.gif
deleted file mode 100644
index 0212fd8e85..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/files/file_h.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/files/file_stp.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/files/file_stp.gif
deleted file mode 100644
index d7fabc8064..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/files/file_stp.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/misc/file_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/misc/file_obj.gif
deleted file mode 100644
index 7ccc6a7031..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/misc/file_obj.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/misc/fldr_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/misc/fldr_obj.gif
deleted file mode 100644
index 51e703b1b9..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/misc/fldr_obj.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/misc/probe_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/misc/probe_obj.gif
deleted file mode 100644
index da1a16602e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/misc/probe_obj.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/perspective_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/perspective_obj.gif
deleted file mode 100644
index 0aa75fe704..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/perspective_obj.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_long.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_long.gif
deleted file mode 100644
index 678467f2d8..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_long.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_str.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_str.gif
deleted file mode 100644
index 4f4907c3d6..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_str.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_unk.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_unk.gif
deleted file mode 100644
index 10abf0dfad..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_unk.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_void.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_void.gif
deleted file mode 100644
index c804bbb947..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_void.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/func_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/func_obj.gif
deleted file mode 100644
index 7de61fd84f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/func_obj.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/kernel_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/kernel_obj.gif
deleted file mode 100644
index 131c28da40..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/kernel_obj.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/page_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/page_obj.gif
deleted file mode 100644
index c1a19e1937..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/page_obj.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/probe_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/probe_obj.gif
deleted file mode 100644
index ca8a692bef..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/probe_obj.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.properties
deleted file mode 100644
index 155df86936..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.properties
+++ /dev/null
@@ -1,70 +0,0 @@
-perspective.ide.name=SystemTap IDE
-
-view.function.name=Function
-view.probe.name=Probe Alias
-view.kernel.name=Kernel Source
-
-editor.stp.name=SystemTap STP Editor
-editor.simple.name=Simple Editor
-editor.c.name=C Editor
-
-preference.ide.name=SystemTap IDE
-preference.editor.name=Editor
-preference.codeAssist.name=Code Assist
-preference.conditionalFilter.name=Conditional Filters
-preference.syntaxColor.name=Syntax Coloring
-preference.typeing.name=Typeing
-preference.path.name=Path
-preference.stap.name=Stap
-preference.stapOptions.name=Stap Options
-preference.tapsets.name=Tapsets
-
-command.import.name=Import Tapset...
-command.import.desc=Import tapset directory
-command.stop.name=Stop
-command.stop.desc=Stop running script
-command.runOptions.name=Run w/Options
-command.runOptions.desc=Run the Script w/Options
-command.run.name=Run
-command.run.desc=Run the Script
-command.insertProbe.name=Insert Probe
-command.insertProbe.desc=Insert this probe
-command.insertFunction.name=Insert Function
-command.insertFunction.desc=Insert this function
-command.runChart.name=Run w/Chart
-command.runChart.desc=Run the Script w/Chart
-command.modifyParsing.name=Modify Parsing Expression
-command.modifyParsing.desc=Modify Parsing Expression
-
-category.file.name=File
-category.file.desc=File
-category.run.name=Run
-category.run.desc=Run
-category.popup.name=View Menu
-category.popup.desc=View Menu
-
-action.import.name=Import Tapset...
-action.import.desc=Import tapset directory
-action.runOptions.name=Run w/Options
-action.runOptions.desc=Run the Script w/Options
-action.run.name=Run
-action.run.desc=Run the Script
-
-action.runChart.name=Run w/Chart
-action.runChart.desc=Run the Script w/Chart
-action.stop.name=Stop
-action.stop.desc=Stop running script
-action.insertProbe.name=Insert Probe
-action.insertProbe.desc=Insert this probe
-action.insertFunction.name=Insert Function
-action.insertFunction.desc=Insert this function
-action.viewDefinition.name=View Definition
-
-
-actionset.file.name=File Action Set
-actionset.run.name=Run Action Set
-
-
-actionset.parsing.name=Parsing Action Set
-action.modifyParsing.name=Modify Parsing Expression
-action.modifyParsing.desc=Modify Parsing Expression
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.xml
deleted file mode 100644
index b2744310b7..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.xml
+++ /dev/null
@@ -1,317 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="%perspective.ide.name"
- class="org.eclipse.linuxtools.systemtap.ui.ide.IDEPerspective"
- icon="icons/perspective_obj.gif"
- id="org.eclipse.linuxtools.systemtap.ui.ide.IDEPerspective"/>
- </extension>
-
- <extension
- point="org.eclipse.ui.views">
- <view
- name="%view.function.name"
- allowMultiple="true"
- icon="icons/views/func_obj.gif"
- class="org.eclipse.linuxtools.systemtap.ui.ide.views.FunctionBrowserView"
- id="org.eclipse.linuxtools.systemtap.ui.ide.views.FunctionBrowserView"/>
- <view
- name="%view.kernel.name"
- allowMultiple="true"
- icon="icons/views/kernel_obj.gif"
- class="org.eclipse.linuxtools.systemtap.ui.ide.views.KernelBrowserView"
- id="org.eclipse.linuxtools.systemtap.ui.ide.views.KernelBrowserView"/>
- <view
- name="%view.probe.name"
- allowMultiple="true"
- icon="icons/views/probe_obj.gif"
- class="org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView"
- id="org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView"/>
- </extension>
-
- <extension
- point="org.eclipse.help.toc">
- <toc
- file="toc.xml"
- primary="true"/>
- <toc file="documentation/tocconcepts.xml"/>
- <toc file="documentation/tocgettingstarted.xml"/>
- <toc file="documentation/tocreference.xml"/>
- <toc file="documentation/toctasks.xml"/>
- </extension>
-
- <extension
- point="org.eclipse.ui.editors">
- <editor
- class="org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.STPEditor"
- contributorClass="org.eclipse.ui.texteditor.BasicTextEditorActionContributor"
- default="true"
- extensions="stp"
- icon="icons/views/page_obj.gif"
- id="org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.STPEditor"
- name="%editor.stp.name"/>
- <editor
- name="%editor.simple.name"
- id="org.eclipse.linuxtools.systemtap.ui.editor.SimpleEditor"
- class="org.eclipse.linuxtools.systemtap.ui.editor.SimpleEditor"
- icon="icons/views/page_obj.gif"
- contributorClass="org.eclipse.ui.texteditor.BasicTextEditorActionContributor"
- default="true"/>
- <editor
- name="%editor.c.name"
- id="org.eclipse.linuxtools.systemtap.ui.ide.editors.c.CEditor"
- class="org.eclipse.linuxtools.systemtap.ui.ide.editors.c.CEditor"
- contributorClass="org.eclipse.ui.texteditor.BasicTextEditorActionContributor"
- icon="icons/views/page_obj.gif"
- default="false"
- extensions="c,h,cpp"/>
- </extension>
-
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%preference.ide.name"
- id="com.qualityeclipse.systemtap.prefs.ide"
- class="org.eclipse.linuxtools.systemtap.ui.ide.preferences.IDEPreferencePage"
- category="com.qualityeclipse.systemtap.prefs.view"/>
- <page
- name="%preference.editor.name"
- id="com.qualityeclipse.systemtap.prefs.ide.editor"
- class="org.eclipse.linuxtools.systemtap.ui.ide.preferences.EditorPreferencePage"
- category="com.qualityeclipse.systemtap.prefs.ide"/>
- <page
- name="%preference.codeAssist.name"
- id="com.qualityeclipse.systemtap.prefs.ide.codeassist"
- class="org.eclipse.linuxtools.systemtap.ui.ide.preferences.CodeAssistPreferencePage"
- category="com.qualityeclipse.systemtap.prefs.ide.editor"/>
- <page
- name="%preference.conditionalFilter.name"
- id="com.qualityeclipse.systemtap.prefs.ide.conditionalfilters"
- class="org.eclipse.linuxtools.systemtap.ui.ide.preferences.ConditionalFilterPreferencePage"
- category="com.qualityeclipse.systemtap.prefs.ide.editor"/>
- <page
- name="%preference.syntaxColor.name"
- id="com.qualityeclipse.systemtap.prefs.ide.syntaxcoloring"
- class="org.eclipse.linuxtools.systemtap.ui.ide.preferences.SyntaxColoringPreferencePage"
- category="com.qualityeclipse.systemtap.prefs.ide.editor"/>
- <page
- name="%preference.typeing.name"
- id="com.qualityeclipse.systemtap.prefs.ide.typeing"
- class="org.eclipse.linuxtools.systemtap.ui.ide.preferences.TypeingPreferencePage"
- category="com.qualityeclipse.systemtap.prefs.ide.editor"/>
- <page
- name="%preference.path.name"
- id="com.qualityeclipse.systemtap.prefs.ide.path"
- class="org.eclipse.linuxtools.systemtap.ui.ide.preferences.PathPreferencePage"
- category="com.qualityeclipse.systemtap.prefs.ide"/>
- <page
- name="%preference.stap.name"
- id="com.qualityeclipse.systemtap.prefs.ide.stap"
- class="org.eclipse.linuxtools.systemtap.ui.ide.preferences.StapPreferencePage"
- category="com.qualityeclipse.systemtap.prefs.ide"/>
- <!--page
- name="%preference.stapOptions.name"
- id="com.qualityeclipse.systemtap.prefs.ide.stapoptions"
- class="org.eclipse.linuxtools.systemtap.ui.ide.preferences.StapOptionsPreferencePage"
- category="com.qualityeclipse.systemtap.prefs.view/com.qualityeclipse.systemtap.prefs.ide/com.qualityeclipse.systemtap.prefs.ide.stap"/-->
- <page
- name="%preference.tapsets.name"
- id="com.qualityeclipse.systemtap.prefs.ide.tapsets"
- class="org.eclipse.linuxtools.systemtap.ui.ide.preferences.TapsetsPreferencePage"
- category="com.qualityeclipse.systemtap.prefs.ide.stap"/>
- </extension>
-
- <extension
- point="org.eclipse.core.runtime.preferences">
- <initializer class="org.eclipse.linuxtools.systemtap.ui.ide.preferences.PreferenceInitializer"/>
- </extension>
-
- <extension
- point="org.eclipse.ui.commands">
- <command
- name="%command.import.name"
- description="%command.import.desc"
- categoryId="org.eclipse.linuxtools.systemtap.ui.ide.category.file"
- id="org.eclipse.linuxtools.systemtap.ui.ide.commands.ImportTapset"/>
- <!--command
- name="%command.runOptions.name"
- description="%command.runOptions.desc"
- categoryId="org.eclipse.linuxtools.systemtap.ui.ide.category.run"
- id="org.eclipse.linuxtools.systemtap.ui.ide.commands.RunScriptOptions"/-->
- <command
- name="%command.run.name"
- description="%command.run.desc"
- categoryId="org.eclipse.linuxtools.systemtap.ui.ide.category.run"
- id="org.eclipse.linuxtools.systemtap.ui.ide.commands.RunScript"/>
- <command
- name="%command.runChart.name"
- description="%command.runChart.desc"
- categoryId="org.eclipse.linuxtools.systemtap.ui.ide.category.run"
- id="org.eclipse.linuxtools.systemtap.ui.ide.commands.RunScriptChart"/>
- <command
- name="%command.stop.name"
- description="%command.stop.desc"
- categoryId="org.eclipse.linuxtools.systemtap.ui.ide.category.run"
- id="org.eclipse.linuxtools.systemtap.ui.consolelog.commands.StopScript"/>
-
-
- <command
- name="%command.insertProbe.name"
- description="%command.insertProbe.desc"
- categoryId="org.eclipse.linuxtools.systemtap.ui.ide.category.popup"
- id="org.eclipse.linuxtools.systemtap.ui.ide.commands.probealiasaction"/>
- <command
- name="%command.insertFunction.name"
- description="%command.insertFunction.desc"
- categoryId="org.eclipse.linuxtools.systemtap.ui.ide.category.popup"
- id="org.eclipse.linuxtools.systemtap.ui.ide.commands.functionaction"/>
-
- <category
- name="%category.file.name"
- description="%category.file.desc"
- id="org.eclipse.linuxtools.systemtap.ui.ide.category.file"/>
- <category
- name="%category.run.name"
- description="%category.run.desc"
- id="org.eclipse.linuxtools.systemtap.ui.ide.category.run"/>
- <category
- name="%category.popup.name"
- description="%category.popup.desc"
- id="org.eclipse.linuxtools.systemtap.ui.ide.category.popup"/>
- </extension>
-
-
-
- <extension
- point="org.eclipse.ui.actionSets">
- <actionSet
- label="%actionset.file.name"
- visible="false"
- id="org.eclipse.linuxtools.systemtap.ui.ide.FileActionSet">
- <action
- label="%action.import.name"
- tooltip="%action.import.desc"
- id="org.eclipse.linuxtools.systemtap.ui.ide.actions.ImportTapset"
- icon="icons/actions/import_wiz.gif"
- toolbarPath="org.eclipse.ui.workbench.file/import.ext"
- class="org.eclipse.linuxtools.systemtap.ui.ide.actions.ImportTapsetAction"
- definitionId="org.eclipse.linuxtools.systemtap.ui.ide.commands.ImportTapset"
- style="push"
- state="false"/>
- </actionSet>
- <actionSet
- label="%actionset.run.name"
- visible="false"
- id="org.eclipse.linuxtools.systemtap.ui.ide.RunActionSet">
- <!--action
- label="%action.runOptions.name"
- tooltip="%action.runOptions.desc"
- id="org.eclipse.linuxtools.systemtap.ui.ide.actions.RunScriptOptions"
- icon="icons/actions/run/run_tool.gif"
- toolbarPath="org.eclipse.ui.workbench.file/build.group"
- menubarPath="launch/wbStart"
- class="org.eclipse.linuxtools.systemtap.ui.ide.actions.RunScriptOptionsAction"
- definitionId="org.eclipse.linuxtools.systemtap.ui.ide.commands.RunScriptOptions"
- style="push"
- state="false"/-->
- <action
- label="%action.run.name"
- tooltip="%action.run.desc"
- id="org.eclipse.linuxtools.systemtap.ui.ide.actions.RunScript"
- icon="icons/actions/run/run_exc.gif"
- toolbarPath="org.eclipse.ui.workbench.file/build.group"
- class="org.eclipse.linuxtools.systemtap.ui.ide.actions.RunScriptAction"
- definitionId="org.eclipse.linuxtools.systemtap.ui.ide.commands.RunScript"
- style="push"
- state="false"/>
- <action
- label="%action.runChart.name"
- tooltip="%action.runChart.desc"
- id="org.eclipse.linuxtools.systemtap.ui.ide.actions.RunScriptChartAction"
- icon="icons/actions/run/run_chart.gif"
- toolbarPath="org.eclipse.ui.workbench.file/build.group"
- class="org.eclipse.linuxtools.systemtap.ui.ide.actions.RunScriptChartAction"
- definitionId="org.eclipse.linuxtools.systemtap.ui.ide.commands.RunScriptChart"
- style="push"
- state="false"/>
- <action
- label="%action.stop.name"
- tooltip="%action.stop.desc"
- id="org.eclipse.linuxtools.systemtap.ui.consolelog.actions.StopScript"
- icon="icons/actions/terminate_co.gif"
- toolbarPath="org.eclipse.ui.workbench.file/stop.ext"
- class="org.eclipse.linuxtools.systemtap.ui.consolelog.actions.StopScriptAction"
- definitionId="org.eclipse.linuxtools.systemtap.ui.consolelog.commands.StopScript"
- style="push"
- state="false"/>
- </actionSet>
- </extension>
-
- <extension
- point="org.eclipse.ui.popupMenus">
- <objectContribution
- adaptable="false"
- id="org.eclipse.linuxtools.systemtap.ui.ide.definitionMenu"
- objectClass="org.eclipse.linuxtools.systemtap.ui.structures.TreeDefinitionNode">
- <action
- label="%action.viewDefinition.name"
- class="org.eclipse.linuxtools.systemtap.ui.ide.actions.DefinitionAction"
- icon="icons/misc/file_obj.gif"
- id="org.eclipse.linuxtools.systemtap.ui.ide.definitionAction"
- style="push"/>
- </objectContribution>
- </extension>
-
- <extension
- point="org.eclipse.ui.perspectiveExtensions">
- <perspectiveExtension
- targetID="org.eclipse.linuxtools.systemtap.ui.ide.IDEPerspective">
- <actionSet id="org.eclipse.linuxtools.systemtap.ui.ide.RunActionSet"/>
- <actionSet id="org.eclipse.linuxtools.systemtap.ui.editor.FileActionSet"/>
- <actionSet id="org.eclipse.linuxtools.systemtap.ui.ide.FileActionSet"/>
-
- </perspectiveExtension>
- <perspectiveExtension
- targetID="org.eclipse.linuxtools.systemtap.ui.graphing.GraphingPerspective">
- <actionSet id="org.eclipse.linuxtools.systemtap.ui.ide.RunActionSet"/>
- <view
- ratio="0.40f"
- relative="org.eclipse.linuxtools.systemtap.ui.graphing.views.GraphSelectorView"
- relationship="bottom"
- id="org.eclipse.ui.console.ConsoleView"/>
- <viewShortcut id="org.eclipse.ui.console.ConsoleView"/>
-
- </perspectiveExtension>
-
- <perspectiveExtension
- targetID="org.eclipse.linuxtools.systemtap.ui.graphing.GraphingPerspective">
- <perspectiveShortcut id="org.eclipse.linuxtools.systemtap.ui.ide.IDEPerspective"/>
- </perspectiveExtension>
- <perspectiveExtension
- targetID="org.eclipse.linuxtools.systemtap.ui.ide.IDEPerspective">
- <actionSet id="org.eclipse.linuxtools.systemtap.ui.ide.RunActionSet"/>
- <view
- ratio="1.00f"
- relative="org.eclipse.ui.navigator.ProjectExplorer"
- relationship="left"
- id="org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView"/>
- <viewShortcut id="org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView"/>
- <view
- ratio="0.33f"
- relative="org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView"
- relationship="right"
- id="org.eclipse.linuxtools.systemtap.ui.ide.views.KernelBrowserView"/>
- <viewShortcut id="org.eclipse.linuxtools.systemtap.ui.ide.views.KernelBrowserView"/>
- <view
- ratio="0.33f"
- relative="org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView"
- relationship="left"
- id="org.eclipse.linuxtools.systemtap.ui.ide.views.FunctionBrowserView"/>
- <viewShortcut id="org.eclipse.linuxtools.systemtap.ui.ide.views.FunctionBrowserView"/>
-
- </perspectiveExtension>
- </extension>
-</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/IDEPerspective.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/IDEPerspective.java
deleted file mode 100644
index 487b1f5767..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/IDEPerspective.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide;
-
-import org.eclipse.linuxtools.systemtap.ui.consolelog.views.ErrorView;
-import org.eclipse.linuxtools.systemtap.ui.ide.views.FunctionBrowserView;
-import org.eclipse.linuxtools.systemtap.ui.ide.views.KernelBrowserView;
-import org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.ui.IFolderLayout;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-import org.eclipse.ui.console.IConsoleConstants;
-
-
-
-/**
- * The <code>IDEPerspective</code> class defines the layout of the IDE perspective
- * in the application.
- * @see org.eclipse.ui.IPerspectiveFactory
- * @author Ryan Morse
- */
-public class IDEPerspective implements IPerspectiveFactory {
- public static String ID = "org.eclipse.linuxtools.systemtap.ui.ide.IDEPerspective";
-
- public void createInitialLayout(IPageLayout layout) {
- LogManager.logDebug("Start createInitialLayout: layout-" + layout, this);
- LogManager.logInfo("Initializing", this);
- String editorArea = layout.getEditorArea();
- layout.setEditorAreaVisible(true);
-
- IFolderLayout browsers = layout.createFolder("browsers", IPageLayout.LEFT, 0.25f, editorArea);
- browsers.addPlaceholder(ProbeAliasBrowserView.ID + ":*");
-
- browsers.addView(ProbeAliasBrowserView.ID);
- browsers.addView(FunctionBrowserView.ID);
- browsers.addView(KernelBrowserView.ID);
-
- layout.getViewLayout(ProbeAliasBrowserView.ID).setCloseable(false);
- layout.getViewLayout(FunctionBrowserView.ID).setCloseable(false);
- layout.getViewLayout(KernelBrowserView.ID).setCloseable(false);
-
- IFolderLayout output = layout.createFolder("output", IPageLayout.BOTTOM, 0.75f, editorArea);
- output.addPlaceholder(ErrorView.ID + ":*");
- output.addView(ErrorView.ID);
- output.addView(IConsoleConstants.ID_CONSOLE_VIEW);
-
- layout.getViewLayout(IConsoleConstants.ID_CONSOLE_VIEW).setCloseable(false);
- layout.getViewLayout(ErrorView.ID).setCloseable(false);
-
- layout.addShowViewShortcut(ProbeAliasBrowserView.ID);
- layout.addShowViewShortcut(FunctionBrowserView.ID);
- layout.addShowViewShortcut(KernelBrowserView.ID);
- layout.addShowViewShortcut(ErrorView.ID);
- layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);
-
- layout.addPerspectiveShortcut(ID);
- LogManager.logDebug("End createInitialLayout:", this);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/IDESessionSettings.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/IDESessionSettings.java
deleted file mode 100644
index 8fd15f7331..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/IDESessionSettings.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide;
-
-import org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.STPEditor;
-
-/**
- * A simple class that contains information about the current session of the IDE, such as
- * the path to the tapset libraries, the active SystemTap Script Editor, and if the user
- * chooses, the user's account password.
- * @author Ryan Morse
- */
-public class IDESessionSettings {
- public static String tapsetLocation = "";
- public static STPEditor activeSTPEditor = null;
- public static String password = null;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/DefinitionAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/DefinitionAction.java
deleted file mode 100644
index e0a3746562..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/DefinitionAction.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.actions;
-
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.linuxtools.systemtap.ui.editor.PathEditorInput;
-import org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.STPEditor;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.linuxtools.systemtap.ui.structures.TreeDefinitionNode;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-
-
-
-/**
- * This <code>Action</code> is used when the user right clicks on an item in the Tapset Browsers.
- * Right-clicking on items in the browsers causes a menu item called "Go to definition" to appear,
- * which fires this action upon selection. The result is that the file containing the definition
- * for the entity that the user selected is opened in an <code>STPEditor</code> in the current window.
- * @author Ryan Morse
- * @see org.eclipse.jface.action.Action
- * @see org.eclipse.linuxtools.systemtap.ui.ide.views.TapsetBrowserView
- */
-public class DefinitionAction extends Action implements IObjectActionDelegate, IWorkbenchWindowActionDelegate {
- private IStructuredSelection selection = null;
-
- public DefinitionAction() {
- super();
- LogManager.logInfo("initialized", this);
- }
-
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- //LogManager.logDebug("Start/End setActivePart: action-" + action + ", targetPart-" + targetPart, this);
- }
-
- /**
- * The main body of the event. This code gets the filename from the selected entry in the viewer,
- * then opens a new <code>STPEditor</code> for that file.
- */
- public void run(IAction action) {
- LogManager.logDebug("Start run: action-" + action, this);
- if(!isEnabled())
- return;
- Object o = selection.getFirstElement();
- if(!(o instanceof TreeDefinitionNode))
- return;
- TreeDefinitionNode t = (TreeDefinitionNode)o;
- String filename = t.getDefinition();
- Path p = new Path(filename);
-
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- PathEditorInput input = new PathEditorInput(p, window);
- try {
- IEditorPart editorPart = window.getActivePage().openEditor(input, STPEditor.ID);
- STPEditor editor = (STPEditor)editorPart;
- int line;
-
- if(t.getData().toString().startsWith("probe"))
- line = probeFind(t, editor);
- else
- line = functionFind(t, editor);
-
- editor.jumpToLocation(++line, 0);
- } catch (PartInitException e) {
- LogManager.logCritical("Exception run: " + e.getMessage(), this);
- e.printStackTrace();
- }
- LogManager.logDebug("End run:", this);
- }
-
- /**
- * Tries to find the line of code that corrisponds to the provided
- * function node within the file open in the provided editor.
- * @param t The tree node that we want to look up
- * @param editor The STPEditor with the file we are searching in
- * @return int representing the line where the node is defined
- */
- private int functionFind(TreeDefinitionNode t, STPEditor editor) {
- String func = t.toString();
- func = func.substring(0, func.indexOf('('));
-
- int line = editor.find("function " + func);
-
- if(line < 0)
- line = editor.find(func);
- return Math.max(line, 0);
- }
-
- /**
- * Tries to find the line of code that corrisponds to the provided
- * probe node within the file open in the provided editor.
- * @param t The tree node that we want to look up
- * @param editor The STPEditor with the file we are searching in
- * @return int representing the line where the node is defined
- */
- private int probeFind(TreeDefinitionNode t, STPEditor editor) {
- int line = editor.find("probe " + t.toString());
-
- if(line < 0)
- line = editor.find(t.getData().toString());
- if(line < 0)
- line = editor.find(t.getData().toString().replace(" ", ""));
- return Math.max(line, 0);
- }
-
- /**
- * Updates <code>selection</code> with the current selection whenever the user changes
- * the current selection.
- */
- public void selectionChanged(IAction action, ISelection selection) {
- if(selection instanceof IStructuredSelection) {
- LogManager.logDebug("this.selection changed: oldValue: "+ this.selection + " newValue: " + selection, this);
- this.selection = (IStructuredSelection)selection;
- Object o = this.selection.getFirstElement();
- if(o instanceof TreeDefinitionNode)
- {
- TreeDefinitionNode t = (TreeDefinitionNode)o;
- String s = t.getDefinition();
- if(s != null)
- setEnabled(true);
- else
- setEnabled(false);
- }
- else
- setEnabled(false);
- } else {
- this.setEnabled(false);
- }
- }
-
- public void dispose() {
- LogManager.logInfo("disposing", this);
- }
-
- public void init(IWorkbenchWindow window) {}
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/ImportTapsetAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/ImportTapsetAction.java
deleted file mode 100644
index 7e434fe41a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/ImportTapsetAction.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.actions;
-
-import java.io.File;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.DirectoryDialog;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
-import org.eclipse.linuxtools.systemtap.ui.ide.preferences.IDEPreferenceConstants;
-import org.eclipse.linuxtools.systemtap.ui.ide.views.FunctionBrowserView;
-import org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-
-
-/**
- * This <code>Action</code> is used when the user modifies the list of tapset locations.
- * When it is invoked, the user is presented with a file selection dialog prompting them to
- * select a location. If the user confirms their selection in this dialog (through the native
- * widget's method, usually an OK box), the path the user selected is added to the list stored
- * in preferences that contains tapset locations, and the tapset browsers are told to refresh.
- * @author Ryan Morse
- * @see org.eclipse.linuxtools.systemtap.ui.ide.views.TapsetBrowserView
- */
-public class ImportTapsetAction extends Action implements IWorkbenchWindowActionDelegate {
- private IWorkbenchWindow fWindow;
-
- public ImportTapsetAction() {
- setEnabled(true);
- }
-
- public void dispose() {
- LogManager.logInfo("Disposing", this);
- fWindow= null;
- }
-
- public void init(IWorkbenchWindow window) {
- LogManager.logInfo("Initializing fWindow: " + window, this);
- fWindow= window;
- }
-
- public void run(IAction action) {
- run();
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
- /**
- * This method displays the dialog box to the user that prompts for a tapset location.
- * @return A File representing the directory that the user selected, if the user confirmed, or null otherwise.
- */
- private File queryFile() {
- DirectoryDialog dialog= new DirectoryDialog(fWindow.getShell(), SWT.OPEN);
- dialog.setText("Import Tapsets"); //$NON-NLS-1$
- String path= dialog.open();
- if (path != null && path.length() > 0) {
- LogManager.logDebug("queryFile: returnVal-" + path, this);
- return new File(path);
- }
- LogManager.logDebug("queryFile: returnVal-null", this);
- return null;
- }
-
- /**
- * The main body of this event. Prompts the user for a new location using the <code>queryFile</code>
- * method, then if the return from <code>queryFile</code> is non-null, the path is added to preferences
- * and the tapset browsers refreshed.
- */
- public void run() {
- LogManager.logDebug("Start run:", this);
- File file= queryFile();
- if (file != null) {
- IPreferenceStore p = IDEPlugin.getDefault().getPreferenceStore();
- String tapsets = p.getString(IDEPreferenceConstants.P_TAPSETS);
-
- p.setValue(IDEPreferenceConstants.P_TAPSETS, tapsets + File.pathSeparator + file.getAbsolutePath());
-
- IViewPart ivp = fWindow.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(FunctionBrowserView.ID);
- ((FunctionBrowserView)ivp).refresh();
- ivp = fWindow.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(ProbeAliasBrowserView.ID);
- ((ProbeAliasBrowserView)ivp).refresh();
- }
- LogManager.logDebug("End run:", this);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptAction.java
deleted file mode 100644
index d98325e5b4..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptAction.java
+++ /dev/null
@@ -1,345 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.actions;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.net.URI;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.wizard.ProgressMonitorPart;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.ClientSession;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.Subscription;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.dialogs.SelectServerDialog;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.internal.ConsoleLogPlugin;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.preferences.ConsoleLogPreferenceConstants;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ScriptConsole;
-import org.eclipse.linuxtools.systemtap.ui.editor.PathEditorInput;
-import org.eclipse.linuxtools.systemtap.ui.ide.IDESessionSettings;
-import org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.STPEditor;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.ide.preferences.IDEPreferenceConstants;
-import org.eclipse.linuxtools.systemtap.ui.ide.structures.TapsetLibrary;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.linuxtools.systemtap.ui.systemtapgui.preferences.EnvironmentVariablesPreferencePage;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.ide.FileStoreEditorInput;
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileStore;
-
-
-
-/**
- * This <code>Action</code> is used to run a SystemTap script that is currently open in the editor.
- * @author Ryan Morse
- */
-public class RunScriptAction extends Action implements IWorkbenchWindowActionDelegate {
- public RunScriptAction() {
- super();
- }
-
- public void dispose() {
- LogManager.logInfo("Disposing", this);
- fWindow= null;
- }
-
- public void init(IWorkbenchWindow window) {
- LogManager.logInfo("Initializing fWindow: "+ window, this);
- fWindow= window;
-
- }
-
- public void run(IAction action) {
- run();
- }
-
- /**
- * The main body of this event. Starts by making sure the current editor is valid to run,
- * then builds the command line arguments for stap and retrieves the environment variables.
- * Finally, it gets an instance of <code>ScriptConsole</code> to run the script.
- */
- public void run() {
- LogManager.logDebug("Start run:", this);
- continueRun = true;
- if(isValid()) {
- // String[] script = buildScript();
- // String[] envVars = getEnvironmentVariables();
- if(continueRun)
- {
- createClientSession();
- }
- }
-
- LogManager.logDebug("End run:", this);
- }
-
- /**
- * Returns the path of the current editor in the window this action is associated with.
- * @return The string representation of the path of the current file.
- */
- protected String getFilePath() {
- IEditorPart ed = fWindow.getActivePage().getActiveEditor();
- String filename = null;
- if (ed.getEditorInput() instanceof FileStoreEditorInput)
- {
- URI uri = ((FileStoreEditorInput)ed.getEditorInput()).getURI();
- IFileStore location = EFS.getLocalFileSystem().getStore(uri);
- try {
- filename = location.toLocalFile(EFS.NONE, null).getAbsolutePath();
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- if (ed.getEditorInput() instanceof FileEditorInput)
- filename = ((FileEditorInput)ed.getEditorInput()).getFile().getFullPath().toString();
- if (ed.getEditorInput() instanceof PathEditorInput)
- filename = ((PathEditorInput)ed.getEditorInput()).getPath().toString();
- return filename;
- }
-
- /**
- * Checks if the current editor is operating on a file that actually exists and can be
- * used as an argument to stap (as opposed to an unsaved buffer).
- * @return True if the file is valid.
- */
- protected boolean isValid() {
- IEditorPart ed = fWindow.getActivePage().getActiveEditor();
- if(isValidFile(ed))
- {
- if (ed.getEditorInput() instanceof FileStoreEditorInput)
- {
- URI uri = ((FileStoreEditorInput)ed.getEditorInput()).getURI();
- IFileStore location = EFS.getLocalFileSystem().getStore(uri);
- try {
- fileName = location.toLocalFile(EFS.NONE, null).getAbsolutePath();
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- if (ed.getEditorInput() instanceof FileEditorInput)
- fileName = ((FileEditorInput)ed.getEditorInput()).getFile().getFullPath().toString();
- if (ed.getEditorInput() instanceof PathEditorInput)
- fileName = ((PathEditorInput)ed.getEditorInput()).getPath().toString();
- if(isValidDirectory(fileName))
- return true;
- }
- return true;
- }
-
- private boolean isValidFile(IEditorPart ed) {
-
- if(null == ed) {
- String msg = MessageFormat.format(Localization.getString("RunScriptAction.NoScriptFile"), (Object[])null);
- LogManager.logInfo("Initializing", MessageDialog.class);
- MessageDialog.openWarning(fWindow.getShell(), Localization.getString("RunScriptAction.Problem"), msg);
- LogManager.logInfo("Disposing", MessageDialog.class);
- return false;
- }
-
- if(ed.isDirty())
- ed.doSave(new ProgressMonitorPart(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), new FillLayout()));
-
- return true;
- }
-
- private boolean isValidDirectory(String fileName) {
- this.fileName = fileName;
- if(0 == IDESessionSettings.tapsetLocation.trim().length())
- TapsetLibrary.getTapsetLocation(IDEPlugin.getDefault().getPreferenceStore());
- if(fileName.contains(IDESessionSettings.tapsetLocation)) {
- String msg = MessageFormat.format(Localization.getString("RunScriptAction.TapsetDirectoryRun"), (Object[])null);
- MessageDialog.openWarning(fWindow.getShell(), Localization.getString("RunScriptAction.Error"), msg);
- return false;
- }
- return true;
- }
-
- /**
- * Called by <code>run(IAction)</code> to generate the command line necessary to run the script.
- * @return The arguments to pass to <code>Runtime.exec</code> to start the stap process on this script.
- * @see TerminalCommand
- * @see Runtime#exec(java.lang.String[], java.lang.String[])
- */
- protected String[] buildScript() {
- return buildStandardScript();
- }
-
- /**
- * The command line argument generation method used by <code>RunScriptAction</code>. This generates
- * a stap command line that includes the tapsets specified in user preferences, a guru mode flag
- * if necessary, and the path to the script on disk.
- * @return The command to invoke to start the script running in stap.
- */
- protected String[] buildStandardScript() {
- //FixMe: Take care of this in the next release. For now only the guru mode is sent
- ArrayList<String> cmdList = new ArrayList<String>();
- String[] script;
-
- getImportedTapsets(cmdList);
-
- if(isGuru())
- cmdList.add("-g"); //$NON-NLS-1$
-
- script = finalizeScript(cmdList);
-
- return script;
- }
-
- /**
- * Adds the tapsets that the user has added in preferences to the input <code>ArrayList</code>
- * @param cmdList The list to add the user-specified tapset locations to.
- */
- protected void getImportedTapsets(ArrayList<String> cmdList) {
- Preferences pref = IDEPlugin.getDefault().getPluginPreferences();
- String[] tapsets = pref.getString(IDEPreferenceConstants.P_TAPSETS).split(File.pathSeparator);
-
- //Get all imported tapsets
- if(null != tapsets && tapsets.length > 0 && tapsets[0].trim().length() > 0) {
- for(int i=0; i<tapsets.length; i++) {
- cmdList.add("-I"); //$NON-NLS-1$
- cmdList.add(tapsets[i]);
- }
- }
- }
-
- /**
- * Checks the current script to determine if guru mode is required in order to run. This is determined
- * by the presence of embedded C.
- * @return True if the script contains embedded C code.
- */
- protected boolean isGuru() {
- try {
- File f = new File(fileName);
- FileReader fr = new FileReader(f);
-
- int curr = 0;
- int prev = 0;
- boolean front = false;
- boolean imbedded = false;
- boolean inLineComment = false;
- boolean inBlockComment = false;
- while(-1 != (curr = fr.read())) {
- if(!inLineComment && !inBlockComment && '%' == prev && '{' == curr)
- front = true;
- else if(!inLineComment && !inBlockComment && '%' == prev && '}' == curr && front) {
- imbedded = true;
- break;
- } else if(!inBlockComment && (('/' == prev && '/' == curr) || '#' == curr)) {
- inLineComment = true;
- } else if(!inLineComment && '/' == prev && '*' == curr) {
- inBlockComment = true;
- } else if('\n' == curr) {
- inLineComment = false;
- } else if('*' == prev && '/' == curr) {
- inBlockComment = false;
- }
- prev = curr;
- }
- if(imbedded)
- return true;
- } catch (FileNotFoundException fnfe) {
- LogManager.logCritical("FileNotFoundException run: " + fnfe.getMessage(), this);
- } catch (IOException ie) {
- LogManager.logCritical("IOException run: " + ie.getMessage(), this);
- }
- return false;
- }
-
- protected boolean createClientSession()
- {
- if (!ClientSession.isConnected())
- {
- new SelectServerDialog(fWindow.getShell()).open();
- }
- if((ConsoleLogPlugin.getDefault().getPluginPreferences().getBoolean(ConsoleLogPreferenceConstants.CANCELLED))!=true)
- {
- subscription = new Subscription(fileName,isGuru());
- if (ClientSession.isConnected())
- {
- console = ScriptConsole.getInstance(fileName, subscription);
- console.run();
- }
- }
- return true;
- }
-
- /**
- * Produces a <code>String[]</code> from the <code>ArrayList</code> passed in with stap inserted
- * as the first entry, and the filename as the last entry. Used to convert the arguments generated
- * earlier in <code>buildStandardScript</code> such as tapset locations and guru mode into an actual
- * command line argument array that can be passed to <code>Runtime.exec</code>.
- * @param cmdList The list of arguments for stap for this script
- * @return An array suitable to pass to <code>Runtime.exec</code> to start stap on this file.
- */
- protected String[] finalizeScript(ArrayList<String> cmdList) {
- String[] script;
-
- script = new String[cmdList.size() + 2];
- script[0] = "stap"; //$NON-NLS-1$
-
- script[script.length-1] = fileName;
- for(int i=0; i< cmdList.size(); i++) {
- script[i+1] = cmdList.get(i).toString();
- }
- return script;
- }
-
- protected String[] getEnvironmentVariables() {
- return EnvironmentVariablesPreferencePage.getEnvironmentVariables();
- }
-
- public void selectionChanged(IAction act, ISelection select) {
- this.act = act;
- setEnablement(false);
- buildEnablementChecks();
- }
-
- private void buildEnablementChecks() {
- if(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor() instanceof STPEditor)
- setEnablement(true);
- }
-
- private void setEnablement(boolean enabled) {
- act.setEnabled(enabled);
- }
-
- protected Subscription getSubscription()
- {
- return subscription;
- }
-
- protected boolean continueRun = true;
- private String fileName = null;
- protected IWorkbenchWindow fWindow;
- private IAction act;
- protected Subscription subscription;
- protected int SCRIPT_ID;
- protected ScriptConsole console;
-
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptChartAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptChartAction.java
deleted file mode 100644
index 23ceb1367a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptChartAction.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.actions;
-
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.linuxtools.systemtap.ui.graphing.GraphingConstants;
-import org.eclipse.linuxtools.systemtap.ui.graphing.GraphingPerspective;
-import org.eclipse.linuxtools.systemtap.ui.graphing.views.GraphSelectorView;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSet;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSetParser;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.ChartStreamDaemon2;
-import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.dataset.DataSetWizard;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.WorkbenchException;
-
-
-
-/**
- * Action used to run the systemTap script in the active editor. This action will start stap
- * and send the output to both the <code>ScriptConsole</code> window and a <code>DataSet</code>.
- * @author Ryan Morse
- */
-public class RunScriptChartAction extends RunScriptOptionsAction implements IWorkbenchWindowActionDelegate {
- public RunScriptChartAction() {
- super();
- LogManager.logDebug("initialized", this);
- }
-
- public void dispose() {
- LogManager.logDebug("disposed", this);
- super.dispose();
- }
-
- /**
- * The main body of this event. Starts by making sure the current editor is valid to run,
- * then builds the command line arguments for stap and retrieves the environment variables.
- * Next, it gets an instance of <code>ScriptConsole</code> to run the script. Finally, it
- * Registers a new <code>ChartStreamDaemon2</code> to handle formating the script output
- * for a <code>DataSet</code>. Once everything is setup, it will attempt to switch to the
- * Graphing Perspective.
- */
- public void run() {
- LogManager.logDebug("Start run:", this);
- continueRun = true;
-
- if(isValid()) {
- @SuppressWarnings("unused")
- String[] script = buildScript();
- @SuppressWarnings("unused")
- String[] envVars = getEnvironmentVariables();
-
- if(continueRun) {
- createClientSession();
- subscription.addInputStreamListener(new ChartStreamDaemon2(console, dataSet, parser));
-
- //Change to the graphing perspective
- try {
- IWorkbenchPage p = PlatformUI.getWorkbench().showPerspective(GraphingPerspective.ID, PlatformUI.getWorkbench().getActiveWorkbenchWindow());
- IViewPart ivp = p.findView(GraphSelectorView.ID);
- String name = console.getName();
- ((GraphSelectorView)ivp).createScriptSet(name.substring(name.lastIndexOf('/')+1), dataSet);
- } catch(WorkbenchException we) {
-
- }
- }
- }
-
- LogManager.logDebug("End run:", this);
- }
-
- /**
- * The <code>buildScript</code> method in this class replaces the one in the superclass and calls
- * <code>buildOptionsScript</code> or <code>buildStandardScript</code> depending on the users
- * selection of whether to use script options.
- * @return String[] representing the entire command that needs to be run.
- */
- protected String[] buildScript() {
- String[] script;
-
- getChartingOptions();
-
- if(useOptions)
- script = buildOptionsScript();
- else
- script = buildStandardScript();
-
- return script;
- }
-
- /**
- * This method is used to prompt the user for the parsing expression to be used in generating
- * the <code>DataSet</code> from the scripts output.
- */
- protected void getChartingOptions() {
- DataSetWizard wizard = new DataSetWizard(GraphingConstants.DataSetMetaData, getFilePath());
- IWorkbench workbench = PlatformUI.getWorkbench();
- wizard.init(workbench, null);
- WizardDialog dialog = new WizardDialog(workbench.getActiveWorkbenchWindow().getShell(), wizard);
- dialog.create();
- dialog.open();
-
- parser = wizard.getParser();
- dataSet = wizard.getDataSet();
-
- if(null == parser || null == dataSet)
- continueRun = false;
-
- wizard.dispose();
- }
-
- private boolean useOptions = false;
- private IDataSet dataSet = null;
- private IDataSetParser parser = null;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptOptionsAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptOptionsAction.java
deleted file mode 100644
index 44cf1bd452..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptOptionsAction.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.actions;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.systemtap.ui.ide.preferences.IDEPreferenceConstants;
-import org.eclipse.linuxtools.systemtap.ui.ide.uistructures.StapSettingsDialog;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.PlatformUI;
-
-
-/**
- * This class is a decendent of <code>RunScriptAction</code> that allows for additional arguments, specified
- * by the user, to be passed to stap. Its behavior is very similar to the <code>RunScriptAction</code> action.
- * @author Ryan Morse
- * @see org.eclipse.linuxtools.systemtap.ui.ide.actions.RunScriptAction
- */
-public class RunScriptOptionsAction extends RunScriptAction implements IWorkbenchWindowActionDelegate {
- public RunScriptOptionsAction() {
- super();
- LogManager.logDebug("initialized", this);
- }
-
- /**
- * The <code>buildScript</code> method in this class replaces the one in the superclass and calls
- * <code>buildOptionsScript</code> rather than the <code>buildStandardScript</code> method called
- * in the parent code.
- */
- protected String[] buildScript() {
- return buildOptionsScript();
- }
-
- /**
- * This method executes the same code as the <code>buildStandardScript</code> with one change,
- * being that instead of calling the <code>getImportedTapsets</code> method from the parent class, it
- * calls the <code>getCommandLineOptions</code> method, which will contain all the information that the
- * tapset method contained, as well as whatever optional arguments the user specifies.
- * @return Command line arguments suitable to pass to <code>Runtime.exec</code> in order to run the script as requested
- * @see RunScriptAction#buildStandardScript()
- */
- protected String[] buildOptionsScript() {
- ArrayList<String> cmdList = new ArrayList<String>();
- String[] script;
-
- getImportedTapsets(cmdList);
-
- if(isGuru())
- cmdList.add("-g");
-
- getCommandLineOptions(cmdList);
-
- script = finalizeScript(cmdList);
-
- return script;
- }
-
- /**
- * This method prompts the user to select optional command line arguments to use when running this
- * script, and adds them to the <code>ArrayList</code> passed in.
- * @param cmdList The <code>ArrayList</code> to add the arguments to.
- */
- protected void getCommandLineOptions(ArrayList<String> cmdList) {
- StapSettingsDialog ssd = new StapSettingsDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
- ssd.open();
-
- boolean[] cmdOpts = ssd.getStapOpts();
- String[] cmdOptVals = ssd.getStapOptVals();
-
- if((null != cmdOpts) && (null != cmdOptVals)) {
- int i;
- //Get commandline check options
- for(i=0; i<cmdOpts.length; i++) {
- if(cmdOpts[i])
- cmdList.add(IDEPreferenceConstants.P_STAP[i][0]);
- }
-
- //Get rest of commandline options
- for(i=0; i<cmdOptVals.length; i++) {
- if(null != cmdOptVals[i] && cmdOptVals[i].trim().length() > 0) {
- if("-v".equals(IDEPreferenceConstants.P_STAP[i+cmdOpts.length][0])) {
- cmdList.add("-" + cmdOptVals[i]);
- } else if("-p NUM".equals(IDEPreferenceConstants.P_STAP[i+cmdOpts.length][0])) {
- cmdList.add("-p" + cmdOptVals[i]);
- } else {
- cmdList.add(IDEPreferenceConstants.P_STAP[i+cmdOpts.length][0].substring(0,2));
-
- cmdList.add(cmdOptVals[i-cmdOpts.length]);
- }
- }
- }
- } else
- continueRun = false;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/TempFileAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/TempFileAction.java
deleted file mode 100644
index 5963c4d6ad..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/TempFileAction.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.actions;
-
-import java.io.IOException;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.linuxtools.systemtap.ui.editor.PathEditorInput;
-import org.eclipse.linuxtools.systemtap.ui.ide.IDEPerspective;
-import org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.STPEditor;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-
-
-
-/**
- * This <code>Action</code> creates an editor on a temporary file.
- * @author Henry Hughes
- */
-public class TempFileAction extends Action {
- public void run() {
- LogManager.logDebug("Start run:", this);
- IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
- IWorkbenchWindow main = null;
- for(int i = 0; i < windows.length; i++) {
- String s = windows[i].getActivePage().getPerspective().getId();
- if(s.equals(IDEPerspective.ID))
- main = windows[i];
- }
- if(main == null)
- return;
- try {
- PathEditorInput p = new PathEditorInput();
- main.getActivePage().openEditor(p, STPEditor.ID);
- } catch (PartInitException e) {
- LogManager.logDebug("PartInitException run: " + e.getMessage(), this);
- } catch(IOException e) {
- LogManager.logCritical("IOException run: " + e.getMessage(), this);
- }
- LogManager.logDebug("End run:", this);
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/FunctionBrowserAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/FunctionBrowserAction.java
deleted file mode 100644
index ffdb970f6c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/FunctionBrowserAction.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.actions.hidden;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.linuxtools.systemtap.ui.editor.actions.file.NewFileAction;
-import org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.STPEditor;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.ide.views.FunctionBrowserView;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.linuxtools.systemtap.ui.structures.TreeNode;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.ISelectionListener;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-
-
-
-/**
- * This <code>Action</code> is fired when the user double clicks on an entry in the
- * IDE's current <code>FunctionBrowserView</code>. The behavior of this <code>Action</code> is
- * to expand or collapse the function tree if the user clicks on a non-function (say a file containing
- * functions), or to insert a blank call to the function if the user double clicks on a function
- * (defined by the clickable property in the <code>TreeNode</code> class, retrieved through
- * <code>TreeNode.isClickable</code>.
- * @author Henry Hughes
- * @author Ryan Morse
- * @see org.eclipse.linuxtools.systemtap.ui.structures.TreeNode#isClickable()
- * @see org.eclipse.linuxtools.systemtap.ui.editor.SimpleEditor#insertTextAtCurrent(String)
- * @see org.eclipse.linuxtools.systemtap.ui.ide.actions.hidden.TreeExpandCollapseAction
- */
-public class FunctionBrowserAction extends Action implements IWorkbenchAction, ISelectionListener {
- private final IWorkbenchWindow window;
- private final FunctionBrowserView viewer;
- private static final String ID = "org.eclipse.linuxtools.systemtap.ui.ide.FunctionAction";
- private IStructuredSelection selection;
- private TreeExpandCollapseAction expandAction;
-
- /**
- * The Default Constructor. Takes the <code>IWorkbenchWindow</code> that it effects
- * as well as the <code>FunctionBrowserView</code> that will fire this action.
- * @param window window effected by this event
- * @param browser browser that fires this action
- */
- public FunctionBrowserAction(IWorkbenchWindow window, FunctionBrowserView browser) {
- LogManager.logInfo("initialized", this);
- this.window = window;
- setId(ID);
- setActionDefinitionId(ID);
- setText(Localization.getString("FunctionBrowserAction.Insert"));
- setToolTipText(Localization.getString("FunctionBrowserAction.InsertFunction"));
- window.getSelectionService().addSelectionListener(this);
- viewer = browser;
- expandAction = new TreeExpandCollapseAction(FunctionBrowserView.class);
- }
-
- public void dispose() {
- window.getSelectionService().removeSelectionListener(this);
- selection = null;
- expandAction.dispose();
- expandAction = null;
- LogManager.logInfo("disposed", this);
- }
-
- /**
- * Updates <code>selection</code> with the current selection whenever the user changes
- * the current selection.
- */
- public void selectionChanged(IWorkbenchPart part, ISelection incoming) {
- if (incoming instanceof IStructuredSelection) {
- LogManager.logDebug("Changing selection", this);
- selection = (IStructuredSelection) incoming;
- setEnabled(selection.size() == 1);
- } else {
- LogManager.logDebug("Disabling, selection not IStructuredSelection", this);
- // Other selections, for example containing text or of other kinds.
- setEnabled(false);
- }
- }
-
- /**
- * The main action code, invoked when this action is fired. This code checks the current
- * selection's clickable property, and either invokes the <code>TreeExpandCollapseAction</code> if
- * the selection is not clickable (i.e. the selection is not a function, but a category of functions),
- * or it inserts text for a function call to the selected function in the active STPEditor
- * (creating a new editor if there is not one currently open).
- */
- public void run() {
- LogManager.logDebug("Start run:", this);
- IWorkbenchPage page = window.getActivePage();
- ISelection incoming = viewer.getViewer().getSelection();
- IStructuredSelection selection = (IStructuredSelection)incoming;
- Object o = selection.getFirstElement();
- if (o instanceof TreeNode) {
- TreeNode t = (TreeNode) o;
- if(t.isClickable()) {
- IEditorInput input;
- IEditorPart ed = page.getActiveEditor();
- if(ed == null) {
- NewFileAction action = new NewFileAction(page.getWorkbenchWindow());
- //action.init(page.getWorkbenchWindow());
- action.run();
- ed = page.getWorkbenchWindow().getActivePage().getActiveEditor();
- }
- input = ed.getEditorInput();
- //System.out.println("Node " + t.toString() + "claims to be clickable");
- IEditorPart editor;
- try {
- editor = page.openEditor(input, STPEditor.ID);
-
- if(editor instanceof STPEditor) {
- STPEditor stpeditor = (STPEditor)editor;
- //build the string
- String s = t.toString() + "\n";
- stpeditor.insertTextAtCurrent(s);
-
- }
- } catch (PartInitException e) {
- LogManager.logCritical("PartInitException run: " + e.getMessage(), this);
- }
- } else {
- expandAction.run();
- }
- }
- LogManager.logDebug("End run:", this);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/KernelSourceAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/KernelSourceAction.java
deleted file mode 100644
index 30e610f8f2..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/KernelSourceAction.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.actions.hidden;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.linuxtools.systemtap.ui.editor.PathEditorInput;
-import org.eclipse.linuxtools.systemtap.ui.ide.IDESessionSettings;
-import org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.STPEditor;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.ide.views.KernelBrowserView;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.linuxtools.systemtap.ui.structures.TreeNode;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.ISelectionListener;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-
-
-
-import java.io.File;
-
-/**
- * This <code>Action</code> is raised by <code>KernelBrowserView</code> whenever the user selects
- * an item in the view (usually by double clicking). This <code>Action</code> either passes
- * the event on to <code>TreeExpandCollapseAction</code> if the selection is not clickable, or
- * it opens a new CEditor for the file selected if the selection is clickable.
- * @author Henry Hughes
- * @author Ryan Morse
- * @see org.eclipse.linuxtools.systemtap.ui.ide.editors.c.CEditor
- * @see org.eclipse.linuxtools.systemtap.ui.ide.actions.hidden.TreeExpandCollapseAction
- * @see org.eclipse.linuxtools.systemtap.ui.ide.views.KernelBrowserView
- */
-public class KernelSourceAction extends Action implements ISelectionListener, IWorkbenchAction {
- private final IWorkbenchWindow window;
- public final static String ID = "org.eclipse.linuxtools.systemtap.ui.ide.KBAction";
- private KernelBrowserView viewer;
- private IStructuredSelection selection;
- private TreeExpandCollapseAction expandAction;
-
- /**
- * The default constructor for the <code>KernelSourceAction</code>. Takes the window that it affects
- * and the <code>KernelBrowserView</code> that will fire the event as arguments.
- * @param window The <code>IWorkbenchWindow</code> that the action operates on.
- * @param browser The <code>KernelBrowserView</code> that fires this action.
- */
- public KernelSourceAction(IWorkbenchWindow window, KernelBrowserView browser) {
- LogManager.logDebug("Start KernelSourceAction: window-" + window + ", browser-" + browser, this);
- LogManager.logInfo("Initializing", this);
- this.window = window;
- setId(ID);
- setActionDefinitionId(ID);
- setText(Localization.getString("KernelSourceAction.Insert"));
- setToolTipText(Localization.getString("KernelSourceAction.InsertSelectedFunction"));
- window.getSelectionService().addSelectionListener(this);
- viewer = browser;
- expandAction = new TreeExpandCollapseAction(KernelBrowserView.class);
- LogManager.logDebug("End KernelSourceAction:", this);
- }
-
- /**
- * Updates <code>selection</code> with the current selection whenever the user changes
- * the current selection.
- */
- public void selectionChanged(IWorkbenchPart part, ISelection incoming) {
- if (incoming instanceof IStructuredSelection) {
- LogManager.logDebug("Changing selection", this);
- selection = (IStructuredSelection) incoming;
- setEnabled(selection.size() == 1);
- } else {
- LogManager.logDebug("Disabling, selection not IStructuredSelection", this);
- // Other selections, for example containing text or of other kinds.
- setEnabled(false);
- }
- }
-
- public void dispose() {
- LogManager.logInfo("Disposing", this);
- window.getSelectionService().removeSelectionListener(this);
- }
-
- /**
- * Creates a <code>PathEditorInput</code> for the file specified.
- * @param file The <code>File</code> to create an input for.
- * @return A <code>PathEditorInput</code> that represents the requested file.
- */
- private IEditorInput createEditorInput(File file) {
- IPath location= new Path(file.getAbsolutePath());
- PathEditorInput input= new PathEditorInput(location, window);
- LogManager.logDebug("createEditorInput: returnVal-" + input, this);
- return input;
- }
-
- /**
- * Returns the ID of the editor to use for the requested file. Usually returns
- * <code>CEditor.ID</code> in this code.
- * @param file The file to get the ID for.
- * @return The ID for the editor that handles the requested file type.
- */
- private String getEditorId(File file) {
- IWorkbench workbench= window.getWorkbench();
- IEditorRegistry editorRegistry= workbench.getEditorRegistry();
- IEditorDescriptor descriptor= editorRegistry.getDefaultEditor(file.getName());
- if (descriptor != null) {
- LogManager.logDebug("getEditorId: returnVal-" + descriptor.getId(), this);
- return descriptor.getId();
- }
- LogManager.logDebug("getEditorId: returnVal-...SimpleEditor", this);
- return "org.eclipse.linuxtools.systemtap.ui.editor.SimpleEditor";
- }
-
- /**
- * The main code body for this action. Causes one of the following to occur:
- * <ul>
- * <li>If the selected node is clickable, as specified in <code>TreeNode.isClickable</code>
- * the browser creates an instance of <code>CEditor</code> on the file specified in the selection
- * (<code>KernelBrowserView</code>'s tree only marks clickable on files, not folders) and
- * opens it on the current window</li>
- * <li>If the selected node is not clickable, the code runs the action specified in
- * <code>TreeExpandCollapseAction</code></li>
- * @see org.eclipse.linuxtools.systemtap.ui.ide.editors.c.CEditor
- * @see TreeNode#isClickable()
- * @see TreeExpandCollapseAction
- */
- public void run() {
- LogManager.logDebug("Start run", this);
- IWorkbench wb = PlatformUI.getWorkbench();
- ISelection incoming = viewer.getViewer().getSelection();
- IStructuredSelection selection = (IStructuredSelection)incoming;
- Object o = selection.getFirstElement();
- if(o instanceof TreeNode) {
- TreeNode t = (TreeNode)o;
- if(t.isClickable()) {
-
- File file = (File)t.getData();
- if (file != null) {
- IEditorInput input= createEditorInput(file);
- String editorId= getEditorId(file);
- try {
- IEditorPart editor = wb.getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- if(editor instanceof STPEditor)
- IDESessionSettings.activeSTPEditor = (STPEditor)editor;
- wb.getActiveWorkbenchWindow().getActivePage().openEditor(input, editorId);
- LogManager.logDebug("Editor opened", this);
- } catch (PartInitException e) {
- LogManager.logCritical("PartInitException run: " + e.getMessage(), this);
- }
-
- }
- }
- else
- {
-
- expandAction.run();
- }
- }
- LogManager.logDebug("End run", this);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/ProbeAliasAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/ProbeAliasAction.java
deleted file mode 100644
index 775ccf77ca..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/ProbeAliasAction.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.actions.hidden;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.linuxtools.systemtap.ui.editor.actions.file.NewFileAction;
-import org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.STPEditor;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.linuxtools.systemtap.ui.structures.TreeNode;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.ISelectionListener;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-
-
-
-/**
- * This <code>Action</code> is fired when the user selects an item in the <code>ProbeAliasBrowserView</code>.
- * The action taken is to insert a template probe in the current <code>STPEditor</code>, if available, or to
- * insert the probe into a new <code>STPEditor</code> if one does not exist.
- * @author Henry Hughes
- * @author Ryan Morse
- * @see org.eclipse.linuxtools.systemtap.ui.editor.SimpleEditor#insertText(String)
- * @see org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView
- * @see org.eclipse.jface.action.Action
- */
-public class ProbeAliasAction extends Action implements ISelectionListener, IWorkbenchAction {
- private final IWorkbenchWindow window;
- private final ProbeAliasBrowserView viewer;
- private static final String ID = "org.eclipse.linuxtools.systemtap.ui.ide.ProbeAliasAction";
- private IStructuredSelection selection;
-
- /**
- * The Default Constructor. Takes the <code>IWorkbenchWindow</code> that it effects
- * as well as the <code>ProbeAliasBrowserView</code> that will fire this action.
- * @param window window effected by this event
- * @param view browser that fires this action
- */
- public ProbeAliasAction(IWorkbenchWindow window, ProbeAliasBrowserView view) {
- LogManager.logInfo("initialized", this);
- this.window = window;
- setId(ID);
- setActionDefinitionId(ID);
- setText(Localization.getString("ProbeAliasAction.Insert"));
- setToolTipText(Localization.getString("ProbeAliasAction.InsertSelectedProbe"));
- window.getSelectionService().addSelectionListener(this);
- viewer = view;
- }
-
- /**
- * Updates <code>selection</code> with the current selection whenever the user changes
- * the current selection.
- */
- public void selectionChanged(IWorkbenchPart part, ISelection incoming) {
- if (incoming instanceof IStructuredSelection) {
- LogManager.logDebug("Changing selection", this);
- selection = (IStructuredSelection) incoming;
- setEnabled(selection.size() == 1);
- } else {
- LogManager.logDebug("Disabling, selection not IStructuredSelection", this);
- // Other selections, for example containing text or of other kinds.
- setEnabled(false);
- }
- }
-
- public void dispose() {
- window.getSelectionService().removeSelectionListener(this);
- LogManager.logInfo("disposed", this);
- }
-
- /**
- * The main body of the action. This method checks for the current editor, creating one
- * if there is no active <code>STPEditor</code>, and then inserts a template probe for the
- * item that the user clicked on.
- */
- public void run() {
- LogManager.logDebug("Start run:", this);
- IWorkbenchPage page = window.getActivePage();
- IEditorPart editor = page.getActiveEditor();
- if(null == editor) {
- NewFileAction action = new NewFileAction(page.getWorkbenchWindow());
- //action.init(page.getWorkbenchWindow());
- action.run();
- editor = page.getWorkbenchWindow().getActivePage().getActiveEditor();
- }
- ISelection incoming = viewer.getViewer().getSelection();
- IStructuredSelection selection = (IStructuredSelection)incoming;
- Object o = selection.getFirstElement();
- if (o instanceof TreeNode) {
- TreeNode t = (TreeNode) o;
- if(editor instanceof STPEditor) {
- STPEditor stpeditor = (STPEditor)editor;
- //build the string
- StringBuilder s = new StringBuilder("\nprobe "+ t.toString());
- if(!t.isClickable())
- if(0 <t.getChildCount())
- s.append(".*");
- else
- return;
- s.append("\n{\n");
- if(t.isClickable() && t.getChildCount() > 0) {
- s.append("\t/*\n\t * " +
- Localization.getString("ProbeAliasAction.AvailableVariables") +
- "\n\t * ");
- boolean first = true;
- for(int i = 0; i < t.getChildCount(); i++) {
- if(first) first = false;
- else s.append(", ");
- s.append(t.getChildAt(i).toString());
- }
- s.append("\n\t */\n");
- }
- s.append("\n}\n");
- stpeditor.insertText(s.toString());
- }
- }
- LogManager.logDebug("End run:", this);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/TreeExpandCollapseAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/TreeExpandCollapseAction.java
deleted file mode 100644
index 8c971c5d84..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/TreeExpandCollapseAction.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.actions.hidden;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.linuxtools.systemtap.ui.ide.views.BrowserView;
-import org.eclipse.linuxtools.systemtap.ui.ide.views.FunctionBrowserView;
-import org.eclipse.linuxtools.systemtap.ui.ide.views.KernelBrowserView;
-import org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.ui.ISelectionListener;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IViewReference;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-
-
-/**
- * This <code>Action</code> expands or collapses the Viewer to the level of the element that the
- * user selected.
- * @author Henry Hughes
- * @author Ryan Morse
- */
-public class TreeExpandCollapseAction extends Action implements ISelectionListener,IWorkbenchAction {
- private final IWorkbenchWindow fWindow;
- private IStructuredSelection selection;
- @SuppressWarnings("unchecked")
- private final Class cl;
-
- /**
- * The default constructor. Takes a <code>Class</code> representing the viewer that it is to expand
- * or collapse, as there is only one in the workbench at a time.
- * @param cls <code>Class</code> of the viewer to expand/collapse
- */
- @SuppressWarnings("unchecked")
- public TreeExpandCollapseAction(Class cls) {
- super();
- LogManager.logDebug("Start TreeExpandCollapseAction: cls-" + cls, this);
- fWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- fWindow.getSelectionService().addSelectionListener(this);
- cl = cls;
- LogManager.logDebug("End TreeExpandCollapseAction:", this);
- }
-
- /**
- * Updates <code>selection</code> with the current selection whenever the user changes
- * the current selection.
- */
- public void selectionChanged(IWorkbenchPart part, ISelection incoming) {
- LogManager.logDebug("Start selectionChanged: part-" + part + ", incoming-" + incoming, this);
- if (incoming instanceof IStructuredSelection) {
- selection = (IStructuredSelection) incoming;
- setEnabled(selection.size() == 1);
- } else {
- // Other selections, for example containing text or of other kinds.
- setEnabled(false);
- }
- LogManager.logDebug("End selectionChanged:", this);
- }
-
- public void dispose() {
- LogManager.logDebug("Start dispose:", this);
- fWindow.getSelectionService().removeSelectionListener(this);
- LogManager.logDebug("End dispose:", this);
- }
-
- /**
- * The main body of the action. Expands or Collapses the viewer specified at construction to
- * the level of the current selection.
- */
- public void run() {
- LogManager.logDebug("Start run:", this);
- if(!(cl.equals(FunctionBrowserView.class) || cl.equals(ProbeAliasBrowserView.class) || cl.equals(KernelBrowserView.class))) {
- LogManager.logDebug("End run:", this);
- return;
- }
- IViewReference[] references = fWindow.getActivePage().getViewReferences();
- IViewPart part = null;
- boolean found = false;
- for(int i = 0; i < references.length; i++) {
- part = references[i].getView(false);
- if(part == null)
- continue;
- if(part.getClass().equals(cl)) {
- found = true;
- break;
- }
- }
- if(!found) {
- LogManager.logDebug("End run:", this);
- return;
- }
- if(part == null) {
- LogManager.logDebug("End run:", this);
- return;
- }
- BrowserView viewer = (BrowserView) part;
- ISelection incoming = viewer.getViewer().getSelection();
- IStructuredSelection selection = (IStructuredSelection)incoming;
- Object o = selection.getFirstElement();
-
- if(o == null) {
- LogManager.logDebug("End run:", this);
- return;
- }
-
- Object[] objs = viewer.getViewer().getVisibleExpandedElements();
- boolean doExpand = true;
-
- for(int i = 0; i < objs.length; i++)
- if(objs[i] == o)
- doExpand = false;
-
- if(doExpand) {
- //System.out.println("Attempting to expand at node "+ o.toString());
- viewer.getViewer().expandToLevel(o,1);
- } else {
- //System.out.println("Attempting to collapse at node " + o.toString());
- viewer.getViewer().collapseToLevel(o,1);
- }
- LogManager.logDebug("End run:", this);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/dialogs/ErrorMessage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/dialogs/ErrorMessage.java
deleted file mode 100644
index c05a22caa8..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/dialogs/ErrorMessage.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.ide.dialogs;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.MessageBox;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Creates and displays an error message box that runs in the UI thread.
- *
- */
-public class ErrorMessage {
- private String title;
- private String error;
-
- public ErrorMessage(String title, String error) {
- this.title = title;
- this.error = error;
- }
-
- public void open() {
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- MessageBox messageBox = new MessageBox(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.ICON_ERROR | SWT.OK);
- messageBox.setMessage(error);
- messageBox.setText(title);
- messageBox.open();
- } // end run
- }); // end new Runnable
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CConfiguration.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CConfiguration.java
deleted file mode 100644
index 84f6aec87b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CConfiguration.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.editors.c;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextDoubleClickStrategy;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.presentation.IPresentationReconciler;
-import org.eclipse.jface.text.presentation.PresentationReconciler;
-import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.linuxtools.systemtap.ui.editor.ColorManager;
-import org.eclipse.linuxtools.systemtap.ui.editor.DoubleClickStrategy;
-import org.eclipse.linuxtools.systemtap.ui.editor.NonRuleBasedDamagerRepairer;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
-import org.eclipse.linuxtools.systemtap.ui.ide.preferences.IDEPreferenceConstants;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.swt.graphics.RGB;
-
-
-
-/**
- * Configures an instance of <code>CEditor</code>. This class is responsible for starting
- * the Syntax highlighting system.
- * @author Henry Hughes
- * @author Ryan Morse
- */
-public class CConfiguration extends SourceViewerConfiguration {
- private DoubleClickStrategy doubleClickStrategy;
- private CScanner scanner;
- private ColorManager colorManager;
-
- /**
- * The constructor for the <code>CConfiguration</code> class. Takes as its only parameter
- * the ColorManager to use for syntax highlighting.
- * @param colorManager the <code>ColorManager</code> to use for text highlighting
- */
- public CConfiguration(ColorManager colorManager) {
- LogManager.logDebug("Start/End CConfiguration: colorManager-" + colorManager, this);
- this.colorManager = colorManager;
- }
- public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
- LogManager.logDebug("Start/End getConfiguredContentTypes: sourceViewer-" + sourceViewer, this);
- return new String[] {
- IDocument.DEFAULT_CONTENT_TYPE,
- CPartitionScanner.C_COMMENT};
- }
- public ITextDoubleClickStrategy getDoubleClickStrategy(ISourceViewer sourceViewer, String contentType) {
- LogManager.logDebug("Start getDoubleClickStrategy: sourceViewer-" + sourceViewer + ", contentType-" + contentType, this);
- if (doubleClickStrategy == null)
- doubleClickStrategy = new DoubleClickStrategy();
- LogManager.logDebug("End getDoubleClickStrategy: returnVal-" + doubleClickStrategy, this);
- return doubleClickStrategy;
- }
-
- /**
- * An accessor method for the <code>CScanner</code> associated with this editor. This method is used
- * in order to dispatch notifications to the <code>CScanner</code> when the color preferences have
- * been changed. The <code>CEditor</code> class calls this method to get the <code>CScanner</code>
- * associated with it, and then it reinitializes that <code>CScanner</code> using the
- * <code>CScanner.initializeScanner</code> method.
- * @return the instance of the CScanner associated with this instance
- */
- protected CScanner getCScanner() {
- LogManager.logDebug("Start getCScanner:", this);
- if (scanner == null) {
- scanner = new CScanner(colorManager);
- }
- LogManager.logDebug("End getCScanner: returnVal-" + scanner, this);
- return scanner;
- }
-
- public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
- LogManager.logDebug("Start getPresentationReconciler: sourceViewer-" + sourceViewer, this);
- PresentationReconciler reconciler = new PresentationReconciler();
-
- DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getCScanner());
- reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
- reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
- IPreferenceStore store = IDEPlugin.getDefault().getPreferenceStore();
- RGB comment = PreferenceConverter.getColor(store, IDEPreferenceConstants.P_C_COMMENT_COLOR);
- NonRuleBasedDamagerRepairer ndr =
- new NonRuleBasedDamagerRepairer(
- new TextAttribute(colorManager.getColor(comment)));
- reconciler.setDamager(ndr, CPartitionScanner.C_COMMENT);
- reconciler.setRepairer(ndr, CPartitionScanner.C_COMMENT);
-
- LogManager.logDebug("End getPresentationReconciler: returnVal-" + reconciler, this);
- return reconciler;
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CDocumentProvider.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CDocumentProvider.java
deleted file mode 100644
index 023e678240..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CDocumentProvider.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.editors.c;
-
-import org.eclipse.core.runtime.CoreException;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentPartitioner;
-import org.eclipse.jface.text.rules.FastPartitioner;
-import org.eclipse.jface.text.source.AnnotationModel;
-import org.eclipse.jface.text.source.IAnnotationModel;
-import org.eclipse.linuxtools.systemtap.ui.editor.SimpleDocumentProvider;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-
-
-
-/**
- * The DocumentProvider class used when handling documents containing C code.
- * @see org.eclipse.linuxtools.systemtap.ui.editor.SimpleDocumentProvider
- * @see org.eclipse.ui.texteditor.AbstractDocumentProvider
- * @author Henry Hughes
- * @author Ryan Morse
- */
-public class CDocumentProvider extends SimpleDocumentProvider {
- protected void setupDocument(IDocument document) {
- LogManager.logDebug("Start setupDocument: document-" + document, this);
- if (document != null) {
- IDocumentPartitioner partitioner =
- new FastPartitioner(
- new CPartitionScanner(),
- new String[] {CPartitionScanner.C_COMMENT});
- partitioner.connect(document);
- document.setDocumentPartitioner(partitioner);
- }
- LogManager.logDebug("End setupDocument:", this);
- }
-
- protected IAnnotationModel createAnnotationModel(Object element) throws CoreException {
- LogManager.logDebug("Start/End createAnnotationModel: element-" + element, this);
- return new AnnotationModel();
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CEditor.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CEditor.java
deleted file mode 100644
index 2ae69b1199..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CEditor.java
+++ /dev/null
@@ -1,346 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.editors.c;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
-import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.source.AnnotationRulerColumn;
-import org.eclipse.jface.text.source.CompositeRuler;
-import org.eclipse.jface.text.source.IVerticalRuler;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.linuxtools.systemtap.ui.editor.*;
-import org.eclipse.linuxtools.systemtap.ui.editor.actions.file.NewFileAction;
-import org.eclipse.linuxtools.systemtap.ui.ide.IDESessionSettings;
-import org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.STPEditor;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.ide.preferences.IDEPreferenceConstants;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.texteditor.AbstractDecoratedTextEditor;
-
-
-/**
- * A text editor for the C language.
- * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor
- * @author Henry Hughes
- * @author Ryan Morse
- */
-public class CEditor extends AbstractDecoratedTextEditor {
- private ColorManager colorManager;
- /**
- * The handler for doubleclick events on the ruler for this text editor.
- */
- private RulerDoubleClickHandler handler = new RulerDoubleClickHandler();
- public static final String ID = "org.eclipse.linuxtools.systemtap.ui.ide.editors.c.CEditor";
-
- /**
- * The <code>RulerDoubleClickHandler</code> handles double click events on the
- * ruler for this text editor. It first checks to see if the user clicked on a
- * comment line, then if they clicked on a line that SystemTap can use as a probe
- * point, and if the line of code passes both checks, it dispatches an event to the
- * active STPEditor to insert a code block describing the line of code that the user
- * clicked on.
- *
- * The block of code is sent to the STPEditor only under the following circumstances:
- * <ul>
- * <li>The line of code is not blank</li>
- * <li>If the line of code contains a single-line comment, it must not be the only text on that line</li>
- * <li>The line of code must not fall within a multiline comment</li>
- * <li>The line of code must be a line that can be used by SystemTap,
- * determined by running the following:<br/>
- * <code>stap -p2 -e 'probe kernel.statement("*@filename:linenumber")'</code><br/>
- * If <code>stap</code> does not generate errors while running the test command, the
- * line is assumed valid.</li>
- * </ul>
- *
- * If all of the above are met, the active STPEditor listed in <code>IDESessionSettings</code>
- * is told to insert a template probe for this line of code using the <code>SimpleEditor.insertText</code> method.
- * If no the returned STPEditor reference is null, the code opens a new editor.
- *
- * @author Henry Hughes
- * @author Ryan Morse
- * @see org.eclipse.linuxtools.systemtap.ui.editor.SimpleEditor#insertText
- * @see org.eclipse.linuxtools.systemtap.ui.structures.runnable.Command
- * @see org.eclipse.swt.events.MouseListener
- */
- private class RulerDoubleClickHandler implements MouseListener
- {
- /**
- * The doubleclick event handler method.
- * @param e The <code>MouseEvent</code> that represents this doubleclick event.
- */
- public void mouseDoubleClick(MouseEvent e)
- {
- LogManager.logDebug("Start mouseDoubleClick: e-" + e, this);
- getSite().getShell().setCursor(new Cursor(getSite().getShell().getDisplay(), SWT.CURSOR_WAIT));
- int lineno = getVerticalRuler().getLineOfLastMouseButtonActivity();
-
- String s = getSourceViewer().getDocument().get();
- String[] lines = s.split("\n");
- String line = lines[lineno].trim();
- boolean die = false;
- if("".equals(line)) //eat blank lines
- die = true;
- if(line.startsWith("#")) //eat preprocessor directives
- die = true;
- if(line.startsWith("//")) //eat C99 comments
- die = true;
- if(line.startsWith("/*") && !line.contains("*/") && !line.endsWith("*/")) //try to eat single-line C comments
- die = true;
-
- //gogo find comment segments
- try
- {
- ArrayList<Integer> commentChunks = new ArrayList<Integer>();
- char[] chars = s.toCharArray();
- int needle = 1;
- int offset = getSourceViewer().getDocument().getLineOffset(lineno);
- while (needle < chars.length)
- {
- if(chars[needle-1] == '/' && chars[needle] == '*')
- {
- commentChunks.add(new Integer(needle));
- while(needle < chars.length)
- {
- if(chars[needle-1] == '*' && chars[needle] == '/')
- {
- commentChunks.add(new Integer(needle));
- needle++;
- break;
- }
- needle++;
- }
- }
- needle++;
- }
- for(int i=0, pair, start, end; i < commentChunks.size(); i++)
- {
- if(!(((Integer)(commentChunks.get(i))).intValue() < offset))
- {
- pair = i - i%2;
- start = ((Integer)(commentChunks.get(pair))).intValue();
- end = ((Integer)(commentChunks.get(pair+1))).intValue();
- if(offset >= start && offset <= end)
- die=true;
- }
- }
- } catch (Exception excp) {
- LogManager.logCritical("Exception mouseDoubleClick: " + excp.getMessage(), this);
- }
- if(die) {
- LogManager.logInfo("Initializing", MessageDialog.class);
- MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- Localization.getString("CEditor.ProbeInsertFailed"),Localization.getString("CEditor.CanNotProbeLine"));
- LogManager.logInfo("Disposing", MessageDialog.class);
- } else {
- IEditorInput in = getEditorInput();
- if(in instanceof PathEditorInput) {
- PathEditorInput input = (PathEditorInput)in;
-
- IPreferenceStore p = IDEPlugin.getDefault().getPreferenceStore();
- String kernroot = p.getString(IDEPreferenceConstants.P_KERNEL_SOURCE);
-
- String filepath = input.getPath().toOSString();
- String kernrelative = filepath.substring(kernroot.length()+1, filepath.length());
- StringBuffer sb = new StringBuffer();
-
- sb.append("probe kernel.statement(\"*@"+ kernrelative + ":" + (lineno+1) + "\")");
-
- /* if(!checkProbe(sb.toString() + "{ }")) {
- LogManager.logInfo("Initializing", MessageDialog.class);
- MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- Localization.getString("CEditor.ProbeInsertFailed"),Localization.getString("CEditor.CanNotProbeLine"));
- LogManager.logInfo("Disposing", MessageDialog.class);
- } else { */
- sb.append("\n{\n\t\n}\n");
- if(null == IDESessionSettings.activeSTPEditor) {
- NewFileAction action = new NewFileAction();
- //action.init(input.getMainWindow());
- action.run();
- IEditorPart ed = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- if(ed instanceof STPEditor)
- IDESessionSettings.activeSTPEditor = (STPEditor)ed;
- }
- STPEditor editor = IDESessionSettings.activeSTPEditor;
- if(null != editor)
- editor.insertText(sb.toString());
- //}
- }
- }
- getSite().getShell().setCursor(null); //Return the cursor to normal
- LogManager.logDebug("End mouseDoubleClick:", this);
- }
-
- public void mouseDown(MouseEvent e) {
- }
- public void mouseUp(MouseEvent e) {
- }
- }
-
- /**
- * Default Constructor for the <code>CEditor</code> class. Creates an instance of the editor which
- * is not associated with any given input.
- */
- public CEditor() {
- super();
- LogManager.logDebug("Start CEditor:", this);
- internal_init();
- IDEPlugin.getDefault().getPluginPreferences().addPropertyChangeListener(cColorPropertyChangeListener);
- LogManager.logDebug("End CEditor:", this);
- }
- /**
- * Part of the initialization routine. Creates the <code>ColorManager</code> used by this editor,
- * sets up the CConfiguration for this editor, and sets the DocumentProvider to a new
- * <code>CDocumentProvider</code>.
- * @see org.eclipse.linuxtools.systemtap.ui.editor.ColorManager
- * @see org.eclipse.linuxtools.systemtap.ui.ide.editors.c.CConfiguration
- * @see org.eclipse.linuxtools.systemtap.ui.ide.editors.c.CDocumentProvider
- * @see org.eclipse.ui.texteditor.AbstractTextEditor#setDocumentProvider(org.eclipse.ui.texteditor.IDocumentProvider)
- * @see org.eclipse.ui.texteditor.AbstractTextEditor#setSourceViewerConfiguration(org.eclipse.jface.text.source.SourceViewerConfiguration)
- */
- protected void internal_init() {
- LogManager.logDebug("Start internal_init:", this);
- LogManager.logInfo("Initializing", this);
- configureInsertMode(SMART_INSERT, false);
- colorManager = new ColorManager();
- setSourceViewerConfiguration(new CConfiguration(colorManager));
- setDocumentProvider(new CDocumentProvider());
- LogManager.logDebug("End internal_init", this);
- }
-
- /**
- * Runs the probe passed to it as a single-line SystemTap script. Used as a helper method
- * by the <code>RulerDoubleClickHandler</code> class to check locations in the current file.
- * @param probe the systemtap probe to test for validity
- * @return true when the probe is a valid probe
- */
- /*private boolean checkProbe(String probe) {
- LogManager.logDebug("Start checkProbe: probe-" + probe, this);
- String[] stap = new String[4];
- stap[0] = "stap";
- stap[1] = "-p2";
- stap[2] = "-e";
- stap[3] = probe;
- LogManager.logDebug("running " + probe, this);
-
- Command cmd = new Command(stap, null, null, 0);
- cmd.start();
- while(cmd.isRunning()) {
- try {
- Thread.sleep(100);
- } catch(InterruptedException e) {
- LogManager.logCritical("InterruptedException runStap: " + e.getMessage(), this);
- }
- }
- boolean success = cmd.getReturnValue() == 0;
- cmd.dispose();
- LogManager.logDebug("End checkProbe:", this);
- return success;
- }*/
-
- public void dispose() {
- LogManager.logDebug("Start dispose:", this);
- LogManager.logInfo("Disposing", this);
- IDEPlugin.getDefault().getPluginPreferences().removePropertyChangeListener(cColorPropertyChangeListener);
- colorManager.dispose();
- super.dispose();
- LogManager.logDebug("End dispose:", this);
- }
-
- protected CompositeRuler createCompositeRuler() {
- LogManager.logDebug("Start createCompositeRuler:", this);
- CompositeRuler ruler = new CompositeRuler();
- AnnotationRulerColumn column = new AnnotationRulerColumn(VERTICAL_RULER_WIDTH, getAnnotationAccess());
- ruler.addDecorator(0, column);
-
- if (isLineNumberRulerVisible())
- ruler.addDecorator(1, createLineNumberRulerColumn());
- else if (isPrefQuickDiffAlwaysOn())
- ruler.addDecorator(1, createLineNumberRulerColumn());
-
- LogManager.logDebug("End createCompositeRuler: returnVal-" + ruler, this);
- return ruler;
- }
-
- public void createPartControl(Composite parent) {
- LogManager.logDebug("Start createPartControl: parent-" + parent, this);
- super.createPartControl(parent);
- IVerticalRuler ruler = this.getVerticalRuler();
- Control control = ruler.getControl();
- try {
- control.addMouseListener(handler);
- } catch(Exception e) {
- LogManager.logCritical("Exception createPartControl: " + e.getMessage(), this);
- }
- LogManager.logDebug("End createPartControl:", this);
- }
-
- /**
- * Color Preference Change Notification method, called whenever the user has changed preferences
- * regarding syntax highlighing. This method notifies its internal structures (<code>CScanner</code>,
- * <code>CConfiguration</code>) that the preferences have changed, and that they need to reconfigure
- * themselves.
- */
- private void notifyColorPrefsChanged()
- {
- LogManager.logDebug("Start notifyColorPrefsChanged:", this);
- SourceViewerConfiguration svc = getSourceViewerConfiguration();
- if(!(svc instanceof CConfiguration)) {
- LogManager.logDebug("End notifyColorPrefsChanged:", this);
- return;
- }
- CConfiguration config = (CConfiguration)svc;
- CScanner scanner = config.getCScanner();
- scanner.initializeScanner();
-
- SourceViewer viewer = (SourceViewer)getSourceViewer();
- viewer.unconfigure();
- viewer.configure(svc);
- viewer.invalidateTextPresentation();
- viewer.refresh();
- LogManager.logDebug("End notifyColorPrefsChanged:", this);
- }
-
- /**
- * Detects changes in the preferences relating to the C Editor's syntax highlighting, and
- * fires the <code>notifyColorPrefsChanged</code> method when a change has occured.
- * @see #notifyColorPrefsChanged()
- */
- private final IPropertyChangeListener cColorPropertyChangeListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- LogManager.logDebug("Start propertyChange: event-" + event, this);
- if(event.getProperty().equals(IDEPreferenceConstants.P_C_COMMENT_COLOR) ||
- event.getProperty().equals(IDEPreferenceConstants.P_C_DEFAULT_COLOR) ||
- event.getProperty().equals(IDEPreferenceConstants.P_C_KEYWORD_COLOR) ||
- event.getProperty().equals(IDEPreferenceConstants.P_C_PREPROCESSOR_COLOR) ||
- event.getProperty().equals(IDEPreferenceConstants.P_C_STRING_COLOR) ||
- event.getProperty().equals(IDEPreferenceConstants.P_C_TYPE_COLOR)) {
- notifyColorPrefsChanged();
- }
- LogManager.logDebug("End propertyChange: event-" + event, this);
- }
- };
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CPartitionScanner.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CPartitionScanner.java
deleted file mode 100644
index 8a2297b607..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CPartitionScanner.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.editors.c;
-
-import org.eclipse.jface.text.rules.IPredicateRule;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.MultiLineRule;
-import org.eclipse.jface.text.rules.RuleBasedPartitionScanner;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-
-
-/**
- * This class is the Partition Scanner used by the CEditor. It is responsible for
- * detecting a multiline C comment and partitioning it to type <code>C_COMMENT</code>
- * so that the <code>CScanner</code> can highlight multiline comments.
- * @author Henry Hughes
- * @author Ryan Morse
- * @see org.eclipse.jface.text.rules.RuleBasedPartitionScanner
- */
-public class CPartitionScanner extends RuleBasedPartitionScanner {
- public final static String C_DEFAULT = "__stp_default";
- public final static String C_COMMENT = "__stp_comment";
-
- public CPartitionScanner() {
- LogManager.logDebug("Start CPartitionScanner:", this);
- IToken stpComment = new Token(C_COMMENT);
- IPredicateRule[] rules = new IPredicateRule[1];
- rules[0] = new MultiLineRule("/*", "*/", stpComment);
- setPredicateRules(rules);
- LogManager.logDebug("End CPartitionScanner:", this);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CScanner.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CScanner.java
deleted file mode 100644
index 65153b48d2..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CScanner.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.editors.c;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.jface.text.TextAttribute;
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.jface.text.rules.*;
-import org.eclipse.linuxtools.systemtap.ui.editor.ColorManager;
-import org.eclipse.linuxtools.systemtap.ui.editor.WhitespaceDetector;
-import org.eclipse.linuxtools.systemtap.ui.editor.WordDetector;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
-import org.eclipse.linuxtools.systemtap.ui.ide.preferences.IDEPreferenceConstants;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.RGB;
-
-
-
-/**
- * This class provides syntax highlighting functionality to <code>CEditor</code>. It uses a simple rule-based
- * scanning system.
- * @author Henry Hughes
- * @author Ryan Morse
- */
-public class CScanner extends RuleBasedScanner {
-
- private static String[] fgKeywords= {"auto","break","case","const","continue","default","do","else","extern","for","goto","if","return","signed","sizeof","static","switch","typedef","unsigned","volatile","while" };
- private static String[] fgTypes= { "char","double","enum","float","int","long","register","short","struct","union","void",
- "char*","double*","float*","int*","long*","short*","void*","u8","u16","u32","u64",
- "s8","s16","s32",""};
- private static String[] fgConstants= { "NULL" };
- private ColorManager manager;
- public CScanner(ColorManager manager) {
- LogManager.logDebug("Start CScanner: manager-" + manager, this);
- this.manager = manager;
- initializeScanner();
- LogManager.logDebug("End CScanner:", this);
- }
-
- /**
- * This method initializes this instance of <code>CScanner</code>, allowing it to be used
- * for syntax highlighting purposes by the editor.
- */
- public void initializeScanner()
- {
- LogManager.logDebug("Start initializeScanner:", this);
- IPreferenceStore store = IDEPlugin.getDefault().getPreferenceStore();
- RGB cKeyword, cType, cString, cComment, cDefault, cPreprocessor;
-
- cKeyword = PreferenceConverter.getColor(store, IDEPreferenceConstants.P_C_KEYWORD_COLOR);
- cType = PreferenceConverter.getColor(store, IDEPreferenceConstants.P_C_TYPE_COLOR);
- cString = PreferenceConverter.getColor(store, IDEPreferenceConstants.P_C_STRING_COLOR);
- cComment = PreferenceConverter.getColor(store, IDEPreferenceConstants.P_C_COMMENT_COLOR);
- cDefault = PreferenceConverter.getColor(store, IDEPreferenceConstants.P_C_DEFAULT_COLOR);
- cPreprocessor = PreferenceConverter.getColor(store, IDEPreferenceConstants.P_C_PREPROCESSOR_COLOR);
-
- IToken keyword = new Token(new TextAttribute(manager.getColor(cKeyword), null, SWT.BOLD));
- IToken type = new Token(new TextAttribute(manager.getColor(cType)));
- IToken string = new Token(new TextAttribute(manager.getColor(cString)));
- IToken comment = new Token(new TextAttribute(manager.getColor(cComment)));
- IToken other = new Token(new TextAttribute(manager.getColor(cDefault)));
- IToken preprocessor = new Token(new TextAttribute(manager.getColor(cPreprocessor)));
- /* IToken procInstr =
- new Token(
- new TextAttribute(
- manager.getColor(ICColorConstants.PROC_INSTR)));*/
-
- List<IRule> rules= new ArrayList<IRule>();
-
- // Add rules for single line comments.
- rules.add(new EndOfLineRule("//", comment)); //$NON-NLS-1$
-
- rules.add(new SingleLineRule("#", " ", preprocessor));
- // Add rule for strings and character constants.
- rules.add(new SingleLineRule("\"", "\"", string, '\\')); //$NON-NLS-2$ //$NON-NLS-1$
- rules.add(new SingleLineRule("'", "'", string, '\\')); //$NON-NLS-2$ //$NON-NLS-1$
-
- // Add generic whitespace rule.
- rules.add(new WhitespaceRule(new WhitespaceDetector()));
-
- // Add word rule for keywords, types, and constants.
- WordRule wordRule= new WordRule(new WordDetector(), other);
- for (int i= 0; i < fgKeywords.length; i++)
- wordRule.addWord(fgKeywords[i], keyword);
- for (int i= 0; i < fgTypes.length; i++)
- wordRule.addWord(fgTypes[i], type);
- for (int i= 0; i < fgConstants.length; i++)
- wordRule.addWord(fgConstants[i], type);
- rules.add(wordRule);
-
- IRule[] result= new IRule[rules.size()];
- setDefaultReturnToken(other);
- rules.toArray(result);
- setRules(result);
-
- LogManager.logDebug("End initializeScanner:", this);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/ICColorConstants.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/ICColorConstants.java
deleted file mode 100644
index dc3da06a31..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/ICColorConstants.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.editors.c;
-
-import org.eclipse.swt.graphics.RGB;
-
-/**
- * This interface defines the constant colors that are used for syntax highlighting inside
- * <code>CEditor</code>
- * @author Ryan Morse
- */
-public interface ICColorConstants {
- RGB COMMENT= new RGB(0, 128, 0);
- RGB PREPROCESSOR = new RGB(180,56,231);
- RGB KEYWORD= new RGB(127, 0, 85);
- RGB TYPE= new RGB(0, 0, 128);
- RGB STRING= new RGB(0, 0, 255);
- RGB DEFAULT= new RGB(0, 0, 0);
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPColorConstants.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPColorConstants.java
deleted file mode 100644
index 29e46a2335..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPColorConstants.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.ui.ide.editors.stp;
-
-import org.eclipse.swt.graphics.RGB;
-
-public interface STPColorConstants {
- RGB KEYWORD = new RGB(127, 0, 85);
- RGB COMMENT = new RGB(63, 127, 95);
- RGB STP_STRING = new RGB(0, 0, 255);
- RGB DEFAULT = new RGB(0, 0, 0);
- RGB EMBEDDED = new RGB (0, 64, 64);
- RGB EMBEDDEDC = new RGB (0, 64, 64);
- RGB TYPE= new RGB(0, 0, 128);
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPCompletionProcessor.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPCompletionProcessor.java
deleted file mode 100644
index 042cb2a7a0..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPCompletionProcessor.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.ui.ide.editors.stp;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.jface.text.contentassist.IContextInformationValidator;
-
-class STPCompletionProcessor implements IContentAssistProcessor {
-
- private final IContextInformation[] NO_CONTEXTS = new IContextInformation[0];
- private final char[] PROPOSAL_ACTIVATION_CHARS = new char[] { '.' };
- private ICompletionProposal[] NO_COMPLETIONS = new ICompletionProposal[0];
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int)
- */
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer,
- int offset) {
-
- IDocument document = viewer.getDocument();
-
- String prefix;
- int locationOffset =0;
-
- // Get completion hint from document
- try {
- prefix = completionWord(document, offset);
- locationOffset = completionReplaceWordLocation(document, offset);
- } catch (Exception e) {
- return NO_COMPLETIONS;
- }
-
- // If cannot find a place to replace our partial typed completion
- // with the full one, abort with no completions.
- if (locationOffset < 0)
- return NO_COMPLETIONS;
-
- String[] completionData = STPMetadataSingleton.getCompletionResults(prefix);
-
- // If cannot find any completions
- // abort with no completions.
- if (completionData.length < 1)
- return NO_COMPLETIONS;
-
- // Build proposals and submit
- ICompletionProposal[] result = new ICompletionProposal[completionData.length];
- for (int i = 0; i < completionData.length; i++)
- result[i] = new CompletionProposal(
- completionData[i].substring(offset - locationOffset),
- offset, 0, completionData[i].length(), null,
- completionData[i], null, null);
- return result;
- }
-
- /**
- *
- * Compute location of completion proposal insertion.
- *
- * @param doc - document to insert completion.
- * @param offset - offset of where completion hint was first generated.
- * @return - offset into document for completion proposal insertion.
- * @throws BadLocationException
- *
- */
- private int completionReplaceWordLocation(IDocument doc, int offset)
- throws BadLocationException {
- try {
- for (int n = offset-1; n >= 0; n--) {
- if (doc.getChar(n) == '.')
- return n+1;
- }
- } catch (BadLocationException e) {
- throw e;
- }
-
- return -1;
- }
-
- /**
- *
- * Return the word the user wants to submit for completion proposals.
- *
- * @param doc - document to insert completion.
- * @param offset - offset of where completion hint was first generated.
- * @return - word to generate completion proposals.
- *
- * @throws BadLocationException
- */
- private String completionWord(IDocument doc, int offset)
- throws BadLocationException {
- try {
- for (int n = offset - 1; n >= 0; n--) {
- char c = doc.getChar(n);
- if ((Character.isSpaceChar(c)) || (c == '\n') || (c == '\0')) {
- String word = doc.get(n + 1, offset - n - 1);
- if (word.charAt(word.length() - 1) == '.')
- return word.substring(0, word.length() - 1);
- else
- return word;
- }
- }
- } catch (BadLocationException e) {
- throw e;
- }
- return "";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeContextInformation(org.eclipse.jface.text.ITextViewer, int)
- */
- public IContextInformation[] computeContextInformation(ITextViewer viewer,
- int offset) {
- return NO_CONTEXTS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
- */
- public char[] getCompletionProposalAutoActivationCharacters() {
- return PROPOSAL_ACTIVATION_CHARS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationAutoActivationCharacters()
- */
- public char[] getContextInformationAutoActivationCharacters() {
- return PROPOSAL_ACTIVATION_CHARS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationValidator()
- */
- public IContextInformationValidator getContextInformationValidator() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getErrorMessage()
- */
- public String getErrorMessage() {
- // TODO: When does this trigger?
- return "Error.";
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPConfiguration.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPConfiguration.java
deleted file mode 100644
index 69b48edbf3..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPConfiguration.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.editors.stp;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextDoubleClickStrategy;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.contentassist.ContentAssistant;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.contentassist.IContentAssistant;
-import org.eclipse.jface.text.presentation.IPresentationReconciler;
-import org.eclipse.jface.text.presentation.PresentationReconciler;
-import org.eclipse.jface.text.reconciler.IReconciler;
-import org.eclipse.jface.text.reconciler.MonoReconciler;
-import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.linuxtools.systemtap.ui.editor.ColorManager;
-import org.eclipse.linuxtools.systemtap.ui.editor.DoubleClickStrategy;
-
-public class STPConfiguration extends SourceViewerConfiguration {
-
- private STPElementScanner scanner;
- private ColorManager colorManager;
- private STPEditor editor;
- private DoubleClickStrategy doubleClickStrategy;
-
- public STPConfiguration(ColorManager colorManager, STPEditor editor) {
- this.colorManager = colorManager;
- this.editor = editor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getConfiguredContentTypes(org.eclipse.jface.text.source.ISourceViewer)
- */
- @Override
- public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
- return new String[] {
- IDocument.DEFAULT_CONTENT_TYPE,
- STPPartitionScanner. STP_COMMENT,
- STPPartitionScanner.STP_STRING};
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getContentAssistant(org.eclipse.jface.text.source.ISourceViewer)
- */
- @Override
- public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
- ContentAssistant assistant = new ContentAssistant();
-
- assistant.enableAutoActivation(true);
- assistant.setAutoActivationDelay(500);
- assistant.setProposalPopupOrientation(IContentAssistant.PROPOSAL_OVERLAY);
- assistant
- .setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE);
- IContentAssistProcessor processor = new STPCompletionProcessor();
- assistant.setContentAssistProcessor(processor,IDocument.DEFAULT_CONTENT_TYPE);
- assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
- return assistant;
- }
-
- /**
- * Return the default Element scanner.
- *
- * @return default element scanner.
- */
- protected STPElementScanner getSTPScanner() {
- if (scanner == null) {
- scanner = new STPElementScanner(colorManager);
- scanner.setDefaultReturnToken(new Token(new TextAttribute(
- colorManager.getColor(STPColorConstants.DEFAULT))));
- }
- return scanner;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getReconciler(org.eclipse.jface.text.source.ISourceViewer)
- *
- * Return the reconciler built on the custom Systemtap reconciling strategy that enables code folding for this editor.
- */
- @Override
- public IReconciler getReconciler(ISourceViewer sourceViewer)
- {
- STPReconcilingStrategy strategy = new STPReconcilingStrategy();
- strategy.setEditor(editor);
- MonoReconciler reconciler = new MonoReconciler(strategy,false);
- return reconciler;
- }
-
- /**
- * Instantiates and returns a double click strategy object if one does not exist, and returns the
- * current one if it does.
- */
- public ITextDoubleClickStrategy getDoubleClickStrategy(ISourceViewer sourceViewer,String contentType) {
- if (doubleClickStrategy == null)
- doubleClickStrategy = new DoubleClickStrategy();
- return doubleClickStrategy;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getPresentationReconciler(org.eclipse.jface.text.source.ISourceViewer)
- */
- @Override
- public IPresentationReconciler getPresentationReconciler(
- ISourceViewer sourceViewer) {
-
- PresentationReconciler reconciler = new PresentationReconciler();
-
- DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getSTPScanner());
- reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
- reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
-
- dr = new DefaultDamagerRepairer(getSTPScanner());
- reconciler.setDamager(dr, STPPartitionScanner.STP_COMMENT);
- reconciler.setRepairer(dr, STPPartitionScanner.STP_COMMENT);
-
- dr = new DefaultDamagerRepairer(getSTPScanner());
- reconciler.setDamager(dr, STPPartitionScanner.STP_STRING);
- reconciler.setRepairer(dr, STPPartitionScanner.STP_STRING);
-
- dr = new DefaultDamagerRepairer(getSTPScanner());
- reconciler.setDamager(dr, STPPartitionScanner.STP_KEYWORD);
- reconciler.setRepairer(dr, STPPartitionScanner.STP_KEYWORD);
-
- dr = new DefaultDamagerRepairer(getSTPScanner());
- reconciler.setDamager(dr, STPPartitionScanner.STP_CONDITIONAL);
- reconciler.setRepairer(dr, STPPartitionScanner.STP_CONDITIONAL);
-
- return reconciler;
- }
-
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPDocumentProvider.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPDocumentProvider.java
deleted file mode 100644
index 2f724a1a7b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPDocumentProvider.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.editors.stp;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentPartitioner;
-import org.eclipse.jface.text.rules.FastPartitioner;
-import org.eclipse.jface.text.source.AnnotationModel;
-import org.eclipse.jface.text.source.IAnnotationModel;
-import org.eclipse.linuxtools.systemtap.ui.editor.SimpleDocumentProvider;
-import org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.STPPartitioner;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-
-public class STPDocumentProvider extends SimpleDocumentProvider {
- private IDocument document;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.editors.text.TextFileDocumentProvider#getDocument(java.lang.Object)
- */
- @Override
- /*public IDocument getDocument(Object element) {
- document = super.getDocument(element);
- if (document != null) {
- STPPartitioner partitioner = new STPPartitioner(
- new STPPartitionScanner(),
- STPPartitionScanner.STP_PARTITION_TYPES);
-
- partitioner.connect(document, false);
- if (document.getDocumentPartitioner() == null)
- document.setDocumentPartitioner(partitioner);
- }
- return document;
- }*/
-
- protected void setupDocument(IDocument document) {
- LogManager.logDebug("Start setupDocument: document-" + document, this);
- if (document != null) {
- IDocumentPartitioner partitioner =
- new FastPartitioner(
- new STPPartitionScanner(),
- new String[] {
- STPPartitionScanner.STP_COMMENT});
- partitioner.connect(document);
- document.setDocumentPartitioner(partitioner);
- }
- LogManager.logDebug("End setupDocument:", this);
- }
-
- /**
- * Instantiates and returns a new AnnotationModel object.
- */
- protected IAnnotationModel createAnnotationModel(Object element) throws CoreException {
- LogManager.logDebug("Start/End createAnnotationModel: element-" + element, this);
- return new AnnotationModel();
- }
-
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPEditor.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPEditor.java
deleted file mode 100644
index 8459da82e3..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPEditor.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pkmuldoon@picobot.org> - initial API.
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.editors.stp;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.IVerticalRuler;
-import org.eclipse.jface.text.source.projection.ProjectionAnnotation;
-import org.eclipse.jface.text.source.projection.ProjectionAnnotationModel;
-import org.eclipse.jface.text.source.projection.ProjectionSupport;
-import org.eclipse.jface.text.source.projection.ProjectionViewer;
-import org.eclipse.linuxtools.systemtap.ui.editor.ColorManager;
-import org.eclipse.linuxtools.systemtap.ui.editor.SimpleEditor;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.texteditor.ContentAssistAction;
-import org.eclipse.ui.texteditor.ITextEditorActionConstants;
-import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
-
-public class STPEditor extends SimpleEditor {
-
- private ColorManager colorManager;
-
- private ProjectionSupport stpProjectionSupport;
- private Annotation[] stpOldAnnotations;
- private ProjectionAnnotationModel stpAnnotationModel;
-
- public STPEditor() {
- super();
- URL completionURL = null;
-
- completionURL = buildCompletionDataLocation("completion/stp_completion.properties");
- STPMetadataSingleton completionDataStore = STPMetadataSingleton.getInstance();
-
- if (completionURL != null)
- completionDataStore.build(completionURL);
-
- colorManager = new ColorManager();
- setSourceViewerConfiguration(new STPConfiguration(colorManager,this));
- setDocumentProvider(new STPDocumentProvider());
- }
-
- public void createPartControl(Composite parent)
- {
- super.createPartControl(parent);
- ProjectionViewer viewer =(ProjectionViewer)getSourceViewer();
- stpProjectionSupport = new ProjectionSupport(viewer,getAnnotationAccess(),getSharedColors());
- stpProjectionSupport.install();
- viewer.doOperation(ProjectionViewer.TOGGLE);
- stpAnnotationModel = viewer.getProjectionAnnotationModel();
- }
-
- protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
-
- ISourceViewer viewer = new ProjectionViewer(parent, ruler,
- getOverviewRuler(), isOverviewRulerVisible(), styles);
- getSourceViewerDecorationSupport(viewer);
- return viewer;
- }
-
-
- public void updateFoldingStructure(ArrayList<Position> updatedPositions)
- {
- ProjectionAnnotation annotation;
- Annotation[] updatedAnnotations = new Annotation[updatedPositions.size()];
- HashMap<ProjectionAnnotation, Position> newAnnotations = new HashMap<ProjectionAnnotation, Position>();
- for(int i =0;i<updatedPositions.size();i++)
- {
- annotation = new ProjectionAnnotation();
- newAnnotations.put(annotation,updatedPositions.get(i));
- updatedAnnotations[i]=annotation;
- }
- stpAnnotationModel.modifyAnnotations(stpOldAnnotations,newAnnotations,null);
- stpOldAnnotations = updatedAnnotations;
- }
-
- protected void createActions() {
- Action action = new ContentAssistAction(ResourceBundle.getBundle("org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.strings"), "ContentAssistProposal.", this);
- String id = ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS;
- action.setActionDefinitionId(id);
- setAction("ContentAssistProposal", action);
- markAsStateDependentAction("ContentAssistProposal", true);
- super.createActions();
- }
-
- public ISourceViewer getMySourceViewer() {
- return this.getSourceViewer();
- }
-
- public void dispose() {
- colorManager.dispose();
- super.dispose();
- }
-
- protected void editorContextMenuAboutToShow(IMenuManager menu) {
-
- super.editorContextMenuAboutToShow(menu);
- addAction(menu, ITextEditorActionConstants.GROUP_EDIT,
- ITextEditorActionConstants.SHIFT_RIGHT);
- addAction(menu, ITextEditorActionConstants.GROUP_EDIT,
- ITextEditorActionConstants.SHIFT_LEFT);
-
- }
-
- private URL buildCompletionDataLocation(String completionDataLocation) {
- URL completionURLLocation = null;
- try {
- completionURLLocation = getCompletionURL(completionDataLocation);
- } catch (IOException e) {
- completionURLLocation = null;
- }
-
- if (completionURLLocation == null) {
- IDEPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, IDEPlugin.PLUGIN_ID,
- IStatus.OK, "Cannot locate plug-in location for System Tap completion metadata " +
- "(completion/stp_completion.properties). Completions are not available.", null));
- return null;
- }
-
- File completionFile = new File(completionURLLocation.getFile());
- if ((completionFile == null) || (!completionFile.exists()) || (!completionFile.canRead())) {
- IDEPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, IDEPlugin.PLUGIN_ID,
- IStatus.OK, "Cannot find System Tap completion metadata at " +completionFile.getPath() +
- "Completions are not available.", null));
-
- return null;
- }
-
- return completionURLLocation;
-
- }
- private URL getCompletionURL(String completionLocation) throws IOException {
- URL fileURL = null;
- URL location = IDEPlugin.getDefault().getBundle().getEntry(completionLocation);
-
- if (location != null)
- fileURL = FileLocator.toFileURL(location);
- return fileURL;
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPElementScanner.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPElementScanner.java
deleted file mode 100644
index 719e521ad9..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPElementScanner.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.ui.ide.editors.stp;
-
-
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.rules.BufferedRuleBasedScanner;
-import org.eclipse.jface.text.rules.EndOfLineRule;
-import org.eclipse.jface.text.rules.IRule;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.IWhitespaceDetector;
-import org.eclipse.jface.text.rules.IWordDetector;
-import org.eclipse.jface.text.rules.MultiLineRule;
-import org.eclipse.jface.text.rules.SingleLineRule;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.rules.WhitespaceRule;
-import org.eclipse.jface.text.rules.WordRule;
-import org.eclipse.linuxtools.systemtap.ui.editor.ColorManager;
-import org.eclipse.swt.SWT;
-
-public class STPElementScanner extends BufferedRuleBasedScanner {
-
- private String[] keywordList= {"probe", "for", "else", "foreach", "exit", "printf", "in", "return",
- "break", "global", "next", "while", "if", "delete", "#include", "function", "do",
- "print", "error","log", "printd", "printdln", "println", "sprint", "sprintf", "system", "warn"};
-
-
-// TODO: Not sure if we want these keywords or not. Defer for now.
-// "backtrace", "caller", "caller_addr", "cpu", "egid", "euid", "execname", "gid", "is_return",
-// "pexecname", "pid", "ppid", "tid", "uid", "print_backtrace", "print_regs", "print_stack",
-// "stack_size", "stack_unused", "stack_used", "stp_pid", "target"};
-
- /**
- *
- * Build Element scanner for Syntax Highlighting for Systemtap Editor
- *
- * @param manager ColorManager to source highlighting.
- *
- */
- public STPElementScanner(ColorManager manager) {
- IToken defaultToken = new Token(new TextAttribute(manager
- .getColor(STPColorConstants.DEFAULT)));
-
- IToken keywordToken = new Token(new TextAttribute(manager
- .getColor(STPColorConstants.KEYWORD),null,SWT.BOLD));
-
- IToken commentToken = new Token(new TextAttribute(manager
- .getColor(STPColorConstants.COMMENT)));
-
- IToken stringToken = new Token(new TextAttribute(manager
- .getColor(STPColorConstants.STP_STRING)));
-
-
- // Build keyword scanner
- WordRule keywordsRule = new WordRule(new IWordDetector() {
-
- public boolean isWordStart(char c) {
- // probe kernel.function("schedule") is a valid name in
- // Systemtap, but we do not want to highlight the function
- // here as a keyword. Same with foo.return and so on.
- if (c == '.') {
- return true;
- }
-
- return Character.isJavaIdentifierStart(c);
- }
-
- public boolean isWordPart(char c) {
- // Set isWordStart for . rule.
- if (c == '.') {
- return true;
- }
-
- return Character.isJavaIdentifierPart(c);
- }
-
- }, defaultToken, true);
-
- for (int i=0; i<keywordList.length; i++)
- keywordsRule.addWord(keywordList[i], keywordToken);
-
- setRules(new IRule[] {
- new MultiLineRule("/*", "*/", commentToken),
- new EndOfLineRule("/*", commentToken),
- new EndOfLineRule("#", commentToken),
- new EndOfLineRule("//", commentToken),
- new EndOfLineRule("#if", defaultToken),
- new EndOfLineRule("#else", defaultToken),
- new EndOfLineRule("#endif", defaultToken),
- new EndOfLineRule("#define", defaultToken),
- new SingleLineRule("\"", "\"", stringToken, '\\'),
- new SingleLineRule("'", "'", stringToken, '\\'),
- keywordsRule,
- new WhitespaceRule(new IWhitespaceDetector() {
- public boolean isWhitespace(char c) {
- return Character.isWhitespace(c);
- }
- }),
- });
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPMetadataSingleton.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPMetadataSingleton.java
deleted file mode 100644
index 48bb3adf4b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPMetadataSingleton.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.editors.stp;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.PrintStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.ResourceBundle;
-
-/**
- *
- * Build and hold completion metadata fo Systemtap. This originally is generated from stap coverage data
- *
- *
- */
-
-// TODO: Generate a strategy to determine when meta-data is older than what is currently available. Right now
-// the generation of new meta-data is too slow to do this efficiently.
-public class STPMetadataSingleton {
-
-
- private static STPMetadataSingleton instance = null;
- private static HashMap<String, ArrayList<String>> builtMetadata = new HashMap<String, ArrayList<String>>();
-
- private static boolean barLookups = false;
-
- // Not a true singleton, but enough for the simplistic purpose
- // it has to serve.
- protected STPMetadataSingleton() {
- }
-
- public static STPMetadataSingleton getInstance() {
- if (instance == null) {
- instance = new STPMetadataSingleton();
- }
- return instance;
- }
-
- /**
- * Given the parameter return the completion proposals that best match the data.
- *
- * @param match - completion hint.
- *
- * @return - completion proposals.
- *
- */
- public static String[] getCompletionResults(String match) {
-
- ArrayList<String> data = new ArrayList<String>();
-
- // TODO: Until an error strategy is devised to better inform
- // the user that there was a problem compiling completions other than
- // a modal error dialog, or a log message use this.
- if (barLookups)
- return new String[] {"No completion data found."};
-
- // Check to see if the proposal hint included a <tapset>.<partialprobe>
- // or just a <probe>. (ie syscall. or syscall.re).
- boolean tapsetAndProbeIncluded = isTapsetAndProbe(match);
-
- // If the result is a tapset and partial probe, get the tapset, then
- /// narrow down the list with partial probe matches.
- if (tapsetAndProbeIncluded) {
- ArrayList<String> temp = builtMetadata.get(getTapset(match));
- String probe = getTapsetProbe(match);
- for (int i=0; i<temp.size(); i++) {
- if (temp.get(i).startsWith(probe)) {
- data.add(temp.get(i));
- }
- }
- }
- // If the result was a <tapset>, return all <probe> matches.
- else
- data = builtMetadata.get(match);
-
- if (data == null)
- return new String[] {};
- else
- return data.toArray(new String[0]);
- }
-
- /**
- *
- * From the file, read the metadata. The data follows the format of
- *
- * <tapset>.<probe>(<parameter list>)
- *
- * ie
- *
- * tcp.disconnect(name:string,sock:long,flags:long)
- * @param fileURL
-
- * @throws IOException
- *
- */
- private void readCompletionMetadata(URL fileURL) throws IOException {
- try {
- BufferedReader input = new BufferedReader(new FileReader(new File(fileURL.getFile())));
- try {
- String line = null;
- while ((line = input.readLine()) != null) {
- String tapset = "";
- String probe = "";
- try {
- tapset = getTapset(line);
- probe = getTapsetProbe(line);
- } catch (Exception e) {
- continue;
- }
- ArrayList<String> data = builtMetadata.get(tapset);
- if (data == null)
- data = new ArrayList<String>();
-
- data.add(probe);
- builtMetadata.put(tapset, data);
- }
- } finally {
- input.close();
- }
- } catch (IOException ex) {
- throw ex;
- }
- }
-
- /**
- * Given data, decide whether it is comprised of a <tapset>.<probe>
- * hint, or just a <tapset>.
- *
- * @param data - hint data
- * @return
- */
- private static boolean isTapsetAndProbe(String data) {
- if (data.indexOf('.') >= 0)
- return true;
-
- return false;
- }
-
- /**
- * Given data, extract <tapset>
- *
- * @param data - hint data
- * @return
- */
- private static String getTapset(String data) {
- int i = data.indexOf('.');
- if (i < 0)
- throw new StringIndexOutOfBoundsException();
- return data.substring(0, data.indexOf('.'));
- }
-
- /**
- * Given data, extract <probe>
- *
- * @param data - hint data
- * @return
- */
- private static String getTapsetProbe(String data) {
- int i = data.indexOf('.');
- if (i < 0)
- throw new StringIndexOutOfBoundsException();
- return data.substring(data.indexOf('.') + 1, data.length());
- }
-
- /**
- *
- * Decide whether cached metadata exists on disk.
- *
- * @return - whether metadata exists.
- */
- private boolean haveMetadata(String location) {
- File fileExists = new File(location);
- if ((fileExists.canRead()) && fileExists.exists())
- return true;
-
- return false;
- }
-
- /**
- *
- * Build the metadata from visiting the tapsets in turn and
- * requesting coverage data from each one.
- *
- * @throws FileNotFoundException
- *
- */
- private void buildCompletionMetadata(String location) throws FileNotFoundException {
- String[] tapsets = { "syscall", "signal", "netdev", "ioblock",
- "ioscheduler", "nd_syscall", "vm", "nfsd", "process", "sunrpc",
- "scheduler", "scsi", "socket", "tcp", "udp", "generic.fop" };
- ArrayList<StringBuffer> processedMetadata = new ArrayList<StringBuffer>();
- boolean openingBracket = false;
-
- // Execute each tapset, then convert the output from stdin
- // to a format more acceptable to completion.
- for (int i = 0; i < tapsets.length; i++) {
- StringBuffer[] data = executeSystemTap(tapsets[i]);
- for (int z = 0; z < data.length; z++) {
- openingBracket = false;
- for (int c = 0; c < data[z].length(); c++) {
- if (data[z].charAt(c) == ' ')
- if (openingBracket == false) {
- openingBracket = true;
- data[z].setCharAt(c, '(');
- } else {
- data[z].setCharAt(c, ',');
- }
- }
- data[z].append(')');
- processedMetadata.add(data[z]);
- }
-
- }
-
- // Output massaged data from stdout to a text file.
- PrintStream out = null;
- try {
- out = new PrintStream(new FileOutputStream(location));
- } catch (FileNotFoundException e) {
- throw e;
- }
- Iterator<StringBuffer> i = processedMetadata.iterator();
- while (i.hasNext()) {
- StringBuffer line = i.next();
- out.println(line.toString().trim());
- }
- out.close();
- }
-
- /**
- *
- * Execute Systemtap binary, cpature stdout and return.
- *
- * @param tapset to request coverage data from.
- * @return
- */
-
- // TODO: This could stand to be completely rewritten to be safer,
- // and be tolerant of faults. As it is we ship default meta-data
- // so this should never be executed in the user context. But eventually
- // an option will be made available to the user to regenerate the data.
- private StringBuffer[] executeSystemTap(String tapset) {
-
- ArrayList<StringBuffer> data = new ArrayList<StringBuffer>();
-
- try {
- String a;
- Process p = Runtime.getRuntime().exec(
- "stap -L " + tapset + ".*");
- BufferedReader in = new BufferedReader(new InputStreamReader(p
- .getInputStream()), 5000);
- while ((a = in.readLine()) != null) {
- data.add(new StringBuffer(a));
- }
- p.waitFor();
- in.close();
- } catch (IOException e) {
- return new StringBuffer[] {};
- }
-
- catch (java.lang.InterruptedException ie) {
- return new StringBuffer[] {};
- }
-
- return data.toArray(new StringBuffer[0]);
- }
-
- public void parse(ResourceBundle bundle) {
- System.out.println(System.getProperty("user.pwd"));
-
- System.out.println(System.getProperties());
- // System.out.println(bundle.containsKey("syscall"));
- // System.out.println(bundle.containsKey("syscall."));
- System.out.println(bundle.getKeys());
- }
-
- public void build(URL fileURL) {
- try {
-// if (!haveMetadata(location))
-// buildCompletionMetadata(location);
- readCompletionMetadata(fileURL);
- } catch (IOException e) {
- barLookups = true;
- }
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPPartitionScanner.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPPartitionScanner.java
deleted file mode 100644
index 0d9194456f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPPartitionScanner.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.ui.ide.editors.stp;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.rules.EndOfLineRule;
-import org.eclipse.jface.text.rules.ICharacterScanner;
-import org.eclipse.jface.text.rules.IPredicateRule;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.IWordDetector;
-import org.eclipse.jface.text.rules.MultiLineRule;
-import org.eclipse.jface.text.rules.RuleBasedPartitionScanner;
-import org.eclipse.jface.text.rules.SingleLineRule;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.rules.WordRule;
-
-public class STPPartitionScanner extends RuleBasedPartitionScanner {
- public final static String STP_COMMENT = "__stp_comment";
- public final static String STP_KEYWORD = "__stp_keyword";
- public final static String STP_STRING = "__stp_string";
- public final static String STP_CONDITIONAL = "__stp_conditional";
-
- public static String[] STP_PARTITION_TYPES = { IDocument.DEFAULT_CONTENT_TYPE,
- STP_COMMENT, STP_KEYWORD, STP_STRING, STP_CONDITIONAL};
-
- /**
- * Detect empty comments
- */
- static class EmptyCommentDetector implements IWordDetector {
- public boolean isWordStart(char c) {
- return (c == '/');
- }
-
- public boolean isWordPart(char c) {
- return (c == '*' || c == '/');
- }
- }
-
- /**
- * Cope with the empty comment issue.
- */
- static class EmptyCommentRule extends WordRule implements IPredicateRule {
-
- private IToken fSuccessToken;
-
- public EmptyCommentRule(IToken successToken) {
- super(new EmptyCommentDetector());
- fSuccessToken= successToken;
- addWord("/**/", fSuccessToken); //$NON-NLS-1$
- }
-
- public IToken evaluate(ICharacterScanner scanner, boolean resume) {
- return evaluate(scanner);
- }
-
- public IToken getSuccessToken() {
- return fSuccessToken;
- }
- }
-
- public STPPartitionScanner() {
-
- IToken stpComment = new Token(STP_COMMENT);
- IToken stpString = new Token(STP_STRING);
- IToken stpConditional = new Token(STP_CONDITIONAL);
-
- // Add special case word rule.
- EmptyCommentRule emptyCommentRule= new EmptyCommentRule(stpComment);
-
- setPredicateRules(new IPredicateRule[] {
- new MultiLineRule("/*", "*/", stpComment),
- new EndOfLineRule("/*", stpComment),
- new EndOfLineRule("#", stpComment),
- new EndOfLineRule("//", stpComment),
- emptyCommentRule,
- new EndOfLineRule("#if", stpConditional),
- new EndOfLineRule("#else", stpConditional),
- new EndOfLineRule("#endif", stpConditional),
- new EndOfLineRule("#define", stpConditional),
- new SingleLineRule("\"", "\"", stpString, '\\'),
- new SingleLineRule("'", "'", stpString, '\\'),
- });
-
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPPartitioner.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPPartitioner.java
deleted file mode 100644
index 3fa549ed82..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPPartitioner.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.systemtap.ui.ide.editors.stp;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITypedRegion;
-import org.eclipse.jface.text.rules.FastPartitioner;
-import org.eclipse.jface.text.rules.IPartitionTokenScanner;
-
-public class STPPartitioner extends FastPartitioner {
-
- /**
- * Straight forward FastPartitioner, with debug output.
- *
- * Taken directly from org.eclipse.linuxtools.rpm.ui.editor.SpecFilePartitioner.
- * No noteworthy alterations so Copyright header and license text untouched.
- *
- * @param scanner
- * @param legalContentTypes
- */
- public STPPartitioner(IPartitionTokenScanner scanner, String[] legalContentTypes) {
- super(scanner, legalContentTypes);
- }
-
- @Override
- public void connect(IDocument document, boolean delayInitialization) {
- super.connect(document, delayInitialization);
-// printPartitions(document);
- }
-
- public void printPartitions(IDocument document) {
- StringBuffer buffer = new StringBuffer();
- ITypedRegion[] partitions = computePartitioning(0, document.getLength());
- for (int i = 0; i < partitions.length; i++) {
- try {
- buffer.append("Partition type: "
- + partitions[i].getType()
- + ", offset: " + partitions[i].getOffset()
- + ", length: " + partitions[i].getLength());
- buffer.append("\n");
- buffer.append("Text:\n");
- buffer.append(document.get(partitions[i].getOffset(),
- partitions[i].getLength()));
- buffer.append("\n---------------------------------------\n\n\n");
- } catch (org.eclipse.jface.text.BadLocationException e) {
- e.printStackTrace();
- }
- }
- System.out.println(buffer);
- };
-
-}
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPReconcilingStrategy.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPReconcilingStrategy.java
deleted file mode 100644
index 41a72657c7..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPReconcilingStrategy.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.editors.stp;
-
-import java.util.ArrayList;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.reconciler.DirtyRegion;
-import org.eclipse.jface.text.reconciler.IReconcilingStrategy;
-import org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension;
-import org.eclipse.swt.widgets.Display;
-
-/**
- *
- * Reconciling strategy for Systemtap editor code folding positions. The positional aspects
- * of document tag discovery should really be placed with a position builder
- *
- */
-public class STPReconcilingStrategy implements IReconcilingStrategy,
- IReconcilingStrategyExtension {
-
- // Constants
- protected static final int STP_NO_TAG = 0;
- protected static final int STP_MULTILINE_COMMENT_TAG = 1;
- protected static final int STP_PROBE = 2;
- protected static final int STP_FUNCTION = 3;
-
- // Next Character Position
- protected int nextCharPosition = 0;
-
- // Current tag start
- protected int currentTagStart = 0;
-
- // Current tag end
- protected int currentTagEnd = 0;
-
- // List of positions
- protected final ArrayList<Position> documentPositionList = new ArrayList<Position>();
-
- // The end offset of the range to be scanned *//*
- protected int endOfDocumentPostion;
-
- private IDocument currentDocument;
- private STPEditor currentEditor;
-
- /**
- * Sets the current editor.
- */
- public void setEditor(STPEditor editor) {
- this.currentEditor = editor;
- }
-
- /**
- * Sets the current (ie working) document.
- */
- public void setDocument(IDocument document) {
- this.currentDocument = document;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.reconciler.IReconcilingStrategy#reconcile(org.eclipse.jface.text.IRegion)
- */
- public void reconcile(IRegion partition) {
- // Just rebuild the whole document
- initialReconcile();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.reconciler.IReconcilingStrategy#reconcile(org.eclipse.jface.text.reconciler.DirtyRegion, org.eclipse.jface.text.IRegion)
- */
- public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
- //Just rebuild the whole document
- initialReconcile();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension#initialReconcile()
- */
- public void initialReconcile() {
- endOfDocumentPostion = currentDocument.getLength();
- try {
- calculatePositions();
- } catch (BadLocationException e) {
- // Cannot reconcile, return
- return;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension#setProgressMonitor(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void setProgressMonitor(IProgressMonitor monitor) {
-
- }
-
- /**
- *
- * From currentDocument, calculate beginning of document
- * to endOfDocumentPostion to build positions for code folding.
- *
- * @throws BadLocationException
- */
- private void calculatePositions() throws BadLocationException {
- // Clear old positions and reset to beginning of document
- documentPositionList.clear();
- nextCharPosition = 0;
-
- // Build the actual document positions
- buildPositions();
-
- // Paint the folding annotations in the background.
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- currentEditor.updateFoldingStructure(documentPositionList);
- }
- });
- }
-
- /**
- *
- * Start trying to guess if given char z, what - if any - tag this
- * begins.
- *
- * @param location - location of current position
- * @return - tag type, if any
- *
- * @throws BadLocationException
- */
- private int classifyComponent(int location) throws BadLocationException {
- int deltaLocation = location;
- char ch = currentDocument.getChar(deltaLocation);
- switch (ch) {
- // The 'comment' case.
- case '/':
- deltaLocation++;
- ch = currentDocument.getChar(deltaLocation);
- if (ch == '*') {
- currentTagStart = location;
- deltaLocation++;
- nextCharPosition = deltaLocation;
- return STP_MULTILINE_COMMENT_TAG;
- }
- break;
- // The 'probe' case.
- case 'p':
- if (isProbe()) {
- currentTagStart = location;
- return STP_PROBE;
- }
-
- // The 'function' case.
- case 'f':
- if (isFunction()) {
- currentTagStart = location;
- return STP_FUNCTION;
- }
- // No tag, don't fold region.
- default:
- break;
- }
- return STP_NO_TAG;
- }
-
- /**
- *
- * Build a list of locations to mark beginning and end of folding regions.
- *
- * @throws BadLocationException
- */
- private void buildPositions() throws BadLocationException {
- while (nextCharPosition < endOfDocumentPostion) {
- switch (classifyComponent(nextCharPosition))
- {
- // All of these cases have found the beginning of a tag
- // to start folding. Each element must now be find
- // the end of the region it represents.
- case STP_MULTILINE_COMMENT_TAG:
- currentTagEnd = findEndOfComment();
- writePosition(currentTagStart,currentTagEnd);
- nextCharPosition = currentTagStart + currentTagEnd;
- break;
- case STP_PROBE:
- case STP_FUNCTION:
- currentTagEnd = findEndOfProbeOrFunction();
- writePosition(currentTagStart,currentTagEnd);
- nextCharPosition = currentTagStart + currentTagEnd;
- break;
- default:
- nextCharPosition++;
- break;
- }
- }
- }
-
- /**
- *
- * Write a Position to the position list.
- *
- * @param startOffset - start of position in the document.
- * @param length - length of position.
- *
- */
- protected void writePosition(int startOffset, int length) {
- if (length > 0)
- documentPositionList.add(new Position(startOffset, length));
- }
-
- private boolean isProbe() throws BadLocationException {
- return matchKeyWord("probe");
- }
-
- private boolean isFunction() throws BadLocationException {
- return matchKeyWord("function");
- }
-
- private boolean matchKeyWord(String word) throws BadLocationException {
- StringBuffer keyWord = new StringBuffer();
- int location = nextCharPosition;
- while (location < endOfDocumentPostion) {
- char ch = currentDocument.getChar(location);
- if ((ch == ' ') || (!Character.isLetter(ch)))
- break;
- else
- keyWord.append(ch);
- location++;
- }
- if (keyWord.toString().compareTo(word) == 0)
- return true;
- return false;
- }
-
- private int findEndOfProbeOrFunction() throws BadLocationException {
- int bracketCount = 0;
- boolean firstBracket = false;
- char ch;
-
- while (nextCharPosition < endOfDocumentPostion) {
- ch = currentDocument.getChar(nextCharPosition);
- if (ch == '{') {
- firstBracket = true;
- bracketCount++;
- }
- if (ch == '}')
- bracketCount--;
- if ((bracketCount == 0) && (firstBracket))
- return (nextCharPosition-currentTagStart)+2;
- nextCharPosition++;
- }
- return -1;
- }
-
- private int findEndOfComment() throws BadLocationException {
- while (nextCharPosition < endOfDocumentPostion) {
- char ch = currentDocument.getChar(nextCharPosition);
- if (ch == '*') {
- nextCharPosition++;
- ch = currentDocument.getChar(nextCharPosition);
- if (ch == '/')
- return (nextCharPosition-currentTagStart)+2;
- }
- nextCharPosition++;
- }
- return -1;
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/strings.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/strings.properties
deleted file mode 100644
index 8767bb5cea..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/strings.properties
+++ /dev/null
@@ -1,568 +0,0 @@
-syscall.accept(name:string,sockfd:long,addr_uaddr:long,addrlen_uaddr:long,argstr:string)
-syscall.access(name:string,pathname:string,mode:long,mode_str:string,argstr:string)
-syscall.acct(name:string,filename:string,argstr:string)
-syscall.add_key(name:string,type_uaddr:long,description_auddr:long,payload_uaddr:long,plen:long,ringid:long,argstr:string)
-syscall.adjtimex(name:string,argstr:string)
-syscall.alarm(name:string,seconds:long,argstr:string)
-syscall.arch_prctl(name:string,code:long,addr:long,argstr:string)
-syscall.bdflush(name:string,func:long,data:long,data_str:string,argstr:string)
-syscall.bind(name:string,sockfd:long,my_addr_uaddr:long,addrlen:long,argstr:string)
-syscall.brk(name:string,brk:long,argstr:string)
-syscall.capget(name:string,header_uaddr:long,data_uaddr:long,argstr:string)
-syscall.capset(name:string,header_uaddr:long,data_uaddr:long,argstr:string)
-syscall.chdir(name:string,path:string,argstr:string)
-syscall.chmod(name:string,path:string,mode:long,argstr:string)
-syscall.chown(name:string,path:string,owner:long,group:long,argstr:string)
-syscall.chown16(name:string,path:string,owner:long,group:long,argstr:string)
-syscall.chroot(name:string,path:string,argstr:string)
-syscall.clock_getres(name:string,clk_id:long,clk_id_str:string,res_uaddr:long,argstr:string)
-syscall.clock_gettime(name:string,clk_id:long,clk_id_str:string,argstr:string)
-syscall.clock_nanosleep(name:string,flag_str:string,argstr:string)
-syscall.clock_settime(name:string,clk_id:long,clk_id_str:string,tp_uaddr:long,argstr:string)
-syscall.close(name:string,fd:long,argstr:string)
-syscall.compat_adjtimex(name:string,argstr:string)
-syscall.compat_clock_nanosleep(name:string,flag_str:string,argstr:string)
-syscall.compat_execve(name:string,filename:string,args:string,argstr:string)
-syscall.compat_futex(name:string,futex_uaddr:long,op:long,val:long,utime_uaddr:long,uaddr2_uaddr:long,val3:long,argstr:string)
-syscall.compat_futimesat(name:string,dirfd:long,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
-syscall.compat_getitimer(name:string,which:long,value_uaddr:long,argstr:string)
-syscall.compat_io_setup(name:string,maxevents:long,ctxp_uaddr:long,argstr:string)
-syscall.compat_io_submit(name:string,ctx_id:long,nr:long,iocbpp_uaddr:long,argstr:string)
-syscall.compat_nanosleep(name:string,req_uaddr:long,rem_uaddr:long,argstr:string)
-syscall.compat_ppoll(name:string,argstr:string)
-syscall.compat_pselect6(name:string,argstr:string)
-syscall.compat_pselect7a(name:string,argstr:string)
-syscall.compat_select(name:string,n:long,readfds_uaddr:long,writefds_uaddr:long,exceptfds_uaddr:long,timeout_uaddr:long,argstr:string)
-syscall.compat_setitimer(name:string,which:long,value_uaddr:long,ovalue_uaddr:long,argstr:string)
-syscall.compat_signalfd(name:string,argstr:string)
-syscall.compat_sys_msgctl(name:string,argstr:string)
-syscall.compat_sys_msgrcv(name:string,argstr:string)
-syscall.compat_sys_msgsnd(name:string,argstr:string)
-syscall.compat_sys_recvmsg(name:string,s:long,msg_uaddr:long,flags:long,argstr:string)
-syscall.compat_sys_semctl(name:string,argstr:string)
-syscall.compat_sys_semtimedop(name:string,semid:long,sops_uaddr:long,nsops:long,timeout_uaddr:long,argstr:string)
-syscall.compat_sys_sendmsg(name:string,s:long,msg_uaddr:long,flags:long,argstr:string)
-syscall.compat_sys_shmat(name:string,first:long,second:long,third:long,uptr_uaddr:long,argstr:string)
-syscall.compat_sys_shmctl(name:string,first:long,second:long,uptr_uaddr:long,argstr:string)
-syscall.compat_sys_utimes(name:string,filename:string,argstr:string)
-syscall.compat_utime(name:string,filename_uaddr:long,filename:string,buf_uaddr:long,actime:long,modtime:long,argstr:string)
-syscall.compat_utimensat(name:string,argstr:string)
-syscall.compat_vmsplice(name:string,argstr:string)
-syscall.connect(name:string,sockfd:long,serv_addr_uaddr:long,addrlen:long,argstr:string)
-syscall.creat(name:string,mode:long,pathname:string,argstr:string)
-syscall.delete_module(name:string,name_user:string,flags:long,argstr:string)
-syscall.dup(name:string,oldfd:long,argstr:string)
-syscall.dup2(name:string,oldfd:long,newfd:long,argstr:string)
-syscall.epoll_create(name:string,size:long,argstr:string)
-syscall.epoll_ctl(name:string,epfd:long,op:long,op_str:string,fd:long,event_uaddr:long,argstr:string)
-syscall.epoll_pwait(name:string,argstr:string)
-syscall.epoll_wait(name:string,epfd:long,events_uaddr:long,maxevents:long,timeout:long,argstr:string)
-syscall.eventfd(name:string,argstr:string)
-syscall.execve(name:string,filename:string,args:string,argstr:string)
-syscall.exit(name:string,status:long,argstr:string)
-syscall.exit_group(name:string,status:long,argstr:string)
-syscall.faccessat(name:string,dfd:long,dfd_str:string,filename:long,filename_str:string,mode:long,mode_str:string,argstr:string)
-syscall.fadvise64(name:string,fs:long,offset:long,len:long,advice:long,argstr:string)
-syscall.fadvise64_64(name:string,fs:long,offset:long,len:long,advice:long,argstr:string)
-syscall.fchdir(name:string,fd:long,argstr:string)
-syscall.fchmod(name:string,fildes:long,mode:long,argstr:string)
-syscall.fchmodat(name:string,dfd:long,dfd_str:string,filename:long,filename_str:string,mode:long,argstr:string)
-syscall.fchown(name:string,fd:long,owner:long,group:long,argstr:string)
-syscall.fchown16(name:string,fd:long,owner:long,group:long,argstr:string)
-syscall.fchownat(name:string,dfd:long,dfd_str:string,filename:long,filename_str:string,user:long,group:long,flag:long,flag_str:string,argstr:string)
-syscall.fcntl(name:string,fd:long,cmd:long,cmd_str:string,arg:long,argstr:string)
-syscall.fdatasync(name:string,fd:long,argstr:string)
-syscall.fgetxattr(name:string,filedes:long,name2:string,value_uaddr:long,size:long,argstr:string)
-syscall.flistxattr(name:string,filedes:long,list_uaddr:long,size:long,argstr:string)
-syscall.flock(name:string,fd:long,operation:long,argstr:string)
-syscall.fork(clone_flags:long,stack_start:long,regs:long,stack_size:long,parent_tid_uaddr:long,child_tid_uaddr:long,name:string,argstr:string)
-syscall.fremovexattr(name:string,filedes:long,name_uaddr:long,argstr:string)
-syscall.fsetxattr(name:string,filedes:long,name2:string,value_uaddr:long,size:long,flags:long,argstr:string)
-syscall.fstat(name:string,filedes:long,buf_uaddr:long,argstr:string)
-syscall.fstatat(name:string,dirfd:long,path:string,buf_uaddr:long,argstr:string)
-syscall.fstatfs(name:string,fd:long,buf_uaddr:long,argstr:string)
-syscall.fstatfs64(name:string,fd:long,sz:long,buf_uaddr:long,argstr:string)
-syscall.fsync(name:string,fd:long,argstr:string)
-syscall.ftruncate(name:string,fd:long,length:long,argstr:string)
-syscall.futex(name:string,futex_uaddr:long,op:long,val:long,utime_uaddr:long,uaddr2_uaddr:long,val3:long,argstr:string)
-syscall.futimesat(name:string,dirfd:long,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
-syscall.get_mempolicy(name:string,policy_uaddr:long,nmask_uaddr:long,maxnode:long,addr:long,flags:long,argstr:string)
-syscall.getcwd(name:string,buf_uaddr:long,size:long,argstr:string)
-syscall.getdents(name:string,fd:long,dirp_uaddr:long,count:long,argstr:string)
-syscall.getegid(name:string,argstr:string)
-syscall.geteuid(name:string,argstr:string)
-syscall.getgid(name:string,argstr:string)
-syscall.getgroups(name:string,size:long,list_uaddr:long,argstr:string)
-syscall.gethostname(name:string,name_uaddr:long,len:long,argstr:string)
-syscall.getitimer(name:string,which:long,value_uaddr:long,argstr:string)
-syscall.getpeername(name:string,s:long,name_uaddr:long,namelen_uaddr:long,argstr:string)
-syscall.getpgid(name:string,pid:long,argstr:string)
-syscall.getpgrp(name:string,argstr:string)
-syscall.getpid(name:string,argstr:string)
-syscall.getppid(name:string,argstr:string)
-syscall.getpriority(name:string,which:long,who:long,argstr:string)
-syscall.getresgid(name:string,rgid_uaddr:long,egid_uaddr:long,sgid_uaddr:long,argstr:string)
-syscall.getresuid(name:string,ruid_uaddr:long,euid_uaddr:long,suid_uaddr:long,argstr:string)
-syscall.getrlimit(name:string,resource:long,rlim_uaddr:long,argstr:string)
-syscall.getrusage(name:string,who:long,who_str:string,usage_uaddr:long,argstr:string)
-syscall.getsid(name:string,pid:long,argstr:string)
-syscall.getsockname(name:string,s:long,name_uaddr:long,namelen_uaddr:long,argstr:string)
-syscall.getsockopt(name:string,fd:long,level:long,level_str:string,optname:long,optname_str:string,optval_uaddr:long,optlen_uaddr:long,argstr:string)
-syscall.gettid(name:string,argstr:string)
-syscall.gettimeofday(name:string,tv_uaddr:long,tz_uaddr:long,argstr:string)
-syscall.getuid(name:string,argstr:string)
-syscall.getxattr(name:string,path:string,name2:string,value_uaddr:long,size:long,argstr:string)
-syscall.init_module(name:string,umod_uaddr:long,len:long,uargs:string,argstr:string)
-syscall.inotify_add_watch(name:string,fd:long,mask:long,path_uaddr:long,path:string,argstr:string)
-syscall.inotify_init(name:string,argstr:string)
-syscall.inotify_rm_watch(name:string,fd:long,wd:long,argstr:string)
-syscall.io_cancel(name:string,ctx_id:long,iocb_uaddr:long,result_uaddr:long,argstr:string)
-syscall.io_destroy(name:string,ctx:long,argstr:string)
-syscall.io_getevents(name:string,ctx_id:long,min_nr:long,nr:long,events_uaddr:long,timeout_uaddr:long,timestr:string,argstr:string)
-syscall.io_setup(name:string,maxevents:long,ctxp_uaddr:long,argstr:string)
-syscall.io_submit(name:string,ctx_id:long,nr:long,iocbpp_uaddr:long,argstr:string)
-syscall.ioctl(name:string,fd:long,request:long,argp:long,argstr:string)
-syscall.ioperm(name:string,from:long,num:long,turn_on:long,argstr:string)
-syscall.iopl(name:string,level:long,argstr:string)
-syscall.ioprio_get(name:string,which:long,who:long,argstr:string)
-syscall.ioprio_set(name:string,which:long,who:long,ioprio:long,argstr:string)
-syscall.kexec_load(name:string,entry:long,nr_segments:long,segments_uaddr:long,flags:long,argstr:string)
-syscall.keyctl(name:string,argstr:string)
-syscall.kill(name:string,pid:long,sig:long,argstr:string)
-syscall.lchown(name:string,path:string,owner:long,group:long,argstr:string)
-syscall.lchown16(name:string,path:string,owner:long,group:long,argstr:string)
-syscall.lgetxattr(name:string,path:string,name2:string,value_uaddr:long,size:long,argstr:string)
-syscall.link(name:string,oldpath:string,newpath:string,argstr:string)
-syscall.linkat(name:string,olddfd:long,olddfd_str:string,oldname:long,oldname_str:string,newdfd:long,newdfd_str:string,newname:long,newname_str:string,flags:long,flags_str:string,argstr:string)
-syscall.listen(name:string,sockfd:long,backlog:long,argstr:string)
-syscall.listxattr(name:string,list_uaddr:long,size:long,path_uaddr:long,path:string,argstr:string)
-syscall.llistxattr(name:string,list_uaddr:long,size:long,path_uaddr:long,path:string,argstr:string)
-syscall.llseek(name:string,fd:long,offset_high:long,offset_low:long,result_uaddr:long,whence:long,whence_str:string,argstr:string)
-syscall.lookup_dcookie(name:string,cookie:long,buffer_uaddr:long,len:long,argstr:string)
-syscall.lremovexattr(name:string,name_uaddr:long,name2:string,path_uaddr:long,path:string,argstr:string)
-syscall.lseek(name:string,fildes:long,offset:long,whence:long,whence_str:string,argstr:string)
-syscall.lsetxattr(name:string,path_uaddr:long,path:string,name_uaddr:long,name_str:string,value_uaddr:long,size:long,flags:long,argstr:string)
-syscall.lstat(name:string,path:string,buf_uaddr:long,argstr:string)
-syscall.madvise(name:string,start:long,length:long,advice:long,advice_str:string,argstr:string)
-syscall.mbind(name:string,start:long,len:long,mode:long,nmask_uaddr:long,maxnode:long,flags:long,argstr:string)
-syscall.migrate_pages(name:string,argstr:string)
-syscall.mincore(name:string,start:long,length:long,vec_uaddr:long,argstr:string)
-syscall.mkdir(name:string,pathname_uaddr:long,pathname:string,mode:long,argstr:string)
-syscall.mkdirat(name:string,dirfd:long,pathname:string,mode:long,argstr:string)
-syscall.mknod(name:string,pathname:string,mode:long,dev:long,argstr:string)
-syscall.mknodat(name:string,dfd:long,dfd_str:string,filename:long,filename_str:string,mode:long,mode_str:string,dev:long,argstr:string)
-syscall.mlock(name:string,addr:long,len:long,argstr:string)
-syscall.mlockall(name:string,flags:long,argstr:string)
-syscall.mmap(name:string,start:long,len:long,prot:long,flags:long,fd:long,offset:long,argstr:string)
-syscall.mmap2(name:string,argstr:string)
-syscall.mmap32(name:string,argstr:string)
-syscall.modify_ldt(name:string,func:long,ptr_uaddr:long,bytecount:long,argstr:string)
-syscall.mount(name:string,source:string,target:string,filesystemtype:string,mountflags:long,mountflags_str:string,data:string,argstr:string)
-syscall.move_pages(name:string,argstr:string)
-syscall.mprotect(name:string,addr:long,len:long,prot:long,prot_str:string,argstr:string)
-syscall.mq_getsetattr(name:string,mqdes:long,u_mqstat_uaddr:long,u_omqstat_uaddr:long,argstr:string)
-syscall.mq_notify(name:string,mqdes:long,notification_uaddr:long,argstr:string)
-syscall.mq_open(name:string,name_uaddr:long,filename:string,mode:long,u_attr_uaddr:long,oflag:long,argstr:string)
-syscall.mq_timedreceive(name:string,mqdes:long,msg_ptr_uaddr:long,msg_len:long,msg_prio_uaddr:long,abs_timout_uaddr:long,argstr:string)
-syscall.mq_timedsend(name:string,mqdes:long,msg_ptr_uaddr:long,msg_len:long,msg_prio:long,abs_timeout_uaddr:long,argstr:string)
-syscall.mq_unlink(name:string,u_name_uaddr:long,u_name:string,argstr:string)
-syscall.mremap(name:string,old_address:long,old_size:long,new_size:long,flags:long,new_address:long,argstr:string)
-syscall.msgctl(name:string,msqid:long,cmd:long,buf_uaddr:long,argstr:string)
-syscall.msgget(name:string,key:long,msgflg:long,msgflg_str:string,argstr:string)
-syscall.msgrcv(name:string,msqid:long,msgp_uaddr:long,msgsz:long,msgtyp:long,msgflg:long,argstr:string)
-syscall.msgsnd(name:string,msqid:long,msgp_uaddr:long,msgsz:long,msgflg:long,argstr:string)
-syscall.msync(name:string,start:long,length:long,flags:long,argstr:string)
-syscall.munlock(name:string,addr:long,len:long,argstr:string)
-syscall.munlockall(name:string,argstr:string)
-syscall.munmap(name:string,start:long,length:long,argstr:string)
-syscall.nanosleep(name:string,req_uaddr:long,rem_uaddr:long,argstr:string)
-syscall.nfsservctl(name:string,cmd:long,argp_uaddr:long,resp_uaddr:long,argstr:string)
-syscall.ni_syscall(name:string,argstr:string)
-syscall.nice(name:string,inc:long,argstr:string)
-syscall.open(name:string,filename:string,flags:long,mode:long,argstr:string)
-syscall.openat(name:string,filename:string,flags:long,mode:long,argstr:string)
-syscall.pause(name:string,argstr:string)
-syscall.personality(name:string,persona:long,argstr:string)
-syscall.pipe(name:string,argstr:string)
-syscall.pipe32(name:string,argstr:string)
-syscall.pivot_root(name:string,new_root_str:string,old_root_str:string,argstr:string)
-syscall.poll(name:string,ufds_uaddr:long,nfds:long,timeout:long,argstr:string)
-syscall.ppoll(name:string,argstr:string)
-syscall.prctl(name:string,option:long,arg2:long,arg3:long,arg4:long,arg5:long,argstr:string)
-syscall.pread(name:string,fd:long,buf_uaddr:long,count:long,offset:long,argstr:string)
-syscall.pselect6(name:string,argstr:string)
-syscall.pselect7(name:string,argstr:string)
-syscall.ptrace(name:string,request:long,pid:long,addr:long,data:long,argstr:string)
-syscall.pwrite(name:string,fd:long,buf_uaddr:long,count:long,offset:long,argstr:string)
-syscall.quotactl(name:string,cmd:long,cmd_str:string,special:long,special_str:string,id:long,addr_uaddr:long,argstr:string)
-syscall.read(name:string,fd:long,buf_uaddr:long,count:long,argstr:string)
-syscall.readahead(name:string,fd:long,offset:long,count:long,argstr:string)
-syscall.readdir(name:string,argstr:string)
-syscall.readlink(name:string,path:string,buf_uaddr:long,bufsiz:long,argstr:string)
-syscall.readlinkat(name:string,dfd:long,buf_uaddr:long,bufsiz:long,path:string,argstr:string)
-syscall.readv(name:string,vector_uaddr:long,count:long,fd:long,argstr:string)
-syscall.reboot(name:string,magic:long,magic_str:string,magic2:long,magic2_str:string,flag:long,flag_str:string,arg_uaddr:long,argstr:string)
-syscall.recv(name:string,s:long,buf_uaddr:long,len:long,flags:long,flags_str:string,argstr:string)
-syscall.recvfrom(name:string,s:long,buf_uaddr:long,len:long,flags:long,flags_str:string,addr_uaddr:long,addrlen_uaddr:long,argstr:string)
-syscall.recvmsg(name:string,s:long,msg_uaddr:long,flags:long,flags_str:string,argstr:string)
-syscall.remap_file_pages(name:string,start:long,size:long,prot:long,pgoff:long,flags:long,argstr:string)
-syscall.removexattr(name:string,name_str:string,path:string,argstr:string)
-syscall.rename(name:string,oldpath:string,newpath:string,argstr:string)
-syscall.renameat(name:string,olddfd:long,olddfd_str:string,oldname:long,oldname_str:string,newdfd:long,newdfd_str:string,newname:long,newname_str:string,argstr:string)
-syscall.request_key(name:string,type_uaddr:long,description_uaddr:long,callout_info_uaddr:long,destringid:long,argstr:string)
-syscall.restart_syscall(name:string,argstr:string)
-syscall.rmdir(name:string,pathname:string,argstr:string)
-syscall.rt_sigaction(name:string,sig:long,act_uaddr:long,oact_uaddr:long,sigsetsize:long,argstr:string)
-syscall.rt_sigaction32(name:string,sig:long,act_uaddr:long,oact_uaddr:long,sigsetsize:long,argstr:string)
-syscall.rt_sigpending(name:string,set_uaddr:long,sigsetsize:long,argstr:string)
-syscall.rt_sigprocmask(name:string,how:long,how_str:string,set_uaddr:long,oldset_uaddr:long,argstr:string)
-syscall.rt_sigqueueinfo(name:string,pid:long,sig:long,uinfo_uaddr:long,argstr:string)
-syscall.rt_sigreturn(name:string,argstr:string)
-syscall.rt_sigsuspend(name:string,argstr:string)
-syscall.rt_sigtimedwait(name:string,uthese_uaddr:long,uinfo_uaddr:long,uts_uaddr:long,sigsetsize:long,argstr:string)
-syscall.sched_get_priority_max(name:string,policy:long,argstr:string)
-syscall.sched_get_priority_min(name:string,policy:long,argstr:string)
-syscall.sched_getaffinity(name:string,pid:long,len:long,mask_uaddr:long,argstr:string)
-syscall.sched_getparam(name:string,pid:long,p_uaddr:long,argstr:string)
-syscall.sched_getscheduler(name:string,pid:long,argstr:string)
-syscall.sched_rr_get_interval(name:string,pid:long,tp_uaddr:long,argstr:string)
-syscall.sched_setaffinity(name:string,pid:long,len:long,mask_uaddr:long,argstr:string)
-syscall.sched_setparam(name:string,pid:long,p_uaddr:long,argstr:string)
-syscall.sched_setscheduler(name:string,pid:long,policy:long,policy_str:string,p_uaddr:long,argstr:string)
-syscall.sched_yield(name:string,argstr:string)
-syscall.select(name:string,n:long,readfds_uaddr:long,writefds_uaddr:long,exceptfds_uaddr:long,timeout_uaddr:long,argstr:string)
-syscall.semctl(name:string,semid:long,semnum:long,cmd:long,argstr:string)
-syscall.semget(name:string,key:long,nsems:long,semflg:long,argstr:string)
-syscall.semop(name:string,semid:long,tsops_uaddr:long,nsops:long,argstr:string)
-syscall.semtimedop(name:string,semid:long,sops_uaddr:long,nsops:long,timeout_uaddr:long,argstr:string)
-syscall.send(name:string,s:long,buf_uaddr:long,len:long,flags:long,flags_str:string,argstr:string)
-syscall.sendfile(name:string,out_fd:long,in_fd:long,offset_uaddr:long,count:long,argstr:string)
-syscall.sendmsg(name:string,s:long,msg_uaddr:long,flags:long,flags_str:string,argstr:string)
-syscall.sendto(name:string,s:long,buf_uaddr:long,len:long,flags:long,flags_str:string,to_uaddr:long,tolen:long,argstr:string)
-syscall.set_mempolicy(name:string,mode:long,nmask_uaddr:long,maxnode:long,argstr:string)
-syscall.set_tid_address(name:string,tidptr_uaddr:long,argstr:string)
-syscall.setdomainname(name:string,hostname_uaddr:long,len:long,argstr:string)
-syscall.setfsgid(name:string,fsgid:long,argstr:string)
-syscall.setfsuid(name:string,fsuid:long,argstr:string)
-syscall.setgid(name:string,gid:long,argstr:string)
-syscall.setgroups(name:string,size:long,list_uaddr:long,argstr:string)
-syscall.sethostname(name:string,hostname_uaddr:long,name_str:string,len:long,argstr:string)
-syscall.setitimer(name:string,which:long,value_uaddr:long,ovalue_uaddr:long,argstr:string)
-syscall.setpgid(name:string,pid:long,pgid:long,argstr:string)
-syscall.setpriority(name:string,which:long,which_str:string,who:long,prio:long,argstr:string)
-syscall.setregid(name:string,rgid:long,egid:long,argstr:string)
-syscall.setregid16(name:string,rgid:long,egid:long,argstr:string)
-syscall.setresgid(name:string,rgid:long,egid:long,sgid:long,argstr:string)
-syscall.setresgid16(name:string,rgid:long,egid:long,sgid:long,argstr:string)
-syscall.setresuid(name:string,ruid:long,euid:long,suid:long,argstr:string)
-syscall.setresuid16(name:string,ruid:long,euid:long,suid:long,argstr:string)
-syscall.setreuid(name:string,ruid:long,euid:long,argstr:string)
-syscall.setreuid16(name:string,ruid:long,euid:long,argstr:string)
-syscall.setrlimit(name:string,resource:long,rlim_uaddr:long,argstr:string)
-syscall.setsid(name:string,argstr:string)
-syscall.setsockopt(name:string,fd:long,level:long,level_str:string,optname:long,optname_str:string,optval_uaddr:long,optlen:long,argstr:string)
-syscall.settimeofday(name:string,tv_uaddr:long,tz_uaddr:long,argstr:string)
-syscall.settimeofday32(name:string,tv_uaddr:long,tz_uaddr:long,argstr:string)
-syscall.setuid(name:string,uid:long,argstr:string)
-syscall.setxattr(name:string,path_uaddr:long,path:string,name_uaddr:long,name_str:string,value_uaddr:long,size:long,flags:long,argstr:string)
-syscall.sgetmask(name:string,argstr:string)
-syscall.shmat(name:string,shmid:long,shmaddr_uaddr:long,shmflg:long,argstr:string)
-syscall.shmctl(name:string,shmid:long,cmd:long,buf_uaddr:long,argstr:string)
-syscall.shmdt(name:string,shmaddr_uaddr:long,argstr:string)
-syscall.shmget(name:string,key:long,size:long,shmflg:long,argstr:string)
-syscall.shutdown(name:string,s:long,how:long,how_str:string,argstr:string)
-syscall.sigaction32(name:string,sig:long,act_uaddr:long,oact_uaddr:long,argstr:string)
-syscall.sigaltstack(name:string,uss_uaddr:long,uoss_uaddr:long,regs_uaddr:long,argstr:string)
-syscall.signal(name:string,sig:long,handler:long,argstr:string)
-syscall.signalfd(name:string,argstr:string)
-syscall.sigpending(name:string,argstr:string)
-syscall.sigprocmask(name:string,how:long,how_str:string,set_uaddr:long,oldset_uaddr:long,argstr:string)
-syscall.sigreturn(name:string,argstr:string)
-syscall.sigsuspend(name:string,argstr:string)
-syscall.socket(name:string,family:long,type:long,protocol:long,argstr:string)
-syscall.socketpair(name:string,family:long,type:long,protocol:long,sv_uaddr:long,argstr:string)
-syscall.splice(name:string,argstr:string)
-syscall.ssetmask(name:string,newmask:long,argstr:string)
-syscall.stat(name:string,filename_uaddr:long,filename:string,buf_uaddr:long,argstr:string)
-syscall.statfs(name:string,buf_uaddr:long,path:string,argstr:string)
-syscall.statfs64(name:string,sz:long,buf_uaddr:long,path:string,argstr:string)
-syscall.stime(name:string,t_uaddr:long,argstr:string)
-syscall.swapoff(name:string,path:string,argstr:string)
-syscall.swapon(name:string,path:string,swapflags:long,argstr:string)
-syscall.symlink(name:string,oldpath:string,newpath:string,argstr:string)
-syscall.symlinkat(name:string,oldname:long,oldname_str:string,newdfd:long,newdfd_str:string,newname:long,newname_str:string,argstr:string)
-syscall.sync(name:string,argstr:string)
-syscall.sysctl(name:string,argstr:string)
-syscall.sysctl32(name:string,argstr:string)
-syscall.sysfs(name:string,option:long,arg1:long,arg2:long,argstr:string)
-syscall.sysinfo(name:string,info_uaddr:long,argstr:string)
-syscall.syslog(name:string,type:long,bufp_uaddr:long,len:long,argstr:string)
-syscall.tee(name:string,argstr:string)
-syscall.tgkill(name:string,tgid:long,pid:long,sig:long,argstr:string)
-syscall.time(name:string,t_uaddr:long,argstr:string)
-syscall.timer_create(name:string,clockid:long,clockid_str:string,evp_uaddr:long,timerid_uaddr:long,argstr:string)
-syscall.timer_delete(name:string,timerid:long,argstr:string)
-syscall.timer_getoverrun(name:string,timerid:long,argstr:string)
-syscall.timer_gettime(name:string,timerid:long,value_uaddr:long,argstr:string)
-syscall.timer_settime(name:string,timerid:long,flags:long,value_uaddr:long,ovalue_uaddr:long,argstr:string)
-syscall.times(name:string,argstr:string)
-syscall.tkill(name:string,pid:long,sig:long,argstr:string)
-syscall.truncate(name:string,path_uaddr:long,path:string,length:long,argstr:string)
-syscall.umask(name:string,mask:long,argstr:string)
-syscall.umount(name:string,target:string,flags:long,flags_str:string,argstr:string)
-syscall.uname(name:string,argstr:string)
-syscall.unlink(name:string,pathname_uaddr:long,pathname:string,argstr:string)
-syscall.unlinkat(name:string,dfd:long,dfd_str:string,pathname:long,pathname_str:string,flag:long,flag_str:string,argstr:string)
-syscall.unshare(name:string,unshare_flags:long,argstr:string)
-syscall.uselib(name:string,library_uaddr:long,library:string,argstr:string)
-syscall.ustat(name:string,dev:long,ubuf_uaddr:long,argstr:string)
-syscall.ustat32(name:string,dev:long,argstr:string)
-syscall.utime(name:string,filename_uaddr:long,filename:string,buf_uaddr:long,actime:long,modtime:long,argstr:string)
-syscall.utimensat(name:string,argstr:string)
-syscall.utimes(name:string,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
-syscall.vhangup(name:string,argstr:string)
-syscall.vm86_warning(name:string)
-syscall.vmsplice(name:string,argstr:string)
-syscall.wait4(name:string,pid:long,status_uaddr:long,options:long,options_str:string,rusage_uaddr:long,argstr:string)
-syscall.waitid(name:string,pid:long,which:long,which_str:string,infop_uaddr:long,options:long,options_str:string,rusage_uaddr:long,argstr:string)
-syscall.write(name:string,fd:long,buf_uaddr:long,count:long,argstr:string)
-syscall.writev(name:string,vector_uaddr:long,count:long,fd:long,argstr:string)
-signal.check_ignored(sig_pid:long,pid_name:string,sig:long,sig_name:string)
-signal.checkperm(sig:long,task:long,sinfo:long,name:string,sig_name:string,sig_pid:long,pid_name:string,si_code:string)
-signal.do_action(sig:long,sigact_addr:long,oldsigact_addr:long,sa_handler:long,sa_mask:long)
-signal.flush(task:long,sig_pid:long,pid_name:string)
-signal.force_segv(sig_pid:long,pid_name:string,sig:long,sig_name:string)
-signal.handle(sig:unknown,sig_name:string,sinfo:long,sig_code:long,ka_addr:unknown,oldset_addr:unknown,regs:unknown,sig_mode:string)
-signal.pending(sigset_add:long,sigset_size:long)
-signal.procmask(how:long,sigset_addr:long,oldsigset_addr:long,sigset:long)
-signal.send(name:string,sig:long,task:long,sinfo:long,shared:long,send2queue:long,sig_name:string,sig_pid:long,pid_name:string,si_code:string)
-signal.send_sig_queue(sig:long,sig_name:string,sig_pid:long,pid_name:string,sigqueue_addr:long)
-signal.syskill(name:string,pid:long,sig:long,argstr:string,sig_name:string)
-signal.systgkill(name:string,tgid:long,pid:long,sig:long,argstr:string,sig_name:string)
-signal.systkill(name:string,pid:long,sig:long,argstr:string,sig_name:string)
-signal.wakeup(sig_pid:long,pid_name:string,resume:long,state_mask:string)
-netdev.receive(dev_name:string,length:long,protocol:long,truesize:long)
-netdev.transmit(dev_name:string,length:long,protocol:long,truesize:long)
-ioblock.end(devname:string,ino:long,bytes_done:long,error:long,sector:long,flags:long,rw:long,vcnt:long,idx:long,phys_segments:long,hw_segments:long,size:long)
-ioblock.request(devname:string,ino:long,sector:long,flags:long,rw:long,vcnt:long,idx:long,phys_segments:long,hw_segments:long,size:long,bdev:long,bdev_contains:long,p_start_sect:long)
-ioscheduler.elv_add_request(elevator_name:string,disk_major:long,disk_minor:long,req:long,req_flags:long)
-ioscheduler.elv_completed_request(elevator_name:string,disk_major:long,disk_minor:long,req:long,req_flags:long)
-ioscheduler.elv_next_request(elevator_name:string)
-nd_syscall.accept(name:string,sockfd:long,addr_uaddr:long,addrlen_uaddr:long,argstr:string)
-nd_syscall.access(name:string,pathname:string,mode:long,mode_str:string,argstr:string)
-nd_syscall.acct(name:string,filename:string,argstr:string)
-nd_syscall.add_key(name:string,type_uaddr:long,description_uaddr:long,payload_uaddr:long,plen:long,ringid:long,argstr:string)
-nd_syscall.adjtimex(name:string,argstr:string)
-nd_syscall.alarm(name:string,seconds:long,argstr:string)
-nd_syscall.bdflush(name:string,func:long,data:long,data_str:string,argstr:string)
-nd_syscall.bind(name:string,sockfd:long,my_addr_uaddr:long,addrlen:long,argstr:string)
-nd_syscall.brk(name:string,brk:long,argstr:string)
-nd_syscall.capget(name:string,header_uaddr:long,data_uaddr:long,argstr:string)
-nd_syscall.capset(name:string,header_uaddr:long,data_uaddr:long,argstr:string)
-nd_syscall.chdir(name:string,path:string,argstr:string)
-nd_syscall.chmod(name:string,path:string,mode:long,argstr:string)
-nd_syscall.chown(name:string,path:string,owner:long,group:long,argstr:string)
-nd_syscall.chown16(name:string,path:string,owner:long,group:long,argstr:string)
-nd_syscall.chroot(name:string,path:string,argstr:string)
-nd_syscall.clock_getres(name:string,clk_id:long,clk_id_str:string,res_uaddr:long,argstr:string)
-nd_syscall.clock_gettime(name:string,clk_id:long,clk_id_str:string,argstr:string)
-nd_syscall.clock_nanosleep(name:string,flags:long,flag_str:string,argstr:string)
-nd_syscall.clock_settime(name:string,clk_id:long,clk_id_str:string,tp_uaddr:long,argstr:string)
-nd_syscall.close(name:string,fd:long,argstr:string)
-nd_syscall.compat_adjtimex(name:string,argstr:string)
-nd_syscall.compat_clock_nanosleep(name:string,flags:long,flag_str:string,argstr:string)
-nd_syscall.compat_execve(name:string,filename:string,args:string,argstr:string)
-nd_syscall.compat_futex(name:string,futex_uaddr:long,op:long,val:long,utime_uaddr:long,uaddr2_uaddr:long,val3:long,argstr:string)
-nd_syscall.compat_futimesat(name:string,dirfd:long,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
-nd_syscall.compat_getitimer(name:string,which:long,value_uaddr:long,argstr:string)
-nd_syscall.compat_io_setup(name:string,maxevents:long,ctxp_uaddr:long,argstr:string)
-nd_syscall.compat_io_submit(name:string,ctx_id:long,nr:long,iocbpp_uaddr:long,argstr:string)
-nd_syscall.compat_sys_msgctl(name:string,argstr:string)
-nd_syscall.compat_sys_msgrcv(name:string,argstr:string)
-nd_syscall.compat_sys_msgsnd(name:string,argstr:string)
-nd_syscall.connect(name:string,sockfd:long,serv_addr_uaddr:long,addrlen:long,argstr:string)
-nd_syscall.creat(name:string,mode:long,pathname:string,argstr:string)
-nd_syscall.delete_module(name:string,name_user:string,flags:long,argstr:string)
-nd_syscall.dup(name:string,old_fd:long,argstr:string)
-nd_syscall.dup2(name:string,oldfd:long,newfd:long,argstr:string)
-nd_syscall.epoll_create(name:string,size:long,argstr:string)
-nd_syscall.epoll_ctl(name:string,epfd:long,op:long,op_str:string,fd:long,event_uaddr:long,argstr:string)
-nd_syscall.epoll_pwait(name:string,argstr:string)
-nd_syscall.epoll_wait(name:string,epfd:long,events_uaddr:long,maxevents:long,timeout:long,argstr:string)
-nd_syscall.eventfd(name:string,argstr:string)
-nd_syscall.execve(name:string,filename:string,args:string,argstr:string)
-nd_syscall.exit(name:string,status:long,argstr:string)
-nd_syscall.exit_group(name:string,status:long,argstr:string)
-nd_syscall.fadvise64(name:string,fs:long,offset:long,len:long,advice:long,argstr:string)
-nd_syscall.fadvise64_64(name:string,fs:long,offset:long,len:long,advice:long,argstr:string)
-nd_syscall.fchdir(name:string,fd:long,argstr:string)
-nd_syscall.fchmod(name:string,fildes:long,mode:long,argstr:string)
-nd_syscall.fchown(name:string,fd:long,owner:long,group:long,argstr:string)
-nd_syscall.fchown16(name:string,fd:long,owner:long,group:long,argstr:string)
-nd_syscall.fcntl(name:string,fd:long,cmd:long,cmd_str:string,arg:long,argstr:string)
-nd_syscall.fdatasync(name:string,fd:long,argstr:string)
-nd_syscall.fgetxattr(name:string,filedes:long,name2:string,value_uaddr:long,size:long,argstr:string)
-nd_syscall.flistxattr(name:string,filedes:long,list_uaddr:long,size:long,argstr:string)
-nd_syscall.flock(name:string,fd:long,operation:long,argstr:string)
-nd_syscall.fork(clone_flags:long,stack_start:long,regs:long,stack_size:long,parent_tid_uaddr:long,child_tid_uaddr:long,name:string,argstr:string)
-nd_syscall.fremovexattr(name:string,filedes:long,name_uaddr:long,argstr:string)
-nd_syscall.fsetxattr(name:string,filedes:long,name2:string,value_uaddr:long,size:long,flags:long,argstr:string)
-nd_syscall.fstat(name:string,filedes:long,buf_uaddr:long,argstr:string)
-nd_syscall.fstatat(name:string,dirfd:long,path:string,buf_uaddr:long,argstr:string)
-nd_syscall.fstatfs(name:string,fd:long,buf_uaddr:long,argstr:string)
-nd_syscall.fstatfs64(name:string,fd:long,sz:long,buf_uaddr:long,argstr:string)
-nd_syscall.fsync(name:string,fd:long,argstr:string)
-nd_syscall.ftruncate(name:string,fd:long,length:long,argstr:string)
-nd_syscall.futex(name:string,futex_uaddr:long,op:long,val:long,utime_uaddr:long,uaddr2_uaddr:long,val3:long,argstr:string)
-nd_syscall.futimesat(name:string,dirfd:long,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
-nd_syscall.get_mempolicy(name:string,policy_uaddr:long,nmask_uaddr:long,maxnode:long,addr:long,flags:long,argstr:string)
-nd_syscall.getcwd(name:string,buf_uaddr:long,size:long,argstr:string)
-nd_syscall.getdents(name:string,fd:long,dirp_uaddr:long,count:long,argstr:string)
-nd_syscall.getegid(name:string,argstr:string)
-nd_syscall.geteuid(name:string,argstr:string)
-nd_syscall.getgid(name:string,argstr:string)
-nd_syscall.getgroups(name:string,size:long,list_uaddr:long,argstr:string)
-nd_syscall.gethostname(name:string,name_uaddr:long,len:long,argstr:string)
-nd_syscall.getitimer(name:string,which:long,value_uaddr:long,argstr:string)
-nd_syscall.getpeername(name:string,s:long,name_uaddr:long,namelen_uaddr:long,argstr:string)
-nd_syscall.getpgid(name:string,pid:long,argstr:string)
-nd_syscall.getpgrp(name:string,argstr:string)
-nd_syscall.getpid(name:string,argstr:string)
-nd_syscall.getppid(name:string,argstr:string)
-nd_syscall.getpriority(name:string,which:long,who:long,argstr:string)
-nd_syscall.getresgid(name:string,rgid_uaddr:long,egid_uaddr:long,sgid_uaddr:long,argstr:string)
-nd_syscall.getresuid(name:string,ruid_uaddr:long,euid_uaddr:long,suid_uaddr:long,argstr:string)
-nd_syscall.getrlimit(name:string,resource:long,rlim_uaddr:long,argstr:string)
-nd_syscall.getrusage(name:string,who:long,who_str:string,usage_uaddr:long,argstr:string)
-nd_syscall.getsid(name:string,pid:long,argstr:string)
-nd_syscall.getsockname(name:string,s:long,name_uaddr:long,namelen_uaddr:long,argstr:string)
-nd_syscall.getsockopt(name:string,fd:long,level:long,level_str:string,optname:long,optname_str:string,optval_uaddr:long,optlen_uaddr:long,argstr:string)
-nd_syscall.gettid(name:string,argstr:string)
-nd_syscall.gettimeofday(name:string,tv_uaddr:long,tz_uaddr:long,argstr:string)
-nd_syscall.getuid(name:string,argstr:string)
-nd_syscall.getxattr(name:string,path:string,name2:string,value_uaddr:long,size:long,argstr:string)
-nd_syscall.init_module(name:string,umod_uaddr:long,len:long,uargs:string,argstr:string)
-nd_syscall.inotify_add_watch(name:string,fd:long,path_uaddr:long,path:string,mask:long,argstr:string)
-nd_syscall.inotify_init(name:string,argstr:string)
-nd_syscall.inotify_rm_watch(name:string,fd:long,wd:long,argstr:string)
-nd_syscall.io_cancel(name:string,ctx_id:long,iocb_uaddr:long,result_uaddr:long,argstr:string)
-nd_syscall.io_destroy(name:string,ctx:long,argstr:string)
-nd_syscall.io_getevents(name:string,ctx_id:long,min_nr:long,nr:long,events_uaddr:long,timeout_uaddr:long,timestr:string,argstr:string)
-nd_syscall.io_setup(name:string,maxevents:long,ctxp_uaddr:long,argstr:string)
-nd_syscall.io_submit(name:string,ctx_id:long,nr:long,iocbpp_uaddr:long,argstr:string)
-nd_syscall.ioctl(name:string,fd:long,request:long,argp:long,argstr:string)
-nd_syscall.ioperm(name:string,from:long,num:long,turn_on:long,argstr:string)
-nd_syscall.ioprio_get(name:string,which:long,who:long,argstr:string)
-nd_syscall.ioprio_set(name:string,which:long,who:long,ioprio:long,argstr:string)
-nd_syscall.kexec_load(name:string,entry:long,nr_segments:long,segments_uaddr:long,flags:long,argstr:string)
-nd_syscall.keyctl(name:string,argstr:string)
-nd_syscall.kill(name:string,pid:long,sig:long,argstr:string)
-nd_syscall.lchown(name:string,path:string,owner:long,group:long,argstr:string)
-nd_syscall.lchown16(name:string,path:string,owner:long,group:long,argstr:string)
-nd_syscall.lgetxattr(name:string,path:string,name2:string,value_uaddr:long,size:long,argstr:string)
-nd_syscall.link(name:string,oldpath:string,newpath:string,argstr:string)
-nd_syscall.listen(name:string,sockfd:long,backlog:long,argstr:string)
-nd_syscall.listxattr(name:string,path_uaddr:long,path:string,list_uaddr:long,size:long,argstr:string)
-nd_syscall.llistxattr(name:string,path_uaddr:long,path:string,list_uaddr:long,size:long,argstr:string)
-nd_syscall.llseek(name:string,fd:long,offset_high:long,offset_low:long,result_uaddr:long,whence:long,whence_str:string,argstr:string)
-nd_syscall.lookup_dcookie(name:string,cookie:long,buffer_uaddr:long,len:long,argstr:string)
-nd_syscall.lremovexattr(name:string,path_uaddr:long,path:string,name_uaddr:long,name2:string,argstr:string)
-nd_syscall.lseek(name:string,fildes:long,offset:long,whence:long,whence_str:string,argstr:string)
-nd_syscall.lsetxattr(name:string,path_uaddr:long,path:string,name_uaddr:long,name_str:string,value_uaddr:long,size:long,flags:long,argstr:string)
-nd_syscall.lstat(name:string,path:string,buf_uaddr:long,argstr:string)
-nd_syscall.madvise(name:string,start:long,length:long,advice:long,advice_str:string,argstr:string)
-nd_syscall.mbind(name:string,start:long,len:long,mode:long,nmask_uaddr:long,maxnode:long,flags:long,argstr:string)
-nd_syscall.migrate_pages(name:string,argstr:string)
-nd_syscall.mincore(name:string,start:long,length:long,vec_uaddr:long,argstr:string)
-nd_syscall.mkdir(name:string,pathname_uaddr:long,pathname:string,mode:long,argstr:string)
-nd_syscall.mkdirat(name:string,dirfd:long,pathname:string,mode:long,argstr:string)
-nd_syscall.mknod(name:string,pathname:string,mode:long,dev:long,argstr:string)
-nd_syscall.mlock(name:string,addr:long,len:long,argstr:string)
-nd_syscall.mlockall(name:string,flags:long,argstr:string)
-nd_syscall.modify_ldt(name:string,func:long,ptr_uaddr:long,bytecount:long,argstr:string)
-nd_syscall.mount(name:string,source:string,target:string,filesystemtype:string,mountflags:long,mountflags_str:string,data:string,argstr:string)
-nd_syscall.move_pages(name:string,argstr:string)
-nd_syscall.mprotect(name:string,addr:long,len:long,prot:long,prot_str:string,argstr:string)
-nd_syscall.mq_getsetattr(name:string,mqdes:long,u_mqstat_uaddr:long,u_omqstat_uaddr:long,argstr:string)
-nd_syscall.mq_notify(name:string,mqdes:long,notification_uaddr:long,argstr:string)
-nd_syscall.mq_open(name:string,name_uaddr:long,filename:string,mode:long,u_attr_uaddr:long,oflag:long,argstr:string)
-nd_syscall.mq_timedreceive(name:string,mqdes:long,msg_ptr_uaddr:long,msg_len:long,msg_prio_uaddr:long,abs_timout_uaddr:long,argstr:string)
-nd_syscall.mq_timedsend(name:string,mqdes:long,msg_ptr_uaddr:long,msg_len:long,msg_prio:long,abs_timeout_uaddr:long,argstr:string)
-nd_syscall.mq_unlink(name:string,u_name_uaddr:long,u_name:string,argstr:string)
-nd_syscall.mremap(name:string,old_address:long,old_size:long,new_size:long,flags:long,new_address:long,argstr:string)
-nd_syscall.msgctl(name:string,msqid:long,cmd:long,buf_uaddr:long,argstr:string)
-nd_syscall.msgget(name:string,key:long,msgflg:long,msgflg_str:string,argstr:string)
-nd_syscall.msgrcv(name:string,msqid:long,msgp_uaddr:long,msgsz:long,msgtyp:long,msgflg:long,argstr:string)
-nd_syscall.msgsnd(name:string,msqid:long,msgp_uaddr:long,msgsz:long,msgflg:long,argstr:string)
-nd_syscall.msync(name:string,start:long,length:long,flags:long,argstr:string)
-nd_syscall.munlock(name:string,addr:long,len:long,argstr:string)
-nd_syscall.munlockall(name:string,argstr:string)
-nd_syscall.munmap(name:string,start:long,length:long,argstr:string)
-vm.brk(address:long,length:long)
-vm.mmap(address:unknown,length:unknown)
-vm.munmap(address:long,length:long)
-vm.oom_kill(task:long)
-vm.pagefault(write_access:long,address:long)
-vm.write_shared(address:long)
-nfsd.close(filename:string,name:string,argstr:string)
-nfsd.commit(fh:string,count:long,offset:long,flag:long,name:string,argstr:string,size:long,units:string)
-nfsd.create(fh:string,filelen:long,filename:string,type:long,iap_valid:long,iap_mode:long,name:string,argstr:string)
-nfsd.createv3(fh:string,filelen:long,filename:string,iap_valid:long,iap_mode:long,truncp:long,verfier:long,createmode:long,name:string,argstr:string)
-nfsd.dispatch(client_ip:long,proto:long,version:long,xid:long,prog:long,proc:long,name:string,argstr:string)
-nfsd.entries(fh:string,access:long,type:long,name:string,argstr:string)
-nfsd.lookup(fh:string,filelen:long,filename:string,name:string,argstr:string)
-nfsd.open(fh:string,access:long,type:long,name:string,argstr:string)
-nfsd.read(fh:string,file:long,count:long,offset:long,vec:long,vlen:long,name:string,argstr:string,size:long,units:string)
-nfsd.rename(fh:string,tfh:string,filelen:long,filename:string,tlen:long,tname:string,name:string,argstr:string)
-nfsd.return(name:string,retstr:string)
-nfsd.unlink(fh:string,filelen:long,filename:string,type:long,name:string,argstr:string)
-nfsd.write(fh:string,file:long,count:long,offset:long,vec:long,vlen:long,name:string,argstr:string,size:long,units:string)
-process.begin)
-process.create(task:long,new_pid:long)
-process.end)
-process.exec(filename:string)
-process.exec_complete(errno:long,success:long)
-process.exit(code:long)
-process.release(task:long,pid:long)
-process.start)
-process.syscall)
-sunrpc.entry(name:string,progname:string,prog:long,vers:long,authflavor:long,servername:string,prot:long,port:long,argstr:string)
-sunrpc.return(name:string,retstr:string)
-scheduler.balance)
-scheduler.cpu_off(task_prev:unknown,task_next:unknown,idle:long)
-scheduler.cpu_on(task_prev:long,idle:long)
-scheduler.ctxswitch(prev_pid:unknown,next_pid:unknown,prev_task:unknown,next_task:unknown,prevtsk_state:unknown)
-scheduler.migrate(task:long,cpu_from:long,cpu_to:long)
-scheduler.tick(idle:long)
-scsi.iocompleted(host_no:long,channel:long,lun:long,dev_id:long,device_state:long,data_direction:long,req_addr:long,goodbytes:long)
-scsi.iodispatching(host_no:long,channel:long,lun:long,dev_id:long,device_state:long,data_direction:long,request_buffer:long,request_bufflen:long,req_addr:long)
-scsi.iodone(host_no:long,channel:long,lun:long,dev_id:long,device_state:long,data_direction:long,req_addr:long,scsi_timer_pending:long)
-scsi.ioentry(disk_major:long,disk_minor:long,device_state:long,req_addr:long)
-socket.aio_read(name:string,_sock:long,size:long,protocol:long,family:long,state:long,flags:long,type:long)
-socket.aio_write(name:string,_sock:long,size:long,protocol:long,family:long,state:long,flags:long,type:long)
-socket.close(name:string,protocol:long,family:long,state:long,flags:long,type:long)
-socket.create(name:string,protocol:long,family:long,type:long,requester:long)
-socket.receive(_dwarf_tvar_tid:long,_dwarf_tvar_sock_16_tmp:long,_dwarf_tvar_sock_17_tmp:long,_dwarf_tvar_sock_18_tmp:long,_dwarf_tvar_sock_19_tmp:long,_dwarf_tvar_sock_20_tmp:long,name:string,size:long,protocol:long,family:long,state:long,flags:long,type:long,success:long)
-socket.recvmsg(name:string,size:long,protocol:long,family:long,state:long,flags:long,type:long)
-socket.send(_dwarf_tvar_tid:long,_dwarf_tvar_sock_32_tmp:long,_dwarf_tvar_sock_33_tmp:long,_dwarf_tvar_sock_34_tmp:long,_dwarf_tvar_sock_35_tmp:long,_dwarf_tvar_sock_36_tmp:long,name:string,size:long,protocol:long,family:long,state:long,flags:long,type:long,success:long)
-socket.sendmsg(name:string,size:long,protocol:long,family:long,state:long,flags:long,type:long)
-kernel.function("sock_recvmsg@net/socket.c:649")(_dwarf_tvar_tid:long)
-kernel.function("sock_aio_read@net/socket.c:750")(_dwarf_tvar_tid:long)
-kernel.function("sock_sendmsg@net/socket.c:566")(_dwarf_tvar_tid:long)
-kernel.function("sock_aio_write@net/socket.c:792")(_dwarf_tvar_tid:long)
-begin(-1001)(num:long)
-end(idx0:string)
-tcp.disconnect(name:string,sock:long,flags:long)
-tcp.recvmsg(name:string,sock:long,size:long)
-tcp.sendmsg(name:string,sock:long,size:long)
-tcp.setsockopt(name:string,sock:long,level:long,optname:long,optstr:string,optlen:long)
-udp.disconnect(name:string,sock:long,flags:long)
-udp.recvmsg(name:string,sock:long,size:long)
-udp.sendmsg(name:string,sock:long,size:long)
-generic.fop.aio_read(file:long,dev:long,devname:string,ino:long,pos:long,count:long,buf:long,name:string,argstr:string,size:long,units:string)
-generic.fop.aio_write(file:long,dev:long,devname:string,ino:long,pos:long,count:long,buf:long,name:string,argstr:string,size:long,units:string)
-generic.fop.llseek(dev:long,devname:string,ino:long,file:long,offset:long,origin:long,maxbyte:long,name:string,argstr:string)
-generic.fop.mmap(file:long,dev:long,devname:string,ino:long,vm_start:long,vm_end:long,vm_flags:long,name:string,argstr:string)
-generic.fop.open(dev:long,devname:string,ino:long,filename:string,flag:long,size:long,name:string,argstr:string)
-generic.fop.splice_read(dev:long,devname:string,ino:long,file:long,len:long,flags:long,name:string,argstr:string,size:long,units:string)
-generic.fop.splice_write(dev:long,devname:string,ino:long,file:long,len:long,flags:long,name:string,argstr:string,size:long,units:string)
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/IDECloseMonitor.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/IDECloseMonitor.java
deleted file mode 100644
index d614c9462a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/IDECloseMonitor.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.internal;
-
-import java.text.MessageFormat;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.actions.StopScriptAction;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchListener;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-/**
- * This listener is responsible for monitoring workbench close actions. It is used
- * to veto a shutdown if there are scripts still running and the user does not really
- * want to shutdown.
- * @author Ryan Morse
- */
-public class IDECloseMonitor implements IWorkbenchListener {
- public boolean preShutdown(IWorkbench workbench, boolean forced) {
- boolean close = true;
- if(!forced) {
- IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
-
- StopScriptAction ssa = new StopScriptAction();
- ssa.init(window);
- if(ssa.anyRunning()) {
- String msg = MessageFormat.format(Localization.getString("IDECloseMonitor.StillRunning"),(Object[]) null);
- close = MessageDialog.openQuestion(window.getShell(), "Closing...", msg);
- }
- }
- return close;
- }
-
- public void postShutdown(IWorkbench workbench) {}
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/IDEPlugin.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/IDEPlugin.java
deleted file mode 100644
index 53c4701ab6..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/IDEPlugin.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.internal;
-
-import org.eclipse.ui.IWorkbenchListener;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.plugin.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.linuxtools.systemtap.ui.consolelog.actions.StopScriptAction;
-import org.osgi.framework.BundleContext;
-
-
-/**
- * The main plugin class to be used in the IDE. This class contains lifecycle controls
- * for the plugin.
- * @see org.eclipse.ui.plugin.AbstractUIPlugin
- * @author Ryan Morse
- */
-public class IDEPlugin extends AbstractUIPlugin {
- public IDEPlugin() {
- plugin = this;
- }
-
- /**
- * Called by the Eclipse Workbench at plugin activation time. Starts the plugin lifecycle.
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
-
- workbenchListener = new IDECloseMonitor();
- plugin.getWorkbench().addWorkbenchListener(workbenchListener);
- }
-
- /**
- * Called by the Eclipse Workbench to deactivate the plugin.
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
-
- StopScriptAction ssa = new StopScriptAction();
- ssa.init(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
- ssa.stopAll();
-
- plugin.getWorkbench().removeWorkbenchListener(workbenchListener);
-
- plugin = null;
- }
-
- /**
- * Returns this plugin's instance.
- */
- public static IDEPlugin 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 AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- private IWorkbenchListener workbenchListener;
- private static IDEPlugin plugin;
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.linuxtools.systemtap.ui.ide";
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/Localization.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/Localization.java
deleted file mode 100644
index 06f73fd023..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/Localization.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.ide.internal;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Localization {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.systemtap.ui.ide.internal.localization";
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- private Localization() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/localization.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/localization.properties
deleted file mode 100644
index 56146d7aa1..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/localization.properties
+++ /dev/null
@@ -1,70 +0,0 @@
-RunScriptAction.NoScriptFile=No Script File\!
-RunScriptAction.Problem=Problem
-RunScriptAction.TapsetDirectoryRun=Can not run files in tapset directory\!
-RunScriptAction.Error=Error
-
-KernelSourceAction.Insert=&Insert
-KernelSourceAction.InsertSelectedFunction=Insert the Selected Function
-
-ProbeAliasAction.Insert=&Insert
-ProbeAliasAction.InsertSelectedProbe=Insert the Selected Probe
-ProbeAliasAction.AvailableVariables=available variables on this probe:
-
-FunctionBrowserAction.Insert=&Insert
-FunctionBrowserAction.InsertFunction=Insert the Selected Function
-
-CEditor.ProbeInsertFailed=Probe Insertion Failure
-CEditor.CanNotProbeLine=Stap cannot insert a probe on this line of code.
-
-IDECloseMonitor.StillRunning=There are scripts still running, are you sure you want to close?
-
-TapsetsPreferencePage.AdditionalTapsetsCategory=Additional tapsets to be used with every script
-TapsetsPreferencePage.AdditionalTapsets=&Additional tapsets:
-TapsetsPreferencePage.TapsetDirectory=Tapset Directory
-
-TapsetBrowserView.WhereDefaultTapset=Where are the default tapsets?
-
-SyntaxColoringPreferencePage.SyntaxColoringOptions=Syntax Coloring Options
-SyntaxColoringPreferencePage.STPEditor=stp Editor
-SyntaxColoringPreferencePage.DefaultColor=&Default Color:
-SyntaxColoringPreferencePage.KeywordColor=&Keyword Color:
-SyntaxColoringPreferencePage.EmbeddedCColor=&Embedded C Color:
-SyntaxColoringPreferencePage.EmbeddedColor=&Embedded Color:
-SyntaxColoringPreferencePage.CommentColor=&Comment Color:
-SyntaxColoringPreferencePage.TypeColor=&Type Color:
-SyntaxColoringPreferencePage.StringColor=&String Color:
-SyntaxColoringPreferencePage.CEditor=c Editor
-SyntaxColoringPreferencePage.PreprocessorColor=&Preprocessor Color:
-
-PathPreferencePage.KernelSourceDirectory=&Kernel source directory:
-PathPreferencePage.ExcludedSourceFolders=&Excluded source folders:
-PathPreferencePage.ExcludedDirectory=Excluded Directory
-
-ConditionalFilterPreferencePage.ConditiionalFilterSelector=Conditinal filters to be used with code completion
-ConditionalFilterPreferencePage.ConditionalFilters=&Conditional Filters:
-ConditionalFilterPreferencePage.NewFilter=New Filter
-
-IDEPreferencePage.UseStoredTapsetTree=Use stored tapset trees
-
-StapOptionsPreferencePage.StapOptions=Options for running stap
-
-TypeingPreferencePage.TypingPreferenceDescription=Empty page for now. Thinking of what to add.
-
-CodeAssistPreferencePage.CodeAssistPreferenceDescription=Preferences controling options for code assist in the editor
-CodeAssistPreferencePage.UseCodeAssist=&Use Code Assist
-CodeAssistPreferencePage.HowCodeAdded=How code assist adds code:
-CodeAssistPreferencePage.Insert=&Insert
-CodeAssistPreferencePage.Overwrite=&Overwrite
-CodeAssistPreferencePage.ActivationDelay=Activation &Delay (requires restart):
-CodeAssistPreferencePage.ActivationTrigger=Activation &Trigger:
-
-StapPreferencePage.StapPreferenceDescription=Empty page for now. Thinking of what to add.
-
-EditorPreferencePage.EditorPreferenceDescription=This is for basic properties of the editors.
-EditorPreferencePage.BackgroundColor=&Editor Background Color:
-EditorPreferencePage.ShowLineNumbers=Show Line &Numbers
-
-StapSettingsDialog.StapOptions=Stap Options
-
-KernelBrowserView.WhereKernelSource=Where is the Kernel Source Code?
-TapsetBrowserView.TapsetLocation=Tapset Location
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/CodeAssistPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/CodeAssistPreferencePage.java
deleted file mode 100644
index ea1fc87d27..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/CodeAssistPreferencePage.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.preferences;
-
-import org.eclipse.jface.preference.*;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.IWorkbench;
-
-
-public class CodeAssistPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
- public CodeAssistPreferencePage() {
- super(GRID);
- LogManager.logDebug("Start CodeAssistPreferencePage:", this);
- setPreferenceStore(IDEPlugin.getDefault().getPreferenceStore());
- setDescription(Localization.getString("CodeAssistPreferencePage.CodeAssistPreferenceDescription"));
- LogManager.logDebug("End CodeAssistPreferencePage:", this);
- }
-
- /**
- * Creates the field editors. Field editors are abstractions of
- * the common GUI blocks needed to manipulate various types
- * of preferences. Each field editor knows how to save and
- * restore itself.
- */
- public void createFieldEditors() {
- LogManager.logDebug("Start createFieldEditors:", this);
- addField(
- new BooleanFieldEditor(
- IDEPreferenceConstants.P_USE_CODE_ASSIST,
- Localization.getString("CodeAssistPreferencePage.UseCodeAssist"),
- getFieldEditorParent()));
- addField(new RadioGroupFieldEditor(
- IDEPreferenceConstants.P_COMPLETION,
- Localization.getString("CodeAssistPreferencePage.HowCodeAdded"),
- 1,
- new String[][] {
- {Localization.getString("CodeAssistPreferencePage.Insert"), IDEPreferenceConstants.P_COMPLETION_INSERT },
- {Localization.getString("CodeAssistPreferencePage.Overwrite"), IDEPreferenceConstants.P_COMPLETION_OVERWRITE }},
- getFieldEditorParent()));
- addField(
- new IntegerFieldEditor(
- IDEPreferenceConstants.P_ACTIVATION_DELAY,
- Localization.getString("CodeAssistPreferencePage.ActivationDelay"),
- getFieldEditorParent()));
- addField(
- new StringFieldEditor(
- IDEPreferenceConstants.P_ACTIVATION_TRIGGER,
- Localization.getString("CodeAssistPreferencePage.ActivationTrigger"),
- getFieldEditorParent()));
- LogManager.logDebug("End createFieldEditors", this);
- }
-
- public void init(IWorkbench workbench) {
- LogManager.logInfo("Initializing", this);
- }
-
- public void dispose() {
- LogManager.logInfo("Disposing", this);
- super.dispose();
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/ConditionalFilterPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/ConditionalFilterPreferencePage.java
deleted file mode 100644
index f6bcf6d91f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/ConditionalFilterPreferencePage.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.preferences;
-
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.linuxtools.systemtap.ui.structures.ui.ListEditor;
-import org.eclipse.linuxtools.systemtap.ui.structures.validators.ConditionalExpressionValidator;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-
-
-public class ConditionalFilterPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
- public ConditionalFilterPreferencePage() {
- super(GRID);
- LogManager.logDebug("Start ConditionalFilterPreferencePage:", this);
- setPreferenceStore(IDEPlugin.getDefault().getPreferenceStore());
- setDescription(Localization.getString("ConditionalFilterPreferencePage.ConditiionalFilterSelector"));
- LogManager.logDebug("End ConditionalFilterPreferencePage:", this);
- }
-
- public void createFieldEditors() {
- LogManager.logDebug("Start createFieldEditors:", this);
-
- addField(new ListEditor(IDEPreferenceConstants.P_CONDITIONAL_FILTERS,
- Localization.getString("ConditionalFilterPreferencePage.ConditionalFilters"), Localization.getString("ConditionalFilterPreferencePage.NewFilter"), "if()", new ConditionalExpressionValidator(), getFieldEditorParent()));
- LogManager.logDebug("End createFieldEditors:", this);
- }
-
- public void init(IWorkbench workbench) {
- LogManager.logInfo("Initializing", this);
- }
-
- public void dispose() {
- LogManager.logInfo("Disposing", this);
- super.dispose();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/EditorPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/EditorPreferencePage.java
deleted file mode 100644
index 3195f7291b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/EditorPreferencePage.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.preferences;
-
-import org.eclipse.jface.preference.*;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.IWorkbench;
-
-
-public class EditorPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
- public EditorPreferencePage() {
- super(GRID);
- LogManager.logDebug("Start EditorPreferencePage:", this);
- setPreferenceStore(IDEPlugin.getDefault().getPreferenceStore());
- setDescription(Localization.getString("EditorPreferencePage.EditorPreferenceDescription"));
- LogManager.logDebug("End EditorPreferencePage:", this);
- }
-
- public void createFieldEditors() {
- LogManager.logDebug("Start createFieldEditors:", this);
- addField(new ColorFieldEditor(
- IDEPreferenceConstants.P_EDITOR_BACKGROUND,
- Localization.getString("EditorPreferencePage.BackgroundColor"), getFieldEditorParent()));
-
- addField(new BooleanFieldEditor(
- IDEPreferenceConstants.P_SHOW_LINE_NUMBERS,
- Localization.getString("EditorPreferencePage.ShowLineNumbers"),
- getFieldEditorParent()));
- LogManager.logDebug("End createFieldEditors:", this);
- }
-
- public void init(IWorkbench workbench) {
- LogManager.logInfo("Initializing", this);
- }
-
- public void dispose() {
- LogManager.logInfo("Disposing", this);
- super.dispose();
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/IDEPreferenceConstants.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/IDEPreferenceConstants.java
deleted file mode 100644
index 5e2129531c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/IDEPreferenceConstants.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.preferences;
-
-public class IDEPreferenceConstants {
- //ide
- public static final String P_STORED_TREE = "UseStoredTreePreference";
-
- //ide.path
-// public static final String P_DEFAULT_TAPSET = "DefaultTapsetPreference";
- public static final String P_KERNEL_SOURCE = "KernelSourcePreference";
- public static final String P_EXCLUDED_KERNEL_SOURCE = "ExcludedKernelSource";
-
- //ide.stap.tapsets
- public static final String P_TAPSETS = "TapsetPreference";
-
- //ide.editor
- public static final String P_EDITOR_BACKGROUND = "EditorBackgroundPreference";
- public static final String P_SHOW_LINE_NUMBERS = "ShowLineNumbers";
-
- //ide.editor.codeassist
- public static final String P_USE_CODE_ASSIST = "UseCodeAssistPreference";
- public static final String P_COMPLETION = "CompletionPreference";
- public static final String P_COMPLETION_INSERT = "CompletionInsertPreference";
- public static final String P_COMPLETION_OVERWRITE = "CompletionOverwritePreference";
- public static final String P_ACTIVATION_DELAY = "ActivationDelayPreference";
- public static final String P_ACTIVATION_TRIGGER = "ActivationTriggerPreference";
-
- //ide.editor.preferenceconstants
- public static final String P_CONDITIONAL_FILTERS = "ConditionalFilters";
-
- //ide.stap.stapoptions
- public static final String[][] P_STAP = new String[][] {
-// {"-h", "\tshow help", "hStapPreference"},
-// {"-V", "\tshow version", "VStapPreference"},
- {"-k", "\tkeep temporary directory", "kStapPreference"},
- {"-u", "\tunoptimized translation", "uStapPreference"},
-// {"-g", "\tguru mode", "gStapPreference"},
- {"-b", "\tbulk (relayfs) mode", "bStapPreference"},
- {"-t", "\tbenchmarking timing information", "tStapPreference"},
- {"-v", "\t\t\tincrease verbosity [0]", "vStapPreference"},
- {"-p NUM", "\t\tstop after pass NUM 1-5"/*, instead of 5 (parse, elaborate, translate, compile, run)"*/, "pStapPreference"},
- {"-s NUM", "\t\tbuffer size in megabytes", "sStapPreference"},
-// {"-I DIR", "\t\tlook in DIR for additional .stp script files, in addition to /usr/share/systemtap/tapset", "IStapPreference"},
- {"-D NM=VAL", "\temit macro definition into C code", "DStapPreference"},
- {"-R DIR", "\t\tlook in DIR for runtime", "RStapPreference"},
- {"-r RELEASE", "\tuse kernel RELEASE", "rStapPreference"},
- {"-m MODULE", "\tset probe module name", "mStapPreference"},
- {"-o FILE", "\t\tsend output to file", "oStapPreference"},
- {"-c CMD", "\t\tstart the probes, run CMD, and exit when it finishes", "cStapPreference"},
- {"-x PID", "\t\tsets target() to PID", "xStapPreference"}};
-
- public static final String[] P_STAP_OPTS = new String[] {
- "vStapOptPreference",
- "pStapOptPreference",
- "sStapOptPreference",
-// "IStapOptPreference",
- "DStapOptPreference",
- "RStapOptPreference",
- "rStapOptPreference",
- "mStapOptPreference",
- "oStapOptPreference",
- "cStapOptPreference",
- "xStapOptPreference"
- };
-
- //ide.editor.syntaxcoloring
- public static final String P_STP_DEFAULT_COLOR = "stpDefaultColorPreference";
- public static final String P_STP_KEYWORD_COLOR = "stpKeywordColorPreference";
- public static final String P_STP_EMBEDDED_C_COLOR = "stpEmbeddedCColorPreference";
- public static final String P_STP_EMBEDDED_COLOR = "stpEmbeddedColorPreference";
- public static final String P_STP_COMMENT_COLOR = "stpCommentColorPreference";
- public static final String P_STP_TYPE_COLOR = "stpTypeColorPreference";
- public static final String P_STP_STRING_COLOR = "stpStringColorPreference";
- public static final String P_C_DEFAULT_COLOR = "cDefaultColorPreference";
- public static final String P_C_KEYWORD_COLOR = "cKeywordColorPreference";
- public static final String P_C_COMMENT_COLOR = "cCommentColorPreference";
- public static final String P_C_PREPROCESSOR_COLOR = "cPreprocessorColorPreference";
- public static final String P_C_TYPE_COLOR = "cTypeColorPreference";
- public static final String P_C_STRING_COLOR = "cStringColorPreference";
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/IDEPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/IDEPreferencePage.java
deleted file mode 100644
index 8296a315d7..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/IDEPreferencePage.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.preferences;
-
-import org.eclipse.jface.preference.*;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.IWorkbench;
-
-
-public class IDEPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
- public IDEPreferencePage() {
- super(GRID);
- LogManager.logDebug("Start IDEPreferencePage:", this);
- setPreferenceStore(IDEPlugin.getDefault().getPreferenceStore());
- setDescription("Preferences when loading the IDE perspective");
- LogManager.logDebug("End IDEPreferencePage:", this);
- }
-
- public void createFieldEditors() {
- LogManager.logDebug("Start createFieldEditors:", this);
- addField(new BooleanFieldEditor(
- IDEPreferenceConstants.P_STORED_TREE,
- Localization.getString("IDEPreferencePage.UseStoredTapsetTree"),
- getFieldEditorParent()));
- LogManager.logDebug("End createFieldEditors:", this);
- }
-
- public void init(IWorkbench workbench) {
- LogManager.logInfo("Initializing", this);
- }
-
- public void dispose() {
- LogManager.logInfo("Disposing", this);
- super.dispose();
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/PathPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/PathPreferencePage.java
deleted file mode 100644
index b58a9549c6..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/PathPreferencePage.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.preferences;
-
-import org.eclipse.jface.preference.*;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.linuxtools.systemtap.ui.structures.ui.ListEditor;
-import org.eclipse.linuxtools.systemtap.ui.structures.validators.DirectoryValidator;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.IWorkbench;
-
-
-
-public class PathPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
- public PathPreferencePage() {
- super(GRID);
- LogManager.logDebug("Start PathPreferencePage:", this);
- setPreferenceStore(IDEPlugin.getDefault().getPreferenceStore());
- setDescription("Important directories");
- LogManager.logDebug("End PathPreferencePage:", this);
- }
-
- public void createFieldEditors() {
- LogManager.logDebug("Start createFieldEditors:", this);
-// addField(new DirectoryFieldEditor(IDEPreferenceConstants.P_DEFAULT_TAPSET,
-// "&Default tapset directory:", getFieldEditorParent()));
- addField(new DirectoryFieldEditor(IDEPreferenceConstants.P_KERNEL_SOURCE,
- Localization.getString("PathPreferencePage.KernelSourceDirectory"), getFieldEditorParent()));
-
- addField(new ListEditor(IDEPreferenceConstants.P_EXCLUDED_KERNEL_SOURCE,
- Localization.getString("PathPreferencePage.ExcludedSourceFolders"), Localization.getString("PathPreferencePage.ExcludedDirectory"), "", new DirectoryValidator(), getFieldEditorParent()));
- LogManager.logDebug("End createFieldEditors:", this);
- }
-
- public void init(IWorkbench workbench) {
- LogManager.logInfo("Initializing", this);
- }
-
- public void dispose() {
- LogManager.logInfo("Disposing", this);
- super.dispose();
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/PreferenceInitializer.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/PreferenceInitializer.java
deleted file mode 100644
index d19dfb0e33..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/PreferenceInitializer.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/* Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.preferences;
-
-import java.io.File;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.linuxtools.systemtap.ui.ide.editors.c.ICColorConstants;
-import org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.STPColorConstants;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.swt.graphics.RGB;
-
-
-public class PreferenceInitializer extends AbstractPreferenceInitializer {
- public void initializeDefaultPreferences() {
- LogManager.logDebug("Start initializeDefaultPreferences:", this);
- IPreferenceStore store = IDEPlugin.getDefault().getPreferenceStore();
-
- //ide
- store.setDefault(IDEPreferenceConstants.P_STORED_TREE, true);
-
- //ide.path
-// store.setDefault(PreferenceConstants.P_DEFAULT_TAPSET, "/usr/share/systemtap/tapset");
- store.setDefault(IDEPreferenceConstants.P_KERNEL_SOURCE, "");
- store.setDefault(IDEPreferenceConstants.P_EXCLUDED_KERNEL_SOURCE,
- "CVS/" + File.pathSeparator +
- ".svn/" + File.pathSeparator +
- "{arch}/" + File.pathSeparator +
- ".arch-ids/" + File.pathSeparator +
- ".bzr/" + File.pathSeparator +
- "debian/" + File.pathSeparator +
- ".git/");
-
- //ide.stap.tapsets
- store.setDefault(IDEPreferenceConstants.P_TAPSETS, "");
-
- //ide.editor
- PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_EDITOR_BACKGROUND, new RGB(255,255,255));
- store.setDefault(IDEPreferenceConstants.P_SHOW_LINE_NUMBERS, false);
-
- //ide.editor.codeassist
- store.setDefault(IDEPreferenceConstants.P_USE_CODE_ASSIST, true);
- store.setDefault(IDEPreferenceConstants.P_COMPLETION, IDEPreferenceConstants.P_COMPLETION_INSERT);
- store.setDefault(IDEPreferenceConstants.P_ACTIVATION_DELAY, 200);
- store.setDefault(IDEPreferenceConstants.P_ACTIVATION_TRIGGER, ".");
-
- //ide.editor.conditionalfilters
- store.setDefault(IDEPreferenceConstants.P_CONDITIONAL_FILTERS,
- "if(pid=currentpid)" + File.pathSeparator +
- "if(execname=cmdname)" + File.pathSeparator +
- "if(cpu=0)" + File.pathSeparator +
- "if(caller=functionname)");
-
-
- //ide.stap.stapoptions
- for(int i=0; i<IDEPreferenceConstants.P_STAP.length; i++) {
- store.setDefault(IDEPreferenceConstants.P_STAP[i][2], false);
- }
-
- for(int i=0; i<IDEPreferenceConstants.P_STAP_OPTS.length; i++) {
- store.setDefault(IDEPreferenceConstants.P_STAP_OPTS[i], "");
- }
-
- //ide.editor.syntaxcoloring
- PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_STP_DEFAULT_COLOR, STPColorConstants.DEFAULT);
- PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_STP_KEYWORD_COLOR, STPColorConstants.KEYWORD);
- PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_STP_EMBEDDED_C_COLOR, STPColorConstants.EMBEDDEDC);
- PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_STP_EMBEDDED_COLOR, STPColorConstants.EMBEDDED);
- PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_STP_COMMENT_COLOR, STPColorConstants.COMMENT);
- PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_STP_TYPE_COLOR, STPColorConstants.TYPE);
- PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_STP_STRING_COLOR, STPColorConstants.STP_STRING);
-
- PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_C_DEFAULT_COLOR, ICColorConstants.DEFAULT);
- PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_C_KEYWORD_COLOR, ICColorConstants.KEYWORD);
- PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_C_COMMENT_COLOR, ICColorConstants.COMMENT);
- PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_C_PREPROCESSOR_COLOR, ICColorConstants.PREPROCESSOR);
- PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_C_TYPE_COLOR, ICColorConstants.TYPE);
- PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_C_STRING_COLOR, ICColorConstants.STRING);
-
- LogManager.logDebug("End initializeDefaultPreferences:", this);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/StapOptionsPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/StapOptionsPreferencePage.java
deleted file mode 100644
index ecd9ca5e84..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/StapOptionsPreferencePage.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.preferences;
-
-import org.eclipse.jface.preference.*;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.IWorkbench;
-
-
-public class StapOptionsPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
- public StapOptionsPreferencePage() {
- super(GRID);
- LogManager.logDebug("Start StapOptionsPreferencePage:", this);
- setPreferenceStore(IDEPlugin.getDefault().getPreferenceStore());
- setDescription(Localization.getString("StapOptionsPreferencePage.StapOptions"));
- LogManager.logDebug("End StapOptionsPreferencePage:", this);
- }
-
- public void createFieldEditors() {
- LogManager.logDebug("Start createFieldEditors:", this);
- for(int i=0; i<IDEPreferenceConstants.P_STAP.length; i++) {
- addField(
- new BooleanFieldEditor(
- IDEPreferenceConstants.P_STAP[i][2],
- IDEPreferenceConstants.P_STAP[i][0] + "\t" + IDEPreferenceConstants.P_STAP[i][1],
- getFieldEditorParent()));
-
- if(2 < IDEPreferenceConstants.P_STAP[i][0].length()) {
- StringFieldEditor sfe = new StringFieldEditor(
- IDEPreferenceConstants.P_STAP_OPTS[i-IDEPreferenceConstants.P_STAP.length+IDEPreferenceConstants.P_STAP_OPTS.length],
- "\t",
- getFieldEditorParent());
-
- addField(sfe);
- }
- }
- LogManager.logDebug("End createFieldEditors:", this);
- }
-
- public void init(IWorkbench workbench) {
- LogManager.logInfo("Initializing", this);
- }
-
- public void dispose() {
- LogManager.logInfo("Disposing", this);
- super.dispose();
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/StapPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/StapPreferencePage.java
deleted file mode 100644
index 51ea2e49f0..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/StapPreferencePage.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.preferences;
-
-import org.eclipse.jface.preference.*;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.IWorkbench;
-
-
-public class StapPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
- public StapPreferencePage() {
- super(GRID);
- LogManager.logDebug("Start StapPreferencePage:", this);
- setPreferenceStore(IDEPlugin.getDefault().getPreferenceStore());
- setDescription(Localization.getString("StapPreferencePage.StapPreferenceDescription"));
- LogManager.logDebug("End StapPreferencePage:", this);
- }
-
- //TODO: Add content to this page
- public void createFieldEditors() {
- LogManager.logDebug("Start createFieldEditors:", this);
- LogManager.logDebug("End createFieldEditors:", this);
- }
-
- public void init(IWorkbench workbench) {
- LogManager.logInfo("Initializing", this);
- }
-
- public void dispose() {
- LogManager.logInfo("Disposing", this);
- super.dispose();
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/SyntaxColoringPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/SyntaxColoringPreferencePage.java
deleted file mode 100644
index f66ed2882f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/SyntaxColoringPreferencePage.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.preferences;
-
-import org.eclipse.jface.preference.*;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.TabFolder;
-import org.eclipse.swt.widgets.TabItem;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.IWorkbench;
-
-
-public class SyntaxColoringPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
- public SyntaxColoringPreferencePage() {
- super();
- LogManager.logDebug("Start SyntaxColoringPreferencePage:", this);
- setPreferenceStore(IDEPlugin.getDefault().getPreferenceStore());
- setDescription(Localization.getString("SyntaxColoringPreferencePage.SyntaxColoringOptions"));
- LogManager.logDebug("End SyntaxColoringPreferencePage:", this);
- }
-
- public void init(IWorkbench workbench) {
- LogManager.logInfo("Initializing", this);
- }
-
- protected Control createContents(Composite parent) {
- LogManager.logDebug("Start createContents: parent-" + parent, this);
- final TabFolder tabFolder = new TabFolder(parent, SWT.BORDER);
-
- //STP Editor
- TabItem stpEditor = new TabItem(tabFolder, SWT.NULL);
- stpEditor.setText(Localization.getString("SyntaxColoringPreferencePage.STPEditor"));
- Composite comp = new Composite(tabFolder, SWT.NULL);
- stpEditor.setControl(comp);
-
- stpDC = createColorFieldEditor(
- IDEPreferenceConstants.P_STP_DEFAULT_COLOR,
- Localization.getString("SyntaxColoringPreferencePage.DefaultColor"), comp);
- stpKC = createColorFieldEditor(
- IDEPreferenceConstants.P_STP_KEYWORD_COLOR,
- Localization.getString("SyntaxColoringPreferencePage.KeywordColor"), comp);
- stpEC = createColorFieldEditor(
- IDEPreferenceConstants.P_STP_EMBEDDED_C_COLOR,
- Localization.getString("SyntaxColoringPreferencePage.EmbeddedCColor"), comp);
- stpEE = createColorFieldEditor(
- IDEPreferenceConstants.P_STP_EMBEDDED_COLOR,
- Localization.getString("SyntaxColoringPreferencePage.EmbeddedColor"), comp);
- stpCC = createColorFieldEditor(
- IDEPreferenceConstants.P_STP_COMMENT_COLOR,
- Localization.getString("SyntaxColoringPreferencePage.CommentColor"), comp);
- stpTC = createColorFieldEditor(
- IDEPreferenceConstants.P_STP_TYPE_COLOR,
- Localization.getString("SyntaxColoringPreferencePage.TypeColor"), comp);
- stpSC = createColorFieldEditor(
- IDEPreferenceConstants.P_STP_STRING_COLOR,
- Localization.getString("SyntaxColoringPreferencePage.StringColor"), comp);
-
- //C Editor
- TabItem cEditor = new TabItem(tabFolder, SWT.NULL);
- cEditor.setText(Localization.getString("SyntaxColoringPreferencePage.CEditor"));
- comp = new Composite(tabFolder, SWT.NULL);
- cEditor.setControl(comp);
-
- cDC = createColorFieldEditor(
- IDEPreferenceConstants.P_C_DEFAULT_COLOR,
- Localization.getString("SyntaxColoringPreferencePage.DefaultColor"), comp);
- cKC = createColorFieldEditor(
- IDEPreferenceConstants.P_C_KEYWORD_COLOR,
- Localization.getString("SyntaxColoringPreferencePage.KeywordColor"), comp);
- cPC = createColorFieldEditor(
- IDEPreferenceConstants.P_C_PREPROCESSOR_COLOR,
- Localization.getString("SyntaxColoringPreferencePage.PreprocessorColor"), comp);
- cCC = createColorFieldEditor(
- IDEPreferenceConstants.P_C_COMMENT_COLOR,
- Localization.getString("SyntaxColoringPreferencePage.CommentColor"), comp);
- cTC = createColorFieldEditor(
- IDEPreferenceConstants.P_C_TYPE_COLOR,
- Localization.getString("SyntaxColoringPreferencePage.TypeColor"), comp);
- cSC = createColorFieldEditor(
- IDEPreferenceConstants.P_C_STRING_COLOR,
- Localization.getString("SyntaxColoringPreferencePage.StringColor"), comp);
-
- LogManager.logDebug("End createContents: returnVal-" + tabFolder, this);
- return tabFolder;
- }
-
- private ColorFieldEditor createColorFieldEditor(String name, String lblText, Composite parent) {
- LogManager.logDebug("Start createColorFieldEditor: name-" + name + ", lblText-" + lblText + ", parent-" + parent, this);
- ColorFieldEditor cfe = new ColorFieldEditor(name, lblText, parent);
- cfe.setPage(this);
- cfe.setPreferenceStore(getPreferenceStore());
- cfe.load();
-
- LogManager.logDebug("End createColorFieldEditor: returnVal-" + cfe, this);
- return cfe;
- }
-
- protected void performDefaults() {
- LogManager.logDebug("Start performDefaults:", this);
- stpDC.loadDefault();
- stpKC.loadDefault();
- stpEC.loadDefault();
- stpEE.loadDefault();
- stpCC.loadDefault();
- stpTC.loadDefault();
- stpSC.loadDefault();
- cDC.loadDefault();
- cKC.loadDefault();
- cPC.loadDefault();
- cCC.loadDefault();
- cTC.loadDefault();
- cSC.loadDefault();
-
- super.performDefaults();
- LogManager.logDebug("End performDefaults:", this);
- }
-
- public boolean performOk() {
- LogManager.logDebug("Start performOk:", this);
- stpDC.store();
- stpKC.store();
- stpEC.store();
- stpEE.store();
- stpCC.store();
- stpTC.store();
- stpSC.store();
- cDC.store();
- cKC.store();
- cPC.store();
- cCC.store();
- cTC.store();
- cSC.store();
-
- LogManager.logDebug("End performOk returnVal-true", this);
- return true;
- }
-
- public void dispose() {
- LogManager.logInfo("Disposing", this);
- super.dispose();
- stpDC.dispose();
- stpKC.dispose();
- stpEC.dispose();
- stpEE.dispose();
- stpCC.dispose();
- stpTC.dispose();
- stpSC.dispose();
- cDC.dispose();
- cKC.dispose();
- cPC.dispose();
- cCC.dispose();
- cTC.dispose();
- cSC.dispose();
- stpDC = null;
- stpKC = null;
- stpEC = null;
- stpEE = null;
- stpCC = null;
- stpTC = null;
- stpSC = null;
- cDC = null;
- cKC = null;
- cPC = null;
- cCC = null;
- cTC = null;
- cSC = null;
- }
-
- private ColorFieldEditor stpDC, stpKC, stpEC, stpEE, stpCC, stpTC, stpSC;
- private ColorFieldEditor cDC, cKC, cPC, cCC, cTC, cSC;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/TapsetsPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/TapsetsPreferencePage.java
deleted file mode 100644
index ccf5a0f8bd..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/TapsetsPreferencePage.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.preferences;
-
-import org.eclipse.jface.preference.*;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.IWorkbench;
-
-
-public class TapsetsPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
- public TapsetsPreferencePage() {
- super(GRID);
- LogManager.logDebug("Start TapsetsPreferencePage:", this);
- setPreferenceStore(IDEPlugin.getDefault().getPreferenceStore());
- setDescription(Localization.getString("TapsetsPreferencePage.AdditionalTapsetsCategory"));
- LogManager.logDebug("End TapsetsPreferencePage:", this);
- }
-
- /**
- * Creates the field editors. Field editors are abstractions of
- * the common GUI blocks needed to manipulate various types
- * of preferences. Each field editor knows how to save and
- * restore itself.
- */
- public void createFieldEditors() {
- LogManager.logDebug("Start createFieldEditors:", this);
- addField(new PathEditor(IDEPreferenceConstants.P_TAPSETS,
- Localization.getString("TapsetsPreferencePage.AdditionalTapsets"), Localization.getString("TapsetsPreferencePage.TapsetDirectory"), getFieldEditorParent()));
- LogManager.logDebug("End createFieldEditors:", this);
- }
-
- public void init(IWorkbench workbench) {
- LogManager.logInfo("Initializing", this);
- }
-
- public void dispose() {
- LogManager.logInfo("Disposing", this);
- super.dispose();
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/TypeingPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/TypeingPreferencePage.java
deleted file mode 100644
index 164ca9935a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/TypeingPreferencePage.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.preferences;
-
-import org.eclipse.jface.preference.*;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.IWorkbench;
-
-
-public class TypeingPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
- public TypeingPreferencePage() {
- super(GRID);
- LogManager.logDebug("Start TypeingPreferencePage:", this);
- setPreferenceStore(IDEPlugin.getDefault().getPreferenceStore());
- setDescription(Localization.getString("TypeingPreferencePage.TypingPreferenceDescription"));
- LogManager.logDebug("End TypeingPreferencePage:", this);
- }
-
- //TODO: Add content to this page
- public void createFieldEditors() {
- LogManager.logDebug("Start createFieldEditors:", this);
- LogManager.logDebug("End createFieldEditors:", this);
- }
-
- public void init(IWorkbench workbench) {
- LogManager.logInfo("Initializing", this);
- }
-
- public void dispose() {
- LogManager.logInfo("Disposing", this);
- super.dispose();
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/Query.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/Query.java
deleted file mode 100644
index d931c8e88f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/Query.java
+++ /dev/null
@@ -1,176 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.ide.structures;
-
-import java.util.StringTokenizer;
-
-public final class Query {
-
- public String tableName;
- public String where;
- public String groupBy;
- public String orderBy;
- public String[] columnNames;
- public String[] newColumnNames;
-
- /**
- * This constructor is only used internally to set the various fields
- * to null.
- */
- private Query() {
- this.where = null;
- this.groupBy = null;
- this.orderBy = null;
- this.newColumnNames = null;
- }
-
- public Query(final String tableName, final String[] columnNames) {
- this();
- this.tableName = tableName;
- this.columnNames = columnNames;
- }
-
- public Query(final Query query) {
- tableName = query.tableName;
- columnNames = query.columnNames;
- newColumnNames = query.newColumnNames;
- where = query.where;
- groupBy = query.groupBy;
- orderBy = query.orderBy;
- }
-
- public Query(final String tableName) {
- this();
- this.tableName = tableName;
- this.columnNames = null;
- }
-
- public Query(final String tableName, final String[] columnNames,
- final String[] newColumnNames, final String where,
- final String groupBy, final String orderBy) {
- this.tableName = tableName;
- this.columnNames = columnNames;
- this.newColumnNames = newColumnNames;
- this.where = where;
- this.groupBy = groupBy;
- this.orderBy = orderBy;
- }
-
- public String toString() {
- return buildQuery(tableName, columnNames, newColumnNames, where,
- groupBy, orderBy);
- }
-
- private String buildQuery(final String tableName, final String[] fields,
- final String[] columnNames, final String whereClauses,
- final String groupBy, final String orderBy) {
- String query = "SELECT ";
- if (fields == (null))
- query += "* ";
- else
- for (int i = 0; i < fields.length; i++) {
- query += fields[i];
- if ((columnNames != null)
- && (columnNames.length == fields.length))
- query += " AS " + columnNames[i];
- if (i != (fields.length - 1))
- query += ", ";
- }
- query += " FROM " + tableName;
- if (whereClauses != null)
- query += " WHERE " + whereClauses;
- if (groupBy != null)
- query += " GROUP BY " + groupBy;
- if (orderBy != null)
- query += " ORDER BY " + orderBy;
- return query;
- }
-
- /**
- * Turns the query into a string that can be written to a file and easily
- * recreated as a Query object.
- *
- * @return
- */
- public String toSavableQueryString() {
- String query = tableName + ":: COLS ";
- if (columnNames != null)
- for (final String element : columnNames)
- query += element + " ";
- else
- query += "*";
-
- query += ":: NEW_COLS ";
- if (columnNames != null)
- for (final String element : newColumnNames)
- query += element + " ";
- query += ":: WHERE " + where;
- query += ":: GROUP " + groupBy;
- query += ":: ORDER " + orderBy;
- return query;
- }
-
- /**
- * Creates a Query object from a string created by toSavableQueryString()
- *
- * @param query
- * The query string to be turned into a Query object.
- * @return a new Query object created by the given string.
- */
- public static Query getQueryFromString(final String query) {
- if (query == null)
- return null;
- final String[] subQuery = query.split("::");
- final Query tempQuery = new Query(subQuery[0]);
- for (int i = 1; i < subQuery.length; i++) {
- subQuery[i] = subQuery[i].trim();
- if (subQuery[i].startsWith("COLS ")) {
- String temp = subQuery[i].replace("COLS ", "");
- temp = temp.trim();
- final StringTokenizer tok = new StringTokenizer(temp);
- final String next = tok.nextToken();
- if (next.equals("null") || next.equals("*"))
- tempQuery.columnNames = null;
- else {
- tempQuery.columnNames = new String[tok.countTokens() + 1];
- tempQuery.columnNames[0] = next;
- for (int j = 1; j < tempQuery.columnNames.length; j++)
- tempQuery.columnNames[j] = tok.nextToken();
- }
- } else if (subQuery[i].startsWith("NEW_COLS ")) {
- String temp = subQuery[i].replace("NEW_COLS ", "");
- temp = temp.trim();
- final StringTokenizer tok = new StringTokenizer(temp);
- final String next = tok.nextToken();
- if (next.equals("null"))
- tempQuery.newColumnNames = null;
- else {
- tempQuery.newColumnNames = new String[tok.countTokens() + 1];
- tempQuery.newColumnNames[0] = next;
- for (int j = 1; j < tempQuery.newColumnNames.length; j++)
- tempQuery.newColumnNames[j] = tok.nextToken();
- }
- } else if (subQuery[i].startsWith("WHERE ")) {
- String temp = subQuery[i].replace("WHERE ", "");
- temp = temp.trim();
- if (temp.equals("null"))
- tempQuery.where = null;
- else
- tempQuery.where = temp;
- } else if (subQuery[i].startsWith("GROUP ")) {
- String temp = subQuery[i].replace("GROUP ", "");
- temp = temp.trim();
- if (temp.equals("null"))
- tempQuery.groupBy = null;
- else
- tempQuery.groupBy = temp;
- } else if (subQuery[i].startsWith("ORDER ")) {
- String temp = subQuery[i].replace("ORDER ", "");
- temp = temp.trim();
- if (temp.equals("null"))
- tempQuery.orderBy = null;
- else
- tempQuery.orderBy = temp;
- }
- }
- return tempQuery;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/StapErrorParser.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/StapErrorParser.java
deleted file mode 100644
index 351dc38e3d..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/StapErrorParser.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.structures;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.IErrorParser;
-
-
-/**
- * Parses the output from the stap command into a table of strings that are displayed
- * in the error log.
- * @author Ryan Morse
- */
-public final class StapErrorParser implements IErrorParser {
- /**
- * Parses the error log passed in into a table of strings.
- * @param output The output from the stderr StreamGobbler.
- * @return A table of strings in the proper format to be displayed in the error log.
- */
- public String[][] parseOutput(String output) {
- String[][] sErrors = null;
- ArrayList<String[]> errors = new ArrayList<String[]>();
- int errorType = TYPE;
-
- if(null != output) {
- String[] tokens = output.split("\\s");
- String[] row = null;
-
- for(int i=0; i<tokens.length; i++) {
- if(tokens[i].equals("error:")) {
- row = new String[] {"", "", "", ""};
- errors.add(row);
- row[TYPE] = tokens[i-1] + " " + tokens[i];
- errorType = ERROR;
- i++;
- } else if(tokens[i].equals("saw:")) {
- errorType = SAW;
- i++;
- } else if(tokens[i].equals("at")) {
- errorType = LOCATION;
- i++;
- } else if(tokens[i].equals("Pass")) {
- errorType = PASS;
-
- }
-
- if(null != row && errorType != PASS)
- row[errorType] += tokens[i] + " ";
- }
-
- sErrors = new String[errors.size()][4];
- System.arraycopy(errors.toArray(), 0, sErrors, 0, errors.size());
-
- for(int i=0; i<sErrors.length; i++)
- sErrors[i][LOCATION] = fixLocation(sErrors[i][LOCATION]);
- }
-
- return sErrors;
- }
-
- private static String fixLocation(String loc) {
- if(loc.contains(":")) {
- loc = loc.substring(loc.indexOf(':')+1, loc.lastIndexOf(':'));
- return loc;
- } else
- return "";
- }
-
- private static final int TYPE = 0;
- private static final int ERROR = 1;
- private static final int SAW = 2;
- private static final int LOCATION = 3;
- private static final int PASS = 4;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TapsetLibrary.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TapsetLibrary.java
deleted file mode 100644
index b884a22200..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TapsetLibrary.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.structures;
-
-import java.io.File;
-
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.linuxtools.systemtap.ui.ide.IDESessionSettings;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.ide.preferences.IDEPreferenceConstants;
-import org.eclipse.linuxtools.systemtap.ui.structures.TreeNode;
-import org.eclipse.linuxtools.systemtap.ui.structures.listeners.IUpdateListener;
-import org.eclipse.linuxtools.systemtap.ui.systemtapgui.preferences.PreferenceConstants;
-import org.eclipse.ui.PlatformUI;
-
-
-
-/**
- * This class is used for obtaining all probes and functions from the tapsets.
- * It will initially try to obtain the list from the TreeSettings.xml file, but
- * if there is a problem doing that it will run the TapsetParser in order to
- * obtain everything that way.
- * @author Ryan Morse
- */
-public final class TapsetLibrary {
- public static TreeNode getProbes() {
- return probeTree;
- }
-
- public static TreeNode getFunctions() {
- return functionTree;
- }
-
- /**
- * This mthod will attempt to get the most up-to-date information.
- * However, if the TapsetParser is running already it will quit,
- * assuming that new information will be avilable soon. By registering
- * a listener at that point the class can be notified when an update is
- * available.
- */
- public static void init() {
- if(null != stpp && stpp.isRunning())
- return;
-
- if(IDEPlugin.getDefault().getPreferenceStore()
- .getBoolean(IDEPreferenceConstants.P_STORED_TREE) &&
- isTreeFileCurrent())
- readTreeFile();
- else
- runStapParser();
- }
-
- /**
- * This method will create a new instance of the TapsetParser in order
- * to get the information directly from the files.
- */
- private static void runStapParser() {
- String[] tapsets = IDEPlugin.getDefault().getPreferenceStore()
- .getString(IDEPreferenceConstants.P_TAPSETS).split(File.pathSeparator);
-
- stpp = new TapsetParser(tapsets);
- stpp.start();
- stpp.addListener(completionListener);
- functionTree = stpp.getFunctions();
- probeTree = stpp.getProbes();
- }
-
- /**
- * This method will get all of the tree information from
- * the TreeSettings xml file.
- */
- private static void readTreeFile() {
- functionTree = TreeSettings.getFunctionTree();
- probeTree = TreeSettings.getProbeTree();
- }
-
- /**
- * This method checks to see if the tapsets have changed
- * at all since the TreeSettings.xml file was created.
- * @return boolean indecating whether or not the TreeSettings.xml file has the most up-to-date version
- */
- private static boolean isTreeFileCurrent() {
- long treesDate = TreeSettings.getTreeFileDate();
-
- IPreferenceStore p = IDEPlugin.getDefault().getPreferenceStore();
- String[] tapsets = p.getString(IDEPreferenceConstants.P_TAPSETS).split(File.pathSeparator);
-
- File f = getTapsetLocation(p);
-
- if(!checkIsCurrentFolder(treesDate, f))
- return false;
-
- if(null != tapsets) {
- for(int i=0; i<tapsets.length; i++) {
- f = new File(tapsets[i]);
- if(f.lastModified() > treesDate)
- return false;
- if(f.canRead() && !checkIsCurrentFolder(treesDate, f))
- return false;
- }
- }
- return true;
- }
-
- /**
- * This method attempts to locate the default tapset directory.
- * @param p Preference store where the tapset location might be stored
- * @return File representing the default tapset location.
- */
- public static File getTapsetLocation(IPreferenceStore p) {
- File f;
- String path = p.getString(PreferenceConstants.P_ENV[2][0]);
- if(path.trim().equals("")) {
- f = new File("/usr/share/systemtap/tapset");
- if(!f.exists()) {
- f = new File("/usr/local/share/systemtap/tapset");
- if(!f.exists()) {
- InputDialog i = new InputDialog(
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- Localization.getString("TapsetBrowserView.TapsetLocation"), Localization.getString("TapsetBrowserView.WhereDefaultTapset"), "", null);
- i.open();
- p.setValue(PreferenceConstants.P_ENV[2][0], i.getValue());
- f = new File( i.getValue() );
- }
- }
- } else {
- f = new File( p.getString(path) );
- }
- IDESessionSettings.tapsetLocation = f.getAbsolutePath();
- return f;
- }
-
- /**
- * This method checks the provided time stap against the folders
- * time stamp. This is to see if the folder may have new data in it
- * @param time The current time stamp
- * @param folder The folder to check if it is newer the then time stamp
- * @return boolean indicating whther the time stamp is newer then the folder
- */
- private static boolean checkIsCurrentFolder(long time, File folder) {
- File[] fs = folder.listFiles();
-
- for(int i=0; i<fs.length; i++) {
- if(fs[i].lastModified() > time)
- return false;
-
- if(fs[i].isDirectory() && fs[i].canRead())
- if(!checkIsCurrentFolder(time, fs[i]))
- return false;
- }
- return true;
- }
-
- /**
- * Adds a new listener to the TapsetParser
- * @param listener the listener to be added
- * @return boolean indacating whether or not the listener was added
- */
- public static boolean addListener(IUpdateListener listener) {
- if(null == stpp)
- return false;
-
- stpp.addListener(listener);
- return true;
- }
-
- /**
- * Removes the provided listener from the tapsetParser.
- * @param listener The listener to be removed from the tapsetParser
- */
- public static void removeUpdateListener(IUpdateListener listener) {
- stpp.removeListener(listener);
- }
-
- /**
- * This class handles saving the results of the TapsetParser to
- * the TreeSettings.xml file.
- */
- private static final IUpdateListener completionListener = new IUpdateListener() {
- public void handleUpdateEvent() {
- functionTree = stpp.getFunctions();
- probeTree = stpp.getProbes();
- if(stpp.isFinishSuccessful())
- TreeSettings.setTrees(functionTree, probeTree);
- }
- };
-
- private static TreeNode functionTree = null;
- private static TreeNode probeTree = null;
- private static TapsetParser stpp = null;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TapsetParser.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TapsetParser.java
deleted file mode 100644
index e7a41bdf45..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TapsetParser.java
+++ /dev/null
@@ -1,679 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.structures;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.linuxtools.systemtap.ui.structures.TreeDefinitionNode;
-import org.eclipse.linuxtools.systemtap.ui.structures.TreeNode;
-import org.eclipse.linuxtools.systemtap.ui.structures.listeners.IUpdateListener;
-import org.eclipse.linuxtools.systemtap.ui.structures.runnable.LoggedCommand;
-
-
-
-/**
- * Runs stap -vp1 & stap -up2 in order to get all of the probes/functions
- * that are defined in the tapsets. Builds probeAlias and function trees
- * with the values obtained from the tapsets.
- *
- * Ugly code is a result of two issues with getting stap output. First,
- * many tapsets do not work under stap -up2. Second since the output
- * is not a regular language, we can't create a nice lexor/parser combination
- * to do everything nicely.
- * @author Ryan Morse
- */
-public class TapsetParser implements Runnable {
- public TapsetParser(String[] tapsets) {
- this.tapsets = tapsets;
- listeners = new ArrayList<IUpdateListener>();
- }
-
- /**
- * This method sets up everything that is needed before actually creating
- * a new process. It will run the first pass of stap to build the tapset
- * tree framework.
- */
- protected void init() {
- disposed = false;
- functions = new TreeNode("", false);
- probes = new TreeNode("", false);
-
- String s = readPass1(null);
- parseLevel1(s);
- cleanupTrees();
- }
-
- /**
- * This method will initialize everything and then start the process running.
- * This method should be called by any class wishing to run the parser.
- */
- public void start() {
- stopped = false;
- init();
- Thread t = new Thread(this, "TapsetParser");
- t.start();
- }
-
- /**
- * This method chanegs the stop variable which is checked periodically by the
- * running thread to see if it should stop running.
- */
- public synchronized void stop() {
- stopped = true;
- }
-
- /**
- * This method checks to see if the process has been asked to stop
- * @return Boolean indicating whether or not a stop command has been received
- */
- public boolean isRunning() {
- return !stopped;
- }
-
- /**
- * This method checks to see if the process has been disposed or not.
- * @return Boolean indicating whether or not the parser has been disposed.
- */
- public boolean isDisposed() {
- return disposed;
- }
-
- /**
- * Returns the root node of the tree of functions generated by
- * parseFiles. Functions are grouped by source file.
- * @return A tree of tapset functions grouped by file.
- */
- public synchronized TreeNode getFunctions() {
- return functions;
- }
-
- /**
- * Returns the root node of the tree of the probe alias generated by
- * parseFiles. Probes are grouped by target location.
- * @return A tree of tapset probe aliases grouped by probe location.
- */
- public synchronized TreeNode getProbes() {
- return probes;
- }
-
- /**
- * This method checks to see if the parser completed executing on its own.
- * @return Boolean indicating whether or not the thread finished on its own.
- */
- public boolean isFinishSuccessful() {
- return successfulFinish;
- }
-
- /**
- * Runs stap -up2 on both the function and the probe trees. At this
- * point the trees are both filled with all data obtained from stap -vp1
- * After each tree is finished, an update event will be fired so callers
- * know that they can update.
- */
- public void run() {
- runPass2Functions();
- fireUpdateEvent(); //Inform listeners that a new batch of functions has variable info
- runPass2Probes();
- fireUpdateEvent(); //Inform listeners that a new batch of probes has variable info
- stop();
- successfulFinish = true;
- fireUpdateEvent(); //Inform listeners that everything is done
- }
-
- /**
- * This method will register a new listener with the parser
- * @param listener The listener that will receive updateEvents
- */
- public void addListener(IUpdateListener listener) {
- if(null != listener)
- listeners.add(listener);
- }
-
- /**
- * This method will unregister the listener with the parser
- * @param listener The listener that no longer wants to recieve update events
- */
- public void removeListener(IUpdateListener listener) {
- if(null != listener)
- listeners.remove(listener);
- }
-
- /**
- * This method will fire an updateEvent to all listeners.
- */
- private void fireUpdateEvent() {
- for(int i=0; i<listeners.size(); i++)
- ((IUpdateListener)listeners.get(i)).handleUpdateEvent();
- }
-
- /**
- * Runs the stap with the given options and returns the output generated
- * @param options String[] of any optional parameters to pass to stap
- * @param probe String containing the script to run stap on
- * @param level integer representing what point to stop stap at (1,2,3,4,5)
- */
- protected String runStap(String[] options, String probe, int level) {
- String[] script = null;
-
- int size = 4; //start at 4 for stap, -pX, -e, script
- if(null != tapsets && tapsets.length > 0 && tapsets[0].trim().length() > 0)
- size += tapsets.length<<1;
- if(null != options && options.length > 0 && options[0].trim().length() > 0)
- size += options.length;
-
- script = new String[size];
- script[0] = "stap";
- script[1] = "-p" + level;
- script[size-2] = "-e";
- script[size-1] = probe;
-
- //Add extra tapset directories
- if(null != tapsets && tapsets.length > 0 && tapsets[0].trim().length() > 0) {
- for(int i=0; i<tapsets.length; i++) {
- script[2+(i<<1)] = "-I";
- script[3+(i<<1)] = tapsets[i];
- }
- }
- if(null != options && options.length > 0 && options[0].trim().length() > 0) {
- for(int i=0; i<options.length; i++)
- script[script.length-options.length-2+i] = options[i];
- }
-
- LoggedCommand cmd = new LoggedCommand(script, null, null, 0);
- cmd.start();
-
- //Block to prevent errors.
- while(cmd.isRunning()) {
- try {
- Thread.sleep(100);
- } catch(InterruptedException e) {
- LogManager.logCritical("InterruptedException runStap: " + e.getMessage(), this);
- }
- }
-
- cmd.stop(); //While stop was already called we do this to ensure things are shutdown before proceding
- String s = cmd.getOutput();
- cmd.dispose();
-
- return s;
- }
-
- /**
- * Returns a String containing all of the content from the files
- * contained in the tapset libraries. This file always returns
- * what ever it could get, even if an exception was generated.
- *
- * stap -vp1 -e 'probe begin{}'
- * Will list everything defined in the tapsets
- * @return the tapset library consolodated into a single string
- */
- private String readPass1(String script) {
- String[] options;
- if(null == script) {
- script = "probe begin{}";
- options = new String[] {"-v"};
- } else {
- options = null;
- }
-
- return runStap(options, script, 1);
- }
-
- /**
- * Parses the output generated from running stap -vp1. Pulls out all functions
- * and probe aliases from the provided string. Populates the probe and function
- * trees.
- *
- * ProbeTree organized as:
- * Root->Files->ProbePoints->Variables
- *
- * FunctionTree organized as:
- * Root->Files->Functions
- * @param s The entire output from running stap -vp1.
- */
- private void parseLevel1(String s) {
- String prev = null;
- String prev2 = null;
- StringBuilder token = new StringBuilder("");
- TreeNode parent;
- TreeNode item;
- char currChar;
- boolean isProbe = false;
-
- boolean contains;
- TreeNode child;
- int z;
-
- for(int i=0; i<s.length(); i++) {
- currChar = s.charAt(i);
-
- if(!Character.isWhitespace(currChar) && '}' != currChar && '{' != currChar) {
- token.append(currChar);
- } else if(token.length() > 0){
- prev2 = prev;
- prev = token.toString();
- token.delete(0, token.length());
- }
-
- //Only check for new values when starting a fresh token.
- if(1 == token.length()) {
- if("probe".equals(prev2) && "=".equals(token.toString())) {
- //Probe alias found
- do {
- currChar = s.charAt(++i);
- token.append(currChar);
- } while('{' != currChar && i < s.length());
-
- parent = probes.getChildAt(probes.getChildCount()-1);
- parent.add(new TreeDefinitionNode("probe " + token.toString().substring(2, token.length()-1), prev, parent.getData().toString(), true));
- isProbe = true;
- } else if("function".equals(prev2)) {
- //Function found
- do {
- currChar = s.charAt(++i);
- token.append(currChar);
- } while(')' != currChar && i < s.length());
-
- parent = functions.getChildAt(functions.getChildCount()-1);
- parent.add(new TreeDefinitionNode(prev + token.toString(), prev + token.toString(), parent.getData().toString(), true));
- isProbe = false;
- } else if("file".equals(prev2)) {
- //New file started
- if(prev.lastIndexOf('/') > 0)
- prev2 = prev.substring(prev.lastIndexOf('/')+1);
- functions.add(new TreeNode(prev, prev2, false));
- probes.add(new TreeNode(prev, prev2, false));
- isProbe = false;
- }
- } else if(prev2 != null && prev2.length() > 2 && token.length() > 2 && isProbe &&
- '(' == prev2.charAt(0) && ')' == prev2.charAt(prev2.length()-1) &&
- '(' == token.charAt(0) && ')' == token.charAt(token.length()-1) &&
- "=".equals(prev)) {
- //Put all variables in the probe tree
- item = probes.getChildAt(probes.getChildCount()-1);
- prev2 = prev2.substring(1,prev2.length()-1);
-
- child = item.getChildAt(item.getChildCount()-1);
- contains = false;
- for(z=0; z<child.getChildCount(); z++) {
- if(child.getChildAt(z).toString().equals(prev2)) {
- contains = true;
- break;
- }
- }
-
- if(!contains)
- child.add(new TreeNode(prev2 + ":unknown", prev2, false));
-
- prev2 = null;
- }
- }
- }
-
- /**
- * This method is used to build up the list of functions that were found
- * durring the first pass of stap. These functions will then all be passed
- * on to have stap -up2 run on them in order to find the variable types
- * associated with them.
- */
- private void runPass2Functions() {
- int i, j, k, l=0;
- TreeNode child;
- String function;
- String[] parameters = new String[0];
- StringBuilder probe = new StringBuilder("");
-
- ArrayList<String> functionNames = new ArrayList<String>();
-
- //Add Functions
- for(i=0; i<functions.getChildCount(); i++) {
- child = functions.getChildAt(i);
- for(j=0; j<child.getChildCount(); j++) {
- probe.delete(0, probe.length());
- function = child.getChildAt(j).toString();
- probe.append(function.substring(0, function.indexOf("(")+1));
- function = function.substring(function.indexOf("(")+1, function.indexOf(")"));
- parameters = function.split(",");
-
- //Make sure each parameter has a distinct name so there isn't a type problem
- if(parameters[0].length() > 0) {
- for(k=0; k<parameters.length; k++) {
- if(k>0)
- probe.append(",");
- probe.append(parameters[k] + l++);
- }
- }
- probe.append(")\n");
- functionNames.add(probe.toString());
- }
- }
- parameters = (String[])functionNames.toArray(parameters);
- runPass2FunctionSet(parameters, 0, parameters.length-1);
- }
-
- /**
- * This method runs stap -up2 on the specified group of functions.
- * If errors result, it will break the batch in half and run again
- * on each subset
- * @param funcs The list of all functions available in the tapsets
- * @param low The lower bound of functions to use in this set
- * @param high The upper bound of functions to use in this set
- */
- private void runPass2FunctionSet(String[] funcs, int low, int high) {
- if(low == high)
- return;
- if(stopped)
- return;
-
- StringBuilder functionStr = new StringBuilder("probe begin{\n");
- for(int i=low; i<high; i++)
- functionStr.append(funcs[i]);
- functionStr.append("}\n");
-
- String result = runStap(new String[] {"-u"}, functionStr.toString(), 2);
-
- if(0 < result.trim().length()) {
- parsePass2Functions(result);
- } else if(low+1 != high) {
- runPass2FunctionSet(funcs, low, low+((high-low)>>1));
- runPass2FunctionSet(funcs, low+((high-low)>>1), high);
- }
- }
-
- /**
- * Runs stap -up2 on the probe tree. The tree is broken up into
- * smaller components to allow components to be completed at a time.
- */
- private void runPass2Probes() {
- //Add Probes
- TreeNode temp;
- for(int i=0; i<probes.getChildCount(); i++) {
- if(stopped)
- return;
- temp = probes.getChildAt(i);
- runPass2ProbeSet(temp, 0, temp.getChildCount());
- }
- }
-
- /**
- * Runs stap -up2 on the selected probe group, using high and low
- * to determin which subelements to select.
- * @param probe The top level probe group to probe.
- * @param low The lower bound of child elements of probe to include
- * @param high The upper bound of child elements of probe to inclue
- */
- private void runPass2ProbeSet(TreeNode probe, int low, int high) {
- if(low == high)
- return;
-
- TreeNode temp;
- StringBuilder probeStr = new StringBuilder("");
- String result;
-
- for(int i=low; i<high; i++) {
- temp = probe.getChildAt(i);
- if(temp.getData().toString().startsWith("probe"))
- probeStr.append("\nprobe " + temp.toString() + "{}");
- else
- runPass2ProbeSet(temp, 0, temp.getChildCount());
- }
- result = runStap(new String[] {"-u"}, probeStr.toString(), 2);
-
- if(0 < result.trim().length()) {
- boolean success = parsePass2Probes(result, probe);
- if(!success) {
- runPass2ProbeSet(probe, low, low+((high-low)>>1));
- runPass2ProbeSet(probe, low+((high-low)>>1), high);
- }
- } else if(low+1 != high) {
- runPass2ProbeSet(probe, low, low+((high-low)>>1));
- runPass2ProbeSet(probe, low+((high-low)>>1), high);
- }
- }
-
- /**
- * Removes all directories that do not contain any fuctions or
- * probe aliases from both trees.
- */
- protected void cleanupTrees() {
- for(int i=functions.getChildCount()-1; i>=0; i--) {
- if(0 == functions.getChildAt(i).getChildCount())
- functions.remove(i);
- if(0 == probes.getChildAt(i).getChildCount())
- probes.remove(i);
- }
-
- functions.sortTree();
- probes.sortTree();
-
- formatProbes();
- }
-
- /**
- * Reorders the probes tree so that probes are grouped by type
- * instead of by file they were defined in.
- *
- * ProbeTree organized by class grouping. ie:
- * syscall
- * syscall.open
- * filename
- * flags
- * mode
- * name
- * syscall.open.return
- * name
- * retstr
- * syscall.read
- * ...
- * tcp
- * tcp.disconnect
- * tcp.disconnect.return
- */
- private void formatProbes() {
- TreeNode probes2 = new TreeNode("", false);
- TreeNode probe, fileNode, probeGroup, probeFolder;
- String directory;
- String[] folders;
- boolean added;
-
- for(int j,i=0; i<probes.getChildCount(); i++) { //Probe main group
- fileNode = probes.getChildAt(i);
- for(j=0; j<fileNode.getChildCount(); j++) { //Actual probes
- probe = fileNode.getChildAt(j);
-
- directory = probe.toString();
- if(directory.endsWith(".return") || directory.endsWith(".entry"))
- directory = directory.substring(0, directory.lastIndexOf('.'));
- folders = directory.split("\\.");
-
- probeGroup = probes2;
- for(int k=0; k<folders.length-1; k++) { //Complete path directory
- added = false;
- for(int l=0; l<probeGroup.getChildCount(); l++) { //Destination folder
- probeFolder = probeGroup.getChildAt(l);
- if(probeFolder.toString().equals(folders[k])) {
- probeGroup = probeFolder;
- added = true;
- break;
- }
- }
- if(!added) { //Create brand new folder since it doesn't exist yet
- probeFolder = new TreeNode(folders[k], false);
- probeGroup.add(probeFolder);
- probeGroup = probeFolder;
- }
- }
- probeGroup.add(probe); //Add the probe to its appropriate directory
- }
- }
- probes = probes2;
- probes.sortTree();
- }
-
- /**
- * Parses the output generated from running stap -up2 on the list of functions.
- * Will update the function tree with return values for each function.
- * @param s The entire output from running stap -up2 on the functions.
- */
- private void parsePass2Functions(String s) {
- int i, j, k;
- TreeNode child, child2;
- String childString;
- String[] functionLines = new String[0];
- if(s.contains("# functions") && s.contains("# probes"))
- functionLines = s.substring(s.indexOf("# functions"), s.indexOf("# probes")).split("\n");
-
- //Rename the functions with types
- for(i=0; i<functionLines.length; i++) {
- for(j=0; j<functions.getChildCount(); j++) {
- child = functions.getChildAt(j);
- for(k=0; k<child.getChildCount(); k++) {
- child2 = child.getChildAt(k);
- childString = child2.toString();
- if (childString.indexOf("(") != -1) {
- if(functionLines[i].startsWith(childString.substring(0, childString.indexOf("(")).trim() + ":")) {
- child2.setData(functionLines[i]);
- break;
- }
- }
- }
- }
- }
- }
-
- /**
- * Parses the output generated from running stap -up2 on the list of probes.
- * Will update the probe alias tree with additional variables, as well as
- * placing the type associated with the variable.
- * @param s The entire output from running stap -up2 on the provided probeSet.
- * @param probeSet The group of probes that the String s corresponds to
- */
- private boolean parsePass2Probes(String s, TreeNode probeSet) {
- LogManager.logDebug("Start parseLevel2Probes: probeSet-" + probeSet, this);
- TreeNode tree = new TreeNode("", false);
- TreeNode probe = null;
- String[] probeLines = null;
- boolean variables = false;
- String line;
-
- if(s.contains("# probes"))
- probeLines = s.substring(s.indexOf("# probes")).split("\n");
-
- if(null == probeLines)
- return false;
-
- //Build Pass 2 tree
- for(int i=0; i<probeLines.length; i++) {
- line = probeLines[i].trim();
-
- if(line.startsWith("kernel.")) {
- probe = new TreeNode(line, false);
- tree.add(probe);
- //probe = lookupProbe(line, probeSet);
- variables = false;
- } else if(line.equals("# locals") && null != probe) {
- variables = true;
- } else if(null != probe && variables) {
- if(line.contains(":"))
- probe.add(new TreeNode(line, line.substring(0, line.lastIndexOf(":")).trim(), false));
- } else {
- probe = null;
- }
- }
-
- //Consolidate pass1 and pass2 trees
- int i, j, k, l;
- boolean matched;
- TreeNode one, two, oneC, twoC;
- for(i=0; i<probeSet.getChildCount(); i++) {
- for(j=0; j<tree.getChildCount(); j++) {
- one = probeSet.getChildAt(i);
- two = tree.getChildAt(j);
-
- if(probesMatch(one, two)) {
- for(l=0; l<two.getChildCount(); l++) {
- matched = false;
- twoC = two.getChildAt(l);
- for(k=0; k<one.getChildCount(); k++) {
- oneC = one.getChildAt(k);
- if(oneC.getData().toString().substring(0, oneC.getData().toString().indexOf(":")).
- equals(twoC.getData().toString().substring(0, twoC.getData().toString().indexOf(":")))) {
- oneC.setData(twoC.getData());
- matched = true;
- }
- }
- if(!matched)
- one.add(new TreeNode(twoC.getData(), twoC.toString(), false));
- }
- }
- }
- }
-
- tree.dispose();
- tree = null;
- return true;
- }
-
- /**
- * Compares the probes contained in the treeNodes to make sure they
- * are actually probing the same kernel location.
- * @param one A treeNode generated from stap -p1.
- * @param two A treeNode generated from stap -up2.
- * @return A boolean signifing if the treeNodes represent the same probe point.
- */
- private boolean probesMatch(TreeNode one, TreeNode two) {
- try {
- String valOneA = one.getData().toString();
- String valTwoA = two.getData().toString();
- String valOneB = "";
- String valTwoB = valTwoA.substring(valTwoA.indexOf("\"")+1, valTwoA.indexOf("@"));
-
- if(valOneA.contains("\""))
- valOneB = valOneA.substring(valOneA.indexOf("\"")+1);
- if(valOneB.contains("\""))
- valOneB = valOneB.substring(0, valOneB.indexOf("\""));
-
- if(valOneB.equals(valTwoB)) {
- if(valOneA.contains(".return") == valTwoA.contains(".return"))
- return true;
- }
- } catch(Exception e) {
- LogManager.logCritical("Exception probesMatch: " + e.getMessage() + "\n" + one + "\n" + two, this);
- }
- return false;
- }
-
- /**
- * This method will clean up everything from the run.
- */
- public void dispose() {
- if(!disposed) {
- disposed = true;
- functions.dispose();
- functions = null;
- probes.dispose();
- probes = null;
- tapsets = null;
- listeners.clear();
- listeners = null;
- }
- }
-
- private boolean stopped = true;
- private boolean disposed = true;
- private boolean successfulFinish = false;
- private ArrayList<IUpdateListener> listeners;
- private TreeNode functions;
- private TreeNode probes;
- private String[] tapsets;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TreeSettings.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TreeSettings.java
deleted file mode 100644
index 0aa7b77492..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TreeSettings.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.structures;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.Calendar;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.TreeDefinitionNode;
-import org.eclipse.linuxtools.systemtap.ui.structures.TreeNode;
-import org.eclipse.linuxtools.systemtap.ui.systemtapgui.SystemTapGUISettings;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.WorkbenchException;
-import org.eclipse.ui.XMLMemento;
-
-
-/**
- * Handles access to the cached stap tapset library tree, including reading the cache back from disk
- * on startup, writing the cache to disk when the cache is initially generated, checking to make sure
- * that the cache is up-to-date, and providing accessor methods to the rest of the IDE that allow other
- * classes to use the cached tree data.
- * @author Ryan Morse
- */
-public final class TreeSettings {
- private TreeSettings() {
- }
- /**
- * Returns the modification date for the Tree File. Used to make sure that the cache is not out of
- * date.
- * @return The datestamp for the Tree file.
- */
- public static long getTreeFileDate() {
- if(!readData()) return -1;
- return treeFileDate;
- }
-
- /**
- * Allows access to the Tapset Function tree, which contains information about all
- * functions stored in the tapset library.
- * @return The <code>TreeNode</code> root of the Function tree.
- */
- public static TreeNode getFunctionTree() {
- if(!readData()) return null;
- return functions;
- }
-
- /**
- * Allows access to the Tapset Probe Alias tree, which contains a list of all probe aliases
- * in the tapset library.
- * @return The <code>TreeNode</code> root of the Probe Alias tree.
- */
- public static TreeNode getProbeTree() {
- if(!readData()) return null;
- return probes;
- }
-
- /**
- * Sets the Probe Alias and Function trees that are being cached to the trees given as arguments.
- * @param func The Function tree to store in cache.
- * @param probe The Probe Alias tree to store in cache.
- * @return True if the caching is successful.
- */
- public static boolean setTrees(TreeNode func, TreeNode probe) {
- if(null == func || null == probe) return false;
- functions = func;
- probes = probe;
- return writeData();
- }
-
- /**
- * Reads the contents of the cache file into memory.
- * @return True if the read is successful.
- */
- private static boolean readData() {
- if(null == settingsFile && !openFile())
- return false;
-
- try {
- FileReader reader = new FileReader(settingsFile);
-
- if(!reader.ready())
- return false;
-
- XMLMemento data = XMLMemento.createReadRoot(reader, "TreeSettings");
-
- IMemento child = data.getChild("functionTree");
- String s = child.getString("string");
- if("<null>".equals(s))
- s = null;
- String d = child.getString("data");
- if("<null>".equals(d))
- d = null;
-
- functions = new TreeNode(d, s, false);
- readTree(child, functions, 0);
-
- child = data.getChild("probeTree");
- s = child.getString("string");
- if("<null>".equals(s))
- s = null;
- d = child.getString("data");
- if("<null>".equals(d))
- d = null;
- probes = new TreeNode(d, s, false);
- readTree(child, probes, 0);
-
- child = data.getChild("modifiedDate");
- treeFileDate = Long.parseLong(child.getString("date"));
- } catch(FileNotFoundException fnfe) {
- return false;
- } catch(WorkbenchException we) {
- return false;
- } catch(Exception e) {
- return false;
- }
-
- return true;
- }
-
- /**
- * Writes the tree data currently stored by this class to disk for later access.
- * @return True if the write is successful.
- */
- private static boolean writeData() {
- if(null == settingsFile && !openFile())
- return false;
-
- try {
- XMLMemento data = XMLMemento.createWriteRoot("TreeSettings");
-
- IMemento child = data.createChild("functionTree");
- writeTree(child, functions, 0);
-
- child = data.createChild("probeTree");
- writeTree(child, probes, 0);
-
- child = data.createChild("modifiedDate");
- child.putString("date", (new Long(Calendar.getInstance().getTimeInMillis())).toString());
-
- FileWriter writer = new FileWriter(settingsFile);
- data.save(writer);
- } catch(FileNotFoundException fnfe) {
- return false;
- } catch(Exception e) {
- return false;
- }
-
- return true;
- }
-
- /**
- * Writes the tree passed in to the <code>IMemento</code> argument, up to the specified depth.
- * @param child The <code>IMemento</code> to store the tree to.
- * @param tree The <code>TreeNode</code> to store.
- * @param depth The maximum depth level to write out.
- */
- private static void writeTree(IMemento child, TreeNode tree, int depth) {
- if(null == tree.toString())
- child.putString("string", "<null>");
- else
- child.putString("string", tree.toString());
-
- if(null == tree.getData())
- child.putString("data","<null>");
- else
- child.putString("data", tree.getData().toString());
-
- if(tree instanceof TreeDefinitionNode) {
- if(null == ((TreeDefinitionNode)tree).getDefinition())
- child.putString("definition","<null>");
- else
- child.putString("definition", ((TreeDefinitionNode)tree).getDefinition().toString());
- }
-
- child.putInteger("click", (tree.isClickable()?1:0));
- for(int i=0; i<tree.getChildCount(); i++) {
- writeTree(child.createChild("level" + depth), tree.getChildAt(i), depth+1);
- }
- }
-
- /**
- * Opposite action as writeTree. Reads the <code>IMemento</code> passed in into the <code>TreeNode</code>
- * up to the requested maximum depth.
- * @param data The <code>IMemento</code> to read the tree out of.
- * @param parent The <code>TreeNode</code> to store the tree in.
- * @param depth The maximum depth to read.
- */
- private static void readTree(IMemento data, TreeNode parent, int depth) {
- IMemento[] children = data.getChildren("level" + depth);
-
- try {
- if(null != children) {
- for(int i=0; i<children.length; i++) {
- String s = children[i].getString("string");
- String d = children[i].getString("data");
- String def = children[i].getString("definition");
-
- boolean c = ((0==children[i].getInteger("click").intValue())?false:true);
-
- if("<null>".equals(s))
- s = null;
- if("<null>".equals(d))
- d = null;
-
- TreeNode t;
- if(null == def) {
- t = new TreeNode(d, s, c);
- } else {
- if("<null>".equals(def))
- def = null;
-
- t = new TreeDefinitionNode(d, s, def, c);
- }
- parent.add(t);
-
- readTree(children[i], t, depth+1);
- }
- }
- } catch(NullPointerException e) {
- }
- }
-
- private static boolean openFile() {
- settingsFile = new File(SystemTapGUISettings.settingsFolder.getAbsolutePath() + fileName);
-
- try {
- if (!settingsFile.exists())
- settingsFile.createNewFile();
- } catch(IOException ioe) {
- return false;
- }
-
- return true;
- }
-
- private static long treeFileDate;
- private static TreeNode functions;
- private static TreeNode probes;
- private static final String fileName = "/TreeSettings.xml";
- private static File settingsFile = null;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/uistructures/StapSettingsDialog.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/uistructures/StapSettingsDialog.java
deleted file mode 100644
index a7d78eea64..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/uistructures/StapSettingsDialog.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.uistructures;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.ide.preferences.IDEPreferenceConstants;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-
-import org.eclipse.swt.widgets.Label;
-
-
-/**
- * A dialog box displayed to prompt the user for additional arguments to pass to stap when the
- * user presses the Run with Options button.
- * @author Ryan Morse
- *
- */
-public class StapSettingsDialog extends Dialog {
- public StapSettingsDialog(Shell parentShell) {
- super(parentShell);
- LogManager.logDebug("Start/End StapSettingsDialog: parentShell-" + parentShell, this);
- LogManager.logInfo("Initializing", this);
- }
-
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- LogManager.logDebug("Start configureShell: shell-" + shell, this);
- shell.setText(Localization.getString("StapSettingsDialog.StapOptions"));
- shell.setSize(new org.eclipse.swt.graphics.Point(640,170 + ((1+checkBox.length)>>1) + 50*((1+text.length)>>1)));
- LogManager.logDebug("End configureShell:", this);
- }
-
- protected Control createDialogArea(Composite parent) {
- LogManager.logDebug("Start createDialogArea: parent-" + parent, this);
- Composite comp = (Composite) super.createDialogArea(parent);
-
- //Check boxes
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 2;
- cmpChkBoxes = new Composite(comp, SWT.NONE);
- cmpChkBoxes.setLayout(gridLayout);
- cmpChkBoxes.setBounds(new Rectangle(100,5,460,30*((1+checkBox.length)>>1)));
-
- int i;
- for(i=0; i<IDEPreferenceConstants.P_STAP.length - IDEPreferenceConstants.P_STAP_OPTS.length; i++) {
- checkBox[i] = new Button(cmpChkBoxes, SWT.CHECK);
- checkBox[i].setText(IDEPreferenceConstants.P_STAP[i][0] + IDEPreferenceConstants.P_STAP[i][1]);
- checkBox[i].setBackground(cmpChkBoxes.getBackground());
- }
-
- //Labels and Text fields
- cmpTxtBoxes = new Composite(comp, SWT.NONE);
- cmpTxtBoxes.setBounds(new Rectangle(5,5+30*((1+checkBox.length)>>1),620,50*((1+text.length)>>1)));
-
- for(int j=0; j<IDEPreferenceConstants.P_STAP_OPTS.length; i++, j++) {
- label[j] = new Label(cmpTxtBoxes, SWT.NONE);
- label[j].setBounds(new Rectangle(320*(j/5),50*(j%5),300,17));
- label[j].setText(IDEPreferenceConstants.P_STAP[i][0] + IDEPreferenceConstants.P_STAP[i][1]);
- label[j].setBackground(cmpChkBoxes.getBackground());
- text[j] = new Text(cmpTxtBoxes, SWT.BORDER);
- text[j].setBounds(new Rectangle(320*(j/5),20+50*(j%5),300,27));
-
- if("-v".equals(IDEPreferenceConstants.P_STAP[i][0])) {
- text[j].addKeyListener(new KeyListener() {
- public void keyPressed(KeyEvent e) {
- if('v' != e.character) {
- e.doit = false;
- }
- }
-
- public void keyReleased(KeyEvent e) {}
- });
- } else if("-p NUM".equals(IDEPreferenceConstants.P_STAP[i][0])) {
- text[j].addKeyListener(new KeyListener() {
- public void keyPressed(KeyEvent e) {
- if(32 <= e.character && 126 >= e.character) {
- if('1' > e.character || '5' < e.character)
- e.doit = false;
- else if(0 < text[1].getText().length())
- e.doit = false;
- }
- }
-
- public void keyReleased(KeyEvent e) {}
- });
- } else if("-s NUM".equals(IDEPreferenceConstants.P_STAP[i][0])) {
- text[j].addKeyListener(new KeyListener() {
- public void keyPressed(KeyEvent e) {
- if(32 <= e.character && 126 >= e.character) {
- if(!Character.isDigit(e.character))
- e.doit = false;
- }
- }
-
- public void keyReleased(KeyEvent e) {}
- });
- }
- }
-
- LogManager.logDebug("End createDialogArea: returnVal-" + comp, this);
- return comp;
- }
-
- protected void buttonPressed(int buttonID) {
- LogManager.logDebug("Start buttonPressed: buttonID-" + buttonID, this);
- if(0 == buttonID) { //OK
- cmdOpts = new boolean[checkBox.length];
- cmdOptVals = new String[text.length];
-
- for(int i=0; i<cmdOpts.length; i++)
- cmdOpts[i] = checkBox[i].getSelection();
-
- for(int i=0; i<cmdOptVals.length; i++)
- cmdOptVals[i] = text[i].getText();
- }
-
- super.buttonPressed(buttonID);
- LogManager.logDebug("End buttonPressed:", this);
- }
-
- public boolean[] getStapOpts() {
- LogManager.logDebug("Start/End getStapOpts: returnVal-" + cmdOpts, this);
- return cmdOpts;
- }
-
- public String[] getStapOptVals() {
- LogManager.logDebug("Start/End getStapOptVals: returnVal-" + cmdOptVals, this);
- return cmdOptVals;
- }
-
- public void dispose() {
- LogManager.logInfo("Disposing", this);
- cmdOpts = null;
- cmdOptVals = null;
- cmpChkBoxes.dispose();
- cmpTxtBoxes.dispose();
- for(int i=0; i<checkBox.length; i++)
- checkBox[i].dispose();
- checkBox = null;
- for(int i=0; i<label.length; i++) {
- label[i].dispose();
- text[i].dispose();
- }
- label = null;
- text = null;
- }
-
- //private static String[] tapsets = null;
- private static boolean[] cmdOpts = null;
- private static String[] cmdOptVals = null;
-
- private Composite cmpChkBoxes = null;
- private Composite cmpTxtBoxes = null;
- private Button checkBox[] = new Button[IDEPreferenceConstants.P_STAP.length - IDEPreferenceConstants.P_STAP_OPTS.length];
- private Label label[] = new Label[IDEPreferenceConstants.P_STAP_OPTS.length];
- private Text text[] = new Text[IDEPreferenceConstants.P_STAP_OPTS.length];
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/BrowserView.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/BrowserView.java
deleted file mode 100644
index 4d27c13b14..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/BrowserView.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.views;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.linuxtools.systemtap.ui.editor.RecentFileMenuManager;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
-import org.eclipse.linuxtools.systemtap.ui.structures.TreeNode;
-import org.eclipse.linuxtools.systemtap.ui.structures.listeners.IUpdateListener;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.ViewPart;
-
-
-
-/**
- * The parent class of the Kernel Source browser, and grandparent of the Tapset browsers.
- * Contains code common to all three of those classes.
- * @author Ryan Morse
- * @see org.eclipse.linuxtools.systemtap.ui.ide.views.KernelBrowserView
- * @see org.eclipse.linuxtools.systemtap.ui.ide.views.FunctionBrowserView
- * @see org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView
- */
-public abstract class BrowserView extends ViewPart {
- protected TreeViewer viewer;
-
- public BrowserView() {
- super();
- }
-
- /**
- * Provides an interface for the TreeViewer to interact with the internal TreeNode data structure.
- * @author Ryan Morse
- *
- */
- class ViewContentProvider implements IStructuredContentProvider, ITreeContentProvider {
- public void inputChanged(Viewer v, Object oldInput, Object newInput) {}
-
- public void dispose() {}
-
- public Object[] getElements(Object parent) {
- return getChildren(parent);
- }
-
- public Object getParent(Object child) {
- return null;
- }
-
- public Object[] getChildren(Object par) {
- TreeNode parent = ((TreeNode)par);
-
- Object[] children = new Object[parent.getChildCount()];
-
- for(int i=0; i<children.length; i++) {
- children[i] = parent.getChildAt(i);
- }
-
- return children;
- }
-
- public boolean hasChildren(Object parent) {
- return ((TreeNode)parent).getChildCount() > 0;
- }
- }
-
- /**
- * Provides the icon and text for each entry in the tapset tree.
- * @author Ryan Morse
- */
- class ViewLabelProvider extends LabelProvider {
- public String getText(Object obj) {
- return obj.toString();
- }
-
- public Image getImage(Object obj) {
- TreeNode treeObj = (TreeNode)obj;
- Image img;
- String item = treeObj.getData().toString();
-
- img = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_ELEMENT);
- if (treeObj.getChildCount() > 0)
- img = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER);
-
-
- //Kernel Source
- if(item.endsWith(".c"))
- img = IDEPlugin.getImageDescriptor("icons/files/file_c.gif").createImage();
- if(item.endsWith(".h"))
- img = IDEPlugin.getImageDescriptor("icons/files/file_h.gif").createImage();
-
- //Functions
- if(item.endsWith(")") && !item.endsWith("\")")) {
- item = item.substring(0, item.indexOf("(")).trim();
- if(item.endsWith(":long"))
- img = IDEPlugin.getImageDescriptor("icons/vars/var_long.gif").createImage();
- else if(item.endsWith(":string"))
- img = IDEPlugin.getImageDescriptor("icons/vars/var_str.gif").createImage();
- else //if(item.endsWith(":unknown"))
- img = IDEPlugin.getImageDescriptor("icons/vars/var_void.gif").createImage();
- } else {
- //Probes
- if(item.startsWith("probe"))
- img = IDEPlugin.getImageDescriptor("icons/misc/probe_obj.gif").createImage();
-
- //Probe variables
- if(item.endsWith(":long"))
- img = IDEPlugin.getImageDescriptor("icons/vars/var_long.gif").createImage();
- else if(item.endsWith(":string"))
- img = IDEPlugin.getImageDescriptor("icons/vars/var_str.gif").createImage();
- else if(item.endsWith(":unknown"))
- img = IDEPlugin.getImageDescriptor("icons/vars/var_unk.gif").createImage();
- }
-
- return img;
- }
- }
-
- public void createPartControl(Composite parent) {
- parent.getShell().setCursor(new Cursor(parent.getShell().getDisplay(), SWT.CURSOR_WAIT));
- viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- viewer.setContentProvider(new ViewContentProvider());
- viewer.setLabelProvider(new ViewLabelProvider());
- RecentFileMenuManager.getInstance().registerActionBar(getViewSite().getActionBars());
- }
-
- public TreeViewer getViewer() {
- return viewer;
- }
-
- public void setFocus() {
- viewer.getControl().setFocus();
- }
-
- public void dispose() {
- super.dispose();
- viewer = null;
- }
-
- abstract void refresh();
-
- protected class ViewUpdater implements IUpdateListener {
- public void handleUpdateEvent() {
- viewer.getControl().getDisplay().asyncExec(new Runnable() {
- public void run() {
- refresh();
- }
- });
- }
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/FunctionBrowserView.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/FunctionBrowserView.java
deleted file mode 100644
index e2c48b8b26..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/FunctionBrowserView.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.views;
-
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.linuxtools.systemtap.ui.ide.actions.hidden.FunctionBrowserAction;
-import org.eclipse.linuxtools.systemtap.ui.ide.structures.TapsetLibrary;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.linuxtools.systemtap.ui.structures.TreeNode;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.ui.IWorkbenchActionConstants;
-
-
-
-/**
- * This class is the Function Tapset Browser, which provides a list of all of the functions
- * defined in the tapset library for the user to browse through.
- * @author Ryan Morse
- * @author Henry Hughes
- */
-public class FunctionBrowserView extends BrowserView {
- public FunctionBrowserView() {
- super();
- LogManager.logInfo("Initializing", this);
- }
-
- /**
- * Creates the UI on the given <code>Composite</code>
- */
- public void createPartControl(Composite parent) {
- LogManager.logDebug("Start createPartControl: parent-" + parent, this);
- super.createPartControl(parent);
- TapsetLibrary.init();
- TapsetLibrary.addListener(new ViewUpdater());
- refresh();
- makeActions();
- LogManager.logDebug("End createPartControl:", this);
- }
-
- /**
- * Refreshes the list of functions in the viewer.
- */
- public void refresh() {
- LogManager.logDebug("Start refresh:", this);
- functions = TapsetLibrary.getFunctions();
- addLocalFunctions(localFunctions);
- LogManager.logDebug("End refresh:", this);
- }
-
- /**
- * Adds the local functions specified in the argument to the viewer.
- * @param localFunctionTree A tree of the local functions.
- */
- public void addLocalFunctions(TreeNode localFunctionTree) {
- LogManager.logDebug("Start addLocalFunctions: localFunctionTree-" + localFunctionTree, this);
-
- if(functions.getChildCount() > 0) {
- TreeNode localFuncs = functions.getChildAt(0);
-
- if("<local>".equals(localFuncs.toString()))
- functions.remove(0);
-
- if(null != localFunctions) {
- localFunctions = localFunctionTree;
- localFunctions.setDisplay("<local>");
- functions.addAt(localFunctions, 0);
- }
- }
- viewer.setInput(functions);
- LogManager.logDebug("End addLocalFunctions:", this);
- }
-
- /**
- * Wires up all of the actions for this browser, such as double and right click handlers.
- */
- private void makeActions() {
- LogManager.logDebug("Start makeActions:", this);
- doubleClickAction = new FunctionBrowserAction(getSite().getWorkbenchWindow(), this);
- dblClickListener = new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- LogManager.logDebug("Start doubleClick: event-" + event, this);
- doubleClickAction.run();
- LogManager.logDebug("End doubleClick:", this);
- }
- };
- viewer.addDoubleClickListener(dblClickListener);
-
- //This loads the menu from plugin.xml
- MenuManager manager = new MenuManager("functionPopup");
- Control control = this.viewer.getControl();
- manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- Menu menu = manager.createContextMenu(control);
- control.setMenu(menu);
- getSite().registerContextMenu(manager, viewer);
- LogManager.logDebug("End makeActions:", this);
- }
-
- public void dispose() {
- LogManager.logInfo("Disposing", this);
- super.dispose();
- if(null != doubleClickAction)
- doubleClickAction.dispose();
- doubleClickAction = null;
- if(null != viewer)
- viewer.removeDoubleClickListener(dblClickListener);
- dblClickListener = null;
- if(null != localFunctions)
- localFunctions.dispose();
- localFunctions = null;
- if(null != functions)
- functions.dispose();
- functions = null;
- if(null != menu)
- menu.dispose();
- menu = null;
- LogManager.logDebug("End dispose:", this);
- }
-
- public static final String ID = "org.eclipse.linuxtools.systemtap.ui.ide.views.FunctionBrowserView";
- private FunctionBrowserAction doubleClickAction;
- private IDoubleClickListener dblClickListener;
- private TreeNode functions;
- private TreeNode localFunctions;
- private Menu menu;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/KernelBrowserView.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/KernelBrowserView.java
deleted file mode 100644
index da9e0be617..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/KernelBrowserView.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.views;
-
-import java.io.File;
-
-import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
-import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.linuxtools.systemtap.ui.ide.actions.hidden.KernelSourceAction;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
-import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.ide.preferences.IDEPreferenceConstants;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.linuxtools.systemtap.ui.structures.KernelSourceTree;
-import org.eclipse.linuxtools.systemtap.ui.structures.TreeNode;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.ui.PlatformUI;
-
-
-
-/**
- * The Kernel Source Browser module for the SystemTap GUI. This browser provides a list of kernel source
- * files and allows the user to open those files in an editor in order to place probes in arbitary locations.
- * @author Henry Hughes
- * @author Ryan Morse
- */
-public class KernelBrowserView extends BrowserView {
- public KernelBrowserView() {
- super();
- LogManager.logInfo("Initializing", this);
- }
-
- /**
- * Creates the UI on the given <code>Composite</code>
- */
- public void createPartControl(Composite parent) {
- LogManager.logDebug("Start createPartControl: parent-" + parent, this);
- super.createPartControl(parent);
-
- refresh();
- makeActions();
- LogManager.logDebug("End createPartControl", this);
- }
-
- /**
- * Wires up all of the actions for this browser, such as double and right click handlers.
- */
- public void makeActions() {
- LogManager.logDebug("Start makeActions:", this);
- doubleClickAction = new KernelSourceAction(getSite().getWorkbenchWindow(), this);
- dblClickListener = new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- LogManager.logDebug("Start doubleClick: event-" + event, this);
- doubleClickAction.run();
- LogManager.logDebug("End doubleClick:", this);
- }
- };
- viewer.addDoubleClickListener(dblClickListener);
- IDEPlugin.getDefault().getPluginPreferences().addPropertyChangeListener(propertyChangeListener);
- LogManager.logDebug("End makeActions:", this);
- }
-
- /**
- * Updates the kernel source displayed to the user with the new kernel source tree. Usually
- * a response to the user changing the preferences related to the kernel source location, requiring
- * that the application update the kernel source information.
- */
- public void refresh() {
- LogManager.logDebug("Start refresh:", this);
- KernelSourceTree kst = new KernelSourceTree();
-
- IPreferenceStore p = IDEPlugin.getDefault().getPreferenceStore();
- String kernelSource = p.getString(IDEPreferenceConstants.P_KERNEL_SOURCE);
- if(null == kernelSource || kernelSource.length() < 1) {
- LogManager.logInfo("Kernel Source Directory not found, querying", this);
-
- DirectoryDialog dialog= new DirectoryDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.OPEN);
- dialog.setText(Localization.getString("KernelBrowserView.WhereKernelSource"));
- kernelSource = dialog.open();
-
- if(null == kernelSource)
- kernelSource = "";
- p.setValue(IDEPreferenceConstants.P_KERNEL_SOURCE, kernelSource);
- }
-
- String[] excluded = p.getString(IDEPreferenceConstants.P_EXCLUDED_KERNEL_SOURCE).split(File.pathSeparator);
-
- kst.buildKernelTree(kernelSource, excluded);
- if(null != kst)
- super.viewer.setInput(kst.getTree());
- else
- super.viewer.setInput(new TreeNode("", false));
-
- kst.dispose();
- LogManager.logDebug("End refresh:", this);
- }
-
- /**
- * A <code>IPropertyChangeListener</code> that detects changes to the Kernel Source location
- * and runs the <code>updateKernelSourceTree</code> method.
- */
- private final IPropertyChangeListener propertyChangeListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- LogManager.logDebug("Start propertyChange: event-" + event, this);
- if(event.getProperty().equals(IDEPreferenceConstants.P_KERNEL_SOURCE)) {
- refresh();
- }
- LogManager.logDebug("End propertyChange:", this);
- }
- };
-
- public void dispose() {
- LogManager.logInfo("Disposing", this);
- super.dispose();
- IDEPlugin.getDefault().getPluginPreferences().removePropertyChangeListener(propertyChangeListener);
- if(null != viewer)
- viewer.removeDoubleClickListener(dblClickListener);
- dblClickListener = null;
- if(null != doubleClickAction)
- doubleClickAction.dispose();
- doubleClickAction = null;
- }
-
- public static final String ID = "org.eclipse.linuxtools.systemtap.ui.ide.views.KernelBrowserView";
- private KernelSourceAction doubleClickAction;
- private IDoubleClickListener dblClickListener;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/ProbeAliasBrowserView.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/ProbeAliasBrowserView.java
deleted file mode 100644
index ab4e11dd5d..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/ProbeAliasBrowserView.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.ide.views;
-
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.linuxtools.systemtap.ui.ide.actions.hidden.ProbeAliasAction;
-import org.eclipse.linuxtools.systemtap.ui.ide.structures.TapsetLibrary;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.ui.IWorkbenchActionConstants;
-
-
-/**
- * The Probe Alias Browser module of the SystemTap GUI. This class provides a list of all probe aliases
- * defined in the tapset (both the standard, and user-specified tapsets), and allows the user to insert
- * template probes into an editor.
- * @author Henry Hughes
- * @author Ryan Morse
- */
-public class ProbeAliasBrowserView extends BrowserView {
- public ProbeAliasBrowserView() {
- super();
- LogManager.logInfo("Initializing", this);
- }
-
- /**
- * Creates the UI on the given <code>Composite</code>
- */
- public void createPartControl(Composite parent) {
- LogManager.logDebug("Start createPartControl: parent-" + parent, this);
- super.createPartControl(parent);
- TapsetLibrary.init();
- TapsetLibrary.addListener(new ViewUpdater());
- refresh();
- makeActions();
- LogManager.logDebug("End createPartControl:", this);
- }
-
- /**
- * Refreshes the list of probe aliases in the viewer.
- */
- public void refresh() {
- LogManager.logDebug("Start refresh:", this);
- super.viewer.setInput(TapsetLibrary.getProbes());
- LogManager.logDebug("End refresh:", this);
- }
-
- /**
- * Wires up all of the actions for this browser, such as double and right click handlers.
- */
- private void makeActions() {
- LogManager.logDebug("Start makeActions:", this);
- doubleClickAction = new ProbeAliasAction(getSite().getWorkbenchWindow(), this);
- dblClickListener = new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- LogManager.logDebug("doubleClick fired", this);
- doubleClickAction.run();
- }
- };
- viewer.addDoubleClickListener(dblClickListener);
- Control control = this.viewer.getControl();
- MenuManager manager = new MenuManager("probePopup");
-
- manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- Menu menu = manager.createContextMenu(control);
- viewer.getControl().setMenu(menu);
- getSite().registerContextMenu(manager, viewer);
- LogManager.logDebug("End makeActions:", this);
- }
-
- public void dispose() {
- LogManager.logInfo("Disposing", this);
- super.dispose();
- if(null != doubleClickAction)
- doubleClickAction.dispose();
- doubleClickAction = null;
- if(null != viewer)
- viewer.removeDoubleClickListener(dblClickListener);
- dblClickListener = null;
- if(null != menu)
- menu.dispose();
- menu = null;
- }
-
- public static final String ID = "org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView";
- private ProbeAliasAction doubleClickAction;
- private IDoubleClickListener dblClickListener;
- private Menu menu;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/toc.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/toc.xml
deleted file mode 100644
index 7f597e0918..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/toc.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-
-<toc label="Systemtap IDE User Guide" topic="documentation/html/toc.html">
- <topic label="Getting Started" href="documentation/html/gettingstarted/gettingStarted.html">
- <anchor id="gettingstarted"/>
- </topic>
- <topic label="Concepts" href="documentation/html/concepts/concepts.html">
- <anchor id="concepts"/>
- </topic>
- <topic label="Tasks" href="documentation/html/tasks/tasks.html">
- <anchor id="tasks"/>
- </topic>
- <topic label="Reference" href="documentation/html/reference/reference.html">
- <anchor id="reference"/>
- </topic>
-</toc>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/.classpath
deleted file mode 100644
index 64c5e31b7a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/.project b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/.project
deleted file mode 100644
index 92b9b02536..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.ui.logging</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/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/.settings/org.eclipse.jdt.core.prefs b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 66b95b1485..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Tue Jan 20 15:21:10 IST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/ChangeLog
deleted file mode 100644
index 41a12d3119..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/ChangeLog
+++ /dev/null
@@ -1,16 +0,0 @@
-2009-11-16 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Fix Bundle-Name.
-
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Make version 0.3.0.qualifier.
-
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Change provider from IBM to Eclipse.
-
-2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * ChangeLog: Refactoring. Renaming all packages directories from *.systemtapgui.* to *.systemtap.ui.*
- \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/META-INF/MANIFEST.MF
deleted file mode 100644
index 9c59f5ab38..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: SystemTap Logging Functionality (Incubation)
-Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.logging;singleton:=true
-Bundle-Version: 0.3.0.qualifier
-Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.logging.internal.LoggingPlugin
-Bundle-Vendor: Eclipse
-Bundle-Localization: plugin
-Export-Package: org.eclipse.linuxtools.systemtap.ui.logging
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.linuxtools.systemtap.ui.structures
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/plugin.properties
deleted file mode 100644
index e2fbef23bf..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/plugin.properties
+++ /dev/null
@@ -1 +0,0 @@
-preference.logging.name=Logging \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/plugin.xml
deleted file mode 100644
index 6108179c66..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/plugin.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
- <extension
- point="org.eclipse.core.runtime.preferences">
- <initializer class="org.eclipse.linuxtools.systemtap.ui.logging.preferences.PreferenceInitializer"/>
- </extension>
-
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%preference.logging.name"
- id="com.qualityeclipse.generic.prefs.logging"
- class="org.eclipse.linuxtools.systemtap.ui.logging.preferences.LoggingPreferencePage"/>
- </extension>
-</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/LogManager.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/LogManager.java
deleted file mode 100644
index 449be79c99..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/LogManager.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.logging;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.util.LinkedList;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.linuxtools.systemtap.ui.logging.internal.LogDaemon;
-import org.eclipse.linuxtools.systemtap.ui.logging.internal.LogEntry;
-import org.eclipse.linuxtools.systemtap.ui.logging.internal.LoggingPlugin;
-import org.eclipse.linuxtools.systemtap.ui.logging.preferences.PreferenceConstants;
-
-
-
-/**
- * This class is responsible for all of the application's logging.
- * @author Henry Hughes, Ryan Morse
- */
-/*
- * Strings in this class should not be externalized since they are
- * primarily for debugging purposes.
- */
-public class LogManager implements IPropertyChangeListener {
- private LogManager() {}
-
- /**
- * Disables the logging service.
- */
- private void disable() {
- logDebug("disabling",this);
- }
-
- /**
- * Initializes the logging service: hooks a property change listener to the Logging Plugin,
- * causes self-initialization, and starts logging.
- */
- public void begin() {
- LoggingPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);
- init();
- }
-
- /**
- * Gets user logging preferences and prepares the logging system to operate.
- */
- private void init() {
- BufferedWriter writer = null;
- IPreferenceStore store = LoggingPlugin.getDefault().getPreferenceStore();
- boolean enabled = store.getBoolean(PreferenceConstants.P_LOG_ENABLED);
- int level = Integer.parseInt(store.getString(PreferenceConstants.P_LOG_LEVEL));
- int type = Integer.parseInt(store.getString(PreferenceConstants.P_LOG_TYPE));
- String filename = store.getString(PreferenceConstants.P_LOG_FILE);
-
- if(enabled) {
- if(CONSOLE == type)
- writer = new BufferedWriter(new OutputStreamWriter(System.out));
- if(FILE == type) {
- try {
- File file = new File(filename);
- if(!file.exists()) {
- file.getParentFile().mkdirs();
- file.createNewFile();
- }
- writer = new BufferedWriter(new FileWriter(file));
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- if(null != writer) {
- log(INFO, "Initialized - Stream " + writer.toString());
- new LogDaemon(writer, level);
- }
- } else
- disable();
- }
-
- /**
- * Static accessor method, returns the shared instance of LogManager.
- * @return Returns the shared instance of <code>LogManager</code>
- */
- public static LogManager getInstance() {
- return instance;
- }
-
- /**
- * Adds the input string to the logging queue at the specified level.
- * @param level Level to log the input message to.
- * @param input String to log.
- */
- private synchronized void log(int level, String input) {
- entries.add(new LogEntry(level, input));
- }
-
- /**
- * Overridden in order to unregister our property change event.
- */
- protected void finalize() throws Throwable {
- //unregister ourselves
- LoggingPlugin plugin = LoggingPlugin.getDefault();
- if(plugin != null) {
- IPreferenceStore store = plugin.getPreferenceStore();
- if(store != null)
- store.removePropertyChangeListener(this);
- }
- //let the JRE take care of the rest
- super.finalize();
- }
-
- /**
- * Stamps the input string with an identifier for the Object that sent it.
- * @param input Message that has been requested to be logged.
- * @param o Object that requested that the message be logged.
- * @return A string comprising both the original message and an identifier for the Object.
- */
- @SuppressWarnings("unchecked")
- private String stamp(String input, Object o) {
- Class cs = o.getClass();
- String className = cs.getName();
- return "[" + className + "@" + Integer.toHexString(o.hashCode()) + "] " + input ;
- }
-
- /**
- * Logs to the Info level. This logging level is used for basic application runtime messages such as
- * creation of viewparts, dialogs, etc.
- * @param input Message to log.
- * @param o Object making the logging request.
- */
- public static synchronized void logInfo(String input, Object o) {
- instance.log(INFO, instance.stamp(input,o));
- }
-
- /**
- * Logs to the Debug level. This logging level is used for debugging messages, such as method
- * entry messages.
- * @param input Message to log.
- * @param o Object making the logging request.
- */
- public static synchronized void logDebug(String input, Object o) {
- instance.log(DEBUG, instance.stamp(input,o));
- }
-
- /**
- * Logs to the Critical level. This logging level is used to signify that an error has occured
- * but the software was able to handle it without crashing.
- * @param input Message to log.
- * @param o Object making the logging request.
- */
- public static synchronized void logCritical(String input, Object o) {
- instance.log(CRITICAL, instance.stamp(input,o));
- }
-
- /**
- * Logs to the Fatal level. This logging level is used when an error occurs that the software cannot
- * handle, and the application crashes as a result of it.
- * @param input Message to log.
- * @param o Object making the logging request.
- */
- public static synchronized void logFatal(String input, Object o) {
- instance.log(FATAL, instance.stamp(input,o));
- }
-
- /**
- * Property change event handler, notifies the logging system when the user has changed
- * logging related preferences.
- */
- public void propertyChange(PropertyChangeEvent event) {
- String property = event.getProperty();
- if(property.equals(PreferenceConstants.P_LOG_ENABLED) || property.equals(PreferenceConstants.P_LOG_FILE)
- || property.equals(PreferenceConstants.P_LOG_LEVEL) || property.equals(PreferenceConstants.P_LOG_TYPE)) {
- logInfo("LogManager reinitialization in progress", this);
- init();
- }
- }
-
- /**
- * Gets the entries needing to be logged still
- * @return all entries that have not yet been logged
- */
- public LinkedList<LogEntry> getEntries() {
- return entries;
- }
-
- private static LogManager instance = new LogManager();
- private LinkedList<LogEntry> entries = new LinkedList<LogEntry>();
-
- public static final int DEBUG=3,INFO=2,CRITICAL=1,FATAL=0;
- public static final int CONSOLE = 0, FILE = 1;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/internal/Localization.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/internal/Localization.java
deleted file mode 100644
index 57cf880774..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/internal/Localization.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.logging.internal;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Localization {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.systemtap.ui.logging.internal.localization";
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- private Localization() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/internal/LogDaemon.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/internal/LogDaemon.java
deleted file mode 100644
index 42899a1888..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/internal/LogDaemon.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.logging.internal;
-
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.sql.Date;
-import java.text.DateFormat;
-import java.util.LinkedList;
-import java.util.Timer;
-import java.util.TimerTask;
-
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.linuxtools.systemtap.ui.logging.internal.LogEntry;
-
-
-
-/**
- * Logging daemon. This object runs on its own thread and wakes up every 100ms, at which point
- * it flushes all queued messages to the Writer.
- * @author Henry Hughes, Ryan Morse
- */
-/*
- * Strings in this class should not be externalized since they are
- * primarily for debugging purposes.
- */
-public class LogDaemon extends TimerTask {
- public LogDaemon(BufferedWriter writer, int level) {
- logLevel = level % NAMES.length;
- Timer t = new Timer("LogDaemon",true);
- t.scheduleAtFixedRate(this, 100, 5000);
- }
-
- public void run() {
- LinkedList<?> entries = LogManager.getInstance().getEntries();
- if(writer == null || 0 == entries.size())
- return;
- StringBuilder builder = new StringBuilder();
- DateFormat df = DateFormat.getTimeInstance();
- while(!entries.isEmpty()) {
- LogEntry le = (LogEntry)(entries.removeFirst());
- if(le.level > logLevel)
- continue;
- try {
- builder.delete(0, builder.length());
- String time = df.format(new Date(System.currentTimeMillis()));
- builder.append("[" + NAMES[le.level] + "] - " + time + " - ");
- builder.append(le.message + "\n");
- writer.write(builder.toString());
- writer.flush();
- } catch(IOException e) {
- e.printStackTrace();
- }
- }
- }
-
- private int logLevel;
- private BufferedWriter writer;
- private final static String[] NAMES = {"fatal","critical","info","debug"};
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/internal/LogEntry.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/internal/LogEntry.java
deleted file mode 100644
index d0e69adeb6..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/internal/LogEntry.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.logging.internal;
-
-/**
- * This class represents a single log entry.
- * @author Henry Hughes
- */
-public class LogEntry {
- public int level;
- public String message;
- public LogEntry(int level, String message) {
- this.level = level;
- this.message = message;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/internal/LoggingPlugin.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/internal/LoggingPlugin.java
deleted file mode 100644
index 3601d1ade6..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/internal/LoggingPlugin.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.logging.internal;
-
-import org.eclipse.ui.plugin.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class LoggingPlugin extends AbstractUIPlugin {
-
- //The shared instance.
- private static LoggingPlugin plugin;
-
- /**
- * The constructor.
- */
- public LoggingPlugin() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static LoggingPlugin 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 AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.linuxtools.systemtap.ui.logging", path);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/internal/localization.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/internal/localization.properties
deleted file mode 100644
index b7e5118a15..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/internal/localization.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-LoggingPreferencePage.LoggingDescription=This page handles logging information about what is happening.
-LoggingPreferencePage.EnableLogging=Enable logging
-LoggingPreferencePage.Info=Info
-LoggingPreferencePage.Debug=Debug
-LoggingPreferencePage.Critical=Critical
-LoggingPreferencePage.Fatal=Fatal
-LoggingPreferencePage.LoggingLevel=Logging level
-LoggingPreferencePage.LogTo=Log to
-LoggingPreferencePage.Console=Console
-LoggingPreferencePage.File=File
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/preferences/LoggingPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/preferences/LoggingPreferencePage.java
deleted file mode 100644
index b41ff4a2b8..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/preferences/LoggingPreferencePage.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.logging.preferences;
-
-import org.eclipse.jface.preference.BooleanFieldEditor;
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.jface.preference.RadioGroupFieldEditor;
-import org.eclipse.jface.preference.StringFieldEditor;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.linuxtools.systemtap.ui.logging.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.logging.internal.LoggingPlugin;
-import org.eclipse.linuxtools.systemtap.ui.structures.ui.ComboFieldEditor;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-
-
-public class LoggingPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
- public LoggingPreferencePage() {
- super(GRID);
- setPreferenceStore(LoggingPlugin.getDefault().getPreferenceStore());
- setDescription(Localization.getString("LoggingPreferencePage.LoggingDescription"));
- }
-
- public void createFieldEditors() {
- BooleanFieldEditor logging =
- new BooleanFieldEditor(PreferenceConstants.P_LOG_ENABLED, Localization.getString("LoggingPreferencePage.EnableLogging"), getFieldEditorParent());
- String[] debugLevel = {Localization.getString("LoggingPreferencePage.Debug"), "" + LogManager.DEBUG};
- String[] infoLevel = {Localization.getString("LoggingPreferencePage.Info"),"" + LogManager.INFO};
- String[] criticalLevel = {Localization.getString("LoggingPreferencePage.Critical"), "" + LogManager.CRITICAL};
- String[] fatalLevel = {Localization.getString("LoggingPreferencePage.Fatal"), "" + LogManager.FATAL};
- String[][] levels = {debugLevel,infoLevel,criticalLevel,fatalLevel};
-
- ComboFieldEditor level =
- new ComboFieldEditor(PreferenceConstants.P_LOG_LEVEL, Localization.getString("LoggingPreferencePage.LoggingLevel"), levels, getFieldEditorParent());
- RadioGroupFieldEditor loggingType =
- new RadioGroupFieldEditor(PreferenceConstants.P_LOG_TYPE, Localization.getString("LoggingPreferencePage.LogTo"), 1,
- new String[][] {{ Localization.getString("LoggingPreferencePage.Console"), "" + LogManager.CONSOLE},
- {Localization.getString("LoggingPreferencePage.File"), "" + LogManager.FILE} }
- , getFieldEditorParent());
- StringFieldEditor file = new StringFieldEditor(PreferenceConstants.P_LOG_FILE, Localization.getString("LoggingPreferencePage.File"), getFieldEditorParent());
- file.setEmptyStringAllowed(true);
-
- this.addField(logging);
- this.addField(level);
- this.addField(loggingType);
- this.addField(file);
- }
-
- public void init(IWorkbench workbench) {
- }
-
- public void dispose() {
- super.dispose();
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/preferences/PreferenceConstants.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/preferences/PreferenceConstants.java
deleted file mode 100644
index a32cb959b2..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/preferences/PreferenceConstants.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.logging.preferences;
-
-/**
- * Constant definitions for plug-in preferences
- */
-public class PreferenceConstants {
-
- //environmentvariables
- public static final String[][] P_ENV = new String[][] {
- {"EnvLdLibraryPath", "LD_LIBRARY_PATH"},
- {"EnvPath", "PATH"},
- {"EnvSystemtapTapset", "SYSTEMTAP_TAPSET"},
- {"EnvSystemtapRuntime", "SYSTEMTAP_RUNTIME"},
- //{"EnvDateTime", "DATE_TIME"},
- //{"EnvUser", "USER"},
- //{"EnvKernel", "KERNEL"},
- //{"EnvTestName", "TEST_NAME"},
- //{"EnvSystemtap", "SYSTEMTAP"},
- //{"EnvElfutils", "ELFUTILS"},
- //{"EnvStapObj", "STAP_OBJ"},
- //{"EnvStapSrc", "STAP_SRC"},
- //{"EnvStapInstall", "STAP_INSTALL"},
- //{"EnvStapTests", "STAP_TESTS"},
- //{"EnvCvsroot", "CVSROOT"},
- //{"EnvMailToAddr", "MAIL_TO_ADDR"},
- //{"EnvBuildResults", "BUILD_RESULTS"},
- //{"EnvTestResults", "TEST_RESULTS"},
- };
-
- //Logging
- public static final String P_LOG_ENABLED = "STapLoggingEnabled";
- public static final String P_LOG_TYPE = "STapLoggingType";
- public static final String P_LOG_FILE = "STapLoggingFile";
- public static final String P_LOG_LEVEL = "STapLoggingLevel";
-
- //systemtap
- public static final String P_WINDOW_STATE = "RestoreWindowStatePreference";
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/preferences/PreferenceInitializer.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/preferences/PreferenceInitializer.java
deleted file mode 100644
index 24f23448d6..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/src/org/eclipse/linuxtools/systemtap/ui/logging/preferences/PreferenceInitializer.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.logging.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.linuxtools.systemtap.ui.logging.internal.LoggingPlugin;
-
-
-
-public class PreferenceInitializer extends AbstractPreferenceInitializer {
- public void initializeDefaultPreferences() {
- IPreferenceStore store = LoggingPlugin.getDefault().getPreferenceStore();
-
- //logging
- store.setDefault(PreferenceConstants.P_LOG_ENABLED, false);
- store.setDefault(PreferenceConstants.P_LOG_LEVEL, LogManager.CRITICAL);
- store.setDefault(PreferenceConstants.P_LOG_TYPE, LogManager.CONSOLE);
- store.setDefault(PreferenceConstants.P_LOG_FILE, System.getenv("HOME") + "/systemtapGUI-log");
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/.classpath
deleted file mode 100644
index 16e010260e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry exported="true" kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/.project b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/.project
deleted file mode 100644
index 4132b9a7df..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.ui.structures.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/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/ChangeLog
deleted file mode 100644
index 2a4d343e8b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/ChangeLog
+++ /dev/null
@@ -1,34 +0,0 @@
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Make version 0.3.0.qualifier.
-
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Change provider from IBM to Eclipse.
-
-2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * .classpath: New file.
- * .project: New file.
- * build.properties: New file.
- * META-INF/MANIFEST.MF: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/structures/AllTests.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/structures/CCodeFileFilterTest.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/structures/CopierTest.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/structures/IndexedObjectTest.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/structures/JarArchiveTest.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/structures/KernelSourceTreeTest.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/structures/LoggingStreamDaemonTest.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/CommandTest.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/LoggedCommandTest.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/StreamGobblerTest.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/structures/SortTest.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/structures/StringFormatterTest.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/structures/TreeDefinitionNodeTest.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/structures/TreeNodeTest.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/structures/validators/ConditionalExpressionValidatorTest.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/structures/validators/DirectoryValidatorTest.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/structures/validators/IntegerValidatorTest.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/structures/validators/MultiValidatorTest.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/structures/validators/NumberValidatorTest.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/structures/ZipArchiveTest.java: \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 3e7e965e62..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name.0
-Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.structures.tests
-Bundle-Version: 0.3.0.qualifier
-Bundle-Vendor: Eclipse
-Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.structures.tests.StructuresPlugin
-Bundle-Localization: plugin
-Bundle-ActivationPolicy: lazy
-Import-Package: junit.framework,
- org.eclipse.jface.dialogs,
- org.eclipse.linuxtools.systemtap.ui.structures
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.linuxtools.systemtap.ui.structures
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/build.properties
deleted file mode 100644
index 34d2e4d2da..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/AllTests.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/AllTests.java
deleted file mode 100644
index 92585d8add..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/AllTests.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.runnable.CommandTest;
-import org.eclipse.linuxtools.systemtap.ui.structures.runnable.StreamGobblerTest;
-import org.eclipse.linuxtools.systemtap.ui.structures.validators.ConditionalExpressionValidatorTest;
-import org.eclipse.linuxtools.systemtap.ui.structures.validators.DirectoryValidatorTest;
-import org.eclipse.linuxtools.systemtap.ui.structures.validators.IntegerValidatorTest;
-import org.eclipse.linuxtools.systemtap.ui.structures.validators.MultiValidatorTest;
-import org.eclipse.linuxtools.systemtap.ui.structures.validators.NumberValidatorTest;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.linuxtools.systemtap.ui.structures");
-
- //Structures
- suite.addTestSuite(CCodeFileFilterTest.class);
- suite.addTestSuite(CommandTest.class);
- suite.addTestSuite(CopierTest.class);
- suite.addTestSuite(IndexedObjectTest.class);
- suite.addTestSuite(JarArchiveTest.class);
- suite.addTestSuite(KernelSourceTreeTest.class);
- suite.addTestSuite(LoggingStreamDaemonTest.class);
- suite.addTestSuite(SortTest.class);
- suite.addTestSuite(StreamGobblerTest.class);
- suite.addTestSuite(StringFormatterTest.class);
- suite.addTestSuite(TreeDefinitionNodeTest.class);
- suite.addTestSuite(TreeNodeTest.class);
- suite.addTestSuite(ZipArchiveTest.class);
-
- //structures.validators
- suite.addTestSuite(ConditionalExpressionValidatorTest.class);
- suite.addTestSuite(DirectoryValidatorTest.class);
- suite.addTestSuite(IntegerValidatorTest.class);
- suite.addTestSuite(MultiValidatorTest.class);
- suite.addTestSuite(NumberValidatorTest.class);
-
- return suite;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/CCodeFileFilterTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/CCodeFileFilterTest.java
deleted file mode 100644
index 268e88cfb6..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/CCodeFileFilterTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-import java.io.File;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.CCodeFileFilter;
-
-import junit.framework.TestCase;
-
-public class CCodeFileFilterTest extends TestCase {
- public CCodeFileFilterTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- filter = new CCodeFileFilter();
- }
-
- public void testAccept() {
- assertFalse(filter.accept(null));
- assertFalse(filter.accept(new File("test")));
- assertFalse(filter.accept(new File("test.java")));
- assertTrue(filter.accept(new File("/root/")));
- assertTrue(filter.accept(new File("test.h")));
- assertTrue(filter.accept(new File("test.c")));
- }
-
- public void testGetDescription() {
- filter.getDescription();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- CCodeFileFilter filter;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/CopierTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/CopierTest.java
deleted file mode 100644
index 4ce3d177bd..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/CopierTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.Copier;
-
-import junit.framework.TestCase;
-
-public class CopierTest extends TestCase {
- public CopierTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- public void testCopy() {
- ArrayList list = new ArrayList();
- ArrayList[] lists = new ArrayList[3];
-
- for(int i=0; i<lists.length; i++) {
- list.add("" + i);
- lists[i] = new ArrayList();
- for(int j=0; j<5; j++)
- lists[i].add(new Integer(j));
- }
-
- ArrayList list2 = Copier.copy(list);
- for(int i=0; i<list.size(); i++)
- assertEquals(list2.get(i), list.get(i));
-
- ArrayList[] lists2 = Copier.copy(lists);
- for(int i=0; i<list.size(); i++) {
- for(int j=0; j<lists[i].size(); j++)
- assertEquals(lists2[i].get(j), lists[i].get(j));
- }
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/IndexedObjectTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/IndexedObjectTest.java
deleted file mode 100644
index 8730ec022f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/IndexedObjectTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.IndexedObject;
-
-import junit.framework.TestCase;
-
-public class IndexedObjectTest extends TestCase {
- public IndexedObjectTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- one = new IndexedObject(1, "one");
- two = new IndexedObject(2, "two");
- three = new IndexedObject(3, "three");
- }
-
- public void testToString() {
- assertEquals("one", one.toString());
- assertEquals("two", two.toString());
- assertEquals("three", three.toString());
- }
-
- public void testCompareTo() {
- assertEquals(0, one.compareTo(one));
- assertTrue(-1 >= one.compareTo(two));
- assertTrue(1 <= three.compareTo(one));
- assertEquals(0, one.compareTo(null));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- IndexedObject one, two, three;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/JarArchiveTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/JarArchiveTest.java
deleted file mode 100644
index f6d5759589..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/JarArchiveTest.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-import junit.framework.TestCase;
-
-public class JarArchiveTest extends TestCase {
- public JarArchiveTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- public void testUnjarFiles() {
-// JarArchive.unjarFiles();
-
-// JarArchive.unjarFiles();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/KernelSourceTreeTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/KernelSourceTreeTest.java
deleted file mode 100644
index 2cf57cf94f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/KernelSourceTreeTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-import java.io.File;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.KernelSourceTree;
-import org.eclipse.linuxtools.systemtap.ui.structures.TreeNode;
-
-
-import junit.framework.TestCase;
-
-public class KernelSourceTreeTest extends TestCase {
- public KernelSourceTreeTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- kst = new KernelSourceTree();
- }
-
- public void testGetTree() {
- assertNull("Inital tree is null", kst.getTree());
- }
-
- public void testBuildKernelTree() {
- TreeNode t;
-
- String direct = null; //Null
- String[] excluded = null;
- kst.buildKernelTree(direct, excluded);
- assertNull("Null directory", kst.getTree());
-
- direct = ""; //Empty string for directory
- kst.buildKernelTree(direct, excluded);
- assertNull("Empty string directory", kst.getTree());
-
- direct = "/noSuchDirectory/"; //Missing folder
- kst.buildKernelTree(direct, excluded);
- assertNull("Missing directory", kst.getTree());
-
- direct = "/root/"; //Inaccessable
- kst.buildKernelTree(direct, excluded);
- assertNull("Inaccessable directory", kst.getTree());
-
- direct = "/bin/"; //No .c or .h files
- kst.buildKernelTree(direct, excluded);
- t = kst.getTree();
- assertEquals("Bin folder item count", 0, t.getChildCount());
- assertTrue("Bin folder name", "bin".equals(t.toString()));
- assertTrue("Bin has file", t.getData() instanceof File);
-
- excluded = new String[] {".git"};
- direct = "/tmp/"; //No .c or .h files
- kst.buildKernelTree(direct, excluded);
- }
-
- public void testDispose() {
- kst.dispose();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- KernelSourceTree kst;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/LoggingStreamDaemonTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/LoggingStreamDaemonTest.java
deleted file mode 100644
index d5ece5ad07..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/LoggingStreamDaemonTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-import java.io.File;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.LoggingStreamDaemon;
-import org.eclipse.linuxtools.systemtap.ui.structures.runnable.StreamGobbler;
-
-
-import junit.framework.TestCase;
-
-public class LoggingStreamDaemonTest extends TestCase {
- public LoggingStreamDaemonTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- StreamGobbler gobbler = new StreamGobbler(System.in);
- gobbler.start();
- daemon = new LoggingStreamDaemon();
- }
-
- public void testHandleDataEvent() {
- daemon.handleDataEvent("test");
- }
-
- public void testGetOutput() {
- assertTrue("".equals(daemon.getOutput()));
-
- daemon.handleDataEvent("test");
- assertTrue("test".equals(daemon.getOutput()));
- }
-
- public void testSaveLog() {
- File f = new File("/tmp/loggingstreamdaemon.test");
- assertTrue(daemon.saveLog(f));
- f.delete();
-
- daemon.handleDataEvent("test");
- assertTrue(daemon.saveLog(f));
- //assertTrue("test".equals(daemon.getOutput()));
- f.delete();
-
- f = new File("/root/");
- assertFalse(daemon.saveLog(f));
- f.delete();
- }
-
- public void testDispose() {
- daemon.dispose();
- assertNull(daemon.getOutput());
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- LoggingStreamDaemon daemon;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/SortTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/SortTest.java
deleted file mode 100644
index 2747b73a83..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/SortTest.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.Sort;
-
-import junit.framework.TestCase;
-
-public class SortTest extends TestCase {
- public SortTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- public void testQuicksort() {
- String blank = "";
- String[] s0 = null;
- String[] s1 = new String[0];
- String[] s2 = new String[] {blank};
- String[] s3 = new String[] {"a"};
- String[] s4 = new String[] {"a", "b", "c", "d"};
- String[] s5 = new String[] {"d", "c", "b", "a"};
- String[] s6 = new String[] {"c", "d", "a", "b"};
- String[] s7 = new String[] {"a", "d", "a", "b"};
-
- Sort.quicksort(s0, 0, 0);
- assertNull("Sort null list", s0);
-
- Sort.quicksort(s1, 0, 0);
- assertEquals("Sort empty list", 0, s1.length);
-
- Sort.quicksort(s2, 0, s2.length-1);
- assertEquals("Sort blank list", 1, s2.length);
- assertEquals("Blank item same", blank, s2[0]);
-
- Sort.quicksort(s3, 0, s3.length-1);
- assertEquals("Sort single item list", 1, s3.length);
- assertTrue("Single item same", "a".equals(s3[0]));
-
- Sort.quicksort(s4, 0, s4.length-1);
- assertEquals("Sort ordered list", 4, s4.length);
- assertTrue("Single item same", "a".equals(s4[0]));
- assertTrue("Single item same", "b".equals(s4[1]));
- assertTrue("Single item same", "c".equals(s4[2]));
- assertTrue("Single item same", "d".equals(s4[3]));
-
- Sort.quicksort(s5, 0, s5.length-1);
- assertEquals("Sort reversed list", 4, s5.length);
- assertTrue("Single item same", "a".equals(s5[0]));
- assertTrue("Single item same", "b".equals(s5[1]));
- assertTrue("Single item same", "c".equals(s5[2]));
- assertTrue("Single item same", "d".equals(s5[3]));
-
- Sort.quicksort(s6, 0, s6.length-1);
- assertEquals("Sort random list", 4, s6.length);
- assertTrue("Single item same", "a".equals(s6[0]));
- assertTrue("Single item same", "b".equals(s6[1]));
- assertTrue("Single item same", "c".equals(s6[2]));
- assertTrue("Single item same", "d".equals(s6[3]));
-
- Sort.quicksort(s7, 0, s7.length-1);
- assertEquals("Sort duplicate item list", 4, s7.length);
- assertTrue("Single item same", "a".equals(s7[0]));
- assertTrue("Single item same", "a".equals(s7[1]));
- assertTrue("Single item same", "b".equals(s7[2]));
- assertTrue("Single item same", "d".equals(s7[3]));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/StringFormatterTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/StringFormatterTest.java
deleted file mode 100644
index 9dda377011..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/StringFormatterTest.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.IFormattingStyles;
-import org.eclipse.linuxtools.systemtap.ui.structures.StringFormatter;
-
-import junit.framework.TestCase;
-
-public class StringFormatterTest extends TestCase {
-
-// public static void main(String[] args) {}
-
- public StringFormatterTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- formatter = new StringFormatter();
- }
-
- public void testStringFormatter() {
- formatter = new StringFormatter();
- assertNotNull(formatter);
- }
-
- public void testGetFormat() {
- formatter.setFormat(IFormattingStyles.UNFORMATED);
- assertEquals(IFormattingStyles.UNFORMATED, formatter.getFormat());
-
- formatter.setFormat(IFormattingStyles.BINARY);
- assertEquals(IFormattingStyles.BINARY, formatter.getFormat());
-
- formatter.setFormat(IFormattingStyles.DOUBLE);
- assertEquals(IFormattingStyles.DOUBLE, formatter.getFormat());
-
- formatter.setFormat(IFormattingStyles.HEX);
- assertEquals(IFormattingStyles.HEX, formatter.getFormat());
-
- formatter.setFormat(IFormattingStyles.OCTAL);
- assertEquals(IFormattingStyles.OCTAL, formatter.getFormat());
-
- formatter.setFormat(IFormattingStyles.STRING);
- assertEquals(IFormattingStyles.STRING, formatter.getFormat());
-
- formatter.setFormat(IFormattingStyles.DATE);
- assertEquals(IFormattingStyles.DATE, formatter.getFormat());
- }
-
- public void testSetFormat() {
- formatter.setFormat(IFormattingStyles.BINARY);
- assertNotNull(formatter);
- }
-
- public void testFormat() {
- formatter.setFormat(IFormattingStyles.BINARY);
- assertTrue("0x1000".equals(formatter.format("8")));
-
- formatter.setFormat(IFormattingStyles.HEX);
- assertTrue("0x8".equals(formatter.format("8")));
-
- formatter.setFormat(IFormattingStyles.OCTAL);
- assertTrue("0x10".equals(formatter.format("8")));
-
- formatter.setFormat(IFormattingStyles.STRING);
- assertTrue("8".equals(formatter.format("8")));
-
- formatter.setFormat(IFormattingStyles.UNFORMATED);
- assertTrue("8".equals(formatter.format("8")));
-
- formatter.setFormat(IFormattingStyles.DATE);
- assertTrue("Dec 31, 1969 4:00:00 PM".equals(formatter.format("8")));
-
- formatter.setFormat(IFormattingStyles.DOUBLE);
- assertTrue("8.0".equals(formatter.format("8")));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- StringFormatter formatter;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/TreeDefinitionNodeTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/TreeDefinitionNodeTest.java
deleted file mode 100644
index 8407c3c2b0..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/TreeDefinitionNodeTest.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.TreeDefinitionNode;
-
-import junit.framework.TestCase;
-
-public class TreeDefinitionNodeTest extends TestCase {
- public TreeDefinitionNodeTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- data = new StringBuilder("Object");
- data2 = "Data";
- d = "/usr/share";
- d2 = "/usr";
- s = "String";
- s2 = "bah";
-
- t = new TreeDefinitionNode(data, s, d, true);
- child = new TreeDefinitionNode(data2, s2, d2, false);
- t.add(child);
- }
-
- public void testTreeDefinitionNode() {
- String d1 = "One";
- String d2 = "two";
- String s1 = "one";
-
- TreeDefinitionNode t = new TreeDefinitionNode(d1, s1, d2, false);
- assertEquals("Create child count", 0, t.getChildCount());
- assertEquals("Create child string", s1, t.toString());
- assertEquals("Create child data", d1, t.getData());
- assertEquals("Create child definition", d2, t.getDefinition());
- assertFalse("Create child clickable", t.isClickable());
- }
-
-
- public void testGetDefinition() {
- assertNotSame("Correct definition", d2, t.getDefinition());
- assertEquals("Correct definition2", d2, ((TreeDefinitionNode)t.getChildAt(0)).getDefinition());
- }
-
- public void testSetDefinition() {
- String s1 = "/user/share/systemtap";
- t.setDefinition(s1);
- assertEquals("Replaced definition", s1, t.getDefinition());
- }
-
- public void testDispose() {
- assertNotNull(t.getDefinition());
- t.dispose();
- assertNull(t.getDefinition());
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- TreeDefinitionNode t;
- TreeDefinitionNode child;
- Object data;
- String data2;
- String s, s2;
- String d, d2;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/TreeNodeTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/TreeNodeTest.java
deleted file mode 100644
index dc0701505c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/TreeNodeTest.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.TreeNode;
-
-import junit.framework.TestCase;
-
-public class TreeNodeTest extends TestCase {
- public TreeNodeTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- data = new StringBuilder("Object");
- data2 = "Data";
- d = "/user/share";
- s = "String";
-
- t = new TreeNode(data, s, false);
- child = new TreeNode(data2, true);
- child2 = new TreeNode(data, s, false);
- t.add(child);
- t.add(child2);
- }
-
- public void testTreeNode() {
- String d1 = "One";
- String d2 = "two";
- String s1 = "one";
-
- TreeNode t1 = new TreeNode(d1, s1, false);
- assertEquals("Create child count", 0, t1.getChildCount());
- assertEquals("Create child string", s1, t1.toString());
- assertEquals("Create child data", d1, t1.getData());
- assertFalse("Create child clickable", t1.isClickable());
-
- TreeNode t2 = new TreeNode(d2, true);
- assertEquals("Create child count", 0, t2.getChildCount());
- assertTrue("Create child string", t2.toString().equals(d2.toString()));
- assertEquals("Create child data", d2, t2.getData());
- assertTrue("Create child clickable", t2.isClickable());
-
- TreeNode t3 = new TreeNode(null, true);
- assertEquals("Create child count", 0, t3.getChildCount());
- assertEquals("Create child string", null, t3.toString());
- assertEquals("Create child data", null, t3.getData());
- assertTrue("Create child clickable", t3.isClickable());
-
- TreeNode t4 = new TreeNode(d1, s1, false);
- assertEquals("Create child count", 0, t4.getChildCount());
- assertEquals("Create child string", s1, t4.toString());
- assertEquals("Create child data", d1, t4.getData());
- assertFalse("Create child clickable", t4.isClickable());
- }
-
- public void testAdd() {
- t.add(new TreeNode("One", "tne", false));
- assertEquals("Add child", 3, t.getChildCount());
-
- t.add(new TreeNode("two", false));
- assertEquals("Add child2", 4, t.getChildCount());
- }
-
- public void testAddAt() {
- TreeNode test1 = new TreeNode("one", false);
- t.addAt(test1, 0);
- assertEquals("Child added to front", test1, t.getChildAt(0));
- assertEquals("Child correctly added", 3, t.getChildCount());
-
- TreeNode test2 = new TreeNode("two", false);
- t.addAt(test2, 1);
- assertEquals("Child added to middle", test2, t.getChildAt(1));
- assertEquals("Child correctly added", 4, t.getChildCount());
-
- TreeNode test3 = new TreeNode("three", false);
- t.addAt(test3, 3);
- assertEquals("Child added to end", test3, t.getChildAt(3));
- assertEquals("Child correctly added", 5, t.getChildCount());
-
- TreeNode test4 = new TreeNode("four", false);
- t.addAt(test4, 30);
- assertEquals("Child added to end", test4, t.getChildAt(5));
- assertEquals("Child correctly added", 6, t.getChildCount());
- }
-
- public void testGetChildAt() {
- TreeNode child1 = new TreeNode("1", false);
- t.add(child1);
- TreeNode child2 = new TreeNode("2", false);
- t.add(child2);
-
- TreeNode c = t.getChildAt(0);
- assertEquals("Retreive first child from tree", child, c);
-
- c = t.getChildAt(2);
- assertEquals("Retreive middle child from tree", child1, c);
-
- c = t.getChildAt(3);
- assertEquals("Retreive last child from tree", child2, c);
-
- assertNull("No child here", t.getChildAt(10));
- }
-
- public void testGetChildCount() {
- assertEquals("Tree child count", 2, t.getChildCount());
- assertEquals("Child child count", 0, t.getChildAt(0).getChildCount());
- }
-
- public void testGetData() {
- assertEquals("Correct data", data, t.getData());
- assertEquals("Correct data2", data2, t.getChildAt(0).getData());
- }
-
- public void testIsClickable() {
- assertFalse("Nonclickable root", t.isClickable());
- assertTrue("Clickable child", t.getChildAt(0).isClickable());
- }
-
- public void testRemove() {
- TreeNode child1 = new TreeNode("1", false);
- t.add(child1);
- TreeNode child2 = new TreeNode("2", false);
- t.add(child2);
- TreeNode child3 = new TreeNode("3", false);
- t.add(child3);
-
- assertEquals("Full tree before remove", 5, t.getChildCount());
-
- assertTrue(t.remove(1));
- assertEquals("Remove middle child from tree", 4, t.getChildCount());
-
- assertTrue(t.remove(0));
- assertEquals("Remove first child from tree", 3, t.getChildCount());
-
- assertTrue(t.remove(1));
- assertEquals("Remove last child from tree", 2, t.getChildCount());
-
- assertFalse(t.remove(10));
- assertEquals("Remove IndexOutOfBounds", 2, t.getChildCount());
- }
-
- public void testRemoveAll() {
- t.add(new TreeNode("Child", false));
-
- assertTrue(t.removeAll());
- assertEquals("No children", 0, t.getChildCount());
-
- assertTrue(t.removeAll());
- assertEquals("Still no children", 0, t.getChildCount());
- }
-
- public void testSetData() {
- Object o = "asdf";
- t.setData(o);
- assertEquals("Replaced data", o, t.getData());
-
- String o1 = "aaaa";
- t.setData(o1);
- assertEquals("Replaced data with string", o1, t.getData());
- }
-
- public void testSetDisplay() {
- String s1 = "aaaa";
- t.setDisplay(s1);
- assertEquals("Replaced display", s1, t.toString());
- }
-
- public void testSortTree() {
- TreeNode child1 = new TreeNode("2", false);
- t.add(child1);
- TreeNode child2 = new TreeNode("1", false);
- t.add(child2);
- TreeNode child3 = new TreeNode("3", false);
- t.add(child3);
-
- t.sortTree();
- assertEquals("Same number of children", 5, t.getChildCount());
- assertEquals("Sorted first node correct", child2, t.getChildAt(0));
- assertEquals("Sorted last node correct", child, t.getChildAt(3));
- assertEquals("Sorted middle correct", child1, t.getChildAt(1));
- }
-
- public void testSortLevel() {
- TreeNode child1 = new TreeNode("2", false);
- t.add(child1);
- TreeNode child2 = new TreeNode("1", false);
- t.add(child2);
- TreeNode child3 = new TreeNode("3", false);
- t.add(child3);
-
-
- t.sortLevel();
- assertEquals("Same number of children", 5, t.getChildCount());
- assertEquals("Sorted first node correct", child2, t.getChildAt(0));
- assertEquals("Sorted last node correct", child, t.getChildAt(3));
- assertEquals("Sorted middle correct", child1, t.getChildAt(1));
- }
-
- public void testToString() {
- assertEquals("Object to string", data2, child.toString());
- assertEquals("Dispaly to string", s, t.toString());
- }
-
- public void testDispose() {
- t.dispose();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- TreeNode t;
- TreeNode child;
- TreeNode child2;
- Object data;
- String data2;
- String s;
- String d;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/ZipArchiveTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/ZipArchiveTest.java
deleted file mode 100644
index b04890b920..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/ZipArchiveTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-import java.io.File;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.ZipArchive;
-
-import junit.framework.TestCase;
-
-public class ZipArchiveTest extends TestCase {
- public ZipArchiveTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- File f = new File("/tmp/test/a");
- f.getParentFile().mkdirs();
- f.createNewFile();
-
- ZipArchive.zipFiles("/tmp/test/a.zip", new String[] {"/tmp/test/a"}, new String[] {"a"});
- ZipArchive.compressFile("/tmp/test/a.gz", "/tmp/test/a.zip");
- }
-
- public void testZipFiles() {
- File b = new File("/tmp/test/b.zip");
- assertFalse(b.exists());
- ZipArchive.zipFiles(b.getAbsolutePath(), new String[] {"/tmp/test/a", "/tmp/test/a.zip"}, new String[] {"a", "a.zip"});
- assertTrue(b.exists());
- }
-
- public void testUnzipFiles() {
- File b = new File("/tmp/test/aa/");
- assertFalse(b.exists());
- b.mkdirs();
- ZipArchive.unzipFiles("/tmp/test/a.zip", b.getAbsolutePath());
- assertTrue(b.exists());
- assertTrue(new File(b.getAbsolutePath() + "a").exists());
- }
-
- public void testCompressFile() {
- File b = new File("/tmp/test/b.gz");
- assertFalse(b.exists());
- ZipArchive.compressFile(b.getAbsolutePath(), "/tmp/test/a.zip");
- assertTrue(b.exists());
- }
-
- public void testUncompressFile() {
- File b = new File("/tmp/test/bb/");
- assertFalse(b.exists());
- b.mkdirs();
- ZipArchive.uncompressFile(b.getAbsolutePath() + "a.zip", "/tmp/test/a.gz");
- assertTrue(b.exists());
- assertTrue(new File(b.getAbsolutePath() + "a.zip").exists());
- }
-
- protected void tearDown() throws Exception {
- new File("/tmp/test/").deleteOnExit();
- super.tearDown();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/CommandTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/CommandTest.java
deleted file mode 100644
index 590e2fb815..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/CommandTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures.runnable;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.runnable.Command;
-
-import junit.framework.TestCase;
-
-public class CommandTest extends TestCase {
- public CommandTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- tc = new Command(new String[] {"ls", "/home/"}, null, null);
- }
-
- public void testCommand() {
- assertNotNull("Command not null", tc);
-
- tc = new Command(null, null, null);
- assertNotNull("Command not null", tc);
-
- tc = new Command(new String[] {}, null, null);
- assertNotNull("Command not null", tc);
-
- tc = new Command(new String[] {""}, null, null);
- assertNotNull("Command not null", tc);
-
- tc = new Command(new String[] {"a"}, null, null);
- assertNotNull("Command not null", tc);
-
- tc = new Command(new String[] {"ls", "/"}, null, null);
- assertNotNull("Command not null", tc);
- }
-
- public void testIsFinished() {
- assertTrue("Not finished", tc.isRunning());
- tc.stop();
- assertFalse("Finished", tc.isRunning());
- }
-
- public void testStop() {
- assertTrue("Running", tc.isRunning());
- tc.stop();
- assertFalse("Not running", tc.isRunning());
- }
-
- public void testGetReturnValue() {
- assertEquals(-1, tc.getReturnValue());
- }
-
- public void testIsDisposed() {
- assertFalse(tc.isDisposed());
- tc.dispose();
- assertTrue(tc.isDisposed());
- }
-
- public void testDispose() {
- tc.dispose();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- Command tc;
-}
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/LoggedCommandTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/LoggedCommandTest.java
deleted file mode 100644
index 76ef6ab6f4..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/LoggedCommandTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.structures.runnable;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.runnable.LoggedCommand;
-
-import junit.framework.TestCase;
-
-public class LoggedCommandTest extends TestCase {
- public LoggedCommandTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- cmd = new LoggedCommand(new String[] {"stap", "-v", "-p1", "-e", "probe nosuchfunc{}"}, null, null);
- }
-
- public void testLoggedCommand() {
- cmd.dispose();
-
- cmd = new LoggedCommand(new String[] {"stap", "-v", "-p1", "-e", "probe nosuchfunc{}"}, null, null);
- cmd.start();
- assertTrue(cmd.isRunning());
- assertFalse(cmd.isDisposed());
- cmd.stop();
- assertFalse(cmd.isRunning());
- assertFalse(cmd.isDisposed());
- cmd.dispose();
-
- cmd = new LoggedCommand(new String[] {"stap", "-v", "-p1", "-e", "probe nosuchfunc{}"}, null, null, 100);
- cmd.start();
- assertTrue(cmd.isRunning());
- assertFalse(cmd.isDisposed());
- cmd.stop();
- assertFalse(cmd.isRunning());
- assertFalse(cmd.isDisposed());
- cmd.dispose();
- }
-
- public void testGetOutput() {
-
- }
-
- public void testSaveLog() {
-
- }
-
- public void testStop() {
- cmd.start();
- assertTrue(cmd.isRunning());
- cmd.stop();
- assertFalse(cmd.isRunning());
- }
-
- public void testDispose() {
- assertFalse(cmd.isDisposed());
- cmd.dispose();
- assertTrue(cmd.isDisposed());
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- cmd.dispose();
- }
-
- LoggedCommand cmd;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/StreamGobblerTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/StreamGobblerTest.java
deleted file mode 100644
index 631c3b9620..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/StreamGobblerTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures.runnable;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.runnable.StreamGobbler;
-
-import junit.framework.TestCase;
-
-public class StreamGobblerTest extends TestCase {
- public StreamGobblerTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- sg = new StreamGobbler(System.in);
- sg.start();
- }
-
- public void testStreamGobbler() {
- assertNotNull("StreamGobbler not null", sg);
-
- sg = new StreamGobbler(null);
- assertNotNull("StreamGobbler not null", sg);
-
- sg = new StreamGobbler(System.in);
- assertNotNull("StreamGobbler not null", sg);
- }
-
- public void testIsRunning() {
- assertTrue("StreamGobbler running", sg.isRunning());
- sg.stop();
- assertFalse("StreamGobbler stopped", sg.isRunning());
- }
-
- public void testStop() {
- assertTrue("StreamGobbler running", sg.isRunning());
- sg.stop();
- assertFalse("StreamGobbler stopped", sg.isRunning());
- }
-
- public void testDispose() {
- sg.dispose();
- assertFalse(sg.isRunning());
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- StreamGobbler sg;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/ConditionalExpressionValidatorTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/ConditionalExpressionValidatorTest.java
deleted file mode 100644
index 82e5c4cf9d..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/ConditionalExpressionValidatorTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.structures.validators;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.validators.ConditionalExpressionValidator;
-
-import junit.framework.TestCase;
-
-public class ConditionalExpressionValidatorTest extends TestCase {
- public ConditionalExpressionValidatorTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- public void testIsValid() {
- ConditionalExpressionValidator validator = new ConditionalExpressionValidator();
-
- assertNotNull("Null not valid", validator.isValid(null));
- assertNotNull("Blank not valid", validator.isValid(""));
- assertNotNull("String not valid", validator.isValid("sdf"));
- assertNotNull("if not valid", validator.isValid("if"));
- assertNotNull("if( not valid", validator.isValid("if("));
- assertNotNull("if) not valid", validator.isValid("if)"));
- assertNotNull("if() not valid", validator.isValid("if()"));
- assertNull("if(a) valid", validator.isValid("if(a)"));
- assertNull("if (a) valid", validator.isValid("if ()"));
- assertNull("if(a=b) valid", validator.isValid("if(a=b)"));
- assertNotNull("if(a)b not valid", validator.isValid("if(a)d"));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/DirectoryValidatorTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/DirectoryValidatorTest.java
deleted file mode 100644
index 1e650fc8c0..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/DirectoryValidatorTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.structures.validators;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.validators.DirectoryValidator;
-
-import junit.framework.TestCase;
-
-public class DirectoryValidatorTest extends TestCase {
- public DirectoryValidatorTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- public void testIsValid() {
- DirectoryValidator validator = new DirectoryValidator();
-
- assertNotNull("Null not valid", validator.isValid(null));
- assertNotNull("Blank not valid", validator.isValid(""));
- assertNotNull("String valid", validator.isValid("sdf"));
- assertNotNull("// not valid", validator.isValid("//"));
- assertNotNull("/root/ad not valid", validator.isValid("/root/ad"));
- assertNull("/ is valid", validator.isValid("/"));
- assertNull("/root/ is valid", validator.isValid("/root/"));
- assertNull("/blah/bld/ is valid", validator.isValid("/blah/bld/"));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/IntegerValidatorTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/IntegerValidatorTest.java
deleted file mode 100644
index 418f84f8f7..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/IntegerValidatorTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.structures.validators;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.validators.IntegerValidator;
-
-import junit.framework.TestCase;
-
-public class IntegerValidatorTest extends TestCase {
- public IntegerValidatorTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- public void testIsValid() {
- IntegerValidator validator = new IntegerValidator();
-
- assertNotNull("Null not an iteger", validator.isValid(null));
- assertNotNull("Blank not an iteger", validator.isValid(""));
- assertNotNull("String not an iteger", validator.isValid("sdf"));
- assertNotNull("Not an iteger", validator.isValid("2.2.2"));
- assertNotNull("Double is not valid", validator.isValid("2.2"));
- assertNotNull("Double is not valid", validator.isValid(".3"));
- assertNull("Integer is valid", validator.isValid("3"));
- assertNull("Integer is valid", validator.isValid("343"));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/MultiValidatorTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/MultiValidatorTest.java
deleted file mode 100644
index f3e5ac56f5..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/MultiValidatorTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.structures.validators;
-
-import junit.framework.TestCase;
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.linuxtools.systemtap.ui.structures.validators.ConditionalExpressionValidator;
-import org.eclipse.linuxtools.systemtap.ui.structures.validators.DirectoryValidator;
-import org.eclipse.linuxtools.systemtap.ui.structures.validators.IntegerValidator;
-import org.eclipse.linuxtools.systemtap.ui.structures.validators.MultiValidator;
-import org.eclipse.linuxtools.systemtap.ui.structures.validators.NumberValidator;
-
-
-public class MultiValidatorTest extends TestCase {
- public MultiValidatorTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- validator = new MultiValidator();
- validator.addValidator(new NumberValidator());
- validator.addValidator(new NumberValidator());
- }
-
- public void testAddValidator() {
- validator.addValidator(new IntegerValidator());
- validator.addValidator(new ConditionalExpressionValidator());
- validator.addValidator(new DirectoryValidator());
- validator.addValidator(new NumberValidator());
- }
-
- public void testIsValid() {
- assertNotNull("Null not a number", validator.isValid(null));
- assertNotNull("Blank not a number", validator.isValid(""));
- assertNotNull("String not a number", validator.isValid("sdf"));
- assertNotNull("Not a number", validator.isValid("2.2.2"));
- assertNull("Integer is valid", validator.isValid("3"));
- assertNull("Double is valid", validator.isValid("2.2"));
- assertNull("Double is a number", validator.isValid(".3"));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- MultiValidator validator;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/NumberValidatorTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/NumberValidatorTest.java
deleted file mode 100644
index 08851eea3a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/NumberValidatorTest.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.structures.validators;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.validators.NumberValidator;
-
-import junit.framework.TestCase;
-
-public class NumberValidatorTest extends TestCase {
- public NumberValidatorTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- public void testIsValid() {
- NumberValidator validator = new NumberValidator();
-
- assertNotNull("Null not a number", validator.isValid(null));
- assertNotNull("Blank not a number", validator.isValid(""));
- assertNotNull("String not a number", validator.isValid("sdf"));
- assertNotNull("Not a number", validator.isValid("2.2.2"));
- assertNull("Integer is valid", validator.isValid("3"));
- assertNull("Double is valid", validator.isValid("2.2"));
- assertNull("Double is a number", validator.isValid(".3"));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/.classpath
deleted file mode 100644
index 64c5e31b7a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/.project b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/.project
deleted file mode 100644
index 262157cf8c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.ui.structures</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/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/.settings/org.eclipse.jdt.core.prefs b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 17951b6ff9..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Feb 27 17:06:56 IST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/ChangeLog
deleted file mode 100644
index 12b1d59a84..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/ChangeLog
+++ /dev/null
@@ -1,16 +0,0 @@
-2009-11-16 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Fix Bundle-Name.
-
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Make version 0.3.0.qualifier.
-
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Change provider from IBM to Eclipse.
-
-2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * ChangeLog: Refactoring. Renaming all packages directories from *.systemtapgui.* to *.systemtap.ui.*
- \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/META-INF/MANIFEST.MF
deleted file mode 100644
index 69b95092f8..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,16 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: SystemTap Structures Plug-in (Incubation)
-Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.structures;singleton:=true
-Bundle-Version: 0.3.0.qualifier
-Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.structures.internal.StructuresPlugin
-Bundle-Vendor: Eclipse
-Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.linuxtools.systemtap.ui.structures,
- org.eclipse.linuxtools.systemtap.ui.structures.listeners,
- org.eclipse.linuxtools.systemtap.ui.structures.runnable,
- org.eclipse.linuxtools.systemtap.ui.structures.ui,
- org.eclipse.linuxtools.systemtap.ui.structures.validators
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/build.properties
deleted file mode 100644
index 98def4deb0..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- src/
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/CCodeFileFilter.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/CCodeFileFilter.java
deleted file mode 100644
index 0b621e03ba..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/CCodeFileFilter.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-import java.io.File;
-import java.io.FileFilter;
-
-public class CCodeFileFilter implements FileFilter {
- /**
- * Checks a file type and only passes it (returns true) if it is either a directory, a .c, or a .h
- * file type.
- *
- * @param f The file to check.
- *
- * @return A boolean value indicating whether or not to display the file.
- */
- public boolean accept(File f) {
- if(null == f)
- return false;
- return f.isDirectory() ||
- f.getName().toLowerCase().endsWith(".c") ||
- f.getName().toLowerCase().endsWith(".h");
- }
-
- public String getDescription() {
- return ".c, .h files";
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/Copier.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/Copier.java
deleted file mode 100644
index a2bb421c43..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/Copier.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-import java.util.ArrayList;
-
-public final class Copier {
-
- /**
- * Returns a copy of the passed in ArrayList array object.
- *
- * @param list The ArrayList array object to copy.
- *
- * @return The copy of the ArrayList array.
- */
- @SuppressWarnings("unchecked")
- public static ArrayList[] copy(ArrayList[] list) {
- ArrayList[] list2 = new ArrayList[list.length];
-
- for(int i=0; i<list2.length; i++)
- list2[i] = copy(list[i]);
-
- return list2;
- }
-
- /**
- * Returns a copy of the passed in ArrayList object.
- *
- * @param list The ArrayList object to copy.
- *
- * @return The copy of the ArrayList.
- */
- @SuppressWarnings("unchecked")
- public static ArrayList copy(ArrayList list) {
- ArrayList list2 = new ArrayList();
- list2.addAll(list);
- return list2;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/IFormattingStyles.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/IFormattingStyles.java
deleted file mode 100644
index 65c099c913..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/IFormattingStyles.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.internal.Localization;
-
-public interface IFormattingStyles {
- public static final int UNFORMATED = 0;
- public static final int STRING = 1;
- public static final int DATE = 2;
- public static final int DOUBLE = 3;
- public static final int HEX = 4;
- public static final int OCTAL = 5;
- public static final int BINARY = 6;
-
- public static String[] FORMAT_TITLES = {Localization.getString("IFormattingStyles.Unformatted"), Localization.getString("IFormattingStyles.String"), Localization.getString("IFormattingStyles.Date"), Localization.getString("IFormattingStyles.Double"), Localization.getString("IFormattingStyles.Hex"), Localization.getString("IFormattingStyles.Octal"), Localization.getString("IFormattingStyles.Binary")};
-
- public void setFormat(int format);
- public String format(String s);
- public int getFormat();
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/IPasswordPrompt.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/IPasswordPrompt.java
deleted file mode 100644
index 6b1f8c8b72..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/IPasswordPrompt.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-public interface IPasswordPrompt {
- public String getPassword();
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/IndexedObject.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/IndexedObject.java
deleted file mode 100644
index e3cfb5cc21..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/IndexedObject.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-@SuppressWarnings("unchecked")
-public class IndexedObject implements Comparable{
- public int index;
- public Object val;
-
- public IndexedObject(int i, Object v) {
- index = i;
- val = v;
- }
-
- public String toString() {
- return val.toString();
- }
-
- public int compareTo(Object o) {
- if(o instanceof IndexedObject) {
- Comparable thisVal = (val instanceof Comparable) ? (Comparable)val : val.toString();
- IndexedObject t = (IndexedObject)o;
- Comparable otherVal = (t.val instanceof Comparable) ? (Comparable)t.val : t.val.toString();
- return thisVal.compareTo(otherVal);
- }
- return 0;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/JarArchive.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/JarArchive.java
deleted file mode 100644
index 4cddea2f47..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/JarArchive.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Enumeration;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-
-public class JarArchive {
- public static void unjarFiles(String jarFileName, String destination) {
- unjarFiles(jarFileName, destination, null);
- }
-
- /**
- * Un-jars a specified file to a specified directory using a specificed path filter.
- *
- * @param jarFileName The file to extract.
- * @param destination Where to extract the files to.
- * @param pathFilter The path filter to apply.
- */
- public static void unjarFiles(String jarFileName, String destination, String pathFilter) {
- try {
- JarFile jf = new JarFile(jarFileName);
-
- for (Enumeration<?> entries = jf.entries(); entries.hasMoreElements();) {
- JarEntry jarEntry = (JarEntry)entries.nextElement();
- String jarEntryName = jarEntry.getName();
-
- if(null == pathFilter || jarEntryName.contains(pathFilter)) {
- int lastDirSep;
- if ( (lastDirSep = jarEntryName.lastIndexOf('/')) > 0 ) {
- String dirName = jarEntryName.substring(0, lastDirSep);
- (new File(destination + dirName)).mkdirs();
- }
-
- if (!jarEntryName.endsWith("/")) {
- OutputStream out = new FileOutputStream(destination + jarEntryName);
- InputStream in = jf.getInputStream(jarEntry);
-
- transferData(in, out);
-
- out.close();
- in.close();
- }
- }
- }
- } catch (IOException e) {}
- }
-
- /**
- * Transfer data from one stream to another.
- *
- * @param in The stream to transfer from.
- * @param out The stream to transfer to.
- */
- private static void transferData(InputStream in, OutputStream out) {
- try {
- byte[] buf = new byte[BUFFER_SIZE];
- int len;
- while((len = in.read(buf)) > 0)
- out.write(buf, 0, len);
- } catch (IOException e) {}
- }
-
- private static final int BUFFER_SIZE = 1024;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/KernelSourceTree.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/KernelSourceTree.java
deleted file mode 100644
index 8a5c4465f7..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/KernelSourceTree.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-import java.io.File;
-
-public class KernelSourceTree {
- public TreeNode getTree() {
- return kernelTree;
- }
-
- /**
- * Builds the kernel tree from file parameter direct and stores the excluded string array.
- *
- * @param direct The file to include into the tree.
- * @param excluded The string array to store as excluded.
- */
- public void buildKernelTree(String direct, String[] excluded) {
- this.excluded = excluded;
- try {
- File f = new File(direct);
-
- kernelTree = new TreeNode(f, f.getName(), false);
- addLevel(kernelTree);
- } catch(Exception e) {
- kernelTree = null;
- }
- }
-
- /**
- * Adds a level to the kernel source tree.
- *
- * @param top The top of the tree to add a level to.
- */
- private void addLevel(TreeNode top) {
- boolean add;
- TreeNode current;
- File f = (File)top.getData();
-
- File[] fs = f.listFiles(new CCodeFileFilter());
- for(int i=0; i<fs.length; i++) {
- add = true;
- for(int j=0; j<excluded.length; j++) {
- if(fs[i].isDirectory() && fs[i].getName().equals(excluded[j].substring(0, excluded[j].length()-1)))
- add = false;
- }
- if(add) {
- current = new TreeNode(fs[i], fs[i].getName(), !fs[i].isDirectory());
- top.add(current);
- if(fs[i].isDirectory()) {
- addLevel(top.getChildAt(top.getChildCount()-1));
- if(0 == current.getChildCount())
- top.remove(top.getChildCount()-1);
- }
- }
- }
- top.sortLevel();
- }
-
- public void dispose() {
- kernelTree = null;
- }
-
- private TreeNode kernelTree;
- private String[] excluded;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/LoggingStreamDaemon.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/LoggingStreamDaemon.java
deleted file mode 100644
index 5f1b6188ad..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/LoggingStreamDaemon.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.listeners.IGobblerListener;
-
-
-
-public class LoggingStreamDaemon implements IGobblerListener {
-
- /**
- * Sets up an output to log to.
- */
- public LoggingStreamDaemon() {
- output = new StringBuilder();
- try {
- outputFile = File.createTempFile(this.toString(), ".tmp");
- writer = new FileWriter(outputFile, true);
- } catch(IOException ioe) {
- outputFile = null;
- }
- saveLog = false;
- }
-
- /**
- * Pushes output to log.
- */
- protected void pushData() {
- if(null != writer) {
- try {
- writer.write(output.toString());
- output.delete(0, output.length());
- writer.flush();
- } catch(IOException ioe) {}
- }
- }
-
- /**
- * Outputs one line.
- */
- public void handleDataEvent(String line) {
- output.append(line);
- this.pushData();
- }
-
- /**
- * Reads in and returns the output produced.
- *
- * @return The logged data.
- */
- public String getOutput() {
- if(null == outputFile)
- return null;
- try {
- if(output.length() > 0) pushData();
- FileReader reader = new FileReader(outputFile);
- char[] buffer = new char[BUFFER_SIZE];
- int count;
- StringBuilder builder = new StringBuilder();
- while(-1 != (count = reader.read(buffer)))
- builder.append(buffer, 0, count);
- return builder.toString();
- } catch(IOException ioe) {}
- return null;
- }
-
- /**
- * Saves the logfile.
- *
- * @param file The file to save the log data to.
- *
- * @return True if the save was successful.
- */
- public boolean saveLog(File file) {
- try {
- if(!file.exists()) {
- file.getParentFile().mkdirs();
- file.createNewFile();
- }
- FileReader r = new FileReader(outputFile);
- FileWriter w = new FileWriter(file, true);
- char[] buffer = new char[BUFFER_SIZE];
- int count;
- while(-1 != (count = r.read(buffer)))
- w.write(new String(buffer, 0, count));
- w.flush();
- writer.close();
- writer = w;
- r.close();
- outputFile.delete();
- outputFile = file;
- saveLog = true;
- } catch(IOException ioe) {
- return false;
- }
- return true;
- }
-
- public void dispose() {
- if(null != outputFile && !saveLog)
- outputFile.delete();
- outputFile = null;
- if(null != writer) {
- try {
- writer.close();
- } catch(IOException ioe) {}
- }
- writer = null;
- }
-
- protected StringBuilder output;
- protected File outputFile;
- protected FileWriter writer;
- private boolean saveLog;
-
- private static final int BUFFER_SIZE = 1024;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/PasswordPrompt.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/PasswordPrompt.java
deleted file mode 100644
index b3debd9cde..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/PasswordPrompt.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.ui.PasswordDialog;
-import org.eclipse.ui.PlatformUI;
-
-
-
-public class PasswordPrompt implements IPasswordPrompt {
- public PasswordPrompt() {
- this(null);
- }
-
- public PasswordPrompt(String pass) {
- password = pass;
- triedSaved = false;
- }
-
- /**
- * Prompts the user for their password.
- *
- * @return The string response of the user.
- */
- public String getPassword() {
- if(triedSaved || null == password) {
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- boolean stop = false;
- public void run() {
- if(stop) return;
- try {
- PasswordDialog input = new PasswordDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
- input.open();
- password = input.getPassword();
- save = input.getPasswordSaved();
- input.dispose();
- if(null == password) password = "";
- } catch (Exception e) {
- stop = true;
- }
- }
- });
- }
-
- triedSaved = true;
- return password;
- }
-
- public boolean getSavePassword() {
- return save;
- }
-
- private boolean save;
- private String password;
- private boolean triedSaved;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/RegExParser.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/RegExParser.java
deleted file mode 100644
index f9ba214ecd..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/RegExParser.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public final class RegExParser {
-
- /**
- * Accepts a string of output from the script and compares it against the supplied regular
- * expression. The output is split and returned as an array of objects.
- *
- * @param s The line of output from the script.
- * @param regEx The regular expression used in comparison.
- *
- * @return The array of objects representing the parsed line.
- */
- public static Object[] parseLine(StringBuilder s, String[] regEx) {
- Object[] d = null;
-
- StringBuilder wholeRegExpr = new StringBuilder();
- for(int i=0; i<regEx.length; i++) {
- regEx[i] = '(' + regEx[i] + ')';
- wholeRegExpr.append(regEx[i]);
- }
- Pattern wholePattern = Pattern.compile(wholeRegExpr.toString());
- Matcher wholeMatcher = wholePattern.matcher(s);
-
- if(wholeMatcher.find()) {
- d = new Object[regEx.length>>1];
-
- int group=0, j;
-
- for(int i=0; i<regEx.length; i++) {
- for(j=0; j<regEx[i].length(); j++)
- if(regEx[i].charAt(j) == ')')
- group++;
-
- if((i&1)==0)
- d[i>>1] = wholeMatcher.group(group);
- }
- s.delete(wholeMatcher.start(), wholeMatcher.end());
- }
-
- return d;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/Sort.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/Sort.java
deleted file mode 100644
index eea8bd01f5..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/Sort.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-public final class Sort {
-
- /**
- * Performs quicksort on the supplied list.
- *
- * @param list The list to sort.
- * @param p Recursed value, initially top value.
- * @param r Recursed value, initially bottom value.
- */
- public static void quicksort(Object[] list, int p, int r) {
- if(null == list)
- return;
- else if (p < r) {
- int q = partition(list,p,r);
- if (q == r)
- q--;
-
- quicksort(list,p,q);
- quicksort(list,q+1,r);
- }
- }
-
- /**
- * Partitions the input list, used by Quiksort.
- *
- * @param list The list to partition.
- * @param p Recursed value, initially top value.
- * @param r Recursed value, initially bottom value.
- */
- @SuppressWarnings("unchecked")
- private static int partition (Object[] list, int p, int r) {
- Comparable pivot = (list[p] instanceof Comparable ? (Comparable)list[p] : list[p].toString());
- int lo = p;
- int hi = r;
-
- while (true) {
- while (getComparable(list[hi]).compareTo(pivot) >= 0 && lo < hi)
- hi--;
-
- while (getComparable(list[lo]).compareTo(pivot) < 0 && lo < hi)
- lo++;
-
- if (lo < hi) {
- Object T = list[lo];
- list[lo] = list[hi];
- list[hi] = T;
- } else
- return hi;
- }
- }
-
- @SuppressWarnings("unchecked")
- private static Comparable getComparable(Object o) {
- return (o instanceof Comparable
- ? (Comparable)o
- : o.toString());
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/StringFormatter.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/StringFormatter.java
deleted file mode 100644
index caab4c4ed6..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/StringFormatter.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-import java.text.DateFormat;
-import java.util.Date;
-
-
-public class StringFormatter implements IFormattingStyles {
- public StringFormatter() {
- format = IFormattingStyles.UNFORMATED;
- }
-
- public int getFormat() {
- return format;
- }
-
- public void setFormat(int format) {
- this.format = format;
- }
-
- /**
- * Potentially modifies a string value according to a certain format based on the current value
- * of format.
- *
- * @param s The string to potential modify.
- *
- * @return The modified string.
- */
- public String format(String s) {
- switch (format) {
- case STRING:
- return s;
- case DATE:
- return DateFormat.getDateTimeInstance().format(new Date(Long.parseLong(s)));
- case HEX:
- return "0x"+Long.toHexString(Long.parseLong(s));
- case OCTAL:
- return "0x"+Long.toOctalString(Long.parseLong(s));
- case BINARY:
- return "0x" + Long.toBinaryString(Long.parseLong(s));
- case DOUBLE:
- return "" + Double.parseDouble(s);
- }
- return s;
- }
-
- private int format;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/TreeDefinitionNode.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/TreeDefinitionNode.java
deleted file mode 100644
index f660f6867c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/TreeDefinitionNode.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-public class TreeDefinitionNode extends TreeNode {
- public TreeDefinitionNode(Object d, String disp, String def, boolean c) {
- super(d, disp, c);
- definition = def;
- }
-
- public String getDefinition() {
- return definition;
- }
-
- public void setDefinition(String d) {
- definition = d;
- }
-
- public void dispose() {
- super.dispose();
- definition = null;
- }
-
- private String definition;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/TreeNode.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/TreeNode.java
deleted file mode 100644
index c751516d60..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/TreeNode.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-import java.util.ArrayList;
-
-public class TreeNode {
- public TreeNode(Object d, boolean c) {
- children = new ArrayList<TreeNode>();
- data = d;
- clickable = c;
-
- if(null == data)
- display = null;
- else
- display = d.toString();
- }
-
- public TreeNode(Object d, String disp, boolean c) {
- children = new ArrayList<TreeNode>();
- data = d;
- display = disp;
- clickable = c;
- }
-
- public void add(TreeNode item) {
- children.add(item);
- }
-
- public void addAt(TreeNode item, int location) {
- children.add(Math.min(children.size(), location), item);
- }
-
- public int getChildCount() {
- return children.size();
- }
-
- public TreeNode getChildAt(int i){
- if(children.size() > i)
- return (TreeNode)children.get(i);
- else
- return null;
- }
-
- public Object getData() {
- return data;
- }
-
- public boolean isClickable() {
- return clickable;
- }
-
- public boolean remove(int i) {
- if(children.size() > i)
- return(null != children.remove(i));
- else
- return false;
- }
-
- public boolean removeAll() {
- for(int i=children.size()-1; i>=0; i--) {
- this.remove(i);
- }
- return true;
- }
-
- public void setData(Object d) {
- data = d;
- }
-
- public void setDisplay(String disp) {
- display = disp;
- }
-
- /**
- * Restructures the tree so that probes are grouped by type and
- * functions are sorted alphabetically.
- */
- public void sortTree() {
- TreeNode temp = null;
-
- sortLevel();
- for(int i=0; i<this.getChildCount(); i++) {
- temp = this.getChildAt(i);
-
- temp.sortTree();
- }
- }
-
- /**
- * Performs quicksort on the level.
- */
- public void sortLevel() {
- int j;
-
- Object children[] = this.children.toArray();
- this.removeAll();
- Sort.quicksort(children, 0, children.length-1);
-
- for(j=0; j<children.length; j++)
- this.add((TreeNode)children[j]);
- }
-
- public String toString() {
- return display;
- }
-
- public void dispose() {
- if(null != children)
- for(int i=children.size()-1; i>=0; i--)
- ((TreeNode)children.get(i)).dispose();
- children = null;
- data = null;
- display = null;
- }
-
- private ArrayList<TreeNode> children;
- private Object data;
- private String display;
- private boolean clickable;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/UpdateManager.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/UpdateManager.java
deleted file mode 100644
index f9adbb5a1a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/UpdateManager.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-import java.util.ArrayList;
-import java.util.Timer;
-import java.util.TimerTask;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.listeners.IUpdateListener;
-
-
-
-public class UpdateManager {
- public UpdateManager(int delay) {
- updateListeners = new ArrayList<IUpdateListener>();
- stopped = false;
- disposed = false;
- timer = new Timer("Update Manager", true);
- timer.scheduleAtFixedRate(new Notify(), delay, delay);
- }
-
- /**
- * Terminates the timer and removes all update listeners.
- */
- public void stop() {
- if(!stopped) {
- stopped = true;
- timer.cancel();
- for(int i=0; i<updateListeners.size(); i++)
- removeUpdateListener((IUpdateListener)updateListeners.get(i));
- }
- }
-
- public void addUpdateListener(IUpdateListener l) {
- if(!updateListeners.contains(l))
- updateListeners.add(l);
- }
- public void removeUpdateListener(IUpdateListener l) {
- if(updateListeners.contains(l))
- updateListeners.remove(l);
- }
-
- public boolean isRunning() {
- return !stopped;
- }
-
- public void dispose() {
- if(!disposed) {
- disposed = true;
- stop();
- timer = null;
- updateListeners = null;
- }
- }
-
- /**
- * Handle any events that are timed to occur.
- */
- private class Notify extends TimerTask {
- public void run() {
- try{
- if(!stopped) {
- for(int i = 0; i < updateListeners.size(); i++)
- ((IUpdateListener)(updateListeners.get(i))).handleUpdateEvent();
- }
- }catch(Exception e) {;}
- }
-
- }
-
- private Timer timer;
- private ArrayList<IUpdateListener> updateListeners;
- private boolean stopped;
- private boolean disposed;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/ZipArchive.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/ZipArchive.java
deleted file mode 100644
index 09ee1544a3..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/ZipArchive.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures;
-
-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.util.Enumeration;
-import java.util.zip.GZIPInputStream;
-import java.util.zip.GZIPOutputStream;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-import java.util.zip.ZipOutputStream;
-
-public final class ZipArchive {
-
- /**
- * Zips files.
- *
- * @param zipFileName The name of the zipped file you wish to make.
- * @param files The collection of files to zip.
- * @param names The names of the files you wish to zip.
- */
- public static void zipFiles(String zipFileName, String[] files, String[] names) {
- try {
- ZipOutputStream out = new ZipOutputStream(new FileOutputStream(zipFileName));
-
- for (int i=0; i<files.length; i++) {
- FileInputStream in = new FileInputStream(files[i]);
-
- out.putNextEntry(new ZipEntry(names[i]));
-
- transferData(in, out);
-
- out.closeEntry();
- in.close();
- }
-
- out.close();
- } catch (IOException e) {}
- }
-
- /**
- * Unzips files.
- *
- * @param zipFileName The name of the file you wish to unzip.
- * @param destination The location you wish to unzip files to.
- */
- public static void unzipFiles(String zipFileName, String destination) {
- try {
- ZipFile zf = new ZipFile(zipFileName);
-
- for (Enumeration<?> entries = zf.entries(); entries.hasMoreElements();) {
- ZipEntry zipEntry = (ZipEntry)entries.nextElement();
- String zipEntryName = zipEntry.getName();
-
- int lastDirSep;
- if ( (lastDirSep = zipEntryName.lastIndexOf('/')) > 0 ) {
- String dirName = zipEntryName.substring(0, lastDirSep);
- (new File(dirName)).mkdirs();
- }
-
- if (!zipEntryName.endsWith("/")) {
- OutputStream out = new FileOutputStream(destination + zipEntryName);
- InputStream in = zf.getInputStream(zipEntry);
-
- transferData(in, out);
-
- out.close();
- in.close();
- }
- }
- } catch (IOException e) {}
- }
-
- /**
- * Compresses files.
- *
- * @param outFileName The new compressed file you wish to create.
- * @param inFileName The file you wish to compress.
- */
- public static void compressFile(String outFileName, String inFileName) {
- try {
- GZIPOutputStream out = new GZIPOutputStream(new FileOutputStream(outFileName));
- FileInputStream in = new FileInputStream(inFileName);
-
- transferData(in, out);
-
- in.close();
- out.finish();
- out.close();
- } catch (IOException ioe) {}
- }
-
- /**
- * Uncompresses files.
- *
- * @param outFileName The new uncompressed file you wish to create.
- * @param inFileName The file you wish to uncompress.
- */
- public static void uncompressFile(String outFileName, String inFileName) {
- try {
- GZIPInputStream in = new GZIPInputStream(new FileInputStream(inFileName));
- FileOutputStream out = new FileOutputStream(outFileName);
-
- transferData(in, out);
-
- in.close();
- out.close();
- } catch (IOException e) {}
- }
-
- /**
- * Transfers data from one stream to another.
- *
- * @param in The source stream.
- * @param out The export stream.
- */
- private static void transferData(InputStream in, OutputStream out) {
- try {
- byte[] buf = new byte[BUFFER_SIZE];
- int len;
- while((len = in.read(buf)) > 0)
- out.write(buf, 0, len);
- } catch (IOException e) {}
- }
-
- private static final int BUFFER_SIZE = 1024;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/internal/Localization.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/internal/Localization.java
deleted file mode 100644
index 3cc5bc87ff..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/internal/Localization.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.structures.internal;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Localization {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.systemtap.ui.structures.internal.localization";
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- private Localization() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/internal/StructuresPlugin.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/internal/StructuresPlugin.java
deleted file mode 100644
index bca379c781..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/internal/StructuresPlugin.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures.internal;
-
-import org.eclipse.ui.plugin.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class StructuresPlugin extends AbstractUIPlugin {
-
- //The shared instance.
- private static StructuresPlugin plugin;
-
- /**
- * The constructor.
- */
- public StructuresPlugin() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static StructuresPlugin 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 AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.linuxtools.systemtap.ui.structures", path);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/internal/localization.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/internal/localization.properties
deleted file mode 100644
index f5c5f1fd7f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/internal/localization.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-IFormattingStyles.Unformatted=Unformatted
-IFormattingStyles.String=String
-IFormattingStyles.Date=Date
-IFormattingStyles.Double=Double
-IFormattingStyles.Hex=Hex
-IFormattingStyles.Octal=Octal
-IFormattingStyles.Binary=Binary
-Command.Password=Password:
-PasswordDialog.Password=Password
-PasswordDialog.SUDOPassword=SUDO Password:
-PasswordDialog.SavePassword=Save password?
-NumberValidator.NotNull=Can't be null
-NumberValidator.NaN=NAN
-ConditionalExpressionValidator.NotNull=Can't be null
-ConditionalExpressionValidator.StartWithIf=Must start with 'if'
-ConditionalExpressionValidator.MustContain=Must contain '('
-ConditionalExpressionValidator.MustEndWith=Must end with ')'
-ConditionalExpressionValidator.MustEnterSomething=Must enter something in the expression
-DirectoryValidator.NotNull=Can't be null
-DirectoryValidator.LongerFile=Must be a longer folder name
-DirectoryValidator.MustEndWith=Must end with '/'
-DirectoryValidator.CanNotContain=Can not contain '//'
-IntegerValidator.NaN=NAN
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/listeners/IActionListener.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/listeners/IActionListener.java
deleted file mode 100644
index 6c1a51862e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/listeners/IActionListener.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures.listeners;
-
-public interface IActionListener {
- public void handleActionEvent();
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/listeners/IGobblerListener.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/listeners/IGobblerListener.java
deleted file mode 100644
index a0533d4a24..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/listeners/IGobblerListener.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures.listeners;
-
-public interface IGobblerListener {
-
- /**
- * called by streamgobbler when new data is present
- *
- */
- public void handleDataEvent(String line);
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/listeners/ITabListener.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/listeners/ITabListener.java
deleted file mode 100644
index 019ca969f4..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/listeners/ITabListener.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures.listeners;
-
-public interface ITabListener {
- public void tabOpened();
- public void tabClosed();
- public void tabChanged();
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/listeners/IUpdateListener.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/listeners/IUpdateListener.java
deleted file mode 100644
index ef99c082f0..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/listeners/IUpdateListener.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures.listeners;
-
-public interface IUpdateListener {
- abstract void handleUpdateEvent();
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/Command.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/Command.java
deleted file mode 100644
index f8423a0ed0..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/Command.java
+++ /dev/null
@@ -1,279 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures.runnable;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.IPasswordPrompt;
-import org.eclipse.linuxtools.systemtap.ui.structures.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.structures.listeners.IGobblerListener;
-
-
-
-/**
- * A class to spawn a separate thread to run a <code>Process</code>.
- * @author Ryan Morse
- */
-public class Command implements Runnable {
- /*
- * Bug in the exec command prevents using a single string. Forced
- * to use a workaround in order to run commands with spaces.
- *
- * http://bugs.sun.com/bugdatabase/view_bug.do;:WuuT?bug_id=4365120
- * http://bugs.sun.com/bugdatabase/view_bug.do;:WuuT?bug_id=4109888
- */
-
- /**
- * Spawns the new thread that this class will run in. From the Runnable
- * interface spawning the new thread automatically calls the run() method.
- * This must be called by the implementing class in order to start the
- * StreamGobbler.
- * @param cmd The entire command to run
- * @param envVars List of all environment variables to use
- * @param prompt The password promt for allowing the user to enter their password.
- * @param monitorDelay The time in MS to wait between checking whether the <code>Process</code> has finished.
- */
- public Command(String[] cmd, String[] envVars, IPasswordPrompt prompt, int monitorDelay) {
- this.cmd = cmd;
- this.envVars = envVars;
- this.prompt = prompt;
- this.monitorDelay = monitorDelay;
- }
-
- /**
- * Spawns the new thread that this class will run in. From the Runnable
- * interface spawning the new thread automatically calls the run() method.
- * This must be called by the implementing class in order to start the
- * StreamGobbler.
- * @param cmd The entire command to run
- * @param envVars List of all environment variables to use
- * @param prompt The password promt for allowing the user to enter their password.
- */
- public Command(String[] cmd, String[] envVars, IPasswordPrompt prompt) {
- this(cmd, envVars, prompt, 100);
- }
-
- /**
- * Starts the <code>Thread</code> that the new <code>Process</code> will run in.
- * This must be called in order to get the process to start running.
- */
- public void start() {
- if(init()) {
- Thread t = new Thread(this, cmd[0]);
- t.start();
- } else {
- stop();
- returnVal = Integer.MIN_VALUE;
- }
- }
-
- /**
- * Starts up the process that will execute the provided command and registers
- * the <code>StreamGobblers</code> with their respective streams.
- */
- protected boolean init() {
- try {
- process = Runtime.getRuntime().exec(cmd, envVars);
-
- errorGobbler = new StreamGobbler(process.getErrorStream());
- inputGobbler = new StreamGobbler(process.getInputStream());
-
- int i;
- for(i=0; i<inputListeners.size(); i++)
- inputGobbler.addDataListener(inputListeners.get(i));
- for(i=0; i<errorListeners.size(); i++)
- errorGobbler.addDataListener(errorListeners.get(i));
- return true;
- } catch(IOException ioe) {}
- return false;
- }
-
- /**
- * This method handles checking the status of the running <code>Process</code>. It
- * is called when the new Thread is created, and thus should never be called by
- * any implementing program. To run call the <code>start</code> method.
- */
- public void run() {
- errorGobbler.start();
- inputGobbler.start();
-
- try {
- while(!stopped) {
- try {
- if(null != errorGobbler && errorGobbler.readLine().endsWith(Localization.getString("Command.Password"))) {
- PrintWriter writer = new PrintWriter(process.getOutputStream(), true);
- writer.println(prompt.getPassword());
- }
-
- returnVal = process.exitValue(); //Dont care what the value is, just whether it throws an exception
- stop(); //Above line will throw an exception if not finished
- } catch(IllegalThreadStateException itse) {}
-
- if(0 < monitorDelay)
- Thread.sleep(monitorDelay);
- }
- } catch(InterruptedException ie) {
- } catch(NullPointerException npe) {}
- }
-
- /**
- * Stops the process from running and stops the <code>StreamGobblers</code> from monitering
- * the dead process.
- */
- public synchronized void stop() {
- if(!stopped) {
- stopped = true;
- if(null != errorGobbler)
- errorGobbler.stop();
- if(null != inputGobbler)
- inputGobbler.stop();
- if(null != process)
- process.destroy();
- }
- }
-
- /**
- * Method to check whether or not the process in running.
- * @return The execution status.
- */
- public boolean isRunning() {
- return !stopped;
- }
-
- /**
- * Method to check if this class has already been disposed.
- * @return Status of the class.
- */
- public boolean isDisposed() {
- return disposed;
- }
-
- /**
- * The return value of the process.
- * 2^231-1 if the process is still running.
- * -2^231 if there was an error creating the process
- * @return The return value generated from running the provided command.
- */
- public int getReturnValue() {
- return returnVal;
- }
-
- /**
- * Registers the provided <code>IGobblerListener</code> with the InputStream
- * @param listener A listener to monitor the InputStream from the Process
- */
- public void addInputStreamListener(IGobblerListener listener) {
- if(null != inputGobbler)
- inputGobbler.addDataListener(listener);
- else
- inputListeners.add(listener);
- }
-
- /**
- * Registers the provided <code>IGobblerListener</code> with the ErrorStream
- * @param listener A listener to monitor the ErrorStream from the Process
- */
- public void addErrorStreamListener(IGobblerListener listener) {
- if(null != errorGobbler)
- errorGobbler.addDataListener(listener);
- else
- errorListeners.add(listener);
- }
-
- /**
- * Returns the list of everything that is listening the the InputStream
- * @return List of all <code>IGobblerListeners</code> that are monitoring the stream.
- */
-
- public ArrayList<IGobblerListener> getInputStreamListeners() {
- if(null != inputGobbler)
- return inputListeners;
- else {
- ArrayList<IGobblerListener> dataListeners = inputGobbler.getDataListeners();
- return dataListeners;
- }
- }
-
- /**
- * Returns the list of everything that is listening the the ErrorStream
- * @return List of all <code>IGobblerListeners</code> that are monitoring the stream.
- */
-
- public ArrayList<IGobblerListener> getErrorStreamListeners() {
- if(null != errorGobbler)
- return errorListeners;
- else
- return errorGobbler.getDataListeners();
- }
-
- /**
- * Removes the provided listener from those monitoring the InputStream.
- * @param listener An </code>IGobblerListener</code> that is monitoring the stream.
- */
- public void removeInputStreamListener(IGobblerListener listener) {
- if(null != inputGobbler)
- inputGobbler.removeDataListener(listener);
- else
- inputListeners.remove(listener);
- }
-
- /**
- * Removes the provided listener from those monitoring the ErrorStream.
- * @param listener An </code>IGobblerListener</code> that is monitoring the stream.
- */
- public void removeErrorStreamListener(IGobblerListener listener) {
- if(null != errorGobbler)
- errorGobbler.removeDataListener(listener);
- else
- errorListeners.remove(listener);
- }
-
- /**
- * Disposes of all internal components of this class. Nothing in the class should be
- * referenced after this is called.
- */
- public void dispose() {
- if(!disposed) {
- stop();
- disposed = true;
- inputListeners = null;
- errorListeners = null;
-
- if(null != inputGobbler)
- inputGobbler.dispose();
- inputGobbler = null;
-
- if(null != errorGobbler)
- errorGobbler.dispose();
- errorGobbler = null;
- }
- }
-
- private boolean stopped = false;
- private boolean disposed = false;
- private StreamGobbler inputGobbler = null;
- private StreamGobbler errorGobbler = null;
- private ArrayList<IGobblerListener> inputListeners = new ArrayList<IGobblerListener>(); //Only used to allow adding listeners before creating the StreamGobbler
- private ArrayList<IGobblerListener> errorListeners = new ArrayList<IGobblerListener>(); //Only used to allow adding listeners before creating the StreamGobbler
- private int returnVal = Integer.MAX_VALUE;
-
- private String[] cmd;
- private String[] envVars;
- private IPasswordPrompt prompt;
- private int monitorDelay;
- protected Process process;
-
- public static final int ERROR_STREAM = 0;
- public static final int INPUT_STREAM = 1;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/LoggedCommand.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/LoggedCommand.java
deleted file mode 100644
index d9e918a881..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/LoggedCommand.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures.runnable;
-
-import java.io.File;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.IPasswordPrompt;
-import org.eclipse.linuxtools.systemtap.ui.structures.LoggingStreamDaemon;
-
-
-
-/**
- * A class to spawn a separate thread to run a <code>Process</code> and to automatically
- * log everything using the <code>LoggingStreamDaemon</code>.
- * @author Ryan Morse
- */
-public class LoggedCommand extends Command {
- /**
- * Spawns the new thread that this class will run in. From the Runnable
- * interface spawning the new thread automatically calls the run() method.
- * This must be called by the implementing class in order to start the
- * StreamGobbler.
- * @param cmd The entire command to run
- * @param envVars List of all environment variables to use
- * @param prompt The password promt for allowing the user to enter their password.
- */
- public LoggedCommand(String[] cmd, String[] envVars, IPasswordPrompt prompt) {
- super(cmd, envVars, prompt, 0);
- }
-
- /**
- * Spawns the new thread that this class will run in. From the Runnable
- * interface spawning the new thread automatically calls the run() method.
- * This must be called by the implementing class in order to start the
- * StreamGobbler.
- * @param cmd The entire command to run
- * @param envVars List of all environment variables to use
- * @param prompt The password promt for allowing the user to enter their password.
- * @param monitorDelay the time between checking to see if the process finished
- */
- public LoggedCommand(String[] cmd, String[] envVars, IPasswordPrompt prompt, int monitorDelay) {
- super(cmd, envVars, prompt, monitorDelay);
- logger = new LoggingStreamDaemon();
- addInputStreamListener(logger);
- }
-
- /**
- * Gets all of the output from the input stream.
- * @return String containing the entire output from the input stream.
- */
- public String getOutput() {
- if(!isDisposed())
- return logger.getOutput();
- else
- return null;
- }
-
- /**
- * Saves the input stream data to a premanent file. Any new data on the
- * stream will automatically be saved to the file.
- * @param file The file to save the InputStream to.
- */
- public boolean saveLog(File file) {
- return logger.saveLog(file);
- }
-
- /**
- * Stops the process from running and unregisters the StreamListener
- */
- public synchronized void stop() {
- if(isRunning()) {
- super.stop();
- removeInputStreamListener(logger);
- }
- }
-
- /**
- * Dispoes of all internal references in this class. Nothing should be called
- * after dispose.
- */
- public void dispose() {
- if(!isDisposed()) {
- super.dispose(); //Do this first to ensure logger reads everything possible
- logger.dispose();
- }
- }
-
- private LoggingStreamDaemon logger;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/StreamGobbler.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/StreamGobbler.java
deleted file mode 100644
index 91a9034588..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/StreamGobbler.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures.runnable;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.systemtap.ui.structures.listeners.IGobblerListener;
-
-
-
-/**
- * A separate thread to listen to an InputStream and pull all the data
- * out of it. When data is found a new event is fired share the data with
- * any <code>IDataListener</code> that is listening.
- * @author Ryan Morse
- */
-public class StreamGobbler implements Runnable {
- public StreamGobbler(InputStream is) {
- if(null != is) {
- this.is = is;
- line = new StringBuilder();
- listeners = new ArrayList<IGobblerListener>();
- }
- locked = false;
- }
-
- /**
- * Spawns the new thread that this class will run in. From the Runnable
- * interface spawning the new thread automatically calls the run() method.
- * This must be called by the implementing class in order to start the
- * StreamGobbler.
- */
- //Make sure to call this method to start the StreamGobbler
- public void start() {
- t = new Thread(this, "StreamGobbler");
- t.start();
- }
-
- /**
- * Checks to see if the gobbler is still running.
- * @return boolean representing whether or not it is sill running
- */
- public boolean isRunning() {
- return (null != t);
- }
-
- /**
- * The main method of this class. It monitors the provided thread to see
- * when new data is available and then appends it to its current list of
- * data. When a new line is read it will fire a DataEvent for listeners
- * to get ahold of the data.
- */
- public void run() {
- Thread thisThread = Thread.currentThread();
- try {
- int val=-1;
-
- while(t == thisThread) {
- while(0 < is.available()) {
- if(-1 == (val = is.read()))
- this.stop();
- else
- line.append((char)val);
- if ('\n' == val)
- this.fireNewDataEvent();
-
- }
- try {
- Thread.sleep(10);
- } catch(InterruptedException ie) {}
- }
- } catch (IOException ioe) {} //If stream closed before thread shuts down
- }
-
- /**
- * Stops the gobbler from monitering the stream, and fires one last data event
- * to make sure that listeners have the entire contents of what was read in
- * from the stream.
- */
- public synchronized void stop() {
- try { //Make sure we don't stop while there is still data in the stream
- while(0 != is.available()) {
- Thread.sleep(10);
- }
- } catch(Exception e) {}
- t = null;
- notify();
- //Fire one last time to ensure listeners have gotten everything.
- this.fireNewDataEvent();
- }
-
- /**
- * Method for getting the most recently read line from the stream.
- * @return String representing the current line being read from the
- * <code>InputStream</code>
- */
- public String readLine() {
- return line.toString();
- }
-
- /**
- * Gets rid of all internal references to objects.
- */
- public void dispose() {
- if(isRunning())
- stop();
- line = null;
- t = null;
- is = null;
- }
-
- /**
- * Fires new events to everything that is monitering this stream. Then clears
- * the current line of data.
- */
- private void fireNewDataEvent() {
- //Implement our own lock since using synchronized causes a deadlock here
- /* while(locked) {
- try {
- wait(10);
- } catch(Exception e) {}
- }
- locked = true;*/
- for(int i = 0; i < listeners.size(); i++)
- {
-
- ((IGobblerListener)(listeners.get(i))).handleDataEvent(line.toString());
- }
- line.delete(0, line.length());
- locked = false;
- }
-
- public void fireNewDataEvent(String l) {
- //Implement our own lock since using synchronized causes a deadlock here
- /* while(locked) {
- try {
- wait(10);
- } catch(Exception e) {}
- }
- locked = true;*/
- for(int i = 0; i < listeners.size(); i++)
- {
- ((IGobblerListener)(listeners.get(i))).handleDataEvent(l);
- }
-// line.delete(0, line.length());
- locked = false;
- }
-
- /**
- * Registers the provided listener to get data events.
- * @param l A listener that needs to moniter the stream.
- */
- public void addDataListener(IGobblerListener l) {
-
- if(!listeners.contains(l))
- {
-
- listeners.add(l);
-
- }
-
- }
-
- /**
- * Unregisters the provied listener from getting new data events.
- * @param l A listener that is monitering the stream and should be removed
- */
- public void removeDataListener(IGobblerListener l) {
-
- if(listeners.contains(l))
- listeners.remove(l);
- }
-
- /**
- * Returns a list of all of the <code>IGobblerListeners</code> that
- * are lstening for data events.
- * @return ArrayList of all of the listeners registered.
- */
- public ArrayList<IGobblerListener> getDataListeners() {
- return listeners;
- }
-
- private ArrayList<IGobblerListener> listeners;
- private StringBuilder line;
- private Thread t;
- private InputStream is;
-
- @SuppressWarnings("unused")
- private boolean locked;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/ui/ComboFieldEditor.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/ui/ComboFieldEditor.java
deleted file mode 100644
index 7bf9afdc0e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/ui/ComboFieldEditor.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures.ui;
-
-import org.eclipse.jface.preference.FieldEditor;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * A field editor for a combo box that allows the drop-down selection of one of a list of items.
- */
-public class ComboFieldEditor extends FieldEditor {
-
- /**
- * The <code>Combo</code> widget.
- */
- private Combo fCombo;
-
- /**
- * The value (not the name) of the currently selected item in the Combo widget.
- */
- private String fValue;
-
- /**
- * The names (labels) and underlying values to populate the combo widget. These should be
- * arranged as: { {name1, value1}, {name2, value2}, ...}
- */
- private String[][] fEntryNamesAndValues;
-
- public ComboFieldEditor(String name, String labelText, String[][] entryNamesAndValues, Composite parent) {
- init(name, labelText);
- Assert.isTrue(checkArray(entryNamesAndValues));
- fEntryNamesAndValues = entryNamesAndValues;
- createControl(parent);
- }
-
- /**
- * Checks whether given <code>String[][]</code> is of "type"
- * <code>String[][2]</code>.
- *
- * @return <code>true</code> if it is ok, and <code>false</code> otherwise
- */
- private boolean checkArray(String[][] table) {
- if (table == null) {
- return false;
- }
- for (int i = 0; i < table.length; i++) {
- String[] array = table[i];
- if (array == null || array.length != 2) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * @see FieldEditor#adjustForNumColumns(int)
- */
- protected void adjustForNumColumns(int numColumns) {
- if (numColumns > 1) {
- Control control = getLabelControl();
- int left = numColumns;
- if (control != null) {
- ((GridData)control.getLayoutData()).horizontalSpan = 1;
- left = left - 1;
- }
- ((GridData)fCombo.getLayoutData()).horizontalSpan = left;
- } else {
- Control control = getLabelControl();
- if (control != null) {
- ((GridData)control.getLayoutData()).horizontalSpan = 1;
- }
- ((GridData)fCombo.getLayoutData()).horizontalSpan = 1;
- }
- }
-
- /**
- * @see FieldEditor#doFillIntoGrid(Composite, int)
- */
- protected void doFillIntoGrid(Composite parent, int numColumns) {
- int comboC = 1;
- if (numColumns > 1) {
- comboC = numColumns - 1;
- }
- Control control = getLabelControl(parent);
- GridData gd = new GridData();
- gd.horizontalSpan = 1;
- control.setLayoutData(gd);
- control = getComboBoxControl(parent);
- gd = new GridData();
- gd.horizontalSpan = comboC;
- gd.horizontalAlignment = GridData.FILL;
- control.setLayoutData(gd);
- control.setFont(parent.getFont());
- }
-
- /**
- * @see FieldEditor#doLoad()
- */
- protected void doLoad() {
- updateComboForValue(getPreferenceStore().getString(getPreferenceName()));
- }
-
- /**
- * @see FieldEditor#doLoadDefault()
- */
- protected void doLoadDefault() {
- updateComboForValue(getPreferenceStore().getDefaultString(getPreferenceName()));
- }
-
- /**
- * @see FieldEditor#doStore()
- */
- protected void doStore() {
- if (fValue == null) {
- getPreferenceStore().setToDefault(getPreferenceName());
- return;
- }
-
- getPreferenceStore().setValue(getPreferenceName(), fValue);
- }
-
- /**
- * @see FieldEditor#getNumberOfControls()
- */
- public int getNumberOfControls() {
- return 1;
- }
-
- /**
- * Lazily create and return the Combo control.
- */
- public Combo getComboBoxControl(Composite parent) {
- if (fCombo == null) {
- fCombo = new Combo(parent, SWT.READ_ONLY);
- fCombo.setFont(parent.getFont());
- for (int i = 0; i < fEntryNamesAndValues.length; i++) {
- fCombo.add(fEntryNamesAndValues[i][0], i);
- }
-
- fCombo.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent evt) {
- String oldValue = fValue;
- String name = fCombo.getText();
- fValue = getValueForName(name);
- setPresentsDefaultValue(false);
- fireValueChanged(VALUE, oldValue, fValue);
- }
- });
- }
- return fCombo;
- }
-
- /**
- * Given the name (label) of an entry, return the corresponding value.
- */
- protected String getValueForName(String name) {
- for (int i = 0; i < fEntryNamesAndValues.length; i++) {
- String[] entry = fEntryNamesAndValues[i];
- if (name.equals(entry[0])) {
- return entry[1];
- }
- }
- return fEntryNamesAndValues[0][0];
- }
-
- /**
- * Set the name in the combo widget to match the specified value.
- */
- protected void updateComboForValue(String value) {
- fValue = value;
- for (int i = 0; i < fEntryNamesAndValues.length; i++) {
- if (value.equals(fEntryNamesAndValues[i][1])) {
- fCombo.setText(fEntryNamesAndValues[i][0]);
- return;
- }
- }
- if (fEntryNamesAndValues.length > 0) {
- fValue = fEntryNamesAndValues[0][1];
- }
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/ui/ListEditor.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/ui/ListEditor.java
deleted file mode 100644
index 35a27dd93e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/ui/ListEditor.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures.ui;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.StringTokenizer;
-
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.swt.widgets.Composite;
-
-public class ListEditor extends org.eclipse.jface.preference.ListEditor {
- public ListEditor(String name, String labelText, String dialogText, String initialVal, IInputValidator validator, Composite parent) {
- init(name, labelText);
- dialogTitle = dialogText;
- this.initialVal = initialVal;
- this.validator = validator;
- createControl(parent);
- }
-
- /**
- * Creates and populates a StringBuffer with the supplied items.
- *
- * @param items An array of strings to make the StringBuffer with.
- *
- * @return Returns the StringBuffer.
- */
- protected String createList(String[] items) {
- StringBuffer path = new StringBuffer("");
-
- for (int i = 0; i < items.length; i++) {
- path.append(items[i]);
- path.append(File.pathSeparator);
- }
- return path.toString();
- }
-
- protected String getNewInputObject() {
- InputDialog dialog = new InputDialog(getShell(), dialogTitle, null, initialVal, validator);
- dialog.open();
-
- return dialog.getValue();
- }
-
- /**
- * Parses the passed in string into an array of strings.
- *
- * @param stringList The string to pass parse.
- *
- * @return Returns the array of strings.
- */
- protected String[] parseString(String stringList) {
- StringTokenizer st = new StringTokenizer(stringList, File.pathSeparator + "\n\r");
- ArrayList<Object> v = new ArrayList<Object>();
- while (st.hasMoreElements()) {
- v.add(st.nextElement());
- }
- return (String[]) v.toArray(new String[v.size()]);
- }
-
- private String dialogTitle;
- private String initialVal;
- private IInputValidator validator;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/ui/PasswordDialog.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/ui/PasswordDialog.java
deleted file mode 100644
index b829d42478..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/ui/PasswordDialog.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures.ui;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.linuxtools.systemtap.ui.structures.internal.Localization;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-
-
-public class PasswordDialog extends Dialog {
- public PasswordDialog(Shell parentShell) {
- super(parentShell);
- }
-
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- shell.setText(Localization.getString("PasswordDialog.Password"));
- shell.setSize(275, 150);
- }
-
- /**
- * Creates the dialog that requests SUDO password from the user.
- *
- * @param parent The parent composite object.
- *
- * @return The dialogue composite.
- */
- protected Control createDialogArea(Composite parent) {
- Composite comp = new Composite(parent, SWT.NONE);
-
- Label lblPassword = new Label(comp, SWT.RIGHT);
- lblPassword.setText(Localization.getString("PasswordDialog.SUDOPassword"));
- lblPassword.setBounds(5, 15, 110, 20);
-
- txtPassword = new Text(comp, SWT.SINGLE | SWT.PASSWORD);
- txtPassword.setBounds(115, 15, 150, 20);
-
- chkSavePassword = new Button(comp, SWT.CHECK);
- chkSavePassword.setText(Localization.getString("PasswordDialog.SavePassword"));
- chkSavePassword.setBackground(comp.getBackground());
- chkSavePassword.setBounds(5, 45, 200, 20);
-
- return comp;
- }
-
- /**
- * Retrieves and stores the password.
- *
- * @param buttonId ID of the button that the user clicks.
- */
- protected void buttonPressed(int buttonId) {
- if(0 == buttonId)
- password = txtPassword.getText();
- else
- password = null;
-
- passwordSaved = chkSavePassword.getSelection();
-
- super.buttonPressed(buttonId);
- }
-
- public String getPassword() {
- return password;
- }
-
- public boolean getPasswordSaved() {
- return passwordSaved;
- }
-
- public void dispose() {
- password = null;
- txtPassword.dispose();
- }
-
- private Text txtPassword;
- private String password;
- private Button chkSavePassword;
- private boolean passwordSaved;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/ConditionalExpressionValidator.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/ConditionalExpressionValidator.java
deleted file mode 100644
index 42e40d360c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/ConditionalExpressionValidator.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures.validators;
-
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.linuxtools.systemtap.ui.structures.internal.Localization;
-
-
-
-public class ConditionalExpressionValidator implements IInputValidator {
-
- /**
- * Determines whether or not the string is valid within the contraints.
- *
- * @param s The string to check.
- *
- * @return The return message.
- */
- public String isValid(String s) {
- if(null == s)
- return Localization.getString("ConditionalExpressionValidator.NotNull");
- if(!s.startsWith("if"))
- return Localization.getString("ConditionalExpressionValidator.StartWithIf");
- if(!s.contains("("))
- return Localization.getString("ConditionalExpressionValidator.MustContain");
- if(!s.endsWith(")"))
- return Localization.getString("ConditionalExpressionValidator.MustEndWith");
- if(s.length() < 5)
- return Localization.getString("ConditionalExpressionValidator.MustEnterSomething");
- return null;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/DirectoryValidator.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/DirectoryValidator.java
deleted file mode 100644
index 9e34f433ea..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/DirectoryValidator.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures.validators;
-
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.linuxtools.systemtap.ui.structures.internal.Localization;
-
-
-
-public class DirectoryValidator implements IInputValidator {
-
- /**
- * Determines whether or not the string is valid within the contraints.
- *
- * @param s The string to check.
- *
- * @return The return message.
- */
- public String isValid(String s) {
- if(null == s)
- return Localization.getString("DirectoryValidator.NotNull");
- if(s.length() < 1)
- return Localization.getString("DirectoryValidator.LongerFile");
- if(!s.endsWith("/"))
- return Localization.getString("DirectoryValidator.MustEndWith");
- if(s.contains("//"))
- return Localization.getString("DirectoryValidator.CanNotContain");
- return null;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/IntegerValidator.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/IntegerValidator.java
deleted file mode 100644
index dfe1e2b75f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/IntegerValidator.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures.validators;
-
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.linuxtools.systemtap.ui.structures.internal.Localization;
-
-
-
-public class IntegerValidator implements IInputValidator {
-
- /**
- * Determines whether or not the string is valid within the contraints.
- *
- * @param s The string to check.
- *
- * @return The return message.
- */
- public String isValid(String s) {
- try {
- Integer.parseInt(s);
- return null;
- } catch(NumberFormatException nfe) {
- return Localization.getString("IntegerValidator.NaN");
- }
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/MultiValidator.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/MultiValidator.java
deleted file mode 100644
index 39342b053c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/MultiValidator.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures.validators;
-
-import java.util.ArrayList;
-
-import org.eclipse.jface.dialogs.IInputValidator;
-
-public class MultiValidator implements IInputValidator {
- public void addValidator(IInputValidator validator) {
- validators.add(validator);
- }
-
-
- /**
- * Determines whether or not the string is valid within the contraints.
- *
- * @param s The string to check.
- *
- * @return The return message.
- */
- public String isValid(String s) {
- String message = null;
- for(int i=0; i<validators.size(); i++) {
- message = ((IInputValidator)validators.get(i)).isValid(s);
- if(null != message)
- return message;
- }
- return null;
- }
-
- ArrayList<IInputValidator> validators = new ArrayList<IInputValidator>();
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/NumberValidator.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/NumberValidator.java
deleted file mode 100644
index 6875a01b78..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/validators/NumberValidator.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.structures.validators;
-
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.linuxtools.systemtap.ui.structures.internal.Localization;
-
-
-
-public class NumberValidator implements IInputValidator {
-
- /**
- * Determines whether or not the string is valid within the contraints.
- *
- * @param s The string to check.
- *
- * @return The return message.
- */
- public String isValid(String s) {
- if(null == s)
- return Localization.getString("NumberValidator.NotNull");
- try {
- Double.parseDouble(s);
- return null;
- } catch(NumberFormatException nfe) {
- return Localization.getString("NumberValidator.NaN");
- }
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/.classpath
deleted file mode 100644
index 64c5e31b7a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/.project b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/.project
deleted file mode 100644
index 4be8264f57..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.ui.systemtapgui</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/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/.settings/org.eclipse.jdt.core.prefs b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index fa96056aad..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,65 +0,0 @@
-#Fri Feb 06 21:16:21 IST 2009
-eclipse.preferences.version=1
-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.deprecation=ignore
-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=ignore
-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=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-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=ignore
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-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=ignore
-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=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-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/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/ChangeLog
deleted file mode 100644
index 9ab891126f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/ChangeLog
+++ /dev/null
@@ -1,16 +0,0 @@
-2009-11-16 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Fix Bundle-Name.
-
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Make version 0.3.0.qualifier.
-
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * META-INF/MANIFEST.MF: Change provider from IBM to Eclipse.
-
-2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * ChangeLog: Refactoring. Renaming all packages directories from *.systemtapgui.* to *.systemtap.ui.*
- \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/META-INF/MANIFEST.MF
deleted file mode 100644
index 8f7200fcb3..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,20 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: SystemTapGUI Plug-in (Incubation)
-Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.systemtapgui;singleton:=true
-Bundle-Version: 0.3.0.qualifier
-Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.systemtapgui.internal.SystemTapGUIPlugin
-Bundle-Vendor: Eclipse
-Bundle-Localization: plugin
-Export-Package: org.eclipse.linuxtools.systemtap.ui.systemtapgui,
- org.eclipse.linuxtools.systemtap.ui.systemtapgui.preferences
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.linuxtools.systemtap.ui.logging,
- org.eclipse.help,
- org.eclipse.help.appserver,
- org.eclipse.help.base,
- org.eclipse.help.ui,
- org.eclipse.help.webapp
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/about.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/about.html
deleted file mode 100644
index 5d6dee8192..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/about.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<html>
-<head>
-<title>About Systemtap GUI</title>
-
-<body>
- <center>
- <img src="splash.bmp">
-
- <br/>
- Copyright &#169; 2006 IBM &#174;. All rights reserved.
-
- <br/><br/>
- <a href="http://sourceware.org/systemtap/">Systemtap</a>
-
- <br/><br/>
- Contact: <a href="mailto:morser@us.ibm.com, hhughesw@us.ibm.com, jhbriggs@us.ibm.com, hien@us.ibm.com?subject=SystemTap GUI">Systemtap GUI developers</a>
-
- <!--This is here to satisfy RFRS requirements-->
- <br/><br/>
- This offering is powered by Eclipse technology and includes Eclipse plug-ins that can be installed and used with other Eclipse (3.1)-based offerings.
- </center>
-</body>
-</html> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/aboutImage.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/aboutImage.gif
deleted file mode 100644
index 4a8ae9b315..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/aboutImage.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/build.properties
deleted file mode 100644
index 540f037315..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- splash.bmp,\
- about.html,\
- aboutImage.gif,\
- documentation/,\
- toc.xml,\
- plugin_customization.ini,\
- plugin.properties,\
- icons/,\
- build.properties
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/documentation/html/gettingstarted/gettingStarted.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/documentation/html/gettingstarted/gettingStarted.html
deleted file mode 100644
index 0cbdcb2d6f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/documentation/html/gettingstarted/gettingStarted.html
+++ /dev/null
@@ -1,95 +0,0 @@
-<a href="../toc.html">Table of Contents</a>
-
-<h1>SystemTap Development User Guide</h1>
-
-Welcome to the SystemTap Development Help pages. This section is intended to provide users with information
-and links about the SystemTap scripting language itself, in addition to a brief introduction to SystemTap
-GUI's structure for new users and a brief explanation of SystemTap.
-
-<h2>SystemTap GUI's Plugin Design</h2>
-
-SystemTap GUI was built with a modular goal in mind, namely, to provide the application as a series of
-plugins so that users may obtain just the ones they need without having to use a heavy-weight application
-should if they didn't need to. The most common example of this is to ship the Dashboard plugin
-independently, allowing non-SystemTap savvy users the ability to execute modules without having to write
-any scripts. The application in its complete state includes three perspective, each with a specific goal:
-
-<ul>
-<li><b>IDE Perspective</b> - Contains script editor and Function, Kernel Source, and Probe Alias browsers
-to assist in the creation and editting of SystemTap scripts.</li>
-<li><b>Graphics Perspective</b> - Graphs data from SystemTap scripts in the desired graph form according
-to a regular expression passed to interpret the data.</li>
-<li><b>Dashboard Perspective</b> - Allows the execution of modules, which are scripts with associated
-metadata that open one or more graphs in a dashboard environment that update in real time.This perspective
-is still under development</li>
-</ul>
-
-Each perspective has full documentation associated with it and is packaged in the respective plugin.
-
-<h2>
-Systemtap
-</h2>
-
-SystemTap provides free software (GPL) infrastructure to simplify the gathering of information about the
-running Linux kernel. This assists diagnosis of a performance or functional problem. SystemTap eliminates
-the need for the developer to go through the tedious and disruptive instrument, recompile, install, and
-reboot sequence that may be otherwise required to collect data.<br><br>
-
-SystemTap provides a simple command line interface and scripting language for writing instrumentation for a
-live running kernel. The internal tapset library as well as the published samples can be used to
-aid reuse and abstraction. <br><br>
-
-Current project members include Red Hat, IBM, Intel, and Hitachi.<br><br>
-
-See also: <a href="http://sourceware.org/systemtap/kprobes-status.html">Current status.</a>
-
-<h2>
-Configuration Tutorial
-</h2>
-
-This tutorial is written to guide a new SystemTap GUI user through some basic post-installation setup in
-order to get the most out of the application.<br>
-
-<h3>Installation</h3>
-
-If SystemTap GUI is not yet installed, or for problems in basic installation, please see the <a href="installation.html">
-installation help page</a>.
-
-<h3>Kernel Source Location</h3>
-
-In order to use the kernel source browser you'll need to point it to the kernel source initially. Do this by
-either selecting the Kernel Source Browser in the browser pane or by going to
-<b><u>W</u>indow-><u>P</u>references</b>, then going to the SystemTap->IDE->Path tab and setting the location
-there. This configuration detail is relevent to the IDE Perspective only.
-
-<h3>Tutorials</h3>
-
-If you haven't already, you will want to take the IDE and Graphing tutorials. You can find them in the Getting
-Started section of each perspective's help pages. These tutorial provides fundamental knowledge on graphing in SystemTap GUI.
-
-<h3>Preferences (Optional)</h3>
-
-Finally, you may want to set certain non-essential preferences before using SystemTap GUI regularly. Use
-<b><u>W</u>indow-><u>P</u>references</b> to access the Preferences page.
-
-Of particular note are
-Logging->Log To, SystemTap->Environment Variables, SystemTap->Graphing->Refresh Delay,
-SystemTap->IDE->Editor->Syntax Coloring.
-
-<h2>Links to SystemTap Resources</h2>
-
-The following links contain information specific to the SystemTap scripting language.
-
-<ul>
-<li><b>SystemTap website</b> - <a href="http://sourceware.org/systemtap/">http://sourceware.org/systemtap/</a></li>
-<li><b>SystemTap wiki</b> - <a href="http://sourceware.org/systemtap/wiki">http://sourceware.org/systemtap/wiki</a></li>
-<li><b>SystemTap tutorial</b> - <a href="http://sourceware.org/systemtap/tutorial/">http://sourceware.org/systemtap/tutorial/</a>
-<li><b>Full list of documentation</b> - <a href="http://sourceware.org/systemtap/documentation.html">http://sourceware.org/systemtap/documentation.html</a>
-</ul>
-
-The following links are related to the SystemTap GUI project:
-
-<ul>
-<li><b>SystemTap GUI Sourceforge</b> - <a href="https://sourceforge.net/projects/stapgui/">https://sourceforge.net/projects/stapgui/</a>
-<li><b>SystemTap GUI Homepage</b> - <a href="http://stapgui.sourceforge.net/">http://stapgui.sourceforge.net/</a>
-</ul>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/documentation/html/gettingstarted/installation.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/documentation/html/gettingstarted/installation.html
deleted file mode 100644
index a90e1ef06b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/documentation/html/gettingstarted/installation.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<a href="../toc.html">Table of Contents</a>
-
-<h2>
-Installation
-</h2>
-
-This section details the steps required for the installation of Systemtap GUI on the user's machine.
-
-<h3>
-Requirements
-</h3>
-
-<b>Hardware Requirements:</b>
-<ul><li>x86, x86_64, ppc64, s390</li></ul>
-
-<b>Sotware Requirements:</b>
-<ul>
-<li>Linux kernel v2.6.14 or newer</li>
-<li>Eclipse v3.4.1</li>
-<li>SystemTap v0.7 or newer</li>
-</ul>
-
-The Gui is a client-server application and the server and client can be installed seperately. The client is an eclipse plugin and requires eclipse to be installed. It provides an IDE to write scripts and a visualizer to view the output in graphical form.
- The server (stapgui-server) provides stdout/stderr data collection and process management services for processes run on a remote system. The server executes the SystemTap script, collects all output to stderr and stdout from that process, then funnels it via a socket to the client.
-The client and server can be installed on machines with different architectures.This allows users to monitor remote machines. You may also download and build the source yourself.
-
-<br><b>NOTE: The client and server are seperate packages and need to be installed independently.</b> You are viewing this help on the eclipse based client.</br>
-
-<br>NOTE: Installation assumes you already have both Eclipse and SystemTap installed.
-
-<h3>Server</h3>
-
-<ol>
-<li>Install the systemtapguiserver rpm.</li>
- Eg on Fedora run the command:
- yum install systemtapguiserver
-<li> Run the command 'stapgui-server'. You will get a message saying "Listening for Connections..." in a minute or so which shows that the server is up and running.</li>
-</ol>
-
-<h3>Client</h3>
-<ol>
-<li> Install the eclipse-systemtapgui rpm.</li>
- Eg on Fedora run the command:
- yum install eclipse-systemtapgui
-<li>Launch eclipse and open the SystemTap IDE perspective to start writing scripts.</li>
-</ol>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/documentation/html/toc.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/documentation/html/toc.html
deleted file mode 100644
index 6559d518f7..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/documentation/html/toc.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Table of Contents</title>
-</head>
-
-<body>
-<h1>Table of Contents</h1>
-
-<ul>
-<li><a href="gettingstarted/gettingStarted.html">Introduction and Links</a></li>
-<li><a href="gettingstarted/installation.html">Installation</a></li>
-</ul>
-
-</body>
-</html> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/documentation/tocgettingstarted.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/documentation/tocgettingstarted.xml
deleted file mode 100644
index f30e1cea80..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/documentation/tocgettingstarted.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-
-<toc label="Getting Started" link_to="toc.xml#gettingstarted">
- <!--<topic label="IDE Tutorial" href="documentation/html/gettingStarted/IDETutorial.html">
- <topic label="Lesson 1" href="documentation/html/gettingstarted/IDETutorial/lesson1.html" />
- <topic label="Lesson 2" href="documentation/html/gettingstarted/IDETutorial/lesson2.html" />
- <topic label="Lesson 3" href="documentation/html/gettingstarted/IDETutorial/lesson3.html" />
- </topic>
- <topic label="Data Display Tutorial" href="documentation/html/concepts/dataDisplayTutorial.html">
- <topic label="Lesson 1" href="documentation/html/gettingstarted/dataDisplayTutorial/lesson1.html" />
- <topic label="Lesson 2" href="documentation/html/gettingstarted/dataDisplayTutorial/lesson2.html" />
- <topic label="Lesson 3" href="documentation/html/gettingstarted/dataDisplayTutorial/lesson3.html" />
- </topic>
- <topic label="Configuration Tutorial" href="documentation/html/concepts/configurationTutorial.html">
- <topic label="Lesson 1" href="documentation/html/gettingstarted/configurationTutorial/lesson1.html" />
- <topic label="Lesson 2" href="documentation/html/gettingstarted/configurationTutorial/lesson2.html" />
- <topic label="Lesson 3" href="documentation/html/gettingstarted/configurationTutorial/lesson3.html" />
- </topic>
- <topic label="Systemtap and Kprobes" href="documentation/html/concepts/systemtapAndKprobes.html" />
- -->
-</toc>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/icons/eclipse.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/icons/eclipse.gif
deleted file mode 100644
index eb7b90c767..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/icons/eclipse.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/icons/perspective_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/icons/perspective_obj.gif
deleted file mode 100644
index 173661c5df..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/icons/perspective_obj.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/icons/welcome.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/icons/welcome.gif
deleted file mode 100644
index 542dddca3f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/icons/welcome.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/plugin.properties
deleted file mode 100644
index c1fb95d0d4..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/plugin.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-about.text=System Tap GUI\n\n\
-Version 1.0.rc1\n\n\
-Build ID:\n\n\
-Copywrite: At some point we will\n\
-have a real copywrite info here.\n\n\
-Buit on the Eclipse framework.\
-
-
-preference.systemTap.name=SystemTap
-preference.envVars.name=Environment Variables \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/plugin.xml
deleted file mode 100644
index 93f2801b53..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/plugin.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
- <extension
- id="application"
- point="org.eclipse.core.runtime.applications">
- <application>
- <run class="org.eclipse.linuxtools.systemtap.ui.systemtapgui.Application"/>
- </application>
- </extension>
-
-
- <extension
- id="systemtapGUI"
- point="org.eclipse.core.runtime.products">
- <product
- application="org.eclipse.linuxtools.systemtap.ui.systemtapgui.application"
- name="systemtapgui">
- <property name="aboutImage" value="aboutImage.gif"/>
- <property
- name="aboutText"
- value="System Tap GUI&#x0A;Version 1.0.rc1&#x0A;Build ID:&#x0A;Copywrite: At some point we will&#x0A;have a real copywrite info here.&#x0A;&#x0A;Buit on the Eclipse framework."/>
- <property name="preferenceCustomization" value="plugin_customization.ini"/>
- <property
- name="appName"
- value="systemtapgui">
- </property>
- </product>
- </extension>
-
- <extension
- point="org.eclipse.help.toc">
- <toc
- file="toc.xml"
- primary="true"/>
- <toc file="documentation/tocgettingstarted.xml"/>
- </extension>
-
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%preference.systemTap.name"
- id="com.qualityeclipse.systemtap.prefs.view"
- class="org.eclipse.linuxtools.systemtap.ui.systemtapgui.preferences.SystemTapPreferencePage"/>
- <page
- name="%preference.envVars.name"
- id="com.qualityeclipse.systemtap.prefs.environmentvariables"
- class="org.eclipse.linuxtools.systemtap.ui.systemtapgui.preferences.EnvironmentVariablesPreferencePage"
- category="com.qualityeclipse.systemtap.prefs.view"/>
- </extension>
-
- <extension
- point="org.eclipse.core.runtime.preferences">
- <initializer class="org.eclipse.linuxtools.systemtap.ui.systemtapgui.preferences.PreferenceInitializer"/>
- </extension>
-</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/plugin_customization.ini b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/plugin_customization.ini
deleted file mode 100644
index 1ba76e5515..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/plugin_customization.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-org.eclipse.ui/DOCK_PERSPECTIVE_BAR=top_right
-org.eclipse.ui/SHOW_TEXT_ON_PERSPECTIVE_BAR=true
-org.eclipse.ui/initialFastViewBarLocation=left
-org.eclipse.ui/SHOW_TRADITIONAL_STYLE_TABS=false
-org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = false
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/splash.bmp b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/splash.bmp
deleted file mode 100644
index a2b6eff570..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/splash.bmp
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/splash2.bmp b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/splash2.bmp
deleted file mode 100644
index 54bd540dbb..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/splash2.bmp
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/Application.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/Application.java
deleted file mode 100644
index 14f7aaf721..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/Application.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.systemtapgui;
-
-import org.eclipse.core.runtime.IPlatformRunnable;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-
-public class Application implements IPlatformRunnable {
-
- /**
- * Instantiates the workbench and creats a settings folder if it does not exist.
- *
- * @param args not used
- *
- * @return an IPlatformRunnable condition, either EXIT_RESTART or EXIT_OK
- */
- @SuppressWarnings("deprecation")
- public Object run(Object args) throws Exception {
- Display display = PlatformUI.createDisplay();
-
- if(!SystemTapGUISettings.settingsFolder.exists())
- SystemTapGUISettings.settingsFolder.mkdir();
-
- try {
- int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
- if (returnCode == PlatformUI.RETURN_RESTART) {
- return IPlatformRunnable.EXIT_RESTART;
- }
- return IPlatformRunnable.EXIT_OK;
- } finally {
- display.dispose();
- }
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/ApplicationActionBarAdvisor.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/ApplicationActionBarAdvisor.java
deleted file mode 100644
index c694dd5078..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/ApplicationActionBarAdvisor.java
+++ /dev/null
@@ -1,330 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.systemtapgui;
-
-import org.eclipse.jface.action.GroupMarker;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.ICoolBarManager;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.action.ToolBarContributionItem;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.linuxtools.systemtap.ui.systemtapgui.internal.Localization;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.actions.ContributionItemFactory;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-import org.eclipse.ui.part.CoolItemGroupMarker;
-
-
-
-public final class ApplicationActionBarAdvisor extends ActionBarAdvisor {
-
- public ApplicationActionBarAdvisor(IActionBarConfigurer actionBarConfigurer) {
- super(actionBarConfigurer);
- LogManager.logDebug("Start/End ApplicationActionBarAdvisor: actionBarConfigurer-" + actionBarConfigurer, this);
- }
-
- /**
- * Populates the passed in coolbar with the appropriate actions.
- *
- * @param cbManager the ICoolBarManager object that recieves the actions.
- */
- protected void fillCoolBar(ICoolBarManager cbManager) {
- LogManager.logDebug("Start fillCollBar: cbManager-" + cbManager, this);
- cbManager.add(new GroupMarker("group.file"));
- {
- // File Group
- IToolBarManager fileToolBar = new ToolBarManager(cbManager.getStyle());
- fileToolBar.add(new Separator(IWorkbenchActionConstants.FILE_START));
- fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.NEW_GROUP));
- fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.NEW_EXT));
- fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.OPEN_EXT));
- fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.IMPORT_EXT));
- fileToolBar.add(new GroupMarker("export.ext"));
-
- fileToolBar.add(new Separator(IWorkbenchActionConstants.SAVE_GROUP));
- fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.SAVE_EXT));
- fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.PRINT_EXT));
- fileToolBar.add(new Separator(IWorkbenchActionConstants.FILE_END));
-
- //Edit
- fileToolBar.add(new Separator(IWorkbenchActionConstants.EDIT_START));
- fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.CUT_EXT));
- fileToolBar.add(new Separator(IWorkbenchActionConstants.EDIT_END));
-
- //History
- fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.HISTORY_GROUP));
-
- //Build
- fileToolBar.add(new Separator(IWorkbenchActionConstants.BUILD_GROUP));
- fileToolBar.add(new CoolItemGroupMarker(IWorkbenchActionConstants.BUILD_EXT));
- fileToolBar.add(new CoolItemGroupMarker("stop.ext"));
-
- //Other
- fileToolBar.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
-
- // Add to the cool bar manager
- cbManager.add(new ToolBarContributionItem(fileToolBar,IWorkbenchActionConstants.TOOLBAR_FILE));
- }
-
- cbManager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
-
- cbManager.add(new GroupMarker(IWorkbenchActionConstants.GROUP_EDITOR));
- LogManager.logDebug("End fillCoolBar:", this);
- }
-
- /**
- * Adds the menu groups to the passed in IMenuManager.
- *
- * @param menubar the IMenuManager object to populate
- */
- protected void fillMenuBar(IMenuManager menubar) {
- LogManager.logDebug("Start fillMenuBar: menubar-" + menubar, this);
- menubar.add(createFakeFileMenu());
- menubar.add(createFakeHelpMenu());
- menubar.add(createFileMenu());
- menubar.add(createEditMenu());
- menubar.add(createNavigateMenu());
- menubar.add(createBuildMenu());
- menubar.add(createWindowMenu());
- menubar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
- menubar.add(createHelpMenu());
- LogManager.logDebug("End fillMenuBar:", this);
- }
-
- /**
- * Creates the file menu different from the standard eclipe edition.
- *
- * @return the MenuManager object created
- */
- private MenuManager createFakeFileMenu() {
- LogManager.logDebug("Start createFakeFileMenu:", this);
- MenuManager menu = new MenuManager(Localization.getString("ApplicationActionBarAdvisor.File"), IWorkbenchActionConstants.M_FILE);
- menu.setVisible(false);
-
- LogManager.logDebug("End createFakeFileMenu:", this);
- return menu;
- }
-
- /**
- * Creates the help menu different from the standard eclipe edition.
- *
- * @return the MenuManager object created
- */
- private MenuManager createFakeHelpMenu() {
- LogManager.logDebug("Start createFakeHelpMenu:", this);
- MenuManager menu = new MenuManager(Localization.getString("ApplicationActionBarAdvisor.Help"), IWorkbenchActionConstants.M_HELP);
- menu.setVisible(false);
-
- LogManager.logDebug("End createFakeHelpMenu:", this);
- return menu;
- }
-
- /**
- * Creates and returns the File menu.
- *
- * @return the MenuManager object created
- */
- private MenuManager createFileMenu() {
- LogManager.logDebug("Start createFileMenu:", this);
-
- MenuManager menu = new MenuManager(Localization.getString("ApplicationActionBarAdvisor.File"), IWorkbenchActionConstants.M_FILE + "2");
- //menu.remove("org.eclipse.ui.edit.text.openExternalFile");
- menu.add(new Separator(IWorkbenchActionConstants.FILE_START));
- menu.add(new Separator(IWorkbenchActionConstants.NEW_EXT));
- menu.add(new Separator(IWorkbenchActionConstants.CLOSE_EXT));
- menu.add(new Separator(IWorkbenchActionConstants.SAVE_EXT));
- menu.add(new Separator(IWorkbenchActionConstants.PRINT_EXT));
- menu.add(new Separator(IWorkbenchActionConstants.IMPORT_EXT));
- menu.add(new GroupMarker("export.ext"));
- menu.add(new Separator("recentFiles.ext"));
- menu.add(new Separator(IWorkbenchActionConstants.CLOSE_EXT));
- menu.add(getAction(ActionFactory.QUIT.getId()));
- menu.add(new Separator(IWorkbenchActionConstants.FILE_END));
- menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
-
- LogManager.logDebug("End createFileMenu: returnVal-" + menu, this);
- return menu;
- }
-
- /**
- * Creates and returns the Edit menu.
- *
- * @return the MenuManager object created
- */
- private MenuManager createEditMenu() {
- LogManager.logDebug("Start createEditMenu:", this);
-
- MenuManager menu = new MenuManager(Localization.getString("ApplicationActionBarAdvisor.Edit"), IWorkbenchActionConstants.M_EDIT);
- menu.add(new Separator(IWorkbenchActionConstants.EDIT_START));
- menu.add(new Separator(IWorkbenchActionConstants.UNDO_EXT));
- menu.add(new Separator(IWorkbenchActionConstants.CUT_EXT));
- menu.add(new Separator(IWorkbenchActionConstants.FIND_EXT));
- menu.add(new Separator(IWorkbenchActionConstants.ADD_EXT));
- menu.add(new Separator(IWorkbenchActionConstants.EDIT_END));
- menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
-
- LogManager.logDebug("End createEditMenu: returnVal-" + menu, this);
- return menu;
- }
-
- /**
- * Creates and returns the Navigate menu.
- *
- * @return the MenuManager object created
- */
- private MenuManager createNavigateMenu() {
- LogManager.logDebug("Start createNavigateMenu:", this);
-
- MenuManager menu = new MenuManager(Localization.getString("ApplicationActionBarAdvisor.Navigate"), IWorkbenchActionConstants.M_NAVIGATE);
- menu.add(new Separator(IWorkbenchActionConstants.NAV_START));
- menu.add(getAction(ActionFactory.FORWARD_HISTORY.getId()));
- menu.add(getAction(ActionFactory.BACKWARD_HISTORY.getId()));
- menu.add(new Separator(IWorkbenchActionConstants.NAV_END));
- menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
-
- LogManager.logDebug("End createNavigateMenu: returnVal-" + menu, this);
- return menu;
- }
-
- /**
- * Creates and returns the Build menu.
- *
- * @return the MenuManager object created
- */
- private MenuManager createBuildMenu() {
- LogManager.logDebug("Start createBuildMenu:", this);
-
- MenuManager menu = new MenuManager(Localization.getString("ApplicationActionBarAdvisor.Run"), IWorkbenchActionConstants.M_LAUNCH);
- menu.add(new Separator(IWorkbenchActionConstants.WB_START));
- menu.add(new GroupMarker(IWorkbenchActionConstants.BUILD_GROUP));
- menu.add(new GroupMarker(IWorkbenchActionConstants.BUILD_EXT));
- menu.add(new Separator("build.stop"));
- menu.add(new Separator(IWorkbenchActionConstants.WB_END));
- menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
-
- LogManager.logDebug("End createBuildMenu: returnVal-" + menu, this);
- return menu;
- }
-
- /**
- * Creates and returns the Window menu.
- *
- * @return the MenuManager object created
- */
- private MenuManager createWindowMenu() {
- LogManager.logDebug("Start createWindowMenu:", this);
-
- MenuManager menu = new MenuManager(Localization.getString("ApplicationActionBarAdvisor.Window"), IWorkbenchActionConstants.M_WINDOW);
- menu.add(new Separator(IWorkbenchActionConstants.PROJ_START));
- menu.add(getAction(ActionFactory.OPEN_NEW_WINDOW.getId()));
-
- menu.add(new Separator("perspective.ext"));
- MenuManager menuPerspectives = new MenuManager(Localization.getString("ApplicationActionBarAdvisor.OpenPerspective"));
- menuPerspectives.add(perspectives);
- menu.add(menuPerspectives);
-
- menu.add(new GroupMarker(IWorkbenchActionConstants.VIEW_EXT));
- MenuManager menuViews = new MenuManager(Localization.getString("ApplicationActionBarAdvisor.ShowViews"));
- menuViews.add(views);
- menu.add(menuViews);
-
- menu.add(new Separator(IWorkbenchActionConstants.WINDOW_EXT));
- menu.add(new Separator(IWorkbenchActionConstants.PROJ_END));
- menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- menu.add(getAction(ActionFactory.PREFERENCES.getId()));
-
- LogManager.logDebug("End createWindowMenu: returnVal-" + menu, this);
- return menu;
- }
-
- /**
- * Creates and returns the Help menu.
- *
- * @return the MenuManager object created
- */
- private MenuManager createHelpMenu() {
- LogManager.logDebug("Start createHelpMenu:", this);
-
- MenuManager menu = new MenuManager(Localization.getString("ApplicationActionBarAdvisor.Help"), IWorkbenchActionConstants.M_HELP + "2");
- menu.add(new Separator(IWorkbenchActionConstants.HELP_START));
- menu.add(getAction(ActionFactory.HELP_CONTENTS.getId()));
- menu.add(getAction(ActionFactory.HELP_SEARCH.getId()));
- menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- menu.add(new Separator(IWorkbenchActionConstants.HELP_END));
- menu.add(getAction(ActionFactory.ABOUT.getId()));
-
- LogManager.logDebug("End createHelpMenu: returnVal-" + menu, this);
- return menu;
- }
-
- /**
- * Registers certain actions global.
- *
- * @param window the IWorkbenchWindow object to assign
- */
- protected void makeActions(IWorkbenchWindow window) {
- LogManager.logDebug("Start makeActions: window-" + window, this);
- //registerAsGlobal(ActionFactory.SAVE.create(window));
- //registerAsGlobal(ActionFactory.SAVE_AS.create(window));
- //registerAsGlobal(ActionFactory.SAVE_ALL.create(window));
- //registerAsGlobal(ActionFactory.CLOSE.create(window));
- //registerAsGlobal(ActionFactory.CLOSE_ALL.create(window));
- //registerAsGlobal(ActionFactory.CLOSE_ALL_SAVED.create(window));
- //registerAsGlobal(ActionFactory.PRINT.create(window));
- //registerAsGlobal(ActionFactory.IMPORT.create(window));
- registerAsGlobal(ActionFactory.QUIT.create(window));
- //registerAsGlobal(ActionFactory.UNDO.create(window));
- //registerAsGlobal(ActionFactory.REDO.create(window));
- //registerAsGlobal(ActionFactory.CUT.create(window));
- //registerAsGlobal(ActionFactory.COPY.create(window));
- //registerAsGlobal(ActionFactory.PASTE.create(window));
- //registerAsGlobal(ActionFactory.SELECT_ALL.create(window));
- registerAsGlobal(ActionFactory.FIND.create(window));
- //registerAsGlobal(ActionFactory.REVERT.create(window));
- registerAsGlobal(ActionFactory.OPEN_NEW_WINDOW.create(window));
- registerAsGlobal(ActionFactory.PREFERENCES.create(window));
- //registerAsGlobal(ActionFactory.FORWARD.create(window));
- //registerAsGlobal(ActionFactory.BACK.create(window));
- registerAsGlobal(ActionFactory.FORWARD_HISTORY.create(window));
- registerAsGlobal(ActionFactory.BACKWARD_HISTORY.create(window));
- registerAsGlobal(ActionFactory.ABOUT.create(window));
- registerAsGlobal(ActionFactory.HELP_CONTENTS.create(window));
- registerAsGlobal(ActionFactory.HELP_SEARCH.create(window));
-
- views = ContributionItemFactory.VIEWS_SHORTLIST.create(window);
- perspectives = ContributionItemFactory.PERSPECTIVES_SHORTLIST.create(window);
-
- LogManager.logDebug("End makeActions:", this);
- }
-
- /**
- * Registers the action as global action and registers it for disposal.
- *
- * @param action the action to register
- */
- private void registerAsGlobal(IAction action) {
- LogManager.logDebug("Start registerAsGlobal: action-" + action, this);
- getActionBarConfigurer().registerGlobalAction(action);
- register(action);
- LogManager.logDebug("End registerAsGlobal:", this);
- }
-
- private IContributionItem views, perspectives;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/ApplicationWorkbenchAdvisor.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/ApplicationWorkbenchAdvisor.java
deleted file mode 100644
index 26a7cf8392..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/ApplicationWorkbenchAdvisor.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.systemtapgui;
-
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.linuxtools.systemtap.ui.systemtapgui.internal.SystemTapGUIPlugin;
-import org.eclipse.linuxtools.systemtap.ui.systemtapgui.preferences.PreferenceConstants;
-import org.eclipse.ui.application.IWorkbenchConfigurer;
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchAdvisor;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-
-
-public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
- private static final String PERSPECTIVE_ID = Perspective.ID;
-
- public ApplicationWorkbenchAdvisor() {
- super();
- LogManager.getInstance().begin();
- }
-
- public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
- return new ApplicationWorkbenchWindowAdvisor(configurer);
- }
-
- public String getInitialWindowPerspectiveId() {
- return PERSPECTIVE_ID;
- }
-
- /**
- * Initializes the configurer object, loads preferences.
- *
- * @param configurer The IWorkbenchConfigurer object to initialize.
- */
- public void initialize(IWorkbenchConfigurer configurer) {
- LogManager.logDebug("Start initialize: configurer-" + configurer, this);
- LogManager.logInfo("Initializing", this);
- super.initialize(configurer);
- configurer.setSaveAndRestore(
- SystemTapGUIPlugin.getDefault().getPreferenceStore()
- .getBoolean(PreferenceConstants.P_WINDOW_STATE));
- LogManager.logDebug("End initialize:", this);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/ApplicationWorkbenchWindowAdvisor.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/ApplicationWorkbenchWindowAdvisor.java
deleted file mode 100644
index 62cc0ed58e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/ApplicationWorkbenchWindowAdvisor.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.systemtapgui;
-
-import java.util.List;
-
-import org.eclipse.jface.preference.PreferenceManager;
-import org.eclipse.jface.preference.PreferenceNode;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
-
- public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
- super(configurer);
- }
-
- public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) {
- return new ApplicationActionBarAdvisor(configurer);
- }
-
- /**
- * Sets options for the configurer object such as size, coolbar, status line, title.
- */
- public void preWindowOpen() {
- IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
- configurer.setInitialSize(new Point(800, 600));
- configurer.setShowCoolBar(true);
- configurer.setShowStatusLine(false);
- configurer.setShowPerspectiveBar(true);
- configurer.setTitle("SystemTap GUI");
-
- removeExcessPreferences();
- }
-
- /**
- * Used to whipe out all eclipses standard preferences.
- */
- public void removeExcessPreferences() {
- List l = PlatformUI.getWorkbench().getPreferenceManager().getElements(PreferenceManager.PRE_ORDER);
- String id;
- for(int i=0; i<l.size(); i++) {
- id = ((PreferenceNode)l.get(i)).getId();
- if(id.startsWith("org.eclipse"))
- PlatformUI.getWorkbench().getPreferenceManager().remove(id);
- }
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/Perspective.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/Perspective.java
deleted file mode 100644
index 7a96c340d9..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/Perspective.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.systemtapgui;
-
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.linuxtools.systemtap.ui.systemtapgui.views.WelcomeView;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-
-
-
-public class Perspective implements IPerspectiveFactory {
- public static String ID = "org.eclipse.linuxtools.systemtap.ui.systemtapgui.Perspective";
-
- /**
- * Sets options in the IPageLayout object such as editorAreaVisible and the Welcome View.
- *
- * @param layout The IPageLayout object to set options on.
- */
- public void createInitialLayout(IPageLayout layout) {
- LogManager.logDebug("Start createInitialLayout: layout-" + layout, this);
- LogManager.logInfo("Initializing", this);
- String editorArea = layout.getEditorArea();
- layout.setEditorAreaVisible(false);
-
- layout.addStandaloneView(WelcomeView.ID, false, IPageLayout.TOP, 1.00f, editorArea);
- layout.getViewLayout(WelcomeView.ID).setCloseable(false);
- layout.addShowViewShortcut(WelcomeView.ID);
-
- layout.addPerspectiveShortcut(ID);
-
- LogManager.logDebug("End createInitialLayout:", this);
-
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/SystemTapGUISettings.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/SystemTapGUISettings.java
deleted file mode 100644
index a8f60d98ae..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/SystemTapGUISettings.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.systemtapgui;
-
-import java.io.File;
-
-public final class SystemTapGUISettings {
- public static final File settingsFolder = new File(System.getenv("HOME") + "/.systemtapgui/");
- public static final String installDirectory = System.getProperty("user.dir");
- public static final String tempDirectory = "/tmp/systemtapgui/";
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/internal/Localization.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/internal/Localization.java
deleted file mode 100644
index 2fb25e6299..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/internal/Localization.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.systemtapgui.internal;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Localization {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.systemtap.ui.systemtapgui.internal.localization";
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- private Localization() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/internal/SystemTapGUIPlugin.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/internal/SystemTapGUIPlugin.java
deleted file mode 100644
index da7f6a960d..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/internal/SystemTapGUIPlugin.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.systemtapgui.internal;
-
-import org.eclipse.ui.plugin.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class SystemTapGUIPlugin extends AbstractUIPlugin {
-
- //The shared instance.
- private static SystemTapGUIPlugin plugin;
-
- /**
- * The constructor.
- */
- public SystemTapGUIPlugin() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static SystemTapGUIPlugin 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 AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.linuxtools.systemtap.ui.systemtapgui", path);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/internal/localization.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/internal/localization.properties
deleted file mode 100644
index 58efed72b7..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/internal/localization.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-ApplicationActionBarAdvisor.File=&File
-ApplicationActionBarAdvisor.Help=&Help
-ApplicationActionBarAdvisor.Edit=&Edit
-ApplicationActionBarAdvisor.Navigate=&Navigate
-ApplicationActionBarAdvisor.Run=&Run
-ApplicationActionBarAdvisor.Window=&Window
-ApplicationActionBarAdvisor.OpenPerspective=&Open Perspective
-ApplicationActionBarAdvisor.ShowViews=Show &Views
-SystemTapPreferencePage.GUIPreferencesDescription=Preferences for the entire GUI application
-SystemTapPreferencePage.RememberWindowState=Remember window state
-WelcomeView.Welcome=Welcome
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/preferences/EnvironmentVariablesPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/preferences/EnvironmentVariablesPreferencePage.java
deleted file mode 100644
index 28f9a9be8e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/preferences/EnvironmentVariablesPreferencePage.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.systemtapgui.preferences;
-
-import java.util.ArrayList;
-
-import org.eclipse.jface.preference.*;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.linuxtools.systemtap.ui.systemtapgui.internal.SystemTapGUIPlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.ScrolledComposite;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.IWorkbench;
-
-
-
-public class EnvironmentVariablesPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-
- /**
- * Set the description of the page.
- */
- public EnvironmentVariablesPreferencePage() {
- super();
- LogManager.logDebug("Start EnvironmentVariablesPreferencePage:", this);
- setPreferenceStore(SystemTapGUIPlugin.getDefault().getPreferenceStore());
- setDescription("Environment Variables.");
- LogManager.logDebug("End EnvironmentVariablesPreferencePage:", this);
- }
-
- public void init(IWorkbench workbench) {
- LogManager.logDebug("Start init:", this);
- LogManager.logInfo("Initializing", this);
- LogManager.logDebug("End init:", this);
- }
-
- /**
- * Creates a ScrolledComposite, sets options on oit, opens string field editors for the
- * preferences.
- *
- * @param The parent of the ScrolledComposite object.
- *
- * @return The ScrolledComposite object that is created configured.
- */
- protected Control createContents(Composite parent) {
- LogManager.logDebug("Start createComponents: parent-" + parent, this);
- ScrolledComposite sc = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- Composite c = new Composite(sc, SWT.NONE);
- sc.setExpandHorizontal(true);
- sc.setExpandVertical(true);
- sc.setContent(c);
- sc.setMinSize(c.computeSize(SWT.DEFAULT, SWT.DEFAULT));
-
- envVariables = new StringFieldEditor[PreferenceConstants.P_ENV.length];
- for(int i=0; i<envVariables.length; i++) {
- envVariables[i] = createStringFieldEditor(PreferenceConstants.P_ENV[i][0],
- PreferenceConstants.P_ENV[i][1], c);
- }
- LogManager.logDebug("End createComponents: returnVal-" + sc, this);
- return sc;
- }
-
- /**
- * Creates and returns a StringFieldEditor object with preferences set to it.
- *
- * @param name Name of the field.
- * @param lblText Label text of the field.
- * @param parent Composite object parent of the object.
- *
- * @return The created and configued StringFieldEditor ojbect.
- */
- private StringFieldEditor createStringFieldEditor(String name, String lblText, Composite parent) {
- LogManager.logDebug("Start createStringFieldEditor: name-" + name + ", lblText-" + lblText + ", parent-" + parent, this);
- StringFieldEditor sfe = new StringFieldEditor(name, lblText, parent);
- sfe.setPage(this);
- sfe.setPreferenceStore(getPreferenceStore());
- sfe.load();
-
- LogManager.logDebug("End createStringFieldEditor: returnVal-" + sfe, this);
- return sfe;
- }
-
- /**
- * Loads the default environment variables.
- */
- protected void performDefaults() {
- LogManager.logDebug("Start performDefaults:", this);
- for(int i=0; i<envVariables.length; i++)
- envVariables[i].loadDefault();
-
- super.performDefaults();
- LogManager.logDebug("End performDefaults:", this);
- }
-
- /**
- * Stores the modified environment variables.
- *
- * @return True.
- */
- public boolean performOk() {
- LogManager.logDebug("Start performOk:", this);
- for(int i=0; i<envVariables.length; i++)
- envVariables[i].store();
-
- LogManager.logDebug("End performOk: returnVal-true", this);
- return true;
- }
-
- /**
- * Returns the currently stored environment variables in the form of a string array.
- *
- * @return The string array containing the current environment variables.
- */
- public static String[] getEnvironmentVariables() {
- LogManager.logDebug("Start getEnvVars:", EnvironmentVariablesPreferencePage.class);
- ArrayList vars = new ArrayList();
- String[] envVars = null;
- String var;
-
- int i;
- if(null == SystemTapGUIPlugin.getDefault() || null == SystemTapGUIPlugin.getDefault().getPreferenceStore())
- return null;
- IPreferenceStore p = SystemTapGUIPlugin.getDefault().getPreferenceStore();
- for(i=0; i<PreferenceConstants.P_ENV.length; i++) {
- var = p.getString(PreferenceConstants.P_ENV[i][0]).trim();
- if(!var.equals("")) {
- vars.add(PreferenceConstants.P_ENV[i][0] + "=" + var);
- }
- }
-
- if(vars.size() > 0) {
- envVars = new String[vars.size()];
- for(i = 0; i<vars.size(); i++)
- envVars[i] = (String)vars.get(i);
- }
-
- LogManager.logDebug("End getEnvVars: returnVal-" + envVars, EnvironmentVariablesPreferencePage.class);
- return envVars;
- }
-
- /**
- * Clears the environment variables string array.
- */
- public void dispose() {
- LogManager.logDebug("Start dispose:", this);
- LogManager.logInfo("Disposing", this);
- super.dispose();
-
- for(int i=0; i<envVariables.length; i++) {
- envVariables[i].dispose();
- envVariables[i] = null;
- }
- envVariables = null;
- LogManager.logDebug("End dispose:", this);
- }
-
- private static StringFieldEditor[] envVariables;
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/preferences/PreferenceConstants.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/preferences/PreferenceConstants.java
deleted file mode 100644
index 8521081551..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/preferences/PreferenceConstants.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.systemtapgui.preferences;
-
-/**
- * Constant definitions for plug-in preferences
- */
-public class PreferenceConstants {
-
- //environmentvariables
- public static final String[][] P_ENV = new String[][] {
- {"EnvLdLibraryPath", "LD_LIBRARY_PATH"},
- {"EnvPath", "PATH"},
- {"EnvSystemtapTapset", "SYSTEMTAP_TAPSET"},
- {"EnvSystemtapRuntime", "SYSTEMTAP_RUNTIME"},
- //{"EnvDateTime", "DATE_TIME"},
- //{"EnvUser", "USER"},
- //{"EnvKernel", "KERNEL"},
- //{"EnvTestName", "TEST_NAME"},
- //{"EnvSystemtap", "SYSTEMTAP"},
- //{"EnvElfutils", "ELFUTILS"},
- //{"EnvStapObj", "STAP_OBJ"},
- //{"EnvStapSrc", "STAP_SRC"},
- //{"EnvStapInstall", "STAP_INSTALL"},
- //{"EnvStapTests", "STAP_TESTS"},
- //{"EnvCvsroot", "CVSROOT"},
- //{"EnvMailToAddr", "MAIL_TO_ADDR"},
- //{"EnvBuildResults", "BUILD_RESULTS"},
- //{"EnvTestResults", "TEST_RESULTS"},
- };
-
- //systemtap
- public static final String P_WINDOW_STATE = "RestoreWindowStatePreference";
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/preferences/PreferenceInitializer.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/preferences/PreferenceInitializer.java
deleted file mode 100644
index fab7d865f9..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/preferences/PreferenceInitializer.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.systemtapgui.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.linuxtools.systemtap.ui.systemtapgui.internal.SystemTapGUIPlugin;
-
-
-
-public class PreferenceInitializer extends AbstractPreferenceInitializer {
- public void initializeDefaultPreferences() {
- LogManager.logDebug("Start initializeDefaultPreferences:", this);
- IPreferenceStore store = SystemTapGUIPlugin.getDefault().getPreferenceStore();
-
- //gui
- store.setDefault(PreferenceConstants.P_WINDOW_STATE, true);
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/preferences/SystemTapPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/preferences/SystemTapPreferencePage.java
deleted file mode 100644
index 9a0944e370..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/preferences/SystemTapPreferencePage.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.systemtapgui.preferences;
-
-import org.eclipse.jface.preference.BooleanFieldEditor;
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.linuxtools.systemtap.ui.systemtapgui.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.systemtapgui.internal.SystemTapGUIPlugin;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-
-
-public class SystemTapPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
-
- /**
- * Get the current preferences.
- */
- public SystemTapPreferencePage() {
- super(GRID);
- LogManager.logDebug("Start SystemTapPreferencePage:", this);
- setPreferenceStore(SystemTapGUIPlugin.getDefault().getPreferenceStore());
- setDescription(Localization.getString("SystemTapPreferencePage.GUIPreferencesDescription"));
- LogManager.logDebug("End SystemTapPreferencePage:", this);
- }
-
- /**
- * Sets up the field editors for optional change by the user.
- */
- public void createFieldEditors() {
- LogManager.logDebug("Start createFieldEditors:", this);
- addField(new BooleanFieldEditor(
- PreferenceConstants.P_WINDOW_STATE,
- Localization.getString("SystemTapPreferencePage.RememberWindowState"),
- getFieldEditorParent()));
- LogManager.logDebug("End createFieldEditors:", this);
- }
-
- public void init(IWorkbench workbench) {
- LogManager.logInfo("Initializing", this);
- }
-
- public void dispose() {
- LogManager.logInfo("Disposing", this);
- super.dispose();
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/views/WelcomeView.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/views/WelcomeView.java
deleted file mode 100644
index 5834ed90c0..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/src/org/eclipse/linuxtools/systemtap/ui/systemtapgui/views/WelcomeView.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the 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:
- * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.ui.systemtapgui.views;
-
-import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
-import org.eclipse.linuxtools.systemtap.ui.systemtapgui.internal.Localization;
-import org.eclipse.linuxtools.systemtap.ui.systemtapgui.internal.SystemTapGUIPlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.part.ViewPart;
-
-
-
-public class WelcomeView extends ViewPart {
- public WelcomeView() {
- super();
- LogManager.logInfo("Initializing", this);
- }
-
- /**
- * Establishes the components for the Welcome View.
- *
- * @param parent Composite parent of the new object.
- */
- public void createPartControl(Composite parent) {
- Composite cmpMain = new Composite(parent, SWT.NONE);
- cmpMain.setLayout(new FormLayout());
- cmpMain.setBackground(new Color(parent.getDisplay(), 170, 200, 255));
-
- Label lblTitle = new Label(cmpMain,SWT.NONE);
- lblTitle.setText(Localization.getString("WelcomeView.Welcome"));
- lblTitle.setFont(new Font(parent.getDisplay(), "Arial", 40, SWT.BOLD));
- lblTitle.setBackground(cmpMain.getBackground());
- lblTitle.setForeground(new Color(parent.getDisplay(), 0, 0, 100));
- lblTitle.setAlignment(SWT.CENTER);
-
- Image imgIcon = new Image(parent.getDisplay(), SystemTapGUIPlugin.getImageDescriptor("splash.bmp").getImageData());
- Label lblImage = new Label(cmpMain,SWT.NONE);
- lblImage.setBackground(cmpMain.getBackground());
- lblImage.setImage(imgIcon);
-
- lblImage.setAlignment(SWT.CENTER);
-
-
- FormData titleData = new FormData();
- titleData.left = new FormAttachment(0, 0);
- titleData.top = new FormAttachment(0, 0);
- titleData.right = new FormAttachment(100, 0);
- titleData.bottom = new FormAttachment(20, 0);
- lblTitle.setLayoutData(titleData);
-
- FormData iconData = new FormData();
- iconData.left = new FormAttachment(0, 0);
- iconData.top = new FormAttachment(lblTitle);
- iconData.right = new FormAttachment(100, 0);
- iconData.bottom = new FormAttachment(80, 0);
- lblImage.setLayoutData(iconData);
-
-
- }
-
- public void setFocus() {
- }
-
- public void dispose() {
- LogManager.logInfo("Disposing", this);
- super.dispose();
- }
-
- public static final String ID = "org.eclipse.linuxtools.systemtap.ui.systemtapgui.views.WelcomeView";
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/toc.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/toc.xml
deleted file mode 100644
index 9e8d52c4c2..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/toc.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
-
-<toc label="Systemtap Development User Guide" topic="documentation/html/toc.html">
- <topic label="Introduction and Links" href="documentation/html/gettingstarted/gettingStarted.html">
- <anchor id="gettingstarted"/>
- </topic>
- <topic label="Installation" href="documentation/html/gettingstarted/installation.html">
- <anchor id="installation"/>
- </topic>
-</toc>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.test-feature/.project b/systemtap/org.eclipse.linuxtools.systemtap.ui.test-feature/.project
deleted file mode 100644
index f7fc7e4dbe..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.test-feature/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.ui.test-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.test-feature/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.test-feature/ChangeLog
deleted file mode 100644
index a871e1b315..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.test-feature/ChangeLog
+++ /dev/null
@@ -1,7 +0,0 @@
-2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * .project: New file.
- * build.properties: New file.
- * epl-v10.html: New file.
- * feature.properties: New file.
- * feature.xml: \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.test-feature/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.test-feature/build.properties
deleted file mode 100644
index 0dc2b5f024..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.test-feature/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-bin.includes = feature.xml,\
- feature.properties,\
- epl-v10.html,\
- test.xml
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.test-feature/feature.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.test-feature/feature.properties
deleted file mode 100644
index b856560ac5..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.test-feature/feature.properties
+++ /dev/null
@@ -1,112 +0,0 @@
-#*******************************************************************************
-# 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, Inc. - initial API and implementation
-#********************************************************************************
-featureName=SystemtapGui Integration Automated Tests (Incubation)
-description=Tests for plugins that integrate SystemTapGui with the workbench.
-featureProvider=Eclipse
-copyright=Copyright 2008 Red Hat, Inc.
-licenseURL=epl-v10.html
-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 \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.test-feature/feature.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.test-feature/feature.xml
deleted file mode 100644
index 1e8f0cb04f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.test-feature/feature.xml
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.linuxtools.systemtap.ui.test"
- label="%featureName"
- version="0.2.0.qualifier"
- provider-name="%featureProvider">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.junit" version="0.0.0"/>
- <import plugin="org.eclipse.cdt.core"/>
- <import plugin="org.eclipse.cdt.debug.core"/>
- <import plugin="org.eclipse.cdt.debug.ui"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.debug.core"/>
- <import plugin="org.eclipse.debug.ui"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.ui.editors"/>
- <import plugin="org.eclipse.cdt.core.tests"/>
- <import plugin="org.eclipse.cdt.launch"/>
- <import plugin="org.eclipse.ui.console"/>
- <import plugin="org.eclipse.birt.chart.engine"/>
- <import plugin="org.eclipse.birt.core"/>
- <import plugin="org.eclipse.cdt.ui"/>
- <import plugin="org.eclipse.linuxtools.systemtap.ui.consolelog"/>
- <import plugin="org.eclipse.linuxtools.systemtap.ui.consolelog.tests"/>
- <import plugin="org.eclipse.linuxtools.systemtap.ui.editor"/>
- <import plugin="org.eclipse.linuxtools.systemtap.ui.graphing"/>
- <import plugin="org.eclipse.linuxtools.systemtap.ui.graphing.tests"/>
- <import plugin="org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui"/>
- <import plugin="org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests"/>
- <import plugin="org.eclipse.linuxtools.systemtap.ui.graphingapi.ui"/>
- <import plugin="org.eclipse.linuxtools.systemtap.ui.ide"/>
- <import plugin="org.eclipse.linuxtools.systemtap.ui.ide.tests"/>
- <import plugin="org.eclipse.linuxtools.systemtap.ui.logging"/>
- <import plugin="org.eclipse.linuxtools.systemtap.ui.structures"/>
- <import plugin="org.eclipse.linuxtools.systemtap.ui.structures.tests"/>
- <import plugin="org.eclipse.linuxtools.systemtap.ui.systemtapgui"/>
- </requires>
-
- <plugin
- id="org.eclipse.linuxtools.systemtap.ui.consolelog.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.linuxtools.systemtap.ui.graphing.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-
- <plugin
- id="org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.linuxtools.systemtap.ui.ide.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.linuxtools.systemtap.ui.structures.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/.classpath
deleted file mode 100644
index cc60ba7232..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry exported="true" 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/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/.project b/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/.project
deleted file mode 100644
index 8e87749a8c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.ui.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/.settings/org.eclipse.jdt.core.prefs b/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 24ac4cae5c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Sat Jun 20 00:37:21 IST 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.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/ChangeLog
deleted file mode 100644
index dd4afca2a7..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/ChangeLog
+++ /dev/null
@@ -1,16 +0,0 @@
-2009-08-07 Andrew Overholt <overholt@redhat.com>
-
- * plugin.properties: Change provider from Eclipse.org to Eclipse.
-
-2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
-
- * .classpath: New file.
- * .project: New file.
- * .settings/org.eclipse.jdt.core.prefs: New file.
- * about.html: New file.
- * build.properties: New file.
- * META-INF/MANIFEST.MF: New file.
- * plugin.properties: New file.
- * plugin.xml: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/tests/SystemtapGuiMockProcess.java: New file.
- * src/org/eclipse/linuxtools/systemtap/ui/tests/SystemtapGuiTestsPlugin.java: \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index f99e3fcf32..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,20 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name.0
-Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.tests;singleton:=true
-Bundle-Version: 0.1.0.qualifier
-Bundle-Vendor: %Bundle-Vendor.0
-Bundle-Localization: plugin
-Bundle-ActivationPolicy: lazy
-Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.tests.SystemTapGuiTestsPlugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.junit;bundle-version="[0.0.0,4.0.0)"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.eclipse.cdt.core.model,
- org.eclipse.cdt.launch,
- org.eclipse.core.resources,
- org.eclipse.debug.core,
- org.eclipse.debug.core.model,
- org.eclipse.debug.ui
-Export-Package: org.eclipse.linuxtools.systemtap.ui.tests
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/about.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/about.html
deleted file mode 100644
index e6a2741fc0..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/about.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head>
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>About</title>
-</head><body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>October 24, 2008</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). 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, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body></html> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/build.properties
deleted file mode 100644
index 234be1c706..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-bin.includes = META-INF/,\
- test.xml,\
- about.html,\
- plugin.properties,\
- .,\
- plugin.xml
-jars.compile.order = .
-source.. = src/
-output.. = bin/
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/plugin.properties
deleted file mode 100644
index 4fb735673e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#*******************************************************************************
-# 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, Inc. - initial API and implementation
-#********************************************************************************
-Bundle-Vendor.0 = Eclipse
-Bundle-Name.0 = SystemTapGui Test Suite (Incubation)
-launchConfigurationType.name.0 = SystemTapGui (Test) \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/plugin.xml
deleted file mode 100644
index a8be1517f3..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/plugin.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension
- point="org.eclipse.debug.core.launchDelegates">
- <launchDelegate
- delegate="org.eclipse.linuxtools.systemtap.ui.tests.SystemtapGuiTestLaunchDelegate"
- id="org.eclipse.linuxtools.systemtap.ui.tests.launchDelegate"
- modes="profile"
- sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
- sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer"
- type="org.eclipse.linuxtools.systemtap.ui.launch.systemtapguiLaunch">
- </launchDelegate>
- </extension>
-
-</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/src/org/eclipse/linuxtools/systemtap/ui/tests/SystemtapGuiMockProcess.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/src/org/eclipse/linuxtools/systemtap/ui/tests/SystemtapGuiMockProcess.java
deleted file mode 100644
index 3c31f495e7..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/src/org/eclipse/linuxtools/systemtap/ui/tests/SystemtapGuiMockProcess.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.eclipse.linuxtools.systemtap.ui.tests;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-public class SystemtapGuiMockProcess extends Process {
- protected int exitcode;
-
- public SystemtapGuiMockProcess(int exitcode) {
- this.exitcode = exitcode;
- }
-
- @Override
- public void destroy() {
- }
-
- @Override
- public int exitValue() {
- return exitcode;
- }
-
- @Override
- public InputStream getErrorStream() {
- return new InputStream() {
- @Override
- public int read() throws IOException {
- return -1;
- }
- };
- }
-
- @Override
- public InputStream getInputStream() {
- return new InputStream() {
- @Override
- public int read() throws IOException {
- return -1;
- }
- };
- }
-
- @Override
- public OutputStream getOutputStream() {
- return new OutputStream() {
- public void write(int b) throws IOException {
- }
- };
- }
-
- @Override
- public int waitFor() throws InterruptedException {
- return exitcode;
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/src/org/eclipse/linuxtools/systemtap/ui/tests/SystemtapGuiTestsPlugin.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/src/org/eclipse/linuxtools/systemtap/ui/tests/SystemtapGuiTestsPlugin.java
deleted file mode 100644
index d943b9d4f3..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.tests/src/org/eclipse/linuxtools/systemtap/ui/tests/SystemtapGuiTestsPlugin.java
+++ /dev/null
@@ -1,83 +0,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:
- * Elliott Baron <ebaron@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.ui.tests;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-public class SystemtapGuiTestsPlugin extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.linuxtools.systemtap.ui.tests"; //$NON-NLS-1$
-
- // Test Launch Delegate ID
- public static final String DELEGATE_ID = PLUGIN_ID + ".launchDelegate"; //$NON-NLS-1$
-
- // Java Runtime System Properties
-
- /**
- * usage: -Declipse.valgrind.tests.generateFiles=<yes|no> [default: no]
- * if yes, will run Valgrind and store its output files for each test under
- * <plugin root>/valgrindFiles
- * no, will use default output directory for valgrind's output
- */
- public static final String SYSTEM_PROPERTY_GENERATE_FILES = "eclipse.valgrind.tests.generateFiles"; //$NON-NLS-1$
- public static final boolean GENERATE_FILES = System.getProperty(SYSTEM_PROPERTY_GENERATE_FILES, "no").equals("yes"); //$NON-NLS-1$ //$NON-NLS-2$
-
- /**
- * usage: -Declipse.valgrind.tests.runValgrind=<yes|no> [default: yes]
- * if yes, will run Valgrind as in a normal launch
- * no, will simulate Valgrind execution with pregenerated log files
- */
- public static final String SYSTEM_PROPERTY_RUN_VALGRIND = "eclipse.valgrind.tests.runValgrind"; //$NON-NLS-1$
- // generateFiles implies runValgrind
- public static final boolean RUN_VALGRIND = GENERATE_FILES || System.getProperty(SYSTEM_PROPERTY_RUN_VALGRIND, "yes").equals("yes"); //$NON-NLS-1$ //$NON-NLS-2$
-
- // Launch config attribute to mock valgrind's exit code
- public static final String ATTR_MOCK_EXIT_CODE = PLUGIN_ID + ".MOCK_EXIT_CODE"; //$NON-NLS-1$
-
- // The shared instance
- private static SystemtapGuiTestsPlugin plugin;
-
- /**
- * The constructor
- */
- public SystemtapGuiTestsPlugin() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static SystemtapGuiTestsPlugin getDefault() {
- return plugin;
- }
-
-}

Back to the top